aboutsummaryrefslogtreecommitdiff
path: root/node_modules/typedoc
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-08-14 05:01:11 +0200
committerFlorian Dold <florian.dold@gmail.com>2017-08-14 05:02:09 +0200
commit363723fc84f7b8477592e0105aeb331ec9a017af (patch)
tree29f92724f34131bac64d6a318dd7e30612e631c7 /node_modules/typedoc
parent5634e77ad96bfe1818f6b6ee70b7379652e5487f (diff)
downloadwallet-core-363723fc84f7b8477592e0105aeb331ec9a017af.tar.xz
node_modules
Diffstat (limited to 'node_modules/typedoc')
-rw-r--r--node_modules/typedoc/README.md14
-rw-r--r--node_modules/typedoc/dist/index.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/application.js57
-rw-r--r--node_modules/typedoc/dist/lib/application.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/cli.js60
-rw-r--r--node_modules/typedoc/dist/lib/cli.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/converter/components.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/converter/context.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/converter/converter.d.ts4
-rw-r--r--node_modules/typedoc/dist/lib/converter/converter.js113
-rw-r--r--node_modules/typedoc/dist/lib/converter/converter.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/converter/factories/comment.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/converter/factories/declaration.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/converter/factories/index.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/converter/factories/parameter.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/converter/factories/reference.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/converter/factories/signature.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/converter/factories/type-parameter.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/converter/index.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/converter/nodes/accessor.js6
-rw-r--r--node_modules/typedoc/dist/lib/converter/nodes/accessor.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/converter/nodes/alias.js6
-rw-r--r--node_modules/typedoc/dist/lib/converter/nodes/alias.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/converter/nodes/block.js30
-rw-r--r--node_modules/typedoc/dist/lib/converter/nodes/block.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/converter/nodes/class.js6
-rw-r--r--node_modules/typedoc/dist/lib/converter/nodes/class.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/converter/nodes/constructor.js6
-rw-r--r--node_modules/typedoc/dist/lib/converter/nodes/constructor.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/converter/nodes/enum.js6
-rw-r--r--node_modules/typedoc/dist/lib/converter/nodes/enum.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/converter/nodes/export.js8
-rw-r--r--node_modules/typedoc/dist/lib/converter/nodes/export.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/converter/nodes/function.js6
-rw-r--r--node_modules/typedoc/dist/lib/converter/nodes/function.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/converter/nodes/index.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/converter/nodes/interface.js6
-rw-r--r--node_modules/typedoc/dist/lib/converter/nodes/interface.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/converter/nodes/literal-object.js6
-rw-r--r--node_modules/typedoc/dist/lib/converter/nodes/literal-object.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/converter/nodes/literal-type.js6
-rw-r--r--node_modules/typedoc/dist/lib/converter/nodes/literal-type.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/converter/nodes/module.js6
-rw-r--r--node_modules/typedoc/dist/lib/converter/nodes/module.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/converter/nodes/signature-call.js6
-rw-r--r--node_modules/typedoc/dist/lib/converter/nodes/signature-call.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/converter/nodes/signature-index.js6
-rw-r--r--node_modules/typedoc/dist/lib/converter/nodes/signature-index.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/converter/nodes/variable-statement.js6
-rw-r--r--node_modules/typedoc/dist/lib/converter/nodes/variable-statement.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/converter/nodes/variable.js6
-rw-r--r--node_modules/typedoc/dist/lib/converter/nodes/variable.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/converter/plugins/CommentPlugin.js11
-rw-r--r--node_modules/typedoc/dist/lib/converter/plugins/CommentPlugin.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/converter/plugins/DecoratorPlugin.js6
-rw-r--r--node_modules/typedoc/dist/lib/converter/plugins/DecoratorPlugin.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/converter/plugins/DeepCommentPlugin.js6
-rw-r--r--node_modules/typedoc/dist/lib/converter/plugins/DeepCommentPlugin.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/converter/plugins/DynamicModulePlugin.js6
-rw-r--r--node_modules/typedoc/dist/lib/converter/plugins/DynamicModulePlugin.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/converter/plugins/GitHubPlugin.js20
-rw-r--r--node_modules/typedoc/dist/lib/converter/plugins/GitHubPlugin.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/converter/plugins/GroupPlugin.js93
-rw-r--r--node_modules/typedoc/dist/lib/converter/plugins/GroupPlugin.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/converter/plugins/ImplementsPlugin.js6
-rw-r--r--node_modules/typedoc/dist/lib/converter/plugins/ImplementsPlugin.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/converter/plugins/PackagePlugin.js18
-rw-r--r--node_modules/typedoc/dist/lib/converter/plugins/PackagePlugin.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/converter/plugins/SourcePlugin.js6
-rw-r--r--node_modules/typedoc/dist/lib/converter/plugins/SourcePlugin.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/converter/plugins/TypePlugin.js6
-rw-r--r--node_modules/typedoc/dist/lib/converter/plugins/TypePlugin.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/converter/plugins/index.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/converter/types/alias.js6
-rw-r--r--node_modules/typedoc/dist/lib/converter/types/alias.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/converter/types/array.js6
-rw-r--r--node_modules/typedoc/dist/lib/converter/types/array.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/converter/types/binding-array.js6
-rw-r--r--node_modules/typedoc/dist/lib/converter/types/binding-array.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/converter/types/binding-object.js6
-rw-r--r--node_modules/typedoc/dist/lib/converter/types/binding-object.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/converter/types/enum.js6
-rw-r--r--node_modules/typedoc/dist/lib/converter/types/enum.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/converter/types/index.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/converter/types/intrinsic.js6
-rw-r--r--node_modules/typedoc/dist/lib/converter/types/intrinsic.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/converter/types/reference.js6
-rw-r--r--node_modules/typedoc/dist/lib/converter/types/reference.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/converter/types/string-literal.js8
-rw-r--r--node_modules/typedoc/dist/lib/converter/types/string-literal.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/converter/types/this.js6
-rw-r--r--node_modules/typedoc/dist/lib/converter/types/this.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/converter/types/tuple.js6
-rw-r--r--node_modules/typedoc/dist/lib/converter/types/tuple.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/converter/types/type-parameter.js6
-rw-r--r--node_modules/typedoc/dist/lib/converter/types/type-parameter.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/converter/types/union-or-intersection.js6
-rw-r--r--node_modules/typedoc/dist/lib/converter/types/union-or-intersection.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/converter/types/unknown.js6
-rw-r--r--node_modules/typedoc/dist/lib/converter/types/unknown.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/converter/utils/compiler-host.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/models/ReflectionGroup.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/models/comments/comment.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/models/comments/index.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/models/reflections/abstract.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/models/reflections/container.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/models/reflections/declaration.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/models/reflections/index.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/models/reflections/parameter.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/models/reflections/project.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/models/reflections/signature.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/models/reflections/type-parameter.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/models/sources/directory.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/models/sources/file.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/models/sources/index.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/models/types/array.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/models/types/index.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/models/types/intersection.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/models/types/intrinsic.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/models/types/reference.js4
-rw-r--r--node_modules/typedoc/dist/lib/models/types/reference.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/models/types/reflection.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/models/types/string-literal.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/models/types/tuple.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/models/types/type-parameter.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/models/types/union.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/models/types/unknown.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/output/components.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/output/events.js10
-rw-r--r--node_modules/typedoc/dist/lib/output/events.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/output/helpers/if-signature.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/output/models/NavigationItem.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/output/plugins/AssetsPlugin.js6
-rw-r--r--node_modules/typedoc/dist/lib/output/plugins/AssetsPlugin.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/output/plugins/JavascriptIndexPlugin.js6
-rw-r--r--node_modules/typedoc/dist/lib/output/plugins/JavascriptIndexPlugin.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/output/plugins/LayoutPlugin.js6
-rw-r--r--node_modules/typedoc/dist/lib/output/plugins/LayoutPlugin.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/output/plugins/MarkedLinksPlugin.js25
-rw-r--r--node_modules/typedoc/dist/lib/output/plugins/MarkedLinksPlugin.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/output/plugins/MarkedPlugin.js34
-rw-r--r--node_modules/typedoc/dist/lib/output/plugins/MarkedPlugin.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/output/plugins/NavigationPlugin.js6
-rw-r--r--node_modules/typedoc/dist/lib/output/plugins/NavigationPlugin.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/output/plugins/PrettyPrintPlugin.js57
-rw-r--r--node_modules/typedoc/dist/lib/output/plugins/PrettyPrintPlugin.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/output/plugins/TocPlugin.js11
-rw-r--r--node_modules/typedoc/dist/lib/output/plugins/TocPlugin.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/output/plugins/index.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/output/renderer.js109
-rw-r--r--node_modules/typedoc/dist/lib/output/renderer.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/output/theme.js6
-rw-r--r--node_modules/typedoc/dist/lib/output/theme.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/output/themes/DefaultTheme.js42
-rw-r--r--node_modules/typedoc/dist/lib/output/themes/DefaultTheme.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/output/themes/MinimalTheme.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/output/utils/resources.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/output/utils/resources/helpers.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/output/utils/resources/templates.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/utils/component.js4
-rw-r--r--node_modules/typedoc/dist/lib/utils/component.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/utils/index.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/utils/options/help.js6
-rw-r--r--node_modules/typedoc/dist/lib/utils/options/help.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/utils/options/index.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/utils/options/options.js8
-rw-r--r--node_modules/typedoc/dist/lib/utils/options/options.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/utils/options/readers/arguments.js6
-rw-r--r--node_modules/typedoc/dist/lib/utils/options/readers/arguments.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/utils/options/readers/index.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/utils/options/readers/tsconfig.js29
-rw-r--r--node_modules/typedoc/dist/lib/utils/options/readers/tsconfig.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/utils/options/readers/typedoc.js29
-rw-r--r--node_modules/typedoc/dist/lib/utils/options/readers/typedoc.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/utils/options/sources/component.js6
-rw-r--r--node_modules/typedoc/dist/lib/utils/options/sources/component.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/utils/options/sources/index.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/utils/options/sources/typescript.js21
-rw-r--r--node_modules/typedoc/dist/lib/utils/options/sources/typescript.js.map2
-rw-r--r--node_modules/typedoc/dist/lib/utils/plugins.js22
-rw-r--r--node_modules/typedoc/dist/lib/utils/plugins.js.map2
-rw-r--r--node_modules/typedoc/node_modules/typescript/.mailmap21
-rw-r--r--node_modules/typedoc/node_modules/typescript/AUTHORS.md19
-rw-r--r--node_modules/typedoc/node_modules/typescript/lib/cancellationToken.js30
-rw-r--r--node_modules/typedoc/node_modules/typescript/lib/lib.d.ts8779
-rw-r--r--node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts8254
-rw-r--r--node_modules/typedoc/node_modules/typescript/lib/lib.es2015.iterable.d.ts78
-rw-r--r--node_modules/typedoc/node_modules/typescript/lib/lib.es2015.proxy.d.ts2
-rw-r--r--node_modules/typedoc/node_modules/typescript/lib/lib.es2016.full.d.ts8254
-rw-r--r--node_modules/typedoc/node_modules/typescript/lib/lib.es2017.d.ts3
-rw-r--r--node_modules/typedoc/node_modules/typescript/lib/lib.es2017.full.d.ts8256
-rw-r--r--node_modules/typedoc/node_modules/typescript/lib/lib.es2017.intl.d.ts30
-rw-r--r--node_modules/typedoc/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts93
-rw-r--r--node_modules/typedoc/node_modules/typescript/lib/lib.es5.d.ts525
-rw-r--r--node_modules/typedoc/node_modules/typescript/lib/lib.es6.d.ts8859
-rw-r--r--node_modules/typedoc/node_modules/typescript/lib/lib.esnext.full.d.ts8254
-rw-r--r--node_modules/typedoc/node_modules/typescript/lib/lib.webworker.d.ts269
-rw-r--r--node_modules/typedoc/node_modules/typescript/lib/protocol.d.ts3867
-rw-r--r--node_modules/typedoc/node_modules/typescript/lib/tsc.js8560
-rw-r--r--node_modules/typedoc/node_modules/typescript/lib/tsserver.js12483
-rw-r--r--node_modules/typedoc/node_modules/typescript/lib/tsserverlibrary.d.ts849
-rw-r--r--node_modules/typedoc/node_modules/typescript/lib/tsserverlibrary.js12420
-rw-r--r--node_modules/typedoc/node_modules/typescript/lib/typescript.d.ts763
-rw-r--r--node_modules/typedoc/node_modules/typescript/lib/typescript.js13868
-rw-r--r--node_modules/typedoc/node_modules/typescript/lib/typescriptServices.d.ts761
-rw-r--r--node_modules/typedoc/node_modules/typescript/lib/typescriptServices.js13868
-rw-r--r--node_modules/typedoc/node_modules/typescript/lib/typingsInstaller.js571
-rw-r--r--node_modules/typedoc/node_modules/typescript/lib/watchGuard.js30
-rw-r--r--node_modules/typedoc/node_modules/typescript/package.json11
-rw-r--r--node_modules/typedoc/node_modules/typescript/test.config2
-rw-r--r--node_modules/typedoc/node_modules/typescript/yarn.lock3362
-rw-r--r--node_modules/typedoc/package.json10
212 files changed, 71000 insertions, 53462 deletions
diff --git a/node_modules/typedoc/README.md b/node_modules/typedoc/README.md
index 1bb0c3169..778d465ad 100644
--- a/node_modules/typedoc/README.md
+++ b/node_modules/typedoc/README.md
@@ -49,12 +49,16 @@ in order to change the behaviour of TypeDoc.
Specifies the location the documentation should be written to.
* `--mode <file|modules>`<br>
Specifies the output mode the project is used to be compiled with.
+* `--options`<br>
+ Specify a js option file that should be loaded. If not specified TypeDoc will look for 'typedoc.js' in the current directory.
* `--json <path/to/output.json>`<br>
Specifies the location and file name a json file describing the project is written to. When specified no documentation will be generated.
+* `--ignoreCompilerErrors`<br>
+ Should TypeDoc still generate documentation pages even after the compiler has returned errors?
#### Source file handling
* `--exclude <pattern>`<br>
- Exclude files by the given pattern when a path is provided as source
+ Exclude files by the given pattern when a path is provided as source. Supports standard minimatch patterns (see [#170](https://github.com/TypeStrong/typedoc/issues/170))
* `--includeDeclarations`<br>
Turn on parsing of .d.ts declaration files.
* `--externalPattern <pattern>`<br>
@@ -78,6 +82,8 @@ in order to change the behaviour of TypeDoc.
* `--readme <path/to/readme|none>`<br>
Path to the readme file that should be displayed on the index page. Pass `none` to disable the index page
and start the documentation on the globals page.
+* `--plugin`<br>
+ Specify the npm plugins that should be loaded. Omit to load all installed plugins, set to 'none' to load no plugins.
* `--hideGenerator`<br>
Do not print the TypeDoc link at the end of the page.
* `--gaID`<br>
@@ -102,7 +108,7 @@ in order to change the behaviour of TypeDoc.
* `--version`<br>
Display the version number of TypeDoc.
* `--help`<br>
- Display a simple cheat sheet.
+ Display all TypeDoc options.
### Webpack
@@ -134,8 +140,8 @@ Visit our homepage for advanced guides and an extensive API documentation:<br>
## Contributing
-Contributions are welcome and appreciated. You can find TypeDoc on GitHub, feel free to start
-an issue or create a pull requests:<br>
+This project is maintained by a community of developers. Contributions are welcome and appreciated.
+You can find TypeDoc on GitHub; feel free to start an issue or create a pull requests:<br>
[https://github.com/TypeStrong/typedoc](https://github.com/TypeStrong/typedoc)
diff --git a/node_modules/typedoc/dist/index.js.map b/node_modules/typedoc/dist/index.js.map
index 07794b8af..5701b94b6 100644
--- a/node_modules/typedoc/dist/index.js.map
+++ b/node_modules/typedoc/dist/index.js.map
@@ -1 +1 @@
-{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAAA,iDAA8C;AAAtC,oCAAA,WAAW,CAAA;AACnB,iCAAyC;AAAjC,+BAAA,cAAc,CAAA;AAEtB,6CAA0D;AAAlD,mCAAA,eAAe,CAAA;AAAE,yBAAA,KAAK,CAAA;AAC9B,8DAAoE;AAA5D,uCAAA,iBAAiB,CAAA;AACzB,qCAA6C;AAArC,6BAAA,aAAa,CAAA;AACrB,4DAAmE;AAA3D,sCAAA,iBAAiB,CAAA","sourcesContent":["export {Application} from './lib/application';\nexport {CliApplication} from './lib/cli';\n\nexport {EventDispatcher, Event} from './lib/utils/events';\nexport {resetReflectionID} from './lib/models/reflections/abstract';\nexport {normalizePath} from './lib/utils/fs';\nexport {ProjectReflection} from './lib/models/reflections/project';\n"]} \ No newline at end of file
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAAA,iDAAgD;AAAvC,oCAAA,WAAW,CAAA;AACpB,iCAA2C;AAAlC,+BAAA,cAAc,CAAA;AAEvB,6CAA4D;AAAnD,mCAAA,eAAe,CAAA;AAAE,yBAAA,KAAK,CAAA;AAC/B,8DAAsE;AAA7D,uCAAA,iBAAiB,CAAA;AAC1B,qCAA+C;AAAtC,6BAAA,aAAa,CAAA;AACtB,4DAAqE;AAA5D,sCAAA,iBAAiB,CAAA","sourcesContent":["export { Application } from './lib/application';\nexport { CliApplication } from './lib/cli';\n\nexport { EventDispatcher, Event } from './lib/utils/events';\nexport { resetReflectionID } from './lib/models/reflections/abstract';\nexport { normalizePath } from './lib/utils/fs';\nexport { ProjectReflection } from './lib/models/reflections/project';\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/application.js b/node_modules/typedoc/dist/lib/application.js
index 8ad3496fe..067211dff 100644
--- a/node_modules/typedoc/dist/lib/application.js
+++ b/node_modules/typedoc/dist/lib/application.js
@@ -27,7 +27,7 @@ var index_3 = require("./utils/index");
var component_1 = require("./utils/component");
var index_4 = require("./utils/options/index");
var declaration_1 = require("./utils/options/declaration");
-var Application = Application_1 = (function (_super) {
+var Application = (function (_super) {
__extends(Application, _super);
function Application(options) {
var _this = _super.call(this, null) || this;
@@ -39,6 +39,7 @@ var Application = Application_1 = (function (_super) {
_this.bootstrap(options);
return _this;
}
+ Application_1 = Application;
Application.prototype.bootstrap = function (options) {
this.options.read(options, index_4.OptionsReadMode.Prefetch);
var logger = this.loggerType;
@@ -153,34 +154,34 @@ var Application = Application_1 = (function (_super) {
''
].join(typescript.sys.newLine);
};
+ Application.VERSION = '0.8.0';
+ __decorate([
+ component_1.Option({
+ name: 'logger',
+ help: 'Specify the logger that should be used, \'none\' or \'console\'',
+ defaultValue: 'console',
+ type: declaration_1.ParameterType.Mixed
+ })
+ ], Application.prototype, "loggerType", void 0);
+ __decorate([
+ component_1.Option({
+ name: 'ignoreCompilerErrors',
+ help: 'Should TypeDoc generate documentation pages even after the compiler has returned errors?',
+ type: declaration_1.ParameterType.Boolean
+ })
+ ], Application.prototype, "ignoreCompilerErrors", void 0);
+ __decorate([
+ component_1.Option({
+ name: 'exclude',
+ help: 'Define a pattern for excluded files when specifying paths.',
+ type: declaration_1.ParameterType.String
+ })
+ ], Application.prototype, "exclude", void 0);
+ Application = Application_1 = __decorate([
+ component_1.Component({ name: 'application', internal: true })
+ ], Application);
return Application;
+ var Application_1;
}(component_1.ChildableComponent));
-Application.VERSION = '0.7.1';
-__decorate([
- component_1.Option({
- name: 'logger',
- help: 'Specify the logger that should be used, \'none\' or \'console\'',
- defaultValue: 'console',
- type: declaration_1.ParameterType.Mixed
- })
-], Application.prototype, "loggerType", void 0);
-__decorate([
- component_1.Option({
- name: 'ignoreCompilerErrors',
- help: 'Should TypeDoc generate documentation pages even after the compiler has returned errors?',
- type: declaration_1.ParameterType.Boolean
- })
-], Application.prototype, "ignoreCompilerErrors", void 0);
-__decorate([
- component_1.Option({
- name: 'exclude',
- help: 'Define a pattern for excluded files when specifying paths.',
- type: declaration_1.ParameterType.String
- })
-], Application.prototype, "exclude", void 0);
-Application = Application_1 = __decorate([
- component_1.Component({ name: 'application', internal: true })
-], Application);
exports.Application = Application;
-var Application_1;
//# sourceMappingURL=application.js.map \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/application.js.map b/node_modules/typedoc/dist/lib/application.js.map
index 96b937bd8..f0b385428 100644
--- a/node_modules/typedoc/dist/lib/application.js.map
+++ b/node_modules/typedoc/dist/lib/application.js.map
@@ -1 +1 @@
-{"version":3,"file":"application.js","sourceRoot":"","sources":["../../src/lib/application.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAQA,2BAA6B;AAC7B,uBAAyB;AACzB,uCAAyC;AACzC,uCAAgD;AAEhD,2CAA4C;AAC5C,8CAA2C;AAC3C,wCAAiD;AACjD,uCAA2F;AAE3F,+CAA2F;AAC3F,+CAAkF;AAClF,2DAA0D;AAiB1D,IAAa,WAAW;IAAS,+BAA+D;IAoD5F,qBAAY,OAAgB;QAA5B,YACI,kBAAM,IAAI,CAAC,SASd;QAPG,KAAI,CAAC,MAAM,GAAM,IAAI,qBAAa,EAAE,CAAC;QACrC,KAAI,CAAC,SAAS,GAAG,KAAI,CAAC,YAAY,CAAC,WAAW,EAAE,iBAAS,CAAC,CAAC;QAC3D,KAAI,CAAC,QAAQ,GAAI,KAAI,CAAC,YAAY,CAAC,UAAU,EAAE,mBAAQ,CAAC,CAAC;QACzD,KAAI,CAAC,OAAO,GAAK,KAAI,CAAC,YAAY,CAAC,SAAS,EAAE,kBAAU,CAAC,CAAC;QAC1D,KAAI,CAAC,OAAO,GAAK,KAAI,CAAC,YAAY,CAAC,SAAS,EAAE,eAAO,CAAC,CAAC;QAEvD,KAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;;IAC5B,CAAC;IAOS,+BAAS,GAAnB,UAAoB,OAAgB;QAChC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,uBAAe,CAAC,QAAQ,CAAC,CAAC;QAErD,IAAM,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC;QAC/B,EAAE,CAAC,CAAC,OAAO,MAAM,KAAK,UAAU,CAAC,CAAC,CAAC;YAC/B,IAAI,CAAC,MAAM,GAAG,IAAI,sBAAc,CAAO,MAAM,CAAC,CAAC;QACnD,CAAC;QAAC,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC,CAAC;YAC3B,IAAI,CAAC,MAAM,GAAG,IAAI,cAAM,EAAE,CAAC;QAC/B,CAAC;QAED,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;QACpB,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,uBAAe,CAAC,KAAK,CAAC,CAAC;IAC7D,CAAC;IAKD,sBAAI,oCAAW;aAAf;YACI,MAAM,CAAC,IAAI,CAAC;QAChB,CAAC;;;OAAA;IAED,sBAAI,8BAAK;aAAT;YACI,MAAM,CAAC,KAAK,CAAC;QACjB,CAAC;;;OAAA;IAKM,uCAAiB,GAAxB;QACI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC;IACvD,CAAC;IAEM,0CAAoB,GAA3B;QACI,IAAM,MAAM,GAAG,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACxC,IAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,cAAc,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;QAC1F,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAQM,6BAAO,GAAd,UAAe,GAAa;QACxB,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,6BAA6B,EAAE,IAAI,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,iBAAiB,EAAE,CAAC,CAAC;QAE1G,IAAM,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAC3C,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;YACxC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YACvC,EAAE,CAAC,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC,CAAC;gBAC5B,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC;gBAC1B,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC;YAC1B,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,MAAM,CAAC,IAAI,CAAC;YAChB,CAAC;QACL,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC;QAC1B,CAAC;IACL,CAAC;IAkBM,kCAAY,GAAnB,UAAoB,KAAU,EAAE,GAAW;QACvC,IAAM,OAAO,GAAG,KAAK,YAAY,yBAAiB,GAAG,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACjF,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YACX,MAAM,CAAC,KAAK,CAAC;QACjB,CAAC;QAED,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACxB,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;QACnC,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;YAC1B,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,+DAA+D,CAAC,CAAC;QACvF,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,+BAA+B,EAAE,GAAG,CAAC,CAAC;QAC9D,CAAC;QAED,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAkBM,kCAAY,GAAnB,UAAoB,KAAU,EAAE,GAAW;QACvC,IAAM,OAAO,GAAG,KAAK,YAAY,yBAAiB,GAAG,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACjF,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YACX,MAAM,CAAC,KAAK,CAAC;QACjB,CAAC;QAED,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACxB,iBAAS,CAAC,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE,KAAK,CAAC,CAAC;QACtE,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,oBAAoB,EAAE,GAAG,CAAC,CAAC;QAE/C,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAYM,sCAAgB,GAAvB,UAAwB,UAAqB;QACzC,IAAI,OAAmB,EAAE,KAAK,GAAa,EAAE,CAAC;QAC9C,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;YACf,OAAO,GAAG,IAAI,qBAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC1C,CAAC;QAED,aAAa,OAAe;YACxB,EAAE,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,UAAC,IAAI;gBACjC,IAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;gBAC1C,EAAE,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;oBACtC,GAAG,CAAC,QAAQ,CAAC,CAAC;gBAClB,CAAC;gBAAC,IAAI,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;oBAClC,EAAE,CAAC,CAAC,OAAO,IAAI,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;wBACzD,MAAM,CAAC;oBACX,CAAC;oBAED,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;gBACzB,CAAC;YACL,CAAC,CAAC,CAAC;QACP,CAAC;QAED,UAAU,CAAC,OAAO,CAAC,UAAC,IAAI;YACpB,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YAC1B,EAAE,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;gBAClC,GAAG,CAAC,IAAI,CAAC,CAAC;YACd,CAAC;YAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;gBAC1C,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACrB,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,KAAK,CAAC;IACjB,CAAC;IAKM,8BAAQ,GAAf;QACI,MAAM,CAAC;YACH,EAAE;YACF,UAAU,GAAG,aAAW,CAAC,OAAO;YAChC,mBAAmB,GAAG,IAAI,CAAC,oBAAoB,EAAE,GAAG,QAAQ,GAAG,IAAI,CAAC,iBAAiB,EAAE;YACvF,EAAE;SACL,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACnC,CAAC;IACL,kBAAC;AAAD,CAAC,AAtPD,CAAiC,8BAAkB,GAsPlD;AAzMU,mBAAO,GAAG,eAAe,CAAC;AAnBjC;IANC,kBAAM,CAAC;QACJ,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,iEAAiE;QACvE,YAAY,EAAE,SAAS;QACvB,IAAI,EAAE,2BAAa,CAAC,KAAK;KAC5B,CAAC;+CAC0B;AAO5B;IALC,kBAAM,CAAC;QACJ,IAAI,EAAE,sBAAsB;QAC5B,IAAI,EAAE,0FAA0F;QAChG,IAAI,EAAE,2BAAa,CAAC,OAAO;KAC9B,CAAC;yDAC4B;AAO9B;IALC,kBAAM,CAAC;QACJ,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,4DAA4D;QAClE,IAAI,EAAE,2BAAa,CAAC,MAAM;KAC7B,CAAC;4CACc;AAxCP,WAAW;IADvB,qBAAS,CAAC,EAAC,IAAI,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAC,CAAC;GACpC,WAAW,CAsPvB;AAtPY,kCAAW","sourcesContent":["/**\n * The TypeDoc main module and namespace.\n *\n * The [[Application]] class holds the core logic of the cli application. All code related\n * to resolving reflections is stored in [[TypeDoc.Factories]], the actual data models can be found\n * in [[TypeDoc.Models]] and the final rendering is defined in [[TypeDoc.Output]].\n */\n\nimport * as Path from 'path';\nimport * as FS from 'fs';\nimport * as typescript from 'typescript';\nimport {Minimatch, IMinimatch} from 'minimatch';\n\nimport {Converter} from './converter/index';\nimport {Renderer} from './output/renderer';\nimport {ProjectReflection} from './models/index';\nimport {Logger, ConsoleLogger, CallbackLogger, PluginHost, writeFile} from './utils/index';\n\nimport {AbstractComponent, ChildableComponent, Component, Option} from './utils/component';\nimport {Options, OptionsReadMode, OptionsReadResult} from './utils/options/index';\nimport {ParameterType} from './utils/options/declaration';\n\n/**\n * The default TypeDoc main application class.\n *\n * This class holds the two main components of TypeDoc, the [[Dispatcher]] and\n * the [[Renderer]]. When running TypeDoc, first the [[Dispatcher]] is invoked which\n * generates a [[ProjectReflection]] from the passed in source files. The\n * [[ProjectReflection]] is a hierarchical model representation of the TypeScript\n * project. Afterwards the model is passed to the [[Renderer]] which uses an instance\n * of [[BaseTheme]] to generate the final documentation.\n *\n * Both the [[Dispatcher]] and the [[Renderer]] are subclasses of the [[EventDispatcher]]\n * and emit a series of events while processing the project. Subscribe to these Events\n * to control the application flow or alter the output.\n */\n@Component({name: 'application', internal: true})\nexport class Application extends ChildableComponent<Application, AbstractComponent<Application>> {\n options: Options;\n\n /**\n * The converter used to create the declaration reflections.\n */\n converter: Converter;\n\n /**\n * The renderer used to generate the documentation output.\n */\n renderer: Renderer;\n\n /**\n * The logger that should be used to output messages.\n */\n logger: Logger;\n\n plugins: PluginHost;\n\n @Option({\n name: 'logger',\n help: 'Specify the logger that should be used, \\'none\\' or \\'console\\'',\n defaultValue: 'console',\n type: ParameterType.Mixed\n })\n loggerType: string|Function;\n\n @Option({\n name: 'ignoreCompilerErrors',\n help: 'Should TypeDoc generate documentation pages even after the compiler has returned errors?',\n type: ParameterType.Boolean\n })\n ignoreCompilerErrors: boolean;\n\n @Option({\n name: 'exclude',\n help: 'Define a pattern for excluded files when specifying paths.',\n type: ParameterType.String\n })\n exclude: string;\n\n /**\n * The version number of TypeDoc.\n */\n static VERSION = '{{ VERSION }}';\n\n /**\n * Create a new TypeDoc application instance.\n *\n * @param options An object containing the options that should be used.\n */\n constructor(options?: Object) {\n super(null);\n\n this.logger = new ConsoleLogger();\n this.converter = this.addComponent('converter', Converter);\n this.renderer = this.addComponent('renderer', Renderer);\n this.plugins = this.addComponent('plugins', PluginHost);\n this.options = this.addComponent('options', Options);\n\n this.bootstrap(options);\n }\n\n /**\n * Initialize TypeDoc with the given options object.\n *\n * @param options The desired options to set.\n */\n protected bootstrap(options?: Object): OptionsReadResult {\n this.options.read(options, OptionsReadMode.Prefetch);\n\n const logger = this.loggerType;\n if (typeof logger === 'function') {\n this.logger = new CallbackLogger(<any> logger);\n } else if (logger === 'none') {\n this.logger = new Logger();\n }\n\n this.plugins.load();\n return this.options.read(options, OptionsReadMode.Fetch);\n }\n\n /**\n * Return the application / root component instance.\n */\n get application(): Application {\n return this;\n }\n\n get isCLI(): boolean {\n return false;\n }\n\n /**\n * Return the path to the TypeScript compiler.\n */\n public getTypeScriptPath(): string {\n return Path.dirname(require.resolve('typescript'));\n }\n\n public getTypeScriptVersion(): string {\n const tsPath = this.getTypeScriptPath();\n const json = JSON.parse(FS.readFileSync(Path.join(tsPath, '..', 'package.json'), 'utf8'));\n return json.version;\n }\n\n /**\n * Run the converter for the given set of files and return the generated reflections.\n *\n * @param src A list of source that should be compiled and converted.\n * @returns An instance of ProjectReflection on success, NULL otherwise.\n */\n public convert(src: string[]): ProjectReflection {\n this.logger.writeln('Using TypeScript %s from %s', this.getTypeScriptVersion(), this.getTypeScriptPath());\n\n const result = this.converter.convert(src);\n if (result.errors && result.errors.length) {\n this.logger.diagnostics(result.errors);\n if (this.ignoreCompilerErrors) {\n this.logger.resetErrors();\n return result.project;\n } else {\n return null;\n }\n } else {\n return result.project;\n }\n }\n\n /**\n * @param src A list of source files whose documentation should be generated.\n */\n public generateDocs(src: string[], out: string): boolean;\n\n /**\n * @param project The project the documentation should be generated for.\n */\n public generateDocs(project: ProjectReflection, out: string): boolean;\n\n /**\n * Run the documentation generator for the given set of files.\n *\n * @param out The path the documentation should be written to.\n * @returns TRUE if the documentation could be generated successfully, otherwise FALSE.\n */\n public generateDocs(input: any, out: string): boolean {\n const project = input instanceof ProjectReflection ? input : this.convert(input);\n if (!project) {\n return false;\n }\n\n out = Path.resolve(out);\n this.renderer.render(project, out);\n if (this.logger.hasErrors()) {\n this.logger.error('Documentation could not be generated due to the errors above.');\n } else {\n this.logger.success('Documentation generated at %s', out);\n }\n\n return true;\n }\n\n /**\n * @param src A list of source that should be compiled and converted.\n */\n public generateJson(src: string[], out: string): boolean;\n\n /**\n * @param project The project that should be converted.\n */\n public generateJson(project: ProjectReflection, out: string): boolean;\n\n /**\n * Run the converter for the given set of files and write the reflections to a json file.\n *\n * @param out The path and file name of the target file.\n * @returns TRUE if the json file could be written successfully, otherwise FALSE.\n */\n public generateJson(input: any, out: string): boolean {\n const project = input instanceof ProjectReflection ? input : this.convert(input);\n if (!project) {\n return false;\n }\n\n out = Path.resolve(out);\n writeFile(out, JSON.stringify(project.toObject(), null, '\\t'), false);\n this.logger.success('JSON written to %s', out);\n\n return true;\n }\n\n /**\n * Expand a list of input files.\n *\n * Searches for directories in the input files list and replaces them with a\n * listing of all TypeScript files within them. One may use the ```--exclude``` option\n * to filter out files with a pattern.\n *\n * @param inputFiles The list of files that should be expanded.\n * @returns The list of input files with expanded directories.\n */\n public expandInputFiles(inputFiles?: string[]): string[] {\n let exclude: IMinimatch, files: string[] = [];\n if (this.exclude) {\n exclude = new Minimatch(this.exclude);\n }\n\n function add(dirname: string) {\n FS.readdirSync(dirname).forEach((file) => {\n const realpath = Path.join(dirname, file);\n if (FS.statSync(realpath).isDirectory()) {\n add(realpath);\n } else if (/\\.tsx?$/.test(realpath)) {\n if (exclude && exclude.match(realpath.replace(/\\\\/g, '/'))) {\n return;\n }\n\n files.push(realpath);\n }\n });\n }\n\n inputFiles.forEach((file) => {\n file = Path.resolve(file);\n if (FS.statSync(file).isDirectory()) {\n add(file);\n } else if (!exclude || !exclude.match(file)) {\n files.push(file);\n }\n });\n\n return files;\n }\n\n /**\n * Print the version number.\n */\n public toString() {\n return [\n '',\n 'TypeDoc ' + Application.VERSION,\n 'Using TypeScript ' + this.getTypeScriptVersion() + ' from ' + this.getTypeScriptPath(),\n ''\n ].join(typescript.sys.newLine);\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"application.js","sourceRoot":"","sources":["../../src/lib/application.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAQA,2BAA6B;AAC7B,uBAAyB;AACzB,uCAAyC;AACzC,uCAAkD;AAElD,2CAA8C;AAC9C,8CAA6C;AAC7C,wCAAmD;AACnD,uCAA6F;AAE7F,+CAA6F;AAC7F,+CAAoF;AACpF,2DAA4D;AAiB5D;IAAiC,+BAA+D;IAoD5F,qBAAY,OAAgB;QAA5B,YACI,kBAAM,IAAI,CAAC,SASd;QAPG,KAAI,CAAC,MAAM,GAAM,IAAI,qBAAa,EAAE,CAAC;QACrC,KAAI,CAAC,SAAS,GAAG,KAAI,CAAC,YAAY,CAAC,WAAW,EAAE,iBAAS,CAAC,CAAC;QAC3D,KAAI,CAAC,QAAQ,GAAI,KAAI,CAAC,YAAY,CAAC,UAAU,EAAE,mBAAQ,CAAC,CAAC;QACzD,KAAI,CAAC,OAAO,GAAK,KAAI,CAAC,YAAY,CAAC,SAAS,EAAE,kBAAU,CAAC,CAAC;QAC1D,KAAI,CAAC,OAAO,GAAK,KAAI,CAAC,YAAY,CAAC,SAAS,EAAE,eAAO,CAAC,CAAC;QAEvD,KAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;;IAC5B,CAAC;oBA9DQ,WAAW;IAqEV,+BAAS,GAAnB,UAAoB,OAAgB;QAChC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,uBAAe,CAAC,QAAQ,CAAC,CAAC;QAErD,IAAM,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC;QAC/B,EAAE,CAAC,CAAC,OAAO,MAAM,KAAK,UAAU,CAAC,CAAC,CAAC;YAC/B,IAAI,CAAC,MAAM,GAAG,IAAI,sBAAc,CAAO,MAAM,CAAC,CAAC;QACnD,CAAC;QAAC,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC,CAAC;YAC3B,IAAI,CAAC,MAAM,GAAG,IAAI,cAAM,EAAE,CAAC;QAC/B,CAAC;QAED,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;QACpB,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,uBAAe,CAAC,KAAK,CAAC,CAAC;IAC7D,CAAC;IAKD,sBAAI,oCAAW;aAAf;YACI,MAAM,CAAC,IAAI,CAAC;QAChB,CAAC;;;OAAA;IAED,sBAAI,8BAAK;aAAT;YACI,MAAM,CAAC,KAAK,CAAC;QACjB,CAAC;;;OAAA;IAKM,uCAAiB,GAAxB;QACI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC;IACvD,CAAC;IAEM,0CAAoB,GAA3B;QACI,IAAM,MAAM,GAAG,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACxC,IAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,cAAc,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;QAC1F,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAQM,6BAAO,GAAd,UAAe,GAAa;QACxB,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,6BAA6B,EAAE,IAAI,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,iBAAiB,EAAE,CAAC,CAAC;QAE1G,IAAM,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAC3C,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;YACxC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YACvC,EAAE,CAAC,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC,CAAC;gBAC5B,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC;gBAC1B,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC;YAC1B,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,MAAM,CAAC,IAAI,CAAC;YAChB,CAAC;QACL,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC;QAC1B,CAAC;IACL,CAAC;IAkBM,kCAAY,GAAnB,UAAoB,KAAU,EAAE,GAAW;QACvC,IAAM,OAAO,GAAG,KAAK,YAAY,yBAAiB,GAAG,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACjF,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YACX,MAAM,CAAC,KAAK,CAAC;QACjB,CAAC;QAED,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACxB,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;QACnC,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;YAC1B,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,+DAA+D,CAAC,CAAC;QACvF,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,+BAA+B,EAAE,GAAG,CAAC,CAAC;QAC9D,CAAC;QAED,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAkBM,kCAAY,GAAnB,UAAoB,KAAU,EAAE,GAAW;QACvC,IAAM,OAAO,GAAG,KAAK,YAAY,yBAAiB,GAAG,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACjF,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YACX,MAAM,CAAC,KAAK,CAAC;QACjB,CAAC;QAED,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACxB,iBAAS,CAAC,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE,KAAK,CAAC,CAAC;QACtE,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,oBAAoB,EAAE,GAAG,CAAC,CAAC;QAE/C,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAYM,sCAAgB,GAAvB,UAAwB,UAAqB;QACzC,IAAI,OAAmB,EAAE,KAAK,GAAa,EAAE,CAAC;QAC9C,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;YACf,OAAO,GAAG,IAAI,qBAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC1C,CAAC;QAED,aAAa,OAAe;YACxB,EAAE,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,UAAC,IAAI;gBACjC,IAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;gBAC1C,EAAE,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;oBACtC,GAAG,CAAC,QAAQ,CAAC,CAAC;gBAClB,CAAC;gBAAC,IAAI,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;oBAClC,EAAE,CAAC,CAAC,OAAO,IAAI,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;wBACzD,MAAM,CAAC;oBACX,CAAC;oBAED,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;gBACzB,CAAC;YACL,CAAC,CAAC,CAAC;QACP,CAAC;QAED,UAAU,CAAC,OAAO,CAAC,UAAC,IAAI;YACpB,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YAC1B,EAAE,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;gBAClC,GAAG,CAAC,IAAI,CAAC,CAAC;YACd,CAAC;YAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;gBAC1C,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACrB,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,KAAK,CAAC;IACjB,CAAC;IAKM,8BAAQ,GAAf;QACI,MAAM,CAAC;YACH,EAAE;YACF,UAAU,GAAG,aAAW,CAAC,OAAO;YAChC,mBAAmB,GAAG,IAAI,CAAC,oBAAoB,EAAE,GAAG,QAAQ,GAAG,IAAI,CAAC,iBAAiB,EAAE;YACvF,EAAE;SACL,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACnC,CAAC;IAxMM,mBAAO,GAAG,eAAe,CAAC;IAnBjC;QANC,kBAAM,CAAC;YACJ,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,iEAAiE;YACvE,YAAY,EAAE,SAAS;YACvB,IAAI,EAAE,2BAAa,CAAC,KAAK;SAC5B,CAAC;mDAC0B;IAO5B;QALC,kBAAM,CAAC;YACJ,IAAI,EAAE,sBAAsB;YAC5B,IAAI,EAAE,0FAA0F;YAChG,IAAI,EAAE,2BAAa,CAAC,OAAO;SAC9B,CAAC;6DAC4B;IAO9B;QALC,kBAAM,CAAC;YACJ,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,4DAA4D;YAClE,IAAI,EAAE,2BAAa,CAAC,MAAM;SAC7B,CAAC;gDACc;IAxCP,WAAW;QADvB,qBAAS,CAAC,EAAC,IAAI,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAC,CAAC;OACpC,WAAW,CAsPvB;IAAD,kBAAC;;CAAA,AAtPD,CAAiC,8BAAkB,GAsPlD;AAtPY,kCAAW","sourcesContent":["/**\n * The TypeDoc main module and namespace.\n *\n * The [[Application]] class holds the core logic of the cli application. All code related\n * to resolving reflections is stored in [[TypeDoc.Factories]], the actual data models can be found\n * in [[TypeDoc.Models]] and the final rendering is defined in [[TypeDoc.Output]].\n */\n\nimport * as Path from 'path';\nimport * as FS from 'fs';\nimport * as typescript from 'typescript';\nimport { Minimatch, IMinimatch } from 'minimatch';\n\nimport { Converter } from './converter/index';\nimport { Renderer } from './output/renderer';\nimport { ProjectReflection } from './models/index';\nimport { Logger, ConsoleLogger, CallbackLogger, PluginHost, writeFile } from './utils/index';\n\nimport { AbstractComponent, ChildableComponent, Component, Option } from './utils/component';\nimport { Options, OptionsReadMode, OptionsReadResult } from './utils/options/index';\nimport { ParameterType } from './utils/options/declaration';\n\n/**\n * The default TypeDoc main application class.\n *\n * This class holds the two main components of TypeDoc, the [[Dispatcher]] and\n * the [[Renderer]]. When running TypeDoc, first the [[Dispatcher]] is invoked which\n * generates a [[ProjectReflection]] from the passed in source files. The\n * [[ProjectReflection]] is a hierarchical model representation of the TypeScript\n * project. Afterwards the model is passed to the [[Renderer]] which uses an instance\n * of [[BaseTheme]] to generate the final documentation.\n *\n * Both the [[Dispatcher]] and the [[Renderer]] are subclasses of the [[EventDispatcher]]\n * and emit a series of events while processing the project. Subscribe to these Events\n * to control the application flow or alter the output.\n */\n@Component({name: 'application', internal: true})\nexport class Application extends ChildableComponent<Application, AbstractComponent<Application>> {\n options: Options;\n\n /**\n * The converter used to create the declaration reflections.\n */\n converter: Converter;\n\n /**\n * The renderer used to generate the documentation output.\n */\n renderer: Renderer;\n\n /**\n * The logger that should be used to output messages.\n */\n logger: Logger;\n\n plugins: PluginHost;\n\n @Option({\n name: 'logger',\n help: 'Specify the logger that should be used, \\'none\\' or \\'console\\'',\n defaultValue: 'console',\n type: ParameterType.Mixed\n })\n loggerType: string|Function;\n\n @Option({\n name: 'ignoreCompilerErrors',\n help: 'Should TypeDoc generate documentation pages even after the compiler has returned errors?',\n type: ParameterType.Boolean\n })\n ignoreCompilerErrors: boolean;\n\n @Option({\n name: 'exclude',\n help: 'Define a pattern for excluded files when specifying paths.',\n type: ParameterType.String\n })\n exclude: string;\n\n /**\n * The version number of TypeDoc.\n */\n static VERSION = '{{ VERSION }}';\n\n /**\n * Create a new TypeDoc application instance.\n *\n * @param options An object containing the options that should be used.\n */\n constructor(options?: Object) {\n super(null);\n\n this.logger = new ConsoleLogger();\n this.converter = this.addComponent('converter', Converter);\n this.renderer = this.addComponent('renderer', Renderer);\n this.plugins = this.addComponent('plugins', PluginHost);\n this.options = this.addComponent('options', Options);\n\n this.bootstrap(options);\n }\n\n /**\n * Initialize TypeDoc with the given options object.\n *\n * @param options The desired options to set.\n */\n protected bootstrap(options?: Object): OptionsReadResult {\n this.options.read(options, OptionsReadMode.Prefetch);\n\n const logger = this.loggerType;\n if (typeof logger === 'function') {\n this.logger = new CallbackLogger(<any> logger);\n } else if (logger === 'none') {\n this.logger = new Logger();\n }\n\n this.plugins.load();\n return this.options.read(options, OptionsReadMode.Fetch);\n }\n\n /**\n * Return the application / root component instance.\n */\n get application(): Application {\n return this;\n }\n\n get isCLI(): boolean {\n return false;\n }\n\n /**\n * Return the path to the TypeScript compiler.\n */\n public getTypeScriptPath(): string {\n return Path.dirname(require.resolve('typescript'));\n }\n\n public getTypeScriptVersion(): string {\n const tsPath = this.getTypeScriptPath();\n const json = JSON.parse(FS.readFileSync(Path.join(tsPath, '..', 'package.json'), 'utf8'));\n return json.version;\n }\n\n /**\n * Run the converter for the given set of files and return the generated reflections.\n *\n * @param src A list of source that should be compiled and converted.\n * @returns An instance of ProjectReflection on success, NULL otherwise.\n */\n public convert(src: string[]): ProjectReflection {\n this.logger.writeln('Using TypeScript %s from %s', this.getTypeScriptVersion(), this.getTypeScriptPath());\n\n const result = this.converter.convert(src);\n if (result.errors && result.errors.length) {\n this.logger.diagnostics(result.errors);\n if (this.ignoreCompilerErrors) {\n this.logger.resetErrors();\n return result.project;\n } else {\n return null;\n }\n } else {\n return result.project;\n }\n }\n\n /**\n * @param src A list of source files whose documentation should be generated.\n */\n public generateDocs(src: string[], out: string): boolean;\n\n /**\n * @param project The project the documentation should be generated for.\n */\n public generateDocs(project: ProjectReflection, out: string): boolean;\n\n /**\n * Run the documentation generator for the given set of files.\n *\n * @param out The path the documentation should be written to.\n * @returns TRUE if the documentation could be generated successfully, otherwise FALSE.\n */\n public generateDocs(input: any, out: string): boolean {\n const project = input instanceof ProjectReflection ? input : this.convert(input);\n if (!project) {\n return false;\n }\n\n out = Path.resolve(out);\n this.renderer.render(project, out);\n if (this.logger.hasErrors()) {\n this.logger.error('Documentation could not be generated due to the errors above.');\n } else {\n this.logger.success('Documentation generated at %s', out);\n }\n\n return true;\n }\n\n /**\n * @param src A list of source that should be compiled and converted.\n */\n public generateJson(src: string[], out: string): boolean;\n\n /**\n * @param project The project that should be converted.\n */\n public generateJson(project: ProjectReflection, out: string): boolean;\n\n /**\n * Run the converter for the given set of files and write the reflections to a json file.\n *\n * @param out The path and file name of the target file.\n * @returns TRUE if the json file could be written successfully, otherwise FALSE.\n */\n public generateJson(input: any, out: string): boolean {\n const project = input instanceof ProjectReflection ? input : this.convert(input);\n if (!project) {\n return false;\n }\n\n out = Path.resolve(out);\n writeFile(out, JSON.stringify(project.toObject(), null, '\\t'), false);\n this.logger.success('JSON written to %s', out);\n\n return true;\n }\n\n /**\n * Expand a list of input files.\n *\n * Searches for directories in the input files list and replaces them with a\n * listing of all TypeScript files within them. One may use the ```--exclude``` option\n * to filter out files with a pattern.\n *\n * @param inputFiles The list of files that should be expanded.\n * @returns The list of input files with expanded directories.\n */\n public expandInputFiles(inputFiles?: string[]): string[] {\n let exclude: IMinimatch, files: string[] = [];\n if (this.exclude) {\n exclude = new Minimatch(this.exclude);\n }\n\n function add(dirname: string) {\n FS.readdirSync(dirname).forEach((file) => {\n const realpath = Path.join(dirname, file);\n if (FS.statSync(realpath).isDirectory()) {\n add(realpath);\n } else if (/\\.tsx?$/.test(realpath)) {\n if (exclude && exclude.match(realpath.replace(/\\\\/g, '/'))) {\n return;\n }\n\n files.push(realpath);\n }\n });\n }\n\n inputFiles.forEach((file) => {\n file = Path.resolve(file);\n if (FS.statSync(file).isDirectory()) {\n add(file);\n } else if (!exclude || !exclude.match(file)) {\n files.push(file);\n }\n });\n\n return files;\n }\n\n /**\n * Print the version number.\n */\n public toString() {\n return [\n '',\n 'TypeDoc ' + Application.VERSION,\n 'Using TypeScript ' + this.getTypeScriptVersion() + ' from ' + this.getTypeScriptPath(),\n ''\n ].join(typescript.sys.newLine);\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/cli.js b/node_modules/typedoc/dist/lib/cli.js
index 1399663b6..f9a1cb3a4 100644
--- a/node_modules/typedoc/dist/lib/cli.js
+++ b/node_modules/typedoc/dist/lib/cli.js
@@ -81,37 +81,37 @@ var CliApplication = (function (_super) {
enumerable: true,
configurable: true
});
+ __decorate([
+ component_1.Option({
+ name: 'out',
+ help: 'Specifies the location the documentation should be written to.',
+ hint: declaration_1.ParameterHint.Directory
+ })
+ ], CliApplication.prototype, "out", void 0);
+ __decorate([
+ component_1.Option({
+ name: 'json',
+ help: 'Specifies the location and file name a json file describing the project is written to.',
+ hint: declaration_1.ParameterHint.File
+ })
+ ], CliApplication.prototype, "json", void 0);
+ __decorate([
+ component_1.Option({
+ name: 'version',
+ short: 'v',
+ help: 'Print the TypeDoc\'s version.',
+ type: declaration_1.ParameterType.Boolean
+ })
+ ], CliApplication.prototype, "version", void 0);
+ __decorate([
+ component_1.Option({
+ name: 'help',
+ short: 'h',
+ help: 'Print this message.',
+ type: declaration_1.ParameterType.Boolean
+ })
+ ], CliApplication.prototype, "help", void 0);
return CliApplication;
}(application_1.Application));
-__decorate([
- component_1.Option({
- name: 'out',
- help: 'Specifies the location the documentation should be written to.',
- hint: declaration_1.ParameterHint.Directory
- })
-], CliApplication.prototype, "out", void 0);
-__decorate([
- component_1.Option({
- name: 'json',
- help: 'Specifies the location and file name a json file describing the project is written to.',
- hint: declaration_1.ParameterHint.File
- })
-], CliApplication.prototype, "json", void 0);
-__decorate([
- component_1.Option({
- name: 'version',
- short: 'v',
- help: 'Print the TypeDoc\'s version.',
- type: declaration_1.ParameterType.Boolean
- })
-], CliApplication.prototype, "version", void 0);
-__decorate([
- component_1.Option({
- name: 'help',
- short: 'h',
- help: 'Print this message.',
- type: declaration_1.ParameterType.Boolean
- })
-], CliApplication.prototype, "help", void 0);
exports.CliApplication = CliApplication;
//# sourceMappingURL=cli.js.map \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/cli.js.map b/node_modules/typedoc/dist/lib/cli.js.map
index bb2967711..7c55cb6da 100644
--- a/node_modules/typedoc/dist/lib/cli.js.map
+++ b/node_modules/typedoc/dist/lib/cli.js.map
@@ -1 +1 @@
-{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/lib/cli.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,uCAAyC;AAEzC,6CAA0C;AAC1C,+CAAyC;AAEzC,2DAAyE;AACzE,6CAAoD;AAEpD,IAAkB,QAMjB;AAND,WAAkB,QAAQ;IACtB,qDAAgB,CAAA;IAChB,uDAAgB,CAAA;IAChB,+CAAgB,CAAA;IAChB,uDAAgB,CAAA;IAChB,qDAAgB,CAAA;AACpB,CAAC,EANiB,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAMzB;AAED;IAAoC,kCAAW;IAA/C;;IA2EA,CAAC;IAzCa,kCAAS,GAAnB,UAAoB,OAAgB;QAChC,IAAM,MAAM,GAAG,iBAAM,SAAS,YAAC,OAAO,CAAC,CAAC;QACxC,EAAE,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;YACnB,OAAO,CAAC,IAAI,GAAsB,CAAC;YACnC,MAAM,CAAC;QACX,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;YACf,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;QAC1C,CAAC;QAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;YACnB,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,qBAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;QACvD,CAAC;QAAC,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC;YACxC,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,qBAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;YACnD,OAAO,CAAC,IAAI,GAAuB,CAAC;QACxC,CAAC;QAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;YACjC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,qDAAqD,CAAC,CAAC;YACzE,OAAO,CAAC,IAAI,GAAmB,CAAC;QACpC,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,IAAM,GAAG,GAAG,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;YACrD,IAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;YAClC,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;gBACV,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;oBACX,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;gBACzC,CAAC;gBACD,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;oBACZ,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;gBAC1C,CAAC;gBACD,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;oBAC1B,OAAO,CAAC,IAAI,GAAsB,CAAC;gBACvC,CAAC;YACL,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,OAAO,CAAC,IAAI,GAAuB,CAAC;YACxC,CAAC;QACL,CAAC;QAED,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IAED,sBAAI,iCAAK;aAAT;YACI,MAAM,CAAC,IAAI,CAAC;QAChB,CAAC;;;OAAA;IACL,qBAAC;AAAD,CAAC,AA3ED,CAAoC,yBAAW,GA2E9C;AArEG;IALC,kBAAM,CAAC;QACJ,IAAI,EAAG,KAAK;QACZ,IAAI,EAAG,gEAAgE;QACvE,IAAI,EAAG,2BAAa,CAAC,SAAS;KACjC,CAAC;2CACU;AAOZ;IALC,kBAAM,CAAC;QACJ,IAAI,EAAG,MAAM;QACb,IAAI,EAAG,wFAAwF;QAC/F,IAAI,EAAG,2BAAa,CAAC,IAAI;KAC5B,CAAC;4CACW;AAQb;IANC,kBAAM,CAAC;QACJ,IAAI,EAAG,SAAS;QAChB,KAAK,EAAE,GAAG;QACV,IAAI,EAAG,+BAA+B;QACtC,IAAI,EAAG,2BAAa,CAAC,OAAO;KAC/B,CAAC;+CACe;AAQjB;IANC,kBAAM,CAAC;QACJ,IAAI,EAAG,MAAM;QACb,KAAK,EAAE,GAAG;QACV,IAAI,EAAG,qBAAqB;QAC5B,IAAI,EAAG,2BAAa,CAAC,OAAO;KAC/B,CAAC;4CACY;AA7BL,wCAAc","sourcesContent":["import * as typescript from 'typescript';\n\nimport {Application} from './application';\nimport {Option} from './utils/component';\nimport {OptionsReadResult} from './utils/options/options';\nimport {ParameterHint, ParameterType} from './utils/options/declaration';\nimport {getOptionsHelp} from './utils/options/help';\n\nexport const enum ExitCode {\n OptionError = 1,\n NoInputFiles = 2,\n NoOutput = 3,\n CompileError = 4,\n OutputError = 5\n}\n\nexport class CliApplication extends Application {\n @Option({\n name: 'out',\n help: 'Specifies the location the documentation should be written to.',\n hint: ParameterHint.Directory\n })\n out: string;\n\n @Option({\n name: 'json',\n help: 'Specifies the location and file name a json file describing the project is written to.',\n hint: ParameterHint.File\n })\n json: string;\n\n @Option({\n name: 'version',\n short: 'v',\n help: 'Print the TypeDoc\\'s version.',\n type: ParameterType.Boolean\n })\n version: boolean;\n\n @Option({\n name: 'help',\n short: 'h',\n help: 'Print this message.',\n type: ParameterType.Boolean\n })\n help: boolean;\n\n /**\n * Run TypeDoc from the command line.\n */\n protected bootstrap(options?: Object): OptionsReadResult {\n const result = super.bootstrap(options);\n if (result.hasErrors) {\n process.exit(ExitCode.OptionError);\n return;\n }\n\n if (this.version) {\n typescript.sys.write(this.toString());\n } else if (this.help) {\n typescript.sys.write(getOptionsHelp(this.options));\n } else if (result.inputFiles.length === 0) {\n typescript.sys.write(getOptionsHelp(this.options));\n process.exit(ExitCode.NoInputFiles);\n } else if (!this.out && !this.json) {\n this.logger.error(\"You must either specify the 'out' or 'json' option.\");\n process.exit(ExitCode.NoOutput);\n } else {\n const src = this.expandInputFiles(result.inputFiles);\n const project = this.convert(src);\n if (project) {\n if (this.out) {\n this.generateDocs(project, this.out);\n }\n if (this.json) {\n this.generateJson(project, this.json);\n }\n if (this.logger.hasErrors()) {\n process.exit(ExitCode.OutputError);\n }\n } else {\n process.exit(ExitCode.CompileError);\n }\n }\n\n return result;\n }\n\n get isCLI(): boolean {\n return true;\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/lib/cli.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,uCAAyC;AAEzC,6CAA4C;AAC5C,+CAA2C;AAE3C,2DAA2E;AAC3E,6CAAsD;AAEtD,IAAkB,QAMjB;AAND,WAAkB,QAAQ;IACtB,qDAAgB,CAAA;IAChB,uDAAgB,CAAA;IAChB,+CAAgB,CAAA;IAChB,uDAAgB,CAAA;IAChB,qDAAgB,CAAA;AACpB,CAAC,EANiB,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAMzB;AAED;IAAoC,kCAAW;IAA/C;;IA2EA,CAAC;IAzCa,kCAAS,GAAnB,UAAoB,OAAgB;QAChC,IAAM,MAAM,GAAG,iBAAM,SAAS,YAAC,OAAO,CAAC,CAAC;QACxC,EAAE,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;YACnB,OAAO,CAAC,IAAI,GAAsB,CAAC;YACnC,MAAM,CAAC;QACX,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;YACf,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;QAC1C,CAAC;QAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;YACnB,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,qBAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;QACvD,CAAC;QAAC,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC;YACxC,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,qBAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;YACnD,OAAO,CAAC,IAAI,GAAuB,CAAC;QACxC,CAAC;QAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;YACjC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,qDAAqD,CAAC,CAAC;YACzE,OAAO,CAAC,IAAI,GAAmB,CAAC;QACpC,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,IAAM,GAAG,GAAG,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;YACrD,IAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;YAClC,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;gBACV,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;oBACX,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;gBACzC,CAAC;gBACD,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;oBACZ,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;gBAC1C,CAAC;gBACD,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;oBAC1B,OAAO,CAAC,IAAI,GAAsB,CAAC;gBACvC,CAAC;YACL,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,OAAO,CAAC,IAAI,GAAuB,CAAC;YACxC,CAAC;QACL,CAAC;QAED,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IAED,sBAAI,iCAAK;aAAT;YACI,MAAM,CAAC,IAAI,CAAC;QAChB,CAAC;;;OAAA;IApED;QALC,kBAAM,CAAC;YACJ,IAAI,EAAG,KAAK;YACZ,IAAI,EAAG,gEAAgE;YACvE,IAAI,EAAG,2BAAa,CAAC,SAAS;SACjC,CAAC;+CACU;IAOZ;QALC,kBAAM,CAAC;YACJ,IAAI,EAAG,MAAM;YACb,IAAI,EAAG,wFAAwF;YAC/F,IAAI,EAAG,2BAAa,CAAC,IAAI;SAC5B,CAAC;gDACW;IAQb;QANC,kBAAM,CAAC;YACJ,IAAI,EAAG,SAAS;YAChB,KAAK,EAAE,GAAG;YACV,IAAI,EAAG,+BAA+B;YACtC,IAAI,EAAG,2BAAa,CAAC,OAAO;SAC/B,CAAC;mDACe;IAQjB;QANC,kBAAM,CAAC;YACJ,IAAI,EAAG,MAAM;YACb,KAAK,EAAE,GAAG;YACV,IAAI,EAAG,qBAAqB;YAC5B,IAAI,EAAG,2BAAa,CAAC,OAAO;SAC/B,CAAC;gDACY;IA8ClB,qBAAC;CAAA,AA3ED,CAAoC,yBAAW,GA2E9C;AA3EY,wCAAc","sourcesContent":["import * as typescript from 'typescript';\n\nimport { Application } from './application';\nimport { Option } from './utils/component';\nimport { OptionsReadResult } from './utils/options/options';\nimport { ParameterHint, ParameterType } from './utils/options/declaration';\nimport { getOptionsHelp } from './utils/options/help';\n\nexport const enum ExitCode {\n OptionError = 1,\n NoInputFiles = 2,\n NoOutput = 3,\n CompileError = 4,\n OutputError = 5\n}\n\nexport class CliApplication extends Application {\n @Option({\n name: 'out',\n help: 'Specifies the location the documentation should be written to.',\n hint: ParameterHint.Directory\n })\n out: string;\n\n @Option({\n name: 'json',\n help: 'Specifies the location and file name a json file describing the project is written to.',\n hint: ParameterHint.File\n })\n json: string;\n\n @Option({\n name: 'version',\n short: 'v',\n help: 'Print the TypeDoc\\'s version.',\n type: ParameterType.Boolean\n })\n version: boolean;\n\n @Option({\n name: 'help',\n short: 'h',\n help: 'Print this message.',\n type: ParameterType.Boolean\n })\n help: boolean;\n\n /**\n * Run TypeDoc from the command line.\n */\n protected bootstrap(options?: Object): OptionsReadResult {\n const result = super.bootstrap(options);\n if (result.hasErrors) {\n process.exit(ExitCode.OptionError);\n return;\n }\n\n if (this.version) {\n typescript.sys.write(this.toString());\n } else if (this.help) {\n typescript.sys.write(getOptionsHelp(this.options));\n } else if (result.inputFiles.length === 0) {\n typescript.sys.write(getOptionsHelp(this.options));\n process.exit(ExitCode.NoInputFiles);\n } else if (!this.out && !this.json) {\n this.logger.error(\"You must either specify the 'out' or 'json' option.\");\n process.exit(ExitCode.NoOutput);\n } else {\n const src = this.expandInputFiles(result.inputFiles);\n const project = this.convert(src);\n if (project) {\n if (this.out) {\n this.generateDocs(project, this.out);\n }\n if (this.json) {\n this.generateJson(project, this.json);\n }\n if (this.logger.hasErrors()) {\n process.exit(ExitCode.OutputError);\n }\n } else {\n process.exit(ExitCode.CompileError);\n }\n }\n\n return result;\n }\n\n get isCLI(): boolean {\n return true;\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/components.js.map b/node_modules/typedoc/dist/lib/converter/components.js.map
index b4b522827..4fc8222b8 100644
--- a/node_modules/typedoc/dist/lib/converter/components.js.map
+++ b/node_modules/typedoc/dist/lib/converter/components.js.map
@@ -1 +1 @@
-{"version":3,"file":"components.js","sourceRoot":"","sources":["../../../src/lib/converter/components.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,gDAAgE;AAMxD,oBANA,qBAAS,CAMA;AAEjB;IAAiD,sCAA4B;IAA7E;;IAAgF,CAAC;IAAD,yBAAC;AAAD,CAAC,AAAjF,CAAiD,6BAAiB,GAAe;AAA3D,gDAAkB;AAExC;IAAwE,0CAAkB;IAA1F;;IAOA,CAAC;IAAD,6BAAC;AAAD,CAAC,AAPD,CAAwE,kBAAkB,GAOzF;AAPqB,wDAAsB;AAS5C;IAAqD,0CAAkB;IAAvE;QAAA,qEAMC;QADG,cAAQ,GAAG,CAAC,CAAC;;IACjB,CAAC;IAAD,6BAAC;AAAD,CAAC,AAND,CAAqD,kBAAkB,GAMtE;AANqB,wDAAsB","sourcesContent":["import * as ts from 'typescript';\n\nimport {Component, AbstractComponent} from '../utils/component';\nimport {Reflection} from '../models/reflections/abstract';\nimport {Type} from '../models/types/abstract';\nimport {Context} from './context';\nimport {Converter} from './converter';\n\nexport {Component};\n\nexport abstract class ConverterComponent extends AbstractComponent<Converter> { }\n\nexport abstract class ConverterNodeComponent<T extends ts.Node> extends ConverterComponent {\n /**\n * List of supported TypeScript syntax kinds.\n */\n supports: ts.SyntaxKind[];\n\n abstract convert(context: Context, node: T): Reflection;\n}\n\nexport abstract class ConverterTypeComponent extends ConverterComponent {\n /**\n * The priority this converter should be executed with.\n * A higher priority means the converter will be applied earlier.\n */\n priority = 0;\n}\n\nexport interface TypeConverter<T extends ts.Type, N extends ts.Node>\n extends ConverterTypeComponent, TypeTypeConverter<T>, TypeNodeConverter<T, N> {}\n\nexport interface TypeTypeConverter<T extends ts.Type> extends ConverterTypeComponent {\n /**\n * Test whether this converter can handle the given TypeScript type.\n */\n supportsType(context: Context, type: T): boolean;\n\n /**\n * Convert the given type to its type reflection.\n */\n convertType(context: Context, type: T): Type;\n}\n\nexport interface TypeNodeConverter<T extends ts.Type, N extends ts.Node> extends ConverterTypeComponent {\n /**\n * Test whether this converter can handle the given TypeScript node.\n */\n supportsNode(context: Context, node: N, type: T): boolean;\n\n /**\n * Convert the given type node to its type reflection.\n */\n convertNode(context: Context, node: N, type: T): Type;\n}\n"]} \ No newline at end of file
+{"version":3,"file":"components.js","sourceRoot":"","sources":["../../../src/lib/converter/components.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,gDAAkE;AAM1D,oBANC,qBAAS,CAMD;AAEjB;IAAiD,sCAA4B;IAA7E;;IAAgF,CAAC;IAAD,yBAAC;AAAD,CAAC,AAAjF,CAAiD,6BAAiB,GAAe;AAA3D,gDAAkB;AAExC;IAAwE,0CAAkB;IAA1F;;IAOA,CAAC;IAAD,6BAAC;AAAD,CAAC,AAPD,CAAwE,kBAAkB,GAOzF;AAPqB,wDAAsB;AAS5C;IAAqD,0CAAkB;IAAvE;QAAA,qEAMC;QADG,cAAQ,GAAG,CAAC,CAAC;;IACjB,CAAC;IAAD,6BAAC;AAAD,CAAC,AAND,CAAqD,kBAAkB,GAMtE;AANqB,wDAAsB","sourcesContent":["import * as ts from 'typescript';\n\nimport { Component, AbstractComponent } from '../utils/component';\nimport { Reflection } from '../models/reflections/abstract';\nimport { Type } from '../models/types/abstract';\nimport { Context } from './context';\nimport { Converter } from './converter';\n\nexport {Component};\n\nexport abstract class ConverterComponent extends AbstractComponent<Converter> { }\n\nexport abstract class ConverterNodeComponent<T extends ts.Node> extends ConverterComponent {\n /**\n * List of supported TypeScript syntax kinds.\n */\n supports: ts.SyntaxKind[];\n\n abstract convert(context: Context, node: T): Reflection;\n}\n\nexport abstract class ConverterTypeComponent extends ConverterComponent {\n /**\n * The priority this converter should be executed with.\n * A higher priority means the converter will be applied earlier.\n */\n priority = 0;\n}\n\nexport interface TypeConverter<T extends ts.Type, N extends ts.Node>\n extends ConverterTypeComponent, TypeTypeConverter<T>, TypeNodeConverter<T, N> {}\n\nexport interface TypeTypeConverter<T extends ts.Type> extends ConverterTypeComponent {\n /**\n * Test whether this converter can handle the given TypeScript type.\n */\n supportsType(context: Context, type: T): boolean;\n\n /**\n * Convert the given type to its type reflection.\n */\n convertType(context: Context, type: T): Type;\n}\n\nexport interface TypeNodeConverter<T extends ts.Type, N extends ts.Node> extends ConverterTypeComponent {\n /**\n * Test whether this converter can handle the given TypeScript node.\n */\n supportsNode(context: Context, node: N, type: T): boolean;\n\n /**\n * Convert the given type node to its type reflection.\n */\n convertNode(context: Context, node: N, type: T): Type;\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/context.js.map b/node_modules/typedoc/dist/lib/converter/context.js.map
index 4885dc94d..b2022b6c4 100644
--- a/node_modules/typedoc/dist/lib/converter/context.js.map
+++ b/node_modules/typedoc/dist/lib/converter/context.js.map
@@ -1 +1 @@
-{"version":3,"file":"context.js","sourceRoot":"","sources":["../../../src/lib/converter/context.ts"],"names":[],"mappings":";;AACA,uCAAgD;AAGhD,yCAAyF;AACzF,6DAA+D;AAC/D,yCAAsC;AAKtC;IA6FI,iBAAY,SAAoB,EAAE,SAAmB,EAAE,OAAuB,EAAE,OAAmB;QAd3F,aAAQ,GAAW,CAAC,IAAI,CAAC;QAe7B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC;QAErB,IAAM,OAAO,GAAG,IAAI,yBAAiB,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QACtD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC;QAErB,EAAE,CAAC,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC,CAAC;YAC5B,IAAI,CAAC,eAAe,GAAG,IAAI,qBAAS,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;QACpE,CAAC;IACL,CAAC;IAKD,oCAAkB,GAAlB;QACI,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,OAAO,CAAC,kBAAkB,EAAE,CAAC;IACnE,CAAC;IAQD,mCAAiB,GAAjB,UAAkB,IAAa;QAC3B,IAAI,QAAiB,CAAC;QACtB,IAAI,CAAC;YACD,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;QACpD,CAAC;QAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;QACjB,CAAC;QACD,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;YACZ,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;gBACd,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,uBAAuB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YACjE,CAAC;YAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;gBAC3C,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,uBAAuB,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YACxE,CAAC;YAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;gBACxE,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,uBAAuB,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YAC/E,CAAC;QACL,CAAC;QACD,MAAM,CAAC,QAAQ,CAAC;IACpB,CAAC;IAOD,2BAAS,GAAT;QACI,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,MAAM,CAAC;IAC7C,CAAC;IAWD,6BAAW,GAAX,UAAY,MAAiB;QACzB,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;YACV,MAAM,CAAC,IAAI,CAAC;QAChB,CAAC;QACD,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;YACb,MAAM,CAAC,EAAE,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC;QAChC,CAAC;QACD,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;IACrB,CAAC;IAYD,oCAAkB,GAAlB,UAAmB,UAAsB,EAAE,IAAa,EAAE,MAAkB;QACxE,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,UAAU,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC;QAErD,IAAM,EAAE,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,GAAG,MAAM,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC;QAC3E,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;YAC3D,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC,EAAE,CAAC;QACnD,CAAC;IACL,CAAC;IAWD,yBAAO,GAAP,UAAQ,IAAY,EAAE,UAAsB,EAAE,IAAc;QACxD,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,CAAC,CAAC;IACzD,CAAC;IAQD,gCAAc,GAAd,UAAe,IAAmB,EAAE,QAAkB;QAClD,IAAM,eAAe,GAAG,IAAI,CAAC,eAAe,CAAC;QAC7C,IAAI,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;QAC9D,EAAE,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC;YAClB,UAAU,GAAG,UAAU,IAAI,eAAe,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACpE,CAAC;QAED,EAAE,CAAC,CAAC,UAAU,IAAI,IAAI,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC,CAAC;YAChD,MAAM,CAAC;QACX,CAAC;QAED,IAAI,aAAa,GAAG,IAAI,CAAC,iBAAiB,CAAC;QAC3C,EAAE,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC;YAChB,IAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,aAAa,EAAE,CAAC;YAC3C,IAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,GAAG,CAAC;YACxD,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,mBAAmB,IAAI,KAAK,CAAC,CAAC,CAAC;gBAC/C,MAAM,CAAC;YACX,CAAC;QACL,CAAC;QAED,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QAEnC,IAAI,CAAC,OAAO,CAAC,qBAAS,CAAC,gBAAgB,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QAC7D,QAAQ,EAAE,CAAC;QAEX,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;QACxB,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC;IAC/B,CAAC;IAyBM,2BAAS,GAAhB,UAAiB,KAAiB;QAAE,cAAc;aAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;YAAd,6BAAc;;QAC9C,EAAE,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;YACzB,MAAM,CAAC;QACX,CAAC;QACD,IAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QAC5B,IAAM,UAAU,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC;QAEhC,IAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC;QAC5B,IAAM,gBAAgB,GAAG,IAAI,CAAC,aAAa,CAAC;QAC5C,IAAM,iBAAiB,GAAG,IAAI,CAAC,cAAc,CAAC;QAE9C,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,cAAc,GAAG,UAAU,GAAG,IAAI,CAAC,qBAAqB,CAAC,UAAU,EAAE,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,cAAc,CAAC;QACjH,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;QAE1B,QAAQ,EAAE,CAAC;QAEX,IAAI,CAAC,KAAK,GAAG,QAAQ,CAAC;QACtB,IAAI,CAAC,cAAc,GAAG,iBAAiB,CAAC;QACxC,IAAI,CAAC,aAAa,GAAG,gBAAgB,CAAC;IAC1C,CAAC;IASD,yBAAO,GAAP,UAAQ,QAAiB,EAAE,aAAyC;QAApE,iBAiDC;QAhDG,IAAM,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC;QAClC,IAAM,YAAY,GAAG,IAAI,CAAC,SAAS,CAAC;QACpC,IAAM,gBAAgB,GAAG,IAAI,CAAC,aAAa,CAAC;QAC5C,IAAM,gBAAgB,GAAG,IAAI,CAAC,aAAa,CAAC;QAE5C,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;QACtB,IAAI,CAAC,aAAa,GAAG,QAAQ,CAAC;QAC9B,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;QAEpB,IAAM,MAAM,GAAyB,IAAI,CAAC,KAAK,CAAC;QAChD,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,YAAY,2BAAmB,CAAC,CAAC,CAAC,CAAC;YAC3C,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;QACrD,CAAC;QAED,EAAE,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;YAClB,IAAM,EAAE,GAAG,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;YAC7C,EAAE,CAAC,CAAC,IAAI,CAAC,iBAAiB,IAAI,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;gBACtE,MAAM,CAAC,MAAM,CAAC;YAClB,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,iBAAiB,IAAI,EAAE,CAAC;gBACtD,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACpC,CAAC;QACL,CAAC;QAED,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;YAClB,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,IAAI,EAAN,CAAM,CAAC,CAAC;QACxD,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;QACxB,CAAC;QAED,EAAE,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC;YAChB,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC,GAAG,CAAC,UAAC,CAAC,IAAK,OAAA,KAAI,CAAC,SAAS,CAAC,WAAW,CAAC,KAAI,EAAE,CAAC,CAAC,EAAnC,CAAmC,CAAC,CAAC;QACvF,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;QAC9B,CAAC;QAED,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QAE3C,IAAI,CAAC,SAAS,GAAG,UAAU,CAAC;QAC5B,IAAI,CAAC,SAAS,GAAG,YAAY,CAAC;QAC9B,IAAI,CAAC,aAAa,GAAG,gBAAgB,CAAC;QACtC,IAAI,CAAC,aAAa,GAAG,gBAAgB,CAAC;QAEtC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;YAClB,OAAO,IAAI,CAAC,iBAAiB,CAAC;QAClC,CAAC;QAED,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IASO,uCAAqB,GAA7B,UAA8B,UAAqD,EAAE,QAAkB;QAAvG,iBAsBC;QArBG,IAAM,cAAc,GAAqB,EAAE,CAAC;QAE5C,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;YACX,GAAG,CAAC,CAAC,IAAI,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC;gBAClC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;oBAC3C,QAAQ,CAAC;gBACb,CAAC;gBACD,cAAc,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;YACnD,CAAC;QACL,CAAC;QAED,UAAU,CAAC,OAAO,CAAC,UAAC,WAAwC,EAAE,KAAa;YACvE,IAAM,IAAI,GAAG,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC;YACrC,EAAE,CAAC,CAAC,KAAI,CAAC,aAAa,IAAI,KAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;gBAClD,cAAc,CAAC,IAAI,CAAC,GAAG,KAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;YACrD,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,cAAc,CAAC,IAAI,CAAC,GAAG,oCAAmB,CAAC,KAAI,EAAE,WAAW,CAAC,CAAC;YAClE,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,cAAc,CAAC;IAC1B,CAAC;IACL,cAAC;AAAD,CAAC,AAjXD,IAiXC;AAjXY,0BAAO","sourcesContent":["import * as ts from 'typescript';\nimport {Minimatch, IMinimatch} from 'minimatch';\n\nimport {Logger} from '../utils/loggers';\nimport {Reflection, ProjectReflection, ContainerReflection, Type} from '../models/index';\nimport {createTypeParameter} from './factories/type-parameter';\nimport {Converter} from './converter';\n\n/**\n * The context describes the current state the converter is in.\n */\nexport class Context {\n /**\n * The converter instance that has created the context.\n */\n converter: Converter;\n\n /**\n * A list of all files that have been passed to the TypeScript compiler.\n */\n fileNames: string[];\n\n /**\n * The TypeChecker instance returned by the TypeScript compiler.\n */\n checker: ts.TypeChecker;\n\n /**\n * The program that is currently processed.\n */\n program: ts.Program;\n\n /**\n * The project that is currently processed.\n */\n project: ProjectReflection;\n\n /**\n * The scope or parent reflection that is currently processed.\n */\n scope: Reflection;\n\n /**\n * Is the current source file marked as being external?\n */\n isExternal: boolean;\n\n /**\n * Is the current source file a declaration file?\n */\n isDeclaration: boolean;\n\n /**\n * The currently set type parameters.\n */\n typeParameters: ts.MapLike<Type>;\n\n /**\n * The currently set type arguments.\n */\n typeArguments: Type[];\n\n /**\n * Is the converter in inheritance mode?\n */\n isInherit: boolean;\n\n /**\n * The node that has started the inheritance mode.\n */\n inheritParent: ts.Node;\n\n /**\n * List symbol ids of inherited children already visited while inheriting.\n */\n inheritedChildren: number[];\n\n /**\n * The names of the children of the scope before inheritance has been started.\n */\n inherited: string[];\n\n /**\n * A list of parent nodes that have been passed to the visit function.\n */\n visitStack: ts.Node[];\n\n /**\n * Next free symbol id used by [[getSymbolID]].\n */\n private symbolID: number = -1024;\n\n /**\n * The pattern that should be used to flag external source files.\n */\n private externalPattern: IMinimatch;\n\n /**\n * Create a new Context instance.\n *\n * @param converter The converter instance that has created the context.\n * @param fileNames A list of all files that have been passed to the TypeScript compiler.\n * @param checker The TypeChecker instance returned by the TypeScript compiler.\n */\n constructor(converter: Converter, fileNames: string[], checker: ts.TypeChecker, program: ts.Program) {\n this.converter = converter;\n this.fileNames = fileNames;\n this.checker = checker;\n this.program = program;\n this.visitStack = [];\n\n const project = new ProjectReflection(converter.name);\n this.project = project;\n this.scope = project;\n\n if (converter.externalPattern) {\n this.externalPattern = new Minimatch(converter.externalPattern);\n }\n }\n\n /**\n * Return the compiler options.\n */\n getCompilerOptions(): ts.CompilerOptions {\n return this.converter.application.options.getCompilerOptions();\n }\n\n /**\n * Return the type declaration of the given node.\n *\n * @param node The TypeScript node whose type should be resolved.\n * @returns The type declaration of the given node.\n */\n getTypeAtLocation(node: ts.Node): ts.Type {\n let nodeType: ts.Type;\n try {\n nodeType = this.checker.getTypeAtLocation(node);\n } catch (error) {\n }\n if (!nodeType) {\n if (node.symbol) {\n nodeType = this.checker.getDeclaredTypeOfSymbol(node.symbol);\n } else if (node.parent && node.parent.symbol) {\n nodeType = this.checker.getDeclaredTypeOfSymbol(node.parent.symbol);\n } else if (node.parent && node.parent.parent && node.parent.parent.symbol) {\n nodeType = this.checker.getDeclaredTypeOfSymbol(node.parent.parent.symbol);\n }\n }\n return nodeType;\n }\n\n /**\n * Return the current logger instance.\n *\n * @returns The current logger instance.\n */\n getLogger(): Logger {\n return this.converter.application.logger;\n }\n\n /**\n * Return the symbol id of the given symbol.\n *\n * The compiler sometimes does not assign an id to symbols, this method makes sure that we have one.\n * It will assign negative ids if they are not set.\n *\n * @param symbol The symbol whose id should be returned.\n * @returns The id of the given symbol.\n */\n getSymbolID(symbol: ts.Symbol): number {\n if (!symbol) {\n return null;\n }\n if (!symbol.id) {\n symbol.id = this.symbolID--;\n }\n return symbol.id;\n }\n\n /**\n * Register a newly generated reflection.\n *\n * Ensures that the reflection is both listed in [[Project.reflections]] and\n * [[Project.symbolMapping]] if applicable.\n *\n * @param reflection The reflection that should be registered.\n * @param node The node the given reflection was resolved from.\n * @param symbol The symbol the given reflection was resolved from.\n */\n registerReflection(reflection: Reflection, node: ts.Node, symbol?: ts.Symbol) {\n this.project.reflections[reflection.id] = reflection;\n\n const id = this.getSymbolID(symbol ? symbol : (node ? node.symbol : null));\n if (!this.isInherit && id && !this.project.symbolMapping[id]) {\n this.project.symbolMapping[id] = reflection.id;\n }\n }\n\n /**\n * Trigger a node reflection event.\n *\n * All events are dispatched on the current converter instance.\n *\n * @param name The name of the event that should be triggered.\n * @param reflection The triggering reflection.\n * @param node The triggering TypeScript node if available.\n */\n trigger(name: string, reflection: Reflection, node?: ts.Node) {\n this.converter.trigger(name, this, reflection, node);\n }\n\n /**\n * Run the given callback with the context configured for the given source file.\n *\n * @param node The TypeScript node containing the source file declaration.\n * @param callback The callback that should be executed.\n */\n withSourceFile(node: ts.SourceFile, callback: Function) {\n const externalPattern = this.externalPattern;\n let isExternal = this.fileNames.indexOf(node.fileName) === -1;\n if (externalPattern) {\n isExternal = isExternal || externalPattern.match(node.fileName);\n }\n\n if (isExternal && this.converter.excludeExternals) {\n return;\n }\n\n let isDeclaration = node.isDeclarationFile;\n if (isDeclaration) {\n const lib = this.converter.getDefaultLib();\n const isLib = node.fileName.substr(-lib.length) === lib;\n if (!this.converter.includeDeclarations || isLib) {\n return;\n }\n }\n\n this.isExternal = isExternal;\n this.isDeclaration = isDeclaration;\n\n this.trigger(Converter.EVENT_FILE_BEGIN, this.project, node);\n callback();\n\n this.isExternal = false;\n this.isDeclaration = false;\n }\n\n /**\n * @param callback The callback function that should be executed with the changed context.\n */\n public withScope(scope: Reflection, callback: Function): void;\n\n /**\n * @param parameters An array of type parameters that should be set on the context while the callback is invoked.\n * @param callback The callback function that should be executed with the changed context.\n */\n public withScope(scope: Reflection, parameters: ts.NodeArray<ts.TypeParameterDeclaration>, callback: Function): void;\n\n /**\n * @param parameters An array of type parameters that should be set on the context while the callback is invoked.\n * @param preserve Should the currently set type parameters of the context be preserved?\n * @param callback The callback function that should be executed with the changed context.\n */\n public withScope(scope: Reflection, parameters: ts.NodeArray<ts.TypeParameterDeclaration>, preserve: boolean, callback: Function): void;\n\n /**\n * Run the given callback with the scope of the context set to the given reflection.\n *\n * @param scope The reflection that should be set as the scope of the context while the callback is invoked.\n */\n public withScope(scope: Reflection, ...args: any[]): void {\n if (!scope || !args.length) {\n return;\n }\n const callback = args.pop();\n const parameters = args.shift();\n\n const oldScope = this.scope;\n const oldTypeArguments = this.typeArguments;\n const oldTypeParameters = this.typeParameters;\n\n this.scope = scope;\n this.typeParameters = parameters ? this.extractTypeParameters(parameters, args.length > 0) : this.typeParameters;\n this.typeArguments = null;\n\n callback();\n\n this.scope = oldScope;\n this.typeParameters = oldTypeParameters;\n this.typeArguments = oldTypeArguments;\n }\n\n /**\n * Inherit the children of the given TypeScript node to the current scope.\n *\n * @param baseNode The node whose children should be inherited.\n * @param typeArguments The type arguments that apply while inheriting the given node.\n * @return The resulting reflection / the current scope.\n */\n inherit(baseNode: ts.Node, typeArguments?: ts.NodeArray<ts.TypeNode>): Reflection {\n const wasInherit = this.isInherit;\n const oldInherited = this.inherited;\n const oldInheritParent = this.inheritParent;\n const oldTypeArguments = this.typeArguments;\n\n this.isInherit = true;\n this.inheritParent = baseNode;\n this.inherited = [];\n\n const target = <ContainerReflection> this.scope;\n if (!(target instanceof ContainerReflection)) {\n throw new Error('Expected container reflection');\n }\n\n if (baseNode.symbol) {\n const id = this.getSymbolID(baseNode.symbol);\n if (this.inheritedChildren && this.inheritedChildren.indexOf(id) !== -1) {\n return target;\n } else {\n this.inheritedChildren = this.inheritedChildren || [];\n this.inheritedChildren.push(id);\n }\n }\n\n if (target.children) {\n this.inherited = target.children.map((c) => c.name);\n } else {\n this.inherited = [];\n }\n\n if (typeArguments) {\n this.typeArguments = typeArguments.map((t) => this.converter.convertType(this, t));\n } else {\n this.typeArguments = null;\n }\n\n this.converter.convertNode(this, baseNode);\n\n this.isInherit = wasInherit;\n this.inherited = oldInherited;\n this.inheritParent = oldInheritParent;\n this.typeArguments = oldTypeArguments;\n\n if (!this.isInherit) {\n delete this.inheritedChildren;\n }\n\n return target;\n }\n\n /**\n * Convert the given list of type parameter declarations into a type mapping.\n *\n * @param parameters The list of type parameter declarations that should be converted.\n * @param preserve Should the currently set type parameters of the context be preserved?\n * @returns The resulting type mapping.\n */\n private extractTypeParameters(parameters: ts.NodeArray<ts.TypeParameterDeclaration>, preserve?: boolean): ts.MapLike<Type> {\n const typeParameters: ts.MapLike<Type> = {};\n\n if (preserve) {\n for (let key in this.typeParameters) {\n if (!this.typeParameters.hasOwnProperty(key)) {\n continue;\n }\n typeParameters[key] = this.typeParameters[key];\n }\n }\n\n parameters.forEach((declaration: ts.TypeParameterDeclaration, index: number) => {\n const name = declaration.symbol.name;\n if (this.typeArguments && this.typeArguments[index]) {\n typeParameters[name] = this.typeArguments[index];\n } else {\n typeParameters[name] = createTypeParameter(this, declaration);\n }\n });\n\n return typeParameters;\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"context.js","sourceRoot":"","sources":["../../../src/lib/converter/context.ts"],"names":[],"mappings":";;AACA,uCAAkD;AAGlD,yCAA2F;AAC3F,6DAAiE;AACjE,yCAAwC;AAKxC;IA6FI,iBAAY,SAAoB,EAAE,SAAmB,EAAE,OAAuB,EAAE,OAAmB;QAd3F,aAAQ,GAAW,CAAC,IAAI,CAAC;QAe7B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC;QAErB,IAAM,OAAO,GAAG,IAAI,yBAAiB,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QACtD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC;QAErB,EAAE,CAAC,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC,CAAC;YAC5B,IAAI,CAAC,eAAe,GAAG,IAAI,qBAAS,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;QACpE,CAAC;IACL,CAAC;IAKD,oCAAkB,GAAlB;QACI,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,OAAO,CAAC,kBAAkB,EAAE,CAAC;IACnE,CAAC;IAQD,mCAAiB,GAAjB,UAAkB,IAAa;QAC3B,IAAI,QAAiB,CAAC;QACtB,IAAI,CAAC;YACD,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;QACpD,CAAC;QAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;QACjB,CAAC;QACD,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;YACZ,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;gBACd,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,uBAAuB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YACjE,CAAC;YAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;gBAC3C,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,uBAAuB,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YACxE,CAAC;YAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;gBACxE,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,uBAAuB,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YAC/E,CAAC;QACL,CAAC;QACD,MAAM,CAAC,QAAQ,CAAC;IACpB,CAAC;IAOD,2BAAS,GAAT;QACI,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,MAAM,CAAC;IAC7C,CAAC;IAWD,6BAAW,GAAX,UAAY,MAAiB;QACzB,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;YACV,MAAM,CAAC,IAAI,CAAC;QAChB,CAAC;QACD,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;YACb,MAAM,CAAC,EAAE,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC;QAChC,CAAC;QACD,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;IACrB,CAAC;IAYD,oCAAkB,GAAlB,UAAmB,UAAsB,EAAE,IAAa,EAAE,MAAkB;QACxE,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,UAAU,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC;QAErD,IAAM,EAAE,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,GAAG,MAAM,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC;QAC3E,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;YAC3D,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC,EAAE,CAAC;QACnD,CAAC;IACL,CAAC;IAWD,yBAAO,GAAP,UAAQ,IAAY,EAAE,UAAsB,EAAE,IAAc;QACxD,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,CAAC,CAAC;IACzD,CAAC;IAQD,gCAAc,GAAd,UAAe,IAAmB,EAAE,QAAkB;QAClD,IAAM,eAAe,GAAG,IAAI,CAAC,eAAe,CAAC;QAC7C,IAAI,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;QAC9D,EAAE,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC;YAClB,UAAU,GAAG,UAAU,IAAI,eAAe,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACpE,CAAC;QAED,EAAE,CAAC,CAAC,UAAU,IAAI,IAAI,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC,CAAC;YAChD,MAAM,CAAC;QACX,CAAC;QAED,IAAI,aAAa,GAAG,IAAI,CAAC,iBAAiB,CAAC;QAC3C,EAAE,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC;YAChB,IAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,aAAa,EAAE,CAAC;YAC3C,IAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,GAAG,CAAC;YACxD,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,mBAAmB,IAAI,KAAK,CAAC,CAAC,CAAC;gBAC/C,MAAM,CAAC;YACX,CAAC;QACL,CAAC;QAED,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QAEnC,IAAI,CAAC,OAAO,CAAC,qBAAS,CAAC,gBAAgB,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QAC7D,QAAQ,EAAE,CAAC;QAEX,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;QACxB,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC;IAC/B,CAAC;IAyBM,2BAAS,GAAhB,UAAiB,KAAiB;QAAE,cAAc;aAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;YAAd,6BAAc;;QAC9C,EAAE,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;YACzB,MAAM,CAAC;QACX,CAAC;QACD,IAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QAC5B,IAAM,UAAU,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC;QAEhC,IAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC;QAC5B,IAAM,gBAAgB,GAAG,IAAI,CAAC,aAAa,CAAC;QAC5C,IAAM,iBAAiB,GAAG,IAAI,CAAC,cAAc,CAAC;QAE9C,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,cAAc,GAAG,UAAU,GAAG,IAAI,CAAC,qBAAqB,CAAC,UAAU,EAAE,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,cAAc,CAAC;QACjH,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;QAE1B,QAAQ,EAAE,CAAC;QAEX,IAAI,CAAC,KAAK,GAAG,QAAQ,CAAC;QACtB,IAAI,CAAC,cAAc,GAAG,iBAAiB,CAAC;QACxC,IAAI,CAAC,aAAa,GAAG,gBAAgB,CAAC;IAC1C,CAAC;IASD,yBAAO,GAAP,UAAQ,QAAiB,EAAE,aAAyC;QAApE,iBAiDC;QAhDG,IAAM,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC;QAClC,IAAM,YAAY,GAAG,IAAI,CAAC,SAAS,CAAC;QACpC,IAAM,gBAAgB,GAAG,IAAI,CAAC,aAAa,CAAC;QAC5C,IAAM,gBAAgB,GAAG,IAAI,CAAC,aAAa,CAAC;QAE5C,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;QACtB,IAAI,CAAC,aAAa,GAAG,QAAQ,CAAC;QAC9B,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;QAEpB,IAAM,MAAM,GAAyB,IAAI,CAAC,KAAK,CAAC;QAChD,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,YAAY,2BAAmB,CAAC,CAAC,CAAC,CAAC;YAC3C,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;QACrD,CAAC;QAED,EAAE,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;YAClB,IAAM,EAAE,GAAG,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;YAC7C,EAAE,CAAC,CAAC,IAAI,CAAC,iBAAiB,IAAI,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;gBACtE,MAAM,CAAC,MAAM,CAAC;YAClB,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,iBAAiB,IAAI,EAAE,CAAC;gBACtD,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACpC,CAAC;QACL,CAAC;QAED,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;YAClB,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,IAAI,EAAN,CAAM,CAAC,CAAC;QACxD,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;QACxB,CAAC;QAED,EAAE,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC;YAChB,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC,GAAG,CAAC,UAAC,CAAC,IAAK,OAAA,KAAI,CAAC,SAAS,CAAC,WAAW,CAAC,KAAI,EAAE,CAAC,CAAC,EAAnC,CAAmC,CAAC,CAAC;QACvF,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;QAC9B,CAAC;QAED,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QAE3C,IAAI,CAAC,SAAS,GAAG,UAAU,CAAC;QAC5B,IAAI,CAAC,SAAS,GAAG,YAAY,CAAC;QAC9B,IAAI,CAAC,aAAa,GAAG,gBAAgB,CAAC;QACtC,IAAI,CAAC,aAAa,GAAG,gBAAgB,CAAC;QAEtC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;YAClB,OAAO,IAAI,CAAC,iBAAiB,CAAC;QAClC,CAAC;QAED,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IASO,uCAAqB,GAA7B,UAA8B,UAAqD,EAAE,QAAkB;QAAvG,iBAsBC;QArBG,IAAM,cAAc,GAAqB,EAAE,CAAC;QAE5C,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;YACX,GAAG,CAAC,CAAC,IAAI,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC;gBAClC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;oBAC3C,QAAQ,CAAC;gBACb,CAAC;gBACD,cAAc,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;YACnD,CAAC;QACL,CAAC;QAED,UAAU,CAAC,OAAO,CAAC,UAAC,WAAwC,EAAE,KAAa;YACvE,IAAM,IAAI,GAAG,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC;YACrC,EAAE,CAAC,CAAC,KAAI,CAAC,aAAa,IAAI,KAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;gBAClD,cAAc,CAAC,IAAI,CAAC,GAAG,KAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;YACrD,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,cAAc,CAAC,IAAI,CAAC,GAAG,oCAAmB,CAAC,KAAI,EAAE,WAAW,CAAC,CAAC;YAClE,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,cAAc,CAAC;IAC1B,CAAC;IACL,cAAC;AAAD,CAAC,AAjXD,IAiXC;AAjXY,0BAAO","sourcesContent":["import * as ts from 'typescript';\nimport { Minimatch, IMinimatch } from 'minimatch';\n\nimport { Logger } from '../utils/loggers';\nimport { Reflection, ProjectReflection, ContainerReflection, Type } from '../models/index';\nimport { createTypeParameter } from './factories/type-parameter';\nimport { Converter } from './converter';\n\n/**\n * The context describes the current state the converter is in.\n */\nexport class Context {\n /**\n * The converter instance that has created the context.\n */\n converter: Converter;\n\n /**\n * A list of all files that have been passed to the TypeScript compiler.\n */\n fileNames: string[];\n\n /**\n * The TypeChecker instance returned by the TypeScript compiler.\n */\n checker: ts.TypeChecker;\n\n /**\n * The program that is currently processed.\n */\n program: ts.Program;\n\n /**\n * The project that is currently processed.\n */\n project: ProjectReflection;\n\n /**\n * The scope or parent reflection that is currently processed.\n */\n scope: Reflection;\n\n /**\n * Is the current source file marked as being external?\n */\n isExternal: boolean;\n\n /**\n * Is the current source file a declaration file?\n */\n isDeclaration: boolean;\n\n /**\n * The currently set type parameters.\n */\n typeParameters: ts.MapLike<Type>;\n\n /**\n * The currently set type arguments.\n */\n typeArguments: Type[];\n\n /**\n * Is the converter in inheritance mode?\n */\n isInherit: boolean;\n\n /**\n * The node that has started the inheritance mode.\n */\n inheritParent: ts.Node;\n\n /**\n * List symbol ids of inherited children already visited while inheriting.\n */\n inheritedChildren: number[];\n\n /**\n * The names of the children of the scope before inheritance has been started.\n */\n inherited: string[];\n\n /**\n * A list of parent nodes that have been passed to the visit function.\n */\n visitStack: ts.Node[];\n\n /**\n * Next free symbol id used by [[getSymbolID]].\n */\n private symbolID: number = -1024;\n\n /**\n * The pattern that should be used to flag external source files.\n */\n private externalPattern: IMinimatch;\n\n /**\n * Create a new Context instance.\n *\n * @param converter The converter instance that has created the context.\n * @param fileNames A list of all files that have been passed to the TypeScript compiler.\n * @param checker The TypeChecker instance returned by the TypeScript compiler.\n */\n constructor(converter: Converter, fileNames: string[], checker: ts.TypeChecker, program: ts.Program) {\n this.converter = converter;\n this.fileNames = fileNames;\n this.checker = checker;\n this.program = program;\n this.visitStack = [];\n\n const project = new ProjectReflection(converter.name);\n this.project = project;\n this.scope = project;\n\n if (converter.externalPattern) {\n this.externalPattern = new Minimatch(converter.externalPattern);\n }\n }\n\n /**\n * Return the compiler options.\n */\n getCompilerOptions(): ts.CompilerOptions {\n return this.converter.application.options.getCompilerOptions();\n }\n\n /**\n * Return the type declaration of the given node.\n *\n * @param node The TypeScript node whose type should be resolved.\n * @returns The type declaration of the given node.\n */\n getTypeAtLocation(node: ts.Node): ts.Type {\n let nodeType: ts.Type;\n try {\n nodeType = this.checker.getTypeAtLocation(node);\n } catch (error) {\n }\n if (!nodeType) {\n if (node.symbol) {\n nodeType = this.checker.getDeclaredTypeOfSymbol(node.symbol);\n } else if (node.parent && node.parent.symbol) {\n nodeType = this.checker.getDeclaredTypeOfSymbol(node.parent.symbol);\n } else if (node.parent && node.parent.parent && node.parent.parent.symbol) {\n nodeType = this.checker.getDeclaredTypeOfSymbol(node.parent.parent.symbol);\n }\n }\n return nodeType;\n }\n\n /**\n * Return the current logger instance.\n *\n * @returns The current logger instance.\n */\n getLogger(): Logger {\n return this.converter.application.logger;\n }\n\n /**\n * Return the symbol id of the given symbol.\n *\n * The compiler sometimes does not assign an id to symbols, this method makes sure that we have one.\n * It will assign negative ids if they are not set.\n *\n * @param symbol The symbol whose id should be returned.\n * @returns The id of the given symbol.\n */\n getSymbolID(symbol: ts.Symbol): number {\n if (!symbol) {\n return null;\n }\n if (!symbol.id) {\n symbol.id = this.symbolID--;\n }\n return symbol.id;\n }\n\n /**\n * Register a newly generated reflection.\n *\n * Ensures that the reflection is both listed in [[Project.reflections]] and\n * [[Project.symbolMapping]] if applicable.\n *\n * @param reflection The reflection that should be registered.\n * @param node The node the given reflection was resolved from.\n * @param symbol The symbol the given reflection was resolved from.\n */\n registerReflection(reflection: Reflection, node: ts.Node, symbol?: ts.Symbol) {\n this.project.reflections[reflection.id] = reflection;\n\n const id = this.getSymbolID(symbol ? symbol : (node ? node.symbol : null));\n if (!this.isInherit && id && !this.project.symbolMapping[id]) {\n this.project.symbolMapping[id] = reflection.id;\n }\n }\n\n /**\n * Trigger a node reflection event.\n *\n * All events are dispatched on the current converter instance.\n *\n * @param name The name of the event that should be triggered.\n * @param reflection The triggering reflection.\n * @param node The triggering TypeScript node if available.\n */\n trigger(name: string, reflection: Reflection, node?: ts.Node) {\n this.converter.trigger(name, this, reflection, node);\n }\n\n /**\n * Run the given callback with the context configured for the given source file.\n *\n * @param node The TypeScript node containing the source file declaration.\n * @param callback The callback that should be executed.\n */\n withSourceFile(node: ts.SourceFile, callback: Function) {\n const externalPattern = this.externalPattern;\n let isExternal = this.fileNames.indexOf(node.fileName) === -1;\n if (externalPattern) {\n isExternal = isExternal || externalPattern.match(node.fileName);\n }\n\n if (isExternal && this.converter.excludeExternals) {\n return;\n }\n\n let isDeclaration = node.isDeclarationFile;\n if (isDeclaration) {\n const lib = this.converter.getDefaultLib();\n const isLib = node.fileName.substr(-lib.length) === lib;\n if (!this.converter.includeDeclarations || isLib) {\n return;\n }\n }\n\n this.isExternal = isExternal;\n this.isDeclaration = isDeclaration;\n\n this.trigger(Converter.EVENT_FILE_BEGIN, this.project, node);\n callback();\n\n this.isExternal = false;\n this.isDeclaration = false;\n }\n\n /**\n * @param callback The callback function that should be executed with the changed context.\n */\n public withScope(scope: Reflection, callback: Function): void;\n\n /**\n * @param parameters An array of type parameters that should be set on the context while the callback is invoked.\n * @param callback The callback function that should be executed with the changed context.\n */\n public withScope(scope: Reflection, parameters: ts.NodeArray<ts.TypeParameterDeclaration>, callback: Function): void;\n\n /**\n * @param parameters An array of type parameters that should be set on the context while the callback is invoked.\n * @param preserve Should the currently set type parameters of the context be preserved?\n * @param callback The callback function that should be executed with the changed context.\n */\n public withScope(scope: Reflection, parameters: ts.NodeArray<ts.TypeParameterDeclaration>, preserve: boolean, callback: Function): void;\n\n /**\n * Run the given callback with the scope of the context set to the given reflection.\n *\n * @param scope The reflection that should be set as the scope of the context while the callback is invoked.\n */\n public withScope(scope: Reflection, ...args: any[]): void {\n if (!scope || !args.length) {\n return;\n }\n const callback = args.pop();\n const parameters = args.shift();\n\n const oldScope = this.scope;\n const oldTypeArguments = this.typeArguments;\n const oldTypeParameters = this.typeParameters;\n\n this.scope = scope;\n this.typeParameters = parameters ? this.extractTypeParameters(parameters, args.length > 0) : this.typeParameters;\n this.typeArguments = null;\n\n callback();\n\n this.scope = oldScope;\n this.typeParameters = oldTypeParameters;\n this.typeArguments = oldTypeArguments;\n }\n\n /**\n * Inherit the children of the given TypeScript node to the current scope.\n *\n * @param baseNode The node whose children should be inherited.\n * @param typeArguments The type arguments that apply while inheriting the given node.\n * @return The resulting reflection / the current scope.\n */\n inherit(baseNode: ts.Node, typeArguments?: ts.NodeArray<ts.TypeNode>): Reflection {\n const wasInherit = this.isInherit;\n const oldInherited = this.inherited;\n const oldInheritParent = this.inheritParent;\n const oldTypeArguments = this.typeArguments;\n\n this.isInherit = true;\n this.inheritParent = baseNode;\n this.inherited = [];\n\n const target = <ContainerReflection> this.scope;\n if (!(target instanceof ContainerReflection)) {\n throw new Error('Expected container reflection');\n }\n\n if (baseNode.symbol) {\n const id = this.getSymbolID(baseNode.symbol);\n if (this.inheritedChildren && this.inheritedChildren.indexOf(id) !== -1) {\n return target;\n } else {\n this.inheritedChildren = this.inheritedChildren || [];\n this.inheritedChildren.push(id);\n }\n }\n\n if (target.children) {\n this.inherited = target.children.map((c) => c.name);\n } else {\n this.inherited = [];\n }\n\n if (typeArguments) {\n this.typeArguments = typeArguments.map((t) => this.converter.convertType(this, t));\n } else {\n this.typeArguments = null;\n }\n\n this.converter.convertNode(this, baseNode);\n\n this.isInherit = wasInherit;\n this.inherited = oldInherited;\n this.inheritParent = oldInheritParent;\n this.typeArguments = oldTypeArguments;\n\n if (!this.isInherit) {\n delete this.inheritedChildren;\n }\n\n return target;\n }\n\n /**\n * Convert the given list of type parameter declarations into a type mapping.\n *\n * @param parameters The list of type parameter declarations that should be converted.\n * @param preserve Should the currently set type parameters of the context be preserved?\n * @returns The resulting type mapping.\n */\n private extractTypeParameters(parameters: ts.NodeArray<ts.TypeParameterDeclaration>, preserve?: boolean): ts.MapLike<Type> {\n const typeParameters: ts.MapLike<Type> = {};\n\n if (preserve) {\n for (let key in this.typeParameters) {\n if (!this.typeParameters.hasOwnProperty(key)) {\n continue;\n }\n typeParameters[key] = this.typeParameters[key];\n }\n }\n\n parameters.forEach((declaration: ts.TypeParameterDeclaration, index: number) => {\n const name = declaration.symbol.name;\n if (this.typeArguments && this.typeArguments[index]) {\n typeParameters[name] = this.typeArguments[index];\n } else {\n typeParameters[name] = createTypeParameter(this, declaration);\n }\n });\n\n return typeParameters;\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/converter.d.ts b/node_modules/typedoc/dist/lib/converter/converter.d.ts
index 56853c294..f2ca7af58 100644
--- a/node_modules/typedoc/dist/lib/converter/converter.d.ts
+++ b/node_modules/typedoc/dist/lib/converter/converter.d.ts
@@ -3,7 +3,7 @@ import { Application } from '../application';
import { Reflection, Type, ProjectReflection } from '../models/index';
import { Context } from './context';
import { ConverterComponent } from './components';
-import { ChildableComponent, ComponentClass } from '../utils/component';
+import { Component, ChildableComponent, ComponentClass } from '../utils/component';
export interface ConverterResult {
errors: ts.Diagnostic[];
project: ProjectReflection;
@@ -31,7 +31,7 @@ export declare class Converter extends ChildableComponent<Application, Converter
static EVENT_RESOLVE: string;
static EVENT_RESOLVE_END: string;
initialize(): void;
- addComponent(name: string, componentClass: ComponentClass<ConverterComponent>): ConverterComponent;
+ addComponent<T extends ConverterComponent & Component>(name: string, componentClass: T | ComponentClass<T>): T;
private addNodeConverter(converter);
private addTypeConverter(converter);
removeComponent(name: string): ConverterComponent;
diff --git a/node_modules/typedoc/dist/lib/converter/converter.js b/node_modules/typedoc/dist/lib/converter/converter.js
index e60a9aad0..ec3155364 100644
--- a/node_modules/typedoc/dist/lib/converter/converter.js
+++ b/node_modules/typedoc/dist/lib/converter/converter.js
@@ -25,11 +25,12 @@ var components_1 = require("./components");
var compiler_host_1 = require("./utils/compiler-host");
var component_1 = require("../utils/component");
var fs_1 = require("../utils/fs");
-var Converter = Converter_1 = (function (_super) {
+var Converter = (function (_super) {
__extends(Converter, _super);
function Converter() {
return _super !== null && _super.apply(this, arguments) || this;
}
+ Converter_1 = Converter;
Converter.prototype.initialize = function () {
this.compilerHost = new compiler_host_1.CompilerHost(this);
this.nodeConverters = {};
@@ -186,62 +187,62 @@ var Converter = Converter_1 = (function (_super) {
Converter.prototype.getDefaultLib = function () {
return ts.getDefaultLibFileName(this.application.options.getCompilerOptions());
};
+ Converter.EVENT_BEGIN = 'begin';
+ Converter.EVENT_END = 'end';
+ Converter.EVENT_FILE_BEGIN = 'fileBegin';
+ Converter.EVENT_CREATE_DECLARATION = 'createDeclaration';
+ Converter.EVENT_CREATE_SIGNATURE = 'createSignature';
+ Converter.EVENT_CREATE_PARAMETER = 'createParameter';
+ Converter.EVENT_CREATE_TYPE_PARAMETER = 'createTypeParameter';
+ Converter.EVENT_FUNCTION_IMPLEMENTATION = 'functionImplementation';
+ Converter.EVENT_RESOLVE_BEGIN = 'resolveBegin';
+ Converter.EVENT_RESOLVE = 'resolveReflection';
+ Converter.EVENT_RESOLVE_END = 'resolveEnd';
+ __decorate([
+ component_1.Option({
+ name: 'name',
+ help: 'Set the name of the project that will be used in the header of the template.'
+ })
+ ], Converter.prototype, "name", void 0);
+ __decorate([
+ component_1.Option({
+ name: 'externalPattern',
+ help: 'Define a pattern for files that should be considered being external.'
+ })
+ ], Converter.prototype, "externalPattern", void 0);
+ __decorate([
+ component_1.Option({
+ name: 'includeDeclarations',
+ help: 'Turn on parsing of .d.ts declaration files.',
+ type: declaration_1.ParameterType.Boolean
+ })
+ ], Converter.prototype, "includeDeclarations", void 0);
+ __decorate([
+ component_1.Option({
+ name: 'excludeExternals',
+ help: 'Prevent externally resolved TypeScript files from being documented.',
+ type: declaration_1.ParameterType.Boolean
+ })
+ ], Converter.prototype, "excludeExternals", void 0);
+ __decorate([
+ component_1.Option({
+ name: 'excludeNotExported',
+ help: 'Prevent symbols that are not exported from being documented.',
+ type: declaration_1.ParameterType.Boolean
+ })
+ ], Converter.prototype, "excludeNotExported", void 0);
+ __decorate([
+ component_1.Option({
+ name: 'excludePrivate',
+ help: 'Ignores private variables and methods',
+ type: declaration_1.ParameterType.Boolean
+ })
+ ], Converter.prototype, "excludePrivate", void 0);
+ Converter = Converter_1 = __decorate([
+ component_1.Component({ name: 'converter', internal: true, childClass: components_1.ConverterComponent })
+ ], Converter);
return Converter;
+ var Converter_1;
}(component_1.ChildableComponent));
-Converter.EVENT_BEGIN = 'begin';
-Converter.EVENT_END = 'end';
-Converter.EVENT_FILE_BEGIN = 'fileBegin';
-Converter.EVENT_CREATE_DECLARATION = 'createDeclaration';
-Converter.EVENT_CREATE_SIGNATURE = 'createSignature';
-Converter.EVENT_CREATE_PARAMETER = 'createParameter';
-Converter.EVENT_CREATE_TYPE_PARAMETER = 'createTypeParameter';
-Converter.EVENT_FUNCTION_IMPLEMENTATION = 'functionImplementation';
-Converter.EVENT_RESOLVE_BEGIN = 'resolveBegin';
-Converter.EVENT_RESOLVE = 'resolveReflection';
-Converter.EVENT_RESOLVE_END = 'resolveEnd';
-__decorate([
- component_1.Option({
- name: 'name',
- help: 'Set the name of the project that will be used in the header of the template.'
- })
-], Converter.prototype, "name", void 0);
-__decorate([
- component_1.Option({
- name: 'externalPattern',
- help: 'Define a pattern for files that should be considered being external.'
- })
-], Converter.prototype, "externalPattern", void 0);
-__decorate([
- component_1.Option({
- name: 'includeDeclarations',
- help: 'Turn on parsing of .d.ts declaration files.',
- type: declaration_1.ParameterType.Boolean
- })
-], Converter.prototype, "includeDeclarations", void 0);
-__decorate([
- component_1.Option({
- name: 'excludeExternals',
- help: 'Prevent externally resolved TypeScript files from being documented.',
- type: declaration_1.ParameterType.Boolean
- })
-], Converter.prototype, "excludeExternals", void 0);
-__decorate([
- component_1.Option({
- name: 'excludeNotExported',
- help: 'Prevent symbols that are not exported from being documented.',
- type: declaration_1.ParameterType.Boolean
- })
-], Converter.prototype, "excludeNotExported", void 0);
-__decorate([
- component_1.Option({
- name: 'excludePrivate',
- help: 'Ignores private variables and methods',
- type: declaration_1.ParameterType.Boolean
- })
-], Converter.prototype, "excludePrivate", void 0);
-Converter = Converter_1 = __decorate([
- component_1.Component({ name: 'converter', internal: true, childClass: components_1.ConverterComponent })
-], Converter);
exports.Converter = Converter;
-var Converter_1;
//# sourceMappingURL=converter.js.map \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/converter.js.map b/node_modules/typedoc/dist/lib/converter/converter.js.map
index 8e1d76a64..de7e4c68d 100644
--- a/node_modules/typedoc/dist/lib/converter/converter.js.map
+++ b/node_modules/typedoc/dist/lib/converter/converter.js.map
@@ -1 +1 @@
-{"version":3,"file":"converter.js","sourceRoot":"","sources":["../../../src/lib/converter/converter.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AACjC,oCAAsC;AACtC,0BAA4B;AAG5B,4DAA2D;AAE3D,qCAAkC;AAClC,2CAAsI;AACtI,uDAAmD;AACnD,gDAAyF;AACzF,kCAA0C;AAqB1C,IAAa,SAAS;IAAS,6BAAmD;IAAlF;;IAqXA,CAAC;IAlOG,8BAAU,GAAV;QACI,IAAI,CAAC,YAAY,GAAG,IAAI,4BAAY,CAAC,IAAI,CAAC,CAAC;QAC3C,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC;QACzB,IAAI,CAAC,kBAAkB,GAAG,EAAE,CAAC;QAC7B,IAAI,CAAC,kBAAkB,GAAG,EAAE,CAAC;IACjC,CAAC;IAED,gCAAY,GAAZ,UAAa,IAAY,EAAE,cAAkD;QACzE,IAAM,SAAS,GAAG,iBAAM,YAAY,YAAC,IAAI,EAAE,cAAc,CAAC,CAAC;QAC3D,EAAE,CAAC,CAAC,SAAS,YAAY,mCAAsB,CAAC,CAAC,CAAC;YAC9C,IAAI,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC;QACrC,CAAC;QAAC,IAAI,CAAC,EAAE,CAAC,CAAC,SAAS,YAAY,mCAAsB,CAAC,CAAC,CAAC;YACrD,IAAI,CAAC,gBAAgB,CAAsD,SAAS,CAAC,CAAC;QAC1F,CAAC;QAED,MAAM,CAAC,SAAS,CAAC;IACrB,CAAC;IAEO,oCAAgB,GAAxB,UAAyB,SAAsC;QAC3D,GAAG,CAAC,CAAiB,UAAkB,EAAlB,KAAA,SAAS,CAAC,QAAQ,EAAlB,cAAkB,EAAlB,IAAkB;YAAlC,IAAI,QAAQ,SAAA;YACb,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,GAAG,SAAS,CAAC;SAC7C;IACL,CAAC;IAEO,oCAAgB,GAAxB,UAAyB,SAA6D;QAClF,EAAE,CAAC,CAAC,cAAc,IAAI,SAAS,IAAI,aAAa,IAAI,SAAS,CAAC,CAAC,CAAC;YAC5D,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAA+B,SAAS,CAAC,CAAC;YACtE,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,CAAC,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,EAArC,CAAqC,CAAC,CAAC;QAClF,CAAC;QAED,EAAE,CAAC,CAAC,cAAc,IAAI,SAAS,IAAI,aAAa,IAAI,SAAS,CAAC,CAAC,CAAC;YAC5D,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAA0B,SAAS,CAAC,CAAC;YACjE,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,CAAC,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,EAArC,CAAqC,CAAC,CAAC;QAClF,CAAC;IACL,CAAC;IAED,mCAAe,GAAf,UAAgB,IAAY;QACxB,IAAM,SAAS,GAAG,iBAAM,eAAe,YAAC,IAAI,CAAC,CAAC;QAC9C,EAAE,CAAC,CAAC,SAAS,YAAY,mCAAsB,CAAC,CAAC,CAAC;YAC9C,IAAI,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC;QACxC,CAAC;QAAC,IAAI,CAAC,EAAE,CAAC,CAAC,SAAS,YAAY,mCAAsB,CAAC,CAAC,CAAC;YACrD,IAAI,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC;QACxC,CAAC;QAED,MAAM,CAAC,SAAS,CAAC;IACrB,CAAC;IAEO,uCAAmB,GAA3B,UAA4B,SAAsC;QAC9D,IAAM,UAAU,GAAG,IAAI,CAAC,cAAc,CAAC;QACvC,IAAM,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QACzC,GAAG,CAAC,CAAY,UAAI,EAAJ,aAAI,EAAJ,kBAAI,EAAJ,IAAI;YAAf,IAAI,GAAG,aAAA;YACR,EAAE,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC;gBAChC,OAAO,UAAU,CAAC,GAAG,CAAC,CAAC;YAC3B,CAAC;SACJ;IACL,CAAC;IAEO,uCAAmB,GAA3B,UAA4B,SAAiC;QACzD,IAAI,KAAK,GAAG,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAO,SAAS,CAAC,CAAC;QAC7D,EAAE,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;YACf,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;QAC7C,CAAC;QAED,KAAK,GAAG,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAO,SAAS,CAAC,CAAC;QACzD,EAAE,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;YACf,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;QAC7C,CAAC;IACL,CAAC;IAED,uCAAmB,GAAnB;QACI,iBAAM,mBAAmB,WAAE,CAAC;QAE5B,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC;QACzB,IAAI,CAAC,kBAAkB,GAAG,EAAE,CAAC;QAC7B,IAAI,CAAC,kBAAkB,GAAG,EAAE,CAAC;IACjC,CAAC;IAOD,2BAAO,GAAP,UAAQ,SAAmB;QACvB,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;YAC/C,SAAS,CAAC,CAAC,CAAC,GAAG,kBAAa,CAAC,GAAG,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACrE,CAAC;QAED,IAAM,OAAO,GAAG,EAAE,CAAC,aAAa,CAAC,SAAS,EAAE,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,kBAAkB,EAAE,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;QAC9G,IAAM,OAAO,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;QACzC,IAAM,OAAO,GAAG,IAAI,iBAAO,CAAC,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;QAE/D,IAAI,CAAC,OAAO,CAAC,WAAS,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;QAE7C,IAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACrC,IAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAEtC,IAAI,CAAC,OAAO,CAAC,WAAS,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QAE3C,MAAM,CAAC;YACH,MAAM,EAAE,MAAM;YACd,OAAO,EAAE,OAAO;SACnB,CAAC;IACN,CAAC;IAWD,+BAAW,GAAX,UAAY,OAAgB,EAAE,IAAa;QACvC,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;YAC1C,MAAM,CAAC,IAAI,CAAC;QAChB,CAAC;QAED,IAAM,aAAa,GAAG,OAAO,CAAC,UAAU,CAAC;QACzC,OAAO,CAAC,UAAU,GAAG,aAAa,CAAC,KAAK,EAAE,CAAC;QAC3C,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAE9B,IAAI,MAAkB,CAAC;QACvB,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC;YACnC,MAAM,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QACnE,CAAC;QAED,OAAO,CAAC,UAAU,GAAG,aAAa,CAAC;QACnC,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IAUD,+BAAW,GAAX,UAAY,OAAgB,EAAE,IAAc,EAAE,IAAc;QAExD,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;YACP,IAAI,GAAG,IAAI,IAAI,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;YAE/C,GAAG,CAAC,CAAkB,UAAuB,EAAvB,KAAA,IAAI,CAAC,kBAAkB,EAAvB,cAAuB,EAAvB,IAAuB;gBAAxC,IAAI,SAAS,SAAA;gBACd,EAAE,CAAC,CAAC,SAAS,CAAC,YAAY,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;oBAC9C,MAAM,CAAC,SAAS,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;gBACtD,CAAC;aACJ;QACL,CAAC;QAGD,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;YACP,GAAG,CAAC,CAAkB,UAAuB,EAAvB,KAAA,IAAI,CAAC,kBAAkB,EAAvB,cAAuB,EAAvB,IAAuB;gBAAxC,IAAI,SAAS,SAAA;gBACd,EAAE,CAAC,CAAC,SAAS,CAAC,YAAY,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;oBACxC,MAAM,CAAC,SAAS,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;gBAChD,CAAC;aACJ;QACL,CAAC;IACL,CAAC;IAQO,2BAAO,GAAf,UAAgB,OAAgB;QAAhC,iBA4BC;QA3BG,IAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;QAEhC,OAAO,CAAC,cAAc,EAAE,CAAC,OAAO,CAAC,UAAC,UAAU;YACxC,KAAI,CAAC,WAAW,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;QAC1C,CAAC,CAAC,CAAC;QAEH,IAAI,WAAW,GAAG,OAAO,CAAC,qBAAqB,EAAE,CAAC;QAClD,EAAE,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;YACrB,MAAM,CAAC,WAAW,CAAC;QACvB,CAAC;QAED,WAAW,GAAG,OAAO,CAAC,uBAAuB,EAAE,CAAC;QAChD,EAAE,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;YACrB,MAAM,CAAC,WAAW,CAAC;QACvB,CAAC;QAED,WAAW,GAAG,OAAO,CAAC,oBAAoB,EAAE,CAAC;QAC7C,EAAE,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;YACrB,MAAM,CAAC,WAAW,CAAC;QACvB,CAAC;QAED,WAAW,GAAG,OAAO,CAAC,sBAAsB,EAAE,CAAC;QAC/C,EAAE,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;YACrB,MAAM,CAAC,WAAW,CAAC;QACvB,CAAC;QAED,MAAM,CAAC,EAAE,CAAC;IACd,CAAC;IAQO,2BAAO,GAAf,UAAgB,OAAgB;QAC5B,IAAI,CAAC,OAAO,CAAC,WAAS,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC;QACrD,IAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;QAEhC,GAAG,CAAC,CAAC,IAAI,EAAE,IAAI,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC;YACjC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;gBAC1C,QAAQ,CAAC;YACb,CAAC;YACD,IAAI,CAAC,OAAO,CAAC,WAAS,CAAC,aAAa,EAAE,OAAO,EAAE,OAAO,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,CAAC;QAC5E,CAAC;QAED,IAAI,CAAC,OAAO,CAAC,WAAS,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;QACnD,MAAM,CAAC,OAAO,CAAC;IACnB,CAAC;IAOD,iCAAa,GAAb;QACI,MAAM,CAAC,EAAE,CAAC,qBAAqB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAAC;IACnF,CAAC;IACL,gBAAC;AAAD,CAAC,AArXD,CAA+B,8BAAkB,GAqXhD;AAxTU,qBAAW,GAAG,OAAO,CAAC;AAOtB,mBAAS,GAAG,KAAK,CAAC;AAWlB,0BAAgB,GAAG,WAAW,CAAC;AAO/B,kCAAwB,GAAG,mBAAmB,CAAC;AAO/C,gCAAsB,GAAG,iBAAiB,CAAC;AAO3C,gCAAsB,GAAG,iBAAiB,CAAC;AAO3C,qCAA2B,GAAG,qBAAqB,CAAC;AAOpD,uCAA6B,GAAG,wBAAwB,CAAC;AAWzD,6BAAmB,GAAG,cAAc,CAAC;AAOrC,uBAAa,GAAG,mBAAmB,CAAC;AAOpC,2BAAiB,GAAG,YAAY,CAAC;AAnIxC;IAJC,kBAAM,CAAC;QACJ,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,8EAA8E;KACvF,CAAC;uCACW;AAMb;IAJC,kBAAM,CAAC;QACJ,IAAI,EAAE,iBAAiB;QACvB,IAAI,EAAE,sEAAsE;KAC/E,CAAC;kDACsB;AAOxB;IALC,kBAAM,CAAC;QACJ,IAAI,EAAE,qBAAqB;QAC3B,IAAI,EAAE,6CAA6C;QACnD,IAAI,EAAE,2BAAa,CAAC,OAAO;KAC9B,CAAC;sDAC2B;AAO7B;IALC,kBAAM,CAAC;QACJ,IAAI,EAAE,kBAAkB;QACxB,IAAI,EAAE,qEAAqE;QAC3E,IAAI,EAAE,2BAAa,CAAC,OAAO;KAC9B,CAAC;mDACwB;AAO1B;IALC,kBAAM,CAAC;QACJ,IAAI,EAAE,oBAAoB;QAC1B,IAAI,EAAE,8DAA8D;QACpE,IAAI,EAAE,2BAAa,CAAC,OAAO;KAC9B,CAAC;qDAC0B;AAO5B;IALC,kBAAM,CAAC;QACJ,IAAI,EAAE,gBAAgB;QACtB,IAAI,EAAE,uCAAuC;QAC7C,IAAI,EAAE,2BAAa,CAAC,OAAO;KAC9B,CAAC;iDACsB;AA1Cf,SAAS;IADrB,qBAAS,CAAC,EAAC,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,+BAAkB,EAAC,CAAC;GAClE,SAAS,CAqXrB;AArXY,8BAAS","sourcesContent":["import * as ts from 'typescript';\nimport * as _ts from '../ts-internal';\nimport * as _ from 'lodash';\n\nimport {Application} from '../application';\nimport {ParameterType} from '../utils/options/declaration';\nimport {Reflection, Type, ProjectReflection} from '../models/index';\nimport {Context} from './context';\nimport {ConverterComponent, ConverterNodeComponent, ConverterTypeComponent, TypeTypeConverter, TypeNodeConverter} from './components';\nimport {CompilerHost} from './utils/compiler-host';\nimport {Component, Option, ChildableComponent, ComponentClass} from '../utils/component';\nimport {normalizePath} from '../utils/fs';\n\n/**\n * Result structure of the [[Converter.convert]] method.\n */\nexport interface ConverterResult {\n /**\n * An array containing all errors generated by the TypeScript compiler.\n */\n errors: ts.Diagnostic[];\n\n /**\n * The resulting project reflection.\n */\n project: ProjectReflection;\n}\n\n/**\n * Compiles source files using TypeScript and converts compiler symbols to reflections.\n */\n@Component({name: 'converter', internal: true, childClass: ConverterComponent})\nexport class Converter extends ChildableComponent<Application, ConverterComponent> {\n /**\n * The human readable name of the project. Used within the templates to set the title of the document.\n */\n @Option({\n name: 'name',\n help: 'Set the name of the project that will be used in the header of the template.'\n })\n name: string;\n\n @Option({\n name: 'externalPattern',\n help: 'Define a pattern for files that should be considered being external.'\n })\n externalPattern: string;\n\n @Option({\n name: 'includeDeclarations',\n help: 'Turn on parsing of .d.ts declaration files.',\n type: ParameterType.Boolean\n })\n includeDeclarations: boolean;\n\n @Option({\n name: 'excludeExternals',\n help: 'Prevent externally resolved TypeScript files from being documented.',\n type: ParameterType.Boolean\n })\n excludeExternals: boolean;\n\n @Option({\n name: 'excludeNotExported',\n help: 'Prevent symbols that are not exported from being documented.',\n type: ParameterType.Boolean\n })\n excludeNotExported: boolean;\n\n @Option({\n name: 'excludePrivate',\n help: 'Ignores private variables and methods',\n type: ParameterType.Boolean\n })\n excludePrivate: boolean;\n\n private compilerHost: CompilerHost;\n\n private nodeConverters: {[syntaxKind: number]: ConverterNodeComponent<ts.Node>};\n\n private typeNodeConverters: TypeNodeConverter<ts.Type, ts.Node>[];\n\n private typeTypeConverters: TypeTypeConverter<ts.Type>[];\n\n /**\n * General events\n */\n\n /**\n * Triggered when the converter begins converting a project.\n * The listener should implement [[IConverterCallback]].\n * @event\n */\n static EVENT_BEGIN = 'begin';\n\n /**\n * Triggered when the converter has finished converting a project.\n * The listener should implement [[IConverterCallback]].\n * @event\n */\n static EVENT_END = 'end';\n\n /**\n * Factory events\n */\n\n /**\n * Triggered when the converter begins converting a source file.\n * The listener should implement [[IConverterNodeCallback]].\n * @event\n */\n static EVENT_FILE_BEGIN = 'fileBegin';\n\n /**\n * Triggered when the converter has created a declaration reflection.\n * The listener should implement [[IConverterNodeCallback]].\n * @event\n */\n static EVENT_CREATE_DECLARATION = 'createDeclaration';\n\n /**\n * Triggered when the converter has created a signature reflection.\n * The listener should implement [[IConverterNodeCallback]].\n * @event\n */\n static EVENT_CREATE_SIGNATURE = 'createSignature';\n\n /**\n * Triggered when the converter has created a parameter reflection.\n * The listener should implement [[IConverterNodeCallback]].\n * @event\n */\n static EVENT_CREATE_PARAMETER = 'createParameter';\n\n /**\n * Triggered when the converter has created a type parameter reflection.\n * The listener should implement [[IConverterNodeCallback]].\n * @event\n */\n static EVENT_CREATE_TYPE_PARAMETER = 'createTypeParameter';\n\n /**\n * Triggered when the converter has found a function implementation.\n * The listener should implement [[IConverterNodeCallback]].\n * @event\n */\n static EVENT_FUNCTION_IMPLEMENTATION = 'functionImplementation';\n\n /**\n * Resolve events\n */\n\n /**\n * Triggered when the converter begins resolving a project.\n * The listener should implement [[IConverterCallback]].\n * @event\n */\n static EVENT_RESOLVE_BEGIN = 'resolveBegin';\n\n /**\n * Triggered when the converter resolves a reflection.\n * The listener should implement [[IConverterResolveCallback]].\n * @event\n */\n static EVENT_RESOLVE = 'resolveReflection';\n\n /**\n * Triggered when the converter has finished resolving a project.\n * The listener should implement [[IConverterCallback]].\n * @event\n */\n static EVENT_RESOLVE_END = 'resolveEnd';\n\n /**\n * Create a new Converter instance.\n *\n * @param application The application instance this converter relies on. The application\n * must expose the settings that should be used and serves as a global logging endpoint.\n */\n initialize() {\n this.compilerHost = new CompilerHost(this);\n this.nodeConverters = {};\n this.typeTypeConverters = [];\n this.typeNodeConverters = [];\n }\n\n addComponent(name: string, componentClass: ComponentClass<ConverterComponent>): ConverterComponent {\n const component = super.addComponent(name, componentClass);\n if (component instanceof ConverterNodeComponent) {\n this.addNodeConverter(component);\n } else if (component instanceof ConverterTypeComponent) {\n this.addTypeConverter(<TypeTypeConverter<any>|TypeNodeConverter<any, any>> component);\n }\n\n return component;\n }\n\n private addNodeConverter(converter: ConverterNodeComponent<any>) {\n for (let supports of converter.supports) {\n this.nodeConverters[supports] = converter;\n }\n }\n\n private addTypeConverter(converter: TypeTypeConverter<any>|TypeNodeConverter<any, any>) {\n if ('supportsNode' in converter && 'convertNode' in converter) {\n this.typeNodeConverters.push(<TypeNodeConverter<any, any>> converter);\n this.typeNodeConverters.sort((a, b) => (b.priority || 0) - (a.priority || 0));\n }\n\n if ('supportsType' in converter && 'convertType' in converter) {\n this.typeTypeConverters.push(<TypeTypeConverter<any>> converter);\n this.typeTypeConverters.sort((a, b) => (b.priority || 0) - (a.priority || 0));\n }\n }\n\n removeComponent(name: string): ConverterComponent {\n const component = super.removeComponent(name);\n if (component instanceof ConverterNodeComponent) {\n this.removeNodeConverter(component);\n } else if (component instanceof ConverterTypeComponent) {\n this.removeTypeConverter(component);\n }\n\n return component;\n }\n\n private removeNodeConverter(converter: ConverterNodeComponent<any>) {\n const converters = this.nodeConverters;\n const keys = _.keys(this.nodeConverters);\n for (let key of keys) {\n if (converters[key] === converter) {\n delete converters[key];\n }\n }\n }\n\n private removeTypeConverter(converter: ConverterTypeComponent) {\n let index = this.typeNodeConverters.indexOf(<any> converter);\n if (index !== -1) {\n this.typeTypeConverters.splice(index, 1);\n }\n\n index = this.typeNodeConverters.indexOf(<any> converter);\n if (index !== -1) {\n this.typeNodeConverters.splice(index, 1);\n }\n }\n\n removeAllComponents() {\n super.removeAllComponents();\n\n this.nodeConverters = {};\n this.typeTypeConverters = [];\n this.typeNodeConverters = [];\n }\n\n /**\n * Compile the given source files and create a project reflection for them.\n *\n * @param fileNames Array of the file names that should be compiled.\n */\n convert(fileNames: string[]): ConverterResult {\n for (let i = 0, c = fileNames.length; i < c; i++) {\n fileNames[i] = normalizePath(_ts.normalizeSlashes(fileNames[i]));\n }\n\n const program = ts.createProgram(fileNames, this.application.options.getCompilerOptions(), this.compilerHost);\n const checker = program.getTypeChecker();\n const context = new Context(this, fileNames, checker, program);\n\n this.trigger(Converter.EVENT_BEGIN, context);\n\n const errors = this.compile(context);\n const project = this.resolve(context);\n\n this.trigger(Converter.EVENT_END, context);\n\n return {\n errors: errors,\n project: project\n };\n }\n\n /**\n * Analyze the given node and create a suitable reflection.\n *\n * This function checks the kind of the node and delegates to the matching function implementation.\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The compiler node that should be analyzed.\n * @return The resulting reflection or NULL.\n */\n convertNode(context: Context, node: ts.Node): Reflection {\n if (context.visitStack.indexOf(node) !== -1) {\n return null;\n }\n\n const oldVisitStack = context.visitStack;\n context.visitStack = oldVisitStack.slice();\n context.visitStack.push(node);\n\n let result: Reflection;\n if (node.kind in this.nodeConverters) {\n result = this.nodeConverters[node.kind].convert(context, node);\n }\n\n context.visitStack = oldVisitStack;\n return result;\n }\n\n /**\n * Convert the given TypeScript type into its TypeDoc type reflection.\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The node whose type should be reflected.\n * @param type The type of the node if already known.\n * @returns The TypeDoc type reflection representing the given node and type.\n */\n convertType(context: Context, node?: ts.Node, type?: ts.Type): Type {\n // Run all node based type conversions\n if (node) {\n type = type || context.getTypeAtLocation(node);\n\n for (let converter of this.typeNodeConverters) {\n if (converter.supportsNode(context, node, type)) {\n return converter.convertNode(context, node, type);\n }\n }\n }\n\n // Run all type based type conversions\n if (type) {\n for (let converter of this.typeTypeConverters) {\n if (converter.supportsType(context, type)) {\n return converter.convertType(context, type);\n }\n }\n }\n }\n\n /**\n * Compile the files within the given context and convert the compiler symbols to reflections.\n *\n * @param context The context object describing the current state the converter is in.\n * @returns An array containing all errors generated by the TypeScript compiler.\n */\n private compile(context: Context): ts.Diagnostic[] {\n const program = context.program;\n\n program.getSourceFiles().forEach((sourceFile) => {\n this.convertNode(context, sourceFile);\n });\n\n let diagnostics = program.getOptionsDiagnostics();\n if (diagnostics.length) {\n return diagnostics;\n }\n\n diagnostics = program.getSyntacticDiagnostics();\n if (diagnostics.length) {\n return diagnostics;\n }\n\n diagnostics = program.getGlobalDiagnostics();\n if (diagnostics.length) {\n return diagnostics;\n }\n\n diagnostics = program.getSemanticDiagnostics();\n if (diagnostics.length) {\n return diagnostics;\n }\n\n return [];\n }\n\n /**\n * Resolve the project within the given context.\n *\n * @param context The context object describing the current state the converter is in.\n * @returns The final project reflection.\n */\n private resolve(context: Context): ProjectReflection {\n this.trigger(Converter.EVENT_RESOLVE_BEGIN, context);\n const project = context.project;\n\n for (let id in project.reflections) {\n if (!project.reflections.hasOwnProperty(id)) {\n continue;\n }\n this.trigger(Converter.EVENT_RESOLVE, context, project.reflections[id]);\n }\n\n this.trigger(Converter.EVENT_RESOLVE_END, context);\n return project;\n }\n\n /**\n * Return the basename of the default library that should be used.\n *\n * @returns The basename of the default library.\n */\n getDefaultLib(): string {\n return ts.getDefaultLibFileName(this.application.options.getCompilerOptions());\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"converter.js","sourceRoot":"","sources":["../../../src/lib/converter/converter.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AACjC,oCAAsC;AACtC,0BAA4B;AAG5B,4DAA6D;AAE7D,qCAAoC;AACpC,2CAAwI;AACxI,uDAAqD;AACrD,gDAA2F;AAC3F,kCAA4C;AAqB5C;IAA+B,6BAAmD;IAAlF;;IAqXA,CAAC;kBArXY,SAAS;IAmJlB,8BAAU,GAAV;QACI,IAAI,CAAC,YAAY,GAAG,IAAI,4BAAY,CAAC,IAAI,CAAC,CAAC;QAC3C,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC;QACzB,IAAI,CAAC,kBAAkB,GAAG,EAAE,CAAC;QAC7B,IAAI,CAAC,kBAAkB,GAAG,EAAE,CAAC;IACjC,CAAC;IAED,gCAAY,GAAZ,UAAuD,IAAY,EAAE,cAAqC;QACtG,IAAM,SAAS,GAAG,iBAAM,YAAY,YAAC,IAAI,EAAE,cAAc,CAAC,CAAC;QAC3D,EAAE,CAAC,CAAC,SAAS,YAAY,mCAAsB,CAAC,CAAC,CAAC;YAC9C,IAAI,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC;QACrC,CAAC;QAAC,IAAI,CAAC,EAAE,CAAC,CAAC,SAAS,YAAY,mCAAsB,CAAC,CAAC,CAAC;YACrD,IAAI,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC;QACrC,CAAC;QAED,MAAM,CAAC,SAAS,CAAC;IACrB,CAAC;IAEO,oCAAgB,GAAxB,UAAyB,SAAsC;QAC3D,GAAG,CAAC,CAAiB,UAAkB,EAAlB,KAAA,SAAS,CAAC,QAAQ,EAAlB,cAAkB,EAAlB,IAAkB;YAAlC,IAAI,QAAQ,SAAA;YACb,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,GAAG,SAAS,CAAC;SAC7C;IACL,CAAC;IAEO,oCAAgB,GAAxB,UAAyB,SAAiC;QACtD,EAAE,CAAC,CAAC,cAAc,IAAI,SAAS,IAAI,aAAa,IAAI,SAAS,CAAC,CAAC,CAAC;YAC5D,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAA+B,SAAS,CAAC,CAAC;YACtE,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,CAAC,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,EAArC,CAAqC,CAAC,CAAC;QAClF,CAAC;QAED,EAAE,CAAC,CAAC,cAAc,IAAI,SAAS,IAAI,aAAa,IAAI,SAAS,CAAC,CAAC,CAAC;YAC5D,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAA0B,SAAS,CAAC,CAAC;YACjE,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,CAAC,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,EAArC,CAAqC,CAAC,CAAC;QAClF,CAAC;IACL,CAAC;IAED,mCAAe,GAAf,UAAgB,IAAY;QACxB,IAAM,SAAS,GAAG,iBAAM,eAAe,YAAC,IAAI,CAAC,CAAC;QAC9C,EAAE,CAAC,CAAC,SAAS,YAAY,mCAAsB,CAAC,CAAC,CAAC;YAC9C,IAAI,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC;QACxC,CAAC;QAAC,IAAI,CAAC,EAAE,CAAC,CAAC,SAAS,YAAY,mCAAsB,CAAC,CAAC,CAAC;YACrD,IAAI,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC;QACxC,CAAC;QAED,MAAM,CAAC,SAAS,CAAC;IACrB,CAAC;IAEO,uCAAmB,GAA3B,UAA4B,SAAsC;QAC9D,IAAM,UAAU,GAAG,IAAI,CAAC,cAAc,CAAC;QACvC,IAAM,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QACzC,GAAG,CAAC,CAAY,UAAI,EAAJ,aAAI,EAAJ,kBAAI,EAAJ,IAAI;YAAf,IAAI,GAAG,aAAA;YACR,EAAE,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC;gBAChC,OAAO,UAAU,CAAC,GAAG,CAAC,CAAC;YAC3B,CAAC;SACJ;IACL,CAAC;IAEO,uCAAmB,GAA3B,UAA4B,SAAiC;QACzD,IAAI,KAAK,GAAG,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAO,SAAS,CAAC,CAAC;QAC7D,EAAE,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;YACf,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;QAC7C,CAAC;QAED,KAAK,GAAG,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAO,SAAS,CAAC,CAAC;QACzD,EAAE,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;YACf,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;QAC7C,CAAC;IACL,CAAC;IAED,uCAAmB,GAAnB;QACI,iBAAM,mBAAmB,WAAE,CAAC;QAE5B,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC;QACzB,IAAI,CAAC,kBAAkB,GAAG,EAAE,CAAC;QAC7B,IAAI,CAAC,kBAAkB,GAAG,EAAE,CAAC;IACjC,CAAC;IAOD,2BAAO,GAAP,UAAQ,SAAmB;QACvB,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;YAC/C,SAAS,CAAC,CAAC,CAAC,GAAG,kBAAa,CAAC,GAAG,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACrE,CAAC;QAED,IAAM,OAAO,GAAG,EAAE,CAAC,aAAa,CAAC,SAAS,EAAE,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,kBAAkB,EAAE,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;QAC9G,IAAM,OAAO,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;QACzC,IAAM,OAAO,GAAG,IAAI,iBAAO,CAAC,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;QAE/D,IAAI,CAAC,OAAO,CAAC,WAAS,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;QAE7C,IAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACrC,IAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAEtC,IAAI,CAAC,OAAO,CAAC,WAAS,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QAE3C,MAAM,CAAC;YACH,MAAM,EAAE,MAAM;YACd,OAAO,EAAE,OAAO;SACnB,CAAC;IACN,CAAC;IAWD,+BAAW,GAAX,UAAY,OAAgB,EAAE,IAAa;QACvC,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;YAC1C,MAAM,CAAC,IAAI,CAAC;QAChB,CAAC;QAED,IAAM,aAAa,GAAG,OAAO,CAAC,UAAU,CAAC;QACzC,OAAO,CAAC,UAAU,GAAG,aAAa,CAAC,KAAK,EAAE,CAAC;QAC3C,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAE9B,IAAI,MAAkB,CAAC;QACvB,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC;YACnC,MAAM,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QACnE,CAAC;QAED,OAAO,CAAC,UAAU,GAAG,aAAa,CAAC;QACnC,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IAUD,+BAAW,GAAX,UAAY,OAAgB,EAAE,IAAc,EAAE,IAAc;QAExD,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;YACP,IAAI,GAAG,IAAI,IAAI,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;YAE/C,GAAG,CAAC,CAAkB,UAAuB,EAAvB,KAAA,IAAI,CAAC,kBAAkB,EAAvB,cAAuB,EAAvB,IAAuB;gBAAxC,IAAI,SAAS,SAAA;gBACd,EAAE,CAAC,CAAC,SAAS,CAAC,YAAY,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;oBAC9C,MAAM,CAAC,SAAS,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;gBACtD,CAAC;aACJ;QACL,CAAC;QAGD,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;YACP,GAAG,CAAC,CAAkB,UAAuB,EAAvB,KAAA,IAAI,CAAC,kBAAkB,EAAvB,cAAuB,EAAvB,IAAuB;gBAAxC,IAAI,SAAS,SAAA;gBACd,EAAE,CAAC,CAAC,SAAS,CAAC,YAAY,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;oBACxC,MAAM,CAAC,SAAS,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;gBAChD,CAAC;aACJ;QACL,CAAC;IACL,CAAC;IAQO,2BAAO,GAAf,UAAgB,OAAgB;QAAhC,iBA4BC;QA3BG,IAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;QAEhC,OAAO,CAAC,cAAc,EAAE,CAAC,OAAO,CAAC,UAAC,UAAU;YACxC,KAAI,CAAC,WAAW,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;QAC1C,CAAC,CAAC,CAAC;QAEH,IAAI,WAAW,GAAG,OAAO,CAAC,qBAAqB,EAAE,CAAC;QAClD,EAAE,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;YACrB,MAAM,CAAC,WAAW,CAAC;QACvB,CAAC;QAED,WAAW,GAAG,OAAO,CAAC,uBAAuB,EAAE,CAAC;QAChD,EAAE,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;YACrB,MAAM,CAAC,WAAW,CAAC;QACvB,CAAC;QAED,WAAW,GAAG,OAAO,CAAC,oBAAoB,EAAE,CAAC;QAC7C,EAAE,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;YACrB,MAAM,CAAC,WAAW,CAAC;QACvB,CAAC;QAED,WAAW,GAAG,OAAO,CAAC,sBAAsB,EAAE,CAAC;QAC/C,EAAE,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;YACrB,MAAM,CAAC,WAAW,CAAC;QACvB,CAAC;QAED,MAAM,CAAC,EAAE,CAAC;IACd,CAAC;IAQO,2BAAO,GAAf,UAAgB,OAAgB;QAC5B,IAAI,CAAC,OAAO,CAAC,WAAS,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC;QACrD,IAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;QAEhC,GAAG,CAAC,CAAC,IAAI,EAAE,IAAI,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC;YACjC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;gBAC1C,QAAQ,CAAC;YACb,CAAC;YACD,IAAI,CAAC,OAAO,CAAC,WAAS,CAAC,aAAa,EAAE,OAAO,EAAE,OAAO,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,CAAC;QAC5E,CAAC;QAED,IAAI,CAAC,OAAO,CAAC,WAAS,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;QACnD,MAAM,CAAC,OAAO,CAAC;IACnB,CAAC;IAOD,iCAAa,GAAb;QACI,MAAM,CAAC,EAAE,CAAC,qBAAqB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAAC;IACnF,CAAC;IAvTM,qBAAW,GAAG,OAAO,CAAC;IAOtB,mBAAS,GAAG,KAAK,CAAC;IAWlB,0BAAgB,GAAG,WAAW,CAAC;IAO/B,kCAAwB,GAAG,mBAAmB,CAAC;IAO/C,gCAAsB,GAAG,iBAAiB,CAAC;IAO3C,gCAAsB,GAAG,iBAAiB,CAAC;IAO3C,qCAA2B,GAAG,qBAAqB,CAAC;IAOpD,uCAA6B,GAAG,wBAAwB,CAAC;IAWzD,6BAAmB,GAAG,cAAc,CAAC;IAOrC,uBAAa,GAAG,mBAAmB,CAAC;IAOpC,2BAAiB,GAAG,YAAY,CAAC;IAnIxC;QAJC,kBAAM,CAAC;YACJ,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,8EAA8E;SACvF,CAAC;2CACW;IAMb;QAJC,kBAAM,CAAC;YACJ,IAAI,EAAE,iBAAiB;YACvB,IAAI,EAAE,sEAAsE;SAC/E,CAAC;sDACsB;IAOxB;QALC,kBAAM,CAAC;YACJ,IAAI,EAAE,qBAAqB;YAC3B,IAAI,EAAE,6CAA6C;YACnD,IAAI,EAAE,2BAAa,CAAC,OAAO;SAC9B,CAAC;0DAC2B;IAO7B;QALC,kBAAM,CAAC;YACJ,IAAI,EAAE,kBAAkB;YACxB,IAAI,EAAE,qEAAqE;YAC3E,IAAI,EAAE,2BAAa,CAAC,OAAO;SAC9B,CAAC;uDACwB;IAO1B;QALC,kBAAM,CAAC;YACJ,IAAI,EAAE,oBAAoB;YAC1B,IAAI,EAAE,8DAA8D;YACpE,IAAI,EAAE,2BAAa,CAAC,OAAO;SAC9B,CAAC;yDAC0B;IAO5B;QALC,kBAAM,CAAC;YACJ,IAAI,EAAE,gBAAgB;YACtB,IAAI,EAAE,uCAAuC;YAC7C,IAAI,EAAE,2BAAa,CAAC,OAAO;SAC9B,CAAC;qDACsB;IA1Cf,SAAS;QADrB,qBAAS,CAAC,EAAC,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,+BAAkB,EAAC,CAAC;OAClE,SAAS,CAqXrB;IAAD,gBAAC;;CAAA,AArXD,CAA+B,8BAAkB,GAqXhD;AArXY,8BAAS","sourcesContent":["import * as ts from 'typescript';\nimport * as _ts from '../ts-internal';\nimport * as _ from 'lodash';\n\nimport { Application } from '../application';\nimport { ParameterType } from '../utils/options/declaration';\nimport { Reflection, Type, ProjectReflection } from '../models/index';\nimport { Context } from './context';\nimport { ConverterComponent, ConverterNodeComponent, ConverterTypeComponent, TypeTypeConverter, TypeNodeConverter } from './components';\nimport { CompilerHost } from './utils/compiler-host';\nimport { Component, Option, ChildableComponent, ComponentClass } from '../utils/component';\nimport { normalizePath } from '../utils/fs';\n\n/**\n * Result structure of the [[Converter.convert]] method.\n */\nexport interface ConverterResult {\n /**\n * An array containing all errors generated by the TypeScript compiler.\n */\n errors: ts.Diagnostic[];\n\n /**\n * The resulting project reflection.\n */\n project: ProjectReflection;\n}\n\n/**\n * Compiles source files using TypeScript and converts compiler symbols to reflections.\n */\n@Component({name: 'converter', internal: true, childClass: ConverterComponent})\nexport class Converter extends ChildableComponent<Application, ConverterComponent> {\n /**\n * The human readable name of the project. Used within the templates to set the title of the document.\n */\n @Option({\n name: 'name',\n help: 'Set the name of the project that will be used in the header of the template.'\n })\n name: string;\n\n @Option({\n name: 'externalPattern',\n help: 'Define a pattern for files that should be considered being external.'\n })\n externalPattern: string;\n\n @Option({\n name: 'includeDeclarations',\n help: 'Turn on parsing of .d.ts declaration files.',\n type: ParameterType.Boolean\n })\n includeDeclarations: boolean;\n\n @Option({\n name: 'excludeExternals',\n help: 'Prevent externally resolved TypeScript files from being documented.',\n type: ParameterType.Boolean\n })\n excludeExternals: boolean;\n\n @Option({\n name: 'excludeNotExported',\n help: 'Prevent symbols that are not exported from being documented.',\n type: ParameterType.Boolean\n })\n excludeNotExported: boolean;\n\n @Option({\n name: 'excludePrivate',\n help: 'Ignores private variables and methods',\n type: ParameterType.Boolean\n })\n excludePrivate: boolean;\n\n private compilerHost: CompilerHost;\n\n private nodeConverters: {[syntaxKind: number]: ConverterNodeComponent<ts.Node>};\n\n private typeNodeConverters: TypeNodeConverter<ts.Type, ts.Node>[];\n\n private typeTypeConverters: TypeTypeConverter<ts.Type>[];\n\n /**\n * General events\n */\n\n /**\n * Triggered when the converter begins converting a project.\n * The listener should implement [[IConverterCallback]].\n * @event\n */\n static EVENT_BEGIN = 'begin';\n\n /**\n * Triggered when the converter has finished converting a project.\n * The listener should implement [[IConverterCallback]].\n * @event\n */\n static EVENT_END = 'end';\n\n /**\n * Factory events\n */\n\n /**\n * Triggered when the converter begins converting a source file.\n * The listener should implement [[IConverterNodeCallback]].\n * @event\n */\n static EVENT_FILE_BEGIN = 'fileBegin';\n\n /**\n * Triggered when the converter has created a declaration reflection.\n * The listener should implement [[IConverterNodeCallback]].\n * @event\n */\n static EVENT_CREATE_DECLARATION = 'createDeclaration';\n\n /**\n * Triggered when the converter has created a signature reflection.\n * The listener should implement [[IConverterNodeCallback]].\n * @event\n */\n static EVENT_CREATE_SIGNATURE = 'createSignature';\n\n /**\n * Triggered when the converter has created a parameter reflection.\n * The listener should implement [[IConverterNodeCallback]].\n * @event\n */\n static EVENT_CREATE_PARAMETER = 'createParameter';\n\n /**\n * Triggered when the converter has created a type parameter reflection.\n * The listener should implement [[IConverterNodeCallback]].\n * @event\n */\n static EVENT_CREATE_TYPE_PARAMETER = 'createTypeParameter';\n\n /**\n * Triggered when the converter has found a function implementation.\n * The listener should implement [[IConverterNodeCallback]].\n * @event\n */\n static EVENT_FUNCTION_IMPLEMENTATION = 'functionImplementation';\n\n /**\n * Resolve events\n */\n\n /**\n * Triggered when the converter begins resolving a project.\n * The listener should implement [[IConverterCallback]].\n * @event\n */\n static EVENT_RESOLVE_BEGIN = 'resolveBegin';\n\n /**\n * Triggered when the converter resolves a reflection.\n * The listener should implement [[IConverterResolveCallback]].\n * @event\n */\n static EVENT_RESOLVE = 'resolveReflection';\n\n /**\n * Triggered when the converter has finished resolving a project.\n * The listener should implement [[IConverterCallback]].\n * @event\n */\n static EVENT_RESOLVE_END = 'resolveEnd';\n\n /**\n * Create a new Converter instance.\n *\n * @param application The application instance this converter relies on. The application\n * must expose the settings that should be used and serves as a global logging endpoint.\n */\n initialize() {\n this.compilerHost = new CompilerHost(this);\n this.nodeConverters = {};\n this.typeTypeConverters = [];\n this.typeNodeConverters = [];\n }\n\n addComponent<T extends ConverterComponent & Component>(name: string, componentClass: T | ComponentClass<T>): T {\n const component = super.addComponent(name, componentClass);\n if (component instanceof ConverterNodeComponent) {\n this.addNodeConverter(component);\n } else if (component instanceof ConverterTypeComponent) {\n this.addTypeConverter(component);\n }\n\n return component;\n }\n\n private addNodeConverter(converter: ConverterNodeComponent<any>) {\n for (let supports of converter.supports) {\n this.nodeConverters[supports] = converter;\n }\n }\n\n private addTypeConverter(converter: ConverterTypeComponent) {\n if ('supportsNode' in converter && 'convertNode' in converter) {\n this.typeNodeConverters.push(<TypeNodeConverter<any, any>> converter);\n this.typeNodeConverters.sort((a, b) => (b.priority || 0) - (a.priority || 0));\n }\n\n if ('supportsType' in converter && 'convertType' in converter) {\n this.typeTypeConverters.push(<TypeTypeConverter<any>> converter);\n this.typeTypeConverters.sort((a, b) => (b.priority || 0) - (a.priority || 0));\n }\n }\n\n removeComponent(name: string): ConverterComponent {\n const component = super.removeComponent(name);\n if (component instanceof ConverterNodeComponent) {\n this.removeNodeConverter(component);\n } else if (component instanceof ConverterTypeComponent) {\n this.removeTypeConverter(component);\n }\n\n return component;\n }\n\n private removeNodeConverter(converter: ConverterNodeComponent<any>) {\n const converters = this.nodeConverters;\n const keys = _.keys(this.nodeConverters);\n for (let key of keys) {\n if (converters[key] === converter) {\n delete converters[key];\n }\n }\n }\n\n private removeTypeConverter(converter: ConverterTypeComponent) {\n let index = this.typeNodeConverters.indexOf(<any> converter);\n if (index !== -1) {\n this.typeTypeConverters.splice(index, 1);\n }\n\n index = this.typeNodeConverters.indexOf(<any> converter);\n if (index !== -1) {\n this.typeNodeConverters.splice(index, 1);\n }\n }\n\n removeAllComponents() {\n super.removeAllComponents();\n\n this.nodeConverters = {};\n this.typeTypeConverters = [];\n this.typeNodeConverters = [];\n }\n\n /**\n * Compile the given source files and create a project reflection for them.\n *\n * @param fileNames Array of the file names that should be compiled.\n */\n convert(fileNames: string[]): ConverterResult {\n for (let i = 0, c = fileNames.length; i < c; i++) {\n fileNames[i] = normalizePath(_ts.normalizeSlashes(fileNames[i]));\n }\n\n const program = ts.createProgram(fileNames, this.application.options.getCompilerOptions(), this.compilerHost);\n const checker = program.getTypeChecker();\n const context = new Context(this, fileNames, checker, program);\n\n this.trigger(Converter.EVENT_BEGIN, context);\n\n const errors = this.compile(context);\n const project = this.resolve(context);\n\n this.trigger(Converter.EVENT_END, context);\n\n return {\n errors: errors,\n project: project\n };\n }\n\n /**\n * Analyze the given node and create a suitable reflection.\n *\n * This function checks the kind of the node and delegates to the matching function implementation.\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The compiler node that should be analyzed.\n * @return The resulting reflection or NULL.\n */\n convertNode(context: Context, node: ts.Node): Reflection {\n if (context.visitStack.indexOf(node) !== -1) {\n return null;\n }\n\n const oldVisitStack = context.visitStack;\n context.visitStack = oldVisitStack.slice();\n context.visitStack.push(node);\n\n let result: Reflection;\n if (node.kind in this.nodeConverters) {\n result = this.nodeConverters[node.kind].convert(context, node);\n }\n\n context.visitStack = oldVisitStack;\n return result;\n }\n\n /**\n * Convert the given TypeScript type into its TypeDoc type reflection.\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The node whose type should be reflected.\n * @param type The type of the node if already known.\n * @returns The TypeDoc type reflection representing the given node and type.\n */\n convertType(context: Context, node?: ts.Node, type?: ts.Type): Type {\n // Run all node based type conversions\n if (node) {\n type = type || context.getTypeAtLocation(node);\n\n for (let converter of this.typeNodeConverters) {\n if (converter.supportsNode(context, node, type)) {\n return converter.convertNode(context, node, type);\n }\n }\n }\n\n // Run all type based type conversions\n if (type) {\n for (let converter of this.typeTypeConverters) {\n if (converter.supportsType(context, type)) {\n return converter.convertType(context, type);\n }\n }\n }\n }\n\n /**\n * Compile the files within the given context and convert the compiler symbols to reflections.\n *\n * @param context The context object describing the current state the converter is in.\n * @returns An array containing all errors generated by the TypeScript compiler.\n */\n private compile(context: Context): ts.Diagnostic[] {\n const program = context.program;\n\n program.getSourceFiles().forEach((sourceFile) => {\n this.convertNode(context, sourceFile);\n });\n\n let diagnostics = program.getOptionsDiagnostics();\n if (diagnostics.length) {\n return diagnostics;\n }\n\n diagnostics = program.getSyntacticDiagnostics();\n if (diagnostics.length) {\n return diagnostics;\n }\n\n diagnostics = program.getGlobalDiagnostics();\n if (diagnostics.length) {\n return diagnostics;\n }\n\n diagnostics = program.getSemanticDiagnostics();\n if (diagnostics.length) {\n return diagnostics;\n }\n\n return [];\n }\n\n /**\n * Resolve the project within the given context.\n *\n * @param context The context object describing the current state the converter is in.\n * @returns The final project reflection.\n */\n private resolve(context: Context): ProjectReflection {\n this.trigger(Converter.EVENT_RESOLVE_BEGIN, context);\n const project = context.project;\n\n for (let id in project.reflections) {\n if (!project.reflections.hasOwnProperty(id)) {\n continue;\n }\n this.trigger(Converter.EVENT_RESOLVE, context, project.reflections[id]);\n }\n\n this.trigger(Converter.EVENT_RESOLVE_END, context);\n return project;\n }\n\n /**\n * Return the basename of the default library that should be used.\n *\n * @returns The basename of the default library.\n */\n getDefaultLib(): string {\n return ts.getDefaultLibFileName(this.application.options.getCompilerOptions());\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/factories/comment.js.map b/node_modules/typedoc/dist/lib/converter/factories/comment.js.map
index f11e70b6f..1f3be8723 100644
--- a/node_modules/typedoc/dist/lib/converter/factories/comment.js.map
+++ b/node_modules/typedoc/dist/lib/converter/factories/comment.js.map
@@ -1 +1 @@
-{"version":3,"file":"comment.js","sourceRoot":"","sources":["../../../../src/lib/converter/factories/comment.ts"],"names":[],"mappings":";;AAAA,+BAAiC;AACjC,uCAAyC;AAEzC,qDAAgE;AAShE,uBAA8B,IAAa;IACvC,IAAM,OAAO,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC;IACpC,EAAE,CAAC,CAAC,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC;QAClB,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAED,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;AACjC,CAAC;AAPD,sCAOC;AAeD,oCAAoC,IAA0B;IAC1D,EAAE,CAAC,CAAC,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,aAAa,CAAC,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC;QACpF,IAAI,IAAI,GAA0B,IAAI,CAAC,aAAa,CAAC;QACrD,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;YACtC,MAAM,CAAC,KAAK,CAAC;QACjB,CAAC;IACL,CAAC;IAED,MAAM,CAAC,IAAI,CAAC;AAChB,CAAC;AAYD,kCAAkC,IAA0B;IACxD,OAAO,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,iBAAiB,EAAE,CAAC;QACzE,IAAI,QAAM,GAA0B,IAAI,CAAC,MAAM,CAAC;QAChD,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,KAAK,QAAM,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;YACxC,IAAI,GAAG,QAAM,CAAC;QAClB,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,KAAK,CAAC;QACV,CAAC;IACL,CAAC;IAED,MAAM,CAAC,IAAI,CAAC;AAChB,CAAC;AAQD,uBAA8B,IAAa;IACvC,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,uBAAuB,CAAC,CAAC,CAAC;QAC5E,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC;IAC9B,CAAC;IAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC;QACvD,EAAE,CAAC,CAAC,CAAC,0BAA0B,CAAwB,IAAI,CAAC,CAAC,CAAC,CAAC;YAC3D,MAAM,CAAC,IAAI,CAAC;QAChB,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,IAAI,GAAG,wBAAwB,CAAwB,IAAI,CAAC,CAAC;QACjE,CAAC;IACL,CAAC;IAED,IAAM,UAAU,GAAG,GAAG,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;IACjD,IAAM,QAAQ,GAAG,GAAG,CAAC,qBAAqB,CAAC,IAAI,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC;IAClE,EAAE,CAAC,CAAC,QAAQ,IAAI,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;QAC9B,IAAI,OAAO,SAAiB,CAAC;QAC7B,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC;YACzC,EAAE,CAAC,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC;gBACxB,MAAM,CAAC,IAAI,CAAC;YAChB,CAAC;YACD,OAAO,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;QAC1B,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,OAAO,GAAG,QAAQ,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QAC5C,CAAC;QAED,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;IAC/D,CAAC;IAAC,IAAI,CAAC,CAAC;QACJ,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;AACL,CAAC;AA5BD,sCA4BC;AASD,sBAA6B,IAAY,EAAE,OAAgC;IAAhC,wBAAA,EAAA,cAAuB,eAAO,EAAE;IACvE,IAAI,UAAsB,CAAC;IAC3B,IAAI,SAAS,GAAG,CAAC,CAAC;IAElB,yBAAyB,IAAY;QACjC,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC;QACxC,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,mBAAmB,EAAE,EAAE,CAAC,CAAC;QAC7C,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;IACvB,CAAC;IAED,sBAAsB,IAAY;QAC9B,EAAE,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;YACb,UAAU,CAAC,IAAI,IAAI,IAAI,GAAG,IAAI,CAAC;QACnC,CAAC;QAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,KAAK,EAAE,IAAI,SAAS,KAAK,CAAC,CAAC,CAAC,CAAC;QAE5C,CAAC;QAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,KAAK,EAAE,IAAI,SAAS,KAAK,CAAC,CAAC,CAAC,CAAC;YACxC,SAAS,GAAG,CAAC,CAAC;QAClB,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,EAAE,CAAC,CAAC,SAAS,KAAK,CAAC,CAAC,CAAC,CAAC;gBAClB,OAAO,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,KAAK,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC;YAC7D,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,OAAO,CAAC,SAAS,IAAI,CAAC,OAAO,CAAC,SAAS,KAAK,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC;gBACnE,SAAS,GAAG,CAAC,CAAC;YAClB,CAAC;QACL,CAAC;IACL,CAAC;IAED,qBAAqB,IAAY,EAAE,GAAoB;QACnD,IAAI,OAAO,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;QACnC,IAAI,SAAiB,CAAC;QACtB,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;QAE9C,EAAE,CAAC,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC;YAAC,OAAO,GAAG,SAAS,CAAC;QAAC,CAAC;QAClD,EAAE,CAAC,CAAC,OAAO,KAAK,OAAO,IAAI,OAAO,KAAK,WAAW,CAAC,CAAC,CAAC;YACjD,IAAI,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;YAC7B,IAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAClC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;gBACR,SAAS,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;gBACrB,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;YACpD,CAAC;YACD,IAAI,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;YAC7B,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;QACtC,CAAC;QAAC,IAAI,CAAC,EAAE,CAAC,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC;YAC/B,IAAI,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;QACjC,CAAC;QAED,UAAU,GAAG,IAAI,kBAAU,CAAC,OAAO,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC;QACtD,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;YAAC,OAAO,CAAC,IAAI,GAAG,EAAE,CAAC;QAAC,CAAC;QACzC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAClC,CAAC;IAED,kBAAkB,IAAY;QAC1B,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;QACrC,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;QAEhC,IAAM,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACjC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;YACN,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;QAC3B,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,YAAY,CAAC,IAAI,CAAC,CAAC;QACvB,CAAC;IACL,CAAC;IAID,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;IACrC,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;IACrC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAEzC,MAAM,CAAC,OAAO,CAAC;AACnB,CAAC;AAtED,oCAsEC","sourcesContent":["import * as ts from 'typescript';\nimport * as _ts from '../../ts-internal';\n\nimport {Comment, CommentTag} from '../../models/comments/index';\n\n/**\n * Return the parsed comment of the given TypeScript node.\n *\n * @param node The node whose comment should be returned.\n * @return The parsed comment as a [[Comment]] instance or NULL if\n * no comment is present.\n */\nexport function createComment(node: ts.Node): Comment {\n const comment = getRawComment(node);\n if (comment == null) {\n return null;\n }\n\n return parseComment(comment);\n}\n\n/**\n * Check whether the given module declaration is the topmost.\n *\n * This funtion returns TRUE if there is no trailing module defined, in\n * the following example this would be the case only for module <code>C</code>.\n *\n * ```\n * module A.B.C { }\n * ```\n *\n * @param node The module definition that should be tested.\n * @return TRUE if the given node is the topmost module declaration, FALSE otherwise.\n */\nfunction isTopmostModuleDeclaration(node: ts.ModuleDeclaration): boolean {\n if (node.nextContainer && node.nextContainer.kind === ts.SyntaxKind.ModuleDeclaration) {\n let next = <ts.ModuleDeclaration> node.nextContainer;\n if (node.name.end + 1 === next.name.pos) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * Return the root module declaration of the given module declaration.\n *\n * In the following example this function would always return module\n * <code>A</code> no matter which of the modules was passed in.\n *\n * ```\n * module A.B.C { }\n * ```\n */\nfunction getRootModuleDeclaration(node: ts.ModuleDeclaration): ts.Node {\n while (node.parent && node.parent.kind === ts.SyntaxKind.ModuleDeclaration) {\n let parent = <ts.ModuleDeclaration> node.parent;\n if (node.name.pos === parent.name.end + 1) {\n node = parent;\n } else {\n break;\n }\n }\n\n return node;\n}\n\n/**\n * Return the raw comment string for the given node.\n *\n * @param node The node whose comment should be resolved.\n * @returns The raw comment string or NULL if no comment could be found.\n */\nexport function getRawComment(node: ts.Node): string {\n if (node.parent && node.parent.kind === ts.SyntaxKind.VariableDeclarationList) {\n node = node.parent.parent;\n } else if (node.kind === ts.SyntaxKind.ModuleDeclaration) {\n if (!isTopmostModuleDeclaration(<ts.ModuleDeclaration> node)) {\n return null;\n } else {\n node = getRootModuleDeclaration(<ts.ModuleDeclaration> node);\n }\n }\n\n const sourceFile = _ts.getSourceFileOfNode(node);\n const comments = _ts.getJSDocCommentRanges(node, sourceFile.text);\n if (comments && comments.length) {\n let comment: ts.CommentRange;\n if (node.kind === ts.SyntaxKind.SourceFile) {\n if (comments.length === 1) {\n return null;\n }\n comment = comments[0];\n } else {\n comment = comments[comments.length - 1];\n }\n\n return sourceFile.text.substring(comment.pos, comment.end);\n } else {\n return null;\n }\n}\n\n/**\n * Parse the given doc comment string.\n *\n * @param text The doc comment string that should be parsed.\n * @param comment The [[Models.Comment]] instance the parsed results should be stored into.\n * @returns A populated [[Models.Comment]] instance.\n */\nexport function parseComment(text: string, comment: Comment = new Comment()): Comment {\n let currentTag: CommentTag;\n let shortText = 0;\n\n function consumeTypeData(line: string): string {\n line = line.replace(/^\\{[^\\}]*\\}+/, '');\n line = line.replace(/^\\[[^\\[][^\\]]*\\]+/, '');\n return line.trim();\n }\n\n function readBareLine(line: string) {\n if (currentTag) {\n currentTag.text += '\\n' + line;\n } else if (line === '' && shortText === 0) {\n // Ignore\n } else if (line === '' && shortText === 1) {\n shortText = 2;\n } else {\n if (shortText === 2) {\n comment.text += (comment.text === '' ? '' : '\\n') + line;\n } else {\n comment.shortText += (comment.shortText === '' ? '' : '\\n') + line;\n shortText = 1;\n }\n }\n }\n\n function readTagLine(line: string, tag: RegExpExecArray) {\n let tagName = tag[1].toLowerCase();\n let paramName: string;\n line = line.substr(tagName.length + 1).trim();\n\n if (tagName === 'return') { tagName = 'returns'; }\n if (tagName === 'param' || tagName === 'typeparam') {\n line = consumeTypeData(line);\n const param = /[^\\s]+/.exec(line);\n if (param) {\n paramName = param[0];\n line = line.substr(paramName.length + 1).trim();\n }\n line = consumeTypeData(line);\n line = line.replace(/^\\-\\s+/, '');\n } else if (tagName === 'returns') {\n line = consumeTypeData(line);\n }\n\n currentTag = new CommentTag(tagName, paramName, line);\n if (!comment.tags) { comment.tags = []; }\n comment.tags.push(currentTag);\n }\n\n function readLine(line: string) {\n line = line.replace(/^\\s*\\*? ?/, '');\n line = line.replace(/\\s*$/, '');\n\n const tag = /^@(\\S+)/.exec(line);\n if (tag) {\n readTagLine(line, tag);\n } else {\n readBareLine(line);\n }\n }\n\n // text = text.replace(/^\\s*\\/\\*+\\s*(\\r\\n?|\\n)/, '');\n // text = text.replace(/(\\r\\n?|\\n)\\s*\\*+\\/\\s*$/, '');\n text = text.replace(/^\\s*\\/\\*+/, '');\n text = text.replace(/\\*+\\/\\s*$/, '');\n text.split(/\\r\\n?|\\n/).forEach(readLine);\n\n return comment;\n}\n"]} \ No newline at end of file
+{"version":3,"file":"comment.js","sourceRoot":"","sources":["../../../../src/lib/converter/factories/comment.ts"],"names":[],"mappings":";;AAAA,+BAAiC;AACjC,uCAAyC;AAEzC,qDAAkE;AASlE,uBAA8B,IAAa;IACvC,IAAM,OAAO,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC;IACpC,EAAE,CAAC,CAAC,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC;QAClB,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAED,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;AACjC,CAAC;AAPD,sCAOC;AAeD,oCAAoC,IAA0B;IAC1D,EAAE,CAAC,CAAC,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,aAAa,CAAC,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC;QACpF,IAAI,IAAI,GAA0B,IAAI,CAAC,aAAa,CAAC;QACrD,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;YACtC,MAAM,CAAC,KAAK,CAAC;QACjB,CAAC;IACL,CAAC;IAED,MAAM,CAAC,IAAI,CAAC;AAChB,CAAC;AAYD,kCAAkC,IAA0B;IACxD,OAAO,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,iBAAiB,EAAE,CAAC;QACzE,IAAI,QAAM,GAA0B,IAAI,CAAC,MAAM,CAAC;QAChD,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,KAAK,QAAM,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;YACxC,IAAI,GAAG,QAAM,CAAC;QAClB,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,KAAK,CAAC;QACV,CAAC;IACL,CAAC;IAED,MAAM,CAAC,IAAI,CAAC;AAChB,CAAC;AAQD,uBAA8B,IAAa;IACvC,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,uBAAuB,CAAC,CAAC,CAAC;QAC5E,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC;IAC9B,CAAC;IAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC;QACvD,EAAE,CAAC,CAAC,CAAC,0BAA0B,CAAwB,IAAI,CAAC,CAAC,CAAC,CAAC;YAC3D,MAAM,CAAC,IAAI,CAAC;QAChB,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,IAAI,GAAG,wBAAwB,CAAwB,IAAI,CAAC,CAAC;QACjE,CAAC;IACL,CAAC;IAED,IAAM,UAAU,GAAG,GAAG,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;IACjD,IAAM,QAAQ,GAAG,GAAG,CAAC,qBAAqB,CAAC,IAAI,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC;IAClE,EAAE,CAAC,CAAC,QAAQ,IAAI,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;QAC9B,IAAI,OAAO,SAAiB,CAAC;QAC7B,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC;YACzC,EAAE,CAAC,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC;gBACxB,MAAM,CAAC,IAAI,CAAC;YAChB,CAAC;YACD,OAAO,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;QAC1B,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,OAAO,GAAG,QAAQ,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QAC5C,CAAC;QAED,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;IAC/D,CAAC;IAAC,IAAI,CAAC,CAAC;QACJ,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;AACL,CAAC;AA5BD,sCA4BC;AASD,sBAA6B,IAAY,EAAE,OAAgC;IAAhC,wBAAA,EAAA,cAAuB,eAAO,EAAE;IACvE,IAAI,UAAsB,CAAC;IAC3B,IAAI,SAAS,GAAG,CAAC,CAAC;IAElB,yBAAyB,IAAY;QACjC,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC;QACxC,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,mBAAmB,EAAE,EAAE,CAAC,CAAC;QAC7C,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;IACvB,CAAC;IAED,sBAAsB,IAAY;QAC9B,EAAE,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;YACb,UAAU,CAAC,IAAI,IAAI,IAAI,GAAG,IAAI,CAAC;QACnC,CAAC;QAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,KAAK,EAAE,IAAI,SAAS,KAAK,CAAC,CAAC,CAAC,CAAC;QAE5C,CAAC;QAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,KAAK,EAAE,IAAI,SAAS,KAAK,CAAC,CAAC,CAAC,CAAC;YACxC,SAAS,GAAG,CAAC,CAAC;QAClB,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,EAAE,CAAC,CAAC,SAAS,KAAK,CAAC,CAAC,CAAC,CAAC;gBAClB,OAAO,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,KAAK,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC;YAC7D,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,OAAO,CAAC,SAAS,IAAI,CAAC,OAAO,CAAC,SAAS,KAAK,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC;gBACnE,SAAS,GAAG,CAAC,CAAC;YAClB,CAAC;QACL,CAAC;IACL,CAAC;IAED,qBAAqB,IAAY,EAAE,GAAoB;QACnD,IAAI,OAAO,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;QACnC,IAAI,SAAiB,CAAC;QACtB,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;QAE9C,EAAE,CAAC,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC;YAAC,OAAO,GAAG,SAAS,CAAC;QAAC,CAAC;QAClD,EAAE,CAAC,CAAC,OAAO,KAAK,OAAO,IAAI,OAAO,KAAK,WAAW,CAAC,CAAC,CAAC;YACjD,IAAI,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;YAC7B,IAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAClC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;gBACR,SAAS,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;gBACrB,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;YACpD,CAAC;YACD,IAAI,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;YAC7B,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;QACtC,CAAC;QAAC,IAAI,CAAC,EAAE,CAAC,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC;YAC/B,IAAI,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;QACjC,CAAC;QAED,UAAU,GAAG,IAAI,kBAAU,CAAC,OAAO,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC;QACtD,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;YAAC,OAAO,CAAC,IAAI,GAAG,EAAE,CAAC;QAAC,CAAC;QACzC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAClC,CAAC;IAED,kBAAkB,IAAY;QAC1B,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;QACrC,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;QAEhC,IAAM,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACjC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;YACN,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;QAC3B,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,YAAY,CAAC,IAAI,CAAC,CAAC;QACvB,CAAC;IACL,CAAC;IAID,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;IACrC,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;IACrC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAEzC,MAAM,CAAC,OAAO,CAAC;AACnB,CAAC;AAtED,oCAsEC","sourcesContent":["import * as ts from 'typescript';\nimport * as _ts from '../../ts-internal';\n\nimport { Comment, CommentTag } from '../../models/comments/index';\n\n/**\n * Return the parsed comment of the given TypeScript node.\n *\n * @param node The node whose comment should be returned.\n * @return The parsed comment as a [[Comment]] instance or NULL if\n * no comment is present.\n */\nexport function createComment(node: ts.Node): Comment {\n const comment = getRawComment(node);\n if (comment == null) {\n return null;\n }\n\n return parseComment(comment);\n}\n\n/**\n * Check whether the given module declaration is the topmost.\n *\n * This funtion returns TRUE if there is no trailing module defined, in\n * the following example this would be the case only for module <code>C</code>.\n *\n * ```\n * module A.B.C { }\n * ```\n *\n * @param node The module definition that should be tested.\n * @return TRUE if the given node is the topmost module declaration, FALSE otherwise.\n */\nfunction isTopmostModuleDeclaration(node: ts.ModuleDeclaration): boolean {\n if (node.nextContainer && node.nextContainer.kind === ts.SyntaxKind.ModuleDeclaration) {\n let next = <ts.ModuleDeclaration> node.nextContainer;\n if (node.name.end + 1 === next.name.pos) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * Return the root module declaration of the given module declaration.\n *\n * In the following example this function would always return module\n * <code>A</code> no matter which of the modules was passed in.\n *\n * ```\n * module A.B.C { }\n * ```\n */\nfunction getRootModuleDeclaration(node: ts.ModuleDeclaration): ts.Node {\n while (node.parent && node.parent.kind === ts.SyntaxKind.ModuleDeclaration) {\n let parent = <ts.ModuleDeclaration> node.parent;\n if (node.name.pos === parent.name.end + 1) {\n node = parent;\n } else {\n break;\n }\n }\n\n return node;\n}\n\n/**\n * Return the raw comment string for the given node.\n *\n * @param node The node whose comment should be resolved.\n * @returns The raw comment string or NULL if no comment could be found.\n */\nexport function getRawComment(node: ts.Node): string {\n if (node.parent && node.parent.kind === ts.SyntaxKind.VariableDeclarationList) {\n node = node.parent.parent;\n } else if (node.kind === ts.SyntaxKind.ModuleDeclaration) {\n if (!isTopmostModuleDeclaration(<ts.ModuleDeclaration> node)) {\n return null;\n } else {\n node = getRootModuleDeclaration(<ts.ModuleDeclaration> node);\n }\n }\n\n const sourceFile = _ts.getSourceFileOfNode(node);\n const comments = _ts.getJSDocCommentRanges(node, sourceFile.text);\n if (comments && comments.length) {\n let comment: ts.CommentRange;\n if (node.kind === ts.SyntaxKind.SourceFile) {\n if (comments.length === 1) {\n return null;\n }\n comment = comments[0];\n } else {\n comment = comments[comments.length - 1];\n }\n\n return sourceFile.text.substring(comment.pos, comment.end);\n } else {\n return null;\n }\n}\n\n/**\n * Parse the given doc comment string.\n *\n * @param text The doc comment string that should be parsed.\n * @param comment The [[Models.Comment]] instance the parsed results should be stored into.\n * @returns A populated [[Models.Comment]] instance.\n */\nexport function parseComment(text: string, comment: Comment = new Comment()): Comment {\n let currentTag: CommentTag;\n let shortText = 0;\n\n function consumeTypeData(line: string): string {\n line = line.replace(/^\\{[^\\}]*\\}+/, '');\n line = line.replace(/^\\[[^\\[][^\\]]*\\]+/, '');\n return line.trim();\n }\n\n function readBareLine(line: string) {\n if (currentTag) {\n currentTag.text += '\\n' + line;\n } else if (line === '' && shortText === 0) {\n // Ignore\n } else if (line === '' && shortText === 1) {\n shortText = 2;\n } else {\n if (shortText === 2) {\n comment.text += (comment.text === '' ? '' : '\\n') + line;\n } else {\n comment.shortText += (comment.shortText === '' ? '' : '\\n') + line;\n shortText = 1;\n }\n }\n }\n\n function readTagLine(line: string, tag: RegExpExecArray) {\n let tagName = tag[1].toLowerCase();\n let paramName: string;\n line = line.substr(tagName.length + 1).trim();\n\n if (tagName === 'return') { tagName = 'returns'; }\n if (tagName === 'param' || tagName === 'typeparam') {\n line = consumeTypeData(line);\n const param = /[^\\s]+/.exec(line);\n if (param) {\n paramName = param[0];\n line = line.substr(paramName.length + 1).trim();\n }\n line = consumeTypeData(line);\n line = line.replace(/^\\-\\s+/, '');\n } else if (tagName === 'returns') {\n line = consumeTypeData(line);\n }\n\n currentTag = new CommentTag(tagName, paramName, line);\n if (!comment.tags) { comment.tags = []; }\n comment.tags.push(currentTag);\n }\n\n function readLine(line: string) {\n line = line.replace(/^\\s*\\*? ?/, '');\n line = line.replace(/\\s*$/, '');\n\n const tag = /^@(\\S+)/.exec(line);\n if (tag) {\n readTagLine(line, tag);\n } else {\n readBareLine(line);\n }\n }\n\n // text = text.replace(/^\\s*\\/\\*+\\s*(\\r\\n?|\\n)/, '');\n // text = text.replace(/(\\r\\n?|\\n)\\s*\\*+\\/\\s*$/, '');\n text = text.replace(/^\\s*\\/\\*+/, '');\n text = text.replace(/\\*+\\/\\s*$/, '');\n text.split(/\\r\\n?|\\n/).forEach(readLine);\n\n return comment;\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/factories/declaration.js.map b/node_modules/typedoc/dist/lib/converter/factories/declaration.js.map
index d1efa09d8..259544c30 100644
--- a/node_modules/typedoc/dist/lib/converter/factories/declaration.js.map
+++ b/node_modules/typedoc/dist/lib/converter/factories/declaration.js.map
@@ -1 +1 @@
-{"version":3,"file":"declaration.js","sourceRoot":"","sources":["../../../../src/lib/converter/factories/declaration.ts"],"names":[],"mappings":";;AAAA,+BAAiC;AAEjC,4CAA8G;AAE9G,0CAAuC;AACvC,yCAAgD;AAKhD,IAAM,cAAc,GAAG;IACnB,sBAAc,CAAC,KAAK;IACpB,sBAAc,CAAC,SAAS;IACxB,sBAAc,CAAC,MAAM;CACxB,CAAC;AAYF,2BAAkC,OAAgB,EAAE,IAAa,EAAE,IAAoB,EAAE,IAAa;IAClG,IAAM,SAAS,GAAyB,OAAO,CAAC,KAAK,CAAC;IACtD,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,YAAY,2BAAmB,CAAC,CAAC,CAAC,CAAC;QAC9C,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;IACtD,CAAC;IAGD,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;QACR,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;YACnB,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;QACjC,CAAC;QAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;YACrB,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;QAC5B,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,MAAM,CAAC,IAAI,CAAC;QAChB,CAAC;IACL,CAAC;IAED,IAAM,SAAS,GAAG,EAAE,CAAC,wBAAwB,CAAC,IAAI,CAAC,CAAC;IAGpD,IAAI,UAAmB,CAAC;IACxB,EAAE,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,sBAAc,CAAC,MAAM,EAAE,sBAAc,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC;QAC3E,UAAU,GAAG,KAAK,CAAC;IACvB,CAAC;IAAC,IAAI,CAAC,CAAC;QACJ,UAAU,GAAG,SAAS,CAAC,KAAK,CAAC,UAAU,CAAC;IAC5C,CAAC;IAED,EAAE,CAAC,CAAC,IAAI,KAAK,sBAAc,CAAC,cAAc,CAAC,CAAC,CAAC;QACzC,UAAU,GAAG,IAAI,CAAC;IACtB,CAAC;IAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,uBAAuB,CAAC,CAAC,CAAC;QACnF,IAAM,eAAe,GAAG,EAAE,CAAC,wBAAwB,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QACxE,UAAU,GAAG,UAAU,IAAI,CAAC,CAAC,CAAC,eAAe,GAAG,EAAE,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;IAC7E,CAAC;IAAC,IAAI,CAAC,CAAC;QACJ,UAAU,GAAG,UAAU,IAAI,CAAC,CAAC,CAAC,SAAS,GAAG,EAAE,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;IACvE,CAAC;IAED,EAAE,CAAC,CAAC,CAAC,UAAU,IAAI,OAAO,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAC,CAAC;QACtD,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAGD,IAAM,SAAS,GAAG,CAAC,CAAC,CAAC,SAAS,GAAG,EAAE,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IAC3D,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,IAAI,SAAS,CAAC,CAAC,CAAC;QACjC,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAGD,IAAI,qBAAqB,GAAG,KAAK,CAAC;IAClC,IAAI,QAAQ,GAAG,KAAK,CAAC;IACrB,EAAE,CAAC,CAAC,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QACtC,QAAQ,GAAG,CAAC,CAAC,CAAC,SAAS,GAAG,EAAE,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;QACnD,EAAE,CAAC,CAAC,SAAS,CAAC,IAAI,KAAK,sBAAc,CAAC,KAAK,CAAC,CAAC,CAAC;YAC1C,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC;gBAChE,qBAAqB,GAAG,IAAI,CAAC;YACjC,CAAC;YAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC,CAAC;gBAC7E,QAAQ,GAAG,IAAI,CAAC;YACpB,CAAC;QACL,CAAC;IACL,CAAC;IAGD,IAAI,KAA4B,CAAC;IACjC,IAAM,QAAQ,GAAG,SAAS,CAAC,QAAQ,GAAG,SAAS,CAAC,QAAQ,IAAI,EAAE,CAAC;IAC/D,QAAQ,CAAC,OAAO,CAAC,UAAC,CAAwB;QACtC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,IAAI,IAAI,CAAC,CAAC,KAAK,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC;YACnD,KAAK,GAAG,CAAC,CAAC;QACd,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;QAET,KAAK,GAAG,IAAI,6BAAqB,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QACzD,KAAK,CAAC,OAAO,CAAC,sBAAc,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QAC/C,KAAK,CAAC,OAAO,CAAC,sBAAc,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QACjD,KAAK,CAAC,OAAO,CAAC,sBAAc,CAAC,mBAAmB,EAAE,qBAAqB,CAAC,CAAC;QACzE,KAAK,CAAC,OAAO,CAAC,sBAAc,CAAC,QAAQ,EAAG,UAAU,CAAC,CAAC;QACpD,KAAK,GAAG,gBAAgB,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;QAE/C,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;YACR,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACrB,OAAO,CAAC,kBAAkB,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;QAC5C,CAAC;IACL,CAAC;IAAC,IAAI,CAAC,CAAC;QAEJ,KAAK,GAAG,iBAAiB,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IAC1D,CAAC;IAGD,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;QACR,OAAO,CAAC,OAAO,CAAC,qBAAS,CAAC,wBAAwB,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;IACrE,CAAC;IAED,MAAM,CAAC,KAAK,CAAC;AACjB,CAAC;AA7FD,8CA6FC;AAUD,0BAA0B,OAAgB,EAAE,UAAiC,EAAE,IAAa;IACxF,IAAM,SAAS,GAAG,EAAE,CAAC,wBAAwB,CAAC,IAAI,CAAC,CAAC;IAEpD,UAAU,CAAC,OAAO,CAAC,sBAAc,CAAC,QAAQ,EAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IACjE,UAAU,CAAC,OAAO,CAAC,sBAAc,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,SAAS,GAAG,EAAE,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC,CAAC;IACzF,UAAU,CAAC,OAAO,CAAC,sBAAc,CAAC,MAAM,EAAK,CAAC,CAAC,CAAC,SAAS,GAAG,EAAE,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC;IACtF,UAAU,CAAC,OAAO,CAAC,sBAAc,CAAC,QAAQ,EAAG,CAAC,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;IAExE,EAAE,CAAC,CACC,OAAO,CAAC,SAAS;QACjB,CAAC,IAAI,CAAC,MAAM,KAAK,OAAO,CAAC,aAAa,IAAI,UAAU,CAAC,KAAK,CAAC,qBAAqB,CACpF,CAAC,CAAC,CAAC;QACC,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC;YAC5B,UAAU,CAAC,aAAa,GAAG,+BAAmB,CAAC,OAAO,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;YAC3E,UAAU,CAAC,gBAAgB,EAAE,CAAC,OAAO,CAAC,UAAC,SAAS;gBAC5C,SAAS,CAAC,aAAa,GAAG,+BAAmB,CAAC,OAAO,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;YAC9E,CAAC,CAAC,CAAC;QACP,CAAC;IACL,CAAC;IAED,MAAM,CAAC,UAAU,CAAC;AACtB,CAAC;AAWD,2BAA2B,OAAgB,EAAE,UAAiC,EAAE,IAAa,EAAE,IAAoB;IAC/G,EAAE,CAAC,CAAC,UAAU,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC;QAC3B,IAAM,OAAO,GAAG,CAAC,sBAAc,CAAC,MAAM,EAAE,sBAAc,CAAC,IAAI,EAAE,sBAAc,CAAC,KAAK,CAAC,CAAC;QACnF,IAAM,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACzC,IAAM,eAAe,GAAG,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QACzD,EAAE,CAAC,CAAC,UAAU,GAAG,eAAe,CAAC,CAAC,CAAC;YAC/B,UAAU,CAAC,IAAI,GAAG,IAAI,CAAC;QAC3B,CAAC;IACL,CAAC;IAED,EAAE,CAAC,CACC,OAAO,CAAC,SAAS;QACjB,OAAO,CAAC,SAAS,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACjD,CAAC,IAAI,CAAC,MAAM,KAAK,OAAO,CAAC,aAAa,IAAI,UAAU,CAAC,KAAK,CAAC,qBAAqB,CACpF,CAAC,CAAC,CAAC;QACC,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC;YACzB,UAAU,CAAC,UAAU,GAAG,+BAAmB,CAAC,OAAO,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;YACxE,UAAU,CAAC,gBAAgB,EAAE,CAAC,OAAO,CAAC,UAAC,SAAS;gBAC5C,SAAS,CAAC,UAAU,GAAG,+BAAmB,CAAC,OAAO,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;YAC3E,CAAC,CAAC,CAAC;QACP,CAAC;QACD,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAED,MAAM,CAAC,UAAU,CAAC;AACtB,CAAC","sourcesContent":["import * as ts from 'typescript';\n\nimport {ReflectionKind, ReflectionFlag, ContainerReflection, DeclarationReflection} from '../../models/index';\nimport {Context} from '../context';\nimport {Converter} from '../converter';\nimport {createReferenceType} from './reference';\n\n/**\n * List of reflection kinds that never should be static.\n */\nconst nonStaticKinds = [\n ReflectionKind.Class,\n ReflectionKind.Interface,\n ReflectionKind.Module\n];\n\n/**\n * Create a declaration reflection from the given TypeScript node.\n *\n * @param context The context object describing the current state the converter is in. The\n * scope of the context will be the parent of the generated reflection.\n * @param node The TypeScript node that should be converted to a reflection.\n * @param kind The desired kind of the reflection.\n * @param name The desired name of the reflection.\n * @returns The resulting reflection.\n */\nexport function createDeclaration(context: Context, node: ts.Node, kind: ReflectionKind, name?: string): DeclarationReflection {\n const container = <ContainerReflection> context.scope;\n if (!(container instanceof ContainerReflection)) {\n throw new Error('Expected container reflection.');\n }\n\n // Ensure we have a name for the reflection\n if (!name) {\n if (node.localSymbol) {\n name = node.localSymbol.name;\n } else if (node.symbol) {\n name = node.symbol.name;\n } else {\n return null;\n }\n }\n\n const modifiers = ts.getCombinedModifierFlags(node);\n\n // Test whether the node is exported\n let isExported: boolean;\n if (container.kindOf([ReflectionKind.Module, ReflectionKind.ExternalModule])) {\n isExported = false; // Don't inherit exported state in modules and namespaces\n } else {\n isExported = container.flags.isExported;\n }\n\n if (kind === ReflectionKind.ExternalModule) {\n isExported = true; // Always mark external modules as exported\n } else if (node.parent && node.parent.kind === ts.SyntaxKind.VariableDeclarationList) {\n const parentModifiers = ts.getCombinedModifierFlags(node.parent.parent);\n isExported = isExported || !!(parentModifiers & ts.ModifierFlags.Export);\n } else {\n isExported = isExported || !!(modifiers & ts.ModifierFlags.Export);\n }\n\n if (!isExported && context.converter.excludeNotExported) {\n return null;\n }\n\n // Test whether the node is private, when inheriting ignore private members\n const isPrivate = !!(modifiers & ts.ModifierFlags.Private);\n if (context.isInherit && isPrivate) {\n return null;\n }\n\n // Test whether the node is static, when merging a module to a class make the node static\n let isConstructorProperty = false;\n let isStatic = false;\n if (nonStaticKinds.indexOf(kind) === -1) {\n isStatic = !!(modifiers & ts.ModifierFlags.Static);\n if (container.kind === ReflectionKind.Class) {\n if (node.parent && node.parent.kind === ts.SyntaxKind.Constructor) {\n isConstructorProperty = true;\n } else if (!node.parent || node.parent.kind !== ts.SyntaxKind.ClassDeclaration) {\n isStatic = true;\n }\n }\n }\n\n // Check if we already have a child with the same name and static flag\n let child: DeclarationReflection;\n const children = container.children = container.children || [];\n children.forEach((n: DeclarationReflection) => {\n if (n.name === name && n.flags.isStatic === isStatic) {\n child = n;\n }\n });\n\n if (!child) {\n // Child does not exist, create a new reflection\n child = new DeclarationReflection(container, name, kind);\n child.setFlag(ReflectionFlag.Static, isStatic);\n child.setFlag(ReflectionFlag.Private, isPrivate);\n child.setFlag(ReflectionFlag.ConstructorProperty, isConstructorProperty);\n child.setFlag(ReflectionFlag.Exported, isExported);\n child = setupDeclaration(context, child, node);\n\n if (child) {\n children.push(child);\n context.registerReflection(child, node);\n }\n } else {\n // Merge the existent reflection with the given node\n child = mergeDeclarations(context, child, node, kind);\n }\n\n // If we have a reflection, trigger the corresponding event\n if (child) {\n context.trigger(Converter.EVENT_CREATE_DECLARATION, child, node);\n }\n\n return child;\n}\n\n/**\n * Setup a newly created declaration reflection.\n *\n * @param context The context object describing the current state the converter is in.\n * @param reflection The newly created blank reflection.\n * @param node The TypeScript node whose properties should be applies to the given reflection.\n * @returns The reflection populated with the values of the given node.\n */\nfunction setupDeclaration(context: Context, reflection: DeclarationReflection, node: ts.Node) {\n const modifiers = ts.getCombinedModifierFlags(node);\n\n reflection.setFlag(ReflectionFlag.External, context.isExternal);\n reflection.setFlag(ReflectionFlag.Protected, !!(modifiers & ts.ModifierFlags.Protected));\n reflection.setFlag(ReflectionFlag.Public, !!(modifiers & ts.ModifierFlags.Public));\n reflection.setFlag(ReflectionFlag.Optional, !!(node['questionToken']));\n\n if (\n context.isInherit &&\n (node.parent === context.inheritParent || reflection.flags.isConstructorProperty)\n ) {\n if (!reflection.inheritedFrom) {\n reflection.inheritedFrom = createReferenceType(context, node.symbol, true);\n reflection.getAllSignatures().forEach((signature) => {\n signature.inheritedFrom = createReferenceType(context, node.symbol, true);\n });\n }\n }\n\n return reflection;\n}\n\n/**\n * Merge the properties of the given TypeScript node with the pre existent reflection.\n *\n * @param context The context object describing the current state the converter is in.\n * @param reflection The pre existent reflection.\n * @param node The TypeScript node whose properties should be merged with the given reflection.\n * @param kind The desired kind of the reflection.\n * @returns The reflection merged with the values of the given node or NULL if the merge is invalid.\n */\nfunction mergeDeclarations(context: Context, reflection: DeclarationReflection, node: ts.Node, kind: ReflectionKind) {\n if (reflection.kind !== kind) {\n const weights = [ReflectionKind.Module, ReflectionKind.Enum, ReflectionKind.Class];\n const kindWeight = weights.indexOf(kind);\n const childKindWeight = weights.indexOf(reflection.kind);\n if (kindWeight > childKindWeight) {\n reflection.kind = kind;\n }\n }\n\n if (\n context.isInherit &&\n context.inherited.indexOf(reflection.name) !== -1 &&\n (node.parent === context.inheritParent || reflection.flags.isConstructorProperty)\n ) {\n if (!reflection.overwrites) {\n reflection.overwrites = createReferenceType(context, node.symbol, true);\n reflection.getAllSignatures().forEach((signature) => {\n signature.overwrites = createReferenceType(context, node.symbol, true);\n });\n }\n return null;\n }\n\n return reflection;\n}\n"]} \ No newline at end of file
+{"version":3,"file":"declaration.js","sourceRoot":"","sources":["../../../../src/lib/converter/factories/declaration.ts"],"names":[],"mappings":";;AAAA,+BAAiC;AAEjC,4CAAgH;AAEhH,0CAAyC;AACzC,yCAAkD;AAKlD,IAAM,cAAc,GAAG;IACnB,sBAAc,CAAC,KAAK;IACpB,sBAAc,CAAC,SAAS;IACxB,sBAAc,CAAC,MAAM;CACxB,CAAC;AAYF,2BAAkC,OAAgB,EAAE,IAAa,EAAE,IAAoB,EAAE,IAAa;IAClG,IAAM,SAAS,GAAyB,OAAO,CAAC,KAAK,CAAC;IACtD,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,YAAY,2BAAmB,CAAC,CAAC,CAAC,CAAC;QAC9C,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;IACtD,CAAC;IAGD,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;QACR,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;YACnB,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;QACjC,CAAC;QAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;YACrB,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;QAC5B,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,MAAM,CAAC,IAAI,CAAC;QAChB,CAAC;IACL,CAAC;IAED,IAAM,SAAS,GAAG,EAAE,CAAC,wBAAwB,CAAC,IAAI,CAAC,CAAC;IAGpD,IAAI,UAAmB,CAAC;IACxB,EAAE,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,sBAAc,CAAC,MAAM,EAAE,sBAAc,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC;QAC3E,UAAU,GAAG,KAAK,CAAC;IACvB,CAAC;IAAC,IAAI,CAAC,CAAC;QACJ,UAAU,GAAG,SAAS,CAAC,KAAK,CAAC,UAAU,CAAC;IAC5C,CAAC;IAED,EAAE,CAAC,CAAC,IAAI,KAAK,sBAAc,CAAC,cAAc,CAAC,CAAC,CAAC;QACzC,UAAU,GAAG,IAAI,CAAC;IACtB,CAAC;IAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,uBAAuB,CAAC,CAAC,CAAC;QACnF,IAAM,eAAe,GAAG,EAAE,CAAC,wBAAwB,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QACxE,UAAU,GAAG,UAAU,IAAI,CAAC,CAAC,CAAC,eAAe,GAAG,EAAE,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;IAC7E,CAAC;IAAC,IAAI,CAAC,CAAC;QACJ,UAAU,GAAG,UAAU,IAAI,CAAC,CAAC,CAAC,SAAS,GAAG,EAAE,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;IACvE,CAAC;IAED,EAAE,CAAC,CAAC,CAAC,UAAU,IAAI,OAAO,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAC,CAAC;QACtD,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAGD,IAAM,SAAS,GAAG,CAAC,CAAC,CAAC,SAAS,GAAG,EAAE,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IAC3D,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,IAAI,SAAS,CAAC,CAAC,CAAC;QACjC,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAGD,IAAI,qBAAqB,GAAG,KAAK,CAAC;IAClC,IAAI,QAAQ,GAAG,KAAK,CAAC;IACrB,EAAE,CAAC,CAAC,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QACtC,QAAQ,GAAG,CAAC,CAAC,CAAC,SAAS,GAAG,EAAE,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;QACnD,EAAE,CAAC,CAAC,SAAS,CAAC,IAAI,KAAK,sBAAc,CAAC,KAAK,CAAC,CAAC,CAAC;YAC1C,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC;gBAChE,qBAAqB,GAAG,IAAI,CAAC;YACjC,CAAC;YAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC,CAAC;gBAC7E,QAAQ,GAAG,IAAI,CAAC;YACpB,CAAC;QACL,CAAC;IACL,CAAC;IAGD,IAAI,KAA4B,CAAC;IACjC,IAAM,QAAQ,GAAG,SAAS,CAAC,QAAQ,GAAG,SAAS,CAAC,QAAQ,IAAI,EAAE,CAAC;IAC/D,QAAQ,CAAC,OAAO,CAAC,UAAC,CAAwB;QACtC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,IAAI,IAAI,CAAC,CAAC,KAAK,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC;YACnD,KAAK,GAAG,CAAC,CAAC;QACd,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;QAET,KAAK,GAAG,IAAI,6BAAqB,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QACzD,KAAK,CAAC,OAAO,CAAC,sBAAc,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QAC/C,KAAK,CAAC,OAAO,CAAC,sBAAc,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QACjD,KAAK,CAAC,OAAO,CAAC,sBAAc,CAAC,mBAAmB,EAAE,qBAAqB,CAAC,CAAC;QACzE,KAAK,CAAC,OAAO,CAAC,sBAAc,CAAC,QAAQ,EAAG,UAAU,CAAC,CAAC;QACpD,KAAK,GAAG,gBAAgB,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;QAE/C,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;YACR,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACrB,OAAO,CAAC,kBAAkB,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;QAC5C,CAAC;IACL,CAAC;IAAC,IAAI,CAAC,CAAC;QAEJ,KAAK,GAAG,iBAAiB,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IAC1D,CAAC;IAGD,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;QACR,OAAO,CAAC,OAAO,CAAC,qBAAS,CAAC,wBAAwB,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;IACrE,CAAC;IAED,MAAM,CAAC,KAAK,CAAC;AACjB,CAAC;AA7FD,8CA6FC;AAUD,0BAA0B,OAAgB,EAAE,UAAiC,EAAE,IAAa;IACxF,IAAM,SAAS,GAAG,EAAE,CAAC,wBAAwB,CAAC,IAAI,CAAC,CAAC;IAEpD,UAAU,CAAC,OAAO,CAAC,sBAAc,CAAC,QAAQ,EAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IACjE,UAAU,CAAC,OAAO,CAAC,sBAAc,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,SAAS,GAAG,EAAE,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC,CAAC;IACzF,UAAU,CAAC,OAAO,CAAC,sBAAc,CAAC,MAAM,EAAK,CAAC,CAAC,CAAC,SAAS,GAAG,EAAE,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC;IACtF,UAAU,CAAC,OAAO,CAAC,sBAAc,CAAC,QAAQ,EAAG,CAAC,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;IAExE,EAAE,CAAC,CACC,OAAO,CAAC,SAAS;QACjB,CAAC,IAAI,CAAC,MAAM,KAAK,OAAO,CAAC,aAAa,IAAI,UAAU,CAAC,KAAK,CAAC,qBAAqB,CACpF,CAAC,CAAC,CAAC;QACC,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC;YAC5B,UAAU,CAAC,aAAa,GAAG,+BAAmB,CAAC,OAAO,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;YAC3E,UAAU,CAAC,gBAAgB,EAAE,CAAC,OAAO,CAAC,UAAC,SAAS;gBAC5C,SAAS,CAAC,aAAa,GAAG,+BAAmB,CAAC,OAAO,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;YAC9E,CAAC,CAAC,CAAC;QACP,CAAC;IACL,CAAC;IAED,MAAM,CAAC,UAAU,CAAC;AACtB,CAAC;AAWD,2BAA2B,OAAgB,EAAE,UAAiC,EAAE,IAAa,EAAE,IAAoB;IAC/G,EAAE,CAAC,CAAC,UAAU,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC;QAC3B,IAAM,OAAO,GAAG,CAAC,sBAAc,CAAC,MAAM,EAAE,sBAAc,CAAC,IAAI,EAAE,sBAAc,CAAC,KAAK,CAAC,CAAC;QACnF,IAAM,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACzC,IAAM,eAAe,GAAG,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QACzD,EAAE,CAAC,CAAC,UAAU,GAAG,eAAe,CAAC,CAAC,CAAC;YAC/B,UAAU,CAAC,IAAI,GAAG,IAAI,CAAC;QAC3B,CAAC;IACL,CAAC;IAED,EAAE,CAAC,CACC,OAAO,CAAC,SAAS;QACjB,OAAO,CAAC,SAAS,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACjD,CAAC,IAAI,CAAC,MAAM,KAAK,OAAO,CAAC,aAAa,IAAI,UAAU,CAAC,KAAK,CAAC,qBAAqB,CACpF,CAAC,CAAC,CAAC;QACC,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC;YACzB,UAAU,CAAC,UAAU,GAAG,+BAAmB,CAAC,OAAO,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;YACxE,UAAU,CAAC,gBAAgB,EAAE,CAAC,OAAO,CAAC,UAAC,SAAS;gBAC5C,SAAS,CAAC,UAAU,GAAG,+BAAmB,CAAC,OAAO,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;YAC3E,CAAC,CAAC,CAAC;QACP,CAAC;QACD,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAED,MAAM,CAAC,UAAU,CAAC;AACtB,CAAC","sourcesContent":["import * as ts from 'typescript';\n\nimport { ReflectionKind, ReflectionFlag, ContainerReflection, DeclarationReflection } from '../../models/index';\nimport { Context } from '../context';\nimport { Converter } from '../converter';\nimport { createReferenceType } from './reference';\n\n/**\n * List of reflection kinds that never should be static.\n */\nconst nonStaticKinds = [\n ReflectionKind.Class,\n ReflectionKind.Interface,\n ReflectionKind.Module\n];\n\n/**\n * Create a declaration reflection from the given TypeScript node.\n *\n * @param context The context object describing the current state the converter is in. The\n * scope of the context will be the parent of the generated reflection.\n * @param node The TypeScript node that should be converted to a reflection.\n * @param kind The desired kind of the reflection.\n * @param name The desired name of the reflection.\n * @returns The resulting reflection.\n */\nexport function createDeclaration(context: Context, node: ts.Node, kind: ReflectionKind, name?: string): DeclarationReflection {\n const container = <ContainerReflection> context.scope;\n if (!(container instanceof ContainerReflection)) {\n throw new Error('Expected container reflection.');\n }\n\n // Ensure we have a name for the reflection\n if (!name) {\n if (node.localSymbol) {\n name = node.localSymbol.name;\n } else if (node.symbol) {\n name = node.symbol.name;\n } else {\n return null;\n }\n }\n\n const modifiers = ts.getCombinedModifierFlags(node);\n\n // Test whether the node is exported\n let isExported: boolean;\n if (container.kindOf([ReflectionKind.Module, ReflectionKind.ExternalModule])) {\n isExported = false; // Don't inherit exported state in modules and namespaces\n } else {\n isExported = container.flags.isExported;\n }\n\n if (kind === ReflectionKind.ExternalModule) {\n isExported = true; // Always mark external modules as exported\n } else if (node.parent && node.parent.kind === ts.SyntaxKind.VariableDeclarationList) {\n const parentModifiers = ts.getCombinedModifierFlags(node.parent.parent);\n isExported = isExported || !!(parentModifiers & ts.ModifierFlags.Export);\n } else {\n isExported = isExported || !!(modifiers & ts.ModifierFlags.Export);\n }\n\n if (!isExported && context.converter.excludeNotExported) {\n return null;\n }\n\n // Test whether the node is private, when inheriting ignore private members\n const isPrivate = !!(modifiers & ts.ModifierFlags.Private);\n if (context.isInherit && isPrivate) {\n return null;\n }\n\n // Test whether the node is static, when merging a module to a class make the node static\n let isConstructorProperty = false;\n let isStatic = false;\n if (nonStaticKinds.indexOf(kind) === -1) {\n isStatic = !!(modifiers & ts.ModifierFlags.Static);\n if (container.kind === ReflectionKind.Class) {\n if (node.parent && node.parent.kind === ts.SyntaxKind.Constructor) {\n isConstructorProperty = true;\n } else if (!node.parent || node.parent.kind !== ts.SyntaxKind.ClassDeclaration) {\n isStatic = true;\n }\n }\n }\n\n // Check if we already have a child with the same name and static flag\n let child: DeclarationReflection;\n const children = container.children = container.children || [];\n children.forEach((n: DeclarationReflection) => {\n if (n.name === name && n.flags.isStatic === isStatic) {\n child = n;\n }\n });\n\n if (!child) {\n // Child does not exist, create a new reflection\n child = new DeclarationReflection(container, name, kind);\n child.setFlag(ReflectionFlag.Static, isStatic);\n child.setFlag(ReflectionFlag.Private, isPrivate);\n child.setFlag(ReflectionFlag.ConstructorProperty, isConstructorProperty);\n child.setFlag(ReflectionFlag.Exported, isExported);\n child = setupDeclaration(context, child, node);\n\n if (child) {\n children.push(child);\n context.registerReflection(child, node);\n }\n } else {\n // Merge the existent reflection with the given node\n child = mergeDeclarations(context, child, node, kind);\n }\n\n // If we have a reflection, trigger the corresponding event\n if (child) {\n context.trigger(Converter.EVENT_CREATE_DECLARATION, child, node);\n }\n\n return child;\n}\n\n/**\n * Setup a newly created declaration reflection.\n *\n * @param context The context object describing the current state the converter is in.\n * @param reflection The newly created blank reflection.\n * @param node The TypeScript node whose properties should be applies to the given reflection.\n * @returns The reflection populated with the values of the given node.\n */\nfunction setupDeclaration(context: Context, reflection: DeclarationReflection, node: ts.Node) {\n const modifiers = ts.getCombinedModifierFlags(node);\n\n reflection.setFlag(ReflectionFlag.External, context.isExternal);\n reflection.setFlag(ReflectionFlag.Protected, !!(modifiers & ts.ModifierFlags.Protected));\n reflection.setFlag(ReflectionFlag.Public, !!(modifiers & ts.ModifierFlags.Public));\n reflection.setFlag(ReflectionFlag.Optional, !!(node['questionToken']));\n\n if (\n context.isInherit &&\n (node.parent === context.inheritParent || reflection.flags.isConstructorProperty)\n ) {\n if (!reflection.inheritedFrom) {\n reflection.inheritedFrom = createReferenceType(context, node.symbol, true);\n reflection.getAllSignatures().forEach((signature) => {\n signature.inheritedFrom = createReferenceType(context, node.symbol, true);\n });\n }\n }\n\n return reflection;\n}\n\n/**\n * Merge the properties of the given TypeScript node with the pre existent reflection.\n *\n * @param context The context object describing the current state the converter is in.\n * @param reflection The pre existent reflection.\n * @param node The TypeScript node whose properties should be merged with the given reflection.\n * @param kind The desired kind of the reflection.\n * @returns The reflection merged with the values of the given node or NULL if the merge is invalid.\n */\nfunction mergeDeclarations(context: Context, reflection: DeclarationReflection, node: ts.Node, kind: ReflectionKind) {\n if (reflection.kind !== kind) {\n const weights = [ReflectionKind.Module, ReflectionKind.Enum, ReflectionKind.Class];\n const kindWeight = weights.indexOf(kind);\n const childKindWeight = weights.indexOf(reflection.kind);\n if (kindWeight > childKindWeight) {\n reflection.kind = kind;\n }\n }\n\n if (\n context.isInherit &&\n context.inherited.indexOf(reflection.name) !== -1 &&\n (node.parent === context.inheritParent || reflection.flags.isConstructorProperty)\n ) {\n if (!reflection.overwrites) {\n reflection.overwrites = createReferenceType(context, node.symbol, true);\n reflection.getAllSignatures().forEach((signature) => {\n signature.overwrites = createReferenceType(context, node.symbol, true);\n });\n }\n return null;\n }\n\n return reflection;\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/factories/index.js.map b/node_modules/typedoc/dist/lib/converter/factories/index.js.map
index 7691a481a..852eaa553 100644
--- a/node_modules/typedoc/dist/lib/converter/factories/index.js.map
+++ b/node_modules/typedoc/dist/lib/converter/factories/index.js.map
@@ -1 +1 @@
-{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/converter/factories/index.ts"],"names":[],"mappings":";;AAAA,qCAAwC;AAAhC,kCAAA,aAAa,CAAA;AACrB,6CAAgD;AAAxC,0CAAA,iBAAiB,CAAA;AACzB,yCAA4C;AAApC,sCAAA,eAAe,CAAA;AACvB,yCAAgD;AAAxC,0CAAA,mBAAmB,CAAA;AAC3B,yCAA4C;AAApC,sCAAA,eAAe,CAAA;AACvB,mDAAqD;AAA7C,+CAAA,mBAAmB,CAAA","sourcesContent":["export {createComment} from './comment';\nexport {createDeclaration} from './declaration';\nexport {createParameter} from './parameter';\nexport {createReferenceType} from './reference';\nexport {createSignature} from './signature';\nexport {createTypeParameter} from './type-parameter';\n"]} \ No newline at end of file
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/converter/factories/index.ts"],"names":[],"mappings":";;AAAA,qCAA0C;AAAjC,kCAAA,aAAa,CAAA;AACtB,6CAAkD;AAAzC,0CAAA,iBAAiB,CAAA;AAC1B,yCAA8C;AAArC,sCAAA,eAAe,CAAA;AACxB,yCAAkD;AAAzC,0CAAA,mBAAmB,CAAA;AAC5B,yCAA8C;AAArC,sCAAA,eAAe,CAAA;AACxB,mDAAuD;AAA9C,+CAAA,mBAAmB,CAAA","sourcesContent":["export { createComment } from './comment';\nexport { createDeclaration } from './declaration';\nexport { createParameter } from './parameter';\nexport { createReferenceType } from './reference';\nexport { createSignature } from './signature';\nexport { createTypeParameter } from './type-parameter';\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/factories/parameter.js.map b/node_modules/typedoc/dist/lib/converter/factories/parameter.js.map
index c35695209..f8b1b5e2b 100644
--- a/node_modules/typedoc/dist/lib/converter/factories/parameter.js.map
+++ b/node_modules/typedoc/dist/lib/converter/factories/parameter.js.map
@@ -1 +1 @@
-{"version":3,"file":"parameter.js","sourceRoot":"","sources":["../../../../src/lib/converter/factories/parameter.ts"],"names":[],"mappings":";;AACA,uCAAyC;AAEzC,wDAAwH;AAExH,0CAAuC;AACvC,4DAA0D;AAS1D,yBAAgC,OAAgB,EAAE,IAA6B;IAC3E,IAAM,SAAS,GAAyB,OAAO,CAAC,KAAK,CAAC;IACtD,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,YAAY,2BAAmB,CAAC,CAAC,CAAC,CAAC;QAC9C,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;IACtD,CAAC;IAED,IAAM,SAAS,GAAG,IAAI,2BAAmB,CAAC,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,sBAAc,CAAC,SAAS,CAAC,CAAC;IACjG,OAAO,CAAC,kBAAkB,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IAC5C,OAAO,CAAC,SAAS,CAAC,SAAS,EAAE;QACzB,EAAE,CAAC,CAAC,GAAG,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAClC,SAAS,CAAC,IAAI,GAAG,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;YACnE,SAAS,CAAC,IAAI,GAAG,mBAAmB,CAAC;QACzC,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,SAAS,CAAC,IAAI,GAAG,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC;QACxG,CAAC;QAED,SAAS,CAAC,YAAY,GAAG,wCAAmB,CAAC,IAAI,CAAC,CAAC;QACnD,SAAS,CAAC,OAAO,CAAC,sBAAc,CAAC,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QACjE,SAAS,CAAC,OAAO,CAAC,sBAAc,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAC9D,SAAS,CAAC,OAAO,CAAC,sBAAc,CAAC,YAAY,EAAE,CAAC,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;QAEzE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC;YACxB,SAAS,CAAC,UAAU,GAAG,EAAE,CAAC;QAC9B,CAAC;QACD,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACzC,CAAC,CAAC,CAAC;IAEH,OAAO,CAAC,OAAO,CAAC,qBAAS,CAAC,sBAAsB,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC;IACnE,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC;AA7BD,0CA6BC","sourcesContent":["import * as ts from 'typescript';\nimport * as _ts from '../../ts-internal';\n\nimport {ReflectionFlag, ReflectionKind, ParameterReflection, SignatureReflection} from '../../models/reflections/index';\nimport {Context} from '../context';\nimport {Converter} from '../converter';\nimport {convertDefaultValue} from '../convert-expression';\n\n/**\n * Create a parameter reflection for the given node.\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The parameter node that should be reflected.\n * @returns The newly created parameter reflection.\n */\nexport function createParameter(context: Context, node: ts.ParameterDeclaration): ParameterReflection {\n const signature = <SignatureReflection> context.scope;\n if (!(signature instanceof SignatureReflection)) {\n throw new Error('Expected signature reflection.');\n }\n\n const parameter = new ParameterReflection(signature, node.symbol.name, ReflectionKind.Parameter);\n context.registerReflection(parameter, node);\n context.withScope(parameter, () => {\n if (_ts.isBindingPattern(node.name)) {\n parameter.type = context.converter.convertType(context, node.name);\n parameter.name = '__namedParameters';\n } else {\n parameter.type = context.converter.convertType(context, node.type, context.getTypeAtLocation(node));\n }\n\n parameter.defaultValue = convertDefaultValue(node);\n parameter.setFlag(ReflectionFlag.Optional, !!node.questionToken);\n parameter.setFlag(ReflectionFlag.Rest, !!node.dotDotDotToken);\n parameter.setFlag(ReflectionFlag.DefaultValue, !!parameter.defaultValue);\n\n if (!signature.parameters) {\n signature.parameters = [];\n }\n signature.parameters.push(parameter);\n });\n\n context.trigger(Converter.EVENT_CREATE_PARAMETER, parameter, node);\n return parameter;\n}\n"]} \ No newline at end of file
+{"version":3,"file":"parameter.js","sourceRoot":"","sources":["../../../../src/lib/converter/factories/parameter.ts"],"names":[],"mappings":";;AACA,uCAAyC;AAEzC,wDAA0H;AAE1H,0CAAyC;AACzC,4DAA4D;AAS5D,yBAAgC,OAAgB,EAAE,IAA6B;IAC3E,IAAM,SAAS,GAAyB,OAAO,CAAC,KAAK,CAAC;IACtD,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,YAAY,2BAAmB,CAAC,CAAC,CAAC,CAAC;QAC9C,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;IACtD,CAAC;IAED,IAAM,SAAS,GAAG,IAAI,2BAAmB,CAAC,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,sBAAc,CAAC,SAAS,CAAC,CAAC;IACjG,OAAO,CAAC,kBAAkB,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IAC5C,OAAO,CAAC,SAAS,CAAC,SAAS,EAAE;QACzB,EAAE,CAAC,CAAC,GAAG,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAClC,SAAS,CAAC,IAAI,GAAG,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;YACnE,SAAS,CAAC,IAAI,GAAG,mBAAmB,CAAC;QACzC,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,SAAS,CAAC,IAAI,GAAG,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC;QACxG,CAAC;QAED,SAAS,CAAC,YAAY,GAAG,wCAAmB,CAAC,IAAI,CAAC,CAAC;QACnD,SAAS,CAAC,OAAO,CAAC,sBAAc,CAAC,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QACjE,SAAS,CAAC,OAAO,CAAC,sBAAc,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAC9D,SAAS,CAAC,OAAO,CAAC,sBAAc,CAAC,YAAY,EAAE,CAAC,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;QAEzE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC;YACxB,SAAS,CAAC,UAAU,GAAG,EAAE,CAAC;QAC9B,CAAC;QACD,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACzC,CAAC,CAAC,CAAC;IAEH,OAAO,CAAC,OAAO,CAAC,qBAAS,CAAC,sBAAsB,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC;IACnE,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC;AA7BD,0CA6BC","sourcesContent":["import * as ts from 'typescript';\nimport * as _ts from '../../ts-internal';\n\nimport { ReflectionFlag, ReflectionKind, ParameterReflection, SignatureReflection } from '../../models/reflections/index';\nimport { Context } from '../context';\nimport { Converter } from '../converter';\nimport { convertDefaultValue } from '../convert-expression';\n\n/**\n * Create a parameter reflection for the given node.\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The parameter node that should be reflected.\n * @returns The newly created parameter reflection.\n */\nexport function createParameter(context: Context, node: ts.ParameterDeclaration): ParameterReflection {\n const signature = <SignatureReflection> context.scope;\n if (!(signature instanceof SignatureReflection)) {\n throw new Error('Expected signature reflection.');\n }\n\n const parameter = new ParameterReflection(signature, node.symbol.name, ReflectionKind.Parameter);\n context.registerReflection(parameter, node);\n context.withScope(parameter, () => {\n if (_ts.isBindingPattern(node.name)) {\n parameter.type = context.converter.convertType(context, node.name);\n parameter.name = '__namedParameters';\n } else {\n parameter.type = context.converter.convertType(context, node.type, context.getTypeAtLocation(node));\n }\n\n parameter.defaultValue = convertDefaultValue(node);\n parameter.setFlag(ReflectionFlag.Optional, !!node.questionToken);\n parameter.setFlag(ReflectionFlag.Rest, !!node.dotDotDotToken);\n parameter.setFlag(ReflectionFlag.DefaultValue, !!parameter.defaultValue);\n\n if (!signature.parameters) {\n signature.parameters = [];\n }\n signature.parameters.push(parameter);\n });\n\n context.trigger(Converter.EVENT_CREATE_PARAMETER, parameter, node);\n return parameter;\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/factories/reference.js.map b/node_modules/typedoc/dist/lib/converter/factories/reference.js.map
index d5362ed68..c3a8d43ef 100644
--- a/node_modules/typedoc/dist/lib/converter/factories/reference.js.map
+++ b/node_modules/typedoc/dist/lib/converter/factories/reference.js.map
@@ -1 +1 @@
-{"version":3,"file":"reference.js","sourceRoot":"","sources":["../../../../src/lib/converter/factories/reference.ts"],"names":[],"mappings":";;AAEA,kDAAuD;AAWvD,6BAAoC,OAAgB,EAAE,MAAiB,EAAE,aAAuB;IAC5F,IAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAChC,IAAM,EAAE,GAAQ,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IAC5C,IAAI,IAAI,GAAM,OAAO,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;IAE7C,EAAE,CAAC,CAAC,aAAa,IAAI,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;QACjC,IAAI,GAAG,OAAO,CAAC,cAAc,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC;IAC9D,CAAC;IAED,MAAM,CAAC,IAAI,qBAAa,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;AACvC,CAAC;AAVD,kDAUC","sourcesContent":["import * as ts from 'typescript';\n\nimport {ReferenceType} from '../../models/types/index';\nimport {Context} from '../context';\n\n/**\n * Create a new reference type pointing to the given symbol.\n *\n * @param context The context object describing the current state the converter is in.\n * @param symbol The symbol the reference type should point to.\n * @param includeParent Should the name of the parent be provided within the fallback name?\n * @returns A new reference type instance pointing to the given symbol.\n */\nexport function createReferenceType(context: Context, symbol: ts.Symbol, includeParent?: boolean): ReferenceType {\n const checker = context.checker;\n const id = context.getSymbolID(symbol);\n let name = checker.symbolToString(symbol);\n\n if (includeParent && symbol.parent) {\n name = checker.symbolToString(symbol.parent) + '.' + name;\n }\n\n return new ReferenceType(name, id);\n}\n"]} \ No newline at end of file
+{"version":3,"file":"reference.js","sourceRoot":"","sources":["../../../../src/lib/converter/factories/reference.ts"],"names":[],"mappings":";;AAEA,kDAAyD;AAWzD,6BAAoC,OAAgB,EAAE,MAAiB,EAAE,aAAuB;IAC5F,IAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAChC,IAAM,EAAE,GAAQ,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IAC5C,IAAI,IAAI,GAAM,OAAO,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;IAE7C,EAAE,CAAC,CAAC,aAAa,IAAI,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;QACjC,IAAI,GAAG,OAAO,CAAC,cAAc,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC;IAC9D,CAAC;IAED,MAAM,CAAC,IAAI,qBAAa,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;AACvC,CAAC;AAVD,kDAUC","sourcesContent":["import * as ts from 'typescript';\n\nimport { ReferenceType } from '../../models/types/index';\nimport { Context } from '../context';\n\n/**\n * Create a new reference type pointing to the given symbol.\n *\n * @param context The context object describing the current state the converter is in.\n * @param symbol The symbol the reference type should point to.\n * @param includeParent Should the name of the parent be provided within the fallback name?\n * @returns A new reference type instance pointing to the given symbol.\n */\nexport function createReferenceType(context: Context, symbol: ts.Symbol, includeParent?: boolean): ReferenceType {\n const checker = context.checker;\n const id = context.getSymbolID(symbol);\n let name = checker.symbolToString(symbol);\n\n if (includeParent && symbol.parent) {\n name = checker.symbolToString(symbol.parent) + '.' + name;\n }\n\n return new ReferenceType(name, id);\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/factories/signature.js.map b/node_modules/typedoc/dist/lib/converter/factories/signature.js.map
index 279cb99d3..ea32f1b27 100644
--- a/node_modules/typedoc/dist/lib/converter/factories/signature.js.map
+++ b/node_modules/typedoc/dist/lib/converter/factories/signature.js.map
@@ -1 +1 @@
-{"version":3,"file":"signature.js","sourceRoot":"","sources":["../../../../src/lib/converter/factories/signature.ts"],"names":[],"mappings":";;AAAA,+BAAiC;AAEjC,4CAAyH;AAEzH,0CAAuC;AACvC,yCAA4C;AAC5C,yCAAgD;AAWhD,yBAAgC,OAAgB,EAAE,IAA6B,EAAE,IAAY,EAAE,IAAoB;IAC/G,IAAM,SAAS,GAA2B,OAAO,CAAC,KAAK,CAAC;IACxD,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,YAAY,2BAAmB,CAAC,CAAC,CAAC,CAAC;QAC9C,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;IACtD,CAAC;IAED,IAAM,SAAS,GAAG,IAAI,2BAAmB,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IACjE,OAAO,CAAC,kBAAkB,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IAC5C,OAAO,CAAC,SAAS,CAAC,SAAS,EAAE,IAAI,CAAC,cAAc,EAAE,IAAI,EAAE;QACpD,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,UAAC,SAAkC;YACvD,2BAAe,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QACxC,CAAC,CAAC,CAAC;QAEH,SAAS,CAAC,IAAI,GAAG,oBAAoB,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QAErD,EAAE,CAAC,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC;YAC1B,SAAS,CAAC,aAAa,GAAG,+BAAmB,CAAC,OAAO,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QAC9E,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,CAAC,OAAO,CAAC,qBAAS,CAAC,sBAAsB,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC;IACnE,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC;AAtBD,0CAsBC;AASD,8BAA8B,OAAgB,EAAE,IAA6B;IACzE,IAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAChC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC,UAAU,CAAC,aAAa,IAAI,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC,CAAC;QACtF,IAAI,CAAC;YACD,IAAM,SAAS,GAAG,OAAO,CAAC,2BAA2B,CAAC,IAAI,CAAC,CAAC;YAC5D,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,wBAAwB,CAAC,SAAS,CAAC,CAAC,CAAC;QAC1G,CAAC;QAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA,CAAC;IACtB,CAAC;IAED,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QACZ,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IAC7D,CAAC;IAAC,IAAI,CAAC,CAAC;QACJ,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IACxD,CAAC;AACL,CAAC","sourcesContent":["import * as ts from 'typescript';\n\nimport {ReflectionKind, SignatureReflection, ContainerReflection, DeclarationReflection, Type} from '../../models/index';\nimport {Context} from '../context';\nimport {Converter} from '../converter';\nimport {createParameter} from './parameter';\nimport {createReferenceType} from './reference';\n\n/**\n * Create a new signature reflection from the given node.\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The TypeScript node containing the signature declaration that should be reflected.\n * @param name The name of the function or method this signature belongs to.\n * @param kind The desired kind of the reflection.\n * @returns The newly created signature reflection describing the given node.\n */\nexport function createSignature(context: Context, node: ts.SignatureDeclaration, name: string, kind: ReflectionKind): SignatureReflection {\n const container = <DeclarationReflection> context.scope;\n if (!(container instanceof ContainerReflection)) {\n throw new Error('Expected container reflection.');\n }\n\n const signature = new SignatureReflection(container, name, kind);\n context.registerReflection(signature, node);\n context.withScope(signature, node.typeParameters, true, () => {\n node.parameters.forEach((parameter: ts.ParameterDeclaration) => {\n createParameter(context, parameter);\n });\n\n signature.type = extractSignatureType(context, node);\n\n if (container.inheritedFrom) {\n signature.inheritedFrom = createReferenceType(context, node.symbol, true);\n }\n });\n\n context.trigger(Converter.EVENT_CREATE_SIGNATURE, signature, node);\n return signature;\n}\n\n/**\n * Extract the return type of the given signature declaration.\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The signature declaration whose return type should be determined.\n * @returns The return type reflection of the given signature.\n */\nfunction extractSignatureType(context: Context, node: ts.SignatureDeclaration): Type {\n const checker = context.checker;\n if (node.kind & ts.SyntaxKind.CallSignature || node.kind & ts.SyntaxKind.CallExpression) {\n try {\n const signature = checker.getSignatureFromDeclaration(node);\n return context.converter.convertType(context, node.type, checker.getReturnTypeOfSignature(signature));\n } catch (error) {}\n }\n\n if (node.type) {\n return context.converter.convertType(context, node.type);\n } else {\n return context.converter.convertType(context, node);\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"signature.js","sourceRoot":"","sources":["../../../../src/lib/converter/factories/signature.ts"],"names":[],"mappings":";;AAAA,+BAAiC;AAEjC,4CAA2H;AAE3H,0CAAyC;AACzC,yCAA8C;AAC9C,yCAAkD;AAWlD,yBAAgC,OAAgB,EAAE,IAA6B,EAAE,IAAY,EAAE,IAAoB;IAC/G,IAAM,SAAS,GAA2B,OAAO,CAAC,KAAK,CAAC;IACxD,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,YAAY,2BAAmB,CAAC,CAAC,CAAC,CAAC;QAC9C,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;IACtD,CAAC;IAED,IAAM,SAAS,GAAG,IAAI,2BAAmB,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IACjE,OAAO,CAAC,kBAAkB,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IAC5C,OAAO,CAAC,SAAS,CAAC,SAAS,EAAE,IAAI,CAAC,cAAc,EAAE,IAAI,EAAE;QACpD,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,UAAC,SAAkC;YACvD,2BAAe,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QACxC,CAAC,CAAC,CAAC;QAEH,SAAS,CAAC,IAAI,GAAG,oBAAoB,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QAErD,EAAE,CAAC,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC;YAC1B,SAAS,CAAC,aAAa,GAAG,+BAAmB,CAAC,OAAO,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QAC9E,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,CAAC,OAAO,CAAC,qBAAS,CAAC,sBAAsB,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC;IACnE,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC;AAtBD,0CAsBC;AASD,8BAA8B,OAAgB,EAAE,IAA6B;IACzE,IAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAChC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC,UAAU,CAAC,aAAa,IAAI,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC,CAAC;QACtF,IAAI,CAAC;YACD,IAAM,SAAS,GAAG,OAAO,CAAC,2BAA2B,CAAC,IAAI,CAAC,CAAC;YAC5D,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,wBAAwB,CAAC,SAAS,CAAC,CAAC,CAAC;QAC1G,CAAC;QAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA,CAAC;IACtB,CAAC;IAED,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QACZ,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IAC7D,CAAC;IAAC,IAAI,CAAC,CAAC;QACJ,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IACxD,CAAC;AACL,CAAC","sourcesContent":["import * as ts from 'typescript';\n\nimport { ReflectionKind, SignatureReflection, ContainerReflection, DeclarationReflection, Type } from '../../models/index';\nimport { Context } from '../context';\nimport { Converter } from '../converter';\nimport { createParameter } from './parameter';\nimport { createReferenceType } from './reference';\n\n/**\n * Create a new signature reflection from the given node.\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The TypeScript node containing the signature declaration that should be reflected.\n * @param name The name of the function or method this signature belongs to.\n * @param kind The desired kind of the reflection.\n * @returns The newly created signature reflection describing the given node.\n */\nexport function createSignature(context: Context, node: ts.SignatureDeclaration, name: string, kind: ReflectionKind): SignatureReflection {\n const container = <DeclarationReflection> context.scope;\n if (!(container instanceof ContainerReflection)) {\n throw new Error('Expected container reflection.');\n }\n\n const signature = new SignatureReflection(container, name, kind);\n context.registerReflection(signature, node);\n context.withScope(signature, node.typeParameters, true, () => {\n node.parameters.forEach((parameter: ts.ParameterDeclaration) => {\n createParameter(context, parameter);\n });\n\n signature.type = extractSignatureType(context, node);\n\n if (container.inheritedFrom) {\n signature.inheritedFrom = createReferenceType(context, node.symbol, true);\n }\n });\n\n context.trigger(Converter.EVENT_CREATE_SIGNATURE, signature, node);\n return signature;\n}\n\n/**\n * Extract the return type of the given signature declaration.\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The signature declaration whose return type should be determined.\n * @returns The return type reflection of the given signature.\n */\nfunction extractSignatureType(context: Context, node: ts.SignatureDeclaration): Type {\n const checker = context.checker;\n if (node.kind & ts.SyntaxKind.CallSignature || node.kind & ts.SyntaxKind.CallExpression) {\n try {\n const signature = checker.getSignatureFromDeclaration(node);\n return context.converter.convertType(context, node.type, checker.getReturnTypeOfSignature(signature));\n } catch (error) {}\n }\n\n if (node.type) {\n return context.converter.convertType(context, node.type);\n } else {\n return context.converter.convertType(context, node);\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/factories/type-parameter.js.map b/node_modules/typedoc/dist/lib/converter/factories/type-parameter.js.map
index ee3842444..c9b71a7b3 100644
--- a/node_modules/typedoc/dist/lib/converter/factories/type-parameter.js.map
+++ b/node_modules/typedoc/dist/lib/converter/factories/type-parameter.js.map
@@ -1 +1 @@
-{"version":3,"file":"type-parameter.js","sourceRoot":"","sources":["../../../../src/lib/converter/factories/type-parameter.ts"],"names":[],"mappings":";;AAEA,4CAAsG;AAEtG,0CAAuC;AASvC,6BAAoC,OAAgB,EAAE,IAAiC;IACnF,IAAM,aAAa,GAAG,IAAI,yBAAiB,EAAE,CAAC;IAC9C,aAAa,CAAC,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;IACtC,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;QAClB,aAAa,CAAC,UAAU,GAAG,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;IACvF,CAAC;IAED,IAAM,UAAU,GAA4B,OAAO,CAAC,KAAK,CAAC;IAC1D,IAAM,uBAAuB,GAAG,IAAI,+BAAuB,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC;IAEvF,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC,CAAC;QAC7B,UAAU,CAAC,cAAc,GAAG,EAAE,CAAC;IACnC,CAAC;IACD,UAAU,CAAC,cAAc,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC;IAExD,OAAO,CAAC,kBAAkB,CAAC,uBAAuB,EAAE,IAAI,CAAC,CAAC;IAC1D,OAAO,CAAC,OAAO,CAAC,qBAAS,CAAC,2BAA2B,EAAE,uBAAuB,EAAE,IAAI,CAAC,CAAC;IAEtF,MAAM,CAAC,aAAa,CAAC;AACzB,CAAC;AAnBD,kDAmBC","sourcesContent":["import * as ts from 'typescript';\n\nimport {TypeParameterContainer, TypeParameterReflection, TypeParameterType} from '../../models/index';\nimport {Context} from '../context';\nimport {Converter} from '../converter';\n\n/**\n * Create a type parameter reflection for the given node.\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The type parameter node that should be reflected.\n * @returns The newly created type parameter reflection.\n */\nexport function createTypeParameter(context: Context, node: ts.TypeParameterDeclaration): TypeParameterType {\n const typeParameter = new TypeParameterType();\n typeParameter.name = node.symbol.name;\n if (node.constraint) {\n typeParameter.constraint = context.converter.convertType(context, node.constraint);\n }\n\n const reflection = <TypeParameterContainer> context.scope;\n const typeParameterReflection = new TypeParameterReflection(reflection, typeParameter);\n\n if (!reflection.typeParameters) {\n reflection.typeParameters = [];\n }\n reflection.typeParameters.push(typeParameterReflection);\n\n context.registerReflection(typeParameterReflection, node);\n context.trigger(Converter.EVENT_CREATE_TYPE_PARAMETER, typeParameterReflection, node);\n\n return typeParameter;\n}\n"]} \ No newline at end of file
+{"version":3,"file":"type-parameter.js","sourceRoot":"","sources":["../../../../src/lib/converter/factories/type-parameter.ts"],"names":[],"mappings":";;AAEA,4CAAwG;AAExG,0CAAyC;AASzC,6BAAoC,OAAgB,EAAE,IAAiC;IACnF,IAAM,aAAa,GAAG,IAAI,yBAAiB,EAAE,CAAC;IAC9C,aAAa,CAAC,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;IACtC,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;QAClB,aAAa,CAAC,UAAU,GAAG,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;IACvF,CAAC;IAED,IAAM,UAAU,GAA4B,OAAO,CAAC,KAAK,CAAC;IAC1D,IAAM,uBAAuB,GAAG,IAAI,+BAAuB,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC;IAEvF,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC,CAAC;QAC7B,UAAU,CAAC,cAAc,GAAG,EAAE,CAAC;IACnC,CAAC;IACD,UAAU,CAAC,cAAc,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC;IAExD,OAAO,CAAC,kBAAkB,CAAC,uBAAuB,EAAE,IAAI,CAAC,CAAC;IAC1D,OAAO,CAAC,OAAO,CAAC,qBAAS,CAAC,2BAA2B,EAAE,uBAAuB,EAAE,IAAI,CAAC,CAAC;IAEtF,MAAM,CAAC,aAAa,CAAC;AACzB,CAAC;AAnBD,kDAmBC","sourcesContent":["import * as ts from 'typescript';\n\nimport { TypeParameterContainer, TypeParameterReflection, TypeParameterType } from '../../models/index';\nimport { Context } from '../context';\nimport { Converter } from '../converter';\n\n/**\n * Create a type parameter reflection for the given node.\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The type parameter node that should be reflected.\n * @returns The newly created type parameter reflection.\n */\nexport function createTypeParameter(context: Context, node: ts.TypeParameterDeclaration): TypeParameterType {\n const typeParameter = new TypeParameterType();\n typeParameter.name = node.symbol.name;\n if (node.constraint) {\n typeParameter.constraint = context.converter.convertType(context, node.constraint);\n }\n\n const reflection = <TypeParameterContainer> context.scope;\n const typeParameterReflection = new TypeParameterReflection(reflection, typeParameter);\n\n if (!reflection.typeParameters) {\n reflection.typeParameters = [];\n }\n reflection.typeParameters.push(typeParameterReflection);\n\n context.registerReflection(typeParameterReflection, node);\n context.trigger(Converter.EVENT_CREATE_TYPE_PARAMETER, typeParameterReflection, node);\n\n return typeParameter;\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/index.js.map b/node_modules/typedoc/dist/lib/converter/index.js.map
index e66b59d36..0bb8e26a0 100644
--- a/node_modules/typedoc/dist/lib/converter/index.js.map
+++ b/node_modules/typedoc/dist/lib/converter/index.js.map
@@ -1 +1 @@
-{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/converter/index.ts"],"names":[],"mappings":";;AAAA,qCAAkC;AAA1B,4BAAA,OAAO,CAAA;AACf,yCAAsC;AAA9B,gCAAA,SAAS,CAAA;AAEjB,2DAA4E;AAApE,mDAAA,mBAAmB,CAAA;AAAE,iDAAA,iBAAiB,CAAA;AAE9C,yBAAuB;AACvB,yBAAuB;AACvB,2BAAyB","sourcesContent":["export {Context} from './context';\nexport {Converter} from './converter';\n\nexport {convertDefaultValue, convertExpression} from './convert-expression';\n\nimport './nodes/index';\nimport './types/index';\nimport './plugins/index';\n"]} \ No newline at end of file
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/converter/index.ts"],"names":[],"mappings":";;AAAA,qCAAoC;AAA3B,4BAAA,OAAO,CAAA;AAChB,yCAAwC;AAA/B,gCAAA,SAAS,CAAA;AAElB,2DAA8E;AAArE,mDAAA,mBAAmB,CAAA;AAAE,iDAAA,iBAAiB,CAAA;AAE/C,yBAAuB;AACvB,yBAAuB;AACvB,2BAAyB","sourcesContent":["export { Context } from './context';\nexport { Converter } from './converter';\n\nexport { convertDefaultValue, convertExpression } from './convert-expression';\n\nimport './nodes/index';\nimport './types/index';\nimport './plugins/index';\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/nodes/accessor.js b/node_modules/typedoc/dist/lib/converter/nodes/accessor.js
index 5ba49377f..f2085f1ae 100644
--- a/node_modules/typedoc/dist/lib/converter/nodes/accessor.js
+++ b/node_modules/typedoc/dist/lib/converter/nodes/accessor.js
@@ -42,10 +42,10 @@ var AccessorConverter = (function (_super) {
});
return accessor;
};
+ AccessorConverter = __decorate([
+ components_1.Component({ name: 'node:accessor' })
+ ], AccessorConverter);
return AccessorConverter;
}(components_1.ConverterNodeComponent));
-AccessorConverter = __decorate([
- components_1.Component({ name: 'node:accessor' })
-], AccessorConverter);
exports.AccessorConverter = AccessorConverter;
//# sourceMappingURL=accessor.js.map \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/nodes/accessor.js.map b/node_modules/typedoc/dist/lib/converter/nodes/accessor.js.map
index ce9aca396..ee8d58e2c 100644
--- a/node_modules/typedoc/dist/lib/converter/nodes/accessor.js.map
+++ b/node_modules/typedoc/dist/lib/converter/nodes/accessor.js.map
@@ -1 +1 @@
-{"version":3,"file":"accessor.js","sourceRoot":"","sources":["../../../../src/lib/converter/nodes/accessor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AAEjC,4CAA8D;AAC9D,4CAAsE;AAEtE,4CAAgE;AAGhE,IAAa,iBAAiB;IAAS,qCAA+C;IADtF;QAAA,qEA8BC;QAzBG,cAAQ,GAAoB;YACxB,EAAE,CAAC,UAAU,CAAC,WAAW;YACzB,EAAE,CAAC,UAAU,CAAC,WAAW;SAC5B,CAAC;;IAsBN,CAAC;IAbG,mCAAO,GAAP,UAAQ,OAAgB,EAAE,IAA6B;QACnD,IAAM,QAAQ,GAAG,yBAAiB,CAAC,OAAO,EAAE,IAAI,EAAE,sBAAc,CAAC,QAAQ,CAAC,CAAC;QAE3E,OAAO,CAAC,SAAS,CAAC,QAAQ,EAAE;YACxB,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC;gBAC1C,QAAQ,CAAC,YAAY,GAAG,uBAAe,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,sBAAc,CAAC,YAAY,CAAC,CAAC;YACjG,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,QAAQ,CAAC,YAAY,GAAG,uBAAe,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,sBAAc,CAAC,YAAY,CAAC,CAAC;YACjG,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,QAAQ,CAAC;IACpB,CAAC;IACL,wBAAC;AAAD,CAAC,AA7BD,CAAuC,mCAAsB,GA6B5D;AA7BY,iBAAiB;IAD7B,sBAAS,CAAC,EAAC,IAAI,EAAE,eAAe,EAAC,CAAC;GACtB,iBAAiB,CA6B7B;AA7BY,8CAAiB","sourcesContent":["import * as ts from 'typescript';\n\nimport {Reflection, ReflectionKind} from '../../models/index';\nimport {createDeclaration, createSignature} from '../factories/index';\nimport {Context} from '../context';\nimport {Component, ConverterNodeComponent} from '../components';\n\n@Component({name: 'node:accessor'})\nexport class AccessorConverter extends ConverterNodeComponent<ts.SignatureDeclaration> {\n /**\n * List of supported TypeScript syntax kinds.\n */\n supports: ts.SyntaxKind[] = [\n ts.SyntaxKind.GetAccessor,\n ts.SyntaxKind.SetAccessor\n ];\n\n /**\n * Analyze the given getter declaration node and create a suitable reflection.\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The signature declaration node that should be analyzed.\n * @return The resulting reflection or NULL.\n */\n convert(context: Context, node: ts.SignatureDeclaration): Reflection {\n const accessor = createDeclaration(context, node, ReflectionKind.Accessor);\n\n context.withScope(accessor, () => {\n if (node.kind === ts.SyntaxKind.GetAccessor) {\n accessor.getSignature = createSignature(context, node, '__get', ReflectionKind.GetSignature);\n } else {\n accessor.setSignature = createSignature(context, node, '__set', ReflectionKind.SetSignature);\n }\n });\n\n return accessor;\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"accessor.js","sourceRoot":"","sources":["../../../../src/lib/converter/nodes/accessor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AAEjC,4CAAgE;AAChE,4CAAwE;AAExE,4CAAkE;AAGlE;IAAuC,qCAA+C;IADtF;QAAA,qEA8BC;QAzBG,cAAQ,GAAoB;YACxB,EAAE,CAAC,UAAU,CAAC,WAAW;YACzB,EAAE,CAAC,UAAU,CAAC,WAAW;SAC5B,CAAC;;IAsBN,CAAC;IAbG,mCAAO,GAAP,UAAQ,OAAgB,EAAE,IAA6B;QACnD,IAAM,QAAQ,GAAG,yBAAiB,CAAC,OAAO,EAAE,IAAI,EAAE,sBAAc,CAAC,QAAQ,CAAC,CAAC;QAE3E,OAAO,CAAC,SAAS,CAAC,QAAQ,EAAE;YACxB,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC;gBAC1C,QAAQ,CAAC,YAAY,GAAG,uBAAe,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,sBAAc,CAAC,YAAY,CAAC,CAAC;YACjG,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,QAAQ,CAAC,YAAY,GAAG,uBAAe,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,sBAAc,CAAC,YAAY,CAAC,CAAC;YACjG,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,QAAQ,CAAC;IACpB,CAAC;IA5BQ,iBAAiB;QAD7B,sBAAS,CAAC,EAAC,IAAI,EAAE,eAAe,EAAC,CAAC;OACtB,iBAAiB,CA6B7B;IAAD,wBAAC;CAAA,AA7BD,CAAuC,mCAAsB,GA6B5D;AA7BY,8CAAiB","sourcesContent":["import * as ts from 'typescript';\n\nimport { Reflection, ReflectionKind } from '../../models/index';\nimport { createDeclaration, createSignature } from '../factories/index';\nimport { Context } from '../context';\nimport { Component, ConverterNodeComponent } from '../components';\n\n@Component({name: 'node:accessor'})\nexport class AccessorConverter extends ConverterNodeComponent<ts.SignatureDeclaration> {\n /**\n * List of supported TypeScript syntax kinds.\n */\n supports: ts.SyntaxKind[] = [\n ts.SyntaxKind.GetAccessor,\n ts.SyntaxKind.SetAccessor\n ];\n\n /**\n * Analyze the given getter declaration node and create a suitable reflection.\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The signature declaration node that should be analyzed.\n * @return The resulting reflection or NULL.\n */\n convert(context: Context, node: ts.SignatureDeclaration): Reflection {\n const accessor = createDeclaration(context, node, ReflectionKind.Accessor);\n\n context.withScope(accessor, () => {\n if (node.kind === ts.SyntaxKind.GetAccessor) {\n accessor.getSignature = createSignature(context, node, '__get', ReflectionKind.GetSignature);\n } else {\n accessor.setSignature = createSignature(context, node, '__set', ReflectionKind.SetSignature);\n }\n });\n\n return accessor;\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/nodes/alias.js b/node_modules/typedoc/dist/lib/converter/nodes/alias.js
index 30cea0643..9a9486763 100644
--- a/node_modules/typedoc/dist/lib/converter/nodes/alias.js
+++ b/node_modules/typedoc/dist/lib/converter/nodes/alias.js
@@ -37,10 +37,10 @@ var AliasConverter = (function (_super) {
});
return alias;
};
+ AliasConverter = __decorate([
+ components_1.Component({ name: 'node:alias' })
+ ], AliasConverter);
return AliasConverter;
}(components_1.ConverterNodeComponent));
-AliasConverter = __decorate([
- components_1.Component({ name: 'node:alias' })
-], AliasConverter);
exports.AliasConverter = AliasConverter;
//# sourceMappingURL=alias.js.map \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/nodes/alias.js.map b/node_modules/typedoc/dist/lib/converter/nodes/alias.js.map
index 931f761a7..7d12581c0 100644
--- a/node_modules/typedoc/dist/lib/converter/nodes/alias.js.map
+++ b/node_modules/typedoc/dist/lib/converter/nodes/alias.js.map
@@ -1 +1 @@
-{"version":3,"file":"alias.js","sourceRoot":"","sources":["../../../../src/lib/converter/nodes/alias.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AAEjC,4CAA8D;AAC9D,4CAAqD;AAErD,4CAAgE;AAGhE,IAAa,cAAc;IAAS,kCAA+C;IADnF;QAAA,qEAyBC;QApBG,cAAQ,GAAoB;YACxB,EAAE,CAAC,UAAU,CAAC,oBAAoB;SACrC,CAAC;;IAkBN,CAAC;IATG,gCAAO,GAAP,UAAQ,OAAgB,EAAE,IAA6B;QAAvD,iBAQC;QAPG,IAAM,KAAK,GAAG,yBAAiB,CAAC,OAAO,EAAE,IAAI,EAAE,sBAAc,CAAC,SAAS,CAAC,CAAC;QAEzE,OAAO,CAAC,SAAS,CAAC,KAAK,EAAE;YACrB,KAAK,CAAC,IAAI,GAAG,KAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAClG,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,KAAK,CAAC;IACjB,CAAC;IACL,qBAAC;AAAD,CAAC,AAxBD,CAAoC,mCAAsB,GAwBzD;AAxBY,cAAc;IAD1B,sBAAS,CAAC,EAAC,IAAI,EAAE,YAAY,EAAC,CAAC;GACnB,cAAc,CAwB1B;AAxBY,wCAAc","sourcesContent":["import * as ts from 'typescript';\n\nimport {Reflection, ReflectionKind} from '../../models/index';\nimport {createDeclaration} from '../factories/index';\nimport {Context} from '../context';\nimport {Component, ConverterNodeComponent} from '../components';\n\n@Component({name: 'node:alias'})\nexport class AliasConverter extends ConverterNodeComponent<ts.TypeAliasDeclaration> {\n /**\n * List of supported TypeScript syntax kinds.\n */\n supports: ts.SyntaxKind[] = [\n ts.SyntaxKind.TypeAliasDeclaration\n ];\n\n /**\n * Analyze the given type alias declaration node and create a suitable reflection.\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The type alias declaration node that should be analyzed.\n * @return The resulting reflection or NULL.\n */\n convert(context: Context, node: ts.TypeAliasDeclaration): Reflection {\n const alias = createDeclaration(context, node, ReflectionKind.TypeAlias);\n\n context.withScope(alias, () => {\n alias.type = this.owner.convertType(context, node.type, context.getTypeAtLocation(node.type));\n });\n\n return alias;\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"alias.js","sourceRoot":"","sources":["../../../../src/lib/converter/nodes/alias.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AAEjC,4CAAgE;AAChE,4CAAuD;AAEvD,4CAAkE;AAGlE;IAAoC,kCAA+C;IADnF;QAAA,qEAyBC;QApBG,cAAQ,GAAoB;YACxB,EAAE,CAAC,UAAU,CAAC,oBAAoB;SACrC,CAAC;;IAkBN,CAAC;IATG,gCAAO,GAAP,UAAQ,OAAgB,EAAE,IAA6B;QAAvD,iBAQC;QAPG,IAAM,KAAK,GAAG,yBAAiB,CAAC,OAAO,EAAE,IAAI,EAAE,sBAAc,CAAC,SAAS,CAAC,CAAC;QAEzE,OAAO,CAAC,SAAS,CAAC,KAAK,EAAE;YACrB,KAAK,CAAC,IAAI,GAAG,KAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAClG,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,KAAK,CAAC;IACjB,CAAC;IAvBQ,cAAc;QAD1B,sBAAS,CAAC,EAAC,IAAI,EAAE,YAAY,EAAC,CAAC;OACnB,cAAc,CAwB1B;IAAD,qBAAC;CAAA,AAxBD,CAAoC,mCAAsB,GAwBzD;AAxBY,wCAAc","sourcesContent":["import * as ts from 'typescript';\n\nimport { Reflection, ReflectionKind } from '../../models/index';\nimport { createDeclaration } from '../factories/index';\nimport { Context } from '../context';\nimport { Component, ConverterNodeComponent } from '../components';\n\n@Component({name: 'node:alias'})\nexport class AliasConverter extends ConverterNodeComponent<ts.TypeAliasDeclaration> {\n /**\n * List of supported TypeScript syntax kinds.\n */\n supports: ts.SyntaxKind[] = [\n ts.SyntaxKind.TypeAliasDeclaration\n ];\n\n /**\n * Analyze the given type alias declaration node and create a suitable reflection.\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The type alias declaration node that should be analyzed.\n * @return The resulting reflection or NULL.\n */\n convert(context: Context, node: ts.TypeAliasDeclaration): Reflection {\n const alias = createDeclaration(context, node, ReflectionKind.TypeAlias);\n\n context.withScope(alias, () => {\n alias.type = this.owner.convertType(context, node.type, context.getTypeAtLocation(node.type));\n });\n\n return alias;\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/nodes/block.js b/node_modules/typedoc/dist/lib/converter/nodes/block.js
index 1ba8e57e7..cb168de61 100644
--- a/node_modules/typedoc/dist/lib/converter/nodes/block.js
+++ b/node_modules/typedoc/dist/lib/converter/nodes/block.js
@@ -86,22 +86,22 @@ var BlockConverter = (function (_super) {
});
}
};
+ __decorate([
+ component_1.Option({
+ name: 'mode',
+ help: "Specifies the output mode the project is used to be compiled with: 'file' or 'modules'",
+ type: declaration_1.ParameterType.Map,
+ map: {
+ 'file': SourceFileMode.File,
+ 'modules': SourceFileMode.Modules
+ },
+ defaultValue: SourceFileMode.Modules
+ })
+ ], BlockConverter.prototype, "mode", void 0);
+ BlockConverter = __decorate([
+ components_1.Component({ name: 'node:block' })
+ ], BlockConverter);
return BlockConverter;
}(components_1.ConverterNodeComponent));
-__decorate([
- component_1.Option({
- name: 'mode',
- help: "Specifies the output mode the project is used to be compiled with: 'file' or 'modules'",
- type: declaration_1.ParameterType.Map,
- map: {
- 'file': SourceFileMode.File,
- 'modules': SourceFileMode.Modules
- },
- defaultValue: SourceFileMode.Modules
- })
-], BlockConverter.prototype, "mode", void 0);
-BlockConverter = __decorate([
- components_1.Component({ name: 'node:block' })
-], BlockConverter);
exports.BlockConverter = BlockConverter;
//# sourceMappingURL=block.js.map \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/nodes/block.js.map b/node_modules/typedoc/dist/lib/converter/nodes/block.js.map
index 280412c4e..2d7a33e15 100644
--- a/node_modules/typedoc/dist/lib/converter/nodes/block.js.map
+++ b/node_modules/typedoc/dist/lib/converter/nodes/block.js.map
@@ -1 +1 @@
-{"version":3,"file":"block.js","sourceRoot":"","sources":["../../../../src/lib/converter/nodes/block.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AAEjC,4CAA8E;AAC9E,4CAAqD;AAErD,4CAAgE;AAChE,mDAA6C;AAC7C,+DAA8D;AAE9D,IAAM,QAAQ,GAAoB;IAC9B,EAAE,CAAC,UAAU,CAAC,gBAAgB;IAC9B,EAAE,CAAC,UAAU,CAAC,oBAAoB;IAClC,EAAE,CAAC,UAAU,CAAC,eAAe;CAChC,CAAC;AAEF,IAAY,cAEX;AAFD,WAAY,cAAc;IACtB,mDAAI,CAAA;IAAE,yDAAO,CAAA;AACjB,CAAC,EAFW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAEzB;AAGD,IAAa,cAAc;IAAS,kCAA6D;IADjG;QAAA,qEAkFC;QAjEG,cAAQ,GAAoB;YACxB,EAAE,CAAC,UAAU,CAAC,KAAK;YACnB,EAAE,CAAC,UAAU,CAAC,WAAW;YACzB,EAAE,CAAC,UAAU,CAAC,UAAU;SAC3B,CAAC;;IA6DN,CAAC;IApDG,gCAAO,GAAP,UAAQ,OAAgB,EAAE,IAA2C;QACjE,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC;YACzC,IAAI,CAAC,iBAAiB,CAAC,OAAO,EAAkB,IAAI,CAAC,CAAC;QAC1D,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,IAAI,CAAC,iBAAiB,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QAC1C,CAAC;QAED,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;IACzB,CAAC;IASO,0CAAiB,GAAzB,UAA0B,OAAgB,EAAE,IAAmB;QAA/D,iBAgBC;QAfG,IAAI,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;QAE3B,OAAO,CAAC,cAAc,CAAC,IAAI,EAAE;YACzB,EAAE,CAAC,CAAC,KAAI,CAAC,IAAI,KAAK,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;gBACvC,MAAM,GAAG,yBAAiB,CAAC,OAAO,EAAE,IAAI,EAAE,sBAAc,CAAC,cAAc,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;gBACxF,OAAO,CAAC,SAAS,CAAC,MAAM,EAAE;oBACtB,KAAI,CAAC,iBAAiB,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;oBACtC,MAAM,CAAC,OAAO,CAAC,sBAAc,CAAC,QAAQ,CAAC,CAAC;gBAC5C,CAAC,CAAC,CAAC;YACP,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,KAAI,CAAC,iBAAiB,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;YAC1C,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IAEO,0CAAiB,GAAzB,UAA0B,OAAgB,EAAE,IAA2C;QAAvF,iBAgBC;QAfG,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;YAClB,IAAM,YAAU,GAAmB,EAAE,CAAC;YAEtC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,UAAC,SAAS;gBAC9B,EAAE,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;oBAC1C,KAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;gBAC/C,CAAC;gBAAC,IAAI,CAAC,CAAC;oBACJ,YAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;gBAC/B,CAAC;YACL,CAAC,CAAC,CAAC;YAEH,YAAU,CAAC,OAAO,CAAC,UAAC,SAAS;gBACzB,KAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;YAC/C,CAAC,CAAC,CAAC;QACP,CAAC;IACL,CAAC;IACL,qBAAC;AAAD,CAAC,AAjFD,CAAoC,mCAAsB,GAiFzD;AAtEG;IAVC,kBAAM,CAAC;QACJ,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,wFAAwF;QAC9F,IAAI,EAAE,2BAAa,CAAC,GAAG;QACvB,GAAG,EAAE;YACD,MAAM,EAAE,cAAc,CAAC,IAAI;YAC3B,SAAS,EAAE,cAAc,CAAC,OAAO;SACpC;QACD,YAAY,EAAE,cAAc,CAAC,OAAO;KACvC,CAAC;4CACW;AAXJ,cAAc;IAD1B,sBAAS,CAAC,EAAC,IAAI,EAAE,YAAY,EAAC,CAAC;GACnB,cAAc,CAiF1B;AAjFY,wCAAc","sourcesContent":["import * as ts from 'typescript';\n\nimport {Reflection, ReflectionKind, ReflectionFlag} from '../../models/index';\nimport {createDeclaration} from '../factories/index';\nimport {Context} from '../context';\nimport {Component, ConverterNodeComponent} from '../components';\nimport {Option} from '../../utils/component';\nimport {ParameterType} from '../../utils/options/declaration';\n\nconst prefered: ts.SyntaxKind[] = [\n ts.SyntaxKind.ClassDeclaration,\n ts.SyntaxKind.InterfaceDeclaration,\n ts.SyntaxKind.EnumDeclaration\n];\n\nexport enum SourceFileMode {\n File, Modules\n}\n\n@Component({name: 'node:block'})\nexport class BlockConverter extends ConverterNodeComponent<ts.SourceFile|ts.Block|ts.ModuleBlock> {\n @Option({\n name: 'mode',\n help: \"Specifies the output mode the project is used to be compiled with: 'file' or 'modules'\",\n type: ParameterType.Map,\n map: {\n 'file': SourceFileMode.File,\n 'modules': SourceFileMode.Modules\n },\n defaultValue: SourceFileMode.Modules\n })\n mode: number;\n\n /**\n * List of supported TypeScript syntax kinds.\n */\n supports: ts.SyntaxKind[] = [\n ts.SyntaxKind.Block,\n ts.SyntaxKind.ModuleBlock,\n ts.SyntaxKind.SourceFile\n ];\n\n /**\n * Analyze the given class declaration node and create a suitable reflection.\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The class declaration node that should be analyzed.\n * @return The resulting reflection or NULL.\n */\n convert(context: Context, node: ts.SourceFile|ts.Block|ts.ModuleBlock): Reflection {\n if (node.kind === ts.SyntaxKind.SourceFile) {\n this.convertSourceFile(context, <ts.SourceFile> node);\n } else {\n this.convertStatements(context, node);\n }\n\n return context.scope;\n }\n\n /**\n * Analyze the given source file node and create a suitable reflection.\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The source file node that should be analyzed.\n * @return The resulting reflection or NULL.\n */\n private convertSourceFile(context: Context, node: ts.SourceFile): Reflection {\n let result = context.scope;\n\n context.withSourceFile(node, () => {\n if (this.mode === SourceFileMode.Modules) {\n result = createDeclaration(context, node, ReflectionKind.ExternalModule, node.fileName);\n context.withScope(result, () => {\n this.convertStatements(context, node);\n result.setFlag(ReflectionFlag.Exported);\n });\n } else {\n this.convertStatements(context, node);\n }\n });\n\n return result;\n }\n\n private convertStatements(context: Context, node: ts.SourceFile|ts.Block|ts.ModuleBlock) {\n if (node.statements) {\n const statements: ts.Statement[] = [];\n\n node.statements.forEach((statement) => {\n if (prefered.indexOf(statement.kind) !== -1) {\n this.owner.convertNode(context, statement);\n } else {\n statements.push(statement);\n }\n });\n\n statements.forEach((statement) => {\n this.owner.convertNode(context, statement);\n });\n }\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"block.js","sourceRoot":"","sources":["../../../../src/lib/converter/nodes/block.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AAEjC,4CAAgF;AAChF,4CAAuD;AAEvD,4CAAkE;AAClE,mDAA+C;AAC/C,+DAAgE;AAEhE,IAAM,QAAQ,GAAoB;IAC9B,EAAE,CAAC,UAAU,CAAC,gBAAgB;IAC9B,EAAE,CAAC,UAAU,CAAC,oBAAoB;IAClC,EAAE,CAAC,UAAU,CAAC,eAAe;CAChC,CAAC;AAEF,IAAY,cAEX;AAFD,WAAY,cAAc;IACtB,mDAAI,CAAA;IAAE,yDAAO,CAAA;AACjB,CAAC,EAFW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAEzB;AAGD;IAAoC,kCAA6D;IADjG;QAAA,qEAkFC;QAjEG,cAAQ,GAAoB;YACxB,EAAE,CAAC,UAAU,CAAC,KAAK;YACnB,EAAE,CAAC,UAAU,CAAC,WAAW;YACzB,EAAE,CAAC,UAAU,CAAC,UAAU;SAC3B,CAAC;;IA6DN,CAAC;IApDG,gCAAO,GAAP,UAAQ,OAAgB,EAAE,IAA2C;QACjE,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC;YACzC,IAAI,CAAC,iBAAiB,CAAC,OAAO,EAAkB,IAAI,CAAC,CAAC;QAC1D,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,IAAI,CAAC,iBAAiB,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QAC1C,CAAC;QAED,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;IACzB,CAAC;IASO,0CAAiB,GAAzB,UAA0B,OAAgB,EAAE,IAAmB;QAA/D,iBAgBC;QAfG,IAAI,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;QAE3B,OAAO,CAAC,cAAc,CAAC,IAAI,EAAE;YACzB,EAAE,CAAC,CAAC,KAAI,CAAC,IAAI,KAAK,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;gBACvC,MAAM,GAAG,yBAAiB,CAAC,OAAO,EAAE,IAAI,EAAE,sBAAc,CAAC,cAAc,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;gBACxF,OAAO,CAAC,SAAS,CAAC,MAAM,EAAE;oBACtB,KAAI,CAAC,iBAAiB,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;oBACtC,MAAM,CAAC,OAAO,CAAC,sBAAc,CAAC,QAAQ,CAAC,CAAC;gBAC5C,CAAC,CAAC,CAAC;YACP,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,KAAI,CAAC,iBAAiB,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;YAC1C,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IAEO,0CAAiB,GAAzB,UAA0B,OAAgB,EAAE,IAA2C;QAAvF,iBAgBC;QAfG,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;YAClB,IAAM,YAAU,GAAmB,EAAE,CAAC;YAEtC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,UAAC,SAAS;gBAC9B,EAAE,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;oBAC1C,KAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;gBAC/C,CAAC;gBAAC,IAAI,CAAC,CAAC;oBACJ,YAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;gBAC/B,CAAC;YACL,CAAC,CAAC,CAAC;YAEH,YAAU,CAAC,OAAO,CAAC,UAAC,SAAS;gBACzB,KAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;YAC/C,CAAC,CAAC,CAAC;QACP,CAAC;IACL,CAAC;IArED;QAVC,kBAAM,CAAC;YACJ,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,wFAAwF;YAC9F,IAAI,EAAE,2BAAa,CAAC,GAAG;YACvB,GAAG,EAAE;gBACD,MAAM,EAAE,cAAc,CAAC,IAAI;gBAC3B,SAAS,EAAE,cAAc,CAAC,OAAO;aACpC;YACD,YAAY,EAAE,cAAc,CAAC,OAAO;SACvC,CAAC;gDACW;IAXJ,cAAc;QAD1B,sBAAS,CAAC,EAAC,IAAI,EAAE,YAAY,EAAC,CAAC;OACnB,cAAc,CAiF1B;IAAD,qBAAC;CAAA,AAjFD,CAAoC,mCAAsB,GAiFzD;AAjFY,wCAAc","sourcesContent":["import * as ts from 'typescript';\n\nimport { Reflection, ReflectionKind, ReflectionFlag } from '../../models/index';\nimport { createDeclaration } from '../factories/index';\nimport { Context } from '../context';\nimport { Component, ConverterNodeComponent } from '../components';\nimport { Option } from '../../utils/component';\nimport { ParameterType } from '../../utils/options/declaration';\n\nconst prefered: ts.SyntaxKind[] = [\n ts.SyntaxKind.ClassDeclaration,\n ts.SyntaxKind.InterfaceDeclaration,\n ts.SyntaxKind.EnumDeclaration\n];\n\nexport enum SourceFileMode {\n File, Modules\n}\n\n@Component({name: 'node:block'})\nexport class BlockConverter extends ConverterNodeComponent<ts.SourceFile|ts.Block|ts.ModuleBlock> {\n @Option({\n name: 'mode',\n help: \"Specifies the output mode the project is used to be compiled with: 'file' or 'modules'\",\n type: ParameterType.Map,\n map: {\n 'file': SourceFileMode.File,\n 'modules': SourceFileMode.Modules\n },\n defaultValue: SourceFileMode.Modules\n })\n mode: number;\n\n /**\n * List of supported TypeScript syntax kinds.\n */\n supports: ts.SyntaxKind[] = [\n ts.SyntaxKind.Block,\n ts.SyntaxKind.ModuleBlock,\n ts.SyntaxKind.SourceFile\n ];\n\n /**\n * Analyze the given class declaration node and create a suitable reflection.\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The class declaration node that should be analyzed.\n * @return The resulting reflection or NULL.\n */\n convert(context: Context, node: ts.SourceFile|ts.Block|ts.ModuleBlock): Reflection {\n if (node.kind === ts.SyntaxKind.SourceFile) {\n this.convertSourceFile(context, <ts.SourceFile> node);\n } else {\n this.convertStatements(context, node);\n }\n\n return context.scope;\n }\n\n /**\n * Analyze the given source file node and create a suitable reflection.\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The source file node that should be analyzed.\n * @return The resulting reflection or NULL.\n */\n private convertSourceFile(context: Context, node: ts.SourceFile): Reflection {\n let result = context.scope;\n\n context.withSourceFile(node, () => {\n if (this.mode === SourceFileMode.Modules) {\n result = createDeclaration(context, node, ReflectionKind.ExternalModule, node.fileName);\n context.withScope(result, () => {\n this.convertStatements(context, node);\n result.setFlag(ReflectionFlag.Exported);\n });\n } else {\n this.convertStatements(context, node);\n }\n });\n\n return result;\n }\n\n private convertStatements(context: Context, node: ts.SourceFile|ts.Block|ts.ModuleBlock) {\n if (node.statements) {\n const statements: ts.Statement[] = [];\n\n node.statements.forEach((statement) => {\n if (prefered.indexOf(statement.kind) !== -1) {\n this.owner.convertNode(context, statement);\n } else {\n statements.push(statement);\n }\n });\n\n statements.forEach((statement) => {\n this.owner.convertNode(context, statement);\n });\n }\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/nodes/class.js b/node_modules/typedoc/dist/lib/converter/nodes/class.js
index 4602182de..ea55798f4 100644
--- a/node_modules/typedoc/dist/lib/converter/nodes/class.js
+++ b/node_modules/typedoc/dist/lib/converter/nodes/class.js
@@ -78,10 +78,10 @@ var ClassConverter = (function (_super) {
});
return reflection;
};
+ ClassConverter = __decorate([
+ components_1.Component({ name: 'node:class' })
+ ], ClassConverter);
return ClassConverter;
}(components_1.ConverterNodeComponent));
-ClassConverter = __decorate([
- components_1.Component({ name: 'node:class' })
-], ClassConverter);
exports.ClassConverter = ClassConverter;
//# sourceMappingURL=class.js.map \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/nodes/class.js.map b/node_modules/typedoc/dist/lib/converter/nodes/class.js.map
index 2312c179b..807ed9ac3 100644
--- a/node_modules/typedoc/dist/lib/converter/nodes/class.js.map
+++ b/node_modules/typedoc/dist/lib/converter/nodes/class.js.map
@@ -1 +1 @@
-{"version":3,"file":"class.js","sourceRoot":"","sources":["../../../../src/lib/converter/nodes/class.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AACjC,uCAAyC;AAEzC,4CAAqF;AACrF,4CAAqD;AAErD,4CAAgE;AAGhE,IAAa,cAAc;IAAS,kCAA2C;IAD/E;QAAA,qEAqEC;QAhEG,cAAQ,GAAoB;YACxB,EAAE,CAAC,UAAU,CAAC,eAAe;YAC7B,EAAE,CAAC,UAAU,CAAC,gBAAgB;SACjC,CAAC;;IA6DN,CAAC;IApDG,gCAAO,GAAP,UAAQ,OAAgB,EAAE,IAAyB;QAAnD,iBAmDC;QAlDG,IAAI,UAAiC,CAAC;QACtC,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,aAAa,KAAK,IAAI,CAAC,CAAC,CAAC;YACtD,UAAU,GAA2B,OAAO,CAAC,KAAK,CAAC;QACvD,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,UAAU,GAAG,yBAAiB,CAAC,OAAO,EAAE,IAAI,EAAE,sBAAc,CAAC,KAAK,CAAC,CAAC;QACxE,CAAC;QAED,OAAO,CAAC,SAAS,CAAC,UAAU,EAAE,IAAI,CAAC,cAAc,EAAE;YAC/C,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;gBACf,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,UAAC,MAAM;oBACxB,IAAM,SAAS,GAAG,EAAE,CAAC,wBAAwB,CAAC,MAAM,CAAC,CAAC;oBACtD,IAAM,aAAa,GAAG,CAAC,SAAS,GAAG,EAAE,CAAC,aAAa,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;oBACjE,IAAM,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC,cAAc,GAAG,aAAa,GAAG,KAAK,CAAC;oBAEzE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;wBACX,KAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;oBAC5C,CAAC;gBACL,CAAC,CAAC,CAAC;YACP,CAAC;YAED,IAAM,QAAQ,GAAG,GAAG,CAAC,oCAAoC,CAAC,IAAI,CAAC,CAAC;YAChE,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;gBACX,IAAM,IAAI,GAAG,OAAO,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC;gBACjD,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC;oBACrB,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC;wBAC5B,UAAU,CAAC,aAAa,GAAG,EAAE,CAAC;oBAClC,CAAC;oBACD,UAAU,CAAC,aAAa,CAAC,IAAI,CAAC,KAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC;gBACnF,CAAC;gBAED,EAAE,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;oBACtB,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,UAAC,WAAW;wBACzC,OAAO,CAAC,OAAO,CAAC,WAAW,EAAE,QAAQ,CAAC,aAAa,CAAC,CAAC;oBACzD,CAAC,CAAC,CAAC;gBACP,CAAC;YACL,CAAC;YAED,IAAM,gBAAgB,GAAG,GAAG,CAAC,wCAAwC,CAAC,IAAI,CAAC,CAAC;YAC5E,EAAE,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC;gBACnB,gBAAgB,CAAC,OAAO,CAAC,UAAC,eAAe;oBACrC,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC,CAAC;wBAC/B,UAAU,CAAC,gBAAgB,GAAG,EAAE,CAAC;oBACrC,CAAC;oBAED,UAAU,CAAC,gBAAgB,CAAC,IAAI,CAAC,KAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC,CAAC;gBACvF,CAAC,CAAC,CAAC;YACP,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,UAAU,CAAC;IACtB,CAAC;IACL,qBAAC;AAAD,CAAC,AApED,CAAoC,mCAAsB,GAoEzD;AApEY,cAAc;IAD1B,sBAAS,CAAC,EAAC,IAAI,EAAE,YAAY,EAAC,CAAC;GACnB,cAAc,CAoE1B;AApEY,wCAAc","sourcesContent":["import * as ts from 'typescript';\nimport * as _ts from '../../ts-internal';\n\nimport {Reflection, ReflectionKind, DeclarationReflection} from '../../models/index';\nimport {createDeclaration} from '../factories/index';\nimport {Context} from '../context';\nimport {Component, ConverterNodeComponent} from '../components';\n\n@Component({name: 'node:class'})\nexport class ClassConverter extends ConverterNodeComponent<ts.ClassDeclaration> {\n /**\n * List of supported TypeScript syntax kinds.\n */\n supports: ts.SyntaxKind[] = [\n ts.SyntaxKind.ClassExpression,\n ts.SyntaxKind.ClassDeclaration\n ];\n\n /**\n * Analyze the given class declaration node and create a suitable reflection.\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The class declaration node that should be analyzed.\n * @return The resulting reflection or NULL.\n */\n convert(context: Context, node: ts.ClassDeclaration): Reflection {\n let reflection: DeclarationReflection;\n if (context.isInherit && context.inheritParent === node) {\n reflection = <DeclarationReflection> context.scope;\n } else {\n reflection = createDeclaration(context, node, ReflectionKind.Class);\n }\n\n context.withScope(reflection, node.typeParameters, () => {\n if (node.members) {\n node.members.forEach((member) => {\n const modifiers = ts.getCombinedModifierFlags(member);\n const privateMember = (modifiers & ts.ModifierFlags.Private) > 0;\n const exclude = context.converter.excludePrivate ? privateMember : false;\n\n if (!exclude) {\n this.owner.convertNode(context, member);\n }\n });\n }\n\n const baseType = _ts.getClassExtendsHeritageClauseElement(node);\n if (baseType) {\n const type = context.getTypeAtLocation(baseType);\n if (!context.isInherit) {\n if (!reflection.extendedTypes) {\n reflection.extendedTypes = [];\n }\n reflection.extendedTypes.push(this.owner.convertType(context, baseType, type));\n }\n\n if (type && type.symbol) {\n type.symbol.declarations.forEach((declaration) => {\n context.inherit(declaration, baseType.typeArguments);\n });\n }\n }\n\n const implementedTypes = _ts.getClassImplementsHeritageClauseElements(node);\n if (implementedTypes) {\n implementedTypes.forEach((implementedType) => {\n if (!reflection.implementedTypes) {\n reflection.implementedTypes = [];\n }\n\n reflection.implementedTypes.push(this.owner.convertType(context, implementedType));\n });\n }\n });\n\n return reflection;\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"class.js","sourceRoot":"","sources":["../../../../src/lib/converter/nodes/class.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AACjC,uCAAyC;AAEzC,4CAAuF;AACvF,4CAAuD;AAEvD,4CAAkE;AAGlE;IAAoC,kCAA2C;IAD/E;QAAA,qEAqEC;QAhEG,cAAQ,GAAoB;YACxB,EAAE,CAAC,UAAU,CAAC,eAAe;YAC7B,EAAE,CAAC,UAAU,CAAC,gBAAgB;SACjC,CAAC;;IA6DN,CAAC;IApDG,gCAAO,GAAP,UAAQ,OAAgB,EAAE,IAAyB;QAAnD,iBAmDC;QAlDG,IAAI,UAAiC,CAAC;QACtC,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,aAAa,KAAK,IAAI,CAAC,CAAC,CAAC;YACtD,UAAU,GAA2B,OAAO,CAAC,KAAK,CAAC;QACvD,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,UAAU,GAAG,yBAAiB,CAAC,OAAO,EAAE,IAAI,EAAE,sBAAc,CAAC,KAAK,CAAC,CAAC;QACxE,CAAC;QAED,OAAO,CAAC,SAAS,CAAC,UAAU,EAAE,IAAI,CAAC,cAAc,EAAE;YAC/C,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;gBACf,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,UAAC,MAAM;oBACxB,IAAM,SAAS,GAAG,EAAE,CAAC,wBAAwB,CAAC,MAAM,CAAC,CAAC;oBACtD,IAAM,aAAa,GAAG,CAAC,SAAS,GAAG,EAAE,CAAC,aAAa,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;oBACjE,IAAM,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC,cAAc,GAAG,aAAa,GAAG,KAAK,CAAC;oBAEzE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;wBACX,KAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;oBAC5C,CAAC;gBACL,CAAC,CAAC,CAAC;YACP,CAAC;YAED,IAAM,QAAQ,GAAG,GAAG,CAAC,oCAAoC,CAAC,IAAI,CAAC,CAAC;YAChE,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;gBACX,IAAM,IAAI,GAAG,OAAO,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC;gBACjD,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC;oBACrB,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC;wBAC5B,UAAU,CAAC,aAAa,GAAG,EAAE,CAAC;oBAClC,CAAC;oBACD,UAAU,CAAC,aAAa,CAAC,IAAI,CAAC,KAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC;gBACnF,CAAC;gBAED,EAAE,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;oBACtB,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,UAAC,WAAW;wBACzC,OAAO,CAAC,OAAO,CAAC,WAAW,EAAE,QAAQ,CAAC,aAAa,CAAC,CAAC;oBACzD,CAAC,CAAC,CAAC;gBACP,CAAC;YACL,CAAC;YAED,IAAM,gBAAgB,GAAG,GAAG,CAAC,wCAAwC,CAAC,IAAI,CAAC,CAAC;YAC5E,EAAE,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC;gBACnB,gBAAgB,CAAC,OAAO,CAAC,UAAC,eAAe;oBACrC,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC,CAAC;wBAC/B,UAAU,CAAC,gBAAgB,GAAG,EAAE,CAAC;oBACrC,CAAC;oBAED,UAAU,CAAC,gBAAgB,CAAC,IAAI,CAAC,KAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC,CAAC;gBACvF,CAAC,CAAC,CAAC;YACP,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,UAAU,CAAC;IACtB,CAAC;IAnEQ,cAAc;QAD1B,sBAAS,CAAC,EAAC,IAAI,EAAE,YAAY,EAAC,CAAC;OACnB,cAAc,CAoE1B;IAAD,qBAAC;CAAA,AApED,CAAoC,mCAAsB,GAoEzD;AApEY,wCAAc","sourcesContent":["import * as ts from 'typescript';\nimport * as _ts from '../../ts-internal';\n\nimport { Reflection, ReflectionKind, DeclarationReflection } from '../../models/index';\nimport { createDeclaration } from '../factories/index';\nimport { Context } from '../context';\nimport { Component, ConverterNodeComponent } from '../components';\n\n@Component({name: 'node:class'})\nexport class ClassConverter extends ConverterNodeComponent<ts.ClassDeclaration> {\n /**\n * List of supported TypeScript syntax kinds.\n */\n supports: ts.SyntaxKind[] = [\n ts.SyntaxKind.ClassExpression,\n ts.SyntaxKind.ClassDeclaration\n ];\n\n /**\n * Analyze the given class declaration node and create a suitable reflection.\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The class declaration node that should be analyzed.\n * @return The resulting reflection or NULL.\n */\n convert(context: Context, node: ts.ClassDeclaration): Reflection {\n let reflection: DeclarationReflection;\n if (context.isInherit && context.inheritParent === node) {\n reflection = <DeclarationReflection> context.scope;\n } else {\n reflection = createDeclaration(context, node, ReflectionKind.Class);\n }\n\n context.withScope(reflection, node.typeParameters, () => {\n if (node.members) {\n node.members.forEach((member) => {\n const modifiers = ts.getCombinedModifierFlags(member);\n const privateMember = (modifiers & ts.ModifierFlags.Private) > 0;\n const exclude = context.converter.excludePrivate ? privateMember : false;\n\n if (!exclude) {\n this.owner.convertNode(context, member);\n }\n });\n }\n\n const baseType = _ts.getClassExtendsHeritageClauseElement(node);\n if (baseType) {\n const type = context.getTypeAtLocation(baseType);\n if (!context.isInherit) {\n if (!reflection.extendedTypes) {\n reflection.extendedTypes = [];\n }\n reflection.extendedTypes.push(this.owner.convertType(context, baseType, type));\n }\n\n if (type && type.symbol) {\n type.symbol.declarations.forEach((declaration) => {\n context.inherit(declaration, baseType.typeArguments);\n });\n }\n }\n\n const implementedTypes = _ts.getClassImplementsHeritageClauseElements(node);\n if (implementedTypes) {\n implementedTypes.forEach((implementedType) => {\n if (!reflection.implementedTypes) {\n reflection.implementedTypes = [];\n }\n\n reflection.implementedTypes.push(this.owner.convertType(context, implementedType));\n });\n }\n });\n\n return reflection;\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/nodes/constructor.js b/node_modules/typedoc/dist/lib/converter/nodes/constructor.js
index 9d669aa7a..c70f24fcd 100644
--- a/node_modules/typedoc/dist/lib/converter/nodes/constructor.js
+++ b/node_modules/typedoc/dist/lib/converter/nodes/constructor.js
@@ -81,10 +81,10 @@ var ConstructorConverter = (function (_super) {
}
}
};
+ ConstructorConverter = __decorate([
+ components_1.Component({ name: 'node:constructor' })
+ ], ConstructorConverter);
return ConstructorConverter;
}(components_1.ConverterNodeComponent));
-ConstructorConverter = __decorate([
- components_1.Component({ name: 'node:constructor' })
-], ConstructorConverter);
exports.ConstructorConverter = ConstructorConverter;
//# sourceMappingURL=constructor.js.map \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/nodes/constructor.js.map b/node_modules/typedoc/dist/lib/converter/nodes/constructor.js.map
index 00e5a35fd..799d3ad75 100644
--- a/node_modules/typedoc/dist/lib/converter/nodes/constructor.js.map
+++ b/node_modules/typedoc/dist/lib/converter/nodes/constructor.js.map
@@ -1 +1 @@
-{"version":3,"file":"constructor.js","sourceRoot":"","sources":["../../../../src/lib/converter/nodes/constructor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AAEjC,4CAAsG;AACtG,4CAAqF;AAErF,0CAAuC;AACvC,4CAAgE;AAGhE,IAAa,oBAAoB;IAAS,wCAAiD;IAD3F;QAAA,qEAiFC;QA5EG,cAAQ,GAAoB;YACxB,EAAE,CAAC,UAAU,CAAC,WAAW;YACzB,EAAE,CAAC,UAAU,CAAC,kBAAkB;SACnC,CAAC;;IAyEN,CAAC;IAhEG,sCAAO,GAAP,UAAQ,OAAgB,EAAE,IAA+B;QACrD,IAAM,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;QAC7B,IAAM,OAAO,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;QAC5B,IAAM,MAAM,GAAG,yBAAiB,CAAC,OAAO,EAAE,IAAI,EAAE,sBAAc,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC;QAE3F,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;YAC5C,IAAM,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC,OAAO,GAAG,qBAAa,CAAC,IAAI,CAAC,CAAC;YAC9D,GAAG,CAAC,CAAkB,UAAe,EAAf,KAAA,IAAI,CAAC,UAAU,EAAf,cAAe,EAAf,IAAe;gBAAhC,IAAI,SAAS,SAAA;gBACd,IAAI,CAAC,oBAAoB,CAAC,OAAO,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;aAC1D;QACL,CAAC;QAED,OAAO,CAAC,SAAS,CAAC,MAAM,EAAE;YACtB,EAAE,CAAC,CAAC,CAAC,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC;gBACjC,IAAM,MAAI,GAAG,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC;gBAClC,IAAM,SAAS,GAAG,uBAAe,CAAC,OAAO,EAAE,IAAI,EAAE,MAAI,EAAE,sBAAc,CAAC,oBAAoB,CAAC,CAAC;gBAE5F,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;oBACb,SAAS,CAAC,IAAI,GAAG,IAAI,qBAAa,CAAC,MAAM,CAAC,IAAI,EAAE,qBAAa,CAAC,kBAAkB,EAAE,MAAM,CAAC,CAAC;gBAC9F,CAAC;gBACD,MAAM,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU,IAAI,EAAE,CAAC;gBAC5C,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;YACtC,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,OAAO,CAAC,OAAO,CAAC,qBAAS,CAAC,6BAA6B,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;YAC3E,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IASO,mDAAoB,GAA5B,UAA6B,OAAgB,EAAE,SAAkC,EAAE,OAAgB;QAC/F,IAAM,SAAS,GAAG,EAAE,CAAC,wBAAwB,CAAC,SAAS,CAAC,CAAC;QACzD,IAAM,UAAU,GAAG,SAAS,GAAG,CAAC,EAAE,CAAC,aAAa,CAAC,MAAM,GAAG,EAAE,CAAC,aAAa,CAAC,SAAS,GAAG,EAAE,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QACjH,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;YACd,MAAM,CAAC;QACX,CAAC;QAED,IAAM,gBAAgB,GAAG,SAAS,GAAG,EAAE,CAAC,aAAa,CAAC,OAAO,CAAC;QAC9D,EAAE,CAAC,CAAC,gBAAgB,IAAI,OAAO,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC,CAAC;YACvD,MAAM,CAAC;QACX,CAAC;QAED,IAAM,QAAQ,GAAG,yBAAiB,CAAC,OAAO,EAAE,SAAS,EAAE,sBAAc,CAAC,QAAQ,CAAC,CAAC;QAChF,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;YACZ,MAAM,CAAC;QACX,CAAC;QAED,QAAQ,CAAC,OAAO,CAAC,sBAAc,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QAC/C,QAAQ,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,SAAS,CAAC,IAAI,EAAE,OAAO,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC,CAAC;QAEtG,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YACV,IAAM,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC;YACnD,EAAE,CAAC,CAAC,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;gBAClB,QAAQ,CAAC,OAAO,GAAG,IAAI,eAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YAC7C,CAAC;QACL,CAAC;IACL,CAAC;IACL,2BAAC;AAAD,CAAC,AAhFD,CAA0C,mCAAsB,GAgF/D;AAhFY,oBAAoB;IADhC,sBAAS,CAAC,EAAC,IAAI,EAAE,kBAAkB,EAAC,CAAC;GACzB,oBAAoB,CAgFhC;AAhFY,oDAAoB","sourcesContent":["import * as ts from 'typescript';\n\nimport {Reflection, ReflectionKind, ReflectionFlag, ReferenceType, Comment} from '../../models/index';\nimport {createDeclaration, createSignature, createComment} from '../factories/index';\nimport {Context} from '../context';\nimport {Converter} from '../converter';\nimport {Component, ConverterNodeComponent} from '../components';\n\n@Component({name: 'node:constructor'})\nexport class ConstructorConverter extends ConverterNodeComponent<ts.ConstructorDeclaration> {\n /**\n * List of supported TypeScript syntax kinds.\n */\n supports: ts.SyntaxKind[] = [\n ts.SyntaxKind.Constructor,\n ts.SyntaxKind.ConstructSignature\n ];\n\n /**\n * Analyze the given constructor declaration node and create a suitable reflection.\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The constructor declaration node that should be analyzed.\n * @return The resulting reflection or NULL.\n */\n convert(context: Context, node: ts.ConstructorDeclaration): Reflection {\n const parent = context.scope;\n const hasBody = !!node.body;\n const method = createDeclaration(context, node, ReflectionKind.Constructor, 'constructor');\n\n if (node.parameters && node.parameters.length) {\n const comment = method ? method.comment : createComment(node);\n for (let parameter of node.parameters) {\n this.addParameterProperty(context, parameter, comment);\n }\n }\n\n context.withScope(method, () => {\n if (!hasBody || !method.signatures) {\n const name = 'new ' + parent.name;\n const signature = createSignature(context, node, name, ReflectionKind.ConstructorSignature);\n // If no return type defined, use the parent one.\n if (!node.type) {\n signature.type = new ReferenceType(parent.name, ReferenceType.SYMBOL_ID_RESOLVED, parent);\n }\n method.signatures = method.signatures || [];\n method.signatures.push(signature);\n } else {\n context.trigger(Converter.EVENT_FUNCTION_IMPLEMENTATION, method, node);\n }\n });\n\n return method;\n }\n\n /**\n * Analyze parameters in given constructor declaration node and create a suitable reflection.\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The constructor declaration node that should be analyzed.\n * @return The resulting reflection or NULL.\n */\n private addParameterProperty(context: Context, parameter: ts.ParameterDeclaration, comment: Comment) {\n const modifiers = ts.getCombinedModifierFlags(parameter);\n const visibility = modifiers & (ts.ModifierFlags.Public | ts.ModifierFlags.Protected | ts.ModifierFlags.Private);\n if (!visibility) {\n return;\n }\n\n const privateParameter = modifiers & ts.ModifierFlags.Private;\n if (privateParameter && context.converter.excludePrivate) {\n return;\n }\n\n const property = createDeclaration(context, parameter, ReflectionKind.Property);\n if (!property) {\n return;\n }\n\n property.setFlag(ReflectionFlag.Static, false);\n property.type = this.owner.convertType(context, parameter.type, context.getTypeAtLocation(parameter));\n\n if (comment) {\n const tag = comment.getTag('param', property.name);\n if (tag && tag.text) {\n property.comment = new Comment(tag.text);\n }\n }\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"constructor.js","sourceRoot":"","sources":["../../../../src/lib/converter/nodes/constructor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AAEjC,4CAAwG;AACxG,4CAAuF;AAEvF,0CAAyC;AACzC,4CAAkE;AAGlE;IAA0C,wCAAiD;IAD3F;QAAA,qEAiFC;QA5EG,cAAQ,GAAoB;YACxB,EAAE,CAAC,UAAU,CAAC,WAAW;YACzB,EAAE,CAAC,UAAU,CAAC,kBAAkB;SACnC,CAAC;;IAyEN,CAAC;IAhEG,sCAAO,GAAP,UAAQ,OAAgB,EAAE,IAA+B;QACrD,IAAM,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;QAC7B,IAAM,OAAO,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;QAC5B,IAAM,MAAM,GAAG,yBAAiB,CAAC,OAAO,EAAE,IAAI,EAAE,sBAAc,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC;QAE3F,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;YAC5C,IAAM,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC,OAAO,GAAG,qBAAa,CAAC,IAAI,CAAC,CAAC;YAC9D,GAAG,CAAC,CAAkB,UAAe,EAAf,KAAA,IAAI,CAAC,UAAU,EAAf,cAAe,EAAf,IAAe;gBAAhC,IAAI,SAAS,SAAA;gBACd,IAAI,CAAC,oBAAoB,CAAC,OAAO,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;aAC1D;QACL,CAAC;QAED,OAAO,CAAC,SAAS,CAAC,MAAM,EAAE;YACtB,EAAE,CAAC,CAAC,CAAC,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC;gBACjC,IAAM,MAAI,GAAG,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC;gBAClC,IAAM,SAAS,GAAG,uBAAe,CAAC,OAAO,EAAE,IAAI,EAAE,MAAI,EAAE,sBAAc,CAAC,oBAAoB,CAAC,CAAC;gBAE5F,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;oBACb,SAAS,CAAC,IAAI,GAAG,IAAI,qBAAa,CAAC,MAAM,CAAC,IAAI,EAAE,qBAAa,CAAC,kBAAkB,EAAE,MAAM,CAAC,CAAC;gBAC9F,CAAC;gBACD,MAAM,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU,IAAI,EAAE,CAAC;gBAC5C,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;YACtC,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,OAAO,CAAC,OAAO,CAAC,qBAAS,CAAC,6BAA6B,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;YAC3E,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IASO,mDAAoB,GAA5B,UAA6B,OAAgB,EAAE,SAAkC,EAAE,OAAgB;QAC/F,IAAM,SAAS,GAAG,EAAE,CAAC,wBAAwB,CAAC,SAAS,CAAC,CAAC;QACzD,IAAM,UAAU,GAAG,SAAS,GAAG,CAAC,EAAE,CAAC,aAAa,CAAC,MAAM,GAAG,EAAE,CAAC,aAAa,CAAC,SAAS,GAAG,EAAE,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QACjH,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;YACd,MAAM,CAAC;QACX,CAAC;QAED,IAAM,gBAAgB,GAAG,SAAS,GAAG,EAAE,CAAC,aAAa,CAAC,OAAO,CAAC;QAC9D,EAAE,CAAC,CAAC,gBAAgB,IAAI,OAAO,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC,CAAC;YACvD,MAAM,CAAC;QACX,CAAC;QAED,IAAM,QAAQ,GAAG,yBAAiB,CAAC,OAAO,EAAE,SAAS,EAAE,sBAAc,CAAC,QAAQ,CAAC,CAAC;QAChF,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;YACZ,MAAM,CAAC;QACX,CAAC;QAED,QAAQ,CAAC,OAAO,CAAC,sBAAc,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QAC/C,QAAQ,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,SAAS,CAAC,IAAI,EAAE,OAAO,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC,CAAC;QAEtG,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YACV,IAAM,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC;YACnD,EAAE,CAAC,CAAC,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;gBAClB,QAAQ,CAAC,OAAO,GAAG,IAAI,eAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YAC7C,CAAC;QACL,CAAC;IACL,CAAC;IA/EQ,oBAAoB;QADhC,sBAAS,CAAC,EAAC,IAAI,EAAE,kBAAkB,EAAC,CAAC;OACzB,oBAAoB,CAgFhC;IAAD,2BAAC;CAAA,AAhFD,CAA0C,mCAAsB,GAgF/D;AAhFY,oDAAoB","sourcesContent":["import * as ts from 'typescript';\n\nimport { Reflection, ReflectionKind, ReflectionFlag, ReferenceType, Comment } from '../../models/index';\nimport { createDeclaration, createSignature, createComment } from '../factories/index';\nimport { Context } from '../context';\nimport { Converter } from '../converter';\nimport { Component, ConverterNodeComponent } from '../components';\n\n@Component({name: 'node:constructor'})\nexport class ConstructorConverter extends ConverterNodeComponent<ts.ConstructorDeclaration> {\n /**\n * List of supported TypeScript syntax kinds.\n */\n supports: ts.SyntaxKind[] = [\n ts.SyntaxKind.Constructor,\n ts.SyntaxKind.ConstructSignature\n ];\n\n /**\n * Analyze the given constructor declaration node and create a suitable reflection.\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The constructor declaration node that should be analyzed.\n * @return The resulting reflection or NULL.\n */\n convert(context: Context, node: ts.ConstructorDeclaration): Reflection {\n const parent = context.scope;\n const hasBody = !!node.body;\n const method = createDeclaration(context, node, ReflectionKind.Constructor, 'constructor');\n\n if (node.parameters && node.parameters.length) {\n const comment = method ? method.comment : createComment(node);\n for (let parameter of node.parameters) {\n this.addParameterProperty(context, parameter, comment);\n }\n }\n\n context.withScope(method, () => {\n if (!hasBody || !method.signatures) {\n const name = 'new ' + parent.name;\n const signature = createSignature(context, node, name, ReflectionKind.ConstructorSignature);\n // If no return type defined, use the parent one.\n if (!node.type) {\n signature.type = new ReferenceType(parent.name, ReferenceType.SYMBOL_ID_RESOLVED, parent);\n }\n method.signatures = method.signatures || [];\n method.signatures.push(signature);\n } else {\n context.trigger(Converter.EVENT_FUNCTION_IMPLEMENTATION, method, node);\n }\n });\n\n return method;\n }\n\n /**\n * Analyze parameters in given constructor declaration node and create a suitable reflection.\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The constructor declaration node that should be analyzed.\n * @return The resulting reflection or NULL.\n */\n private addParameterProperty(context: Context, parameter: ts.ParameterDeclaration, comment: Comment) {\n const modifiers = ts.getCombinedModifierFlags(parameter);\n const visibility = modifiers & (ts.ModifierFlags.Public | ts.ModifierFlags.Protected | ts.ModifierFlags.Private);\n if (!visibility) {\n return;\n }\n\n const privateParameter = modifiers & ts.ModifierFlags.Private;\n if (privateParameter && context.converter.excludePrivate) {\n return;\n }\n\n const property = createDeclaration(context, parameter, ReflectionKind.Property);\n if (!property) {\n return;\n }\n\n property.setFlag(ReflectionFlag.Static, false);\n property.type = this.owner.convertType(context, parameter.type, context.getTypeAtLocation(parameter));\n\n if (comment) {\n const tag = comment.getTag('param', property.name);\n if (tag && tag.text) {\n property.comment = new Comment(tag.text);\n }\n }\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/nodes/enum.js b/node_modules/typedoc/dist/lib/converter/nodes/enum.js
index a493998d4..787080830 100644
--- a/node_modules/typedoc/dist/lib/converter/nodes/enum.js
+++ b/node_modules/typedoc/dist/lib/converter/nodes/enum.js
@@ -50,10 +50,10 @@ var EnumConverter = (function (_super) {
}
return member;
};
+ EnumConverter = __decorate([
+ components_1.Component({ name: 'node:enum' })
+ ], EnumConverter);
return EnumConverter;
}(components_1.ConverterNodeComponent));
-EnumConverter = __decorate([
- components_1.Component({ name: 'node:enum' })
-], EnumConverter);
exports.EnumConverter = EnumConverter;
//# sourceMappingURL=enum.js.map \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/nodes/enum.js.map b/node_modules/typedoc/dist/lib/converter/nodes/enum.js.map
index e5ea20ced..403ba89df 100644
--- a/node_modules/typedoc/dist/lib/converter/nodes/enum.js.map
+++ b/node_modules/typedoc/dist/lib/converter/nodes/enum.js.map
@@ -1 +1 @@
-{"version":3,"file":"enum.js","sourceRoot":"","sources":["../../../../src/lib/converter/nodes/enum.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AAEjC,4CAA8D;AAC9D,4CAAqD;AAErD,4CAAgE;AAChE,kCAA6C;AAG7C,IAAa,aAAa;IAAS,iCAA0C;IAD7E;QAAA,qEA6CC;QAxCG,cAAQ,GAAoB;YACxB,EAAE,CAAC,UAAU,CAAC,eAAe;SAChC,CAAC;;IAsCN,CAAC;IA7BG,+BAAO,GAAP,UAAQ,OAAgB,EAAE,IAAwB;QAAlD,iBAYC;QAXG,IAAM,WAAW,GAAG,yBAAiB,CAAC,OAAO,EAAE,IAAI,EAAE,sBAAc,CAAC,IAAI,CAAC,CAAC;QAE1E,OAAO,CAAC,SAAS,CAAC,WAAW,EAAE;YAC3B,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;gBACf,GAAG,CAAC,CAAe,UAAY,EAAZ,KAAA,IAAI,CAAC,OAAO,EAAZ,cAAY,EAAZ,IAAY;oBAA1B,IAAI,MAAM,SAAA;oBACX,KAAI,CAAC,aAAa,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;iBACvC;YACL,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,WAAW,CAAC;IACvB,CAAC;IASO,qCAAa,GAArB,UAAsB,OAAgB,EAAE,IAAmB;QACvD,IAAM,MAAM,GAAG,yBAAiB,CAAC,OAAO,EAAE,IAAI,EAAE,sBAAc,CAAC,UAAU,CAAC,CAAC;QAC3E,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;YACT,MAAM,CAAC,YAAY,GAAG,2BAAmB,CAAC,IAAI,CAAC,CAAC;QACpD,CAAC;QAED,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IACL,oBAAC;AAAD,CAAC,AA5CD,CAAmC,mCAAsB,GA4CxD;AA5CY,aAAa;IADzB,sBAAS,CAAC,EAAC,IAAI,EAAE,WAAW,EAAC,CAAC;GAClB,aAAa,CA4CzB;AA5CY,sCAAa","sourcesContent":["import * as ts from 'typescript';\n\nimport {Reflection, ReflectionKind} from '../../models/index';\nimport {createDeclaration} from '../factories/index';\nimport {Context} from '../context';\nimport {Component, ConverterNodeComponent} from '../components';\nimport {convertDefaultValue} from '../index';\n\n@Component({name: 'node:enum'})\nexport class EnumConverter extends ConverterNodeComponent<ts.EnumDeclaration> {\n /**\n * List of supported TypeScript syntax kinds.\n */\n supports: ts.SyntaxKind[] = [\n ts.SyntaxKind.EnumDeclaration\n ];\n\n /**\n * Analyze the given enumeration declaration node and create a suitable reflection.\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The enumeration declaration node that should be analyzed.\n * @return The resulting reflection or NULL.\n */\n convert(context: Context, node: ts.EnumDeclaration): Reflection {\n const enumeration = createDeclaration(context, node, ReflectionKind.Enum);\n\n context.withScope(enumeration, () => {\n if (node.members) {\n for (let member of node.members) {\n this.convertMember(context, member);\n }\n }\n });\n\n return enumeration;\n }\n\n /**\n * Analyze the given enumeration member node and create a suitable reflection.\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The enumeration member node that should be analyzed.\n * @return The resulting reflection or NULL.\n */\n private convertMember(context: Context, node: ts.EnumMember): Reflection {\n const member = createDeclaration(context, node, ReflectionKind.EnumMember);\n if (member) {\n member.defaultValue = convertDefaultValue(node);\n }\n\n return member;\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"enum.js","sourceRoot":"","sources":["../../../../src/lib/converter/nodes/enum.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AAEjC,4CAAgE;AAChE,4CAAuD;AAEvD,4CAAkE;AAClE,kCAA+C;AAG/C;IAAmC,iCAA0C;IAD7E;QAAA,qEA6CC;QAxCG,cAAQ,GAAoB;YACxB,EAAE,CAAC,UAAU,CAAC,eAAe;SAChC,CAAC;;IAsCN,CAAC;IA7BG,+BAAO,GAAP,UAAQ,OAAgB,EAAE,IAAwB;QAAlD,iBAYC;QAXG,IAAM,WAAW,GAAG,yBAAiB,CAAC,OAAO,EAAE,IAAI,EAAE,sBAAc,CAAC,IAAI,CAAC,CAAC;QAE1E,OAAO,CAAC,SAAS,CAAC,WAAW,EAAE;YAC3B,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;gBACf,GAAG,CAAC,CAAe,UAAY,EAAZ,KAAA,IAAI,CAAC,OAAO,EAAZ,cAAY,EAAZ,IAAY;oBAA1B,IAAI,MAAM,SAAA;oBACX,KAAI,CAAC,aAAa,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;iBACvC;YACL,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,WAAW,CAAC;IACvB,CAAC;IASO,qCAAa,GAArB,UAAsB,OAAgB,EAAE,IAAmB;QACvD,IAAM,MAAM,GAAG,yBAAiB,CAAC,OAAO,EAAE,IAAI,EAAE,sBAAc,CAAC,UAAU,CAAC,CAAC;QAC3E,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;YACT,MAAM,CAAC,YAAY,GAAG,2BAAmB,CAAC,IAAI,CAAC,CAAC;QACpD,CAAC;QAED,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IA3CQ,aAAa;QADzB,sBAAS,CAAC,EAAC,IAAI,EAAE,WAAW,EAAC,CAAC;OAClB,aAAa,CA4CzB;IAAD,oBAAC;CAAA,AA5CD,CAAmC,mCAAsB,GA4CxD;AA5CY,sCAAa","sourcesContent":["import * as ts from 'typescript';\n\nimport { Reflection, ReflectionKind } from '../../models/index';\nimport { createDeclaration } from '../factories/index';\nimport { Context } from '../context';\nimport { Component, ConverterNodeComponent } from '../components';\nimport { convertDefaultValue } from '../index';\n\n@Component({name: 'node:enum'})\nexport class EnumConverter extends ConverterNodeComponent<ts.EnumDeclaration> {\n /**\n * List of supported TypeScript syntax kinds.\n */\n supports: ts.SyntaxKind[] = [\n ts.SyntaxKind.EnumDeclaration\n ];\n\n /**\n * Analyze the given enumeration declaration node and create a suitable reflection.\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The enumeration declaration node that should be analyzed.\n * @return The resulting reflection or NULL.\n */\n convert(context: Context, node: ts.EnumDeclaration): Reflection {\n const enumeration = createDeclaration(context, node, ReflectionKind.Enum);\n\n context.withScope(enumeration, () => {\n if (node.members) {\n for (let member of node.members) {\n this.convertMember(context, member);\n }\n }\n });\n\n return enumeration;\n }\n\n /**\n * Analyze the given enumeration member node and create a suitable reflection.\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The enumeration member node that should be analyzed.\n * @return The resulting reflection or NULL.\n */\n private convertMember(context: Context, node: ts.EnumMember): Reflection {\n const member = createDeclaration(context, node, ReflectionKind.EnumMember);\n if (member) {\n member.defaultValue = convertDefaultValue(node);\n }\n\n return member;\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/nodes/export.js b/node_modules/typedoc/dist/lib/converter/nodes/export.js
index 0a5e1c1b4..05b836348 100644
--- a/node_modules/typedoc/dist/lib/converter/nodes/export.js
+++ b/node_modules/typedoc/dist/lib/converter/nodes/export.js
@@ -37,7 +37,7 @@ var ExportConverter = (function (_super) {
var type = context.getTypeAtLocation(node.expression);
symbol = type ? type.symbol : undefined;
}
- if (symbol) {
+ if (symbol && symbol.declarations) {
var project_1 = context.project;
symbol.declarations.forEach(function (declaration) {
if (!declaration.symbol) {
@@ -62,10 +62,10 @@ var ExportConverter = (function (_super) {
}
return context.scope;
};
+ ExportConverter = __decorate([
+ components_1.Component({ name: 'node:export' })
+ ], ExportConverter);
return ExportConverter;
}(components_1.ConverterNodeComponent));
-ExportConverter = __decorate([
- components_1.Component({ name: 'node:export' })
-], ExportConverter);
exports.ExportConverter = ExportConverter;
//# sourceMappingURL=export.js.map \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/nodes/export.js.map b/node_modules/typedoc/dist/lib/converter/nodes/export.js.map
index c7b2835c5..a96ba2606 100644
--- a/node_modules/typedoc/dist/lib/converter/nodes/export.js.map
+++ b/node_modules/typedoc/dist/lib/converter/nodes/export.js.map
@@ -1 +1 @@
-{"version":3,"file":"export.js","sourceRoot":"","sources":["../../../../src/lib/converter/nodes/export.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AAEjC,4CAAqF;AAErF,4CAAgE;AAGhE,IAAa,eAAe;IAAS,mCAA2C;IADhF;QAAA,qEAgDC;QA3CG,cAAQ,GAAoB;YACxB,EAAE,CAAC,UAAU,CAAC,gBAAgB;SACjC,CAAC;;IAyCN,CAAC;IAvCG,iCAAO,GAAP,UAAQ,OAAgB,EAAE,IAAyB;QAC/C,IAAI,MAAM,GAAc,SAAS,CAAC;QAGlC,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,GAAG,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC;YACrF,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,gBAAgB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC3D,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,IAAI,IAAI,GAAG,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YACtD,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC;QAC5C,CAAC;QACD,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;YACT,IAAM,SAAO,GAAG,OAAO,CAAC,OAAO,CAAC;YAChC,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,UAAC,WAAW;gBACpC,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;oBACtB,MAAM,CAAC;gBACX,CAAC;gBACD,IAAM,EAAE,GAAG,SAAO,CAAC,aAAa,CAAC,OAAO,CAAC,WAAW,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;gBAC1E,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;oBACN,MAAM,CAAC;gBACX,CAAC;gBAED,IAAM,UAAU,GAAG,SAAO,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;gBAC3C,EAAE,CAAC,CAAC,IAAI,CAAC,cAAc,IAAI,UAAU,YAAY,6BAAqB,CAAC,CAAC,CAAC;oBAC5C,UAAW,CAAC,OAAO,CAAC,sBAAc,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAAC;gBACxF,CAAC;gBACD,cAAc,CAAC,UAAU,CAAC,CAAC;YAC/B,CAAC,CAAC,CAAC;QACP,CAAC;QAED,wBAAwB,UAAsB;YAC1C,EAAE,CAAC,CAAC,UAAU,YAAY,6BAAqB,CAAC,CAAC,CAAC;gBACrB,UAAW,CAAC,OAAO,CAAC,sBAAc,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;YAChF,CAAC;YAED,UAAU,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;QACxC,CAAC;QAED,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;IACzB,CAAC;IACL,sBAAC;AAAD,CAAC,AA/CD,CAAqC,mCAAsB,GA+C1D;AA/CY,eAAe;IAD3B,sBAAS,CAAC,EAAC,IAAI,EAAE,aAAa,EAAC,CAAC;GACpB,eAAe,CA+C3B;AA/CY,0CAAe","sourcesContent":["import * as ts from 'typescript';\n\nimport {Reflection, ReflectionFlag, DeclarationReflection} from '../../models/index';\nimport {Context} from '../context';\nimport {Component, ConverterNodeComponent} from '../components';\n\n@Component({name: 'node:export'})\nexport class ExportConverter extends ConverterNodeComponent<ts.ExportAssignment> {\n /**\n * List of supported TypeScript syntax kinds.\n */\n supports: ts.SyntaxKind[] = [\n ts.SyntaxKind.ExportAssignment\n ];\n\n convert(context: Context, node: ts.ExportAssignment): Reflection {\n let symbol: ts.Symbol = undefined;\n\n // default export\n if (node.symbol && (node.symbol.flags & ts.SymbolFlags.Alias) === ts.SymbolFlags.Alias) {\n symbol = context.checker.getAliasedSymbol(node.symbol);\n } else {\n let type = context.getTypeAtLocation(node.expression);\n symbol = type ? type.symbol : undefined;\n }\n if (symbol) {\n const project = context.project;\n symbol.declarations.forEach((declaration) => {\n if (!declaration.symbol) {\n return;\n }\n const id = project.symbolMapping[context.getSymbolID(declaration.symbol)];\n if (!id) {\n return;\n }\n\n const reflection = project.reflections[id];\n if (node.isExportEquals && reflection instanceof DeclarationReflection) {\n (<DeclarationReflection> reflection).setFlag(ReflectionFlag.ExportAssignment, true);\n }\n markAsExported(reflection);\n });\n }\n\n function markAsExported(reflection: Reflection) {\n if (reflection instanceof DeclarationReflection) {\n (<DeclarationReflection> reflection).setFlag(ReflectionFlag.Exported, true);\n }\n\n reflection.traverse(markAsExported);\n }\n\n return context.scope;\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"export.js","sourceRoot":"","sources":["../../../../src/lib/converter/nodes/export.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AAEjC,4CAAuF;AAEvF,4CAAkE;AAGlE;IAAqC,mCAA2C;IADhF;QAAA,qEAgDC;QA3CG,cAAQ,GAAoB;YACxB,EAAE,CAAC,UAAU,CAAC,gBAAgB;SACjC,CAAC;;IAyCN,CAAC;IAvCG,iCAAO,GAAP,UAAQ,OAAgB,EAAE,IAAyB;QAC/C,IAAI,MAAM,GAAc,SAAS,CAAC;QAGlC,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,GAAG,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC;YACrF,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,gBAAgB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC3D,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,IAAI,IAAI,GAAG,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YACtD,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC;QAC5C,CAAC;QACD,EAAE,CAAC,CAAC,MAAM,IAAI,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC;YAChC,IAAM,SAAO,GAAG,OAAO,CAAC,OAAO,CAAC;YAChC,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,UAAC,WAAW;gBACpC,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;oBACtB,MAAM,CAAC;gBACX,CAAC;gBACD,IAAM,EAAE,GAAG,SAAO,CAAC,aAAa,CAAC,OAAO,CAAC,WAAW,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;gBAC1E,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;oBACN,MAAM,CAAC;gBACX,CAAC;gBAED,IAAM,UAAU,GAAG,SAAO,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;gBAC3C,EAAE,CAAC,CAAC,IAAI,CAAC,cAAc,IAAI,UAAU,YAAY,6BAAqB,CAAC,CAAC,CAAC;oBAC5C,UAAW,CAAC,OAAO,CAAC,sBAAc,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAAC;gBACxF,CAAC;gBACD,cAAc,CAAC,UAAU,CAAC,CAAC;YAC/B,CAAC,CAAC,CAAC;QACP,CAAC;QAED,wBAAwB,UAAsB;YAC1C,EAAE,CAAC,CAAC,UAAU,YAAY,6BAAqB,CAAC,CAAC,CAAC;gBACrB,UAAW,CAAC,OAAO,CAAC,sBAAc,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;YAChF,CAAC;YAED,UAAU,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;QACxC,CAAC;QAED,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;IACzB,CAAC;IA9CQ,eAAe;QAD3B,sBAAS,CAAC,EAAC,IAAI,EAAE,aAAa,EAAC,CAAC;OACpB,eAAe,CA+C3B;IAAD,sBAAC;CAAA,AA/CD,CAAqC,mCAAsB,GA+C1D;AA/CY,0CAAe","sourcesContent":["import * as ts from 'typescript';\n\nimport { Reflection, ReflectionFlag, DeclarationReflection } from '../../models/index';\nimport { Context } from '../context';\nimport { Component, ConverterNodeComponent } from '../components';\n\n@Component({name: 'node:export'})\nexport class ExportConverter extends ConverterNodeComponent<ts.ExportAssignment> {\n /**\n * List of supported TypeScript syntax kinds.\n */\n supports: ts.SyntaxKind[] = [\n ts.SyntaxKind.ExportAssignment\n ];\n\n convert(context: Context, node: ts.ExportAssignment): Reflection {\n let symbol: ts.Symbol = undefined;\n\n // default export\n if (node.symbol && (node.symbol.flags & ts.SymbolFlags.Alias) === ts.SymbolFlags.Alias) {\n symbol = context.checker.getAliasedSymbol(node.symbol);\n } else {\n let type = context.getTypeAtLocation(node.expression);\n symbol = type ? type.symbol : undefined;\n }\n if (symbol && symbol.declarations) {\n const project = context.project;\n symbol.declarations.forEach((declaration) => {\n if (!declaration.symbol) {\n return;\n }\n const id = project.symbolMapping[context.getSymbolID(declaration.symbol)];\n if (!id) {\n return;\n }\n\n const reflection = project.reflections[id];\n if (node.isExportEquals && reflection instanceof DeclarationReflection) {\n (<DeclarationReflection> reflection).setFlag(ReflectionFlag.ExportAssignment, true);\n }\n markAsExported(reflection);\n });\n }\n\n function markAsExported(reflection: Reflection) {\n if (reflection instanceof DeclarationReflection) {\n (<DeclarationReflection> reflection).setFlag(ReflectionFlag.Exported, true);\n }\n\n reflection.traverse(markAsExported);\n }\n\n return context.scope;\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/nodes/function.js b/node_modules/typedoc/dist/lib/converter/nodes/function.js
index 1d6e905b1..230e313e1 100644
--- a/node_modules/typedoc/dist/lib/converter/nodes/function.js
+++ b/node_modules/typedoc/dist/lib/converter/nodes/function.js
@@ -51,10 +51,10 @@ var FunctionConverter = (function (_super) {
});
return method;
};
+ FunctionConverter = __decorate([
+ components_1.Component({ name: 'node:function' })
+ ], FunctionConverter);
return FunctionConverter;
}(components_1.ConverterNodeComponent));
-FunctionConverter = __decorate([
- components_1.Component({ name: 'node:function' })
-], FunctionConverter);
exports.FunctionConverter = FunctionConverter;
//# sourceMappingURL=function.js.map \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/nodes/function.js.map b/node_modules/typedoc/dist/lib/converter/nodes/function.js.map
index d2a8e511c..e95ed3f15 100644
--- a/node_modules/typedoc/dist/lib/converter/nodes/function.js.map
+++ b/node_modules/typedoc/dist/lib/converter/nodes/function.js.map
@@ -1 +1 @@
-{"version":3,"file":"function.js","sourceRoot":"","sources":["../../../../src/lib/converter/nodes/function.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AAEjC,4CAA8D;AAC9D,4CAAsE;AAEtE,0CAAuC;AACvC,4CAAgE;AAGhE,IAAa,iBAAiB;IAAS,qCAAmE;IAD1G;QAAA,qEAsCC;QAjCG,cAAQ,GAAoB;YACxB,EAAE,CAAC,UAAU,CAAC,eAAe;YAC7B,EAAE,CAAC,UAAU,CAAC,iBAAiB;YAC/B,EAAE,CAAC,UAAU,CAAC,mBAAmB;SACpC,CAAC;;IA6BN,CAAC;IApBG,mCAAO,GAAP,UAAQ,OAAgB,EAAE,IAAiD;QACvE,IAAM,KAAK,GAAK,OAAO,CAAC,KAAK,CAAC;QAC9B,IAAM,IAAI,GAAM,KAAK,CAAC,IAAI,GAAG,sBAAc,CAAC,gBAAgB,GAAG,sBAAc,CAAC,MAAM,GAAG,sBAAc,CAAC,QAAQ,CAAC;QAC/G,IAAM,OAAO,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;QAC5B,IAAM,MAAM,GAAI,yBAAiB,CAAC,OAAO,EAAY,IAAI,EAAE,IAAI,CAAC,CAAC;QAEjE,OAAO,CAAC,SAAS,CAAC,MAAM,EAAE;YACtB,EAAE,CAAC,CAAC,CAAC,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC;gBACjC,IAAM,SAAS,GAAG,uBAAe,CAAC,OAAO,EAA4B,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,sBAAc,CAAC,aAAa,CAAC,CAAC;gBACtH,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC;oBACrB,MAAM,CAAC,UAAU,GAAG,EAAE,CAAC;gBAC3B,CAAC;gBACD,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;YACtC,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,OAAO,CAAC,OAAO,CAAC,qBAAS,CAAC,6BAA6B,EAAE,MAAM,EAAY,IAAI,CAAC,CAAC;YACrF,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IACL,wBAAC;AAAD,CAAC,AArCD,CAAuC,mCAAsB,GAqC5D;AArCY,iBAAiB;IAD7B,sBAAS,CAAC,EAAC,IAAI,EAAE,eAAe,EAAC,CAAC;GACtB,iBAAiB,CAqC7B;AArCY,8CAAiB","sourcesContent":["import * as ts from 'typescript';\n\nimport {Reflection, ReflectionKind} from '../../models/index';\nimport {createDeclaration, createSignature} from '../factories/index';\nimport {Context} from '../context';\nimport {Converter} from '../converter';\nimport {Component, ConverterNodeComponent} from '../components';\n\n@Component({name: 'node:function'})\nexport class FunctionConverter extends ConverterNodeComponent<ts.FunctionDeclaration|ts.MethodDeclaration> {\n /**\n * List of supported TypeScript syntax kinds.\n */\n supports: ts.SyntaxKind[] = [\n ts.SyntaxKind.MethodSignature,\n ts.SyntaxKind.MethodDeclaration,\n ts.SyntaxKind.FunctionDeclaration\n ];\n\n /**\n * Analyze the given function declaration node and create a suitable reflection.\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The function declaration node that should be analyzed.\n * @return The resulting reflection or NULL.\n */\n convert(context: Context, node: ts.FunctionDeclaration|ts.MethodDeclaration): Reflection {\n const scope = context.scope;\n const kind = scope.kind & ReflectionKind.ClassOrInterface ? ReflectionKind.Method : ReflectionKind.Function;\n const hasBody = !!node.body;\n const method = createDeclaration(context, <ts.Node> node, kind);\n\n context.withScope(method, () => {\n if (!hasBody || !method.signatures) {\n const signature = createSignature(context, <ts.SignatureDeclaration> node, method.name, ReflectionKind.CallSignature);\n if (!method.signatures) {\n method.signatures = [];\n }\n method.signatures.push(signature);\n } else {\n context.trigger(Converter.EVENT_FUNCTION_IMPLEMENTATION, method, <ts.Node> node);\n }\n });\n\n return method;\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"function.js","sourceRoot":"","sources":["../../../../src/lib/converter/nodes/function.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AAEjC,4CAAgE;AAChE,4CAAwE;AAExE,0CAAyC;AACzC,4CAAkE;AAGlE;IAAuC,qCAAmE;IAD1G;QAAA,qEAsCC;QAjCG,cAAQ,GAAoB;YACxB,EAAE,CAAC,UAAU,CAAC,eAAe;YAC7B,EAAE,CAAC,UAAU,CAAC,iBAAiB;YAC/B,EAAE,CAAC,UAAU,CAAC,mBAAmB;SACpC,CAAC;;IA6BN,CAAC;IApBG,mCAAO,GAAP,UAAQ,OAAgB,EAAE,IAAiD;QACvE,IAAM,KAAK,GAAK,OAAO,CAAC,KAAK,CAAC;QAC9B,IAAM,IAAI,GAAM,KAAK,CAAC,IAAI,GAAG,sBAAc,CAAC,gBAAgB,GAAG,sBAAc,CAAC,MAAM,GAAG,sBAAc,CAAC,QAAQ,CAAC;QAC/G,IAAM,OAAO,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;QAC5B,IAAM,MAAM,GAAI,yBAAiB,CAAC,OAAO,EAAY,IAAI,EAAE,IAAI,CAAC,CAAC;QAEjE,OAAO,CAAC,SAAS,CAAC,MAAM,EAAE;YACtB,EAAE,CAAC,CAAC,CAAC,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC;gBACjC,IAAM,SAAS,GAAG,uBAAe,CAAC,OAAO,EAA4B,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,sBAAc,CAAC,aAAa,CAAC,CAAC;gBACtH,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC;oBACrB,MAAM,CAAC,UAAU,GAAG,EAAE,CAAC;gBAC3B,CAAC;gBACD,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;YACtC,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,OAAO,CAAC,OAAO,CAAC,qBAAS,CAAC,6BAA6B,EAAE,MAAM,EAAY,IAAI,CAAC,CAAC;YACrF,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IApCQ,iBAAiB;QAD7B,sBAAS,CAAC,EAAC,IAAI,EAAE,eAAe,EAAC,CAAC;OACtB,iBAAiB,CAqC7B;IAAD,wBAAC;CAAA,AArCD,CAAuC,mCAAsB,GAqC5D;AArCY,8CAAiB","sourcesContent":["import * as ts from 'typescript';\n\nimport { Reflection, ReflectionKind } from '../../models/index';\nimport { createDeclaration, createSignature } from '../factories/index';\nimport { Context } from '../context';\nimport { Converter } from '../converter';\nimport { Component, ConverterNodeComponent } from '../components';\n\n@Component({name: 'node:function'})\nexport class FunctionConverter extends ConverterNodeComponent<ts.FunctionDeclaration|ts.MethodDeclaration> {\n /**\n * List of supported TypeScript syntax kinds.\n */\n supports: ts.SyntaxKind[] = [\n ts.SyntaxKind.MethodSignature,\n ts.SyntaxKind.MethodDeclaration,\n ts.SyntaxKind.FunctionDeclaration\n ];\n\n /**\n * Analyze the given function declaration node and create a suitable reflection.\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The function declaration node that should be analyzed.\n * @return The resulting reflection or NULL.\n */\n convert(context: Context, node: ts.FunctionDeclaration|ts.MethodDeclaration): Reflection {\n const scope = context.scope;\n const kind = scope.kind & ReflectionKind.ClassOrInterface ? ReflectionKind.Method : ReflectionKind.Function;\n const hasBody = !!node.body;\n const method = createDeclaration(context, <ts.Node> node, kind);\n\n context.withScope(method, () => {\n if (!hasBody || !method.signatures) {\n const signature = createSignature(context, <ts.SignatureDeclaration> node, method.name, ReflectionKind.CallSignature);\n if (!method.signatures) {\n method.signatures = [];\n }\n method.signatures.push(signature);\n } else {\n context.trigger(Converter.EVENT_FUNCTION_IMPLEMENTATION, method, <ts.Node> node);\n }\n });\n\n return method;\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/nodes/index.js.map b/node_modules/typedoc/dist/lib/converter/nodes/index.js.map
index 072e3fbf6..558c14d53 100644
--- a/node_modules/typedoc/dist/lib/converter/nodes/index.js.map
+++ b/node_modules/typedoc/dist/lib/converter/nodes/index.js.map
@@ -1 +1 @@
-{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/converter/nodes/index.ts"],"names":[],"mappings":";;AAAA,uCAA6C;AAArC,uCAAA,iBAAiB,CAAA;AACzB,iCAAuC;AAA/B,iCAAA,cAAc,CAAA;AACtB,iCAAuC;AAA/B,iCAAA,cAAc,CAAA;AACtB,iCAAuC;AAA/B,iCAAA,cAAc,CAAA;AACtB,6CAAmD;AAA3C,6CAAA,oBAAoB,CAAA;AAC5B,+BAAqC;AAA7B,+BAAA,aAAa,CAAA;AACrB,mCAAyC;AAAjC,mCAAA,eAAe,CAAA;AACvB,uCAA6C;AAArC,uCAAA,iBAAiB,CAAA;AACzB,yCAA+C;AAAvC,yCAAA,kBAAkB,CAAA;AAC1B,+CAAoD;AAA5C,8CAAA,oBAAoB,CAAA;AAC5B,mDAAwD;AAAhD,kDAAA,sBAAsB,CAAA;AAC9B,mCAAyC;AAAjC,mCAAA,eAAe,CAAA;AACvB,mDAAoD;AAA5C,8CAAA,kBAAkB,CAAA;AAC1B,qDAA0D;AAAlD,oDAAA,uBAAuB,CAAA;AAC/B,2DAAgE;AAAxD,0DAAA,0BAA0B,CAAA;AAClC,uCAA6C;AAArC,uCAAA,iBAAiB,CAAA","sourcesContent":["export {AccessorConverter} from './accessor';\nexport {AliasConverter} from './alias';\nexport {BlockConverter} from './block';\nexport {ClassConverter} from './class';\nexport {ConstructorConverter} from './constructor';\nexport {EnumConverter} from './enum';\nexport {ExportConverter} from './export';\nexport {FunctionConverter} from './function';\nexport {InterfaceConverter} from './interface';\nexport {TypeLiteralConverter} from './literal-type';\nexport {ObjectLiteralConverter} from './literal-object';\nexport {ModuleConverter} from './module';\nexport {SignatureConverter} from './signature-call';\nexport {IndexSignatureConverter} from './signature-index';\nexport {VariableStatementConverter} from './variable-statement';\nexport {VariableConverter} from './variable';\n"]} \ No newline at end of file
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/converter/nodes/index.ts"],"names":[],"mappings":";;AAAA,uCAA+C;AAAtC,uCAAA,iBAAiB,CAAA;AAC1B,iCAAyC;AAAhC,iCAAA,cAAc,CAAA;AACvB,iCAAyC;AAAhC,iCAAA,cAAc,CAAA;AACvB,iCAAyC;AAAhC,iCAAA,cAAc,CAAA;AACvB,6CAAqD;AAA5C,6CAAA,oBAAoB,CAAA;AAC7B,+BAAuC;AAA9B,+BAAA,aAAa,CAAA;AACtB,mCAA2C;AAAlC,mCAAA,eAAe,CAAA;AACxB,uCAA+C;AAAtC,uCAAA,iBAAiB,CAAA;AAC1B,yCAAiD;AAAxC,yCAAA,kBAAkB,CAAA;AAC3B,+CAAsD;AAA7C,8CAAA,oBAAoB,CAAA;AAC7B,mDAA0D;AAAjD,kDAAA,sBAAsB,CAAA;AAC/B,mCAA2C;AAAlC,mCAAA,eAAe,CAAA;AACxB,mDAAsD;AAA7C,8CAAA,kBAAkB,CAAA;AAC3B,qDAA4D;AAAnD,oDAAA,uBAAuB,CAAA;AAChC,2DAAkE;AAAzD,0DAAA,0BAA0B,CAAA;AACnC,uCAA+C;AAAtC,uCAAA,iBAAiB,CAAA","sourcesContent":["export { AccessorConverter } from './accessor';\nexport { AliasConverter } from './alias';\nexport { BlockConverter } from './block';\nexport { ClassConverter } from './class';\nexport { ConstructorConverter } from './constructor';\nexport { EnumConverter } from './enum';\nexport { ExportConverter } from './export';\nexport { FunctionConverter } from './function';\nexport { InterfaceConverter } from './interface';\nexport { TypeLiteralConverter } from './literal-type';\nexport { ObjectLiteralConverter } from './literal-object';\nexport { ModuleConverter } from './module';\nexport { SignatureConverter } from './signature-call';\nexport { IndexSignatureConverter } from './signature-index';\nexport { VariableStatementConverter } from './variable-statement';\nexport { VariableConverter } from './variable';\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/nodes/interface.js b/node_modules/typedoc/dist/lib/converter/nodes/interface.js
index d62ad2cc5..906b84017 100644
--- a/node_modules/typedoc/dist/lib/converter/nodes/interface.js
+++ b/node_modules/typedoc/dist/lib/converter/nodes/interface.js
@@ -65,10 +65,10 @@ var InterfaceConverter = (function (_super) {
});
return reflection;
};
+ InterfaceConverter = __decorate([
+ components_1.Component({ name: 'node:interface' })
+ ], InterfaceConverter);
return InterfaceConverter;
}(components_1.ConverterNodeComponent));
-InterfaceConverter = __decorate([
- components_1.Component({ name: 'node:interface' })
-], InterfaceConverter);
exports.InterfaceConverter = InterfaceConverter;
//# sourceMappingURL=interface.js.map \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/nodes/interface.js.map b/node_modules/typedoc/dist/lib/converter/nodes/interface.js.map
index b567296c0..924c3d1d9 100644
--- a/node_modules/typedoc/dist/lib/converter/nodes/interface.js.map
+++ b/node_modules/typedoc/dist/lib/converter/nodes/interface.js.map
@@ -1 +1 @@
-{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../../src/lib/converter/nodes/interface.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AACjC,uCAAyC;AAEzC,4CAAqF;AACrF,4CAAqD;AAErD,4CAAgE;AAGhE,IAAa,kBAAkB;IAAS,sCAA+C;IADvF;QAAA,qEAqDC;QAhDG,cAAQ,GAAoB;YACxB,EAAE,CAAC,UAAU,CAAC,oBAAoB;SACrC,CAAC;;IA8CN,CAAC;IArCG,oCAAO,GAAP,UAAQ,OAAgB,EAAE,IAA6B;QAAvD,iBAoCC;QAnCG,IAAI,UAAiC,CAAC;QACtC,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,aAAa,KAAK,IAAI,CAAC,CAAC,CAAC;YACtD,UAAU,GAA2B,OAAO,CAAC,KAAK,CAAC;QACvD,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,UAAU,GAAG,yBAAiB,CAAC,OAAO,EAAE,IAAI,EAAE,sBAAc,CAAC,SAAS,CAAC,CAAC;QAC5E,CAAC;QAED,OAAO,CAAC,SAAS,CAAC,UAAU,EAAE,IAAI,CAAC,cAAc,EAAE;YAC/C,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;gBACf,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,UAAC,MAAM,EAAE,SAAS;oBACnC,KAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;gBAC5C,CAAC,CAAC,CAAC;YACP,CAAC;YAED,IAAM,SAAS,GAAG,GAAG,CAAC,yBAAyB,CAAC,IAAI,CAAC,CAAC;YACtD,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;gBACZ,SAAS,CAAC,OAAO,CAAC,UAAC,QAAQ;oBACvB,IAAM,IAAI,GAAG,OAAO,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC;oBACjD,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC;wBACrB,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC;4BAC5B,UAAU,CAAC,aAAa,GAAG,EAAE,CAAC;wBAClC,CAAC;wBACD,UAAU,CAAC,aAAa,CAAC,IAAI,CAAC,KAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC;oBACnF,CAAC;oBAED,EAAE,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;wBACtB,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,UAAC,WAAW;4BACzC,OAAO,CAAC,OAAO,CAAC,WAAW,EAAE,QAAQ,CAAC,aAAa,CAAC,CAAC;wBACzD,CAAC,CAAC,CAAC;oBACP,CAAC;gBACL,CAAC,CAAC,CAAC;YACP,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,UAAU,CAAC;IACtB,CAAC;IACL,yBAAC;AAAD,CAAC,AApDD,CAAwC,mCAAsB,GAoD7D;AApDY,kBAAkB;IAD9B,sBAAS,CAAC,EAAC,IAAI,EAAE,gBAAgB,EAAC,CAAC;GACvB,kBAAkB,CAoD9B;AApDY,gDAAkB","sourcesContent":["import * as ts from 'typescript';\nimport * as _ts from '../../ts-internal';\n\nimport {Reflection, ReflectionKind, DeclarationReflection} from '../../models/index';\nimport {createDeclaration} from '../factories/index';\nimport {Context} from '../context';\nimport {Component, ConverterNodeComponent} from '../components';\n\n@Component({name: 'node:interface'})\nexport class InterfaceConverter extends ConverterNodeComponent<ts.InterfaceDeclaration> {\n /**\n * List of supported TypeScript syntax kinds.\n */\n supports: ts.SyntaxKind[] = [\n ts.SyntaxKind.InterfaceDeclaration\n ];\n\n /**\n * Analyze the given interface declaration node and create a suitable reflection.\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The interface declaration node that should be analyzed.\n * @return The resulting reflection or NULL.\n */\n convert(context: Context, node: ts.InterfaceDeclaration): Reflection {\n let reflection: DeclarationReflection;\n if (context.isInherit && context.inheritParent === node) {\n reflection = <DeclarationReflection> context.scope;\n } else {\n reflection = createDeclaration(context, node, ReflectionKind.Interface);\n }\n\n context.withScope(reflection, node.typeParameters, () => {\n if (node.members) {\n node.members.forEach((member, isInherit) => {\n this.owner.convertNode(context, member);\n });\n }\n\n const baseTypes = _ts.getInterfaceBaseTypeNodes(node);\n if (baseTypes) {\n baseTypes.forEach((baseType) => {\n const type = context.getTypeAtLocation(baseType);\n if (!context.isInherit) {\n if (!reflection.extendedTypes) {\n reflection.extendedTypes = [];\n }\n reflection.extendedTypes.push(this.owner.convertType(context, baseType, type));\n }\n\n if (type && type.symbol) {\n type.symbol.declarations.forEach((declaration) => {\n context.inherit(declaration, baseType.typeArguments);\n });\n }\n });\n }\n });\n\n return reflection;\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../../src/lib/converter/nodes/interface.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AACjC,uCAAyC;AAEzC,4CAAuF;AACvF,4CAAuD;AAEvD,4CAAkE;AAGlE;IAAwC,sCAA+C;IADvF;QAAA,qEAqDC;QAhDG,cAAQ,GAAoB;YACxB,EAAE,CAAC,UAAU,CAAC,oBAAoB;SACrC,CAAC;;IA8CN,CAAC;IArCG,oCAAO,GAAP,UAAQ,OAAgB,EAAE,IAA6B;QAAvD,iBAoCC;QAnCG,IAAI,UAAiC,CAAC;QACtC,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,aAAa,KAAK,IAAI,CAAC,CAAC,CAAC;YACtD,UAAU,GAA2B,OAAO,CAAC,KAAK,CAAC;QACvD,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,UAAU,GAAG,yBAAiB,CAAC,OAAO,EAAE,IAAI,EAAE,sBAAc,CAAC,SAAS,CAAC,CAAC;QAC5E,CAAC;QAED,OAAO,CAAC,SAAS,CAAC,UAAU,EAAE,IAAI,CAAC,cAAc,EAAE;YAC/C,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;gBACf,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,UAAC,MAAM,EAAE,SAAS;oBACnC,KAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;gBAC5C,CAAC,CAAC,CAAC;YACP,CAAC;YAED,IAAM,SAAS,GAAG,GAAG,CAAC,yBAAyB,CAAC,IAAI,CAAC,CAAC;YACtD,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;gBACZ,SAAS,CAAC,OAAO,CAAC,UAAC,QAAQ;oBACvB,IAAM,IAAI,GAAG,OAAO,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC;oBACjD,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC;wBACrB,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC;4BAC5B,UAAU,CAAC,aAAa,GAAG,EAAE,CAAC;wBAClC,CAAC;wBACD,UAAU,CAAC,aAAa,CAAC,IAAI,CAAC,KAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC;oBACnF,CAAC;oBAED,EAAE,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;wBACtB,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,UAAC,WAAW;4BACzC,OAAO,CAAC,OAAO,CAAC,WAAW,EAAE,QAAQ,CAAC,aAAa,CAAC,CAAC;wBACzD,CAAC,CAAC,CAAC;oBACP,CAAC;gBACL,CAAC,CAAC,CAAC;YACP,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,UAAU,CAAC;IACtB,CAAC;IAnDQ,kBAAkB;QAD9B,sBAAS,CAAC,EAAC,IAAI,EAAE,gBAAgB,EAAC,CAAC;OACvB,kBAAkB,CAoD9B;IAAD,yBAAC;CAAA,AApDD,CAAwC,mCAAsB,GAoD7D;AApDY,gDAAkB","sourcesContent":["import * as ts from 'typescript';\nimport * as _ts from '../../ts-internal';\n\nimport { Reflection, ReflectionKind, DeclarationReflection } from '../../models/index';\nimport { createDeclaration } from '../factories/index';\nimport { Context } from '../context';\nimport { Component, ConverterNodeComponent } from '../components';\n\n@Component({name: 'node:interface'})\nexport class InterfaceConverter extends ConverterNodeComponent<ts.InterfaceDeclaration> {\n /**\n * List of supported TypeScript syntax kinds.\n */\n supports: ts.SyntaxKind[] = [\n ts.SyntaxKind.InterfaceDeclaration\n ];\n\n /**\n * Analyze the given interface declaration node and create a suitable reflection.\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The interface declaration node that should be analyzed.\n * @return The resulting reflection or NULL.\n */\n convert(context: Context, node: ts.InterfaceDeclaration): Reflection {\n let reflection: DeclarationReflection;\n if (context.isInherit && context.inheritParent === node) {\n reflection = <DeclarationReflection> context.scope;\n } else {\n reflection = createDeclaration(context, node, ReflectionKind.Interface);\n }\n\n context.withScope(reflection, node.typeParameters, () => {\n if (node.members) {\n node.members.forEach((member, isInherit) => {\n this.owner.convertNode(context, member);\n });\n }\n\n const baseTypes = _ts.getInterfaceBaseTypeNodes(node);\n if (baseTypes) {\n baseTypes.forEach((baseType) => {\n const type = context.getTypeAtLocation(baseType);\n if (!context.isInherit) {\n if (!reflection.extendedTypes) {\n reflection.extendedTypes = [];\n }\n reflection.extendedTypes.push(this.owner.convertType(context, baseType, type));\n }\n\n if (type && type.symbol) {\n type.symbol.declarations.forEach((declaration) => {\n context.inherit(declaration, baseType.typeArguments);\n });\n }\n });\n }\n });\n\n return reflection;\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/nodes/literal-object.js b/node_modules/typedoc/dist/lib/converter/nodes/literal-object.js
index 73c2a9690..c6345fda2 100644
--- a/node_modules/typedoc/dist/lib/converter/nodes/literal-object.js
+++ b/node_modules/typedoc/dist/lib/converter/nodes/literal-object.js
@@ -36,10 +36,10 @@ var ObjectLiteralConverter = (function (_super) {
}
return context.scope;
};
+ ObjectLiteralConverter = __decorate([
+ components_1.Component({ name: 'node:literal-object' })
+ ], ObjectLiteralConverter);
return ObjectLiteralConverter;
}(components_1.ConverterNodeComponent));
-ObjectLiteralConverter = __decorate([
- components_1.Component({ name: 'node:literal-object' })
-], ObjectLiteralConverter);
exports.ObjectLiteralConverter = ObjectLiteralConverter;
//# sourceMappingURL=literal-object.js.map \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/nodes/literal-object.js.map b/node_modules/typedoc/dist/lib/converter/nodes/literal-object.js.map
index 25e3739b4..58509c39f 100644
--- a/node_modules/typedoc/dist/lib/converter/nodes/literal-object.js.map
+++ b/node_modules/typedoc/dist/lib/converter/nodes/literal-object.js.map
@@ -1 +1 @@
-{"version":3,"file":"literal-object.js","sourceRoot":"","sources":["../../../../src/lib/converter/nodes/literal-object.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AAIjC,4CAAgE;AAGhE,IAAa,sBAAsB;IAAS,0CAAkD;IAD9F;QAAA,qEAyBC;QApBG,cAAQ,GAAoB;YACxB,EAAE,CAAC,UAAU,CAAC,uBAAuB;SACxC,CAAC;;IAkBN,CAAC;IATG,wCAAO,GAAP,UAAQ,OAAgB,EAAE,IAAgC;QAA1D,iBAQC;QAPG,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;YAClB,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,UAAC,IAAI;gBACzB,KAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;YAC1C,CAAC,CAAC,CAAC;QACP,CAAC;QAED,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;IACzB,CAAC;IACL,6BAAC;AAAD,CAAC,AAxBD,CAA4C,mCAAsB,GAwBjE;AAxBY,sBAAsB;IADlC,sBAAS,CAAC,EAAC,IAAI,EAAE,qBAAqB,EAAC,CAAC;GAC5B,sBAAsB,CAwBlC;AAxBY,wDAAsB","sourcesContent":["import * as ts from 'typescript';\n\nimport {Reflection} from '../../models/index';\nimport {Context} from '../context';\nimport {Component, ConverterNodeComponent} from '../components';\n\n@Component({name: 'node:literal-object'})\nexport class ObjectLiteralConverter extends ConverterNodeComponent<ts.ObjectLiteralExpression> {\n /**\n * List of supported TypeScript syntax kinds.\n */\n supports: ts.SyntaxKind[] = [\n ts.SyntaxKind.ObjectLiteralExpression\n ];\n\n /**\n * Analyze the given object literal node and create a suitable reflection.\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The object literal node that should be analyzed.\n * @return The resulting reflection or NULL.\n */\n convert(context: Context, node: ts.ObjectLiteralExpression): Reflection {\n if (node.properties) {\n node.properties.forEach((node) => {\n this.owner.convertNode(context, node);\n });\n }\n\n return context.scope;\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"literal-object.js","sourceRoot":"","sources":["../../../../src/lib/converter/nodes/literal-object.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AAIjC,4CAAkE;AAGlE;IAA4C,0CAAkD;IAD9F;QAAA,qEAyBC;QApBG,cAAQ,GAAoB;YACxB,EAAE,CAAC,UAAU,CAAC,uBAAuB;SACxC,CAAC;;IAkBN,CAAC;IATG,wCAAO,GAAP,UAAQ,OAAgB,EAAE,IAAgC;QAA1D,iBAQC;QAPG,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;YAClB,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,UAAC,IAAI;gBACzB,KAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;YAC1C,CAAC,CAAC,CAAC;QACP,CAAC;QAED,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;IACzB,CAAC;IAvBQ,sBAAsB;QADlC,sBAAS,CAAC,EAAC,IAAI,EAAE,qBAAqB,EAAC,CAAC;OAC5B,sBAAsB,CAwBlC;IAAD,6BAAC;CAAA,AAxBD,CAA4C,mCAAsB,GAwBjE;AAxBY,wDAAsB","sourcesContent":["import * as ts from 'typescript';\n\nimport { Reflection } from '../../models/index';\nimport { Context } from '../context';\nimport { Component, ConverterNodeComponent } from '../components';\n\n@Component({name: 'node:literal-object'})\nexport class ObjectLiteralConverter extends ConverterNodeComponent<ts.ObjectLiteralExpression> {\n /**\n * List of supported TypeScript syntax kinds.\n */\n supports: ts.SyntaxKind[] = [\n ts.SyntaxKind.ObjectLiteralExpression\n ];\n\n /**\n * Analyze the given object literal node and create a suitable reflection.\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The object literal node that should be analyzed.\n * @return The resulting reflection or NULL.\n */\n convert(context: Context, node: ts.ObjectLiteralExpression): Reflection {\n if (node.properties) {\n node.properties.forEach((node) => {\n this.owner.convertNode(context, node);\n });\n }\n\n return context.scope;\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/nodes/literal-type.js b/node_modules/typedoc/dist/lib/converter/nodes/literal-type.js
index 16b791f62..93eb7d2f0 100644
--- a/node_modules/typedoc/dist/lib/converter/nodes/literal-type.js
+++ b/node_modules/typedoc/dist/lib/converter/nodes/literal-type.js
@@ -36,10 +36,10 @@ var TypeLiteralConverter = (function (_super) {
}
return context.scope;
};
+ TypeLiteralConverter = __decorate([
+ components_1.Component({ name: 'node:literal-type' })
+ ], TypeLiteralConverter);
return TypeLiteralConverter;
}(components_1.ConverterNodeComponent));
-TypeLiteralConverter = __decorate([
- components_1.Component({ name: 'node:literal-type' })
-], TypeLiteralConverter);
exports.TypeLiteralConverter = TypeLiteralConverter;
//# sourceMappingURL=literal-type.js.map \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/nodes/literal-type.js.map b/node_modules/typedoc/dist/lib/converter/nodes/literal-type.js.map
index 37ed8dc57..909784143 100644
--- a/node_modules/typedoc/dist/lib/converter/nodes/literal-type.js.map
+++ b/node_modules/typedoc/dist/lib/converter/nodes/literal-type.js.map
@@ -1 +1 @@
-{"version":3,"file":"literal-type.js","sourceRoot":"","sources":["../../../../src/lib/converter/nodes/literal-type.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AAIjC,4CAAgE;AAGhE,IAAa,oBAAoB;IAAS,wCAA0C;IADpF;QAAA,qEAyBC;QApBG,cAAQ,GAAoB;YACxB,EAAE,CAAC,UAAU,CAAC,WAAW;SAC5B,CAAC;;IAkBN,CAAC;IATG,sCAAO,GAAP,UAAQ,OAAgB,EAAE,IAAwB;QAAlD,iBAQC;QAPG,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;YACf,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,UAAC,IAAI;gBACtB,KAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;YAC1C,CAAC,CAAC,CAAC;QACP,CAAC;QAED,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;IACzB,CAAC;IACL,2BAAC;AAAD,CAAC,AAxBD,CAA0C,mCAAsB,GAwB/D;AAxBY,oBAAoB;IADhC,sBAAS,CAAC,EAAC,IAAI,EAAE,mBAAmB,EAAC,CAAC;GAC1B,oBAAoB,CAwBhC;AAxBY,oDAAoB","sourcesContent":["import * as ts from 'typescript';\n\nimport {Reflection} from '../../models/index';\nimport {Context} from '../context';\nimport {Component, ConverterNodeComponent} from '../components';\n\n@Component({name: 'node:literal-type'})\nexport class TypeLiteralConverter extends ConverterNodeComponent<ts.TypeLiteralNode> {\n /**\n * List of supported TypeScript syntax kinds.\n */\n supports: ts.SyntaxKind[] = [\n ts.SyntaxKind.TypeLiteral\n ];\n\n /**\n * Analyze the given type literal node and create a suitable reflection.\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The type literal node that should be analyzed.\n * @return The resulting reflection or NULL.\n */\n convert(context: Context, node: ts.TypeLiteralNode): Reflection {\n if (node.members) {\n node.members.forEach((node) => {\n this.owner.convertNode(context, node);\n });\n }\n\n return context.scope;\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"literal-type.js","sourceRoot":"","sources":["../../../../src/lib/converter/nodes/literal-type.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AAIjC,4CAAkE;AAGlE;IAA0C,wCAA0C;IADpF;QAAA,qEAyBC;QApBG,cAAQ,GAAoB;YACxB,EAAE,CAAC,UAAU,CAAC,WAAW;SAC5B,CAAC;;IAkBN,CAAC;IATG,sCAAO,GAAP,UAAQ,OAAgB,EAAE,IAAwB;QAAlD,iBAQC;QAPG,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;YACf,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,UAAC,IAAI;gBACtB,KAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;YAC1C,CAAC,CAAC,CAAC;QACP,CAAC;QAED,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;IACzB,CAAC;IAvBQ,oBAAoB;QADhC,sBAAS,CAAC,EAAC,IAAI,EAAE,mBAAmB,EAAC,CAAC;OAC1B,oBAAoB,CAwBhC;IAAD,2BAAC;CAAA,AAxBD,CAA0C,mCAAsB,GAwB/D;AAxBY,oDAAoB","sourcesContent":["import * as ts from 'typescript';\n\nimport { Reflection } from '../../models/index';\nimport { Context } from '../context';\nimport { Component, ConverterNodeComponent } from '../components';\n\n@Component({name: 'node:literal-type'})\nexport class TypeLiteralConverter extends ConverterNodeComponent<ts.TypeLiteralNode> {\n /**\n * List of supported TypeScript syntax kinds.\n */\n supports: ts.SyntaxKind[] = [\n ts.SyntaxKind.TypeLiteral\n ];\n\n /**\n * Analyze the given type literal node and create a suitable reflection.\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The type literal node that should be analyzed.\n * @return The resulting reflection or NULL.\n */\n convert(context: Context, node: ts.TypeLiteralNode): Reflection {\n if (node.members) {\n node.members.forEach((node) => {\n this.owner.convertNode(context, node);\n });\n }\n\n return context.scope;\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/nodes/module.js b/node_modules/typedoc/dist/lib/converter/nodes/module.js
index f56e3fd82..5abea7f11 100644
--- a/node_modules/typedoc/dist/lib/converter/nodes/module.js
+++ b/node_modules/typedoc/dist/lib/converter/nodes/module.js
@@ -44,10 +44,10 @@ var ModuleConverter = (function (_super) {
});
return reflection;
};
+ ModuleConverter = __decorate([
+ components_1.Component({ name: 'node:module' })
+ ], ModuleConverter);
return ModuleConverter;
}(components_1.ConverterNodeComponent));
-ModuleConverter = __decorate([
- components_1.Component({ name: 'node:module' })
-], ModuleConverter);
exports.ModuleConverter = ModuleConverter;
//# sourceMappingURL=module.js.map \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/nodes/module.js.map b/node_modules/typedoc/dist/lib/converter/nodes/module.js.map
index c506bd24b..f244ada22 100644
--- a/node_modules/typedoc/dist/lib/converter/nodes/module.js.map
+++ b/node_modules/typedoc/dist/lib/converter/nodes/module.js.map
@@ -1 +1 @@
-{"version":3,"file":"module.js","sourceRoot":"","sources":["../../../../src/lib/converter/nodes/module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AAEjC,4CAAiG;AACjG,4CAAqD;AAErD,4CAAgE;AAGhE,IAAa,eAAe;IAAS,mCAA4C;IADjF;QAAA,qEAiCC;QA5BG,cAAQ,GAAoB;YACxB,EAAE,CAAC,UAAU,CAAC,iBAAiB;SAClC,CAAC;;IA0BN,CAAC;IAjBG,iCAAO,GAAP,UAAQ,OAAgB,EAAE,IAA0B;QAApD,iBAgBC;QAfG,IAAM,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;QAC7B,IAAM,UAAU,GAAG,yBAAiB,CAAC,OAAO,EAAE,IAAI,EAAE,sBAAc,CAAC,MAAM,CAAC,CAAC;QAE3E,OAAO,CAAC,SAAS,CAAC,UAAU,EAAE;YAC1B,EAAE,CAAC,CAAC,MAAM,YAAY,yBAAiB,IAAI,CAAC,OAAO,CAAC,aAAa;gBAC7D,CAAC,CAAC,MAAM,IAAI,MAAM,CAAC,OAAO,EAAE,KAAK,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;gBACjE,UAAU,CAAC,OAAO,CAAC,sBAAc,CAAC,QAAQ,CAAC,CAAC;YAChD,CAAC;YAED,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;gBACZ,KAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;YAC/C,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,UAAU,CAAC;IACtB,CAAC;IACL,sBAAC;AAAD,CAAC,AAhCD,CAAqC,mCAAsB,GAgC1D;AAhCY,eAAe;IAD3B,sBAAS,CAAC,EAAC,IAAI,EAAE,aAAa,EAAC,CAAC;GACpB,eAAe,CAgC3B;AAhCY,0CAAe","sourcesContent":["import * as ts from 'typescript';\n\nimport {Reflection, ReflectionKind, ReflectionFlag, ProjectReflection} from '../../models/index';\nimport {createDeclaration} from '../factories/index';\nimport {Context} from '../context';\nimport {Component, ConverterNodeComponent} from '../components';\n\n@Component({name: 'node:module'})\nexport class ModuleConverter extends ConverterNodeComponent<ts.ModuleDeclaration> {\n /**\n * List of supported TypeScript syntax kinds.\n */\n supports: ts.SyntaxKind[] = [\n ts.SyntaxKind.ModuleDeclaration\n ];\n\n /**\n * Analyze the given module node and create a suitable reflection.\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The module node that should be analyzed.\n * @return The resulting reflection or NULL.\n */\n convert(context: Context, node: ts.ModuleDeclaration): Reflection {\n const parent = context.scope;\n const reflection = createDeclaration(context, node, ReflectionKind.Module);\n\n context.withScope(reflection, () => {\n if (parent instanceof ProjectReflection && !context.isDeclaration &&\n (!module || module.valueOf() === ts.ModuleKind.None.valueOf())) {\n reflection.setFlag(ReflectionFlag.Exported);\n }\n\n if (node.body) {\n this.owner.convertNode(context, node.body);\n }\n });\n\n return reflection;\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"module.js","sourceRoot":"","sources":["../../../../src/lib/converter/nodes/module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AAEjC,4CAAmG;AACnG,4CAAuD;AAEvD,4CAAkE;AAGlE;IAAqC,mCAA4C;IADjF;QAAA,qEAiCC;QA5BG,cAAQ,GAAoB;YACxB,EAAE,CAAC,UAAU,CAAC,iBAAiB;SAClC,CAAC;;IA0BN,CAAC;IAjBG,iCAAO,GAAP,UAAQ,OAAgB,EAAE,IAA0B;QAApD,iBAgBC;QAfG,IAAM,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;QAC7B,IAAM,UAAU,GAAG,yBAAiB,CAAC,OAAO,EAAE,IAAI,EAAE,sBAAc,CAAC,MAAM,CAAC,CAAC;QAE3E,OAAO,CAAC,SAAS,CAAC,UAAU,EAAE;YAC1B,EAAE,CAAC,CAAC,MAAM,YAAY,yBAAiB,IAAI,CAAC,OAAO,CAAC,aAAa;gBAC7D,CAAC,CAAC,MAAM,IAAI,MAAM,CAAC,OAAO,EAAE,KAAK,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;gBACjE,UAAU,CAAC,OAAO,CAAC,sBAAc,CAAC,QAAQ,CAAC,CAAC;YAChD,CAAC;YAED,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;gBACZ,KAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;YAC/C,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,UAAU,CAAC;IACtB,CAAC;IA/BQ,eAAe;QAD3B,sBAAS,CAAC,EAAC,IAAI,EAAE,aAAa,EAAC,CAAC;OACpB,eAAe,CAgC3B;IAAD,sBAAC;CAAA,AAhCD,CAAqC,mCAAsB,GAgC1D;AAhCY,0CAAe","sourcesContent":["import * as ts from 'typescript';\n\nimport { Reflection, ReflectionKind, ReflectionFlag, ProjectReflection } from '../../models/index';\nimport { createDeclaration } from '../factories/index';\nimport { Context } from '../context';\nimport { Component, ConverterNodeComponent } from '../components';\n\n@Component({name: 'node:module'})\nexport class ModuleConverter extends ConverterNodeComponent<ts.ModuleDeclaration> {\n /**\n * List of supported TypeScript syntax kinds.\n */\n supports: ts.SyntaxKind[] = [\n ts.SyntaxKind.ModuleDeclaration\n ];\n\n /**\n * Analyze the given module node and create a suitable reflection.\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The module node that should be analyzed.\n * @return The resulting reflection or NULL.\n */\n convert(context: Context, node: ts.ModuleDeclaration): Reflection {\n const parent = context.scope;\n const reflection = createDeclaration(context, node, ReflectionKind.Module);\n\n context.withScope(reflection, () => {\n if (parent instanceof ProjectReflection && !context.isDeclaration &&\n (!module || module.valueOf() === ts.ModuleKind.None.valueOf())) {\n reflection.setFlag(ReflectionFlag.Exported);\n }\n\n if (node.body) {\n this.owner.convertNode(context, node.body);\n }\n });\n\n return reflection;\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/nodes/signature-call.js b/node_modules/typedoc/dist/lib/converter/nodes/signature-call.js
index 4f351a990..70d6b4513 100644
--- a/node_modules/typedoc/dist/lib/converter/nodes/signature-call.js
+++ b/node_modules/typedoc/dist/lib/converter/nodes/signature-call.js
@@ -44,10 +44,10 @@ var SignatureConverter = (function (_super) {
}
return scope;
};
+ SignatureConverter = __decorate([
+ components_1.Component({ name: 'node:signature-call' })
+ ], SignatureConverter);
return SignatureConverter;
}(components_1.ConverterNodeComponent));
-SignatureConverter = __decorate([
- components_1.Component({ name: 'node:signature-call' })
-], SignatureConverter);
exports.SignatureConverter = SignatureConverter;
//# sourceMappingURL=signature-call.js.map \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/nodes/signature-call.js.map b/node_modules/typedoc/dist/lib/converter/nodes/signature-call.js.map
index eb79ec5d9..fcee736c5 100644
--- a/node_modules/typedoc/dist/lib/converter/nodes/signature-call.js.map
+++ b/node_modules/typedoc/dist/lib/converter/nodes/signature-call.js.map
@@ -1 +1 @@
-{"version":3,"file":"signature-call.js","sourceRoot":"","sources":["../../../../src/lib/converter/nodes/signature-call.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AAEjC,4CAAqF;AAErF,4CAAgE;AAChE,4CAAmD;AAGnD,IAAa,kBAAkB;IAAS,sCAA2F;IADnI;QAAA,qEAgCC;QA3BG,cAAQ,GAAoB;YACxB,EAAE,CAAC,UAAU,CAAC,aAAa;YAC3B,EAAE,CAAC,UAAU,CAAC,YAAY;YAC1B,EAAE,CAAC,UAAU,CAAC,kBAAkB;YAChC,EAAE,CAAC,UAAU,CAAC,aAAa;SAC9B,CAAC;;IAsBN,CAAC;IAbG,oCAAO,GAAP,UAAQ,OAAgB,EAAE,IAAyE;QAC/F,IAAM,KAAK,GAA2B,OAAO,CAAC,KAAK,CAAC;QACpD,EAAE,CAAC,CAAC,KAAK,YAAY,6BAAqB,CAAC,CAAC,CAAC;YACzC,IAAM,MAAI,GAAG,KAAK,CAAC,MAAM,CAAC,sBAAc,CAAC,gBAAgB,CAAC,GAAG,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC;YACnF,IAAM,SAAS,GAAG,uBAAe,CAAC,OAAO,EAA4B,IAAI,EAAE,MAAI,EAAE,sBAAc,CAAC,aAAa,CAAC,CAAC;YAC/G,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC;gBACpB,KAAK,CAAC,UAAU,GAAG,EAAE,CAAC;YAC1B,CAAC;YACD,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACrC,CAAC;QAED,MAAM,CAAC,KAAK,CAAC;IACjB,CAAC;IACL,yBAAC;AAAD,CAAC,AA/BD,CAAwC,mCAAsB,GA+B7D;AA/BY,kBAAkB;IAD9B,sBAAS,CAAC,EAAC,IAAI,EAAE,qBAAqB,EAAC,CAAC;GAC5B,kBAAkB,CA+B9B;AA/BY,gDAAkB","sourcesContent":["import * as ts from 'typescript';\n\nimport {Reflection, ReflectionKind, DeclarationReflection} from '../../models/index';\nimport {Context} from '../context';\nimport {Component, ConverterNodeComponent} from '../components';\nimport {createSignature} from '../factories/index';\n\n@Component({name: 'node:signature-call'})\nexport class SignatureConverter extends ConverterNodeComponent<ts.FunctionExpression|ts.SignatureDeclaration|ts.FunctionExpression> {\n /**\n * List of supported TypeScript syntax kinds.\n */\n supports: ts.SyntaxKind[] = [\n ts.SyntaxKind.CallSignature,\n ts.SyntaxKind.FunctionType,\n ts.SyntaxKind.FunctionExpression,\n ts.SyntaxKind.ArrowFunction\n ];\n\n /**\n * Analyze the given call signature declaration node and create a suitable reflection.\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The signature declaration node that should be analyzed.\n * @return The resulting reflection or NULL.\n */\n convert(context: Context, node: ts.FunctionExpression|ts.SignatureDeclaration|ts.FunctionExpression): Reflection {\n const scope = <DeclarationReflection> context.scope;\n if (scope instanceof DeclarationReflection) {\n const name = scope.kindOf(ReflectionKind.FunctionOrMethod) ? scope.name : '__call';\n const signature = createSignature(context, <ts.SignatureDeclaration> node, name, ReflectionKind.CallSignature);\n if (!scope.signatures) {\n scope.signatures = [];\n }\n scope.signatures.push(signature);\n }\n\n return scope;\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"signature-call.js","sourceRoot":"","sources":["../../../../src/lib/converter/nodes/signature-call.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AAEjC,4CAAuF;AAEvF,4CAAkE;AAClE,4CAAqD;AAGrD;IAAwC,sCAA2F;IADnI;QAAA,qEAgCC;QA3BG,cAAQ,GAAoB;YACxB,EAAE,CAAC,UAAU,CAAC,aAAa;YAC3B,EAAE,CAAC,UAAU,CAAC,YAAY;YAC1B,EAAE,CAAC,UAAU,CAAC,kBAAkB;YAChC,EAAE,CAAC,UAAU,CAAC,aAAa;SAC9B,CAAC;;IAsBN,CAAC;IAbG,oCAAO,GAAP,UAAQ,OAAgB,EAAE,IAAyE;QAC/F,IAAM,KAAK,GAA2B,OAAO,CAAC,KAAK,CAAC;QACpD,EAAE,CAAC,CAAC,KAAK,YAAY,6BAAqB,CAAC,CAAC,CAAC;YACzC,IAAM,MAAI,GAAG,KAAK,CAAC,MAAM,CAAC,sBAAc,CAAC,gBAAgB,CAAC,GAAG,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC;YACnF,IAAM,SAAS,GAAG,uBAAe,CAAC,OAAO,EAA4B,IAAI,EAAE,MAAI,EAAE,sBAAc,CAAC,aAAa,CAAC,CAAC;YAC/G,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC;gBACpB,KAAK,CAAC,UAAU,GAAG,EAAE,CAAC;YAC1B,CAAC;YACD,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACrC,CAAC;QAED,MAAM,CAAC,KAAK,CAAC;IACjB,CAAC;IA9BQ,kBAAkB;QAD9B,sBAAS,CAAC,EAAC,IAAI,EAAE,qBAAqB,EAAC,CAAC;OAC5B,kBAAkB,CA+B9B;IAAD,yBAAC;CAAA,AA/BD,CAAwC,mCAAsB,GA+B7D;AA/BY,gDAAkB","sourcesContent":["import * as ts from 'typescript';\n\nimport { Reflection, ReflectionKind, DeclarationReflection } from '../../models/index';\nimport { Context } from '../context';\nimport { Component, ConverterNodeComponent } from '../components';\nimport { createSignature } from '../factories/index';\n\n@Component({name: 'node:signature-call'})\nexport class SignatureConverter extends ConverterNodeComponent<ts.FunctionExpression|ts.SignatureDeclaration|ts.FunctionExpression> {\n /**\n * List of supported TypeScript syntax kinds.\n */\n supports: ts.SyntaxKind[] = [\n ts.SyntaxKind.CallSignature,\n ts.SyntaxKind.FunctionType,\n ts.SyntaxKind.FunctionExpression,\n ts.SyntaxKind.ArrowFunction\n ];\n\n /**\n * Analyze the given call signature declaration node and create a suitable reflection.\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The signature declaration node that should be analyzed.\n * @return The resulting reflection or NULL.\n */\n convert(context: Context, node: ts.FunctionExpression|ts.SignatureDeclaration|ts.FunctionExpression): Reflection {\n const scope = <DeclarationReflection> context.scope;\n if (scope instanceof DeclarationReflection) {\n const name = scope.kindOf(ReflectionKind.FunctionOrMethod) ? scope.name : '__call';\n const signature = createSignature(context, <ts.SignatureDeclaration> node, name, ReflectionKind.CallSignature);\n if (!scope.signatures) {\n scope.signatures = [];\n }\n scope.signatures.push(signature);\n }\n\n return scope;\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/nodes/signature-index.js b/node_modules/typedoc/dist/lib/converter/nodes/signature-index.js
index b68bad82d..0faae85d6 100644
--- a/node_modules/typedoc/dist/lib/converter/nodes/signature-index.js
+++ b/node_modules/typedoc/dist/lib/converter/nodes/signature-index.js
@@ -36,10 +36,10 @@ var IndexSignatureConverter = (function (_super) {
}
return scope;
};
+ IndexSignatureConverter = __decorate([
+ components_1.Component({ name: 'node:signature-index' })
+ ], IndexSignatureConverter);
return IndexSignatureConverter;
}(components_1.ConverterNodeComponent));
-IndexSignatureConverter = __decorate([
- components_1.Component({ name: 'node:signature-index' })
-], IndexSignatureConverter);
exports.IndexSignatureConverter = IndexSignatureConverter;
//# sourceMappingURL=signature-index.js.map \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/nodes/signature-index.js.map b/node_modules/typedoc/dist/lib/converter/nodes/signature-index.js.map
index 879b6573e..03903fee8 100644
--- a/node_modules/typedoc/dist/lib/converter/nodes/signature-index.js.map
+++ b/node_modules/typedoc/dist/lib/converter/nodes/signature-index.js.map
@@ -1 +1 @@
-{"version":3,"file":"signature-index.js","sourceRoot":"","sources":["../../../../src/lib/converter/nodes/signature-index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AAEjC,4CAAqF;AACrF,4CAAmD;AAEnD,4CAAgE;AAGhE,IAAa,uBAAuB;IAAS,2CAA+C;IAD5F;QAAA,qEAwBC;QAnBG,cAAQ,GAAoB;YACxB,EAAE,CAAC,UAAU,CAAC,cAAc;SAC/B,CAAC;;IAiBN,CAAC;IARG,yCAAO,GAAP,UAAQ,OAAgB,EAAE,IAA6B;QACnD,IAAM,KAAK,GAA2B,OAAO,CAAC,KAAK,CAAC;QACpD,EAAE,CAAC,CAAC,KAAK,YAAY,6BAAqB,CAAC,CAAC,CAAC;YACzC,KAAK,CAAC,cAAc,GAAG,uBAAe,CAAC,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,sBAAc,CAAC,cAAc,CAAC,CAAC;QACpG,CAAC;QAED,MAAM,CAAC,KAAK,CAAC;IACjB,CAAC;IACL,8BAAC;AAAD,CAAC,AAvBD,CAA6C,mCAAsB,GAuBlE;AAvBY,uBAAuB;IADnC,sBAAS,CAAC,EAAC,IAAI,EAAE,sBAAsB,EAAC,CAAC;GAC7B,uBAAuB,CAuBnC;AAvBY,0DAAuB","sourcesContent":["import * as ts from 'typescript';\n\nimport {Reflection, ReflectionKind, DeclarationReflection} from '../../models/index';\nimport {createSignature} from '../factories/index';\nimport {Context} from '../context';\nimport {Component, ConverterNodeComponent} from '../components';\n\n@Component({name: 'node:signature-index'})\nexport class IndexSignatureConverter extends ConverterNodeComponent<ts.SignatureDeclaration> {\n /**\n * List of supported TypeScript syntax kinds.\n */\n supports: ts.SyntaxKind[] = [\n ts.SyntaxKind.IndexSignature\n ];\n\n /**\n * Analyze the given index signature declaration node and create a suitable reflection.\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The signature declaration node that should be analyzed.\n * @return The resulting reflection or NULL.\n */\n convert(context: Context, node: ts.SignatureDeclaration): Reflection {\n const scope = <DeclarationReflection> context.scope;\n if (scope instanceof DeclarationReflection) {\n scope.indexSignature = createSignature(context, node, '__index', ReflectionKind.IndexSignature);\n }\n\n return scope;\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"signature-index.js","sourceRoot":"","sources":["../../../../src/lib/converter/nodes/signature-index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AAEjC,4CAAuF;AACvF,4CAAqD;AAErD,4CAAkE;AAGlE;IAA6C,2CAA+C;IAD5F;QAAA,qEAwBC;QAnBG,cAAQ,GAAoB;YACxB,EAAE,CAAC,UAAU,CAAC,cAAc;SAC/B,CAAC;;IAiBN,CAAC;IARG,yCAAO,GAAP,UAAQ,OAAgB,EAAE,IAA6B;QACnD,IAAM,KAAK,GAA2B,OAAO,CAAC,KAAK,CAAC;QACpD,EAAE,CAAC,CAAC,KAAK,YAAY,6BAAqB,CAAC,CAAC,CAAC;YACzC,KAAK,CAAC,cAAc,GAAG,uBAAe,CAAC,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,sBAAc,CAAC,cAAc,CAAC,CAAC;QACpG,CAAC;QAED,MAAM,CAAC,KAAK,CAAC;IACjB,CAAC;IAtBQ,uBAAuB;QADnC,sBAAS,CAAC,EAAC,IAAI,EAAE,sBAAsB,EAAC,CAAC;OAC7B,uBAAuB,CAuBnC;IAAD,8BAAC;CAAA,AAvBD,CAA6C,mCAAsB,GAuBlE;AAvBY,0DAAuB","sourcesContent":["import * as ts from 'typescript';\n\nimport { Reflection, ReflectionKind, DeclarationReflection } from '../../models/index';\nimport { createSignature } from '../factories/index';\nimport { Context } from '../context';\nimport { Component, ConverterNodeComponent } from '../components';\n\n@Component({name: 'node:signature-index'})\nexport class IndexSignatureConverter extends ConverterNodeComponent<ts.SignatureDeclaration> {\n /**\n * List of supported TypeScript syntax kinds.\n */\n supports: ts.SyntaxKind[] = [\n ts.SyntaxKind.IndexSignature\n ];\n\n /**\n * Analyze the given index signature declaration node and create a suitable reflection.\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The signature declaration node that should be analyzed.\n * @return The resulting reflection or NULL.\n */\n convert(context: Context, node: ts.SignatureDeclaration): Reflection {\n const scope = <DeclarationReflection> context.scope;\n if (scope instanceof DeclarationReflection) {\n scope.indexSignature = createSignature(context, node, '__index', ReflectionKind.IndexSignature);\n }\n\n return scope;\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/nodes/variable-statement.js b/node_modules/typedoc/dist/lib/converter/nodes/variable-statement.js
index e6c3b3d93..440d8f7da 100644
--- a/node_modules/typedoc/dist/lib/converter/nodes/variable-statement.js
+++ b/node_modules/typedoc/dist/lib/converter/nodes/variable-statement.js
@@ -51,10 +51,10 @@ var VariableStatementConverter = (function (_super) {
}
});
};
+ VariableStatementConverter = __decorate([
+ components_1.Component({ name: 'node:variable-statement' })
+ ], VariableStatementConverter);
return VariableStatementConverter;
}(components_1.ConverterNodeComponent));
-VariableStatementConverter = __decorate([
- components_1.Component({ name: 'node:variable-statement' })
-], VariableStatementConverter);
exports.VariableStatementConverter = VariableStatementConverter;
//# sourceMappingURL=variable-statement.js.map \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/nodes/variable-statement.js.map b/node_modules/typedoc/dist/lib/converter/nodes/variable-statement.js.map
index fd5c477e9..e7727f395 100644
--- a/node_modules/typedoc/dist/lib/converter/nodes/variable-statement.js.map
+++ b/node_modules/typedoc/dist/lib/converter/nodes/variable-statement.js.map
@@ -1 +1 @@
-{"version":3,"file":"variable-statement.js","sourceRoot":"","sources":["../../../../src/lib/converter/nodes/variable-statement.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AACjC,uCAAyC;AAIzC,4CAAgE;AAGhE,IAAa,0BAA0B;IAAS,8CAA4C;IAD5F;QAAA,qEA6CC;QAxCG,cAAQ,GAAoB;YACxB,EAAE,CAAC,UAAU,CAAC,iBAAiB;SAClC,CAAC;;IAsCN,CAAC;IA7BG,4CAAO,GAAP,UAAQ,OAAgB,EAAE,IAA0B;QAApD,iBAYC;QAXG,EAAE,CAAC,CAAC,IAAI,CAAC,eAAe,IAAI,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC,CAAC;YAC5D,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC,OAAO,CAAC,UAAC,mBAAmB;gBAC1D,EAAE,CAAC,CAAC,GAAG,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;oBACjD,KAAI,CAAC,qBAAqB,CAAC,OAAO,EAAsB,mBAAmB,CAAC,IAAI,CAAC,CAAC;gBACtF,CAAC;gBAAC,IAAI,CAAC,CAAC;oBACJ,KAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,mBAAmB,CAAC,CAAC;gBACzD,CAAC;YACL,CAAC,CAAC,CAAC;QACP,CAAC;QAED,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;IACzB,CAAC;IAQD,0DAAqB,GAArB,UAAsB,OAAgB,EAAE,IAAuB;QAA/D,iBAQC;QAPI,IAAI,CAAC,QAAgC,CAAC,OAAO,CAAC,UAAC,OAA0B;YACtE,KAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;YAEzC,EAAE,CAAC,CAAC,GAAG,CAAC,gBAAgB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;gBACrC,KAAI,CAAC,qBAAqB,CAAC,OAAO,EAAsB,OAAO,CAAC,IAAI,CAAC,CAAC;YAC1E,CAAC;QACL,CAAC,CAAC,CAAC;IACP,CAAC;IACL,iCAAC;AAAD,CAAC,AA5CD,CAAgD,mCAAsB,GA4CrE;AA5CY,0BAA0B;IADtC,sBAAS,CAAC,EAAC,IAAI,EAAE,yBAAyB,EAAC,CAAC;GAChC,0BAA0B,CA4CtC;AA5CY,gEAA0B","sourcesContent":["import * as ts from 'typescript';\nimport * as _ts from '../../ts-internal';\n\nimport {Reflection} from '../../models/index';\nimport {Context} from '../context';\nimport {Component, ConverterNodeComponent} from '../components';\n\n@Component({name: 'node:variable-statement'})\nexport class VariableStatementConverter extends ConverterNodeComponent<ts.VariableStatement> {\n /**\n * List of supported TypeScript syntax kinds.\n */\n supports: ts.SyntaxKind[] = [\n ts.SyntaxKind.VariableStatement\n ];\n\n /**\n * Analyze the given variable statement node and create a suitable reflection.\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The variable statement node that should be analyzed.\n * @return The resulting reflection or NULL.\n */\n convert(context: Context, node: ts.VariableStatement): Reflection {\n if (node.declarationList && node.declarationList.declarations) {\n node.declarationList.declarations.forEach((variableDeclaration) => {\n if (_ts.isBindingPattern(variableDeclaration.name)) {\n this.convertBindingPattern(context, <ts.BindingPattern> variableDeclaration.name);\n } else {\n this.owner.convertNode(context, variableDeclaration);\n }\n });\n }\n\n return context.scope;\n }\n\n /**\n * Traverse the elements of the given binding pattern and create the corresponding variable reflections.\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The binding pattern node that should be analyzed.\n */\n convertBindingPattern(context: Context, node: ts.BindingPattern) {\n (node.elements as ts.BindingElement[]).forEach((element: ts.BindingElement) => {\n this.owner.convertNode(context, element);\n\n if (_ts.isBindingPattern(element.name)) {\n this.convertBindingPattern(context, <ts.BindingPattern> element.name);\n }\n });\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"variable-statement.js","sourceRoot":"","sources":["../../../../src/lib/converter/nodes/variable-statement.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AACjC,uCAAyC;AAIzC,4CAAkE;AAGlE;IAAgD,8CAA4C;IAD5F;QAAA,qEA6CC;QAxCG,cAAQ,GAAoB;YACxB,EAAE,CAAC,UAAU,CAAC,iBAAiB;SAClC,CAAC;;IAsCN,CAAC;IA7BG,4CAAO,GAAP,UAAQ,OAAgB,EAAE,IAA0B;QAApD,iBAYC;QAXG,EAAE,CAAC,CAAC,IAAI,CAAC,eAAe,IAAI,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC,CAAC;YAC5D,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC,OAAO,CAAC,UAAC,mBAAmB;gBAC1D,EAAE,CAAC,CAAC,GAAG,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;oBACjD,KAAI,CAAC,qBAAqB,CAAC,OAAO,EAAsB,mBAAmB,CAAC,IAAI,CAAC,CAAC;gBACtF,CAAC;gBAAC,IAAI,CAAC,CAAC;oBACJ,KAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,mBAAmB,CAAC,CAAC;gBACzD,CAAC;YACL,CAAC,CAAC,CAAC;QACP,CAAC;QAED,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;IACzB,CAAC;IAQD,0DAAqB,GAArB,UAAsB,OAAgB,EAAE,IAAuB;QAA/D,iBAQC;QAPI,IAAI,CAAC,QAAgC,CAAC,OAAO,CAAC,UAAC,OAA0B;YACtE,KAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;YAEzC,EAAE,CAAC,CAAC,GAAG,CAAC,gBAAgB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;gBACrC,KAAI,CAAC,qBAAqB,CAAC,OAAO,EAAsB,OAAO,CAAC,IAAI,CAAC,CAAC;YAC1E,CAAC;QACL,CAAC,CAAC,CAAC;IACP,CAAC;IA3CQ,0BAA0B;QADtC,sBAAS,CAAC,EAAC,IAAI,EAAE,yBAAyB,EAAC,CAAC;OAChC,0BAA0B,CA4CtC;IAAD,iCAAC;CAAA,AA5CD,CAAgD,mCAAsB,GA4CrE;AA5CY,gEAA0B","sourcesContent":["import * as ts from 'typescript';\nimport * as _ts from '../../ts-internal';\n\nimport { Reflection } from '../../models/index';\nimport { Context } from '../context';\nimport { Component, ConverterNodeComponent } from '../components';\n\n@Component({name: 'node:variable-statement'})\nexport class VariableStatementConverter extends ConverterNodeComponent<ts.VariableStatement> {\n /**\n * List of supported TypeScript syntax kinds.\n */\n supports: ts.SyntaxKind[] = [\n ts.SyntaxKind.VariableStatement\n ];\n\n /**\n * Analyze the given variable statement node and create a suitable reflection.\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The variable statement node that should be analyzed.\n * @return The resulting reflection or NULL.\n */\n convert(context: Context, node: ts.VariableStatement): Reflection {\n if (node.declarationList && node.declarationList.declarations) {\n node.declarationList.declarations.forEach((variableDeclaration) => {\n if (_ts.isBindingPattern(variableDeclaration.name)) {\n this.convertBindingPattern(context, <ts.BindingPattern> variableDeclaration.name);\n } else {\n this.owner.convertNode(context, variableDeclaration);\n }\n });\n }\n\n return context.scope;\n }\n\n /**\n * Traverse the elements of the given binding pattern and create the corresponding variable reflections.\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The binding pattern node that should be analyzed.\n */\n convertBindingPattern(context: Context, node: ts.BindingPattern) {\n (node.elements as ts.BindingElement[]).forEach((element: ts.BindingElement) => {\n this.owner.convertNode(context, element);\n\n if (_ts.isBindingPattern(element.name)) {\n this.convertBindingPattern(context, <ts.BindingPattern> element.name);\n }\n });\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/nodes/variable.js b/node_modules/typedoc/dist/lib/converter/nodes/variable.js
index eca13182f..36fe0b4b0 100644
--- a/node_modules/typedoc/dist/lib/converter/nodes/variable.js
+++ b/node_modules/typedoc/dist/lib/converter/nodes/variable.js
@@ -98,10 +98,10 @@ var VariableConverter = (function (_super) {
});
return variable;
};
+ VariableConverter = __decorate([
+ components_1.Component({ name: 'node:variable' })
+ ], VariableConverter);
return VariableConverter;
}(components_1.ConverterNodeComponent));
-VariableConverter = __decorate([
- components_1.Component({ name: 'node:variable' })
-], VariableConverter);
exports.VariableConverter = VariableConverter;
//# sourceMappingURL=variable.js.map \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/nodes/variable.js.map b/node_modules/typedoc/dist/lib/converter/nodes/variable.js.map
index f41bd262d..2a1698536 100644
--- a/node_modules/typedoc/dist/lib/converter/nodes/variable.js.map
+++ b/node_modules/typedoc/dist/lib/converter/nodes/variable.js.map
@@ -1 +1 @@
-{"version":3,"file":"variable.js","sourceRoot":"","sources":["../../../../src/lib/converter/nodes/variable.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AACjC,uCAAyC;AAEzC,4CAA6E;AAC7E,4CAAoE;AAEpE,4CAAgE;AAChE,kCAA6C;AAG7C,IAAa,iBAAiB;IAAS,qCAA8C;IADrF;QAAA,qEAqFC;QAhFG,cAAQ,GAAoB;YACxB,EAAE,CAAC,UAAU,CAAC,iBAAiB;YAC/B,EAAE,CAAC,UAAU,CAAC,mBAAmB;YACjC,EAAE,CAAC,UAAU,CAAC,kBAAkB;YAChC,EAAE,CAAC,UAAU,CAAC,2BAA2B;YACzC,EAAE,CAAC,UAAU,CAAC,mBAAmB;YACjC,EAAE,CAAC,UAAU,CAAC,cAAc;SAC/B,CAAC;;IAyEN,CAAC;IAvEG,iDAAqB,GAArB,UAAsB,aAAyC;QAC3D,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC,CAAC;YAC5B,MAAM,CAAC,IAAI,CAAC;QAChB,CAAC;QACD,MAAM,CAAC,aAAa,CAAC,UAAU,CAAC,MAAM,KAAK,CAAC,CAAC;IACjD,CAAC;IASD,mCAAO,GAAP,UAAQ,OAAgB,EAAE,IAA4B;QAAtD,iBAwDC;QAvDG,IAAM,OAAO,GAAG,qBAAa,CAAC,IAAI,CAAC,CAAC;QACpC,EAAE,CAAC,CAAC,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;YACvC,IAAM,WAAW,GAAG,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;YACpD,EAAE,CAAC,CAAC,WAAW,IAAI,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;gBACpC,IAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;gBACrF,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;oBACX,QAAQ,CAAC,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;gBACrC,CAAC;gBACD,MAAM,CAAC,QAAQ,CAAC;YACpB,CAAC;QACL,CAAC;QAED,IAAI,IAAY,EAAE,gBAAyB,CAAC;QAC5C,EAAE,CAAC,CAAC,GAAG,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAClC,EAAE,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;gBACvB,IAAI,GAAG,GAAG,CAAC,uBAAuB,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC;gBACzD,gBAAgB,GAAG,IAAI,CAAC;YAC5B,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,MAAM,CAAC,IAAI,CAAC;YAChB,CAAC;QACL,CAAC;QAED,IAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;QAC5B,IAAM,IAAI,GAAG,KAAK,CAAC,IAAI,GAAG,sBAAc,CAAC,gBAAgB,GAAG,sBAAc,CAAC,QAAQ,GAAG,sBAAc,CAAC,QAAQ,CAAC;QAC9G,IAAM,QAAQ,GAAG,yBAAiB,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QAC9D,OAAO,CAAC,SAAS,CAAC,QAAQ,EAAE;YACxB,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;gBACnB,MAAM,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC;oBAC5B,KAAK,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC;oBACjC,KAAK,EAAE,CAAC,UAAU,CAAC,kBAAkB;wBACjC,QAAQ,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,GAAG,sBAAc,CAAC,gBAAgB,GAAG,sBAAc,CAAC,MAAM,GAAG,sBAAc,CAAC,QAAQ,CAAC;wBAC/G,KAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;wBAClD,KAAK,CAAC;oBACV,KAAK,EAAE,CAAC,UAAU,CAAC,uBAAuB;wBACtC,EAAE,CAAC,CAAC,CAAC,KAAI,CAAC,qBAAqB,CAA8B,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;4BAC7E,QAAQ,CAAC,IAAI,GAAG,sBAAc,CAAC,aAAa,CAAC;4BAC7C,QAAQ,CAAC,IAAI,GAAG,IAAI,qBAAa,CAAC,QAAQ,CAAC,CAAC;4BAC5C,KAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;wBACtD,CAAC;wBACD,KAAK,CAAC;oBACV;wBACI,QAAQ,CAAC,YAAY,GAAG,2BAAmB,CAAC,IAAI,CAAC,CAAC;gBAC1D,CAAC;YACL,CAAC;YAED,EAAE,CAAC,CAAC,QAAQ,CAAC,IAAI,KAAK,IAAI,IAAI,QAAQ,CAAC,IAAI,KAAK,sBAAc,CAAC,KAAK,CAAC,CAAC,CAAC;gBACnE,EAAE,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC;oBACnB,QAAQ,CAAC,IAAI,GAAG,KAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;gBAC/D,CAAC;gBAAC,IAAI,CAAC,CAAC;oBACJ,QAAQ,CAAC,IAAI,GAAG,KAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC;gBAChG,CAAC;YACL,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,QAAQ,CAAC;IACpB,CAAC;IACL,wBAAC;AAAD,CAAC,AApFD,CAAuC,mCAAsB,GAoF5D;AApFY,iBAAiB;IAD7B,sBAAS,CAAC,EAAC,IAAI,EAAE,eAAe,EAAC,CAAC;GACtB,iBAAiB,CAoF7B;AApFY,8CAAiB","sourcesContent":["import * as ts from 'typescript';\nimport * as _ts from '../../ts-internal';\n\nimport {Reflection, ReflectionKind, IntrinsicType} from '../../models/index';\nimport {createDeclaration, createComment} from '../factories/index';\nimport {Context} from '../context';\nimport {Component, ConverterNodeComponent} from '../components';\nimport {convertDefaultValue} from '../index';\n\n@Component({name: 'node:variable'})\nexport class VariableConverter extends ConverterNodeComponent<ts.VariableDeclaration> {\n /**\n * List of supported TypeScript syntax kinds.\n */\n supports: ts.SyntaxKind[] = [\n ts.SyntaxKind.PropertySignature,\n ts.SyntaxKind.PropertyDeclaration,\n ts.SyntaxKind.PropertyAssignment,\n ts.SyntaxKind.ShorthandPropertyAssignment,\n ts.SyntaxKind.VariableDeclaration,\n ts.SyntaxKind.BindingElement\n ];\n\n isSimpleObjectLiteral(objectLiteral: ts.ObjectLiteralExpression): boolean {\n if (!objectLiteral.properties) {\n return true;\n }\n return objectLiteral.properties.length === 0;\n }\n\n /**\n * Analyze the given variable declaration node and create a suitable reflection.\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The variable declaration node that should be analyzed.\n * @return The resulting reflection or NULL.\n */\n convert(context: Context, node: ts.VariableDeclaration): Reflection {\n const comment = createComment(node);\n if (comment && comment.hasTag('resolve')) {\n const resolveType = context.getTypeAtLocation(node);\n if (resolveType && resolveType.symbol) {\n const resolved = this.owner.convertNode(context, resolveType.symbol.declarations[0]);\n if (resolved) {\n resolved.name = node.symbol.name;\n }\n return resolved;\n }\n }\n\n let name: string, isBindingPattern: boolean;\n if (_ts.isBindingPattern(node.name)) {\n if (node['propertyName']) {\n name = _ts.declarationNameToString(node['propertyName']);\n isBindingPattern = true;\n } else {\n return null;\n }\n }\n\n const scope = context.scope;\n const kind = scope.kind & ReflectionKind.ClassOrInterface ? ReflectionKind.Property : ReflectionKind.Variable;\n const variable = createDeclaration(context, node, kind, name);\n context.withScope(variable, () => {\n if (node.initializer) {\n switch (node.initializer.kind) {\n case ts.SyntaxKind.ArrowFunction:\n case ts.SyntaxKind.FunctionExpression:\n variable.kind = scope.kind & ReflectionKind.ClassOrInterface ? ReflectionKind.Method : ReflectionKind.Function;\n this.owner.convertNode(context, node.initializer);\n break;\n case ts.SyntaxKind.ObjectLiteralExpression:\n if (!this.isSimpleObjectLiteral(<ts.ObjectLiteralExpression> node.initializer)) {\n variable.kind = ReflectionKind.ObjectLiteral;\n variable.type = new IntrinsicType('object');\n this.owner.convertNode(context, node.initializer);\n }\n break;\n default:\n variable.defaultValue = convertDefaultValue(node);\n }\n }\n\n if (variable.kind === kind || variable.kind === ReflectionKind.Event) {\n if (isBindingPattern) {\n variable.type = this.owner.convertType(context, node.name);\n } else {\n variable.type = this.owner.convertType(context, node.type, context.getTypeAtLocation(node));\n }\n }\n });\n\n return variable;\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"variable.js","sourceRoot":"","sources":["../../../../src/lib/converter/nodes/variable.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AACjC,uCAAyC;AAEzC,4CAA+E;AAC/E,4CAAsE;AAEtE,4CAAkE;AAClE,kCAA+C;AAG/C;IAAuC,qCAA8C;IADrF;QAAA,qEAqFC;QAhFG,cAAQ,GAAoB;YACxB,EAAE,CAAC,UAAU,CAAC,iBAAiB;YAC/B,EAAE,CAAC,UAAU,CAAC,mBAAmB;YACjC,EAAE,CAAC,UAAU,CAAC,kBAAkB;YAChC,EAAE,CAAC,UAAU,CAAC,2BAA2B;YACzC,EAAE,CAAC,UAAU,CAAC,mBAAmB;YACjC,EAAE,CAAC,UAAU,CAAC,cAAc;SAC/B,CAAC;;IAyEN,CAAC;IAvEG,iDAAqB,GAArB,UAAsB,aAAyC;QAC3D,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC,CAAC;YAC5B,MAAM,CAAC,IAAI,CAAC;QAChB,CAAC;QACD,MAAM,CAAC,aAAa,CAAC,UAAU,CAAC,MAAM,KAAK,CAAC,CAAC;IACjD,CAAC;IASD,mCAAO,GAAP,UAAQ,OAAgB,EAAE,IAA4B;QAAtD,iBAwDC;QAvDG,IAAM,OAAO,GAAG,qBAAa,CAAC,IAAI,CAAC,CAAC;QACpC,EAAE,CAAC,CAAC,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;YACvC,IAAM,WAAW,GAAG,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;YACpD,EAAE,CAAC,CAAC,WAAW,IAAI,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;gBACpC,IAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;gBACrF,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;oBACX,QAAQ,CAAC,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;gBACrC,CAAC;gBACD,MAAM,CAAC,QAAQ,CAAC;YACpB,CAAC;QACL,CAAC;QAED,IAAI,IAAY,EAAE,gBAAyB,CAAC;QAC5C,EAAE,CAAC,CAAC,GAAG,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAClC,EAAE,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;gBACvB,IAAI,GAAG,GAAG,CAAC,uBAAuB,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC;gBACzD,gBAAgB,GAAG,IAAI,CAAC;YAC5B,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,MAAM,CAAC,IAAI,CAAC;YAChB,CAAC;QACL,CAAC;QAED,IAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;QAC5B,IAAM,IAAI,GAAG,KAAK,CAAC,IAAI,GAAG,sBAAc,CAAC,gBAAgB,GAAG,sBAAc,CAAC,QAAQ,GAAG,sBAAc,CAAC,QAAQ,CAAC;QAC9G,IAAM,QAAQ,GAAG,yBAAiB,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QAC9D,OAAO,CAAC,SAAS,CAAC,QAAQ,EAAE;YACxB,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;gBACnB,MAAM,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC;oBAC5B,KAAK,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC;oBACjC,KAAK,EAAE,CAAC,UAAU,CAAC,kBAAkB;wBACjC,QAAQ,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,GAAG,sBAAc,CAAC,gBAAgB,GAAG,sBAAc,CAAC,MAAM,GAAG,sBAAc,CAAC,QAAQ,CAAC;wBAC/G,KAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;wBAClD,KAAK,CAAC;oBACV,KAAK,EAAE,CAAC,UAAU,CAAC,uBAAuB;wBACtC,EAAE,CAAC,CAAC,CAAC,KAAI,CAAC,qBAAqB,CAA8B,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;4BAC7E,QAAQ,CAAC,IAAI,GAAG,sBAAc,CAAC,aAAa,CAAC;4BAC7C,QAAQ,CAAC,IAAI,GAAG,IAAI,qBAAa,CAAC,QAAQ,CAAC,CAAC;4BAC5C,KAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;wBACtD,CAAC;wBACD,KAAK,CAAC;oBACV;wBACI,QAAQ,CAAC,YAAY,GAAG,2BAAmB,CAAC,IAAI,CAAC,CAAC;gBAC1D,CAAC;YACL,CAAC;YAED,EAAE,CAAC,CAAC,QAAQ,CAAC,IAAI,KAAK,IAAI,IAAI,QAAQ,CAAC,IAAI,KAAK,sBAAc,CAAC,KAAK,CAAC,CAAC,CAAC;gBACnE,EAAE,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC;oBACnB,QAAQ,CAAC,IAAI,GAAG,KAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;gBAC/D,CAAC;gBAAC,IAAI,CAAC,CAAC;oBACJ,QAAQ,CAAC,IAAI,GAAG,KAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC;gBAChG,CAAC;YACL,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,QAAQ,CAAC;IACpB,CAAC;IAnFQ,iBAAiB;QAD7B,sBAAS,CAAC,EAAC,IAAI,EAAE,eAAe,EAAC,CAAC;OACtB,iBAAiB,CAoF7B;IAAD,wBAAC;CAAA,AApFD,CAAuC,mCAAsB,GAoF5D;AApFY,8CAAiB","sourcesContent":["import * as ts from 'typescript';\nimport * as _ts from '../../ts-internal';\n\nimport { Reflection, ReflectionKind, IntrinsicType } from '../../models/index';\nimport { createDeclaration, createComment } from '../factories/index';\nimport { Context } from '../context';\nimport { Component, ConverterNodeComponent } from '../components';\nimport { convertDefaultValue } from '../index';\n\n@Component({name: 'node:variable'})\nexport class VariableConverter extends ConverterNodeComponent<ts.VariableDeclaration> {\n /**\n * List of supported TypeScript syntax kinds.\n */\n supports: ts.SyntaxKind[] = [\n ts.SyntaxKind.PropertySignature,\n ts.SyntaxKind.PropertyDeclaration,\n ts.SyntaxKind.PropertyAssignment,\n ts.SyntaxKind.ShorthandPropertyAssignment,\n ts.SyntaxKind.VariableDeclaration,\n ts.SyntaxKind.BindingElement\n ];\n\n isSimpleObjectLiteral(objectLiteral: ts.ObjectLiteralExpression): boolean {\n if (!objectLiteral.properties) {\n return true;\n }\n return objectLiteral.properties.length === 0;\n }\n\n /**\n * Analyze the given variable declaration node and create a suitable reflection.\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The variable declaration node that should be analyzed.\n * @return The resulting reflection or NULL.\n */\n convert(context: Context, node: ts.VariableDeclaration): Reflection {\n const comment = createComment(node);\n if (comment && comment.hasTag('resolve')) {\n const resolveType = context.getTypeAtLocation(node);\n if (resolveType && resolveType.symbol) {\n const resolved = this.owner.convertNode(context, resolveType.symbol.declarations[0]);\n if (resolved) {\n resolved.name = node.symbol.name;\n }\n return resolved;\n }\n }\n\n let name: string, isBindingPattern: boolean;\n if (_ts.isBindingPattern(node.name)) {\n if (node['propertyName']) {\n name = _ts.declarationNameToString(node['propertyName']);\n isBindingPattern = true;\n } else {\n return null;\n }\n }\n\n const scope = context.scope;\n const kind = scope.kind & ReflectionKind.ClassOrInterface ? ReflectionKind.Property : ReflectionKind.Variable;\n const variable = createDeclaration(context, node, kind, name);\n context.withScope(variable, () => {\n if (node.initializer) {\n switch (node.initializer.kind) {\n case ts.SyntaxKind.ArrowFunction:\n case ts.SyntaxKind.FunctionExpression:\n variable.kind = scope.kind & ReflectionKind.ClassOrInterface ? ReflectionKind.Method : ReflectionKind.Function;\n this.owner.convertNode(context, node.initializer);\n break;\n case ts.SyntaxKind.ObjectLiteralExpression:\n if (!this.isSimpleObjectLiteral(<ts.ObjectLiteralExpression> node.initializer)) {\n variable.kind = ReflectionKind.ObjectLiteral;\n variable.type = new IntrinsicType('object');\n this.owner.convertNode(context, node.initializer);\n }\n break;\n default:\n variable.defaultValue = convertDefaultValue(node);\n }\n }\n\n if (variable.kind === kind || variable.kind === ReflectionKind.Event) {\n if (isBindingPattern) {\n variable.type = this.owner.convertType(context, node.name);\n } else {\n variable.type = this.owner.convertType(context, node.type, context.getTypeAtLocation(node));\n }\n }\n });\n\n return variable;\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/plugins/CommentPlugin.js b/node_modules/typedoc/dist/lib/converter/plugins/CommentPlugin.js
index a2737fc01..922b06dac 100644
--- a/node_modules/typedoc/dist/lib/converter/plugins/CommentPlugin.js
+++ b/node_modules/typedoc/dist/lib/converter/plugins/CommentPlugin.js
@@ -22,11 +22,12 @@ var index_3 = require("../../models/reflections/index");
var components_1 = require("../components");
var comment_1 = require("../factories/comment");
var converter_1 = require("../converter");
-var CommentPlugin = CommentPlugin_1 = (function (_super) {
+var CommentPlugin = (function (_super) {
__extends(CommentPlugin, _super);
function CommentPlugin() {
return _super !== null && _super.apply(this, arguments) || this;
}
+ CommentPlugin_1 = CommentPlugin;
CommentPlugin.prototype.initialize = function () {
this.listenTo(this.owner, (_a = {},
_a[converter_1.Converter.EVENT_BEGIN] = this.onBegin,
@@ -268,11 +269,11 @@ var CommentPlugin = CommentPlugin_1 = (function (_super) {
}
}
};
+ CommentPlugin = CommentPlugin_1 = __decorate([
+ components_1.Component({ name: 'comment' })
+ ], CommentPlugin);
return CommentPlugin;
+ var CommentPlugin_1;
}(components_1.ConverterComponent));
-CommentPlugin = CommentPlugin_1 = __decorate([
- components_1.Component({ name: 'comment' })
-], CommentPlugin);
exports.CommentPlugin = CommentPlugin;
-var CommentPlugin_1;
//# sourceMappingURL=CommentPlugin.js.map \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/plugins/CommentPlugin.js.map b/node_modules/typedoc/dist/lib/converter/plugins/CommentPlugin.js.map
index 9c9da421b..3fb3c58cd 100644
--- a/node_modules/typedoc/dist/lib/converter/plugins/CommentPlugin.js.map
+++ b/node_modules/typedoc/dist/lib/converter/plugins/CommentPlugin.js.map
@@ -1 +1 @@
-{"version":3,"file":"CommentPlugin.js","sourceRoot":"","sources":["../../../../src/lib/converter/plugins/CommentPlugin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAEA,qDAAgE;AAChE,kDAAuD;AACvD,wDAEoF;AACpF,4CAA4D;AAC5D,gDAAiE;AACjE,0CAAuC;AA4BvC,IAAa,aAAa;IAAS,iCAAkB;IAArD;;IAwVA,CAAC;IA1UG,kCAAU,GAAV;QACI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK;YACpB,GAAC,qBAAS,CAAC,WAAW,IAAqB,IAAI,CAAC,OAAO;YACvD,GAAC,qBAAS,CAAC,wBAAwB,IAAQ,IAAI,CAAC,aAAa;YAC7D,GAAC,qBAAS,CAAC,sBAAsB,IAAU,IAAI,CAAC,aAAa;YAC7D,GAAC,qBAAS,CAAC,2BAA2B,IAAK,IAAI,CAAC,qBAAqB;YACrE,GAAC,qBAAS,CAAC,6BAA6B,IAAG,IAAI,CAAC,wBAAwB;YACxE,GAAC,qBAAS,CAAC,mBAAmB,IAAa,IAAI,CAAC,cAAc;YAC9D,GAAC,qBAAS,CAAC,aAAa,IAAmB,IAAI,CAAC,SAAS;gBAC3D,CAAC;;IACP,CAAC;IAEO,0CAAkB,GAA1B,UAA2B,OAAe,EAAE,UAAsB;QAC9D,IAAM,WAAW,GAAG,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAEzE,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;YAC/B,IAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;YAC1C,EAAE,CAAC,CAAC,CAAC,WAAW,IAAI,CAAC,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;gBAC9E,MAAM,CAAC;YACX,CAAC;YAED,IAAI,CAAC,QAAQ,GAAM,OAAO,CAAC;YAC3B,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QACnC,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC,GAAG;gBAC3B,UAAU,EAAG,UAAU;gBACvB,QAAQ,EAAK,OAAO;gBACpB,WAAW,EAAE,WAAW;aAC3B,CAAC;QACN,CAAC;IACL,CAAC;IAQO,sCAAc,GAAtB,UAAuB,UAAsB,EAAE,OAAgB;QAC3D,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;YAC5B,UAAU,CAAC,OAAO,CAAC,sBAAc,CAAC,OAAO,CAAC,CAAC;YAC3C,eAAa,CAAC,UAAU,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QACjD,CAAC;QAED,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;YAC9B,UAAU,CAAC,OAAO,CAAC,sBAAc,CAAC,SAAS,CAAC,CAAC;YAC7C,eAAa,CAAC,UAAU,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;QACnD,CAAC;QAED,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;YAC3B,UAAU,CAAC,OAAO,CAAC,sBAAc,CAAC,MAAM,CAAC,CAAC;YAC1C,eAAa,CAAC,UAAU,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QAChD,CAAC;QAED,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;YAC1B,UAAU,CAAC,IAAI,GAAG,sBAAc,CAAC,KAAK,CAAC;YAEvC,eAAa,CAAC,UAAU,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAC/C,CAAC;QAED,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;YAC3B,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;gBACf,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;YACrB,CAAC;YACD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACjC,CAAC;IACL,CAAC;IAOO,+BAAO,GAAf,UAAgB,OAAgB;QAC5B,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;IACvB,CAAC;IASO,6CAAqB,GAA7B,UAA8B,OAAgB,EAAE,UAAmC,EAAE,IAAc;QAC/F,IAAM,OAAO,GAAG,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC;QAC1C,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YACV,IAAI,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC;YACvD,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;gBACP,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,MAAI,UAAU,CAAC,IAAI,MAAG,CAAC,CAAC;YAC1D,CAAC;YACD,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;gBACP,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC;YACnD,CAAC;YAED,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;gBACN,UAAU,CAAC,OAAO,GAAG,IAAI,eAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;gBAC3C,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;YACtD,CAAC;QACL,CAAC;IACL,CAAC;IAWO,qCAAa,GAArB,UAAsB,OAAgB,EAAE,UAAsB,EAAE,IAAc;QAC1E,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;YACR,MAAM,CAAC;QACX,CAAC;QACD,IAAM,UAAU,GAAG,uBAAa,CAAC,IAAI,CAAC,CAAC;QACvC,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;YACd,MAAM,CAAC;QACX,CAAC;QAED,EAAE,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,sBAAc,CAAC,gBAAgB,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,sBAAc,CAAC,KAAK,CAAC,IAAI,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;YAC9H,IAAM,OAAO,GAAG,sBAAY,CAAC,UAAU,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;YAC7D,IAAI,CAAC,cAAc,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;QAC7C,CAAC;QAAC,IAAI,CAAC,EAAE,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,sBAAc,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YAClD,IAAI,CAAC,kBAAkB,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;QACpD,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,IAAM,OAAO,GAAG,sBAAY,CAAC,UAAU,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;YAC7D,IAAI,CAAC,cAAc,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;YACzC,UAAU,CAAC,OAAO,GAAG,OAAO,CAAC;QACjC,CAAC;IACL,CAAC;IASO,gDAAwB,GAAhC,UAAiC,OAAgB,EAAE,UAAsB,EAAE,IAAc;QACrF,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;YACR,MAAM,CAAC;QACX,CAAC;QAED,IAAM,OAAO,GAAG,uBAAa,CAAC,IAAI,CAAC,CAAC;QACpC,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YACV,UAAU,CAAC,OAAO,GAAG,sBAAY,CAAC,OAAO,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;QACnE,CAAC;IACL,CAAC;IAOO,sCAAc,GAAtB,UAAuB,OAAgB;QACnC,GAAG,CAAC,CAAC,IAAI,EAAE,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;YAC3B,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;gBACpC,QAAQ,CAAC;YACb,CAAC;YAED,IAAM,IAAI,GAAM,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;YAClC,IAAM,OAAO,GAAG,sBAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YAC5C,eAAa,CAAC,UAAU,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;YAE/C,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;YAC9C,IAAI,CAAC,UAAU,CAAC,OAAO,GAAG,OAAO,CAAC;QACtC,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;YACd,IAAM,SAAO,GAAG,OAAO,CAAC,OAAO,CAAC;YAChC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,UAAC,UAAU;gBAC3B,eAAa,CAAC,gBAAgB,CAAC,SAAO,EAAE,UAAU,CAAC,CAAC;YACxD,CAAC,CAAC,CAAC;QACP,CAAC;IACL,CAAC;IAcO,iCAAS,GAAjB,UAAkB,OAAgB,EAAE,UAAiC;QACjE,EAAE,CAAC,CAAC,CAAC,CAAC,UAAU,YAAY,6BAAqB,CAAC,CAAC,CAAC,CAAC;YACjD,MAAM,CAAC;QACX,CAAC;QAED,IAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,EAAE,CAAC;QACjD,EAAE,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;YACpB,IAAM,SAAO,GAAG,UAAU,CAAC,OAAO,CAAC;YACnC,EAAE,CAAC,CAAC,SAAO,IAAI,SAAO,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;gBACvC,SAAO,CAAC,OAAO,GAAG,SAAO,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC;gBACjD,eAAa,CAAC,UAAU,CAAC,SAAO,EAAE,SAAS,CAAC,CAAC;YACjD,CAAC;YAED,UAAU,CAAC,OAAO,CAAC,UAAC,SAAS;gBACzB,IAAI,YAAY,GAAG,SAAS,CAAC,OAAO,CAAC;gBACrC,EAAE,CAAC,CAAC,YAAY,IAAI,YAAY,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;oBACjD,YAAY,CAAC,OAAO,GAAG,YAAY,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC;oBAC3D,eAAa,CAAC,UAAU,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC;gBACtD,CAAC;gBAED,EAAE,CAAC,CAAC,SAAO,CAAC,CAAC,CAAC;oBACV,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC;wBAChB,YAAY,GAAG,SAAS,CAAC,OAAO,GAAG,IAAI,eAAO,EAAE,CAAC;oBACrD,CAAC;oBAED,YAAY,CAAC,SAAS,GAAG,YAAY,CAAC,SAAS,IAAI,SAAO,CAAC,SAAS,CAAC;oBACrE,YAAY,CAAC,IAAI,GAAQ,YAAY,CAAC,IAAI,IAAS,SAAO,CAAC,IAAI,CAAC;oBAChE,YAAY,CAAC,OAAO,GAAK,YAAY,CAAC,OAAO,IAAM,SAAO,CAAC,OAAO,CAAC;gBACvE,CAAC;gBAED,EAAE,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC;oBACvB,SAAS,CAAC,UAAU,CAAC,OAAO,CAAC,UAAC,SAAS;wBACnC,IAAI,GAAe,CAAC;wBACpB,EAAE,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC;4BACf,GAAG,GAAG,YAAY,CAAC,MAAM,CAAC,OAAO,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC;wBACvD,CAAC;wBACD,EAAE,CAAC,CAAC,SAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;4BAClB,GAAG,GAAG,SAAO,CAAC,MAAM,CAAC,OAAO,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC;wBAClD,CAAC;wBACD,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;4BACN,SAAS,CAAC,OAAO,GAAG,IAAI,eAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;wBAC9C,CAAC;oBACL,CAAC,CAAC,CAAC;gBACP,CAAC;gBAED,eAAa,CAAC,UAAU,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;YACpD,CAAC,CAAC,CAAC;YAEH,eAAa,CAAC,UAAU,CAAC,SAAO,EAAE,OAAO,CAAC,CAAC;QAC/C,CAAC;IACL,CAAC;IAQM,wBAAU,GAAjB,UAAkB,OAAgB,EAAE,OAAe;QAC/C,EAAE,CAAC,CAAC,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;YAC5B,MAAM,CAAC;QACX,CAAC;QAED,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC;QACnC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;YACX,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC;gBACtC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;gBAC1B,CAAC,EAAE,CAAC;YACR,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,CAAC,EAAE,CAAC;YACR,CAAC;QACL,CAAC;IACL,CAAC;IAKM,8BAAgB,GAAvB,UAAwB,OAA0B,EAAE,UAAsB;QACtE,UAAU,CAAC,QAAQ,CAAC,UAAC,KAAK,IAAK,OAAA,eAAa,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,CAAC,EAA9C,CAA8C,CAAC,CAAC;QAE/E,IAAM,MAAM,GAA2B,UAAU,CAAC,MAAM,CAAC;QACzD,MAAM,CAAC,QAAQ,CAAC,UAAC,KAAiB,EAAE,QAA0B;YAC1D,EAAE,CAAC,CAAC,KAAK,KAAK,UAAU,CAAC,CAAC,CAAC;gBACvB,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;oBACf,KAAK,wBAAgB,CAAC,QAAQ;wBAC1B,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;4BAClB,IAAM,KAAK,GAAG,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAyB,UAAU,CAAC,CAAC;4BAC1E,EAAE,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;gCACf,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;4BACrC,CAAC;wBACL,CAAC;wBACD,KAAK,CAAC;oBACV,KAAK,wBAAgB,CAAC,YAAY;wBAC9B,OAAO,MAAM,CAAC,YAAY,CAAC;wBAC3B,KAAK,CAAC;oBACV,KAAK,wBAAgB,CAAC,cAAc;wBAChC,OAAO,MAAM,CAAC,cAAc,CAAC;wBAC7B,KAAK,CAAC;oBACV,KAAK,wBAAgB,CAAC,UAAU;wBAC5B,EAAE,CAAC,CAAwB,UAAU,CAAC,MAAO,CAAC,UAAU,CAAC,CAAC,CAAC;4BACvD,IAAM,KAAK,GAA0B,UAAU,CAAC,MAAO,CAAC,UAAU,CAAC,OAAO,CAAuB,UAAU,CAAC,CAAC;4BAC7G,EAAE,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;gCACQ,UAAU,CAAC,MAAO,CAAC,UAAU,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;4BAC1E,CAAC;wBACL,CAAC;wBACD,KAAK,CAAC;oBACV,KAAK,wBAAgB,CAAC,YAAY;wBAC9B,OAAO,MAAM,CAAC,YAAY,CAAC;wBAC3B,KAAK,CAAC;oBACV,KAAK,wBAAgB,CAAC,UAAU;wBAC5B,EAAE,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC;4BACpB,IAAM,KAAK,GAAG,MAAM,CAAC,UAAU,CAAC,OAAO,CAAuB,UAAU,CAAC,CAAC;4BAC1E,EAAE,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;gCACf,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;4BACvC,CAAC;wBACL,CAAC;wBACD,KAAK,CAAC;oBACV,KAAK,wBAAgB,CAAC,WAAW;wBAC7B,MAAM,CAAC,IAAI,GAAG,IAAI,qBAAa,CAAC,QAAQ,CAAC,CAAC;wBAC1C,KAAK,CAAC;oBACV,KAAK,wBAAgB,CAAC,aAAa;wBAC/B,EAAE,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC;4BACxB,IAAM,KAAK,GAAG,MAAM,CAAC,cAAc,CAAC,OAAO,CAA2B,UAAU,CAAC,CAAC;4BAClF,EAAE,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;gCACf,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;4BAC3C,CAAC;wBACL,CAAC;wBACD,KAAK,CAAC;gBACd,CAAC;YACL,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,IAAI,EAAE,GAAG,UAAU,CAAC,EAAE,CAAC;QACvB,OAAO,OAAO,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;QAE/B,GAAG,CAAC,CAAC,IAAI,GAAG,IAAI,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC;YACpC,EAAE,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;gBACjF,OAAO,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;YACtC,CAAC;QACL,CAAC;IACL,CAAC;IACL,oBAAC;AAAD,CAAC,AAxVD,CAAmC,+BAAkB,GAwVpD;AAxVY,aAAa;IADzB,sBAAS,CAAC,EAAC,IAAI,EAAE,SAAS,EAAC,CAAC;GAChB,aAAa,CAwVzB;AAxVY,sCAAa","sourcesContent":["import * as ts from 'typescript';\n\nimport {Comment, CommentTag} from '../../models/comments/index';\nimport {IntrinsicType} from '../../models/types/index';\nimport {Reflection, ReflectionFlag, ReflectionKind, TraverseProperty,\n TypeParameterReflection, DeclarationReflection, ProjectReflection,\n SignatureReflection, ParameterReflection} from '../../models/reflections/index';\nimport {Component, ConverterComponent} from '../components';\nimport {parseComment, getRawComment} from '../factories/comment';\nimport {Converter} from '../converter';\nimport {Context} from '../context';\n\n/**\n * Structure used by [[ContainerCommentHandler]] to store discovered module comments.\n */\ninterface ModuleComment {\n /**\n * The module reflection this comment is targeting.\n */\n reflection: Reflection;\n\n /**\n * The full text of the best matched comment.\n */\n fullText: string;\n\n /**\n * Has the full text been marked as being preferred?\n */\n isPreferred: boolean;\n}\n\n/**\n * A handler that parses javadoc comments and attaches [[Models.Comment]] instances to\n * the generated reflections.\n */\n@Component({name: 'comment'})\nexport class CommentPlugin extends ConverterComponent {\n /**\n * List of discovered module comments.\n */\n private comments: {[id: number]: ModuleComment};\n\n /**\n * List of hidden reflections.\n */\n private hidden: Reflection[];\n\n /**\n * Create a new CommentPlugin instance.\n */\n initialize() {\n this.listenTo(this.owner, {\n [Converter.EVENT_BEGIN]: this.onBegin,\n [Converter.EVENT_CREATE_DECLARATION]: this.onDeclaration,\n [Converter.EVENT_CREATE_SIGNATURE]: this.onDeclaration,\n [Converter.EVENT_CREATE_TYPE_PARAMETER]: this.onCreateTypeParameter,\n [Converter.EVENT_FUNCTION_IMPLEMENTATION]: this.onFunctionImplementation,\n [Converter.EVENT_RESOLVE_BEGIN]: this.onBeginResolve,\n [Converter.EVENT_RESOLVE]: this.onResolve\n });\n }\n\n private storeModuleComment(comment: string, reflection: Reflection) {\n const isPreferred = (comment.toLowerCase().indexOf('@preferred') !== -1);\n\n if (this.comments[reflection.id]) {\n const info = this.comments[reflection.id];\n if (!isPreferred && (info.isPreferred || info.fullText.length > comment.length)) {\n return;\n }\n\n info.fullText = comment;\n info.isPreferred = isPreferred;\n } else {\n this.comments[reflection.id] = {\n reflection: reflection,\n fullText: comment,\n isPreferred: isPreferred\n };\n }\n }\n\n /**\n * Apply all comment tag modifiers to the given reflection.\n *\n * @param reflection The reflection the modifiers should be applied to.\n * @param comment The comment that should be searched for modifiers.\n */\n private applyModifiers(reflection: Reflection, comment: Comment) {\n if (comment.hasTag('private')) {\n reflection.setFlag(ReflectionFlag.Private);\n CommentPlugin.removeTags(comment, 'private');\n }\n\n if (comment.hasTag('protected')) {\n reflection.setFlag(ReflectionFlag.Protected);\n CommentPlugin.removeTags(comment, 'protected');\n }\n\n if (comment.hasTag('public')) {\n reflection.setFlag(ReflectionFlag.Public);\n CommentPlugin.removeTags(comment, 'public');\n }\n\n if (comment.hasTag('event')) {\n reflection.kind = ReflectionKind.Event;\n // reflection.setFlag(ReflectionFlag.Event);\n CommentPlugin.removeTags(comment, 'event');\n }\n\n if (comment.hasTag('hidden')) {\n if (!this.hidden) {\n this.hidden = [];\n }\n this.hidden.push(reflection);\n }\n }\n\n /**\n * Triggered when the converter begins converting a project.\n *\n * @param context The context object describing the current state the converter is in.\n */\n private onBegin(context: Context) {\n this.comments = {};\n }\n\n /**\n * Triggered when the converter has created a type parameter reflection.\n *\n * @param context The context object describing the current state the converter is in.\n * @param reflection The reflection that is currently processed.\n * @param node The node that is currently processed if available.\n */\n private onCreateTypeParameter(context: Context, reflection: TypeParameterReflection, node?: ts.Node) {\n const comment = reflection.parent.comment;\n if (comment) {\n let tag = comment.getTag('typeparam', reflection.name);\n if (!tag) {\n tag = comment.getTag('param', `<${reflection.name}>`);\n }\n if (!tag) {\n tag = comment.getTag('param', reflection.name);\n }\n\n if (tag) {\n reflection.comment = new Comment(tag.text);\n comment.tags.splice(comment.tags.indexOf(tag), 1);\n }\n }\n }\n\n /**\n * Triggered when the converter has created a declaration or signature reflection.\n *\n * Invokes the comment parser.\n *\n * @param context The context object describing the current state the converter is in.\n * @param reflection The reflection that is currently processed.\n * @param node The node that is currently processed if available.\n */\n private onDeclaration(context: Context, reflection: Reflection, node?: ts.Node) {\n if (!node) {\n return;\n }\n const rawComment = getRawComment(node);\n if (!rawComment) {\n return;\n }\n\n if (reflection.kindOf(ReflectionKind.FunctionOrMethod) || (reflection.kindOf(ReflectionKind.Event) && reflection['signatures'])) {\n const comment = parseComment(rawComment, reflection.comment);\n this.applyModifiers(reflection, comment);\n } else if (reflection.kindOf(ReflectionKind.Module)) {\n this.storeModuleComment(rawComment, reflection);\n } else {\n const comment = parseComment(rawComment, reflection.comment);\n this.applyModifiers(reflection, comment);\n reflection.comment = comment;\n }\n }\n\n /**\n * Triggered when the converter has found a function implementation.\n *\n * @param context The context object describing the current state the converter is in.\n * @param reflection The reflection that is currently processed.\n * @param node The node that is currently processed if available.\n */\n private onFunctionImplementation(context: Context, reflection: Reflection, node?: ts.Node) {\n if (!node) {\n return;\n }\n\n const comment = getRawComment(node);\n if (comment) {\n reflection.comment = parseComment(comment, reflection.comment);\n }\n }\n\n /**\n * Triggered when the converter begins resolving a project.\n *\n * @param context The context object describing the current state the converter is in.\n */\n private onBeginResolve(context: Context) {\n for (let id in this.comments) {\n if (!this.comments.hasOwnProperty(id)) {\n continue;\n }\n\n const info = this.comments[id];\n const comment = parseComment(info.fullText);\n CommentPlugin.removeTags(comment, 'preferred');\n\n this.applyModifiers(info.reflection, comment);\n info.reflection.comment = comment;\n }\n\n if (this.hidden) {\n const project = context.project;\n this.hidden.forEach((reflection) => {\n CommentPlugin.removeReflection(project, reflection);\n });\n }\n }\n\n /**\n * Triggered when the converter resolves a reflection.\n *\n * Cleans up comment tags related to signatures like @param or @return\n * and moves their data to the corresponding parameter reflections.\n *\n * This hook also copies over the comment of function implementations to their\n * signatures.\n *\n * @param context The context object describing the current state the converter is in.\n * @param reflection The reflection that is currently resolved.\n */\n private onResolve(context: Context, reflection: DeclarationReflection) {\n if (!(reflection instanceof DeclarationReflection)) {\n return;\n }\n\n const signatures = reflection.getAllSignatures();\n if (signatures.length) {\n const comment = reflection.comment;\n if (comment && comment.hasTag('returns')) {\n comment.returns = comment.getTag('returns').text;\n CommentPlugin.removeTags(comment, 'returns');\n }\n\n signatures.forEach((signature) => {\n let childComment = signature.comment;\n if (childComment && childComment.hasTag('returns')) {\n childComment.returns = childComment.getTag('returns').text;\n CommentPlugin.removeTags(childComment, 'returns');\n }\n\n if (comment) {\n if (!childComment) {\n childComment = signature.comment = new Comment();\n }\n\n childComment.shortText = childComment.shortText || comment.shortText;\n childComment.text = childComment.text || comment.text;\n childComment.returns = childComment.returns || comment.returns;\n }\n\n if (signature.parameters) {\n signature.parameters.forEach((parameter) => {\n let tag: CommentTag;\n if (childComment) {\n tag = childComment.getTag('param', parameter.name);\n }\n if (comment && !tag) {\n tag = comment.getTag('param', parameter.name);\n }\n if (tag) {\n parameter.comment = new Comment(tag.text);\n }\n });\n }\n\n CommentPlugin.removeTags(childComment, 'param');\n });\n\n CommentPlugin.removeTags(comment, 'param');\n }\n }\n\n /**\n * Remove all tags with the given name from the given comment instance.\n *\n * @param comment The comment that should be modified.\n * @param tagName The name of the that that should be removed.\n */\n static removeTags(comment: Comment, tagName: string) {\n if (!comment || !comment.tags) {\n return;\n }\n\n let i = 0, c = comment.tags.length;\n while (i < c) {\n if (comment.tags[i].tagName === tagName) {\n comment.tags.splice(i, 1);\n c--;\n } else {\n i++;\n }\n }\n }\n\n /**\n * Remove the given reflection from the project.\n */\n static removeReflection(project: ProjectReflection, reflection: Reflection) {\n reflection.traverse((child) => CommentPlugin.removeReflection(project, child));\n\n const parent = <DeclarationReflection> reflection.parent;\n parent.traverse((child: Reflection, property: TraverseProperty) => {\n if (child === reflection) {\n switch (property) {\n case TraverseProperty.Children:\n if (parent.children) {\n const index = parent.children.indexOf(<DeclarationReflection> reflection);\n if (index !== -1) {\n parent.children.splice(index, 1);\n }\n }\n break;\n case TraverseProperty.GetSignature:\n delete parent.getSignature;\n break;\n case TraverseProperty.IndexSignature:\n delete parent.indexSignature;\n break;\n case TraverseProperty.Parameters:\n if ((<SignatureReflection> reflection.parent).parameters) {\n const index = (<SignatureReflection> reflection.parent).parameters.indexOf(<ParameterReflection> reflection);\n if (index !== -1) {\n (<SignatureReflection> reflection.parent).parameters.splice(index, 1);\n }\n }\n break;\n case TraverseProperty.SetSignature:\n delete parent.setSignature;\n break;\n case TraverseProperty.Signatures:\n if (parent.signatures) {\n const index = parent.signatures.indexOf(<SignatureReflection> reflection);\n if (index !== -1) {\n parent.signatures.splice(index, 1);\n }\n }\n break;\n case TraverseProperty.TypeLiteral:\n parent.type = new IntrinsicType('Object');\n break;\n case TraverseProperty.TypeParameter:\n if (parent.typeParameters) {\n const index = parent.typeParameters.indexOf(<TypeParameterReflection> reflection);\n if (index !== -1) {\n parent.typeParameters.splice(index, 1);\n }\n }\n break;\n }\n }\n });\n\n let id = reflection.id;\n delete project.reflections[id];\n\n for (let key in project.symbolMapping) {\n if (project.symbolMapping.hasOwnProperty(key) && project.symbolMapping[key] === id) {\n delete project.symbolMapping[key];\n }\n }\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"CommentPlugin.js","sourceRoot":"","sources":["../../../../src/lib/converter/plugins/CommentPlugin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAEA,qDAAkE;AAClE,kDAAyD;AACzD,wDAEqF;AACrF,4CAA8D;AAC9D,gDAAmE;AACnE,0CAAyC;AA4BzC;IAAmC,iCAAkB;IAArD;;IAwVA,CAAC;sBAxVY,aAAa;IActB,kCAAU,GAAV;QACI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK;YACpB,GAAC,qBAAS,CAAC,WAAW,IAAqB,IAAI,CAAC,OAAO;YACvD,GAAC,qBAAS,CAAC,wBAAwB,IAAQ,IAAI,CAAC,aAAa;YAC7D,GAAC,qBAAS,CAAC,sBAAsB,IAAU,IAAI,CAAC,aAAa;YAC7D,GAAC,qBAAS,CAAC,2BAA2B,IAAK,IAAI,CAAC,qBAAqB;YACrE,GAAC,qBAAS,CAAC,6BAA6B,IAAG,IAAI,CAAC,wBAAwB;YACxE,GAAC,qBAAS,CAAC,mBAAmB,IAAa,IAAI,CAAC,cAAc;YAC9D,GAAC,qBAAS,CAAC,aAAa,IAAmB,IAAI,CAAC,SAAS;gBAC3D,CAAC;;IACP,CAAC;IAEO,0CAAkB,GAA1B,UAA2B,OAAe,EAAE,UAAsB;QAC9D,IAAM,WAAW,GAAG,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAEzE,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;YAC/B,IAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;YAC1C,EAAE,CAAC,CAAC,CAAC,WAAW,IAAI,CAAC,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;gBAC9E,MAAM,CAAC;YACX,CAAC;YAED,IAAI,CAAC,QAAQ,GAAM,OAAO,CAAC;YAC3B,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QACnC,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC,GAAG;gBAC3B,UAAU,EAAG,UAAU;gBACvB,QAAQ,EAAK,OAAO;gBACpB,WAAW,EAAE,WAAW;aAC3B,CAAC;QACN,CAAC;IACL,CAAC;IAQO,sCAAc,GAAtB,UAAuB,UAAsB,EAAE,OAAgB;QAC3D,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;YAC5B,UAAU,CAAC,OAAO,CAAC,sBAAc,CAAC,OAAO,CAAC,CAAC;YAC3C,eAAa,CAAC,UAAU,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QACjD,CAAC;QAED,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;YAC9B,UAAU,CAAC,OAAO,CAAC,sBAAc,CAAC,SAAS,CAAC,CAAC;YAC7C,eAAa,CAAC,UAAU,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;QACnD,CAAC;QAED,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;YAC3B,UAAU,CAAC,OAAO,CAAC,sBAAc,CAAC,MAAM,CAAC,CAAC;YAC1C,eAAa,CAAC,UAAU,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QAChD,CAAC;QAED,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;YAC1B,UAAU,CAAC,IAAI,GAAG,sBAAc,CAAC,KAAK,CAAC;YAEvC,eAAa,CAAC,UAAU,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAC/C,CAAC;QAED,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;YAC3B,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;gBACf,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;YACrB,CAAC;YACD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACjC,CAAC;IACL,CAAC;IAOO,+BAAO,GAAf,UAAgB,OAAgB;QAC5B,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;IACvB,CAAC;IASO,6CAAqB,GAA7B,UAA8B,OAAgB,EAAE,UAAmC,EAAE,IAAc;QAC/F,IAAM,OAAO,GAAG,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC;QAC1C,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YACV,IAAI,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC;YACvD,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;gBACP,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,MAAI,UAAU,CAAC,IAAI,MAAG,CAAC,CAAC;YAC1D,CAAC;YACD,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;gBACP,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC;YACnD,CAAC;YAED,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;gBACN,UAAU,CAAC,OAAO,GAAG,IAAI,eAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;gBAC3C,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;YACtD,CAAC;QACL,CAAC;IACL,CAAC;IAWO,qCAAa,GAArB,UAAsB,OAAgB,EAAE,UAAsB,EAAE,IAAc;QAC1E,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;YACR,MAAM,CAAC;QACX,CAAC;QACD,IAAM,UAAU,GAAG,uBAAa,CAAC,IAAI,CAAC,CAAC;QACvC,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;YACd,MAAM,CAAC;QACX,CAAC;QAED,EAAE,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,sBAAc,CAAC,gBAAgB,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,sBAAc,CAAC,KAAK,CAAC,IAAI,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;YAC9H,IAAM,OAAO,GAAG,sBAAY,CAAC,UAAU,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;YAC7D,IAAI,CAAC,cAAc,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;QAC7C,CAAC;QAAC,IAAI,CAAC,EAAE,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,sBAAc,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YAClD,IAAI,CAAC,kBAAkB,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;QACpD,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,IAAM,OAAO,GAAG,sBAAY,CAAC,UAAU,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;YAC7D,IAAI,CAAC,cAAc,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;YACzC,UAAU,CAAC,OAAO,GAAG,OAAO,CAAC;QACjC,CAAC;IACL,CAAC;IASO,gDAAwB,GAAhC,UAAiC,OAAgB,EAAE,UAAsB,EAAE,IAAc;QACrF,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;YACR,MAAM,CAAC;QACX,CAAC;QAED,IAAM,OAAO,GAAG,uBAAa,CAAC,IAAI,CAAC,CAAC;QACpC,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YACV,UAAU,CAAC,OAAO,GAAG,sBAAY,CAAC,OAAO,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;QACnE,CAAC;IACL,CAAC;IAOO,sCAAc,GAAtB,UAAuB,OAAgB;QACnC,GAAG,CAAC,CAAC,IAAI,EAAE,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;YAC3B,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;gBACpC,QAAQ,CAAC;YACb,CAAC;YAED,IAAM,IAAI,GAAM,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;YAClC,IAAM,OAAO,GAAG,sBAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YAC5C,eAAa,CAAC,UAAU,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;YAE/C,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;YAC9C,IAAI,CAAC,UAAU,CAAC,OAAO,GAAG,OAAO,CAAC;QACtC,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;YACd,IAAM,SAAO,GAAG,OAAO,CAAC,OAAO,CAAC;YAChC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,UAAC,UAAU;gBAC3B,eAAa,CAAC,gBAAgB,CAAC,SAAO,EAAE,UAAU,CAAC,CAAC;YACxD,CAAC,CAAC,CAAC;QACP,CAAC;IACL,CAAC;IAcO,iCAAS,GAAjB,UAAkB,OAAgB,EAAE,UAAiC;QACjE,EAAE,CAAC,CAAC,CAAC,CAAC,UAAU,YAAY,6BAAqB,CAAC,CAAC,CAAC,CAAC;YACjD,MAAM,CAAC;QACX,CAAC;QAED,IAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,EAAE,CAAC;QACjD,EAAE,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;YACpB,IAAM,SAAO,GAAG,UAAU,CAAC,OAAO,CAAC;YACnC,EAAE,CAAC,CAAC,SAAO,IAAI,SAAO,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;gBACvC,SAAO,CAAC,OAAO,GAAG,SAAO,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC;gBACjD,eAAa,CAAC,UAAU,CAAC,SAAO,EAAE,SAAS,CAAC,CAAC;YACjD,CAAC;YAED,UAAU,CAAC,OAAO,CAAC,UAAC,SAAS;gBACzB,IAAI,YAAY,GAAG,SAAS,CAAC,OAAO,CAAC;gBACrC,EAAE,CAAC,CAAC,YAAY,IAAI,YAAY,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;oBACjD,YAAY,CAAC,OAAO,GAAG,YAAY,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC;oBAC3D,eAAa,CAAC,UAAU,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC;gBACtD,CAAC;gBAED,EAAE,CAAC,CAAC,SAAO,CAAC,CAAC,CAAC;oBACV,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC;wBAChB,YAAY,GAAG,SAAS,CAAC,OAAO,GAAG,IAAI,eAAO,EAAE,CAAC;oBACrD,CAAC;oBAED,YAAY,CAAC,SAAS,GAAG,YAAY,CAAC,SAAS,IAAI,SAAO,CAAC,SAAS,CAAC;oBACrE,YAAY,CAAC,IAAI,GAAQ,YAAY,CAAC,IAAI,IAAS,SAAO,CAAC,IAAI,CAAC;oBAChE,YAAY,CAAC,OAAO,GAAK,YAAY,CAAC,OAAO,IAAM,SAAO,CAAC,OAAO,CAAC;gBACvE,CAAC;gBAED,EAAE,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC;oBACvB,SAAS,CAAC,UAAU,CAAC,OAAO,CAAC,UAAC,SAAS;wBACnC,IAAI,GAAe,CAAC;wBACpB,EAAE,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC;4BACf,GAAG,GAAG,YAAY,CAAC,MAAM,CAAC,OAAO,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC;wBACvD,CAAC;wBACD,EAAE,CAAC,CAAC,SAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;4BAClB,GAAG,GAAG,SAAO,CAAC,MAAM,CAAC,OAAO,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC;wBAClD,CAAC;wBACD,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;4BACN,SAAS,CAAC,OAAO,GAAG,IAAI,eAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;wBAC9C,CAAC;oBACL,CAAC,CAAC,CAAC;gBACP,CAAC;gBAED,eAAa,CAAC,UAAU,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;YACpD,CAAC,CAAC,CAAC;YAEH,eAAa,CAAC,UAAU,CAAC,SAAO,EAAE,OAAO,CAAC,CAAC;QAC/C,CAAC;IACL,CAAC;IAQM,wBAAU,GAAjB,UAAkB,OAAgB,EAAE,OAAe;QAC/C,EAAE,CAAC,CAAC,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;YAC5B,MAAM,CAAC;QACX,CAAC;QAED,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC;QACnC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;YACX,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC;gBACtC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;gBAC1B,CAAC,EAAE,CAAC;YACR,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,CAAC,EAAE,CAAC;YACR,CAAC;QACL,CAAC;IACL,CAAC;IAKM,8BAAgB,GAAvB,UAAwB,OAA0B,EAAE,UAAsB;QACtE,UAAU,CAAC,QAAQ,CAAC,UAAC,KAAK,IAAK,OAAA,eAAa,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,CAAC,EAA9C,CAA8C,CAAC,CAAC;QAE/E,IAAM,MAAM,GAA2B,UAAU,CAAC,MAAM,CAAC;QACzD,MAAM,CAAC,QAAQ,CAAC,UAAC,KAAiB,EAAE,QAA0B;YAC1D,EAAE,CAAC,CAAC,KAAK,KAAK,UAAU,CAAC,CAAC,CAAC;gBACvB,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;oBACf,KAAK,wBAAgB,CAAC,QAAQ;wBAC1B,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;4BAClB,IAAM,KAAK,GAAG,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAyB,UAAU,CAAC,CAAC;4BAC1E,EAAE,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;gCACf,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;4BACrC,CAAC;wBACL,CAAC;wBACD,KAAK,CAAC;oBACV,KAAK,wBAAgB,CAAC,YAAY;wBAC9B,OAAO,MAAM,CAAC,YAAY,CAAC;wBAC3B,KAAK,CAAC;oBACV,KAAK,wBAAgB,CAAC,cAAc;wBAChC,OAAO,MAAM,CAAC,cAAc,CAAC;wBAC7B,KAAK,CAAC;oBACV,KAAK,wBAAgB,CAAC,UAAU;wBAC5B,EAAE,CAAC,CAAwB,UAAU,CAAC,MAAO,CAAC,UAAU,CAAC,CAAC,CAAC;4BACvD,IAAM,KAAK,GAA0B,UAAU,CAAC,MAAO,CAAC,UAAU,CAAC,OAAO,CAAuB,UAAU,CAAC,CAAC;4BAC7G,EAAE,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;gCACQ,UAAU,CAAC,MAAO,CAAC,UAAU,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;4BAC1E,CAAC;wBACL,CAAC;wBACD,KAAK,CAAC;oBACV,KAAK,wBAAgB,CAAC,YAAY;wBAC9B,OAAO,MAAM,CAAC,YAAY,CAAC;wBAC3B,KAAK,CAAC;oBACV,KAAK,wBAAgB,CAAC,UAAU;wBAC5B,EAAE,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC;4BACpB,IAAM,KAAK,GAAG,MAAM,CAAC,UAAU,CAAC,OAAO,CAAuB,UAAU,CAAC,CAAC;4BAC1E,EAAE,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;gCACf,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;4BACvC,CAAC;wBACL,CAAC;wBACD,KAAK,CAAC;oBACV,KAAK,wBAAgB,CAAC,WAAW;wBAC7B,MAAM,CAAC,IAAI,GAAG,IAAI,qBAAa,CAAC,QAAQ,CAAC,CAAC;wBAC1C,KAAK,CAAC;oBACV,KAAK,wBAAgB,CAAC,aAAa;wBAC/B,EAAE,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC;4BACxB,IAAM,KAAK,GAAG,MAAM,CAAC,cAAc,CAAC,OAAO,CAA2B,UAAU,CAAC,CAAC;4BAClF,EAAE,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;gCACf,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;4BAC3C,CAAC;wBACL,CAAC;wBACD,KAAK,CAAC;gBACd,CAAC;YACL,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,IAAI,EAAE,GAAG,UAAU,CAAC,EAAE,CAAC;QACvB,OAAO,OAAO,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;QAE/B,GAAG,CAAC,CAAC,IAAI,GAAG,IAAI,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC;YACpC,EAAE,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;gBACjF,OAAO,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;YACtC,CAAC;QACL,CAAC;IACL,CAAC;IAvVQ,aAAa;QADzB,sBAAS,CAAC,EAAC,IAAI,EAAE,SAAS,EAAC,CAAC;OAChB,aAAa,CAwVzB;IAAD,oBAAC;;CAAA,AAxVD,CAAmC,+BAAkB,GAwVpD;AAxVY,sCAAa","sourcesContent":["import * as ts from 'typescript';\n\nimport { Comment, CommentTag } from '../../models/comments/index';\nimport { IntrinsicType } from '../../models/types/index';\nimport { Reflection, ReflectionFlag, ReflectionKind, TraverseProperty,\n TypeParameterReflection, DeclarationReflection, ProjectReflection,\n SignatureReflection, ParameterReflection } from '../../models/reflections/index';\nimport { Component, ConverterComponent } from '../components';\nimport { parseComment, getRawComment } from '../factories/comment';\nimport { Converter } from '../converter';\nimport { Context } from '../context';\n\n/**\n * Structure used by [[ContainerCommentHandler]] to store discovered module comments.\n */\ninterface ModuleComment {\n /**\n * The module reflection this comment is targeting.\n */\n reflection: Reflection;\n\n /**\n * The full text of the best matched comment.\n */\n fullText: string;\n\n /**\n * Has the full text been marked as being preferred?\n */\n isPreferred: boolean;\n}\n\n/**\n * A handler that parses javadoc comments and attaches [[Models.Comment]] instances to\n * the generated reflections.\n */\n@Component({name: 'comment'})\nexport class CommentPlugin extends ConverterComponent {\n /**\n * List of discovered module comments.\n */\n private comments: {[id: number]: ModuleComment};\n\n /**\n * List of hidden reflections.\n */\n private hidden: Reflection[];\n\n /**\n * Create a new CommentPlugin instance.\n */\n initialize() {\n this.listenTo(this.owner, {\n [Converter.EVENT_BEGIN]: this.onBegin,\n [Converter.EVENT_CREATE_DECLARATION]: this.onDeclaration,\n [Converter.EVENT_CREATE_SIGNATURE]: this.onDeclaration,\n [Converter.EVENT_CREATE_TYPE_PARAMETER]: this.onCreateTypeParameter,\n [Converter.EVENT_FUNCTION_IMPLEMENTATION]: this.onFunctionImplementation,\n [Converter.EVENT_RESOLVE_BEGIN]: this.onBeginResolve,\n [Converter.EVENT_RESOLVE]: this.onResolve\n });\n }\n\n private storeModuleComment(comment: string, reflection: Reflection) {\n const isPreferred = (comment.toLowerCase().indexOf('@preferred') !== -1);\n\n if (this.comments[reflection.id]) {\n const info = this.comments[reflection.id];\n if (!isPreferred && (info.isPreferred || info.fullText.length > comment.length)) {\n return;\n }\n\n info.fullText = comment;\n info.isPreferred = isPreferred;\n } else {\n this.comments[reflection.id] = {\n reflection: reflection,\n fullText: comment,\n isPreferred: isPreferred\n };\n }\n }\n\n /**\n * Apply all comment tag modifiers to the given reflection.\n *\n * @param reflection The reflection the modifiers should be applied to.\n * @param comment The comment that should be searched for modifiers.\n */\n private applyModifiers(reflection: Reflection, comment: Comment) {\n if (comment.hasTag('private')) {\n reflection.setFlag(ReflectionFlag.Private);\n CommentPlugin.removeTags(comment, 'private');\n }\n\n if (comment.hasTag('protected')) {\n reflection.setFlag(ReflectionFlag.Protected);\n CommentPlugin.removeTags(comment, 'protected');\n }\n\n if (comment.hasTag('public')) {\n reflection.setFlag(ReflectionFlag.Public);\n CommentPlugin.removeTags(comment, 'public');\n }\n\n if (comment.hasTag('event')) {\n reflection.kind = ReflectionKind.Event;\n // reflection.setFlag(ReflectionFlag.Event);\n CommentPlugin.removeTags(comment, 'event');\n }\n\n if (comment.hasTag('hidden')) {\n if (!this.hidden) {\n this.hidden = [];\n }\n this.hidden.push(reflection);\n }\n }\n\n /**\n * Triggered when the converter begins converting a project.\n *\n * @param context The context object describing the current state the converter is in.\n */\n private onBegin(context: Context) {\n this.comments = {};\n }\n\n /**\n * Triggered when the converter has created a type parameter reflection.\n *\n * @param context The context object describing the current state the converter is in.\n * @param reflection The reflection that is currently processed.\n * @param node The node that is currently processed if available.\n */\n private onCreateTypeParameter(context: Context, reflection: TypeParameterReflection, node?: ts.Node) {\n const comment = reflection.parent.comment;\n if (comment) {\n let tag = comment.getTag('typeparam', reflection.name);\n if (!tag) {\n tag = comment.getTag('param', `<${reflection.name}>`);\n }\n if (!tag) {\n tag = comment.getTag('param', reflection.name);\n }\n\n if (tag) {\n reflection.comment = new Comment(tag.text);\n comment.tags.splice(comment.tags.indexOf(tag), 1);\n }\n }\n }\n\n /**\n * Triggered when the converter has created a declaration or signature reflection.\n *\n * Invokes the comment parser.\n *\n * @param context The context object describing the current state the converter is in.\n * @param reflection The reflection that is currently processed.\n * @param node The node that is currently processed if available.\n */\n private onDeclaration(context: Context, reflection: Reflection, node?: ts.Node) {\n if (!node) {\n return;\n }\n const rawComment = getRawComment(node);\n if (!rawComment) {\n return;\n }\n\n if (reflection.kindOf(ReflectionKind.FunctionOrMethod) || (reflection.kindOf(ReflectionKind.Event) && reflection['signatures'])) {\n const comment = parseComment(rawComment, reflection.comment);\n this.applyModifiers(reflection, comment);\n } else if (reflection.kindOf(ReflectionKind.Module)) {\n this.storeModuleComment(rawComment, reflection);\n } else {\n const comment = parseComment(rawComment, reflection.comment);\n this.applyModifiers(reflection, comment);\n reflection.comment = comment;\n }\n }\n\n /**\n * Triggered when the converter has found a function implementation.\n *\n * @param context The context object describing the current state the converter is in.\n * @param reflection The reflection that is currently processed.\n * @param node The node that is currently processed if available.\n */\n private onFunctionImplementation(context: Context, reflection: Reflection, node?: ts.Node) {\n if (!node) {\n return;\n }\n\n const comment = getRawComment(node);\n if (comment) {\n reflection.comment = parseComment(comment, reflection.comment);\n }\n }\n\n /**\n * Triggered when the converter begins resolving a project.\n *\n * @param context The context object describing the current state the converter is in.\n */\n private onBeginResolve(context: Context) {\n for (let id in this.comments) {\n if (!this.comments.hasOwnProperty(id)) {\n continue;\n }\n\n const info = this.comments[id];\n const comment = parseComment(info.fullText);\n CommentPlugin.removeTags(comment, 'preferred');\n\n this.applyModifiers(info.reflection, comment);\n info.reflection.comment = comment;\n }\n\n if (this.hidden) {\n const project = context.project;\n this.hidden.forEach((reflection) => {\n CommentPlugin.removeReflection(project, reflection);\n });\n }\n }\n\n /**\n * Triggered when the converter resolves a reflection.\n *\n * Cleans up comment tags related to signatures like @param or @return\n * and moves their data to the corresponding parameter reflections.\n *\n * This hook also copies over the comment of function implementations to their\n * signatures.\n *\n * @param context The context object describing the current state the converter is in.\n * @param reflection The reflection that is currently resolved.\n */\n private onResolve(context: Context, reflection: DeclarationReflection) {\n if (!(reflection instanceof DeclarationReflection)) {\n return;\n }\n\n const signatures = reflection.getAllSignatures();\n if (signatures.length) {\n const comment = reflection.comment;\n if (comment && comment.hasTag('returns')) {\n comment.returns = comment.getTag('returns').text;\n CommentPlugin.removeTags(comment, 'returns');\n }\n\n signatures.forEach((signature) => {\n let childComment = signature.comment;\n if (childComment && childComment.hasTag('returns')) {\n childComment.returns = childComment.getTag('returns').text;\n CommentPlugin.removeTags(childComment, 'returns');\n }\n\n if (comment) {\n if (!childComment) {\n childComment = signature.comment = new Comment();\n }\n\n childComment.shortText = childComment.shortText || comment.shortText;\n childComment.text = childComment.text || comment.text;\n childComment.returns = childComment.returns || comment.returns;\n }\n\n if (signature.parameters) {\n signature.parameters.forEach((parameter) => {\n let tag: CommentTag;\n if (childComment) {\n tag = childComment.getTag('param', parameter.name);\n }\n if (comment && !tag) {\n tag = comment.getTag('param', parameter.name);\n }\n if (tag) {\n parameter.comment = new Comment(tag.text);\n }\n });\n }\n\n CommentPlugin.removeTags(childComment, 'param');\n });\n\n CommentPlugin.removeTags(comment, 'param');\n }\n }\n\n /**\n * Remove all tags with the given name from the given comment instance.\n *\n * @param comment The comment that should be modified.\n * @param tagName The name of the that that should be removed.\n */\n static removeTags(comment: Comment, tagName: string) {\n if (!comment || !comment.tags) {\n return;\n }\n\n let i = 0, c = comment.tags.length;\n while (i < c) {\n if (comment.tags[i].tagName === tagName) {\n comment.tags.splice(i, 1);\n c--;\n } else {\n i++;\n }\n }\n }\n\n /**\n * Remove the given reflection from the project.\n */\n static removeReflection(project: ProjectReflection, reflection: Reflection) {\n reflection.traverse((child) => CommentPlugin.removeReflection(project, child));\n\n const parent = <DeclarationReflection> reflection.parent;\n parent.traverse((child: Reflection, property: TraverseProperty) => {\n if (child === reflection) {\n switch (property) {\n case TraverseProperty.Children:\n if (parent.children) {\n const index = parent.children.indexOf(<DeclarationReflection> reflection);\n if (index !== -1) {\n parent.children.splice(index, 1);\n }\n }\n break;\n case TraverseProperty.GetSignature:\n delete parent.getSignature;\n break;\n case TraverseProperty.IndexSignature:\n delete parent.indexSignature;\n break;\n case TraverseProperty.Parameters:\n if ((<SignatureReflection> reflection.parent).parameters) {\n const index = (<SignatureReflection> reflection.parent).parameters.indexOf(<ParameterReflection> reflection);\n if (index !== -1) {\n (<SignatureReflection> reflection.parent).parameters.splice(index, 1);\n }\n }\n break;\n case TraverseProperty.SetSignature:\n delete parent.setSignature;\n break;\n case TraverseProperty.Signatures:\n if (parent.signatures) {\n const index = parent.signatures.indexOf(<SignatureReflection> reflection);\n if (index !== -1) {\n parent.signatures.splice(index, 1);\n }\n }\n break;\n case TraverseProperty.TypeLiteral:\n parent.type = new IntrinsicType('Object');\n break;\n case TraverseProperty.TypeParameter:\n if (parent.typeParameters) {\n const index = parent.typeParameters.indexOf(<TypeParameterReflection> reflection);\n if (index !== -1) {\n parent.typeParameters.splice(index, 1);\n }\n }\n break;\n }\n }\n });\n\n let id = reflection.id;\n delete project.reflections[id];\n\n for (let key in project.symbolMapping) {\n if (project.symbolMapping.hasOwnProperty(key) && project.symbolMapping[key] === id) {\n delete project.symbolMapping[key];\n }\n }\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/plugins/DecoratorPlugin.js b/node_modules/typedoc/dist/lib/converter/plugins/DecoratorPlugin.js
index d953af4a3..2f3f7dd81 100644
--- a/node_modules/typedoc/dist/lib/converter/plugins/DecoratorPlugin.js
+++ b/node_modules/typedoc/dist/lib/converter/plugins/DecoratorPlugin.js
@@ -112,10 +112,10 @@ var DecoratorPlugin = (function (_super) {
}
}
};
+ DecoratorPlugin = __decorate([
+ components_1.Component({ name: 'decorator' })
+ ], DecoratorPlugin);
return DecoratorPlugin;
}(components_1.ConverterComponent));
-DecoratorPlugin = __decorate([
- components_1.Component({ name: 'decorator' })
-], DecoratorPlugin);
exports.DecoratorPlugin = DecoratorPlugin;
//# sourceMappingURL=DecoratorPlugin.js.map \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/plugins/DecoratorPlugin.js.map b/node_modules/typedoc/dist/lib/converter/plugins/DecoratorPlugin.js.map
index a9751643a..7f1c8f698 100644
--- a/node_modules/typedoc/dist/lib/converter/plugins/DecoratorPlugin.js.map
+++ b/node_modules/typedoc/dist/lib/converter/plugins/DecoratorPlugin.js.map
@@ -1 +1 @@
-{"version":3,"file":"DecoratorPlugin.js","sourceRoot":"","sources":["../../../../src/lib/converter/plugins/DecoratorPlugin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AACjC,uCAAyC;AAEzC,kDAAuD;AAEvD,4CAA4D;AAC5D,0CAAuC;AAOvC,IAAa,eAAe;IAAS,mCAAkB;IAAvD;;IA+HA,CAAC;IAzHG,oCAAU,GAAV;QACI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK;YACpB,GAAC,qBAAS,CAAC,WAAW,IAAgB,IAAI,CAAC,OAAO;YAClD,GAAC,qBAAS,CAAC,wBAAwB,IAAG,IAAI,CAAC,aAAa;YACxD,GAAC,qBAAS,CAAC,sBAAsB,IAAK,IAAI,CAAC,aAAa;YACxD,GAAC,qBAAS,CAAC,aAAa,IAAc,IAAI,CAAC,cAAc;gBAC3D,CAAC;;IACP,CAAC;IASO,0CAAgB,GAAxB,UAAyB,IAAiC,EAAE,SAAuB;QAC/E,IAAM,MAAM,GAAG,EAAE,CAAC;QAClB,IAAI,CAAC,OAAO,CAAC,UAAC,GAAkB,EAAE,KAAa;YAC3C,EAAE,CAAC,CAAC,KAAK,GAAG,SAAS,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;gBACtC,IAAM,SAAS,GAAG,SAAS,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;gBAC9C,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;YACpD,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;oBACjB,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;gBACvB,CAAC;gBACD,MAAM,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC;YAC/C,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IAOO,iCAAO,GAAf,UAAgB,OAAgB;QAC5B,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;IACrB,CAAC;IASO,uCAAa,GAArB,UAAsB,OAAgB,EAAE,UAAsB,EAAE,IAAc;QAA9E,iBA+CC;QA9CG,EAAE,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;YAC5B,MAAM,CAAC;QACX,CAAC;QACD,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,UAAC,SAAuB;YAC5C,IAAI,cAAiC,CAAC;YACtC,IAAI,UAAyB,CAAC;YAE9B,MAAM,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;gBAChC,KAAK,EAAE,CAAC,UAAU,CAAC,UAAU;oBACzB,UAAU,GAAG,SAAS,CAAC,UAAU,CAAC;oBAClC,KAAK,CAAC;gBACV,KAAK,EAAE,CAAC,UAAU,CAAC,cAAc;oBAC7B,cAAc,GAAuB,SAAS,CAAC,UAAU,CAAC;oBAC1D,UAAU,GAAG,cAAc,CAAC,UAAU,CAAC;oBACvC,KAAK,CAAC;gBACV;oBACI,MAAM,CAAC;YACf,CAAC;YAED,IAAM,IAAI,GAAc;gBACpB,IAAI,EAAE,GAAG,CAAC,aAAa,CAAC,UAAU,CAAC;aACtC,CAAC;YAEF,IAAM,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC;YAC3D,EAAE,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;gBACtB,IAAM,QAAQ,GAAG,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;gBAClD,IAAI,CAAC,IAAI,GAAG,IAAI,qBAAa,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;gBAEnD,EAAE,CAAC,CAAC,cAAc,IAAI,cAAc,CAAC,SAAS,CAAC,CAAC,CAAC;oBAC7C,IAAM,SAAS,GAAG,OAAO,CAAC,OAAO,CAAC,oBAAoB,CAAC,cAAc,CAAC,CAAC;oBACvE,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;wBACZ,IAAI,CAAC,SAAS,GAAG,KAAI,CAAC,gBAAgB,CAAC,cAAc,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;oBAChF,CAAC;gBACL,CAAC;gBAED,EAAE,CAAC,CAAC,CAAC,KAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;oBACzB,KAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC;gBAC/B,CAAC;gBACD,KAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,IAAI,qBAAa,CAAC,UAAU,CAAC,IAAI,EAAE,qBAAa,CAAC,kBAAkB,EAAE,UAAU,CAAC,CAAC,CAAC;YACjH,CAAC;YAED,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC;gBACzB,UAAU,CAAC,UAAU,GAAG,EAAE,CAAC;YAC/B,CAAC;YACD,UAAU,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACrC,CAAC,CAAC,CAAC;IACP,CAAC;IAQO,wCAAc,GAAtB,UAAuB,OAAgB;QACnC,GAAG,CAAC,CAAC,IAAI,QAAQ,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;YAC/B,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;gBACxC,QAAQ,CAAC;YACb,CAAC;YAED,IAAM,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;YACnD,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;gBACN,QAAQ,CAAC;YACb,CAAC;YAED,IAAM,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;YACnD,EAAE,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;gBACb,UAAU,CAAC,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YACjD,CAAC;QACL,CAAC;IACL,CAAC;IACL,sBAAC;AAAD,CAAC,AA/HD,CAAqC,+BAAkB,GA+HtD;AA/HY,eAAe;IAD3B,sBAAS,CAAC,EAAC,IAAI,EAAE,WAAW,EAAC,CAAC;GAClB,eAAe,CA+H3B;AA/HY,0CAAe","sourcesContent":["import * as ts from 'typescript';\nimport * as _ts from '../../ts-internal';\n\nimport {ReferenceType} from '../../models/types/index';\nimport {Reflection, Decorator} from '../../models/reflections/index';\nimport {Component, ConverterComponent} from '../components';\nimport {Converter} from '../converter';\nimport {Context} from '../context';\n\n/**\n * A plugin that detects decorators.\n */\n@Component({name: 'decorator'})\nexport class DecoratorPlugin extends ConverterComponent {\n private usages: {[symbolID: number]: ReferenceType[]};\n\n /**\n * Create a new ImplementsPlugin instance.\n */\n initialize() {\n this.listenTo(this.owner, {\n [Converter.EVENT_BEGIN]: this.onBegin,\n [Converter.EVENT_CREATE_DECLARATION]: this.onDeclaration,\n [Converter.EVENT_CREATE_PARAMETER]: this.onDeclaration,\n [Converter.EVENT_RESOLVE]: this.onBeginResolve\n });\n }\n\n /**\n * Create an object describing the arguments a decorator is set with.\n *\n * @param args The arguments resolved from the decorator's call expression.\n * @param signature The signature definition of the decorator being used.\n * @returns An object describing the decorator parameters,\n */\n private extractArguments(args: ts.NodeArray<ts.Expression>, signature: ts.Signature): any {\n const result = {};\n args.forEach((arg: ts.Expression, index: number) => {\n if (index < signature.parameters.length) {\n const parameter = signature.parameters[index];\n result[parameter.name] = _ts.getTextOfNode(arg);\n } else {\n if (!result['...']) {\n result['...'] = [];\n }\n result['...'].push(_ts.getTextOfNode(arg));\n }\n });\n\n return result;\n }\n\n /**\n * Triggered when the converter begins converting a project.\n *\n * @param context The context object describing the current state the converter is in.\n */\n private onBegin(context: Context) {\n this.usages = {};\n }\n\n /**\n * Triggered when the converter has created a declaration or signature reflection.\n *\n * @param context The context object describing the current state the converter is in.\n * @param reflection The reflection that is currently processed.\n * @param node The node that is currently processed if available.\n */\n private onDeclaration(context: Context, reflection: Reflection, node?: ts.Node) {\n if (!node || !node.decorators) {\n return;\n }\n node.decorators.forEach((decorator: ts.Decorator) => {\n let callExpression: ts.CallExpression;\n let identifier: ts.Expression;\n\n switch (decorator.expression.kind) {\n case ts.SyntaxKind.Identifier:\n identifier = decorator.expression;\n break;\n case ts.SyntaxKind.CallExpression:\n callExpression = <ts.CallExpression> decorator.expression;\n identifier = callExpression.expression;\n break;\n default:\n return;\n }\n\n const info: Decorator = {\n name: _ts.getTextOfNode(identifier)\n };\n\n const type = context.checker.getTypeAtLocation(identifier);\n if (type && type.symbol) {\n const symbolID = context.getSymbolID(type.symbol);\n info.type = new ReferenceType(info.name, symbolID);\n\n if (callExpression && callExpression.arguments) {\n const signature = context.checker.getResolvedSignature(callExpression);\n if (signature) {\n info.arguments = this.extractArguments(callExpression.arguments, signature);\n }\n }\n\n if (!this.usages[symbolID]) {\n this.usages[symbolID] = [];\n }\n this.usages[symbolID].push(new ReferenceType(reflection.name, ReferenceType.SYMBOL_ID_RESOLVED, reflection));\n }\n\n if (!reflection.decorators) {\n reflection.decorators = [];\n }\n reflection.decorators.push(info);\n });\n }\n\n /**\n * Triggered when the converter resolves a reflection.\n *\n * @param context The context object describing the current state the converter is in.\n * @param reflection The reflection that is currently resolved.\n */\n private onBeginResolve(context: Context) {\n for (let symbolID in this.usages) {\n if (!this.usages.hasOwnProperty(symbolID)) {\n continue;\n }\n\n const id = context.project.symbolMapping[symbolID];\n if (!id) {\n continue;\n }\n\n const reflection = context.project.reflections[id];\n if (reflection) {\n reflection.decorates = this.usages[symbolID];\n }\n }\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"DecoratorPlugin.js","sourceRoot":"","sources":["../../../../src/lib/converter/plugins/DecoratorPlugin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AACjC,uCAAyC;AAEzC,kDAAyD;AAEzD,4CAA8D;AAC9D,0CAAyC;AAOzC;IAAqC,mCAAkB;IAAvD;;IA+HA,CAAC;IAzHG,oCAAU,GAAV;QACI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK;YACpB,GAAC,qBAAS,CAAC,WAAW,IAAgB,IAAI,CAAC,OAAO;YAClD,GAAC,qBAAS,CAAC,wBAAwB,IAAG,IAAI,CAAC,aAAa;YACxD,GAAC,qBAAS,CAAC,sBAAsB,IAAK,IAAI,CAAC,aAAa;YACxD,GAAC,qBAAS,CAAC,aAAa,IAAc,IAAI,CAAC,cAAc;gBAC3D,CAAC;;IACP,CAAC;IASO,0CAAgB,GAAxB,UAAyB,IAAiC,EAAE,SAAuB;QAC/E,IAAM,MAAM,GAAG,EAAE,CAAC;QAClB,IAAI,CAAC,OAAO,CAAC,UAAC,GAAkB,EAAE,KAAa;YAC3C,EAAE,CAAC,CAAC,KAAK,GAAG,SAAS,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;gBACtC,IAAM,SAAS,GAAG,SAAS,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;gBAC9C,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;YACpD,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;oBACjB,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;gBACvB,CAAC;gBACD,MAAM,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC;YAC/C,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IAOO,iCAAO,GAAf,UAAgB,OAAgB;QAC5B,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;IACrB,CAAC;IASO,uCAAa,GAArB,UAAsB,OAAgB,EAAE,UAAsB,EAAE,IAAc;QAA9E,iBA+CC;QA9CG,EAAE,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;YAC5B,MAAM,CAAC;QACX,CAAC;QACD,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,UAAC,SAAuB;YAC5C,IAAI,cAAiC,CAAC;YACtC,IAAI,UAAyB,CAAC;YAE9B,MAAM,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;gBAChC,KAAK,EAAE,CAAC,UAAU,CAAC,UAAU;oBACzB,UAAU,GAAG,SAAS,CAAC,UAAU,CAAC;oBAClC,KAAK,CAAC;gBACV,KAAK,EAAE,CAAC,UAAU,CAAC,cAAc;oBAC7B,cAAc,GAAuB,SAAS,CAAC,UAAU,CAAC;oBAC1D,UAAU,GAAG,cAAc,CAAC,UAAU,CAAC;oBACvC,KAAK,CAAC;gBACV;oBACI,MAAM,CAAC;YACf,CAAC;YAED,IAAM,IAAI,GAAc;gBACpB,IAAI,EAAE,GAAG,CAAC,aAAa,CAAC,UAAU,CAAC;aACtC,CAAC;YAEF,IAAM,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC;YAC3D,EAAE,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;gBACtB,IAAM,QAAQ,GAAG,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;gBAClD,IAAI,CAAC,IAAI,GAAG,IAAI,qBAAa,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;gBAEnD,EAAE,CAAC,CAAC,cAAc,IAAI,cAAc,CAAC,SAAS,CAAC,CAAC,CAAC;oBAC7C,IAAM,SAAS,GAAG,OAAO,CAAC,OAAO,CAAC,oBAAoB,CAAC,cAAc,CAAC,CAAC;oBACvE,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;wBACZ,IAAI,CAAC,SAAS,GAAG,KAAI,CAAC,gBAAgB,CAAC,cAAc,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;oBAChF,CAAC;gBACL,CAAC;gBAED,EAAE,CAAC,CAAC,CAAC,KAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;oBACzB,KAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC;gBAC/B,CAAC;gBACD,KAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,IAAI,qBAAa,CAAC,UAAU,CAAC,IAAI,EAAE,qBAAa,CAAC,kBAAkB,EAAE,UAAU,CAAC,CAAC,CAAC;YACjH,CAAC;YAED,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC;gBACzB,UAAU,CAAC,UAAU,GAAG,EAAE,CAAC;YAC/B,CAAC;YACD,UAAU,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACrC,CAAC,CAAC,CAAC;IACP,CAAC;IAQO,wCAAc,GAAtB,UAAuB,OAAgB;QACnC,GAAG,CAAC,CAAC,IAAI,QAAQ,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;YAC/B,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;gBACxC,QAAQ,CAAC;YACb,CAAC;YAED,IAAM,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;YACnD,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;gBACN,QAAQ,CAAC;YACb,CAAC;YAED,IAAM,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;YACnD,EAAE,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;gBACb,UAAU,CAAC,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YACjD,CAAC;QACL,CAAC;IACL,CAAC;IA9HQ,eAAe;QAD3B,sBAAS,CAAC,EAAC,IAAI,EAAE,WAAW,EAAC,CAAC;OAClB,eAAe,CA+H3B;IAAD,sBAAC;CAAA,AA/HD,CAAqC,+BAAkB,GA+HtD;AA/HY,0CAAe","sourcesContent":["import * as ts from 'typescript';\nimport * as _ts from '../../ts-internal';\n\nimport { ReferenceType } from '../../models/types/index';\nimport { Reflection, Decorator } from '../../models/reflections/index';\nimport { Component, ConverterComponent } from '../components';\nimport { Converter } from '../converter';\nimport { Context } from '../context';\n\n/**\n * A plugin that detects decorators.\n */\n@Component({name: 'decorator'})\nexport class DecoratorPlugin extends ConverterComponent {\n private usages: {[symbolID: number]: ReferenceType[]};\n\n /**\n * Create a new ImplementsPlugin instance.\n */\n initialize() {\n this.listenTo(this.owner, {\n [Converter.EVENT_BEGIN]: this.onBegin,\n [Converter.EVENT_CREATE_DECLARATION]: this.onDeclaration,\n [Converter.EVENT_CREATE_PARAMETER]: this.onDeclaration,\n [Converter.EVENT_RESOLVE]: this.onBeginResolve\n });\n }\n\n /**\n * Create an object describing the arguments a decorator is set with.\n *\n * @param args The arguments resolved from the decorator's call expression.\n * @param signature The signature definition of the decorator being used.\n * @returns An object describing the decorator parameters,\n */\n private extractArguments(args: ts.NodeArray<ts.Expression>, signature: ts.Signature): any {\n const result = {};\n args.forEach((arg: ts.Expression, index: number) => {\n if (index < signature.parameters.length) {\n const parameter = signature.parameters[index];\n result[parameter.name] = _ts.getTextOfNode(arg);\n } else {\n if (!result['...']) {\n result['...'] = [];\n }\n result['...'].push(_ts.getTextOfNode(arg));\n }\n });\n\n return result;\n }\n\n /**\n * Triggered when the converter begins converting a project.\n *\n * @param context The context object describing the current state the converter is in.\n */\n private onBegin(context: Context) {\n this.usages = {};\n }\n\n /**\n * Triggered when the converter has created a declaration or signature reflection.\n *\n * @param context The context object describing the current state the converter is in.\n * @param reflection The reflection that is currently processed.\n * @param node The node that is currently processed if available.\n */\n private onDeclaration(context: Context, reflection: Reflection, node?: ts.Node) {\n if (!node || !node.decorators) {\n return;\n }\n node.decorators.forEach((decorator: ts.Decorator) => {\n let callExpression: ts.CallExpression;\n let identifier: ts.Expression;\n\n switch (decorator.expression.kind) {\n case ts.SyntaxKind.Identifier:\n identifier = decorator.expression;\n break;\n case ts.SyntaxKind.CallExpression:\n callExpression = <ts.CallExpression> decorator.expression;\n identifier = callExpression.expression;\n break;\n default:\n return;\n }\n\n const info: Decorator = {\n name: _ts.getTextOfNode(identifier)\n };\n\n const type = context.checker.getTypeAtLocation(identifier);\n if (type && type.symbol) {\n const symbolID = context.getSymbolID(type.symbol);\n info.type = new ReferenceType(info.name, symbolID);\n\n if (callExpression && callExpression.arguments) {\n const signature = context.checker.getResolvedSignature(callExpression);\n if (signature) {\n info.arguments = this.extractArguments(callExpression.arguments, signature);\n }\n }\n\n if (!this.usages[symbolID]) {\n this.usages[symbolID] = [];\n }\n this.usages[symbolID].push(new ReferenceType(reflection.name, ReferenceType.SYMBOL_ID_RESOLVED, reflection));\n }\n\n if (!reflection.decorators) {\n reflection.decorators = [];\n }\n reflection.decorators.push(info);\n });\n }\n\n /**\n * Triggered when the converter resolves a reflection.\n *\n * @param context The context object describing the current state the converter is in.\n * @param reflection The reflection that is currently resolved.\n */\n private onBeginResolve(context: Context) {\n for (let symbolID in this.usages) {\n if (!this.usages.hasOwnProperty(symbolID)) {\n continue;\n }\n\n const id = context.project.symbolMapping[symbolID];\n if (!id) {\n continue;\n }\n\n const reflection = context.project.reflections[id];\n if (reflection) {\n reflection.decorates = this.usages[symbolID];\n }\n }\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/plugins/DeepCommentPlugin.js b/node_modules/typedoc/dist/lib/converter/plugins/DeepCommentPlugin.js
index 2198b9a6a..1a4618d5a 100644
--- a/node_modules/typedoc/dist/lib/converter/plugins/DeepCommentPlugin.js
+++ b/node_modules/typedoc/dist/lib/converter/plugins/DeepCommentPlugin.js
@@ -73,10 +73,10 @@ var DeepCommentPlugin = (function (_super) {
}
}
};
+ DeepCommentPlugin = __decorate([
+ components_1.Component({ name: 'deep-comment' })
+ ], DeepCommentPlugin);
return DeepCommentPlugin;
}(components_1.ConverterComponent));
-DeepCommentPlugin = __decorate([
- components_1.Component({ name: 'deep-comment' })
-], DeepCommentPlugin);
exports.DeepCommentPlugin = DeepCommentPlugin;
//# sourceMappingURL=DeepCommentPlugin.js.map \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/plugins/DeepCommentPlugin.js.map b/node_modules/typedoc/dist/lib/converter/plugins/DeepCommentPlugin.js.map
index 6c2eab267..78d58a4a1 100644
--- a/node_modules/typedoc/dist/lib/converter/plugins/DeepCommentPlugin.js.map
+++ b/node_modules/typedoc/dist/lib/converter/plugins/DeepCommentPlugin.js.map
@@ -1 +1 @@
-{"version":3,"file":"DeepCommentPlugin.js","sourceRoot":"","sources":["../../../../src/lib/converter/plugins/DeepCommentPlugin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,wDAA2H;AAC3H,qDAAgE;AAChE,4CAA4D;AAC5D,0CAAuC;AAOvC,IAAa,iBAAiB;IAAS,qCAAkB;IAAzD;;IAiEA,CAAC;IA7DG,sCAAU,GAAV;QACI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,qBAAS,CAAC,mBAAmB,EAAE,IAAI,CAAC,cAAc,EAAE,GAAG,CAAC,CAAC;IACvF,CAAC;IAOO,0CAAc,GAAtB,UAAuB,OAAgB;QACnC,IAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;QAChC,IAAI,IAAY,CAAC;QACjB,GAAG,CAAC,CAAC,IAAI,GAAG,IAAI,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC;YAClC,IAAM,UAAU,GAAG,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;YAC5C,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC;gBACtB,eAAe,CAAC,UAAU,CAAC,CAAC;YAChC,CAAC;QACL,CAAC;QAED,cAAc,MAAkB;YAC5B,IAAI,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC;YAC/B,EAAE,CAAC,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,IAAI,IAAI,MAAM,YAAY,2BAAmB,CAAC,CAAC,CAAC;gBAC/E,IAAI,GAAG,EAAE,CAAC;YACd,CAAC;YAED,EAAE,CAAC,CAAC,IAAI,IAAI,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC;gBACtB,IAAI,GAAG,CAAC,IAAI,KAAK,EAAE,GAAG,IAAI,GAAG,IAAI,GAAG,GAAG,GAAG,IAAI,CAAC,CAAC;YACpD,CAAC;QACL,CAAC;QAED,yBAAyB,UAAsB;YAC3C,IAAI,GAAG,EAAE,CAAC;YACV,IAAI,CAAC,UAAU,CAAC,CAAC;YACjB,IAAI,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;YAE/B,OAAO,MAAM,IAAI,CAAC,CAAC,MAAM,YAAY,yBAAiB,CAAC,EAAE,CAAC;gBACtD,IAAI,CAAC,MAAM,CAAC,CAAC;gBACb,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;oBACjB,IAAI,GAAG,SAAY,CAAC;oBACpB,EAAE,CAAC,CAAC,UAAU,YAAY,+BAAuB,CAAC,CAAC,CAAC;wBAChD,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC;wBAC1D,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;4BACP,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,GAAG,GAAG,UAAU,CAAC,IAAI,GAAG,GAAG,CAAC,CAAC;wBACtE,CAAC;oBACL,CAAC;oBAED,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;wBACP,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;oBAC/C,CAAC;oBAED,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;wBACN,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;wBAChE,UAAU,CAAC,OAAO,GAAG,IAAI,eAAO,CAAC,EAAE,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC;wBAC/C,KAAK,CAAC;oBACV,CAAC;gBACL,CAAC;gBAED,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;YAC3B,CAAC;QACL,CAAC;IACL,CAAC;IACL,wBAAC;AAAD,CAAC,AAjED,CAAuC,+BAAkB,GAiExD;AAjEY,iBAAiB;IAD7B,sBAAS,CAAC,EAAC,IAAI,EAAE,cAAc,EAAC,CAAC;GACrB,iBAAiB,CAiE7B;AAjEY,8CAAiB","sourcesContent":["import {Reflection, SignatureReflection, ProjectReflection, TypeParameterReflection} from '../../models/reflections/index';\nimport {Comment, CommentTag} from '../../models/comments/index';\nimport {Component, ConverterComponent} from '../components';\nimport {Converter} from '../converter';\nimport {Context} from '../context';\n\n/**\n * A handler that moves comments with dot syntax to their target.\n */\n@Component({name: 'deep-comment'})\nexport class DeepCommentPlugin extends ConverterComponent {\n /**\n * Create a new CommentHandler instance.\n */\n initialize() {\n this.listenTo(this.owner, Converter.EVENT_RESOLVE_BEGIN, this.onBeginResolve, 512);\n }\n\n /**\n * Triggered when the converter begins resolving a project.\n *\n * @param context The context object describing the current state the converter is in.\n */\n private onBeginResolve(context: Context) {\n const project = context.project;\n let name: string;\n for (let key in project.reflections) {\n const reflection = project.reflections[key];\n if (!reflection.comment) {\n findDeepComment(reflection);\n }\n }\n\n function push(parent: Reflection) {\n let part = parent.originalName;\n if (!part || part.substr(0, 2) === '__' || parent instanceof SignatureReflection) {\n part = '';\n }\n\n if (part && part !== '') {\n name = (name === '' ? part : part + '.' + name);\n }\n }\n\n function findDeepComment(reflection: Reflection) {\n name = '';\n push(reflection);\n let target = reflection.parent;\n\n while (target && !(target instanceof ProjectReflection)) {\n push(target);\n if (target.comment) {\n let tag: CommentTag;\n if (reflection instanceof TypeParameterReflection) {\n tag = target.comment.getTag('typeparam', reflection.name);\n if (!tag) {\n tag = target.comment.getTag('param', '<' + reflection.name + '>');\n }\n }\n\n if (!tag) {\n tag = target.comment.getTag('param', name);\n }\n\n if (tag) {\n target.comment.tags.splice(target.comment.tags.indexOf(tag), 1);\n reflection.comment = new Comment('', tag.text);\n break;\n }\n }\n\n target = target.parent;\n }\n }\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"DeepCommentPlugin.js","sourceRoot":"","sources":["../../../../src/lib/converter/plugins/DeepCommentPlugin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,wDAA6H;AAC7H,qDAAkE;AAClE,4CAA8D;AAC9D,0CAAyC;AAOzC;IAAuC,qCAAkB;IAAzD;;IAiEA,CAAC;IA7DG,sCAAU,GAAV;QACI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,qBAAS,CAAC,mBAAmB,EAAE,IAAI,CAAC,cAAc,EAAE,GAAG,CAAC,CAAC;IACvF,CAAC;IAOO,0CAAc,GAAtB,UAAuB,OAAgB;QACnC,IAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;QAChC,IAAI,IAAY,CAAC;QACjB,GAAG,CAAC,CAAC,IAAI,GAAG,IAAI,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC;YAClC,IAAM,UAAU,GAAG,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;YAC5C,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC;gBACtB,eAAe,CAAC,UAAU,CAAC,CAAC;YAChC,CAAC;QACL,CAAC;QAED,cAAc,MAAkB;YAC5B,IAAI,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC;YAC/B,EAAE,CAAC,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,IAAI,IAAI,MAAM,YAAY,2BAAmB,CAAC,CAAC,CAAC;gBAC/E,IAAI,GAAG,EAAE,CAAC;YACd,CAAC;YAED,EAAE,CAAC,CAAC,IAAI,IAAI,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC;gBACtB,IAAI,GAAG,CAAC,IAAI,KAAK,EAAE,GAAG,IAAI,GAAG,IAAI,GAAG,GAAG,GAAG,IAAI,CAAC,CAAC;YACpD,CAAC;QACL,CAAC;QAED,yBAAyB,UAAsB;YAC3C,IAAI,GAAG,EAAE,CAAC;YACV,IAAI,CAAC,UAAU,CAAC,CAAC;YACjB,IAAI,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;YAE/B,OAAO,MAAM,IAAI,CAAC,CAAC,MAAM,YAAY,yBAAiB,CAAC,EAAE,CAAC;gBACtD,IAAI,CAAC,MAAM,CAAC,CAAC;gBACb,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;oBACjB,IAAI,GAAG,SAAY,CAAC;oBACpB,EAAE,CAAC,CAAC,UAAU,YAAY,+BAAuB,CAAC,CAAC,CAAC;wBAChD,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC;wBAC1D,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;4BACP,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,GAAG,GAAG,UAAU,CAAC,IAAI,GAAG,GAAG,CAAC,CAAC;wBACtE,CAAC;oBACL,CAAC;oBAED,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;wBACP,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;oBAC/C,CAAC;oBAED,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;wBACN,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;wBAChE,UAAU,CAAC,OAAO,GAAG,IAAI,eAAO,CAAC,EAAE,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC;wBAC/C,KAAK,CAAC;oBACV,CAAC;gBACL,CAAC;gBAED,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;YAC3B,CAAC;QACL,CAAC;IACL,CAAC;IAhEQ,iBAAiB;QAD7B,sBAAS,CAAC,EAAC,IAAI,EAAE,cAAc,EAAC,CAAC;OACrB,iBAAiB,CAiE7B;IAAD,wBAAC;CAAA,AAjED,CAAuC,+BAAkB,GAiExD;AAjEY,8CAAiB","sourcesContent":["import { Reflection, SignatureReflection, ProjectReflection, TypeParameterReflection } from '../../models/reflections/index';\nimport { Comment, CommentTag } from '../../models/comments/index';\nimport { Component, ConverterComponent } from '../components';\nimport { Converter } from '../converter';\nimport { Context } from '../context';\n\n/**\n * A handler that moves comments with dot syntax to their target.\n */\n@Component({name: 'deep-comment'})\nexport class DeepCommentPlugin extends ConverterComponent {\n /**\n * Create a new CommentHandler instance.\n */\n initialize() {\n this.listenTo(this.owner, Converter.EVENT_RESOLVE_BEGIN, this.onBeginResolve, 512);\n }\n\n /**\n * Triggered when the converter begins resolving a project.\n *\n * @param context The context object describing the current state the converter is in.\n */\n private onBeginResolve(context: Context) {\n const project = context.project;\n let name: string;\n for (let key in project.reflections) {\n const reflection = project.reflections[key];\n if (!reflection.comment) {\n findDeepComment(reflection);\n }\n }\n\n function push(parent: Reflection) {\n let part = parent.originalName;\n if (!part || part.substr(0, 2) === '__' || parent instanceof SignatureReflection) {\n part = '';\n }\n\n if (part && part !== '') {\n name = (name === '' ? part : part + '.' + name);\n }\n }\n\n function findDeepComment(reflection: Reflection) {\n name = '';\n push(reflection);\n let target = reflection.parent;\n\n while (target && !(target instanceof ProjectReflection)) {\n push(target);\n if (target.comment) {\n let tag: CommentTag;\n if (reflection instanceof TypeParameterReflection) {\n tag = target.comment.getTag('typeparam', reflection.name);\n if (!tag) {\n tag = target.comment.getTag('param', '<' + reflection.name + '>');\n }\n }\n\n if (!tag) {\n tag = target.comment.getTag('param', name);\n }\n\n if (tag) {\n target.comment.tags.splice(target.comment.tags.indexOf(tag), 1);\n reflection.comment = new Comment('', tag.text);\n break;\n }\n }\n\n target = target.parent;\n }\n }\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/plugins/DynamicModulePlugin.js b/node_modules/typedoc/dist/lib/converter/plugins/DynamicModulePlugin.js
index 8cfb39e56..06eb4314e 100644
--- a/node_modules/typedoc/dist/lib/converter/plugins/DynamicModulePlugin.js
+++ b/node_modules/typedoc/dist/lib/converter/plugins/DynamicModulePlugin.js
@@ -59,10 +59,10 @@ var DynamicModulePlugin = (function (_super) {
reflection.name = '"' + _this.basePath.trim(name) + '"';
});
};
+ DynamicModulePlugin = __decorate([
+ components_1.Component({ name: 'dynamic-module' })
+ ], DynamicModulePlugin);
return DynamicModulePlugin;
}(components_1.ConverterComponent));
-DynamicModulePlugin = __decorate([
- components_1.Component({ name: 'dynamic-module' })
-], DynamicModulePlugin);
exports.DynamicModulePlugin = DynamicModulePlugin;
//# sourceMappingURL=DynamicModulePlugin.js.map \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/plugins/DynamicModulePlugin.js.map b/node_modules/typedoc/dist/lib/converter/plugins/DynamicModulePlugin.js.map
index d8b2bf24a..0b1bd698d 100644
--- a/node_modules/typedoc/dist/lib/converter/plugins/DynamicModulePlugin.js.map
+++ b/node_modules/typedoc/dist/lib/converter/plugins/DynamicModulePlugin.js.map
@@ -1 +1 @@
-{"version":3,"file":"DynamicModulePlugin.js","sourceRoot":"","sources":["../../../../src/lib/converter/plugins/DynamicModulePlugin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AACA,2BAA6B;AAE7B,8DAA6E;AAC7E,4CAA4D;AAC5D,gDAA4C;AAC5C,0CAAuC;AAQvC,IAAa,mBAAmB;IAAS,uCAAkB;IAD3D;QAAA,qEAiEC;QA5DW,cAAQ,GAAG,IAAI,oBAAQ,EAAE,CAAC;;IA4DtC,CAAC;IAlDG,wCAAU,GAAV;QACI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK;YACpB,GAAC,qBAAS,CAAC,WAAW,IAAgB,IAAI,CAAC,OAAO;YAClD,GAAC,qBAAS,CAAC,wBAAwB,IAAG,IAAI,CAAC,aAAa;YACxD,GAAC,qBAAS,CAAC,mBAAmB,IAAQ,IAAI,CAAC,cAAc;gBAC3D,CAAC;;IACP,CAAC;IAOO,qCAAO,GAAf,UAAgB,OAAgB;QAC5B,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;QACtB,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;IAC1B,CAAC;IASO,2CAAa,GAArB,UAAsB,OAAgB,EAAE,UAAsB,EAAE,IAAc;QAC1E,EAAE,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,yBAAc,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;YACnD,IAAI,MAAI,GAAG,UAAU,CAAC,IAAI,CAAC;YAC3B,EAAE,CAAC,CAAC,MAAI,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;gBAC3B,MAAM,CAAC;YACX,CAAC;YAED,MAAI,GAAG,MAAI,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;YAC9B,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YAClC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,MAAI,CAAC,CAAC;QAC5B,CAAC;IACL,CAAC;IAOO,4CAAc,GAAtB,UAAuB,OAAgB;QAAvC,iBAMC;QALG,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,UAAC,UAAU;YAChC,IAAI,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;YAC7C,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC;YAC/D,UAAU,CAAC,IAAI,GAAG,GAAG,GAAG,KAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC;QAC3D,CAAC,CAAC,CAAC;IACP,CAAC;IACL,0BAAC;AAAD,CAAC,AAhED,CAAyC,+BAAkB,GAgE1D;AAhEY,mBAAmB;IAD/B,sBAAS,CAAC,EAAC,IAAI,EAAE,gBAAgB,EAAC,CAAC;GACvB,mBAAmB,CAgE/B;AAhEY,kDAAmB","sourcesContent":["import * as ts from 'typescript';\nimport * as Path from 'path';\n\nimport {Reflection, ReflectionKind} from '../../models/reflections/abstract';\nimport {Component, ConverterComponent} from '../components';\nimport {BasePath} from '../utils/base-path';\nimport {Converter} from '../converter';\nimport {Context} from '../context';\n\n/**\n * A handler that truncates the names of dynamic modules to not include the\n * project's base path.\n */\n@Component({name: 'dynamic-module'})\nexport class DynamicModulePlugin extends ConverterComponent {\n /**\n * Helper class for determining the base path.\n */\n private basePath = new BasePath();\n\n /**\n * List of reflections whose name must be trimmed.\n */\n private reflections: Reflection[];\n\n /**\n * Create a new DynamicModuleHandler instance.\n */\n initialize() {\n this.listenTo(this.owner, {\n [Converter.EVENT_BEGIN]: this.onBegin,\n [Converter.EVENT_CREATE_DECLARATION]: this.onDeclaration,\n [Converter.EVENT_RESOLVE_BEGIN]: this.onBeginResolve\n });\n }\n\n /**\n * Triggered when the converter begins converting a project.\n *\n * @param context The context object describing the current state the converter is in.\n */\n private onBegin(context: Context) {\n this.basePath.reset();\n this.reflections = [];\n }\n\n /**\n * Triggered when the converter has created a declaration reflection.\n *\n * @param context The context object describing the current state the converter is in.\n * @param reflection The reflection that is currently processed.\n * @param node The node that is currently processed if available.\n */\n private onDeclaration(context: Context, reflection: Reflection, node?: ts.Node) {\n if (reflection.kindOf(ReflectionKind.ExternalModule)) {\n let name = reflection.name;\n if (name.indexOf('/') === -1) {\n return;\n }\n\n name = name.replace(/\"/g, '');\n this.reflections.push(reflection);\n this.basePath.add(name);\n }\n }\n\n /**\n * Triggered when the converter begins resolving a project.\n *\n * @param context The context object describing the current state the converter is in.\n */\n private onBeginResolve(context: Context) {\n this.reflections.forEach((reflection) => {\n let name = reflection.name.replace(/\"/g, '');\n name = name.substr(0, name.length - Path.extname(name).length);\n reflection.name = '\"' + this.basePath.trim(name) + '\"';\n });\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"DynamicModulePlugin.js","sourceRoot":"","sources":["../../../../src/lib/converter/plugins/DynamicModulePlugin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AACA,2BAA6B;AAE7B,8DAA+E;AAC/E,4CAA8D;AAC9D,gDAA8C;AAC9C,0CAAyC;AAQzC;IAAyC,uCAAkB;IAD3D;QAAA,qEAiEC;QA5DW,cAAQ,GAAG,IAAI,oBAAQ,EAAE,CAAC;;IA4DtC,CAAC;IAlDG,wCAAU,GAAV;QACI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK;YACpB,GAAC,qBAAS,CAAC,WAAW,IAAgB,IAAI,CAAC,OAAO;YAClD,GAAC,qBAAS,CAAC,wBAAwB,IAAG,IAAI,CAAC,aAAa;YACxD,GAAC,qBAAS,CAAC,mBAAmB,IAAQ,IAAI,CAAC,cAAc;gBAC3D,CAAC;;IACP,CAAC;IAOO,qCAAO,GAAf,UAAgB,OAAgB;QAC5B,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;QACtB,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;IAC1B,CAAC;IASO,2CAAa,GAArB,UAAsB,OAAgB,EAAE,UAAsB,EAAE,IAAc;QAC1E,EAAE,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,yBAAc,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;YACnD,IAAI,MAAI,GAAG,UAAU,CAAC,IAAI,CAAC;YAC3B,EAAE,CAAC,CAAC,MAAI,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;gBAC3B,MAAM,CAAC;YACX,CAAC;YAED,MAAI,GAAG,MAAI,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;YAC9B,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YAClC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,MAAI,CAAC,CAAC;QAC5B,CAAC;IACL,CAAC;IAOO,4CAAc,GAAtB,UAAuB,OAAgB;QAAvC,iBAMC;QALG,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,UAAC,UAAU;YAChC,IAAI,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;YAC7C,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC;YAC/D,UAAU,CAAC,IAAI,GAAG,GAAG,GAAG,KAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC;QAC3D,CAAC,CAAC,CAAC;IACP,CAAC;IA/DQ,mBAAmB;QAD/B,sBAAS,CAAC,EAAC,IAAI,EAAE,gBAAgB,EAAC,CAAC;OACvB,mBAAmB,CAgE/B;IAAD,0BAAC;CAAA,AAhED,CAAyC,+BAAkB,GAgE1D;AAhEY,kDAAmB","sourcesContent":["import * as ts from 'typescript';\nimport * as Path from 'path';\n\nimport { Reflection, ReflectionKind } from '../../models/reflections/abstract';\nimport { Component, ConverterComponent } from '../components';\nimport { BasePath } from '../utils/base-path';\nimport { Converter } from '../converter';\nimport { Context } from '../context';\n\n/**\n * A handler that truncates the names of dynamic modules to not include the\n * project's base path.\n */\n@Component({name: 'dynamic-module'})\nexport class DynamicModulePlugin extends ConverterComponent {\n /**\n * Helper class for determining the base path.\n */\n private basePath = new BasePath();\n\n /**\n * List of reflections whose name must be trimmed.\n */\n private reflections: Reflection[];\n\n /**\n * Create a new DynamicModuleHandler instance.\n */\n initialize() {\n this.listenTo(this.owner, {\n [Converter.EVENT_BEGIN]: this.onBegin,\n [Converter.EVENT_CREATE_DECLARATION]: this.onDeclaration,\n [Converter.EVENT_RESOLVE_BEGIN]: this.onBeginResolve\n });\n }\n\n /**\n * Triggered when the converter begins converting a project.\n *\n * @param context The context object describing the current state the converter is in.\n */\n private onBegin(context: Context) {\n this.basePath.reset();\n this.reflections = [];\n }\n\n /**\n * Triggered when the converter has created a declaration reflection.\n *\n * @param context The context object describing the current state the converter is in.\n * @param reflection The reflection that is currently processed.\n * @param node The node that is currently processed if available.\n */\n private onDeclaration(context: Context, reflection: Reflection, node?: ts.Node) {\n if (reflection.kindOf(ReflectionKind.ExternalModule)) {\n let name = reflection.name;\n if (name.indexOf('/') === -1) {\n return;\n }\n\n name = name.replace(/\"/g, '');\n this.reflections.push(reflection);\n this.basePath.add(name);\n }\n }\n\n /**\n * Triggered when the converter begins resolving a project.\n *\n * @param context The context object describing the current state the converter is in.\n */\n private onBeginResolve(context: Context) {\n this.reflections.forEach((reflection) => {\n let name = reflection.name.replace(/\"/g, '');\n name = name.substr(0, name.length - Path.extname(name).length);\n reflection.name = '\"' + this.basePath.trim(name) + '\"';\n });\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/plugins/GitHubPlugin.js b/node_modules/typedoc/dist/lib/converter/plugins/GitHubPlugin.js
index 3e60e2bab..d11e4869a 100644
--- a/node_modules/typedoc/dist/lib/converter/plugins/GitHubPlugin.js
+++ b/node_modules/typedoc/dist/lib/converter/plugins/GitHubPlugin.js
@@ -149,17 +149,17 @@ var GitHubPlugin = (function (_super) {
}
}
};
+ __decorate([
+ component_1.Option({
+ name: 'gitRevision',
+ help: 'Use specified revision instead of the last revision for linking to GitHub source files.',
+ type: declaration_1.ParameterType.String
+ })
+ ], GitHubPlugin.prototype, "gitRevision", void 0);
+ GitHubPlugin = __decorate([
+ components_1.Component({ name: 'git-hub' })
+ ], GitHubPlugin);
return GitHubPlugin;
}(components_1.ConverterComponent));
-__decorate([
- component_1.Option({
- name: 'gitRevision',
- help: 'Use specified revision instead of the last revision for linking to GitHub source files.',
- type: declaration_1.ParameterType.String
- })
-], GitHubPlugin.prototype, "gitRevision", void 0);
-GitHubPlugin = __decorate([
- components_1.Component({ name: 'git-hub' })
-], GitHubPlugin);
exports.GitHubPlugin = GitHubPlugin;
//# sourceMappingURL=GitHubPlugin.js.map \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/plugins/GitHubPlugin.js.map b/node_modules/typedoc/dist/lib/converter/plugins/GitHubPlugin.js.map
index c831b8fa0..7d8902cc2 100644
--- a/node_modules/typedoc/dist/lib/converter/plugins/GitHubPlugin.js.map
+++ b/node_modules/typedoc/dist/lib/converter/plugins/GitHubPlugin.js.map
@@ -1 +1 @@
-{"version":3,"file":"GitHubPlugin.js","sourceRoot":"","sources":["../../../../src/lib/converter/plugins/GitHubPlugin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,iCAAmC;AACnC,2BAA6B;AAG7B,4CAA4D;AAC5D,gDAA4C;AAC5C,0CAAuC;AAEvC,mDAA6C;AAC7C,+DAA8D;AAK9D;IA+BI,oBAAY,IAAY,EAAE,WAAmB;QAA7C,iBAuCC;QAxDD,UAAK,GAAa,EAAE,CAAC;QAkBjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,MAAM,GAAG,WAAW,IAAI,QAAQ,CAAC;QACtC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAEpB,IAAI,GAAG,GAAmC,OAAO,CAAC,IAAI,CAAC,yBAAyB,EAAE,EAAC,MAAM,EAAE,IAAI,EAAC,CAAC,CAAC;QAClG,EAAE,CAAC,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC;YACjB,IAAI,GAAG,SAAiB,CAAC;YACzB,IAAM,OAAO,GAAG,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YACvC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;gBAC7C,GAAG,GAAG,gCAAgC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;gBACxD,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;oBACN,IAAI,CAAC,UAAU,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;oBACzB,IAAI,CAAC,aAAa,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;oBAC5B,EAAE,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,CAAC,CAAC;wBAC3C,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,EAAE,IAAI,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;oBACrF,CAAC;oBACD,KAAK,CAAC;gBACV,CAAC;YACL,CAAC;QACL,CAAC;QAED,GAAG,GAAmC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,EAAC,MAAM,EAAE,IAAI,EAAC,CAAC,CAAC;QACnF,EAAE,CAAC,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC;YACjB,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,UAAC,IAAI;gBAChC,EAAE,CAAC,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC;oBACd,KAAI,CAAC,KAAK,CAAC,IAAI,CAAC,oBAAQ,CAAC,SAAS,CAAC,IAAI,GAAG,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC;gBAC3D,CAAC;YACL,CAAC,CAAC,CAAC;QACP,CAAC;QAED,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC;YACf,GAAG,GAAmC,OAAO,CAAC,IAAI,CAAC,4BAA4B,EAAE,EAAC,MAAM,EAAE,IAAI,EAAC,CAAC,CAAC;YACjG,EAAE,CAAC,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC;gBACjB,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;YAC/C,CAAC;QACL,CAAC;QAED,OAAO,CAAC,IAAI,EAAE,CAAC;IACnB,CAAC;IAQD,6BAAQ,GAAR,UAAS,QAAgB;QACrB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;IAC/C,CAAC;IAQD,iCAAY,GAAZ,UAAa,QAAgB;QACzB,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,IAAI,CAAC,IAAI,CAAC,aAAa,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;YACtE,MAAM,CAAC,IAAI,CAAC;QAChB,CAAC;QAED,MAAM,CAAC;YACH,oBAAoB;YACpB,IAAI,CAAC,UAAU;YACf,IAAI,CAAC,aAAa;YAClB,MAAM;YACN,IAAI,CAAC,MAAM;YACX,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;SACxC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAChB,CAAC;IAWM,8BAAmB,GAA1B,UAA2B,IAAY,EAAE,WAAmB;QACxD,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACpB,IAAM,GAAG,GAAmC,OAAO,CAAC,IAAI,CAAC,+BAA+B,EAAE,EAAC,MAAM,EAAE,IAAI,EAAC,CAAC,CAAC;QAC1G,OAAO,CAAC,IAAI,EAAE,CAAC;QAEf,EAAE,CAAC,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC;YACjB,MAAM,CAAC,IAAI,CAAC;QAChB,CAAC;QACD,MAAM,CAAC,IAAI,UAAU,CAAC,oBAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC;IACzF,CAAC;IACL,iBAAC;AAAD,CAAC,AA1HD,IA0HC;AAOD,IAAa,YAAY;IAAS,gCAAkB;IADpD;QAAA,qEAiGC;QA5FW,kBAAY,GAAiC,EAAE,CAAC;QAKhD,kBAAY,GAAa,EAAE,CAAC;;IAuFxC,CAAC;IAzEG,iCAAU,GAAV;QACI,OAAO,CAAC,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC;QAC7B,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YACvB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,qBAAS,CAAC,iBAAiB,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;QAC9E,CAAC;IACL,CAAC;IAQO,oCAAa,GAArB,UAAsB,QAAgB;QAElC,IAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QACvC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;YACvD,EAAE,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC;gBACnC,MAAM,CAAC,IAAI,CAAC;YAChB,CAAC;QACL,CAAC;QAGD,GAAG,CAAC,CAAC,IAAI,IAAI,IAAI,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;YACjC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;gBAC1C,QAAQ,CAAC;YACb,CAAC;YACD,EAAE,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC;gBAC3C,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;YACnC,CAAC;QACL,CAAC;QAGD,IAAM,UAAU,GAAG,UAAU,CAAC,mBAAmB,CAAC,OAAO,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;QAC7E,EAAE,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;YACb,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,UAAU,CAAC;YAChD,MAAM,CAAC,UAAU,CAAC;QACtB,CAAC;QAGD,IAAM,QAAQ,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACpC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;YACvC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;QAC3D,CAAC;QAED,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAOO,mCAAY,GAApB,UAAqB,OAAgB;QAArC,iBAmBC;QAlBG,IAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;QAChC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,UAAC,UAAU;YAC7B,IAAM,UAAU,GAAG,KAAI,CAAC,aAAa,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;YAC/D,EAAE,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;gBACb,UAAU,CAAC,GAAG,GAAG,UAAU,CAAC,YAAY,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;YACtE,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,GAAG,CAAC,CAAC,IAAI,GAAG,IAAI,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC;YAClC,IAAM,UAAU,GAAG,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;YAC5C,EAAE,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC;gBACrB,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,UAAC,MAAuB;oBAC/C,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;wBACjC,MAAM,CAAC,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,GAAG,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;oBACtD,CAAC;gBACL,CAAC,CAAC,CAAC;YACP,CAAC;QACL,CAAC;IACL,CAAC;IACL,mBAAC;AAAD,CAAC,AAhGD,CAAkC,+BAAkB,GAgGnD;AAhFG;IALC,kBAAM,CAAC;QACJ,IAAI,EAAE,aAAa;QACnB,IAAI,EAAE,yFAAyF;QAC/F,IAAI,EAAE,2BAAa,CAAC,MAAM;KAC7B,CAAC;iDACkB;AAhBX,YAAY;IADxB,sBAAS,CAAC,EAAC,IAAI,EAAE,SAAS,EAAC,CAAC;GAChB,YAAY,CAgGxB;AAhGY,oCAAY","sourcesContent":["import * as ShellJS from 'shelljs';\nimport * as Path from 'path';\n\nimport {SourceReference} from '../../models/sources/file';\nimport {Component, ConverterComponent} from '../components';\nimport {BasePath} from '../utils/base-path';\nimport {Converter} from '../converter';\nimport {Context} from '../context';\nimport {Option} from '../../utils/component';\nimport {ParameterType} from '../../utils/options/declaration';\n\n/**\n * Stores data of a repository.\n */\nclass Repository {\n /**\n * The root path of this repository.\n */\n path: string;\n\n /**\n * The name of the branch this repository is on right now.\n */\n branch: string;\n\n /**\n * A list of all files tracked by the repository.\n */\n files: string[] = [];\n\n /**\n * The user/organisation name of this repository on GitHub.\n */\n gitHubUser: string;\n\n /**\n * The project name of this repository on GitHub.\n */\n gitHubProject: string;\n\n /**\n * Create a new Repository instance.\n *\n * @param path The root path of the repository.\n */\n constructor(path: string, gitRevision: string) {\n this.path = path;\n this.branch = gitRevision || 'master';\n ShellJS.pushd(path);\n\n let out = <ShellJS.ExecOutputReturnValue> ShellJS.exec('git ls-remote --get-url', {silent: true});\n if (out.code === 0) {\n let url: RegExpExecArray;\n const remotes = out.stdout.split('\\n');\n for (let i = 0, c = remotes.length; i < c; i++) {\n url = /github\\.com[:\\/]([^\\/]+)\\/(.*)/.exec(remotes[i]);\n if (url) {\n this.gitHubUser = url[1];\n this.gitHubProject = url[2];\n if (this.gitHubProject.substr(-4) === '.git') {\n this.gitHubProject = this.gitHubProject.substr(0, this.gitHubProject.length - 4);\n }\n break;\n }\n }\n }\n\n out = <ShellJS.ExecOutputReturnValue> ShellJS.exec('git ls-files', {silent: true});\n if (out.code === 0) {\n out.stdout.split('\\n').forEach((file) => {\n if (file !== '') {\n this.files.push(BasePath.normalize(path + '/' + file));\n }\n });\n }\n\n if (!gitRevision) {\n out = <ShellJS.ExecOutputReturnValue> ShellJS.exec('git rev-parse --short HEAD', {silent: true});\n if (out.code === 0) {\n this.branch = out.stdout.replace('\\n', '');\n }\n }\n\n ShellJS.popd();\n }\n\n /**\n * Check whether the given file is tracked by this repository.\n *\n * @param fileName The name of the file to test for.\n * @returns TRUE when the file is part of the repository, otherwise FALSE.\n */\n contains(fileName: string): boolean {\n return this.files.indexOf(fileName) !== -1;\n }\n\n /**\n * Get the URL of the given file on GitHub.\n *\n * @param fileName The file whose GitHub URL should be determined.\n * @returns An url pointing to the web preview of the given file or NULL.\n */\n getGitHubURL(fileName: string): string {\n if (!this.gitHubUser || !this.gitHubProject || !this.contains(fileName)) {\n return null;\n }\n\n return [\n 'https://github.com',\n this.gitHubUser,\n this.gitHubProject,\n 'blob',\n this.branch,\n fileName.substr(this.path.length + 1)\n ].join('/');\n }\n\n /**\n * Try to create a new repository instance.\n *\n * Checks whether the given path is the root of a valid repository and if so\n * creates a new instance of [[Repository]].\n *\n * @param path The potential repository root.\n * @returns A new instance of [[Repository]] or NULL.\n */\n static tryCreateRepository(path: string, gitRevision: string): Repository {\n ShellJS.pushd(path);\n const out = <ShellJS.ExecOutputReturnValue> ShellJS.exec('git rev-parse --show-toplevel', {silent: true});\n ShellJS.popd();\n\n if (out.code !== 0) {\n return null;\n }\n return new Repository(BasePath.normalize(out.stdout.replace('\\n', '')), gitRevision);\n }\n}\n\n/**\n * A handler that watches for repositories with GitHub origin and links\n * their source files to the related GitHub pages.\n */\n@Component({name: 'git-hub'})\nexport class GitHubPlugin extends ConverterComponent {\n /**\n * List of known repositories.\n */\n private repositories: {[path: string]: Repository} = {};\n\n /**\n * List of paths known to be not under git control.\n */\n private ignoredPaths: string[] = [];\n\n @Option({\n name: 'gitRevision',\n help: 'Use specified revision instead of the last revision for linking to GitHub source files.',\n type: ParameterType.String\n })\n gitRevision: string;\n\n /**\n * Create a new GitHubHandler instance.\n *\n * @param converter The converter this plugin should be attached to.\n */\n initialize() {\n ShellJS.config.silent = true;\n if (ShellJS.which('git')) {\n this.listenTo(this.owner, Converter.EVENT_RESOLVE_END, this.onEndResolve);\n }\n }\n\n /**\n * Check whether the given file is placed inside a repository.\n *\n * @param fileName The name of the file a repository should be looked for.\n * @returns The found repository info or NULL.\n */\n private getRepository(fileName: string): Repository {\n // Check for known non-repositories\n const dirName = Path.dirname(fileName);\n for (let i = 0, c = this.ignoredPaths.length; i < c; i++) {\n if (this.ignoredPaths[i] === dirName) {\n return null;\n }\n }\n\n // Check for known repositories\n for (let path in this.repositories) {\n if (!this.repositories.hasOwnProperty(path)) {\n continue;\n }\n if (fileName.substr(0, path.length) === path) {\n return this.repositories[path];\n }\n }\n\n // Try to create a new repository\n const repository = Repository.tryCreateRepository(dirName, this.gitRevision);\n if (repository) {\n this.repositories[repository.path] = repository;\n return repository;\n }\n\n // No repository found, add path to ignored paths\n const segments = dirName.split('/');\n for (let i = segments.length; i > 0; i--) {\n this.ignoredPaths.push(segments.slice(0, i).join('/'));\n }\n\n return null;\n }\n\n /**\n * Triggered when the converter has finished resolving a project.\n *\n * @param context The context object describing the current state the converter is in.\n */\n private onEndResolve(context: Context) {\n const project = context.project;\n project.files.forEach((sourceFile) => {\n const repository = this.getRepository(sourceFile.fullFileName);\n if (repository) {\n sourceFile.url = repository.getGitHubURL(sourceFile.fullFileName);\n }\n });\n\n for (let key in project.reflections) {\n const reflection = project.reflections[key];\n if (reflection.sources) {\n reflection.sources.forEach((source: SourceReference) => {\n if (source.file && source.file.url) {\n source.url = source.file.url + '#L' + source.line;\n }\n });\n }\n }\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"GitHubPlugin.js","sourceRoot":"","sources":["../../../../src/lib/converter/plugins/GitHubPlugin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,iCAAmC;AACnC,2BAA6B;AAG7B,4CAA8D;AAC9D,gDAA8C;AAC9C,0CAAyC;AAEzC,mDAA+C;AAC/C,+DAAgE;AAKhE;IA+BI,oBAAY,IAAY,EAAE,WAAmB;QAA7C,iBAuCC;QAxDD,UAAK,GAAa,EAAE,CAAC;QAkBjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,MAAM,GAAG,WAAW,IAAI,QAAQ,CAAC;QACtC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAEpB,IAAI,GAAG,GAAmC,OAAO,CAAC,IAAI,CAAC,yBAAyB,EAAE,EAAC,MAAM,EAAE,IAAI,EAAC,CAAC,CAAC;QAClG,EAAE,CAAC,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC;YACjB,IAAI,GAAG,SAAiB,CAAC;YACzB,IAAM,OAAO,GAAG,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YACvC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;gBAC7C,GAAG,GAAG,gCAAgC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;gBACxD,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;oBACN,IAAI,CAAC,UAAU,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;oBACzB,IAAI,CAAC,aAAa,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;oBAC5B,EAAE,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,CAAC,CAAC;wBAC3C,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,EAAE,IAAI,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;oBACrF,CAAC;oBACD,KAAK,CAAC;gBACV,CAAC;YACL,CAAC;QACL,CAAC;QAED,GAAG,GAAmC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,EAAC,MAAM,EAAE,IAAI,EAAC,CAAC,CAAC;QACnF,EAAE,CAAC,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC;YACjB,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,UAAC,IAAI;gBAChC,EAAE,CAAC,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC;oBACd,KAAI,CAAC,KAAK,CAAC,IAAI,CAAC,oBAAQ,CAAC,SAAS,CAAC,IAAI,GAAG,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC;gBAC3D,CAAC;YACL,CAAC,CAAC,CAAC;QACP,CAAC;QAED,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC;YACf,GAAG,GAAmC,OAAO,CAAC,IAAI,CAAC,4BAA4B,EAAE,EAAC,MAAM,EAAE,IAAI,EAAC,CAAC,CAAC;YACjG,EAAE,CAAC,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC;gBACjB,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;YAC/C,CAAC;QACL,CAAC;QAED,OAAO,CAAC,IAAI,EAAE,CAAC;IACnB,CAAC;IAQD,6BAAQ,GAAR,UAAS,QAAgB;QACrB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;IAC/C,CAAC;IAQD,iCAAY,GAAZ,UAAa,QAAgB;QACzB,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,IAAI,CAAC,IAAI,CAAC,aAAa,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;YACtE,MAAM,CAAC,IAAI,CAAC;QAChB,CAAC;QAED,MAAM,CAAC;YACH,oBAAoB;YACpB,IAAI,CAAC,UAAU;YACf,IAAI,CAAC,aAAa;YAClB,MAAM;YACN,IAAI,CAAC,MAAM;YACX,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;SACxC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAChB,CAAC;IAWM,8BAAmB,GAA1B,UAA2B,IAAY,EAAE,WAAmB;QACxD,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACpB,IAAM,GAAG,GAAmC,OAAO,CAAC,IAAI,CAAC,+BAA+B,EAAE,EAAC,MAAM,EAAE,IAAI,EAAC,CAAC,CAAC;QAC1G,OAAO,CAAC,IAAI,EAAE,CAAC;QAEf,EAAE,CAAC,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC;YACjB,MAAM,CAAC,IAAI,CAAC;QAChB,CAAC;QACD,MAAM,CAAC,IAAI,UAAU,CAAC,oBAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC;IACzF,CAAC;IACL,iBAAC;AAAD,CAAC,AA1HD,IA0HC;AAOD;IAAkC,gCAAkB;IADpD;QAAA,qEAiGC;QA5FW,kBAAY,GAAiC,EAAE,CAAC;QAKhD,kBAAY,GAAa,EAAE,CAAC;;IAuFxC,CAAC;IAzEG,iCAAU,GAAV;QACI,OAAO,CAAC,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC;QAC7B,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YACvB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,qBAAS,CAAC,iBAAiB,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;QAC9E,CAAC;IACL,CAAC;IAQO,oCAAa,GAArB,UAAsB,QAAgB;QAElC,IAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QACvC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;YACvD,EAAE,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC;gBACnC,MAAM,CAAC,IAAI,CAAC;YAChB,CAAC;QACL,CAAC;QAGD,GAAG,CAAC,CAAC,IAAI,IAAI,IAAI,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;YACjC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;gBAC1C,QAAQ,CAAC;YACb,CAAC;YACD,EAAE,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC;gBAC3C,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;YACnC,CAAC;QACL,CAAC;QAGD,IAAM,UAAU,GAAG,UAAU,CAAC,mBAAmB,CAAC,OAAO,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;QAC7E,EAAE,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;YACb,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,UAAU,CAAC;YAChD,MAAM,CAAC,UAAU,CAAC;QACtB,CAAC;QAGD,IAAM,QAAQ,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACpC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;YACvC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;QAC3D,CAAC;QAED,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAOO,mCAAY,GAApB,UAAqB,OAAgB;QAArC,iBAmBC;QAlBG,IAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;QAChC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,UAAC,UAAU;YAC7B,IAAM,UAAU,GAAG,KAAI,CAAC,aAAa,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;YAC/D,EAAE,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;gBACb,UAAU,CAAC,GAAG,GAAG,UAAU,CAAC,YAAY,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;YACtE,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,GAAG,CAAC,CAAC,IAAI,GAAG,IAAI,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC;YAClC,IAAM,UAAU,GAAG,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;YAC5C,EAAE,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC;gBACrB,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,UAAC,MAAuB;oBAC/C,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;wBACjC,MAAM,CAAC,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,GAAG,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;oBACtD,CAAC;gBACL,CAAC,CAAC,CAAC;YACP,CAAC;QACL,CAAC;IACL,CAAC;IA/ED;QALC,kBAAM,CAAC;YACJ,IAAI,EAAE,aAAa;YACnB,IAAI,EAAE,yFAAyF;YAC/F,IAAI,EAAE,2BAAa,CAAC,MAAM;SAC7B,CAAC;qDACkB;IAhBX,YAAY;QADxB,sBAAS,CAAC,EAAC,IAAI,EAAE,SAAS,EAAC,CAAC;OAChB,YAAY,CAgGxB;IAAD,mBAAC;CAAA,AAhGD,CAAkC,+BAAkB,GAgGnD;AAhGY,oCAAY","sourcesContent":["import * as ShellJS from 'shelljs';\nimport * as Path from 'path';\n\nimport { SourceReference } from '../../models/sources/file';\nimport { Component, ConverterComponent } from '../components';\nimport { BasePath } from '../utils/base-path';\nimport { Converter } from '../converter';\nimport { Context } from '../context';\nimport { Option } from '../../utils/component';\nimport { ParameterType } from '../../utils/options/declaration';\n\n/**\n * Stores data of a repository.\n */\nclass Repository {\n /**\n * The root path of this repository.\n */\n path: string;\n\n /**\n * The name of the branch this repository is on right now.\n */\n branch: string;\n\n /**\n * A list of all files tracked by the repository.\n */\n files: string[] = [];\n\n /**\n * The user/organisation name of this repository on GitHub.\n */\n gitHubUser: string;\n\n /**\n * The project name of this repository on GitHub.\n */\n gitHubProject: string;\n\n /**\n * Create a new Repository instance.\n *\n * @param path The root path of the repository.\n */\n constructor(path: string, gitRevision: string) {\n this.path = path;\n this.branch = gitRevision || 'master';\n ShellJS.pushd(path);\n\n let out = <ShellJS.ExecOutputReturnValue> ShellJS.exec('git ls-remote --get-url', {silent: true});\n if (out.code === 0) {\n let url: RegExpExecArray;\n const remotes = out.stdout.split('\\n');\n for (let i = 0, c = remotes.length; i < c; i++) {\n url = /github\\.com[:\\/]([^\\/]+)\\/(.*)/.exec(remotes[i]);\n if (url) {\n this.gitHubUser = url[1];\n this.gitHubProject = url[2];\n if (this.gitHubProject.substr(-4) === '.git') {\n this.gitHubProject = this.gitHubProject.substr(0, this.gitHubProject.length - 4);\n }\n break;\n }\n }\n }\n\n out = <ShellJS.ExecOutputReturnValue> ShellJS.exec('git ls-files', {silent: true});\n if (out.code === 0) {\n out.stdout.split('\\n').forEach((file) => {\n if (file !== '') {\n this.files.push(BasePath.normalize(path + '/' + file));\n }\n });\n }\n\n if (!gitRevision) {\n out = <ShellJS.ExecOutputReturnValue> ShellJS.exec('git rev-parse --short HEAD', {silent: true});\n if (out.code === 0) {\n this.branch = out.stdout.replace('\\n', '');\n }\n }\n\n ShellJS.popd();\n }\n\n /**\n * Check whether the given file is tracked by this repository.\n *\n * @param fileName The name of the file to test for.\n * @returns TRUE when the file is part of the repository, otherwise FALSE.\n */\n contains(fileName: string): boolean {\n return this.files.indexOf(fileName) !== -1;\n }\n\n /**\n * Get the URL of the given file on GitHub.\n *\n * @param fileName The file whose GitHub URL should be determined.\n * @returns An url pointing to the web preview of the given file or NULL.\n */\n getGitHubURL(fileName: string): string {\n if (!this.gitHubUser || !this.gitHubProject || !this.contains(fileName)) {\n return null;\n }\n\n return [\n 'https://github.com',\n this.gitHubUser,\n this.gitHubProject,\n 'blob',\n this.branch,\n fileName.substr(this.path.length + 1)\n ].join('/');\n }\n\n /**\n * Try to create a new repository instance.\n *\n * Checks whether the given path is the root of a valid repository and if so\n * creates a new instance of [[Repository]].\n *\n * @param path The potential repository root.\n * @returns A new instance of [[Repository]] or NULL.\n */\n static tryCreateRepository(path: string, gitRevision: string): Repository {\n ShellJS.pushd(path);\n const out = <ShellJS.ExecOutputReturnValue> ShellJS.exec('git rev-parse --show-toplevel', {silent: true});\n ShellJS.popd();\n\n if (out.code !== 0) {\n return null;\n }\n return new Repository(BasePath.normalize(out.stdout.replace('\\n', '')), gitRevision);\n }\n}\n\n/**\n * A handler that watches for repositories with GitHub origin and links\n * their source files to the related GitHub pages.\n */\n@Component({name: 'git-hub'})\nexport class GitHubPlugin extends ConverterComponent {\n /**\n * List of known repositories.\n */\n private repositories: {[path: string]: Repository} = {};\n\n /**\n * List of paths known to be not under git control.\n */\n private ignoredPaths: string[] = [];\n\n @Option({\n name: 'gitRevision',\n help: 'Use specified revision instead of the last revision for linking to GitHub source files.',\n type: ParameterType.String\n })\n gitRevision: string;\n\n /**\n * Create a new GitHubHandler instance.\n *\n * @param converter The converter this plugin should be attached to.\n */\n initialize() {\n ShellJS.config.silent = true;\n if (ShellJS.which('git')) {\n this.listenTo(this.owner, Converter.EVENT_RESOLVE_END, this.onEndResolve);\n }\n }\n\n /**\n * Check whether the given file is placed inside a repository.\n *\n * @param fileName The name of the file a repository should be looked for.\n * @returns The found repository info or NULL.\n */\n private getRepository(fileName: string): Repository {\n // Check for known non-repositories\n const dirName = Path.dirname(fileName);\n for (let i = 0, c = this.ignoredPaths.length; i < c; i++) {\n if (this.ignoredPaths[i] === dirName) {\n return null;\n }\n }\n\n // Check for known repositories\n for (let path in this.repositories) {\n if (!this.repositories.hasOwnProperty(path)) {\n continue;\n }\n if (fileName.substr(0, path.length) === path) {\n return this.repositories[path];\n }\n }\n\n // Try to create a new repository\n const repository = Repository.tryCreateRepository(dirName, this.gitRevision);\n if (repository) {\n this.repositories[repository.path] = repository;\n return repository;\n }\n\n // No repository found, add path to ignored paths\n const segments = dirName.split('/');\n for (let i = segments.length; i > 0; i--) {\n this.ignoredPaths.push(segments.slice(0, i).join('/'));\n }\n\n return null;\n }\n\n /**\n * Triggered when the converter has finished resolving a project.\n *\n * @param context The context object describing the current state the converter is in.\n */\n private onEndResolve(context: Context) {\n const project = context.project;\n project.files.forEach((sourceFile) => {\n const repository = this.getRepository(sourceFile.fullFileName);\n if (repository) {\n sourceFile.url = repository.getGitHubURL(sourceFile.fullFileName);\n }\n });\n\n for (let key in project.reflections) {\n const reflection = project.reflections[key];\n if (reflection.sources) {\n reflection.sources.forEach((source: SourceReference) => {\n if (source.file && source.file.url) {\n source.url = source.file.url + '#L' + source.line;\n }\n });\n }\n }\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/plugins/GroupPlugin.js b/node_modules/typedoc/dist/lib/converter/plugins/GroupPlugin.js
index 6d7349878..6ecc07810 100644
--- a/node_modules/typedoc/dist/lib/converter/plugins/GroupPlugin.js
+++ b/node_modules/typedoc/dist/lib/converter/plugins/GroupPlugin.js
@@ -20,11 +20,12 @@ var index_1 = require("../../models/reflections/index");
var ReflectionGroup_1 = require("../../models/ReflectionGroup");
var components_1 = require("../components");
var converter_1 = require("../converter");
-var GroupPlugin = GroupPlugin_1 = (function (_super) {
+var GroupPlugin = (function (_super) {
__extends(GroupPlugin, _super);
function GroupPlugin() {
return _super !== null && _super.apply(this, arguments) || this;
}
+ GroupPlugin_1 = GroupPlugin;
GroupPlugin.prototype.initialize = function () {
this.listenTo(this.owner, (_a = {},
_a[converter_1.Converter.EVENT_RESOLVE] = this.onResolve,
@@ -139,52 +140,52 @@ var GroupPlugin = GroupPlugin_1 = (function (_super) {
return aWeight - bWeight;
}
};
+ GroupPlugin.WEIGHTS = [
+ index_1.ReflectionKind.Global,
+ index_1.ReflectionKind.ExternalModule,
+ index_1.ReflectionKind.Module,
+ index_1.ReflectionKind.Enum,
+ index_1.ReflectionKind.EnumMember,
+ index_1.ReflectionKind.Class,
+ index_1.ReflectionKind.Interface,
+ index_1.ReflectionKind.TypeAlias,
+ index_1.ReflectionKind.Constructor,
+ index_1.ReflectionKind.Event,
+ index_1.ReflectionKind.Property,
+ index_1.ReflectionKind.Variable,
+ index_1.ReflectionKind.Function,
+ index_1.ReflectionKind.Accessor,
+ index_1.ReflectionKind.Method,
+ index_1.ReflectionKind.ObjectLiteral,
+ index_1.ReflectionKind.Parameter,
+ index_1.ReflectionKind.TypeParameter,
+ index_1.ReflectionKind.TypeLiteral,
+ index_1.ReflectionKind.CallSignature,
+ index_1.ReflectionKind.ConstructorSignature,
+ index_1.ReflectionKind.IndexSignature,
+ index_1.ReflectionKind.GetSignature,
+ index_1.ReflectionKind.SetSignature
+ ];
+ GroupPlugin.SINGULARS = (function () {
+ var singulars = {};
+ singulars[index_1.ReflectionKind.Enum] = 'Enumeration';
+ singulars[index_1.ReflectionKind.EnumMember] = 'Enumeration member';
+ return singulars;
+ })();
+ GroupPlugin.PLURALS = (function () {
+ var plurals = {};
+ plurals[index_1.ReflectionKind.Class] = 'Classes';
+ plurals[index_1.ReflectionKind.Property] = 'Properties';
+ plurals[index_1.ReflectionKind.Enum] = 'Enumerations';
+ plurals[index_1.ReflectionKind.EnumMember] = 'Enumeration members';
+ plurals[index_1.ReflectionKind.TypeAlias] = 'Type aliases';
+ return plurals;
+ })();
+ GroupPlugin = GroupPlugin_1 = __decorate([
+ components_1.Component({ name: 'group' })
+ ], GroupPlugin);
return GroupPlugin;
+ var GroupPlugin_1;
}(components_1.ConverterComponent));
-GroupPlugin.WEIGHTS = [
- index_1.ReflectionKind.Global,
- index_1.ReflectionKind.ExternalModule,
- index_1.ReflectionKind.Module,
- index_1.ReflectionKind.Enum,
- index_1.ReflectionKind.EnumMember,
- index_1.ReflectionKind.Class,
- index_1.ReflectionKind.Interface,
- index_1.ReflectionKind.TypeAlias,
- index_1.ReflectionKind.Constructor,
- index_1.ReflectionKind.Event,
- index_1.ReflectionKind.Property,
- index_1.ReflectionKind.Variable,
- index_1.ReflectionKind.Function,
- index_1.ReflectionKind.Accessor,
- index_1.ReflectionKind.Method,
- index_1.ReflectionKind.ObjectLiteral,
- index_1.ReflectionKind.Parameter,
- index_1.ReflectionKind.TypeParameter,
- index_1.ReflectionKind.TypeLiteral,
- index_1.ReflectionKind.CallSignature,
- index_1.ReflectionKind.ConstructorSignature,
- index_1.ReflectionKind.IndexSignature,
- index_1.ReflectionKind.GetSignature,
- index_1.ReflectionKind.SetSignature
-];
-GroupPlugin.SINGULARS = (function () {
- var singulars = {};
- singulars[index_1.ReflectionKind.Enum] = 'Enumeration';
- singulars[index_1.ReflectionKind.EnumMember] = 'Enumeration member';
- return singulars;
-})();
-GroupPlugin.PLURALS = (function () {
- var plurals = {};
- plurals[index_1.ReflectionKind.Class] = 'Classes';
- plurals[index_1.ReflectionKind.Property] = 'Properties';
- plurals[index_1.ReflectionKind.Enum] = 'Enumerations';
- plurals[index_1.ReflectionKind.EnumMember] = 'Enumeration members';
- plurals[index_1.ReflectionKind.TypeAlias] = 'Type aliases';
- return plurals;
-})();
-GroupPlugin = GroupPlugin_1 = __decorate([
- components_1.Component({ name: 'group' })
-], GroupPlugin);
exports.GroupPlugin = GroupPlugin;
-var GroupPlugin_1;
//# sourceMappingURL=GroupPlugin.js.map \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/plugins/GroupPlugin.js.map b/node_modules/typedoc/dist/lib/converter/plugins/GroupPlugin.js.map
index e196816c4..d973ba6f5 100644
--- a/node_modules/typedoc/dist/lib/converter/plugins/GroupPlugin.js.map
+++ b/node_modules/typedoc/dist/lib/converter/plugins/GroupPlugin.js.map
@@ -1 +1 @@
-{"version":3,"file":"GroupPlugin.js","sourceRoot":"","sources":["../../../../src/lib/converter/plugins/GroupPlugin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,wDAAsH;AACtH,gEAA6D;AAE7D,4CAA4D;AAC5D,0CAAuC;AASvC,IAAa,WAAW;IAAS,+BAAkB;IAAnD;;IAqOA,CAAC;IA1KG,gCAAU,GAAV;QACI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK;YACpB,GAAC,qBAAS,CAAC,aAAa,IAAO,IAAI,CAAC,SAAS;YAC7C,GAAC,qBAAS,CAAC,iBAAiB,IAAG,IAAI,CAAC,YAAY;gBAClD,CAAC;;IACP,CAAC;IAQO,+BAAS,GAAjB,UAAkB,OAAgB,EAAE,UAAsB;QACtD,UAAU,CAAC,UAAU,GAAG,aAAW,CAAC,eAAe,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QAErE,EAAE,CAAC,CAAC,UAAU,YAAY,2BAAmB,CAAC,CAAC,CAAC;YAC5C,IAAM,SAAS,GAAyB,UAAU,CAAC;YACnD,EAAE,CAAC,CAAC,SAAS,CAAC,QAAQ,IAAI,SAAS,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;gBACtD,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,aAAW,CAAC,YAAY,CAAC,CAAC;gBAClD,SAAS,CAAC,MAAM,GAAG,aAAW,CAAC,mBAAmB,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;YAC3E,CAAC;QACL,CAAC;IACL,CAAC;IAOO,kCAAY,GAApB,UAAqB,OAAgB;QACjC,uBAAuB,SAA0B;YAC7C,SAAS,CAAC,MAAM,GAAG,aAAW,CAAC,mBAAmB,CAAC,SAAS,CAAC,iBAAiB,EAAE,CAAC,CAAC;YAElF,GAAG,CAAC,CAAC,IAAI,GAAG,IAAI,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC;gBACpC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,WAAW,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;oBAC7C,QAAQ,CAAC;gBACb,CAAC;gBACD,aAAa,CAAC,SAAS,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC;YAC9C,CAAC;QACL,CAAC;QAED,IAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;QAChC,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;YAClD,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,aAAW,CAAC,YAAY,CAAC,CAAC;YAChD,OAAO,CAAC,MAAM,GAAG,aAAW,CAAC,mBAAmB,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QACvE,CAAC;QAED,aAAa,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QACjC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,UAAC,IAAI;YACvB,IAAI,CAAC,MAAM,GAAG,aAAW,CAAC,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACpE,CAAC,CAAC,CAAC;IACP,CAAC;IAUM,+BAAmB,GAA1B,UAA2B,WAAyB;QAChD,IAAM,MAAM,GAAsB,EAAE,CAAC;QACrC,WAAW,CAAC,OAAO,CAAC,UAAC,KAAK;YACtB,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;gBACrC,IAAM,OAAK,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;gBACxB,EAAE,CAAC,CAAC,OAAK,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;oBAC5B,QAAQ,CAAC;gBACb,CAAC;gBAED,OAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBAC3B,MAAM,CAAC;YACX,CAAC;YAED,IAAM,KAAK,GAAG,IAAI,iCAAe,CAAC,aAAW,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;YACrF,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAC3B,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACvB,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,OAAO,CAAC,UAAC,KAAK;YACjB,IAAI,YAAY,GAAG,KAAK,EAAE,YAAY,GAAG,IAAI,EAAE,UAAU,GAAG,IAAI,EAAE,YAAY,GAAG,IAAI,EAAE,WAAW,GAAG,IAAI,CAAC;YAC1G,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAC,KAAK;gBACzB,YAAY,GAAG,KAAK,CAAC,KAAK,CAAC,UAAU,IAAI,YAAY,CAAC;gBACtD,UAAU,GAAK,KAAK,CAAC,KAAK,CAAC,SAAS,IAAK,UAAU,CAAC;gBACpD,YAAY,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,IAAI,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,YAAY,CAAC;gBAClF,WAAW,GAAI,KAAK,CAAC,KAAK,CAAC,UAAU,IAAI,WAAW,CAAC;gBAErD,EAAE,CAAC,CAAC,KAAK,YAAY,6BAAqB,CAAC,CAAC,CAAC;oBACzC,YAAY,GAAG,KAAK,CAAC,aAAa,IAAI,YAAY,CAAC;gBACvD,CAAC;gBAAC,IAAI,CAAC,CAAC;oBACJ,YAAY,GAAG,KAAK,CAAC;gBACzB,CAAC;YACL,CAAC,CAAC,CAAC;YAEH,KAAK,CAAC,uBAAuB,GAAG,YAAY,CAAC;YAC7C,KAAK,CAAC,uBAAuB,GAAG,YAAY,CAAC;YAC7C,KAAK,CAAC,qBAAqB,GAAK,UAAU,CAAC;YAC3C,KAAK,CAAC,gCAAgC,GAAG,YAAY,CAAC;YACtD,KAAK,CAAC,sBAAsB,GAAI,WAAW,CAAC;QAChD,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IAQc,yBAAa,GAA5B,UAA6B,IAAoB;QAC7C,IAAI,GAAG,GAAG,sBAAc,CAAC,IAAI,CAAC,CAAC;QAC/B,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,aAAa,EAAE,UAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAK,OAAA,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,WAAW,EAAE,EAAzB,CAAyB,CAAC,CAAC;QACzE,MAAM,CAAC,GAAG,CAAC;IACf,CAAC;IAQM,2BAAe,GAAtB,UAAuB,IAAoB;QACvC,EAAE,CAAC,CAAC,aAAW,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAC9B,MAAM,CAAC,aAAW,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QACvC,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,MAAM,CAAC,aAAW,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;QAC3C,CAAC;IACL,CAAC;IAQM,yBAAa,GAApB,UAAqB,IAAoB;QACrC,EAAE,CAAC,CAAC,aAAW,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAC5B,MAAM,CAAC,aAAW,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACrC,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC;QAC1C,CAAC;IACL,CAAC;IASM,wBAAY,GAAnB,UAAoB,CAAa,EAAE,CAAa;QAC5C,IAAM,OAAO,GAAG,aAAW,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;QACpD,IAAM,OAAO,GAAG,aAAW,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;QACpD,EAAE,CAAC,CAAC,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC;YACtB,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC;gBACxC,MAAM,CAAC,CAAC,CAAC;YACb,CAAC;YACD,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,IAAI,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC;gBACxC,MAAM,CAAC,CAAC,CAAC,CAAC;YACd,CAAC;YACD,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;gBACpB,MAAM,CAAC,CAAC,CAAC;YACb,CAAC;YACD,MAAM,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;QACpC,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC;QAC7B,CAAC;IACL,CAAC;IACL,kBAAC;AAAD,CAAC,AArOD,CAAiC,+BAAkB,GAqOlD;AAjOU,mBAAO,GAAG;IACb,sBAAc,CAAC,MAAM;IACrB,sBAAc,CAAC,cAAc;IAC7B,sBAAc,CAAC,MAAM;IACrB,sBAAc,CAAC,IAAI;IACnB,sBAAc,CAAC,UAAU;IACzB,sBAAc,CAAC,KAAK;IACpB,sBAAc,CAAC,SAAS;IACxB,sBAAc,CAAC,SAAS;IAExB,sBAAc,CAAC,WAAW;IAC1B,sBAAc,CAAC,KAAK;IACpB,sBAAc,CAAC,QAAQ;IACvB,sBAAc,CAAC,QAAQ;IACvB,sBAAc,CAAC,QAAQ;IACvB,sBAAc,CAAC,QAAQ;IACvB,sBAAc,CAAC,MAAM;IACrB,sBAAc,CAAC,aAAa;IAE5B,sBAAc,CAAC,SAAS;IACxB,sBAAc,CAAC,aAAa;IAC5B,sBAAc,CAAC,WAAW;IAC1B,sBAAc,CAAC,aAAa;IAC5B,sBAAc,CAAC,oBAAoB;IACnC,sBAAc,CAAC,cAAc;IAC7B,sBAAc,CAAC,YAAY;IAC3B,sBAAc,CAAC,YAAY;CAC9B,CAAC;AAKK,qBAAS,GAAG,CAAC;IAChB,IAAM,SAAS,GAAG,EAAE,CAAC;IACrB,SAAS,CAAC,sBAAc,CAAC,IAAI,CAAC,GAAS,aAAa,CAAC;IACrD,SAAS,CAAC,sBAAc,CAAC,UAAU,CAAC,GAAG,oBAAoB,CAAC;IAC5D,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC,CAAC,EAAE,CAAC;AAKE,mBAAO,GAAG,CAAC;IACd,IAAM,OAAO,GAAG,EAAE,CAAC;IACnB,OAAO,CAAC,sBAAc,CAAC,KAAK,CAAC,GAAQ,SAAS,CAAC;IAC/C,OAAO,CAAC,sBAAc,CAAC,QAAQ,CAAC,GAAK,YAAY,CAAC;IAClD,OAAO,CAAC,sBAAc,CAAC,IAAI,CAAC,GAAS,cAAc,CAAC;IACpD,OAAO,CAAC,sBAAc,CAAC,UAAU,CAAC,GAAG,qBAAqB,CAAC;IAC3D,OAAO,CAAC,sBAAc,CAAC,SAAS,CAAC,GAAI,cAAc,CAAC;IACpD,MAAM,CAAC,OAAO,CAAC;AACnB,CAAC,CAAC,EAAE,CAAC;AAtDI,WAAW;IADvB,sBAAS,CAAC,EAAC,IAAI,EAAE,OAAO,EAAC,CAAC;GACd,WAAW,CAqOvB;AArOY,kCAAW","sourcesContent":["import {Reflection, ReflectionKind, ContainerReflection, DeclarationReflection} from '../../models/reflections/index';\nimport {ReflectionGroup} from '../../models/ReflectionGroup';\nimport {SourceDirectory} from '../../models/sources/directory';\nimport {Component, ConverterComponent} from '../components';\nimport {Converter} from '../converter';\nimport {Context} from '../context';\n\n/**\n * A handler that sorts and groups the found reflections in the resolving phase.\n *\n * The handler sets the ´groups´ property of all reflections.\n */\n@Component({name: 'group'})\nexport class GroupPlugin extends ConverterComponent {\n /**\n * Define the sort order of reflections.\n */\n static WEIGHTS = [\n ReflectionKind.Global,\n ReflectionKind.ExternalModule,\n ReflectionKind.Module,\n ReflectionKind.Enum,\n ReflectionKind.EnumMember,\n ReflectionKind.Class,\n ReflectionKind.Interface,\n ReflectionKind.TypeAlias,\n\n ReflectionKind.Constructor,\n ReflectionKind.Event,\n ReflectionKind.Property,\n ReflectionKind.Variable,\n ReflectionKind.Function,\n ReflectionKind.Accessor,\n ReflectionKind.Method,\n ReflectionKind.ObjectLiteral,\n\n ReflectionKind.Parameter,\n ReflectionKind.TypeParameter,\n ReflectionKind.TypeLiteral,\n ReflectionKind.CallSignature,\n ReflectionKind.ConstructorSignature,\n ReflectionKind.IndexSignature,\n ReflectionKind.GetSignature,\n ReflectionKind.SetSignature\n ];\n\n /**\n * Define the singular name of individual reflection kinds.\n */\n static SINGULARS = (function() {\n const singulars = {};\n singulars[ReflectionKind.Enum] = 'Enumeration';\n singulars[ReflectionKind.EnumMember] = 'Enumeration member';\n return singulars;\n })();\n\n /**\n * Define the plural name of individual reflection kinds.\n */\n static PLURALS = (function() {\n const plurals = {};\n plurals[ReflectionKind.Class] = 'Classes';\n plurals[ReflectionKind.Property] = 'Properties';\n plurals[ReflectionKind.Enum] = 'Enumerations';\n plurals[ReflectionKind.EnumMember] = 'Enumeration members';\n plurals[ReflectionKind.TypeAlias] = 'Type aliases';\n return plurals;\n })();\n\n /**\n * Create a new GroupPlugin instance.\n */\n initialize() {\n this.listenTo(this.owner, {\n [Converter.EVENT_RESOLVE]: this.onResolve,\n [Converter.EVENT_RESOLVE_END]: this.onEndResolve\n });\n }\n\n /**\n * Triggered when the converter resolves a reflection.\n *\n * @param context The context object describing the current state the converter is in.\n * @param reflection The reflection that is currently resolved.\n */\n private onResolve(context: Context, reflection: Reflection) {\n reflection.kindString = GroupPlugin.getKindSingular(reflection.kind);\n\n if (reflection instanceof ContainerReflection) {\n const container = <ContainerReflection> reflection;\n if (container.children && container.children.length > 0) {\n container.children.sort(GroupPlugin.sortCallback);\n container.groups = GroupPlugin.getReflectionGroups(container.children);\n }\n }\n }\n\n /**\n * Triggered when the converter has finished resolving a project.\n *\n * @param context The context object describing the current state the converter is in.\n */\n private onEndResolve(context: Context) {\n function walkDirectory(directory: SourceDirectory) {\n directory.groups = GroupPlugin.getReflectionGroups(directory.getAllReflections());\n\n for (let key in directory.directories) {\n if (!directory.directories.hasOwnProperty(key)) {\n continue;\n }\n walkDirectory(directory.directories[key]);\n }\n }\n\n const project = context.project;\n if (project.children && project.children.length > 0) {\n project.children.sort(GroupPlugin.sortCallback);\n project.groups = GroupPlugin.getReflectionGroups(project.children);\n }\n\n walkDirectory(project.directory);\n project.files.forEach((file) => {\n file.groups = GroupPlugin.getReflectionGroups(file.reflections);\n });\n }\n\n /**\n * Create a grouped representation of the given list of reflections.\n *\n * Reflections are grouped by kind and sorted by weight and name.\n *\n * @param reflections The reflections that should be grouped.\n * @returns An array containing all children of the given reflection grouped by their kind.\n */\n static getReflectionGroups(reflections: Reflection[]): ReflectionGroup[] {\n const groups: ReflectionGroup[] = [];\n reflections.forEach((child) => {\n for (let i = 0; i < groups.length; i++) {\n const group = groups[i];\n if (group.kind !== child.kind) {\n continue;\n }\n\n group.children.push(child);\n return;\n }\n\n const group = new ReflectionGroup(GroupPlugin.getKindPlural(child.kind), child.kind);\n group.children.push(child);\n groups.push(group);\n });\n\n groups.forEach((group) => {\n let someExported = false, allInherited = true, allPrivate = true, allProtected = true, allExternal = true;\n group.children.forEach((child) => {\n someExported = child.flags.isExported || someExported;\n allPrivate = child.flags.isPrivate && allPrivate;\n allProtected = (child.flags.isPrivate || child.flags.isProtected) && allProtected;\n allExternal = child.flags.isExternal && allExternal;\n\n if (child instanceof DeclarationReflection) {\n allInherited = child.inheritedFrom && allInherited;\n } else {\n allInherited = false;\n }\n });\n\n group.someChildrenAreExported = someExported;\n group.allChildrenAreInherited = allInherited;\n group.allChildrenArePrivate = allPrivate;\n group.allChildrenAreProtectedOrPrivate = allProtected;\n group.allChildrenAreExternal = allExternal;\n });\n\n return groups;\n }\n\n /**\n * Transform the internal typescript kind identifier into a human readable version.\n *\n * @param kind The original typescript kind identifier.\n * @returns A human readable version of the given typescript kind identifier.\n */\n private static getKindString(kind: ReflectionKind): string {\n let str = ReflectionKind[kind];\n str = str.replace(/(.)([A-Z])/g, (m, a, b) => a + ' ' + b.toLowerCase());\n return str;\n }\n\n /**\n * Return the singular name of a internal typescript kind identifier.\n *\n * @param kind The original internal typescript kind identifier.\n * @returns The singular name of the given internal typescript kind identifier\n */\n static getKindSingular(kind: ReflectionKind): string {\n if (GroupPlugin.SINGULARS[kind]) {\n return GroupPlugin.SINGULARS[kind];\n } else {\n return GroupPlugin.getKindString(kind);\n }\n }\n\n /**\n * Return the plural name of a internal typescript kind identifier.\n *\n * @param kind The original internal typescript kind identifier.\n * @returns The plural name of the given internal typescript kind identifier\n */\n static getKindPlural(kind: ReflectionKind): string {\n if (GroupPlugin.PLURALS[kind]) {\n return GroupPlugin.PLURALS[kind];\n } else {\n return this.getKindString(kind) + 's';\n }\n }\n\n /**\n * Callback used to sort reflections by weight defined by ´GroupPlugin.WEIGHTS´ and name.\n *\n * @param a The left reflection to sort.\n * @param b The right reflection to sort.\n * @returns The sorting weight.\n */\n static sortCallback(a: Reflection, b: Reflection): number {\n const aWeight = GroupPlugin.WEIGHTS.indexOf(a.kind);\n const bWeight = GroupPlugin.WEIGHTS.indexOf(b.kind);\n if (aWeight === bWeight) {\n if (a.flags.isStatic && !b.flags.isStatic) {\n return 1;\n }\n if (!a.flags.isStatic && b.flags.isStatic) {\n return -1;\n }\n if (a.name === b.name) {\n return 0;\n }\n return a.name > b.name ? 1 : -1;\n } else {\n return aWeight - bWeight;\n }\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"GroupPlugin.js","sourceRoot":"","sources":["../../../../src/lib/converter/plugins/GroupPlugin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,wDAAwH;AACxH,gEAA+D;AAE/D,4CAA8D;AAC9D,0CAAyC;AASzC;IAAiC,+BAAkB;IAAnD;;IAqOA,CAAC;oBArOY,WAAW;IA2DpB,gCAAU,GAAV;QACI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK;YACpB,GAAC,qBAAS,CAAC,aAAa,IAAO,IAAI,CAAC,SAAS;YAC7C,GAAC,qBAAS,CAAC,iBAAiB,IAAG,IAAI,CAAC,YAAY;gBAClD,CAAC;;IACP,CAAC;IAQO,+BAAS,GAAjB,UAAkB,OAAgB,EAAE,UAAsB;QACtD,UAAU,CAAC,UAAU,GAAG,aAAW,CAAC,eAAe,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QAErE,EAAE,CAAC,CAAC,UAAU,YAAY,2BAAmB,CAAC,CAAC,CAAC;YAC5C,IAAM,SAAS,GAAyB,UAAU,CAAC;YACnD,EAAE,CAAC,CAAC,SAAS,CAAC,QAAQ,IAAI,SAAS,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;gBACtD,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,aAAW,CAAC,YAAY,CAAC,CAAC;gBAClD,SAAS,CAAC,MAAM,GAAG,aAAW,CAAC,mBAAmB,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;YAC3E,CAAC;QACL,CAAC;IACL,CAAC;IAOO,kCAAY,GAApB,UAAqB,OAAgB;QACjC,uBAAuB,SAA0B;YAC7C,SAAS,CAAC,MAAM,GAAG,aAAW,CAAC,mBAAmB,CAAC,SAAS,CAAC,iBAAiB,EAAE,CAAC,CAAC;YAElF,GAAG,CAAC,CAAC,IAAI,GAAG,IAAI,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC;gBACpC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,WAAW,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;oBAC7C,QAAQ,CAAC;gBACb,CAAC;gBACD,aAAa,CAAC,SAAS,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC;YAC9C,CAAC;QACL,CAAC;QAED,IAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;QAChC,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;YAClD,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,aAAW,CAAC,YAAY,CAAC,CAAC;YAChD,OAAO,CAAC,MAAM,GAAG,aAAW,CAAC,mBAAmB,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QACvE,CAAC;QAED,aAAa,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QACjC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,UAAC,IAAI;YACvB,IAAI,CAAC,MAAM,GAAG,aAAW,CAAC,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACpE,CAAC,CAAC,CAAC;IACP,CAAC;IAUM,+BAAmB,GAA1B,UAA2B,WAAyB;QAChD,IAAM,MAAM,GAAsB,EAAE,CAAC;QACrC,WAAW,CAAC,OAAO,CAAC,UAAC,KAAK;YACtB,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;gBACrC,IAAM,OAAK,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;gBACxB,EAAE,CAAC,CAAC,OAAK,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;oBAC5B,QAAQ,CAAC;gBACb,CAAC;gBAED,OAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBAC3B,MAAM,CAAC;YACX,CAAC;YAED,IAAM,KAAK,GAAG,IAAI,iCAAe,CAAC,aAAW,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;YACrF,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAC3B,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACvB,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,OAAO,CAAC,UAAC,KAAK;YACjB,IAAI,YAAY,GAAG,KAAK,EAAE,YAAY,GAAG,IAAI,EAAE,UAAU,GAAG,IAAI,EAAE,YAAY,GAAG,IAAI,EAAE,WAAW,GAAG,IAAI,CAAC;YAC1G,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAC,KAAK;gBACzB,YAAY,GAAG,KAAK,CAAC,KAAK,CAAC,UAAU,IAAI,YAAY,CAAC;gBACtD,UAAU,GAAK,KAAK,CAAC,KAAK,CAAC,SAAS,IAAK,UAAU,CAAC;gBACpD,YAAY,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,IAAI,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,YAAY,CAAC;gBAClF,WAAW,GAAI,KAAK,CAAC,KAAK,CAAC,UAAU,IAAI,WAAW,CAAC;gBAErD,EAAE,CAAC,CAAC,KAAK,YAAY,6BAAqB,CAAC,CAAC,CAAC;oBACzC,YAAY,GAAG,KAAK,CAAC,aAAa,IAAI,YAAY,CAAC;gBACvD,CAAC;gBAAC,IAAI,CAAC,CAAC;oBACJ,YAAY,GAAG,KAAK,CAAC;gBACzB,CAAC;YACL,CAAC,CAAC,CAAC;YAEH,KAAK,CAAC,uBAAuB,GAAG,YAAY,CAAC;YAC7C,KAAK,CAAC,uBAAuB,GAAG,YAAY,CAAC;YAC7C,KAAK,CAAC,qBAAqB,GAAK,UAAU,CAAC;YAC3C,KAAK,CAAC,gCAAgC,GAAG,YAAY,CAAC;YACtD,KAAK,CAAC,sBAAsB,GAAI,WAAW,CAAC;QAChD,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IAQc,yBAAa,GAA5B,UAA6B,IAAoB;QAC7C,IAAI,GAAG,GAAG,sBAAc,CAAC,IAAI,CAAC,CAAC;QAC/B,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,aAAa,EAAE,UAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAK,OAAA,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,WAAW,EAAE,EAAzB,CAAyB,CAAC,CAAC;QACzE,MAAM,CAAC,GAAG,CAAC;IACf,CAAC;IAQM,2BAAe,GAAtB,UAAuB,IAAoB;QACvC,EAAE,CAAC,CAAC,aAAW,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAC9B,MAAM,CAAC,aAAW,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QACvC,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,MAAM,CAAC,aAAW,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;QAC3C,CAAC;IACL,CAAC;IAQM,yBAAa,GAApB,UAAqB,IAAoB;QACrC,EAAE,CAAC,CAAC,aAAW,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAC5B,MAAM,CAAC,aAAW,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACrC,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC;QAC1C,CAAC;IACL,CAAC;IASM,wBAAY,GAAnB,UAAoB,CAAa,EAAE,CAAa;QAC5C,IAAM,OAAO,GAAG,aAAW,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;QACpD,IAAM,OAAO,GAAG,aAAW,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;QACpD,EAAE,CAAC,CAAC,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC;YACtB,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC;gBACxC,MAAM,CAAC,CAAC,CAAC;YACb,CAAC;YACD,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,IAAI,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC;gBACxC,MAAM,CAAC,CAAC,CAAC,CAAC;YACd,CAAC;YACD,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;gBACpB,MAAM,CAAC,CAAC,CAAC;YACb,CAAC;YACD,MAAM,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;QACpC,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC;QAC7B,CAAC;IACL,CAAC;IAhOM,mBAAO,GAAG;QACb,sBAAc,CAAC,MAAM;QACrB,sBAAc,CAAC,cAAc;QAC7B,sBAAc,CAAC,MAAM;QACrB,sBAAc,CAAC,IAAI;QACnB,sBAAc,CAAC,UAAU;QACzB,sBAAc,CAAC,KAAK;QACpB,sBAAc,CAAC,SAAS;QACxB,sBAAc,CAAC,SAAS;QAExB,sBAAc,CAAC,WAAW;QAC1B,sBAAc,CAAC,KAAK;QACpB,sBAAc,CAAC,QAAQ;QACvB,sBAAc,CAAC,QAAQ;QACvB,sBAAc,CAAC,QAAQ;QACvB,sBAAc,CAAC,QAAQ;QACvB,sBAAc,CAAC,MAAM;QACrB,sBAAc,CAAC,aAAa;QAE5B,sBAAc,CAAC,SAAS;QACxB,sBAAc,CAAC,aAAa;QAC5B,sBAAc,CAAC,WAAW;QAC1B,sBAAc,CAAC,aAAa;QAC5B,sBAAc,CAAC,oBAAoB;QACnC,sBAAc,CAAC,cAAc;QAC7B,sBAAc,CAAC,YAAY;QAC3B,sBAAc,CAAC,YAAY;KAC9B,CAAC;IAKK,qBAAS,GAAG,CAAC;QAChB,IAAM,SAAS,GAAG,EAAE,CAAC;QACrB,SAAS,CAAC,sBAAc,CAAC,IAAI,CAAC,GAAS,aAAa,CAAC;QACrD,SAAS,CAAC,sBAAc,CAAC,UAAU,CAAC,GAAG,oBAAoB,CAAC;QAC5D,MAAM,CAAC,SAAS,CAAC;IACrB,CAAC,CAAC,EAAE,CAAC;IAKE,mBAAO,GAAG,CAAC;QACd,IAAM,OAAO,GAAG,EAAE,CAAC;QACnB,OAAO,CAAC,sBAAc,CAAC,KAAK,CAAC,GAAQ,SAAS,CAAC;QAC/C,OAAO,CAAC,sBAAc,CAAC,QAAQ,CAAC,GAAK,YAAY,CAAC;QAClD,OAAO,CAAC,sBAAc,CAAC,IAAI,CAAC,GAAS,cAAc,CAAC;QACpD,OAAO,CAAC,sBAAc,CAAC,UAAU,CAAC,GAAG,qBAAqB,CAAC;QAC3D,OAAO,CAAC,sBAAc,CAAC,SAAS,CAAC,GAAI,cAAc,CAAC;QACpD,MAAM,CAAC,OAAO,CAAC;IACnB,CAAC,CAAC,EAAE,CAAC;IAtDI,WAAW;QADvB,sBAAS,CAAC,EAAC,IAAI,EAAE,OAAO,EAAC,CAAC;OACd,WAAW,CAqOvB;IAAD,kBAAC;;CAAA,AArOD,CAAiC,+BAAkB,GAqOlD;AArOY,kCAAW","sourcesContent":["import { Reflection, ReflectionKind, ContainerReflection, DeclarationReflection } from '../../models/reflections/index';\nimport { ReflectionGroup } from '../../models/ReflectionGroup';\nimport { SourceDirectory } from '../../models/sources/directory';\nimport { Component, ConverterComponent } from '../components';\nimport { Converter } from '../converter';\nimport { Context } from '../context';\n\n/**\n * A handler that sorts and groups the found reflections in the resolving phase.\n *\n * The handler sets the ´groups´ property of all reflections.\n */\n@Component({name: 'group'})\nexport class GroupPlugin extends ConverterComponent {\n /**\n * Define the sort order of reflections.\n */\n static WEIGHTS = [\n ReflectionKind.Global,\n ReflectionKind.ExternalModule,\n ReflectionKind.Module,\n ReflectionKind.Enum,\n ReflectionKind.EnumMember,\n ReflectionKind.Class,\n ReflectionKind.Interface,\n ReflectionKind.TypeAlias,\n\n ReflectionKind.Constructor,\n ReflectionKind.Event,\n ReflectionKind.Property,\n ReflectionKind.Variable,\n ReflectionKind.Function,\n ReflectionKind.Accessor,\n ReflectionKind.Method,\n ReflectionKind.ObjectLiteral,\n\n ReflectionKind.Parameter,\n ReflectionKind.TypeParameter,\n ReflectionKind.TypeLiteral,\n ReflectionKind.CallSignature,\n ReflectionKind.ConstructorSignature,\n ReflectionKind.IndexSignature,\n ReflectionKind.GetSignature,\n ReflectionKind.SetSignature\n ];\n\n /**\n * Define the singular name of individual reflection kinds.\n */\n static SINGULARS = (function() {\n const singulars = {};\n singulars[ReflectionKind.Enum] = 'Enumeration';\n singulars[ReflectionKind.EnumMember] = 'Enumeration member';\n return singulars;\n })();\n\n /**\n * Define the plural name of individual reflection kinds.\n */\n static PLURALS = (function() {\n const plurals = {};\n plurals[ReflectionKind.Class] = 'Classes';\n plurals[ReflectionKind.Property] = 'Properties';\n plurals[ReflectionKind.Enum] = 'Enumerations';\n plurals[ReflectionKind.EnumMember] = 'Enumeration members';\n plurals[ReflectionKind.TypeAlias] = 'Type aliases';\n return plurals;\n })();\n\n /**\n * Create a new GroupPlugin instance.\n */\n initialize() {\n this.listenTo(this.owner, {\n [Converter.EVENT_RESOLVE]: this.onResolve,\n [Converter.EVENT_RESOLVE_END]: this.onEndResolve\n });\n }\n\n /**\n * Triggered when the converter resolves a reflection.\n *\n * @param context The context object describing the current state the converter is in.\n * @param reflection The reflection that is currently resolved.\n */\n private onResolve(context: Context, reflection: Reflection) {\n reflection.kindString = GroupPlugin.getKindSingular(reflection.kind);\n\n if (reflection instanceof ContainerReflection) {\n const container = <ContainerReflection> reflection;\n if (container.children && container.children.length > 0) {\n container.children.sort(GroupPlugin.sortCallback);\n container.groups = GroupPlugin.getReflectionGroups(container.children);\n }\n }\n }\n\n /**\n * Triggered when the converter has finished resolving a project.\n *\n * @param context The context object describing the current state the converter is in.\n */\n private onEndResolve(context: Context) {\n function walkDirectory(directory: SourceDirectory) {\n directory.groups = GroupPlugin.getReflectionGroups(directory.getAllReflections());\n\n for (let key in directory.directories) {\n if (!directory.directories.hasOwnProperty(key)) {\n continue;\n }\n walkDirectory(directory.directories[key]);\n }\n }\n\n const project = context.project;\n if (project.children && project.children.length > 0) {\n project.children.sort(GroupPlugin.sortCallback);\n project.groups = GroupPlugin.getReflectionGroups(project.children);\n }\n\n walkDirectory(project.directory);\n project.files.forEach((file) => {\n file.groups = GroupPlugin.getReflectionGroups(file.reflections);\n });\n }\n\n /**\n * Create a grouped representation of the given list of reflections.\n *\n * Reflections are grouped by kind and sorted by weight and name.\n *\n * @param reflections The reflections that should be grouped.\n * @returns An array containing all children of the given reflection grouped by their kind.\n */\n static getReflectionGroups(reflections: Reflection[]): ReflectionGroup[] {\n const groups: ReflectionGroup[] = [];\n reflections.forEach((child) => {\n for (let i = 0; i < groups.length; i++) {\n const group = groups[i];\n if (group.kind !== child.kind) {\n continue;\n }\n\n group.children.push(child);\n return;\n }\n\n const group = new ReflectionGroup(GroupPlugin.getKindPlural(child.kind), child.kind);\n group.children.push(child);\n groups.push(group);\n });\n\n groups.forEach((group) => {\n let someExported = false, allInherited = true, allPrivate = true, allProtected = true, allExternal = true;\n group.children.forEach((child) => {\n someExported = child.flags.isExported || someExported;\n allPrivate = child.flags.isPrivate && allPrivate;\n allProtected = (child.flags.isPrivate || child.flags.isProtected) && allProtected;\n allExternal = child.flags.isExternal && allExternal;\n\n if (child instanceof DeclarationReflection) {\n allInherited = child.inheritedFrom && allInherited;\n } else {\n allInherited = false;\n }\n });\n\n group.someChildrenAreExported = someExported;\n group.allChildrenAreInherited = allInherited;\n group.allChildrenArePrivate = allPrivate;\n group.allChildrenAreProtectedOrPrivate = allProtected;\n group.allChildrenAreExternal = allExternal;\n });\n\n return groups;\n }\n\n /**\n * Transform the internal typescript kind identifier into a human readable version.\n *\n * @param kind The original typescript kind identifier.\n * @returns A human readable version of the given typescript kind identifier.\n */\n private static getKindString(kind: ReflectionKind): string {\n let str = ReflectionKind[kind];\n str = str.replace(/(.)([A-Z])/g, (m, a, b) => a + ' ' + b.toLowerCase());\n return str;\n }\n\n /**\n * Return the singular name of a internal typescript kind identifier.\n *\n * @param kind The original internal typescript kind identifier.\n * @returns The singular name of the given internal typescript kind identifier\n */\n static getKindSingular(kind: ReflectionKind): string {\n if (GroupPlugin.SINGULARS[kind]) {\n return GroupPlugin.SINGULARS[kind];\n } else {\n return GroupPlugin.getKindString(kind);\n }\n }\n\n /**\n * Return the plural name of a internal typescript kind identifier.\n *\n * @param kind The original internal typescript kind identifier.\n * @returns The plural name of the given internal typescript kind identifier\n */\n static getKindPlural(kind: ReflectionKind): string {\n if (GroupPlugin.PLURALS[kind]) {\n return GroupPlugin.PLURALS[kind];\n } else {\n return this.getKindString(kind) + 's';\n }\n }\n\n /**\n * Callback used to sort reflections by weight defined by ´GroupPlugin.WEIGHTS´ and name.\n *\n * @param a The left reflection to sort.\n * @param b The right reflection to sort.\n * @returns The sorting weight.\n */\n static sortCallback(a: Reflection, b: Reflection): number {\n const aWeight = GroupPlugin.WEIGHTS.indexOf(a.kind);\n const bWeight = GroupPlugin.WEIGHTS.indexOf(b.kind);\n if (aWeight === bWeight) {\n if (a.flags.isStatic && !b.flags.isStatic) {\n return 1;\n }\n if (!a.flags.isStatic && b.flags.isStatic) {\n return -1;\n }\n if (a.name === b.name) {\n return 0;\n }\n return a.name > b.name ? 1 : -1;\n } else {\n return aWeight - bWeight;\n }\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/plugins/ImplementsPlugin.js b/node_modules/typedoc/dist/lib/converter/plugins/ImplementsPlugin.js
index 9b290d7e3..0802bd63c 100644
--- a/node_modules/typedoc/dist/lib/converter/plugins/ImplementsPlugin.js
+++ b/node_modules/typedoc/dist/lib/converter/plugins/ImplementsPlugin.js
@@ -98,10 +98,10 @@ var ImplementsPlugin = (function (_super) {
});
}
};
+ ImplementsPlugin = __decorate([
+ components_1.Component({ name: 'implements' })
+ ], ImplementsPlugin);
return ImplementsPlugin;
}(components_1.ConverterComponent));
-ImplementsPlugin = __decorate([
- components_1.Component({ name: 'implements' })
-], ImplementsPlugin);
exports.ImplementsPlugin = ImplementsPlugin;
//# sourceMappingURL=ImplementsPlugin.js.map \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/plugins/ImplementsPlugin.js.map b/node_modules/typedoc/dist/lib/converter/plugins/ImplementsPlugin.js.map
index 67cbef9cd..6b2b30636 100644
--- a/node_modules/typedoc/dist/lib/converter/plugins/ImplementsPlugin.js.map
+++ b/node_modules/typedoc/dist/lib/converter/plugins/ImplementsPlugin.js.map
@@ -1 +1 @@
-{"version":3,"file":"ImplementsPlugin.js","sourceRoot":"","sources":["../../../../src/lib/converter/plugins/ImplementsPlugin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,wDAAsH;AACtH,kDAA6D;AAC7D,4CAA4D;AAC5D,0CAAuC;AAQvC,IAAa,gBAAgB;IAAS,oCAAkB;IAAxD;;IA2GA,CAAC;IAvGG,qCAAU,GAAV;QACI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,qBAAS,CAAC,aAAa,EAAE,IAAI,CAAC,SAAS,EAAE,CAAC,EAAE,CAAC,CAAC;IAC5E,CAAC;IASO,uCAAY,GAApB,UAAqB,OAAgB,EAAE,eAAsC,EAAE,mBAA0C;QAAzH,iBAiDC;QAhDG,EAAE,CAAC,CAAC,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAC,CAAC;YAChC,MAAM,CAAC;QACX,CAAC;QAED,mBAAmB,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAC,eAAsC;YACxE,EAAE,CAAC,CAAC,CAAC,CAAC,eAAe,YAAY,6BAAqB,CAAC,CAAC,CAAC,CAAC;gBACtD,MAAM,CAAC;YACX,CAAC;YAED,IAAI,WAAkC,CAAC;YAEvC,EAAE,CAAC,CAAC,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC,CAAC;gBAC5B,MAAM,CAAC;YACX,CAAC;YAED,GAAG,CAAC,CAAC,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,eAAe,CAAC,QAAQ,CAAC,MAAM,EAAE,KAAK,GAAG,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC;gBAClF,IAAM,KAAK,GAAG,eAAe,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;gBAC9C,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI,KAAK,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC;oBACtC,QAAQ,CAAC;gBACb,CAAC;gBACD,EAAE,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,KAAK,eAAe,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC;oBAC1D,QAAQ,CAAC;gBACb,CAAC;gBAED,WAAW,GAAG,KAAK,CAAC;gBACpB,KAAK,CAAC;YACV,CAAC;YAED,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC;gBACf,MAAM,CAAC;YACX,CAAC;YAED,IAAM,mBAAmB,GAAG,mBAAmB,CAAC,IAAI,GAAG,GAAG,GAAG,eAAe,CAAC,IAAI,CAAC;YAClF,WAAW,CAAC,gBAAgB,GAAG,IAAI,qBAAa,CAAC,mBAAmB,EAAE,qBAAa,CAAC,kBAAkB,EAAE,eAAe,CAAC,CAAC;YACzH,KAAI,CAAC,WAAW,CAAC,WAAW,EAAE,eAAe,CAAC,CAAC;YAE/C,EAAE,CAAC,CAAC,eAAe,CAAC,MAAM,CAAC,sBAAc,CAAC,gBAAgB,CAAC,IAAI,eAAe,CAAC,UAAU,IAAI,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC;gBAClH,eAAe,CAAC,UAAU,CAAC,OAAO,CAAC,UAAC,kBAAuC;oBACvE,IAAM,mBAAmB,GAAG,kBAAkB,CAAC,iBAAiB,EAAE,CAAC;oBACnE,WAAW,CAAC,UAAU,CAAC,OAAO,CAAC,UAAC,cAAmC;wBAC/D,EAAE,CAAC,CAAC,YAAI,CAAC,eAAe,CAAC,mBAAmB,EAAE,cAAc,CAAC,iBAAiB,EAAE,CAAC,CAAC,CAAC,CAAC;4BAChF,cAAc,CAAC,gBAAgB,GAAG,IAAI,qBAAa,CAAC,mBAAmB,EAAE,qBAAa,CAAC,kBAAkB,EAAE,kBAAkB,CAAC,CAAC;4BAC/H,KAAI,CAAC,WAAW,CAAC,cAAc,EAAE,kBAAkB,CAAC,CAAC;wBACzD,CAAC;oBACL,CAAC,CAAC,CAAC;gBACP,CAAC,CAAC,CAAC;YACP,CAAC;QACL,CAAC,CAAC,CAAC;IACP,CAAC;IAQO,sCAAW,GAAnB,UAAoB,MAAkB,EAAE,MAAkB;QACtD,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;YAC1E,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;YAExC,EAAE,CAAC,CAAC,MAAM,YAAY,2BAAmB,IAAI,MAAM,CAAC,UAAU;gBAC1D,MAAM,YAAY,2BAAmB,IAAI,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC;gBAC7D,GAAG,CAAC,CAAC,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,KAAK,GAAG,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC;oBAC3E,EAAE,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;wBACnC,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC;oBAChF,CAAC;gBACL,CAAC;YACL,CAAC;QACL,CAAC;IACL,CAAC;IAQO,oCAAS,GAAjB,UAAkB,OAAgB,EAAE,UAAiC;QAArE,iBAaC;QAZG,EAAE,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,sBAAc,CAAC,KAAK,CAAC,IAAI,UAAU,CAAC,gBAAgB,CAAC,CAAC,CAAC;YACzE,UAAU,CAAC,gBAAgB,CAAC,OAAO,CAAC,UAAC,IAAU;gBAC3C,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,YAAY,qBAAa,CAAC,CAAC,CAAC,CAAC;oBACnC,MAAM,CAAC;gBACX,CAAC;gBAED,IAAM,MAAM,GAA4C,IAAK,CAAC,UAAU,CAAC;gBACzE,EAAE,CAAC,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,CAAC,sBAAc,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;oBACpD,KAAI,CAAC,YAAY,CAAC,OAAO,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC;gBACnD,CAAC;YACL,CAAC,CAAC,CAAC;QACP,CAAC;IACL,CAAC;IACL,uBAAC;AAAD,CAAC,AA3GD,CAAsC,+BAAkB,GA2GvD;AA3GY,gBAAgB;IAD5B,sBAAS,CAAC,EAAC,IAAI,EAAE,YAAY,EAAC,CAAC;GACnB,gBAAgB,CA2G5B;AA3GY,4CAAgB","sourcesContent":["import {Reflection, ReflectionKind, DeclarationReflection, SignatureReflection} from '../../models/reflections/index';\nimport {Type, ReferenceType} from '../../models/types/index';\nimport {Component, ConverterComponent} from '../components';\nimport {Converter} from '../converter';\nimport {Context} from '../context';\n\n/**\n * A plugin that detects interface implementations of functions and\n * properties on classes and links them.\n */\n@Component({name: 'implements'})\nexport class ImplementsPlugin extends ConverterComponent {\n /**\n * Create a new ImplementsPlugin instance.\n */\n initialize() {\n this.listenTo(this.owner, Converter.EVENT_RESOLVE, this.onResolve, -10);\n }\n\n /**\n * Mark all members of the given class to be the implementation of the matching interface member.\n *\n * @param context The context object describing the current state the converter is in.\n * @param classReflection The reflection of the classReflection class.\n * @param interfaceReflection The reflection of the interfaceReflection interface.\n */\n private analyzeClass(context: Context, classReflection: DeclarationReflection, interfaceReflection: DeclarationReflection) {\n if (!interfaceReflection.children) {\n return;\n }\n\n interfaceReflection.children.forEach((interfaceMember: DeclarationReflection) => {\n if (!(interfaceMember instanceof DeclarationReflection)) {\n return;\n }\n\n let classMember: DeclarationReflection;\n\n if (!classReflection.children) {\n return;\n }\n\n for (let index = 0, count = classReflection.children.length; index < count; index++) {\n const child = classReflection.children[index];\n if (child.name !== interfaceMember.name) {\n continue;\n }\n if (child.flags.isStatic !== interfaceMember.flags.isStatic) {\n continue;\n }\n\n classMember = child;\n break;\n }\n\n if (!classMember) {\n return;\n }\n\n const interfaceMemberName = interfaceReflection.name + '.' + interfaceMember.name;\n classMember.implementationOf = new ReferenceType(interfaceMemberName, ReferenceType.SYMBOL_ID_RESOLVED, interfaceMember);\n this.copyComment(classMember, interfaceMember);\n\n if (interfaceMember.kindOf(ReflectionKind.FunctionOrMethod) && interfaceMember.signatures && classMember.signatures) {\n interfaceMember.signatures.forEach((interfaceSignature: SignatureReflection) => {\n const interfaceParameters = interfaceSignature.getParameterTypes();\n classMember.signatures.forEach((classSignature: SignatureReflection) => {\n if (Type.isTypeListEqual(interfaceParameters, classSignature.getParameterTypes())) {\n classSignature.implementationOf = new ReferenceType(interfaceMemberName, ReferenceType.SYMBOL_ID_RESOLVED, interfaceSignature);\n this.copyComment(classSignature, interfaceSignature);\n }\n });\n });\n }\n });\n }\n\n /**\n * Copy the comment of the source reflection to the target reflection.\n *\n * @param target\n * @param source\n */\n private copyComment(target: Reflection, source: Reflection) {\n if (target.comment && source.comment && target.comment.hasTag('inheritdoc')) {\n target.comment.copyFrom(source.comment);\n\n if (target instanceof SignatureReflection && target.parameters &&\n source instanceof SignatureReflection && source.parameters) {\n for (let index = 0, count = target.parameters.length; index < count; index++) {\n if (target.parameters[index].comment) {\n target.parameters[index].comment.copyFrom(source.parameters[index].comment);\n }\n }\n }\n }\n }\n\n /**\n * Triggered when the converter resolves a reflection.\n *\n * @param context The context object describing the current state the converter is in.\n * @param reflection The reflection that is currently resolved.\n */\n private onResolve(context: Context, reflection: DeclarationReflection) {\n if (reflection.kindOf(ReflectionKind.Class) && reflection.implementedTypes) {\n reflection.implementedTypes.forEach((type: Type) => {\n if (!(type instanceof ReferenceType)) {\n return;\n }\n\n const source = <DeclarationReflection> (<ReferenceType> type).reflection;\n if (source && source.kindOf(ReflectionKind.Interface)) {\n this.analyzeClass(context, reflection, source);\n }\n });\n }\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"ImplementsPlugin.js","sourceRoot":"","sources":["../../../../src/lib/converter/plugins/ImplementsPlugin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,wDAAwH;AACxH,kDAA+D;AAC/D,4CAA8D;AAC9D,0CAAyC;AAQzC;IAAsC,oCAAkB;IAAxD;;IA2GA,CAAC;IAvGG,qCAAU,GAAV;QACI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,qBAAS,CAAC,aAAa,EAAE,IAAI,CAAC,SAAS,EAAE,CAAC,EAAE,CAAC,CAAC;IAC5E,CAAC;IASO,uCAAY,GAApB,UAAqB,OAAgB,EAAE,eAAsC,EAAE,mBAA0C;QAAzH,iBAiDC;QAhDG,EAAE,CAAC,CAAC,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAC,CAAC;YAChC,MAAM,CAAC;QACX,CAAC;QAED,mBAAmB,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAC,eAAsC;YACxE,EAAE,CAAC,CAAC,CAAC,CAAC,eAAe,YAAY,6BAAqB,CAAC,CAAC,CAAC,CAAC;gBACtD,MAAM,CAAC;YACX,CAAC;YAED,IAAI,WAAkC,CAAC;YAEvC,EAAE,CAAC,CAAC,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC,CAAC;gBAC5B,MAAM,CAAC;YACX,CAAC;YAED,GAAG,CAAC,CAAC,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,eAAe,CAAC,QAAQ,CAAC,MAAM,EAAE,KAAK,GAAG,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC;gBAClF,IAAM,KAAK,GAAG,eAAe,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;gBAC9C,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI,KAAK,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC;oBACtC,QAAQ,CAAC;gBACb,CAAC;gBACD,EAAE,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,KAAK,eAAe,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC;oBAC1D,QAAQ,CAAC;gBACb,CAAC;gBAED,WAAW,GAAG,KAAK,CAAC;gBACpB,KAAK,CAAC;YACV,CAAC;YAED,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC;gBACf,MAAM,CAAC;YACX,CAAC;YAED,IAAM,mBAAmB,GAAG,mBAAmB,CAAC,IAAI,GAAG,GAAG,GAAG,eAAe,CAAC,IAAI,CAAC;YAClF,WAAW,CAAC,gBAAgB,GAAG,IAAI,qBAAa,CAAC,mBAAmB,EAAE,qBAAa,CAAC,kBAAkB,EAAE,eAAe,CAAC,CAAC;YACzH,KAAI,CAAC,WAAW,CAAC,WAAW,EAAE,eAAe,CAAC,CAAC;YAE/C,EAAE,CAAC,CAAC,eAAe,CAAC,MAAM,CAAC,sBAAc,CAAC,gBAAgB,CAAC,IAAI,eAAe,CAAC,UAAU,IAAI,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC;gBAClH,eAAe,CAAC,UAAU,CAAC,OAAO,CAAC,UAAC,kBAAuC;oBACvE,IAAM,mBAAmB,GAAG,kBAAkB,CAAC,iBAAiB,EAAE,CAAC;oBACnE,WAAW,CAAC,UAAU,CAAC,OAAO,CAAC,UAAC,cAAmC;wBAC/D,EAAE,CAAC,CAAC,YAAI,CAAC,eAAe,CAAC,mBAAmB,EAAE,cAAc,CAAC,iBAAiB,EAAE,CAAC,CAAC,CAAC,CAAC;4BAChF,cAAc,CAAC,gBAAgB,GAAG,IAAI,qBAAa,CAAC,mBAAmB,EAAE,qBAAa,CAAC,kBAAkB,EAAE,kBAAkB,CAAC,CAAC;4BAC/H,KAAI,CAAC,WAAW,CAAC,cAAc,EAAE,kBAAkB,CAAC,CAAC;wBACzD,CAAC;oBACL,CAAC,CAAC,CAAC;gBACP,CAAC,CAAC,CAAC;YACP,CAAC;QACL,CAAC,CAAC,CAAC;IACP,CAAC;IAQO,sCAAW,GAAnB,UAAoB,MAAkB,EAAE,MAAkB;QACtD,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;YAC1E,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;YAExC,EAAE,CAAC,CAAC,MAAM,YAAY,2BAAmB,IAAI,MAAM,CAAC,UAAU;gBAC1D,MAAM,YAAY,2BAAmB,IAAI,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC;gBAC7D,GAAG,CAAC,CAAC,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,KAAK,GAAG,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC;oBAC3E,EAAE,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;wBACnC,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC;oBAChF,CAAC;gBACL,CAAC;YACL,CAAC;QACL,CAAC;IACL,CAAC;IAQO,oCAAS,GAAjB,UAAkB,OAAgB,EAAE,UAAiC;QAArE,iBAaC;QAZG,EAAE,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,sBAAc,CAAC,KAAK,CAAC,IAAI,UAAU,CAAC,gBAAgB,CAAC,CAAC,CAAC;YACzE,UAAU,CAAC,gBAAgB,CAAC,OAAO,CAAC,UAAC,IAAU;gBAC3C,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,YAAY,qBAAa,CAAC,CAAC,CAAC,CAAC;oBACnC,MAAM,CAAC;gBACX,CAAC;gBAED,IAAM,MAAM,GAA4C,IAAK,CAAC,UAAU,CAAC;gBACzE,EAAE,CAAC,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,CAAC,sBAAc,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;oBACpD,KAAI,CAAC,YAAY,CAAC,OAAO,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC;gBACnD,CAAC;YACL,CAAC,CAAC,CAAC;QACP,CAAC;IACL,CAAC;IA1GQ,gBAAgB;QAD5B,sBAAS,CAAC,EAAC,IAAI,EAAE,YAAY,EAAC,CAAC;OACnB,gBAAgB,CA2G5B;IAAD,uBAAC;CAAA,AA3GD,CAAsC,+BAAkB,GA2GvD;AA3GY,4CAAgB","sourcesContent":["import { Reflection, ReflectionKind, DeclarationReflection, SignatureReflection } from '../../models/reflections/index';\nimport { Type, ReferenceType } from '../../models/types/index';\nimport { Component, ConverterComponent } from '../components';\nimport { Converter } from '../converter';\nimport { Context } from '../context';\n\n/**\n * A plugin that detects interface implementations of functions and\n * properties on classes and links them.\n */\n@Component({name: 'implements'})\nexport class ImplementsPlugin extends ConverterComponent {\n /**\n * Create a new ImplementsPlugin instance.\n */\n initialize() {\n this.listenTo(this.owner, Converter.EVENT_RESOLVE, this.onResolve, -10);\n }\n\n /**\n * Mark all members of the given class to be the implementation of the matching interface member.\n *\n * @param context The context object describing the current state the converter is in.\n * @param classReflection The reflection of the classReflection class.\n * @param interfaceReflection The reflection of the interfaceReflection interface.\n */\n private analyzeClass(context: Context, classReflection: DeclarationReflection, interfaceReflection: DeclarationReflection) {\n if (!interfaceReflection.children) {\n return;\n }\n\n interfaceReflection.children.forEach((interfaceMember: DeclarationReflection) => {\n if (!(interfaceMember instanceof DeclarationReflection)) {\n return;\n }\n\n let classMember: DeclarationReflection;\n\n if (!classReflection.children) {\n return;\n }\n\n for (let index = 0, count = classReflection.children.length; index < count; index++) {\n const child = classReflection.children[index];\n if (child.name !== interfaceMember.name) {\n continue;\n }\n if (child.flags.isStatic !== interfaceMember.flags.isStatic) {\n continue;\n }\n\n classMember = child;\n break;\n }\n\n if (!classMember) {\n return;\n }\n\n const interfaceMemberName = interfaceReflection.name + '.' + interfaceMember.name;\n classMember.implementationOf = new ReferenceType(interfaceMemberName, ReferenceType.SYMBOL_ID_RESOLVED, interfaceMember);\n this.copyComment(classMember, interfaceMember);\n\n if (interfaceMember.kindOf(ReflectionKind.FunctionOrMethod) && interfaceMember.signatures && classMember.signatures) {\n interfaceMember.signatures.forEach((interfaceSignature: SignatureReflection) => {\n const interfaceParameters = interfaceSignature.getParameterTypes();\n classMember.signatures.forEach((classSignature: SignatureReflection) => {\n if (Type.isTypeListEqual(interfaceParameters, classSignature.getParameterTypes())) {\n classSignature.implementationOf = new ReferenceType(interfaceMemberName, ReferenceType.SYMBOL_ID_RESOLVED, interfaceSignature);\n this.copyComment(classSignature, interfaceSignature);\n }\n });\n });\n }\n });\n }\n\n /**\n * Copy the comment of the source reflection to the target reflection.\n *\n * @param target\n * @param source\n */\n private copyComment(target: Reflection, source: Reflection) {\n if (target.comment && source.comment && target.comment.hasTag('inheritdoc')) {\n target.comment.copyFrom(source.comment);\n\n if (target instanceof SignatureReflection && target.parameters &&\n source instanceof SignatureReflection && source.parameters) {\n for (let index = 0, count = target.parameters.length; index < count; index++) {\n if (target.parameters[index].comment) {\n target.parameters[index].comment.copyFrom(source.parameters[index].comment);\n }\n }\n }\n }\n }\n\n /**\n * Triggered when the converter resolves a reflection.\n *\n * @param context The context object describing the current state the converter is in.\n * @param reflection The reflection that is currently resolved.\n */\n private onResolve(context: Context, reflection: DeclarationReflection) {\n if (reflection.kindOf(ReflectionKind.Class) && reflection.implementedTypes) {\n reflection.implementedTypes.forEach((type: Type) => {\n if (!(type instanceof ReferenceType)) {\n return;\n }\n\n const source = <DeclarationReflection> (<ReferenceType> type).reflection;\n if (source && source.kindOf(ReflectionKind.Interface)) {\n this.analyzeClass(context, reflection, source);\n }\n });\n }\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/plugins/PackagePlugin.js b/node_modules/typedoc/dist/lib/converter/plugins/PackagePlugin.js
index 90985062b..6e8bfada3 100644
--- a/node_modules/typedoc/dist/lib/converter/plugins/PackagePlugin.js
+++ b/node_modules/typedoc/dist/lib/converter/plugins/PackagePlugin.js
@@ -87,16 +87,16 @@ var PackagePlugin = (function (_super) {
}
}
};
+ __decorate([
+ component_1.Option({
+ name: 'readme',
+ help: 'Path to the readme file that should be displayed on the index page. Pass `none` to disable the index page and start the documentation on the globals page.'
+ })
+ ], PackagePlugin.prototype, "readme", void 0);
+ PackagePlugin = __decorate([
+ components_1.Component({ name: 'package' })
+ ], PackagePlugin);
return PackagePlugin;
}(components_1.ConverterComponent));
-__decorate([
- component_1.Option({
- name: 'readme',
- help: 'Path to the readme file that should be displayed on the index page. Pass `none` to disable the index page and start the documentation on the globals page.'
- })
-], PackagePlugin.prototype, "readme", void 0);
-PackagePlugin = __decorate([
- components_1.Component({ name: 'package' })
-], PackagePlugin);
exports.PackagePlugin = PackagePlugin;
//# sourceMappingURL=PackagePlugin.js.map \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/plugins/PackagePlugin.js.map b/node_modules/typedoc/dist/lib/converter/plugins/PackagePlugin.js.map
index d0bf52a3b..2137d644e 100644
--- a/node_modules/typedoc/dist/lib/converter/plugins/PackagePlugin.js.map
+++ b/node_modules/typedoc/dist/lib/converter/plugins/PackagePlugin.js.map
@@ -1 +1 @@
-{"version":3,"file":"PackagePlugin.js","sourceRoot":"","sources":["../../../../src/lib/converter/plugins/PackagePlugin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,2BAA6B;AAC7B,uBAAyB;AAIzB,4CAA4D;AAC5D,0CAAuC;AAEvC,mDAA6C;AAW7C,IAAa,aAAa;IAAS,iCAAkB;IAArD;;IAmHA,CAAC;IArFG,kCAAU,GAAV;QACI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK;YACpB,GAAC,qBAAS,CAAC,WAAW,IAAW,IAAI,CAAC,OAAO;YAC7C,GAAC,qBAAS,CAAC,gBAAgB,IAAM,IAAI,CAAC,eAAe;YACrD,GAAC,qBAAS,CAAC,mBAAmB,IAAG,IAAI,CAAC,cAAc;gBACtD,CAAC;;IACP,CAAC;IAOO,+BAAO,GAAf,UAAgB,OAAgB;QAC5B,IAAI,CAAC,UAAU,GAAI,IAAI,CAAC;QACxB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;QACxB,IAAI,CAAC,OAAO,GAAO,EAAE,CAAC;QAEtB,IAAI,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QACzB,IAAI,CAAC,YAAY,GAAG,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC;QACxC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,IAAI,MAAM,CAAC,CAAC,CAAC;YAC/B,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;YAC9B,EAAE,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;gBACxB,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC;YAC7B,CAAC;QACL,CAAC;IACL,CAAC;IASO,uCAAe,GAAvB,UAAwB,OAAgB,EAAE,UAAsB,EAAE,IAAoB;QAAtF,iBA8BC;QA7BG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;YACR,MAAM,CAAC;QACX,CAAC;QACD,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;YACtC,MAAM,CAAC;QACX,CAAC;QAED,IAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC/B,IAAI,OAAe,EAAE,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;QACtE,GAAG,CAAC;YACA,OAAO,GAAG,SAAS,CAAC;YACpB,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;gBACvC,KAAK,CAAC;YACV,CAAC;YAED,EAAE,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,UAAC,IAAI;gBACjC,IAAM,KAAK,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;gBACjC,EAAE,CAAC,CAAC,CAAC,KAAI,CAAC,YAAY,IAAI,CAAC,KAAI,CAAC,UAAU,IAAI,KAAK,KAAK,WAAW,CAAC,CAAC,CAAC;oBAClE,KAAI,CAAC,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;gBAC/C,CAAC;gBAED,EAAE,CAAC,CAAC,CAAC,KAAI,CAAC,WAAW,IAAI,KAAK,KAAK,cAAc,CAAC,CAAC,CAAC;oBAChD,KAAI,CAAC,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;gBAChD,CAAC;YACL,CAAC,CAAC,CAAC;YAEH,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAC3B,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC;QACvD,CAAC,QAAQ,OAAO,KAAK,SAAS,EAAE;IACpC,CAAC;IAOO,sCAAc,GAAtB,UAAuB,OAAgB;QACnC,IAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;QAChC,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;YAClB,OAAO,CAAC,MAAM,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;QAC/D,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;YACnB,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC;YAC7E,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;gBAChB,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC;YAC5C,CAAC;QACL,CAAC;IACL,CAAC;IACL,oBAAC;AAAD,CAAC,AAnHD,CAAmC,+BAAkB,GAmHpD;AA9GG;IAJC,kBAAM,CAAC;QACJ,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,4JAA4J;KACrK,CAAC;6CACa;AALN,aAAa;IADzB,sBAAS,CAAC,EAAC,IAAI,EAAE,SAAS,EAAC,CAAC;GAChB,aAAa,CAmHzB;AAnHY,sCAAa","sourcesContent":["import * as Path from 'path';\nimport * as FS from 'fs';\nimport * as ts from 'typescript';\n\nimport {Reflection} from '../../models/reflections/abstract';\nimport {Component, ConverterComponent} from '../components';\nimport {Converter} from '../converter';\nimport {Context} from '../context';\nimport {Option} from '../../utils/component';\n\n/**\n * A handler that tries to find the package.json and readme.md files of the\n * current project.\n *\n * The handler traverses the file tree upwards for each file processed by the processor\n * and records the nearest package info files it can find. Within the resolve files, the\n * contents of the found files will be read and appended to the ProjectReflection.\n */\n@Component({name: 'package'})\nexport class PackagePlugin extends ConverterComponent {\n @Option({\n name: 'readme',\n help: 'Path to the readme file that should be displayed on the index page. Pass `none` to disable the index page and start the documentation on the globals page.'\n })\n readme: string;\n\n /**\n * The file name of the found readme.md file.\n */\n private readmeFile: string;\n\n /**\n * The file name of the found package.json file.\n */\n private packageFile: string;\n\n /**\n * List of directories the handler already inspected.\n */\n private visited: string[];\n\n /**\n * Should the readme file be ignored?\n */\n private noReadmeFile: boolean;\n\n /**\n * Create a new PackageHandler instance.\n */\n initialize() {\n this.listenTo(this.owner, {\n [Converter.EVENT_BEGIN]: this.onBegin,\n [Converter.EVENT_FILE_BEGIN]: this.onBeginDocument,\n [Converter.EVENT_RESOLVE_BEGIN]: this.onBeginResolve\n });\n }\n\n /**\n * Triggered when the converter begins converting a project.\n *\n * @param context The context object describing the current state the converter is in.\n */\n private onBegin(context: Context) {\n this.readmeFile = null;\n this.packageFile = null;\n this.visited = [];\n\n let readme = this.readme;\n this.noReadmeFile = (readme === 'none');\n if (!this.noReadmeFile && readme) {\n readme = Path.resolve(readme);\n if (FS.existsSync(readme)) {\n this.readmeFile = readme;\n }\n }\n }\n\n /**\n * Triggered when the converter begins converting a source file.\n *\n * @param context The context object describing the current state the converter is in.\n * @param reflection The reflection that is currently processed.\n * @param node The node that is currently processed if available.\n */\n private onBeginDocument(context: Context, reflection: Reflection, node?: ts.SourceFile) {\n if (!node) {\n return;\n }\n if (this.readmeFile && this.packageFile) {\n return;\n }\n\n const fileName = node.fileName;\n let dirName: string, parentDir = Path.resolve(Path.dirname(fileName));\n do {\n dirName = parentDir;\n if (this.visited.indexOf(dirName) !== -1) {\n break;\n }\n\n FS.readdirSync(dirName).forEach((file) => {\n const lfile = file.toLowerCase();\n if (!this.noReadmeFile && !this.readmeFile && lfile === 'readme.md') {\n this.readmeFile = Path.join(dirName, file);\n }\n\n if (!this.packageFile && lfile === 'package.json') {\n this.packageFile = Path.join(dirName, file);\n }\n });\n\n this.visited.push(dirName);\n parentDir = Path.resolve(Path.join(dirName, '..'));\n } while (dirName !== parentDir);\n }\n\n /**\n * Triggered when the converter begins resolving a project.\n *\n * @param context The context object describing the current state the converter is in.\n */\n private onBeginResolve(context: Context) {\n const project = context.project;\n if (this.readmeFile) {\n project.readme = FS.readFileSync(this.readmeFile, 'utf-8');\n }\n\n if (this.packageFile) {\n project.packageInfo = JSON.parse(FS.readFileSync(this.packageFile, 'utf-8'));\n if (!project.name) {\n project.name = project.packageInfo.name;\n }\n }\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"PackagePlugin.js","sourceRoot":"","sources":["../../../../src/lib/converter/plugins/PackagePlugin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,2BAA6B;AAC7B,uBAAyB;AAIzB,4CAA8D;AAC9D,0CAAyC;AAEzC,mDAA+C;AAW/C;IAAmC,iCAAkB;IAArD;;IAmHA,CAAC;IArFG,kCAAU,GAAV;QACI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK;YACpB,GAAC,qBAAS,CAAC,WAAW,IAAW,IAAI,CAAC,OAAO;YAC7C,GAAC,qBAAS,CAAC,gBAAgB,IAAM,IAAI,CAAC,eAAe;YACrD,GAAC,qBAAS,CAAC,mBAAmB,IAAG,IAAI,CAAC,cAAc;gBACtD,CAAC;;IACP,CAAC;IAOO,+BAAO,GAAf,UAAgB,OAAgB;QAC5B,IAAI,CAAC,UAAU,GAAI,IAAI,CAAC;QACxB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;QACxB,IAAI,CAAC,OAAO,GAAO,EAAE,CAAC;QAEtB,IAAI,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QACzB,IAAI,CAAC,YAAY,GAAG,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC;QACxC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,IAAI,MAAM,CAAC,CAAC,CAAC;YAC/B,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;YAC9B,EAAE,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;gBACxB,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC;YAC7B,CAAC;QACL,CAAC;IACL,CAAC;IASO,uCAAe,GAAvB,UAAwB,OAAgB,EAAE,UAAsB,EAAE,IAAoB;QAAtF,iBA8BC;QA7BG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;YACR,MAAM,CAAC;QACX,CAAC;QACD,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;YACtC,MAAM,CAAC;QACX,CAAC;QAED,IAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC/B,IAAI,OAAe,EAAE,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;QACtE,GAAG,CAAC;YACA,OAAO,GAAG,SAAS,CAAC;YACpB,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;gBACvC,KAAK,CAAC;YACV,CAAC;YAED,EAAE,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,UAAC,IAAI;gBACjC,IAAM,KAAK,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;gBACjC,EAAE,CAAC,CAAC,CAAC,KAAI,CAAC,YAAY,IAAI,CAAC,KAAI,CAAC,UAAU,IAAI,KAAK,KAAK,WAAW,CAAC,CAAC,CAAC;oBAClE,KAAI,CAAC,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;gBAC/C,CAAC;gBAED,EAAE,CAAC,CAAC,CAAC,KAAI,CAAC,WAAW,IAAI,KAAK,KAAK,cAAc,CAAC,CAAC,CAAC;oBAChD,KAAI,CAAC,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;gBAChD,CAAC;YACL,CAAC,CAAC,CAAC;YAEH,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAC3B,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC;QACvD,CAAC,QAAQ,OAAO,KAAK,SAAS,EAAE;IACpC,CAAC;IAOO,sCAAc,GAAtB,UAAuB,OAAgB;QACnC,IAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;QAChC,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;YAClB,OAAO,CAAC,MAAM,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;QAC/D,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;YACnB,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC;YAC7E,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;gBAChB,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC;YAC5C,CAAC;QACL,CAAC;IACL,CAAC;IA7GD;QAJC,kBAAM,CAAC;YACJ,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,4JAA4J;SACrK,CAAC;iDACa;IALN,aAAa;QADzB,sBAAS,CAAC,EAAC,IAAI,EAAE,SAAS,EAAC,CAAC;OAChB,aAAa,CAmHzB;IAAD,oBAAC;CAAA,AAnHD,CAAmC,+BAAkB,GAmHpD;AAnHY,sCAAa","sourcesContent":["import * as Path from 'path';\nimport * as FS from 'fs';\nimport * as ts from 'typescript';\n\nimport { Reflection } from '../../models/reflections/abstract';\nimport { Component, ConverterComponent } from '../components';\nimport { Converter } from '../converter';\nimport { Context } from '../context';\nimport { Option } from '../../utils/component';\n\n/**\n * A handler that tries to find the package.json and readme.md files of the\n * current project.\n *\n * The handler traverses the file tree upwards for each file processed by the processor\n * and records the nearest package info files it can find. Within the resolve files, the\n * contents of the found files will be read and appended to the ProjectReflection.\n */\n@Component({name: 'package'})\nexport class PackagePlugin extends ConverterComponent {\n @Option({\n name: 'readme',\n help: 'Path to the readme file that should be displayed on the index page. Pass `none` to disable the index page and start the documentation on the globals page.'\n })\n readme: string;\n\n /**\n * The file name of the found readme.md file.\n */\n private readmeFile: string;\n\n /**\n * The file name of the found package.json file.\n */\n private packageFile: string;\n\n /**\n * List of directories the handler already inspected.\n */\n private visited: string[];\n\n /**\n * Should the readme file be ignored?\n */\n private noReadmeFile: boolean;\n\n /**\n * Create a new PackageHandler instance.\n */\n initialize() {\n this.listenTo(this.owner, {\n [Converter.EVENT_BEGIN]: this.onBegin,\n [Converter.EVENT_FILE_BEGIN]: this.onBeginDocument,\n [Converter.EVENT_RESOLVE_BEGIN]: this.onBeginResolve\n });\n }\n\n /**\n * Triggered when the converter begins converting a project.\n *\n * @param context The context object describing the current state the converter is in.\n */\n private onBegin(context: Context) {\n this.readmeFile = null;\n this.packageFile = null;\n this.visited = [];\n\n let readme = this.readme;\n this.noReadmeFile = (readme === 'none');\n if (!this.noReadmeFile && readme) {\n readme = Path.resolve(readme);\n if (FS.existsSync(readme)) {\n this.readmeFile = readme;\n }\n }\n }\n\n /**\n * Triggered when the converter begins converting a source file.\n *\n * @param context The context object describing the current state the converter is in.\n * @param reflection The reflection that is currently processed.\n * @param node The node that is currently processed if available.\n */\n private onBeginDocument(context: Context, reflection: Reflection, node?: ts.SourceFile) {\n if (!node) {\n return;\n }\n if (this.readmeFile && this.packageFile) {\n return;\n }\n\n const fileName = node.fileName;\n let dirName: string, parentDir = Path.resolve(Path.dirname(fileName));\n do {\n dirName = parentDir;\n if (this.visited.indexOf(dirName) !== -1) {\n break;\n }\n\n FS.readdirSync(dirName).forEach((file) => {\n const lfile = file.toLowerCase();\n if (!this.noReadmeFile && !this.readmeFile && lfile === 'readme.md') {\n this.readmeFile = Path.join(dirName, file);\n }\n\n if (!this.packageFile && lfile === 'package.json') {\n this.packageFile = Path.join(dirName, file);\n }\n });\n\n this.visited.push(dirName);\n parentDir = Path.resolve(Path.join(dirName, '..'));\n } while (dirName !== parentDir);\n }\n\n /**\n * Triggered when the converter begins resolving a project.\n *\n * @param context The context object describing the current state the converter is in.\n */\n private onBeginResolve(context: Context) {\n const project = context.project;\n if (this.readmeFile) {\n project.readme = FS.readFileSync(this.readmeFile, 'utf-8');\n }\n\n if (this.packageFile) {\n project.packageInfo = JSON.parse(FS.readFileSync(this.packageFile, 'utf-8'));\n if (!project.name) {\n project.name = project.packageInfo.name;\n }\n }\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/plugins/SourcePlugin.js b/node_modules/typedoc/dist/lib/converter/plugins/SourcePlugin.js
index 9921f9a9f..3d2c51b72 100644
--- a/node_modules/typedoc/dist/lib/converter/plugins/SourcePlugin.js
+++ b/node_modules/typedoc/dist/lib/converter/plugins/SourcePlugin.js
@@ -130,10 +130,10 @@ var SourcePlugin = (function (_super) {
file.reflections = reflections;
});
};
+ SourcePlugin = __decorate([
+ components_1.Component({ name: 'source' })
+ ], SourcePlugin);
return SourcePlugin;
}(components_1.ConverterComponent));
-SourcePlugin = __decorate([
- components_1.Component({ name: 'source' })
-], SourcePlugin);
exports.SourcePlugin = SourcePlugin;
//# sourceMappingURL=SourcePlugin.js.map \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/plugins/SourcePlugin.js.map b/node_modules/typedoc/dist/lib/converter/plugins/SourcePlugin.js.map
index 1dd9c0b4d..3be74f9af 100644
--- a/node_modules/typedoc/dist/lib/converter/plugins/SourcePlugin.js.map
+++ b/node_modules/typedoc/dist/lib/converter/plugins/SourcePlugin.js.map
@@ -1 +1 @@
-{"version":3,"file":"SourcePlugin.js","sourceRoot":"","sources":["../../../../src/lib/converter/plugins/SourcePlugin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,2BAA6B;AAC7B,+BAAiC;AACjC,uCAAyC;AAEzC,wDAAoG;AACpG,oDAAuE;AACvE,4CAA4D;AAC5D,gDAA4C;AAC5C,0CAAuC;AAOvC,IAAa,YAAY;IAAS,gCAAkB;IADpD;QAAA,qEAkKC;QA7JW,cAAQ,GAAG,IAAI,oBAAQ,EAAE,CAAC;QAK1B,kBAAY,GAAiC,EAAE,CAAC;;IAwJ5D,CAAC;IAnJG,iCAAU,GAAV;QACI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK;YACpB,GAAC,qBAAS,CAAC,WAAW,IAAgB,IAAI,CAAC,OAAO;YAClD,GAAC,qBAAS,CAAC,gBAAgB,IAAW,IAAI,CAAC,eAAe;YAC1D,GAAC,qBAAS,CAAC,wBAAwB,IAAG,IAAI,CAAC,aAAa;YACxD,GAAC,qBAAS,CAAC,sBAAsB,IAAK,IAAI,CAAC,aAAa;YACxD,GAAC,qBAAS,CAAC,mBAAmB,IAAQ,IAAI,CAAC,cAAc;YACzD,GAAC,qBAAS,CAAC,aAAa,IAAc,IAAI,CAAC,SAAS;YACpD,GAAC,qBAAS,CAAC,iBAAiB,IAAU,IAAI,CAAC,YAAY;gBACzD,CAAC;;IACP,CAAC;IAEO,oCAAa,GAArB,UAAsB,QAAgB,EAAE,OAA0B;QAC9D,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;YAC/B,IAAM,IAAI,GAAG,IAAI,kBAAU,CAAC,QAAQ,CAAC,CAAC;YACtC,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC;YACnC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC7B,CAAC;QAED,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;IACvC,CAAC;IAOO,8BAAO,GAAf;QACI,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;QACtB,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC;IAC3B,CAAC;IAWO,sCAAe,GAAvB,UAAwB,OAAgB,EAAE,UAAsB,EAAE,IAAoB;QAClF,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;YACR,MAAM,CAAC;QACX,CAAC;QACD,IAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC/B,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAC5B,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;IAClD,CAAC;IAWO,oCAAa,GAArB,UAAsB,OAAgB,EAAE,UAAsB,EAAE,IAAc;QAC1E,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;YACR,MAAM,CAAC;QACX,CAAC;QACD,IAAM,UAAU,GAAQ,GAAG,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;QACtD,IAAM,QAAQ,GAAU,UAAU,CAAC,QAAQ,CAAC;QAC5C,IAAM,IAAI,GAAe,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;QAEvE,IAAI,QAA6B,CAAC;QAClC,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;YACnC,QAAQ,GAAG,EAAE,CAAC,6BAA6B,CAAC,UAAU,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC;QAC9E,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,QAAQ,GAAG,EAAE,CAAC,6BAA6B,CAAC,UAAU,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;QACtE,CAAC;QAED,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC;YACtB,UAAU,CAAC,OAAO,GAAG,EAAE,CAAC;QAC5B,CAAC;QACD,EAAE,CAAC,CAAC,UAAU,YAAY,6BAAqB,CAAC,CAAC,CAAC;YAC9C,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACtC,CAAC;QAED,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC;YACpB,IAAI,EAAE,IAAI;YACV,QAAQ,EAAE,QAAQ;YAClB,IAAI,EAAE,QAAQ,CAAC,IAAI,GAAG,CAAC;YACvB,SAAS,EAAE,QAAQ,CAAC,SAAS;SAChC,CAAC,CAAC;IACP,CAAC;IAOO,qCAAc,GAAtB,UAAuB,OAAgB;QAAvC,iBAKC;QAJG,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,UAAC,IAAI;YAC/B,IAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,GAAG,KAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YACnE,KAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC;QACvC,CAAC,CAAC,CAAC;IACP,CAAC;IAQO,gCAAS,GAAjB,UAAkB,OAAgB,EAAE,UAAsB;QAA1D,iBAOC;QANG,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC;YACtB,MAAM,CAAC;QACX,CAAC;QACD,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,UAAC,MAAM;YAC9B,MAAM,CAAC,QAAQ,GAAG,KAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QAC1D,CAAC,CAAC,CAAC;IACP,CAAC;IAOO,mCAAY,GAApB,UAAqB,OAAgB;QACjC,IAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;QAChC,IAAM,IAAI,GAAG,OAAO,CAAC,SAAS,CAAC;QAC/B,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,UAAC,IAAI;YACvB,IAAM,WAAW,GAAiB,EAAE,CAAC;YACrC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,UAAC,UAAU;gBAChC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YACjC,CAAC,CAAC,CAAC;YAEH,IAAI,SAAS,GAAG,IAAI,CAAC;YACrB,IAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YACzC,EAAE,CAAC,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC;gBACf,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,UAAC,SAAS;oBAC9B,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;wBAC1E,SAAS,CAAC,WAAW,CAAC,SAAS,CAAC,GAAG,IAAI,uBAAe,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;oBACjF,CAAC;oBACD,SAAS,GAAG,SAAS,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;gBACjD,CAAC,CAAC,CAAC;YACP,CAAC;YAED,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAE3B,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC;YACxB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QACnC,CAAC,CAAC,CAAC;IACP,CAAC;IACL,mBAAC;AAAD,CAAC,AAjKD,CAAkC,+BAAkB,GAiKnD;AAjKY,YAAY;IADxB,sBAAS,CAAC,EAAC,IAAI,EAAE,QAAQ,EAAC,CAAC;GACf,YAAY,CAiKxB;AAjKY,oCAAY","sourcesContent":["import * as Path from 'path';\nimport * as ts from 'typescript';\nimport * as _ts from '../../ts-internal';\n\nimport {Reflection, ProjectReflection, DeclarationReflection} from '../../models/reflections/index';\nimport {SourceDirectory, SourceFile} from '../../models/sources/index';\nimport {Component, ConverterComponent} from '../components';\nimport {BasePath} from '../utils/base-path';\nimport {Converter} from '../converter';\nimport {Context} from '../context';\n\n/**\n * A handler that attaches source file information to reflections.\n */\n@Component({name: 'source'})\nexport class SourcePlugin extends ConverterComponent {\n /**\n * Helper for resolving the base path of all source files.\n */\n private basePath = new BasePath();\n\n /**\n * A map of all generated [[SourceFile]] instances.\n */\n private fileMappings: {[name: string]: SourceFile} = {};\n\n /**\n * Create a new SourceHandler instance.\n */\n initialize() {\n this.listenTo(this.owner, {\n [Converter.EVENT_BEGIN]: this.onBegin,\n [Converter.EVENT_FILE_BEGIN]: this.onBeginDocument,\n [Converter.EVENT_CREATE_DECLARATION]: this.onDeclaration,\n [Converter.EVENT_CREATE_SIGNATURE]: this.onDeclaration,\n [Converter.EVENT_RESOLVE_BEGIN]: this.onBeginResolve,\n [Converter.EVENT_RESOLVE]: this.onResolve,\n [Converter.EVENT_RESOLVE_END]: this.onEndResolve\n });\n }\n\n private getSourceFile(fileName: string, project: ProjectReflection): SourceFile {\n if (!this.fileMappings[fileName]) {\n const file = new SourceFile(fileName);\n this.fileMappings[fileName] = file;\n project.files.push(file);\n }\n\n return this.fileMappings[fileName];\n }\n\n /**\n * Triggered once per project before the dispatcher invokes the compiler.\n *\n * @param event An event object containing the related project and compiler instance.\n */\n private onBegin() {\n this.basePath.reset();\n this.fileMappings = {};\n }\n\n /**\n * Triggered when the converter begins converting a source file.\n *\n * Create a new [[SourceFile]] instance for all TypeScript files.\n *\n * @param context The context object describing the current state the converter is in.\n * @param reflection The reflection that is currently processed.\n * @param node The node that is currently processed if available.\n */\n private onBeginDocument(context: Context, reflection: Reflection, node?: ts.SourceFile) {\n if (!node) {\n return;\n }\n const fileName = node.fileName;\n this.basePath.add(fileName);\n this.getSourceFile(fileName, context.project);\n }\n\n /**\n * Triggered when the converter has created a declaration reflection.\n *\n * Attach the current source file to the [[DeclarationReflection.sources]] array.\n *\n * @param context The context object describing the current state the converter is in.\n * @param reflection The reflection that is currently processed.\n * @param node The node that is currently processed if available.\n */\n private onDeclaration(context: Context, reflection: Reflection, node?: ts.Node) {\n if (!node) {\n return;\n }\n const sourceFile = _ts.getSourceFileOfNode(node);\n const fileName = sourceFile.fileName;\n const file: SourceFile = this.getSourceFile(fileName, context.project);\n\n let position: ts.LineAndCharacter;\n if (node['name'] && node['name'].end) {\n position = ts.getLineAndCharacterOfPosition(sourceFile, node['name'].end);\n } else {\n position = ts.getLineAndCharacterOfPosition(sourceFile, node.pos);\n }\n\n if (!reflection.sources) {\n reflection.sources = [];\n }\n if (reflection instanceof DeclarationReflection) {\n file.reflections.push(reflection);\n }\n\n reflection.sources.push({\n file: file,\n fileName: fileName,\n line: position.line + 1,\n character: position.character\n });\n }\n\n /**\n * Triggered when the converter begins resolving a project.\n *\n * @param context The context object describing the current state the converter is in.\n */\n private onBeginResolve(context: Context) {\n context.project.files.forEach((file) => {\n const fileName = file.fileName = this.basePath.trim(file.fileName);\n this.fileMappings[fileName] = file;\n });\n }\n\n /**\n * Triggered when the converter resolves a reflection.\n *\n * @param context The context object describing the current state the converter is in.\n * @param reflection The reflection that is currently resolved.\n */\n private onResolve(context: Context, reflection: Reflection) {\n if (!reflection.sources) {\n return;\n }\n reflection.sources.forEach((source) => {\n source.fileName = this.basePath.trim(source.fileName);\n });\n }\n\n /**\n * Triggered when the converter has finished resolving a project.\n *\n * @param context The context object describing the current state the converter is in.\n */\n private onEndResolve(context: Context) {\n const project = context.project;\n const home = project.directory;\n project.files.forEach((file) => {\n const reflections: Reflection[] = [];\n file.reflections.forEach((reflection) => {\n reflections.push(reflection);\n });\n\n let directory = home;\n const path = Path.dirname(file.fileName);\n if (path !== '.') {\n path.split('/').forEach((pathPiece) => {\n if (!Object.prototype.hasOwnProperty.call(directory.directories, pathPiece)) {\n directory.directories[pathPiece] = new SourceDirectory(pathPiece, directory);\n }\n directory = directory.directories[pathPiece];\n });\n }\n\n directory.files.push(file);\n // reflections.sort(GroupHandler.sortCallback);\n file.parent = directory;\n file.reflections = reflections;\n });\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"SourcePlugin.js","sourceRoot":"","sources":["../../../../src/lib/converter/plugins/SourcePlugin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,2BAA6B;AAC7B,+BAAiC;AACjC,uCAAyC;AAEzC,wDAAsG;AACtG,oDAAyE;AACzE,4CAA8D;AAC9D,gDAA8C;AAC9C,0CAAyC;AAOzC;IAAkC,gCAAkB;IADpD;QAAA,qEAkKC;QA7JW,cAAQ,GAAG,IAAI,oBAAQ,EAAE,CAAC;QAK1B,kBAAY,GAAiC,EAAE,CAAC;;IAwJ5D,CAAC;IAnJG,iCAAU,GAAV;QACI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK;YACpB,GAAC,qBAAS,CAAC,WAAW,IAAgB,IAAI,CAAC,OAAO;YAClD,GAAC,qBAAS,CAAC,gBAAgB,IAAW,IAAI,CAAC,eAAe;YAC1D,GAAC,qBAAS,CAAC,wBAAwB,IAAG,IAAI,CAAC,aAAa;YACxD,GAAC,qBAAS,CAAC,sBAAsB,IAAK,IAAI,CAAC,aAAa;YACxD,GAAC,qBAAS,CAAC,mBAAmB,IAAQ,IAAI,CAAC,cAAc;YACzD,GAAC,qBAAS,CAAC,aAAa,IAAc,IAAI,CAAC,SAAS;YACpD,GAAC,qBAAS,CAAC,iBAAiB,IAAU,IAAI,CAAC,YAAY;gBACzD,CAAC;;IACP,CAAC;IAEO,oCAAa,GAArB,UAAsB,QAAgB,EAAE,OAA0B;QAC9D,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;YAC/B,IAAM,IAAI,GAAG,IAAI,kBAAU,CAAC,QAAQ,CAAC,CAAC;YACtC,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC;YACnC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC7B,CAAC;QAED,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;IACvC,CAAC;IAOO,8BAAO,GAAf;QACI,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;QACtB,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC;IAC3B,CAAC;IAWO,sCAAe,GAAvB,UAAwB,OAAgB,EAAE,UAAsB,EAAE,IAAoB;QAClF,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;YACR,MAAM,CAAC;QACX,CAAC;QACD,IAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC/B,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAC5B,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;IAClD,CAAC;IAWO,oCAAa,GAArB,UAAsB,OAAgB,EAAE,UAAsB,EAAE,IAAc;QAC1E,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;YACR,MAAM,CAAC;QACX,CAAC;QACD,IAAM,UAAU,GAAQ,GAAG,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;QACtD,IAAM,QAAQ,GAAU,UAAU,CAAC,QAAQ,CAAC;QAC5C,IAAM,IAAI,GAAe,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;QAEvE,IAAI,QAA6B,CAAC;QAClC,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;YACnC,QAAQ,GAAG,EAAE,CAAC,6BAA6B,CAAC,UAAU,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC;QAC9E,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,QAAQ,GAAG,EAAE,CAAC,6BAA6B,CAAC,UAAU,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;QACtE,CAAC;QAED,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC;YACtB,UAAU,CAAC,OAAO,GAAG,EAAE,CAAC;QAC5B,CAAC;QACD,EAAE,CAAC,CAAC,UAAU,YAAY,6BAAqB,CAAC,CAAC,CAAC;YAC9C,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACtC,CAAC;QAED,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC;YACpB,IAAI,EAAE,IAAI;YACV,QAAQ,EAAE,QAAQ;YAClB,IAAI,EAAE,QAAQ,CAAC,IAAI,GAAG,CAAC;YACvB,SAAS,EAAE,QAAQ,CAAC,SAAS;SAChC,CAAC,CAAC;IACP,CAAC;IAOO,qCAAc,GAAtB,UAAuB,OAAgB;QAAvC,iBAKC;QAJG,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,UAAC,IAAI;YAC/B,IAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,GAAG,KAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YACnE,KAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC;QACvC,CAAC,CAAC,CAAC;IACP,CAAC;IAQO,gCAAS,GAAjB,UAAkB,OAAgB,EAAE,UAAsB;QAA1D,iBAOC;QANG,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC;YACtB,MAAM,CAAC;QACX,CAAC;QACD,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,UAAC,MAAM;YAC9B,MAAM,CAAC,QAAQ,GAAG,KAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QAC1D,CAAC,CAAC,CAAC;IACP,CAAC;IAOO,mCAAY,GAApB,UAAqB,OAAgB;QACjC,IAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;QAChC,IAAM,IAAI,GAAG,OAAO,CAAC,SAAS,CAAC;QAC/B,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,UAAC,IAAI;YACvB,IAAM,WAAW,GAAiB,EAAE,CAAC;YACrC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,UAAC,UAAU;gBAChC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YACjC,CAAC,CAAC,CAAC;YAEH,IAAI,SAAS,GAAG,IAAI,CAAC;YACrB,IAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YACzC,EAAE,CAAC,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC;gBACf,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,UAAC,SAAS;oBAC9B,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;wBAC1E,SAAS,CAAC,WAAW,CAAC,SAAS,CAAC,GAAG,IAAI,uBAAe,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;oBACjF,CAAC;oBACD,SAAS,GAAG,SAAS,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;gBACjD,CAAC,CAAC,CAAC;YACP,CAAC;YAED,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAE3B,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC;YACxB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QACnC,CAAC,CAAC,CAAC;IACP,CAAC;IAhKQ,YAAY;QADxB,sBAAS,CAAC,EAAC,IAAI,EAAE,QAAQ,EAAC,CAAC;OACf,YAAY,CAiKxB;IAAD,mBAAC;CAAA,AAjKD,CAAkC,+BAAkB,GAiKnD;AAjKY,oCAAY","sourcesContent":["import * as Path from 'path';\nimport * as ts from 'typescript';\nimport * as _ts from '../../ts-internal';\n\nimport { Reflection, ProjectReflection, DeclarationReflection } from '../../models/reflections/index';\nimport { SourceDirectory, SourceFile } from '../../models/sources/index';\nimport { Component, ConverterComponent } from '../components';\nimport { BasePath } from '../utils/base-path';\nimport { Converter } from '../converter';\nimport { Context } from '../context';\n\n/**\n * A handler that attaches source file information to reflections.\n */\n@Component({name: 'source'})\nexport class SourcePlugin extends ConverterComponent {\n /**\n * Helper for resolving the base path of all source files.\n */\n private basePath = new BasePath();\n\n /**\n * A map of all generated [[SourceFile]] instances.\n */\n private fileMappings: {[name: string]: SourceFile} = {};\n\n /**\n * Create a new SourceHandler instance.\n */\n initialize() {\n this.listenTo(this.owner, {\n [Converter.EVENT_BEGIN]: this.onBegin,\n [Converter.EVENT_FILE_BEGIN]: this.onBeginDocument,\n [Converter.EVENT_CREATE_DECLARATION]: this.onDeclaration,\n [Converter.EVENT_CREATE_SIGNATURE]: this.onDeclaration,\n [Converter.EVENT_RESOLVE_BEGIN]: this.onBeginResolve,\n [Converter.EVENT_RESOLVE]: this.onResolve,\n [Converter.EVENT_RESOLVE_END]: this.onEndResolve\n });\n }\n\n private getSourceFile(fileName: string, project: ProjectReflection): SourceFile {\n if (!this.fileMappings[fileName]) {\n const file = new SourceFile(fileName);\n this.fileMappings[fileName] = file;\n project.files.push(file);\n }\n\n return this.fileMappings[fileName];\n }\n\n /**\n * Triggered once per project before the dispatcher invokes the compiler.\n *\n * @param event An event object containing the related project and compiler instance.\n */\n private onBegin() {\n this.basePath.reset();\n this.fileMappings = {};\n }\n\n /**\n * Triggered when the converter begins converting a source file.\n *\n * Create a new [[SourceFile]] instance for all TypeScript files.\n *\n * @param context The context object describing the current state the converter is in.\n * @param reflection The reflection that is currently processed.\n * @param node The node that is currently processed if available.\n */\n private onBeginDocument(context: Context, reflection: Reflection, node?: ts.SourceFile) {\n if (!node) {\n return;\n }\n const fileName = node.fileName;\n this.basePath.add(fileName);\n this.getSourceFile(fileName, context.project);\n }\n\n /**\n * Triggered when the converter has created a declaration reflection.\n *\n * Attach the current source file to the [[DeclarationReflection.sources]] array.\n *\n * @param context The context object describing the current state the converter is in.\n * @param reflection The reflection that is currently processed.\n * @param node The node that is currently processed if available.\n */\n private onDeclaration(context: Context, reflection: Reflection, node?: ts.Node) {\n if (!node) {\n return;\n }\n const sourceFile = _ts.getSourceFileOfNode(node);\n const fileName = sourceFile.fileName;\n const file: SourceFile = this.getSourceFile(fileName, context.project);\n\n let position: ts.LineAndCharacter;\n if (node['name'] && node['name'].end) {\n position = ts.getLineAndCharacterOfPosition(sourceFile, node['name'].end);\n } else {\n position = ts.getLineAndCharacterOfPosition(sourceFile, node.pos);\n }\n\n if (!reflection.sources) {\n reflection.sources = [];\n }\n if (reflection instanceof DeclarationReflection) {\n file.reflections.push(reflection);\n }\n\n reflection.sources.push({\n file: file,\n fileName: fileName,\n line: position.line + 1,\n character: position.character\n });\n }\n\n /**\n * Triggered when the converter begins resolving a project.\n *\n * @param context The context object describing the current state the converter is in.\n */\n private onBeginResolve(context: Context) {\n context.project.files.forEach((file) => {\n const fileName = file.fileName = this.basePath.trim(file.fileName);\n this.fileMappings[fileName] = file;\n });\n }\n\n /**\n * Triggered when the converter resolves a reflection.\n *\n * @param context The context object describing the current state the converter is in.\n * @param reflection The reflection that is currently resolved.\n */\n private onResolve(context: Context, reflection: Reflection) {\n if (!reflection.sources) {\n return;\n }\n reflection.sources.forEach((source) => {\n source.fileName = this.basePath.trim(source.fileName);\n });\n }\n\n /**\n * Triggered when the converter has finished resolving a project.\n *\n * @param context The context object describing the current state the converter is in.\n */\n private onEndResolve(context: Context) {\n const project = context.project;\n const home = project.directory;\n project.files.forEach((file) => {\n const reflections: Reflection[] = [];\n file.reflections.forEach((reflection) => {\n reflections.push(reflection);\n });\n\n let directory = home;\n const path = Path.dirname(file.fileName);\n if (path !== '.') {\n path.split('/').forEach((pathPiece) => {\n if (!Object.prototype.hasOwnProperty.call(directory.directories, pathPiece)) {\n directory.directories[pathPiece] = new SourceDirectory(pathPiece, directory);\n }\n directory = directory.directories[pathPiece];\n });\n }\n\n directory.files.push(file);\n // reflections.sort(GroupHandler.sortCallback);\n file.parent = directory;\n file.reflections = reflections;\n });\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/plugins/TypePlugin.js b/node_modules/typedoc/dist/lib/converter/plugins/TypePlugin.js
index 757f7e8fe..6d4f6c23b 100644
--- a/node_modules/typedoc/dist/lib/converter/plugins/TypePlugin.js
+++ b/node_modules/typedoc/dist/lib/converter/plugins/TypePlugin.js
@@ -159,10 +159,10 @@ var TypePlugin = (function (_super) {
reflection.typeHierarchy = root;
});
};
+ TypePlugin = __decorate([
+ components_1.Component({ name: 'type' })
+ ], TypePlugin);
return TypePlugin;
}(components_1.ConverterComponent));
-TypePlugin = __decorate([
- components_1.Component({ name: 'type' })
-], TypePlugin);
exports.TypePlugin = TypePlugin;
//# sourceMappingURL=TypePlugin.js.map \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/plugins/TypePlugin.js.map b/node_modules/typedoc/dist/lib/converter/plugins/TypePlugin.js.map
index 8b47a462d..e7af6446a 100644
--- a/node_modules/typedoc/dist/lib/converter/plugins/TypePlugin.js.map
+++ b/node_modules/typedoc/dist/lib/converter/plugins/TypePlugin.js.map
@@ -1 +1 @@
-{"version":3,"file":"TypePlugin.js","sourceRoot":"","sources":["../../../../src/lib/converter/plugins/TypePlugin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,wDAAkI;AAClI,kDAAgH;AAChH,4CAA4D;AAC5D,0CAAuC;AAOvC,IAAa,UAAU;IAAS,8BAAkB;IADlD;QAAA,qEAgKC;QA9JG,iBAAW,GAA4B,EAAE,CAAC;;IA8J9C,CAAC;IAzJG,+BAAU,GAAV;QACI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK;YACpB,GAAC,qBAAS,CAAC,aAAa,IAAO,IAAI,CAAC,SAAS;YAC7C,GAAC,qBAAS,CAAC,iBAAiB,IAAG,IAAI,CAAC,YAAY;gBAClD,CAAC;;IACP,CAAC;IAQO,8BAAS,GAAjB,UAAkB,OAAgB,EAAE,UAAiC;QAArE,iBA0FC;QAzFG,IAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;QAEhC,WAAW,CAAC,UAAU,EAAkB,UAAU,CAAC,IAAI,CAAC,CAAC;QACzD,WAAW,CAAC,UAAU,EAAkB,UAAU,CAAC,aAAa,CAAC,CAAC;QAClE,WAAW,CAAC,UAAU,EAAkB,UAAU,CAAC,UAAU,CAAC,CAAC;QAC/D,YAAY,CAAC,UAAU,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC;QACnD,YAAY,CAAC,UAAU,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC;QAChD,YAAY,CAAC,UAAU,EAAE,UAAU,CAAC,gBAAgB,CAAC,CAAC;QAEtD,EAAE,CAAC,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC;YACxB,UAAU,CAAC,UAAU,CAAC,OAAO,CAAC,UAAC,SAAoB;gBAC/C,EAAE,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;oBACjB,WAAW,CAAC,UAAU,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC;gBAC5C,CAAC;YACL,CAAC,CAAC,CAAC;QACP,CAAC;QAED,EAAE,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,sBAAc,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC;YACrD,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;YAE1B,IAAI,CAAC,UAAU,CAAC,gBAAgB,EAAE,UAAC,MAAM;gBACrC,KAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;gBACtB,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC;oBACxB,MAAM,CAAC,aAAa,GAAG,EAAE,CAAC;gBAC9B,CAAC;gBACD,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,qBAAa,CAAC,UAAU,CAAC,IAAI,EAAE,qBAAa,CAAC,kBAAkB,EAAE,UAAU,CAAC,CAAC,CAAC;YAChH,CAAC,CAAC,CAAC;YAEH,IAAI,CAAC,UAAU,CAAC,aAAa,EAAE,UAAC,MAAM;gBAClC,KAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;gBACtB,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC;oBACrB,MAAM,CAAC,UAAU,GAAG,EAAE,CAAC;gBAC3B,CAAC;gBACD,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,qBAAa,CAAC,UAAU,CAAC,IAAI,EAAE,qBAAa,CAAC,kBAAkB,EAAE,UAAU,CAAC,CAAC,CAAC;YAC7G,CAAC,CAAC,CAAC;QACP,CAAC;QAED,cAAc,KAAa,EAAE,QAAsD;YAC/E,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;gBACT,MAAM,CAAC;YACX,CAAC;YACD,KAAK,CAAC,OAAO,CAAC,UAAC,IAAmB;gBAC9B,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,YAAY,qBAAa,CAAC,CAAC,CAAC,CAAC;oBACnC,MAAM,CAAC;gBACX,CAAC;gBACD,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,IAAI,CAAC,CAAC,IAAI,CAAC,UAAU,YAAY,6BAAqB,CAAC,CAAC,CAAC,CAAC;oBAC1E,MAAM,CAAC;gBACX,CAAC;gBACD,QAAQ,CAAyB,IAAI,CAAC,UAAU,CAAC,CAAC;YACtD,CAAC,CAAC,CAAC;QACP,CAAC;QAED,sBAAsB,UAAsB,EAAE,KAAa;YACvD,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;gBACT,MAAM,CAAC;YACX,CAAC;YACD,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;gBAC3C,WAAW,CAAC,UAAU,EAAkB,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;YACtD,CAAC;QACL,CAAC;QAED,qBAAqB,UAAsB,EAAE,IAAU;YACnD,EAAE,CAAC,CAAC,IAAI,YAAY,qBAAa,CAAC,CAAC,CAAC;gBAChC,IAAM,aAAa,GAAkC,IAAI,CAAC;gBAC1D,EAAE,CAAC,CAAC,aAAa,CAAC,QAAQ,KAAK,qBAAa,CAAC,yBAAyB,CAAC,CAAC,CAAC;oBACrE,aAAa,CAAC,UAAU,GAAG,UAAU,CAAC,oBAAoB,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;gBACnF,CAAC;gBAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,UAAU,IAAI,aAAa,CAAC,QAAQ,KAAK,qBAAa,CAAC,kBAAkB,CAAC,CAAC,CAAC;oBAClG,aAAa,CAAC,UAAU,GAAG,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,aAAa,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC;gBAClG,CAAC;gBAED,EAAE,CAAC,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC,CAAC;oBAC9B,aAAa,CAAC,aAAa,CAAC,OAAO,CAAC,UAAC,YAAkB;wBACnD,WAAW,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC;oBAC1C,CAAC,CAAC,CAAC;gBACP,CAAC;YACL,CAAC;YAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,YAAY,iBAAS,CAAC,CAAC,CAAC;gBACnC,IAAM,SAAS,GAA0B,IAAI,CAAC;gBAC9C,GAAG,CAAC,CAAC,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,KAAK,GAAG,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC;oBAC5E,WAAW,CAAC,UAAU,EAAE,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;gBACvD,CAAC;YACL,CAAC;YAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,YAAY,iBAAS,IAAI,IAAI,YAAY,wBAAgB,CAAC,CAAC,CAAC;gBACvE,IAAM,uBAAuB,GAAgE,IAAI,CAAC;gBAClG,GAAG,CAAC,CAAC,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,uBAAuB,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,GAAG,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC;oBACvF,WAAW,CAAC,UAAU,EAAE,uBAAuB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;gBAClE,CAAC;YACL,CAAC;YAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,YAAY,iBAAS,CAAC,CAAC,CAAC;gBACnC,WAAW,CAAC,UAAU,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;YAC9C,CAAC;QACL,CAAC;IACL,CAAC;IAEO,6BAAQ,GAAhB,UAAiB,UAAiC;QAC9C,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;YAC9C,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACtC,CAAC;IACL,CAAC;IAOO,iCAAY,GAApB,UAAqB,OAAgB;QACjC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,UAAC,UAAU;YAChC,EAAE,CAAC,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC;gBAC3B,UAAU,CAAC,aAAa,CAAC,IAAI,CAAC,UAAC,CAAO,EAAE,CAAO;oBAC3C,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;wBAC1B,MAAM,CAAC,CAAC,CAAC;oBACb,CAAC;oBACD,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;gBAC1C,CAAC,CAAC,CAAC;YACP,CAAC;YAED,IAAI,IAA0B,CAAC;YAC/B,IAAI,SAA+B,CAAC;YACpC,cAAc,KAAa;gBACvB,IAAM,KAAK,GAAyB,EAAC,KAAK,EAAE,KAAK,EAAC,CAAC;gBACnD,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;oBACZ,SAAS,CAAC,IAAI,GAAG,KAAK,CAAC;oBACvB,SAAS,GAAG,KAAK,CAAC;gBACtB,CAAC;gBAAC,IAAI,CAAC,CAAC;oBACJ,IAAI,GAAG,SAAS,GAAG,KAAK,CAAC;gBAC7B,CAAC;YACL,CAAC;YAED,EAAE,CAAC,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC;gBAC3B,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;YACnC,CAAC;YAED,IAAI,CAAC,CAAC,IAAI,qBAAa,CAAC,UAAU,CAAC,IAAI,EAAE,qBAAa,CAAC,kBAAkB,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;YACzF,SAAS,CAAC,QAAQ,GAAG,IAAI,CAAC;YAE1B,EAAE,CAAC,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC;gBACxB,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;YAChC,CAAC;YAED,UAAU,CAAC,aAAa,GAAG,IAAI,CAAC;QACpC,CAAC,CAAC,CAAC;IACP,CAAC;IACL,iBAAC;AAAD,CAAC,AA/JD,CAAgC,+BAAkB,GA+JjD;AA/JY,UAAU;IADtB,sBAAS,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;GACb,UAAU,CA+JtB;AA/JY,gCAAU","sourcesContent":["import {Reflection, ReflectionKind, Decorator, DeclarationReflection, DeclarationHierarchy} from '../../models/reflections/index';\nimport {Type, ReferenceType, TupleType, UnionType, IntersectionType, ArrayType} from '../../models/types/index';\nimport {Component, ConverterComponent} from '../components';\nimport {Converter} from '../converter';\nimport {Context} from '../context';\n\n/**\n * A handler that converts all instances of [[LateResolvingType]] to their renderable equivalents.\n */\n@Component({name: 'type'})\nexport class TypePlugin extends ConverterComponent {\n reflections: DeclarationReflection[] = [];\n\n /**\n * Create a new TypeHandler instance.\n */\n initialize() {\n this.listenTo(this.owner, {\n [Converter.EVENT_RESOLVE]: this.onResolve,\n [Converter.EVENT_RESOLVE_END]: this.onResolveEnd\n });\n }\n\n /**\n * Triggered when the converter resolves a reflection.\n *\n * @param context The context object describing the current state the converter is in.\n * @param reflection The reflection that is currently resolved.\n */\n private onResolve(context: Context, reflection: DeclarationReflection) {\n const project = context.project;\n\n resolveType(reflection, <ReferenceType> reflection.type);\n resolveType(reflection, <ReferenceType> reflection.inheritedFrom);\n resolveType(reflection, <ReferenceType> reflection.overwrites);\n resolveTypes(reflection, reflection.extendedTypes);\n resolveTypes(reflection, reflection.extendedBy);\n resolveTypes(reflection, reflection.implementedTypes);\n\n if (reflection.decorators) {\n reflection.decorators.forEach((decorator: Decorator) => {\n if (decorator.type) {\n resolveType(reflection, decorator.type);\n }\n });\n }\n\n if (reflection.kindOf(ReflectionKind.ClassOrInterface)) {\n this.postpone(reflection);\n\n walk(reflection.implementedTypes, (target) => {\n this.postpone(target);\n if (!target.implementedBy) {\n target.implementedBy = [];\n }\n target.implementedBy.push(new ReferenceType(reflection.name, ReferenceType.SYMBOL_ID_RESOLVED, reflection));\n });\n\n walk(reflection.extendedTypes, (target) => {\n this.postpone(target);\n if (!target.extendedBy) {\n target.extendedBy = [];\n }\n target.extendedBy.push(new ReferenceType(reflection.name, ReferenceType.SYMBOL_ID_RESOLVED, reflection));\n });\n }\n\n function walk(types: Type[], callback: {(declaration: DeclarationReflection): void}) {\n if (!types) {\n return;\n }\n types.forEach((type: ReferenceType) => {\n if (!(type instanceof ReferenceType)) {\n return;\n }\n if (!type.reflection || !(type.reflection instanceof DeclarationReflection)) {\n return;\n }\n callback(<DeclarationReflection> type.reflection);\n });\n }\n\n function resolveTypes(reflection: Reflection, types: Type[]) {\n if (!types) {\n return;\n }\n for (let i = 0, c = types.length; i < c; i++) {\n resolveType(reflection, <ReferenceType> types[i]);\n }\n }\n\n function resolveType(reflection: Reflection, type: Type) {\n if (type instanceof ReferenceType) {\n const referenceType: ReferenceType = <ReferenceType> type;\n if (referenceType.symbolID === ReferenceType.SYMBOL_ID_RESOLVE_BY_NAME) {\n referenceType.reflection = reflection.findReflectionByName(referenceType.name);\n } else if (!referenceType.reflection && referenceType.symbolID !== ReferenceType.SYMBOL_ID_RESOLVED) {\n referenceType.reflection = project.reflections[project.symbolMapping[referenceType.symbolID]];\n }\n\n if (referenceType.typeArguments) {\n referenceType.typeArguments.forEach((typeArgument: Type) => {\n resolveType(reflection, typeArgument);\n });\n }\n } else if (type instanceof TupleType) {\n const tupleType: TupleType = <TupleType> type;\n for (let index = 0, count = tupleType.elements.length; index < count; index++) {\n resolveType(reflection, tupleType.elements[index]);\n }\n } else if (type instanceof UnionType || type instanceof IntersectionType) {\n const unionOrIntersectionType: UnionType | IntersectionType = <UnionType | IntersectionType> type;\n for (let index = 0, count = unionOrIntersectionType.types.length; index < count; index++) {\n resolveType(reflection, unionOrIntersectionType.types[index]);\n }\n } else if (type instanceof ArrayType) {\n resolveType(reflection, type.elementType);\n }\n }\n }\n\n private postpone(reflection: DeclarationReflection) {\n if (this.reflections.indexOf(reflection) === -1) {\n this.reflections.push(reflection);\n }\n }\n\n /**\n * Triggered when the converter has finished resolving a project.\n *\n * @param context The context object describing the current state the converter is in.\n */\n private onResolveEnd(context: Context) {\n this.reflections.forEach((reflection) => {\n if (reflection.implementedBy) {\n reflection.implementedBy.sort((a: Type, b: Type): number => {\n if (a['name'] === b['name']) {\n return 0;\n }\n return a['name'] > b['name'] ? 1 : -1;\n });\n }\n\n let root: DeclarationHierarchy;\n let hierarchy: DeclarationHierarchy;\n function push(types: Type[]) {\n const level: DeclarationHierarchy = {types: types};\n if (hierarchy) {\n hierarchy.next = level;\n hierarchy = level;\n } else {\n root = hierarchy = level;\n }\n }\n\n if (reflection.extendedTypes) {\n push(reflection.extendedTypes);\n }\n\n push([new ReferenceType(reflection.name, ReferenceType.SYMBOL_ID_RESOLVED, reflection)]);\n hierarchy.isTarget = true;\n\n if (reflection.extendedBy) {\n push(reflection.extendedBy);\n }\n\n reflection.typeHierarchy = root;\n });\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"TypePlugin.js","sourceRoot":"","sources":["../../../../src/lib/converter/plugins/TypePlugin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,wDAAoI;AACpI,kDAAkH;AAClH,4CAA8D;AAC9D,0CAAyC;AAOzC;IAAgC,8BAAkB;IADlD;QAAA,qEAgKC;QA9JG,iBAAW,GAA4B,EAAE,CAAC;;IA8J9C,CAAC;IAzJG,+BAAU,GAAV;QACI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK;YACpB,GAAC,qBAAS,CAAC,aAAa,IAAO,IAAI,CAAC,SAAS;YAC7C,GAAC,qBAAS,CAAC,iBAAiB,IAAG,IAAI,CAAC,YAAY;gBAClD,CAAC;;IACP,CAAC;IAQO,8BAAS,GAAjB,UAAkB,OAAgB,EAAE,UAAiC;QAArE,iBA0FC;QAzFG,IAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;QAEhC,WAAW,CAAC,UAAU,EAAkB,UAAU,CAAC,IAAI,CAAC,CAAC;QACzD,WAAW,CAAC,UAAU,EAAkB,UAAU,CAAC,aAAa,CAAC,CAAC;QAClE,WAAW,CAAC,UAAU,EAAkB,UAAU,CAAC,UAAU,CAAC,CAAC;QAC/D,YAAY,CAAC,UAAU,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC;QACnD,YAAY,CAAC,UAAU,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC;QAChD,YAAY,CAAC,UAAU,EAAE,UAAU,CAAC,gBAAgB,CAAC,CAAC;QAEtD,EAAE,CAAC,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC;YACxB,UAAU,CAAC,UAAU,CAAC,OAAO,CAAC,UAAC,SAAoB;gBAC/C,EAAE,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;oBACjB,WAAW,CAAC,UAAU,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC;gBAC5C,CAAC;YACL,CAAC,CAAC,CAAC;QACP,CAAC;QAED,EAAE,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,sBAAc,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC;YACrD,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;YAE1B,IAAI,CAAC,UAAU,CAAC,gBAAgB,EAAE,UAAC,MAAM;gBACrC,KAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;gBACtB,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC;oBACxB,MAAM,CAAC,aAAa,GAAG,EAAE,CAAC;gBAC9B,CAAC;gBACD,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,qBAAa,CAAC,UAAU,CAAC,IAAI,EAAE,qBAAa,CAAC,kBAAkB,EAAE,UAAU,CAAC,CAAC,CAAC;YAChH,CAAC,CAAC,CAAC;YAEH,IAAI,CAAC,UAAU,CAAC,aAAa,EAAE,UAAC,MAAM;gBAClC,KAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;gBACtB,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC;oBACrB,MAAM,CAAC,UAAU,GAAG,EAAE,CAAC;gBAC3B,CAAC;gBACD,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,qBAAa,CAAC,UAAU,CAAC,IAAI,EAAE,qBAAa,CAAC,kBAAkB,EAAE,UAAU,CAAC,CAAC,CAAC;YAC7G,CAAC,CAAC,CAAC;QACP,CAAC;QAED,cAAc,KAAa,EAAE,QAAsD;YAC/E,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;gBACT,MAAM,CAAC;YACX,CAAC;YACD,KAAK,CAAC,OAAO,CAAC,UAAC,IAAmB;gBAC9B,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,YAAY,qBAAa,CAAC,CAAC,CAAC,CAAC;oBACnC,MAAM,CAAC;gBACX,CAAC;gBACD,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,IAAI,CAAC,CAAC,IAAI,CAAC,UAAU,YAAY,6BAAqB,CAAC,CAAC,CAAC,CAAC;oBAC1E,MAAM,CAAC;gBACX,CAAC;gBACD,QAAQ,CAAyB,IAAI,CAAC,UAAU,CAAC,CAAC;YACtD,CAAC,CAAC,CAAC;QACP,CAAC;QAED,sBAAsB,UAAsB,EAAE,KAAa;YACvD,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;gBACT,MAAM,CAAC;YACX,CAAC;YACD,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;gBAC3C,WAAW,CAAC,UAAU,EAAkB,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;YACtD,CAAC;QACL,CAAC;QAED,qBAAqB,UAAsB,EAAE,IAAU;YACnD,EAAE,CAAC,CAAC,IAAI,YAAY,qBAAa,CAAC,CAAC,CAAC;gBAChC,IAAM,aAAa,GAAkC,IAAI,CAAC;gBAC1D,EAAE,CAAC,CAAC,aAAa,CAAC,QAAQ,KAAK,qBAAa,CAAC,yBAAyB,CAAC,CAAC,CAAC;oBACrE,aAAa,CAAC,UAAU,GAAG,UAAU,CAAC,oBAAoB,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;gBACnF,CAAC;gBAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,UAAU,IAAI,aAAa,CAAC,QAAQ,KAAK,qBAAa,CAAC,kBAAkB,CAAC,CAAC,CAAC;oBAClG,aAAa,CAAC,UAAU,GAAG,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,aAAa,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC;gBAClG,CAAC;gBAED,EAAE,CAAC,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC,CAAC;oBAC9B,aAAa,CAAC,aAAa,CAAC,OAAO,CAAC,UAAC,YAAkB;wBACnD,WAAW,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC;oBAC1C,CAAC,CAAC,CAAC;gBACP,CAAC;YACL,CAAC;YAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,YAAY,iBAAS,CAAC,CAAC,CAAC;gBACnC,IAAM,SAAS,GAA0B,IAAI,CAAC;gBAC9C,GAAG,CAAC,CAAC,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,KAAK,GAAG,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC;oBAC5E,WAAW,CAAC,UAAU,EAAE,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;gBACvD,CAAC;YACL,CAAC;YAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,YAAY,iBAAS,IAAI,IAAI,YAAY,wBAAgB,CAAC,CAAC,CAAC;gBACvE,IAAM,uBAAuB,GAAgE,IAAI,CAAC;gBAClG,GAAG,CAAC,CAAC,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,uBAAuB,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,GAAG,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC;oBACvF,WAAW,CAAC,UAAU,EAAE,uBAAuB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;gBAClE,CAAC;YACL,CAAC;YAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,YAAY,iBAAS,CAAC,CAAC,CAAC;gBACnC,WAAW,CAAC,UAAU,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;YAC9C,CAAC;QACL,CAAC;IACL,CAAC;IAEO,6BAAQ,GAAhB,UAAiB,UAAiC;QAC9C,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;YAC9C,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACtC,CAAC;IACL,CAAC;IAOO,iCAAY,GAApB,UAAqB,OAAgB;QACjC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,UAAC,UAAU;YAChC,EAAE,CAAC,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC;gBAC3B,UAAU,CAAC,aAAa,CAAC,IAAI,CAAC,UAAC,CAAO,EAAE,CAAO;oBAC3C,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;wBAC1B,MAAM,CAAC,CAAC,CAAC;oBACb,CAAC;oBACD,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;gBAC1C,CAAC,CAAC,CAAC;YACP,CAAC;YAED,IAAI,IAA0B,CAAC;YAC/B,IAAI,SAA+B,CAAC;YACpC,cAAc,KAAa;gBACvB,IAAM,KAAK,GAAyB,EAAC,KAAK,EAAE,KAAK,EAAC,CAAC;gBACnD,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;oBACZ,SAAS,CAAC,IAAI,GAAG,KAAK,CAAC;oBACvB,SAAS,GAAG,KAAK,CAAC;gBACtB,CAAC;gBAAC,IAAI,CAAC,CAAC;oBACJ,IAAI,GAAG,SAAS,GAAG,KAAK,CAAC;gBAC7B,CAAC;YACL,CAAC;YAED,EAAE,CAAC,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC;gBAC3B,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;YACnC,CAAC;YAED,IAAI,CAAC,CAAC,IAAI,qBAAa,CAAC,UAAU,CAAC,IAAI,EAAE,qBAAa,CAAC,kBAAkB,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;YACzF,SAAS,CAAC,QAAQ,GAAG,IAAI,CAAC;YAE1B,EAAE,CAAC,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC;gBACxB,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;YAChC,CAAC;YAED,UAAU,CAAC,aAAa,GAAG,IAAI,CAAC;QACpC,CAAC,CAAC,CAAC;IACP,CAAC;IA9JQ,UAAU;QADtB,sBAAS,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;OACb,UAAU,CA+JtB;IAAD,iBAAC;CAAA,AA/JD,CAAgC,+BAAkB,GA+JjD;AA/JY,gCAAU","sourcesContent":["import { Reflection, ReflectionKind, Decorator, DeclarationReflection, DeclarationHierarchy } from '../../models/reflections/index';\nimport { Type, ReferenceType, TupleType, UnionType, IntersectionType, ArrayType } from '../../models/types/index';\nimport { Component, ConverterComponent } from '../components';\nimport { Converter } from '../converter';\nimport { Context } from '../context';\n\n/**\n * A handler that converts all instances of [[LateResolvingType]] to their renderable equivalents.\n */\n@Component({name: 'type'})\nexport class TypePlugin extends ConverterComponent {\n reflections: DeclarationReflection[] = [];\n\n /**\n * Create a new TypeHandler instance.\n */\n initialize() {\n this.listenTo(this.owner, {\n [Converter.EVENT_RESOLVE]: this.onResolve,\n [Converter.EVENT_RESOLVE_END]: this.onResolveEnd\n });\n }\n\n /**\n * Triggered when the converter resolves a reflection.\n *\n * @param context The context object describing the current state the converter is in.\n * @param reflection The reflection that is currently resolved.\n */\n private onResolve(context: Context, reflection: DeclarationReflection) {\n const project = context.project;\n\n resolveType(reflection, <ReferenceType> reflection.type);\n resolveType(reflection, <ReferenceType> reflection.inheritedFrom);\n resolveType(reflection, <ReferenceType> reflection.overwrites);\n resolveTypes(reflection, reflection.extendedTypes);\n resolveTypes(reflection, reflection.extendedBy);\n resolveTypes(reflection, reflection.implementedTypes);\n\n if (reflection.decorators) {\n reflection.decorators.forEach((decorator: Decorator) => {\n if (decorator.type) {\n resolveType(reflection, decorator.type);\n }\n });\n }\n\n if (reflection.kindOf(ReflectionKind.ClassOrInterface)) {\n this.postpone(reflection);\n\n walk(reflection.implementedTypes, (target) => {\n this.postpone(target);\n if (!target.implementedBy) {\n target.implementedBy = [];\n }\n target.implementedBy.push(new ReferenceType(reflection.name, ReferenceType.SYMBOL_ID_RESOLVED, reflection));\n });\n\n walk(reflection.extendedTypes, (target) => {\n this.postpone(target);\n if (!target.extendedBy) {\n target.extendedBy = [];\n }\n target.extendedBy.push(new ReferenceType(reflection.name, ReferenceType.SYMBOL_ID_RESOLVED, reflection));\n });\n }\n\n function walk(types: Type[], callback: {(declaration: DeclarationReflection): void}) {\n if (!types) {\n return;\n }\n types.forEach((type: ReferenceType) => {\n if (!(type instanceof ReferenceType)) {\n return;\n }\n if (!type.reflection || !(type.reflection instanceof DeclarationReflection)) {\n return;\n }\n callback(<DeclarationReflection> type.reflection);\n });\n }\n\n function resolveTypes(reflection: Reflection, types: Type[]) {\n if (!types) {\n return;\n }\n for (let i = 0, c = types.length; i < c; i++) {\n resolveType(reflection, <ReferenceType> types[i]);\n }\n }\n\n function resolveType(reflection: Reflection, type: Type) {\n if (type instanceof ReferenceType) {\n const referenceType: ReferenceType = <ReferenceType> type;\n if (referenceType.symbolID === ReferenceType.SYMBOL_ID_RESOLVE_BY_NAME) {\n referenceType.reflection = reflection.findReflectionByName(referenceType.name);\n } else if (!referenceType.reflection && referenceType.symbolID !== ReferenceType.SYMBOL_ID_RESOLVED) {\n referenceType.reflection = project.reflections[project.symbolMapping[referenceType.symbolID]];\n }\n\n if (referenceType.typeArguments) {\n referenceType.typeArguments.forEach((typeArgument: Type) => {\n resolveType(reflection, typeArgument);\n });\n }\n } else if (type instanceof TupleType) {\n const tupleType: TupleType = <TupleType> type;\n for (let index = 0, count = tupleType.elements.length; index < count; index++) {\n resolveType(reflection, tupleType.elements[index]);\n }\n } else if (type instanceof UnionType || type instanceof IntersectionType) {\n const unionOrIntersectionType: UnionType | IntersectionType = <UnionType | IntersectionType> type;\n for (let index = 0, count = unionOrIntersectionType.types.length; index < count; index++) {\n resolveType(reflection, unionOrIntersectionType.types[index]);\n }\n } else if (type instanceof ArrayType) {\n resolveType(reflection, type.elementType);\n }\n }\n }\n\n private postpone(reflection: DeclarationReflection) {\n if (this.reflections.indexOf(reflection) === -1) {\n this.reflections.push(reflection);\n }\n }\n\n /**\n * Triggered when the converter has finished resolving a project.\n *\n * @param context The context object describing the current state the converter is in.\n */\n private onResolveEnd(context: Context) {\n this.reflections.forEach((reflection) => {\n if (reflection.implementedBy) {\n reflection.implementedBy.sort((a: Type, b: Type): number => {\n if (a['name'] === b['name']) {\n return 0;\n }\n return a['name'] > b['name'] ? 1 : -1;\n });\n }\n\n let root: DeclarationHierarchy;\n let hierarchy: DeclarationHierarchy;\n function push(types: Type[]) {\n const level: DeclarationHierarchy = {types: types};\n if (hierarchy) {\n hierarchy.next = level;\n hierarchy = level;\n } else {\n root = hierarchy = level;\n }\n }\n\n if (reflection.extendedTypes) {\n push(reflection.extendedTypes);\n }\n\n push([new ReferenceType(reflection.name, ReferenceType.SYMBOL_ID_RESOLVED, reflection)]);\n hierarchy.isTarget = true;\n\n if (reflection.extendedBy) {\n push(reflection.extendedBy);\n }\n\n reflection.typeHierarchy = root;\n });\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/plugins/index.js.map b/node_modules/typedoc/dist/lib/converter/plugins/index.js.map
index e4efdd2d5..1b823f2a4 100644
--- a/node_modules/typedoc/dist/lib/converter/plugins/index.js.map
+++ b/node_modules/typedoc/dist/lib/converter/plugins/index.js.map
@@ -1 +1 @@
-{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/converter/plugins/index.ts"],"names":[],"mappings":";;AAAA,iDAA8C;AAAtC,wCAAA,aAAa,CAAA;AACrB,qDAAkD;AAA1C,4CAAA,eAAe,CAAA;AACvB,yDAAsD;AAA9C,gDAAA,iBAAiB,CAAA;AACzB,6DAA0D;AAAlD,oDAAA,mBAAmB,CAAA;AAC3B,+CAA4C;AAApC,sCAAA,YAAY,CAAA;AACpB,6CAA0C;AAAlC,oCAAA,WAAW,CAAA;AACnB,uDAAoD;AAA5C,8CAAA,gBAAgB,CAAA;AACxB,iDAA8C;AAAtC,wCAAA,aAAa,CAAA;AACrB,+CAA4C;AAApC,sCAAA,YAAY,CAAA;AACpB,2CAAwC;AAAhC,kCAAA,UAAU,CAAA","sourcesContent":["export {CommentPlugin} from './CommentPlugin';\nexport {DecoratorPlugin} from './DecoratorPlugin';\nexport {DeepCommentPlugin} from './DeepCommentPlugin';\nexport {DynamicModulePlugin} from './DynamicModulePlugin';\nexport {GitHubPlugin} from './GitHubPlugin';\nexport {GroupPlugin} from './GroupPlugin';\nexport {ImplementsPlugin} from './ImplementsPlugin';\nexport {PackagePlugin} from './PackagePlugin';\nexport {SourcePlugin} from './SourcePlugin';\nexport {TypePlugin} from './TypePlugin';\n"]} \ No newline at end of file
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/converter/plugins/index.ts"],"names":[],"mappings":";;AAAA,iDAAgD;AAAvC,wCAAA,aAAa,CAAA;AACtB,qDAAoD;AAA3C,4CAAA,eAAe,CAAA;AACxB,yDAAwD;AAA/C,gDAAA,iBAAiB,CAAA;AAC1B,6DAA4D;AAAnD,oDAAA,mBAAmB,CAAA;AAC5B,+CAA8C;AAArC,sCAAA,YAAY,CAAA;AACrB,6CAA4C;AAAnC,oCAAA,WAAW,CAAA;AACpB,uDAAsD;AAA7C,8CAAA,gBAAgB,CAAA;AACzB,iDAAgD;AAAvC,wCAAA,aAAa,CAAA;AACtB,+CAA8C;AAArC,sCAAA,YAAY,CAAA;AACrB,2CAA0C;AAAjC,kCAAA,UAAU,CAAA","sourcesContent":["export { CommentPlugin } from './CommentPlugin';\nexport { DecoratorPlugin } from './DecoratorPlugin';\nexport { DeepCommentPlugin } from './DeepCommentPlugin';\nexport { DynamicModulePlugin } from './DynamicModulePlugin';\nexport { GitHubPlugin } from './GitHubPlugin';\nexport { GroupPlugin } from './GroupPlugin';\nexport { ImplementsPlugin } from './ImplementsPlugin';\nexport { PackagePlugin } from './PackagePlugin';\nexport { SourcePlugin } from './SourcePlugin';\nexport { TypePlugin } from './TypePlugin';\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/types/alias.js b/node_modules/typedoc/dist/lib/converter/types/alias.js
index bea1cf65a..8b1229ab0 100644
--- a/node_modules/typedoc/dist/lib/converter/types/alias.js
+++ b/node_modules/typedoc/dist/lib/converter/types/alias.js
@@ -59,10 +59,10 @@ var AliasConverter = (function (_super) {
}
return result;
};
+ AliasConverter = __decorate([
+ components_1.Component({ name: 'type:alias' })
+ ], AliasConverter);
return AliasConverter;
}(components_1.ConverterTypeComponent));
-AliasConverter = __decorate([
- components_1.Component({ name: 'type:alias' })
-], AliasConverter);
exports.AliasConverter = AliasConverter;
//# sourceMappingURL=alias.js.map \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/types/alias.js.map b/node_modules/typedoc/dist/lib/converter/types/alias.js.map
index 8eb631170..d8cba0d55 100644
--- a/node_modules/typedoc/dist/lib/converter/types/alias.js.map
+++ b/node_modules/typedoc/dist/lib/converter/types/alias.js.map
@@ -1 +1 @@
-{"version":3,"file":"alias.js","sourceRoot":"","sources":["../../../../src/lib/converter/types/alias.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AACA,uCAAyC;AAEzC,4CAAiD;AACjD,4CAAmF;AAInF,IAAa,cAAc;IAAS,kCAAsB;IAD1D;QAAA,qEA2EC;QArEG,cAAQ,GAAG,GAAG,CAAC;;IAqEnB,CAAC;IAvDG,qCAAY,GAAZ,UAAa,OAAgB,EAAE,IAA0B,EAAE,IAAa;QACpE,EAAE,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;YACnC,MAAM,CAAC,KAAK,CAAC;QACjB,CAAC;QACD,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;YACf,MAAM,CAAC,IAAI,CAAC;QAChB,CAAC;QAED,IAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;QAChC,IAAI,UAAU,GAAG,OAAO,CAAC,qBAAqB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACvE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;YACrB,MAAM,CAAC,KAAK,CAAC;QACjB,CAAC;QACD,EAAE,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;YACrC,UAAU,CAAC,KAAK,EAAE,CAAC;QACvB,CAAC;QAED,IAAI,QAAQ,GAAG,GAAG,CAAC,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC3D,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;YACnB,MAAM,CAAC,KAAK,CAAC;QACjB,CAAC;QAED,IAAI,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;QAC1D,UAAU,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC;QACvC,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC;QAEnC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACvD,CAAC;IAkBD,oCAAW,GAAX,UAAY,OAAgB,EAAE,IAA0B;QAAxD,iBASC;QARG,IAAM,IAAI,GAAG,GAAG,CAAC,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC9C,IAAM,MAAM,GAAG,IAAI,qBAAa,CAAC,IAAI,EAAE,qBAAa,CAAC,yBAAyB,CAAC,CAAC;QAEhF,EAAE,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;YACrB,MAAM,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,UAAA,CAAC,IAAI,OAAA,KAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC,CAAC,EAAlC,CAAkC,CAAC,CAAC;QAC3F,CAAC;QAED,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IACL,qBAAC;AAAD,CAAC,AA1ED,CAAoC,mCAAsB,GA0EzD;AA1EY,cAAc;IAD1B,sBAAS,CAAC,EAAC,IAAI,EAAE,YAAY,EAAC,CAAC;GACnB,cAAc,CA0E1B;AA1EY,wCAAc","sourcesContent":["import * as ts from 'typescript';\nimport * as _ts from '../../ts-internal';\n\nimport {ReferenceType} from '../../models/index';\nimport {Component, ConverterTypeComponent, TypeNodeConverter} from '../components';\nimport {Context} from '../context';\n\n@Component({name: 'type:alias'})\nexport class AliasConverter extends ConverterTypeComponent implements TypeNodeConverter<ts.Type, ts.TypeReferenceNode> {\n /**\n * The priority this converter should be executed with.\n * A higher priority means the converter will be applied earlier.\n */\n priority = 100;\n\n /**\n * Test whether the given node and type definitions represent a type alias.\n *\n * The compiler resolves type aliases pretty early and there is no field telling us\n * whether the given node was a type alias or not. So we have to compare the type name of the\n * node with the type name of the type symbol.\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The node that should be tested.\n * @param type The type of the node that should be tested.\n * @returns TRUE when the given node and type look like a type alias, otherwise FALSE.\n */\n supportsNode(context: Context, node: ts.TypeReferenceNode, type: ts.Type): boolean {\n if (!type || !node || !node.typeName) {\n return false;\n }\n if (!type.symbol) {\n return true;\n }\n\n const checker = context.checker;\n let symbolName = checker.getFullyQualifiedName(type.symbol).split('.');\n if (!symbolName.length) {\n return false;\n }\n if (symbolName[0].substr(0, 1) === '\"') {\n symbolName.shift();\n }\n\n let nodeName = _ts.getTextOfNode(node.typeName).split('.');\n if (!nodeName.length) {\n return false;\n }\n\n let common = Math.min(symbolName.length, nodeName.length);\n symbolName = symbolName.slice(-common);\n nodeName = nodeName.slice(-common);\n\n return nodeName.join('.') !== symbolName.join('.');\n }\n\n /**\n * Create a reflection for the given type alias node.\n *\n * This is a node based converter with no type equivalent.\n *\n * Use [[isTypeAlias]] beforehand to test whether a given type/node combination is\n * pointing to a type alias.\n *\n * ```\n * type MyNumber = number;\n * let someValue: MyNumber;\n * ```\n *\n * @param node The node whose type should be reflected.\n * @returns A type reference pointing to the type alias definition.\n */\n convertNode(context: Context, node: ts.TypeReferenceNode): ReferenceType {\n const name = _ts.getTextOfNode(node.typeName);\n const result = new ReferenceType(name, ReferenceType.SYMBOL_ID_RESOLVE_BY_NAME);\n\n if (node.typeArguments) {\n result.typeArguments = node.typeArguments.map(n => this.owner.convertType(context, n));\n }\n\n return result;\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"alias.js","sourceRoot":"","sources":["../../../../src/lib/converter/types/alias.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AACA,uCAAyC;AAEzC,4CAAmD;AACnD,4CAAqF;AAIrF;IAAoC,kCAAsB;IAD1D;QAAA,qEA2EC;QArEG,cAAQ,GAAG,GAAG,CAAC;;IAqEnB,CAAC;IAvDG,qCAAY,GAAZ,UAAa,OAAgB,EAAE,IAA0B,EAAE,IAAa;QACpE,EAAE,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;YACnC,MAAM,CAAC,KAAK,CAAC;QACjB,CAAC;QACD,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;YACf,MAAM,CAAC,IAAI,CAAC;QAChB,CAAC;QAED,IAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;QAChC,IAAI,UAAU,GAAG,OAAO,CAAC,qBAAqB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACvE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;YACrB,MAAM,CAAC,KAAK,CAAC;QACjB,CAAC;QACD,EAAE,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;YACrC,UAAU,CAAC,KAAK,EAAE,CAAC;QACvB,CAAC;QAED,IAAI,QAAQ,GAAG,GAAG,CAAC,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC3D,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;YACnB,MAAM,CAAC,KAAK,CAAC;QACjB,CAAC;QAED,IAAI,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;QAC1D,UAAU,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC;QACvC,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC;QAEnC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACvD,CAAC;IAkBD,oCAAW,GAAX,UAAY,OAAgB,EAAE,IAA0B;QAAxD,iBASC;QARG,IAAM,IAAI,GAAG,GAAG,CAAC,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC9C,IAAM,MAAM,GAAG,IAAI,qBAAa,CAAC,IAAI,EAAE,qBAAa,CAAC,yBAAyB,CAAC,CAAC;QAEhF,EAAE,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;YACrB,MAAM,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,UAAA,CAAC,IAAI,OAAA,KAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC,CAAC,EAAlC,CAAkC,CAAC,CAAC;QAC3F,CAAC;QAED,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IAzEQ,cAAc;QAD1B,sBAAS,CAAC,EAAC,IAAI,EAAE,YAAY,EAAC,CAAC;OACnB,cAAc,CA0E1B;IAAD,qBAAC;CAAA,AA1ED,CAAoC,mCAAsB,GA0EzD;AA1EY,wCAAc","sourcesContent":["import * as ts from 'typescript';\nimport * as _ts from '../../ts-internal';\n\nimport { ReferenceType } from '../../models/index';\nimport { Component, ConverterTypeComponent, TypeNodeConverter } from '../components';\nimport { Context } from '../context';\n\n@Component({name: 'type:alias'})\nexport class AliasConverter extends ConverterTypeComponent implements TypeNodeConverter<ts.Type, ts.TypeReferenceNode> {\n /**\n * The priority this converter should be executed with.\n * A higher priority means the converter will be applied earlier.\n */\n priority = 100;\n\n /**\n * Test whether the given node and type definitions represent a type alias.\n *\n * The compiler resolves type aliases pretty early and there is no field telling us\n * whether the given node was a type alias or not. So we have to compare the type name of the\n * node with the type name of the type symbol.\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The node that should be tested.\n * @param type The type of the node that should be tested.\n * @returns TRUE when the given node and type look like a type alias, otherwise FALSE.\n */\n supportsNode(context: Context, node: ts.TypeReferenceNode, type: ts.Type): boolean {\n if (!type || !node || !node.typeName) {\n return false;\n }\n if (!type.symbol) {\n return true;\n }\n\n const checker = context.checker;\n let symbolName = checker.getFullyQualifiedName(type.symbol).split('.');\n if (!symbolName.length) {\n return false;\n }\n if (symbolName[0].substr(0, 1) === '\"') {\n symbolName.shift();\n }\n\n let nodeName = _ts.getTextOfNode(node.typeName).split('.');\n if (!nodeName.length) {\n return false;\n }\n\n let common = Math.min(symbolName.length, nodeName.length);\n symbolName = symbolName.slice(-common);\n nodeName = nodeName.slice(-common);\n\n return nodeName.join('.') !== symbolName.join('.');\n }\n\n /**\n * Create a reflection for the given type alias node.\n *\n * This is a node based converter with no type equivalent.\n *\n * Use [[isTypeAlias]] beforehand to test whether a given type/node combination is\n * pointing to a type alias.\n *\n * ```\n * type MyNumber = number;\n * let someValue: MyNumber;\n * ```\n *\n * @param node The node whose type should be reflected.\n * @returns A type reference pointing to the type alias definition.\n */\n convertNode(context: Context, node: ts.TypeReferenceNode): ReferenceType {\n const name = _ts.getTextOfNode(node.typeName);\n const result = new ReferenceType(name, ReferenceType.SYMBOL_ID_RESOLVE_BY_NAME);\n\n if (node.typeArguments) {\n result.typeArguments = node.typeArguments.map(n => this.owner.convertType(context, n));\n }\n\n return result;\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/types/array.js b/node_modules/typedoc/dist/lib/converter/types/array.js
index d81e043fe..57900c101 100644
--- a/node_modules/typedoc/dist/lib/converter/types/array.js
+++ b/node_modules/typedoc/dist/lib/converter/types/array.js
@@ -38,10 +38,10 @@ var ArrayConverter = (function (_super) {
var result = this.owner.convertType(context, null, type.typeArguments[0]);
return new index_1.ArrayType(result);
};
+ ArrayConverter = __decorate([
+ components_1.Component({ name: 'type:array' })
+ ], ArrayConverter);
return ArrayConverter;
}(components_1.ConverterTypeComponent));
-ArrayConverter = __decorate([
- components_1.Component({ name: 'type:array' })
-], ArrayConverter);
exports.ArrayConverter = ArrayConverter;
//# sourceMappingURL=array.js.map \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/types/array.js.map b/node_modules/typedoc/dist/lib/converter/types/array.js.map
index 33b8468f9..b71559c2d 100644
--- a/node_modules/typedoc/dist/lib/converter/types/array.js.map
+++ b/node_modules/typedoc/dist/lib/converter/types/array.js.map
@@ -1 +1 @@
-{"version":3,"file":"array.js","sourceRoot":"","sources":["../../../../src/lib/converter/types/array.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AAEjC,4CAAmD;AACnD,4CAA+E;AAI/E,IAAa,cAAc;IAAS,kCAAsB;IAA1D;;IAsDA,CAAC;IAlDG,qCAAY,GAAZ,UAAa,OAAgB,EAAE,IAAsB;QACjD,MAAM,CAAC,IAAI,CAAC,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC;IACjD,CAAC;IAKD,qCAAY,GAAZ,UAAa,OAAgB,EAAE,IAAsB;QAEjD,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC,CAAC,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,aAAa,CAAC,MAAM,KAAK,CAAC,CAAC;IACnL,CAAC;IAeD,oCAAW,GAAX,UAAY,OAAgB,EAAE,IAAsB;QAChD,IAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;QAEjE,MAAM,CAAC,IAAI,iBAAS,CAAC,MAAM,CAAC,CAAC;IACjC,CAAC;IAgBD,oCAAW,GAAX,UAAY,OAAgB,EAAE,IAAsB;QAChD,IAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;QAE5E,MAAM,CAAC,IAAI,iBAAS,CAAC,MAAM,CAAC,CAAC;IACjC,CAAC;IACL,qBAAC;AAAD,CAAC,AAtDD,CAAoC,mCAAsB,GAsDzD;AAtDY,cAAc;IAD1B,sBAAS,CAAC,EAAC,IAAI,EAAE,YAAY,EAAC,CAAC;GACnB,cAAc,CAsD1B;AAtDY,wCAAc","sourcesContent":["import * as ts from 'typescript';\n\nimport {Type, ArrayType} from '../../models/index';\nimport {Component, ConverterTypeComponent, TypeConverter} from '../components';\nimport {Context} from '../context';\n\n@Component({name: 'type:array'})\nexport class ArrayConverter extends ConverterTypeComponent implements TypeConverter<ts.TypeReference, ts.ArrayTypeNode> {\n /**\n * Test whether this converter can handle the given TypeScript node.\n */\n supportsNode(context: Context, node: ts.ArrayTypeNode): boolean {\n return node.kind === ts.SyntaxKind.ArrayType;\n }\n\n /**\n * Test whether this converter can handle the given TypeScript type.\n */\n supportsType(context: Context, type: ts.TypeReference): boolean {\n // Is there a better way to detect the {\"type\":\"reference\",\"name\":\"Array\",\"typeArguments\":{...}} types that are in fact arrays?\n return !!(type.flags & ts.TypeFlags.Object) && !!type.symbol && type.symbol.name === 'Array' && !type.symbol.parent && !!type.typeArguments && type.typeArguments.length === 1;\n }\n\n /**\n * Convert the given array type node to its type reflection.\n *\n * This is a node based converter with no type equivalent.\n *\n * ```\n * let someValue: number[];\n * ```\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The array type node that should be converted.\n * @returns The type reflection representing the given array type node.\n */\n convertNode(context: Context, node: ts.ArrayTypeNode): Type {\n const result = this.owner.convertType(context, node.elementType);\n\n return new ArrayType(result);\n }\n\n /**\n * Convert the given type reference to its type reflection.\n *\n * This is a type based converter, see [[convertTypeReference]] for the node equivalent.\n *\n * ```\n * class SomeClass { }\n * let someValue: SomeClass;\n * ```\n *\n * @param context The context object describing the current state the converter is in.\n * @param type The type reference that should be converted.\n * @returns The type reflection representing the given type reference.\n */\n convertType(context: Context, type: ts.TypeReference): Type {\n const result = this.owner.convertType(context, null, type.typeArguments[0]);\n\n return new ArrayType(result);\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"array.js","sourceRoot":"","sources":["../../../../src/lib/converter/types/array.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AAEjC,4CAAqD;AACrD,4CAAiF;AAIjF;IAAoC,kCAAsB;IAA1D;;IAsDA,CAAC;IAlDG,qCAAY,GAAZ,UAAa,OAAgB,EAAE,IAAsB;QACjD,MAAM,CAAC,IAAI,CAAC,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC;IACjD,CAAC;IAKD,qCAAY,GAAZ,UAAa,OAAgB,EAAE,IAAsB;QAEjD,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC,CAAC,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,aAAa,CAAC,MAAM,KAAK,CAAC,CAAC;IACnL,CAAC;IAeD,oCAAW,GAAX,UAAY,OAAgB,EAAE,IAAsB;QAChD,IAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;QAEjE,MAAM,CAAC,IAAI,iBAAS,CAAC,MAAM,CAAC,CAAC;IACjC,CAAC;IAgBD,oCAAW,GAAX,UAAY,OAAgB,EAAE,IAAsB;QAChD,IAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;QAE5E,MAAM,CAAC,IAAI,iBAAS,CAAC,MAAM,CAAC,CAAC;IACjC,CAAC;IArDQ,cAAc;QAD1B,sBAAS,CAAC,EAAC,IAAI,EAAE,YAAY,EAAC,CAAC;OACnB,cAAc,CAsD1B;IAAD,qBAAC;CAAA,AAtDD,CAAoC,mCAAsB,GAsDzD;AAtDY,wCAAc","sourcesContent":["import * as ts from 'typescript';\n\nimport { Type, ArrayType } from '../../models/index';\nimport { Component, ConverterTypeComponent, TypeConverter } from '../components';\nimport { Context } from '../context';\n\n@Component({name: 'type:array'})\nexport class ArrayConverter extends ConverterTypeComponent implements TypeConverter<ts.TypeReference, ts.ArrayTypeNode> {\n /**\n * Test whether this converter can handle the given TypeScript node.\n */\n supportsNode(context: Context, node: ts.ArrayTypeNode): boolean {\n return node.kind === ts.SyntaxKind.ArrayType;\n }\n\n /**\n * Test whether this converter can handle the given TypeScript type.\n */\n supportsType(context: Context, type: ts.TypeReference): boolean {\n // Is there a better way to detect the {\"type\":\"reference\",\"name\":\"Array\",\"typeArguments\":{...}} types that are in fact arrays?\n return !!(type.flags & ts.TypeFlags.Object) && !!type.symbol && type.symbol.name === 'Array' && !type.symbol.parent && !!type.typeArguments && type.typeArguments.length === 1;\n }\n\n /**\n * Convert the given array type node to its type reflection.\n *\n * This is a node based converter with no type equivalent.\n *\n * ```\n * let someValue: number[];\n * ```\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The array type node that should be converted.\n * @returns The type reflection representing the given array type node.\n */\n convertNode(context: Context, node: ts.ArrayTypeNode): Type {\n const result = this.owner.convertType(context, node.elementType);\n\n return new ArrayType(result);\n }\n\n /**\n * Convert the given type reference to its type reflection.\n *\n * This is a type based converter, see [[convertTypeReference]] for the node equivalent.\n *\n * ```\n * class SomeClass { }\n * let someValue: SomeClass;\n * ```\n *\n * @param context The context object describing the current state the converter is in.\n * @param type The type reference that should be converted.\n * @returns The type reflection representing the given type reference.\n */\n convertType(context: Context, type: ts.TypeReference): Type {\n const result = this.owner.convertType(context, null, type.typeArguments[0]);\n\n return new ArrayType(result);\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/types/binding-array.js b/node_modules/typedoc/dist/lib/converter/types/binding-array.js
index f3c1d9985..a01064676 100644
--- a/node_modules/typedoc/dist/lib/converter/types/binding-array.js
+++ b/node_modules/typedoc/dist/lib/converter/types/binding-array.js
@@ -35,10 +35,10 @@ var BindingArrayConverter = (function (_super) {
});
return new index_1.TupleType(types);
};
+ BindingArrayConverter = __decorate([
+ components_1.Component({ name: 'type:binding-array' })
+ ], BindingArrayConverter);
return BindingArrayConverter;
}(components_1.ConverterTypeComponent));
-BindingArrayConverter = __decorate([
- components_1.Component({ name: 'type:binding-array' })
-], BindingArrayConverter);
exports.BindingArrayConverter = BindingArrayConverter;
//# sourceMappingURL=binding-array.js.map \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/types/binding-array.js.map b/node_modules/typedoc/dist/lib/converter/types/binding-array.js.map
index 180139386..2de9b29c5 100644
--- a/node_modules/typedoc/dist/lib/converter/types/binding-array.js.map
+++ b/node_modules/typedoc/dist/lib/converter/types/binding-array.js.map
@@ -1 +1 @@
-{"version":3,"file":"binding-array.js","sourceRoot":"","sources":["../../../../src/lib/converter/types/binding-array.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AAEjC,4CAAmD;AACnD,4CAAmF;AAInF,IAAa,qBAAqB;IAAS,yCAAsB;IAAjE;;IAwBA,CAAC;IApBG,4CAAY,GAAZ,UAAa,OAAgB,EAAE,IAAuB;QAClD,MAAM,CAAC,IAAI,CAAC,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,mBAAmB,CAAC;IAC3D,CAAC;IASD,2CAAW,GAAX,UAAY,OAAgB,EAAE,IAAuB;QAArD,iBAQC;QAPG,IAAM,KAAK,GAAW,EAAE,CAAC;QAExB,IAAI,CAAC,QAAgC,CAAC,OAAO,CAAC,UAAC,OAAO;YACnD,KAAK,CAAC,IAAI,CAAC,KAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;QACzD,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,IAAI,iBAAS,CAAC,KAAK,CAAC,CAAC;IAChC,CAAC;IACL,4BAAC;AAAD,CAAC,AAxBD,CAA2C,mCAAsB,GAwBhE;AAxBY,qBAAqB;IADjC,sBAAS,CAAC,EAAC,IAAI,EAAE,oBAAoB,EAAC,CAAC;GAC3B,qBAAqB,CAwBjC;AAxBY,sDAAqB","sourcesContent":["import * as ts from 'typescript';\n\nimport {Type, TupleType} from '../../models/index';\nimport {Component, ConverterTypeComponent, TypeNodeConverter} from '../components';\nimport {Context} from '../context';\n\n@Component({name: 'type:binding-array'})\nexport class BindingArrayConverter extends ConverterTypeComponent implements TypeNodeConverter<ts.Type, ts.BindingPattern> {\n /**\n * Test whether this converter can handle the given TypeScript node.\n */\n supportsNode(context: Context, node: ts.BindingPattern): boolean {\n return node.kind === ts.SyntaxKind.ArrayBindingPattern;\n }\n\n /**\n * Convert the given binding pattern to its type reflection.\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The binding pattern that should be converted.\n * @returns The type reflection representing the given binding pattern.\n */\n convertNode(context: Context, node: ts.BindingPattern): Type {\n const types: Type[] = [];\n\n (node.elements as ts.BindingElement[]).forEach((element) => {\n types.push(this.owner.convertType(context, element));\n });\n\n return new TupleType(types);\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"binding-array.js","sourceRoot":"","sources":["../../../../src/lib/converter/types/binding-array.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AAEjC,4CAAqD;AACrD,4CAAqF;AAIrF;IAA2C,yCAAsB;IAAjE;;IAwBA,CAAC;IApBG,4CAAY,GAAZ,UAAa,OAAgB,EAAE,IAAuB;QAClD,MAAM,CAAC,IAAI,CAAC,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,mBAAmB,CAAC;IAC3D,CAAC;IASD,2CAAW,GAAX,UAAY,OAAgB,EAAE,IAAuB;QAArD,iBAQC;QAPG,IAAM,KAAK,GAAW,EAAE,CAAC;QAExB,IAAI,CAAC,QAAgC,CAAC,OAAO,CAAC,UAAC,OAAO;YACnD,KAAK,CAAC,IAAI,CAAC,KAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;QACzD,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,IAAI,iBAAS,CAAC,KAAK,CAAC,CAAC;IAChC,CAAC;IAvBQ,qBAAqB;QADjC,sBAAS,CAAC,EAAC,IAAI,EAAE,oBAAoB,EAAC,CAAC;OAC3B,qBAAqB,CAwBjC;IAAD,4BAAC;CAAA,AAxBD,CAA2C,mCAAsB,GAwBhE;AAxBY,sDAAqB","sourcesContent":["import * as ts from 'typescript';\n\nimport { Type, TupleType } from '../../models/index';\nimport { Component, ConverterTypeComponent, TypeNodeConverter } from '../components';\nimport { Context } from '../context';\n\n@Component({name: 'type:binding-array'})\nexport class BindingArrayConverter extends ConverterTypeComponent implements TypeNodeConverter<ts.Type, ts.BindingPattern> {\n /**\n * Test whether this converter can handle the given TypeScript node.\n */\n supportsNode(context: Context, node: ts.BindingPattern): boolean {\n return node.kind === ts.SyntaxKind.ArrayBindingPattern;\n }\n\n /**\n * Convert the given binding pattern to its type reflection.\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The binding pattern that should be converted.\n * @returns The type reflection representing the given binding pattern.\n */\n convertNode(context: Context, node: ts.BindingPattern): Type {\n const types: Type[] = [];\n\n (node.elements as ts.BindingElement[]).forEach((element) => {\n types.push(this.owner.convertType(context, element));\n });\n\n return new TupleType(types);\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/types/binding-object.js b/node_modules/typedoc/dist/lib/converter/types/binding-object.js
index c594931d1..aa6dcbd09 100644
--- a/node_modules/typedoc/dist/lib/converter/types/binding-object.js
+++ b/node_modules/typedoc/dist/lib/converter/types/binding-object.js
@@ -43,10 +43,10 @@ var BindingObjectConverter = (function (_super) {
});
return new index_1.ReflectionType(declaration);
};
+ BindingObjectConverter = __decorate([
+ components_1.Component({ name: 'type:binding-object' })
+ ], BindingObjectConverter);
return BindingObjectConverter;
}(components_1.ConverterTypeComponent));
-BindingObjectConverter = __decorate([
- components_1.Component({ name: 'type:binding-object' })
-], BindingObjectConverter);
exports.BindingObjectConverter = BindingObjectConverter;
//# sourceMappingURL=binding-object.js.map \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/types/binding-object.js.map b/node_modules/typedoc/dist/lib/converter/types/binding-object.js.map
index bcd67f5a6..f672aade4 100644
--- a/node_modules/typedoc/dist/lib/converter/types/binding-object.js.map
+++ b/node_modules/typedoc/dist/lib/converter/types/binding-object.js.map
@@ -1 +1 @@
-{"version":3,"file":"binding-object.js","sourceRoot":"","sources":["../../../../src/lib/converter/types/binding-object.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AAEjC,4CAA+F;AAC/F,4CAAmF;AAEnF,0CAAuC;AAGvC,IAAa,sBAAsB;IAAS,0CAAsB;IAAlE;;IA+BA,CAAC;IA3BG,6CAAY,GAAZ,UAAa,OAAgB,EAAE,IAAuB;QAClD,MAAM,CAAC,IAAI,CAAC,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,oBAAoB,CAAC;IAC5D,CAAC;IASD,4CAAW,GAAX,UAAY,OAAgB,EAAE,IAAuB;QAArD,iBAeC;QAdG,IAAM,WAAW,GAAG,IAAI,6BAAqB,EAAE,CAAC;QAChD,WAAW,CAAC,IAAI,GAAG,sBAAc,CAAC,WAAW,CAAC;QAC9C,WAAW,CAAC,IAAI,GAAG,QAAQ,CAAC;QAC5B,WAAW,CAAC,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;QAEnC,OAAO,CAAC,kBAAkB,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;QAC9C,OAAO,CAAC,OAAO,CAAC,qBAAS,CAAC,wBAAwB,EAAE,WAAW,EAAE,IAAI,CAAC,CAAC;QACvE,OAAO,CAAC,SAAS,CAAC,WAAW,EAAE;YAC1B,IAAI,CAAC,QAAgC,CAAC,OAAO,CAAC,UAAC,OAAO;gBACnD,KAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;YAC7C,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,IAAI,sBAAc,CAAC,WAAW,CAAC,CAAC;IAC3C,CAAC;IACL,6BAAC;AAAD,CAAC,AA/BD,CAA4C,mCAAsB,GA+BjE;AA/BY,sBAAsB;IADlC,sBAAS,CAAC,EAAC,IAAI,EAAE,qBAAqB,EAAC,CAAC;GAC5B,sBAAsB,CA+BlC;AA/BY,wDAAsB","sourcesContent":["import * as ts from 'typescript';\n\nimport {Type, ReflectionKind, DeclarationReflection, ReflectionType} from '../../models/index';\nimport {Component, ConverterTypeComponent, TypeNodeConverter} from '../components';\nimport {Context} from '../context';\nimport {Converter} from '../converter';\n\n@Component({name: 'type:binding-object'})\nexport class BindingObjectConverter extends ConverterTypeComponent implements TypeNodeConverter<ts.Type, ts.BindingPattern> {\n /**\n * Test whether this converter can handle the given TypeScript node.\n */\n supportsNode(context: Context, node: ts.BindingPattern): boolean {\n return node.kind === ts.SyntaxKind.ObjectBindingPattern;\n }\n\n /**\n * Convert the given binding pattern to its type reflection.\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The binding pattern that should be converted.\n * @returns The type reflection representing the given binding pattern.\n */\n convertNode(context: Context, node: ts.BindingPattern): Type {\n const declaration = new DeclarationReflection();\n declaration.kind = ReflectionKind.TypeLiteral;\n declaration.name = '__type';\n declaration.parent = context.scope;\n\n context.registerReflection(declaration, null);\n context.trigger(Converter.EVENT_CREATE_DECLARATION, declaration, node);\n context.withScope(declaration, () => {\n (node.elements as ts.BindingElement[]).forEach((element) => {\n this.owner.convertNode(context, element);\n });\n });\n\n return new ReflectionType(declaration);\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"binding-object.js","sourceRoot":"","sources":["../../../../src/lib/converter/types/binding-object.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AAEjC,4CAAiG;AACjG,4CAAqF;AAErF,0CAAyC;AAGzC;IAA4C,0CAAsB;IAAlE;;IA+BA,CAAC;IA3BG,6CAAY,GAAZ,UAAa,OAAgB,EAAE,IAAuB;QAClD,MAAM,CAAC,IAAI,CAAC,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,oBAAoB,CAAC;IAC5D,CAAC;IASD,4CAAW,GAAX,UAAY,OAAgB,EAAE,IAAuB;QAArD,iBAeC;QAdG,IAAM,WAAW,GAAG,IAAI,6BAAqB,EAAE,CAAC;QAChD,WAAW,CAAC,IAAI,GAAG,sBAAc,CAAC,WAAW,CAAC;QAC9C,WAAW,CAAC,IAAI,GAAG,QAAQ,CAAC;QAC5B,WAAW,CAAC,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;QAEnC,OAAO,CAAC,kBAAkB,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;QAC9C,OAAO,CAAC,OAAO,CAAC,qBAAS,CAAC,wBAAwB,EAAE,WAAW,EAAE,IAAI,CAAC,CAAC;QACvE,OAAO,CAAC,SAAS,CAAC,WAAW,EAAE;YAC1B,IAAI,CAAC,QAAgC,CAAC,OAAO,CAAC,UAAC,OAAO;gBACnD,KAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;YAC7C,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,IAAI,sBAAc,CAAC,WAAW,CAAC,CAAC;IAC3C,CAAC;IA9BQ,sBAAsB;QADlC,sBAAS,CAAC,EAAC,IAAI,EAAE,qBAAqB,EAAC,CAAC;OAC5B,sBAAsB,CA+BlC;IAAD,6BAAC;CAAA,AA/BD,CAA4C,mCAAsB,GA+BjE;AA/BY,wDAAsB","sourcesContent":["import * as ts from 'typescript';\n\nimport { Type, ReflectionKind, DeclarationReflection, ReflectionType } from '../../models/index';\nimport { Component, ConverterTypeComponent, TypeNodeConverter } from '../components';\nimport { Context } from '../context';\nimport { Converter } from '../converter';\n\n@Component({name: 'type:binding-object'})\nexport class BindingObjectConverter extends ConverterTypeComponent implements TypeNodeConverter<ts.Type, ts.BindingPattern> {\n /**\n * Test whether this converter can handle the given TypeScript node.\n */\n supportsNode(context: Context, node: ts.BindingPattern): boolean {\n return node.kind === ts.SyntaxKind.ObjectBindingPattern;\n }\n\n /**\n * Convert the given binding pattern to its type reflection.\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The binding pattern that should be converted.\n * @returns The type reflection representing the given binding pattern.\n */\n convertNode(context: Context, node: ts.BindingPattern): Type {\n const declaration = new DeclarationReflection();\n declaration.kind = ReflectionKind.TypeLiteral;\n declaration.name = '__type';\n declaration.parent = context.scope;\n\n context.registerReflection(declaration, null);\n context.trigger(Converter.EVENT_CREATE_DECLARATION, declaration, node);\n context.withScope(declaration, () => {\n (node.elements as ts.BindingElement[]).forEach((element) => {\n this.owner.convertNode(context, element);\n });\n });\n\n return new ReflectionType(declaration);\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/types/enum.js b/node_modules/typedoc/dist/lib/converter/types/enum.js
index 69b7ca54e..69726b0b1 100644
--- a/node_modules/typedoc/dist/lib/converter/types/enum.js
+++ b/node_modules/typedoc/dist/lib/converter/types/enum.js
@@ -30,10 +30,10 @@ var EnumConverter = (function (_super) {
EnumConverter.prototype.convertType = function (context, type) {
return index_1.createReferenceType(context, type.symbol);
};
+ EnumConverter = __decorate([
+ components_1.Component({ name: 'type:enum' })
+ ], EnumConverter);
return EnumConverter;
}(components_1.ConverterTypeComponent));
-EnumConverter = __decorate([
- components_1.Component({ name: 'type:enum' })
-], EnumConverter);
exports.EnumConverter = EnumConverter;
//# sourceMappingURL=enum.js.map \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/types/enum.js.map b/node_modules/typedoc/dist/lib/converter/types/enum.js.map
index dc8126283..658acc46e 100644
--- a/node_modules/typedoc/dist/lib/converter/types/enum.js.map
+++ b/node_modules/typedoc/dist/lib/converter/types/enum.js.map
@@ -1 +1 @@
-{"version":3,"file":"enum.js","sourceRoot":"","sources":["../../../../src/lib/converter/types/enum.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AAGjC,4CAAuD;AACvD,4CAAmF;AAInF,IAAa,aAAa;IAAS,iCAAsB;IAAzD;;IAyBA,CAAC;IArBG,oCAAY,GAAZ,UAAa,OAAgB,EAAE,IAAa;QACxC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAC9C,CAAC;IAgBD,mCAAW,GAAX,UAAY,OAAgB,EAAE,IAAa;QACvC,MAAM,CAAC,2BAAmB,CAAC,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IACrD,CAAC;IACL,oBAAC;AAAD,CAAC,AAzBD,CAAmC,mCAAsB,GAyBxD;AAzBY,aAAa;IADzB,sBAAS,CAAC,EAAC,IAAI,EAAE,WAAW,EAAC,CAAC;GAClB,aAAa,CAyBzB;AAzBY,sCAAa","sourcesContent":["import * as ts from 'typescript';\n\nimport {Type} from '../../models/index';\nimport {createReferenceType} from '../factories/index';\nimport {Component, ConverterTypeComponent, TypeTypeConverter} from '../components';\nimport {Context} from '../context';\n\n@Component({name: 'type:enum'})\nexport class EnumConverter extends ConverterTypeComponent implements TypeTypeConverter<ts.Type> {\n /**\n * Test whether this converter can handle the given TypeScript type.\n */\n supportsType(context: Context, type: ts.Type): boolean {\n return !!(type.flags & ts.TypeFlags.Enum);\n }\n\n /**\n * Convert the given enumeration type to its type reflection.\n *\n * This is a type based converter with no node based equivalent.\n *\n * ```\n * enum MyEnum { One, Two, Three }\n * let someValue: MyEnum;\n * ```\n *\n * @param context The context object describing the current state the converter is in.\n * @param type The enumeration type that should be converted.\n * @returns The type reflection representing the given enumeration type.\n */\n convertType(context: Context, type: ts.Type): Type {\n return createReferenceType(context, type.symbol);\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"enum.js","sourceRoot":"","sources":["../../../../src/lib/converter/types/enum.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AAGjC,4CAAyD;AACzD,4CAAqF;AAIrF;IAAmC,iCAAsB;IAAzD;;IAyBA,CAAC;IArBG,oCAAY,GAAZ,UAAa,OAAgB,EAAE,IAAa;QACxC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAC9C,CAAC;IAgBD,mCAAW,GAAX,UAAY,OAAgB,EAAE,IAAa;QACvC,MAAM,CAAC,2BAAmB,CAAC,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IACrD,CAAC;IAxBQ,aAAa;QADzB,sBAAS,CAAC,EAAC,IAAI,EAAE,WAAW,EAAC,CAAC;OAClB,aAAa,CAyBzB;IAAD,oBAAC;CAAA,AAzBD,CAAmC,mCAAsB,GAyBxD;AAzBY,sCAAa","sourcesContent":["import * as ts from 'typescript';\n\nimport { Type } from '../../models/index';\nimport { createReferenceType } from '../factories/index';\nimport { Component, ConverterTypeComponent, TypeTypeConverter } from '../components';\nimport { Context } from '../context';\n\n@Component({name: 'type:enum'})\nexport class EnumConverter extends ConverterTypeComponent implements TypeTypeConverter<ts.Type> {\n /**\n * Test whether this converter can handle the given TypeScript type.\n */\n supportsType(context: Context, type: ts.Type): boolean {\n return !!(type.flags & ts.TypeFlags.Enum);\n }\n\n /**\n * Convert the given enumeration type to its type reflection.\n *\n * This is a type based converter with no node based equivalent.\n *\n * ```\n * enum MyEnum { One, Two, Three }\n * let someValue: MyEnum;\n * ```\n *\n * @param context The context object describing the current state the converter is in.\n * @param type The enumeration type that should be converted.\n * @returns The type reflection representing the given enumeration type.\n */\n convertType(context: Context, type: ts.Type): Type {\n return createReferenceType(context, type.symbol);\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/types/index.js.map b/node_modules/typedoc/dist/lib/converter/types/index.js.map
index 3625aad94..82a9e2874 100644
--- a/node_modules/typedoc/dist/lib/converter/types/index.js.map
+++ b/node_modules/typedoc/dist/lib/converter/types/index.js.map
@@ -1 +1 @@
-{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/converter/types/index.ts"],"names":[],"mappings":";;AAAA,iCAAuC;AAA/B,iCAAA,cAAc,CAAA;AACtB,iCAAuC;AAA/B,iCAAA,cAAc,CAAA;AACtB,iDAAsD;AAA9C,gDAAA,qBAAqB,CAAA;AAC7B,mDAAwD;AAAhD,kDAAA,sBAAsB,CAAA;AAC9B,+BAAqC;AAA7B,+BAAA,aAAa,CAAA;AACrB,yCAA+C;AAAvC,yCAAA,kBAAkB,CAAA;AAC1B,mDAAwD;AAAhD,kDAAA,sBAAsB,CAAA;AAC9B,yCAA+C;AAAvC,yCAAA,kBAAkB,CAAA;AAC1B,+BAAqC;AAA7B,+BAAA,aAAa,CAAA;AACrB,iCAAuC;AAA/B,iCAAA,cAAc,CAAA;AACtB,mDAAwD;AAAhD,kDAAA,sBAAsB,CAAA;AAC9B,iEAAqE;AAA7D,+DAAA,4BAA4B,CAAA;AACpC,qCAA2C;AAAnC,qCAAA,gBAAgB,CAAA","sourcesContent":["export {AliasConverter} from './alias';\nexport {ArrayConverter} from './array';\nexport {BindingArrayConverter} from './binding-array';\nexport {BindingObjectConverter} from './binding-object';\nexport {EnumConverter} from './enum';\nexport {IntrinsicConverter} from './intrinsic';\nexport {StringLiteralConverter} from './string-literal';\nexport {ReferenceConverter} from './reference';\nexport {ThisConverter} from './this';\nexport {TupleConverter} from './tuple';\nexport {TypeParameterConverter} from './type-parameter';\nexport {UnionOrIntersectionConverter} from './union-or-intersection';\nexport {UnknownConverter} from './unknown';\n"]} \ No newline at end of file
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/converter/types/index.ts"],"names":[],"mappings":";;AAAA,iCAAyC;AAAhC,iCAAA,cAAc,CAAA;AACvB,iCAAyC;AAAhC,iCAAA,cAAc,CAAA;AACvB,iDAAwD;AAA/C,gDAAA,qBAAqB,CAAA;AAC9B,mDAA0D;AAAjD,kDAAA,sBAAsB,CAAA;AAC/B,+BAAuC;AAA9B,+BAAA,aAAa,CAAA;AACtB,yCAAiD;AAAxC,yCAAA,kBAAkB,CAAA;AAC3B,mDAA0D;AAAjD,kDAAA,sBAAsB,CAAA;AAC/B,yCAAiD;AAAxC,yCAAA,kBAAkB,CAAA;AAC3B,+BAAuC;AAA9B,+BAAA,aAAa,CAAA;AACtB,iCAAyC;AAAhC,iCAAA,cAAc,CAAA;AACvB,mDAA0D;AAAjD,kDAAA,sBAAsB,CAAA;AAC/B,iEAAuE;AAA9D,+DAAA,4BAA4B,CAAA;AACrC,qCAA6C;AAApC,qCAAA,gBAAgB,CAAA","sourcesContent":["export { AliasConverter } from './alias';\nexport { ArrayConverter } from './array';\nexport { BindingArrayConverter } from './binding-array';\nexport { BindingObjectConverter } from './binding-object';\nexport { EnumConverter } from './enum';\nexport { IntrinsicConverter } from './intrinsic';\nexport { StringLiteralConverter } from './string-literal';\nexport { ReferenceConverter } from './reference';\nexport { ThisConverter } from './this';\nexport { TupleConverter } from './tuple';\nexport { TypeParameterConverter } from './type-parameter';\nexport { UnionOrIntersectionConverter } from './union-or-intersection';\nexport { UnknownConverter } from './unknown';\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/types/intrinsic.js b/node_modules/typedoc/dist/lib/converter/types/intrinsic.js
index c8f2ef3f8..8c6de83c0 100644
--- a/node_modules/typedoc/dist/lib/converter/types/intrinsic.js
+++ b/node_modules/typedoc/dist/lib/converter/types/intrinsic.js
@@ -35,10 +35,10 @@ var IntrinsicConverter = (function (_super) {
var intrinsicName = context.program.getTypeChecker().typeToString(type);
return new index_1.IntrinsicType(intrinsicName);
};
+ IntrinsicConverter = __decorate([
+ components_1.Component({ name: 'type:intrinsic' })
+ ], IntrinsicConverter);
return IntrinsicConverter;
}(components_1.ConverterTypeComponent));
-IntrinsicConverter = __decorate([
- components_1.Component({ name: 'type:intrinsic' })
-], IntrinsicConverter);
exports.IntrinsicConverter = IntrinsicConverter;
//# sourceMappingURL=intrinsic.js.map \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/types/intrinsic.js.map b/node_modules/typedoc/dist/lib/converter/types/intrinsic.js.map
index 4d3d0752f..c548a9b81 100644
--- a/node_modules/typedoc/dist/lib/converter/types/intrinsic.js.map
+++ b/node_modules/typedoc/dist/lib/converter/types/intrinsic.js.map
@@ -1 +1 @@
-{"version":3,"file":"intrinsic.js","sourceRoot":"","sources":["../../../../src/lib/converter/types/intrinsic.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AAEjC,4CAAiD;AACjD,4CAAmF;AAOnF,IAAM,kBAAkB,GAAI,EAAE,CAAC,SAAiB,CAAC,SAAS,CAAC;AAC3D,EAAE,CAAC,CAAC,kBAAkB,KAAK,SAAS,CAAC,CAAC,CAAC;IACnC,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAC;AAC5E,CAAC;AAGD,IAAa,kBAAkB;IAAS,sCAAsB;IAA9D;;IAwBA,CAAC;IApBG,yCAAY,GAAZ,UAAa,OAAgB,EAAE,IAAa;QACxC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,kBAAkB,CAAC,CAAC;IAC/C,CAAC;IAcD,wCAAW,GAAX,UAAY,OAAgB,EAAE,IAAa;QACvC,IAAI,aAAa,GAAG,OAAO,CAAC,OAAO,CAAC,cAAc,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QACxE,MAAM,CAAC,IAAI,qBAAa,CAAC,aAAa,CAAC,CAAC;IAC5C,CAAC;IACL,yBAAC;AAAD,CAAC,AAxBD,CAAwC,mCAAsB,GAwB7D;AAxBY,kBAAkB;IAD9B,sBAAS,CAAC,EAAC,IAAI,EAAE,gBAAgB,EAAC,CAAC;GACvB,kBAAkB,CAwB9B;AAxBY,gDAAkB","sourcesContent":["import * as ts from 'typescript';\n\nimport {IntrinsicType} from '../../models/index';\nimport {Component, ConverterTypeComponent, TypeTypeConverter} from '../components';\nimport {Context} from '../context';\n\n// TypeScript has an @internal enum set for the intrinsic types:\n// https://github.com/Microsoft/TypeScript/blob/v2.0.5/src/compiler/types.ts#L2297-L2298\n// It is not included in the typescript typings, so the enum is cast as `any` to access the `Intrinsic` set.\n// tslint:disable-next-line:variable-name\nconst IntrinsicTypeFlags = (ts.TypeFlags as any).Intrinsic;\nif (IntrinsicTypeFlags === undefined) {\n throw new Error('Internal TypeScript API missing: TypeFlags.Intrinsic');\n}\n\n@Component({name: 'type:intrinsic'})\nexport class IntrinsicConverter extends ConverterTypeComponent implements TypeTypeConverter<ts.Type> {\n /**\n * Test whether this converter can handle the given TypeScript type.\n */\n supportsType(context: Context, type: ts.Type): boolean {\n return !!(type.flags & IntrinsicTypeFlags);\n }\n\n /**\n * Convert the given intrinsic type to its type reflection.\n *\n * This is a type based converter with no node based equivalent.\n *\n * ```\n * let someValue: string;\n * ```\n *\n * @param type The intrinsic type that should be converted.\n * @returns The type reflection representing the given intrinsic type.\n */\n convertType(context: Context, type: ts.Type): IntrinsicType {\n let intrinsicName = context.program.getTypeChecker().typeToString(type);\n return new IntrinsicType(intrinsicName);\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"intrinsic.js","sourceRoot":"","sources":["../../../../src/lib/converter/types/intrinsic.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AAEjC,4CAAmD;AACnD,4CAAqF;AAOrF,IAAM,kBAAkB,GAAI,EAAE,CAAC,SAAiB,CAAC,SAAS,CAAC;AAC3D,EAAE,CAAC,CAAC,kBAAkB,KAAK,SAAS,CAAC,CAAC,CAAC;IACnC,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAC;AAC5E,CAAC;AAGD;IAAwC,sCAAsB;IAA9D;;IAwBA,CAAC;IApBG,yCAAY,GAAZ,UAAa,OAAgB,EAAE,IAAa;QACxC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,kBAAkB,CAAC,CAAC;IAC/C,CAAC;IAcD,wCAAW,GAAX,UAAY,OAAgB,EAAE,IAAa;QACvC,IAAI,aAAa,GAAG,OAAO,CAAC,OAAO,CAAC,cAAc,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QACxE,MAAM,CAAC,IAAI,qBAAa,CAAC,aAAa,CAAC,CAAC;IAC5C,CAAC;IAvBQ,kBAAkB;QAD9B,sBAAS,CAAC,EAAC,IAAI,EAAE,gBAAgB,EAAC,CAAC;OACvB,kBAAkB,CAwB9B;IAAD,yBAAC;CAAA,AAxBD,CAAwC,mCAAsB,GAwB7D;AAxBY,gDAAkB","sourcesContent":["import * as ts from 'typescript';\n\nimport { IntrinsicType } from '../../models/index';\nimport { Component, ConverterTypeComponent, TypeTypeConverter } from '../components';\nimport { Context } from '../context';\n\n// TypeScript has an @internal enum set for the intrinsic types:\n// https://github.com/Microsoft/TypeScript/blob/v2.0.5/src/compiler/types.ts#L2297-L2298\n// It is not included in the typescript typings, so the enum is cast as `any` to access the `Intrinsic` set.\n// tslint:disable-next-line:variable-name\nconst IntrinsicTypeFlags = (ts.TypeFlags as any).Intrinsic;\nif (IntrinsicTypeFlags === undefined) {\n throw new Error('Internal TypeScript API missing: TypeFlags.Intrinsic');\n}\n\n@Component({name: 'type:intrinsic'})\nexport class IntrinsicConverter extends ConverterTypeComponent implements TypeTypeConverter<ts.Type> {\n /**\n * Test whether this converter can handle the given TypeScript type.\n */\n supportsType(context: Context, type: ts.Type): boolean {\n return !!(type.flags & IntrinsicTypeFlags);\n }\n\n /**\n * Convert the given intrinsic type to its type reflection.\n *\n * This is a type based converter with no node based equivalent.\n *\n * ```\n * let someValue: string;\n * ```\n *\n * @param type The intrinsic type that should be converted.\n * @returns The type reflection representing the given intrinsic type.\n */\n convertType(context: Context, type: ts.Type): IntrinsicType {\n let intrinsicName = context.program.getTypeChecker().typeToString(type);\n return new IntrinsicType(intrinsicName);\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/types/reference.js b/node_modules/typedoc/dist/lib/converter/types/reference.js
index f52762c8e..b8eb4d959 100644
--- a/node_modules/typedoc/dist/lib/converter/types/reference.js
+++ b/node_modules/typedoc/dist/lib/converter/types/reference.js
@@ -90,10 +90,10 @@ var ReferenceConverter = (function (_super) {
});
return new index_1.ReflectionType(declaration);
};
+ ReferenceConverter = __decorate([
+ components_1.Component({ name: 'type:reference' })
+ ], ReferenceConverter);
return ReferenceConverter;
}(components_1.ConverterTypeComponent));
-ReferenceConverter = __decorate([
- components_1.Component({ name: 'type:reference' })
-], ReferenceConverter);
exports.ReferenceConverter = ReferenceConverter;
//# sourceMappingURL=reference.js.map \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/types/reference.js.map b/node_modules/typedoc/dist/lib/converter/types/reference.js.map
index 5668a19ba..e37f7b8c4 100644
--- a/node_modules/typedoc/dist/lib/converter/types/reference.js.map
+++ b/node_modules/typedoc/dist/lib/converter/types/reference.js.map
@@ -1 +1 @@
-{"version":3,"file":"reference.js","sourceRoot":"","sources":["../../../../src/lib/converter/types/reference.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AAEjC,kDAA6E;AAC7E,wDAAqF;AACrF,4CAAuD;AACvD,4CAAmF;AAEnF,0CAAuC;AAGvC,IAAa,kBAAkB;IAAS,sCAAsB;IAD9D;QAAA,qEAkIC;QA5HG,cAAQ,GAAW,CAAC,EAAE,CAAC;;IA4H3B,CAAC;IAvHG,yCAAY,GAAZ,UAAa,OAAgB,EAAE,IAA0B,EAAE,IAAsB;QAC7E,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IAChD,CAAC;IAKD,yCAAY,GAAZ,UAAa,OAAgB,EAAE,IAAsB;QACjD,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IAChD,CAAC;IAiBD,wCAAW,GAAX,UAAY,OAAgB,EAAE,IAA0B,EAAE,IAAsB;QAAhF,iBAaC;QAZG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;YACf,MAAM,CAAC,IAAI,qBAAa,CAAC,QAAQ,CAAC,CAAC;QACvC,CAAC;QAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,GAAG,EAAE,CAAC,WAAW,CAAC,WAAW,IAAI,IAAI,CAAC,MAAM,CAAC,KAAK,GAAG,EAAE,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;YAC1I,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QAC3D,CAAC;QAED,IAAM,MAAM,GAAG,2BAAmB,CAAC,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QACzD,EAAE,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;YACrB,MAAM,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,UAAC,CAAC,IAAK,OAAA,KAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC,CAAC,EAAlC,CAAkC,CAAC,CAAC;QAC7F,CAAC;QAED,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IAgBD,wCAAW,GAAX,UAAY,OAAgB,EAAE,IAAsB;QAApD,iBAaC;QAZG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;YACf,MAAM,CAAC,IAAI,qBAAa,CAAC,QAAQ,CAAC,CAAC;QACvC,CAAC;QAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,GAAG,EAAE,CAAC,WAAW,CAAC,WAAW,IAAI,IAAI,CAAC,MAAM,CAAC,KAAK,GAAG,EAAE,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;YAC1I,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QACrD,CAAC;QAED,IAAM,MAAM,GAAG,2BAAmB,CAAC,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QACzD,EAAE,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;YACrB,MAAM,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,UAAC,CAAC,IAAK,OAAA,KAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,EAAxC,CAAwC,CAAC,CAAC;QACnG,CAAC;QAED,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IAwBO,2CAAc,GAAtB,UAAuB,OAAgB,EAAE,MAAiB,EAAE,IAAc;QAA1E,iBA0BC;QAzBG,GAAG,CAAC,CAAoB,UAAmB,EAAnB,KAAA,MAAM,CAAC,YAAY,EAAnB,cAAmB,EAAnB,IAAmB;YAAtC,IAAI,aAAW,SAAA;YAChB,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,aAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;gBACjD,EAAE,CAAC,CAAC,aAAW,CAAC,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,WAAW;oBAC1C,aAAW,CAAC,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,uBAAuB,CAAC,CAAC,CAAC;oBACjE,MAAM,CAAC,2BAAmB,CAAC,OAAO,EAAE,aAAW,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;gBACnE,CAAC;gBAAC,IAAI,CAAC,CAAC;oBACJ,MAAM,CAAC,2BAAmB,CAAC,OAAO,EAAE,aAAW,CAAC,MAAM,CAAC,CAAC;gBAC5D,CAAC;YACL,CAAC;SACJ;QAED,IAAM,WAAW,GAAG,IAAI,6BAAqB,EAAE,CAAC;QAChD,WAAW,CAAC,IAAI,GAAG,sBAAc,CAAC,WAAW,CAAC;QAC9C,WAAW,CAAC,IAAI,GAAG,QAAQ,CAAC;QAC5B,WAAW,CAAC,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;QAEnC,OAAO,CAAC,kBAAkB,CAAC,WAAW,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;QACtD,OAAO,CAAC,OAAO,CAAC,qBAAS,CAAC,wBAAwB,EAAE,WAAW,EAAE,IAAI,CAAC,CAAC;QACvE,OAAO,CAAC,SAAS,CAAC,WAAW,EAAE;YAC3B,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,UAAC,IAAI;gBAC7B,KAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;YAC1C,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,IAAI,sBAAc,CAAC,WAAW,CAAC,CAAC;IAC3C,CAAC;IACL,yBAAC;AAAD,CAAC,AAjID,CAAwC,mCAAsB,GAiI7D;AAjIY,kBAAkB;IAD9B,sBAAS,CAAC,EAAC,IAAI,EAAE,gBAAgB,EAAC,CAAC;GACvB,kBAAkB,CAiI9B;AAjIY,gDAAkB","sourcesContent":["import * as ts from 'typescript';\n\nimport {Type, IntrinsicType, ReflectionType} from '../../models/types/index';\nimport {ReflectionKind, DeclarationReflection} from '../../models/reflections/index';\nimport {createReferenceType} from '../factories/index';\nimport {Component, ConverterTypeComponent, TypeNodeConverter} from '../components';\nimport {Context} from '../context';\nimport {Converter} from '../converter';\n\n@Component({name: 'type:reference'})\nexport class ReferenceConverter extends ConverterTypeComponent implements TypeNodeConverter<ts.TypeReference, ts.TypeReferenceNode> {\n /**\n * The priority this converter should be executed with.\n * A higher priority means the converter will be applied earlier.\n */\n priority: number = -50;\n\n /**\n * Test whether this converter can handle the given TypeScript node.\n */\n supportsNode(context: Context, node: ts.TypeReferenceNode, type: ts.TypeReference): boolean {\n return !!(type.flags & ts.TypeFlags.Object);\n }\n\n /**\n * Test whether this converter can handle the given TypeScript type.\n */\n supportsType(context: Context, type: ts.TypeReference): boolean {\n return !!(type.flags & ts.TypeFlags.Object);\n }\n\n /**\n * Convert the type reference node to its type reflection.\n *\n * This is a node based converter, see [[convertTypeReferenceType]] for the type equivalent.\n *\n * ```\n * class SomeClass { }\n * let someValue: SomeClass;\n * ```\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The type reference node that should be converted.\n * @param type The type of the type reference node.\n * @returns The type reflection representing the given reference node.\n */\n convertNode(context: Context, node: ts.TypeReferenceNode, type: ts.TypeReference): Type {\n if (!type.symbol) {\n return new IntrinsicType('Object');\n } else if (type.symbol.declarations && (type.symbol.flags & ts.SymbolFlags.TypeLiteral || type.symbol.flags & ts.SymbolFlags.ObjectLiteral)) {\n return this.convertLiteral(context, type.symbol, node);\n }\n\n const result = createReferenceType(context, type.symbol);\n if (node.typeArguments) {\n result.typeArguments = node.typeArguments.map((n) => this.owner.convertType(context, n));\n }\n\n return result;\n }\n\n /**\n * Convert the given type reference to its type reflection.\n *\n * This is a type based converter, see [[convertTypeReference]] for the node equivalent.\n *\n * ```\n * class SomeClass { }\n * let someValue: SomeClass;\n * ```\n *\n * @param context The context object describing the current state the converter is in.\n * @param type The type reference that should be converted.\n * @returns The type reflection representing the given type reference.\n */\n convertType(context: Context, type: ts.TypeReference): Type {\n if (!type.symbol) {\n return new IntrinsicType('Object');\n } else if (type.symbol.declarations && (type.symbol.flags & ts.SymbolFlags.TypeLiteral || type.symbol.flags & ts.SymbolFlags.ObjectLiteral)) {\n return this.convertLiteral(context, type.symbol);\n }\n\n const result = createReferenceType(context, type.symbol);\n if (type.typeArguments) {\n result.typeArguments = type.typeArguments.map((t) => this.owner.convertType(context, null, t));\n }\n\n return result;\n }\n\n /**\n * Create a type literal reflection.\n *\n * This is a utility function used by [[convertTypeReferenceNode]] and\n * [[convertTypeReferenceType]] when encountering an object or type literal.\n *\n * A type literal is explicitly set:\n * ```\n * let someValue: {a: string; b: number;};\n * ```\n *\n * An object literal types are usually reflected by the TypeScript compiler:\n * ```\n * function someFunction() { return {a: 'Test', b: 1024}; }\n * ```\n *\n * @param context The context object describing the current state the converter is in.\n * @param symbol The symbol describing the type literal.\n * @param node If known the node which produced the type literal. Type literals that are\n * implicitly generated by TypeScript won't have a corresponding node.\n * @returns A type reflection representing the given type literal.\n */\n private convertLiteral(context: Context, symbol: ts.Symbol, node?: ts.Node): Type {\n for (let declaration of symbol.declarations) {\n if (context.visitStack.indexOf(declaration) !== -1) {\n if (declaration.kind === ts.SyntaxKind.TypeLiteral ||\n declaration.kind === ts.SyntaxKind.ObjectLiteralExpression) {\n return createReferenceType(context, declaration.parent.symbol);\n } else {\n return createReferenceType(context, declaration.symbol);\n }\n }\n }\n\n const declaration = new DeclarationReflection();\n declaration.kind = ReflectionKind.TypeLiteral;\n declaration.name = '__type';\n declaration.parent = context.scope;\n\n context.registerReflection(declaration, null, symbol);\n context.trigger(Converter.EVENT_CREATE_DECLARATION, declaration, node);\n context.withScope(declaration, () => {\n symbol.declarations.forEach((node) => {\n this.owner.convertNode(context, node);\n });\n });\n\n return new ReflectionType(declaration);\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"reference.js","sourceRoot":"","sources":["../../../../src/lib/converter/types/reference.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AAEjC,kDAA+E;AAC/E,wDAAuF;AACvF,4CAAyD;AACzD,4CAAqF;AAErF,0CAAyC;AAGzC;IAAwC,sCAAsB;IAD9D;QAAA,qEAkIC;QA5HG,cAAQ,GAAW,CAAC,EAAE,CAAC;;IA4H3B,CAAC;IAvHG,yCAAY,GAAZ,UAAa,OAAgB,EAAE,IAA0B,EAAE,IAAsB;QAC7E,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IAChD,CAAC;IAKD,yCAAY,GAAZ,UAAa,OAAgB,EAAE,IAAsB;QACjD,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IAChD,CAAC;IAiBD,wCAAW,GAAX,UAAY,OAAgB,EAAE,IAA0B,EAAE,IAAsB;QAAhF,iBAaC;QAZG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;YACf,MAAM,CAAC,IAAI,qBAAa,CAAC,QAAQ,CAAC,CAAC;QACvC,CAAC;QAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,GAAG,EAAE,CAAC,WAAW,CAAC,WAAW,IAAI,IAAI,CAAC,MAAM,CAAC,KAAK,GAAG,EAAE,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;YAC1I,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QAC3D,CAAC;QAED,IAAM,MAAM,GAAG,2BAAmB,CAAC,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QACzD,EAAE,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;YACrB,MAAM,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,UAAC,CAAC,IAAK,OAAA,KAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC,CAAC,EAAlC,CAAkC,CAAC,CAAC;QAC7F,CAAC;QAED,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IAgBD,wCAAW,GAAX,UAAY,OAAgB,EAAE,IAAsB;QAApD,iBAaC;QAZG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;YACf,MAAM,CAAC,IAAI,qBAAa,CAAC,QAAQ,CAAC,CAAC;QACvC,CAAC;QAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,GAAG,EAAE,CAAC,WAAW,CAAC,WAAW,IAAI,IAAI,CAAC,MAAM,CAAC,KAAK,GAAG,EAAE,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;YAC1I,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QACrD,CAAC;QAED,IAAM,MAAM,GAAG,2BAAmB,CAAC,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QACzD,EAAE,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;YACrB,MAAM,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,UAAC,CAAC,IAAK,OAAA,KAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,EAAxC,CAAwC,CAAC,CAAC;QACnG,CAAC;QAED,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IAwBO,2CAAc,GAAtB,UAAuB,OAAgB,EAAE,MAAiB,EAAE,IAAc;QAA1E,iBA0BC;QAzBG,GAAG,CAAC,CAAoB,UAAmB,EAAnB,KAAA,MAAM,CAAC,YAAY,EAAnB,cAAmB,EAAnB,IAAmB;YAAtC,IAAI,aAAW,SAAA;YAChB,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,aAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;gBACjD,EAAE,CAAC,CAAC,aAAW,CAAC,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,WAAW;oBAC1C,aAAW,CAAC,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,uBAAuB,CAAC,CAAC,CAAC;oBACjE,MAAM,CAAC,2BAAmB,CAAC,OAAO,EAAE,aAAW,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;gBACnE,CAAC;gBAAC,IAAI,CAAC,CAAC;oBACJ,MAAM,CAAC,2BAAmB,CAAC,OAAO,EAAE,aAAW,CAAC,MAAM,CAAC,CAAC;gBAC5D,CAAC;YACL,CAAC;SACJ;QAED,IAAM,WAAW,GAAG,IAAI,6BAAqB,EAAE,CAAC;QAChD,WAAW,CAAC,IAAI,GAAG,sBAAc,CAAC,WAAW,CAAC;QAC9C,WAAW,CAAC,IAAI,GAAG,QAAQ,CAAC;QAC5B,WAAW,CAAC,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;QAEnC,OAAO,CAAC,kBAAkB,CAAC,WAAW,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;QACtD,OAAO,CAAC,OAAO,CAAC,qBAAS,CAAC,wBAAwB,EAAE,WAAW,EAAE,IAAI,CAAC,CAAC;QACvE,OAAO,CAAC,SAAS,CAAC,WAAW,EAAE;YAC3B,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,UAAC,IAAI;gBAC7B,KAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;YAC1C,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,IAAI,sBAAc,CAAC,WAAW,CAAC,CAAC;IAC3C,CAAC;IAhIQ,kBAAkB;QAD9B,sBAAS,CAAC,EAAC,IAAI,EAAE,gBAAgB,EAAC,CAAC;OACvB,kBAAkB,CAiI9B;IAAD,yBAAC;CAAA,AAjID,CAAwC,mCAAsB,GAiI7D;AAjIY,gDAAkB","sourcesContent":["import * as ts from 'typescript';\n\nimport { Type, IntrinsicType, ReflectionType } from '../../models/types/index';\nimport { ReflectionKind, DeclarationReflection } from '../../models/reflections/index';\nimport { createReferenceType } from '../factories/index';\nimport { Component, ConverterTypeComponent, TypeNodeConverter } from '../components';\nimport { Context } from '../context';\nimport { Converter } from '../converter';\n\n@Component({name: 'type:reference'})\nexport class ReferenceConverter extends ConverterTypeComponent implements TypeNodeConverter<ts.TypeReference, ts.TypeReferenceNode> {\n /**\n * The priority this converter should be executed with.\n * A higher priority means the converter will be applied earlier.\n */\n priority: number = -50;\n\n /**\n * Test whether this converter can handle the given TypeScript node.\n */\n supportsNode(context: Context, node: ts.TypeReferenceNode, type: ts.TypeReference): boolean {\n return !!(type.flags & ts.TypeFlags.Object);\n }\n\n /**\n * Test whether this converter can handle the given TypeScript type.\n */\n supportsType(context: Context, type: ts.TypeReference): boolean {\n return !!(type.flags & ts.TypeFlags.Object);\n }\n\n /**\n * Convert the type reference node to its type reflection.\n *\n * This is a node based converter, see [[convertTypeReferenceType]] for the type equivalent.\n *\n * ```\n * class SomeClass { }\n * let someValue: SomeClass;\n * ```\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The type reference node that should be converted.\n * @param type The type of the type reference node.\n * @returns The type reflection representing the given reference node.\n */\n convertNode(context: Context, node: ts.TypeReferenceNode, type: ts.TypeReference): Type {\n if (!type.symbol) {\n return new IntrinsicType('Object');\n } else if (type.symbol.declarations && (type.symbol.flags & ts.SymbolFlags.TypeLiteral || type.symbol.flags & ts.SymbolFlags.ObjectLiteral)) {\n return this.convertLiteral(context, type.symbol, node);\n }\n\n const result = createReferenceType(context, type.symbol);\n if (node.typeArguments) {\n result.typeArguments = node.typeArguments.map((n) => this.owner.convertType(context, n));\n }\n\n return result;\n }\n\n /**\n * Convert the given type reference to its type reflection.\n *\n * This is a type based converter, see [[convertTypeReference]] for the node equivalent.\n *\n * ```\n * class SomeClass { }\n * let someValue: SomeClass;\n * ```\n *\n * @param context The context object describing the current state the converter is in.\n * @param type The type reference that should be converted.\n * @returns The type reflection representing the given type reference.\n */\n convertType(context: Context, type: ts.TypeReference): Type {\n if (!type.symbol) {\n return new IntrinsicType('Object');\n } else if (type.symbol.declarations && (type.symbol.flags & ts.SymbolFlags.TypeLiteral || type.symbol.flags & ts.SymbolFlags.ObjectLiteral)) {\n return this.convertLiteral(context, type.symbol);\n }\n\n const result = createReferenceType(context, type.symbol);\n if (type.typeArguments) {\n result.typeArguments = type.typeArguments.map((t) => this.owner.convertType(context, null, t));\n }\n\n return result;\n }\n\n /**\n * Create a type literal reflection.\n *\n * This is a utility function used by [[convertTypeReferenceNode]] and\n * [[convertTypeReferenceType]] when encountering an object or type literal.\n *\n * A type literal is explicitly set:\n * ```\n * let someValue: {a: string; b: number;};\n * ```\n *\n * An object literal types are usually reflected by the TypeScript compiler:\n * ```\n * function someFunction() { return {a: 'Test', b: 1024}; }\n * ```\n *\n * @param context The context object describing the current state the converter is in.\n * @param symbol The symbol describing the type literal.\n * @param node If known the node which produced the type literal. Type literals that are\n * implicitly generated by TypeScript won't have a corresponding node.\n * @returns A type reflection representing the given type literal.\n */\n private convertLiteral(context: Context, symbol: ts.Symbol, node?: ts.Node): Type {\n for (let declaration of symbol.declarations) {\n if (context.visitStack.indexOf(declaration) !== -1) {\n if (declaration.kind === ts.SyntaxKind.TypeLiteral ||\n declaration.kind === ts.SyntaxKind.ObjectLiteralExpression) {\n return createReferenceType(context, declaration.parent.symbol);\n } else {\n return createReferenceType(context, declaration.symbol);\n }\n }\n }\n\n const declaration = new DeclarationReflection();\n declaration.kind = ReflectionKind.TypeLiteral;\n declaration.name = '__type';\n declaration.parent = context.scope;\n\n context.registerReflection(declaration, null, symbol);\n context.trigger(Converter.EVENT_CREATE_DECLARATION, declaration, node);\n context.withScope(declaration, () => {\n symbol.declarations.forEach((node) => {\n this.owner.convertNode(context, node);\n });\n });\n\n return new ReflectionType(declaration);\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/types/string-literal.js b/node_modules/typedoc/dist/lib/converter/types/string-literal.js
index 2cfd08d99..01875f19d 100644
--- a/node_modules/typedoc/dist/lib/converter/types/string-literal.js
+++ b/node_modules/typedoc/dist/lib/converter/types/string-literal.js
@@ -34,12 +34,12 @@ var StringLiteralConverter = (function (_super) {
return new index_1.StringLiteralType(node.text);
};
StringLiteralConverter.prototype.convertType = function (context, type) {
- return new index_1.StringLiteralType(type.text);
+ return new index_1.StringLiteralType(type.value);
};
+ StringLiteralConverter = __decorate([
+ components_1.Component({ name: 'type:string-literal' })
+ ], StringLiteralConverter);
return StringLiteralConverter;
}(components_1.ConverterTypeComponent));
-StringLiteralConverter = __decorate([
- components_1.Component({ name: 'type:string-literal' })
-], StringLiteralConverter);
exports.StringLiteralConverter = StringLiteralConverter;
//# sourceMappingURL=string-literal.js.map \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/types/string-literal.js.map b/node_modules/typedoc/dist/lib/converter/types/string-literal.js.map
index 7f8a6e296..b750f4513 100644
--- a/node_modules/typedoc/dist/lib/converter/types/string-literal.js.map
+++ b/node_modules/typedoc/dist/lib/converter/types/string-literal.js.map
@@ -1 +1 @@
-{"version":3,"file":"string-literal.js","sourceRoot":"","sources":["../../../../src/lib/converter/types/string-literal.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AAEjC,kDAAiE;AACjE,4CAA+E;AAI/E,IAAa,sBAAsB;IAAS,0CAAsB;IAAlE;;IA8CA,CAAC;IA1CG,6CAAY,GAAZ,UAAa,OAAgB,EAAE,IAAsB;QACjD,MAAM,CAAC,IAAI,CAAC,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC;IACrD,CAAC;IAKD,6CAAY,GAAZ,UAAa,OAAgB,EAAE,IAAoB;QAC/C,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;IACvD,CAAC;IAcD,4CAAW,GAAX,UAAY,OAAgB,EAAE,IAAsB;QAChD,MAAM,CAAC,IAAI,yBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC5C,CAAC;IAcD,4CAAW,GAAX,UAAY,OAAgB,EAAE,IAAoB;QAC9C,MAAM,CAAC,IAAI,yBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC5C,CAAC;IACL,6BAAC;AAAD,CAAC,AA9CD,CAA4C,mCAAsB,GA8CjE;AA9CY,sBAAsB;IADlC,sBAAS,CAAC,EAAC,IAAI,EAAE,qBAAqB,EAAC,CAAC;GAC5B,sBAAsB,CA8ClC;AA9CY,wDAAsB","sourcesContent":["import * as ts from 'typescript';\n\nimport {Type, StringLiteralType} from '../../models/types/index';\nimport {Component, ConverterTypeComponent, TypeConverter} from '../components';\nimport {Context} from '../context';\n\n@Component({name: 'type:string-literal'})\nexport class StringLiteralConverter extends ConverterTypeComponent implements TypeConverter<ts.LiteralType, ts.StringLiteral> {\n /**\n * Test whether this converter can handle the given TypeScript node.\n */\n supportsNode(context: Context, node: ts.StringLiteral): boolean {\n return node.kind === ts.SyntaxKind.StringLiteral;\n }\n\n /**\n * Test whether this converter can handle the given TypeScript type.\n */\n supportsType(context: Context, type: ts.LiteralType): boolean {\n return !!(type.flags & ts.TypeFlags.StringLiteral);\n }\n\n /**\n * Convert the given string literal expression node to its type reflection.\n *\n * This is a node based converter, see [[convertStringLiteralType]] for the type equivalent.\n *\n * ```\n * createElement(tagName: \"a\"): HTMLAnchorElement;\n * ```\n *\n * @param node The string literal node that should be converted.\n * @returns The type reflection representing the given string literal node.\n */\n convertNode(context: Context, node: ts.StringLiteral): Type {\n return new StringLiteralType(node.text);\n }\n\n /**\n * Convert the given string literal type to its type reflection.\n *\n * This is a type based converter, see [[convertStringLiteralExpression]] for the node equivalent.\n *\n * ```\n * createElement(tagName: \"a\"): HTMLAnchorElement;\n * ```\n *\n * @param type The intrinsic type that should be converted.\n * @returns The type reflection representing the given string literal type.\n */\n convertType(context: Context, type: ts.LiteralType): Type {\n return new StringLiteralType(type.text);\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"string-literal.js","sourceRoot":"","sources":["../../../../src/lib/converter/types/string-literal.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AAEjC,kDAAmE;AACnE,4CAAiF;AAIjF;IAA4C,0CAAsB;IAAlE;;IA8CA,CAAC;IA1CG,6CAAY,GAAZ,UAAa,OAAgB,EAAE,IAAsB;QACjD,MAAM,CAAC,IAAI,CAAC,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC;IACrD,CAAC;IAKD,6CAAY,GAAZ,UAAa,OAAgB,EAAE,IAAoB;QAC/C,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;IACvD,CAAC;IAcD,4CAAW,GAAX,UAAY,OAAgB,EAAE,IAAsB;QAChD,MAAM,CAAC,IAAI,yBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC5C,CAAC;IAcD,4CAAW,GAAX,UAAY,OAAgB,EAAE,IAAoB;QAC9C,MAAM,CAAC,IAAI,yBAAiB,CAAU,IAAI,CAAC,KAAK,CAAC,CAAC;IACtD,CAAC;IA7CQ,sBAAsB;QADlC,sBAAS,CAAC,EAAC,IAAI,EAAE,qBAAqB,EAAC,CAAC;OAC5B,sBAAsB,CA8ClC;IAAD,6BAAC;CAAA,AA9CD,CAA4C,mCAAsB,GA8CjE;AA9CY,wDAAsB","sourcesContent":["import * as ts from 'typescript';\n\nimport { Type, StringLiteralType } from '../../models/types/index';\nimport { Component, ConverterTypeComponent, TypeConverter } from '../components';\nimport { Context } from '../context';\n\n@Component({name: 'type:string-literal'})\nexport class StringLiteralConverter extends ConverterTypeComponent implements TypeConverter<ts.LiteralType, ts.StringLiteral> {\n /**\n * Test whether this converter can handle the given TypeScript node.\n */\n supportsNode(context: Context, node: ts.StringLiteral): boolean {\n return node.kind === ts.SyntaxKind.StringLiteral;\n }\n\n /**\n * Test whether this converter can handle the given TypeScript type.\n */\n supportsType(context: Context, type: ts.LiteralType): boolean {\n return !!(type.flags & ts.TypeFlags.StringLiteral);\n }\n\n /**\n * Convert the given string literal expression node to its type reflection.\n *\n * This is a node based converter, see [[convertStringLiteralType]] for the type equivalent.\n *\n * ```\n * createElement(tagName: \"a\"): HTMLAnchorElement;\n * ```\n *\n * @param node The string literal node that should be converted.\n * @returns The type reflection representing the given string literal node.\n */\n convertNode(context: Context, node: ts.StringLiteral): Type {\n return new StringLiteralType(node.text);\n }\n\n /**\n * Convert the given string literal type to its type reflection.\n *\n * This is a type based converter, see [[convertStringLiteralExpression]] for the node equivalent.\n *\n * ```\n * createElement(tagName: \"a\"): HTMLAnchorElement;\n * ```\n *\n * @param type The intrinsic type that should be converted.\n * @returns The type reflection representing the given string literal type.\n */\n convertType(context: Context, type: ts.LiteralType): Type {\n return new StringLiteralType(<string> type.value);\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/types/this.js b/node_modules/typedoc/dist/lib/converter/types/this.js
index 4b469eeb0..873e2286a 100644
--- a/node_modules/typedoc/dist/lib/converter/types/this.js
+++ b/node_modules/typedoc/dist/lib/converter/types/this.js
@@ -30,10 +30,10 @@ var ThisConverter = (function (_super) {
ThisConverter.prototype.convertNode = function (context, node, type) {
return new index_1.IntrinsicType('this');
};
+ ThisConverter = __decorate([
+ components_1.Component({ name: 'type:this' })
+ ], ThisConverter);
return ThisConverter;
}(components_1.ConverterTypeComponent));
-ThisConverter = __decorate([
- components_1.Component({ name: 'type:this' })
-], ThisConverter);
exports.ThisConverter = ThisConverter;
//# sourceMappingURL=this.js.map \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/types/this.js.map b/node_modules/typedoc/dist/lib/converter/types/this.js.map
index 806cf5ecc..62465798c 100644
--- a/node_modules/typedoc/dist/lib/converter/types/this.js.map
+++ b/node_modules/typedoc/dist/lib/converter/types/this.js.map
@@ -1 +1 @@
-{"version":3,"file":"this.js","sourceRoot":"","sources":["../../../../src/lib/converter/types/this.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AAEjC,kDAA+D;AAC/D,4CAAqF;AAIrF,IAAa,aAAa;IAAS,iCAAsB;IAAzD;;IA0BA,CAAC;IAtBU,oCAAY,GAAnB,UAAoB,OAAgB,EAAE,IAAqB,EAAE,IAAa;QACtE,MAAM,CAAC,IAAI,CAAC,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC;IAChD,CAAC;IAiBM,mCAAW,GAAlB,UAAmB,OAAgB,EAAE,IAAqB,EAAE,IAAa;QACrE,MAAM,CAAC,IAAI,qBAAa,CAAC,MAAM,CAAC,CAAC;IACrC,CAAC;IACL,oBAAC;AAAD,CAAC,AA1BD,CAAmC,mCAAsB,GA0BxD;AA1BY,aAAa;IADzB,sBAAS,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;GACpB,aAAa,CA0BzB;AA1BY,sCAAa","sourcesContent":["import * as ts from 'typescript';\n\nimport { Type, IntrinsicType } from '../../models/types/index';\nimport { Component, ConverterTypeComponent, TypeNodeConverter } from '../components';\nimport { Context } from '../context';\n\n@Component({ name: 'type:this' })\nexport class ThisConverter extends ConverterTypeComponent implements TypeNodeConverter<ts.Type, ts.ThisTypeNode> {\n /**\n * Test whether this converter can handle the given TypeScript node.\n */\n public supportsNode(context: Context, node: ts.ThisTypeNode, type: ts.Type): boolean {\n return node.kind === ts.SyntaxKind.ThisType;\n }\n\n /**\n * Convert the type reference node to its type reflection.\n *\n * This is a node based converter, see [[convertTypeReferenceType]] for the type equivalent.\n *\n * ```\n * class SomeClass { }\n * var someValue:SomeClass;\n * ```\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The type reference node that should be converted.\n * @param type The type of the type reference node.\n * @returns The type reflection representing the given reference node.\n */\n public convertNode(context: Context, node: ts.ThisTypeNode, type: ts.Type): Type {\n return new IntrinsicType('this');\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"this.js","sourceRoot":"","sources":["../../../../src/lib/converter/types/this.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AAEjC,kDAA+D;AAC/D,4CAAqF;AAIrF;IAAmC,iCAAsB;IAAzD;;IA0BA,CAAC;IAtBU,oCAAY,GAAnB,UAAoB,OAAgB,EAAE,IAAqB,EAAE,IAAa;QACtE,MAAM,CAAC,IAAI,CAAC,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC;IAChD,CAAC;IAiBM,mCAAW,GAAlB,UAAmB,OAAgB,EAAE,IAAqB,EAAE,IAAa;QACrE,MAAM,CAAC,IAAI,qBAAa,CAAC,MAAM,CAAC,CAAC;IACrC,CAAC;IAzBQ,aAAa;QADzB,sBAAS,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;OACpB,aAAa,CA0BzB;IAAD,oBAAC;CAAA,AA1BD,CAAmC,mCAAsB,GA0BxD;AA1BY,sCAAa","sourcesContent":["import * as ts from 'typescript';\n\nimport { Type, IntrinsicType } from '../../models/types/index';\nimport { Component, ConverterTypeComponent, TypeNodeConverter } from '../components';\nimport { Context } from '../context';\n\n@Component({ name: 'type:this' })\nexport class ThisConverter extends ConverterTypeComponent implements TypeNodeConverter<ts.Type, ts.ThisTypeNode> {\n /**\n * Test whether this converter can handle the given TypeScript node.\n */\n public supportsNode(context: Context, node: ts.ThisTypeNode, type: ts.Type): boolean {\n return node.kind === ts.SyntaxKind.ThisType;\n }\n\n /**\n * Convert the type reference node to its type reflection.\n *\n * This is a node based converter, see [[convertTypeReferenceType]] for the type equivalent.\n *\n * ```\n * class SomeClass { }\n * var someValue:SomeClass;\n * ```\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The type reference node that should be converted.\n * @param type The type of the type reference node.\n * @returns The type reflection representing the given reference node.\n */\n public convertNode(context: Context, node: ts.ThisTypeNode, type: ts.Type): Type {\n return new IntrinsicType('this');\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/types/tuple.js b/node_modules/typedoc/dist/lib/converter/types/tuple.js
index 0d0018012..86e335b3e 100644
--- a/node_modules/typedoc/dist/lib/converter/types/tuple.js
+++ b/node_modules/typedoc/dist/lib/converter/types/tuple.js
@@ -52,10 +52,10 @@ var TupleConverter = (function (_super) {
}
return new index_1.TupleType(elements);
};
+ TupleConverter = __decorate([
+ components_1.Component({ name: 'type:tuple' })
+ ], TupleConverter);
return TupleConverter;
}(components_1.ConverterTypeComponent));
-TupleConverter = __decorate([
- components_1.Component({ name: 'type:tuple' })
-], TupleConverter);
exports.TupleConverter = TupleConverter;
//# sourceMappingURL=tuple.js.map \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/types/tuple.js.map b/node_modules/typedoc/dist/lib/converter/types/tuple.js.map
index 72ce803d9..7c0482681 100644
--- a/node_modules/typedoc/dist/lib/converter/types/tuple.js.map
+++ b/node_modules/typedoc/dist/lib/converter/types/tuple.js.map
@@ -1 +1 @@
-{"version":3,"file":"tuple.js","sourceRoot":"","sources":["../../../../src/lib/converter/types/tuple.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AAEjC,kDAAyD;AACzD,4CAA+E;AAI/E,IAAa,cAAc;IAAS,kCAAsB;IAA1D;;IA8DA,CAAC;IA1DG,qCAAY,GAAZ,UAAa,OAAgB,EAAE,IAAsB;QACjD,MAAM,CAAC,IAAI,CAAC,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC;IACjD,CAAC;IAKD,qCAAY,GAAZ,UAAa,OAAgB,EAAE,IAAsB;QACjD,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;IACvD,CAAC;IAeD,oCAAW,GAAX,UAAY,OAAgB,EAAE,IAAsB;QAApD,iBASC;QARG,IAAI,QAAgB,CAAC;QACrB,EAAE,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;YACpB,QAAQ,GAAG,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,UAAC,CAAC,IAAK,OAAA,KAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC,CAAC,EAAlC,CAAkC,CAAC,CAAC;QAChF,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,QAAQ,GAAG,EAAE,CAAC;QAClB,CAAC;QAED,MAAM,CAAC,IAAI,iBAAS,CAAC,QAAQ,CAAC,CAAC;IACnC,CAAC;IAeD,oCAAW,GAAX,UAAY,OAAgB,EAAE,IAAsB;QAApD,iBASC;QARG,IAAI,QAAgB,CAAC;QACrB,EAAE,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;YACrB,QAAQ,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,UAAC,CAAC,IAAK,OAAA,KAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,EAAxC,CAAwC,CAAC,CAAC;QACvF,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,QAAQ,GAAG,EAAE,CAAC;QAClB,CAAC;QAED,MAAM,CAAC,IAAI,iBAAS,CAAC,QAAQ,CAAC,CAAC;IACnC,CAAC;IACL,qBAAC;AAAD,CAAC,AA9DD,CAAoC,mCAAsB,GA8DzD;AA9DY,cAAc;IAD1B,sBAAS,CAAC,EAAC,IAAI,EAAE,YAAY,EAAC,CAAC;GACnB,cAAc,CA8D1B;AA9DY,wCAAc","sourcesContent":["import * as ts from 'typescript';\n\nimport {Type, TupleType} from '../../models/types/index';\nimport {Component, ConverterTypeComponent, TypeConverter} from '../components';\nimport {Context} from '../context';\n\n@Component({name: 'type:tuple'})\nexport class TupleConverter extends ConverterTypeComponent implements TypeConverter<ts.TypeReference, ts.TupleTypeNode> {\n /**\n * Test whether this converter can handle the given TypeScript node.\n */\n supportsNode(context: Context, node: ts.TupleTypeNode): boolean {\n return node.kind === ts.SyntaxKind.TupleType;\n }\n\n /**\n * Test whether this converter can handle the given TypeScript type.\n */\n supportsType(context: Context, type: ts.TypeReference): boolean {\n return !!(type.objectFlags & ts.ObjectFlags.Tuple);\n }\n\n /**\n * Convert the given tuple type node to its type reflection.\n *\n * This is a node based converter, see [[convertTupleType]] for the type equivalent.\n *\n * ```\n * let someValue: [string,number];\n * ```\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The tuple type node that should be converted.\n * @returns The type reflection representing the given tuple type node.\n */\n convertNode(context: Context, node: ts.TupleTypeNode): TupleType {\n let elements: Type[];\n if (node.elementTypes) {\n elements = node.elementTypes.map((n) => this.owner.convertType(context, n));\n } else {\n elements = [];\n }\n\n return new TupleType(elements);\n }\n\n /**\n * Convert the given tuple type to its type reflection.\n *\n * This is a type based converter, see [[convertTupleTypeNode]] for the node equivalent.\n *\n * ```\n * let someValue: [string,number];\n * ```\n *\n * @param context The context object describing the current state the converter is in.\n * @param type The tuple type that should be converted.\n * @returns The type reflection representing the given tuple type.\n */\n convertType(context: Context, type: ts.TypeReference): TupleType {\n let elements: Type[];\n if (type.typeArguments) {\n elements = type.typeArguments.map((t) => this.owner.convertType(context, null, t));\n } else {\n elements = [];\n }\n\n return new TupleType(elements);\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"tuple.js","sourceRoot":"","sources":["../../../../src/lib/converter/types/tuple.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AAEjC,kDAA2D;AAC3D,4CAAiF;AAIjF;IAAoC,kCAAsB;IAA1D;;IA8DA,CAAC;IA1DG,qCAAY,GAAZ,UAAa,OAAgB,EAAE,IAAsB;QACjD,MAAM,CAAC,IAAI,CAAC,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC;IACjD,CAAC;IAKD,qCAAY,GAAZ,UAAa,OAAgB,EAAE,IAAsB;QACjD,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;IACvD,CAAC;IAeD,oCAAW,GAAX,UAAY,OAAgB,EAAE,IAAsB;QAApD,iBASC;QARG,IAAI,QAAgB,CAAC;QACrB,EAAE,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;YACpB,QAAQ,GAAG,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,UAAC,CAAC,IAAK,OAAA,KAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC,CAAC,EAAlC,CAAkC,CAAC,CAAC;QAChF,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,QAAQ,GAAG,EAAE,CAAC;QAClB,CAAC;QAED,MAAM,CAAC,IAAI,iBAAS,CAAC,QAAQ,CAAC,CAAC;IACnC,CAAC;IAeD,oCAAW,GAAX,UAAY,OAAgB,EAAE,IAAsB;QAApD,iBASC;QARG,IAAI,QAAgB,CAAC;QACrB,EAAE,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;YACrB,QAAQ,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,UAAC,CAAC,IAAK,OAAA,KAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,EAAxC,CAAwC,CAAC,CAAC;QACvF,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,QAAQ,GAAG,EAAE,CAAC;QAClB,CAAC;QAED,MAAM,CAAC,IAAI,iBAAS,CAAC,QAAQ,CAAC,CAAC;IACnC,CAAC;IA7DQ,cAAc;QAD1B,sBAAS,CAAC,EAAC,IAAI,EAAE,YAAY,EAAC,CAAC;OACnB,cAAc,CA8D1B;IAAD,qBAAC;CAAA,AA9DD,CAAoC,mCAAsB,GA8DzD;AA9DY,wCAAc","sourcesContent":["import * as ts from 'typescript';\n\nimport { Type, TupleType } from '../../models/types/index';\nimport { Component, ConverterTypeComponent, TypeConverter } from '../components';\nimport { Context } from '../context';\n\n@Component({name: 'type:tuple'})\nexport class TupleConverter extends ConverterTypeComponent implements TypeConverter<ts.TypeReference, ts.TupleTypeNode> {\n /**\n * Test whether this converter can handle the given TypeScript node.\n */\n supportsNode(context: Context, node: ts.TupleTypeNode): boolean {\n return node.kind === ts.SyntaxKind.TupleType;\n }\n\n /**\n * Test whether this converter can handle the given TypeScript type.\n */\n supportsType(context: Context, type: ts.TypeReference): boolean {\n return !!(type.objectFlags & ts.ObjectFlags.Tuple);\n }\n\n /**\n * Convert the given tuple type node to its type reflection.\n *\n * This is a node based converter, see [[convertTupleType]] for the type equivalent.\n *\n * ```\n * let someValue: [string,number];\n * ```\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The tuple type node that should be converted.\n * @returns The type reflection representing the given tuple type node.\n */\n convertNode(context: Context, node: ts.TupleTypeNode): TupleType {\n let elements: Type[];\n if (node.elementTypes) {\n elements = node.elementTypes.map((n) => this.owner.convertType(context, n));\n } else {\n elements = [];\n }\n\n return new TupleType(elements);\n }\n\n /**\n * Convert the given tuple type to its type reflection.\n *\n * This is a type based converter, see [[convertTupleTypeNode]] for the node equivalent.\n *\n * ```\n * let someValue: [string,number];\n * ```\n *\n * @param context The context object describing the current state the converter is in.\n * @param type The tuple type that should be converted.\n * @returns The type reflection representing the given tuple type.\n */\n convertType(context: Context, type: ts.TypeReference): TupleType {\n let elements: Type[];\n if (type.typeArguments) {\n elements = type.typeArguments.map((t) => this.owner.convertType(context, null, t));\n } else {\n elements = [];\n }\n\n return new TupleType(elements);\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/types/type-parameter.js b/node_modules/typedoc/dist/lib/converter/types/type-parameter.js
index 72de5cca1..18ac7d926 100644
--- a/node_modules/typedoc/dist/lib/converter/types/type-parameter.js
+++ b/node_modules/typedoc/dist/lib/converter/types/type-parameter.js
@@ -41,10 +41,10 @@ var TypeParameterConverter = (function (_super) {
return result;
}
};
+ TypeParameterConverter = __decorate([
+ components_1.Component({ name: 'type:type-parameter' })
+ ], TypeParameterConverter);
return TypeParameterConverter;
}(components_1.ConverterTypeComponent));
-TypeParameterConverter = __decorate([
- components_1.Component({ name: 'type:type-parameter' })
-], TypeParameterConverter);
exports.TypeParameterConverter = TypeParameterConverter;
//# sourceMappingURL=type-parameter.js.map \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/types/type-parameter.js.map b/node_modules/typedoc/dist/lib/converter/types/type-parameter.js.map
index 0ce2991b6..6c3b46050 100644
--- a/node_modules/typedoc/dist/lib/converter/types/type-parameter.js.map
+++ b/node_modules/typedoc/dist/lib/converter/types/type-parameter.js.map
@@ -1 +1 @@
-{"version":3,"file":"type-parameter.js","sourceRoot":"","sources":["../../../../src/lib/converter/types/type-parameter.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AACjC,uCAAyC;AAEzC,kDAAiE;AACjE,4CAAmF;AAInF,IAAa,sBAAsB;IAAS,0CAAsB;IADlE;QAAA,qEA0CC;QApCG,cAAQ,GAAW,CAAC,EAAE,CAAC;;IAoC3B,CAAC;IA/BG,6CAAY,GAAZ,UAAa,OAAgB,EAAE,IAA0B,EAAE,IAAa;QACpE,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;IACvD,CAAC;IAiBD,4CAAW,GAAX,UAAY,OAAgB,EAAE,IAA0B;QACpD,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;YAChB,IAAM,MAAI,GAAG,GAAG,CAAC,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YAC9C,EAAE,CAAC,CAAC,OAAO,CAAC,cAAc,IAAI,OAAO,CAAC,cAAc,CAAC,MAAI,CAAC,CAAC,CAAC,CAAC;gBACzD,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,MAAI,CAAC,CAAC,KAAK,EAAE,CAAC;YAChD,CAAC;YAED,IAAM,MAAM,GAAG,IAAI,yBAAiB,EAAE,CAAC;YACvC,MAAM,CAAC,IAAI,GAAG,MAAI,CAAC;YACnB,MAAM,CAAC,MAAM,CAAC;QAClB,CAAC;IACL,CAAC;IACL,6BAAC;AAAD,CAAC,AAzCD,CAA4C,mCAAsB,GAyCjE;AAzCY,sBAAsB;IADlC,sBAAS,CAAC,EAAC,IAAI,EAAE,qBAAqB,EAAC,CAAC;GAC5B,sBAAsB,CAyClC;AAzCY,wDAAsB","sourcesContent":["import * as ts from 'typescript';\nimport * as _ts from '../../ts-internal';\n\nimport {Type, TypeParameterType} from '../../models/types/index';\nimport {Component, ConverterTypeComponent, TypeNodeConverter} from '../components';\nimport {Context} from '../context';\n\n@Component({name: 'type:type-parameter'})\nexport class TypeParameterConverter extends ConverterTypeComponent implements TypeNodeConverter<ts.Type, ts.TypeReferenceNode> {\n /**\n * The priority this converter should be executed with.\n * A higher priority means the converter will be applied earlier.\n */\n priority: number = -50;\n\n /**\n * Test whether this converter can handle the given TypeScript node.\n */\n supportsNode(context: Context, node: ts.TypeReferenceNode, type: ts.Type): boolean {\n return !!(type.flags & ts.TypeFlags.TypeParameter);\n }\n\n /**\n * Interpret the given type reference node as a type parameter and convert it to its type reflection.\n *\n * This is a node based converter with no type equivalent.\n *\n * ```\n * class SomeClass<T> {\n * public someValue: T;\n * }\n * ```\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The type reference node representing a type parameter.\n * @returns The type reflection representing the given type parameter.\n */\n convertNode(context: Context, node: ts.TypeReferenceNode): Type {\n if (node.typeName) {\n const name = _ts.getTextOfNode(node.typeName);\n if (context.typeParameters && context.typeParameters[name]) {\n return context.typeParameters[name].clone();\n }\n\n const result = new TypeParameterType();\n result.name = name;\n return result;\n }\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"type-parameter.js","sourceRoot":"","sources":["../../../../src/lib/converter/types/type-parameter.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AACjC,uCAAyC;AAEzC,kDAAmE;AACnE,4CAAqF;AAIrF;IAA4C,0CAAsB;IADlE;QAAA,qEA0CC;QApCG,cAAQ,GAAW,CAAC,EAAE,CAAC;;IAoC3B,CAAC;IA/BG,6CAAY,GAAZ,UAAa,OAAgB,EAAE,IAA0B,EAAE,IAAa;QACpE,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;IACvD,CAAC;IAiBD,4CAAW,GAAX,UAAY,OAAgB,EAAE,IAA0B;QACpD,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;YAChB,IAAM,MAAI,GAAG,GAAG,CAAC,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YAC9C,EAAE,CAAC,CAAC,OAAO,CAAC,cAAc,IAAI,OAAO,CAAC,cAAc,CAAC,MAAI,CAAC,CAAC,CAAC,CAAC;gBACzD,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,MAAI,CAAC,CAAC,KAAK,EAAE,CAAC;YAChD,CAAC;YAED,IAAM,MAAM,GAAG,IAAI,yBAAiB,EAAE,CAAC;YACvC,MAAM,CAAC,IAAI,GAAG,MAAI,CAAC;YACnB,MAAM,CAAC,MAAM,CAAC;QAClB,CAAC;IACL,CAAC;IAxCQ,sBAAsB;QADlC,sBAAS,CAAC,EAAC,IAAI,EAAE,qBAAqB,EAAC,CAAC;OAC5B,sBAAsB,CAyClC;IAAD,6BAAC;CAAA,AAzCD,CAA4C,mCAAsB,GAyCjE;AAzCY,wDAAsB","sourcesContent":["import * as ts from 'typescript';\nimport * as _ts from '../../ts-internal';\n\nimport { Type, TypeParameterType } from '../../models/types/index';\nimport { Component, ConverterTypeComponent, TypeNodeConverter } from '../components';\nimport { Context } from '../context';\n\n@Component({name: 'type:type-parameter'})\nexport class TypeParameterConverter extends ConverterTypeComponent implements TypeNodeConverter<ts.Type, ts.TypeReferenceNode> {\n /**\n * The priority this converter should be executed with.\n * A higher priority means the converter will be applied earlier.\n */\n priority: number = -50;\n\n /**\n * Test whether this converter can handle the given TypeScript node.\n */\n supportsNode(context: Context, node: ts.TypeReferenceNode, type: ts.Type): boolean {\n return !!(type.flags & ts.TypeFlags.TypeParameter);\n }\n\n /**\n * Interpret the given type reference node as a type parameter and convert it to its type reflection.\n *\n * This is a node based converter with no type equivalent.\n *\n * ```\n * class SomeClass<T> {\n * public someValue: T;\n * }\n * ```\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The type reference node representing a type parameter.\n * @returns The type reflection representing the given type parameter.\n */\n convertNode(context: Context, node: ts.TypeReferenceNode): Type {\n if (node.typeName) {\n const name = _ts.getTextOfNode(node.typeName);\n if (context.typeParameters && context.typeParameters[name]) {\n return context.typeParameters[name].clone();\n }\n\n const result = new TypeParameterType();\n result.name = name;\n return result;\n }\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/types/union-or-intersection.js b/node_modules/typedoc/dist/lib/converter/types/union-or-intersection.js
index db54d2ddf..e744df501 100644
--- a/node_modules/typedoc/dist/lib/converter/types/union-or-intersection.js
+++ b/node_modules/typedoc/dist/lib/converter/types/union-or-intersection.js
@@ -52,10 +52,10 @@ var UnionOrIntersectionConverter = (function (_super) {
}
return !!(type.flags & ts.TypeFlags.Intersection) ? new index_1.IntersectionType(types) : new index_1.UnionType(types);
};
+ UnionOrIntersectionConverter = __decorate([
+ components_1.Component({ name: 'type:union-or-intersection' })
+ ], UnionOrIntersectionConverter);
return UnionOrIntersectionConverter;
}(components_1.ConverterTypeComponent));
-UnionOrIntersectionConverter = __decorate([
- components_1.Component({ name: 'type:union-or-intersection' })
-], UnionOrIntersectionConverter);
exports.UnionOrIntersectionConverter = UnionOrIntersectionConverter;
//# sourceMappingURL=union-or-intersection.js.map \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/types/union-or-intersection.js.map b/node_modules/typedoc/dist/lib/converter/types/union-or-intersection.js.map
index 73d24a185..7bff162dd 100644
--- a/node_modules/typedoc/dist/lib/converter/types/union-or-intersection.js.map
+++ b/node_modules/typedoc/dist/lib/converter/types/union-or-intersection.js.map
@@ -1 +1 @@
-{"version":3,"file":"union-or-intersection.js","sourceRoot":"","sources":["../../../../src/lib/converter/types/union-or-intersection.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AAEjC,kDAA2E;AAC3E,4CAA+E;AAI/E,IAAa,4BAA4B;IAAS,gDAAsB;IAAxE;;IA8DA,CAAC;IA1DG,mDAAY,GAAZ,UAAa,OAAgB,EAAE,IAAoC;QAC/D,MAAM,CAAC,IAAI,CAAC,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,SAAS,IAAI,IAAI,CAAC,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,gBAAgB,CAAC;IACjG,CAAC;IAKD,mDAAY,GAAZ,UAAa,OAAgB,EAAE,IAAgC;QAC3D,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC,SAAS,CAAC,mBAAmB,CAAC,CAAC;IAC7D,CAAC;IAeD,kDAAW,GAAX,UAAY,OAAgB,EAAE,IAAoC;QAAlE,iBASC;QARG,IAAI,KAAK,GAAW,EAAE,CAAC;QACvB,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;YACb,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,UAAC,CAAC,IAAK,OAAA,KAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC,CAAC,EAAlC,CAAkC,CAAC,CAAC;QACtE,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,KAAK,GAAG,EAAE,CAAC;QACf,CAAC;QAED,MAAM,CAAC,IAAI,CAAC,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,gBAAgB,GAAG,IAAI,wBAAgB,CAAC,KAAK,CAAC,GAAG,IAAI,iBAAS,CAAC,KAAK,CAAC,CAAC;IAC7G,CAAC;IAeD,kDAAW,GAAX,UAAY,OAAgB,EAAE,IAAgC;QAA9D,iBASC;QARG,IAAI,KAAa,CAAC;QAClB,EAAE,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;YACrB,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,UAAC,CAAC,IAAK,OAAA,KAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,EAAxC,CAAwC,CAAC,CAAC;QAC5E,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,KAAK,GAAG,EAAE,CAAC;QACf,CAAC;QAED,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC,SAAS,CAAC,YAAY,CAAC,GAAG,IAAI,wBAAgB,CAAC,KAAK,CAAC,GAAG,IAAI,iBAAS,CAAC,KAAK,CAAC,CAAC;IAC3G,CAAC;IACL,mCAAC;AAAD,CAAC,AA9DD,CAAkD,mCAAsB,GA8DvE;AA9DY,4BAA4B;IADxC,sBAAS,CAAC,EAAC,IAAI,EAAE,4BAA4B,EAAC,CAAC;GACnC,4BAA4B,CA8DxC;AA9DY,oEAA4B","sourcesContent":["import * as ts from 'typescript';\n\nimport {Type, UnionType, IntersectionType} from '../../models/types/index';\nimport {Component, ConverterTypeComponent, TypeConverter} from '../components';\nimport {Context} from '../context';\n\n@Component({name: 'type:union-or-intersection'})\nexport class UnionOrIntersectionConverter extends ConverterTypeComponent implements TypeConverter<ts.UnionOrIntersectionType, ts.UnionOrIntersectionTypeNode> {\n /**\n * Test whether this converter can handle the given TypeScript node.\n */\n supportsNode(context: Context, node: ts.UnionOrIntersectionTypeNode): boolean {\n return node.kind === ts.SyntaxKind.UnionType || node.kind === ts.SyntaxKind.IntersectionType;\n }\n\n /**\n * Test whether this converter can handle the given TypeScript type.\n */\n supportsType(context: Context, type: ts.UnionOrIntersectionType): boolean {\n return !!(type.flags & ts.TypeFlags.UnionOrIntersection);\n }\n\n /**\n * Convert the given union type node to its type reflection.\n *\n * This is a node based converter, see [[convertType]] for the type equivalent.\n *\n * ```\n * let someValue: string|number;\n * ```\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The union or intersection type node that should be converted.\n * @returns The type reflection representing the given union type node.\n */\n convertNode(context: Context, node: ts.UnionOrIntersectionTypeNode): UnionType | IntersectionType {\n let types: Type[] = [];\n if (node.types) {\n types = node.types.map((n) => this.owner.convertType(context, n));\n } else {\n types = [];\n }\n\n return node.kind === ts.SyntaxKind.IntersectionType ? new IntersectionType(types) : new UnionType(types);\n }\n\n /**\n * Convert the given union type to its type reflection.\n *\n * This is a type based converter, see [[convertUnionTypeNode]] for the node equivalent.\n *\n * ```\n * let someValue: string|number;\n * ```\n *\n * @param context The context object describing the current state the converter is in.\n * @param type The union type that should be converted.\n * @returns The type reflection representing the given union type.\n */\n convertType(context: Context, type: ts.UnionOrIntersectionType): UnionType | IntersectionType {\n let types: Type[];\n if (type && type.types) {\n types = type.types.map((t) => this.owner.convertType(context, null, t));\n } else {\n types = [];\n }\n\n return !!(type.flags & ts.TypeFlags.Intersection) ? new IntersectionType(types) : new UnionType(types);\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"union-or-intersection.js","sourceRoot":"","sources":["../../../../src/lib/converter/types/union-or-intersection.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AAEjC,kDAA6E;AAC7E,4CAAiF;AAIjF;IAAkD,gDAAsB;IAAxE;;IA8DA,CAAC;IA1DG,mDAAY,GAAZ,UAAa,OAAgB,EAAE,IAAoC;QAC/D,MAAM,CAAC,IAAI,CAAC,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,SAAS,IAAI,IAAI,CAAC,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,gBAAgB,CAAC;IACjG,CAAC;IAKD,mDAAY,GAAZ,UAAa,OAAgB,EAAE,IAAgC;QAC3D,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC,SAAS,CAAC,mBAAmB,CAAC,CAAC;IAC7D,CAAC;IAeD,kDAAW,GAAX,UAAY,OAAgB,EAAE,IAAoC;QAAlE,iBASC;QARG,IAAI,KAAK,GAAW,EAAE,CAAC;QACvB,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;YACb,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,UAAC,CAAC,IAAK,OAAA,KAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC,CAAC,EAAlC,CAAkC,CAAC,CAAC;QACtE,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,KAAK,GAAG,EAAE,CAAC;QACf,CAAC;QAED,MAAM,CAAC,IAAI,CAAC,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,gBAAgB,GAAG,IAAI,wBAAgB,CAAC,KAAK,CAAC,GAAG,IAAI,iBAAS,CAAC,KAAK,CAAC,CAAC;IAC7G,CAAC;IAeD,kDAAW,GAAX,UAAY,OAAgB,EAAE,IAAgC;QAA9D,iBASC;QARG,IAAI,KAAa,CAAC;QAClB,EAAE,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;YACrB,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,UAAC,CAAC,IAAK,OAAA,KAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,EAAxC,CAAwC,CAAC,CAAC;QAC5E,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,KAAK,GAAG,EAAE,CAAC;QACf,CAAC;QAED,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC,SAAS,CAAC,YAAY,CAAC,GAAG,IAAI,wBAAgB,CAAC,KAAK,CAAC,GAAG,IAAI,iBAAS,CAAC,KAAK,CAAC,CAAC;IAC3G,CAAC;IA7DQ,4BAA4B;QADxC,sBAAS,CAAC,EAAC,IAAI,EAAE,4BAA4B,EAAC,CAAC;OACnC,4BAA4B,CA8DxC;IAAD,mCAAC;CAAA,AA9DD,CAAkD,mCAAsB,GA8DvE;AA9DY,oEAA4B","sourcesContent":["import * as ts from 'typescript';\n\nimport { Type, UnionType, IntersectionType } from '../../models/types/index';\nimport { Component, ConverterTypeComponent, TypeConverter } from '../components';\nimport { Context } from '../context';\n\n@Component({name: 'type:union-or-intersection'})\nexport class UnionOrIntersectionConverter extends ConverterTypeComponent implements TypeConverter<ts.UnionOrIntersectionType, ts.UnionOrIntersectionTypeNode> {\n /**\n * Test whether this converter can handle the given TypeScript node.\n */\n supportsNode(context: Context, node: ts.UnionOrIntersectionTypeNode): boolean {\n return node.kind === ts.SyntaxKind.UnionType || node.kind === ts.SyntaxKind.IntersectionType;\n }\n\n /**\n * Test whether this converter can handle the given TypeScript type.\n */\n supportsType(context: Context, type: ts.UnionOrIntersectionType): boolean {\n return !!(type.flags & ts.TypeFlags.UnionOrIntersection);\n }\n\n /**\n * Convert the given union type node to its type reflection.\n *\n * This is a node based converter, see [[convertType]] for the type equivalent.\n *\n * ```\n * let someValue: string|number;\n * ```\n *\n * @param context The context object describing the current state the converter is in.\n * @param node The union or intersection type node that should be converted.\n * @returns The type reflection representing the given union type node.\n */\n convertNode(context: Context, node: ts.UnionOrIntersectionTypeNode): UnionType | IntersectionType {\n let types: Type[] = [];\n if (node.types) {\n types = node.types.map((n) => this.owner.convertType(context, n));\n } else {\n types = [];\n }\n\n return node.kind === ts.SyntaxKind.IntersectionType ? new IntersectionType(types) : new UnionType(types);\n }\n\n /**\n * Convert the given union type to its type reflection.\n *\n * This is a type based converter, see [[convertUnionTypeNode]] for the node equivalent.\n *\n * ```\n * let someValue: string|number;\n * ```\n *\n * @param context The context object describing the current state the converter is in.\n * @param type The union type that should be converted.\n * @returns The type reflection representing the given union type.\n */\n convertType(context: Context, type: ts.UnionOrIntersectionType): UnionType | IntersectionType {\n let types: Type[];\n if (type && type.types) {\n types = type.types.map((t) => this.owner.convertType(context, null, t));\n } else {\n types = [];\n }\n\n return !!(type.flags & ts.TypeFlags.Intersection) ? new IntersectionType(types) : new UnionType(types);\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/types/unknown.js b/node_modules/typedoc/dist/lib/converter/types/unknown.js
index 423e12916..6e32befde 100644
--- a/node_modules/typedoc/dist/lib/converter/types/unknown.js
+++ b/node_modules/typedoc/dist/lib/converter/types/unknown.js
@@ -32,10 +32,10 @@ var UnknownConverter = (function (_super) {
var name = context.checker.typeToString(type);
return new index_1.UnknownType(name);
};
+ UnknownConverter = __decorate([
+ components_1.Component({ name: 'type:unknown' })
+ ], UnknownConverter);
return UnknownConverter;
}(components_1.ConverterTypeComponent));
-UnknownConverter = __decorate([
- components_1.Component({ name: 'type:unknown' })
-], UnknownConverter);
exports.UnknownConverter = UnknownConverter;
//# sourceMappingURL=unknown.js.map \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/types/unknown.js.map b/node_modules/typedoc/dist/lib/converter/types/unknown.js.map
index 1e5fe691e..742f699d3 100644
--- a/node_modules/typedoc/dist/lib/converter/types/unknown.js.map
+++ b/node_modules/typedoc/dist/lib/converter/types/unknown.js.map
@@ -1 +1 @@
-{"version":3,"file":"unknown.js","sourceRoot":"","sources":["../../../../src/lib/converter/types/unknown.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAEA,kDAA2D;AAC3D,4CAAmF;AAInF,IAAa,gBAAgB;IAAS,oCAAsB;IAD5D;QAAA,qEAgCC;QA1BG,cAAQ,GAAW,CAAC,GAAG,CAAC;;IA0B5B,CAAC;IArBG,uCAAY,GAAZ,UAAa,OAAgB,EAAE,IAAa;QACxC,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAeD,sCAAW,GAAX,UAAY,OAAgB,EAAE,IAAa;QACvC,IAAM,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QAChD,MAAM,CAAC,IAAI,mBAAW,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC;IACL,uBAAC;AAAD,CAAC,AA/BD,CAAsC,mCAAsB,GA+B3D;AA/BY,gBAAgB;IAD5B,sBAAS,CAAC,EAAC,IAAI,EAAE,cAAc,EAAC,CAAC;GACrB,gBAAgB,CA+B5B;AA/BY,4CAAgB","sourcesContent":["import * as ts from 'typescript';\n\nimport {Type, UnknownType} from '../../models/types/index';\nimport {Component, ConverterTypeComponent, TypeTypeConverter} from '../components';\nimport {Context} from '../context';\n\n@Component({name: 'type:unknown'})\nexport class UnknownConverter extends ConverterTypeComponent implements TypeTypeConverter<ts.Type> {\n /**\n * The priority this converter should be executed with.\n * A higher priority means the converter will be applied earlier.\n */\n priority: number = -100;\n\n /**\n * Test whether this converter can handle the given TypeScript type.\n */\n supportsType(context: Context, type: ts.Type): boolean {\n return true;\n }\n\n /**\n * Convert the given type to its type reflection.\n *\n * This is a type based converter with no node based equivalent.\n *\n * If no other converter is able to reflect a type, this converter will produce a\n * reflection by utilising ts.typeToString() to generate a string representation of the\n * given type.\n *\n * @param context The context object describing the current state the converter is in.\n * @param type The type that should be converted.\n * @returns The type reflection representing the given type.\n */\n convertType(context: Context, type: ts.Type): Type {\n const name = context.checker.typeToString(type);\n return new UnknownType(name);\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"unknown.js","sourceRoot":"","sources":["../../../../src/lib/converter/types/unknown.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAEA,kDAA6D;AAC7D,4CAAqF;AAIrF;IAAsC,oCAAsB;IAD5D;QAAA,qEAgCC;QA1BG,cAAQ,GAAW,CAAC,GAAG,CAAC;;IA0B5B,CAAC;IArBG,uCAAY,GAAZ,UAAa,OAAgB,EAAE,IAAa;QACxC,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAeD,sCAAW,GAAX,UAAY,OAAgB,EAAE,IAAa;QACvC,IAAM,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QAChD,MAAM,CAAC,IAAI,mBAAW,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC;IA9BQ,gBAAgB;QAD5B,sBAAS,CAAC,EAAC,IAAI,EAAE,cAAc,EAAC,CAAC;OACrB,gBAAgB,CA+B5B;IAAD,uBAAC;CAAA,AA/BD,CAAsC,mCAAsB,GA+B3D;AA/BY,4CAAgB","sourcesContent":["import * as ts from 'typescript';\n\nimport { Type, UnknownType } from '../../models/types/index';\nimport { Component, ConverterTypeComponent, TypeTypeConverter } from '../components';\nimport { Context } from '../context';\n\n@Component({name: 'type:unknown'})\nexport class UnknownConverter extends ConverterTypeComponent implements TypeTypeConverter<ts.Type> {\n /**\n * The priority this converter should be executed with.\n * A higher priority means the converter will be applied earlier.\n */\n priority: number = -100;\n\n /**\n * Test whether this converter can handle the given TypeScript type.\n */\n supportsType(context: Context, type: ts.Type): boolean {\n return true;\n }\n\n /**\n * Convert the given type to its type reflection.\n *\n * This is a type based converter with no node based equivalent.\n *\n * If no other converter is able to reflect a type, this converter will produce a\n * reflection by utilising ts.typeToString() to generate a string representation of the\n * given type.\n *\n * @param context The context object describing the current state the converter is in.\n * @param type The type that should be converted.\n * @returns The type reflection representing the given type.\n */\n convertType(context: Context, type: ts.Type): Type {\n const name = context.checker.typeToString(type);\n return new UnknownType(name);\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/converter/utils/compiler-host.js.map b/node_modules/typedoc/dist/lib/converter/utils/compiler-host.js.map
index 649a64f91..11e3f2a0e 100644
--- a/node_modules/typedoc/dist/lib/converter/utils/compiler-host.js.map
+++ b/node_modules/typedoc/dist/lib/converter/utils/compiler-host.js.map
@@ -1 +1 @@
-{"version":3,"file":"compiler-host.js","sourceRoot":"","sources":["../../../../src/lib/converter/utils/compiler-host.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+BAAiC;AACjC,uCAAyC;AAEzC,4CAAiD;AAKjD,IAAM,+BAA+B,GAAG,CAAC,UAAU,CAAC;AAKpD;IAAkC,gCAAkB;IAApD;;IA6IA,CAAC;IA5HG,oCAAa,GAAb,UAAc,QAAgB,EAAE,eAAgC,EAAE,OAAmC;QACjG,IAAI,IAAY,CAAC;QACjB,IAAI,CAAC;YACD,IAAI,GAAG,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,kBAAkB,EAAE,CAAC,OAAO,CAAC,CAAC;QAC5F,CAAC;QAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YACT,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;gBACV,OAAO,CAAC,CAAC,CAAC,MAAM,KAAK,+BAA+B,GAAG,2BAA2B,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC;YACpG,CAAC;YACD,IAAI,GAAG,EAAE,CAAC;QACd,CAAC;QAED,MAAM,CAAC,IAAI,KAAK,SAAS,GAAG,EAAE,CAAC,gBAAgB,CAAC,QAAQ,EAAE,IAAI,EAAE,eAAe,CAAC,GAAG,SAAS,CAAC;IACjG,CAAC;IASD,4CAAqB,GAArB,UAAsB,OAA2B;QAC7C,IAAM,WAAW,GAAG,GAAG,CAAC,gBAAgB,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE,CAAC,GAAG,CAAC,oBAAoB,EAAE,CAAC,CAAC,CAAC;QAC3F,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,WAAW,EAAE,EAAE,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC,CAAC;IAC5E,CAAC;IAED,qCAAc,GAAd,UAAe,IAAY;QACvB,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;IACvC,CAAC;IASD,0CAAmB,GAAnB;QACI,MAAM,CAAC,IAAI,CAAC,gBAAgB,IAAI,CAAC,IAAI,CAAC,gBAAgB,GAAG,EAAE,CAAC,GAAG,CAAC,mBAAmB,EAAE,CAAC,CAAC;IAC3F,CAAC;IASD,gDAAyB,GAAzB;QACI,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,yBAAyB,CAAC;IAC5C,CAAC;IAUD,iCAAU,GAAV,UAAW,QAAgB;QACvB,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;IACvC,CAAC;IAUD,sCAAe,GAAf,UAAgB,aAAqB;QACjC,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC;IACjD,CAAC;IAUD,+BAAQ,GAAR,UAAS,QAAgB;QACrB,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACrC,CAAC;IAUD,2CAAoB,GAApB,UAAqB,QAAgB;QACjC,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,yBAAyB,GAAG,QAAQ,GAAG,QAAQ,CAAC,WAAW,EAAE,CAAC;IAChF,CAAC;IASD,iCAAU,GAAV;QACI,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC;IAC1B,CAAC;IAcD,gCAAS,GAAT,UAAU,QAAgB,EAAE,IAAY,EAAE,kBAA2B,EAAE,OAAmC,IAAI,CAAC;IACnH,mBAAC;AAAD,CAAC,AA7ID,CAAkC,+BAAkB,GA6InD;AA7IY,oCAAY","sourcesContent":["import * as ts from 'typescript';\nimport * as _ts from '../../ts-internal';\n\nimport {ConverterComponent} from '../components';\n\n/**\n * Return code of ts.sys.readFile when the file encoding is unsupported.\n */\nconst ERROR_UNSUPPORTED_FILE_ENCODING = -2147024809;\n\n/**\n * CompilerHost implementation\n */\nexport class CompilerHost extends ConverterComponent implements ts.CompilerHost {\n\n /**\n * The full path of the current directory. Result cache of [[getCurrentDirectory]].\n */\n private currentDirectory: string;\n\n /**\n * Return an instance of ts.SourceFile representing the given file.\n *\n * Implementation of ts.CompilerHost.getSourceFile()\n *\n * @param filename The path and name of the file that should be loaded.\n * @param languageVersion The script target the file should be interpreted with.\n * @param onError A callback that will be invoked if an error occurs.\n * @returns An instance of ts.SourceFile representing the given file.\n */\n getSourceFile(filename: string, languageVersion: ts.ScriptTarget, onError?: (message: string) => void): ts.SourceFile {\n let text: string;\n try {\n text = ts.sys.readFile(filename, this.application.options.getCompilerOptions().charset);\n } catch (e) {\n if (onError) {\n onError(e.number === ERROR_UNSUPPORTED_FILE_ENCODING ? 'Unsupported file encoding' : e.message);\n }\n text = '';\n }\n\n return text !== undefined ? ts.createSourceFile(filename, text, languageVersion) : undefined;\n }\n\n /**\n * Return the full path of the default library that should be used.\n *\n * Implementation of ts.CompilerHost.getDefaultLibFilename()\n *\n * @returns The full path of the default library.\n */\n getDefaultLibFileName(options: ts.CompilerOptions): string {\n const libLocation = _ts.getDirectoryPath(_ts.normalizePath(ts.sys.getExecutingFilePath()));\n return _ts.combinePaths(libLocation, ts.getDefaultLibFileName(options));\n }\n\n getDirectories(path: string): string[] {\n return ts.sys.getDirectories(path);\n }\n\n /**\n * Return the full path of the current directory.\n *\n * Implementation of ts.CompilerHost.getCurrentDirectory()\n *\n * @returns The full path of the current directory.\n */\n getCurrentDirectory(): string {\n return this.currentDirectory || (this.currentDirectory = ts.sys.getCurrentDirectory());\n }\n\n /**\n * Return whether file names are case sensitive on the current platform or not.\n *\n * Implementation of ts.CompilerHost.useCaseSensitiveFileNames()\n *\n * @returns TRUE if file names are case sensitive on the current platform, FALSE otherwise.\n */\n useCaseSensitiveFileNames(): boolean {\n return ts.sys.useCaseSensitiveFileNames;\n }\n\n /**\n * Check whether the given file exists.\n *\n * Implementation of ts.CompilerHost.fileExists(fileName)\n *\n * @param fileName\n * @returns {boolean}\n */\n fileExists(fileName: string): boolean {\n return ts.sys.fileExists(fileName);\n }\n\n /**\n * Check whether the given directory exists.\n *\n * Implementation of ts.CompilerHost.directoryExists(directoryName)\n *\n * @param directoryName\n * @returns {boolean}\n */\n directoryExists(directoryName: string): boolean {\n return ts.sys.directoryExists(directoryName);\n }\n\n /**\n * Return the contents of the given file.\n *\n * Implementation of ts.CompilerHost.readFile(fileName)\n *\n * @param fileName\n * @returns {string}\n */\n readFile(fileName: string): string {\n return ts.sys.readFile(fileName);\n }\n\n /**\n * Return the canonical file name of the given file.\n *\n * Implementation of ts.CompilerHost.getCanonicalFileName()\n *\n * @param fileName The file name whose canonical variant should be resolved.\n * @returns The canonical file name of the given file.\n */\n getCanonicalFileName(fileName: string): string {\n return ts.sys.useCaseSensitiveFileNames ? fileName : fileName.toLowerCase();\n }\n\n /**\n * Return the new line char sequence of the current platform.\n *\n * Implementation of ts.CompilerHost.getNewLine()\n *\n * @returns The new line char sequence of the current platform.\n */\n getNewLine(): string {\n return ts.sys.newLine;\n }\n\n /**\n * Write a compiled javascript file to disc.\n *\n * As TypeDoc will not emit compiled javascript files this is a null operation.\n *\n * Implementation of ts.CompilerHost.writeFile()\n *\n * @param fileName The name of the file that should be written.\n * @param data The contents of the file.\n * @param writeByteOrderMark Whether the UTF-8 BOM should be written or not.\n * @param onError A callback that will be invoked if an error occurs.\n */\n writeFile(fileName: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void) { }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"compiler-host.js","sourceRoot":"","sources":["../../../../src/lib/converter/utils/compiler-host.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+BAAiC;AACjC,uCAAyC;AAEzC,4CAAmD;AAKnD,IAAM,+BAA+B,GAAG,CAAC,UAAU,CAAC;AAKpD;IAAkC,gCAAkB;IAApD;;IA6IA,CAAC;IA5HG,oCAAa,GAAb,UAAc,QAAgB,EAAE,eAAgC,EAAE,OAAmC;QACjG,IAAI,IAAY,CAAC;QACjB,IAAI,CAAC;YACD,IAAI,GAAG,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,kBAAkB,EAAE,CAAC,OAAO,CAAC,CAAC;QAC5F,CAAC;QAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YACT,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;gBACV,OAAO,CAAC,CAAC,CAAC,MAAM,KAAK,+BAA+B,GAAG,2BAA2B,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC;YACpG,CAAC;YACD,IAAI,GAAG,EAAE,CAAC;QACd,CAAC;QAED,MAAM,CAAC,IAAI,KAAK,SAAS,GAAG,EAAE,CAAC,gBAAgB,CAAC,QAAQ,EAAE,IAAI,EAAE,eAAe,CAAC,GAAG,SAAS,CAAC;IACjG,CAAC;IASD,4CAAqB,GAArB,UAAsB,OAA2B;QAC7C,IAAM,WAAW,GAAG,GAAG,CAAC,gBAAgB,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE,CAAC,GAAG,CAAC,oBAAoB,EAAE,CAAC,CAAC,CAAC;QAC3F,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,WAAW,EAAE,EAAE,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC,CAAC;IAC5E,CAAC;IAED,qCAAc,GAAd,UAAe,IAAY;QACvB,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;IACvC,CAAC;IASD,0CAAmB,GAAnB;QACI,MAAM,CAAC,IAAI,CAAC,gBAAgB,IAAI,CAAC,IAAI,CAAC,gBAAgB,GAAG,EAAE,CAAC,GAAG,CAAC,mBAAmB,EAAE,CAAC,CAAC;IAC3F,CAAC;IASD,gDAAyB,GAAzB;QACI,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,yBAAyB,CAAC;IAC5C,CAAC;IAUD,iCAAU,GAAV,UAAW,QAAgB;QACvB,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;IACvC,CAAC;IAUD,sCAAe,GAAf,UAAgB,aAAqB;QACjC,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC;IACjD,CAAC;IAUD,+BAAQ,GAAR,UAAS,QAAgB;QACrB,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACrC,CAAC;IAUD,2CAAoB,GAApB,UAAqB,QAAgB;QACjC,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,yBAAyB,GAAG,QAAQ,GAAG,QAAQ,CAAC,WAAW,EAAE,CAAC;IAChF,CAAC;IASD,iCAAU,GAAV;QACI,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC;IAC1B,CAAC;IAcD,gCAAS,GAAT,UAAU,QAAgB,EAAE,IAAY,EAAE,kBAA2B,EAAE,OAAmC,IAAI,CAAC;IACnH,mBAAC;AAAD,CAAC,AA7ID,CAAkC,+BAAkB,GA6InD;AA7IY,oCAAY","sourcesContent":["import * as ts from 'typescript';\nimport * as _ts from '../../ts-internal';\n\nimport { ConverterComponent } from '../components';\n\n/**\n * Return code of ts.sys.readFile when the file encoding is unsupported.\n */\nconst ERROR_UNSUPPORTED_FILE_ENCODING = -2147024809;\n\n/**\n * CompilerHost implementation\n */\nexport class CompilerHost extends ConverterComponent implements ts.CompilerHost {\n\n /**\n * The full path of the current directory. Result cache of [[getCurrentDirectory]].\n */\n private currentDirectory: string;\n\n /**\n * Return an instance of ts.SourceFile representing the given file.\n *\n * Implementation of ts.CompilerHost.getSourceFile()\n *\n * @param filename The path and name of the file that should be loaded.\n * @param languageVersion The script target the file should be interpreted with.\n * @param onError A callback that will be invoked if an error occurs.\n * @returns An instance of ts.SourceFile representing the given file.\n */\n getSourceFile(filename: string, languageVersion: ts.ScriptTarget, onError?: (message: string) => void): ts.SourceFile {\n let text: string;\n try {\n text = ts.sys.readFile(filename, this.application.options.getCompilerOptions().charset);\n } catch (e) {\n if (onError) {\n onError(e.number === ERROR_UNSUPPORTED_FILE_ENCODING ? 'Unsupported file encoding' : e.message);\n }\n text = '';\n }\n\n return text !== undefined ? ts.createSourceFile(filename, text, languageVersion) : undefined;\n }\n\n /**\n * Return the full path of the default library that should be used.\n *\n * Implementation of ts.CompilerHost.getDefaultLibFilename()\n *\n * @returns The full path of the default library.\n */\n getDefaultLibFileName(options: ts.CompilerOptions): string {\n const libLocation = _ts.getDirectoryPath(_ts.normalizePath(ts.sys.getExecutingFilePath()));\n return _ts.combinePaths(libLocation, ts.getDefaultLibFileName(options));\n }\n\n getDirectories(path: string): string[] {\n return ts.sys.getDirectories(path);\n }\n\n /**\n * Return the full path of the current directory.\n *\n * Implementation of ts.CompilerHost.getCurrentDirectory()\n *\n * @returns The full path of the current directory.\n */\n getCurrentDirectory(): string {\n return this.currentDirectory || (this.currentDirectory = ts.sys.getCurrentDirectory());\n }\n\n /**\n * Return whether file names are case sensitive on the current platform or not.\n *\n * Implementation of ts.CompilerHost.useCaseSensitiveFileNames()\n *\n * @returns TRUE if file names are case sensitive on the current platform, FALSE otherwise.\n */\n useCaseSensitiveFileNames(): boolean {\n return ts.sys.useCaseSensitiveFileNames;\n }\n\n /**\n * Check whether the given file exists.\n *\n * Implementation of ts.CompilerHost.fileExists(fileName)\n *\n * @param fileName\n * @returns {boolean}\n */\n fileExists(fileName: string): boolean {\n return ts.sys.fileExists(fileName);\n }\n\n /**\n * Check whether the given directory exists.\n *\n * Implementation of ts.CompilerHost.directoryExists(directoryName)\n *\n * @param directoryName\n * @returns {boolean}\n */\n directoryExists(directoryName: string): boolean {\n return ts.sys.directoryExists(directoryName);\n }\n\n /**\n * Return the contents of the given file.\n *\n * Implementation of ts.CompilerHost.readFile(fileName)\n *\n * @param fileName\n * @returns {string}\n */\n readFile(fileName: string): string {\n return ts.sys.readFile(fileName);\n }\n\n /**\n * Return the canonical file name of the given file.\n *\n * Implementation of ts.CompilerHost.getCanonicalFileName()\n *\n * @param fileName The file name whose canonical variant should be resolved.\n * @returns The canonical file name of the given file.\n */\n getCanonicalFileName(fileName: string): string {\n return ts.sys.useCaseSensitiveFileNames ? fileName : fileName.toLowerCase();\n }\n\n /**\n * Return the new line char sequence of the current platform.\n *\n * Implementation of ts.CompilerHost.getNewLine()\n *\n * @returns The new line char sequence of the current platform.\n */\n getNewLine(): string {\n return ts.sys.newLine;\n }\n\n /**\n * Write a compiled javascript file to disc.\n *\n * As TypeDoc will not emit compiled javascript files this is a null operation.\n *\n * Implementation of ts.CompilerHost.writeFile()\n *\n * @param fileName The name of the file that should be written.\n * @param data The contents of the file.\n * @param writeByteOrderMark Whether the UTF-8 BOM should be written or not.\n * @param onError A callback that will be invoked if an error occurs.\n */\n writeFile(fileName: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void) { }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/models/ReflectionGroup.js.map b/node_modules/typedoc/dist/lib/models/ReflectionGroup.js.map
index 6c9a7adc6..9f81bff88 100644
--- a/node_modules/typedoc/dist/lib/models/ReflectionGroup.js.map
+++ b/node_modules/typedoc/dist/lib/models/ReflectionGroup.js.map
@@ -1 +1 @@
-{"version":3,"file":"ReflectionGroup.js","sourceRoot":"","sources":["../../../src/lib/models/ReflectionGroup.ts"],"names":[],"mappings":";;AASA;IA6DI,yBAAY,KAAa,EAAE,IAAoB;QAA/C,iBAKC;QApDD,aAAQ,GAAiB,EAAE,CAAC;QAgDxB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QAEjB,IAAI,CAAC,0BAA0B,GAAG,CAAC,cAAM,OAAA,KAAI,CAAC,6BAA6B,EAAE,EAApC,CAAoC,CAAC,CAAC;IACnF,CAAC;IAKO,uDAA6B,GAArC;QACI,IAAI,gBAAgB,GAAG,IAAI,CAAC;QAC5B,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAC,KAAK;YACxB,gBAAgB,GAAG,gBAAgB,IAAI,KAAK,CAAC,cAAc,CAAC;QAChE,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,gBAAgB,CAAC;IAC5B,CAAC;IAKD,kCAAQ,GAAR;QACI,IAAM,MAAM,GAAG;YACX,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,IAAI,EAAG,IAAI,CAAC,IAAI;SACnB,CAAC;QAEF,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;YAChB,IAAM,UAAQ,GAAU,EAAE,CAAC;YAC3B,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAC,KAAK;gBACxB,UAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YAC5B,CAAC,CAAC,CAAC;YAEH,MAAM,CAAC,UAAU,CAAC,GAAG,UAAQ,CAAC;QAClC,CAAC;QAED,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IACL,sBAAC;AAAD,CAAC,AApGD,IAoGC;AApGY,0CAAe","sourcesContent":["import {Reflection, ReflectionKind} from './reflections/abstract';\n\n/**\n * A group of reflections. All reflections in a group are of the same kind.\n *\n * Reflection groups are created by the ´GroupHandler´ in the resolving phase\n * of the dispatcher. The main purpose of groups is to be able to more easily\n * render human readable children lists in templates.\n */\nexport class ReflectionGroup {\n /**\n * The title, a string representation of the typescript kind, of this group.\n */\n title: string;\n\n /**\n * The original typescript kind of the children of this group.\n */\n kind: ReflectionKind;\n\n /**\n * All reflections of this group.\n */\n children: Reflection[] = [];\n\n /**\n * A list of generated css classes that should be applied to representations of this\n * group in the generated markup.\n */\n cssClasses: string;\n\n /**\n * Do all children of this group have a separate document?\n *\n * A bound representation of the ´ReflectionGroup.getAllChildrenHaveOwnDocument´\n * that can be used within templates.\n */\n allChildrenHaveOwnDocument: Function;\n\n /**\n * Are all children inherited members?\n */\n allChildrenAreInherited: boolean;\n\n /**\n * Are all children private members?\n */\n allChildrenArePrivate: boolean;\n\n /**\n * Are all children private or protected members?\n */\n allChildrenAreProtectedOrPrivate: boolean;\n\n /**\n * Are all children external members?\n */\n allChildrenAreExternal: boolean;\n\n /**\n * Are any children exported declarations?\n */\n someChildrenAreExported: boolean;\n\n /**\n * Create a new ReflectionGroup instance.\n *\n * @param title The title of this group.\n * @param kind The original typescript kind of the children of this group.\n */\n constructor(title: string, kind: ReflectionKind) {\n this.title = title;\n this.kind = kind;\n\n this.allChildrenHaveOwnDocument = (() => this.getAllChildrenHaveOwnDocument());\n }\n\n /**\n * Do all children of this group have a separate document?\n */\n private getAllChildrenHaveOwnDocument(): boolean {\n let onlyOwnDocuments = true;\n this.children.forEach((child) => {\n onlyOwnDocuments = onlyOwnDocuments && child.hasOwnDocument;\n });\n\n return onlyOwnDocuments;\n }\n\n /**\n * Return a raw object representation of this reflection group.\n */\n toObject(): any {\n const result = {\n title: this.title,\n kind: this.kind\n };\n\n if (this.children) {\n const children: any[] = [];\n this.children.forEach((child) => {\n children.push(child.id);\n });\n\n result['children'] = children;\n }\n\n return result;\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"ReflectionGroup.js","sourceRoot":"","sources":["../../../src/lib/models/ReflectionGroup.ts"],"names":[],"mappings":";;AASA;IA6DI,yBAAY,KAAa,EAAE,IAAoB;QAA/C,iBAKC;QApDD,aAAQ,GAAiB,EAAE,CAAC;QAgDxB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QAEjB,IAAI,CAAC,0BAA0B,GAAG,CAAC,cAAM,OAAA,KAAI,CAAC,6BAA6B,EAAE,EAApC,CAAoC,CAAC,CAAC;IACnF,CAAC;IAKO,uDAA6B,GAArC;QACI,IAAI,gBAAgB,GAAG,IAAI,CAAC;QAC5B,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAC,KAAK;YACxB,gBAAgB,GAAG,gBAAgB,IAAI,KAAK,CAAC,cAAc,CAAC;QAChE,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,gBAAgB,CAAC;IAC5B,CAAC;IAKD,kCAAQ,GAAR;QACI,IAAM,MAAM,GAAG;YACX,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,IAAI,EAAG,IAAI,CAAC,IAAI;SACnB,CAAC;QAEF,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;YAChB,IAAM,UAAQ,GAAU,EAAE,CAAC;YAC3B,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAC,KAAK;gBACxB,UAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YAC5B,CAAC,CAAC,CAAC;YAEH,MAAM,CAAC,UAAU,CAAC,GAAG,UAAQ,CAAC;QAClC,CAAC;QAED,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IACL,sBAAC;AAAD,CAAC,AApGD,IAoGC;AApGY,0CAAe","sourcesContent":["import { Reflection, ReflectionKind } from './reflections/abstract';\n\n/**\n * A group of reflections. All reflections in a group are of the same kind.\n *\n * Reflection groups are created by the ´GroupHandler´ in the resolving phase\n * of the dispatcher. The main purpose of groups is to be able to more easily\n * render human readable children lists in templates.\n */\nexport class ReflectionGroup {\n /**\n * The title, a string representation of the typescript kind, of this group.\n */\n title: string;\n\n /**\n * The original typescript kind of the children of this group.\n */\n kind: ReflectionKind;\n\n /**\n * All reflections of this group.\n */\n children: Reflection[] = [];\n\n /**\n * A list of generated css classes that should be applied to representations of this\n * group in the generated markup.\n */\n cssClasses: string;\n\n /**\n * Do all children of this group have a separate document?\n *\n * A bound representation of the ´ReflectionGroup.getAllChildrenHaveOwnDocument´\n * that can be used within templates.\n */\n allChildrenHaveOwnDocument: Function;\n\n /**\n * Are all children inherited members?\n */\n allChildrenAreInherited: boolean;\n\n /**\n * Are all children private members?\n */\n allChildrenArePrivate: boolean;\n\n /**\n * Are all children private or protected members?\n */\n allChildrenAreProtectedOrPrivate: boolean;\n\n /**\n * Are all children external members?\n */\n allChildrenAreExternal: boolean;\n\n /**\n * Are any children exported declarations?\n */\n someChildrenAreExported: boolean;\n\n /**\n * Create a new ReflectionGroup instance.\n *\n * @param title The title of this group.\n * @param kind The original typescript kind of the children of this group.\n */\n constructor(title: string, kind: ReflectionKind) {\n this.title = title;\n this.kind = kind;\n\n this.allChildrenHaveOwnDocument = (() => this.getAllChildrenHaveOwnDocument());\n }\n\n /**\n * Do all children of this group have a separate document?\n */\n private getAllChildrenHaveOwnDocument(): boolean {\n let onlyOwnDocuments = true;\n this.children.forEach((child) => {\n onlyOwnDocuments = onlyOwnDocuments && child.hasOwnDocument;\n });\n\n return onlyOwnDocuments;\n }\n\n /**\n * Return a raw object representation of this reflection group.\n */\n toObject(): any {\n const result = {\n title: this.title,\n kind: this.kind\n };\n\n if (this.children) {\n const children: any[] = [];\n this.children.forEach((child) => {\n children.push(child.id);\n });\n\n result['children'] = children;\n }\n\n return result;\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/models/comments/comment.js.map b/node_modules/typedoc/dist/lib/models/comments/comment.js.map
index 301bb7453..a05708766 100644
--- a/node_modules/typedoc/dist/lib/models/comments/comment.js.map
+++ b/node_modules/typedoc/dist/lib/models/comments/comment.js.map
@@ -1 +1 @@
-{"version":3,"file":"comment.js","sourceRoot":"","sources":["../../../../src/lib/models/comments/comment.ts"],"names":[],"mappings":";;AAAA,6BAAiC;AAQjC;IAyBI,iBAAY,SAAkB,EAAE,IAAa;QACzC,IAAI,CAAC,SAAS,GAAG,SAAS,IAAI,EAAE,CAAC;QACjC,IAAI,CAAC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;IAC3B,CAAC;IAOD,qCAAmB,GAAnB;QACI,MAAM,CAAW,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACtE,CAAC;IAQD,wBAAM,GAAN,UAAO,OAAe;QAClB,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;YACb,MAAM,CAAC,KAAK,CAAC;QACjB,CAAC;QACD,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;YAC/C,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC;gBACnC,MAAM,CAAC,IAAI,CAAC;YAChB,CAAC;QACL,CAAC;QACD,MAAM,CAAC,KAAK,CAAC;IACjB,CAAC;IAWD,wBAAM,GAAN,UAAO,OAAe,EAAE,SAAkB;QACtC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;YACb,MAAM,CAAC,IAAI,CAAC;QAChB,CAAC;QACD,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;YAC/C,IAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YACzB,EAAE,CAAC,CAAC,GAAG,CAAC,OAAO,KAAK,OAAO,IAAI,CAAC,SAAS,KAAK,KAAK,CAAC,IAAI,GAAG,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC;gBACnF,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YACxB,CAAC;QACL,CAAC;QACD,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAOD,0BAAQ,GAAR,UAAS,OAAgB;QACrB,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;QACnC,IAAI,CAAC,IAAI,GAAQ,OAAO,CAAC,IAAI,CAAC;QAC9B,IAAI,CAAC,OAAO,GAAK,OAAO,CAAC,OAAO,CAAC;QACjC,IAAI,CAAC,IAAI,GAAQ,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,UAAC,GAAG,IAAK,OAAA,IAAI,gBAAU,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,CAAC,SAAS,EAAE,GAAG,CAAC,IAAI,CAAC,EAApD,CAAoD,CAAC,GAAG,IAAI,CAAC;IAC3H,CAAC;IAKD,0BAAQ,GAAR;QACI,IAAM,MAAM,GAAQ,EAAE,CAAC;QACvB,EAAE,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;YACjB,MAAM,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;QACtC,CAAC;QACD,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;YACZ,MAAM,CAAC,IAAI,GAAQ,IAAI,CAAC,IAAI,CAAC;QACjC,CAAC;QACD,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;YACf,MAAM,CAAC,OAAO,GAAK,IAAI,CAAC,OAAO,CAAC;QACpC,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;YAChC,MAAM,CAAC,IAAI,GAAG,EAAE,CAAC;YACjB,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,UAAC,GAAG,IAAK,OAAA,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,EAAhC,CAAgC,CAAC,CAAC;QACjE,CAAC;QAED,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IACL,cAAC;AAAD,CAAC,AAjHD,IAiHC;AAjHY,0BAAO","sourcesContent":["import {CommentTag} from './tag';\n\n/**\n * A model that represents a javadoc comment.\n *\n * Instances of this model are created by the [[CommentHandler]]. You can retrieve comments\n * through the [[BaseReflection.comment]] property.\n */\nexport class Comment {\n /**\n * The abstract of the comment. TypeDoc interprets the first paragraph of a comment\n * as the abstract.\n */\n shortText: string;\n\n /**\n * The full body text of the comment. Excludes the [[shortText]].\n */\n text: string;\n\n /**\n * The text of the ```@returns``` tag if present.\n */\n returns: string;\n\n /**\n * All associated javadoc tags.\n */\n tags: CommentTag[];\n\n /**\n * Creates a new Comment instance.\n */\n constructor(shortText?: string, text?: string) {\n this.shortText = shortText || '';\n this.text = text || '';\n }\n\n /**\n * Has this comment a visible component?\n *\n * @returns TRUE when this comment has a visible component.\n */\n hasVisibleComponent(): boolean {\n return <boolean> (!!this.shortText || !!this.text || !!this.tags);\n }\n\n /**\n * Test whether this comment contains a tag with the given name.\n *\n * @param tagName The name of the tag to look for.\n * @returns TRUE when this comment contains a tag with the given name, otherwise FALSE.\n */\n hasTag(tagName: string): boolean {\n if (!this.tags) {\n return false;\n }\n for (let i = 0, c = this.tags.length; i < c; i++) {\n if (this.tags[i].tagName === tagName) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Return the first tag with the given name.\n *\n * You can optionally pass a parameter name that should be searched to.\n *\n * @param tagName The name of the tag to look for.\n * @param paramName An optional parameter name to look for.\n * @returns The found tag or NULL.\n */\n getTag(tagName: string, paramName?: string): CommentTag {\n if (!this.tags) {\n return null;\n }\n for (let i = 0, c = this.tags.length; i < c; i++) {\n const tag = this.tags[i];\n if (tag.tagName === tagName && (paramName === void 0 || tag.paramName === paramName)) {\n return this.tags[i];\n }\n }\n return null;\n }\n\n /**\n * Copy the data of the given comment into this comment.\n *\n * @param comment\n */\n copyFrom(comment: Comment) {\n this.shortText = comment.shortText;\n this.text = comment.text;\n this.returns = comment.returns;\n this.tags = comment.tags ? comment.tags.map((tag) => new CommentTag(tag.tagName, tag.paramName, tag.text)) : null;\n }\n\n /**\n * Return a raw object representation of this comment.\n */\n toObject(): any {\n const result: any = {};\n if (this.shortText) {\n result.shortText = this.shortText;\n }\n if (this.text) {\n result.text = this.text;\n }\n if (this.returns) {\n result.returns = this.returns;\n }\n\n if (this.tags && this.tags.length) {\n result.tags = [];\n this.tags.forEach((tag) => result.tags.push(tag.toObject()));\n }\n\n return result;\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"comment.js","sourceRoot":"","sources":["../../../../src/lib/models/comments/comment.ts"],"names":[],"mappings":";;AAAA,6BAAmC;AAQnC;IAyBI,iBAAY,SAAkB,EAAE,IAAa;QACzC,IAAI,CAAC,SAAS,GAAG,SAAS,IAAI,EAAE,CAAC;QACjC,IAAI,CAAC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;IAC3B,CAAC;IAOD,qCAAmB,GAAnB;QACI,MAAM,CAAW,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACtE,CAAC;IAQD,wBAAM,GAAN,UAAO,OAAe;QAClB,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;YACb,MAAM,CAAC,KAAK,CAAC;QACjB,CAAC;QACD,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;YAC/C,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC;gBACnC,MAAM,CAAC,IAAI,CAAC;YAChB,CAAC;QACL,CAAC;QACD,MAAM,CAAC,KAAK,CAAC;IACjB,CAAC;IAWD,wBAAM,GAAN,UAAO,OAAe,EAAE,SAAkB;QACtC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;YACb,MAAM,CAAC,IAAI,CAAC;QAChB,CAAC;QACD,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;YAC/C,IAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YACzB,EAAE,CAAC,CAAC,GAAG,CAAC,OAAO,KAAK,OAAO,IAAI,CAAC,SAAS,KAAK,KAAK,CAAC,IAAI,GAAG,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC;gBACnF,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YACxB,CAAC;QACL,CAAC;QACD,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAOD,0BAAQ,GAAR,UAAS,OAAgB;QACrB,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;QACnC,IAAI,CAAC,IAAI,GAAQ,OAAO,CAAC,IAAI,CAAC;QAC9B,IAAI,CAAC,OAAO,GAAK,OAAO,CAAC,OAAO,CAAC;QACjC,IAAI,CAAC,IAAI,GAAQ,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,UAAC,GAAG,IAAK,OAAA,IAAI,gBAAU,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,CAAC,SAAS,EAAE,GAAG,CAAC,IAAI,CAAC,EAApD,CAAoD,CAAC,GAAG,IAAI,CAAC;IAC3H,CAAC;IAKD,0BAAQ,GAAR;QACI,IAAM,MAAM,GAAQ,EAAE,CAAC;QACvB,EAAE,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;YACjB,MAAM,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;QACtC,CAAC;QACD,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;YACZ,MAAM,CAAC,IAAI,GAAQ,IAAI,CAAC,IAAI,CAAC;QACjC,CAAC;QACD,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;YACf,MAAM,CAAC,OAAO,GAAK,IAAI,CAAC,OAAO,CAAC;QACpC,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;YAChC,MAAM,CAAC,IAAI,GAAG,EAAE,CAAC;YACjB,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,UAAC,GAAG,IAAK,OAAA,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,EAAhC,CAAgC,CAAC,CAAC;QACjE,CAAC;QAED,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IACL,cAAC;AAAD,CAAC,AAjHD,IAiHC;AAjHY,0BAAO","sourcesContent":["import { CommentTag } from './tag';\n\n/**\n * A model that represents a javadoc comment.\n *\n * Instances of this model are created by the [[CommentHandler]]. You can retrieve comments\n * through the [[BaseReflection.comment]] property.\n */\nexport class Comment {\n /**\n * The abstract of the comment. TypeDoc interprets the first paragraph of a comment\n * as the abstract.\n */\n shortText: string;\n\n /**\n * The full body text of the comment. Excludes the [[shortText]].\n */\n text: string;\n\n /**\n * The text of the ```@returns``` tag if present.\n */\n returns: string;\n\n /**\n * All associated javadoc tags.\n */\n tags: CommentTag[];\n\n /**\n * Creates a new Comment instance.\n */\n constructor(shortText?: string, text?: string) {\n this.shortText = shortText || '';\n this.text = text || '';\n }\n\n /**\n * Has this comment a visible component?\n *\n * @returns TRUE when this comment has a visible component.\n */\n hasVisibleComponent(): boolean {\n return <boolean> (!!this.shortText || !!this.text || !!this.tags);\n }\n\n /**\n * Test whether this comment contains a tag with the given name.\n *\n * @param tagName The name of the tag to look for.\n * @returns TRUE when this comment contains a tag with the given name, otherwise FALSE.\n */\n hasTag(tagName: string): boolean {\n if (!this.tags) {\n return false;\n }\n for (let i = 0, c = this.tags.length; i < c; i++) {\n if (this.tags[i].tagName === tagName) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Return the first tag with the given name.\n *\n * You can optionally pass a parameter name that should be searched to.\n *\n * @param tagName The name of the tag to look for.\n * @param paramName An optional parameter name to look for.\n * @returns The found tag or NULL.\n */\n getTag(tagName: string, paramName?: string): CommentTag {\n if (!this.tags) {\n return null;\n }\n for (let i = 0, c = this.tags.length; i < c; i++) {\n const tag = this.tags[i];\n if (tag.tagName === tagName && (paramName === void 0 || tag.paramName === paramName)) {\n return this.tags[i];\n }\n }\n return null;\n }\n\n /**\n * Copy the data of the given comment into this comment.\n *\n * @param comment\n */\n copyFrom(comment: Comment) {\n this.shortText = comment.shortText;\n this.text = comment.text;\n this.returns = comment.returns;\n this.tags = comment.tags ? comment.tags.map((tag) => new CommentTag(tag.tagName, tag.paramName, tag.text)) : null;\n }\n\n /**\n * Return a raw object representation of this comment.\n */\n toObject(): any {\n const result: any = {};\n if (this.shortText) {\n result.shortText = this.shortText;\n }\n if (this.text) {\n result.text = this.text;\n }\n if (this.returns) {\n result.returns = this.returns;\n }\n\n if (this.tags && this.tags.length) {\n result.tags = [];\n this.tags.forEach((tag) => result.tags.push(tag.toObject()));\n }\n\n return result;\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/models/comments/index.js.map b/node_modules/typedoc/dist/lib/models/comments/index.js.map
index c4e67bb57..aa658fd15 100644
--- a/node_modules/typedoc/dist/lib/models/comments/index.js.map
+++ b/node_modules/typedoc/dist/lib/models/comments/index.js.map
@@ -1 +1 @@
-{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/models/comments/index.ts"],"names":[],"mappings":";;AAAA,qCAAkC;AAA1B,4BAAA,OAAO,CAAA;AACf,6BAAiC;AAAzB,2BAAA,UAAU,CAAA","sourcesContent":["export {Comment} from './comment';\nexport {CommentTag} from './tag';\n"]} \ No newline at end of file
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/models/comments/index.ts"],"names":[],"mappings":";;AAAA,qCAAoC;AAA3B,4BAAA,OAAO,CAAA;AAChB,6BAAmC;AAA1B,2BAAA,UAAU,CAAA","sourcesContent":["export { Comment } from './comment';\nexport { CommentTag } from './tag';\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/models/reflections/abstract.js.map b/node_modules/typedoc/dist/lib/models/reflections/abstract.js.map
index 25441c9f6..07a07488d 100644
--- a/node_modules/typedoc/dist/lib/models/reflections/abstract.js.map
+++ b/node_modules/typedoc/dist/lib/models/reflections/abstract.js.map
@@ -1 +1 @@
-{"version":3,"file":"abstract.js","sourceRoot":"","sources":["../../../../src/lib/models/reflections/abstract.ts"],"names":[],"mappings":";;AAoBA,IAAI,aAAa,GAAG,CAAC,CAAC;AAOtB;IACI,aAAa,GAAG,CAAC,CAAC;AACtB,CAAC;AAFD,8CAEC;AAKD,IAAY,cA+BX;AA/BD,WAAY,cAAc;IACtB,uDAAU,CAAA;IACV,uEAAkB,CAAA;IAClB,uDAAU,CAAA;IACV,mDAAQ,CAAA;IACR,gEAAe,CAAA;IACf,4DAAa,CAAA;IACb,4DAAa,CAAA;IACb,uDAAW,CAAA;IACX,+DAAe,CAAA;IACf,mEAAiB,CAAA;IACjB,8DAAe,CAAA;IACf,0DAAa,CAAA;IACb,wEAAoB,CAAA;IACpB,0EAAqB,CAAA;IACrB,uFAA4B,CAAA;IAC5B,iEAAiB,CAAA;IACjB,qEAAmB,CAAA;IACnB,0EAAsB,CAAA;IACtB,gEAAiB,CAAA;IACjB,wEAAqB,CAAA;IACrB,yEAAsB,CAAA;IACtB,2EAAuB,CAAA;IACvB,mEAAmB,CAAA;IACnB,2DAAe,CAAA;IAEf,6EAAoC,CAAA;IACpC,kFAAwC,CAAA;IACxC,8EAAoC,CAAA;IACpC,2EAAmG,CAAA;IACnG,+DAAoC,CAAA;AACxC,CAAC,EA/BW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QA+BzB;AAED,IAAY,cAYX;AAZD,WAAY,cAAc;IACtB,yDAAW,CAAA;IACX,6DAAa,CAAA;IACb,uDAAU,CAAA;IACV,uDAAU,CAAA;IACV,4DAAa,CAAA;IACb,4EAAqB,CAAA;IACrB,4DAAa,CAAA;IACb,6DAAc,CAAA;IACd,qEAAkB,CAAA;IAClB,qDAAU,CAAA;IACV,oFAA0B,CAAA;AAC9B,CAAC,EAZW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAYzB;AAED,IAAM,aAAa,GAAqB;IACpC,cAAc,CAAC,OAAO;IACtB,cAAc,CAAC,SAAS;IACxB,cAAc,CAAC,MAAM;IACrB,cAAc,CAAC,gBAAgB;IAC/B,cAAc,CAAC,QAAQ;IACvB,cAAc,CAAC,YAAY;IAC3B,cAAc,CAAC,IAAI;CACtB,CAAC;AAmEF,IAAY,gBASX;AATD,WAAY,gBAAgB;IACxB,+DAAQ,CAAA;IACR,mEAAU,CAAA;IACV,qEAAW,CAAA;IACX,yEAAa,CAAA;IACb,mEAAU,CAAA;IACV,2EAAc,CAAA;IACd,uEAAY,CAAA;IACZ,uEAAY,CAAA;AAChB,CAAC,EATW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAS3B;AAsCD;IAwFI,oBAAY,MAAmB,EAAE,IAAa,EAAE,IAAqB;QA/ErE,SAAI,GAAG,EAAE,CAAC;QAiBV,UAAK,GAAoB,EAAE,CAAC;QA+DxB,IAAI,CAAC,EAAE,GAAO,aAAa,EAAE,CAAC;QAC9B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,IAAI,GAAK,IAAI,CAAC;QACnB,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;QACzB,IAAI,CAAC,IAAI,GAAK,IAAI,CAAC;IACvB,CAAC;IAeD,2BAAM,GAAN,UAAO,IAAS;QACZ,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YACtB,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;gBAC1C,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;oBAC9B,MAAM,CAAC,IAAI,CAAC;gBAChB,CAAC;YACL,CAAC;YACD,MAAM,CAAC,KAAK,CAAC;QACjB,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,MAAM,CAAC,CAAC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;QACpC,CAAC;IACL,CAAC;IAUD,gCAAW,GAAX,UAAY,SAAuB;QAAvB,0BAAA,EAAA,eAAuB;QAC/B,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;YAC1C,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,SAAS,CAAC,GAAG,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC;QACtE,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;QACrB,CAAC;IACL,CAAC;IAKD,4BAAO,GAAP,UAAQ,IAAoB,EAAE,KAAqB;QAArB,sBAAA,EAAA,YAAqB;QAC/C,IAAI,IAAY,EAAE,KAAa,CAAC;QAChC,EAAE,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;YACrC,IAAI,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;YAC5B,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,UAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAK,OAAA,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,WAAW,EAAE,EAAzB,CAAyB,CAAC,CAAC;YAC3E,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACrC,CAAC;QAED,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;YACR,IAAI,CAAC,KAAK,CAAC,KAAK,IAAI,IAAI,CAAC;YACzB,EAAE,CAAC,CAAC,IAAI,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;gBACvB,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC1B,CAAC;QACL,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,IAAI,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC;YAC1B,EAAE,CAAC,CAAC,IAAI,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;gBACvB,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;YAChC,CAAC;QACL,CAAC;QAED,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;YACX,KAAK,cAAc,CAAC,OAAO;gBACvB,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC;gBAC7B,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;oBACR,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;oBAC9C,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;gBAC/C,CAAC;gBACD,KAAK,CAAC;YACV,KAAK,cAAc,CAAC,SAAS;gBACzB,IAAI,CAAC,KAAK,CAAC,WAAW,GAAG,KAAK,CAAC;gBAC/B,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;oBACR,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;oBAC5C,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;gBAC/C,CAAC;gBACD,KAAK,CAAC;YACV,KAAK,cAAc,CAAC,MAAM;gBACtB,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,KAAK,CAAC;gBAC5B,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;oBACR,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;oBAC5C,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;gBAClD,CAAC;gBACD,KAAK,CAAC;YACV,KAAK,cAAc,CAAC,MAAM;gBACtB,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,KAAK,CAAC;gBAC5B,KAAK,CAAC;YACV,KAAK,cAAc,CAAC,QAAQ;gBACxB,IAAI,CAAC,KAAK,CAAC,UAAU,GAAG,KAAK,CAAC;gBAC9B,KAAK,CAAC;YACV,KAAK,cAAc,CAAC,QAAQ;gBACxB,IAAI,CAAC,KAAK,CAAC,UAAU,GAAG,KAAK,CAAC;gBAC9B,KAAK,CAAC;YACV,KAAK,cAAc,CAAC,QAAQ;gBACxB,IAAI,CAAC,KAAK,CAAC,UAAU,GAAG,KAAK,CAAC;gBAC9B,KAAK,CAAC;YACV,KAAK,cAAc,CAAC,IAAI;gBACpB,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC;gBAC1B,KAAK,CAAC;YACV,KAAK,cAAc,CAAC,gBAAgB;gBAChC,IAAI,CAAC,KAAK,CAAC,mBAAmB,GAAG,KAAK,CAAC;gBACvC,KAAK,CAAC;YACV,KAAK,cAAc,CAAC,mBAAmB;gBACnC,IAAI,CAAC,KAAK,CAAC,qBAAqB,GAAG,KAAK,CAAC;gBACzC,KAAK,CAAC;QACd,CAAC;IACL,CAAC;IAKD,6BAAQ,GAAR;QACI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;YACf,IAAI,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC;YAChE,EAAE,CAAC,CAAC,KAAK,KAAK,EAAE,CAAC,CAAC,CAAC;gBACf,KAAK,GAAG,aAAa,GAAG,IAAI,CAAC,EAAE,CAAC;YACpC,CAAC;YAED,IAAI,MAAM,GAAgB,IAAI,CAAC;YAC/B,OAAO,MAAM,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC;gBAC3E,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;YAC3B,CAAC;YAED,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;gBACnB,MAAM,CAAC,QAAQ,GAAG,EAAE,CAAC;YACzB,CAAC;YACD,IAAI,MAAM,GAAG,EAAE,EAAE,KAAK,GAAG,CAAC,CAAC;YAC3B,OAAO,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;gBACpD,MAAM,GAAG,GAAG,GAAG,CAAC,EAAE,KAAK,CAAC,CAAC,QAAQ,EAAE,CAAC;YACxC,CAAC;YAED,KAAK,IAAI,MAAM,CAAC;YAChB,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAC5B,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACxB,CAAC;QAED,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;IAOD,+BAAU,GAAV;QACI,MAAM,CAAW,CAAC,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAAC;IAC1E,CAAC;IAED,sCAAiB,GAAjB;QACI,MAAM,CAAC,KAAK,CAAC;IACjB,CAAC;IAiBD,mCAAc,GAAd,UAAe,GAAQ;QACnB,IAAM,KAAK,GAAa,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAClE,IAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QACtB,IAAI,MAAM,GAAe,IAAI,CAAC;QAE9B,IAAI,CAAC,QAAQ,CAAC,UAAC,KAAK;YAChB,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC;gBACtB,EAAE,CAAC,CAAC,KAAK,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC,CAAC;oBACpB,MAAM,GAAG,KAAK,CAAC;gBACnB,CAAC;gBAAC,IAAI,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;oBACf,MAAM,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;gBAClD,CAAC;YACL,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IAKD,8BAAS,GAAT;QACI,MAAM,CAAC,KAAK,CAAC;IACjB,CAAC;IAiBD,yCAAoB,GAApB,UAAqB,GAAQ;QACzB,IAAM,KAAK,GAAa,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAElE,IAAM,UAAU,GAAG,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;QAC9C,EAAE,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;YACb,MAAM,CAAC,UAAU,CAAC;QACtB,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC;QACnD,CAAC;IACL,CAAC;IAUD,6BAAQ,GAAR,UAAS,QAA0B,IAAI,CAAC;IAKxC,6BAAQ,GAAR;QACI,IAAM,MAAM,GAAQ;YAChB,EAAE,EAAU,IAAI,CAAC,EAAE;YACnB,IAAI,EAAQ,IAAI,CAAC,IAAI;YACrB,IAAI,EAAQ,IAAI,CAAC,IAAI;YACrB,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,KAAK,EAAO,EAAE;SACjB,CAAC;QAEF,EAAE,CAAC,CAAC,IAAI,CAAC,YAAY,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;YAClC,MAAM,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;QAC5C,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;YACf,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;QAC7C,CAAC;QAED,GAAG,CAAC,CAAC,IAAI,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;YAEzB,EAAE,CAAC,CAAC,QAAQ,CAAC,GAAG,EAAE,EAAE,CAAC,IAAU,GAAG,IAAI,GAAG,KAAK,OAAO,CAAC,CAAC,CAAC;gBACpD,QAAQ,CAAC;YACb,CAAC;YACD,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;gBAClB,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;YAC7B,CAAC;QACL,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;YACjB,MAAM,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,UAAC,IAAI,IAAK,OAAA,IAAI,CAAC,QAAQ,EAAE,EAAf,CAAe,CAAC,CAAC;QACrE,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;YAClB,MAAM,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,UAAC,SAAS;gBAC9C,IAAM,MAAM,GAAQ,EAAE,IAAI,EAAE,SAAS,CAAC,IAAI,EAAE,CAAC;gBAC7C,EAAE,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;oBACjB,MAAM,CAAC,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;gBAC5C,CAAC;gBACD,EAAE,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC;oBACtB,MAAM,CAAC,SAAS,GAAG,SAAS,CAAC,SAAS,CAAC;gBAC3C,CAAC;gBACD,MAAM,CAAC,MAAM,CAAC;YAClB,CAAC,CAAC,CAAC;QACP,CAAC;QAED,IAAI,CAAC,QAAQ,CAAC,UAAC,KAAK,EAAE,QAAQ;YAC1B,EAAE,CAAC,CAAC,QAAQ,KAAK,gBAAgB,CAAC,WAAW,CAAC,CAAC,CAAC;gBAC5C,MAAM,CAAC;YACX,CAAC;YACD,IAAI,IAAI,GAAG,gBAAgB,CAAC,QAAQ,CAAC,CAAC;YACtC,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YACxD,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;gBAChB,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;YACtB,CAAC;YACD,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;QACxC,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IAKD,6BAAQ,GAAR;QACI,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC;IACvD,CAAC;IAOD,sCAAiB,GAAjB,UAAkB,MAAmB;QAAnB,uBAAA,EAAA,WAAmB;QACjC,IAAM,KAAK,GAAG,CAAC,MAAM,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;QAEzC,MAAM,IAAI,IAAI,CAAC;QACf,IAAI,CAAC,QAAQ,CAAC,UAAC,KAAK,EAAE,QAAQ;YAC1B,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC;QAChD,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC5B,CAAC;IACL,iBAAC;AAAD,CAAC,AA3ZD,IA2ZC;AA3ZqB,gCAAU","sourcesContent":["import {SourceReference} from '../sources/file';\nimport {Type} from '../types/index';\nimport {Comment} from '../comments/comment';\nimport {TypeParameterReflection} from './type-parameter';\n\n/**\n * Holds all data models used by TypeDoc.\n *\n * The [[BaseReflection]] is base class of all reflection models. The subclass [[ProjectReflection]]\n * serves as the root container for the current project while [[DeclarationReflection]] instances\n * form the structure of the project. Most of the other classes in this namespace are referenced by this\n * two base classes.\n *\n * The models [[NavigationItem]] and [[UrlMapping]] are special as they are only used by the [[Renderer]]\n * while creating the final output.\n */\n\n/**\n * Current reflection id.\n */\nlet REFLECTION_ID = 0;\n\n/**\n * Reset the reflection id.\n *\n * Used by the test cases to ensure the reflection ids won't change between runs.\n */\nexport function resetReflectionID() {\n REFLECTION_ID = 0;\n}\n\n/**\n * Defines the available reflection kinds.\n */\nexport enum ReflectionKind {\n Global = 0,\n ExternalModule = 1,\n Module = 2,\n Enum = 4,\n EnumMember = 16,\n Variable = 32,\n Function = 64,\n Class = 128,\n Interface = 256,\n Constructor = 512,\n Property = 1024,\n Method = 2048,\n CallSignature = 4096,\n IndexSignature = 8192,\n ConstructorSignature = 16384,\n Parameter = 32768,\n TypeLiteral = 65536,\n TypeParameter = 131072,\n Accessor = 262144,\n GetSignature = 524288,\n SetSignature = 1048576,\n ObjectLiteral = 2097152,\n TypeAlias = 4194304,\n Event = 8388608,\n\n ClassOrInterface = Class | Interface,\n VariableOrProperty = Variable | Property,\n FunctionOrMethod = Function | Method,\n SomeSignature = CallSignature | IndexSignature | ConstructorSignature | GetSignature | SetSignature,\n SomeModule = Module | ExternalModule\n}\n\nexport enum ReflectionFlag {\n Private = 1,\n Protected = 2,\n Public = 4,\n Static = 8,\n Exported = 16,\n ExportAssignment = 32,\n External = 64,\n Optional = 128,\n DefaultValue = 256,\n Rest = 512,\n ConstructorProperty = 1024\n}\n\nconst relevantFlags: ReflectionFlag[] = [\n ReflectionFlag.Private,\n ReflectionFlag.Protected,\n ReflectionFlag.Static,\n ReflectionFlag.ExportAssignment,\n ReflectionFlag.Optional,\n ReflectionFlag.DefaultValue,\n ReflectionFlag.Rest\n];\n\nexport interface ReflectionFlags extends Array<string> {\n flags?: ReflectionFlag;\n\n /**\n * Is this a private member?\n */\n isPrivate?: boolean;\n\n /**\n * Is this a protected member?\n */\n isProtected?: boolean;\n\n /**\n * Is this a public member?\n */\n isPublic?: boolean;\n\n /**\n * Is this a static member?\n */\n isStatic?: boolean;\n\n /**\n * Is this member exported?\n */\n isExported?: boolean;\n\n /**\n * Is this a declaration from an external document?\n */\n isExternal?: boolean;\n\n /**\n * Whether this reflection is an optional component or not.\n *\n * Applies to function parameters and object members.\n */\n isOptional?: boolean;\n\n /**\n * Whether it's a rest parameter, like `foo(...params);`.\n */\n isRest?: boolean;\n\n /**\n *\n */\n hasExportAssignment?: boolean;\n\n isConstructorProperty?: boolean;\n}\n\nexport interface DefaultValueContainer extends Reflection {\n defaultValue: string;\n}\n\nexport interface TypeContainer extends Reflection {\n type: Type;\n}\n\nexport interface TypeParameterContainer extends Reflection {\n typeParameters: TypeParameterReflection[];\n}\n\nexport enum TraverseProperty {\n Children,\n Parameters,\n TypeLiteral,\n TypeParameter,\n Signatures,\n IndexSignature,\n GetSignature,\n SetSignature\n}\n\nexport interface TraverseCallback {\n (reflection: Reflection, property: TraverseProperty): void;\n}\n\n/**\n * Defines the usage of a decorator.\n */\nexport interface Decorator {\n /**\n * The name of the decorator being applied.\n */\n name: string;\n\n /**\n * The type declaring the decorator.\n * Usually a ReferenceType instance pointing to the decorator function.\n */\n type?: Type;\n\n /**\n * A named map of arguments the decorator is applied with.\n */\n arguments?: any;\n}\n\n/**\n * Base class for all reflection classes.\n *\n * While generating a documentation, TypeDoc generates an instance of [[ProjectReflection]]\n * as the root for all reflections within the project. All other reflections are represented\n * by the [[DeclarationReflection]] class.\n *\n * This base class exposes the basic properties one may use to traverse the reflection tree.\n * You can use the [[children]] and [[parent]] properties to walk the tree. The [[groups]] property\n * contains a list of all children grouped and sorted for being rendered.\n */\nexport abstract class Reflection {\n /**\n * Unique id of this reflection.\n */\n id: number;\n\n /**\n * The symbol name of this reflection.\n */\n name = '';\n\n /**\n * The original name of the TypeScript declaration.\n */\n originalName: string;\n\n /**\n * The kind of this reflection.\n */\n kind: ReflectionKind;\n\n /**\n * The human readable string representation of the kind of this reflection.\n */\n kindString: string;\n\n flags: ReflectionFlags = [];\n\n /**\n * The reflection this reflection is a child of.\n */\n parent: Reflection;\n\n /**\n * The parsed documentation comment attached to this reflection.\n */\n comment: Comment;\n\n /**\n * A list of all source files that contributed to this reflection.\n */\n sources: SourceReference[];\n\n /**\n * A list of all decorators attached to this reflection.\n */\n decorators: Decorator[];\n\n /**\n * A list of all types that are decorated by this reflection.\n */\n decorates: Type[];\n\n /**\n * The url of this reflection in the generated documentation.\n */\n url: string;\n\n /**\n * The name of the anchor of this child.\n */\n anchor: string;\n\n /**\n * Is the url pointing to an individual document?\n *\n * When FALSE, the url points to an anchor tag on a page of a different reflection.\n */\n hasOwnDocument: boolean;\n\n /**\n * A list of generated css classes that should be applied to representations of this\n * reflection in the generated markup.\n */\n cssClasses: string;\n\n /**\n * Url safe alias for this reflection.\n *\n * @see [[BaseReflection.getAlias]]\n */\n private _alias: string;\n\n private _aliases: string[];\n\n /**\n * Create a new BaseReflection instance.\n */\n constructor(parent?: Reflection, name?: string, kind?: ReflectionKind) {\n this.id = REFLECTION_ID++;\n this.parent = parent;\n this.name = name;\n this.originalName = name;\n this.kind = kind;\n }\n\n /**\n * @param kind The kind to test for.\n */\n kindOf(kind: ReflectionKind): boolean;\n\n /**\n * @param kind An array of kinds to test for.\n */\n kindOf(kind: ReflectionKind[]): boolean;\n\n /**\n * Test whether this reflection is of the given kind.\n */\n kindOf(kind: any): boolean {\n if (Array.isArray(kind)) {\n for (let i = 0, c = kind.length; i < c; i++) {\n if ((this.kind & kind[i]) !== 0) {\n return true;\n }\n }\n return false;\n } else {\n return (this.kind & kind) !== 0;\n }\n }\n\n /**\n * Return the full name of this reflection.\n *\n * The full name contains the name of this reflection and the names of all parent reflections.\n *\n * @param separator Separator used to join the names of the reflections.\n * @returns The full name of this reflection.\n */\n getFullName(separator: string = '.'): string {\n if (this.parent && !this.parent.isProject()) {\n return this.parent.getFullName(separator) + separator + this.name;\n } else {\n return this.name;\n }\n }\n\n /**\n * Set a flag on this reflection.\n */\n setFlag(flag: ReflectionFlag, value: boolean = true) {\n let name: string, index: number;\n if (relevantFlags.indexOf(flag) !== -1) {\n name = ReflectionFlag[flag];\n name = name.replace(/(.)([A-Z])/g, (m, a, b) => a + ' ' + b.toLowerCase());\n index = this.flags.indexOf(name);\n }\n\n if (value) {\n this.flags.flags |= flag;\n if (name && index === -1) {\n this.flags.push(name);\n }\n } else {\n this.flags.flags &= ~flag;\n if (name && index !== -1) {\n this.flags.splice(index, 1);\n }\n }\n\n switch (flag) {\n case ReflectionFlag.Private:\n this.flags.isPrivate = value;\n if (value) {\n this.setFlag(ReflectionFlag.Protected, false);\n this.setFlag(ReflectionFlag.Public, false);\n }\n break;\n case ReflectionFlag.Protected:\n this.flags.isProtected = value;\n if (value) {\n this.setFlag(ReflectionFlag.Private, false);\n this.setFlag(ReflectionFlag.Public, false);\n }\n break;\n case ReflectionFlag.Public:\n this.flags.isPublic = value;\n if (value) {\n this.setFlag(ReflectionFlag.Private, false);\n this.setFlag(ReflectionFlag.Protected, false);\n }\n break;\n case ReflectionFlag.Static:\n this.flags.isStatic = value;\n break;\n case ReflectionFlag.Exported:\n this.flags.isExported = value;\n break;\n case ReflectionFlag.External:\n this.flags.isExternal = value;\n break;\n case ReflectionFlag.Optional:\n this.flags.isOptional = value;\n break;\n case ReflectionFlag.Rest:\n this.flags.isRest = value;\n break;\n case ReflectionFlag.ExportAssignment:\n this.flags.hasExportAssignment = value;\n break;\n case ReflectionFlag.ConstructorProperty:\n this.flags.isConstructorProperty = value;\n break;\n }\n }\n\n /**\n * Return an url safe alias for this reflection.\n */\n getAlias(): string {\n if (!this._alias) {\n let alias = this.name.replace(/[^a-z0-9]/gi, '_').toLowerCase();\n if (alias === '') {\n alias = 'reflection-' + this.id;\n }\n\n let target = <Reflection> this;\n while (target.parent && !target.parent.isProject() && !target.hasOwnDocument) {\n target = target.parent;\n }\n\n if (!target._aliases) {\n target._aliases = [];\n }\n let suffix = '', index = 0;\n while (target._aliases.indexOf(alias + suffix) !== -1) {\n suffix = '-' + (++index).toString();\n }\n\n alias += suffix;\n target._aliases.push(alias);\n this._alias = alias;\n }\n\n return this._alias;\n }\n\n /**\n * Has this reflection a visible comment?\n *\n * @returns TRUE when this reflection has a visible comment.\n */\n hasComment(): boolean {\n return <boolean> (this.comment && this.comment.hasVisibleComponent());\n }\n\n hasGetterOrSetter(): boolean {\n return false;\n }\n\n /**\n * @param name The name of the child to look for. Might contain a hierarchy.\n */\n getChildByName(name: string): Reflection;\n\n /**\n * @param names The name hierarchy of the child to look for.\n */\n getChildByName(names: string[]): Reflection;\n\n /**\n * Return a child by its name.\n *\n * @returns The found child or NULL.\n */\n getChildByName(arg: any): Reflection {\n const names: string[] = Array.isArray(arg) ? arg : arg.split('.');\n const name = names[0];\n let result: Reflection = null;\n\n this.traverse((child) => {\n if (child.name === name) {\n if (names.length <= 1) {\n result = child;\n } else if (child) {\n result = child.getChildByName(names.slice(1));\n }\n }\n });\n\n return result;\n }\n\n /**\n * Return whether this reflection is the root / project reflection.\n */\n isProject(): boolean { // this is ProjectReflection\n return false;\n }\n\n /**\n * @param name The name to look for. Might contain a hierarchy.\n */\n findReflectionByName(name: string): Reflection;\n\n /**\n * @param names The name hierarchy to look for.\n */\n findReflectionByName(names: string[]): Reflection;\n\n /**\n * Try to find a reflection by its name.\n *\n * @return The found reflection or null.\n */\n findReflectionByName(arg: any): Reflection {\n const names: string[] = Array.isArray(arg) ? arg : arg.split('.');\n\n const reflection = this.getChildByName(names);\n if (reflection) {\n return reflection;\n } else {\n return this.parent.findReflectionByName(names);\n }\n }\n\n /**\n * Traverse all potential child reflections of this reflection.\n *\n * The given callback will be invoked for all children, signatures and type parameters\n * attached to this reflection.\n *\n * @param callback The callback function that should be applied for each child reflection.\n */\n traverse(callback: TraverseCallback) { }\n\n /**\n * Return a raw object representation of this reflection.\n */\n toObject(): any {\n const result: any = {\n id: this.id,\n name: this.name,\n kind: this.kind,\n kindString: this.kindString,\n flags: {}\n };\n\n if (this.originalName !== this.name) {\n result.originalName = this.originalName;\n }\n\n if (this.comment) {\n result.comment = this.comment.toObject();\n }\n\n for (let key in this.flags) {\n // tslint:disable-next-line:triple-equals\n if (parseInt(key, 10) == <any> key || key === 'flags') {\n continue;\n }\n if (this.flags[key]) {\n result.flags[key] = true;\n }\n }\n\n if (this.decorates) {\n result.decorates = this.decorates.map((type) => type.toObject());\n }\n\n if (this.decorators) {\n result.decorators = this.decorators.map((decorator) => {\n const result: any = { name: decorator.name };\n if (decorator.type) {\n result.type = decorator.type.toObject();\n }\n if (decorator.arguments) {\n result.arguments = decorator.arguments;\n }\n return result;\n });\n }\n\n this.traverse((child, property) => {\n if (property === TraverseProperty.TypeLiteral) {\n return;\n }\n let name = TraverseProperty[property];\n name = name.substr(0, 1).toLowerCase() + name.substr(1);\n if (!result[name]) {\n result[name] = [];\n }\n result[name].push(child.toObject());\n });\n\n return result;\n }\n\n /**\n * Return a string representation of this reflection.\n */\n toString(): string {\n return ReflectionKind[this.kind] + ' ' + this.name;\n }\n\n /**\n * Return a string representation of this reflection and all of its children.\n *\n * @param indent Used internally to indent child reflections.\n */\n toStringHierarchy(indent: string = '') {\n const lines = [indent + this.toString()];\n\n indent += ' ';\n this.traverse((child, property) => {\n lines.push(child.toStringHierarchy(indent));\n });\n\n return lines.join('\\n');\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"abstract.js","sourceRoot":"","sources":["../../../../src/lib/models/reflections/abstract.ts"],"names":[],"mappings":";;AAoBA,IAAI,aAAa,GAAG,CAAC,CAAC;AAOtB;IACI,aAAa,GAAG,CAAC,CAAC;AACtB,CAAC;AAFD,8CAEC;AAKD,IAAY,cA+BX;AA/BD,WAAY,cAAc;IACtB,uDAAU,CAAA;IACV,uEAAkB,CAAA;IAClB,uDAAU,CAAA;IACV,mDAAQ,CAAA;IACR,gEAAe,CAAA;IACf,4DAAa,CAAA;IACb,4DAAa,CAAA;IACb,uDAAW,CAAA;IACX,+DAAe,CAAA;IACf,mEAAiB,CAAA;IACjB,8DAAe,CAAA;IACf,0DAAa,CAAA;IACb,wEAAoB,CAAA;IACpB,0EAAqB,CAAA;IACrB,uFAA4B,CAAA;IAC5B,iEAAiB,CAAA;IACjB,qEAAmB,CAAA;IACnB,0EAAsB,CAAA;IACtB,gEAAiB,CAAA;IACjB,wEAAqB,CAAA;IACrB,yEAAsB,CAAA;IACtB,2EAAuB,CAAA;IACvB,mEAAmB,CAAA;IACnB,2DAAe,CAAA;IAEf,6EAAoC,CAAA;IACpC,kFAAwC,CAAA;IACxC,8EAAoC,CAAA;IACpC,2EAAmG,CAAA;IACnG,+DAAoC,CAAA;AACxC,CAAC,EA/BW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QA+BzB;AAED,IAAY,cAYX;AAZD,WAAY,cAAc;IACtB,yDAAW,CAAA;IACX,6DAAa,CAAA;IACb,uDAAU,CAAA;IACV,uDAAU,CAAA;IACV,4DAAa,CAAA;IACb,4EAAqB,CAAA;IACrB,4DAAa,CAAA;IACb,6DAAc,CAAA;IACd,qEAAkB,CAAA;IAClB,qDAAU,CAAA;IACV,oFAA0B,CAAA;AAC9B,CAAC,EAZW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAYzB;AAED,IAAM,aAAa,GAAqB;IACpC,cAAc,CAAC,OAAO;IACtB,cAAc,CAAC,SAAS;IACxB,cAAc,CAAC,MAAM;IACrB,cAAc,CAAC,gBAAgB;IAC/B,cAAc,CAAC,QAAQ;IACvB,cAAc,CAAC,YAAY;IAC3B,cAAc,CAAC,IAAI;CACtB,CAAC;AAmEF,IAAY,gBASX;AATD,WAAY,gBAAgB;IACxB,+DAAQ,CAAA;IACR,mEAAU,CAAA;IACV,qEAAW,CAAA;IACX,yEAAa,CAAA;IACb,mEAAU,CAAA;IACV,2EAAc,CAAA;IACd,uEAAY,CAAA;IACZ,uEAAY,CAAA;AAChB,CAAC,EATW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAS3B;AAsCD;IAwFI,oBAAY,MAAmB,EAAE,IAAa,EAAE,IAAqB;QA/ErE,SAAI,GAAG,EAAE,CAAC;QAiBV,UAAK,GAAoB,EAAE,CAAC;QA+DxB,IAAI,CAAC,EAAE,GAAO,aAAa,EAAE,CAAC;QAC9B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,IAAI,GAAK,IAAI,CAAC;QACnB,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;QACzB,IAAI,CAAC,IAAI,GAAK,IAAI,CAAC;IACvB,CAAC;IAeD,2BAAM,GAAN,UAAO,IAAS;QACZ,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YACtB,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;gBAC1C,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;oBAC9B,MAAM,CAAC,IAAI,CAAC;gBAChB,CAAC;YACL,CAAC;YACD,MAAM,CAAC,KAAK,CAAC;QACjB,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,MAAM,CAAC,CAAC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;QACpC,CAAC;IACL,CAAC;IAUD,gCAAW,GAAX,UAAY,SAAuB;QAAvB,0BAAA,EAAA,eAAuB;QAC/B,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;YAC1C,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,SAAS,CAAC,GAAG,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC;QACtE,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;QACrB,CAAC;IACL,CAAC;IAKD,4BAAO,GAAP,UAAQ,IAAoB,EAAE,KAAqB;QAArB,sBAAA,EAAA,YAAqB;QAC/C,IAAI,IAAY,EAAE,KAAa,CAAC;QAChC,EAAE,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;YACrC,IAAI,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;YAC5B,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,UAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAK,OAAA,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,WAAW,EAAE,EAAzB,CAAyB,CAAC,CAAC;YAC3E,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACrC,CAAC;QAED,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;YACR,IAAI,CAAC,KAAK,CAAC,KAAK,IAAI,IAAI,CAAC;YACzB,EAAE,CAAC,CAAC,IAAI,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;gBACvB,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC1B,CAAC;QACL,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,IAAI,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC;YAC1B,EAAE,CAAC,CAAC,IAAI,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;gBACvB,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;YAChC,CAAC;QACL,CAAC;QAED,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;YACX,KAAK,cAAc,CAAC,OAAO;gBACvB,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC;gBAC7B,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;oBACR,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;oBAC9C,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;gBAC/C,CAAC;gBACD,KAAK,CAAC;YACV,KAAK,cAAc,CAAC,SAAS;gBACzB,IAAI,CAAC,KAAK,CAAC,WAAW,GAAG,KAAK,CAAC;gBAC/B,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;oBACR,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;oBAC5C,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;gBAC/C,CAAC;gBACD,KAAK,CAAC;YACV,KAAK,cAAc,CAAC,MAAM;gBACtB,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,KAAK,CAAC;gBAC5B,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;oBACR,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;oBAC5C,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;gBAClD,CAAC;gBACD,KAAK,CAAC;YACV,KAAK,cAAc,CAAC,MAAM;gBACtB,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,KAAK,CAAC;gBAC5B,KAAK,CAAC;YACV,KAAK,cAAc,CAAC,QAAQ;gBACxB,IAAI,CAAC,KAAK,CAAC,UAAU,GAAG,KAAK,CAAC;gBAC9B,KAAK,CAAC;YACV,KAAK,cAAc,CAAC,QAAQ;gBACxB,IAAI,CAAC,KAAK,CAAC,UAAU,GAAG,KAAK,CAAC;gBAC9B,KAAK,CAAC;YACV,KAAK,cAAc,CAAC,QAAQ;gBACxB,IAAI,CAAC,KAAK,CAAC,UAAU,GAAG,KAAK,CAAC;gBAC9B,KAAK,CAAC;YACV,KAAK,cAAc,CAAC,IAAI;gBACpB,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC;gBAC1B,KAAK,CAAC;YACV,KAAK,cAAc,CAAC,gBAAgB;gBAChC,IAAI,CAAC,KAAK,CAAC,mBAAmB,GAAG,KAAK,CAAC;gBACvC,KAAK,CAAC;YACV,KAAK,cAAc,CAAC,mBAAmB;gBACnC,IAAI,CAAC,KAAK,CAAC,qBAAqB,GAAG,KAAK,CAAC;gBACzC,KAAK,CAAC;QACd,CAAC;IACL,CAAC;IAKD,6BAAQ,GAAR;QACI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;YACf,IAAI,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC;YAChE,EAAE,CAAC,CAAC,KAAK,KAAK,EAAE,CAAC,CAAC,CAAC;gBACf,KAAK,GAAG,aAAa,GAAG,IAAI,CAAC,EAAE,CAAC;YACpC,CAAC;YAED,IAAI,MAAM,GAAgB,IAAI,CAAC;YAC/B,OAAO,MAAM,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC;gBAC3E,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;YAC3B,CAAC;YAED,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;gBACnB,MAAM,CAAC,QAAQ,GAAG,EAAE,CAAC;YACzB,CAAC;YACD,IAAI,MAAM,GAAG,EAAE,EAAE,KAAK,GAAG,CAAC,CAAC;YAC3B,OAAO,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;gBACpD,MAAM,GAAG,GAAG,GAAG,CAAC,EAAE,KAAK,CAAC,CAAC,QAAQ,EAAE,CAAC;YACxC,CAAC;YAED,KAAK,IAAI,MAAM,CAAC;YAChB,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAC5B,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACxB,CAAC;QAED,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;IAOD,+BAAU,GAAV;QACI,MAAM,CAAW,CAAC,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAAC;IAC1E,CAAC;IAED,sCAAiB,GAAjB;QACI,MAAM,CAAC,KAAK,CAAC;IACjB,CAAC;IAiBD,mCAAc,GAAd,UAAe,GAAQ;QACnB,IAAM,KAAK,GAAa,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAClE,IAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QACtB,IAAI,MAAM,GAAe,IAAI,CAAC;QAE9B,IAAI,CAAC,QAAQ,CAAC,UAAC,KAAK;YAChB,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC;gBACtB,EAAE,CAAC,CAAC,KAAK,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC,CAAC;oBACpB,MAAM,GAAG,KAAK,CAAC;gBACnB,CAAC;gBAAC,IAAI,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;oBACf,MAAM,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;gBAClD,CAAC;YACL,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IAKD,8BAAS,GAAT;QACI,MAAM,CAAC,KAAK,CAAC;IACjB,CAAC;IAiBD,yCAAoB,GAApB,UAAqB,GAAQ;QACzB,IAAM,KAAK,GAAa,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAElE,IAAM,UAAU,GAAG,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;QAC9C,EAAE,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;YACb,MAAM,CAAC,UAAU,CAAC;QACtB,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC;QACnD,CAAC;IACL,CAAC;IAUD,6BAAQ,GAAR,UAAS,QAA0B,IAAI,CAAC;IAKxC,6BAAQ,GAAR;QACI,IAAM,MAAM,GAAQ;YAChB,EAAE,EAAU,IAAI,CAAC,EAAE;YACnB,IAAI,EAAQ,IAAI,CAAC,IAAI;YACrB,IAAI,EAAQ,IAAI,CAAC,IAAI;YACrB,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,KAAK,EAAO,EAAE;SACjB,CAAC;QAEF,EAAE,CAAC,CAAC,IAAI,CAAC,YAAY,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;YAClC,MAAM,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;QAC5C,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;YACf,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;QAC7C,CAAC;QAED,GAAG,CAAC,CAAC,IAAI,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;YAEzB,EAAE,CAAC,CAAC,QAAQ,CAAC,GAAG,EAAE,EAAE,CAAC,IAAU,GAAG,IAAI,GAAG,KAAK,OAAO,CAAC,CAAC,CAAC;gBACpD,QAAQ,CAAC;YACb,CAAC;YACD,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;gBAClB,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;YAC7B,CAAC;QACL,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;YACjB,MAAM,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,UAAC,IAAI,IAAK,OAAA,IAAI,CAAC,QAAQ,EAAE,EAAf,CAAe,CAAC,CAAC;QACrE,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;YAClB,MAAM,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,UAAC,SAAS;gBAC9C,IAAM,MAAM,GAAQ,EAAE,IAAI,EAAE,SAAS,CAAC,IAAI,EAAE,CAAC;gBAC7C,EAAE,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;oBACjB,MAAM,CAAC,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;gBAC5C,CAAC;gBACD,EAAE,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC;oBACtB,MAAM,CAAC,SAAS,GAAG,SAAS,CAAC,SAAS,CAAC;gBAC3C,CAAC;gBACD,MAAM,CAAC,MAAM,CAAC;YAClB,CAAC,CAAC,CAAC;QACP,CAAC;QAED,IAAI,CAAC,QAAQ,CAAC,UAAC,KAAK,EAAE,QAAQ;YAC1B,EAAE,CAAC,CAAC,QAAQ,KAAK,gBAAgB,CAAC,WAAW,CAAC,CAAC,CAAC;gBAC5C,MAAM,CAAC;YACX,CAAC;YACD,IAAI,IAAI,GAAG,gBAAgB,CAAC,QAAQ,CAAC,CAAC;YACtC,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YACxD,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;gBAChB,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;YACtB,CAAC;YACD,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;QACxC,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IAKD,6BAAQ,GAAR;QACI,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC;IACvD,CAAC;IAOD,sCAAiB,GAAjB,UAAkB,MAAmB;QAAnB,uBAAA,EAAA,WAAmB;QACjC,IAAM,KAAK,GAAG,CAAC,MAAM,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;QAEzC,MAAM,IAAI,IAAI,CAAC;QACf,IAAI,CAAC,QAAQ,CAAC,UAAC,KAAK,EAAE,QAAQ;YAC1B,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC;QAChD,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC5B,CAAC;IACL,iBAAC;AAAD,CAAC,AA3ZD,IA2ZC;AA3ZqB,gCAAU","sourcesContent":["import { SourceReference } from '../sources/file';\nimport { Type } from '../types/index';\nimport { Comment } from '../comments/comment';\nimport { TypeParameterReflection } from './type-parameter';\n\n/**\n * Holds all data models used by TypeDoc.\n *\n * The [[BaseReflection]] is base class of all reflection models. The subclass [[ProjectReflection]]\n * serves as the root container for the current project while [[DeclarationReflection]] instances\n * form the structure of the project. Most of the other classes in this namespace are referenced by this\n * two base classes.\n *\n * The models [[NavigationItem]] and [[UrlMapping]] are special as they are only used by the [[Renderer]]\n * while creating the final output.\n */\n\n/**\n * Current reflection id.\n */\nlet REFLECTION_ID = 0;\n\n/**\n * Reset the reflection id.\n *\n * Used by the test cases to ensure the reflection ids won't change between runs.\n */\nexport function resetReflectionID() {\n REFLECTION_ID = 0;\n}\n\n/**\n * Defines the available reflection kinds.\n */\nexport enum ReflectionKind {\n Global = 0,\n ExternalModule = 1,\n Module = 2,\n Enum = 4,\n EnumMember = 16,\n Variable = 32,\n Function = 64,\n Class = 128,\n Interface = 256,\n Constructor = 512,\n Property = 1024,\n Method = 2048,\n CallSignature = 4096,\n IndexSignature = 8192,\n ConstructorSignature = 16384,\n Parameter = 32768,\n TypeLiteral = 65536,\n TypeParameter = 131072,\n Accessor = 262144,\n GetSignature = 524288,\n SetSignature = 1048576,\n ObjectLiteral = 2097152,\n TypeAlias = 4194304,\n Event = 8388608,\n\n ClassOrInterface = Class | Interface,\n VariableOrProperty = Variable | Property,\n FunctionOrMethod = Function | Method,\n SomeSignature = CallSignature | IndexSignature | ConstructorSignature | GetSignature | SetSignature,\n SomeModule = Module | ExternalModule\n}\n\nexport enum ReflectionFlag {\n Private = 1,\n Protected = 2,\n Public = 4,\n Static = 8,\n Exported = 16,\n ExportAssignment = 32,\n External = 64,\n Optional = 128,\n DefaultValue = 256,\n Rest = 512,\n ConstructorProperty = 1024\n}\n\nconst relevantFlags: ReflectionFlag[] = [\n ReflectionFlag.Private,\n ReflectionFlag.Protected,\n ReflectionFlag.Static,\n ReflectionFlag.ExportAssignment,\n ReflectionFlag.Optional,\n ReflectionFlag.DefaultValue,\n ReflectionFlag.Rest\n];\n\nexport interface ReflectionFlags extends Array<string> {\n flags?: ReflectionFlag;\n\n /**\n * Is this a private member?\n */\n isPrivate?: boolean;\n\n /**\n * Is this a protected member?\n */\n isProtected?: boolean;\n\n /**\n * Is this a public member?\n */\n isPublic?: boolean;\n\n /**\n * Is this a static member?\n */\n isStatic?: boolean;\n\n /**\n * Is this member exported?\n */\n isExported?: boolean;\n\n /**\n * Is this a declaration from an external document?\n */\n isExternal?: boolean;\n\n /**\n * Whether this reflection is an optional component or not.\n *\n * Applies to function parameters and object members.\n */\n isOptional?: boolean;\n\n /**\n * Whether it's a rest parameter, like `foo(...params);`.\n */\n isRest?: boolean;\n\n /**\n *\n */\n hasExportAssignment?: boolean;\n\n isConstructorProperty?: boolean;\n}\n\nexport interface DefaultValueContainer extends Reflection {\n defaultValue: string;\n}\n\nexport interface TypeContainer extends Reflection {\n type: Type;\n}\n\nexport interface TypeParameterContainer extends Reflection {\n typeParameters: TypeParameterReflection[];\n}\n\nexport enum TraverseProperty {\n Children,\n Parameters,\n TypeLiteral,\n TypeParameter,\n Signatures,\n IndexSignature,\n GetSignature,\n SetSignature\n}\n\nexport interface TraverseCallback {\n (reflection: Reflection, property: TraverseProperty): void;\n}\n\n/**\n * Defines the usage of a decorator.\n */\nexport interface Decorator {\n /**\n * The name of the decorator being applied.\n */\n name: string;\n\n /**\n * The type declaring the decorator.\n * Usually a ReferenceType instance pointing to the decorator function.\n */\n type?: Type;\n\n /**\n * A named map of arguments the decorator is applied with.\n */\n arguments?: any;\n}\n\n/**\n * Base class for all reflection classes.\n *\n * While generating a documentation, TypeDoc generates an instance of [[ProjectReflection]]\n * as the root for all reflections within the project. All other reflections are represented\n * by the [[DeclarationReflection]] class.\n *\n * This base class exposes the basic properties one may use to traverse the reflection tree.\n * You can use the [[children]] and [[parent]] properties to walk the tree. The [[groups]] property\n * contains a list of all children grouped and sorted for being rendered.\n */\nexport abstract class Reflection {\n /**\n * Unique id of this reflection.\n */\n id: number;\n\n /**\n * The symbol name of this reflection.\n */\n name = '';\n\n /**\n * The original name of the TypeScript declaration.\n */\n originalName: string;\n\n /**\n * The kind of this reflection.\n */\n kind: ReflectionKind;\n\n /**\n * The human readable string representation of the kind of this reflection.\n */\n kindString: string;\n\n flags: ReflectionFlags = [];\n\n /**\n * The reflection this reflection is a child of.\n */\n parent: Reflection;\n\n /**\n * The parsed documentation comment attached to this reflection.\n */\n comment: Comment;\n\n /**\n * A list of all source files that contributed to this reflection.\n */\n sources: SourceReference[];\n\n /**\n * A list of all decorators attached to this reflection.\n */\n decorators: Decorator[];\n\n /**\n * A list of all types that are decorated by this reflection.\n */\n decorates: Type[];\n\n /**\n * The url of this reflection in the generated documentation.\n */\n url: string;\n\n /**\n * The name of the anchor of this child.\n */\n anchor: string;\n\n /**\n * Is the url pointing to an individual document?\n *\n * When FALSE, the url points to an anchor tag on a page of a different reflection.\n */\n hasOwnDocument: boolean;\n\n /**\n * A list of generated css classes that should be applied to representations of this\n * reflection in the generated markup.\n */\n cssClasses: string;\n\n /**\n * Url safe alias for this reflection.\n *\n * @see [[BaseReflection.getAlias]]\n */\n private _alias: string;\n\n private _aliases: string[];\n\n /**\n * Create a new BaseReflection instance.\n */\n constructor(parent?: Reflection, name?: string, kind?: ReflectionKind) {\n this.id = REFLECTION_ID++;\n this.parent = parent;\n this.name = name;\n this.originalName = name;\n this.kind = kind;\n }\n\n /**\n * @param kind The kind to test for.\n */\n kindOf(kind: ReflectionKind): boolean;\n\n /**\n * @param kind An array of kinds to test for.\n */\n kindOf(kind: ReflectionKind[]): boolean;\n\n /**\n * Test whether this reflection is of the given kind.\n */\n kindOf(kind: any): boolean {\n if (Array.isArray(kind)) {\n for (let i = 0, c = kind.length; i < c; i++) {\n if ((this.kind & kind[i]) !== 0) {\n return true;\n }\n }\n return false;\n } else {\n return (this.kind & kind) !== 0;\n }\n }\n\n /**\n * Return the full name of this reflection.\n *\n * The full name contains the name of this reflection and the names of all parent reflections.\n *\n * @param separator Separator used to join the names of the reflections.\n * @returns The full name of this reflection.\n */\n getFullName(separator: string = '.'): string {\n if (this.parent && !this.parent.isProject()) {\n return this.parent.getFullName(separator) + separator + this.name;\n } else {\n return this.name;\n }\n }\n\n /**\n * Set a flag on this reflection.\n */\n setFlag(flag: ReflectionFlag, value: boolean = true) {\n let name: string, index: number;\n if (relevantFlags.indexOf(flag) !== -1) {\n name = ReflectionFlag[flag];\n name = name.replace(/(.)([A-Z])/g, (m, a, b) => a + ' ' + b.toLowerCase());\n index = this.flags.indexOf(name);\n }\n\n if (value) {\n this.flags.flags |= flag;\n if (name && index === -1) {\n this.flags.push(name);\n }\n } else {\n this.flags.flags &= ~flag;\n if (name && index !== -1) {\n this.flags.splice(index, 1);\n }\n }\n\n switch (flag) {\n case ReflectionFlag.Private:\n this.flags.isPrivate = value;\n if (value) {\n this.setFlag(ReflectionFlag.Protected, false);\n this.setFlag(ReflectionFlag.Public, false);\n }\n break;\n case ReflectionFlag.Protected:\n this.flags.isProtected = value;\n if (value) {\n this.setFlag(ReflectionFlag.Private, false);\n this.setFlag(ReflectionFlag.Public, false);\n }\n break;\n case ReflectionFlag.Public:\n this.flags.isPublic = value;\n if (value) {\n this.setFlag(ReflectionFlag.Private, false);\n this.setFlag(ReflectionFlag.Protected, false);\n }\n break;\n case ReflectionFlag.Static:\n this.flags.isStatic = value;\n break;\n case ReflectionFlag.Exported:\n this.flags.isExported = value;\n break;\n case ReflectionFlag.External:\n this.flags.isExternal = value;\n break;\n case ReflectionFlag.Optional:\n this.flags.isOptional = value;\n break;\n case ReflectionFlag.Rest:\n this.flags.isRest = value;\n break;\n case ReflectionFlag.ExportAssignment:\n this.flags.hasExportAssignment = value;\n break;\n case ReflectionFlag.ConstructorProperty:\n this.flags.isConstructorProperty = value;\n break;\n }\n }\n\n /**\n * Return an url safe alias for this reflection.\n */\n getAlias(): string {\n if (!this._alias) {\n let alias = this.name.replace(/[^a-z0-9]/gi, '_').toLowerCase();\n if (alias === '') {\n alias = 'reflection-' + this.id;\n }\n\n let target = <Reflection> this;\n while (target.parent && !target.parent.isProject() && !target.hasOwnDocument) {\n target = target.parent;\n }\n\n if (!target._aliases) {\n target._aliases = [];\n }\n let suffix = '', index = 0;\n while (target._aliases.indexOf(alias + suffix) !== -1) {\n suffix = '-' + (++index).toString();\n }\n\n alias += suffix;\n target._aliases.push(alias);\n this._alias = alias;\n }\n\n return this._alias;\n }\n\n /**\n * Has this reflection a visible comment?\n *\n * @returns TRUE when this reflection has a visible comment.\n */\n hasComment(): boolean {\n return <boolean> (this.comment && this.comment.hasVisibleComponent());\n }\n\n hasGetterOrSetter(): boolean {\n return false;\n }\n\n /**\n * @param name The name of the child to look for. Might contain a hierarchy.\n */\n getChildByName(name: string): Reflection;\n\n /**\n * @param names The name hierarchy of the child to look for.\n */\n getChildByName(names: string[]): Reflection;\n\n /**\n * Return a child by its name.\n *\n * @returns The found child or NULL.\n */\n getChildByName(arg: any): Reflection {\n const names: string[] = Array.isArray(arg) ? arg : arg.split('.');\n const name = names[0];\n let result: Reflection = null;\n\n this.traverse((child) => {\n if (child.name === name) {\n if (names.length <= 1) {\n result = child;\n } else if (child) {\n result = child.getChildByName(names.slice(1));\n }\n }\n });\n\n return result;\n }\n\n /**\n * Return whether this reflection is the root / project reflection.\n */\n isProject(): boolean { // this is ProjectReflection\n return false;\n }\n\n /**\n * @param name The name to look for. Might contain a hierarchy.\n */\n findReflectionByName(name: string): Reflection;\n\n /**\n * @param names The name hierarchy to look for.\n */\n findReflectionByName(names: string[]): Reflection;\n\n /**\n * Try to find a reflection by its name.\n *\n * @return The found reflection or null.\n */\n findReflectionByName(arg: any): Reflection {\n const names: string[] = Array.isArray(arg) ? arg : arg.split('.');\n\n const reflection = this.getChildByName(names);\n if (reflection) {\n return reflection;\n } else {\n return this.parent.findReflectionByName(names);\n }\n }\n\n /**\n * Traverse all potential child reflections of this reflection.\n *\n * The given callback will be invoked for all children, signatures and type parameters\n * attached to this reflection.\n *\n * @param callback The callback function that should be applied for each child reflection.\n */\n traverse(callback: TraverseCallback) { }\n\n /**\n * Return a raw object representation of this reflection.\n */\n toObject(): any {\n const result: any = {\n id: this.id,\n name: this.name,\n kind: this.kind,\n kindString: this.kindString,\n flags: {}\n };\n\n if (this.originalName !== this.name) {\n result.originalName = this.originalName;\n }\n\n if (this.comment) {\n result.comment = this.comment.toObject();\n }\n\n for (let key in this.flags) {\n // tslint:disable-next-line:triple-equals\n if (parseInt(key, 10) == <any> key || key === 'flags') {\n continue;\n }\n if (this.flags[key]) {\n result.flags[key] = true;\n }\n }\n\n if (this.decorates) {\n result.decorates = this.decorates.map((type) => type.toObject());\n }\n\n if (this.decorators) {\n result.decorators = this.decorators.map((decorator) => {\n const result: any = { name: decorator.name };\n if (decorator.type) {\n result.type = decorator.type.toObject();\n }\n if (decorator.arguments) {\n result.arguments = decorator.arguments;\n }\n return result;\n });\n }\n\n this.traverse((child, property) => {\n if (property === TraverseProperty.TypeLiteral) {\n return;\n }\n let name = TraverseProperty[property];\n name = name.substr(0, 1).toLowerCase() + name.substr(1);\n if (!result[name]) {\n result[name] = [];\n }\n result[name].push(child.toObject());\n });\n\n return result;\n }\n\n /**\n * Return a string representation of this reflection.\n */\n toString(): string {\n return ReflectionKind[this.kind] + ' ' + this.name;\n }\n\n /**\n * Return a string representation of this reflection and all of its children.\n *\n * @param indent Used internally to indent child reflections.\n */\n toStringHierarchy(indent: string = '') {\n const lines = [indent + this.toString()];\n\n indent += ' ';\n this.traverse((child, property) => {\n lines.push(child.toStringHierarchy(indent));\n });\n\n return lines.join('\\n');\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/models/reflections/container.js.map b/node_modules/typedoc/dist/lib/models/reflections/container.js.map
index abb66e7b0..178997586 100644
--- a/node_modules/typedoc/dist/lib/models/reflections/container.js.map
+++ b/node_modules/typedoc/dist/lib/models/reflections/container.js.map
@@ -1 +1 @@
-{"version":3,"file":"container.js","sourceRoot":"","sources":["../../../../src/lib/models/reflections/container.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uCAA0F;AAI1F;IAAyC,uCAAU;IAAnD;;IA0EA,CAAC;IAzDG,+CAAiB,GAAjB,UAAkB,IAAoB;QAClC,IAAM,MAAM,GAA4B,EAAE,CAAC;QAC3C,GAAG,CAAC,CAAC,IAAI,GAAG,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;YAC5B,IAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;YACjC,EAAE,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;gBACrB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACvB,CAAC;QACL,CAAC;QACD,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IAUD,sCAAQ,GAAR,UAAS,QAA0B;QAC/B,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;YAChB,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAC,KAA4B;gBAC/C,QAAQ,CAAC,KAAK,EAAE,2BAAgB,CAAC,QAAQ,CAAC,CAAC;YAC/C,CAAC,CAAC,CAAC;QACP,CAAC;IACL,CAAC;IAKD,sCAAQ,GAAR;QACI,IAAM,MAAM,GAAG,iBAAM,QAAQ,WAAE,CAAC;QAEhC,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;YACd,IAAM,QAAM,GAAU,EAAE,CAAC;YACzB,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,UAAC,KAAK;gBACtB,QAAM,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;YAClC,CAAC,CAAC,CAAC;YAEH,MAAM,CAAC,QAAQ,CAAC,GAAG,QAAM,CAAC;QAC9B,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;YACjB,IAAM,SAAO,GAAU,EAAE,CAAC;YAC1B,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,UAAC,MAAM;gBACxB,SAAO,CAAC,IAAI,CAAC;oBACX,QAAQ,EAAE,MAAM,CAAC,QAAQ;oBACzB,IAAI,EAAE,MAAM,CAAC,IAAI;oBACjB,SAAS,EAAE,MAAM,CAAC,SAAS;iBAC5B,CAAC,CAAC;YACP,CAAC,CAAC,CAAC;YAEH,MAAM,CAAC,SAAS,CAAC,GAAG,SAAO,CAAC;QAC9B,CAAC;QAED,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IACL,0BAAC;AAAD,CAAC,AA1ED,CAAyC,qBAAU,GA0ElD;AA1EY,kDAAmB","sourcesContent":["import {Reflection, ReflectionKind, TraverseCallback, TraverseProperty} from './abstract';\nimport {ReflectionGroup} from '../ReflectionGroup';\nimport {DeclarationReflection} from './declaration';\n\nexport class ContainerReflection extends Reflection {\n /**\n * The children of this reflection.\n */\n children: DeclarationReflection[];\n\n /**\n * All children grouped by their kind.\n */\n groups: ReflectionGroup[];\n\n /**\n * Return a list of all children of a certain kind.\n *\n * @param kind The desired kind of children.\n * @returns An array containing all children with the desired kind.\n */\n getChildrenByKind(kind: ReflectionKind): DeclarationReflection[] {\n const values: DeclarationReflection[] = [];\n for (let key in this.children) {\n const child = this.children[key];\n if (child.kindOf(kind)) {\n values.push(child);\n }\n }\n return values;\n }\n\n /**\n * Traverse all potential child reflections of this reflection.\n *\n * The given callback will be invoked for all children, signatures and type parameters\n * attached to this reflection.\n *\n * @param callback The callback function that should be applied for each child reflection.\n */\n traverse(callback: TraverseCallback) {\n if (this.children) {\n this.children.forEach((child: DeclarationReflection) => {\n callback(child, TraverseProperty.Children);\n });\n }\n }\n\n /**\n * Return a raw object representation of this reflection.\n */\n toObject(): any {\n const result = super.toObject();\n\n if (this.groups) {\n const groups: any[] = [];\n this.groups.forEach((group) => {\n groups.push(group.toObject());\n });\n\n result['groups'] = groups;\n }\n\n if (this.sources) {\n const sources: any[] = [];\n this.sources.forEach((source) => {\n sources.push({\n fileName: source.fileName,\n line: source.line,\n character: source.character\n });\n });\n\n result['sources'] = sources;\n }\n\n return result;\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"container.js","sourceRoot":"","sources":["../../../../src/lib/models/reflections/container.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uCAA4F;AAI5F;IAAyC,uCAAU;IAAnD;;IA0EA,CAAC;IAzDG,+CAAiB,GAAjB,UAAkB,IAAoB;QAClC,IAAM,MAAM,GAA4B,EAAE,CAAC;QAC3C,GAAG,CAAC,CAAC,IAAI,GAAG,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;YAC5B,IAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;YACjC,EAAE,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;gBACrB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACvB,CAAC;QACL,CAAC;QACD,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IAUD,sCAAQ,GAAR,UAAS,QAA0B;QAC/B,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;YAChB,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAC,KAA4B;gBAC/C,QAAQ,CAAC,KAAK,EAAE,2BAAgB,CAAC,QAAQ,CAAC,CAAC;YAC/C,CAAC,CAAC,CAAC;QACP,CAAC;IACL,CAAC;IAKD,sCAAQ,GAAR;QACI,IAAM,MAAM,GAAG,iBAAM,QAAQ,WAAE,CAAC;QAEhC,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;YACd,IAAM,QAAM,GAAU,EAAE,CAAC;YACzB,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,UAAC,KAAK;gBACtB,QAAM,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;YAClC,CAAC,CAAC,CAAC;YAEH,MAAM,CAAC,QAAQ,CAAC,GAAG,QAAM,CAAC;QAC9B,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;YACjB,IAAM,SAAO,GAAU,EAAE,CAAC;YAC1B,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,UAAC,MAAM;gBACxB,SAAO,CAAC,IAAI,CAAC;oBACX,QAAQ,EAAE,MAAM,CAAC,QAAQ;oBACzB,IAAI,EAAE,MAAM,CAAC,IAAI;oBACjB,SAAS,EAAE,MAAM,CAAC,SAAS;iBAC5B,CAAC,CAAC;YACP,CAAC,CAAC,CAAC;YAEH,MAAM,CAAC,SAAS,CAAC,GAAG,SAAO,CAAC;QAC9B,CAAC;QAED,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IACL,0BAAC;AAAD,CAAC,AA1ED,CAAyC,qBAAU,GA0ElD;AA1EY,kDAAmB","sourcesContent":["import { Reflection, ReflectionKind, TraverseCallback, TraverseProperty } from './abstract';\nimport { ReflectionGroup } from '../ReflectionGroup';\nimport { DeclarationReflection } from './declaration';\n\nexport class ContainerReflection extends Reflection {\n /**\n * The children of this reflection.\n */\n children: DeclarationReflection[];\n\n /**\n * All children grouped by their kind.\n */\n groups: ReflectionGroup[];\n\n /**\n * Return a list of all children of a certain kind.\n *\n * @param kind The desired kind of children.\n * @returns An array containing all children with the desired kind.\n */\n getChildrenByKind(kind: ReflectionKind): DeclarationReflection[] {\n const values: DeclarationReflection[] = [];\n for (let key in this.children) {\n const child = this.children[key];\n if (child.kindOf(kind)) {\n values.push(child);\n }\n }\n return values;\n }\n\n /**\n * Traverse all potential child reflections of this reflection.\n *\n * The given callback will be invoked for all children, signatures and type parameters\n * attached to this reflection.\n *\n * @param callback The callback function that should be applied for each child reflection.\n */\n traverse(callback: TraverseCallback) {\n if (this.children) {\n this.children.forEach((child: DeclarationReflection) => {\n callback(child, TraverseProperty.Children);\n });\n }\n }\n\n /**\n * Return a raw object representation of this reflection.\n */\n toObject(): any {\n const result = super.toObject();\n\n if (this.groups) {\n const groups: any[] = [];\n this.groups.forEach((group) => {\n groups.push(group.toObject());\n });\n\n result['groups'] = groups;\n }\n\n if (this.sources) {\n const sources: any[] = [];\n this.sources.forEach((source) => {\n sources.push({\n fileName: source.fileName,\n line: source.line,\n character: source.character\n });\n });\n\n result['sources'] = sources;\n }\n\n return result;\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/models/reflections/declaration.js.map b/node_modules/typedoc/dist/lib/models/reflections/declaration.js.map
index 81e538066..6d3d0baa3 100644
--- a/node_modules/typedoc/dist/lib/models/reflections/declaration.js.map
+++ b/node_modules/typedoc/dist/lib/models/reflections/declaration.js.map
@@ -1 +1 @@
-{"version":3,"file":"declaration.js","sourceRoot":"","sources":["../../../../src/lib/models/reflections/declaration.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uCAA4H;AAC5H,wCAAoD;AACpD,yCAAgD;AAgChD;IAA2C,yCAAmB;IAA9D;;IAoNA,CAAC;IA5HG,iDAAiB,GAAjB;QACI,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,IAAI,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC;IACtD,CAAC;IAED,gDAAgB,GAAhB;QACI,IAAI,MAAM,GAA0B,EAAE,CAAC;QAEvC,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;YAClB,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAC5C,CAAC;QACD,EAAE,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC;YACtB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QACrC,CAAC;QACD,EAAE,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;YACpB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACnC,CAAC;QACD,EAAE,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;YACpB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACnC,CAAC;QAED,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IAUD,wCAAQ,GAAR,UAAS,QAA0B;QAC/B,EAAE,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC;YACtB,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,UAAC,SAAS,IAAK,OAAA,QAAQ,CAAC,SAAS,EAAE,2BAAgB,CAAC,aAAa,CAAC,EAAnD,CAAmD,CAAC,CAAC;QACpG,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,YAAY,sBAAc,CAAC,CAAC,CAAC;YACtC,QAAQ,CAAmB,IAAI,CAAC,IAAK,CAAC,WAAW,EAAE,2BAAgB,CAAC,WAAW,CAAC,CAAC;QACrF,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;YAClB,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,UAAC,SAAS,IAAK,OAAA,QAAQ,CAAC,SAAS,EAAE,2BAAgB,CAAC,UAAU,CAAC,EAAhD,CAAgD,CAAC,CAAC;QAC7F,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC;YACtB,QAAQ,CAAC,IAAI,CAAC,cAAc,EAAE,2BAAgB,CAAC,cAAc,CAAC,CAAC;QACnE,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;YACpB,QAAQ,CAAC,IAAI,CAAC,YAAY,EAAE,2BAAgB,CAAC,YAAY,CAAC,CAAC;QAC/D,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;YACpB,QAAQ,CAAC,IAAI,CAAC,YAAY,EAAE,2BAAgB,CAAC,YAAY,CAAC,CAAC;QAC/D,CAAC;QAED,iBAAM,QAAQ,YAAC,QAAQ,CAAC,CAAC;IAC7B,CAAC;IAKD,wCAAQ,GAAR;QACI,IAAI,MAAM,GAAG,iBAAM,QAAQ,WAAE,CAAC;QAE9B,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;YACZ,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;QACvC,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;YACpB,MAAM,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;QAC5C,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;YAClB,MAAM,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;QACnD,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;YACrB,MAAM,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,CAAC;QACzD,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;YACrB,MAAM,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,QAAQ,EAAE,EAAZ,CAAY,CAAC,CAAC;QACvE,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;YAClB,MAAM,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,QAAQ,EAAE,EAAZ,CAAY,CAAC,CAAC;QACjE,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC;YACxB,MAAM,CAAC,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,QAAQ,EAAE,EAAZ,CAAY,CAAC,CAAC;QAC7E,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;YACrB,MAAM,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,QAAQ,EAAE,EAAZ,CAAY,CAAC,CAAC;QACvE,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC;YACxB,MAAM,CAAC,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,CAAC;QAC/D,CAAC;QAED,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IAKD,wCAAQ,GAAR;QACI,IAAI,MAAM,GAAG,iBAAM,QAAQ,WAAE,CAAC;QAE9B,EAAE,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC;YACtB,IAAM,YAAU,GAAa,EAAE,CAAC;YAChC,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,UAAC,SAAS;gBAClC,YAAU,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;YACpC,CAAC,CAAC,CAAC;YACH,MAAM,IAAI,GAAG,GAAG,YAAU,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC;QAChD,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;YACZ,MAAM,IAAI,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;QACzC,CAAC;QAED,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IACL,4BAAC;AAAD,CAAC,AApND,CAA2C,+BAAmB,GAoN7D;AApNY,sDAAqB","sourcesContent":["import {DefaultValueContainer, TypeContainer, TypeParameterContainer, TraverseCallback, TraverseProperty} from './abstract';\nimport {Type, ReflectionType} from '../types/index';\nimport {ContainerReflection} from './container';\nimport {SignatureReflection} from './signature';\nimport {TypeParameterReflection} from './type-parameter';\n\n/**\n * Stores hierarchical type data.\n *\n * @see [[DeclarationReflection.typeHierarchy]]\n */\nexport interface DeclarationHierarchy {\n /**\n * The types represented by this node in the hierarchy.\n */\n types: Type[];\n\n /**\n * The next hierarchy level.\n */\n next?: DeclarationHierarchy;\n\n /**\n * Is this the entry containing the target type?\n */\n isTarget?: boolean;\n}\n\n/**\n * A reflection that represents a single declaration emitted by the TypeScript compiler.\n *\n * All parts of a project are represented by DeclarationReflection instances. The actual\n * kind of a reflection is stored in its ´kind´ member.\n */\nexport class DeclarationReflection extends ContainerReflection implements DefaultValueContainer, TypeContainer, TypeParameterContainer {\n /**\n * The type of the reflection.\n *\n * If the reflection represents a variable or a property, this is the value type.<br />\n * If the reflection represents a signature, this is the return type.\n */\n type: Type;\n\n typeParameters: TypeParameterReflection[];\n\n /**\n * A list of call signatures attached to this declaration.\n *\n * TypeDoc creates one declaration per function that may contain ore or more\n * signature reflections.\n */\n signatures: SignatureReflection[];\n\n /**\n * The index signature of this declaration.\n */\n indexSignature: SignatureReflection;\n\n /**\n * The get signature of this declaration.\n */\n getSignature: SignatureReflection;\n\n /**\n * The set signature of this declaration.\n */\n setSignature: SignatureReflection;\n\n /**\n * The default value of this reflection.\n *\n * Applies to function parameters.\n */\n defaultValue: string;\n\n /**\n * A type that points to the reflection that has been overwritten by this reflection.\n *\n * Applies to interface and class members.\n */\n overwrites: Type;\n\n /**\n * A type that points to the reflection this reflection has been inherited from.\n *\n * Applies to interface and class members.\n */\n inheritedFrom: Type;\n\n /**\n * A type that points to the reflection this reflection is the implementation of.\n *\n * Applies to class members.\n */\n implementationOf: Type;\n\n /**\n * A list of all types this reflection extends (e.g. the parent classes).\n */\n extendedTypes: Type[];\n\n /**\n * A list of all types that extend this reflection (e.g. the subclasses).\n */\n extendedBy: Type[];\n\n /**\n * A list of all types this reflection implements.\n */\n implementedTypes: Type[];\n\n /**\n * A list of all types that implement this reflection.\n */\n implementedBy: Type[];\n\n /**\n * Contains a simplified representation of the type hierarchy suitable for being\n * rendered in templates.\n */\n typeHierarchy: DeclarationHierarchy;\n\n hasGetterOrSetter(): boolean {\n return !!this.getSignature || !!this.setSignature;\n }\n\n getAllSignatures(): SignatureReflection[] {\n let result: SignatureReflection[] = [];\n\n if (this.signatures) {\n result = result.concat(this.signatures);\n }\n if (this.indexSignature) {\n result.push(this.indexSignature);\n }\n if (this.getSignature) {\n result.push(this.getSignature);\n }\n if (this.setSignature) {\n result.push(this.setSignature);\n }\n\n return result;\n }\n\n /**\n * Traverse all potential child reflections of this reflection.\n *\n * The given callback will be invoked for all children, signatures and type parameters\n * attached to this reflection.\n *\n * @param callback The callback function that should be applied for each child reflection.\n */\n traverse(callback: TraverseCallback) {\n if (this.typeParameters) {\n this.typeParameters.forEach((parameter) => callback(parameter, TraverseProperty.TypeParameter));\n }\n\n if (this.type instanceof ReflectionType) {\n callback((<ReflectionType> this.type).declaration, TraverseProperty.TypeLiteral);\n }\n\n if (this.signatures) {\n this.signatures.forEach((signature) => callback(signature, TraverseProperty.Signatures));\n }\n\n if (this.indexSignature) {\n callback(this.indexSignature, TraverseProperty.IndexSignature);\n }\n\n if (this.getSignature) {\n callback(this.getSignature, TraverseProperty.GetSignature);\n }\n\n if (this.setSignature) {\n callback(this.setSignature, TraverseProperty.SetSignature);\n }\n\n super.traverse(callback);\n }\n\n /**\n * Return a raw object representation of this reflection.\n */\n toObject(): any {\n let result = super.toObject();\n\n if (this.type) {\n result.type = this.type.toObject();\n }\n\n if (this.defaultValue) {\n result.defaultValue = this.defaultValue;\n }\n\n if (this.overwrites) {\n result.overwrites = this.overwrites.toObject();\n }\n\n if (this.inheritedFrom) {\n result.inheritedFrom = this.inheritedFrom.toObject();\n }\n\n if (this.extendedTypes) {\n result.extendedTypes = this.extendedTypes.map((t) => t.toObject());\n }\n\n if (this.extendedBy) {\n result.extendedBy = this.extendedBy.map((t) => t.toObject());\n }\n\n if (this.implementedTypes) {\n result.implementedTypes = this.implementedTypes.map((t) => t.toObject());\n }\n\n if (this.implementedBy) {\n result.implementedBy = this.implementedBy.map((t) => t.toObject());\n }\n\n if (this.implementationOf) {\n result.implementationOf = this.implementationOf.toObject();\n }\n\n return result;\n }\n\n /**\n * Return a string representation of this reflection.\n */\n toString(): string {\n let result = super.toString();\n\n if (this.typeParameters) {\n const parameters: string[] = [];\n this.typeParameters.forEach((parameter) => {\n parameters.push(parameter.name);\n });\n result += '<' + parameters.join(', ') + '>';\n }\n\n if (this.type) {\n result += ':' + this.type.toString();\n }\n\n return result;\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"declaration.js","sourceRoot":"","sources":["../../../../src/lib/models/reflections/declaration.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uCAA8H;AAC9H,wCAAsD;AACtD,yCAAkD;AAgClD;IAA2C,yCAAmB;IAA9D;;IAoNA,CAAC;IA5HG,iDAAiB,GAAjB;QACI,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,IAAI,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC;IACtD,CAAC;IAED,gDAAgB,GAAhB;QACI,IAAI,MAAM,GAA0B,EAAE,CAAC;QAEvC,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;YAClB,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAC5C,CAAC;QACD,EAAE,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC;YACtB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QACrC,CAAC;QACD,EAAE,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;YACpB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACnC,CAAC;QACD,EAAE,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;YACpB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACnC,CAAC;QAED,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IAUD,wCAAQ,GAAR,UAAS,QAA0B;QAC/B,EAAE,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC;YACtB,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,UAAC,SAAS,IAAK,OAAA,QAAQ,CAAC,SAAS,EAAE,2BAAgB,CAAC,aAAa,CAAC,EAAnD,CAAmD,CAAC,CAAC;QACpG,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,YAAY,sBAAc,CAAC,CAAC,CAAC;YACtC,QAAQ,CAAmB,IAAI,CAAC,IAAK,CAAC,WAAW,EAAE,2BAAgB,CAAC,WAAW,CAAC,CAAC;QACrF,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;YAClB,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,UAAC,SAAS,IAAK,OAAA,QAAQ,CAAC,SAAS,EAAE,2BAAgB,CAAC,UAAU,CAAC,EAAhD,CAAgD,CAAC,CAAC;QAC7F,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC;YACtB,QAAQ,CAAC,IAAI,CAAC,cAAc,EAAE,2BAAgB,CAAC,cAAc,CAAC,CAAC;QACnE,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;YACpB,QAAQ,CAAC,IAAI,CAAC,YAAY,EAAE,2BAAgB,CAAC,YAAY,CAAC,CAAC;QAC/D,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;YACpB,QAAQ,CAAC,IAAI,CAAC,YAAY,EAAE,2BAAgB,CAAC,YAAY,CAAC,CAAC;QAC/D,CAAC;QAED,iBAAM,QAAQ,YAAC,QAAQ,CAAC,CAAC;IAC7B,CAAC;IAKD,wCAAQ,GAAR;QACI,IAAI,MAAM,GAAG,iBAAM,QAAQ,WAAE,CAAC;QAE9B,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;YACZ,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;QACvC,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;YACpB,MAAM,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;QAC5C,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;YAClB,MAAM,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;QACnD,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;YACrB,MAAM,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,CAAC;QACzD,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;YACrB,MAAM,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,QAAQ,EAAE,EAAZ,CAAY,CAAC,CAAC;QACvE,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;YAClB,MAAM,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,QAAQ,EAAE,EAAZ,CAAY,CAAC,CAAC;QACjE,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC;YACxB,MAAM,CAAC,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,QAAQ,EAAE,EAAZ,CAAY,CAAC,CAAC;QAC7E,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;YACrB,MAAM,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,QAAQ,EAAE,EAAZ,CAAY,CAAC,CAAC;QACvE,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC;YACxB,MAAM,CAAC,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,CAAC;QAC/D,CAAC;QAED,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IAKD,wCAAQ,GAAR;QACI,IAAI,MAAM,GAAG,iBAAM,QAAQ,WAAE,CAAC;QAE9B,EAAE,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC;YACtB,IAAM,YAAU,GAAa,EAAE,CAAC;YAChC,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,UAAC,SAAS;gBAClC,YAAU,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;YACpC,CAAC,CAAC,CAAC;YACH,MAAM,IAAI,GAAG,GAAG,YAAU,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC;QAChD,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;YACZ,MAAM,IAAI,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;QACzC,CAAC;QAED,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IACL,4BAAC;AAAD,CAAC,AApND,CAA2C,+BAAmB,GAoN7D;AApNY,sDAAqB","sourcesContent":["import { DefaultValueContainer, TypeContainer, TypeParameterContainer, TraverseCallback, TraverseProperty } from './abstract';\nimport { Type, ReflectionType } from '../types/index';\nimport { ContainerReflection } from './container';\nimport { SignatureReflection } from './signature';\nimport { TypeParameterReflection } from './type-parameter';\n\n/**\n * Stores hierarchical type data.\n *\n * @see [[DeclarationReflection.typeHierarchy]]\n */\nexport interface DeclarationHierarchy {\n /**\n * The types represented by this node in the hierarchy.\n */\n types: Type[];\n\n /**\n * The next hierarchy level.\n */\n next?: DeclarationHierarchy;\n\n /**\n * Is this the entry containing the target type?\n */\n isTarget?: boolean;\n}\n\n/**\n * A reflection that represents a single declaration emitted by the TypeScript compiler.\n *\n * All parts of a project are represented by DeclarationReflection instances. The actual\n * kind of a reflection is stored in its ´kind´ member.\n */\nexport class DeclarationReflection extends ContainerReflection implements DefaultValueContainer, TypeContainer, TypeParameterContainer {\n /**\n * The type of the reflection.\n *\n * If the reflection represents a variable or a property, this is the value type.<br />\n * If the reflection represents a signature, this is the return type.\n */\n type: Type;\n\n typeParameters: TypeParameterReflection[];\n\n /**\n * A list of call signatures attached to this declaration.\n *\n * TypeDoc creates one declaration per function that may contain ore or more\n * signature reflections.\n */\n signatures: SignatureReflection[];\n\n /**\n * The index signature of this declaration.\n */\n indexSignature: SignatureReflection;\n\n /**\n * The get signature of this declaration.\n */\n getSignature: SignatureReflection;\n\n /**\n * The set signature of this declaration.\n */\n setSignature: SignatureReflection;\n\n /**\n * The default value of this reflection.\n *\n * Applies to function parameters.\n */\n defaultValue: string;\n\n /**\n * A type that points to the reflection that has been overwritten by this reflection.\n *\n * Applies to interface and class members.\n */\n overwrites: Type;\n\n /**\n * A type that points to the reflection this reflection has been inherited from.\n *\n * Applies to interface and class members.\n */\n inheritedFrom: Type;\n\n /**\n * A type that points to the reflection this reflection is the implementation of.\n *\n * Applies to class members.\n */\n implementationOf: Type;\n\n /**\n * A list of all types this reflection extends (e.g. the parent classes).\n */\n extendedTypes: Type[];\n\n /**\n * A list of all types that extend this reflection (e.g. the subclasses).\n */\n extendedBy: Type[];\n\n /**\n * A list of all types this reflection implements.\n */\n implementedTypes: Type[];\n\n /**\n * A list of all types that implement this reflection.\n */\n implementedBy: Type[];\n\n /**\n * Contains a simplified representation of the type hierarchy suitable for being\n * rendered in templates.\n */\n typeHierarchy: DeclarationHierarchy;\n\n hasGetterOrSetter(): boolean {\n return !!this.getSignature || !!this.setSignature;\n }\n\n getAllSignatures(): SignatureReflection[] {\n let result: SignatureReflection[] = [];\n\n if (this.signatures) {\n result = result.concat(this.signatures);\n }\n if (this.indexSignature) {\n result.push(this.indexSignature);\n }\n if (this.getSignature) {\n result.push(this.getSignature);\n }\n if (this.setSignature) {\n result.push(this.setSignature);\n }\n\n return result;\n }\n\n /**\n * Traverse all potential child reflections of this reflection.\n *\n * The given callback will be invoked for all children, signatures and type parameters\n * attached to this reflection.\n *\n * @param callback The callback function that should be applied for each child reflection.\n */\n traverse(callback: TraverseCallback) {\n if (this.typeParameters) {\n this.typeParameters.forEach((parameter) => callback(parameter, TraverseProperty.TypeParameter));\n }\n\n if (this.type instanceof ReflectionType) {\n callback((<ReflectionType> this.type).declaration, TraverseProperty.TypeLiteral);\n }\n\n if (this.signatures) {\n this.signatures.forEach((signature) => callback(signature, TraverseProperty.Signatures));\n }\n\n if (this.indexSignature) {\n callback(this.indexSignature, TraverseProperty.IndexSignature);\n }\n\n if (this.getSignature) {\n callback(this.getSignature, TraverseProperty.GetSignature);\n }\n\n if (this.setSignature) {\n callback(this.setSignature, TraverseProperty.SetSignature);\n }\n\n super.traverse(callback);\n }\n\n /**\n * Return a raw object representation of this reflection.\n */\n toObject(): any {\n let result = super.toObject();\n\n if (this.type) {\n result.type = this.type.toObject();\n }\n\n if (this.defaultValue) {\n result.defaultValue = this.defaultValue;\n }\n\n if (this.overwrites) {\n result.overwrites = this.overwrites.toObject();\n }\n\n if (this.inheritedFrom) {\n result.inheritedFrom = this.inheritedFrom.toObject();\n }\n\n if (this.extendedTypes) {\n result.extendedTypes = this.extendedTypes.map((t) => t.toObject());\n }\n\n if (this.extendedBy) {\n result.extendedBy = this.extendedBy.map((t) => t.toObject());\n }\n\n if (this.implementedTypes) {\n result.implementedTypes = this.implementedTypes.map((t) => t.toObject());\n }\n\n if (this.implementedBy) {\n result.implementedBy = this.implementedBy.map((t) => t.toObject());\n }\n\n if (this.implementationOf) {\n result.implementationOf = this.implementationOf.toObject();\n }\n\n return result;\n }\n\n /**\n * Return a string representation of this reflection.\n */\n toString(): string {\n let result = super.toString();\n\n if (this.typeParameters) {\n const parameters: string[] = [];\n this.typeParameters.forEach((parameter) => {\n parameters.push(parameter.name);\n });\n result += '<' + parameters.join(', ') + '>';\n }\n\n if (this.type) {\n result += ':' + this.type.toString();\n }\n\n return result;\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/models/reflections/index.js.map b/node_modules/typedoc/dist/lib/models/reflections/index.js.map
index a39efcebf..570a747cf 100644
--- a/node_modules/typedoc/dist/lib/models/reflections/index.js.map
+++ b/node_modules/typedoc/dist/lib/models/reflections/index.js.map
@@ -1 +1 @@
-{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/models/reflections/index.ts"],"names":[],"mappings":";;AAAA,uCAA2H;AAAnH,gCAAA,UAAU,CAAA;AAAE,oCAAA,cAAc,CAAA;AAAE,oCAAA,cAAc,CAAA;AAAqC,sCAAA,gBAAgB,CAAA;AACvG,yCAAgD;AAAxC,0CAAA,mBAAmB,CAAA;AAC3B,6CAA0E;AAAlE,8CAAA,qBAAqB,CAAA;AAC7B,yCAAgD;AAAxC,0CAAA,mBAAmB,CAAA;AAC3B,qCAA4C;AAApC,sCAAA,iBAAiB,CAAA;AACzB,yCAAgD;AAAxC,0CAAA,mBAAmB,CAAA;AAC3B,mDAAyD;AAAjD,mDAAA,uBAAuB,CAAA","sourcesContent":["export {Reflection, ReflectionKind, ReflectionFlag, TypeParameterContainer, Decorator, TraverseProperty} from './abstract';\nexport {ContainerReflection} from './container';\nexport {DeclarationReflection, DeclarationHierarchy} from './declaration';\nexport {ParameterReflection} from './parameter';\nexport {ProjectReflection} from './project';\nexport {SignatureReflection} from './signature';\nexport {TypeParameterReflection} from './type-parameter';\n"]} \ No newline at end of file
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/models/reflections/index.ts"],"names":[],"mappings":";;AAAA,uCAA6H;AAApH,gCAAA,UAAU,CAAA;AAAE,oCAAA,cAAc,CAAA;AAAE,oCAAA,cAAc,CAAA;AAAqC,sCAAA,gBAAgB,CAAA;AACxG,yCAAkD;AAAzC,0CAAA,mBAAmB,CAAA;AAC5B,6CAA4E;AAAnE,8CAAA,qBAAqB,CAAA;AAC9B,yCAAkD;AAAzC,0CAAA,mBAAmB,CAAA;AAC5B,qCAA8C;AAArC,sCAAA,iBAAiB,CAAA;AAC1B,yCAAkD;AAAzC,0CAAA,mBAAmB,CAAA;AAC5B,mDAA2D;AAAlD,mDAAA,uBAAuB,CAAA","sourcesContent":["export { Reflection, ReflectionKind, ReflectionFlag, TypeParameterContainer, Decorator, TraverseProperty } from './abstract';\nexport { ContainerReflection } from './container';\nexport { DeclarationReflection, DeclarationHierarchy } from './declaration';\nexport { ParameterReflection } from './parameter';\nexport { ProjectReflection } from './project';\nexport { SignatureReflection } from './signature';\nexport { TypeParameterReflection } from './type-parameter';\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/models/reflections/parameter.js.map b/node_modules/typedoc/dist/lib/models/reflections/parameter.js.map
index a82ea7ba9..98e29422d 100644
--- a/node_modules/typedoc/dist/lib/models/reflections/parameter.js.map
+++ b/node_modules/typedoc/dist/lib/models/reflections/parameter.js.map
@@ -1 +1 @@
-{"version":3,"file":"parameter.js","sourceRoot":"","sources":["../../../../src/lib/models/reflections/parameter.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,wCAAoD;AACpD,uCAAgH;AAGhH;IAAyC,uCAAU;IAAnD;;IA8CA,CAAC;IA/BG,sCAAQ,GAAR,UAAS,QAA0B;QAC/B,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,YAAY,sBAAc,CAAC,CAAC,CAAC;YACtC,QAAQ,CAAmB,IAAI,CAAC,IAAK,CAAC,WAAW,EAAE,2BAAgB,CAAC,WAAW,CAAC,CAAC;QACrF,CAAC;QAED,iBAAM,QAAQ,YAAC,QAAQ,CAAC,CAAC;IAC7B,CAAC;IAKD,sCAAQ,GAAR;QACI,IAAM,MAAM,GAAG,iBAAM,QAAQ,WAAE,CAAC;QAEhC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;YACZ,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;QACvC,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;YACpB,MAAM,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;QAC5C,CAAC;QAED,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IAKD,sCAAQ,GAAR;QACI,MAAM,CAAC,iBAAM,QAAQ,WAAE,GAAG,CAAC,IAAI,CAAC,IAAI,GAAG,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAI,EAAE,CAAC,CAAC;IAC7E,CAAC;IACL,0BAAC;AAAD,CAAC,AA9CD,CAAyC,qBAAU,GA8ClD;AA9CY,kDAAmB","sourcesContent":["import {Type, ReflectionType} from '../types/index';\nimport {Reflection, DefaultValueContainer, TypeContainer, TraverseCallback, TraverseProperty} from './abstract';\nimport {SignatureReflection} from './signature';\n\nexport class ParameterReflection extends Reflection implements DefaultValueContainer, TypeContainer {\n parent: SignatureReflection;\n\n defaultValue: string;\n\n type: Type;\n\n /**\n * Traverse all potential child reflections of this reflection.\n *\n * The given callback will be invoked for all children, signatures and type parameters\n * attached to this reflection.\n *\n * @param callback The callback function that should be applied for each child reflection.\n */\n traverse(callback: TraverseCallback) {\n if (this.type instanceof ReflectionType) {\n callback((<ReflectionType> this.type).declaration, TraverseProperty.TypeLiteral);\n }\n\n super.traverse(callback);\n }\n\n /**\n * Return a raw object representation of this reflection.\n */\n toObject(): any {\n const result = super.toObject();\n\n if (this.type) {\n result.type = this.type.toObject();\n }\n\n if (this.defaultValue) {\n result.defaultValue = this.defaultValue;\n }\n\n return result;\n }\n\n /**\n * Return a string representation of this reflection.\n */\n toString() {\n return super.toString() + (this.type ? ':' + this.type.toString() : '');\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"parameter.js","sourceRoot":"","sources":["../../../../src/lib/models/reflections/parameter.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,wCAAsD;AACtD,uCAAkH;AAGlH;IAAyC,uCAAU;IAAnD;;IA8CA,CAAC;IA/BG,sCAAQ,GAAR,UAAS,QAA0B;QAC/B,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,YAAY,sBAAc,CAAC,CAAC,CAAC;YACtC,QAAQ,CAAmB,IAAI,CAAC,IAAK,CAAC,WAAW,EAAE,2BAAgB,CAAC,WAAW,CAAC,CAAC;QACrF,CAAC;QAED,iBAAM,QAAQ,YAAC,QAAQ,CAAC,CAAC;IAC7B,CAAC;IAKD,sCAAQ,GAAR;QACI,IAAM,MAAM,GAAG,iBAAM,QAAQ,WAAE,CAAC;QAEhC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;YACZ,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;QACvC,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;YACpB,MAAM,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;QAC5C,CAAC;QAED,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IAKD,sCAAQ,GAAR;QACI,MAAM,CAAC,iBAAM,QAAQ,WAAE,GAAG,CAAC,IAAI,CAAC,IAAI,GAAG,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAI,EAAE,CAAC,CAAC;IAC7E,CAAC;IACL,0BAAC;AAAD,CAAC,AA9CD,CAAyC,qBAAU,GA8ClD;AA9CY,kDAAmB","sourcesContent":["import { Type, ReflectionType } from '../types/index';\nimport { Reflection, DefaultValueContainer, TypeContainer, TraverseCallback, TraverseProperty } from './abstract';\nimport { SignatureReflection } from './signature';\n\nexport class ParameterReflection extends Reflection implements DefaultValueContainer, TypeContainer {\n parent: SignatureReflection;\n\n defaultValue: string;\n\n type: Type;\n\n /**\n * Traverse all potential child reflections of this reflection.\n *\n * The given callback will be invoked for all children, signatures and type parameters\n * attached to this reflection.\n *\n * @param callback The callback function that should be applied for each child reflection.\n */\n traverse(callback: TraverseCallback) {\n if (this.type instanceof ReflectionType) {\n callback((<ReflectionType> this.type).declaration, TraverseProperty.TypeLiteral);\n }\n\n super.traverse(callback);\n }\n\n /**\n * Return a raw object representation of this reflection.\n */\n toObject(): any {\n const result = super.toObject();\n\n if (this.type) {\n result.type = this.type.toObject();\n }\n\n if (this.defaultValue) {\n result.defaultValue = this.defaultValue;\n }\n\n return result;\n }\n\n /**\n * Return a string representation of this reflection.\n */\n toString() {\n return super.toString() + (this.type ? ':' + this.type.toString() : '');\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/models/reflections/project.js.map b/node_modules/typedoc/dist/lib/models/reflections/project.js.map
index 2519846f4..38690197e 100644
--- a/node_modules/typedoc/dist/lib/models/reflections/project.js.map
+++ b/node_modules/typedoc/dist/lib/models/reflections/project.js.map
@@ -1 +1 @@
-{"version":3,"file":"project.js","sourceRoot":"","sources":["../../../../src/lib/models/reflections/project.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,0CAA6D;AAC7D,uCAAsD;AACtD,yCAAgD;AAQhD;IAAuC,qCAAmB;IAwCtD,2BAAY,IAAY;QAAxB,YACI,kBAAM,IAAI,EAAE,IAAI,EAAE,yBAAc,CAAC,MAAM,CAAC,SAC3C;QAtCD,iBAAW,GAA+B,EAAE,CAAC;QAE7C,mBAAa,GAAiC,EAAE,CAAC;QAKjD,eAAS,GAAoB,IAAI,uBAAe,EAAE,CAAC;QAKnD,WAAK,GAAiB,EAAE,CAAC;;IA0BzB,CAAC;IAKD,qCAAS,GAAT;QACI,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAQD,gDAAoB,GAApB,UAAqB,IAAoB;QACrC,IAAM,MAAM,GAAiB,EAAE,CAAC;QAChC,GAAG,CAAC,CAAC,IAAI,EAAE,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;YAC9B,IAAM,UAAU,GAAG,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;YACxC,EAAE,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;gBAC1B,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YAC5B,CAAC;QACL,CAAC;QAED,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IAiBD,gDAAoB,GAApB,UAAqB,GAAQ;QACzB,IAAM,KAAK,GAAa,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAClE,IAAM,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC;QAEzB,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,GAAG,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;YACvC,IAAM,UAAU,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;YACzC,EAAE,CAAC,CAAC,UAAU,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC;gBAC3B,QAAQ,CAAC;YACb,CAAC;YAED,IAAI,KAAK,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;YAC7B,IAAI,MAAM,GAAG,UAAU,CAAC;YACxB,OAAO,MAAM,IAAI,KAAK,IAAI,CAAC,EAAE,CAAC;gBAC1B,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;gBACvB,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI,KAAK,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;oBAC/B,QAAQ,CAAC,MAAM,CAAC;gBACpB,CAAC;gBACD,KAAK,IAAI,CAAC,CAAC;YACf,CAAC;YAED,MAAM,CAAC,UAAU,CAAC;QACtB,CAAC;QAED,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IACL,wBAAC;AAAD,CAAC,AA7GD,CAAuC,+BAAmB,GA6GzD;AA7GY,8CAAiB","sourcesContent":["import {SourceFile, SourceDirectory} from '../sources/index';\nimport {Reflection, ReflectionKind} from './abstract';\nimport {ContainerReflection} from './container';\n\n/**\n * A reflection that represents the root of the project.\n *\n * The project reflection acts as a global index, one may receive all reflections\n * and source files of the processed project through this reflection.\n */\nexport class ProjectReflection extends ContainerReflection {\n /**\n * A list of all reflections within the project.\n */\n reflections: {[id: number]: Reflection} = {};\n\n symbolMapping: {[symbolId: number]: number} = {};\n\n /**\n * The root directory of the project.\n */\n directory: SourceDirectory = new SourceDirectory();\n\n /**\n * A list of all source files within the project.\n */\n files: SourceFile[] = [];\n\n /**\n * The name of the project.\n *\n * The name can be passed as a commandline argument or it is read from the package info.\n */\n name: string;\n\n /**\n * The contents of the readme.md file of the project when found.\n */\n readme: string;\n\n /**\n * The parsed data of the package.json file of the project when found.\n */\n packageInfo: any;\n\n /**\n * Create a new ProjectReflection instance.\n *\n * @param name The name of the project.\n */\n constructor(name: string) {\n super(null, name, ReflectionKind.Global);\n }\n\n /**\n * Return whether this reflection is the root / project reflection.\n */\n isProject(): boolean {\n return true;\n }\n\n /**\n * Return a list of all reflections in this project of a certain kind.\n *\n * @param kind The desired kind of reflection.\n * @returns An array containing all reflections with the desired kind.\n */\n getReflectionsByKind(kind: ReflectionKind): Reflection[] {\n const values: Reflection[] = [];\n for (let id in this.reflections) {\n const reflection = this.reflections[id];\n if (reflection.kindOf(kind)) {\n values.push(reflection);\n }\n }\n\n return values;\n }\n\n /**\n * @param name The name to look for. Might contain a hierarchy.\n */\n findReflectionByName(name: string): Reflection;\n\n /**\n * @param names The name hierarchy to look for.\n */\n findReflectionByName(names: string[]): Reflection;\n\n /**\n * Try to find a reflection by its name.\n *\n * @return The found reflection or null.\n */\n findReflectionByName(arg: any): Reflection {\n const names: string[] = Array.isArray(arg) ? arg : arg.split('.');\n const name = names.pop();\n\n search: for (let key in this.reflections) {\n const reflection = this.reflections[key];\n if (reflection.name !== name) {\n continue;\n }\n\n let depth = names.length - 1;\n let target = reflection;\n while (target && depth >= 0) {\n target = target.parent;\n if (target.name !== names[depth]) {\n continue search;\n }\n depth -= 1;\n }\n\n return reflection;\n }\n\n return null;\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"project.js","sourceRoot":"","sources":["../../../../src/lib/models/reflections/project.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,0CAA+D;AAC/D,uCAAwD;AACxD,yCAAkD;AAQlD;IAAuC,qCAAmB;IAwCtD,2BAAY,IAAY;QAAxB,YACI,kBAAM,IAAI,EAAE,IAAI,EAAE,yBAAc,CAAC,MAAM,CAAC,SAC3C;QAtCD,iBAAW,GAA+B,EAAE,CAAC;QAE7C,mBAAa,GAAiC,EAAE,CAAC;QAKjD,eAAS,GAAoB,IAAI,uBAAe,EAAE,CAAC;QAKnD,WAAK,GAAiB,EAAE,CAAC;;IA0BzB,CAAC;IAKD,qCAAS,GAAT;QACI,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAQD,gDAAoB,GAApB,UAAqB,IAAoB;QACrC,IAAM,MAAM,GAAiB,EAAE,CAAC;QAChC,GAAG,CAAC,CAAC,IAAI,EAAE,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;YAC9B,IAAM,UAAU,GAAG,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;YACxC,EAAE,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;gBAC1B,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YAC5B,CAAC;QACL,CAAC;QAED,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IAiBD,gDAAoB,GAApB,UAAqB,GAAQ;QACzB,IAAM,KAAK,GAAa,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAClE,IAAM,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC;QAEzB,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,GAAG,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;YACvC,IAAM,UAAU,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;YACzC,EAAE,CAAC,CAAC,UAAU,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC;gBAC3B,QAAQ,CAAC;YACb,CAAC;YAED,IAAI,KAAK,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;YAC7B,IAAI,MAAM,GAAG,UAAU,CAAC;YACxB,OAAO,MAAM,IAAI,KAAK,IAAI,CAAC,EAAE,CAAC;gBAC1B,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;gBACvB,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI,KAAK,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;oBAC/B,QAAQ,CAAC,MAAM,CAAC;gBACpB,CAAC;gBACD,KAAK,IAAI,CAAC,CAAC;YACf,CAAC;YAED,MAAM,CAAC,UAAU,CAAC;QACtB,CAAC;QAED,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IACL,wBAAC;AAAD,CAAC,AA7GD,CAAuC,+BAAmB,GA6GzD;AA7GY,8CAAiB","sourcesContent":["import { SourceFile, SourceDirectory } from '../sources/index';\nimport { Reflection, ReflectionKind } from './abstract';\nimport { ContainerReflection } from './container';\n\n/**\n * A reflection that represents the root of the project.\n *\n * The project reflection acts as a global index, one may receive all reflections\n * and source files of the processed project through this reflection.\n */\nexport class ProjectReflection extends ContainerReflection {\n /**\n * A list of all reflections within the project.\n */\n reflections: {[id: number]: Reflection} = {};\n\n symbolMapping: {[symbolId: number]: number} = {};\n\n /**\n * The root directory of the project.\n */\n directory: SourceDirectory = new SourceDirectory();\n\n /**\n * A list of all source files within the project.\n */\n files: SourceFile[] = [];\n\n /**\n * The name of the project.\n *\n * The name can be passed as a commandline argument or it is read from the package info.\n */\n name: string;\n\n /**\n * The contents of the readme.md file of the project when found.\n */\n readme: string;\n\n /**\n * The parsed data of the package.json file of the project when found.\n */\n packageInfo: any;\n\n /**\n * Create a new ProjectReflection instance.\n *\n * @param name The name of the project.\n */\n constructor(name: string) {\n super(null, name, ReflectionKind.Global);\n }\n\n /**\n * Return whether this reflection is the root / project reflection.\n */\n isProject(): boolean {\n return true;\n }\n\n /**\n * Return a list of all reflections in this project of a certain kind.\n *\n * @param kind The desired kind of reflection.\n * @returns An array containing all reflections with the desired kind.\n */\n getReflectionsByKind(kind: ReflectionKind): Reflection[] {\n const values: Reflection[] = [];\n for (let id in this.reflections) {\n const reflection = this.reflections[id];\n if (reflection.kindOf(kind)) {\n values.push(reflection);\n }\n }\n\n return values;\n }\n\n /**\n * @param name The name to look for. Might contain a hierarchy.\n */\n findReflectionByName(name: string): Reflection;\n\n /**\n * @param names The name hierarchy to look for.\n */\n findReflectionByName(names: string[]): Reflection;\n\n /**\n * Try to find a reflection by its name.\n *\n * @return The found reflection or null.\n */\n findReflectionByName(arg: any): Reflection {\n const names: string[] = Array.isArray(arg) ? arg : arg.split('.');\n const name = names.pop();\n\n search: for (let key in this.reflections) {\n const reflection = this.reflections[key];\n if (reflection.name !== name) {\n continue;\n }\n\n let depth = names.length - 1;\n let target = reflection;\n while (target && depth >= 0) {\n target = target.parent;\n if (target.name !== names[depth]) {\n continue search;\n }\n depth -= 1;\n }\n\n return reflection;\n }\n\n return null;\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/models/reflections/signature.js.map b/node_modules/typedoc/dist/lib/models/reflections/signature.js.map
index 9ececac78..7a3ea9cd6 100644
--- a/node_modules/typedoc/dist/lib/models/reflections/signature.js.map
+++ b/node_modules/typedoc/dist/lib/models/reflections/signature.js.map
@@ -1 +1 @@
-{"version":3,"file":"signature.js","sourceRoot":"","sources":["../../../../src/lib/models/reflections/signature.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,wCAAoD;AACpD,uCAAiH;AAKjH;IAAyC,uCAAU;IAAnD;;IA2GA,CAAC;IA1EG,+CAAiB,GAAjB;QACI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;YACnB,MAAM,CAAC,EAAE,CAAC;QACd,CAAC;QACD,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,UAAC,SAA8B,IAAK,OAAA,SAAS,CAAC,IAAI,EAAd,CAAc,CAAC,CAAC;IACnF,CAAC;IAUD,sCAAQ,GAAR,UAAS,QAA0B;QAC/B,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,YAAY,sBAAc,CAAC,CAAC,CAAC;YACtC,QAAQ,CAAmB,IAAI,CAAC,IAAK,CAAC,WAAW,EAAE,2BAAgB,CAAC,WAAW,CAAC,CAAC;QACrF,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC;YACtB,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,UAAC,SAAS,IAAK,OAAA,QAAQ,CAAC,SAAS,EAAE,2BAAgB,CAAC,aAAa,CAAC,EAAnD,CAAmD,CAAC,CAAC;QACpG,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;YAClB,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,UAAC,SAAS,IAAK,OAAA,QAAQ,CAAC,SAAS,EAAE,2BAAgB,CAAC,UAAU,CAAC,EAAhD,CAAgD,CAAC,CAAC;QAC7F,CAAC;QAED,iBAAM,QAAQ,YAAC,QAAQ,CAAC,CAAC;IAC7B,CAAC;IAKD,sCAAQ,GAAR;QACI,IAAM,MAAM,GAAG,iBAAM,QAAQ,WAAE,CAAC;QAEhC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;YACZ,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;QACvC,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;YAClB,MAAM,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;QACnD,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;YACrB,MAAM,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,CAAC;QACzD,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC;YACxB,MAAM,CAAC,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,CAAC;QAC/D,CAAC;QAED,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IAKD,sCAAQ,GAAR;QACI,IAAI,MAAM,GAAG,iBAAM,QAAQ,WAAE,CAAC;QAE9B,EAAE,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC;YACtB,IAAM,YAAU,GAAa,EAAE,CAAC;YAChC,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,UAAC,SAAS,IAAK,OAAA,YAAU,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAA/B,CAA+B,CAAC,CAAC;YAC5E,MAAM,IAAI,GAAG,GAAG,YAAU,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC;QAChD,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;YACZ,MAAM,IAAI,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;QACzC,CAAC;QAED,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IACL,0BAAC;AAAD,CAAC,AA3GD,CAAyC,qBAAU,GA2GlD;AA3GY,kDAAmB","sourcesContent":["import {Type, ReflectionType} from '../types/index';\nimport {Reflection, TypeContainer, TypeParameterContainer, TraverseProperty, TraverseCallback} from './abstract';\nimport {ContainerReflection} from './container';\nimport {ParameterReflection} from './parameter';\nimport {TypeParameterReflection} from './type-parameter';\n\nexport class SignatureReflection extends Reflection implements TypeContainer, TypeParameterContainer {\n parent: ContainerReflection;\n\n parameters: ParameterReflection[];\n\n typeParameters: TypeParameterReflection[];\n\n type: Type;\n\n /**\n * A type that points to the reflection that has been overwritten by this reflection.\n *\n * Applies to interface and class members.\n */\n overwrites: Type;\n\n /**\n * A type that points to the reflection this reflection has been inherited from.\n *\n * Applies to interface and class members.\n */\n inheritedFrom: Type;\n\n /**\n * A type that points to the reflection this reflection is the implementation of.\n *\n * Applies to class members.\n */\n implementationOf: Type;\n\n /**\n * Return an array of the parameter types.\n */\n getParameterTypes(): Type[] {\n if (!this.parameters) {\n return [];\n }\n return this.parameters.map((parameter: ParameterReflection) => parameter.type);\n }\n\n /**\n * Traverse all potential child reflections of this reflection.\n *\n * The given callback will be invoked for all children, signatures and type parameters\n * attached to this reflection.\n *\n * @param callback The callback function that should be applied for each child reflection.\n */\n traverse(callback: TraverseCallback) {\n if (this.type instanceof ReflectionType) {\n callback((<ReflectionType> this.type).declaration, TraverseProperty.TypeLiteral);\n }\n\n if (this.typeParameters) {\n this.typeParameters.forEach((parameter) => callback(parameter, TraverseProperty.TypeParameter));\n }\n\n if (this.parameters) {\n this.parameters.forEach((parameter) => callback(parameter, TraverseProperty.Parameters));\n }\n\n super.traverse(callback);\n }\n\n /**\n * Return a raw object representation of this reflection.\n */\n toObject(): any {\n const result = super.toObject();\n\n if (this.type) {\n result.type = this.type.toObject();\n }\n\n if (this.overwrites) {\n result.overwrites = this.overwrites.toObject();\n }\n\n if (this.inheritedFrom) {\n result.inheritedFrom = this.inheritedFrom.toObject();\n }\n\n if (this.implementationOf) {\n result.implementationOf = this.implementationOf.toObject();\n }\n\n return result;\n }\n\n /**\n * Return a string representation of this reflection.\n */\n toString(): string {\n let result = super.toString();\n\n if (this.typeParameters) {\n const parameters: string[] = [];\n this.typeParameters.forEach((parameter) => parameters.push(parameter.name));\n result += '<' + parameters.join(', ') + '>';\n }\n\n if (this.type) {\n result += ':' + this.type.toString();\n }\n\n return result;\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"signature.js","sourceRoot":"","sources":["../../../../src/lib/models/reflections/signature.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,wCAAsD;AACtD,uCAAmH;AAKnH;IAAyC,uCAAU;IAAnD;;IA2GA,CAAC;IA1EG,+CAAiB,GAAjB;QACI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;YACnB,MAAM,CAAC,EAAE,CAAC;QACd,CAAC;QACD,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,UAAC,SAA8B,IAAK,OAAA,SAAS,CAAC,IAAI,EAAd,CAAc,CAAC,CAAC;IACnF,CAAC;IAUD,sCAAQ,GAAR,UAAS,QAA0B;QAC/B,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,YAAY,sBAAc,CAAC,CAAC,CAAC;YACtC,QAAQ,CAAmB,IAAI,CAAC,IAAK,CAAC,WAAW,EAAE,2BAAgB,CAAC,WAAW,CAAC,CAAC;QACrF,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC;YACtB,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,UAAC,SAAS,IAAK,OAAA,QAAQ,CAAC,SAAS,EAAE,2BAAgB,CAAC,aAAa,CAAC,EAAnD,CAAmD,CAAC,CAAC;QACpG,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;YAClB,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,UAAC,SAAS,IAAK,OAAA,QAAQ,CAAC,SAAS,EAAE,2BAAgB,CAAC,UAAU,CAAC,EAAhD,CAAgD,CAAC,CAAC;QAC7F,CAAC;QAED,iBAAM,QAAQ,YAAC,QAAQ,CAAC,CAAC;IAC7B,CAAC;IAKD,sCAAQ,GAAR;QACI,IAAM,MAAM,GAAG,iBAAM,QAAQ,WAAE,CAAC;QAEhC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;YACZ,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;QACvC,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;YAClB,MAAM,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;QACnD,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;YACrB,MAAM,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,CAAC;QACzD,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC;YACxB,MAAM,CAAC,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,CAAC;QAC/D,CAAC;QAED,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IAKD,sCAAQ,GAAR;QACI,IAAI,MAAM,GAAG,iBAAM,QAAQ,WAAE,CAAC;QAE9B,EAAE,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC;YACtB,IAAM,YAAU,GAAa,EAAE,CAAC;YAChC,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,UAAC,SAAS,IAAK,OAAA,YAAU,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAA/B,CAA+B,CAAC,CAAC;YAC5E,MAAM,IAAI,GAAG,GAAG,YAAU,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC;QAChD,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;YACZ,MAAM,IAAI,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;QACzC,CAAC;QAED,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IACL,0BAAC;AAAD,CAAC,AA3GD,CAAyC,qBAAU,GA2GlD;AA3GY,kDAAmB","sourcesContent":["import { Type, ReflectionType } from '../types/index';\nimport { Reflection, TypeContainer, TypeParameterContainer, TraverseProperty, TraverseCallback } from './abstract';\nimport { ContainerReflection } from './container';\nimport { ParameterReflection } from './parameter';\nimport { TypeParameterReflection } from './type-parameter';\n\nexport class SignatureReflection extends Reflection implements TypeContainer, TypeParameterContainer {\n parent: ContainerReflection;\n\n parameters: ParameterReflection[];\n\n typeParameters: TypeParameterReflection[];\n\n type: Type;\n\n /**\n * A type that points to the reflection that has been overwritten by this reflection.\n *\n * Applies to interface and class members.\n */\n overwrites: Type;\n\n /**\n * A type that points to the reflection this reflection has been inherited from.\n *\n * Applies to interface and class members.\n */\n inheritedFrom: Type;\n\n /**\n * A type that points to the reflection this reflection is the implementation of.\n *\n * Applies to class members.\n */\n implementationOf: Type;\n\n /**\n * Return an array of the parameter types.\n */\n getParameterTypes(): Type[] {\n if (!this.parameters) {\n return [];\n }\n return this.parameters.map((parameter: ParameterReflection) => parameter.type);\n }\n\n /**\n * Traverse all potential child reflections of this reflection.\n *\n * The given callback will be invoked for all children, signatures and type parameters\n * attached to this reflection.\n *\n * @param callback The callback function that should be applied for each child reflection.\n */\n traverse(callback: TraverseCallback) {\n if (this.type instanceof ReflectionType) {\n callback((<ReflectionType> this.type).declaration, TraverseProperty.TypeLiteral);\n }\n\n if (this.typeParameters) {\n this.typeParameters.forEach((parameter) => callback(parameter, TraverseProperty.TypeParameter));\n }\n\n if (this.parameters) {\n this.parameters.forEach((parameter) => callback(parameter, TraverseProperty.Parameters));\n }\n\n super.traverse(callback);\n }\n\n /**\n * Return a raw object representation of this reflection.\n */\n toObject(): any {\n const result = super.toObject();\n\n if (this.type) {\n result.type = this.type.toObject();\n }\n\n if (this.overwrites) {\n result.overwrites = this.overwrites.toObject();\n }\n\n if (this.inheritedFrom) {\n result.inheritedFrom = this.inheritedFrom.toObject();\n }\n\n if (this.implementationOf) {\n result.implementationOf = this.implementationOf.toObject();\n }\n\n return result;\n }\n\n /**\n * Return a string representation of this reflection.\n */\n toString(): string {\n let result = super.toString();\n\n if (this.typeParameters) {\n const parameters: string[] = [];\n this.typeParameters.forEach((parameter) => parameters.push(parameter.name));\n result += '<' + parameters.join(', ') + '>';\n }\n\n if (this.type) {\n result += ':' + this.type.toString();\n }\n\n return result;\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/models/reflections/type-parameter.js.map b/node_modules/typedoc/dist/lib/models/reflections/type-parameter.js.map
index 93c9d42d2..62a1a1ee7 100644
--- a/node_modules/typedoc/dist/lib/models/reflections/type-parameter.js.map
+++ b/node_modules/typedoc/dist/lib/models/reflections/type-parameter.js.map
@@ -1 +1 @@
-{"version":3,"file":"type-parameter.js","sourceRoot":"","sources":["../../../../src/lib/models/reflections/type-parameter.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,uCAAqE;AAGrE;IAA6C,2CAAU;IAQnD,iCAAY,MAAmB,EAAE,IAAwB;QAAzD,YACI,kBAAM,MAAM,EAAE,IAAI,CAAC,IAAI,EAAE,yBAAc,CAAC,aAAa,CAAC,SAEzD;QADG,KAAI,CAAC,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC;;IAChC,CAAC;IAKD,0CAAQ,GAAR;QACI,IAAM,MAAM,GAAG,iBAAM,QAAQ,WAAE,CAAC;QAEhC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;YACZ,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;QACvC,CAAC;QAED,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IACL,8BAAC;AAAD,CAAC,AAzBD,CAA6C,qBAAU,GAyBtD;AAzBY,0DAAuB","sourcesContent":["import {Type, TypeParameterType} from '../types/index';\nimport {Reflection, ReflectionKind, TypeContainer} from './abstract';\nimport {DeclarationReflection} from './declaration';\n\nexport class TypeParameterReflection extends Reflection implements TypeContainer {\n parent: DeclarationReflection;\n\n type: Type;\n\n /**\n * Create a new TypeParameterReflection instance.\n */\n constructor(parent?: Reflection, type?: TypeParameterType) {\n super(parent, type.name, ReflectionKind.TypeParameter);\n this.type = type.constraint;\n }\n\n /**\n * Return a raw object representation of this reflection.\n */\n toObject(): any {\n const result = super.toObject();\n\n if (this.type) {\n result.type = this.type.toObject();\n }\n\n return result;\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"type-parameter.js","sourceRoot":"","sources":["../../../../src/lib/models/reflections/type-parameter.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,uCAAuE;AAGvE;IAA6C,2CAAU;IAQnD,iCAAY,MAAmB,EAAE,IAAwB;QAAzD,YACI,kBAAM,MAAM,EAAE,IAAI,CAAC,IAAI,EAAE,yBAAc,CAAC,aAAa,CAAC,SAEzD;QADG,KAAI,CAAC,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC;;IAChC,CAAC;IAKD,0CAAQ,GAAR;QACI,IAAM,MAAM,GAAG,iBAAM,QAAQ,WAAE,CAAC;QAEhC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;YACZ,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;QACvC,CAAC;QAED,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IACL,8BAAC;AAAD,CAAC,AAzBD,CAA6C,qBAAU,GAyBtD;AAzBY,0DAAuB","sourcesContent":["import { Type, TypeParameterType } from '../types/index';\nimport { Reflection, ReflectionKind, TypeContainer } from './abstract';\nimport { DeclarationReflection } from './declaration';\n\nexport class TypeParameterReflection extends Reflection implements TypeContainer {\n parent: DeclarationReflection;\n\n type: Type;\n\n /**\n * Create a new TypeParameterReflection instance.\n */\n constructor(parent?: Reflection, type?: TypeParameterType) {\n super(parent, type.name, ReflectionKind.TypeParameter);\n this.type = type.constraint;\n }\n\n /**\n * Return a raw object representation of this reflection.\n */\n toObject(): any {\n const result = super.toObject();\n\n if (this.type) {\n result.type = this.type.toObject();\n }\n\n return result;\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/models/sources/directory.js.map b/node_modules/typedoc/dist/lib/models/sources/directory.js.map
index 2e922ee41..0b326e7ad 100644
--- a/node_modules/typedoc/dist/lib/models/sources/directory.js.map
+++ b/node_modules/typedoc/dist/lib/models/sources/directory.js.map
@@ -1 +1 @@
-{"version":3,"file":"directory.js","sourceRoot":"","sources":["../../../../src/lib/models/sources/directory.ts"],"names":[],"mappings":";;AAWA;IAuCI,yBAAY,IAAa,EAAE,MAAwB;QAnCnD,WAAM,GAAoB,IAAI,CAAC;QAK/B,gBAAW,GAAsC,EAAE,CAAC;QAOpD,UAAK,GAAiB,EAAE,CAAC;QAKzB,SAAI,GAAW,IAAI,CAAC;QAKpB,YAAO,GAAW,IAAI,CAAC;QAcnB,EAAE,CAAC,CAAC,IAAI,IAAI,MAAM,CAAC,CAAC,CAAC;YACjB,IAAI,CAAC,IAAI,GAAM,IAAI,CAAC;YACpB,IAAI,CAAC,OAAO,GAAG,CAAC,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,GAAG,GAAG,GAAG,EAAE,CAAC,GAAG,IAAI,CAAC;YACnE,IAAI,CAAC,MAAM,GAAI,MAAM,CAAC;QAC1B,CAAC;IACL,CAAC;IAQD,kCAAQ,GAAR,UAAS,MAAmB;QAAnB,uBAAA,EAAA,WAAmB;QACxB,IAAI,GAAG,GAAG,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC;QAE7B,GAAG,CAAC,CAAC,IAAI,GAAG,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;YAC/B,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;gBACxC,QAAQ,CAAC;YACb,CAAC;YACD,GAAG,IAAI,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;QAChE,CAAC;QAED,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,UAAC,IAAI;YACpB,GAAG,IAAI,IAAI,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC;QAChD,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,GAAG,CAAC;IACf,CAAC;IAQD,2CAAiB,GAAjB;QACI,IAAM,WAAW,GAAiB,EAAE,CAAC;QACrC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,UAAC,IAAI;YACpB,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;QAC1D,CAAC,CAAC,CAAC;QAGH,MAAM,CAAC,WAAW,CAAC;IACvB,CAAC;IACL,sBAAC;AAAD,CAAC,AArFD,IAqFC;AArFY,0CAAe","sourcesContent":["import {Reflection} from '../reflections/abstract';\nimport {ReflectionGroup} from '../ReflectionGroup';\nimport {SourceFile} from './file';\n\n/**\n * Exposes information about a directory containing source files.\n *\n * One my access the root directory of a project through the [[ProjectReflection.directory]]\n * property. Traverse through directories by utilizing the [[SourceDirectory.parent]] or\n * [[SourceDirectory.directories]] properties.\n */\nexport class SourceDirectory {\n /**\n * The parent directory or NULL if this is a root directory.\n */\n parent: SourceDirectory = null;\n\n /**\n * A list of all subdirectories.\n */\n directories: {[name: string]: SourceDirectory} = {};\n\n groups: ReflectionGroup[];\n\n /**\n * A list of all files in this directory.\n */\n files: SourceFile[] = [];\n\n /**\n * The name of this directory.\n */\n name: string = null;\n\n /**\n * The relative path from the root directory to this directory.\n */\n dirName: string = null;\n\n /**\n * The url of the page displaying the directory contents.\n */\n url: string;\n\n /**\n * Create a new SourceDirectory instance.\n *\n * @param name The new of directory.\n * @param parent The parent directory instance.\n */\n constructor(name?: string, parent?: SourceDirectory) {\n if (name && parent) {\n this.name = name;\n this.dirName = (parent.dirName ? parent.dirName + '/' : '') + name;\n this.parent = parent;\n }\n }\n\n /**\n * Return a string describing this directory and its contents.\n *\n * @param indent Used internally for indention.\n * @returns A string representing this directory and all of its children.\n */\n toString(indent: string = '') {\n let res = indent + this.name;\n\n for (let key in this.directories) {\n if (!this.directories.hasOwnProperty(key)) {\n continue;\n }\n res += '\\n' + this.directories[key].toString(indent + ' ');\n }\n\n this.files.forEach((file) => {\n res += '\\n' + indent + ' ' + file.fileName;\n });\n\n return res;\n }\n\n /**\n * Return a list of all reflections exposed by the files within this directory.\n *\n * @returns An aggregated list of all [[DeclarationReflection]] defined in the\n * files of this directory.\n */\n getAllReflections(): Reflection[] {\n const reflections: Reflection[] = [];\n this.files.forEach((file) => {\n reflections.push.apply(reflections, file.reflections);\n });\n\n // reflections.sort(Factories.GroupHandler.sortCallback);\n return reflections;\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"directory.js","sourceRoot":"","sources":["../../../../src/lib/models/sources/directory.ts"],"names":[],"mappings":";;AAWA;IAuCI,yBAAY,IAAa,EAAE,MAAwB;QAnCnD,WAAM,GAAoB,IAAI,CAAC;QAK/B,gBAAW,GAAsC,EAAE,CAAC;QAOpD,UAAK,GAAiB,EAAE,CAAC;QAKzB,SAAI,GAAW,IAAI,CAAC;QAKpB,YAAO,GAAW,IAAI,CAAC;QAcnB,EAAE,CAAC,CAAC,IAAI,IAAI,MAAM,CAAC,CAAC,CAAC;YACjB,IAAI,CAAC,IAAI,GAAM,IAAI,CAAC;YACpB,IAAI,CAAC,OAAO,GAAG,CAAC,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,GAAG,GAAG,GAAG,EAAE,CAAC,GAAG,IAAI,CAAC;YACnE,IAAI,CAAC,MAAM,GAAI,MAAM,CAAC;QAC1B,CAAC;IACL,CAAC;IAQD,kCAAQ,GAAR,UAAS,MAAmB;QAAnB,uBAAA,EAAA,WAAmB;QACxB,IAAI,GAAG,GAAG,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC;QAE7B,GAAG,CAAC,CAAC,IAAI,GAAG,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;YAC/B,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;gBACxC,QAAQ,CAAC;YACb,CAAC;YACD,GAAG,IAAI,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;QAChE,CAAC;QAED,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,UAAC,IAAI;YACpB,GAAG,IAAI,IAAI,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC;QAChD,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,GAAG,CAAC;IACf,CAAC;IAQD,2CAAiB,GAAjB;QACI,IAAM,WAAW,GAAiB,EAAE,CAAC;QACrC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,UAAC,IAAI;YACpB,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;QAC1D,CAAC,CAAC,CAAC;QAGH,MAAM,CAAC,WAAW,CAAC;IACvB,CAAC;IACL,sBAAC;AAAD,CAAC,AArFD,IAqFC;AArFY,0CAAe","sourcesContent":["import { Reflection } from '../reflections/abstract';\nimport { ReflectionGroup } from '../ReflectionGroup';\nimport { SourceFile } from './file';\n\n/**\n * Exposes information about a directory containing source files.\n *\n * One my access the root directory of a project through the [[ProjectReflection.directory]]\n * property. Traverse through directories by utilizing the [[SourceDirectory.parent]] or\n * [[SourceDirectory.directories]] properties.\n */\nexport class SourceDirectory {\n /**\n * The parent directory or NULL if this is a root directory.\n */\n parent: SourceDirectory = null;\n\n /**\n * A list of all subdirectories.\n */\n directories: {[name: string]: SourceDirectory} = {};\n\n groups: ReflectionGroup[];\n\n /**\n * A list of all files in this directory.\n */\n files: SourceFile[] = [];\n\n /**\n * The name of this directory.\n */\n name: string = null;\n\n /**\n * The relative path from the root directory to this directory.\n */\n dirName: string = null;\n\n /**\n * The url of the page displaying the directory contents.\n */\n url: string;\n\n /**\n * Create a new SourceDirectory instance.\n *\n * @param name The new of directory.\n * @param parent The parent directory instance.\n */\n constructor(name?: string, parent?: SourceDirectory) {\n if (name && parent) {\n this.name = name;\n this.dirName = (parent.dirName ? parent.dirName + '/' : '') + name;\n this.parent = parent;\n }\n }\n\n /**\n * Return a string describing this directory and its contents.\n *\n * @param indent Used internally for indention.\n * @returns A string representing this directory and all of its children.\n */\n toString(indent: string = '') {\n let res = indent + this.name;\n\n for (let key in this.directories) {\n if (!this.directories.hasOwnProperty(key)) {\n continue;\n }\n res += '\\n' + this.directories[key].toString(indent + ' ');\n }\n\n this.files.forEach((file) => {\n res += '\\n' + indent + ' ' + file.fileName;\n });\n\n return res;\n }\n\n /**\n * Return a list of all reflections exposed by the files within this directory.\n *\n * @returns An aggregated list of all [[DeclarationReflection]] defined in the\n * files of this directory.\n */\n getAllReflections(): Reflection[] {\n const reflections: Reflection[] = [];\n this.files.forEach((file) => {\n reflections.push.apply(reflections, file.reflections);\n });\n\n // reflections.sort(Factories.GroupHandler.sortCallback);\n return reflections;\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/models/sources/file.js.map b/node_modules/typedoc/dist/lib/models/sources/file.js.map
index 8bf1b6d7c..7e5d6dea3 100644
--- a/node_modules/typedoc/dist/lib/models/sources/file.js.map
+++ b/node_modules/typedoc/dist/lib/models/sources/file.js.map
@@ -1 +1 @@
-{"version":3,"file":"file.js","sourceRoot":"","sources":["../../../../src/lib/models/sources/file.ts"],"names":[],"mappings":";;AAAA,2BAA6B;AA6C7B;IA0CI,oBAAY,YAAoB;QAZhC,gBAAW,GAAiB,EAAE,CAAC;QAa3B,IAAI,CAAC,QAAQ,GAAO,YAAY,CAAC;QACjC,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,IAAI,GAAW,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;IACpD,CAAC;IACL,iBAAC;AAAD,CAAC,AA/CD,IA+CC;AA/CY,gCAAU","sourcesContent":["import * as Path from 'path';\n\nimport {Reflection} from '../reflections/abstract';\nimport {ReflectionGroup} from '../ReflectionGroup';\nimport {SourceDirectory} from './directory';\n\n/**\n * Represents references of reflections to their defining source files.\n *\n * @see [[DeclarationReflection.sources]]\n */\nexport interface SourceReference {\n /**\n * A reference to the corresponding file instance.\n */\n file?: SourceFile;\n\n /**\n * The filename of the source file.\n */\n fileName: string;\n\n /**\n * The number of the line that emitted the declaration.\n */\n line: number;\n\n character: number;\n\n /**\n * URL for displaying the source file.\n */\n url?: string;\n}\n\n/**\n * Exposes information about a source file.\n *\n * One my access a list of all source files through the [[ProjectReflection.files]] property or as\n * a tree structure through the [[ProjectReflection.directory]] property.\n *\n * Furthermore each reflection carries references to the related SourceFile with their\n * [[DeclarationReflection.sources]] property. It is an array of of [[IDeclarationSource]] instances\n * containing the reference in their [[IDeclarationSource.file]] field.\n */\nexport class SourceFile {\n /**\n * The original full system file name.\n */\n fullFileName: string;\n\n /**\n * A trimmed version of the file name. Contains only the path relative to the\n * determined base path.\n */\n fileName: string;\n\n /**\n * The base name of the file.\n */\n name: string;\n\n /**\n * A url pointing to a page displaying the contents of this file.\n */\n url: string;\n\n /**\n * The representation of the parent directory of this source file.\n */\n parent: SourceDirectory;\n\n /**\n * A list of all reflections that are declared in this file.\n */\n reflections: Reflection[] = [];\n\n /**\n * A grouped list of the reflections declared in this file.\n */\n groups: ReflectionGroup[];\n\n /**\n * Create a new SourceFile instance.\n *\n * @param fullFileName The full file name.\n */\n constructor(fullFileName: string) {\n this.fileName = fullFileName;\n this.fullFileName = fullFileName;\n this.name = Path.basename(fullFileName);\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"file.js","sourceRoot":"","sources":["../../../../src/lib/models/sources/file.ts"],"names":[],"mappings":";;AAAA,2BAA6B;AA6C7B;IA0CI,oBAAY,YAAoB;QAZhC,gBAAW,GAAiB,EAAE,CAAC;QAa3B,IAAI,CAAC,QAAQ,GAAO,YAAY,CAAC;QACjC,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,IAAI,GAAW,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;IACpD,CAAC;IACL,iBAAC;AAAD,CAAC,AA/CD,IA+CC;AA/CY,gCAAU","sourcesContent":["import * as Path from 'path';\n\nimport { Reflection } from '../reflections/abstract';\nimport { ReflectionGroup } from '../ReflectionGroup';\nimport { SourceDirectory } from './directory';\n\n/**\n * Represents references of reflections to their defining source files.\n *\n * @see [[DeclarationReflection.sources]]\n */\nexport interface SourceReference {\n /**\n * A reference to the corresponding file instance.\n */\n file?: SourceFile;\n\n /**\n * The filename of the source file.\n */\n fileName: string;\n\n /**\n * The number of the line that emitted the declaration.\n */\n line: number;\n\n character: number;\n\n /**\n * URL for displaying the source file.\n */\n url?: string;\n}\n\n/**\n * Exposes information about a source file.\n *\n * One my access a list of all source files through the [[ProjectReflection.files]] property or as\n * a tree structure through the [[ProjectReflection.directory]] property.\n *\n * Furthermore each reflection carries references to the related SourceFile with their\n * [[DeclarationReflection.sources]] property. It is an array of of [[IDeclarationSource]] instances\n * containing the reference in their [[IDeclarationSource.file]] field.\n */\nexport class SourceFile {\n /**\n * The original full system file name.\n */\n fullFileName: string;\n\n /**\n * A trimmed version of the file name. Contains only the path relative to the\n * determined base path.\n */\n fileName: string;\n\n /**\n * The base name of the file.\n */\n name: string;\n\n /**\n * A url pointing to a page displaying the contents of this file.\n */\n url: string;\n\n /**\n * The representation of the parent directory of this source file.\n */\n parent: SourceDirectory;\n\n /**\n * A list of all reflections that are declared in this file.\n */\n reflections: Reflection[] = [];\n\n /**\n * A grouped list of the reflections declared in this file.\n */\n groups: ReflectionGroup[];\n\n /**\n * Create a new SourceFile instance.\n *\n * @param fullFileName The full file name.\n */\n constructor(fullFileName: string) {\n this.fileName = fullFileName;\n this.fullFileName = fullFileName;\n this.name = Path.basename(fullFileName);\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/models/sources/index.js.map b/node_modules/typedoc/dist/lib/models/sources/index.js.map
index e852f0389..066bdb9a3 100644
--- a/node_modules/typedoc/dist/lib/models/sources/index.js.map
+++ b/node_modules/typedoc/dist/lib/models/sources/index.js.map
@@ -1 +1 @@
-{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/models/sources/index.ts"],"names":[],"mappings":";;AAAA,yCAA4C;AAApC,sCAAA,eAAe,CAAA;AACvB,+BAAkC;AAA1B,4BAAA,UAAU,CAAA","sourcesContent":["export {SourceDirectory} from './directory';\nexport {SourceFile} from './file';\n"]} \ No newline at end of file
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/models/sources/index.ts"],"names":[],"mappings":";;AAAA,yCAA8C;AAArC,sCAAA,eAAe,CAAA;AACxB,+BAAoC;AAA3B,4BAAA,UAAU,CAAA","sourcesContent":["export { SourceDirectory } from './directory';\nexport { SourceFile } from './file';\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/models/types/array.js.map b/node_modules/typedoc/dist/lib/models/types/array.js.map
index 5cad50c3a..2c936161b 100644
--- a/node_modules/typedoc/dist/lib/models/types/array.js.map
+++ b/node_modules/typedoc/dist/lib/models/types/array.js.map
@@ -1 +1 @@
-{"version":3,"file":"array.js","sourceRoot":"","sources":["../../../../src/lib/models/types/array.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iCAA0D;AAS1D;IAA+B,6BAAI;IAiB/B,mBAAY,WAAiB;QAA7B,YACI,iBAAO,SAEV;QAVQ,UAAI,GAAW,OAAO,CAAC;QAS5B,KAAI,CAAC,WAAW,GAAG,WAAW,CAAC;;IACnC,CAAC;IAOD,yBAAK,GAAL;QACI,MAAM,CAAC,IAAI,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAC3C,CAAC;IAQD,0BAAM,GAAN,UAAO,IAAU;QACb,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,YAAY,SAAS,CAAC,CAAC,CAAC,CAAC;YAC/B,MAAM,CAAC,KAAK,CAAC;QACjB,CAAC;QACD,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IACrD,CAAC;IAKD,4BAAQ,GAAR;QACI,IAAM,MAAM,GAAQ,iBAAM,QAAQ,WAAE,CAAC;QACrC,MAAM,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC;QAEjD,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IAKD,4BAAQ,GAAR;QACI,IAAM,cAAc,GAAG,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC;QACnD,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,YAAY,iBAAS,IAAI,IAAI,CAAC,WAAW,YAAY,wBAAgB,CAAC,CAAC,CAAC;YACxF,MAAM,CAAC,GAAG,GAAG,cAAc,GAAG,KAAK,CAAC;QACxC,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,MAAM,CAAC,cAAc,GAAG,IAAI,CAAC;QACjC,CAAC;IACL,CAAC;IACL,gBAAC;AAAD,CAAC,AAjED,CAA+B,YAAI,GAiElC;AAjEY,8BAAS","sourcesContent":["import {Type, UnionType, IntersectionType} from './index';\n\n/**\n * Represents an array type.\n *\n * ~~~\n * let value: string[];\n * ~~~\n */\nexport class ArrayType extends Type {\n\n /**\n * The type of the array elements.\n */\n elementType: Type;\n\n /**\n * The type name identifier.\n */\n readonly type: string = 'array';\n\n /**\n * Create a new TupleType instance.\n *\n * @param elementType The type of the array's elements.\n */\n constructor(elementType: Type) {\n super();\n this.elementType = elementType;\n }\n\n /**\n * Clone this type.\n *\n * @return A clone of this type.\n */\n clone(): Type {\n return new ArrayType(this.elementType);\n }\n\n /**\n * Test whether this type equals the given type.\n *\n * @param type The type that should be checked for equality.\n * @returns TRUE if the given type equals this type, FALSE otherwise.\n */\n equals(type: Type): boolean {\n if (!(type instanceof ArrayType)) {\n return false;\n }\n return type.elementType.equals(this.elementType);\n }\n\n /**\n * Return a raw object representation of this type.\n */\n toObject(): any {\n const result: any = super.toObject();\n result.elementType = this.elementType.toObject();\n\n return result;\n }\n\n /**\n * Return a string representation of this type.\n */\n toString() {\n const elementTypeStr = this.elementType.toString();\n if (this.elementType instanceof UnionType || this.elementType instanceof IntersectionType) {\n return '(' + elementTypeStr + ')[]';\n } else {\n return elementTypeStr + '[]';\n }\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"array.js","sourceRoot":"","sources":["../../../../src/lib/models/types/array.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iCAA4D;AAS5D;IAA+B,6BAAI;IAiB/B,mBAAY,WAAiB;QAA7B,YACI,iBAAO,SAEV;QAVQ,UAAI,GAAW,OAAO,CAAC;QAS5B,KAAI,CAAC,WAAW,GAAG,WAAW,CAAC;;IACnC,CAAC;IAOD,yBAAK,GAAL;QACI,MAAM,CAAC,IAAI,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAC3C,CAAC;IAQD,0BAAM,GAAN,UAAO,IAAU;QACb,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,YAAY,SAAS,CAAC,CAAC,CAAC,CAAC;YAC/B,MAAM,CAAC,KAAK,CAAC;QACjB,CAAC;QACD,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IACrD,CAAC;IAKD,4BAAQ,GAAR;QACI,IAAM,MAAM,GAAQ,iBAAM,QAAQ,WAAE,CAAC;QACrC,MAAM,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC;QAEjD,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IAKD,4BAAQ,GAAR;QACI,IAAM,cAAc,GAAG,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC;QACnD,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,YAAY,iBAAS,IAAI,IAAI,CAAC,WAAW,YAAY,wBAAgB,CAAC,CAAC,CAAC;YACxF,MAAM,CAAC,GAAG,GAAG,cAAc,GAAG,KAAK,CAAC;QACxC,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,MAAM,CAAC,cAAc,GAAG,IAAI,CAAC;QACjC,CAAC;IACL,CAAC;IACL,gBAAC;AAAD,CAAC,AAjED,CAA+B,YAAI,GAiElC;AAjEY,8BAAS","sourcesContent":["import { Type, UnionType, IntersectionType } from './index';\n\n/**\n * Represents an array type.\n *\n * ~~~\n * let value: string[];\n * ~~~\n */\nexport class ArrayType extends Type {\n\n /**\n * The type of the array elements.\n */\n elementType: Type;\n\n /**\n * The type name identifier.\n */\n readonly type: string = 'array';\n\n /**\n * Create a new TupleType instance.\n *\n * @param elementType The type of the array's elements.\n */\n constructor(elementType: Type) {\n super();\n this.elementType = elementType;\n }\n\n /**\n * Clone this type.\n *\n * @return A clone of this type.\n */\n clone(): Type {\n return new ArrayType(this.elementType);\n }\n\n /**\n * Test whether this type equals the given type.\n *\n * @param type The type that should be checked for equality.\n * @returns TRUE if the given type equals this type, FALSE otherwise.\n */\n equals(type: Type): boolean {\n if (!(type instanceof ArrayType)) {\n return false;\n }\n return type.elementType.equals(this.elementType);\n }\n\n /**\n * Return a raw object representation of this type.\n */\n toObject(): any {\n const result: any = super.toObject();\n result.elementType = this.elementType.toObject();\n\n return result;\n }\n\n /**\n * Return a string representation of this type.\n */\n toString() {\n const elementTypeStr = this.elementType.toString();\n if (this.elementType instanceof UnionType || this.elementType instanceof IntersectionType) {\n return '(' + elementTypeStr + ')[]';\n } else {\n return elementTypeStr + '[]';\n }\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/models/types/index.js.map b/node_modules/typedoc/dist/lib/models/types/index.js.map
index eb352fac8..31858f642 100644
--- a/node_modules/typedoc/dist/lib/models/types/index.js.map
+++ b/node_modules/typedoc/dist/lib/models/types/index.js.map
@@ -1 +1 @@
-{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/models/types/index.ts"],"names":[],"mappings":";;AAAA,uCAAgC;AAAxB,0BAAA,IAAI,CAAA;AACZ,iCAAkC;AAA1B,4BAAA,SAAS,CAAA;AACjB,yCAA0C;AAAlC,oCAAA,aAAa,CAAA;AACrB,+CAAgD;AAAxC,0CAAA,gBAAgB,CAAA;AACxB,yCAA0C;AAAlC,oCAAA,aAAa,CAAA;AACrB,2CAA4C;AAApC,sCAAA,cAAc,CAAA;AACtB,mDAAmD;AAA3C,6CAAA,iBAAiB,CAAA;AACzB,iCAAkC;AAA1B,4BAAA,SAAS,CAAA;AACjB,mDAAmD;AAA3C,6CAAA,iBAAiB,CAAA;AACzB,iCAAkC;AAA1B,4BAAA,SAAS,CAAA;AACjB,qCAAsC;AAA9B,gCAAA,WAAW,CAAA","sourcesContent":["export {Type} from './abstract';\nexport {ArrayType} from './array';\nexport {IntrinsicType} from './intrinsic';\nexport {IntersectionType} from './intersection';\nexport {ReferenceType} from './reference';\nexport {ReflectionType} from './reflection';\nexport {StringLiteralType} from './string-literal';\nexport {TupleType} from './tuple';\nexport {TypeParameterType} from './type-parameter';\nexport {UnionType} from './union';\nexport {UnknownType} from './unknown';\n"]} \ No newline at end of file
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/models/types/index.ts"],"names":[],"mappings":";;AAAA,uCAAkC;AAAzB,0BAAA,IAAI,CAAA;AACb,iCAAoC;AAA3B,4BAAA,SAAS,CAAA;AAClB,yCAA4C;AAAnC,oCAAA,aAAa,CAAA;AACtB,+CAAkD;AAAzC,0CAAA,gBAAgB,CAAA;AACzB,yCAA4C;AAAnC,oCAAA,aAAa,CAAA;AACtB,2CAA8C;AAArC,sCAAA,cAAc,CAAA;AACvB,mDAAqD;AAA5C,6CAAA,iBAAiB,CAAA;AAC1B,iCAAoC;AAA3B,4BAAA,SAAS,CAAA;AAClB,mDAAqD;AAA5C,6CAAA,iBAAiB,CAAA;AAC1B,iCAAoC;AAA3B,4BAAA,SAAS,CAAA;AAClB,qCAAwC;AAA/B,gCAAA,WAAW,CAAA","sourcesContent":["export { Type } from './abstract';\nexport { ArrayType } from './array';\nexport { IntrinsicType } from './intrinsic';\nexport { IntersectionType } from './intersection';\nexport { ReferenceType } from './reference';\nexport { ReflectionType } from './reflection';\nexport { StringLiteralType } from './string-literal';\nexport { TupleType } from './tuple';\nexport { TypeParameterType } from './type-parameter';\nexport { UnionType } from './union';\nexport { UnknownType } from './unknown';\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/models/types/intersection.js.map b/node_modules/typedoc/dist/lib/models/types/intersection.js.map
index 259532b66..da64e5336 100644
--- a/node_modules/typedoc/dist/lib/models/types/intersection.js.map
+++ b/node_modules/typedoc/dist/lib/models/types/intersection.js.map
@@ -1 +1 @@
-{"version":3,"file":"intersection.js","sourceRoot":"","sources":["../../../../src/lib/models/types/intersection.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uCAAgC;AAShC;IAAsC,oCAAI;IAgBtC,0BAAY,KAAa;QAAzB,YACI,iBAAO,SAEV;QAVQ,UAAI,GAAW,cAAc,CAAC;QASnC,KAAI,CAAC,KAAK,GAAG,KAAK,CAAC;;IACvB,CAAC;IAOD,gCAAK,GAAL;QACI,MAAM,CAAC,IAAI,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC5C,CAAC;IAQD,iCAAM,GAAN,UAAO,IAAsB;QACzB,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,YAAY,gBAAgB,CAAC,CAAC,CAAC,CAAC;YACtC,MAAM,CAAC,KAAK,CAAC;QACjB,CAAC;QACD,MAAM,CAAC,eAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;IAC3D,CAAC;IAKD,mCAAQ,GAAR;QACI,IAAM,MAAM,GAAQ,iBAAM,QAAQ,WAAE,CAAC;QAErC,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;YAClC,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,QAAQ,EAAE,EAAZ,CAAY,CAAC,CAAC;QACvD,CAAC;QAED,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IAKD,mCAAQ,GAAR;QACI,IAAM,KAAK,GAAa,EAAE,CAAC;QAC3B,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,UAAC,OAAO;YACvB,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;QACnC,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC7B,CAAC;IACL,uBAAC;AAAD,CAAC,AAnED,CAAsC,eAAI,GAmEzC;AAnEY,4CAAgB","sourcesContent":["import {Type} from './abstract';\n\n/**\n * Represents an intersection type.\n *\n * ~~~\n * let value: A & B;\n * ~~~\n */\nexport class IntersectionType extends Type {\n /**\n * The types this union consists of.\n */\n types: Type[];\n\n /**\n * The type name identifier.\n */\n readonly type: string = 'intersection';\n\n /**\n * Create a new TupleType instance.\n *\n * @param types The types this union consists of.\n */\n constructor(types: Type[]) {\n super();\n this.types = types;\n }\n\n /**\n * Clone this type.\n *\n * @return A clone of this type.\n */\n clone(): Type {\n return new IntersectionType(this.types);\n }\n\n /**\n * Test whether this type equals the given type.\n *\n * @param type The type that should be checked for equality.\n * @returns TRUE if the given type equals this type, FALSE otherwise.\n */\n equals(type: IntersectionType): boolean {\n if (!(type instanceof IntersectionType)) {\n return false;\n }\n return Type.isTypeListSimiliar(type.types, this.types);\n }\n\n /**\n * Return a raw object representation of this type.\n */\n toObject(): any {\n const result: any = super.toObject();\n\n if (this.types && this.types.length) {\n result.types = this.types.map((e) => e.toObject());\n }\n\n return result;\n }\n\n /**\n * Return a string representation of this type.\n */\n toString() {\n const names: string[] = [];\n this.types.forEach((element) => {\n names.push(element.toString());\n });\n\n return names.join(' & ');\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"intersection.js","sourceRoot":"","sources":["../../../../src/lib/models/types/intersection.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uCAAkC;AASlC;IAAsC,oCAAI;IAgBtC,0BAAY,KAAa;QAAzB,YACI,iBAAO,SAEV;QAVQ,UAAI,GAAW,cAAc,CAAC;QASnC,KAAI,CAAC,KAAK,GAAG,KAAK,CAAC;;IACvB,CAAC;IAOD,gCAAK,GAAL;QACI,MAAM,CAAC,IAAI,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC5C,CAAC;IAQD,iCAAM,GAAN,UAAO,IAAsB;QACzB,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,YAAY,gBAAgB,CAAC,CAAC,CAAC,CAAC;YACtC,MAAM,CAAC,KAAK,CAAC;QACjB,CAAC;QACD,MAAM,CAAC,eAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;IAC3D,CAAC;IAKD,mCAAQ,GAAR;QACI,IAAM,MAAM,GAAQ,iBAAM,QAAQ,WAAE,CAAC;QAErC,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;YAClC,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,QAAQ,EAAE,EAAZ,CAAY,CAAC,CAAC;QACvD,CAAC;QAED,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IAKD,mCAAQ,GAAR;QACI,IAAM,KAAK,GAAa,EAAE,CAAC;QAC3B,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,UAAC,OAAO;YACvB,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;QACnC,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC7B,CAAC;IACL,uBAAC;AAAD,CAAC,AAnED,CAAsC,eAAI,GAmEzC;AAnEY,4CAAgB","sourcesContent":["import { Type } from './abstract';\n\n/**\n * Represents an intersection type.\n *\n * ~~~\n * let value: A & B;\n * ~~~\n */\nexport class IntersectionType extends Type {\n /**\n * The types this union consists of.\n */\n types: Type[];\n\n /**\n * The type name identifier.\n */\n readonly type: string = 'intersection';\n\n /**\n * Create a new TupleType instance.\n *\n * @param types The types this union consists of.\n */\n constructor(types: Type[]) {\n super();\n this.types = types;\n }\n\n /**\n * Clone this type.\n *\n * @return A clone of this type.\n */\n clone(): Type {\n return new IntersectionType(this.types);\n }\n\n /**\n * Test whether this type equals the given type.\n *\n * @param type The type that should be checked for equality.\n * @returns TRUE if the given type equals this type, FALSE otherwise.\n */\n equals(type: IntersectionType): boolean {\n if (!(type instanceof IntersectionType)) {\n return false;\n }\n return Type.isTypeListSimiliar(type.types, this.types);\n }\n\n /**\n * Return a raw object representation of this type.\n */\n toObject(): any {\n const result: any = super.toObject();\n\n if (this.types && this.types.length) {\n result.types = this.types.map((e) => e.toObject());\n }\n\n return result;\n }\n\n /**\n * Return a string representation of this type.\n */\n toString() {\n const names: string[] = [];\n this.types.forEach((element) => {\n names.push(element.toString());\n });\n\n return names.join(' & ');\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/models/types/intrinsic.js.map b/node_modules/typedoc/dist/lib/models/types/intrinsic.js.map
index 58d836e73..6fcc64669 100644
--- a/node_modules/typedoc/dist/lib/models/types/intrinsic.js.map
+++ b/node_modules/typedoc/dist/lib/models/types/intrinsic.js.map
@@ -1 +1 @@
-{"version":3,"file":"intrinsic.js","sourceRoot":"","sources":["../../../../src/lib/models/types/intrinsic.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uCAAgC;AAShC;IAAmC,iCAAI;IAgBnC,uBAAY,IAAY;QAAxB,YACI,iBAAO,SAEV;QAVQ,UAAI,GAAW,WAAW,CAAC;QAShC,KAAI,CAAC,IAAI,GAAG,IAAI,CAAC;;IACrB,CAAC;IAOD,6BAAK,GAAL;QACI,MAAM,CAAC,IAAI,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACxC,CAAC;IAQD,8BAAM,GAAN,UAAO,IAAmB;QACtB,MAAM,CAAC,IAAI,YAAY,aAAa;YAChC,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,CAAC;IAChC,CAAC;IAKD,gCAAQ,GAAR;QACI,IAAM,MAAM,GAAQ,iBAAM,QAAQ,WAAE,CAAC;QACrC,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACxB,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IAKD,gCAAQ,GAAR;QACI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;IACrB,CAAC;IACL,oBAAC;AAAD,CAAC,AAxDD,CAAmC,eAAI,GAwDtC;AAxDY,sCAAa","sourcesContent":["import {Type} from './abstract';\n\n/**\n * Represents an intrinsic type like `string` or `boolean`.\n *\n * ~~~\n * let value: number;\n * ~~~\n */\nexport class IntrinsicType extends Type {\n /**\n * The name of the intrinsic type like `string` or `boolean`.\n */\n name: string;\n\n /**\n * The type name identifier.\n */\n readonly type: string = 'intrinsic';\n\n /**\n * Create a new instance of IntrinsicType.\n *\n * @param name The name of the intrinsic type like `string` or `boolean`.\n */\n constructor(name: string) {\n super();\n this.name = name;\n }\n\n /**\n * Clone this type.\n *\n * @return A clone of this type.\n */\n clone(): Type {\n return new IntrinsicType(this.name);\n }\n\n /**\n * Test whether this type equals the given type.\n *\n * @param type The type that should be checked for equality.\n * @returns TRUE if the given type equals this type, FALSE otherwise.\n */\n equals(type: IntrinsicType): boolean {\n return type instanceof IntrinsicType &&\n type.name === this.name;\n }\n\n /**\n * Return a raw object representation of this type.\n */\n toObject(): any {\n const result: any = super.toObject();\n result.name = this.name;\n return result;\n }\n\n /**\n * Return a string representation of this type.\n */\n toString() {\n return this.name;\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"intrinsic.js","sourceRoot":"","sources":["../../../../src/lib/models/types/intrinsic.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uCAAkC;AASlC;IAAmC,iCAAI;IAgBnC,uBAAY,IAAY;QAAxB,YACI,iBAAO,SAEV;QAVQ,UAAI,GAAW,WAAW,CAAC;QAShC,KAAI,CAAC,IAAI,GAAG,IAAI,CAAC;;IACrB,CAAC;IAOD,6BAAK,GAAL;QACI,MAAM,CAAC,IAAI,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACxC,CAAC;IAQD,8BAAM,GAAN,UAAO,IAAmB;QACtB,MAAM,CAAC,IAAI,YAAY,aAAa;YAChC,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,CAAC;IAChC,CAAC;IAKD,gCAAQ,GAAR;QACI,IAAM,MAAM,GAAQ,iBAAM,QAAQ,WAAE,CAAC;QACrC,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACxB,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IAKD,gCAAQ,GAAR;QACI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;IACrB,CAAC;IACL,oBAAC;AAAD,CAAC,AAxDD,CAAmC,eAAI,GAwDtC;AAxDY,sCAAa","sourcesContent":["import { Type } from './abstract';\n\n/**\n * Represents an intrinsic type like `string` or `boolean`.\n *\n * ~~~\n * let value: number;\n * ~~~\n */\nexport class IntrinsicType extends Type {\n /**\n * The name of the intrinsic type like `string` or `boolean`.\n */\n name: string;\n\n /**\n * The type name identifier.\n */\n readonly type: string = 'intrinsic';\n\n /**\n * Create a new instance of IntrinsicType.\n *\n * @param name The name of the intrinsic type like `string` or `boolean`.\n */\n constructor(name: string) {\n super();\n this.name = name;\n }\n\n /**\n * Clone this type.\n *\n * @return A clone of this type.\n */\n clone(): Type {\n return new IntrinsicType(this.name);\n }\n\n /**\n * Test whether this type equals the given type.\n *\n * @param type The type that should be checked for equality.\n * @returns TRUE if the given type equals this type, FALSE otherwise.\n */\n equals(type: IntrinsicType): boolean {\n return type instanceof IntrinsicType &&\n type.name === this.name;\n }\n\n /**\n * Return a raw object representation of this type.\n */\n toObject(): any {\n const result: any = super.toObject();\n result.name = this.name;\n return result;\n }\n\n /**\n * Return a string representation of this type.\n */\n toString() {\n return this.name;\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/models/types/reference.js b/node_modules/typedoc/dist/lib/models/types/reference.js
index 2bcc98201..480877287 100644
--- a/node_modules/typedoc/dist/lib/models/types/reference.js
+++ b/node_modules/typedoc/dist/lib/models/types/reference.js
@@ -51,9 +51,9 @@ var ReferenceType = (function (_super) {
}
return name + typeArgs;
};
+ ReferenceType.SYMBOL_ID_RESOLVED = -1;
+ ReferenceType.SYMBOL_ID_RESOLVE_BY_NAME = -2;
return ReferenceType;
}(abstract_1.Type));
-ReferenceType.SYMBOL_ID_RESOLVED = -1;
-ReferenceType.SYMBOL_ID_RESOLVE_BY_NAME = -2;
exports.ReferenceType = ReferenceType;
//# sourceMappingURL=reference.js.map \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/models/types/reference.js.map b/node_modules/typedoc/dist/lib/models/types/reference.js.map
index c8aea7bb3..2947e04ba 100644
--- a/node_modules/typedoc/dist/lib/models/types/reference.js.map
+++ b/node_modules/typedoc/dist/lib/models/types/reference.js.map
@@ -1 +1 @@
-{"version":3,"file":"reference.js","sourceRoot":"","sources":["../../../../src/lib/models/types/reference.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,uCAAgC;AAShC;IAAmC,iCAAI;IAmDnC,uBAAY,IAAY,EAAE,QAAgB,EAAE,UAAuB;QAAnE,YACI,iBAAO,SAIV;QApDQ,UAAI,GAAW,WAAW,CAAC;QAiDhC,KAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,KAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,KAAI,CAAC,UAAU,GAAG,UAAU,CAAC;;IACjC,CAAC;IAOD,6BAAK,GAAL;QACI,IAAM,KAAK,GAAG,IAAI,aAAa,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QAC3E,KAAK,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC;QACzC,MAAM,CAAC,KAAK,CAAC;IACjB,CAAC;IAQD,8BAAM,GAAN,UAAO,IAAmB;QACtB,MAAM,CAAC,IAAI,YAAY,aAAa;YAChC,CAAC,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,UAAU,KAAK,IAAI,CAAC,UAAU,CAAC,CAAC;IACjF,CAAC;IAKD,gCAAQ,GAAR;QACI,IAAM,MAAM,GAAQ,iBAAM,QAAQ,WAAE,CAAC;QACrC,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QAExB,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;YAClB,MAAM,CAAC,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC;QACnC,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;YACrB,MAAM,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,QAAQ,EAAE,EAAZ,CAAY,CAAC,CAAC;QACvE,CAAC;QAED,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IAMD,gCAAQ,GAAR;QACI,IAAM,IAAI,GAAG,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QAChE,IAAI,QAAQ,GAAG,EAAE,CAAC;QAClB,EAAE,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;YACrB,QAAQ,IAAI,GAAG,CAAC;YAChB,QAAQ,IAAI,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,UAAA,GAAG,IAAI,OAAA,GAAG,CAAC,QAAQ,EAAE,EAAd,CAAc,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACrE,QAAQ,IAAI,GAAG,CAAC;QACpB,CAAC;QAED,MAAM,CAAC,IAAI,GAAG,QAAQ,CAAC;IAC3B,CAAC;IACL,oBAAC;AAAD,CAAC,AAjHD,CAAmC,eAAI;AAqC5B,gCAAkB,GAAW,CAAC,CAAC,CAAC;AAKhC,uCAAyB,GAAW,CAAC,CAAC,CAAC;AA1CrC,sCAAa","sourcesContent":["import {Reflection} from '../reflections/abstract';\nimport {Type} from './abstract';\n\n/**\n * Represents a type that refers to another reflection like a class, interface or enum.\n *\n * ~~~\n * let value: MyClass;\n * ~~~\n */\nexport class ReferenceType extends Type {\n /**\n * The type name identifier.\n */\n readonly type: string = 'reference';\n\n /**\n * The name of the referenced type.\n *\n * If the symbol cannot be found cause it's not part of the documentation this\n * can be used to represent the type.\n */\n name: string;\n\n /**\n * The type arguments of this reference.\n */\n typeArguments: Type[];\n\n /**\n * The symbol id of the referenced type as returned from the TypeScript compiler.\n *\n * After the all reflections have been generated this is can be used to lookup the\n * relevant reflection with [[ProjectReflection.symbolMapping]].\n */\n symbolID: number;\n\n /**\n * The resolved reflection.\n *\n * The [[TypePlugin]] will try to set this property in the resolving phase.\n */\n reflection: Reflection;\n\n /**\n * Special symbol ID noting that the reference of a ReferenceType was known when creating the type.\n */\n static SYMBOL_ID_RESOLVED: number = -1;\n\n /**\n * Special symbol ID noting that the reference should be resolved by the type name.\n */\n static SYMBOL_ID_RESOLVE_BY_NAME: number = -2;\n\n /**\n * Create a new instance of ReferenceType.\n *\n * @param name The name of the referenced type.\n * @param symbolID The symbol id of the referenced type as returned from the TypeScript compiler.\n * @param reflection The resolved reflection if already known.\n */\n constructor(name: string, symbolID: number, reflection?: Reflection) {\n super();\n this.name = name;\n this.symbolID = symbolID;\n this.reflection = reflection;\n }\n\n /**\n * Clone this type.\n *\n * @return A clone of this type.\n */\n clone(): Type {\n const clone = new ReferenceType(this.name, this.symbolID, this.reflection);\n clone.typeArguments = this.typeArguments;\n return clone;\n }\n\n /**\n * Test whether this type equals the given type.\n *\n * @param type The type that should be checked for equality.\n * @returns TRUE if the given type equals this type, FALSE otherwise.\n */\n equals(type: ReferenceType): boolean {\n return type instanceof ReferenceType &&\n (type.symbolID === this.symbolID || type.reflection === this.reflection);\n }\n\n /**\n * Return a raw object representation of this type.\n */\n toObject(): any {\n const result: any = super.toObject();\n result.name = this.name;\n\n if (this.reflection) {\n result.id = this.reflection.id;\n }\n\n if (this.typeArguments) {\n result.typeArguments = this.typeArguments.map((t) => t.toObject());\n }\n\n return result;\n }\n\n /**\n * Return a string representation of this type.\n * @example EventEmitter<any>\n */\n toString() {\n const name = this.reflection ? this.reflection.name : this.name;\n let typeArgs = '';\n if (this.typeArguments) {\n typeArgs += '<';\n typeArgs += this.typeArguments.map(arg => arg.toString()).join(', ');\n typeArgs += '>';\n }\n\n return name + typeArgs;\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"reference.js","sourceRoot":"","sources":["../../../../src/lib/models/types/reference.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,uCAAkC;AASlC;IAAmC,iCAAI;IAmDnC,uBAAY,IAAY,EAAE,QAAgB,EAAE,UAAuB;QAAnE,YACI,iBAAO,SAIV;QApDQ,UAAI,GAAW,WAAW,CAAC;QAiDhC,KAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,KAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,KAAI,CAAC,UAAU,GAAG,UAAU,CAAC;;IACjC,CAAC;IAOD,6BAAK,GAAL;QACI,IAAM,KAAK,GAAG,IAAI,aAAa,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QAC3E,KAAK,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC;QACzC,MAAM,CAAC,KAAK,CAAC;IACjB,CAAC;IAQD,8BAAM,GAAN,UAAO,IAAmB;QACtB,MAAM,CAAC,IAAI,YAAY,aAAa;YAChC,CAAC,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,UAAU,KAAK,IAAI,CAAC,UAAU,CAAC,CAAC;IACjF,CAAC;IAKD,gCAAQ,GAAR;QACI,IAAM,MAAM,GAAQ,iBAAM,QAAQ,WAAE,CAAC;QACrC,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QAExB,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;YAClB,MAAM,CAAC,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC;QACnC,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;YACrB,MAAM,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,QAAQ,EAAE,EAAZ,CAAY,CAAC,CAAC;QACvE,CAAC;QAED,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IAMD,gCAAQ,GAAR;QACI,IAAM,IAAI,GAAG,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QAChE,IAAI,QAAQ,GAAG,EAAE,CAAC;QAClB,EAAE,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;YACrB,QAAQ,IAAI,GAAG,CAAC;YAChB,QAAQ,IAAI,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,UAAA,GAAG,IAAI,OAAA,GAAG,CAAC,QAAQ,EAAE,EAAd,CAAc,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACrE,QAAQ,IAAI,GAAG,CAAC;QACpB,CAAC;QAED,MAAM,CAAC,IAAI,GAAG,QAAQ,CAAC;IAC3B,CAAC;IA3EM,gCAAkB,GAAW,CAAC,CAAC,CAAC;IAKhC,uCAAyB,GAAW,CAAC,CAAC,CAAC;IAuElD,oBAAC;CAAA,AAjHD,CAAmC,eAAI,GAiHtC;AAjHY,sCAAa","sourcesContent":["import { Reflection } from '../reflections/abstract';\nimport { Type } from './abstract';\n\n/**\n * Represents a type that refers to another reflection like a class, interface or enum.\n *\n * ~~~\n * let value: MyClass;\n * ~~~\n */\nexport class ReferenceType extends Type {\n /**\n * The type name identifier.\n */\n readonly type: string = 'reference';\n\n /**\n * The name of the referenced type.\n *\n * If the symbol cannot be found cause it's not part of the documentation this\n * can be used to represent the type.\n */\n name: string;\n\n /**\n * The type arguments of this reference.\n */\n typeArguments: Type[];\n\n /**\n * The symbol id of the referenced type as returned from the TypeScript compiler.\n *\n * After the all reflections have been generated this is can be used to lookup the\n * relevant reflection with [[ProjectReflection.symbolMapping]].\n */\n symbolID: number;\n\n /**\n * The resolved reflection.\n *\n * The [[TypePlugin]] will try to set this property in the resolving phase.\n */\n reflection: Reflection;\n\n /**\n * Special symbol ID noting that the reference of a ReferenceType was known when creating the type.\n */\n static SYMBOL_ID_RESOLVED: number = -1;\n\n /**\n * Special symbol ID noting that the reference should be resolved by the type name.\n */\n static SYMBOL_ID_RESOLVE_BY_NAME: number = -2;\n\n /**\n * Create a new instance of ReferenceType.\n *\n * @param name The name of the referenced type.\n * @param symbolID The symbol id of the referenced type as returned from the TypeScript compiler.\n * @param reflection The resolved reflection if already known.\n */\n constructor(name: string, symbolID: number, reflection?: Reflection) {\n super();\n this.name = name;\n this.symbolID = symbolID;\n this.reflection = reflection;\n }\n\n /**\n * Clone this type.\n *\n * @return A clone of this type.\n */\n clone(): Type {\n const clone = new ReferenceType(this.name, this.symbolID, this.reflection);\n clone.typeArguments = this.typeArguments;\n return clone;\n }\n\n /**\n * Test whether this type equals the given type.\n *\n * @param type The type that should be checked for equality.\n * @returns TRUE if the given type equals this type, FALSE otherwise.\n */\n equals(type: ReferenceType): boolean {\n return type instanceof ReferenceType &&\n (type.symbolID === this.symbolID || type.reflection === this.reflection);\n }\n\n /**\n * Return a raw object representation of this type.\n */\n toObject(): any {\n const result: any = super.toObject();\n result.name = this.name;\n\n if (this.reflection) {\n result.id = this.reflection.id;\n }\n\n if (this.typeArguments) {\n result.typeArguments = this.typeArguments.map((t) => t.toObject());\n }\n\n return result;\n }\n\n /**\n * Return a string representation of this type.\n * @example EventEmitter<any>\n */\n toString() {\n const name = this.reflection ? this.reflection.name : this.name;\n let typeArgs = '';\n if (this.typeArguments) {\n typeArgs += '<';\n typeArgs += this.typeArguments.map(arg => arg.toString()).join(', ');\n typeArgs += '>';\n }\n\n return name + typeArgs;\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/models/types/reflection.js.map b/node_modules/typedoc/dist/lib/models/types/reflection.js.map
index 2b0cac788..5ba8af2a4 100644
--- a/node_modules/typedoc/dist/lib/models/types/reflection.js.map
+++ b/node_modules/typedoc/dist/lib/models/types/reflection.js.map
@@ -1 +1 @@
-{"version":3,"file":"reflection.js","sourceRoot":"","sources":["../../../../src/lib/models/types/reflection.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,uCAAgC;AAShC;IAAoC,kCAAI;IAgBpC,wBAAY,WAAkC;QAA9C,YACI,iBAAO,SAEV;QAVQ,UAAI,GAAW,YAAY,CAAC;QASjC,KAAI,CAAC,WAAW,GAAG,WAAW,CAAC;;IACnC,CAAC;IAOD,8BAAK,GAAL;QACI,MAAM,CAAC,IAAI,cAAc,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAChD,CAAC;IAQD,+BAAM,GAAN,UAAO,IAAoB;QACvB,MAAM,CAAC,IAAI,KAAK,IAAI,CAAC;IACzB,CAAC;IAKD,iCAAQ,GAAR;QACI,IAAM,MAAM,GAAQ,iBAAM,QAAQ,WAAE,CAAC;QAErC,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;YACnB,MAAM,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC;QACrD,CAAC;QAED,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IAKD,iCAAQ,GAAR;QACI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,IAAI,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC;YAC5D,MAAM,CAAC,UAAU,CAAC;QACtB,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,MAAM,CAAC,QAAQ,CAAC;QACpB,CAAC;IACL,CAAC;IACL,qBAAC;AAAD,CAAC,AA/DD,CAAoC,eAAI,GA+DvC;AA/DY,wCAAc","sourcesContent":["import {DeclarationReflection} from '../reflections/declaration';\nimport {Type} from './abstract';\n\n/**\n * Represents a type which has it's own reflection like literal types.\n *\n * ~~~\n * let value: {subValueA;subValueB;subValueC;};\n * ~~~\n */\nexport class ReflectionType extends Type {\n /**\n * The reflection of the type.\n */\n declaration: DeclarationReflection;\n\n /**\n * The type name identifier.\n */\n readonly type: string = 'reflection';\n\n /**\n * Create a new instance of ReflectionType.\n *\n * @param declaration The reflection of the type.\n */\n constructor(declaration: DeclarationReflection) {\n super();\n this.declaration = declaration;\n }\n\n /**\n * Clone this type.\n *\n * @return A clone of this type.\n */\n clone(): Type {\n return new ReflectionType(this.declaration);\n }\n\n /**\n * Test whether this type equals the given type.\n *\n * @param type The type that should be checked for equality.\n * @returns TRUE if the given type equals this type, FALSE otherwise.\n */\n equals(type: ReflectionType): boolean {\n return type === this;\n }\n\n /**\n * Return a raw object representation of this type.\n */\n toObject(): any {\n const result: any = super.toObject();\n\n if (this.declaration) {\n result.declaration = this.declaration.toObject();\n }\n\n return result;\n }\n\n /**\n * Return a string representation of this type.\n */\n toString() {\n if (!this.declaration.children && this.declaration.signatures) {\n return 'function';\n } else {\n return 'object';\n }\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"reflection.js","sourceRoot":"","sources":["../../../../src/lib/models/types/reflection.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,uCAAkC;AASlC;IAAoC,kCAAI;IAgBpC,wBAAY,WAAkC;QAA9C,YACI,iBAAO,SAEV;QAVQ,UAAI,GAAW,YAAY,CAAC;QASjC,KAAI,CAAC,WAAW,GAAG,WAAW,CAAC;;IACnC,CAAC;IAOD,8BAAK,GAAL;QACI,MAAM,CAAC,IAAI,cAAc,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAChD,CAAC;IAQD,+BAAM,GAAN,UAAO,IAAoB;QACvB,MAAM,CAAC,IAAI,KAAK,IAAI,CAAC;IACzB,CAAC;IAKD,iCAAQ,GAAR;QACI,IAAM,MAAM,GAAQ,iBAAM,QAAQ,WAAE,CAAC;QAErC,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;YACnB,MAAM,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC;QACrD,CAAC;QAED,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IAKD,iCAAQ,GAAR;QACI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,IAAI,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC;YAC5D,MAAM,CAAC,UAAU,CAAC;QACtB,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,MAAM,CAAC,QAAQ,CAAC;QACpB,CAAC;IACL,CAAC;IACL,qBAAC;AAAD,CAAC,AA/DD,CAAoC,eAAI,GA+DvC;AA/DY,wCAAc","sourcesContent":["import { DeclarationReflection } from '../reflections/declaration';\nimport { Type } from './abstract';\n\n/**\n * Represents a type which has it's own reflection like literal types.\n *\n * ~~~\n * let value: {subValueA;subValueB;subValueC;};\n * ~~~\n */\nexport class ReflectionType extends Type {\n /**\n * The reflection of the type.\n */\n declaration: DeclarationReflection;\n\n /**\n * The type name identifier.\n */\n readonly type: string = 'reflection';\n\n /**\n * Create a new instance of ReflectionType.\n *\n * @param declaration The reflection of the type.\n */\n constructor(declaration: DeclarationReflection) {\n super();\n this.declaration = declaration;\n }\n\n /**\n * Clone this type.\n *\n * @return A clone of this type.\n */\n clone(): Type {\n return new ReflectionType(this.declaration);\n }\n\n /**\n * Test whether this type equals the given type.\n *\n * @param type The type that should be checked for equality.\n * @returns TRUE if the given type equals this type, FALSE otherwise.\n */\n equals(type: ReflectionType): boolean {\n return type === this;\n }\n\n /**\n * Return a raw object representation of this type.\n */\n toObject(): any {\n const result: any = super.toObject();\n\n if (this.declaration) {\n result.declaration = this.declaration.toObject();\n }\n\n return result;\n }\n\n /**\n * Return a string representation of this type.\n */\n toString() {\n if (!this.declaration.children && this.declaration.signatures) {\n return 'function';\n } else {\n return 'object';\n }\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/models/types/string-literal.js.map b/node_modules/typedoc/dist/lib/models/types/string-literal.js.map
index ec84eda6b..27cbab67f 100644
--- a/node_modules/typedoc/dist/lib/models/types/string-literal.js.map
+++ b/node_modules/typedoc/dist/lib/models/types/string-literal.js.map
@@ -1 +1 @@
-{"version":3,"file":"string-literal.js","sourceRoot":"","sources":["../../../../src/lib/models/types/string-literal.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uCAAgC;AAShC;IAAuC,qCAAI;IAgBvC,2BAAY,KAAa;QAAzB,YACI,iBAAO,SAEV;QAVQ,UAAI,GAAW,eAAe,CAAC;QASpC,KAAI,CAAC,KAAK,GAAG,KAAK,CAAC;;IACvB,CAAC;IAOD,iCAAK,GAAL;QACI,MAAM,CAAC,IAAI,iBAAiB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC7C,CAAC;IAQD,kCAAM,GAAN,UAAO,IAAuB;QAC1B,MAAM,CAAC,IAAI,YAAY,iBAAiB;YACpC,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,KAAK,CAAC;IAClC,CAAC;IAKD,oCAAQ,GAAR;QACI,IAAM,MAAM,GAAQ,iBAAM,QAAQ,WAAE,CAAC;QACrC,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QAC1B,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IAKD,oCAAQ,GAAR;QACI,MAAM,CAAC,GAAG,GAAG,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC;IAClC,CAAC;IACL,wBAAC;AAAD,CAAC,AAxDD,CAAuC,eAAI,GAwD1C;AAxDY,8CAAiB","sourcesContent":["import {Type} from './abstract';\n\n/**\n * Represents a string literal type.\n *\n * ~~~\n * let value: \"DIV\";\n * ~~~\n */\nexport class StringLiteralType extends Type {\n /**\n * The string literal value.\n */\n value: string;\n\n /**\n * The type name identifier.\n */\n readonly type: string = 'stringLiteral';\n\n /**\n * Create a new instance of StringLiteralType.\n *\n * @param value The string literal value.\n */\n constructor(value: string) {\n super();\n this.value = value;\n }\n\n /**\n * Clone this type.\n *\n * @return A clone of this type.\n */\n clone(): Type {\n return new StringLiteralType(this.value);\n }\n\n /**\n * Test whether this type equals the given type.\n *\n * @param type The type that should be checked for equality.\n * @returns TRUE if the given type equals this type, FALSE otherwise.\n */\n equals(type: StringLiteralType): boolean {\n return type instanceof StringLiteralType &&\n type.value === this.value;\n }\n\n /**\n * Return a raw object representation of this type.\n */\n toObject(): any {\n const result: any = super.toObject();\n result.value = this.value;\n return result;\n }\n\n /**\n * Return a string representation of this type.\n */\n toString(): string {\n return '\"' + this.value + '\"';\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"string-literal.js","sourceRoot":"","sources":["../../../../src/lib/models/types/string-literal.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uCAAkC;AASlC;IAAuC,qCAAI;IAgBvC,2BAAY,KAAa;QAAzB,YACI,iBAAO,SAEV;QAVQ,UAAI,GAAW,eAAe,CAAC;QASpC,KAAI,CAAC,KAAK,GAAG,KAAK,CAAC;;IACvB,CAAC;IAOD,iCAAK,GAAL;QACI,MAAM,CAAC,IAAI,iBAAiB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC7C,CAAC;IAQD,kCAAM,GAAN,UAAO,IAAuB;QAC1B,MAAM,CAAC,IAAI,YAAY,iBAAiB;YACpC,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,KAAK,CAAC;IAClC,CAAC;IAKD,oCAAQ,GAAR;QACI,IAAM,MAAM,GAAQ,iBAAM,QAAQ,WAAE,CAAC;QACrC,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QAC1B,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IAKD,oCAAQ,GAAR;QACI,MAAM,CAAC,GAAG,GAAG,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC;IAClC,CAAC;IACL,wBAAC;AAAD,CAAC,AAxDD,CAAuC,eAAI,GAwD1C;AAxDY,8CAAiB","sourcesContent":["import { Type } from './abstract';\n\n/**\n * Represents a string literal type.\n *\n * ~~~\n * let value: \"DIV\";\n * ~~~\n */\nexport class StringLiteralType extends Type {\n /**\n * The string literal value.\n */\n value: string;\n\n /**\n * The type name identifier.\n */\n readonly type: string = 'stringLiteral';\n\n /**\n * Create a new instance of StringLiteralType.\n *\n * @param value The string literal value.\n */\n constructor(value: string) {\n super();\n this.value = value;\n }\n\n /**\n * Clone this type.\n *\n * @return A clone of this type.\n */\n clone(): Type {\n return new StringLiteralType(this.value);\n }\n\n /**\n * Test whether this type equals the given type.\n *\n * @param type The type that should be checked for equality.\n * @returns TRUE if the given type equals this type, FALSE otherwise.\n */\n equals(type: StringLiteralType): boolean {\n return type instanceof StringLiteralType &&\n type.value === this.value;\n }\n\n /**\n * Return a raw object representation of this type.\n */\n toObject(): any {\n const result: any = super.toObject();\n result.value = this.value;\n return result;\n }\n\n /**\n * Return a string representation of this type.\n */\n toString(): string {\n return '\"' + this.value + '\"';\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/models/types/tuple.js.map b/node_modules/typedoc/dist/lib/models/types/tuple.js.map
index 93e1ea055..c5ead7247 100644
--- a/node_modules/typedoc/dist/lib/models/types/tuple.js.map
+++ b/node_modules/typedoc/dist/lib/models/types/tuple.js.map
@@ -1 +1 @@
-{"version":3,"file":"tuple.js","sourceRoot":"","sources":["../../../../src/lib/models/types/tuple.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uCAAgC;AAShC;IAA+B,6BAAI;IAgB/B,mBAAY,QAAgB;QAA5B,YACI,iBAAO,SAEV;QAVQ,UAAI,GAAW,OAAO,CAAC;QAS5B,KAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;;IAC7B,CAAC;IAOD,yBAAK,GAAL;QACI,MAAM,CAAC,IAAI,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACxC,CAAC;IAQD,0BAAM,GAAN,UAAO,IAAe;QAClB,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,YAAY,SAAS,CAAC,CAAC,CAAC,CAAC;YAC/B,MAAM,CAAC,KAAK,CAAC;QACjB,CAAC;QACD,MAAM,CAAC,eAAI,CAAC,eAAe,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC9D,CAAC;IAKD,4BAAQ,GAAR;QACI,IAAM,MAAM,GAAQ,iBAAM,QAAQ,WAAE,CAAC;QAErC,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;YACxC,MAAM,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,QAAQ,EAAE,EAAZ,CAAY,CAAC,CAAC;QAC7D,CAAC;QAED,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IAKD,4BAAQ,GAAR;QACI,IAAM,KAAK,GAAa,EAAE,CAAC;QAC3B,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAC,OAAO;YAC1B,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;QACnC,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,GAAG,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC;IACxC,CAAC;IACL,gBAAC;AAAD,CAAC,AAnED,CAA+B,eAAI,GAmElC;AAnEY,8BAAS","sourcesContent":["import {Type} from './abstract';\n\n/**\n * Represents a tuple type.\n *\n * ~~~\n * let value: [string,boolean];\n * ~~~\n */\nexport class TupleType extends Type {\n /**\n * The ordered type elements of the tuple type.\n */\n elements: Type[];\n\n /**\n * The type name identifier.\n */\n readonly type: string = 'tuple';\n\n /**\n * Create a new TupleType instance.\n *\n * @param elements The ordered type elements of the tuple type.\n */\n constructor(elements: Type[]) {\n super();\n this.elements = elements;\n }\n\n /**\n * Clone this type.\n *\n * @return A clone of this type.\n */\n clone(): Type {\n return new TupleType(this.elements);\n }\n\n /**\n * Test whether this type equals the given type.\n *\n * @param type The type that should be checked for equality.\n * @returns TRUE if the given type equals this type, FALSE otherwise.\n */\n equals(type: TupleType): boolean {\n if (!(type instanceof TupleType)) {\n return false;\n }\n return Type.isTypeListEqual(type.elements, this.elements);\n }\n\n /**\n * Return a raw object representation of this type.\n */\n toObject(): any {\n const result: any = super.toObject();\n\n if (this.elements && this.elements.length) {\n result.elements = this.elements.map((e) => e.toObject());\n }\n\n return result;\n }\n\n /**\n * Return a string representation of this type.\n */\n toString() {\n const names: string[] = [];\n this.elements.forEach((element) => {\n names.push(element.toString());\n });\n\n return '[' + names.join(', ') + ']';\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"tuple.js","sourceRoot":"","sources":["../../../../src/lib/models/types/tuple.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uCAAkC;AASlC;IAA+B,6BAAI;IAgB/B,mBAAY,QAAgB;QAA5B,YACI,iBAAO,SAEV;QAVQ,UAAI,GAAW,OAAO,CAAC;QAS5B,KAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;;IAC7B,CAAC;IAOD,yBAAK,GAAL;QACI,MAAM,CAAC,IAAI,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACxC,CAAC;IAQD,0BAAM,GAAN,UAAO,IAAe;QAClB,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,YAAY,SAAS,CAAC,CAAC,CAAC,CAAC;YAC/B,MAAM,CAAC,KAAK,CAAC;QACjB,CAAC;QACD,MAAM,CAAC,eAAI,CAAC,eAAe,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC9D,CAAC;IAKD,4BAAQ,GAAR;QACI,IAAM,MAAM,GAAQ,iBAAM,QAAQ,WAAE,CAAC;QAErC,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;YACxC,MAAM,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,QAAQ,EAAE,EAAZ,CAAY,CAAC,CAAC;QAC7D,CAAC;QAED,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IAKD,4BAAQ,GAAR;QACI,IAAM,KAAK,GAAa,EAAE,CAAC;QAC3B,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAC,OAAO;YAC1B,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;QACnC,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,GAAG,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC;IACxC,CAAC;IACL,gBAAC;AAAD,CAAC,AAnED,CAA+B,eAAI,GAmElC;AAnEY,8BAAS","sourcesContent":["import { Type } from './abstract';\n\n/**\n * Represents a tuple type.\n *\n * ~~~\n * let value: [string,boolean];\n * ~~~\n */\nexport class TupleType extends Type {\n /**\n * The ordered type elements of the tuple type.\n */\n elements: Type[];\n\n /**\n * The type name identifier.\n */\n readonly type: string = 'tuple';\n\n /**\n * Create a new TupleType instance.\n *\n * @param elements The ordered type elements of the tuple type.\n */\n constructor(elements: Type[]) {\n super();\n this.elements = elements;\n }\n\n /**\n * Clone this type.\n *\n * @return A clone of this type.\n */\n clone(): Type {\n return new TupleType(this.elements);\n }\n\n /**\n * Test whether this type equals the given type.\n *\n * @param type The type that should be checked for equality.\n * @returns TRUE if the given type equals this type, FALSE otherwise.\n */\n equals(type: TupleType): boolean {\n if (!(type instanceof TupleType)) {\n return false;\n }\n return Type.isTypeListEqual(type.elements, this.elements);\n }\n\n /**\n * Return a raw object representation of this type.\n */\n toObject(): any {\n const result: any = super.toObject();\n\n if (this.elements && this.elements.length) {\n result.elements = this.elements.map((e) => e.toObject());\n }\n\n return result;\n }\n\n /**\n * Return a string representation of this type.\n */\n toString() {\n const names: string[] = [];\n this.elements.forEach((element) => {\n names.push(element.toString());\n });\n\n return '[' + names.join(', ') + ']';\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/models/types/type-parameter.js.map b/node_modules/typedoc/dist/lib/models/types/type-parameter.js.map
index de8f78006..893162b7b 100644
--- a/node_modules/typedoc/dist/lib/models/types/type-parameter.js.map
+++ b/node_modules/typedoc/dist/lib/models/types/type-parameter.js.map
@@ -1 +1 @@
-{"version":3,"file":"type-parameter.js","sourceRoot":"","sources":["../../../../src/lib/models/types/type-parameter.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uCAAgC;AAShC;IAAuC,qCAAI;IAA3C;QAAA,qEAiEC;QAtDY,UAAI,GAAW,eAAe,CAAC;;IAsD5C,CAAC;IA/CG,iCAAK,GAAL;QACI,IAAM,KAAK,GAAG,IAAI,iBAAiB,EAAE,CAAC;QACtC,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACvB,KAAK,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;QACnC,MAAM,CAAC,KAAK,CAAC;IACjB,CAAC;IAQD,kCAAM,GAAN,UAAO,IAAuB;QAC1B,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,YAAY,iBAAiB,CAAC,CAAC,CAAC,CAAC;YACvC,MAAM,CAAC,KAAK,CAAC;QACjB,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;YACrC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACnD,CAAC;QAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;YAC9C,MAAM,CAAC,IAAI,CAAC;QAChB,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,MAAM,CAAC,KAAK,CAAC;QACjB,CAAC;IACL,CAAC;IAKD,oCAAQ,GAAR;QACI,IAAM,MAAM,GAAQ,iBAAM,QAAQ,WAAE,CAAC;QACrC,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QAExB,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;YAClB,MAAM,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;QACnD,CAAC;QAED,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IAKD,oCAAQ,GAAR;QACI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;IACrB,CAAC;IACL,wBAAC;AAAD,CAAC,AAjED,CAAuC,eAAI,GAiE1C;AAjEY,8CAAiB","sourcesContent":["import {Type} from './abstract';\n\n/**\n * Represents a type parameter type.\n *\n * ~~~\n * let value: T;\n * ~~~\n */\nexport class TypeParameterType extends Type {\n /**\n *\n */\n name: string;\n\n constraint: Type;\n\n /**\n * The type name identifier.\n */\n readonly type: string = 'typeParameter';\n\n /**\n * Clone this type.\n *\n * @return A clone of this type.\n */\n clone(): Type {\n const clone = new TypeParameterType();\n clone.name = this.name;\n clone.constraint = this.constraint;\n return clone;\n }\n\n /**\n * Test whether this type equals the given type.\n *\n * @param type The type that should be checked for equality.\n * @returns TRUE if the given type equals this type, FALSE otherwise.\n */\n equals(type: TypeParameterType): boolean {\n if (!(type instanceof TypeParameterType)) {\n return false;\n }\n\n if (this.constraint && type.constraint) {\n return type.constraint.equals(this.constraint);\n } else if (!this.constraint && !type.constraint) {\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * Return a raw object representation of this type.\n */\n toObject(): any {\n const result: any = super.toObject();\n result.name = this.name;\n\n if (this.constraint) {\n result.constraint = this.constraint.toObject();\n }\n\n return result;\n }\n\n /**\n * Return a string representation of this type.\n */\n toString() {\n return this.name;\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"type-parameter.js","sourceRoot":"","sources":["../../../../src/lib/models/types/type-parameter.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uCAAkC;AASlC;IAAuC,qCAAI;IAA3C;QAAA,qEAiEC;QAtDY,UAAI,GAAW,eAAe,CAAC;;IAsD5C,CAAC;IA/CG,iCAAK,GAAL;QACI,IAAM,KAAK,GAAG,IAAI,iBAAiB,EAAE,CAAC;QACtC,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACvB,KAAK,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;QACnC,MAAM,CAAC,KAAK,CAAC;IACjB,CAAC;IAQD,kCAAM,GAAN,UAAO,IAAuB;QAC1B,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,YAAY,iBAAiB,CAAC,CAAC,CAAC,CAAC;YACvC,MAAM,CAAC,KAAK,CAAC;QACjB,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;YACrC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACnD,CAAC;QAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;YAC9C,MAAM,CAAC,IAAI,CAAC;QAChB,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,MAAM,CAAC,KAAK,CAAC;QACjB,CAAC;IACL,CAAC;IAKD,oCAAQ,GAAR;QACI,IAAM,MAAM,GAAQ,iBAAM,QAAQ,WAAE,CAAC;QACrC,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QAExB,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;YAClB,MAAM,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;QACnD,CAAC;QAED,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IAKD,oCAAQ,GAAR;QACI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;IACrB,CAAC;IACL,wBAAC;AAAD,CAAC,AAjED,CAAuC,eAAI,GAiE1C;AAjEY,8CAAiB","sourcesContent":["import { Type } from './abstract';\n\n/**\n * Represents a type parameter type.\n *\n * ~~~\n * let value: T;\n * ~~~\n */\nexport class TypeParameterType extends Type {\n /**\n *\n */\n name: string;\n\n constraint: Type;\n\n /**\n * The type name identifier.\n */\n readonly type: string = 'typeParameter';\n\n /**\n * Clone this type.\n *\n * @return A clone of this type.\n */\n clone(): Type {\n const clone = new TypeParameterType();\n clone.name = this.name;\n clone.constraint = this.constraint;\n return clone;\n }\n\n /**\n * Test whether this type equals the given type.\n *\n * @param type The type that should be checked for equality.\n * @returns TRUE if the given type equals this type, FALSE otherwise.\n */\n equals(type: TypeParameterType): boolean {\n if (!(type instanceof TypeParameterType)) {\n return false;\n }\n\n if (this.constraint && type.constraint) {\n return type.constraint.equals(this.constraint);\n } else if (!this.constraint && !type.constraint) {\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * Return a raw object representation of this type.\n */\n toObject(): any {\n const result: any = super.toObject();\n result.name = this.name;\n\n if (this.constraint) {\n result.constraint = this.constraint.toObject();\n }\n\n return result;\n }\n\n /**\n * Return a string representation of this type.\n */\n toString() {\n return this.name;\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/models/types/union.js.map b/node_modules/typedoc/dist/lib/models/types/union.js.map
index 043d6d80a..d97da8b06 100644
--- a/node_modules/typedoc/dist/lib/models/types/union.js.map
+++ b/node_modules/typedoc/dist/lib/models/types/union.js.map
@@ -1 +1 @@
-{"version":3,"file":"union.js","sourceRoot":"","sources":["../../../../src/lib/models/types/union.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uCAAgC;AAShC;IAA+B,6BAAI;IAgB/B,mBAAY,KAAa;QAAzB,YACI,iBAAO,SAEV;QAVQ,UAAI,GAAW,OAAO,CAAC;QAS5B,KAAI,CAAC,KAAK,GAAG,KAAK,CAAC;;IACvB,CAAC;IAOD,yBAAK,GAAL;QACI,MAAM,CAAC,IAAI,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACrC,CAAC;IAQD,0BAAM,GAAN,UAAO,IAAe;QAClB,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,YAAY,SAAS,CAAC,CAAC,CAAC,CAAC;YAC/B,MAAM,CAAC,KAAK,CAAC;QACjB,CAAC;QACD,MAAM,CAAC,eAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;IAC3D,CAAC;IAKD,4BAAQ,GAAR;QACI,IAAM,MAAM,GAAQ,iBAAM,QAAQ,WAAE,CAAC;QAErC,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;YAClC,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,QAAQ,EAAE,EAAZ,CAAY,CAAC,CAAC;QACvD,CAAC;QAED,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IAKD,4BAAQ,GAAR;QACI,IAAM,KAAK,GAAa,EAAE,CAAC;QAC3B,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,UAAC,OAAO;YACvB,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;QACnC,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC7B,CAAC;IACL,gBAAC;AAAD,CAAC,AAnED,CAA+B,eAAI,GAmElC;AAnEY,8BAAS","sourcesContent":["import {Type} from './abstract';\n\n/**\n * Represents an union type.\n *\n * ~~~\n * let value: string | string[];\n * ~~~\n */\nexport class UnionType extends Type {\n /**\n * The types this union consists of.\n */\n types: Type[];\n\n /**\n * The type name identifier.\n */\n readonly type: string = 'union';\n\n /**\n * Create a new TupleType instance.\n *\n * @param types The types this union consists of.\n */\n constructor(types: Type[]) {\n super();\n this.types = types;\n }\n\n /**\n * Clone this type.\n *\n * @return A clone of this type.\n */\n clone(): Type {\n return new UnionType(this.types);\n }\n\n /**\n * Test whether this type equals the given type.\n *\n * @param type The type that should be checked for equality.\n * @returns TRUE if the given type equals this type, FALSE otherwise.\n */\n equals(type: UnionType): boolean {\n if (!(type instanceof UnionType)) {\n return false;\n }\n return Type.isTypeListSimiliar(type.types, this.types);\n }\n\n /**\n * Return a raw object representation of this type.\n */\n toObject(): any {\n const result: any = super.toObject();\n\n if (this.types && this.types.length) {\n result.types = this.types.map((e) => e.toObject());\n }\n\n return result;\n }\n\n /**\n * Return a string representation of this type.\n */\n toString() {\n const names: string[] = [];\n this.types.forEach((element) => {\n names.push(element.toString());\n });\n\n return names.join(' | ');\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"union.js","sourceRoot":"","sources":["../../../../src/lib/models/types/union.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uCAAkC;AASlC;IAA+B,6BAAI;IAgB/B,mBAAY,KAAa;QAAzB,YACI,iBAAO,SAEV;QAVQ,UAAI,GAAW,OAAO,CAAC;QAS5B,KAAI,CAAC,KAAK,GAAG,KAAK,CAAC;;IACvB,CAAC;IAOD,yBAAK,GAAL;QACI,MAAM,CAAC,IAAI,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACrC,CAAC;IAQD,0BAAM,GAAN,UAAO,IAAe;QAClB,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,YAAY,SAAS,CAAC,CAAC,CAAC,CAAC;YAC/B,MAAM,CAAC,KAAK,CAAC;QACjB,CAAC;QACD,MAAM,CAAC,eAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;IAC3D,CAAC;IAKD,4BAAQ,GAAR;QACI,IAAM,MAAM,GAAQ,iBAAM,QAAQ,WAAE,CAAC;QAErC,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;YAClC,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,QAAQ,EAAE,EAAZ,CAAY,CAAC,CAAC;QACvD,CAAC;QAED,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IAKD,4BAAQ,GAAR;QACI,IAAM,KAAK,GAAa,EAAE,CAAC;QAC3B,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,UAAC,OAAO;YACvB,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;QACnC,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC7B,CAAC;IACL,gBAAC;AAAD,CAAC,AAnED,CAA+B,eAAI,GAmElC;AAnEY,8BAAS","sourcesContent":["import { Type } from './abstract';\n\n/**\n * Represents an union type.\n *\n * ~~~\n * let value: string | string[];\n * ~~~\n */\nexport class UnionType extends Type {\n /**\n * The types this union consists of.\n */\n types: Type[];\n\n /**\n * The type name identifier.\n */\n readonly type: string = 'union';\n\n /**\n * Create a new TupleType instance.\n *\n * @param types The types this union consists of.\n */\n constructor(types: Type[]) {\n super();\n this.types = types;\n }\n\n /**\n * Clone this type.\n *\n * @return A clone of this type.\n */\n clone(): Type {\n return new UnionType(this.types);\n }\n\n /**\n * Test whether this type equals the given type.\n *\n * @param type The type that should be checked for equality.\n * @returns TRUE if the given type equals this type, FALSE otherwise.\n */\n equals(type: UnionType): boolean {\n if (!(type instanceof UnionType)) {\n return false;\n }\n return Type.isTypeListSimiliar(type.types, this.types);\n }\n\n /**\n * Return a raw object representation of this type.\n */\n toObject(): any {\n const result: any = super.toObject();\n\n if (this.types && this.types.length) {\n result.types = this.types.map((e) => e.toObject());\n }\n\n return result;\n }\n\n /**\n * Return a string representation of this type.\n */\n toString() {\n const names: string[] = [];\n this.types.forEach((element) => {\n names.push(element.toString());\n });\n\n return names.join(' | ');\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/models/types/unknown.js.map b/node_modules/typedoc/dist/lib/models/types/unknown.js.map
index 110405ef7..c66826fc3 100644
--- a/node_modules/typedoc/dist/lib/models/types/unknown.js.map
+++ b/node_modules/typedoc/dist/lib/models/types/unknown.js.map
@@ -1 +1 @@
-{"version":3,"file":"unknown.js","sourceRoot":"","sources":["../../../../src/lib/models/types/unknown.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uCAAgC;AAKhC;IAAiC,+BAAI;IAgBjC,qBAAY,IAAY;QAAxB,YACI,iBAAO,SAEV;QAVQ,UAAI,GAAW,SAAS,CAAC;QAS9B,KAAI,CAAC,IAAI,GAAG,IAAI,CAAC;;IACrB,CAAC;IAOD,2BAAK,GAAL;QACI,MAAM,CAAC,IAAI,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACtC,CAAC;IAQD,4BAAM,GAAN,UAAO,IAAiB;QACpB,MAAM,CAAC,IAAI,YAAY,WAAW;YAC9B,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,CAAC;IAChC,CAAC;IAKD,8BAAQ,GAAR;QACI,IAAM,MAAM,GAAQ,iBAAM,QAAQ,WAAE,CAAC;QACrC,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACxB,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IAKD,8BAAQ,GAAR;QACI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;IACrB,CAAC;IACL,kBAAC;AAAD,CAAC,AAxDD,CAAiC,eAAI,GAwDpC;AAxDY,kCAAW","sourcesContent":["import {Type} from './abstract';\n\n/**\n * Represents all unknown types.\n */\nexport class UnknownType extends Type {\n /**\n * A string representation of the type as returned from TypeScript compiler.\n */\n name: string;\n\n /**\n * The type name identifier.\n */\n readonly type: string = 'unknown';\n\n /**\n * Create a new instance of UnknownType.\n *\n * @param name A string representation of the type as returned from TypeScript compiler.\n */\n constructor(name: string) {\n super();\n this.name = name;\n }\n\n /**\n * Clone this type.\n *\n * @return A clone of this type.\n */\n clone(): Type {\n return new UnknownType(this.name);\n }\n\n /**\n * Test whether this type equals the given type.\n *\n * @param type The type that should be checked for equality.\n * @returns TRUE if the given type equals this type, FALSE otherwise.\n */\n equals(type: UnknownType): boolean {\n return type instanceof UnknownType &&\n type.name === this.name;\n }\n\n /**\n * Return a raw object representation of this type.\n */\n toObject(): any {\n const result: any = super.toObject();\n result.name = this.name;\n return result;\n }\n\n /**\n * Return a string representation of this type.\n */\n toString() {\n return this.name;\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"unknown.js","sourceRoot":"","sources":["../../../../src/lib/models/types/unknown.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uCAAkC;AAKlC;IAAiC,+BAAI;IAgBjC,qBAAY,IAAY;QAAxB,YACI,iBAAO,SAEV;QAVQ,UAAI,GAAW,SAAS,CAAC;QAS9B,KAAI,CAAC,IAAI,GAAG,IAAI,CAAC;;IACrB,CAAC;IAOD,2BAAK,GAAL;QACI,MAAM,CAAC,IAAI,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACtC,CAAC;IAQD,4BAAM,GAAN,UAAO,IAAiB;QACpB,MAAM,CAAC,IAAI,YAAY,WAAW;YAC9B,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,CAAC;IAChC,CAAC;IAKD,8BAAQ,GAAR;QACI,IAAM,MAAM,GAAQ,iBAAM,QAAQ,WAAE,CAAC;QACrC,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACxB,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IAKD,8BAAQ,GAAR;QACI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;IACrB,CAAC;IACL,kBAAC;AAAD,CAAC,AAxDD,CAAiC,eAAI,GAwDpC;AAxDY,kCAAW","sourcesContent":["import { Type } from './abstract';\n\n/**\n * Represents all unknown types.\n */\nexport class UnknownType extends Type {\n /**\n * A string representation of the type as returned from TypeScript compiler.\n */\n name: string;\n\n /**\n * The type name identifier.\n */\n readonly type: string = 'unknown';\n\n /**\n * Create a new instance of UnknownType.\n *\n * @param name A string representation of the type as returned from TypeScript compiler.\n */\n constructor(name: string) {\n super();\n this.name = name;\n }\n\n /**\n * Clone this type.\n *\n * @return A clone of this type.\n */\n clone(): Type {\n return new UnknownType(this.name);\n }\n\n /**\n * Test whether this type equals the given type.\n *\n * @param type The type that should be checked for equality.\n * @returns TRUE if the given type equals this type, FALSE otherwise.\n */\n equals(type: UnknownType): boolean {\n return type instanceof UnknownType &&\n type.name === this.name;\n }\n\n /**\n * Return a raw object representation of this type.\n */\n toObject(): any {\n const result: any = super.toObject();\n result.name = this.name;\n return result;\n }\n\n /**\n * Return a string representation of this type.\n */\n toString() {\n return this.name;\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/output/components.js.map b/node_modules/typedoc/dist/lib/output/components.js.map
index 9a9082af9..9ba796211 100644
--- a/node_modules/typedoc/dist/lib/output/components.js.map
+++ b/node_modules/typedoc/dist/lib/output/components.js.map
@@ -1 +1 @@
-{"version":3,"file":"components.js","sourceRoot":"","sources":["../../../src/lib/output/components.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2BAA6B;AAE7B,gDAAgE;AAKxD,oBALA,qBAAS,CAKA;AAJjB,qDAAqF;AAErF,mCAAkD;AAIlD;IAAgD,qCAA2B;IAA3E;;IAA8E,CAAC;IAAD,wBAAC;AAAD,CAAC,AAA/E,CAAgD,6BAAiB,GAAc;AAAzD,8CAAiB;AAKvC;IAA4D,iDAAiB;IAA7E;;IAyDA,CAAC;IApCa,kDAAU,GAApB;QACI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK;YACpB,GAAC,sBAAa,CAAC,KAAK,IAAG,IAAI,CAAC,eAAe;YAC3C,GAAC,kBAAS,CAAC,KAAK,IAAO,IAAI,CAAC,WAAW;gBACzC,CAAC;;IACP,CAAC;IAQM,sDAAc,GAArB,UAAsB,QAAgB;QAClC,IAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;QACpF,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAC5E,CAAC;IAOS,uDAAe,GAAzB,UAA0B,KAAoB;QAC1C,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;IACjC,CAAC;IAOS,mDAAW,GAArB,UAAsB,IAAe;QACjC,IAAI,CAAC,QAAQ,GAAK,IAAI,CAAC,GAAG,CAAC;QAC3B,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,KAAK,YAAY,6BAAqB,GAAG,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;IACtF,CAAC;IACL,oCAAC;AAAD,CAAC,AAzDD,CAA4D,iBAAiB,GAyD5E;AAzDqB,sEAA6B","sourcesContent":["import * as Path from 'path';\n\nimport {Component, AbstractComponent} from '../utils/component';\nimport {ProjectReflection, DeclarationReflection} from '../models/reflections/index';\nimport {Renderer} from './renderer';\nimport {RendererEvent, PageEvent} from './events';\n\nexport {Component};\n\nexport abstract class RendererComponent extends AbstractComponent<Renderer> { }\n\n/**\n * A plugin for the renderer that reads the current render context.\n */\nexport abstract class ContextAwareRendererComponent extends RendererComponent {\n /**\n * The project that is currently processed.\n */\n protected project: ProjectReflection;\n\n /**\n * The reflection that is currently processed.\n */\n protected reflection: DeclarationReflection;\n\n /**\n * The url of the document that is being currently generated.\n */\n private location: string;\n\n /**\n * Create a new ContextAwareRendererPlugin instance.\n *\n * @param renderer The renderer this plugin should be attached to.\n */\n protected initialize() {\n this.listenTo(this.owner, {\n [RendererEvent.BEGIN]: this.onBeginRenderer,\n [PageEvent.BEGIN]: this.onBeginPage\n });\n }\n\n /**\n * Transform the given absolute path into a relative path.\n *\n * @param absolute The absolute path to transform.\n * @returns A path relative to the document currently processed.\n */\n public getRelativeUrl(absolute: string): string {\n const relative = Path.relative(Path.dirname(this.location), Path.dirname(absolute));\n return Path.join(relative, Path.basename(absolute)).replace(/\\\\/g, '/');\n }\n\n /**\n * Triggered before the renderer starts rendering a project.\n *\n * @param event An event object describing the current render operation.\n */\n protected onBeginRenderer(event: RendererEvent) {\n this.project = event.project;\n }\n\n /**\n * Triggered before a document will be rendered.\n *\n * @param page An event object describing the current render operation.\n */\n protected onBeginPage(page: PageEvent) {\n this.location = page.url;\n this.reflection = page.model instanceof DeclarationReflection ? page.model : null;\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"components.js","sourceRoot":"","sources":["../../../src/lib/output/components.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2BAA6B;AAE7B,gDAAkE;AAK1D,oBALC,qBAAS,CAKD;AAJjB,qDAAuF;AAEvF,mCAAoD;AAIpD;IAAgD,qCAA2B;IAA3E;;IAA8E,CAAC;IAAD,wBAAC;AAAD,CAAC,AAA/E,CAAgD,6BAAiB,GAAc;AAAzD,8CAAiB;AAKvC;IAA4D,iDAAiB;IAA7E;;IAyDA,CAAC;IApCa,kDAAU,GAApB;QACI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK;YACpB,GAAC,sBAAa,CAAC,KAAK,IAAG,IAAI,CAAC,eAAe;YAC3C,GAAC,kBAAS,CAAC,KAAK,IAAO,IAAI,CAAC,WAAW;gBACzC,CAAC;;IACP,CAAC;IAQM,sDAAc,GAArB,UAAsB,QAAgB;QAClC,IAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;QACpF,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAC5E,CAAC;IAOS,uDAAe,GAAzB,UAA0B,KAAoB;QAC1C,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;IACjC,CAAC;IAOS,mDAAW,GAArB,UAAsB,IAAe;QACjC,IAAI,CAAC,QAAQ,GAAK,IAAI,CAAC,GAAG,CAAC;QAC3B,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,KAAK,YAAY,6BAAqB,GAAG,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;IACtF,CAAC;IACL,oCAAC;AAAD,CAAC,AAzDD,CAA4D,iBAAiB,GAyD5E;AAzDqB,sEAA6B","sourcesContent":["import * as Path from 'path';\n\nimport { Component, AbstractComponent } from '../utils/component';\nimport { ProjectReflection, DeclarationReflection } from '../models/reflections/index';\nimport { Renderer } from './renderer';\nimport { RendererEvent, PageEvent } from './events';\n\nexport {Component};\n\nexport abstract class RendererComponent extends AbstractComponent<Renderer> { }\n\n/**\n * A plugin for the renderer that reads the current render context.\n */\nexport abstract class ContextAwareRendererComponent extends RendererComponent {\n /**\n * The project that is currently processed.\n */\n protected project: ProjectReflection;\n\n /**\n * The reflection that is currently processed.\n */\n protected reflection: DeclarationReflection;\n\n /**\n * The url of the document that is being currently generated.\n */\n private location: string;\n\n /**\n * Create a new ContextAwareRendererPlugin instance.\n *\n * @param renderer The renderer this plugin should be attached to.\n */\n protected initialize() {\n this.listenTo(this.owner, {\n [RendererEvent.BEGIN]: this.onBeginRenderer,\n [PageEvent.BEGIN]: this.onBeginPage\n });\n }\n\n /**\n * Transform the given absolute path into a relative path.\n *\n * @param absolute The absolute path to transform.\n * @returns A path relative to the document currently processed.\n */\n public getRelativeUrl(absolute: string): string {\n const relative = Path.relative(Path.dirname(this.location), Path.dirname(absolute));\n return Path.join(relative, Path.basename(absolute)).replace(/\\\\/g, '/');\n }\n\n /**\n * Triggered before the renderer starts rendering a project.\n *\n * @param event An event object describing the current render operation.\n */\n protected onBeginRenderer(event: RendererEvent) {\n this.project = event.project;\n }\n\n /**\n * Triggered before a document will be rendered.\n *\n * @param page An event object describing the current render operation.\n */\n protected onBeginPage(page: PageEvent) {\n this.location = page.url;\n this.reflection = page.model instanceof DeclarationReflection ? page.model : null;\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/output/events.js b/node_modules/typedoc/dist/lib/output/events.js
index 8a47b264d..d8a4cf054 100644
--- a/node_modules/typedoc/dist/lib/output/events.js
+++ b/node_modules/typedoc/dist/lib/output/events.js
@@ -27,28 +27,28 @@ var RendererEvent = (function (_super) {
event.filename = Path.join(this.outputDirectory, mapping.url);
return event;
};
+ RendererEvent.BEGIN = 'beginRender';
+ RendererEvent.END = 'endRender';
return RendererEvent;
}(events_1.Event));
-RendererEvent.BEGIN = 'beginRender';
-RendererEvent.END = 'endRender';
exports.RendererEvent = RendererEvent;
var PageEvent = (function (_super) {
__extends(PageEvent, _super);
function PageEvent() {
return _super !== null && _super.apply(this, arguments) || this;
}
+ PageEvent.BEGIN = 'beginPage';
+ PageEvent.END = 'endPage';
return PageEvent;
}(events_1.Event));
-PageEvent.BEGIN = 'beginPage';
-PageEvent.END = 'endPage';
exports.PageEvent = PageEvent;
var MarkdownEvent = (function (_super) {
__extends(MarkdownEvent, _super);
function MarkdownEvent() {
return _super !== null && _super.apply(this, arguments) || this;
}
+ MarkdownEvent.PARSE = 'parseMarkdown';
return MarkdownEvent;
}(events_1.Event));
-MarkdownEvent.PARSE = 'parseMarkdown';
exports.MarkdownEvent = MarkdownEvent;
//# sourceMappingURL=events.js.map \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/output/events.js.map b/node_modules/typedoc/dist/lib/output/events.js.map
index 0d0e283f1..e7c0e370b 100644
--- a/node_modules/typedoc/dist/lib/output/events.js.map
+++ b/node_modules/typedoc/dist/lib/output/events.js.map
@@ -1 +1 @@
-{"version":3,"file":"events.js","sourceRoot":"","sources":["../../../src/lib/output/events.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2BAA6B;AAE7B,0CAAsC;AAYtC;IAAmC,iCAAK;IAAxC;;IAoDA,CAAC;IAVU,uCAAe,GAAtB,UAAuB,OAAmB;QACtC,IAAM,KAAK,GAAG,IAAI,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QAC7C,KAAK,CAAC,OAAO,GAAQ,IAAI,CAAC,OAAO,CAAC;QAClC,KAAK,CAAC,QAAQ,GAAO,IAAI,CAAC,QAAQ,CAAC;QACnC,KAAK,CAAC,GAAG,GAAY,OAAO,CAAC,GAAG,CAAC;QACjC,KAAK,CAAC,KAAK,GAAU,OAAO,CAAC,KAAK,CAAC;QACnC,KAAK,CAAC,YAAY,GAAG,OAAO,CAAC,QAAQ,CAAC;QACtC,KAAK,CAAC,QAAQ,GAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;QAClE,MAAM,CAAC,KAAK,CAAC;IACjB,CAAC;IACL,oBAAC;AAAD,CAAC,AApDD,CAAmC,cAAK;AA2B7B,mBAAK,GAAG,aAAa,CAAC;AAMtB,iBAAG,GAAG,WAAW,CAAC;AAjChB,sCAAa;AA+D1B;IAA+B,6BAAK;IAApC;;IAgEA,CAAC;IAAD,gBAAC;AAAD,CAAC,AAhED,CAA+B,cAAK;AAyDzB,eAAK,GAAG,WAAW,CAAC;AAMpB,aAAG,GAAG,SAAS,CAAC;AA/Dd,8BAAS;AAwEtB;IAAmC,iCAAK;IAAxC;;IAgBA,CAAC;IAAD,oBAAC;AAAD,CAAC,AAhBD,CAAmC,cAAK;AAe7B,mBAAK,GAAG,eAAe,CAAC;AAftB,sCAAa","sourcesContent":["import * as Path from 'path';\n\nimport {Event} from '../utils/events';\nimport {ProjectReflection} from '../models/reflections/project';\nimport {UrlMapping} from './models/UrlMapping';\nimport {NavigationItem} from './models/NavigationItem';\n\n/**\n * An event emitted by the [[Renderer]] class at the very beginning and\n * ending of the entire rendering process.\n *\n * @see [[Renderer.EVENT_BEGIN]]\n * @see [[Renderer.EVENT_END]]\n */\nexport class RendererEvent extends Event {\n /**\n * The project the renderer is currently processing.\n */\n project: ProjectReflection;\n\n /**\n * The settings that have been passed to TypeDoc.\n */\n settings: any;\n\n /**\n * The path of the directory the documentation should be written to.\n */\n outputDirectory: string;\n\n /**\n * A list of all pages that should be generated.\n *\n * This list can be altered during the [[Renderer.EVENT_BEGIN]] event.\n */\n urls: UrlMapping[];\n\n /**\n * Triggered before the renderer starts rendering a project.\n * @event\n */\n static BEGIN = 'beginRender';\n\n /**\n * Triggered after the renderer has written all documents.\n * @event\n */\n static END = 'endRender';\n\n /**\n * Create an [[PageEvent]] event based on this event and the given url mapping.\n *\n * @internal\n * @param mapping The mapping that defines the generated [[PageEvent]] state.\n * @returns A newly created [[PageEvent]] instance.\n */\n public createPageEvent(mapping: UrlMapping): PageEvent {\n const event = new PageEvent(PageEvent.BEGIN);\n event.project = this.project;\n event.settings = this.settings;\n event.url = mapping.url;\n event.model = mapping.model;\n event.templateName = mapping.template;\n event.filename = Path.join(this.outputDirectory, mapping.url);\n return event;\n }\n}\n\n/**\n * An event emitted by the [[Renderer]] class before and after the\n * markup of a page is rendered.\n *\n * This object will be passed as the rendering context to handlebars templates.\n *\n * @see [[Renderer.EVENT_BEGIN_PAGE]]\n * @see [[Renderer.EVENT_END_PAGE]]\n */\nexport class PageEvent extends Event {\n /**\n * The project the renderer is currently processing.\n */\n project: ProjectReflection;\n\n /**\n * The settings that have been passed to TypeDoc.\n */\n settings: any;\n\n /**\n * The filename the page will be written to.\n */\n filename: string;\n\n /**\n * The url this page will be located at.\n */\n url: string;\n\n /**\n * The model that should be rendered on this page.\n */\n model: any;\n\n /**\n * The template that should be used to render this page.\n */\n template: HandlebarsTemplateDelegate;\n\n /**\n * The name of the template that should be used to render this page.\n */\n templateName: string;\n\n /**\n * The primary navigation structure of this page.\n */\n navigation: NavigationItem;\n\n /**\n * The table of contents structure of this page.\n */\n toc: NavigationItem;\n\n /**\n * The final html content of this page.\n *\n * Should be rendered by layout templates and can be modifies by plugins.\n */\n contents: string;\n\n /**\n * Triggered before a document will be rendered.\n * @event\n */\n static BEGIN = 'beginPage';\n\n /**\n * Triggered after a document has been rendered, just before it is written to disc.\n * @event\n */\n static END = 'endPage';\n}\n\n/**\n * An event emitted by the [[MarkedPlugin]] on the [[Renderer]] after a chunk of\n * markdown has been processed. Allows other plugins to manipulate the result.\n *\n * @see [[MarkedPlugin.EVENT_PARSE_MARKDOWN]]\n */\nexport class MarkdownEvent extends Event {\n /**\n * The unparsed original text.\n */\n originalText: string;\n\n /**\n * The parsed output.\n */\n parsedText: string;\n\n /**\n * Triggered on the renderer when this plugin parses a markdown string.\n * @event\n */\n static PARSE = 'parseMarkdown';\n}\n"]} \ No newline at end of file
+{"version":3,"file":"events.js","sourceRoot":"","sources":["../../../src/lib/output/events.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2BAA6B;AAE7B,0CAAwC;AAYxC;IAAmC,iCAAK;IAAxC;;IAoDA,CAAC;IAVU,uCAAe,GAAtB,UAAuB,OAAmB;QACtC,IAAM,KAAK,GAAG,IAAI,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QAC7C,KAAK,CAAC,OAAO,GAAQ,IAAI,CAAC,OAAO,CAAC;QAClC,KAAK,CAAC,QAAQ,GAAO,IAAI,CAAC,QAAQ,CAAC;QACnC,KAAK,CAAC,GAAG,GAAY,OAAO,CAAC,GAAG,CAAC;QACjC,KAAK,CAAC,KAAK,GAAU,OAAO,CAAC,KAAK,CAAC;QACnC,KAAK,CAAC,YAAY,GAAG,OAAO,CAAC,QAAQ,CAAC;QACtC,KAAK,CAAC,QAAQ,GAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;QAClE,MAAM,CAAC,KAAK,CAAC;IACjB,CAAC;IAxBM,mBAAK,GAAG,aAAa,CAAC;IAMtB,iBAAG,GAAG,WAAW,CAAC;IAmB7B,oBAAC;CAAA,AApDD,CAAmC,cAAK,GAoDvC;AApDY,sCAAa;AA+D1B;IAA+B,6BAAK;IAApC;;IAgEA,CAAC;IAPU,eAAK,GAAG,WAAW,CAAC;IAMpB,aAAG,GAAG,SAAS,CAAC;IAC3B,gBAAC;CAAA,AAhED,CAA+B,cAAK,GAgEnC;AAhEY,8BAAS;AAwEtB;IAAmC,iCAAK;IAAxC;;IAgBA,CAAC;IADU,mBAAK,GAAG,eAAe,CAAC;IACnC,oBAAC;CAAA,AAhBD,CAAmC,cAAK,GAgBvC;AAhBY,sCAAa","sourcesContent":["import * as Path from 'path';\n\nimport { Event } from '../utils/events';\nimport { ProjectReflection } from '../models/reflections/project';\nimport { UrlMapping } from './models/UrlMapping';\nimport { NavigationItem } from './models/NavigationItem';\n\n/**\n * An event emitted by the [[Renderer]] class at the very beginning and\n * ending of the entire rendering process.\n *\n * @see [[Renderer.EVENT_BEGIN]]\n * @see [[Renderer.EVENT_END]]\n */\nexport class RendererEvent extends Event {\n /**\n * The project the renderer is currently processing.\n */\n project: ProjectReflection;\n\n /**\n * The settings that have been passed to TypeDoc.\n */\n settings: any;\n\n /**\n * The path of the directory the documentation should be written to.\n */\n outputDirectory: string;\n\n /**\n * A list of all pages that should be generated.\n *\n * This list can be altered during the [[Renderer.EVENT_BEGIN]] event.\n */\n urls: UrlMapping[];\n\n /**\n * Triggered before the renderer starts rendering a project.\n * @event\n */\n static BEGIN = 'beginRender';\n\n /**\n * Triggered after the renderer has written all documents.\n * @event\n */\n static END = 'endRender';\n\n /**\n * Create an [[PageEvent]] event based on this event and the given url mapping.\n *\n * @internal\n * @param mapping The mapping that defines the generated [[PageEvent]] state.\n * @returns A newly created [[PageEvent]] instance.\n */\n public createPageEvent(mapping: UrlMapping): PageEvent {\n const event = new PageEvent(PageEvent.BEGIN);\n event.project = this.project;\n event.settings = this.settings;\n event.url = mapping.url;\n event.model = mapping.model;\n event.templateName = mapping.template;\n event.filename = Path.join(this.outputDirectory, mapping.url);\n return event;\n }\n}\n\n/**\n * An event emitted by the [[Renderer]] class before and after the\n * markup of a page is rendered.\n *\n * This object will be passed as the rendering context to handlebars templates.\n *\n * @see [[Renderer.EVENT_BEGIN_PAGE]]\n * @see [[Renderer.EVENT_END_PAGE]]\n */\nexport class PageEvent extends Event {\n /**\n * The project the renderer is currently processing.\n */\n project: ProjectReflection;\n\n /**\n * The settings that have been passed to TypeDoc.\n */\n settings: any;\n\n /**\n * The filename the page will be written to.\n */\n filename: string;\n\n /**\n * The url this page will be located at.\n */\n url: string;\n\n /**\n * The model that should be rendered on this page.\n */\n model: any;\n\n /**\n * The template that should be used to render this page.\n */\n template: HandlebarsTemplateDelegate;\n\n /**\n * The name of the template that should be used to render this page.\n */\n templateName: string;\n\n /**\n * The primary navigation structure of this page.\n */\n navigation: NavigationItem;\n\n /**\n * The table of contents structure of this page.\n */\n toc: NavigationItem;\n\n /**\n * The final html content of this page.\n *\n * Should be rendered by layout templates and can be modifies by plugins.\n */\n contents: string;\n\n /**\n * Triggered before a document will be rendered.\n * @event\n */\n static BEGIN = 'beginPage';\n\n /**\n * Triggered after a document has been rendered, just before it is written to disc.\n * @event\n */\n static END = 'endPage';\n}\n\n/**\n * An event emitted by the [[MarkedPlugin]] on the [[Renderer]] after a chunk of\n * markdown has been processed. Allows other plugins to manipulate the result.\n *\n * @see [[MarkedPlugin.EVENT_PARSE_MARKDOWN]]\n */\nexport class MarkdownEvent extends Event {\n /**\n * The unparsed original text.\n */\n originalText: string;\n\n /**\n * The parsed output.\n */\n parsedText: string;\n\n /**\n * Triggered on the renderer when this plugin parses a markdown string.\n * @event\n */\n static PARSE = 'parseMarkdown';\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/output/helpers/if-signature.js.map b/node_modules/typedoc/dist/lib/output/helpers/if-signature.js.map
index 8a405c99e..e86f00fbb 100644
--- a/node_modules/typedoc/dist/lib/output/helpers/if-signature.js.map
+++ b/node_modules/typedoc/dist/lib/output/helpers/if-signature.js.map
@@ -1 +1 @@
-{"version":3,"file":"if-signature.js","sourceRoot":"","sources":["../../../../src/lib/output/helpers/if-signature.ts"],"names":[],"mappings":";;AAAA,gEAAuE;AAEvE,qBAA4B,GAAQ,EAAE,GAAQ;IAC1C,EAAE,CAAC,CAAC,GAAG,YAAY,+BAAmB,CAAC,CAAC,CAAC;QACrC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC;IAAC,IAAI,CAAC,CAAC;QACJ,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B,CAAC;AACL,CAAC;AAND,kCAMC","sourcesContent":["import {SignatureReflection} from '../../models/reflections/signature';\n\nexport function ifSignature(obj: any, arg: any) {\n if (obj instanceof SignatureReflection) {\n return arg.fn(this);\n } else {\n return arg.inverse(this);\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"if-signature.js","sourceRoot":"","sources":["../../../../src/lib/output/helpers/if-signature.ts"],"names":[],"mappings":";;AAAA,gEAAyE;AAEzE,qBAA4B,GAAQ,EAAE,GAAQ;IAC1C,EAAE,CAAC,CAAC,GAAG,YAAY,+BAAmB,CAAC,CAAC,CAAC;QACrC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC;IAAC,IAAI,CAAC,CAAC;QACJ,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B,CAAC;AACL,CAAC;AAND,kCAMC","sourcesContent":["import { SignatureReflection } from '../../models/reflections/signature';\n\nexport function ifSignature(obj: any, arg: any) {\n if (obj instanceof SignatureReflection) {\n return arg.fn(this);\n } else {\n return arg.inverse(this);\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/output/models/NavigationItem.js.map b/node_modules/typedoc/dist/lib/output/models/NavigationItem.js.map
index 8634b6021..711ba9e89 100644
--- a/node_modules/typedoc/dist/lib/output/models/NavigationItem.js.map
+++ b/node_modules/typedoc/dist/lib/output/models/NavigationItem.js.map
@@ -1 +1 @@
-{"version":3,"file":"NavigationItem.js","sourceRoot":"","sources":["../../../../src/lib/output/models/NavigationItem.ts"],"names":[],"mappings":";;AASA;IAsEI,wBAAY,KAAc,EAAE,GAAY,EAAE,MAAuB,EAAE,UAAmB,EAAE,UAAuB;QAC3G,IAAI,CAAC,KAAK,GAAQ,KAAK,IAAK,EAAE,CAAC;QAC/B,IAAI,CAAC,GAAG,GAAU,GAAG,IAAO,EAAE,CAAC;QAC/B,IAAI,CAAC,MAAM,GAAO,MAAM,IAAI,IAAI,CAAC;QACjC,IAAI,CAAC,UAAU,GAAG,UAAU,IAAI,EAAE,CAAC;QACnC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAE7B,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;YACP,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACxB,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;YACd,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;gBACxB,IAAI,CAAC,MAAM,CAAC,QAAQ,GAAG,EAAE,CAAC;YAC9B,CAAC;YACD,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACpC,CAAC;IACL,CAAC;IASM,qBAAM,GAAb,UAAc,UAAsB,EAAE,MAAuB,EAAE,aAAuB;QAClF,IAAI,IAAY,CAAC;QACjB,EAAE,CAAC,CAAC,aAAa,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YAC7C,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC;QAC3B,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,IAAI,GAAG,UAAU,CAAC,WAAW,EAAE,CAAC;QACpC,CAAC;QAED,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;QACnB,EAAE,CAAC,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC;YACd,IAAI,GAAG,SAAO,UAAU,CAAC,UAAU,UAAO,CAAC;QAC/C,CAAC;QAED,MAAM,CAAC,IAAI,cAAc,CAAC,IAAI,EAAE,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;IAC/F,CAAC;IACL,qBAAC;AAAD,CAAC,AA/GD,IA+GC;AA/GY,wCAAc","sourcesContent":["import {Reflection} from '../../models/reflections/abstract';\n\n/**\n * A hierarchical model holding the data of single node within the navigation.\n *\n * This structure is used by the [[NavigationPlugin]] and [[TocPlugin]] to expose the current\n * navigation state to the template engine. Themes should generate the primary navigation structure\n * through the [[BaseTheme.getNavigation]] method.\n */\nexport class NavigationItem {\n /**\n * The visible title of the navigation node.\n */\n title: string;\n\n /**\n * The url this navigation node points to.\n */\n url: string;\n\n /**\n * A list of urls that should be seen as sub-pages of this node.\n */\n dedicatedUrls: string[];\n\n /**\n * The parent navigation node.\n */\n parent: NavigationItem;\n\n /**\n * An array containing all child navigation nodes.\n */\n children: NavigationItem[];\n\n /**\n * A string containing the css classes of this node.\n */\n cssClasses: string;\n\n /**\n * Is this item a simple label without a link?\n */\n isLabel: boolean;\n\n /**\n * Is this item visible?\n */\n isVisible: boolean;\n\n /**\n * Does this navigation node represent the current page?\n */\n isCurrent: boolean;\n\n /**\n * Is this the navigation node for the globals page?\n */\n isGlobals: boolean;\n\n /**\n * Is this navigation node one of the parents of the current page?\n */\n isInPath: boolean;\n\n /**\n * The source [Reflection] this item is built from\n */\n reflection: Reflection;\n\n /**\n * Create a new NavigationItem instance.\n *\n * @param title The visible title of the navigation node.\n * @param url The url this navigation node points to.\n * @param parent The parent navigation node.\n * @param cssClasses A string containing the css classes of this node.\n * @param reflection The source [Reflection] for this [NavigationItem]\n */\n constructor(title?: string, url?: string, parent?: NavigationItem, cssClasses?: string, reflection?: Reflection) {\n this.title = title || '';\n this.url = url || '';\n this.parent = parent || null;\n this.cssClasses = cssClasses || '';\n this.reflection = reflection;\n\n if (!url) {\n this.isLabel = true;\n }\n\n if (this.parent) {\n if (!this.parent.children) {\n this.parent.children = [];\n }\n this.parent.children.push(this);\n }\n }\n\n /**\n * Create a navigation node for the given reflection.\n *\n * @param reflection The reflection whose navigation node should be created.\n * @param parent The parent navigation node.\n * @param useShortNames Force this function to always use short names.\n */\n static create(reflection: Reflection, parent?: NavigationItem, useShortNames?: boolean) {\n let name: string;\n if (useShortNames || (parent && parent.parent)) {\n name = reflection.name;\n } else {\n name = reflection.getFullName();\n }\n\n name = name.trim();\n if (name === '') {\n name = `<em>${reflection.kindString}</em>`;\n }\n\n return new NavigationItem(name, reflection.url, parent, reflection.cssClasses, reflection);\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"NavigationItem.js","sourceRoot":"","sources":["../../../../src/lib/output/models/NavigationItem.ts"],"names":[],"mappings":";;AASA;IAsEI,wBAAY,KAAc,EAAE,GAAY,EAAE,MAAuB,EAAE,UAAmB,EAAE,UAAuB;QAC3G,IAAI,CAAC,KAAK,GAAQ,KAAK,IAAK,EAAE,CAAC;QAC/B,IAAI,CAAC,GAAG,GAAU,GAAG,IAAO,EAAE,CAAC;QAC/B,IAAI,CAAC,MAAM,GAAO,MAAM,IAAI,IAAI,CAAC;QACjC,IAAI,CAAC,UAAU,GAAG,UAAU,IAAI,EAAE,CAAC;QACnC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAE7B,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;YACP,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACxB,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;YACd,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;gBACxB,IAAI,CAAC,MAAM,CAAC,QAAQ,GAAG,EAAE,CAAC;YAC9B,CAAC;YACD,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACpC,CAAC;IACL,CAAC;IASM,qBAAM,GAAb,UAAc,UAAsB,EAAE,MAAuB,EAAE,aAAuB;QAClF,IAAI,IAAY,CAAC;QACjB,EAAE,CAAC,CAAC,aAAa,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YAC7C,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC;QAC3B,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,IAAI,GAAG,UAAU,CAAC,WAAW,EAAE,CAAC;QACpC,CAAC;QAED,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;QACnB,EAAE,CAAC,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC;YACd,IAAI,GAAG,SAAO,UAAU,CAAC,UAAU,UAAO,CAAC;QAC/C,CAAC;QAED,MAAM,CAAC,IAAI,cAAc,CAAC,IAAI,EAAE,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;IAC/F,CAAC;IACL,qBAAC;AAAD,CAAC,AA/GD,IA+GC;AA/GY,wCAAc","sourcesContent":["import { Reflection } from '../../models/reflections/abstract';\n\n/**\n * A hierarchical model holding the data of single node within the navigation.\n *\n * This structure is used by the [[NavigationPlugin]] and [[TocPlugin]] to expose the current\n * navigation state to the template engine. Themes should generate the primary navigation structure\n * through the [[BaseTheme.getNavigation]] method.\n */\nexport class NavigationItem {\n /**\n * The visible title of the navigation node.\n */\n title: string;\n\n /**\n * The url this navigation node points to.\n */\n url: string;\n\n /**\n * A list of urls that should be seen as sub-pages of this node.\n */\n dedicatedUrls: string[];\n\n /**\n * The parent navigation node.\n */\n parent: NavigationItem;\n\n /**\n * An array containing all child navigation nodes.\n */\n children: NavigationItem[];\n\n /**\n * A string containing the css classes of this node.\n */\n cssClasses: string;\n\n /**\n * Is this item a simple label without a link?\n */\n isLabel: boolean;\n\n /**\n * Is this item visible?\n */\n isVisible: boolean;\n\n /**\n * Does this navigation node represent the current page?\n */\n isCurrent: boolean;\n\n /**\n * Is this the navigation node for the globals page?\n */\n isGlobals: boolean;\n\n /**\n * Is this navigation node one of the parents of the current page?\n */\n isInPath: boolean;\n\n /**\n * The source [Reflection] this item is built from\n */\n reflection: Reflection;\n\n /**\n * Create a new NavigationItem instance.\n *\n * @param title The visible title of the navigation node.\n * @param url The url this navigation node points to.\n * @param parent The parent navigation node.\n * @param cssClasses A string containing the css classes of this node.\n * @param reflection The source [Reflection] for this [NavigationItem]\n */\n constructor(title?: string, url?: string, parent?: NavigationItem, cssClasses?: string, reflection?: Reflection) {\n this.title = title || '';\n this.url = url || '';\n this.parent = parent || null;\n this.cssClasses = cssClasses || '';\n this.reflection = reflection;\n\n if (!url) {\n this.isLabel = true;\n }\n\n if (this.parent) {\n if (!this.parent.children) {\n this.parent.children = [];\n }\n this.parent.children.push(this);\n }\n }\n\n /**\n * Create a navigation node for the given reflection.\n *\n * @param reflection The reflection whose navigation node should be created.\n * @param parent The parent navigation node.\n * @param useShortNames Force this function to always use short names.\n */\n static create(reflection: Reflection, parent?: NavigationItem, useShortNames?: boolean) {\n let name: string;\n if (useShortNames || (parent && parent.parent)) {\n name = reflection.name;\n } else {\n name = reflection.getFullName();\n }\n\n name = name.trim();\n if (name === '') {\n name = `<em>${reflection.kindString}</em>`;\n }\n\n return new NavigationItem(name, reflection.url, parent, reflection.cssClasses, reflection);\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/output/plugins/AssetsPlugin.js b/node_modules/typedoc/dist/lib/output/plugins/AssetsPlugin.js
index 492a2f27a..8e0408ec3 100644
--- a/node_modules/typedoc/dist/lib/output/plugins/AssetsPlugin.js
+++ b/node_modules/typedoc/dist/lib/output/plugins/AssetsPlugin.js
@@ -48,10 +48,10 @@ var AssetsPlugin = (function (_super) {
FS.copySync(from, to);
}
};
+ AssetsPlugin = __decorate([
+ components_1.Component({ name: 'assets' })
+ ], AssetsPlugin);
return AssetsPlugin;
}(components_1.RendererComponent));
-AssetsPlugin = __decorate([
- components_1.Component({ name: 'assets' })
-], AssetsPlugin);
exports.AssetsPlugin = AssetsPlugin;
//# sourceMappingURL=AssetsPlugin.js.map \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/output/plugins/AssetsPlugin.js.map b/node_modules/typedoc/dist/lib/output/plugins/AssetsPlugin.js.map
index 0b5f447f3..3f51f7830 100644
--- a/node_modules/typedoc/dist/lib/output/plugins/AssetsPlugin.js.map
+++ b/node_modules/typedoc/dist/lib/output/plugins/AssetsPlugin.js.map
@@ -1 +1 @@
-{"version":3,"file":"AssetsPlugin.js","sourceRoot":"","sources":["../../../../src/lib/output/plugins/AssetsPlugin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,2BAA6B;AAC7B,6BAA+B;AAE/B,4CAA2D;AAC3D,oCAAwC;AACxC,wCAAqC;AAOrC,IAAa,YAAY;IAAS,gCAAiB;IADnD;QAAA,qEAoCC;QA/BG,uBAAiB,GAAG,IAAI,CAAC;;IA+B7B,CAAC;IA1BG,iCAAU,GAAV;QACI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK;YACpB,GAAC,sBAAa,CAAC,KAAK,IAAG,IAAI,CAAC,eAAe;gBAC7C,CAAC;;IACP,CAAC;IAOO,sCAAe,GAAvB,UAAwB,KAAoB;QACxC,IAAI,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,mBAAQ,CAAC,eAAe,EAAE,EAAE,QAAQ,CAAC,CAAC;QAClE,IAAM,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,eAAe,EAAE,QAAQ,CAAC,CAAC;QAEtD,EAAE,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC;YACzB,EAAE,CAAC,QAAQ,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;QACjC,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,WAAW,GAAG,IAAI,CAAC;QACvB,CAAC;QAED,IAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QAC5D,EAAE,CAAC,CAAC,IAAI,KAAK,WAAW,IAAI,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAC9C,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QAC1B,CAAC;IACL,CAAC;IACL,mBAAC;AAAD,CAAC,AAnCD,CAAkC,8BAAiB,GAmClD;AAnCY,YAAY;IADxB,sBAAS,CAAC,EAAC,IAAI,EAAE,QAAQ,EAAC,CAAC;GACf,YAAY,CAmCxB;AAnCY,oCAAY","sourcesContent":["import * as Path from 'path';\nimport * as FS from 'fs-extra';\n\nimport {Component, RendererComponent} from '../components';\nimport {RendererEvent} from '../events';\nimport {Renderer} from '../renderer';\n\n/**\n * A plugin that copies the subdirectory ´assets´ from the current themes\n * source folder to the output directory.\n */\n@Component({name: 'assets'})\nexport class AssetsPlugin extends RendererComponent {\n /**\n * Should the default assets always be copied to the output directory?\n */\n copyDefaultAssets = true;\n\n /**\n * Create a new AssetsPlugin instance.\n */\n initialize() {\n this.listenTo(this.owner, {\n [RendererEvent.BEGIN]: this.onRendererBegin\n });\n }\n\n /**\n * Triggered before the renderer starts rendering a project.\n *\n * @param event An event object describing the current render operation.\n */\n private onRendererBegin(event: RendererEvent) {\n let fromDefault = Path.join(Renderer.getDefaultTheme(), 'assets');\n const to = Path.join(event.outputDirectory, 'assets');\n\n if (this.copyDefaultAssets) {\n FS.copySync(fromDefault, to);\n } else {\n fromDefault = null;\n }\n\n const from = Path.join(this.owner.theme.basePath, 'assets');\n if (from !== fromDefault && FS.existsSync(from)) {\n FS.copySync(from, to);\n }\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"AssetsPlugin.js","sourceRoot":"","sources":["../../../../src/lib/output/plugins/AssetsPlugin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,2BAA6B;AAC7B,6BAA+B;AAE/B,4CAA6D;AAC7D,oCAA0C;AAC1C,wCAAuC;AAOvC;IAAkC,gCAAiB;IADnD;QAAA,qEAoCC;QA/BG,uBAAiB,GAAG,IAAI,CAAC;;IA+B7B,CAAC;IA1BG,iCAAU,GAAV;QACI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK;YACpB,GAAC,sBAAa,CAAC,KAAK,IAAG,IAAI,CAAC,eAAe;gBAC7C,CAAC;;IACP,CAAC;IAOO,sCAAe,GAAvB,UAAwB,KAAoB;QACxC,IAAI,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,mBAAQ,CAAC,eAAe,EAAE,EAAE,QAAQ,CAAC,CAAC;QAClE,IAAM,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,eAAe,EAAE,QAAQ,CAAC,CAAC;QAEtD,EAAE,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC;YACzB,EAAE,CAAC,QAAQ,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;QACjC,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,WAAW,GAAG,IAAI,CAAC;QACvB,CAAC;QAED,IAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QAC5D,EAAE,CAAC,CAAC,IAAI,KAAK,WAAW,IAAI,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAC9C,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QAC1B,CAAC;IACL,CAAC;IAlCQ,YAAY;QADxB,sBAAS,CAAC,EAAC,IAAI,EAAE,QAAQ,EAAC,CAAC;OACf,YAAY,CAmCxB;IAAD,mBAAC;CAAA,AAnCD,CAAkC,8BAAiB,GAmClD;AAnCY,oCAAY","sourcesContent":["import * as Path from 'path';\nimport * as FS from 'fs-extra';\n\nimport { Component, RendererComponent } from '../components';\nimport { RendererEvent } from '../events';\nimport { Renderer } from '../renderer';\n\n/**\n * A plugin that copies the subdirectory ´assets´ from the current themes\n * source folder to the output directory.\n */\n@Component({name: 'assets'})\nexport class AssetsPlugin extends RendererComponent {\n /**\n * Should the default assets always be copied to the output directory?\n */\n copyDefaultAssets = true;\n\n /**\n * Create a new AssetsPlugin instance.\n */\n initialize() {\n this.listenTo(this.owner, {\n [RendererEvent.BEGIN]: this.onRendererBegin\n });\n }\n\n /**\n * Triggered before the renderer starts rendering a project.\n *\n * @param event An event object describing the current render operation.\n */\n private onRendererBegin(event: RendererEvent) {\n let fromDefault = Path.join(Renderer.getDefaultTheme(), 'assets');\n const to = Path.join(event.outputDirectory, 'assets');\n\n if (this.copyDefaultAssets) {\n FS.copySync(fromDefault, to);\n } else {\n fromDefault = null;\n }\n\n const from = Path.join(this.owner.theme.basePath, 'assets');\n if (from !== fromDefault && FS.existsSync(from)) {\n FS.copySync(from, to);\n }\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/output/plugins/JavascriptIndexPlugin.js b/node_modules/typedoc/dist/lib/output/plugins/JavascriptIndexPlugin.js
index e1c5fd94e..e42195975 100644
--- a/node_modules/typedoc/dist/lib/output/plugins/JavascriptIndexPlugin.js
+++ b/node_modules/typedoc/dist/lib/output/plugins/JavascriptIndexPlugin.js
@@ -67,10 +67,10 @@ var JavascriptIndexPlugin = (function (_super) {
var data = "var typedoc = typedoc || {};\n typedoc.search = typedoc.search || {};\n typedoc.search.data = " + JSON.stringify({ kinds: kinds, rows: rows }) + ";";
fs_1.writeFile(fileName, data, true);
};
+ JavascriptIndexPlugin = __decorate([
+ components_1.Component({ name: 'javascript-index' })
+ ], JavascriptIndexPlugin);
return JavascriptIndexPlugin;
}(components_1.RendererComponent));
-JavascriptIndexPlugin = __decorate([
- components_1.Component({ name: 'javascript-index' })
-], JavascriptIndexPlugin);
exports.JavascriptIndexPlugin = JavascriptIndexPlugin;
//# sourceMappingURL=JavascriptIndexPlugin.js.map \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/output/plugins/JavascriptIndexPlugin.js.map b/node_modules/typedoc/dist/lib/output/plugins/JavascriptIndexPlugin.js.map
index e724e0c3d..f7013442c 100644
--- a/node_modules/typedoc/dist/lib/output/plugins/JavascriptIndexPlugin.js.map
+++ b/node_modules/typedoc/dist/lib/output/plugins/JavascriptIndexPlugin.js.map
@@ -1 +1 @@
-{"version":3,"file":"JavascriptIndexPlugin.js","sourceRoot":"","sources":["../../../../src/lib/output/plugins/JavascriptIndexPlugin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,2BAA6B;AAE7B,wDAAwF;AACxF,mEAAgE;AAChE,4CAA2D;AAC3D,qCAAyC;AACzC,oCAAwC;AAQxC,IAAa,qBAAqB;IAAS,yCAAiB;IAA5D;;IA8DA,CAAC;IA1DG,0CAAU,GAAV;QACI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,sBAAa,CAAC,KAAK,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;IACzE,CAAC;IAOO,+CAAe,GAAvB,UAAwB,KAAoB;QACxC,IAAM,IAAI,GAAU,EAAE,CAAC;QACvB,IAAM,KAAK,GAAG,EAAE,CAAC;QAEjB,GAAG,CAAC,CAAC,IAAI,GAAG,IAAI,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC;YACxC,IAAM,UAAU,GAAkD,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;YACjG,EAAE,CAAC,CAAC,CAAC,CAAC,UAAU,YAAY,6BAAqB,CAAC,CAAC,CAAC,CAAC;gBACjD,QAAQ,CAAC;YACb,CAAC;YAED,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG;gBACf,CAAC,UAAU,CAAC,IAAI;gBAChB,UAAU,CAAC,KAAK,CAAC,UAAU;gBAC3B,UAAU,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC;gBACzB,QAAQ,CAAC;YACb,CAAC;YAED,IAAI,QAAM,GAAG,UAAU,CAAC,MAAM,CAAC;YAC/B,EAAE,CAAC,CAAC,QAAM,YAAY,yBAAiB,CAAC,CAAC,CAAC;gBACtC,QAAM,GAAG,IAAI,CAAC;YAClB,CAAC;YAED,IAAM,GAAG,GAAQ;gBACb,EAAE,EAAE,IAAI,CAAC,MAAM;gBACf,IAAI,EAAK,UAAU,CAAC,IAAI;gBACxB,IAAI,EAAK,UAAU,CAAC,IAAI;gBACxB,GAAG,EAAM,UAAU,CAAC,GAAG;gBACvB,OAAO,EAAE,UAAU,CAAC,UAAU;aACjC,CAAC;YAEF,EAAE,CAAC,CAAC,QAAM,CAAC,CAAC,CAAC;gBACT,GAAG,CAAC,MAAM,GAAG,QAAM,CAAC,WAAW,EAAE,CAAC;YACtC,CAAC;YAED,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;gBAC1B,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,yBAAW,CAAC,eAAe,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;YAC1E,CAAC;YAED,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACnB,CAAC;QAED,IAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,eAAe,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC;QAC/E,IAAM,IAAI,GACN,yHAEwB,IAAI,CAAC,SAAS,CAAC,EAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAC,CAAC,MAAG,CAAC;QAE1E,cAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IACpC,CAAC;IACL,4BAAC;AAAD,CAAC,AA9DD,CAA2C,8BAAiB,GA8D3D;AA9DY,qBAAqB;IADjC,sBAAS,CAAC,EAAC,IAAI,EAAE,kBAAkB,EAAC,CAAC;GACzB,qBAAqB,CA8DjC;AA9DY,sDAAqB","sourcesContent":["import * as Path from 'path';\n\nimport {DeclarationReflection, ProjectReflection} from '../../models/reflections/index';\nimport {GroupPlugin} from '../../converter/plugins/GroupPlugin';\nimport {Component, RendererComponent} from '../components';\nimport {writeFile} from '../../utils/fs';\nimport {RendererEvent} from '../events';\n\n/**\n * A plugin that exports an index of the project to a javascript file.\n *\n * The resulting javascript file can be used to build a simple search function.\n */\n@Component({name: 'javascript-index'})\nexport class JavascriptIndexPlugin extends RendererComponent {\n /**\n * Create a new JavascriptIndexPlugin instance.\n */\n initialize() {\n this.listenTo(this.owner, RendererEvent.BEGIN, this.onRendererBegin);\n }\n\n /**\n * Triggered after a document has been rendered, just before it is written to disc.\n *\n * @param event An event object describing the current render operation.\n */\n private onRendererBegin(event: RendererEvent) {\n const rows: any[] = [];\n const kinds = {};\n\n for (let key in event.project.reflections) {\n const reflection: DeclarationReflection = <DeclarationReflection> event.project.reflections[key];\n if (!(reflection instanceof DeclarationReflection)) {\n continue;\n }\n\n if (!reflection.url ||\n !reflection.name ||\n reflection.flags.isExternal ||\n reflection.name === '') {\n continue;\n }\n\n let parent = reflection.parent;\n if (parent instanceof ProjectReflection) {\n parent = null;\n }\n\n const row: any = {\n id: rows.length,\n kind: reflection.kind,\n name: reflection.name,\n url: reflection.url,\n classes: reflection.cssClasses\n };\n\n if (parent) {\n row.parent = parent.getFullName();\n }\n\n if (!kinds[reflection.kind]) {\n kinds[reflection.kind] = GroupPlugin.getKindSingular(reflection.kind);\n }\n\n rows.push(row);\n }\n\n const fileName = Path.join(event.outputDirectory, 'assets', 'js', 'search.js');\n const data =\n `var typedoc = typedoc || {};\n typedoc.search = typedoc.search || {};\n typedoc.search.data = ${JSON.stringify({kinds: kinds, rows: rows})};`;\n\n writeFile(fileName, data, true);\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"JavascriptIndexPlugin.js","sourceRoot":"","sources":["../../../../src/lib/output/plugins/JavascriptIndexPlugin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,2BAA6B;AAE7B,wDAA0F;AAC1F,mEAAkE;AAClE,4CAA6D;AAC7D,qCAA2C;AAC3C,oCAA0C;AAQ1C;IAA2C,yCAAiB;IAA5D;;IA8DA,CAAC;IA1DG,0CAAU,GAAV;QACI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,sBAAa,CAAC,KAAK,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;IACzE,CAAC;IAOO,+CAAe,GAAvB,UAAwB,KAAoB;QACxC,IAAM,IAAI,GAAU,EAAE,CAAC;QACvB,IAAM,KAAK,GAAG,EAAE,CAAC;QAEjB,GAAG,CAAC,CAAC,IAAI,GAAG,IAAI,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC;YACxC,IAAM,UAAU,GAAkD,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;YACjG,EAAE,CAAC,CAAC,CAAC,CAAC,UAAU,YAAY,6BAAqB,CAAC,CAAC,CAAC,CAAC;gBACjD,QAAQ,CAAC;YACb,CAAC;YAED,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG;gBACf,CAAC,UAAU,CAAC,IAAI;gBAChB,UAAU,CAAC,KAAK,CAAC,UAAU;gBAC3B,UAAU,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC;gBACzB,QAAQ,CAAC;YACb,CAAC;YAED,IAAI,QAAM,GAAG,UAAU,CAAC,MAAM,CAAC;YAC/B,EAAE,CAAC,CAAC,QAAM,YAAY,yBAAiB,CAAC,CAAC,CAAC;gBACtC,QAAM,GAAG,IAAI,CAAC;YAClB,CAAC;YAED,IAAM,GAAG,GAAQ;gBACb,EAAE,EAAE,IAAI,CAAC,MAAM;gBACf,IAAI,EAAK,UAAU,CAAC,IAAI;gBACxB,IAAI,EAAK,UAAU,CAAC,IAAI;gBACxB,GAAG,EAAM,UAAU,CAAC,GAAG;gBACvB,OAAO,EAAE,UAAU,CAAC,UAAU;aACjC,CAAC;YAEF,EAAE,CAAC,CAAC,QAAM,CAAC,CAAC,CAAC;gBACT,GAAG,CAAC,MAAM,GAAG,QAAM,CAAC,WAAW,EAAE,CAAC;YACtC,CAAC;YAED,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;gBAC1B,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,yBAAW,CAAC,eAAe,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;YAC1E,CAAC;YAED,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACnB,CAAC;QAED,IAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,eAAe,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC;QAC/E,IAAM,IAAI,GACN,yHAEwB,IAAI,CAAC,SAAS,CAAC,EAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAC,CAAC,MAAG,CAAC;QAE1E,cAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IACpC,CAAC;IA7DQ,qBAAqB;QADjC,sBAAS,CAAC,EAAC,IAAI,EAAE,kBAAkB,EAAC,CAAC;OACzB,qBAAqB,CA8DjC;IAAD,4BAAC;CAAA,AA9DD,CAA2C,8BAAiB,GA8D3D;AA9DY,sDAAqB","sourcesContent":["import * as Path from 'path';\n\nimport { DeclarationReflection, ProjectReflection } from '../../models/reflections/index';\nimport { GroupPlugin } from '../../converter/plugins/GroupPlugin';\nimport { Component, RendererComponent } from '../components';\nimport { writeFile } from '../../utils/fs';\nimport { RendererEvent } from '../events';\n\n/**\n * A plugin that exports an index of the project to a javascript file.\n *\n * The resulting javascript file can be used to build a simple search function.\n */\n@Component({name: 'javascript-index'})\nexport class JavascriptIndexPlugin extends RendererComponent {\n /**\n * Create a new JavascriptIndexPlugin instance.\n */\n initialize() {\n this.listenTo(this.owner, RendererEvent.BEGIN, this.onRendererBegin);\n }\n\n /**\n * Triggered after a document has been rendered, just before it is written to disc.\n *\n * @param event An event object describing the current render operation.\n */\n private onRendererBegin(event: RendererEvent) {\n const rows: any[] = [];\n const kinds = {};\n\n for (let key in event.project.reflections) {\n const reflection: DeclarationReflection = <DeclarationReflection> event.project.reflections[key];\n if (!(reflection instanceof DeclarationReflection)) {\n continue;\n }\n\n if (!reflection.url ||\n !reflection.name ||\n reflection.flags.isExternal ||\n reflection.name === '') {\n continue;\n }\n\n let parent = reflection.parent;\n if (parent instanceof ProjectReflection) {\n parent = null;\n }\n\n const row: any = {\n id: rows.length,\n kind: reflection.kind,\n name: reflection.name,\n url: reflection.url,\n classes: reflection.cssClasses\n };\n\n if (parent) {\n row.parent = parent.getFullName();\n }\n\n if (!kinds[reflection.kind]) {\n kinds[reflection.kind] = GroupPlugin.getKindSingular(reflection.kind);\n }\n\n rows.push(row);\n }\n\n const fileName = Path.join(event.outputDirectory, 'assets', 'js', 'search.js');\n const data =\n `var typedoc = typedoc || {};\n typedoc.search = typedoc.search || {};\n typedoc.search.data = ${JSON.stringify({kinds: kinds, rows: rows})};`;\n\n writeFile(fileName, data, true);\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/output/plugins/LayoutPlugin.js b/node_modules/typedoc/dist/lib/output/plugins/LayoutPlugin.js
index 5213e5e0c..756502c2b 100644
--- a/node_modules/typedoc/dist/lib/output/plugins/LayoutPlugin.js
+++ b/node_modules/typedoc/dist/lib/output/plugins/LayoutPlugin.js
@@ -30,10 +30,10 @@ var LayoutPlugin = (function (_super) {
var layout = this.owner.theme.resources.layouts.getResource('default').getTemplate();
page.contents = layout(page);
};
+ LayoutPlugin = __decorate([
+ components_1.Component({ name: 'layout' })
+ ], LayoutPlugin);
return LayoutPlugin;
}(components_1.RendererComponent));
-LayoutPlugin = __decorate([
- components_1.Component({ name: 'layout' })
-], LayoutPlugin);
exports.LayoutPlugin = LayoutPlugin;
//# sourceMappingURL=LayoutPlugin.js.map \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/output/plugins/LayoutPlugin.js.map b/node_modules/typedoc/dist/lib/output/plugins/LayoutPlugin.js.map
index 7c7e1cea9..30b479451 100644
--- a/node_modules/typedoc/dist/lib/output/plugins/LayoutPlugin.js.map
+++ b/node_modules/typedoc/dist/lib/output/plugins/LayoutPlugin.js.map
@@ -1 +1 @@
-{"version":3,"file":"LayoutPlugin.js","sourceRoot":"","sources":["../../../../src/lib/output/plugins/LayoutPlugin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,4CAA2D;AAC3D,oCAAoC;AASpC,IAAa,YAAY;IAAS,gCAAiB;IAAnD;;IAiBA,CAAC;IAbG,iCAAU,GAAV;QACI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,kBAAS,CAAC,GAAG,EAAE,IAAI,CAAC,iBAAiB,CAAC,CAAC;IACrE,CAAC;IAOO,wCAAiB,GAAzB,UAA0B,IAAe;QACrC,IAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,WAAW,EAAE,CAAC;QACvF,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC;IACL,mBAAC;AAAD,CAAC,AAjBD,CAAkC,8BAAiB,GAiBlD;AAjBY,YAAY;IADxB,sBAAS,CAAC,EAAC,IAAI,EAAE,QAAQ,EAAC,CAAC;GACf,YAAY,CAiBxB;AAjBY,oCAAY","sourcesContent":["import {Component, RendererComponent} from '../components';\nimport {PageEvent} from '../events';\n\n/**\n * A plugin that wraps the generated output with a layout template.\n *\n * Currently only a default layout is supported. The layout must be stored\n * as ´layouts/default.hbs´ in the theme directory.\n */\n@Component({name: 'layout'})\nexport class LayoutPlugin extends RendererComponent {\n /**\n * Create a new LayoutPlugin instance.\n */\n initialize() {\n this.listenTo(this.owner, PageEvent.END, this.onRendererEndPage);\n }\n\n /**\n * Triggered after a document has been rendered, just before it is written to disc.\n *\n * @param page An event object describing the current render operation.\n */\n private onRendererEndPage(page: PageEvent) {\n const layout = this.owner.theme.resources.layouts.getResource('default').getTemplate();\n page.contents = layout(page);\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"LayoutPlugin.js","sourceRoot":"","sources":["../../../../src/lib/output/plugins/LayoutPlugin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,4CAA6D;AAC7D,oCAAsC;AAStC;IAAkC,gCAAiB;IAAnD;;IAiBA,CAAC;IAbG,iCAAU,GAAV;QACI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,kBAAS,CAAC,GAAG,EAAE,IAAI,CAAC,iBAAiB,CAAC,CAAC;IACrE,CAAC;IAOO,wCAAiB,GAAzB,UAA0B,IAAe;QACrC,IAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,WAAW,EAAE,CAAC;QACvF,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC;IAhBQ,YAAY;QADxB,sBAAS,CAAC,EAAC,IAAI,EAAE,QAAQ,EAAC,CAAC;OACf,YAAY,CAiBxB;IAAD,mBAAC;CAAA,AAjBD,CAAkC,8BAAiB,GAiBlD;AAjBY,oCAAY","sourcesContent":["import { Component, RendererComponent } from '../components';\nimport { PageEvent } from '../events';\n\n/**\n * A plugin that wraps the generated output with a layout template.\n *\n * Currently only a default layout is supported. The layout must be stored\n * as ´layouts/default.hbs´ in the theme directory.\n */\n@Component({name: 'layout'})\nexport class LayoutPlugin extends RendererComponent {\n /**\n * Create a new LayoutPlugin instance.\n */\n initialize() {\n this.listenTo(this.owner, PageEvent.END, this.onRendererEndPage);\n }\n\n /**\n * Triggered after a document has been rendered, just before it is written to disc.\n *\n * @param page An event object describing the current render operation.\n */\n private onRendererEndPage(page: PageEvent) {\n const layout = this.owner.theme.resources.layouts.getResource('default').getTemplate();\n page.contents = layout(page);\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/output/plugins/MarkedLinksPlugin.js b/node_modules/typedoc/dist/lib/output/plugins/MarkedLinksPlugin.js
index b3540db9b..fdb4f64a1 100644
--- a/node_modules/typedoc/dist/lib/output/plugins/MarkedLinksPlugin.js
+++ b/node_modules/typedoc/dist/lib/output/plugins/MarkedLinksPlugin.js
@@ -21,7 +21,7 @@ var components_1 = require("../components");
var events_1 = require("../events");
var component_1 = require("../../utils/component");
var declaration_1 = require("../../utils/options/declaration");
-var MarkedLinksPlugin = MarkedLinksPlugin_1 = (function (_super) {
+var MarkedLinksPlugin = (function (_super) {
__extends(MarkedLinksPlugin, _super);
function MarkedLinksPlugin() {
var _this = _super !== null && _super.apply(this, arguments) || this;
@@ -31,6 +31,7 @@ var MarkedLinksPlugin = MarkedLinksPlugin_1 = (function (_super) {
_this.warnings = [];
return _this;
}
+ MarkedLinksPlugin_1 = MarkedLinksPlugin;
MarkedLinksPlugin.prototype.initialize = function () {
_super.prototype.initialize.call(this);
this.listenTo(this.owner, (_a = {},
@@ -121,18 +122,18 @@ var MarkedLinksPlugin = MarkedLinksPlugin_1 = (function (_super) {
};
}
};
+ __decorate([
+ component_1.Option({
+ name: 'listInvalidSymbolLinks',
+ help: 'Emits a list of broken symbol [[navigation]] links after documentation generation',
+ type: declaration_1.ParameterType.Boolean
+ })
+ ], MarkedLinksPlugin.prototype, "listInvalidSymbolLinks", void 0);
+ MarkedLinksPlugin = MarkedLinksPlugin_1 = __decorate([
+ components_1.Component({ name: 'marked-links' })
+ ], MarkedLinksPlugin);
return MarkedLinksPlugin;
+ var MarkedLinksPlugin_1;
}(components_1.ContextAwareRendererComponent));
-__decorate([
- component_1.Option({
- name: 'listInvalidSymbolLinks',
- help: 'Emits a list of broken symbol [[navigation]] links after documentation generation',
- type: declaration_1.ParameterType.Boolean
- })
-], MarkedLinksPlugin.prototype, "listInvalidSymbolLinks", void 0);
-MarkedLinksPlugin = MarkedLinksPlugin_1 = __decorate([
- components_1.Component({ name: 'marked-links' })
-], MarkedLinksPlugin);
exports.MarkedLinksPlugin = MarkedLinksPlugin;
-var MarkedLinksPlugin_1;
//# sourceMappingURL=MarkedLinksPlugin.js.map \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/output/plugins/MarkedLinksPlugin.js.map b/node_modules/typedoc/dist/lib/output/plugins/MarkedLinksPlugin.js.map
index 3cfd6ac28..da951896a 100644
--- a/node_modules/typedoc/dist/lib/output/plugins/MarkedLinksPlugin.js.map
+++ b/node_modules/typedoc/dist/lib/output/plugins/MarkedLinksPlugin.js.map
@@ -1 +1 @@
-{"version":3,"file":"MarkedLinksPlugin.js","sourceRoot":"","sources":["../../../../src/lib/output/plugins/MarkedLinksPlugin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,2BAA6B;AAG7B,4CAAuE;AACvE,oCAAuD;AACvD,mDAA6C;AAC7C,+DAA8D;AAM9D,IAAa,iBAAiB;IAAS,qCAA6B;IADpE;QAAA,qEAoKC;QA/JW,cAAQ,GAAW,mBAAmB,CAAC;QAKvC,eAAS,GAAW,+DAA+D,CAAC;QAKpF,eAAS,GAAW,oBAAoB,CAAC;QASzC,cAAQ,GAAa,EAAE,CAAC;;IA4IpC,CAAC;IAvIG,sCAAU,GAAV;QACI,iBAAM,UAAU,WAAE,CAAC;QACnB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK;YACpB,GAAC,sBAAa,CAAC,KAAK,IAAG,IAAI,CAAC,eAAe;YAC3C,GAAC,sBAAa,CAAC,GAAG,IAAG,IAAI,CAAC,aAAa;iBACxC,IAAI,EAAE,GAAG,CAAC,CAAC;;IAClB,CAAC;IAaO,2CAAe,GAAvB,UAAwB,IAAY;QAApC,iBAKC;QAJG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,UAAC,KAAa,EAAE,OAAe;YAC9D,IAAM,KAAK,GAAG,mBAAiB,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;YACvD,MAAM,CAAC,KAAI,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;QAC9D,CAAC,CAAC,CAAC;IACP,CAAC;IAQO,6CAAiB,GAAzB,UAA0B,IAAY;QAAtC,iBAgBC;QAfG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,UAAC,KAAa,EAAE,OAAe,EAAE,OAAe,EAAE,OAAe;YACjG,IAAM,KAAK,GAAK,mBAAiB,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;YACzD,IAAM,MAAM,GAAI,KAAK,CAAC,MAAM,CAAC;YAC7B,IAAM,OAAO,GAAG,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC;YAEzC,IAAI,SAAkB,CAAC;YACvB,EAAE,CAAC,CAAC,OAAO,KAAK,UAAU,CAAC,CAAC,CAAC;gBACzB,SAAS,GAAG,IAAI,CAAC;YACrB,CAAC;YACD,EAAE,CAAC,CAAC,OAAO,KAAK,WAAW,CAAC,CAAC,CAAC;gBAC1B,SAAS,GAAG,KAAK,CAAC;YACtB,CAAC;YAED,MAAM,CAAC,KAAI,CAAC,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC;QAC7D,CAAC,CAAC,CAAC;IACP,CAAC;IAWO,qCAAS,GAAjB,UAAkB,QAAgB,EAAE,MAAc,EAAE,OAAe,EAAE,SAAmB;QACpF,IAAI,UAAU,GAAG,EAAE,CAAC;QACpB,EAAE,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YAC9B,UAAU,GAAG,mBAAmB,CAAC;QACrC,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,IAAI,UAAU,SAAY,CAAC;YAC3B,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;gBAClB,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC;YAC9D,CAAC;YAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;gBACtB,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC;YAC3D,CAAC;YAED,EAAE,CAAC,CAAC,UAAU,IAAI,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC;gBAC/B,MAAM,GAAG,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;YACjD,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,UAAU,GAAG,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,OAAO,CAAC;gBAC7C,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAM,UAAU,CAAC,WAAW,EAAE,UAAK,QAAU,CAAC,CAAC;gBAClE,MAAM,CAAC,QAAQ,CAAC;YACpB,CAAC;QACL,CAAC;QAED,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;YACZ,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,CAAC;QAC7C,CAAC;QAED,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,uBAAuB,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;IAC7E,CAAC;IAOD,2CAAe,GAAf,UAAgB,KAAoB;QAChC,KAAK,CAAC,UAAU,GAAG,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC;IACtF,CAAC;IAKD,yCAAa,GAAb,UAAc,KAAoB;QAC9B,EAAE,CAAC,CAAC,IAAI,CAAC,sBAAsB,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;YAC1D,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YAClC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,oEAAoE;gBAC7F,+DAA+D,CAAC,CAAC;YAErE,GAAG,CAAC,CAAgB,UAAa,EAAb,KAAA,IAAI,CAAC,QAAQ,EAAb,cAAa,EAAb,IAAa;gBAA5B,IAAI,OAAO,SAAA;gBACZ,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,GAAG,OAAO,CAAC,CAAC;aACjD;QACL,CAAC;IACL,CAAC;IAQM,+BAAa,GAApB,UAAqB,IAAY;QAC7B,IAAI,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACnC,EAAE,CAAC,CAAC,UAAU,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;YACpB,UAAU,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACnC,CAAC;QAED,EAAE,CAAC,CAAC,UAAU,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;YACpB,MAAM,CAAC;gBACH,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;gBACxD,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,UAAU,CAAC;aACrC,CAAC;QACN,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,MAAM,CAAC;gBACH,OAAO,EAAE,IAAI;gBACb,MAAM,EAAE,IAAI;aACf,CAAC;QACN,CAAC;IACL,CAAC;IACL,wBAAC;AAAD,CAAC,AAnKD,CAAuC,0CAA6B,GAmKnE;AA9IG;IALC,kBAAM,CAAC;QACJ,IAAI,EAAE,wBAAwB;QAC9B,IAAI,EAAE,mFAAmF;QACzF,IAAI,EAAE,2BAAa,CAAC,OAAO;KAC9B,CAAC;iEAC8B;AArBvB,iBAAiB;IAD7B,sBAAS,CAAC,EAAC,IAAI,EAAE,cAAc,EAAC,CAAC;GACrB,iBAAiB,CAmK7B;AAnKY,8CAAiB","sourcesContent":["import * as Util from 'util';\n\nimport {Reflection} from '../../models/reflections/abstract';\nimport {Component, ContextAwareRendererComponent} from '../components';\nimport {MarkdownEvent, RendererEvent} from '../events';\nimport {Option} from '../../utils/component';\nimport {ParameterType} from '../../utils/options/declaration';\n\n/**\n * A plugin that builds links in markdown texts.\n */\n@Component({name: 'marked-links'})\nexport class MarkedLinksPlugin extends ContextAwareRendererComponent {\n /**\n * Regular expression for detecting bracket links.\n */\n private brackets: RegExp = /\\[\\[([^\\]]+)\\]\\]/g;\n\n /**\n * Regular expression for detecting inline tags like {@link ...}.\n */\n private inlineTag: RegExp = /(?:\\[(.+?)\\])?\\{@(link|linkcode|linkplain)\\s+((?:.|\\n)+?)\\}/gi;\n\n /**\n * Regular expression to test if a string looks like an external url.\n */\n private urlPrefix: RegExp = /^(http|ftp)s?:\\/\\//;\n\n @Option({\n name: 'listInvalidSymbolLinks',\n help: 'Emits a list of broken symbol [[navigation]] links after documentation generation',\n type: ParameterType.Boolean\n })\n listInvalidSymbolLinks: boolean;\n\n private warnings: string[] = [];\n\n /**\n * Create a new MarkedLinksPlugin instance.\n */\n initialize() {\n super.initialize();\n this.listenTo(this.owner, {\n [MarkdownEvent.PARSE]: this.onParseMarkdown,\n [RendererEvent.END]: this.onEndRenderer\n }, null, 100);\n }\n\n /**\n * Find all references to symbols within the given text and transform them into a link.\n *\n * This function is aware of the current context and will try to find the symbol within the\n * current reflection. It will walk up the reflection chain till the symbol is found or the\n * root reflection is reached. As a last resort the function will search the entire project\n * for the given symbol.\n *\n * @param text The text that should be parsed.\n * @returns The text with symbol references replaced by links.\n */\n private replaceBrackets(text: string): string {\n return text.replace(this.brackets, (match: string, content: string): string => {\n const split = MarkedLinksPlugin.splitLinkText(content);\n return this.buildLink(match, split.target, split.caption);\n });\n }\n\n /**\n * Find symbol {@link ...} strings in text and turn into html links\n *\n * @param text The string in which to replace the inline tags.\n * @return The updated string.\n */\n private replaceInlineTags(text: string): string {\n return text.replace(this.inlineTag, (match: string, leading: string, tagName: string, content: string): string => {\n const split = MarkedLinksPlugin.splitLinkText(content);\n const target = split.target;\n const caption = leading || split.caption;\n\n let monospace: boolean;\n if (tagName === 'linkcode') {\n monospace = true;\n }\n if (tagName === 'linkplain') {\n monospace = false;\n }\n\n return this.buildLink(match, target, caption, monospace);\n });\n }\n\n /**\n * Format a link with the given text and target.\n *\n * @param original The original link string, will be returned if the target cannot be resolved..\n * @param target The link target.\n * @param caption The caption of the link.\n * @param monospace Whether to use monospace formatting or not.\n * @returns A html link tag.\n */\n private buildLink(original: string, target: string, caption: string, monospace?: boolean): string {\n let attributes = '';\n if (this.urlPrefix.test(target)) {\n attributes = ' class=\"external\"';\n } else {\n let reflection: Reflection;\n if (this.reflection) {\n reflection = this.reflection.findReflectionByName(target);\n } else if (this.project) {\n reflection = this.project.findReflectionByName(target);\n }\n\n if (reflection && reflection.url) {\n target = this.getRelativeUrl(reflection.url);\n } else {\n reflection = this.reflection || this.project;\n this.warnings.push(`In ${reflection.getFullName()}: ${original}`);\n return original;\n }\n }\n\n if (monospace) {\n caption = '<code>' + caption + '</code>';\n }\n\n return Util.format('<a href=\"%s\"%s>%s</a>', target, attributes, caption);\n }\n\n /**\n * Triggered when [[MarkedPlugin]] parses a markdown string.\n *\n * @param event\n */\n onParseMarkdown(event: MarkdownEvent) {\n event.parsedText = this.replaceInlineTags(this.replaceBrackets(event.parsedText));\n }\n\n /**\n * Triggered when [[Renderer]] is finished\n */\n onEndRenderer(event: RendererEvent) {\n if (this.listInvalidSymbolLinks && this.warnings.length > 0) {\n this.application.logger.write('');\n this.application.logger.warn('[MarkedLinksPlugin]: Found invalid symbol reference(s) in JSDocs, ' +\n 'they will not render as links in the generated documentation.');\n\n for (let warning of this.warnings) {\n this.application.logger.write(' ' + warning);\n }\n }\n }\n\n /**\n * Split the given link into text and target at first pipe or space.\n *\n * @param text The source string that should be checked for a split character.\n * @returns An object containing the link text and target.\n */\n static splitLinkText(text: string): { caption: string; target: string; } {\n let splitIndex = text.indexOf('|');\n if (splitIndex === -1) {\n splitIndex = text.search(/\\s/);\n }\n\n if (splitIndex !== -1) {\n return {\n caption: text.substr(splitIndex + 1).replace(/\\n+/, ' '),\n target: text.substr(0, splitIndex)\n };\n } else {\n return {\n caption: text,\n target: text\n };\n }\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"MarkedLinksPlugin.js","sourceRoot":"","sources":["../../../../src/lib/output/plugins/MarkedLinksPlugin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,2BAA6B;AAG7B,4CAAyE;AACzE,oCAAyD;AACzD,mDAA+C;AAC/C,+DAAgE;AAMhE;IAAuC,qCAA6B;IADpE;QAAA,qEAoKC;QA/JW,cAAQ,GAAW,mBAAmB,CAAC;QAKvC,eAAS,GAAW,+DAA+D,CAAC;QAKpF,eAAS,GAAW,oBAAoB,CAAC;QASzC,cAAQ,GAAa,EAAE,CAAC;;IA4IpC,CAAC;0BAnKY,iBAAiB;IA4B1B,sCAAU,GAAV;QACI,iBAAM,UAAU,WAAE,CAAC;QACnB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK;YACpB,GAAC,sBAAa,CAAC,KAAK,IAAG,IAAI,CAAC,eAAe;YAC3C,GAAC,sBAAa,CAAC,GAAG,IAAG,IAAI,CAAC,aAAa;iBACxC,IAAI,EAAE,GAAG,CAAC,CAAC;;IAClB,CAAC;IAaO,2CAAe,GAAvB,UAAwB,IAAY;QAApC,iBAKC;QAJG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,UAAC,KAAa,EAAE,OAAe;YAC9D,IAAM,KAAK,GAAG,mBAAiB,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;YACvD,MAAM,CAAC,KAAI,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;QAC9D,CAAC,CAAC,CAAC;IACP,CAAC;IAQO,6CAAiB,GAAzB,UAA0B,IAAY;QAAtC,iBAgBC;QAfG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,UAAC,KAAa,EAAE,OAAe,EAAE,OAAe,EAAE,OAAe;YACjG,IAAM,KAAK,GAAK,mBAAiB,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;YACzD,IAAM,MAAM,GAAI,KAAK,CAAC,MAAM,CAAC;YAC7B,IAAM,OAAO,GAAG,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC;YAEzC,IAAI,SAAkB,CAAC;YACvB,EAAE,CAAC,CAAC,OAAO,KAAK,UAAU,CAAC,CAAC,CAAC;gBACzB,SAAS,GAAG,IAAI,CAAC;YACrB,CAAC;YACD,EAAE,CAAC,CAAC,OAAO,KAAK,WAAW,CAAC,CAAC,CAAC;gBAC1B,SAAS,GAAG,KAAK,CAAC;YACtB,CAAC;YAED,MAAM,CAAC,KAAI,CAAC,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC;QAC7D,CAAC,CAAC,CAAC;IACP,CAAC;IAWO,qCAAS,GAAjB,UAAkB,QAAgB,EAAE,MAAc,EAAE,OAAe,EAAE,SAAmB;QACpF,IAAI,UAAU,GAAG,EAAE,CAAC;QACpB,EAAE,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YAC9B,UAAU,GAAG,mBAAmB,CAAC;QACrC,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,IAAI,UAAU,SAAY,CAAC;YAC3B,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;gBAClB,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC;YAC9D,CAAC;YAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;gBACtB,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC;YAC3D,CAAC;YAED,EAAE,CAAC,CAAC,UAAU,IAAI,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC;gBAC/B,MAAM,GAAG,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;YACjD,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,UAAU,GAAG,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,OAAO,CAAC;gBAC7C,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAM,UAAU,CAAC,WAAW,EAAE,UAAK,QAAU,CAAC,CAAC;gBAClE,MAAM,CAAC,QAAQ,CAAC;YACpB,CAAC;QACL,CAAC;QAED,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;YACZ,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,CAAC;QAC7C,CAAC;QAED,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,uBAAuB,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;IAC7E,CAAC;IAOD,2CAAe,GAAf,UAAgB,KAAoB;QAChC,KAAK,CAAC,UAAU,GAAG,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC;IACtF,CAAC;IAKD,yCAAa,GAAb,UAAc,KAAoB;QAC9B,EAAE,CAAC,CAAC,IAAI,CAAC,sBAAsB,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;YAC1D,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YAClC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,oEAAoE;gBAC7F,+DAA+D,CAAC,CAAC;YAErE,GAAG,CAAC,CAAgB,UAAa,EAAb,KAAA,IAAI,CAAC,QAAQ,EAAb,cAAa,EAAb,IAAa;gBAA5B,IAAI,OAAO,SAAA;gBACZ,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,GAAG,OAAO,CAAC,CAAC;aACjD;QACL,CAAC;IACL,CAAC;IAQM,+BAAa,GAApB,UAAqB,IAAY;QAC7B,IAAI,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACnC,EAAE,CAAC,CAAC,UAAU,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;YACpB,UAAU,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACnC,CAAC;QAED,EAAE,CAAC,CAAC,UAAU,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;YACpB,MAAM,CAAC;gBACH,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;gBACxD,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,UAAU,CAAC;aACrC,CAAC;QACN,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,MAAM,CAAC;gBACH,OAAO,EAAE,IAAI;gBACb,MAAM,EAAE,IAAI;aACf,CAAC;QACN,CAAC;IACL,CAAC;IA7ID;QALC,kBAAM,CAAC;YACJ,IAAI,EAAE,wBAAwB;YAC9B,IAAI,EAAE,mFAAmF;YACzF,IAAI,EAAE,2BAAa,CAAC,OAAO;SAC9B,CAAC;qEAC8B;IArBvB,iBAAiB;QAD7B,sBAAS,CAAC,EAAC,IAAI,EAAE,cAAc,EAAC,CAAC;OACrB,iBAAiB,CAmK7B;IAAD,wBAAC;;CAAA,AAnKD,CAAuC,0CAA6B,GAmKnE;AAnKY,8CAAiB","sourcesContent":["import * as Util from 'util';\n\nimport { Reflection } from '../../models/reflections/abstract';\nimport { Component, ContextAwareRendererComponent } from '../components';\nimport { MarkdownEvent, RendererEvent } from '../events';\nimport { Option } from '../../utils/component';\nimport { ParameterType } from '../../utils/options/declaration';\n\n/**\n * A plugin that builds links in markdown texts.\n */\n@Component({name: 'marked-links'})\nexport class MarkedLinksPlugin extends ContextAwareRendererComponent {\n /**\n * Regular expression for detecting bracket links.\n */\n private brackets: RegExp = /\\[\\[([^\\]]+)\\]\\]/g;\n\n /**\n * Regular expression for detecting inline tags like {@link ...}.\n */\n private inlineTag: RegExp = /(?:\\[(.+?)\\])?\\{@(link|linkcode|linkplain)\\s+((?:.|\\n)+?)\\}/gi;\n\n /**\n * Regular expression to test if a string looks like an external url.\n */\n private urlPrefix: RegExp = /^(http|ftp)s?:\\/\\//;\n\n @Option({\n name: 'listInvalidSymbolLinks',\n help: 'Emits a list of broken symbol [[navigation]] links after documentation generation',\n type: ParameterType.Boolean\n })\n listInvalidSymbolLinks: boolean;\n\n private warnings: string[] = [];\n\n /**\n * Create a new MarkedLinksPlugin instance.\n */\n initialize() {\n super.initialize();\n this.listenTo(this.owner, {\n [MarkdownEvent.PARSE]: this.onParseMarkdown,\n [RendererEvent.END]: this.onEndRenderer\n }, null, 100);\n }\n\n /**\n * Find all references to symbols within the given text and transform them into a link.\n *\n * This function is aware of the current context and will try to find the symbol within the\n * current reflection. It will walk up the reflection chain till the symbol is found or the\n * root reflection is reached. As a last resort the function will search the entire project\n * for the given symbol.\n *\n * @param text The text that should be parsed.\n * @returns The text with symbol references replaced by links.\n */\n private replaceBrackets(text: string): string {\n return text.replace(this.brackets, (match: string, content: string): string => {\n const split = MarkedLinksPlugin.splitLinkText(content);\n return this.buildLink(match, split.target, split.caption);\n });\n }\n\n /**\n * Find symbol {@link ...} strings in text and turn into html links\n *\n * @param text The string in which to replace the inline tags.\n * @return The updated string.\n */\n private replaceInlineTags(text: string): string {\n return text.replace(this.inlineTag, (match: string, leading: string, tagName: string, content: string): string => {\n const split = MarkedLinksPlugin.splitLinkText(content);\n const target = split.target;\n const caption = leading || split.caption;\n\n let monospace: boolean;\n if (tagName === 'linkcode') {\n monospace = true;\n }\n if (tagName === 'linkplain') {\n monospace = false;\n }\n\n return this.buildLink(match, target, caption, monospace);\n });\n }\n\n /**\n * Format a link with the given text and target.\n *\n * @param original The original link string, will be returned if the target cannot be resolved..\n * @param target The link target.\n * @param caption The caption of the link.\n * @param monospace Whether to use monospace formatting or not.\n * @returns A html link tag.\n */\n private buildLink(original: string, target: string, caption: string, monospace?: boolean): string {\n let attributes = '';\n if (this.urlPrefix.test(target)) {\n attributes = ' class=\"external\"';\n } else {\n let reflection: Reflection;\n if (this.reflection) {\n reflection = this.reflection.findReflectionByName(target);\n } else if (this.project) {\n reflection = this.project.findReflectionByName(target);\n }\n\n if (reflection && reflection.url) {\n target = this.getRelativeUrl(reflection.url);\n } else {\n reflection = this.reflection || this.project;\n this.warnings.push(`In ${reflection.getFullName()}: ${original}`);\n return original;\n }\n }\n\n if (monospace) {\n caption = '<code>' + caption + '</code>';\n }\n\n return Util.format('<a href=\"%s\"%s>%s</a>', target, attributes, caption);\n }\n\n /**\n * Triggered when [[MarkedPlugin]] parses a markdown string.\n *\n * @param event\n */\n onParseMarkdown(event: MarkdownEvent) {\n event.parsedText = this.replaceInlineTags(this.replaceBrackets(event.parsedText));\n }\n\n /**\n * Triggered when [[Renderer]] is finished\n */\n onEndRenderer(event: RendererEvent) {\n if (this.listInvalidSymbolLinks && this.warnings.length > 0) {\n this.application.logger.write('');\n this.application.logger.warn('[MarkedLinksPlugin]: Found invalid symbol reference(s) in JSDocs, ' +\n 'they will not render as links in the generated documentation.');\n\n for (let warning of this.warnings) {\n this.application.logger.write(' ' + warning);\n }\n }\n }\n\n /**\n * Split the given link into text and target at first pipe or space.\n *\n * @param text The source string that should be checked for a split character.\n * @returns An object containing the link text and target.\n */\n static splitLinkText(text: string): { caption: string; target: string; } {\n let splitIndex = text.indexOf('|');\n if (splitIndex === -1) {\n splitIndex = text.search(/\\s/);\n }\n\n if (splitIndex !== -1) {\n return {\n caption: text.substr(splitIndex + 1).replace(/\\n+/, ' '),\n target: text.substr(0, splitIndex)\n };\n } else {\n return {\n caption: text,\n target: text\n };\n }\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/output/plugins/MarkedPlugin.js b/node_modules/typedoc/dist/lib/output/plugins/MarkedPlugin.js
index 62b59751b..53807fee4 100644
--- a/node_modules/typedoc/dist/lib/output/plugins/MarkedPlugin.js
+++ b/node_modules/typedoc/dist/lib/output/plugins/MarkedPlugin.js
@@ -121,24 +121,24 @@ var MarkedPlugin = (function (_super) {
MarkedPlugin.prototype.onParseMarkdown = function (event) {
event.parsedText = Marked(event.parsedText);
};
+ __decorate([
+ component_1.Option({
+ name: 'includes',
+ help: 'Specifies the location to look for included documents (use [[include:FILENAME]] in comments).',
+ hint: declaration_1.ParameterHint.Directory
+ })
+ ], MarkedPlugin.prototype, "includeSource", void 0);
+ __decorate([
+ component_1.Option({
+ name: 'media',
+ help: 'Specifies the location with media files that should be copied to the output directory.',
+ hint: declaration_1.ParameterHint.Directory
+ })
+ ], MarkedPlugin.prototype, "mediaSource", void 0);
+ MarkedPlugin = __decorate([
+ components_1.Component({ name: 'marked' })
+ ], MarkedPlugin);
return MarkedPlugin;
}(components_1.ContextAwareRendererComponent));
-__decorate([
- component_1.Option({
- name: 'includes',
- help: 'Specifies the location to look for included documents (use [[include:FILENAME]] in comments).',
- hint: declaration_1.ParameterHint.Directory
- })
-], MarkedPlugin.prototype, "includeSource", void 0);
-__decorate([
- component_1.Option({
- name: 'media',
- help: 'Specifies the location with media files that should be copied to the output directory.',
- hint: declaration_1.ParameterHint.Directory
- })
-], MarkedPlugin.prototype, "mediaSource", void 0);
-MarkedPlugin = __decorate([
- components_1.Component({ name: 'marked' })
-], MarkedPlugin);
exports.MarkedPlugin = MarkedPlugin;
//# sourceMappingURL=MarkedPlugin.js.map \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/output/plugins/MarkedPlugin.js.map b/node_modules/typedoc/dist/lib/output/plugins/MarkedPlugin.js.map
index 04ee14fcb..0c887e6ea 100644
--- a/node_modules/typedoc/dist/lib/output/plugins/MarkedPlugin.js.map
+++ b/node_modules/typedoc/dist/lib/output/plugins/MarkedPlugin.js.map
@@ -1 +1 @@
-{"version":3,"file":"MarkedPlugin.js","sourceRoot":"","sources":["../../../../src/lib/output/plugins/MarkedPlugin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,6BAA+B;AAC/B,2BAA6B;AAC7B,+BAAiC;AACjC,0CAA4C;AAC5C,uCAAyC;AAEzC,4CAAuE;AACvE,oCAAuD;AACvD,mDAA6C;AAC7C,+DAA8D;AAiC9D,IAAa,YAAY;IAAS,gCAA6B;IAD/D;QAAA,qEAyJC;QA5HW,oBAAc,GAAW,4BAA4B,CAAC;QAKtD,kBAAY,GAAW,2BAA2B,CAAC;;IAuH/D,CAAC;IAlHG,iCAAU,GAAV;QAAA,iBAWC;QAVG,iBAAM,UAAU,WAAE,CAAC;QACnB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,sBAAa,CAAC,KAAK,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;QAErE,IAAM,IAAI,GAAG,IAAI,CAAC;QAClB,UAAU,CAAC,cAAc,CAAC,UAAU,EAAE,UAAS,GAAQ,IAAI,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC7G,UAAU,CAAC,cAAc,CAAC,aAAa,EAAE,UAAC,GAAW,IAAK,OAAA,GAAG,GAAG,KAAI,CAAC,cAAc,CAAC,GAAG,CAAC,GAAG,GAAG,EAApC,CAAoC,CAAC,CAAC;QAEhG,MAAM,CAAC,UAAU,CAAC;YACd,SAAS,EAAE,UAAC,IAAS,EAAE,IAAS,IAAK,OAAA,KAAI,CAAC,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC,EAA/B,CAA+B;SACvE,CAAC,CAAC;IACP,CAAC;IASM,qCAAc,GAArB,UAAsB,IAAY,EAAE,IAAa;QAC7C,IAAI,CAAC;YACD,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;gBACP,MAAM,CAAC,WAAW,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,KAAK,CAAC;YACnD,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,MAAM,CAAC,WAAW,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC;YACjD,CAAC;QACL,CAAC;QAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;YACb,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;YAC5C,MAAM,CAAC,IAAI,CAAC;QAChB,CAAC;IACL,CAAC;IASM,oCAAa,GAApB,UAAqB,IAAY,EAAE,OAAY;QAA/C,iBAkCC;QAjCG,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;YAChB,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,UAAC,KAAa,EAAE,IAAY;gBACjE,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,KAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;gBAC7C,EAAE,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;oBACpD,IAAM,QAAQ,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;oBAChD,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,iBAAiB,EAAE,KAAK,MAAM,CAAC,CAAC,CAAC;wBACjD,IAAM,QAAQ,GAAG,UAAU,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;wBAC9C,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;oBAC7B,CAAC;oBAAC,IAAI,CAAC,CAAC;wBACJ,MAAM,CAAC,QAAQ,CAAC;oBACpB,CAAC;gBACL,CAAC;gBAAC,IAAI,CAAC,CAAC;oBACJ,MAAM,CAAC,EAAE,CAAC;gBACd,CAAC;YACL,CAAC,CAAC,CAAC;QACP,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC;YACtB,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,UAAC,KAAa,EAAE,IAAY;gBAC/D,EAAE,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,KAAI,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;oBACtD,MAAM,CAAC,KAAI,CAAC,cAAc,CAAC,OAAO,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC;gBACrD,CAAC;gBAAC,IAAI,CAAC,CAAC;oBACJ,MAAM,CAAC,KAAK,CAAC;gBACjB,CAAC;YACL,CAAC,CAAC,CAAC;QACP,CAAC;QAED,IAAM,KAAK,GAAG,IAAI,sBAAa,CAAC,sBAAa,CAAC,KAAK,CAAC,CAAC;QACrD,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC;QAC1B,KAAK,CAAC,UAAU,GAAG,IAAI,CAAC;QAExB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QAC1B,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC;IAC5B,CAAC;IAOS,sCAAe,GAAzB,UAA0B,KAAoB;QAC1C,iBAAM,eAAe,YAAC,KAAK,CAAC,CAAC;QAE7B,OAAO,IAAI,CAAC,QAAQ,CAAC;QACrB,EAAE,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;YACrB,IAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;YAClD,EAAE,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;gBACjE,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;YAC7B,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,8CAA8C,GAAG,QAAQ,CAAC,CAAC;YAC5F,CAAC;QACL,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;YACnB,IAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YAC7C,EAAE,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;gBAC3D,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC;gBAChE,EAAE,CAAC,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;YAC5C,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;gBAC3B,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,2CAA2C,GAAG,KAAK,CAAC,CAAC;YACtF,CAAC;QACL,CAAC;IACL,CAAC;IAOD,sCAAe,GAAf,UAAgB,KAAoB;QAChC,KAAK,CAAC,UAAU,GAAG,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IAChD,CAAC;IACL,mBAAC;AAAD,CAAC,AAxJD,CAAkC,0CAA6B,GAwJ9D;AAlJG;IALC,kBAAM,CAAC;QACJ,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,+FAA+F;QACrG,IAAI,EAAE,2BAAa,CAAC,SAAS;KAChC,CAAC;mDACoB;AAOtB;IALC,kBAAM,CAAC;QACJ,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,wFAAwF;QAC9F,IAAI,EAAE,2BAAa,CAAC,SAAS;KAChC,CAAC;iDACkB;AAbX,YAAY;IADxB,sBAAS,CAAC,EAAC,IAAI,EAAE,QAAQ,EAAC,CAAC;GACf,YAAY,CAwJxB;AAxJY,oCAAY","sourcesContent":["import * as FS from 'fs-extra';\nimport * as Path from 'path';\nimport * as Marked from 'marked';\nimport * as HighlightJS from 'highlight.js';\nimport * as Handlebars from 'handlebars';\n\nimport {Component, ContextAwareRendererComponent} from '../components';\nimport {RendererEvent, MarkdownEvent} from '../events';\nimport {Option} from '../../utils/component';\nimport {ParameterHint} from '../../utils/options/declaration';\n\n/**\n * A plugin that exposes the markdown, compact and relativeURL helper to handlebars.\n *\n * Templates should parse all comments with the markdown handler so authors can\n * easily format their documentation. TypeDoc uses the Marked (https://github.com/chjj/marked)\n * markdown parser and HighlightJS (https://github.com/isagalaev/highlight.js) to highlight\n * code blocks within markdown sections. Additionally this plugin allows to link to other symbols\n * using double angle brackets.\n *\n * You can use the markdown helper anywhere in the templates to convert content to html:\n *\n * ```handlebars\n * {{#markdown}}{{{comment.text}}}{{/markdown}}\n * ```\n *\n * The compact helper removes all newlines of its content:\n *\n * ```handlebars\n * {{#compact}}\n * Compact\n * this\n * {{/compact}}\n * ```\n *\n * The relativeURL helper simply transforms an absolute url into a relative url:\n *\n * ```handlebars\n * {{#relativeURL url}}\n * ```\n */\n@Component({name: 'marked'})\nexport class MarkedPlugin extends ContextAwareRendererComponent {\n @Option({\n name: 'includes',\n help: 'Specifies the location to look for included documents (use [[include:FILENAME]] in comments).',\n hint: ParameterHint.Directory\n })\n includeSource: string;\n\n @Option({\n name: 'media',\n help: 'Specifies the location with media files that should be copied to the output directory.',\n hint: ParameterHint.Directory\n })\n mediaSource: string;\n\n /**\n * The path referenced files are located in.\n */\n private includes: string;\n\n /**\n * Path to the output media directory.\n */\n private mediaDirectory: string;\n\n /**\n * The pattern used to find references in markdown.\n */\n private includePattern: RegExp = /\\[\\[include:([^\\]]+?)\\]\\]/g;\n\n /**\n * The pattern used to find media links.\n */\n private mediaPattern: RegExp = /media:\\/\\/([^ \"\\)\\]\\}]+)/g;\n\n /**\n * Create a new MarkedPlugin instance.\n */\n initialize() {\n super.initialize();\n this.listenTo(this.owner, MarkdownEvent.PARSE, this.onParseMarkdown);\n\n const that = this;\n Handlebars.registerHelper('markdown', function(arg: any) { return that.parseMarkdown(arg.fn(this), this); });\n Handlebars.registerHelper('relativeURL', (url: string) => url ? this.getRelativeUrl(url) : url);\n\n Marked.setOptions({\n highlight: (text: any, lang: any) => this.getHighlighted(text, lang)\n });\n }\n\n /**\n * Highlight the synatx of the given text using HighlightJS.\n *\n * @param text The text taht should be highlightes.\n * @param lang The language that should be used to highlight the string.\n * @return A html string with syntax highlighting.\n */\n public getHighlighted(text: string, lang?: string): string {\n try {\n if (lang) {\n return HighlightJS.highlight(lang, text).value;\n } else {\n return HighlightJS.highlightAuto(text).value;\n }\n } catch (error) {\n this.application.logger.warn(error.message);\n return text;\n }\n }\n\n /**\n * Parse the given markdown string and return the resulting html.\n *\n * @param text The markdown string that should be parsed.\n * @param context The current handlebars context.\n * @returns The resulting html string.\n */\n public parseMarkdown(text: string, context: any) {\n if (this.includes) {\n text = text.replace(this.includePattern, (match: string, path: string) => {\n path = Path.join(this.includes, path.trim());\n if (FS.existsSync(path) && FS.statSync(path).isFile()) {\n const contents = FS.readFileSync(path, 'utf-8');\n if (path.substr(-4).toLocaleLowerCase() === '.hbs') {\n const template = Handlebars.compile(contents);\n return template(context);\n } else {\n return contents;\n }\n } else {\n return '';\n }\n });\n }\n\n if (this.mediaDirectory) {\n text = text.replace(this.mediaPattern, (match: string, path: string) => {\n if (FS.existsSync(Path.join(this.mediaDirectory, path))) {\n return this.getRelativeUrl('media') + '/' + path;\n } else {\n return match;\n }\n });\n }\n\n const event = new MarkdownEvent(MarkdownEvent.PARSE);\n event.originalText = text;\n event.parsedText = text;\n\n this.owner.trigger(event);\n return event.parsedText;\n }\n\n /**\n * Triggered before the renderer starts rendering a project.\n *\n * @param event An event object describing the current render operation.\n */\n protected onBeginRenderer(event: RendererEvent) {\n super.onBeginRenderer(event);\n\n delete this.includes;\n if (this.includeSource) {\n const includes = Path.resolve(this.includeSource);\n if (FS.existsSync(includes) && FS.statSync(includes).isDirectory()) {\n this.includes = includes;\n } else {\n this.application.logger.warn('Could not find provided includes directory: ' + includes);\n }\n }\n\n if (this.mediaSource) {\n const media = Path.resolve(this.mediaSource);\n if (FS.existsSync(media) && FS.statSync(media).isDirectory()) {\n this.mediaDirectory = Path.join(event.outputDirectory, 'media');\n FS.copySync(media, this.mediaDirectory);\n } else {\n this.mediaDirectory = null;\n this.application.logger.warn('Could not find provided media directory: ' + media);\n }\n }\n }\n\n /**\n * Triggered when [[MarkedPlugin]] parses a markdown string.\n *\n * @param event\n */\n onParseMarkdown(event: MarkdownEvent) {\n event.parsedText = Marked(event.parsedText);\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"MarkedPlugin.js","sourceRoot":"","sources":["../../../../src/lib/output/plugins/MarkedPlugin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,6BAA+B;AAC/B,2BAA6B;AAC7B,+BAAiC;AACjC,0CAA4C;AAC5C,uCAAyC;AAEzC,4CAAyE;AACzE,oCAAyD;AACzD,mDAA+C;AAC/C,+DAAgE;AAiChE;IAAkC,gCAA6B;IAD/D;QAAA,qEAyJC;QA5HW,oBAAc,GAAW,4BAA4B,CAAC;QAKtD,kBAAY,GAAW,2BAA2B,CAAC;;IAuH/D,CAAC;IAlHG,iCAAU,GAAV;QAAA,iBAWC;QAVG,iBAAM,UAAU,WAAE,CAAC;QACnB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,sBAAa,CAAC,KAAK,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;QAErE,IAAM,IAAI,GAAG,IAAI,CAAC;QAClB,UAAU,CAAC,cAAc,CAAC,UAAU,EAAE,UAAS,GAAQ,IAAI,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC7G,UAAU,CAAC,cAAc,CAAC,aAAa,EAAE,UAAC,GAAW,IAAK,OAAA,GAAG,GAAG,KAAI,CAAC,cAAc,CAAC,GAAG,CAAC,GAAG,GAAG,EAApC,CAAoC,CAAC,CAAC;QAEhG,MAAM,CAAC,UAAU,CAAC;YACd,SAAS,EAAE,UAAC,IAAS,EAAE,IAAS,IAAK,OAAA,KAAI,CAAC,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC,EAA/B,CAA+B;SACvE,CAAC,CAAC;IACP,CAAC;IASM,qCAAc,GAArB,UAAsB,IAAY,EAAE,IAAa;QAC7C,IAAI,CAAC;YACD,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;gBACP,MAAM,CAAC,WAAW,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,KAAK,CAAC;YACnD,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,MAAM,CAAC,WAAW,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC;YACjD,CAAC;QACL,CAAC;QAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;YACb,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;YAC5C,MAAM,CAAC,IAAI,CAAC;QAChB,CAAC;IACL,CAAC;IASM,oCAAa,GAApB,UAAqB,IAAY,EAAE,OAAY;QAA/C,iBAkCC;QAjCG,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;YAChB,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,UAAC,KAAa,EAAE,IAAY;gBACjE,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,KAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;gBAC7C,EAAE,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;oBACpD,IAAM,QAAQ,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;oBAChD,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,iBAAiB,EAAE,KAAK,MAAM,CAAC,CAAC,CAAC;wBACjD,IAAM,QAAQ,GAAG,UAAU,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;wBAC9C,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;oBAC7B,CAAC;oBAAC,IAAI,CAAC,CAAC;wBACJ,MAAM,CAAC,QAAQ,CAAC;oBACpB,CAAC;gBACL,CAAC;gBAAC,IAAI,CAAC,CAAC;oBACJ,MAAM,CAAC,EAAE,CAAC;gBACd,CAAC;YACL,CAAC,CAAC,CAAC;QACP,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC;YACtB,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,UAAC,KAAa,EAAE,IAAY;gBAC/D,EAAE,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,KAAI,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;oBACtD,MAAM,CAAC,KAAI,CAAC,cAAc,CAAC,OAAO,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC;gBACrD,CAAC;gBAAC,IAAI,CAAC,CAAC;oBACJ,MAAM,CAAC,KAAK,CAAC;gBACjB,CAAC;YACL,CAAC,CAAC,CAAC;QACP,CAAC;QAED,IAAM,KAAK,GAAG,IAAI,sBAAa,CAAC,sBAAa,CAAC,KAAK,CAAC,CAAC;QACrD,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC;QAC1B,KAAK,CAAC,UAAU,GAAG,IAAI,CAAC;QAExB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QAC1B,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC;IAC5B,CAAC;IAOS,sCAAe,GAAzB,UAA0B,KAAoB;QAC1C,iBAAM,eAAe,YAAC,KAAK,CAAC,CAAC;QAE7B,OAAO,IAAI,CAAC,QAAQ,CAAC;QACrB,EAAE,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;YACrB,IAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;YAClD,EAAE,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;gBACjE,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;YAC7B,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,8CAA8C,GAAG,QAAQ,CAAC,CAAC;YAC5F,CAAC;QACL,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;YACnB,IAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YAC7C,EAAE,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;gBAC3D,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC;gBAChE,EAAE,CAAC,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;YAC5C,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;gBAC3B,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,2CAA2C,GAAG,KAAK,CAAC,CAAC;YACtF,CAAC;QACL,CAAC;IACL,CAAC;IAOD,sCAAe,GAAf,UAAgB,KAAoB;QAChC,KAAK,CAAC,UAAU,GAAG,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IAChD,CAAC;IAjJD;QALC,kBAAM,CAAC;YACJ,IAAI,EAAE,UAAU;YAChB,IAAI,EAAE,+FAA+F;YACrG,IAAI,EAAE,2BAAa,CAAC,SAAS;SAChC,CAAC;uDACoB;IAOtB;QALC,kBAAM,CAAC;YACJ,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,wFAAwF;YAC9F,IAAI,EAAE,2BAAa,CAAC,SAAS;SAChC,CAAC;qDACkB;IAbX,YAAY;QADxB,sBAAS,CAAC,EAAC,IAAI,EAAE,QAAQ,EAAC,CAAC;OACf,YAAY,CAwJxB;IAAD,mBAAC;CAAA,AAxJD,CAAkC,0CAA6B,GAwJ9D;AAxJY,oCAAY","sourcesContent":["import * as FS from 'fs-extra';\nimport * as Path from 'path';\nimport * as Marked from 'marked';\nimport * as HighlightJS from 'highlight.js';\nimport * as Handlebars from 'handlebars';\n\nimport { Component, ContextAwareRendererComponent } from '../components';\nimport { RendererEvent, MarkdownEvent } from '../events';\nimport { Option } from '../../utils/component';\nimport { ParameterHint } from '../../utils/options/declaration';\n\n/**\n * A plugin that exposes the markdown, compact and relativeURL helper to handlebars.\n *\n * Templates should parse all comments with the markdown handler so authors can\n * easily format their documentation. TypeDoc uses the Marked (https://github.com/chjj/marked)\n * markdown parser and HighlightJS (https://github.com/isagalaev/highlight.js) to highlight\n * code blocks within markdown sections. Additionally this plugin allows to link to other symbols\n * using double angle brackets.\n *\n * You can use the markdown helper anywhere in the templates to convert content to html:\n *\n * ```handlebars\n * {{#markdown}}{{{comment.text}}}{{/markdown}}\n * ```\n *\n * The compact helper removes all newlines of its content:\n *\n * ```handlebars\n * {{#compact}}\n * Compact\n * this\n * {{/compact}}\n * ```\n *\n * The relativeURL helper simply transforms an absolute url into a relative url:\n *\n * ```handlebars\n * {{#relativeURL url}}\n * ```\n */\n@Component({name: 'marked'})\nexport class MarkedPlugin extends ContextAwareRendererComponent {\n @Option({\n name: 'includes',\n help: 'Specifies the location to look for included documents (use [[include:FILENAME]] in comments).',\n hint: ParameterHint.Directory\n })\n includeSource: string;\n\n @Option({\n name: 'media',\n help: 'Specifies the location with media files that should be copied to the output directory.',\n hint: ParameterHint.Directory\n })\n mediaSource: string;\n\n /**\n * The path referenced files are located in.\n */\n private includes: string;\n\n /**\n * Path to the output media directory.\n */\n private mediaDirectory: string;\n\n /**\n * The pattern used to find references in markdown.\n */\n private includePattern: RegExp = /\\[\\[include:([^\\]]+?)\\]\\]/g;\n\n /**\n * The pattern used to find media links.\n */\n private mediaPattern: RegExp = /media:\\/\\/([^ \"\\)\\]\\}]+)/g;\n\n /**\n * Create a new MarkedPlugin instance.\n */\n initialize() {\n super.initialize();\n this.listenTo(this.owner, MarkdownEvent.PARSE, this.onParseMarkdown);\n\n const that = this;\n Handlebars.registerHelper('markdown', function(arg: any) { return that.parseMarkdown(arg.fn(this), this); });\n Handlebars.registerHelper('relativeURL', (url: string) => url ? this.getRelativeUrl(url) : url);\n\n Marked.setOptions({\n highlight: (text: any, lang: any) => this.getHighlighted(text, lang)\n });\n }\n\n /**\n * Highlight the synatx of the given text using HighlightJS.\n *\n * @param text The text taht should be highlightes.\n * @param lang The language that should be used to highlight the string.\n * @return A html string with syntax highlighting.\n */\n public getHighlighted(text: string, lang?: string): string {\n try {\n if (lang) {\n return HighlightJS.highlight(lang, text).value;\n } else {\n return HighlightJS.highlightAuto(text).value;\n }\n } catch (error) {\n this.application.logger.warn(error.message);\n return text;\n }\n }\n\n /**\n * Parse the given markdown string and return the resulting html.\n *\n * @param text The markdown string that should be parsed.\n * @param context The current handlebars context.\n * @returns The resulting html string.\n */\n public parseMarkdown(text: string, context: any) {\n if (this.includes) {\n text = text.replace(this.includePattern, (match: string, path: string) => {\n path = Path.join(this.includes, path.trim());\n if (FS.existsSync(path) && FS.statSync(path).isFile()) {\n const contents = FS.readFileSync(path, 'utf-8');\n if (path.substr(-4).toLocaleLowerCase() === '.hbs') {\n const template = Handlebars.compile(contents);\n return template(context);\n } else {\n return contents;\n }\n } else {\n return '';\n }\n });\n }\n\n if (this.mediaDirectory) {\n text = text.replace(this.mediaPattern, (match: string, path: string) => {\n if (FS.existsSync(Path.join(this.mediaDirectory, path))) {\n return this.getRelativeUrl('media') + '/' + path;\n } else {\n return match;\n }\n });\n }\n\n const event = new MarkdownEvent(MarkdownEvent.PARSE);\n event.originalText = text;\n event.parsedText = text;\n\n this.owner.trigger(event);\n return event.parsedText;\n }\n\n /**\n * Triggered before the renderer starts rendering a project.\n *\n * @param event An event object describing the current render operation.\n */\n protected onBeginRenderer(event: RendererEvent) {\n super.onBeginRenderer(event);\n\n delete this.includes;\n if (this.includeSource) {\n const includes = Path.resolve(this.includeSource);\n if (FS.existsSync(includes) && FS.statSync(includes).isDirectory()) {\n this.includes = includes;\n } else {\n this.application.logger.warn('Could not find provided includes directory: ' + includes);\n }\n }\n\n if (this.mediaSource) {\n const media = Path.resolve(this.mediaSource);\n if (FS.existsSync(media) && FS.statSync(media).isDirectory()) {\n this.mediaDirectory = Path.join(event.outputDirectory, 'media');\n FS.copySync(media, this.mediaDirectory);\n } else {\n this.mediaDirectory = null;\n this.application.logger.warn('Could not find provided media directory: ' + media);\n }\n }\n }\n\n /**\n * Triggered when [[MarkedPlugin]] parses a markdown string.\n *\n * @param event\n */\n onParseMarkdown(event: MarkdownEvent) {\n event.parsedText = Marked(event.parsedText);\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/output/plugins/NavigationPlugin.js b/node_modules/typedoc/dist/lib/output/plugins/NavigationPlugin.js
index 13abca28c..2c98cccd8 100644
--- a/node_modules/typedoc/dist/lib/output/plugins/NavigationPlugin.js
+++ b/node_modules/typedoc/dist/lib/output/plugins/NavigationPlugin.js
@@ -68,10 +68,10 @@ var NavigationPlugin = (function (_super) {
});
page.navigation = this.navigation;
};
+ NavigationPlugin = __decorate([
+ components_1.Component({ name: 'navigation' })
+ ], NavigationPlugin);
return NavigationPlugin;
}(components_1.RendererComponent));
-NavigationPlugin = __decorate([
- components_1.Component({ name: 'navigation' })
-], NavigationPlugin);
exports.NavigationPlugin = NavigationPlugin;
//# sourceMappingURL=NavigationPlugin.js.map \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/output/plugins/NavigationPlugin.js.map b/node_modules/typedoc/dist/lib/output/plugins/NavigationPlugin.js.map
index f79a8535c..64a3eed8e 100644
--- a/node_modules/typedoc/dist/lib/output/plugins/NavigationPlugin.js.map
+++ b/node_modules/typedoc/dist/lib/output/plugins/NavigationPlugin.js.map
@@ -1 +1 @@
-{"version":3,"file":"NavigationPlugin.js","sourceRoot":"","sources":["../../../../src/lib/output/plugins/NavigationPlugin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,4CAA2D;AAE3D,oCAAmD;AAWnD,IAAa,gBAAgB;IAAS,oCAAiB;IAAvD;;IAwEA,CAAC;IA/DG,qCAAU,GAAV;QACI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK;YACpB,GAAC,sBAAa,CAAC,KAAK,IAAG,IAAI,CAAC,eAAe;YAC3C,GAAC,kBAAS,CAAC,KAAK,IAAO,IAAI,CAAC,WAAW;gBACzC,CAAC;;IACP,CAAC;IAOO,0CAAe,GAAvB,UAAwB,KAAoB;QACxC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACpE,CAAC;IAOO,sCAAW,GAAnB,UAAoB,IAAe;QAC/B,IAAM,YAAY,GAAqB,EAAE,CAAC;QAC1C,CAAC,oBAAoB,IAAoB;YACrC,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;YACvB,IAAI,CAAC,QAAQ,GAAI,KAAK,CAAC;YACvB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;YAEhC,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;gBAC/F,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC5B,CAAC;YAED,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;gBAChB,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAC,KAAK,IAAK,OAAA,UAAU,CAAC,KAAK,CAAC,EAAjB,CAAiB,CAAC,CAAC;YACxD,CAAC;QACL,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAEpB,YAAY,CAAC,OAAO,CAAC,UAAC,IAAoB;YACtC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;YAEtB,IAAI,KAAK,GAAG,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;YACpC,IAAI,KAAK,GAAG,CAAC,CAAC;YACd,OAAO,IAAI,EAAE,CAAC;gBACV,IAAI,CAAC,QAAQ,GAAI,IAAI,CAAC;gBACtB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;gBAEtB,KAAK,IAAI,CAAC,CAAC;gBACX,KAAK,IAAI,CAAC,CAAC;gBACX,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;oBAChB,KAAK,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC;oBAC9B,EAAE,CAAC,CAAC,KAAK,GAAG,CAAC,IAAI,KAAK,GAAG,EAAE,CAAC,CAAC,CAAC;wBAC1B,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAC,KAAK;4BACxB,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC;wBAC3B,CAAC,CAAC,CAAC;oBACP,CAAC;gBACL,CAAC;gBAED,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC;YACvB,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;IACtC,CAAC;IACL,uBAAC;AAAD,CAAC,AAxED,CAAsC,8BAAiB,GAwEtD;AAxEY,gBAAgB;IAD5B,sBAAS,CAAC,EAAC,IAAI,EAAE,YAAY,EAAC,CAAC;GACnB,gBAAgB,CAwE5B;AAxEY,4CAAgB","sourcesContent":["import {Component, RendererComponent} from '../components';\nimport {NavigationItem} from '../models/NavigationItem';\nimport {RendererEvent, PageEvent} from '../events';\n\n/**\n * A plugin that exposes the navigation structure of the documentation\n * to the rendered templates.\n *\n * The navigation structure is generated using the current themes\n * [[BaseTheme.getNavigation]] function. This plugins takes care that the navigation\n * is updated and passed to the render context.\n */\n@Component({name: 'navigation'})\nexport class NavigationPlugin extends RendererComponent {\n /**\n * The navigation structure generated by the current theme.\n */\n navigation: NavigationItem;\n\n /**\n * Create a new NavigationPlugin instance.\n */\n initialize() {\n this.listenTo(this.owner, {\n [RendererEvent.BEGIN]: this.onBeginRenderer,\n [PageEvent.BEGIN]: this.onBeginPage\n });\n }\n\n /**\n * Triggered before the renderer starts rendering a project.\n *\n * @param event An event object describing the current render operation.\n */\n private onBeginRenderer(event: RendererEvent) {\n this.navigation = this.owner.theme.getNavigation(event.project);\n }\n\n /**\n * Triggered before a document will be rendered.\n *\n * @param page An event object describing the current render operation.\n */\n private onBeginPage(page: PageEvent) {\n const currentItems: NavigationItem[] = [];\n (function updateItem(item: NavigationItem) {\n item.isCurrent = false;\n item.isInPath = false;\n item.isVisible = item.isGlobals;\n\n if (item.url === page.url || (item.dedicatedUrls && item.dedicatedUrls.indexOf(page.url) !== -1)) {\n currentItems.push(item);\n }\n\n if (item.children) {\n item.children.forEach((child) => updateItem(child));\n }\n })(this.navigation);\n\n currentItems.forEach((item: NavigationItem) => {\n item.isCurrent = true;\n\n let depth = item.isGlobals ? -1 : 0;\n let count = 1;\n while (item) {\n item.isInPath = true;\n item.isVisible = true;\n\n count += 1;\n depth += 1;\n if (item.children) {\n count += item.children.length;\n if (depth < 2 || count < 30) {\n item.children.forEach((child) => {\n child.isVisible = true;\n });\n }\n }\n\n item = item.parent;\n }\n });\n\n page.navigation = this.navigation;\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"NavigationPlugin.js","sourceRoot":"","sources":["../../../../src/lib/output/plugins/NavigationPlugin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,4CAA6D;AAE7D,oCAAqD;AAWrD;IAAsC,oCAAiB;IAAvD;;IAwEA,CAAC;IA/DG,qCAAU,GAAV;QACI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK;YACpB,GAAC,sBAAa,CAAC,KAAK,IAAG,IAAI,CAAC,eAAe;YAC3C,GAAC,kBAAS,CAAC,KAAK,IAAO,IAAI,CAAC,WAAW;gBACzC,CAAC;;IACP,CAAC;IAOO,0CAAe,GAAvB,UAAwB,KAAoB;QACxC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACpE,CAAC;IAOO,sCAAW,GAAnB,UAAoB,IAAe;QAC/B,IAAM,YAAY,GAAqB,EAAE,CAAC;QAC1C,CAAC,oBAAoB,IAAoB;YACrC,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;YACvB,IAAI,CAAC,QAAQ,GAAI,KAAK,CAAC;YACvB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;YAEhC,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;gBAC/F,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC5B,CAAC;YAED,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;gBAChB,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAC,KAAK,IAAK,OAAA,UAAU,CAAC,KAAK,CAAC,EAAjB,CAAiB,CAAC,CAAC;YACxD,CAAC;QACL,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAEpB,YAAY,CAAC,OAAO,CAAC,UAAC,IAAoB;YACtC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;YAEtB,IAAI,KAAK,GAAG,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;YACpC,IAAI,KAAK,GAAG,CAAC,CAAC;YACd,OAAO,IAAI,EAAE,CAAC;gBACV,IAAI,CAAC,QAAQ,GAAI,IAAI,CAAC;gBACtB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;gBAEtB,KAAK,IAAI,CAAC,CAAC;gBACX,KAAK,IAAI,CAAC,CAAC;gBACX,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;oBAChB,KAAK,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC;oBAC9B,EAAE,CAAC,CAAC,KAAK,GAAG,CAAC,IAAI,KAAK,GAAG,EAAE,CAAC,CAAC,CAAC;wBAC1B,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAC,KAAK;4BACxB,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC;wBAC3B,CAAC,CAAC,CAAC;oBACP,CAAC;gBACL,CAAC;gBAED,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC;YACvB,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;IACtC,CAAC;IAvEQ,gBAAgB;QAD5B,sBAAS,CAAC,EAAC,IAAI,EAAE,YAAY,EAAC,CAAC;OACnB,gBAAgB,CAwE5B;IAAD,uBAAC;CAAA,AAxED,CAAsC,8BAAiB,GAwEtD;AAxEY,4CAAgB","sourcesContent":["import { Component, RendererComponent } from '../components';\nimport { NavigationItem } from '../models/NavigationItem';\nimport { RendererEvent, PageEvent } from '../events';\n\n/**\n * A plugin that exposes the navigation structure of the documentation\n * to the rendered templates.\n *\n * The navigation structure is generated using the current themes\n * [[BaseTheme.getNavigation]] function. This plugins takes care that the navigation\n * is updated and passed to the render context.\n */\n@Component({name: 'navigation'})\nexport class NavigationPlugin extends RendererComponent {\n /**\n * The navigation structure generated by the current theme.\n */\n navigation: NavigationItem;\n\n /**\n * Create a new NavigationPlugin instance.\n */\n initialize() {\n this.listenTo(this.owner, {\n [RendererEvent.BEGIN]: this.onBeginRenderer,\n [PageEvent.BEGIN]: this.onBeginPage\n });\n }\n\n /**\n * Triggered before the renderer starts rendering a project.\n *\n * @param event An event object describing the current render operation.\n */\n private onBeginRenderer(event: RendererEvent) {\n this.navigation = this.owner.theme.getNavigation(event.project);\n }\n\n /**\n * Triggered before a document will be rendered.\n *\n * @param page An event object describing the current render operation.\n */\n private onBeginPage(page: PageEvent) {\n const currentItems: NavigationItem[] = [];\n (function updateItem(item: NavigationItem) {\n item.isCurrent = false;\n item.isInPath = false;\n item.isVisible = item.isGlobals;\n\n if (item.url === page.url || (item.dedicatedUrls && item.dedicatedUrls.indexOf(page.url) !== -1)) {\n currentItems.push(item);\n }\n\n if (item.children) {\n item.children.forEach((child) => updateItem(child));\n }\n })(this.navigation);\n\n currentItems.forEach((item: NavigationItem) => {\n item.isCurrent = true;\n\n let depth = item.isGlobals ? -1 : 0;\n let count = 1;\n while (item) {\n item.isInPath = true;\n item.isVisible = true;\n\n count += 1;\n depth += 1;\n if (item.children) {\n count += item.children.length;\n if (depth < 2 || count < 30) {\n item.children.forEach((child) => {\n child.isVisible = true;\n });\n }\n }\n\n item = item.parent;\n }\n });\n\n page.navigation = this.navigation;\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/output/plugins/PrettyPrintPlugin.js b/node_modules/typedoc/dist/lib/output/plugins/PrettyPrintPlugin.js
index 87840493c..122971b6f 100644
--- a/node_modules/typedoc/dist/lib/output/plugins/PrettyPrintPlugin.js
+++ b/node_modules/typedoc/dist/lib/output/plugins/PrettyPrintPlugin.js
@@ -24,11 +24,12 @@ var PrettyPrintState;
PrettyPrintState[PrettyPrintState["Comment"] = 1] = "Comment";
PrettyPrintState[PrettyPrintState["Pre"] = 2] = "Pre";
})(PrettyPrintState || (PrettyPrintState = {}));
-var PrettyPrintPlugin = PrettyPrintPlugin_1 = (function (_super) {
+var PrettyPrintPlugin = (function (_super) {
__extends(PrettyPrintPlugin, _super);
function PrettyPrintPlugin() {
return _super !== null && _super.apply(this, arguments) || this;
}
+ PrettyPrintPlugin_1 = PrettyPrintPlugin;
PrettyPrintPlugin.prototype.initialize = function () {
this.listenTo(this.owner, events_1.PageEvent.END, this.onRendererEndPage, -1024);
};
@@ -115,34 +116,34 @@ var PrettyPrintPlugin = PrettyPrintPlugin_1 = (function (_super) {
}
event.contents = lines.join('\n');
};
+ PrettyPrintPlugin.IGNORED_TAGS = {
+ area: true,
+ base: true,
+ br: true,
+ wbr: true,
+ col: true,
+ command: true,
+ embed: true,
+ hr: true,
+ img: true,
+ input: true,
+ link: true,
+ meta: true,
+ param: true,
+ source: true
+ };
+ PrettyPrintPlugin.PRE_TAGS = {
+ pre: true,
+ code: true,
+ textarea: true,
+ script: true,
+ style: true
+ };
+ PrettyPrintPlugin = PrettyPrintPlugin_1 = __decorate([
+ components_1.Component({ name: 'pretty-print' })
+ ], PrettyPrintPlugin);
return PrettyPrintPlugin;
+ var PrettyPrintPlugin_1;
}(components_1.RendererComponent));
-PrettyPrintPlugin.IGNORED_TAGS = {
- area: true,
- base: true,
- br: true,
- wbr: true,
- col: true,
- command: true,
- embed: true,
- hr: true,
- img: true,
- input: true,
- link: true,
- meta: true,
- param: true,
- source: true
-};
-PrettyPrintPlugin.PRE_TAGS = {
- pre: true,
- code: true,
- textarea: true,
- script: true,
- style: true
-};
-PrettyPrintPlugin = PrettyPrintPlugin_1 = __decorate([
- components_1.Component({ name: 'pretty-print' })
-], PrettyPrintPlugin);
exports.PrettyPrintPlugin = PrettyPrintPlugin;
-var PrettyPrintPlugin_1;
//# sourceMappingURL=PrettyPrintPlugin.js.map \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/output/plugins/PrettyPrintPlugin.js.map b/node_modules/typedoc/dist/lib/output/plugins/PrettyPrintPlugin.js.map
index 94239bb81..e46948d96 100644
--- a/node_modules/typedoc/dist/lib/output/plugins/PrettyPrintPlugin.js.map
+++ b/node_modules/typedoc/dist/lib/output/plugins/PrettyPrintPlugin.js.map
@@ -1 +1 @@
-{"version":3,"file":"PrettyPrintPlugin.js","sourceRoot":"","sources":["../../../../src/lib/output/plugins/PrettyPrintPlugin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,4CAA2D;AAC3D,oCAAoC;AAKpC,IAAK,gBAeJ;AAfD,WAAK,gBAAgB;IAIjB,6DAAO,CAAA;IAKP,6DAAO,CAAA;IAKP,qDAAG,CAAA;AACP,CAAC,EAfI,gBAAgB,KAAhB,gBAAgB,QAepB;AAaD,IAAa,iBAAiB;IAAS,qCAAiB;IAAxD;;IAkIA,CAAC;IA/FG,sCAAU,GAAV;QACI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,kBAAS,CAAC,GAAG,EAAE,IAAI,CAAC,iBAAiB,EAAE,CAAC,IAAI,CAAC,CAAC;IAC5E,CAAC;IAOD,6CAAiB,GAAjB,UAAkB,KAAgB;QAC9B,IAAI,KAAuB,CAAC;QAC5B,IAAI,IAAY,CAAC;QACjB,IAAI,SAA2B,CAAC;QAChC,IAAI,SAAiB,CAAC;QACtB,IAAI,OAAe,CAAC;QACpB,IAAI,OAAe,CAAC;QAEpB,IAAI,MAAM,GAAS,6CAA6C,CAAC;QACjE,IAAI,YAAY,GAAG,SAAS,CAAC;QAC7B,IAAI,YAAY,GAAG,CAAC,CAAC;QACrB,IAAI,KAAK,GAAU,gBAAgB,CAAC,OAAO,CAAC;QAC5C,IAAM,KAAK,GAAa,EAAE,CAAC;QAE3B,IAAM,KAAK,GAAU,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;QACtD,IAAI,KAAK,GAAU,CAAC,CAAC;QACrB,IAAI,KAAK,GAAU,KAAK,CAAC,MAAM,CAAC;QAEhC,OAAO,KAAK,GAAG,KAAK,EAAE,CAAC;YACnB,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;YACpB,EAAE,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;gBAC1B,EAAE,CAAC,CAAC,KAAK,KAAK,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC;oBACrC,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;oBACvB,KAAK,IAAI,CAAC,CAAC;oBACX,QAAQ,CAAC;gBACb,CAAC;YACL,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,SAAS,GAAG,KAAK,CAAC;gBAClB,SAAS,GAAG,KAAK,CAAC,MAAM,CAAC;gBAEzB,OAAO,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;oBAC/B,EAAE,CAAC,CAAC,KAAK,KAAK,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC;wBACrC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC;4BACrB,KAAK,GAAG,gBAAgB,CAAC,OAAO,CAAC;wBACrC,CAAC;oBACL,CAAC;oBAAC,IAAI,CAAC,EAAE,CAAC,CAAC,KAAK,KAAK,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC;wBACxC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,KAAK,OAAO,CAAC,CAAC,CAAC;4BACjD,KAAK,GAAG,gBAAgB,CAAC,OAAO,CAAC;wBACrC,CAAC;oBACL,CAAC;oBAAC,IAAI,CAAC,CAAC;wBACJ,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,CAAC,CAAC;4BACtB,KAAK,GAAG,gBAAgB,CAAC,OAAO,CAAC;wBACrC,CAAC;wBAAC,IAAI,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;4BAClB,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;4BACjC,EAAE,CAAC,CAAC,OAAO,IAAI,mBAAiB,CAAC,YAAY,CAAC,CAAC,CAAC;gCAC5C,QAAQ,CAAC;4BACb,CAAC;4BACD,EAAE,CAAC,CAAC,OAAO,IAAI,mBAAiB,CAAC,QAAQ,CAAC,CAAC,CAAC;gCACxC,KAAK,GAAG,gBAAgB,CAAC,GAAG,CAAC;gCAC7B,OAAO,GAAG,OAAO,CAAC;4BACtB,CAAC;4BAAC,IAAI,CAAC,CAAC;gCACJ,EAAE,CAAC,CAAC,OAAO,KAAK,MAAM,CAAC,CAAC,CAAC;oCACrB,YAAY,GAAG,CAAC,CAAC;gCACrB,CAAC;gCACD,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;4BACxB,CAAC;wBACL,CAAC;wBAAC,IAAI,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;4BAClB,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;4BACjC,EAAE,CAAC,CAAC,OAAO,IAAI,mBAAiB,CAAC,YAAY,CAAC,CAAC,CAAC;gCAC5C,QAAQ,CAAC;4BACb,CAAC;4BAED,IAAM,CAAC,GAAG,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;4BACrC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;gCACX,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;4BACrB,CAAC;wBACL,CAAC;oBACL,CAAC;gBACL,CAAC;gBAED,EAAE,CAAC,CAAC,SAAS,KAAK,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC;oBACzC,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;oBAC9C,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;oBACpD,EAAE,CAAC,CAAC,SAAS,GAAG,YAAY,CAAC,CAAC,CAAC;wBAC3B,IAAI,GAAG,KAAK,CAAC,SAAS,GAAG,YAAY,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;oBACjE,CAAC;oBAED,KAAK,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC;gBACxB,CAAC;YACL,CAAC;YAED,KAAK,EAAE,CAAC;QACZ,CAAC;QAED,KAAK,CAAC,QAAQ,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACtC,CAAC;IACL,wBAAC;AAAD,CAAC,AAlID,CAAuC,8BAAiB,GAkIvD;AA9HU,8BAAY,GAAQ;IACvB,IAAI,EAAK,IAAI;IACb,IAAI,EAAK,IAAI;IACb,EAAE,EAAO,IAAI;IACb,GAAG,EAAM,IAAI;IACb,GAAG,EAAM,IAAI;IACb,OAAO,EAAE,IAAI;IACb,KAAK,EAAI,IAAI;IACb,EAAE,EAAO,IAAI;IACb,GAAG,EAAM,IAAI;IACb,KAAK,EAAI,IAAI;IACb,IAAI,EAAK,IAAI;IACb,IAAI,EAAK,IAAI;IACb,KAAK,EAAI,IAAI;IACb,MAAM,EAAG,IAAI;CAChB,CAAC;AAKK,0BAAQ,GAAQ;IACnB,GAAG,EAAO,IAAI;IACd,IAAI,EAAM,IAAI;IACd,QAAQ,EAAE,IAAI;IACd,MAAM,EAAI,IAAI;IACd,KAAK,EAAK,IAAI;CACjB,CAAC;AA9BO,iBAAiB;IAD7B,sBAAS,CAAC,EAAC,IAAI,EAAE,cAAc,EAAC,CAAC;GACrB,iBAAiB,CAkI7B;AAlIY,8CAAiB","sourcesContent":["import {Component, RendererComponent} from '../components';\nimport {PageEvent} from '../events';\n\n/**\n * List of states the parser of [[PrettyPrintPlugin]] can be in.\n */\nenum PrettyPrintState {\n /**\n * Default state of the parser. Empty lines will be removed and indention will be adjusted.\n */\n Default,\n\n /**\n * Comment state, the parser waits for a comment closing tag.\n */\n Comment,\n\n /**\n * Pre state, the parser waits for the closing tag of the current pre block.\n */\n Pre\n}\n\n/**\n * A plugin that pretty prints the generated html.\n *\n * This not only aids in making the generated html source code more readable, by removing\n * blank lines and unnecessary whitespaces the size of the documentation is reduced without\n * visual impact.\n *\n * At the point writing this the docs of TypeDoc took 97.8 MB without and 66.4 MB with this\n * plugin enabled, so it reduced the size to 68% of the original output.\n */\n@Component({name: 'pretty-print'})\nexport class PrettyPrintPlugin extends RendererComponent {\n /**\n * Map of all tags that will be ignored.\n */\n static IGNORED_TAGS: any = {\n area: true,\n base: true,\n br: true,\n wbr: true,\n col: true,\n command: true,\n embed: true,\n hr: true,\n img: true,\n input: true,\n link: true,\n meta: true,\n param: true,\n source: true\n };\n\n /**\n * Map of all tags that prevent this plugin form modifying the following code.\n */\n static PRE_TAGS: any = {\n pre: true,\n code: true,\n textarea: true,\n script: true,\n style: true\n };\n\n /**\n * Create a new PrettyPrintPlugin instance.\n */\n initialize() {\n this.listenTo(this.owner, PageEvent.END, this.onRendererEndPage, -1024);\n }\n\n /**\n * Triggered after a document has been rendered, just before it is written to disc.\n *\n * @param event\n */\n onRendererEndPage(event: PageEvent) {\n let match: RegExpMatchArray;\n let line: string;\n let lineState: PrettyPrintState;\n let lineDepth: number;\n let tagName: string;\n let preName: string;\n\n let tagExp = /<\\s*(\\w+)[^>]*>|<\\/\\s*(\\w+)[^>]*>|<!--|-->/g;\n let emptyLineExp = /^[\\s]*$/;\n let minLineDepth = 1;\n let state = PrettyPrintState.Default;\n const stack: string[] = [];\n\n const lines = event.contents.split(/\\r\\n?|\\n/);\n let index = 0;\n let count = lines.length;\n\n while (index < count) {\n line = lines[index];\n if (emptyLineExp.test(line)) {\n if (state === PrettyPrintState.Default) {\n lines.splice(index, 1);\n count -= 1;\n continue;\n }\n } else {\n lineState = state;\n lineDepth = stack.length;\n\n while (match = tagExp.exec(line)) {\n if (state === PrettyPrintState.Comment) {\n if (match[0] === '-->') {\n state = PrettyPrintState.Default;\n }\n } else if (state === PrettyPrintState.Pre) {\n if (match[2] && match[2].toLowerCase() === preName) {\n state = PrettyPrintState.Default;\n }\n } else {\n if (match[0] === '<!--') {\n state = PrettyPrintState.Comment;\n } else if (match[1]) {\n tagName = match[1].toLowerCase();\n if (tagName in PrettyPrintPlugin.IGNORED_TAGS) {\n continue;\n }\n if (tagName in PrettyPrintPlugin.PRE_TAGS) {\n state = PrettyPrintState.Pre;\n preName = tagName;\n } else {\n if (tagName === 'body') {\n minLineDepth = 2;\n }\n stack.push(tagName);\n }\n } else if (match[2]) {\n tagName = match[2].toLowerCase();\n if (tagName in PrettyPrintPlugin.IGNORED_TAGS) {\n continue;\n }\n\n const n = stack.lastIndexOf(tagName);\n if (n !== -1) {\n stack.length = n;\n }\n }\n }\n }\n\n if (lineState === PrettyPrintState.Default) {\n lineDepth = Math.min(lineDepth, stack.length);\n line = line.replace(/^\\s+/, '').replace(/\\s+$/, '');\n if (lineDepth > minLineDepth) {\n line = Array(lineDepth - minLineDepth + 1).join('\\t') + line;\n }\n\n lines[index] = line;\n }\n }\n\n index++;\n }\n\n event.contents = lines.join('\\n');\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"PrettyPrintPlugin.js","sourceRoot":"","sources":["../../../../src/lib/output/plugins/PrettyPrintPlugin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,4CAA6D;AAC7D,oCAAsC;AAKtC,IAAK,gBAeJ;AAfD,WAAK,gBAAgB;IAIjB,6DAAO,CAAA;IAKP,6DAAO,CAAA;IAKP,qDAAG,CAAA;AACP,CAAC,EAfI,gBAAgB,KAAhB,gBAAgB,QAepB;AAaD;IAAuC,qCAAiB;IAAxD;;IAkIA,CAAC;0BAlIY,iBAAiB;IAmC1B,sCAAU,GAAV;QACI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,kBAAS,CAAC,GAAG,EAAE,IAAI,CAAC,iBAAiB,EAAE,CAAC,IAAI,CAAC,CAAC;IAC5E,CAAC;IAOD,6CAAiB,GAAjB,UAAkB,KAAgB;QAC9B,IAAI,KAAuB,CAAC;QAC5B,IAAI,IAAY,CAAC;QACjB,IAAI,SAA2B,CAAC;QAChC,IAAI,SAAiB,CAAC;QACtB,IAAI,OAAe,CAAC;QACpB,IAAI,OAAe,CAAC;QAEpB,IAAI,MAAM,GAAS,6CAA6C,CAAC;QACjE,IAAI,YAAY,GAAG,SAAS,CAAC;QAC7B,IAAI,YAAY,GAAG,CAAC,CAAC;QACrB,IAAI,KAAK,GAAU,gBAAgB,CAAC,OAAO,CAAC;QAC5C,IAAM,KAAK,GAAa,EAAE,CAAC;QAE3B,IAAM,KAAK,GAAU,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;QACtD,IAAI,KAAK,GAAU,CAAC,CAAC;QACrB,IAAI,KAAK,GAAU,KAAK,CAAC,MAAM,CAAC;QAEhC,OAAO,KAAK,GAAG,KAAK,EAAE,CAAC;YACnB,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;YACpB,EAAE,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;gBAC1B,EAAE,CAAC,CAAC,KAAK,KAAK,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC;oBACrC,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;oBACvB,KAAK,IAAI,CAAC,CAAC;oBACX,QAAQ,CAAC;gBACb,CAAC;YACL,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,SAAS,GAAG,KAAK,CAAC;gBAClB,SAAS,GAAG,KAAK,CAAC,MAAM,CAAC;gBAEzB,OAAO,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;oBAC/B,EAAE,CAAC,CAAC,KAAK,KAAK,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC;wBACrC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC;4BACrB,KAAK,GAAG,gBAAgB,CAAC,OAAO,CAAC;wBACrC,CAAC;oBACL,CAAC;oBAAC,IAAI,CAAC,EAAE,CAAC,CAAC,KAAK,KAAK,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC;wBACxC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,KAAK,OAAO,CAAC,CAAC,CAAC;4BACjD,KAAK,GAAG,gBAAgB,CAAC,OAAO,CAAC;wBACrC,CAAC;oBACL,CAAC;oBAAC,IAAI,CAAC,CAAC;wBACJ,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,CAAC,CAAC;4BACtB,KAAK,GAAG,gBAAgB,CAAC,OAAO,CAAC;wBACrC,CAAC;wBAAC,IAAI,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;4BAClB,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;4BACjC,EAAE,CAAC,CAAC,OAAO,IAAI,mBAAiB,CAAC,YAAY,CAAC,CAAC,CAAC;gCAC5C,QAAQ,CAAC;4BACb,CAAC;4BACD,EAAE,CAAC,CAAC,OAAO,IAAI,mBAAiB,CAAC,QAAQ,CAAC,CAAC,CAAC;gCACxC,KAAK,GAAG,gBAAgB,CAAC,GAAG,CAAC;gCAC7B,OAAO,GAAG,OAAO,CAAC;4BACtB,CAAC;4BAAC,IAAI,CAAC,CAAC;gCACJ,EAAE,CAAC,CAAC,OAAO,KAAK,MAAM,CAAC,CAAC,CAAC;oCACrB,YAAY,GAAG,CAAC,CAAC;gCACrB,CAAC;gCACD,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;4BACxB,CAAC;wBACL,CAAC;wBAAC,IAAI,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;4BAClB,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;4BACjC,EAAE,CAAC,CAAC,OAAO,IAAI,mBAAiB,CAAC,YAAY,CAAC,CAAC,CAAC;gCAC5C,QAAQ,CAAC;4BACb,CAAC;4BAED,IAAM,CAAC,GAAG,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;4BACrC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;gCACX,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;4BACrB,CAAC;wBACL,CAAC;oBACL,CAAC;gBACL,CAAC;gBAED,EAAE,CAAC,CAAC,SAAS,KAAK,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC;oBACzC,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;oBAC9C,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;oBACpD,EAAE,CAAC,CAAC,SAAS,GAAG,YAAY,CAAC,CAAC,CAAC;wBAC3B,IAAI,GAAG,KAAK,CAAC,SAAS,GAAG,YAAY,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;oBACjE,CAAC;oBAED,KAAK,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC;gBACxB,CAAC;YACL,CAAC;YAED,KAAK,EAAE,CAAC;QACZ,CAAC;QAED,KAAK,CAAC,QAAQ,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACtC,CAAC;IA7HM,8BAAY,GAAQ;QACvB,IAAI,EAAK,IAAI;QACb,IAAI,EAAK,IAAI;QACb,EAAE,EAAO,IAAI;QACb,GAAG,EAAM,IAAI;QACb,GAAG,EAAM,IAAI;QACb,OAAO,EAAE,IAAI;QACb,KAAK,EAAI,IAAI;QACb,EAAE,EAAO,IAAI;QACb,GAAG,EAAM,IAAI;QACb,KAAK,EAAI,IAAI;QACb,IAAI,EAAK,IAAI;QACb,IAAI,EAAK,IAAI;QACb,KAAK,EAAI,IAAI;QACb,MAAM,EAAG,IAAI;KAChB,CAAC;IAKK,0BAAQ,GAAQ;QACnB,GAAG,EAAO,IAAI;QACd,IAAI,EAAM,IAAI;QACd,QAAQ,EAAE,IAAI;QACd,MAAM,EAAI,IAAI;QACd,KAAK,EAAK,IAAI;KACjB,CAAC;IA9BO,iBAAiB;QAD7B,sBAAS,CAAC,EAAC,IAAI,EAAE,cAAc,EAAC,CAAC;OACrB,iBAAiB,CAkI7B;IAAD,wBAAC;;CAAA,AAlID,CAAuC,8BAAiB,GAkIvD;AAlIY,8CAAiB","sourcesContent":["import { Component, RendererComponent } from '../components';\nimport { PageEvent } from '../events';\n\n/**\n * List of states the parser of [[PrettyPrintPlugin]] can be in.\n */\nenum PrettyPrintState {\n /**\n * Default state of the parser. Empty lines will be removed and indention will be adjusted.\n */\n Default,\n\n /**\n * Comment state, the parser waits for a comment closing tag.\n */\n Comment,\n\n /**\n * Pre state, the parser waits for the closing tag of the current pre block.\n */\n Pre\n}\n\n/**\n * A plugin that pretty prints the generated html.\n *\n * This not only aids in making the generated html source code more readable, by removing\n * blank lines and unnecessary whitespaces the size of the documentation is reduced without\n * visual impact.\n *\n * At the point writing this the docs of TypeDoc took 97.8 MB without and 66.4 MB with this\n * plugin enabled, so it reduced the size to 68% of the original output.\n */\n@Component({name: 'pretty-print'})\nexport class PrettyPrintPlugin extends RendererComponent {\n /**\n * Map of all tags that will be ignored.\n */\n static IGNORED_TAGS: any = {\n area: true,\n base: true,\n br: true,\n wbr: true,\n col: true,\n command: true,\n embed: true,\n hr: true,\n img: true,\n input: true,\n link: true,\n meta: true,\n param: true,\n source: true\n };\n\n /**\n * Map of all tags that prevent this plugin form modifying the following code.\n */\n static PRE_TAGS: any = {\n pre: true,\n code: true,\n textarea: true,\n script: true,\n style: true\n };\n\n /**\n * Create a new PrettyPrintPlugin instance.\n */\n initialize() {\n this.listenTo(this.owner, PageEvent.END, this.onRendererEndPage, -1024);\n }\n\n /**\n * Triggered after a document has been rendered, just before it is written to disc.\n *\n * @param event\n */\n onRendererEndPage(event: PageEvent) {\n let match: RegExpMatchArray;\n let line: string;\n let lineState: PrettyPrintState;\n let lineDepth: number;\n let tagName: string;\n let preName: string;\n\n let tagExp = /<\\s*(\\w+)[^>]*>|<\\/\\s*(\\w+)[^>]*>|<!--|-->/g;\n let emptyLineExp = /^[\\s]*$/;\n let minLineDepth = 1;\n let state = PrettyPrintState.Default;\n const stack: string[] = [];\n\n const lines = event.contents.split(/\\r\\n?|\\n/);\n let index = 0;\n let count = lines.length;\n\n while (index < count) {\n line = lines[index];\n if (emptyLineExp.test(line)) {\n if (state === PrettyPrintState.Default) {\n lines.splice(index, 1);\n count -= 1;\n continue;\n }\n } else {\n lineState = state;\n lineDepth = stack.length;\n\n while (match = tagExp.exec(line)) {\n if (state === PrettyPrintState.Comment) {\n if (match[0] === '-->') {\n state = PrettyPrintState.Default;\n }\n } else if (state === PrettyPrintState.Pre) {\n if (match[2] && match[2].toLowerCase() === preName) {\n state = PrettyPrintState.Default;\n }\n } else {\n if (match[0] === '<!--') {\n state = PrettyPrintState.Comment;\n } else if (match[1]) {\n tagName = match[1].toLowerCase();\n if (tagName in PrettyPrintPlugin.IGNORED_TAGS) {\n continue;\n }\n if (tagName in PrettyPrintPlugin.PRE_TAGS) {\n state = PrettyPrintState.Pre;\n preName = tagName;\n } else {\n if (tagName === 'body') {\n minLineDepth = 2;\n }\n stack.push(tagName);\n }\n } else if (match[2]) {\n tagName = match[2].toLowerCase();\n if (tagName in PrettyPrintPlugin.IGNORED_TAGS) {\n continue;\n }\n\n const n = stack.lastIndexOf(tagName);\n if (n !== -1) {\n stack.length = n;\n }\n }\n }\n }\n\n if (lineState === PrettyPrintState.Default) {\n lineDepth = Math.min(lineDepth, stack.length);\n line = line.replace(/^\\s+/, '').replace(/\\s+$/, '');\n if (lineDepth > minLineDepth) {\n line = Array(lineDepth - minLineDepth + 1).join('\\t') + line;\n }\n\n lines[index] = line;\n }\n }\n\n index++;\n }\n\n event.contents = lines.join('\\n');\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/output/plugins/TocPlugin.js b/node_modules/typedoc/dist/lib/output/plugins/TocPlugin.js
index f2878ce51..91603f4b5 100644
--- a/node_modules/typedoc/dist/lib/output/plugins/TocPlugin.js
+++ b/node_modules/typedoc/dist/lib/output/plugins/TocPlugin.js
@@ -20,11 +20,12 @@ var index_1 = require("../../models/reflections/index");
var components_1 = require("../components");
var events_1 = require("../events");
var NavigationItem_1 = require("../models/NavigationItem");
-var TocPlugin = TocPlugin_1 = (function (_super) {
+var TocPlugin = (function (_super) {
__extends(TocPlugin, _super);
function TocPlugin() {
return _super !== null && _super.apply(this, arguments) || this;
}
+ TocPlugin_1 = TocPlugin;
TocPlugin.prototype.initialize = function () {
this.listenTo(this.owner, (_a = {},
_a[events_1.PageEvent.BEGIN] = this.onRendererBeginPage,
@@ -72,11 +73,11 @@ var TocPlugin = TocPlugin_1 = (function (_super) {
});
}
};
+ TocPlugin = TocPlugin_1 = __decorate([
+ components_1.Component({ name: 'toc' })
+ ], TocPlugin);
return TocPlugin;
+ var TocPlugin_1;
}(components_1.RendererComponent));
-TocPlugin = TocPlugin_1 = __decorate([
- components_1.Component({ name: 'toc' })
-], TocPlugin);
exports.TocPlugin = TocPlugin;
-var TocPlugin_1;
//# sourceMappingURL=TocPlugin.js.map \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/output/plugins/TocPlugin.js.map b/node_modules/typedoc/dist/lib/output/plugins/TocPlugin.js.map
index bd5945eff..58c0d20aa 100644
--- a/node_modules/typedoc/dist/lib/output/plugins/TocPlugin.js.map
+++ b/node_modules/typedoc/dist/lib/output/plugins/TocPlugin.js.map
@@ -1 +1 @@
-{"version":3,"file":"TocPlugin.js","sourceRoot":"","sources":["../../../../src/lib/output/plugins/TocPlugin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,wDAAoH;AACpH,4CAA2D;AAC3D,oCAAoC;AACpC,2DAAwD;AASxD,IAAa,SAAS;IAAS,6BAAiB;IAAhD;;IAsEA,CAAC;IAlEG,8BAAU,GAAV;QACI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK;YACpB,GAAC,kBAAS,CAAC,KAAK,IAAG,IAAI,CAAC,mBAAmB;gBAC7C,CAAC;;IACP,CAAC;IAOO,uCAAmB,GAA3B,UAA4B,IAAe;QACvC,IAAI,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACvB,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,YAAY,kBAAU,CAAC,CAAC,CAAC,CAAC;YACjC,MAAM,CAAC;QACX,CAAC;QAED,IAAM,KAAK,GAAiB,EAAE,CAAC;QAC/B,OAAO,CAAC,CAAC,KAAK,YAAY,yBAAiB,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,sBAAc,CAAC,UAAU,CAAC,EAAE,CAAC;YACvF,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;YACrB,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC;QACzB,CAAC;QAED,IAAM,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC;QACtC,IAAI,CAAC,GAAG,GAAG,IAAI,+BAAc,EAAE,CAAC;QAChC,WAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC;IAC/D,CAAC;IAUM,kBAAQ,GAAf,UAAgB,KAAiB,EAAE,KAAmB,EAAE,MAAsB,EAAE,WAAsB;QAClG,IAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACnC,IAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC;QAEzC,EAAE,CAAC,CAAC,KAAK,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,QAAQ,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC,CAAC;YACnD,IAAM,KAAK,GAAG,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;YAC/B,IAAM,IAAI,GAAG,+BAAc,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;YACxD,IAAI,CAAC,QAAQ,GAAI,IAAI,CAAC;YACtB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;YACvB,WAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;QAC3C,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,QAAQ,CAAC,OAAO,CAAC,UAAC,KAA4B;gBAE1C,EAAE,CAAC,CAAC,WAAW,IAAI,WAAW,CAAC,MAAM,GAAG,CAAC,IAAI,WAAW,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;oBAClF,MAAM,CAAC;gBACX,CAAC;gBAED,EAAE,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,sBAAc,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;oBAC1C,MAAM,CAAC;gBACX,CAAC;gBAED,IAAM,IAAI,GAAG,+BAAc,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;gBACxD,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;oBAC9B,IAAI,CAAC,QAAQ,GAAI,IAAI,CAAC;oBACtB,IAAI,CAAC,SAAS,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC;oBACrD,WAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;gBAC3C,CAAC;YACL,CAAC,CAAC,CAAC;QACP,CAAC;IACL,CAAC;IACL,gBAAC;AAAD,CAAC,AAtED,CAA+B,8BAAiB,GAsE/C;AAtEY,SAAS;IADrB,sBAAS,CAAC,EAAC,IAAI,EAAE,KAAK,EAAC,CAAC;GACZ,SAAS,CAsErB;AAtEY,8BAAS","sourcesContent":["import {Reflection, ReflectionKind, ProjectReflection, DeclarationReflection} from '../../models/reflections/index';\nimport {Component, RendererComponent} from '../components';\nimport {PageEvent} from '../events';\nimport {NavigationItem} from '../models/NavigationItem';\n\n/**\n * A plugin that generates a table of contents for the current page.\n *\n * The table of contents will start at the nearest module or dynamic module. This plugin\n * sets the [[PageEvent.toc]] property.\n */\n@Component({name: 'toc'})\nexport class TocPlugin extends RendererComponent {\n /**\n * Create a new TocPlugin instance.\n */\n initialize() {\n this.listenTo(this.owner, {\n [PageEvent.BEGIN]: this.onRendererBeginPage\n });\n }\n\n /**\n * Triggered before a document will be rendered.\n *\n * @param page An event object describing the current render operation.\n */\n private onRendererBeginPage(page: PageEvent) {\n let model = page.model;\n if (!(model instanceof Reflection)) {\n return;\n }\n\n const trail: Reflection[] = [];\n while (!(model instanceof ProjectReflection) && !model.kindOf(ReflectionKind.SomeModule)) {\n trail.unshift(model);\n model = model.parent;\n }\n\n const tocRestriction = this.owner.toc;\n page.toc = new NavigationItem();\n TocPlugin.buildToc(model, trail, page.toc, tocRestriction);\n }\n\n /**\n * Create a toc navigation item structure.\n *\n * @param model The models whose children should be written to the toc.\n * @param trail Defines the active trail of expanded toc entries.\n * @param parent The parent [[NavigationItem]] the toc should be appended to.\n * @param restriction The restricted table of contents.\n */\n static buildToc(model: Reflection, trail: Reflection[], parent: NavigationItem, restriction?: string[]) {\n const index = trail.indexOf(model);\n const children = model['children'] || [];\n\n if (index < trail.length - 1 && children.length > 40) {\n const child = trail[index + 1];\n const item = NavigationItem.create(child, parent, true);\n item.isInPath = true;\n item.isCurrent = false;\n TocPlugin.buildToc(child, trail, item);\n } else {\n children.forEach((child: DeclarationReflection) => {\n\n if (restriction && restriction.length > 0 && restriction.indexOf(child.name) === -1) {\n return;\n }\n\n if (child.kindOf(ReflectionKind.SomeModule)) {\n return;\n }\n\n const item = NavigationItem.create(child, parent, true);\n if (trail.indexOf(child) !== -1) {\n item.isInPath = true;\n item.isCurrent = (trail[trail.length - 1] === child);\n TocPlugin.buildToc(child, trail, item);\n }\n });\n }\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"TocPlugin.js","sourceRoot":"","sources":["../../../../src/lib/output/plugins/TocPlugin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,wDAAsH;AACtH,4CAA6D;AAC7D,oCAAsC;AACtC,2DAA0D;AAS1D;IAA+B,6BAAiB;IAAhD;;IAsEA,CAAC;kBAtEY,SAAS;IAIlB,8BAAU,GAAV;QACI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK;YACpB,GAAC,kBAAS,CAAC,KAAK,IAAG,IAAI,CAAC,mBAAmB;gBAC7C,CAAC;;IACP,CAAC;IAOO,uCAAmB,GAA3B,UAA4B,IAAe;QACvC,IAAI,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACvB,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,YAAY,kBAAU,CAAC,CAAC,CAAC,CAAC;YACjC,MAAM,CAAC;QACX,CAAC;QAED,IAAM,KAAK,GAAiB,EAAE,CAAC;QAC/B,OAAO,CAAC,CAAC,KAAK,YAAY,yBAAiB,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,sBAAc,CAAC,UAAU,CAAC,EAAE,CAAC;YACvF,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;YACrB,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC;QACzB,CAAC;QAED,IAAM,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC;QACtC,IAAI,CAAC,GAAG,GAAG,IAAI,+BAAc,EAAE,CAAC;QAChC,WAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC;IAC/D,CAAC;IAUM,kBAAQ,GAAf,UAAgB,KAAiB,EAAE,KAAmB,EAAE,MAAsB,EAAE,WAAsB;QAClG,IAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACnC,IAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC;QAEzC,EAAE,CAAC,CAAC,KAAK,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,QAAQ,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC,CAAC;YACnD,IAAM,KAAK,GAAG,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;YAC/B,IAAM,IAAI,GAAG,+BAAc,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;YACxD,IAAI,CAAC,QAAQ,GAAI,IAAI,CAAC;YACtB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;YACvB,WAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;QAC3C,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,QAAQ,CAAC,OAAO,CAAC,UAAC,KAA4B;gBAE1C,EAAE,CAAC,CAAC,WAAW,IAAI,WAAW,CAAC,MAAM,GAAG,CAAC,IAAI,WAAW,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;oBAClF,MAAM,CAAC;gBACX,CAAC;gBAED,EAAE,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,sBAAc,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;oBAC1C,MAAM,CAAC;gBACX,CAAC;gBAED,IAAM,IAAI,GAAG,+BAAc,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;gBACxD,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;oBAC9B,IAAI,CAAC,QAAQ,GAAI,IAAI,CAAC;oBACtB,IAAI,CAAC,SAAS,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC;oBACrD,WAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;gBAC3C,CAAC;YACL,CAAC,CAAC,CAAC;QACP,CAAC;IACL,CAAC;IArEQ,SAAS;QADrB,sBAAS,CAAC,EAAC,IAAI,EAAE,KAAK,EAAC,CAAC;OACZ,SAAS,CAsErB;IAAD,gBAAC;;CAAA,AAtED,CAA+B,8BAAiB,GAsE/C;AAtEY,8BAAS","sourcesContent":["import { Reflection, ReflectionKind, ProjectReflection, DeclarationReflection } from '../../models/reflections/index';\nimport { Component, RendererComponent } from '../components';\nimport { PageEvent } from '../events';\nimport { NavigationItem } from '../models/NavigationItem';\n\n/**\n * A plugin that generates a table of contents for the current page.\n *\n * The table of contents will start at the nearest module or dynamic module. This plugin\n * sets the [[PageEvent.toc]] property.\n */\n@Component({name: 'toc'})\nexport class TocPlugin extends RendererComponent {\n /**\n * Create a new TocPlugin instance.\n */\n initialize() {\n this.listenTo(this.owner, {\n [PageEvent.BEGIN]: this.onRendererBeginPage\n });\n }\n\n /**\n * Triggered before a document will be rendered.\n *\n * @param page An event object describing the current render operation.\n */\n private onRendererBeginPage(page: PageEvent) {\n let model = page.model;\n if (!(model instanceof Reflection)) {\n return;\n }\n\n const trail: Reflection[] = [];\n while (!(model instanceof ProjectReflection) && !model.kindOf(ReflectionKind.SomeModule)) {\n trail.unshift(model);\n model = model.parent;\n }\n\n const tocRestriction = this.owner.toc;\n page.toc = new NavigationItem();\n TocPlugin.buildToc(model, trail, page.toc, tocRestriction);\n }\n\n /**\n * Create a toc navigation item structure.\n *\n * @param model The models whose children should be written to the toc.\n * @param trail Defines the active trail of expanded toc entries.\n * @param parent The parent [[NavigationItem]] the toc should be appended to.\n * @param restriction The restricted table of contents.\n */\n static buildToc(model: Reflection, trail: Reflection[], parent: NavigationItem, restriction?: string[]) {\n const index = trail.indexOf(model);\n const children = model['children'] || [];\n\n if (index < trail.length - 1 && children.length > 40) {\n const child = trail[index + 1];\n const item = NavigationItem.create(child, parent, true);\n item.isInPath = true;\n item.isCurrent = false;\n TocPlugin.buildToc(child, trail, item);\n } else {\n children.forEach((child: DeclarationReflection) => {\n\n if (restriction && restriction.length > 0 && restriction.indexOf(child.name) === -1) {\n return;\n }\n\n if (child.kindOf(ReflectionKind.SomeModule)) {\n return;\n }\n\n const item = NavigationItem.create(child, parent, true);\n if (trail.indexOf(child) !== -1) {\n item.isInPath = true;\n item.isCurrent = (trail[trail.length - 1] === child);\n TocPlugin.buildToc(child, trail, item);\n }\n });\n }\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/output/plugins/index.js.map b/node_modules/typedoc/dist/lib/output/plugins/index.js.map
index ab7036953..162f012cf 100644
--- a/node_modules/typedoc/dist/lib/output/plugins/index.js.map
+++ b/node_modules/typedoc/dist/lib/output/plugins/index.js.map
@@ -1 +1 @@
-{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/output/plugins/index.ts"],"names":[],"mappings":";;AAAA,+CAA4C;AAApC,sCAAA,YAAY,CAAA;AACpB,iEAA8D;AAAtD,wDAAA,qBAAqB,CAAA;AAC7B,+CAA4C;AAApC,sCAAA,YAAY,CAAA;AACpB,yDAAsD;AAA9C,gDAAA,iBAAiB,CAAA;AACzB,+CAA4C;AAApC,sCAAA,YAAY,CAAA;AACpB,uDAAoD;AAA5C,8CAAA,gBAAgB,CAAA;AACxB,yDAAsD;AAA9C,gDAAA,iBAAiB,CAAA;AACzB,yCAAsC;AAA9B,gCAAA,SAAS,CAAA","sourcesContent":["export {AssetsPlugin} from './AssetsPlugin';\nexport {JavascriptIndexPlugin} from './JavascriptIndexPlugin';\nexport {LayoutPlugin} from './LayoutPlugin';\nexport {MarkedLinksPlugin} from './MarkedLinksPlugin';\nexport {MarkedPlugin} from './MarkedPlugin';\nexport {NavigationPlugin} from './NavigationPlugin';\nexport {PrettyPrintPlugin} from './PrettyPrintPlugin';\nexport {TocPlugin} from './TocPlugin';\n"]} \ No newline at end of file
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/output/plugins/index.ts"],"names":[],"mappings":";;AAAA,+CAA8C;AAArC,sCAAA,YAAY,CAAA;AACrB,iEAAgE;AAAvD,wDAAA,qBAAqB,CAAA;AAC9B,+CAA8C;AAArC,sCAAA,YAAY,CAAA;AACrB,yDAAwD;AAA/C,gDAAA,iBAAiB,CAAA;AAC1B,+CAA8C;AAArC,sCAAA,YAAY,CAAA;AACrB,uDAAsD;AAA7C,8CAAA,gBAAgB,CAAA;AACzB,yDAAwD;AAA/C,gDAAA,iBAAiB,CAAA;AAC1B,yCAAwC;AAA/B,gCAAA,SAAS,CAAA","sourcesContent":["export { AssetsPlugin } from './AssetsPlugin';\nexport { JavascriptIndexPlugin } from './JavascriptIndexPlugin';\nexport { LayoutPlugin } from './LayoutPlugin';\nexport { MarkedLinksPlugin } from './MarkedLinksPlugin';\nexport { MarkedPlugin } from './MarkedPlugin';\nexport { NavigationPlugin } from './NavigationPlugin';\nexport { PrettyPrintPlugin } from './PrettyPrintPlugin';\nexport { TocPlugin } from './TocPlugin';\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/output/renderer.js b/node_modules/typedoc/dist/lib/output/renderer.js
index f9b1fd6b7..49217e175 100644
--- a/node_modules/typedoc/dist/lib/output/renderer.js
+++ b/node_modules/typedoc/dist/lib/output/renderer.js
@@ -25,11 +25,12 @@ var DefaultTheme_1 = require("./themes/DefaultTheme");
var components_1 = require("./components");
var component_1 = require("../utils/component");
var declaration_1 = require("../utils/options/declaration");
-var Renderer = Renderer_1 = (function (_super) {
+var Renderer = (function (_super) {
__extends(Renderer, _super);
function Renderer() {
return _super !== null && _super.apply(this, arguments) || this;
}
+ Renderer_1 = Renderer;
Renderer.prototype.initialize = function () {
};
Renderer.prototype.render = function (project, outputDirectory) {
@@ -145,61 +146,61 @@ var Renderer = Renderer_1 = (function (_super) {
Renderer.getDefaultTheme = function () {
return Path.join(Renderer_1.getThemeDirectory(), 'default');
};
+ __decorate([
+ component_1.Option({
+ name: 'theme',
+ help: 'Specify the path to the theme that should be used or \'default\' or \'minimal\' to use built-in themes.',
+ type: declaration_1.ParameterType.String,
+ defaultValue: 'default'
+ })
+ ], Renderer.prototype, "themeName", void 0);
+ __decorate([
+ component_1.Option({
+ name: 'disableOutputCheck',
+ help: 'Should TypeDoc disable the testing and cleaning of the output directory?',
+ type: declaration_1.ParameterType.Boolean
+ })
+ ], Renderer.prototype, "disableOutputCheck", void 0);
+ __decorate([
+ component_1.Option({
+ name: 'gaID',
+ help: 'Set the Google Analytics tracking ID and activate tracking code.'
+ })
+ ], Renderer.prototype, "gaID", void 0);
+ __decorate([
+ component_1.Option({
+ name: 'gaSite',
+ help: 'Set the site name for Google Analytics. Defaults to `auto`.',
+ defaultValue: 'auto'
+ })
+ ], Renderer.prototype, "gaSite", void 0);
+ __decorate([
+ component_1.Option({
+ name: 'hideGenerator',
+ help: 'Do not print the TypeDoc link at the end of the page.',
+ type: declaration_1.ParameterType.Boolean
+ })
+ ], Renderer.prototype, "hideGenerator", void 0);
+ __decorate([
+ component_1.Option({
+ name: 'entryPoint',
+ help: 'Specifies the fully qualified name of the root symbol. Defaults to global namespace.',
+ type: declaration_1.ParameterType.String
+ })
+ ], Renderer.prototype, "entryPoint", void 0);
+ __decorate([
+ component_1.Option({
+ name: 'toc',
+ help: 'Specifies the top level table of contents.',
+ type: declaration_1.ParameterType.Array
+ })
+ ], Renderer.prototype, "toc", void 0);
+ Renderer = Renderer_1 = __decorate([
+ component_1.Component({ name: 'renderer', internal: true, childClass: components_1.RendererComponent })
+ ], Renderer);
return Renderer;
+ var Renderer_1;
}(component_1.ChildableComponent));
-__decorate([
- component_1.Option({
- name: 'theme',
- help: 'Specify the path to the theme that should be used or \'default\' or \'minimal\' to use built-in themes.',
- type: declaration_1.ParameterType.String,
- defaultValue: 'default'
- })
-], Renderer.prototype, "themeName", void 0);
-__decorate([
- component_1.Option({
- name: 'disableOutputCheck',
- help: 'Should TypeDoc disable the testing and cleaning of the output directory?',
- type: declaration_1.ParameterType.Boolean
- })
-], Renderer.prototype, "disableOutputCheck", void 0);
-__decorate([
- component_1.Option({
- name: 'gaID',
- help: 'Set the Google Analytics tracking ID and activate tracking code.'
- })
-], Renderer.prototype, "gaID", void 0);
-__decorate([
- component_1.Option({
- name: 'gaSite',
- help: 'Set the site name for Google Analytics. Defaults to `auto`.',
- defaultValue: 'auto'
- })
-], Renderer.prototype, "gaSite", void 0);
-__decorate([
- component_1.Option({
- name: 'hideGenerator',
- help: 'Do not print the TypeDoc link at the end of the page.',
- type: declaration_1.ParameterType.Boolean
- })
-], Renderer.prototype, "hideGenerator", void 0);
-__decorate([
- component_1.Option({
- name: 'entryPoint',
- help: 'Specifies the fully qualified name of the root symbol. Defaults to global namespace.',
- type: declaration_1.ParameterType.String
- })
-], Renderer.prototype, "entryPoint", void 0);
-__decorate([
- component_1.Option({
- name: 'toc',
- help: 'Specifies the top level table of contents.',
- type: declaration_1.ParameterType.Array
- })
-], Renderer.prototype, "toc", void 0);
-Renderer = Renderer_1 = __decorate([
- component_1.Component({ name: 'renderer', internal: true, childClass: components_1.RendererComponent })
-], Renderer);
exports.Renderer = Renderer;
require("./plugins");
-var Renderer_1;
//# sourceMappingURL=renderer.js.map \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/output/renderer.js.map b/node_modules/typedoc/dist/lib/output/renderer.js.map
index ff722c140..5af6b298c 100644
--- a/node_modules/typedoc/dist/lib/output/renderer.js.map
+++ b/node_modules/typedoc/dist/lib/output/renderer.js.map
@@ -1 +1 @@
-{"version":3,"file":"renderer.js","sourceRoot":"","sources":["../../../src/lib/output/renderer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AASA,2BAA6B;AAC7B,6BAA+B;AAE/B,IAAM,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAIxC,mCAAkD;AAGlD,kCAAsC;AACtC,sDAAmD;AACnD,2CAA+C;AAC/C,gDAAyE;AACzE,4DAA2D;AAkC3D,IAAa,QAAQ;IAAS,4BAAkD;IAAhF;;IA2OA,CAAC;IA/KG,6BAAU,GAAV;IACA,CAAC;IAQD,yBAAM,GAAN,UAAO,OAA0B,EAAE,eAAuB;QAA1D,iBAyBC;QAxBG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,IAAI,CAAC,sBAAsB,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;YACxE,MAAM,CAAC;QACX,CAAC;QAED,IAAM,MAAM,GAAG,IAAI,sBAAa,CAAC,sBAAa,CAAC,KAAK,CAAC,CAAC;QACtD,MAAM,CAAC,eAAe,GAAG,eAAe,CAAC;QACzC,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC;QACzB,MAAM,CAAC,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,YAAY,EAAE,CAAC;QAC1D,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAE1C,IAAM,GAAG,GAAG,IAAI,WAAW,CAAC,2BAA2B,EAAE;YACrD,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM;YACzB,KAAK,EAAE,EAAE;SACZ,CAAC,CAAC;QAEH,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QACrB,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,CAAC;YAC7B,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,UAAC,OAAmB;gBACpC,KAAI,CAAC,cAAc,CAAC,MAAM,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC;gBACrD,GAAG,CAAC,IAAI,EAAE,CAAC;YACf,CAAC,CAAC,CAAC;YAEH,IAAI,CAAC,OAAO,CAAC,sBAAa,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;QAC5C,CAAC;IACL,CAAC;IAQO,iCAAc,GAAtB,UAAuB,IAAe;QAClC,IAAI,CAAC,OAAO,CAAC,kBAAS,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;QACpC,EAAE,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC;YAC1B,MAAM,CAAC,KAAK,CAAC;QACjB,CAAC;QAED,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,WAAW,EAAE,CAAC;QAC7G,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QAEpC,IAAI,CAAC,OAAO,CAAC,kBAAS,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QAClC,EAAE,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC;YAC1B,MAAM,CAAC,KAAK,CAAC;QACjB,CAAC;QAED,IAAI,CAAC;YACD,cAAS,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;QACnD,CAAC;QAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;YACb,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,oBAAoB,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;YACnE,MAAM,CAAC,KAAK,CAAC;QACjB,CAAC;QAED,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAUO,+BAAY,GAApB;QACI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;YACd,IAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;YACjC,IAAI,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;YACnC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;gBACvB,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,UAAQ,CAAC,iBAAiB,EAAE,EAAE,SAAS,CAAC,CAAC;gBAC1D,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;oBACvB,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,kCAAkC,EAAE,SAAS,CAAC,CAAC;oBAC7E,MAAM,CAAC,KAAK,CAAC;gBACjB,CAAC;YACL,CAAC;YAED,IAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;YAC7C,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;gBAC3B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,IAAI,2BAAY,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;YAC1E,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,IAAI,CAAC;oBACD,IAAM,UAAU,GAAG,OAAO,OAAO,CAAC,QAAQ,CAAC,KAAK,UAAU,GAAG,OAAO,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC;oBAE3G,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;gBAC1E,CAAC;gBAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;oBACX,MAAM,IAAI,KAAK,CACX,+BAA4B,QAAQ,8EAA4E;wBAChH,GAAG,CACN,CAAC;gBACN,CAAC;YACL,CAAC;QACL,CAAC;QAED,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC;QAChC,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IASO,yCAAsB,GAA9B,UAA+B,SAAiB;QAC5C,EAAE,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;YAC3B,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;gBACxC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,CACzB,0DAA0D,EAC1D,SAAS,CAAC,CAAC;gBACf,MAAM,CAAC,KAAK,CAAC;YACjB,CAAC;YAED,EAAE,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC;gBAC1B,MAAM,CAAC,IAAI,CAAC;YAChB,CAAC;YAED,EAAE,CAAC,CAAC,EAAE,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC;gBACzC,MAAM,CAAC,IAAI,CAAC;YAChB,CAAC;YAED,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;gBAC3C,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,CACzB,kGAAkG;oBAClG,oFAAoF,EACpF,SAAS,CAAC,CAAC;gBACf,MAAM,CAAC,KAAK,CAAC;YACjB,CAAC;YAED,IAAI,CAAC;gBACD,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;YAC7B,CAAC;YAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;gBACb,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,uCAAuC,CAAC,CAAC;YAC1E,CAAC;QACL,CAAC;QAED,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;YAC5B,IAAI,CAAC;gBACD,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;YAC7B,CAAC;YAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;gBACb,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,sCAAsC,EAAE,SAAS,CAAC,CAAC;gBACjF,MAAM,CAAC,KAAK,CAAC;YACjB,CAAC;QACL,CAAC;QAED,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAOM,0BAAiB,GAAxB;QACI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,wBAAwB,CAAC,CAAC,CAAC;IACnE,CAAC;IAOM,wBAAe,GAAtB;QACI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,UAAQ,CAAC,iBAAiB,EAAE,EAAE,SAAS,CAAC,CAAC;IAC9D,CAAC;IACL,eAAC;AAAD,CAAC,AA3OD,CAA8B,8BAAkB,GA2O/C;AA/NG;IANC,kBAAM,CAAC;QACJ,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,yGAAyG;QAC/G,IAAI,EAAE,2BAAa,CAAC,MAAM;QAC1B,YAAY,EAAE,SAAS;KAC1B,CAAC;2CACgB;AAOlB;IALC,kBAAM,CAAC;QACJ,IAAI,EAAE,oBAAoB;QAC1B,IAAI,EAAE,0EAA0E;QAChF,IAAI,EAAE,2BAAa,CAAC,OAAO;KAC9B,CAAC;oDAC0B;AAM5B;IAJC,kBAAM,CAAC;QACJ,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,kEAAkE;KAC3E,CAAC;sCACW;AAOb;IALC,kBAAM,CAAC;QACJ,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,6DAA6D;QACnE,YAAY,EAAE,MAAM;KACvB,CAAC;wCACa;AAOf;IALC,kBAAM,CAAC;QACJ,IAAI,EAAE,eAAe;QACrB,IAAI,EAAE,uDAAuD;QAC7D,IAAI,EAAE,2BAAa,CAAC,OAAO;KAC9B,CAAC;+CACqB;AAOvB;IALC,kBAAM,CAAC;QACJ,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE,sFAAsF;QAC5F,IAAI,EAAE,2BAAa,CAAC,MAAM;KAC7B,CAAC;4CACiB;AAOnB;IALC,kBAAM,CAAC;QACJ,IAAI,EAAE,KAAK;QACX,IAAI,EAAE,4CAA4C;QAClD,IAAI,EAAE,2BAAa,CAAC,KAAK;KAC5B,CAAC;qCACY;AArDL,QAAQ;IADpB,qBAAS,CAAC,EAAC,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,8BAAiB,EAAC,CAAC;GAChE,QAAQ,CA2OpB;AA3OY,4BAAQ;AA6OrB,qBAAmB","sourcesContent":["/**\n * Holds all logic used render and output the final documentation.\n *\n * The [[Renderer]] class is the central controller within this namespace. When invoked it creates\n * an instance of [[BaseTheme]] which defines the layout of the documentation and fires a\n * series of [[RendererEvent]] events. Instances of [[BasePlugin]] can listen to these events and\n * alter the generated output.\n */\n\nimport * as Path from 'path';\nimport * as FS from 'fs-extra';\n// tslint:disable-next-line:variable-name\nconst ProgressBar = require('progress');\n\nimport {Application} from '../application';\nimport {Theme} from './theme';\nimport {RendererEvent, PageEvent} from './events';\nimport {ProjectReflection} from '../models/reflections/project';\nimport {UrlMapping} from './models/UrlMapping';\nimport {writeFile} from '../utils/fs';\nimport {DefaultTheme} from './themes/DefaultTheme';\nimport {RendererComponent} from './components';\nimport {Component, ChildableComponent, Option} from '../utils/component';\nimport {ParameterType} from '../utils/options/declaration';\n\n/**\n * The renderer processes a [[ProjectReflection]] using a [[BaseTheme]] instance and writes\n * the emitted html documents to a output directory. You can specify which theme should be used\n * using the ```--theme <name>``` commandline argument.\n *\n * Subclasses of [[BasePlugin]] that have registered themselves in the [[Renderer.PLUGIN_CLASSES]]\n * will be automatically initialized. Most of the core functionality is provided as separate plugins.\n *\n * [[Renderer]] is a subclass of [[EventDispatcher]] and triggers a series of events while\n * a project is being processed. You can listen to these events to control the flow or manipulate\n * the output.\n *\n * * [[Renderer.EVENT_BEGIN]]<br>\n * Triggered before the renderer starts rendering a project. The listener receives\n * an instance of [[RendererEvent]]. By calling [[RendererEvent.preventDefault]] the entire\n * render process can be canceled.\n *\n * * [[Renderer.EVENT_BEGIN_PAGE]]<br>\n * Triggered before a document will be rendered. The listener receives an instance of\n * [[PageEvent]]. By calling [[PageEvent.preventDefault]] the generation of the\n * document can be canceled.\n *\n * * [[Renderer.EVENT_END_PAGE]]<br>\n * Triggered after a document has been rendered, just before it is written to disc. The\n * listener receives an instance of [[PageEvent]]. When calling\n * [[PageEvent.preventDefault]] the the document will not be saved to disc.\n *\n * * [[Renderer.EVENT_END]]<br>\n * Triggered after the renderer has written all documents. The listener receives\n * an instance of [[RendererEvent]].\n */\n@Component({name: 'renderer', internal: true, childClass: RendererComponent})\nexport class Renderer extends ChildableComponent<Application, RendererComponent> {\n /**\n * The theme that is used to render the documentation.\n */\n theme: Theme;\n\n @Option({\n name: 'theme',\n help: 'Specify the path to the theme that should be used or \\'default\\' or \\'minimal\\' to use built-in themes.',\n type: ParameterType.String,\n defaultValue: 'default'\n })\n themeName: string;\n\n @Option({\n name: 'disableOutputCheck',\n help: 'Should TypeDoc disable the testing and cleaning of the output directory?',\n type: ParameterType.Boolean\n })\n disableOutputCheck: boolean;\n\n @Option({\n name: 'gaID',\n help: 'Set the Google Analytics tracking ID and activate tracking code.'\n })\n gaID: string;\n\n @Option({\n name: 'gaSite',\n help: 'Set the site name for Google Analytics. Defaults to `auto`.',\n defaultValue: 'auto'\n })\n gaSite: string;\n\n @Option({\n name: 'hideGenerator',\n help: 'Do not print the TypeDoc link at the end of the page.',\n type: ParameterType.Boolean\n })\n hideGenerator: boolean;\n\n @Option({\n name: 'entryPoint',\n help: 'Specifies the fully qualified name of the root symbol. Defaults to global namespace.',\n type: ParameterType.String\n })\n entryPoint: string;\n\n @Option({\n name: 'toc',\n help: 'Specifies the top level table of contents.',\n type: ParameterType.Array\n })\n toc: string[];\n\n /**\n * Create a new Renderer instance.\n *\n * @param application The application this dispatcher is attached to.\n */\n initialize() {\n }\n\n /**\n * Render the given project reflection to the specified output directory.\n *\n * @param project The project that should be rendered.\n * @param outputDirectory The path of the directory the documentation should be rendered to.\n */\n render(project: ProjectReflection, outputDirectory: string) {\n if (!this.prepareTheme() || !this.prepareOutputDirectory(outputDirectory)) {\n return;\n }\n\n const output = new RendererEvent(RendererEvent.BEGIN);\n output.outputDirectory = outputDirectory;\n output.project = project;\n output.settings = this.application.options.getRawValues();\n output.urls = this.theme.getUrls(project);\n\n const bar = new ProgressBar('Rendering [:bar] :percent', {\n total: output.urls.length,\n width: 40\n });\n\n this.trigger(output);\n if (!output.isDefaultPrevented) {\n output.urls.forEach((mapping: UrlMapping) => {\n this.renderDocument(output.createPageEvent(mapping));\n bar.tick();\n });\n\n this.trigger(RendererEvent.END, output);\n }\n }\n\n /**\n * Render a single page.\n *\n * @param page An event describing the current page.\n * @return TRUE if the page has been saved to disc, otherwise FALSE.\n */\n private renderDocument(page: PageEvent): boolean {\n this.trigger(PageEvent.BEGIN, page);\n if (page.isDefaultPrevented) {\n return false;\n }\n\n page.template = page.template || this.theme.resources.templates.getResource(page.templateName).getTemplate();\n page.contents = page.template(page);\n\n this.trigger(PageEvent.END, page);\n if (page.isDefaultPrevented) {\n return false;\n }\n\n try {\n writeFile(page.filename, page.contents, false);\n } catch (error) {\n this.application.logger.error('Could not write %s', page.filename);\n return false;\n }\n\n return true;\n }\n\n /**\n * Ensure that a theme has been setup.\n *\n * If a the user has set a theme we try to find and load it. If no theme has\n * been specified we load the default theme.\n *\n * @returns TRUE if a theme has been setup, otherwise FALSE.\n */\n private prepareTheme(): boolean {\n if (!this.theme) {\n const themeName = this.themeName;\n let path = Path.resolve(themeName);\n if (!FS.existsSync(path)) {\n path = Path.join(Renderer.getThemeDirectory(), themeName);\n if (!FS.existsSync(path)) {\n this.application.logger.error('The theme %s could not be found.', themeName);\n return false;\n }\n }\n\n const filename = Path.join(path, 'theme.js');\n if (!FS.existsSync(filename)) {\n this.theme = this.addComponent('theme', new DefaultTheme(this, path));\n } else {\n try {\n const themeClass = typeof require(filename) === 'function' ? require(filename) : require(filename).default;\n\n this.theme = this.addComponent('theme', new (themeClass)(this, path));\n } catch (err) {\n throw new Error(\n `Exception while loading \"${filename}\". You must export a \\`new Theme(renderer, basePath)\\` compatible class.\\n` +\n err\n );\n }\n }\n }\n\n this.theme.resources.activate();\n return true;\n }\n\n /**\n * Prepare the output directory. If the directory does not exist, it will be\n * created. If the directory exists, it will be emptied.\n *\n * @param directory The path to the directory that should be prepared.\n * @returns TRUE if the directory could be prepared, otherwise FALSE.\n */\n private prepareOutputDirectory(directory: string): boolean {\n if (FS.existsSync(directory)) {\n if (!FS.statSync(directory).isDirectory()) {\n this.application.logger.error(\n 'The output target \"%s\" exists but it is not a directory.',\n directory);\n return false;\n }\n\n if (this.disableOutputCheck) {\n return true;\n }\n\n if (FS.readdirSync(directory).length === 0) {\n return true;\n }\n\n if (!this.theme.isOutputDirectory(directory)) {\n this.application.logger.error(\n 'The output directory \"%s\" exists but does not seem to be a documentation generated by TypeDoc.\\n' +\n 'Make sure this is the right target directory, delete the folder and rerun TypeDoc.',\n directory);\n return false;\n }\n\n try {\n FS.removeSync(directory);\n } catch (error) {\n this.application.logger.warn('Could not empty the output directory.');\n }\n }\n\n if (!FS.existsSync(directory)) {\n try {\n FS.mkdirpSync(directory);\n } catch (error) {\n this.application.logger.error('Could not create output directory %s', directory);\n return false;\n }\n }\n\n return true;\n }\n\n /**\n * Return the path containing the themes shipped with TypeDoc.\n *\n * @returns The path to the theme directory.\n */\n static getThemeDirectory(): string {\n return Path.dirname(require.resolve('typedoc-default-themes'));\n }\n\n /**\n * Return the path to the default theme.\n *\n * @returns The path to the default theme.\n */\n static getDefaultTheme(): string {\n return Path.join(Renderer.getThemeDirectory(), 'default');\n }\n}\n\nimport './plugins';\n"]} \ No newline at end of file
+{"version":3,"file":"renderer.js","sourceRoot":"","sources":["../../../src/lib/output/renderer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AASA,2BAA6B;AAC7B,6BAA+B;AAE/B,IAAM,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAIxC,mCAAoD;AAGpD,kCAAwC;AACxC,sDAAqD;AACrD,2CAAiD;AACjD,gDAA2E;AAC3E,4DAA6D;AAkC7D;IAA8B,4BAAkD;IAAhF;;IA2OA,CAAC;iBA3OY,QAAQ;IA4DjB,6BAAU,GAAV;IACA,CAAC;IAQD,yBAAM,GAAN,UAAO,OAA0B,EAAE,eAAuB;QAA1D,iBAyBC;QAxBG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,IAAI,CAAC,sBAAsB,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;YACxE,MAAM,CAAC;QACX,CAAC;QAED,IAAM,MAAM,GAAG,IAAI,sBAAa,CAAC,sBAAa,CAAC,KAAK,CAAC,CAAC;QACtD,MAAM,CAAC,eAAe,GAAG,eAAe,CAAC;QACzC,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC;QACzB,MAAM,CAAC,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,YAAY,EAAE,CAAC;QAC1D,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAE1C,IAAM,GAAG,GAAG,IAAI,WAAW,CAAC,2BAA2B,EAAE;YACrD,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM;YACzB,KAAK,EAAE,EAAE;SACZ,CAAC,CAAC;QAEH,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QACrB,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,CAAC;YAC7B,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,UAAC,OAAmB;gBACpC,KAAI,CAAC,cAAc,CAAC,MAAM,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC;gBACrD,GAAG,CAAC,IAAI,EAAE,CAAC;YACf,CAAC,CAAC,CAAC;YAEH,IAAI,CAAC,OAAO,CAAC,sBAAa,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;QAC5C,CAAC;IACL,CAAC;IAQO,iCAAc,GAAtB,UAAuB,IAAe;QAClC,IAAI,CAAC,OAAO,CAAC,kBAAS,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;QACpC,EAAE,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC;YAC1B,MAAM,CAAC,KAAK,CAAC;QACjB,CAAC;QAED,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,WAAW,EAAE,CAAC;QAC7G,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QAEpC,IAAI,CAAC,OAAO,CAAC,kBAAS,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QAClC,EAAE,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC;YAC1B,MAAM,CAAC,KAAK,CAAC;QACjB,CAAC;QAED,IAAI,CAAC;YACD,cAAS,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;QACnD,CAAC;QAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;YACb,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,oBAAoB,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;YACnE,MAAM,CAAC,KAAK,CAAC;QACjB,CAAC;QAED,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAUO,+BAAY,GAApB;QACI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;YACd,IAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;YACjC,IAAI,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;YACnC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;gBACvB,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,UAAQ,CAAC,iBAAiB,EAAE,EAAE,SAAS,CAAC,CAAC;gBAC1D,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;oBACvB,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,kCAAkC,EAAE,SAAS,CAAC,CAAC;oBAC7E,MAAM,CAAC,KAAK,CAAC;gBACjB,CAAC;YACL,CAAC;YAED,IAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;YAC7C,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;gBAC3B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,IAAI,2BAAY,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;YAC1E,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,IAAI,CAAC;oBACD,IAAM,UAAU,GAAG,OAAO,OAAO,CAAC,QAAQ,CAAC,KAAK,UAAU,GAAG,OAAO,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC;oBAE3G,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;gBAC1E,CAAC;gBAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;oBACX,MAAM,IAAI,KAAK,CACX,+BAA4B,QAAQ,8EAA4E;wBAChH,GAAG,CACN,CAAC;gBACN,CAAC;YACL,CAAC;QACL,CAAC;QAED,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC;QAChC,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IASO,yCAAsB,GAA9B,UAA+B,SAAiB;QAC5C,EAAE,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;YAC3B,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;gBACxC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,CACzB,0DAA0D,EAC1D,SAAS,CAAC,CAAC;gBACf,MAAM,CAAC,KAAK,CAAC;YACjB,CAAC;YAED,EAAE,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC;gBAC1B,MAAM,CAAC,IAAI,CAAC;YAChB,CAAC;YAED,EAAE,CAAC,CAAC,EAAE,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC;gBACzC,MAAM,CAAC,IAAI,CAAC;YAChB,CAAC;YAED,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;gBAC3C,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,CACzB,kGAAkG;oBAClG,oFAAoF,EACpF,SAAS,CAAC,CAAC;gBACf,MAAM,CAAC,KAAK,CAAC;YACjB,CAAC;YAED,IAAI,CAAC;gBACD,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;YAC7B,CAAC;YAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;gBACb,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,uCAAuC,CAAC,CAAC;YAC1E,CAAC;QACL,CAAC;QAED,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;YAC5B,IAAI,CAAC;gBACD,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;YAC7B,CAAC;YAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;gBACb,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,sCAAsC,EAAE,SAAS,CAAC,CAAC;gBACjF,MAAM,CAAC,KAAK,CAAC;YACjB,CAAC;QACL,CAAC;QAED,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAOM,0BAAiB,GAAxB;QACI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,wBAAwB,CAAC,CAAC,CAAC;IACnE,CAAC;IAOM,wBAAe,GAAtB;QACI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,UAAQ,CAAC,iBAAiB,EAAE,EAAE,SAAS,CAAC,CAAC;IAC9D,CAAC;IA9ND;QANC,kBAAM,CAAC;YACJ,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,yGAAyG;YAC/G,IAAI,EAAE,2BAAa,CAAC,MAAM;YAC1B,YAAY,EAAE,SAAS;SAC1B,CAAC;+CACgB;IAOlB;QALC,kBAAM,CAAC;YACJ,IAAI,EAAE,oBAAoB;YAC1B,IAAI,EAAE,0EAA0E;YAChF,IAAI,EAAE,2BAAa,CAAC,OAAO;SAC9B,CAAC;wDAC0B;IAM5B;QAJC,kBAAM,CAAC;YACJ,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,kEAAkE;SAC3E,CAAC;0CACW;IAOb;QALC,kBAAM,CAAC;YACJ,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,6DAA6D;YACnE,YAAY,EAAE,MAAM;SACvB,CAAC;4CACa;IAOf;QALC,kBAAM,CAAC;YACJ,IAAI,EAAE,eAAe;YACrB,IAAI,EAAE,uDAAuD;YAC7D,IAAI,EAAE,2BAAa,CAAC,OAAO;SAC9B,CAAC;mDACqB;IAOvB;QALC,kBAAM,CAAC;YACJ,IAAI,EAAE,YAAY;YAClB,IAAI,EAAE,sFAAsF;YAC5F,IAAI,EAAE,2BAAa,CAAC,MAAM;SAC7B,CAAC;gDACiB;IAOnB;QALC,kBAAM,CAAC;YACJ,IAAI,EAAE,KAAK;YACX,IAAI,EAAE,4CAA4C;YAClD,IAAI,EAAE,2BAAa,CAAC,KAAK;SAC5B,CAAC;yCACY;IArDL,QAAQ;QADpB,qBAAS,CAAC,EAAC,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,8BAAiB,EAAC,CAAC;OAChE,QAAQ,CA2OpB;IAAD,eAAC;;CAAA,AA3OD,CAA8B,8BAAkB,GA2O/C;AA3OY,4BAAQ;AA6OrB,qBAAmB","sourcesContent":["/**\n * Holds all logic used render and output the final documentation.\n *\n * The [[Renderer]] class is the central controller within this namespace. When invoked it creates\n * an instance of [[BaseTheme]] which defines the layout of the documentation and fires a\n * series of [[RendererEvent]] events. Instances of [[BasePlugin]] can listen to these events and\n * alter the generated output.\n */\n\nimport * as Path from 'path';\nimport * as FS from 'fs-extra';\n// tslint:disable-next-line:variable-name\nconst ProgressBar = require('progress');\n\nimport { Application } from '../application';\nimport { Theme } from './theme';\nimport { RendererEvent, PageEvent } from './events';\nimport { ProjectReflection } from '../models/reflections/project';\nimport { UrlMapping } from './models/UrlMapping';\nimport { writeFile } from '../utils/fs';\nimport { DefaultTheme } from './themes/DefaultTheme';\nimport { RendererComponent } from './components';\nimport { Component, ChildableComponent, Option } from '../utils/component';\nimport { ParameterType } from '../utils/options/declaration';\n\n/**\n * The renderer processes a [[ProjectReflection]] using a [[BaseTheme]] instance and writes\n * the emitted html documents to a output directory. You can specify which theme should be used\n * using the ```--theme <name>``` commandline argument.\n *\n * Subclasses of [[BasePlugin]] that have registered themselves in the [[Renderer.PLUGIN_CLASSES]]\n * will be automatically initialized. Most of the core functionality is provided as separate plugins.\n *\n * [[Renderer]] is a subclass of [[EventDispatcher]] and triggers a series of events while\n * a project is being processed. You can listen to these events to control the flow or manipulate\n * the output.\n *\n * * [[Renderer.EVENT_BEGIN]]<br>\n * Triggered before the renderer starts rendering a project. The listener receives\n * an instance of [[RendererEvent]]. By calling [[RendererEvent.preventDefault]] the entire\n * render process can be canceled.\n *\n * * [[Renderer.EVENT_BEGIN_PAGE]]<br>\n * Triggered before a document will be rendered. The listener receives an instance of\n * [[PageEvent]]. By calling [[PageEvent.preventDefault]] the generation of the\n * document can be canceled.\n *\n * * [[Renderer.EVENT_END_PAGE]]<br>\n * Triggered after a document has been rendered, just before it is written to disc. The\n * listener receives an instance of [[PageEvent]]. When calling\n * [[PageEvent.preventDefault]] the the document will not be saved to disc.\n *\n * * [[Renderer.EVENT_END]]<br>\n * Triggered after the renderer has written all documents. The listener receives\n * an instance of [[RendererEvent]].\n */\n@Component({name: 'renderer', internal: true, childClass: RendererComponent})\nexport class Renderer extends ChildableComponent<Application, RendererComponent> {\n /**\n * The theme that is used to render the documentation.\n */\n theme: Theme;\n\n @Option({\n name: 'theme',\n help: 'Specify the path to the theme that should be used or \\'default\\' or \\'minimal\\' to use built-in themes.',\n type: ParameterType.String,\n defaultValue: 'default'\n })\n themeName: string;\n\n @Option({\n name: 'disableOutputCheck',\n help: 'Should TypeDoc disable the testing and cleaning of the output directory?',\n type: ParameterType.Boolean\n })\n disableOutputCheck: boolean;\n\n @Option({\n name: 'gaID',\n help: 'Set the Google Analytics tracking ID and activate tracking code.'\n })\n gaID: string;\n\n @Option({\n name: 'gaSite',\n help: 'Set the site name for Google Analytics. Defaults to `auto`.',\n defaultValue: 'auto'\n })\n gaSite: string;\n\n @Option({\n name: 'hideGenerator',\n help: 'Do not print the TypeDoc link at the end of the page.',\n type: ParameterType.Boolean\n })\n hideGenerator: boolean;\n\n @Option({\n name: 'entryPoint',\n help: 'Specifies the fully qualified name of the root symbol. Defaults to global namespace.',\n type: ParameterType.String\n })\n entryPoint: string;\n\n @Option({\n name: 'toc',\n help: 'Specifies the top level table of contents.',\n type: ParameterType.Array\n })\n toc: string[];\n\n /**\n * Create a new Renderer instance.\n *\n * @param application The application this dispatcher is attached to.\n */\n initialize() {\n }\n\n /**\n * Render the given project reflection to the specified output directory.\n *\n * @param project The project that should be rendered.\n * @param outputDirectory The path of the directory the documentation should be rendered to.\n */\n render(project: ProjectReflection, outputDirectory: string) {\n if (!this.prepareTheme() || !this.prepareOutputDirectory(outputDirectory)) {\n return;\n }\n\n const output = new RendererEvent(RendererEvent.BEGIN);\n output.outputDirectory = outputDirectory;\n output.project = project;\n output.settings = this.application.options.getRawValues();\n output.urls = this.theme.getUrls(project);\n\n const bar = new ProgressBar('Rendering [:bar] :percent', {\n total: output.urls.length,\n width: 40\n });\n\n this.trigger(output);\n if (!output.isDefaultPrevented) {\n output.urls.forEach((mapping: UrlMapping) => {\n this.renderDocument(output.createPageEvent(mapping));\n bar.tick();\n });\n\n this.trigger(RendererEvent.END, output);\n }\n }\n\n /**\n * Render a single page.\n *\n * @param page An event describing the current page.\n * @return TRUE if the page has been saved to disc, otherwise FALSE.\n */\n private renderDocument(page: PageEvent): boolean {\n this.trigger(PageEvent.BEGIN, page);\n if (page.isDefaultPrevented) {\n return false;\n }\n\n page.template = page.template || this.theme.resources.templates.getResource(page.templateName).getTemplate();\n page.contents = page.template(page);\n\n this.trigger(PageEvent.END, page);\n if (page.isDefaultPrevented) {\n return false;\n }\n\n try {\n writeFile(page.filename, page.contents, false);\n } catch (error) {\n this.application.logger.error('Could not write %s', page.filename);\n return false;\n }\n\n return true;\n }\n\n /**\n * Ensure that a theme has been setup.\n *\n * If a the user has set a theme we try to find and load it. If no theme has\n * been specified we load the default theme.\n *\n * @returns TRUE if a theme has been setup, otherwise FALSE.\n */\n private prepareTheme(): boolean {\n if (!this.theme) {\n const themeName = this.themeName;\n let path = Path.resolve(themeName);\n if (!FS.existsSync(path)) {\n path = Path.join(Renderer.getThemeDirectory(), themeName);\n if (!FS.existsSync(path)) {\n this.application.logger.error('The theme %s could not be found.', themeName);\n return false;\n }\n }\n\n const filename = Path.join(path, 'theme.js');\n if (!FS.existsSync(filename)) {\n this.theme = this.addComponent('theme', new DefaultTheme(this, path));\n } else {\n try {\n const themeClass = typeof require(filename) === 'function' ? require(filename) : require(filename).default;\n\n this.theme = this.addComponent('theme', new (themeClass)(this, path));\n } catch (err) {\n throw new Error(\n `Exception while loading \"${filename}\". You must export a \\`new Theme(renderer, basePath)\\` compatible class.\\n` +\n err\n );\n }\n }\n }\n\n this.theme.resources.activate();\n return true;\n }\n\n /**\n * Prepare the output directory. If the directory does not exist, it will be\n * created. If the directory exists, it will be emptied.\n *\n * @param directory The path to the directory that should be prepared.\n * @returns TRUE if the directory could be prepared, otherwise FALSE.\n */\n private prepareOutputDirectory(directory: string): boolean {\n if (FS.existsSync(directory)) {\n if (!FS.statSync(directory).isDirectory()) {\n this.application.logger.error(\n 'The output target \"%s\" exists but it is not a directory.',\n directory);\n return false;\n }\n\n if (this.disableOutputCheck) {\n return true;\n }\n\n if (FS.readdirSync(directory).length === 0) {\n return true;\n }\n\n if (!this.theme.isOutputDirectory(directory)) {\n this.application.logger.error(\n 'The output directory \"%s\" exists but does not seem to be a documentation generated by TypeDoc.\\n' +\n 'Make sure this is the right target directory, delete the folder and rerun TypeDoc.',\n directory);\n return false;\n }\n\n try {\n FS.removeSync(directory);\n } catch (error) {\n this.application.logger.warn('Could not empty the output directory.');\n }\n }\n\n if (!FS.existsSync(directory)) {\n try {\n FS.mkdirpSync(directory);\n } catch (error) {\n this.application.logger.error('Could not create output directory %s', directory);\n return false;\n }\n }\n\n return true;\n }\n\n /**\n * Return the path containing the themes shipped with TypeDoc.\n *\n * @returns The path to the theme directory.\n */\n static getThemeDirectory(): string {\n return Path.dirname(require.resolve('typedoc-default-themes'));\n }\n\n /**\n * Return the path to the default theme.\n *\n * @returns The path to the default theme.\n */\n static getDefaultTheme(): string {\n return Path.join(Renderer.getThemeDirectory(), 'default');\n }\n}\n\nimport './plugins';\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/output/theme.js b/node_modules/typedoc/dist/lib/output/theme.js
index 5634f8999..0a07a9ef6 100644
--- a/node_modules/typedoc/dist/lib/output/theme.js
+++ b/node_modules/typedoc/dist/lib/output/theme.js
@@ -36,10 +36,10 @@ var Theme = (function (_super) {
Theme.prototype.getNavigation = function (project) {
return null;
};
+ Theme = __decorate([
+ component_1.Component({ name: 'theme', internal: true })
+ ], Theme);
return Theme;
}(components_1.RendererComponent));
-Theme = __decorate([
- component_1.Component({ name: 'theme', internal: true })
-], Theme);
exports.Theme = Theme;
//# sourceMappingURL=theme.js.map \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/output/theme.js.map b/node_modules/typedoc/dist/lib/output/theme.js.map
index 24a322c03..7ddb5d383 100644
--- a/node_modules/typedoc/dist/lib/output/theme.js.map
+++ b/node_modules/typedoc/dist/lib/output/theme.js.map
@@ -1 +1 @@
-{"version":3,"file":"theme.js","sourceRoot":"","sources":["../../../src/lib/output/theme.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAIA,2CAA+C;AAC/C,gDAA6C;AAC7C,+CAA4C;AA8C5C,IAAa,KAAK;IAAS,yBAAiB;IAcxC,eAAY,QAAkB,EAAE,QAAgB;QAAhD,YACI,kBAAM,QAAQ,CAAC,SAIlB;QAFG,KAAI,CAAC,QAAQ,GAAI,QAAQ,CAAC;QAC1B,KAAI,CAAC,SAAS,GAAG,IAAI,qBAAS,CAAC,KAAI,CAAC,CAAC;;IACzC,CAAC;IAmBD,iCAAiB,GAAjB,UAAkB,IAAY;QAC1B,MAAM,CAAC,KAAK,CAAC;IACjB,CAAC;IAYD,uBAAO,GAAP,UAAQ,OAA0B;QAC9B,MAAM,CAAC,EAAE,CAAC;IACd,CAAC;IAeD,6BAAa,GAAb,UAAc,OAA0B;QACpC,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IACL,YAAC;AAAD,CAAC,AAxED,CAA2B,8BAAiB,GAwE3C;AAxEY,KAAK;IADjB,qBAAS,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAC,CAAC;GAC9B,KAAK,CAwEjB;AAxEY,sBAAK","sourcesContent":["import {Renderer} from './renderer';\nimport {ProjectReflection} from '../models/reflections/project';\nimport {UrlMapping} from './models/UrlMapping';\nimport {NavigationItem} from './models/NavigationItem';\nimport {RendererComponent} from './components';\nimport {Component} from '../utils/component';\nimport {Resources} from './utils/resources';\n\n/**\n * Base class of all themes.\n *\n * A theme defines the logical and graphical output of a documentation. Themes are\n * directories containing a ```theme.js``` file defining a [[BaseTheme]] subclass and a\n * series of subdirectories containing templates and assets. You can select a theme\n * through the ```--theme <path/to/theme>``` commandline argument.\n *\n * The theme class controls which files will be created through the [[BaseTheme.getUrls]]\n * function. It returns an array of [[UrlMapping]] instances defining the target files, models\n * and templates to use. Additionally themes can subscribe to the events emitted by\n * [[Renderer]] to control and manipulate the output process.\n *\n * The default file structure of a theme looks like this:\n *\n * - ```/assets/```<br>\n * Contains static assets like stylesheets, images or javascript files used by the theme.\n * The [[AssetsPlugin]] will deep copy this directory to the output directory.\n *\n * - ```/layouts/```<br>\n * Contains layout templates that the [[LayoutPlugin]] wraps around the output of the\n * page template. Currently only one ```default.hbs``` layout is supported. Layout templates\n * receive the current [[PageEvent]] instance as their handlebars context. Place the\n * ```{{{contents}}}``` variable to render the actual body of the document within this template.\n *\n * - ```/partials/```<br>\n * Contains partial templates that can be used by other templates using handlebars partial\n * syntax ```{{> partial-name}}```. The [[PartialsPlugin]] loads all files in this directory\n * and combines them with the partials of the default theme.\n *\n * - ```/templates/```<br>\n * Contains the main templates of the theme. The theme maps models to these templates through\n * the [[BaseTheme.getUrls]] function. If the [[Renderer.getTemplate]] function cannot find a\n * given template within this directory, it will try to find it in the default theme\n * ```/templates/``` directory. Templates receive the current [[PageEvent]] instance as\n * their handlebars context. You can access the target model through the ```{{model}}``` variable.\n *\n * - ```/theme.js```<br>\n * A javascript file that returns the definition of a [[BaseTheme]] subclass. This file will\n * be executed within the context of TypeDoc, one may directly access all classes and functions\n * of TypeDoc. If this file is not present, an instance of [[DefaultTheme]] will be used to render\n * this theme.\n */\n@Component({name: 'theme', internal: true})\nexport class Theme extends RendererComponent {\n /**\n * The base path of this theme.\n */\n basePath: string;\n\n resources: Resources;\n\n /**\n * Create a new BaseTheme instance.\n *\n * @param renderer The renderer this theme is attached to.\n * @param basePath The base path of this theme.\n */\n constructor(renderer: Renderer, basePath: string) {\n super(renderer);\n\n this.basePath = basePath;\n this.resources = new Resources(this);\n }\n\n /**\n * Test whether the given path contains a documentation generated by this theme.\n *\n * TypeDoc empties the output directory before rendering a project. This function\n * is used to ensure that only previously generated documentations are deleted.\n * When this function returns FALSE, the documentation will not be created and an\n * error message will be displayed.\n *\n * Every theme must have an own implementation of this function, the default\n * implementation always returns FALSE.\n *\n * @param path The path of the directory that should be tested.\n * @returns TRUE if the given path seems to be a previous output directory,\n * otherwise FALSE.\n *\n * @see [[Renderer.prepareOutputDirectory]]\n */\n isOutputDirectory(path: string): boolean {\n return false;\n }\n\n /**\n * Map the models of the given project to the desired output files.\n *\n * Every theme must have an own implementation of this function, the default\n * implementation always returns an empty array.\n *\n * @param project The project whose urls should be generated.\n * @returns A list of [[UrlMapping]] instances defining which models\n * should be rendered to which files.\n */\n getUrls(project: ProjectReflection): UrlMapping[] {\n return [];\n }\n\n /**\n * Create a navigation structure for the given project.\n *\n * A navigation is a tree structure consisting of [[NavigationItem]] nodes. This\n * function should return the root node of the desired navigation tree.\n *\n * The [[NavigationPlugin]] will call this hook before a project will be rendered.\n * The plugin will update the state of the navigation tree and pass it to the\n * templates.\n *\n * @param project The project whose navigation should be generated.\n * @returns The root navigation item.\n */\n getNavigation(project: ProjectReflection): NavigationItem {\n return null;\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"theme.js","sourceRoot":"","sources":["../../../src/lib/output/theme.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAIA,2CAAiD;AACjD,gDAA+C;AAC/C,+CAA8C;AA8C9C;IAA2B,yBAAiB;IAcxC,eAAY,QAAkB,EAAE,QAAgB;QAAhD,YACI,kBAAM,QAAQ,CAAC,SAIlB;QAFG,KAAI,CAAC,QAAQ,GAAI,QAAQ,CAAC;QAC1B,KAAI,CAAC,SAAS,GAAG,IAAI,qBAAS,CAAC,KAAI,CAAC,CAAC;;IACzC,CAAC;IAmBD,iCAAiB,GAAjB,UAAkB,IAAY;QAC1B,MAAM,CAAC,KAAK,CAAC;IACjB,CAAC;IAYD,uBAAO,GAAP,UAAQ,OAA0B;QAC9B,MAAM,CAAC,EAAE,CAAC;IACd,CAAC;IAeD,6BAAa,GAAb,UAAc,OAA0B;QACpC,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAvEQ,KAAK;QADjB,qBAAS,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAC,CAAC;OAC9B,KAAK,CAwEjB;IAAD,YAAC;CAAA,AAxED,CAA2B,8BAAiB,GAwE3C;AAxEY,sBAAK","sourcesContent":["import { Renderer } from './renderer';\nimport { ProjectReflection } from '../models/reflections/project';\nimport { UrlMapping } from './models/UrlMapping';\nimport { NavigationItem } from './models/NavigationItem';\nimport { RendererComponent } from './components';\nimport { Component } from '../utils/component';\nimport { Resources } from './utils/resources';\n\n/**\n * Base class of all themes.\n *\n * A theme defines the logical and graphical output of a documentation. Themes are\n * directories containing a ```theme.js``` file defining a [[BaseTheme]] subclass and a\n * series of subdirectories containing templates and assets. You can select a theme\n * through the ```--theme <path/to/theme>``` commandline argument.\n *\n * The theme class controls which files will be created through the [[BaseTheme.getUrls]]\n * function. It returns an array of [[UrlMapping]] instances defining the target files, models\n * and templates to use. Additionally themes can subscribe to the events emitted by\n * [[Renderer]] to control and manipulate the output process.\n *\n * The default file structure of a theme looks like this:\n *\n * - ```/assets/```<br>\n * Contains static assets like stylesheets, images or javascript files used by the theme.\n * The [[AssetsPlugin]] will deep copy this directory to the output directory.\n *\n * - ```/layouts/```<br>\n * Contains layout templates that the [[LayoutPlugin]] wraps around the output of the\n * page template. Currently only one ```default.hbs``` layout is supported. Layout templates\n * receive the current [[PageEvent]] instance as their handlebars context. Place the\n * ```{{{contents}}}``` variable to render the actual body of the document within this template.\n *\n * - ```/partials/```<br>\n * Contains partial templates that can be used by other templates using handlebars partial\n * syntax ```{{> partial-name}}```. The [[PartialsPlugin]] loads all files in this directory\n * and combines them with the partials of the default theme.\n *\n * - ```/templates/```<br>\n * Contains the main templates of the theme. The theme maps models to these templates through\n * the [[BaseTheme.getUrls]] function. If the [[Renderer.getTemplate]] function cannot find a\n * given template within this directory, it will try to find it in the default theme\n * ```/templates/``` directory. Templates receive the current [[PageEvent]] instance as\n * their handlebars context. You can access the target model through the ```{{model}}``` variable.\n *\n * - ```/theme.js```<br>\n * A javascript file that returns the definition of a [[BaseTheme]] subclass. This file will\n * be executed within the context of TypeDoc, one may directly access all classes and functions\n * of TypeDoc. If this file is not present, an instance of [[DefaultTheme]] will be used to render\n * this theme.\n */\n@Component({name: 'theme', internal: true})\nexport class Theme extends RendererComponent {\n /**\n * The base path of this theme.\n */\n basePath: string;\n\n resources: Resources;\n\n /**\n * Create a new BaseTheme instance.\n *\n * @param renderer The renderer this theme is attached to.\n * @param basePath The base path of this theme.\n */\n constructor(renderer: Renderer, basePath: string) {\n super(renderer);\n\n this.basePath = basePath;\n this.resources = new Resources(this);\n }\n\n /**\n * Test whether the given path contains a documentation generated by this theme.\n *\n * TypeDoc empties the output directory before rendering a project. This function\n * is used to ensure that only previously generated documentations are deleted.\n * When this function returns FALSE, the documentation will not be created and an\n * error message will be displayed.\n *\n * Every theme must have an own implementation of this function, the default\n * implementation always returns FALSE.\n *\n * @param path The path of the directory that should be tested.\n * @returns TRUE if the given path seems to be a previous output directory,\n * otherwise FALSE.\n *\n * @see [[Renderer.prepareOutputDirectory]]\n */\n isOutputDirectory(path: string): boolean {\n return false;\n }\n\n /**\n * Map the models of the given project to the desired output files.\n *\n * Every theme must have an own implementation of this function, the default\n * implementation always returns an empty array.\n *\n * @param project The project whose urls should be generated.\n * @returns A list of [[UrlMapping]] instances defining which models\n * should be rendered to which files.\n */\n getUrls(project: ProjectReflection): UrlMapping[] {\n return [];\n }\n\n /**\n * Create a navigation structure for the given project.\n *\n * A navigation is a tree structure consisting of [[NavigationItem]] nodes. This\n * function should return the root node of the desired navigation tree.\n *\n * The [[NavigationPlugin]] will call this hook before a project will be rendered.\n * The plugin will update the state of the navigation tree and pass it to the\n * templates.\n *\n * @param project The project whose navigation should be generated.\n * @returns The root navigation item.\n */\n getNavigation(project: ProjectReflection): NavigationItem {\n return null;\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/output/themes/DefaultTheme.js b/node_modules/typedoc/dist/lib/output/themes/DefaultTheme.js
index 26da7a38e..44ed78d32 100644
--- a/node_modules/typedoc/dist/lib/output/themes/DefaultTheme.js
+++ b/node_modules/typedoc/dist/lib/output/themes/DefaultTheme.js
@@ -319,28 +319,28 @@ var DefaultTheme = (function (_super) {
DefaultTheme.toStyleClass = function (str) {
return str.replace(/(\w)([A-Z])/g, function (m, m1, m2) { return m1 + '-' + m2; }).toLowerCase();
};
+ DefaultTheme.MAPPINGS = [{
+ kind: [index_1.ReflectionKind.Class],
+ isLeaf: false,
+ directory: 'classes',
+ template: 'reflection.hbs'
+ }, {
+ kind: [index_1.ReflectionKind.Interface],
+ isLeaf: false,
+ directory: 'interfaces',
+ template: 'reflection.hbs'
+ }, {
+ kind: [index_1.ReflectionKind.Enum],
+ isLeaf: false,
+ directory: 'enums',
+ template: 'reflection.hbs'
+ }, {
+ kind: [index_1.ReflectionKind.Module, index_1.ReflectionKind.ExternalModule],
+ isLeaf: false,
+ directory: 'modules',
+ template: 'reflection.hbs'
+ }];
return DefaultTheme;
}(theme_1.Theme));
-DefaultTheme.MAPPINGS = [{
- kind: [index_1.ReflectionKind.Class],
- isLeaf: false,
- directory: 'classes',
- template: 'reflection.hbs'
- }, {
- kind: [index_1.ReflectionKind.Interface],
- isLeaf: false,
- directory: 'interfaces',
- template: 'reflection.hbs'
- }, {
- kind: [index_1.ReflectionKind.Enum],
- isLeaf: false,
- directory: 'enums',
- template: 'reflection.hbs'
- }, {
- kind: [index_1.ReflectionKind.Module, index_1.ReflectionKind.ExternalModule],
- isLeaf: false,
- directory: 'modules',
- template: 'reflection.hbs'
- }];
exports.DefaultTheme = DefaultTheme;
//# sourceMappingURL=DefaultTheme.js.map \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/output/themes/DefaultTheme.js.map b/node_modules/typedoc/dist/lib/output/themes/DefaultTheme.js.map
index 69e789782..82482643b 100644
--- a/node_modules/typedoc/dist/lib/output/themes/DefaultTheme.js.map
+++ b/node_modules/typedoc/dist/lib/output/themes/DefaultTheme.js.map
@@ -1 +1 @@
-{"version":3,"file":"DefaultTheme.js","sourceRoot":"","sources":["../../../../src/lib/output/themes/DefaultTheme.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2BAA6B;AAC7B,uBAAyB;AAEzB,kCAA+B;AAE/B,wDAAyI;AAEzI,mDAAgD;AAChD,2DAAwD;AACxD,oCAAwC;AAkCxC;IAAkC,gCAAK;IAgCnC,sBAAY,QAAkB,EAAE,QAAgB;QAAhD,YACI,kBAAM,QAAQ,EAAE,QAAQ,CAAC,SAE5B;QADG,KAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,sBAAa,CAAC,KAAK,EAAE,KAAI,CAAC,eAAe,EAAE,IAAI,CAAC,CAAC;;IAC7E,CAAC;IASD,wCAAiB,GAAjB,UAAkB,IAAY;QAC1B,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;YAChD,MAAM,CAAC,KAAK,CAAC;QACjB,CAAC;QACD,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;YAC5C,MAAM,CAAC,KAAK,CAAC;QACjB,CAAC;QACD,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;YAC7D,MAAM,CAAC,KAAK,CAAC;QACjB,CAAC;QACD,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;YACnE,MAAM,CAAC,KAAK,CAAC;QACjB,CAAC;QAED,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IASD,8BAAO,GAAP,UAAQ,OAA0B;QAC9B,IAAM,IAAI,GAAiB,EAAE,CAAC;QAC9B,IAAM,UAAU,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QAE/C,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,MAAM,CAAC,CAAC,CAAC;YACzD,UAAU,CAAC,GAAG,GAAG,YAAY,CAAC;YAC9B,IAAI,CAAC,IAAI,CAAC,IAAI,uBAAU,CAAC,YAAY,EAAE,UAAU,EAAE,gBAAgB,CAAC,CAAC,CAAC;QAC1E,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,UAAU,CAAC,GAAG,GAAG,cAAc,CAAC;YAChC,IAAI,CAAC,IAAI,CAAC,IAAI,uBAAU,CAAC,cAAc,EAAE,UAAU,EAAE,gBAAgB,CAAC,CAAC,CAAC;YACxE,IAAI,CAAC,IAAI,CAAC,IAAI,uBAAU,CAAC,YAAY,EAAI,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC;QACpE,CAAC;QAED,EAAE,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC;YACtB,UAAU,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAC,KAAiB;gBAC1C,EAAE,CAAC,CAAC,KAAK,YAAY,6BAAqB,CAAC,CAAC,CAAC;oBACzC,YAAY,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;gBACxC,CAAC;YACL,CAAC,CAAC,CAAC;QACP,CAAC;QAED,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAQD,oCAAa,GAAb,UAAc,OAA0B;QACpC,IAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC;QACzC,EAAE,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;YACb,IAAM,UAAU,GAAG,OAAO,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;YACtD,EAAE,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;gBACb,EAAE,CAAC,CAAC,UAAU,YAAY,2BAAmB,CAAC,CAAC,CAAC;oBAC5C,MAAM,CAAC,UAAU,CAAC;gBACtB,CAAC;gBAAC,IAAI,CAAC,CAAC;oBACJ,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,gDAAgD,EAAE,UAAU,CAAC,CAAC;gBAC/F,CAAC;YACL,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,0CAA0C,EAAE,UAAU,CAAC,CAAC;YACzF,CAAC;QACL,CAAC;QAED,MAAM,CAAC,OAAO,CAAC;IACnB,CAAC;IAQD,oCAAa,GAAb,UAAc,OAA0B;QAOpC,2BAA2B,OAAgC;YACvD,GAAG,CAAC,CAAC,IAAI,KAAK,GAAG,CAAC,EAAE,QAAM,GAAG,OAAO,CAAC,MAAM,EAAE,KAAK,GAAG,QAAM,EAAE,KAAK,EAAE,EAAE,CAAC;gBACnE,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC;oBAClC,MAAM,CAAC,IAAI,CAAC;gBAChB,CAAC;YACL,CAAC;YACD,MAAM,CAAC,KAAK,CAAC;QACjB,CAAC;QAOD,yBAAyB,OAAgC;YACrD,OAAO,CAAC,IAAI,CAAC,UAAC,CAAwB,EAAE,CAAwB;gBAC5D,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC;oBAC5C,MAAM,CAAE,CAAC,CAAC;gBACd,CAAC;gBACD,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,IAAI,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC;oBAC5C,MAAM,CAAC,CAAC,CAAC,CAAC;gBACd,CAAC;gBACD,MAAM,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;YACtD,CAAC,CAAC,CAAC;QACP,CAAC;QASD,8BAA8B,UAAiC,EAAE,IAAoB;YACjF,CAAC,cAAc,UAAiC;gBAC5C,GAAG,CAAC,CAAC,IAAI,GAAG,IAAI,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC;oBAClC,IAAM,KAAK,GAAG,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;oBACvC,EAAE,CAAC,CAAC,KAAK,CAAC,cAAc,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,sBAAc,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;wBACnE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;4BACtB,IAAI,CAAC,aAAa,GAAG,EAAE,CAAC;wBAC5B,CAAC;wBACD,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;wBACnC,IAAI,CAAC,KAAK,CAAC,CAAC;oBAChB,CAAC;gBACL,CAAC;YACL,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;QACnB,CAAC;QAQD,uBAAuB,UAAiC,EAAE,MAAsB;YAC5E,IAAM,OAAO,GAAG,UAAU,CAAC,iBAAiB,CAAC,sBAAc,CAAC,UAAU,CAAC,CAAC;YACxE,OAAO,CAAC,IAAI,CAAC,UAAC,CAAwB,EAAE,CAAwB;gBAC5D,MAAM,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;YACtD,CAAC,CAAC,CAAC;YAEH,OAAO,CAAC,OAAO,CAAC,UAAC,UAAU;gBACvB,IAAM,IAAI,GAAG,+BAAc,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;gBACvD,oBAAoB,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;gBACvC,aAAa,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;YACpC,CAAC,CAAC,CAAC;QACP,CAAC;QAUD,qBAAqB,WAAoC,EAAE,MAAsB,EAC5D,QAA4E;YAC7F,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC;YACf,IAAM,YAAY,GAAG,iBAAiB,CAAC,WAAW,CAAC,CAAC;YACpD,eAAe,CAAC,WAAW,CAAC,CAAC;YAE7B,WAAW,CAAC,OAAO,CAAC,UAAC,UAAU;gBAC3B,EAAE,CAAC,CAAC,YAAY,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,UAAU,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC;oBAC9D,IAAI,+BAAc,CAAC,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,iBAAiB,CAAC,CAAC;oBACjE,KAAK,GAAG,CAAC,CAAC;gBACd,CAAC;gBAAC,IAAI,CAAC,EAAE,CAAC,CAAC,YAAY,IAAI,UAAU,CAAC,KAAK,CAAC,UAAU,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC;oBACpE,IAAI,+BAAc,CAAC,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,iBAAiB,CAAC,CAAC;oBACjE,KAAK,GAAG,CAAC,CAAC;gBACd,CAAC;gBAED,IAAM,IAAI,GAAG,+BAAc,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;gBACvD,oBAAoB,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;gBACvC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;oBACX,QAAQ,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;gBAC/B,CAAC;YACL,CAAC,CAAC,CAAC;QACP,CAAC;QAQD,eAAe,kBAA2B;YACtC,IAAM,IAAI,GAAG,IAAI,+BAAc,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;YAEvD,EAAE,CAAC,CAAC,UAAU,KAAK,OAAO,CAAC,CAAC,CAAC;gBACzB,IAAM,OAAO,GAAG,IAAI,+BAAc,CAAC,SAAS,EAAE,kBAAkB,GAAG,cAAc,GAAG,YAAY,EAAE,IAAI,CAAC,CAAC;gBACxG,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC;YAC7B,CAAC;YAED,IAAM,OAAO,GAA4B,EAAE,CAAC;YAC5C,OAAO,CAAC,oBAAoB,CAAC,sBAAc,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,UAAC,UAAU;gBACvE,IAAI,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;gBAC/B,IAAI,OAAO,GAAG,CAAC,UAAU,KAAK,UAAU,CAAC,CAAC;gBAC1C,OAAO,MAAM,EAAE,CAAC;oBACZ,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,sBAAc,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;wBAC/C,MAAM,CAAC;oBACX,CAAC;oBACD,EAAE,CAAC,CAAC,UAAU,KAAK,MAAM,CAAC,CAAC,CAAC;wBACxB,OAAO,GAAG,IAAI,CAAC;oBACnB,CAAC;oBACD,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;gBAC3B,CAAC;gBAED,EAAE,CAAC,CAAC,OAAO,IAAI,UAAU,YAAY,6BAAqB,CAAC,CAAC,CAAC;oBACzD,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;gBAC7B,CAAC;YACL,CAAC,CAAC,CAAC;YAEH,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC,CAAC;gBACtB,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;YAC/B,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,WAAW,CAAC,UAAU,CAAC,iBAAiB,CAAC,sBAAc,CAAC,UAAU,CAAC,EAAE,IAAI,EAAE,aAAa,CAAC,CAAC;YAC9F,CAAC;YAED,MAAM,CAAC,IAAI,CAAC;QAChB,CAAC;QAED,IAAM,UAAU,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QAC/C,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,MAAM,CAAC,CAAC;IACzE,CAAC;IAOO,sCAAe,GAAvB,UAAwB,KAAoB;QACxC,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;YACvB,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,iBAAiB,CAAC,CAAC;QACjE,CAAC;QAED,GAAG,CAAC,CAAC,IAAI,EAAE,IAAI,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC;YACvC,IAAM,UAAU,GAAG,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;YACjD,EAAE,CAAC,CAAC,UAAU,YAAY,6BAAqB,CAAC,CAAC,CAAC;gBAC9C,YAAY,CAAC,sBAAsB,CAAyB,UAAU,CAAC,CAAC;YAC5E,CAAC;YAED,EAAE,CAAC,CAAC,UAAU,YAAY,2BAAmB,IAAI,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;gBACpE,UAAU,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,iBAAiB,CAAC,CAAC;YACjE,CAAC;QACL,CAAC;IACL,CAAC;IAUM,mBAAM,GAAb,UAAc,UAAsB,EAAE,QAAqB,EAAE,SAAuB;QAAvB,0BAAA,EAAA,eAAuB;QAChF,IAAI,GAAG,GAAG,UAAU,CAAC,QAAQ,EAAE,CAAC;QAEhC,EAAE,CAAC,CAAC,UAAU,CAAC,MAAM,IAAI,UAAU,CAAC,MAAM,KAAK,QAAQ;YACnD,CAAC,CAAC,UAAU,CAAC,MAAM,YAAY,yBAAiB,CAAC,CAAC,CAAC,CAAC;YACpD,GAAG,GAAG,YAAY,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,QAAQ,EAAE,SAAS,CAAC,GAAG,SAAS,GAAG,GAAG,CAAC;QACxF,CAAC;QAED,MAAM,CAAC,GAAG,CAAC;IACf,CAAC;IAQM,uBAAU,GAAjB,UAAkB,UAAiC;QAC/C,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,YAAY,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;YAC3D,IAAM,OAAO,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;YACzC,EAAE,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;gBAClC,MAAM,CAAC,OAAO,CAAC;YACnB,CAAC;QACL,CAAC;QAED,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IASM,sBAAS,GAAhB,UAAiB,UAAiC,EAAE,IAAkB;QAClE,IAAM,OAAO,GAAG,YAAY,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;QACpD,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YACV,IAAM,GAAG,GAAG,CAAC,OAAO,CAAC,SAAS,EAAE,YAAY,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YACrF,IAAI,CAAC,IAAI,CAAC,IAAI,uBAAU,CAAC,GAAG,EAAE,UAAU,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;YAE7D,UAAU,CAAC,GAAG,GAAG,GAAG,CAAC;YACrB,UAAU,CAAC,cAAc,GAAG,IAAI,CAAC;YACjC,GAAG,CAAC,CAAC,IAAI,GAAG,IAAI,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC;gBAClC,IAAM,KAAK,GAAG,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;gBACvC,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;oBACjB,YAAY,CAAC,cAAc,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;gBACnD,CAAC;gBAAC,IAAI,CAAC,CAAC;oBACJ,YAAY,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;gBACxC,CAAC;YACL,CAAC;QACL,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,YAAY,CAAC,cAAc,CAAC,UAAU,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;QAC/D,CAAC;QAED,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAQM,2BAAc,GAArB,UAAsB,UAAsB,EAAE,SAAqB;QAC/D,IAAI,MAAM,GAAG,YAAY,CAAC,MAAM,CAAC,UAAU,EAAE,SAAS,EAAE,GAAG,CAAC,CAAC;QAC7D,EAAE,CAAC,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;YACzB,MAAM,GAAG,SAAS,GAAG,MAAM,CAAC;QAChC,CAAC;QAED,UAAU,CAAC,GAAG,GAAG,SAAS,CAAC,GAAG,GAAG,GAAG,GAAG,MAAM,CAAC;QAC9C,UAAU,CAAC,MAAM,GAAG,MAAM,CAAC;QAC3B,UAAU,CAAC,cAAc,GAAG,KAAK,CAAC;QAElC,UAAU,CAAC,QAAQ,CAAC,UAAC,KAAK;YACtB,EAAE,CAAC,CAAC,KAAK,YAAY,6BAAqB,CAAC,CAAC,CAAC;gBACzC,YAAY,CAAC,cAAc,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;YAClD,CAAC;QACL,CAAC,CAAC,CAAC;IACP,CAAC;IAQM,mCAAsB,GAA7B,UAA8B,UAAiC;QAC3D,IAAM,OAAO,GAAa,EAAE,CAAC;QAC7B,IAAI,IAAY,CAAC;QAEjB,EAAE,CAAC,CAAC,UAAU,CAAC,IAAI,KAAK,sBAAc,CAAC,QAAQ,CAAC,CAAC,CAAC;YAC9C,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC;gBAC3B,OAAO,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;YAC3C,CAAC;YAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC;gBAClC,OAAO,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;YAC3C,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,OAAO,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;YACtC,CAAC;QACL,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,IAAI,GAAG,sBAAc,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;YACvC,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC,CAAC;QAChE,CAAC;QAED,EAAE,CAAC,CAAC,UAAU,CAAC,MAAM,IAAI,UAAU,CAAC,MAAM,YAAY,6BAAqB,CAAC,CAAC,CAAC;YAC1E,IAAI,GAAG,sBAAc,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YAC9C,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,qBAAmB,IAAM,CAAC,CAAC,CAAC;QACvE,CAAC;QAED,IAAI,iBAAiB,GAAG,CAAC,CAAC,UAAU,CAAC,cAAc,CAAC;QACpD,UAAU,CAAC,gBAAgB,EAAE,CAAC,OAAO,CAAC,UAAC,SAAS;YAC5C,iBAAiB,GAAG,iBAAiB,IAAI,CAAC,CAAC,SAAS,CAAC,cAAc,CAAC;QACxE,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,CAAC,iBAAiB,CAAC,CAAY,CAAC;YAAC,OAAO,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;QAAC,CAAC;QAC7E,EAAE,CAAC,CAAC,UAAU,CAAC,UAAU,CAAC,CAAQ,CAAC;YAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;QAAC,CAAC;QACvE,EAAE,CAAC,CAAC,UAAU,CAAC,aAAa,CAAC,CAAK,CAAC;YAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;QAAC,CAAC;QACvE,EAAE,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,SAAS,CAAC,CAAG,CAAC;YAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;QAAC,CAAC;QACrE,EAAE,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC;YAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;QAAC,CAAC;QACvE,EAAE,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAI,CAAC;YAAC,OAAO,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QAAC,CAAC;QACpE,EAAE,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,UAAU,CAAC,CAAE,CAAC;YAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;QAAC,CAAC;QACtE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC;YAAC,OAAO,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;QAAC,CAAC;QAE1E,UAAU,CAAC,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC9C,CAAC;IAQM,8BAAiB,GAAxB,UAAyB,KAAsB;QAC3C,IAAM,OAAO,GAAa,EAAE,CAAC;QAC7B,EAAE,CAAC,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAE,CAAC;YAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;QAAC,CAAC;QACzE,EAAE,CAAC,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAI,CAAC;YAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;QAAC,CAAC;QACvE,EAAE,CAAC,CAAC,KAAK,CAAC,gCAAgC,CAAC,CAAC,CAAC;YAAC,OAAO,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC;QAAC,CAAC;QACzF,EAAE,CAAC,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAAG,CAAC;YAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;QAAC,CAAC;QACxE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC,CAAC;YAAC,OAAO,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;QAAC,CAAC;QAE5E,KAAK,CAAC,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACzC,CAAC;IAMM,yBAAY,GAAnB,UAAoB,GAAW;QAC3B,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,cAAc,EAAE,UAAC,CAAC,EAAE,EAAE,EAAE,EAAE,IAAK,OAAA,EAAE,GAAG,GAAG,GAAG,EAAE,EAAb,CAAa,CAAC,CAAC,WAAW,EAAE,CAAC;IACnF,CAAC;IACL,mBAAC;AAAD,CAAC,AArcD,CAAkC,aAAK;AAI5B,qBAAQ,GAAsB,CAAC;QAClC,IAAI,EAAO,CAAC,sBAAc,CAAC,KAAK,CAAC;QACjC,MAAM,EAAK,KAAK;QAChB,SAAS,EAAE,SAAS;QACpB,QAAQ,EAAG,gBAAgB;KAC9B,EAAE;QACC,IAAI,EAAO,CAAC,sBAAc,CAAC,SAAS,CAAC;QACrC,MAAM,EAAK,KAAK;QAChB,SAAS,EAAE,YAAY;QACvB,QAAQ,EAAG,gBAAgB;KAC9B,EAAE;QACC,IAAI,EAAO,CAAC,sBAAc,CAAC,IAAI,CAAC;QAChC,MAAM,EAAK,KAAK;QAChB,SAAS,EAAE,OAAO;QAClB,QAAQ,EAAG,gBAAgB;KAC9B,EAAE;QACC,IAAI,EAAO,CAAC,sBAAc,CAAC,MAAM,EAAE,sBAAc,CAAC,cAAc,CAAC;QACjE,MAAM,EAAK,KAAK;QAChB,SAAS,EAAE,SAAS;QACpB,QAAQ,EAAG,gBAAgB;KAC9B,CAAC,CAAC;AAxBM,oCAAY","sourcesContent":["import * as Path from 'path';\nimport * as FS from 'fs';\n\nimport {Theme} from '../theme';\nimport {Renderer} from '../renderer';\nimport {Reflection, ReflectionKind, ProjectReflection, ContainerReflection, DeclarationReflection} from '../../models/reflections/index';\nimport {ReflectionGroup} from '../../models/ReflectionGroup';\nimport {UrlMapping} from '../models/UrlMapping';\nimport {NavigationItem} from '../models/NavigationItem';\nimport {RendererEvent} from '../events';\n\n/**\n * Defines a mapping of a [[Models.Kind]] to a template file.\n *\n * Used by [[DefaultTheme]] to map reflections to output files.\n */\nexport interface TemplateMapping {\n /**\n * [[DeclarationReflection.kind]] this rule applies to.\n */\n kind: ReflectionKind[];\n\n /**\n * Can this mapping have children or should all further reflections be rendered\n * to the defined output page?\n */\n isLeaf: boolean;\n\n /**\n * The name of the directory the output files should be written to.\n */\n directory: string;\n\n /**\n * The name of the template that should be used to render the reflection.\n */\n template: string;\n}\n\n/**\n * Default theme implementation of TypeDoc. If a theme does not provide a custom\n * [[BaseTheme]] implementation, this theme class will be used.\n */\nexport class DefaultTheme extends Theme {\n /**\n * Mappings of reflections kinds to templates used by this theme.\n */\n static MAPPINGS: TemplateMapping[] = [{\n kind: [ReflectionKind.Class],\n isLeaf: false,\n directory: 'classes',\n template: 'reflection.hbs'\n }, {\n kind: [ReflectionKind.Interface],\n isLeaf: false,\n directory: 'interfaces',\n template: 'reflection.hbs'\n }, {\n kind: [ReflectionKind.Enum],\n isLeaf: false,\n directory: 'enums',\n template: 'reflection.hbs'\n }, {\n kind: [ReflectionKind.Module, ReflectionKind.ExternalModule],\n isLeaf: false,\n directory: 'modules',\n template: 'reflection.hbs'\n }];\n\n /**\n * Create a new DefaultTheme instance.\n *\n * @param renderer The renderer this theme is attached to.\n * @param basePath The base path of this theme.\n */\n constructor(renderer: Renderer, basePath: string) {\n super(renderer, basePath);\n this.listenTo(renderer, RendererEvent.BEGIN, this.onRendererBegin, 1024);\n }\n\n /**\n * Test whether the given path contains a documentation generated by this theme.\n *\n * @param path The path of the directory that should be tested.\n * @returns TRUE if the given path seems to be a previous output directory,\n * otherwise FALSE.\n */\n isOutputDirectory(path: string): boolean {\n if (!FS.existsSync(Path.join(path, 'index.html'))) {\n return false;\n }\n if (!FS.existsSync(Path.join(path, 'assets'))) {\n return false;\n }\n if (!FS.existsSync(Path.join(path, 'assets', 'js', 'main.js'))) {\n return false;\n }\n if (!FS.existsSync(Path.join(path, 'assets', 'images', 'icons.png'))) {\n return false;\n }\n\n return true;\n }\n\n /**\n * Map the models of the given project to the desired output files.\n *\n * @param project The project whose urls should be generated.\n * @returns A list of [[UrlMapping]] instances defining which models\n * should be rendered to which files.\n */\n getUrls(project: ProjectReflection): UrlMapping[] {\n const urls: UrlMapping[] = [];\n const entryPoint = this.getEntryPoint(project);\n\n if (this.application.options.getValue('readme') === 'none') {\n entryPoint.url = 'index.html';\n urls.push(new UrlMapping('index.html', entryPoint, 'reflection.hbs'));\n } else {\n entryPoint.url = 'globals.html';\n urls.push(new UrlMapping('globals.html', entryPoint, 'reflection.hbs'));\n urls.push(new UrlMapping('index.html', project, 'index.hbs'));\n }\n\n if (entryPoint.children) {\n entryPoint.children.forEach((child: Reflection) => {\n if (child instanceof DeclarationReflection) {\n DefaultTheme.buildUrls(child, urls);\n }\n });\n }\n\n return urls;\n }\n\n /**\n * Return the entry point of the documentation.\n *\n * @param project The current project.\n * @returns The reflection that should be used as the entry point.\n */\n getEntryPoint(project: ProjectReflection): ContainerReflection {\n const entryPoint = this.owner.entryPoint;\n if (entryPoint) {\n const reflection = project.getChildByName(entryPoint);\n if (reflection) {\n if (reflection instanceof ContainerReflection) {\n return reflection;\n } else {\n this.application.logger.warn('The given entry point `%s` is not a container.', entryPoint);\n }\n } else {\n this.application.logger.warn('The entry point `%s` could not be found.', entryPoint);\n }\n }\n\n return project;\n }\n\n /**\n * Create a navigation structure for the given project.\n *\n * @param project The project whose navigation should be generated.\n * @returns The root navigation item.\n */\n getNavigation(project: ProjectReflection): NavigationItem {\n /**\n * Test whether the given list of modules contains an external module.\n *\n * @param modules The list of modules to test.\n * @returns TRUE if any of the modules is marked as being external.\n */\n function containsExternals(modules: DeclarationReflection[]): boolean {\n for (let index = 0, length = modules.length; index < length; index++) {\n if (modules[index].flags.isExternal) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Sort the given list of modules by name, groups external modules at the bottom.\n *\n * @param modules The list of modules that should be sorted.\n */\n function sortReflections(modules: DeclarationReflection[]) {\n modules.sort((a: DeclarationReflection, b: DeclarationReflection) => {\n if (a.flags.isExternal && !b.flags.isExternal) {\n return 1;\n }\n if (!a.flags.isExternal && b.flags.isExternal) {\n return -1;\n }\n return a.getFullName() < b.getFullName() ? -1 : 1;\n });\n }\n\n /**\n * Find the urls of all children of the given reflection and store them as dedicated urls\n * of the given NavigationItem.\n *\n * @param reflection The reflection whose children urls should be included.\n * @param item The navigation node whose dedicated urls should be set.\n */\n function includeDedicatedUrls(reflection: DeclarationReflection, item: NavigationItem) {\n (function walk(reflection: DeclarationReflection) {\n for (let key in reflection.children) {\n const child = reflection.children[key];\n if (child.hasOwnDocument && !child.kindOf(ReflectionKind.SomeModule)) {\n if (!item.dedicatedUrls) {\n item.dedicatedUrls = [];\n }\n item.dedicatedUrls.push(child.url);\n walk(child);\n }\n }\n })(reflection);\n }\n\n /**\n * Create navigation nodes for all container children of the given reflection.\n *\n * @param reflection The reflection whose children modules should be transformed into navigation nodes.\n * @param parent The parent NavigationItem of the newly created nodes.\n */\n function buildChildren(reflection: DeclarationReflection, parent: NavigationItem) {\n const modules = reflection.getChildrenByKind(ReflectionKind.SomeModule);\n modules.sort((a: DeclarationReflection, b: DeclarationReflection) => {\n return a.getFullName() < b.getFullName() ? -1 : 1;\n });\n\n modules.forEach((reflection) => {\n const item = NavigationItem.create(reflection, parent);\n includeDedicatedUrls(reflection, item);\n buildChildren(reflection, item);\n });\n }\n\n /**\n * Create navigation nodes for the given list of reflections. The resulting nodes will be grouped into\n * an \"internal\" and an \"external\" section when applicable.\n *\n * @param reflections The list of reflections which should be transformed into navigation nodes.\n * @param parent The parent NavigationItem of the newly created nodes.\n * @param callback Optional callback invoked for each generated node.\n */\n function buildGroups(reflections: DeclarationReflection[], parent: NavigationItem,\n callback?: (reflection: DeclarationReflection, item: NavigationItem) => void) {\n let state = -1;\n const hasExternals = containsExternals(reflections);\n sortReflections(reflections);\n\n reflections.forEach((reflection) => {\n if (hasExternals && !reflection.flags.isExternal && state !== 1) {\n new NavigationItem('Internals', null, parent, 'tsd-is-external');\n state = 1;\n } else if (hasExternals && reflection.flags.isExternal && state !== 2) {\n new NavigationItem('Externals', null, parent, 'tsd-is-external');\n state = 2;\n }\n\n const item = NavigationItem.create(reflection, parent);\n includeDedicatedUrls(reflection, item);\n if (callback) {\n callback(reflection, item);\n }\n });\n }\n\n /**\n * Build the navigation structure.\n *\n * @param hasSeparateGlobals Has the project a separated globals.html file?\n * @return The root node of the generated navigation structure.\n */\n function build(hasSeparateGlobals: boolean): NavigationItem {\n const root = new NavigationItem('Index', 'index.html');\n\n if (entryPoint === project) {\n const globals = new NavigationItem('Globals', hasSeparateGlobals ? 'globals.html' : 'index.html', root);\n globals.isGlobals = true;\n }\n\n const modules: DeclarationReflection[] = [];\n project.getReflectionsByKind(ReflectionKind.SomeModule).forEach((someModule) => {\n let target = someModule.parent;\n let inScope = (someModule === entryPoint);\n while (target) {\n if (target.kindOf(ReflectionKind.ExternalModule)) {\n return;\n }\n if (entryPoint === target) {\n inScope = true;\n }\n target = target.parent;\n }\n\n if (inScope && someModule instanceof DeclarationReflection) {\n modules.push(someModule);\n }\n });\n\n if (modules.length < 10) {\n buildGroups(modules, root);\n } else {\n buildGroups(entryPoint.getChildrenByKind(ReflectionKind.SomeModule), root, buildChildren);\n }\n\n return root;\n }\n\n const entryPoint = this.getEntryPoint(project);\n return build(this.application.options.getValue('readme') !== 'none');\n }\n\n /**\n * Triggered before the renderer starts rendering a project.\n *\n * @param event An event object describing the current render operation.\n */\n private onRendererBegin(event: RendererEvent) {\n if (event.project.groups) {\n event.project.groups.forEach(DefaultTheme.applyGroupClasses);\n }\n\n for (let id in event.project.reflections) {\n const reflection = event.project.reflections[id];\n if (reflection instanceof DeclarationReflection) {\n DefaultTheme.applyReflectionClasses(<DeclarationReflection> reflection);\n }\n\n if (reflection instanceof ContainerReflection && reflection['groups']) {\n reflection['groups'].forEach(DefaultTheme.applyGroupClasses);\n }\n }\n }\n\n /**\n * Return a url for the given reflection.\n *\n * @param reflection The reflection the url should be generated for.\n * @param relative The parent reflection the url generation should stop on.\n * @param separator The separator used to generate the url.\n * @returns The generated url.\n */\n static getUrl(reflection: Reflection, relative?: Reflection, separator: string = '.'): string {\n let url = reflection.getAlias();\n\n if (reflection.parent && reflection.parent !== relative &&\n !(reflection.parent instanceof ProjectReflection)) {\n url = DefaultTheme.getUrl(reflection.parent, relative, separator) + separator + url;\n }\n\n return url;\n }\n\n /**\n * Return the template mapping fore the given reflection.\n *\n * @param reflection The reflection whose mapping should be resolved.\n * @returns The found mapping or NULL if no mapping could be found.\n */\n static getMapping(reflection: DeclarationReflection): TemplateMapping {\n for (let i = 0, c = DefaultTheme.MAPPINGS.length; i < c; i++) {\n const mapping = DefaultTheme.MAPPINGS[i];\n if (reflection.kindOf(mapping.kind)) {\n return mapping;\n }\n }\n\n return null;\n }\n\n /**\n * Build the url for the the given reflection and all of its children.\n *\n * @param reflection The reflection the url should be created for.\n * @param urls The array the url should be appended to.\n * @returns The altered urls array.\n */\n static buildUrls(reflection: DeclarationReflection, urls: UrlMapping[]): UrlMapping[] {\n const mapping = DefaultTheme.getMapping(reflection);\n if (mapping) {\n const url = [mapping.directory, DefaultTheme.getUrl(reflection) + '.html'].join('/');\n urls.push(new UrlMapping(url, reflection, mapping.template));\n\n reflection.url = url;\n reflection.hasOwnDocument = true;\n for (let key in reflection.children) {\n const child = reflection.children[key];\n if (mapping.isLeaf) {\n DefaultTheme.applyAnchorUrl(child, reflection);\n } else {\n DefaultTheme.buildUrls(child, urls);\n }\n }\n } else {\n DefaultTheme.applyAnchorUrl(reflection, reflection.parent);\n }\n\n return urls;\n }\n\n /**\n * Generate an anchor url for the given reflection and all of its children.\n *\n * @param reflection The reflection an anchor url should be created for.\n * @param container The nearest reflection having an own document.\n */\n static applyAnchorUrl(reflection: Reflection, container: Reflection) {\n let anchor = DefaultTheme.getUrl(reflection, container, '.');\n if (reflection['isStatic']) {\n anchor = 'static-' + anchor;\n }\n\n reflection.url = container.url + '#' + anchor;\n reflection.anchor = anchor;\n reflection.hasOwnDocument = false;\n\n reflection.traverse((child) => {\n if (child instanceof DeclarationReflection) {\n DefaultTheme.applyAnchorUrl(child, container);\n }\n });\n }\n\n /**\n * Generate the css classes for the given reflection and apply them to the\n * [[DeclarationReflection.cssClasses]] property.\n *\n * @param reflection The reflection whose cssClasses property should be generated.\n */\n static applyReflectionClasses(reflection: DeclarationReflection) {\n const classes: string[] = [];\n let kind: string;\n\n if (reflection.kind === ReflectionKind.Accessor) {\n if (!reflection.getSignature) {\n classes.push('tsd-kind-set-signature');\n } else if (!reflection.setSignature) {\n classes.push('tsd-kind-get-signature');\n } else {\n classes.push('tsd-kind-accessor');\n }\n } else {\n kind = ReflectionKind[reflection.kind];\n classes.push(DefaultTheme.toStyleClass('tsd-kind-' + kind));\n }\n\n if (reflection.parent && reflection.parent instanceof DeclarationReflection) {\n kind = ReflectionKind[reflection.parent.kind];\n classes.push(DefaultTheme.toStyleClass(`tsd-parent-kind-${kind}`));\n }\n\n let hasTypeParameters = !!reflection.typeParameters;\n reflection.getAllSignatures().forEach((signature) => {\n hasTypeParameters = hasTypeParameters || !!signature.typeParameters;\n });\n\n if (hasTypeParameters) { classes.push('tsd-has-type-parameter'); }\n if (reflection.overwrites) { classes.push('tsd-is-overwrite'); }\n if (reflection.inheritedFrom) { classes.push('tsd-is-inherited'); }\n if (reflection.flags.isPrivate) { classes.push('tsd-is-private'); }\n if (reflection.flags.isProtected) { classes.push('tsd-is-protected'); }\n if (reflection.flags.isStatic) { classes.push('tsd-is-static'); }\n if (reflection.flags.isExternal) { classes.push('tsd-is-external'); }\n if (!reflection.flags.isExported) { classes.push('tsd-is-not-exported'); }\n\n reflection.cssClasses = classes.join(' ');\n }\n\n /**\n * Generate the css classes for the given reflection group and apply them to the\n * [[ReflectionGroup.cssClasses]] property.\n *\n * @param group The reflection group whose cssClasses property should be generated.\n */\n static applyGroupClasses(group: ReflectionGroup) {\n const classes: string[] = [];\n if (group.allChildrenAreInherited) { classes.push('tsd-is-inherited'); }\n if (group.allChildrenArePrivate) { classes.push('tsd-is-private'); }\n if (group.allChildrenAreProtectedOrPrivate) { classes.push('tsd-is-private-protected'); }\n if (group.allChildrenAreExternal) { classes.push('tsd-is-external'); }\n if (!group.someChildrenAreExported) { classes.push('tsd-is-not-exported'); }\n\n group.cssClasses = classes.join(' ');\n }\n\n /**\n * Transform a space separated string into a string suitable to be used as a\n * css class, e.g. \"constructor method\" > \"Constructor-method\".\n */\n static toStyleClass(str: string) {\n return str.replace(/(\\w)([A-Z])/g, (m, m1, m2) => m1 + '-' + m2).toLowerCase();\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"DefaultTheme.js","sourceRoot":"","sources":["../../../../src/lib/output/themes/DefaultTheme.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2BAA6B;AAC7B,uBAAyB;AAEzB,kCAAiC;AAEjC,wDAA2I;AAE3I,mDAAkD;AAClD,2DAA0D;AAC1D,oCAA0C;AAkC1C;IAAkC,gCAAK;IAgCnC,sBAAY,QAAkB,EAAE,QAAgB;QAAhD,YACI,kBAAM,QAAQ,EAAE,QAAQ,CAAC,SAE5B;QADG,KAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,sBAAa,CAAC,KAAK,EAAE,KAAI,CAAC,eAAe,EAAE,IAAI,CAAC,CAAC;;IAC7E,CAAC;IASD,wCAAiB,GAAjB,UAAkB,IAAY;QAC1B,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;YAChD,MAAM,CAAC,KAAK,CAAC;QACjB,CAAC;QACD,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;YAC5C,MAAM,CAAC,KAAK,CAAC;QACjB,CAAC;QACD,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;YAC7D,MAAM,CAAC,KAAK,CAAC;QACjB,CAAC;QACD,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;YACnE,MAAM,CAAC,KAAK,CAAC;QACjB,CAAC;QAED,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IASD,8BAAO,GAAP,UAAQ,OAA0B;QAC9B,IAAM,IAAI,GAAiB,EAAE,CAAC;QAC9B,IAAM,UAAU,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QAE/C,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,MAAM,CAAC,CAAC,CAAC;YACzD,UAAU,CAAC,GAAG,GAAG,YAAY,CAAC;YAC9B,IAAI,CAAC,IAAI,CAAC,IAAI,uBAAU,CAAC,YAAY,EAAE,UAAU,EAAE,gBAAgB,CAAC,CAAC,CAAC;QAC1E,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,UAAU,CAAC,GAAG,GAAG,cAAc,CAAC;YAChC,IAAI,CAAC,IAAI,CAAC,IAAI,uBAAU,CAAC,cAAc,EAAE,UAAU,EAAE,gBAAgB,CAAC,CAAC,CAAC;YACxE,IAAI,CAAC,IAAI,CAAC,IAAI,uBAAU,CAAC,YAAY,EAAI,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC;QACpE,CAAC;QAED,EAAE,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC;YACtB,UAAU,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAC,KAAiB;gBAC1C,EAAE,CAAC,CAAC,KAAK,YAAY,6BAAqB,CAAC,CAAC,CAAC;oBACzC,YAAY,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;gBACxC,CAAC;YACL,CAAC,CAAC,CAAC;QACP,CAAC;QAED,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAQD,oCAAa,GAAb,UAAc,OAA0B;QACpC,IAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC;QACzC,EAAE,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;YACb,IAAM,UAAU,GAAG,OAAO,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;YACtD,EAAE,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;gBACb,EAAE,CAAC,CAAC,UAAU,YAAY,2BAAmB,CAAC,CAAC,CAAC;oBAC5C,MAAM,CAAC,UAAU,CAAC;gBACtB,CAAC;gBAAC,IAAI,CAAC,CAAC;oBACJ,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,gDAAgD,EAAE,UAAU,CAAC,CAAC;gBAC/F,CAAC;YACL,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,0CAA0C,EAAE,UAAU,CAAC,CAAC;YACzF,CAAC;QACL,CAAC;QAED,MAAM,CAAC,OAAO,CAAC;IACnB,CAAC;IAQD,oCAAa,GAAb,UAAc,OAA0B;QAOpC,2BAA2B,OAAgC;YACvD,GAAG,CAAC,CAAC,IAAI,KAAK,GAAG,CAAC,EAAE,QAAM,GAAG,OAAO,CAAC,MAAM,EAAE,KAAK,GAAG,QAAM,EAAE,KAAK,EAAE,EAAE,CAAC;gBACnE,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC;oBAClC,MAAM,CAAC,IAAI,CAAC;gBAChB,CAAC;YACL,CAAC;YACD,MAAM,CAAC,KAAK,CAAC;QACjB,CAAC;QAOD,yBAAyB,OAAgC;YACrD,OAAO,CAAC,IAAI,CAAC,UAAC,CAAwB,EAAE,CAAwB;gBAC5D,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC;oBAC5C,MAAM,CAAE,CAAC,CAAC;gBACd,CAAC;gBACD,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,IAAI,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC;oBAC5C,MAAM,CAAC,CAAC,CAAC,CAAC;gBACd,CAAC;gBACD,MAAM,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;YACtD,CAAC,CAAC,CAAC;QACP,CAAC;QASD,8BAA8B,UAAiC,EAAE,IAAoB;YACjF,CAAC,cAAc,UAAiC;gBAC5C,GAAG,CAAC,CAAC,IAAI,GAAG,IAAI,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC;oBAClC,IAAM,KAAK,GAAG,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;oBACvC,EAAE,CAAC,CAAC,KAAK,CAAC,cAAc,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,sBAAc,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;wBACnE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;4BACtB,IAAI,CAAC,aAAa,GAAG,EAAE,CAAC;wBAC5B,CAAC;wBACD,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;wBACnC,IAAI,CAAC,KAAK,CAAC,CAAC;oBAChB,CAAC;gBACL,CAAC;YACL,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;QACnB,CAAC;QAQD,uBAAuB,UAAiC,EAAE,MAAsB;YAC5E,IAAM,OAAO,GAAG,UAAU,CAAC,iBAAiB,CAAC,sBAAc,CAAC,UAAU,CAAC,CAAC;YACxE,OAAO,CAAC,IAAI,CAAC,UAAC,CAAwB,EAAE,CAAwB;gBAC5D,MAAM,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;YACtD,CAAC,CAAC,CAAC;YAEH,OAAO,CAAC,OAAO,CAAC,UAAC,UAAU;gBACvB,IAAM,IAAI,GAAG,+BAAc,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;gBACvD,oBAAoB,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;gBACvC,aAAa,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;YACpC,CAAC,CAAC,CAAC;QACP,CAAC;QAUD,qBAAqB,WAAoC,EAAE,MAAsB,EAC5D,QAA4E;YAC7F,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC;YACf,IAAM,YAAY,GAAG,iBAAiB,CAAC,WAAW,CAAC,CAAC;YACpD,eAAe,CAAC,WAAW,CAAC,CAAC;YAE7B,WAAW,CAAC,OAAO,CAAC,UAAC,UAAU;gBAC3B,EAAE,CAAC,CAAC,YAAY,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,UAAU,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC;oBAC9D,IAAI,+BAAc,CAAC,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,iBAAiB,CAAC,CAAC;oBACjE,KAAK,GAAG,CAAC,CAAC;gBACd,CAAC;gBAAC,IAAI,CAAC,EAAE,CAAC,CAAC,YAAY,IAAI,UAAU,CAAC,KAAK,CAAC,UAAU,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC;oBACpE,IAAI,+BAAc,CAAC,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,iBAAiB,CAAC,CAAC;oBACjE,KAAK,GAAG,CAAC,CAAC;gBACd,CAAC;gBAED,IAAM,IAAI,GAAG,+BAAc,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;gBACvD,oBAAoB,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;gBACvC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;oBACX,QAAQ,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;gBAC/B,CAAC;YACL,CAAC,CAAC,CAAC;QACP,CAAC;QAQD,eAAe,kBAA2B;YACtC,IAAM,IAAI,GAAG,IAAI,+BAAc,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;YAEvD,EAAE,CAAC,CAAC,UAAU,KAAK,OAAO,CAAC,CAAC,CAAC;gBACzB,IAAM,OAAO,GAAG,IAAI,+BAAc,CAAC,SAAS,EAAE,kBAAkB,GAAG,cAAc,GAAG,YAAY,EAAE,IAAI,CAAC,CAAC;gBACxG,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC;YAC7B,CAAC;YAED,IAAM,OAAO,GAA4B,EAAE,CAAC;YAC5C,OAAO,CAAC,oBAAoB,CAAC,sBAAc,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,UAAC,UAAU;gBACvE,IAAI,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;gBAC/B,IAAI,OAAO,GAAG,CAAC,UAAU,KAAK,UAAU,CAAC,CAAC;gBAC1C,OAAO,MAAM,EAAE,CAAC;oBACZ,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,sBAAc,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;wBAC/C,MAAM,CAAC;oBACX,CAAC;oBACD,EAAE,CAAC,CAAC,UAAU,KAAK,MAAM,CAAC,CAAC,CAAC;wBACxB,OAAO,GAAG,IAAI,CAAC;oBACnB,CAAC;oBACD,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;gBAC3B,CAAC;gBAED,EAAE,CAAC,CAAC,OAAO,IAAI,UAAU,YAAY,6BAAqB,CAAC,CAAC,CAAC;oBACzD,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;gBAC7B,CAAC;YACL,CAAC,CAAC,CAAC;YAEH,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC,CAAC;gBACtB,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;YAC/B,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,WAAW,CAAC,UAAU,CAAC,iBAAiB,CAAC,sBAAc,CAAC,UAAU,CAAC,EAAE,IAAI,EAAE,aAAa,CAAC,CAAC;YAC9F,CAAC;YAED,MAAM,CAAC,IAAI,CAAC;QAChB,CAAC;QAED,IAAM,UAAU,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QAC/C,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,MAAM,CAAC,CAAC;IACzE,CAAC;IAOO,sCAAe,GAAvB,UAAwB,KAAoB;QACxC,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;YACvB,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,iBAAiB,CAAC,CAAC;QACjE,CAAC;QAED,GAAG,CAAC,CAAC,IAAI,EAAE,IAAI,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC;YACvC,IAAM,UAAU,GAAG,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;YACjD,EAAE,CAAC,CAAC,UAAU,YAAY,6BAAqB,CAAC,CAAC,CAAC;gBAC9C,YAAY,CAAC,sBAAsB,CAAyB,UAAU,CAAC,CAAC;YAC5E,CAAC;YAED,EAAE,CAAC,CAAC,UAAU,YAAY,2BAAmB,IAAI,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;gBACpE,UAAU,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,iBAAiB,CAAC,CAAC;YACjE,CAAC;QACL,CAAC;IACL,CAAC;IAUM,mBAAM,GAAb,UAAc,UAAsB,EAAE,QAAqB,EAAE,SAAuB;QAAvB,0BAAA,EAAA,eAAuB;QAChF,IAAI,GAAG,GAAG,UAAU,CAAC,QAAQ,EAAE,CAAC;QAEhC,EAAE,CAAC,CAAC,UAAU,CAAC,MAAM,IAAI,UAAU,CAAC,MAAM,KAAK,QAAQ;YACnD,CAAC,CAAC,UAAU,CAAC,MAAM,YAAY,yBAAiB,CAAC,CAAC,CAAC,CAAC;YACpD,GAAG,GAAG,YAAY,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,QAAQ,EAAE,SAAS,CAAC,GAAG,SAAS,GAAG,GAAG,CAAC;QACxF,CAAC;QAED,MAAM,CAAC,GAAG,CAAC;IACf,CAAC;IAQM,uBAAU,GAAjB,UAAkB,UAAiC;QAC/C,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,YAAY,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;YAC3D,IAAM,OAAO,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;YACzC,EAAE,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;gBAClC,MAAM,CAAC,OAAO,CAAC;YACnB,CAAC;QACL,CAAC;QAED,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IASM,sBAAS,GAAhB,UAAiB,UAAiC,EAAE,IAAkB;QAClE,IAAM,OAAO,GAAG,YAAY,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;QACpD,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YACV,IAAM,GAAG,GAAG,CAAC,OAAO,CAAC,SAAS,EAAE,YAAY,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YACrF,IAAI,CAAC,IAAI,CAAC,IAAI,uBAAU,CAAC,GAAG,EAAE,UAAU,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;YAE7D,UAAU,CAAC,GAAG,GAAG,GAAG,CAAC;YACrB,UAAU,CAAC,cAAc,GAAG,IAAI,CAAC;YACjC,GAAG,CAAC,CAAC,IAAI,GAAG,IAAI,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC;gBAClC,IAAM,KAAK,GAAG,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;gBACvC,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;oBACjB,YAAY,CAAC,cAAc,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;gBACnD,CAAC;gBAAC,IAAI,CAAC,CAAC;oBACJ,YAAY,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;gBACxC,CAAC;YACL,CAAC;QACL,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,YAAY,CAAC,cAAc,CAAC,UAAU,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;QAC/D,CAAC;QAED,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAQM,2BAAc,GAArB,UAAsB,UAAsB,EAAE,SAAqB;QAC/D,IAAI,MAAM,GAAG,YAAY,CAAC,MAAM,CAAC,UAAU,EAAE,SAAS,EAAE,GAAG,CAAC,CAAC;QAC7D,EAAE,CAAC,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;YACzB,MAAM,GAAG,SAAS,GAAG,MAAM,CAAC;QAChC,CAAC;QAED,UAAU,CAAC,GAAG,GAAG,SAAS,CAAC,GAAG,GAAG,GAAG,GAAG,MAAM,CAAC;QAC9C,UAAU,CAAC,MAAM,GAAG,MAAM,CAAC;QAC3B,UAAU,CAAC,cAAc,GAAG,KAAK,CAAC;QAElC,UAAU,CAAC,QAAQ,CAAC,UAAC,KAAK;YACtB,EAAE,CAAC,CAAC,KAAK,YAAY,6BAAqB,CAAC,CAAC,CAAC;gBACzC,YAAY,CAAC,cAAc,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;YAClD,CAAC;QACL,CAAC,CAAC,CAAC;IACP,CAAC;IAQM,mCAAsB,GAA7B,UAA8B,UAAiC;QAC3D,IAAM,OAAO,GAAa,EAAE,CAAC;QAC7B,IAAI,IAAY,CAAC;QAEjB,EAAE,CAAC,CAAC,UAAU,CAAC,IAAI,KAAK,sBAAc,CAAC,QAAQ,CAAC,CAAC,CAAC;YAC9C,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC;gBAC3B,OAAO,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;YAC3C,CAAC;YAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC;gBAClC,OAAO,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;YAC3C,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,OAAO,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;YACtC,CAAC;QACL,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,IAAI,GAAG,sBAAc,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;YACvC,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC,CAAC;QAChE,CAAC;QAED,EAAE,CAAC,CAAC,UAAU,CAAC,MAAM,IAAI,UAAU,CAAC,MAAM,YAAY,6BAAqB,CAAC,CAAC,CAAC;YAC1E,IAAI,GAAG,sBAAc,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YAC9C,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,qBAAmB,IAAM,CAAC,CAAC,CAAC;QACvE,CAAC;QAED,IAAI,iBAAiB,GAAG,CAAC,CAAC,UAAU,CAAC,cAAc,CAAC;QACpD,UAAU,CAAC,gBAAgB,EAAE,CAAC,OAAO,CAAC,UAAC,SAAS;YAC5C,iBAAiB,GAAG,iBAAiB,IAAI,CAAC,CAAC,SAAS,CAAC,cAAc,CAAC;QACxE,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,CAAC,iBAAiB,CAAC,CAAY,CAAC;YAAC,OAAO,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;QAAC,CAAC;QAC7E,EAAE,CAAC,CAAC,UAAU,CAAC,UAAU,CAAC,CAAQ,CAAC;YAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;QAAC,CAAC;QACvE,EAAE,CAAC,CAAC,UAAU,CAAC,aAAa,CAAC,CAAK,CAAC;YAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;QAAC,CAAC;QACvE,EAAE,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,SAAS,CAAC,CAAG,CAAC;YAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;QAAC,CAAC;QACrE,EAAE,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC;YAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;QAAC,CAAC;QACvE,EAAE,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAI,CAAC;YAAC,OAAO,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QAAC,CAAC;QACpE,EAAE,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,UAAU,CAAC,CAAE,CAAC;YAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;QAAC,CAAC;QACtE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC;YAAC,OAAO,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;QAAC,CAAC;QAE1E,UAAU,CAAC,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC9C,CAAC;IAQM,8BAAiB,GAAxB,UAAyB,KAAsB;QAC3C,IAAM,OAAO,GAAa,EAAE,CAAC;QAC7B,EAAE,CAAC,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAE,CAAC;YAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;QAAC,CAAC;QACzE,EAAE,CAAC,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAI,CAAC;YAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;QAAC,CAAC;QACvE,EAAE,CAAC,CAAC,KAAK,CAAC,gCAAgC,CAAC,CAAC,CAAC;YAAC,OAAO,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC;QAAC,CAAC;QACzF,EAAE,CAAC,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAAG,CAAC;YAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;QAAC,CAAC;QACxE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC,CAAC;YAAC,OAAO,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;QAAC,CAAC;QAE5E,KAAK,CAAC,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACzC,CAAC;IAMM,yBAAY,GAAnB,UAAoB,GAAW;QAC3B,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,cAAc,EAAE,UAAC,CAAC,EAAE,EAAE,EAAE,EAAE,IAAK,OAAA,EAAE,GAAG,GAAG,GAAG,EAAE,EAAb,CAAa,CAAC,CAAC,WAAW,EAAE,CAAC;IACnF,CAAC;IAhcM,qBAAQ,GAAsB,CAAC;YAClC,IAAI,EAAO,CAAC,sBAAc,CAAC,KAAK,CAAC;YACjC,MAAM,EAAK,KAAK;YAChB,SAAS,EAAE,SAAS;YACpB,QAAQ,EAAG,gBAAgB;SAC9B,EAAE;YACC,IAAI,EAAO,CAAC,sBAAc,CAAC,SAAS,CAAC;YACrC,MAAM,EAAK,KAAK;YAChB,SAAS,EAAE,YAAY;YACvB,QAAQ,EAAG,gBAAgB;SAC9B,EAAE;YACC,IAAI,EAAO,CAAC,sBAAc,CAAC,IAAI,CAAC;YAChC,MAAM,EAAK,KAAK;YAChB,SAAS,EAAE,OAAO;YAClB,QAAQ,EAAG,gBAAgB;SAC9B,EAAE;YACC,IAAI,EAAO,CAAC,sBAAc,CAAC,MAAM,EAAE,sBAAc,CAAC,cAAc,CAAC;YACjE,MAAM,EAAK,KAAK;YAChB,SAAS,EAAE,SAAS;YACpB,QAAQ,EAAG,gBAAgB;SAC9B,CAAC,CAAC;IA6aP,mBAAC;CAAA,AArcD,CAAkC,aAAK,GAqctC;AArcY,oCAAY","sourcesContent":["import * as Path from 'path';\nimport * as FS from 'fs';\n\nimport { Theme } from '../theme';\nimport { Renderer } from '../renderer';\nimport { Reflection, ReflectionKind, ProjectReflection, ContainerReflection, DeclarationReflection } from '../../models/reflections/index';\nimport { ReflectionGroup } from '../../models/ReflectionGroup';\nimport { UrlMapping } from '../models/UrlMapping';\nimport { NavigationItem } from '../models/NavigationItem';\nimport { RendererEvent } from '../events';\n\n/**\n * Defines a mapping of a [[Models.Kind]] to a template file.\n *\n * Used by [[DefaultTheme]] to map reflections to output files.\n */\nexport interface TemplateMapping {\n /**\n * [[DeclarationReflection.kind]] this rule applies to.\n */\n kind: ReflectionKind[];\n\n /**\n * Can this mapping have children or should all further reflections be rendered\n * to the defined output page?\n */\n isLeaf: boolean;\n\n /**\n * The name of the directory the output files should be written to.\n */\n directory: string;\n\n /**\n * The name of the template that should be used to render the reflection.\n */\n template: string;\n}\n\n/**\n * Default theme implementation of TypeDoc. If a theme does not provide a custom\n * [[BaseTheme]] implementation, this theme class will be used.\n */\nexport class DefaultTheme extends Theme {\n /**\n * Mappings of reflections kinds to templates used by this theme.\n */\n static MAPPINGS: TemplateMapping[] = [{\n kind: [ReflectionKind.Class],\n isLeaf: false,\n directory: 'classes',\n template: 'reflection.hbs'\n }, {\n kind: [ReflectionKind.Interface],\n isLeaf: false,\n directory: 'interfaces',\n template: 'reflection.hbs'\n }, {\n kind: [ReflectionKind.Enum],\n isLeaf: false,\n directory: 'enums',\n template: 'reflection.hbs'\n }, {\n kind: [ReflectionKind.Module, ReflectionKind.ExternalModule],\n isLeaf: false,\n directory: 'modules',\n template: 'reflection.hbs'\n }];\n\n /**\n * Create a new DefaultTheme instance.\n *\n * @param renderer The renderer this theme is attached to.\n * @param basePath The base path of this theme.\n */\n constructor(renderer: Renderer, basePath: string) {\n super(renderer, basePath);\n this.listenTo(renderer, RendererEvent.BEGIN, this.onRendererBegin, 1024);\n }\n\n /**\n * Test whether the given path contains a documentation generated by this theme.\n *\n * @param path The path of the directory that should be tested.\n * @returns TRUE if the given path seems to be a previous output directory,\n * otherwise FALSE.\n */\n isOutputDirectory(path: string): boolean {\n if (!FS.existsSync(Path.join(path, 'index.html'))) {\n return false;\n }\n if (!FS.existsSync(Path.join(path, 'assets'))) {\n return false;\n }\n if (!FS.existsSync(Path.join(path, 'assets', 'js', 'main.js'))) {\n return false;\n }\n if (!FS.existsSync(Path.join(path, 'assets', 'images', 'icons.png'))) {\n return false;\n }\n\n return true;\n }\n\n /**\n * Map the models of the given project to the desired output files.\n *\n * @param project The project whose urls should be generated.\n * @returns A list of [[UrlMapping]] instances defining which models\n * should be rendered to which files.\n */\n getUrls(project: ProjectReflection): UrlMapping[] {\n const urls: UrlMapping[] = [];\n const entryPoint = this.getEntryPoint(project);\n\n if (this.application.options.getValue('readme') === 'none') {\n entryPoint.url = 'index.html';\n urls.push(new UrlMapping('index.html', entryPoint, 'reflection.hbs'));\n } else {\n entryPoint.url = 'globals.html';\n urls.push(new UrlMapping('globals.html', entryPoint, 'reflection.hbs'));\n urls.push(new UrlMapping('index.html', project, 'index.hbs'));\n }\n\n if (entryPoint.children) {\n entryPoint.children.forEach((child: Reflection) => {\n if (child instanceof DeclarationReflection) {\n DefaultTheme.buildUrls(child, urls);\n }\n });\n }\n\n return urls;\n }\n\n /**\n * Return the entry point of the documentation.\n *\n * @param project The current project.\n * @returns The reflection that should be used as the entry point.\n */\n getEntryPoint(project: ProjectReflection): ContainerReflection {\n const entryPoint = this.owner.entryPoint;\n if (entryPoint) {\n const reflection = project.getChildByName(entryPoint);\n if (reflection) {\n if (reflection instanceof ContainerReflection) {\n return reflection;\n } else {\n this.application.logger.warn('The given entry point `%s` is not a container.', entryPoint);\n }\n } else {\n this.application.logger.warn('The entry point `%s` could not be found.', entryPoint);\n }\n }\n\n return project;\n }\n\n /**\n * Create a navigation structure for the given project.\n *\n * @param project The project whose navigation should be generated.\n * @returns The root navigation item.\n */\n getNavigation(project: ProjectReflection): NavigationItem {\n /**\n * Test whether the given list of modules contains an external module.\n *\n * @param modules The list of modules to test.\n * @returns TRUE if any of the modules is marked as being external.\n */\n function containsExternals(modules: DeclarationReflection[]): boolean {\n for (let index = 0, length = modules.length; index < length; index++) {\n if (modules[index].flags.isExternal) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Sort the given list of modules by name, groups external modules at the bottom.\n *\n * @param modules The list of modules that should be sorted.\n */\n function sortReflections(modules: DeclarationReflection[]) {\n modules.sort((a: DeclarationReflection, b: DeclarationReflection) => {\n if (a.flags.isExternal && !b.flags.isExternal) {\n return 1;\n }\n if (!a.flags.isExternal && b.flags.isExternal) {\n return -1;\n }\n return a.getFullName() < b.getFullName() ? -1 : 1;\n });\n }\n\n /**\n * Find the urls of all children of the given reflection and store them as dedicated urls\n * of the given NavigationItem.\n *\n * @param reflection The reflection whose children urls should be included.\n * @param item The navigation node whose dedicated urls should be set.\n */\n function includeDedicatedUrls(reflection: DeclarationReflection, item: NavigationItem) {\n (function walk(reflection: DeclarationReflection) {\n for (let key in reflection.children) {\n const child = reflection.children[key];\n if (child.hasOwnDocument && !child.kindOf(ReflectionKind.SomeModule)) {\n if (!item.dedicatedUrls) {\n item.dedicatedUrls = [];\n }\n item.dedicatedUrls.push(child.url);\n walk(child);\n }\n }\n })(reflection);\n }\n\n /**\n * Create navigation nodes for all container children of the given reflection.\n *\n * @param reflection The reflection whose children modules should be transformed into navigation nodes.\n * @param parent The parent NavigationItem of the newly created nodes.\n */\n function buildChildren(reflection: DeclarationReflection, parent: NavigationItem) {\n const modules = reflection.getChildrenByKind(ReflectionKind.SomeModule);\n modules.sort((a: DeclarationReflection, b: DeclarationReflection) => {\n return a.getFullName() < b.getFullName() ? -1 : 1;\n });\n\n modules.forEach((reflection) => {\n const item = NavigationItem.create(reflection, parent);\n includeDedicatedUrls(reflection, item);\n buildChildren(reflection, item);\n });\n }\n\n /**\n * Create navigation nodes for the given list of reflections. The resulting nodes will be grouped into\n * an \"internal\" and an \"external\" section when applicable.\n *\n * @param reflections The list of reflections which should be transformed into navigation nodes.\n * @param parent The parent NavigationItem of the newly created nodes.\n * @param callback Optional callback invoked for each generated node.\n */\n function buildGroups(reflections: DeclarationReflection[], parent: NavigationItem,\n callback?: (reflection: DeclarationReflection, item: NavigationItem) => void) {\n let state = -1;\n const hasExternals = containsExternals(reflections);\n sortReflections(reflections);\n\n reflections.forEach((reflection) => {\n if (hasExternals && !reflection.flags.isExternal && state !== 1) {\n new NavigationItem('Internals', null, parent, 'tsd-is-external');\n state = 1;\n } else if (hasExternals && reflection.flags.isExternal && state !== 2) {\n new NavigationItem('Externals', null, parent, 'tsd-is-external');\n state = 2;\n }\n\n const item = NavigationItem.create(reflection, parent);\n includeDedicatedUrls(reflection, item);\n if (callback) {\n callback(reflection, item);\n }\n });\n }\n\n /**\n * Build the navigation structure.\n *\n * @param hasSeparateGlobals Has the project a separated globals.html file?\n * @return The root node of the generated navigation structure.\n */\n function build(hasSeparateGlobals: boolean): NavigationItem {\n const root = new NavigationItem('Index', 'index.html');\n\n if (entryPoint === project) {\n const globals = new NavigationItem('Globals', hasSeparateGlobals ? 'globals.html' : 'index.html', root);\n globals.isGlobals = true;\n }\n\n const modules: DeclarationReflection[] = [];\n project.getReflectionsByKind(ReflectionKind.SomeModule).forEach((someModule) => {\n let target = someModule.parent;\n let inScope = (someModule === entryPoint);\n while (target) {\n if (target.kindOf(ReflectionKind.ExternalModule)) {\n return;\n }\n if (entryPoint === target) {\n inScope = true;\n }\n target = target.parent;\n }\n\n if (inScope && someModule instanceof DeclarationReflection) {\n modules.push(someModule);\n }\n });\n\n if (modules.length < 10) {\n buildGroups(modules, root);\n } else {\n buildGroups(entryPoint.getChildrenByKind(ReflectionKind.SomeModule), root, buildChildren);\n }\n\n return root;\n }\n\n const entryPoint = this.getEntryPoint(project);\n return build(this.application.options.getValue('readme') !== 'none');\n }\n\n /**\n * Triggered before the renderer starts rendering a project.\n *\n * @param event An event object describing the current render operation.\n */\n private onRendererBegin(event: RendererEvent) {\n if (event.project.groups) {\n event.project.groups.forEach(DefaultTheme.applyGroupClasses);\n }\n\n for (let id in event.project.reflections) {\n const reflection = event.project.reflections[id];\n if (reflection instanceof DeclarationReflection) {\n DefaultTheme.applyReflectionClasses(<DeclarationReflection> reflection);\n }\n\n if (reflection instanceof ContainerReflection && reflection['groups']) {\n reflection['groups'].forEach(DefaultTheme.applyGroupClasses);\n }\n }\n }\n\n /**\n * Return a url for the given reflection.\n *\n * @param reflection The reflection the url should be generated for.\n * @param relative The parent reflection the url generation should stop on.\n * @param separator The separator used to generate the url.\n * @returns The generated url.\n */\n static getUrl(reflection: Reflection, relative?: Reflection, separator: string = '.'): string {\n let url = reflection.getAlias();\n\n if (reflection.parent && reflection.parent !== relative &&\n !(reflection.parent instanceof ProjectReflection)) {\n url = DefaultTheme.getUrl(reflection.parent, relative, separator) + separator + url;\n }\n\n return url;\n }\n\n /**\n * Return the template mapping fore the given reflection.\n *\n * @param reflection The reflection whose mapping should be resolved.\n * @returns The found mapping or NULL if no mapping could be found.\n */\n static getMapping(reflection: DeclarationReflection): TemplateMapping {\n for (let i = 0, c = DefaultTheme.MAPPINGS.length; i < c; i++) {\n const mapping = DefaultTheme.MAPPINGS[i];\n if (reflection.kindOf(mapping.kind)) {\n return mapping;\n }\n }\n\n return null;\n }\n\n /**\n * Build the url for the the given reflection and all of its children.\n *\n * @param reflection The reflection the url should be created for.\n * @param urls The array the url should be appended to.\n * @returns The altered urls array.\n */\n static buildUrls(reflection: DeclarationReflection, urls: UrlMapping[]): UrlMapping[] {\n const mapping = DefaultTheme.getMapping(reflection);\n if (mapping) {\n const url = [mapping.directory, DefaultTheme.getUrl(reflection) + '.html'].join('/');\n urls.push(new UrlMapping(url, reflection, mapping.template));\n\n reflection.url = url;\n reflection.hasOwnDocument = true;\n for (let key in reflection.children) {\n const child = reflection.children[key];\n if (mapping.isLeaf) {\n DefaultTheme.applyAnchorUrl(child, reflection);\n } else {\n DefaultTheme.buildUrls(child, urls);\n }\n }\n } else {\n DefaultTheme.applyAnchorUrl(reflection, reflection.parent);\n }\n\n return urls;\n }\n\n /**\n * Generate an anchor url for the given reflection and all of its children.\n *\n * @param reflection The reflection an anchor url should be created for.\n * @param container The nearest reflection having an own document.\n */\n static applyAnchorUrl(reflection: Reflection, container: Reflection) {\n let anchor = DefaultTheme.getUrl(reflection, container, '.');\n if (reflection['isStatic']) {\n anchor = 'static-' + anchor;\n }\n\n reflection.url = container.url + '#' + anchor;\n reflection.anchor = anchor;\n reflection.hasOwnDocument = false;\n\n reflection.traverse((child) => {\n if (child instanceof DeclarationReflection) {\n DefaultTheme.applyAnchorUrl(child, container);\n }\n });\n }\n\n /**\n * Generate the css classes for the given reflection and apply them to the\n * [[DeclarationReflection.cssClasses]] property.\n *\n * @param reflection The reflection whose cssClasses property should be generated.\n */\n static applyReflectionClasses(reflection: DeclarationReflection) {\n const classes: string[] = [];\n let kind: string;\n\n if (reflection.kind === ReflectionKind.Accessor) {\n if (!reflection.getSignature) {\n classes.push('tsd-kind-set-signature');\n } else if (!reflection.setSignature) {\n classes.push('tsd-kind-get-signature');\n } else {\n classes.push('tsd-kind-accessor');\n }\n } else {\n kind = ReflectionKind[reflection.kind];\n classes.push(DefaultTheme.toStyleClass('tsd-kind-' + kind));\n }\n\n if (reflection.parent && reflection.parent instanceof DeclarationReflection) {\n kind = ReflectionKind[reflection.parent.kind];\n classes.push(DefaultTheme.toStyleClass(`tsd-parent-kind-${kind}`));\n }\n\n let hasTypeParameters = !!reflection.typeParameters;\n reflection.getAllSignatures().forEach((signature) => {\n hasTypeParameters = hasTypeParameters || !!signature.typeParameters;\n });\n\n if (hasTypeParameters) { classes.push('tsd-has-type-parameter'); }\n if (reflection.overwrites) { classes.push('tsd-is-overwrite'); }\n if (reflection.inheritedFrom) { classes.push('tsd-is-inherited'); }\n if (reflection.flags.isPrivate) { classes.push('tsd-is-private'); }\n if (reflection.flags.isProtected) { classes.push('tsd-is-protected'); }\n if (reflection.flags.isStatic) { classes.push('tsd-is-static'); }\n if (reflection.flags.isExternal) { classes.push('tsd-is-external'); }\n if (!reflection.flags.isExported) { classes.push('tsd-is-not-exported'); }\n\n reflection.cssClasses = classes.join(' ');\n }\n\n /**\n * Generate the css classes for the given reflection group and apply them to the\n * [[ReflectionGroup.cssClasses]] property.\n *\n * @param group The reflection group whose cssClasses property should be generated.\n */\n static applyGroupClasses(group: ReflectionGroup) {\n const classes: string[] = [];\n if (group.allChildrenAreInherited) { classes.push('tsd-is-inherited'); }\n if (group.allChildrenArePrivate) { classes.push('tsd-is-private'); }\n if (group.allChildrenAreProtectedOrPrivate) { classes.push('tsd-is-private-protected'); }\n if (group.allChildrenAreExternal) { classes.push('tsd-is-external'); }\n if (!group.someChildrenAreExported) { classes.push('tsd-is-not-exported'); }\n\n group.cssClasses = classes.join(' ');\n }\n\n /**\n * Transform a space separated string into a string suitable to be used as a\n * css class, e.g. \"constructor method\" > \"Constructor-method\".\n */\n static toStyleClass(str: string) {\n return str.replace(/(\\w)([A-Z])/g, (m, m1, m2) => m1 + '-' + m2).toLowerCase();\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/output/themes/MinimalTheme.js.map b/node_modules/typedoc/dist/lib/output/themes/MinimalTheme.js.map
index 6ef4e9529..9c11e2531 100644
--- a/node_modules/typedoc/dist/lib/output/themes/MinimalTheme.js.map
+++ b/node_modules/typedoc/dist/lib/output/themes/MinimalTheme.js.map
@@ -1 +1 @@
-{"version":3,"file":"MinimalTheme.js","sourceRoot":"","sources":["../../../../src/lib/output/themes/MinimalTheme.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uBAAyB;AACzB,2BAA6B;AAE7B,+CAA4C;AAE5C,mDAAgD;AAChD,wDAAoG;AACpG,oCAAoC;AACpC,2DAAwD;AAExD;IAAkC,gCAAY;IAO1C,sBAAY,QAAkB,EAAE,QAAgB;QAAhD,YACI,kBAAM,QAAQ,EAAE,QAAQ,CAAC,SAQ5B;QANG,QAAQ,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;QACnC,QAAQ,CAAC,eAAe,CAAC,iBAAiB,CAAC,CAAC;QAC5C,QAAQ,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC;QACvC,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;QAEhC,KAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,kBAAS,CAAC,KAAK,EAAE,KAAI,CAAC,mBAAmB,CAAC,CAAC;;IACvE,CAAC;IASD,wCAAiB,GAAjB,UAAkB,IAAY;QAC1B,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;YAChD,MAAM,CAAC,KAAK,CAAC;QACjB,CAAC;QACD,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IASD,8BAAO,GAAP,UAAQ,OAA0B;QAC9B,IAAM,IAAI,GAAiB,EAAE,CAAC;QAC9B,IAAI,CAAC,IAAI,CAAC,IAAI,uBAAU,CAAC,YAAY,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC;QAE9D,OAAO,CAAC,GAAG,GAAG,YAAY,CAAC;QAC3B,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;QACtB,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC;QAE9B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAC,KAAK;YAC3B,2BAAY,CAAC,cAAc,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QAChD,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAOO,0CAAmB,GAA3B,UAA4B,IAAe;QACvC,IAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACzB,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,YAAY,kBAAU,CAAC,CAAC,CAAC,CAAC;YACjC,MAAM,CAAC;QACX,CAAC;QAED,IAAI,CAAC,GAAG,GAAG,IAAI,+BAAc,EAAE,CAAC;QAChC,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;IAChD,CAAC;IAQM,qBAAQ,GAAf,UAAgB,KAA4B,EAAE,MAAsB;QAChE,IAAM,QAAQ,GAAG,KAAK,CAAC,QAAQ,IAAI,EAAE,CAAC;QACtC,QAAQ,CAAC,OAAO,CAAC,UAAC,KAA4B;YAC1C,IAAM,IAAI,GAAG,+BAAc,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;YACxD,YAAY,CAAC,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;QACvC,CAAC,CAAC,CAAC;IACP,CAAC;IACL,mBAAC;AAAD,CAAC,AAlFD,CAAkC,2BAAY,GAkF7C;AAlFY,oCAAY","sourcesContent":["import * as FS from 'fs';\nimport * as Path from 'path';\n\nimport {DefaultTheme} from './DefaultTheme';\nimport {Renderer} from '../renderer';\nimport {UrlMapping} from '../models/UrlMapping';\nimport {Reflection, DeclarationReflection, ProjectReflection} from '../../models/reflections/index';\nimport {PageEvent} from '../events';\nimport {NavigationItem} from '../models/NavigationItem';\n\nexport class MinimalTheme extends DefaultTheme {\n /**\n * Create a new DefaultTheme instance.\n *\n * @param renderer The renderer this theme is attached to.\n * @param basePath The base path of this theme.\n */\n constructor(renderer: Renderer, basePath: string) {\n super(renderer, basePath);\n\n renderer.removeComponent('assets');\n renderer.removeComponent('javascriptIndex');\n renderer.removeComponent('navigation');\n renderer.removeComponent('toc');\n\n this.listenTo(renderer, PageEvent.BEGIN, this.onRendererBeginPage);\n }\n\n /**\n * Test whether the given path contains a documentation generated by this theme.\n *\n * @param path The path of the directory that should be tested.\n * @returns TRUE if the given path seems to be a previous output directory,\n * otherwise FALSE.\n */\n isOutputDirectory(path: string): boolean {\n if (!FS.existsSync(Path.join(path, 'index.html'))) {\n return false;\n }\n return true;\n }\n\n /**\n * Map the models of the given project to the desired output files.\n *\n * @param project The project whose urls should be generated.\n * @returns A list of [[UrlMapping]] instances defining which models\n * should be rendered to which files.\n */\n getUrls(project: ProjectReflection): UrlMapping[] {\n const urls: UrlMapping[] = [];\n urls.push(new UrlMapping('index.html', project, 'index.hbs'));\n\n project.url = 'index.html';\n project.anchor = null;\n project.hasOwnDocument = true;\n\n project.children.forEach((child) => {\n DefaultTheme.applyAnchorUrl(child, project);\n });\n\n return urls;\n }\n\n /**\n * Triggered before a document will be rendered.\n *\n * @param page An event object describing the current render operation.\n */\n private onRendererBeginPage(page: PageEvent) {\n const model = page.model;\n if (!(model instanceof Reflection)) {\n return;\n }\n\n page.toc = new NavigationItem();\n MinimalTheme.buildToc(page.model, page.toc);\n }\n\n /**\n * Create a toc navigation item structure.\n *\n * @param model The models whose children should be written to the toc.\n * @param parent The parent [[Models.NavigationItem]] the toc should be appended to.\n */\n static buildToc(model: DeclarationReflection, parent: NavigationItem) {\n const children = model.children || [];\n children.forEach((child: DeclarationReflection) => {\n const item = NavigationItem.create(child, parent, true);\n MinimalTheme.buildToc(child, item);\n });\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"MinimalTheme.js","sourceRoot":"","sources":["../../../../src/lib/output/themes/MinimalTheme.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uBAAyB;AACzB,2BAA6B;AAE7B,+CAA8C;AAE9C,mDAAkD;AAClD,wDAAsG;AACtG,oCAAsC;AACtC,2DAA0D;AAE1D;IAAkC,gCAAY;IAO1C,sBAAY,QAAkB,EAAE,QAAgB;QAAhD,YACI,kBAAM,QAAQ,EAAE,QAAQ,CAAC,SAQ5B;QANG,QAAQ,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;QACnC,QAAQ,CAAC,eAAe,CAAC,iBAAiB,CAAC,CAAC;QAC5C,QAAQ,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC;QACvC,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;QAEhC,KAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,kBAAS,CAAC,KAAK,EAAE,KAAI,CAAC,mBAAmB,CAAC,CAAC;;IACvE,CAAC;IASD,wCAAiB,GAAjB,UAAkB,IAAY;QAC1B,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;YAChD,MAAM,CAAC,KAAK,CAAC;QACjB,CAAC;QACD,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IASD,8BAAO,GAAP,UAAQ,OAA0B;QAC9B,IAAM,IAAI,GAAiB,EAAE,CAAC;QAC9B,IAAI,CAAC,IAAI,CAAC,IAAI,uBAAU,CAAC,YAAY,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC;QAE9D,OAAO,CAAC,GAAG,GAAG,YAAY,CAAC;QAC3B,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;QACtB,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC;QAE9B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAC,KAAK;YAC3B,2BAAY,CAAC,cAAc,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QAChD,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAOO,0CAAmB,GAA3B,UAA4B,IAAe;QACvC,IAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACzB,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,YAAY,kBAAU,CAAC,CAAC,CAAC,CAAC;YACjC,MAAM,CAAC;QACX,CAAC;QAED,IAAI,CAAC,GAAG,GAAG,IAAI,+BAAc,EAAE,CAAC;QAChC,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;IAChD,CAAC;IAQM,qBAAQ,GAAf,UAAgB,KAA4B,EAAE,MAAsB;QAChE,IAAM,QAAQ,GAAG,KAAK,CAAC,QAAQ,IAAI,EAAE,CAAC;QACtC,QAAQ,CAAC,OAAO,CAAC,UAAC,KAA4B;YAC1C,IAAM,IAAI,GAAG,+BAAc,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;YACxD,YAAY,CAAC,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;QACvC,CAAC,CAAC,CAAC;IACP,CAAC;IACL,mBAAC;AAAD,CAAC,AAlFD,CAAkC,2BAAY,GAkF7C;AAlFY,oCAAY","sourcesContent":["import * as FS from 'fs';\nimport * as Path from 'path';\n\nimport { DefaultTheme } from './DefaultTheme';\nimport { Renderer } from '../renderer';\nimport { UrlMapping } from '../models/UrlMapping';\nimport { Reflection, DeclarationReflection, ProjectReflection } from '../../models/reflections/index';\nimport { PageEvent } from '../events';\nimport { NavigationItem } from '../models/NavigationItem';\n\nexport class MinimalTheme extends DefaultTheme {\n /**\n * Create a new DefaultTheme instance.\n *\n * @param renderer The renderer this theme is attached to.\n * @param basePath The base path of this theme.\n */\n constructor(renderer: Renderer, basePath: string) {\n super(renderer, basePath);\n\n renderer.removeComponent('assets');\n renderer.removeComponent('javascriptIndex');\n renderer.removeComponent('navigation');\n renderer.removeComponent('toc');\n\n this.listenTo(renderer, PageEvent.BEGIN, this.onRendererBeginPage);\n }\n\n /**\n * Test whether the given path contains a documentation generated by this theme.\n *\n * @param path The path of the directory that should be tested.\n * @returns TRUE if the given path seems to be a previous output directory,\n * otherwise FALSE.\n */\n isOutputDirectory(path: string): boolean {\n if (!FS.existsSync(Path.join(path, 'index.html'))) {\n return false;\n }\n return true;\n }\n\n /**\n * Map the models of the given project to the desired output files.\n *\n * @param project The project whose urls should be generated.\n * @returns A list of [[UrlMapping]] instances defining which models\n * should be rendered to which files.\n */\n getUrls(project: ProjectReflection): UrlMapping[] {\n const urls: UrlMapping[] = [];\n urls.push(new UrlMapping('index.html', project, 'index.hbs'));\n\n project.url = 'index.html';\n project.anchor = null;\n project.hasOwnDocument = true;\n\n project.children.forEach((child) => {\n DefaultTheme.applyAnchorUrl(child, project);\n });\n\n return urls;\n }\n\n /**\n * Triggered before a document will be rendered.\n *\n * @param page An event object describing the current render operation.\n */\n private onRendererBeginPage(page: PageEvent) {\n const model = page.model;\n if (!(model instanceof Reflection)) {\n return;\n }\n\n page.toc = new NavigationItem();\n MinimalTheme.buildToc(page.model, page.toc);\n }\n\n /**\n * Create a toc navigation item structure.\n *\n * @param model The models whose children should be written to the toc.\n * @param parent The parent [[Models.NavigationItem]] the toc should be appended to.\n */\n static buildToc(model: DeclarationReflection, parent: NavigationItem) {\n const children = model.children || [];\n children.forEach((child: DeclarationReflection) => {\n const item = NavigationItem.create(child, parent, true);\n MinimalTheme.buildToc(child, item);\n });\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/output/utils/resources.js.map b/node_modules/typedoc/dist/lib/output/utils/resources.js.map
index b8f908750..7050eeaac 100644
--- a/node_modules/typedoc/dist/lib/output/utils/resources.js.map
+++ b/node_modules/typedoc/dist/lib/output/utils/resources.js.map
@@ -1 +1 @@
-{"version":3,"file":"resources.js","sourceRoot":"","sources":["../../../../src/lib/output/utils/resources.ts"],"names":[],"mappings":";;AAAA,uBAAyB;AACzB,2BAA6B;AAC7B,2BAA6B;AAG7B,+CAAgD;AAChD,mDAAkE;AAClE,wCAAqC;AAErC;IAaI,mBAAY,KAAY;QACpB,IAAI,CAAC,KAAK,GAAO,KAAK,CAAC;QACvB,IAAI,CAAC,SAAS,GAAG,IAAI,yBAAa,EAAE,CAAC;QACrC,IAAI,CAAC,OAAO,GAAK,IAAI,yBAAa,EAAE,CAAC;QACrC,IAAI,CAAC,QAAQ,GAAI,IAAI,wBAAY,EAAE,CAAC;QACpC,IAAI,CAAC,OAAO,GAAK,IAAI,qBAAW,EAAE,CAAC;QAEnC,IAAI,CAAC,YAAY,CAAC,SAAS,EAAE,mBAAQ,CAAC,eAAe,EAAE,CAAC,CAAC;QACzD,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC;IAC/C,CAAC;IAED,4BAAQ,GAAR;QACI,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;YAChB,MAAM,CAAC,KAAK,CAAC;QACjB,CAAC;QACD,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QAErB,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC;QACzB,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;QACxB,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAED,8BAAU,GAAV;QACI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;YACjB,MAAM,CAAC,KAAK,CAAC;QACjB,CAAC;QACD,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QAEtB,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC;QAC3B,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC;QAC1B,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAED,4BAAQ,GAAR;QACI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;IAED,gCAAY,GAAZ,UAAa,IAAY,EAAE,IAAY;QACnC,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;YAChB,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAC;QAC5E,CAAC;QAED,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC1B,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YACvB,MAAM,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,qCAAqC,EAAE,IAAI,CAAC,CAAC,CAAC;QAC9E,CAAC;QAED,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;YACnC,MAAM,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,yCAAyC,EAAE,IAAI,CAAC,CAAC,CAAC;QAClF,CAAC;QAED,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,WAAW,CAAC,EAAE,IAAI,CAAC,CAAC;QACnE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,EAAI,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,EAAI,IAAI,CAAC,CAAC;QACnE,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,EAAG,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,CAAC,EAAG,IAAI,CAAC,CAAC;QACnE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,EAAI,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,EAAI,IAAI,CAAC,CAAC;IACvE,CAAC;IAED,mCAAe,GAAf,UAAgB,IAAY;QACxB,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;YAChB,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAC;QAC/E,CAAC;QAED,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QAClC,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QAChC,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QACjC,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;IACpC,CAAC;IAED,wCAAoB,GAApB;QACI,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;YAChB,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAC;QAC/E,CAAC;QAED,IAAI,CAAC,SAAS,CAAC,gBAAgB,EAAE,CAAC;QAClC,IAAI,CAAC,OAAO,CAAC,gBAAgB,EAAE,CAAC;QAChC,IAAI,CAAC,QAAQ,CAAC,gBAAgB,EAAE,CAAC;QACjC,IAAI,CAAC,OAAO,CAAC,gBAAgB,EAAE,CAAC;IACpC,CAAC;IACL,gBAAC;AAAD,CAAC,AA3FD,IA2FC;AA3FY,8BAAS","sourcesContent":["import * as FS from 'fs';\nimport * as Path from 'path';\nimport * as Util from 'util';\n\nimport {Theme} from '../theme';\nimport {HelperStack} from './resources/helpers';\nimport {TemplateStack, PartialStack} from './resources/templates';\nimport {Renderer} from '../renderer';\n\nexport class Resources {\n templates: TemplateStack;\n\n layouts: TemplateStack;\n\n partials: PartialStack;\n\n helpers: HelperStack;\n\n private theme: Theme;\n\n private isActive: boolean;\n\n constructor(theme: Theme) {\n this.theme = theme;\n this.templates = new TemplateStack();\n this.layouts = new TemplateStack();\n this.partials = new PartialStack();\n this.helpers = new HelperStack();\n\n this.addDirectory('default', Renderer.getDefaultTheme());\n this.addDirectory('theme', theme.basePath);\n }\n\n activate(): boolean {\n if (this.isActive) {\n return false;\n }\n this.isActive = true;\n\n this.partials.activate();\n this.helpers.activate();\n return true;\n }\n\n deactivate(): boolean {\n if (!this.isActive) {\n return false;\n }\n this.isActive = false;\n\n this.partials.deactivate();\n this.helpers.deactivate();\n return true;\n }\n\n getTheme(): Theme {\n return this.theme;\n }\n\n addDirectory(name: string, path: string) {\n if (this.isActive) {\n throw new Error('Cannot add directories while the resource is active.');\n }\n\n path = Path.resolve(path);\n if (!FS.existsSync(path)) {\n throw new Error(Util.format('The theme path `%s` does not exist.', path));\n }\n\n if (!FS.statSync(path).isDirectory()) {\n throw new Error(Util.format('The theme path `%s` is not a directory.', path));\n }\n\n this.templates.addOrigin(name, Path.join(path, 'templates'), true);\n this.layouts.addOrigin(name, Path.join(path, 'layouts'), true);\n this.partials.addOrigin(name, Path.join(path, 'partials'), true);\n this.helpers.addOrigin(name, Path.join(path, 'helpers'), true);\n }\n\n removeDirectory(name: string) {\n if (this.isActive) {\n throw new Error('Cannot remove directories while the resource is active.');\n }\n\n this.templates.removeOrigin(name);\n this.layouts.removeOrigin(name);\n this.partials.removeOrigin(name);\n this.helpers.removeOrigin(name);\n }\n\n removeAllDirectories() {\n if (this.isActive) {\n throw new Error('Cannot remove directories while the resource is active.');\n }\n\n this.templates.removeAllOrigins();\n this.layouts.removeAllOrigins();\n this.partials.removeAllOrigins();\n this.helpers.removeAllOrigins();\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"resources.js","sourceRoot":"","sources":["../../../../src/lib/output/utils/resources.ts"],"names":[],"mappings":";;AAAA,uBAAyB;AACzB,2BAA6B;AAC7B,2BAA6B;AAG7B,+CAAkD;AAClD,mDAAoE;AACpE,wCAAuC;AAEvC;IAaI,mBAAY,KAAY;QACpB,IAAI,CAAC,KAAK,GAAO,KAAK,CAAC;QACvB,IAAI,CAAC,SAAS,GAAG,IAAI,yBAAa,EAAE,CAAC;QACrC,IAAI,CAAC,OAAO,GAAK,IAAI,yBAAa,EAAE,CAAC;QACrC,IAAI,CAAC,QAAQ,GAAI,IAAI,wBAAY,EAAE,CAAC;QACpC,IAAI,CAAC,OAAO,GAAK,IAAI,qBAAW,EAAE,CAAC;QAEnC,IAAI,CAAC,YAAY,CAAC,SAAS,EAAE,mBAAQ,CAAC,eAAe,EAAE,CAAC,CAAC;QACzD,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC;IAC/C,CAAC;IAED,4BAAQ,GAAR;QACI,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;YAChB,MAAM,CAAC,KAAK,CAAC;QACjB,CAAC;QACD,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QAErB,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC;QACzB,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;QACxB,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAED,8BAAU,GAAV;QACI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;YACjB,MAAM,CAAC,KAAK,CAAC;QACjB,CAAC;QACD,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QAEtB,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC;QAC3B,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC;QAC1B,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAED,4BAAQ,GAAR;QACI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;IAED,gCAAY,GAAZ,UAAa,IAAY,EAAE,IAAY;QACnC,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;YAChB,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAC;QAC5E,CAAC;QAED,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC1B,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YACvB,MAAM,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,qCAAqC,EAAE,IAAI,CAAC,CAAC,CAAC;QAC9E,CAAC;QAED,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;YACnC,MAAM,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,yCAAyC,EAAE,IAAI,CAAC,CAAC,CAAC;QAClF,CAAC;QAED,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,WAAW,CAAC,EAAE,IAAI,CAAC,CAAC;QACnE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,EAAI,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,EAAI,IAAI,CAAC,CAAC;QACnE,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,EAAG,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,CAAC,EAAG,IAAI,CAAC,CAAC;QACnE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,EAAI,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,EAAI,IAAI,CAAC,CAAC;IACvE,CAAC;IAED,mCAAe,GAAf,UAAgB,IAAY;QACxB,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;YAChB,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAC;QAC/E,CAAC;QAED,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QAClC,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QAChC,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QACjC,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;IACpC,CAAC;IAED,wCAAoB,GAApB;QACI,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;YAChB,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAC;QAC/E,CAAC;QAED,IAAI,CAAC,SAAS,CAAC,gBAAgB,EAAE,CAAC;QAClC,IAAI,CAAC,OAAO,CAAC,gBAAgB,EAAE,CAAC;QAChC,IAAI,CAAC,QAAQ,CAAC,gBAAgB,EAAE,CAAC;QACjC,IAAI,CAAC,OAAO,CAAC,gBAAgB,EAAE,CAAC;IACpC,CAAC;IACL,gBAAC;AAAD,CAAC,AA3FD,IA2FC;AA3FY,8BAAS","sourcesContent":["import * as FS from 'fs';\nimport * as Path from 'path';\nimport * as Util from 'util';\n\nimport { Theme } from '../theme';\nimport { HelperStack } from './resources/helpers';\nimport { TemplateStack, PartialStack } from './resources/templates';\nimport { Renderer } from '../renderer';\n\nexport class Resources {\n templates: TemplateStack;\n\n layouts: TemplateStack;\n\n partials: PartialStack;\n\n helpers: HelperStack;\n\n private theme: Theme;\n\n private isActive: boolean;\n\n constructor(theme: Theme) {\n this.theme = theme;\n this.templates = new TemplateStack();\n this.layouts = new TemplateStack();\n this.partials = new PartialStack();\n this.helpers = new HelperStack();\n\n this.addDirectory('default', Renderer.getDefaultTheme());\n this.addDirectory('theme', theme.basePath);\n }\n\n activate(): boolean {\n if (this.isActive) {\n return false;\n }\n this.isActive = true;\n\n this.partials.activate();\n this.helpers.activate();\n return true;\n }\n\n deactivate(): boolean {\n if (!this.isActive) {\n return false;\n }\n this.isActive = false;\n\n this.partials.deactivate();\n this.helpers.deactivate();\n return true;\n }\n\n getTheme(): Theme {\n return this.theme;\n }\n\n addDirectory(name: string, path: string) {\n if (this.isActive) {\n throw new Error('Cannot add directories while the resource is active.');\n }\n\n path = Path.resolve(path);\n if (!FS.existsSync(path)) {\n throw new Error(Util.format('The theme path `%s` does not exist.', path));\n }\n\n if (!FS.statSync(path).isDirectory()) {\n throw new Error(Util.format('The theme path `%s` is not a directory.', path));\n }\n\n this.templates.addOrigin(name, Path.join(path, 'templates'), true);\n this.layouts.addOrigin(name, Path.join(path, 'layouts'), true);\n this.partials.addOrigin(name, Path.join(path, 'partials'), true);\n this.helpers.addOrigin(name, Path.join(path, 'helpers'), true);\n }\n\n removeDirectory(name: string) {\n if (this.isActive) {\n throw new Error('Cannot remove directories while the resource is active.');\n }\n\n this.templates.removeOrigin(name);\n this.layouts.removeOrigin(name);\n this.partials.removeOrigin(name);\n this.helpers.removeOrigin(name);\n }\n\n removeAllDirectories() {\n if (this.isActive) {\n throw new Error('Cannot remove directories while the resource is active.');\n }\n\n this.templates.removeAllOrigins();\n this.layouts.removeAllOrigins();\n this.partials.removeAllOrigins();\n this.helpers.removeAllOrigins();\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/output/utils/resources/helpers.js.map b/node_modules/typedoc/dist/lib/output/utils/resources/helpers.js.map
index 492c6d8be..abc03c262 100644
--- a/node_modules/typedoc/dist/lib/output/utils/resources/helpers.js.map
+++ b/node_modules/typedoc/dist/lib/output/utils/resources/helpers.js.map
@@ -1 +1 @@
-{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../src/lib/output/utils/resources/helpers.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2BAA6B;AAC7B,uCAAyC;AAEzC,iCAAgD;AAEhD;IAA4B,0BAAQ;IAApC;;IAkBA,CAAC;IAfG,2BAAU,GAAV;QACI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;YAChB,IAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YAEpC,EAAE,CAAC,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC;gBAC3B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;YACxB,CAAC;YAAC,IAAI,CAAC,EAAE,CAAC,CAAC,OAAO,IAAI,KAAK,UAAU,CAAC,CAAC,CAAC;gBACpC,IAAI,CAAC,OAAO,GAAG,IAAI,EAAE,CAAC;YAC1B,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;YACvC,CAAC;QACL,CAAC;QAED,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IACL,aAAC;AAAD,CAAC,AAlBD,CAA4B,gBAAQ,GAkBnC;AAlBY,wBAAM;AAoBnB;IAAiC,+BAAqB;IAGlD;QAAA,YACI,kBAAM,MAAM,EAAE,OAAO,CAAC,SAEzB;QALO,qBAAe,GAAa,EAAE,CAAC;QAInC,KAAI,CAAC,cAAc,EAAE,CAAC;;IAC1B,CAAC;IAED,8BAAQ,GAAR;QACI,EAAE,CAAC,CAAC,CAAC,iBAAM,QAAQ,WAAE,CAAC,CAAC,CAAC;YACpB,MAAM,CAAC,KAAK,CAAC;QACjB,CAAC;QACD,IAAM,SAAS,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;QAEzC,GAAG,CAAC,CAAC,IAAI,YAAY,IAAI,SAAS,CAAC,CAAC,CAAC;YACjC,IAAM,OAAO,GAAG,SAAS,CAAC,YAAY,CAAC,CAAC,UAAU,EAAE,CAAC;YAErD,GAAG,CAAC,CAAC,IAAI,MAAI,IAAI,OAAO,CAAC,CAAC,CAAC;gBACvB,EAAE,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,MAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;oBAC5C,QAAQ,CAAC;gBACb,CAAC;gBACD,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,MAAI,CAAC,CAAC;gBAEhC,UAAU,CAAC,cAAc,CAAC,MAAI,EAAE,OAAO,CAAC,MAAI,CAAC,CAAC,CAAC;YACnD,CAAC;QACL,CAAC;QAED,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAED,gCAAU,GAAV;QACI,EAAE,CAAC,CAAC,CAAC,iBAAM,QAAQ,WAAE,CAAC,CAAC,CAAC;YACpB,MAAM,CAAC,KAAK,CAAC;QACjB,CAAC;QAED,GAAG,CAAC,CAAa,UAAoB,EAApB,KAAA,IAAI,CAAC,eAAe,EAApB,cAAoB,EAApB,IAAoB;YAAhC,IAAI,MAAI,SAAA;YACT,UAAU,CAAC,gBAAgB,CAAC,MAAI,CAAC,CAAC;SACrC;QAED,IAAI,CAAC,eAAe,GAAG,EAAE,CAAC;QAC1B,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAED,oCAAc,GAAd;QACI,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC;IACxE,CAAC;IAED,sCAAgB,GAAhB;QACI,iBAAM,gBAAgB,WAAE,CAAC;QACzB,IAAI,CAAC,cAAc,EAAE,CAAC;IAC1B,CAAC;IACL,kBAAC;AAAD,CAAC,AAnDD,CAAiC,qBAAa,GAmD7C;AAnDY,kCAAW","sourcesContent":["import * as Path from 'path';\nimport * as Handlebars from 'handlebars';\n\nimport {ResourceStack, Resource} from './stack';\n\nexport class Helper extends Resource {\n private helpers: any;\n\n getHelpers(): any {\n if (!this.helpers) {\n const file = require(this.fileName);\n\n if (typeof file === 'object') {\n this.helpers = file;\n } else if (typeof file === 'function') {\n this.helpers = file();\n } else {\n throw new Error('Invalid helper.');\n }\n }\n\n return this.helpers;\n }\n}\n\nexport class HelperStack extends ResourceStack<Helper> {\n private registeredNames: string[] = [];\n\n constructor() {\n super(Helper, /\\.js$/);\n this.addCoreHelpers();\n }\n\n activate(): boolean {\n if (!super.activate()) {\n return false;\n }\n const resources = this.getAllResources();\n\n for (let resourceName in resources) {\n const helpers = resources[resourceName].getHelpers();\n\n for (let name in helpers) {\n if (this.registeredNames.indexOf(name) !== -1) {\n continue;\n }\n this.registeredNames.push(name);\n\n Handlebars.registerHelper(name, helpers[name]);\n }\n }\n\n return true;\n }\n\n deactivate(): boolean {\n if (!super.activate()) {\n return false;\n }\n\n for (let name of this.registeredNames) {\n Handlebars.unregisterHelper(name);\n }\n\n this.registeredNames = [];\n return true;\n }\n\n addCoreHelpers() {\n this.addOrigin('core', Path.join(__dirname, '..', '..', 'helpers'));\n }\n\n removeAllOrigins() {\n super.removeAllOrigins();\n this.addCoreHelpers();\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../src/lib/output/utils/resources/helpers.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2BAA6B;AAC7B,uCAAyC;AAEzC,iCAAkD;AAElD;IAA4B,0BAAQ;IAApC;;IAkBA,CAAC;IAfG,2BAAU,GAAV;QACI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;YAChB,IAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YAEpC,EAAE,CAAC,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC;gBAC3B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;YACxB,CAAC;YAAC,IAAI,CAAC,EAAE,CAAC,CAAC,OAAO,IAAI,KAAK,UAAU,CAAC,CAAC,CAAC;gBACpC,IAAI,CAAC,OAAO,GAAG,IAAI,EAAE,CAAC;YAC1B,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;YACvC,CAAC;QACL,CAAC;QAED,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IACL,aAAC;AAAD,CAAC,AAlBD,CAA4B,gBAAQ,GAkBnC;AAlBY,wBAAM;AAoBnB;IAAiC,+BAAqB;IAGlD;QAAA,YACI,kBAAM,MAAM,EAAE,OAAO,CAAC,SAEzB;QALO,qBAAe,GAAa,EAAE,CAAC;QAInC,KAAI,CAAC,cAAc,EAAE,CAAC;;IAC1B,CAAC;IAED,8BAAQ,GAAR;QACI,EAAE,CAAC,CAAC,CAAC,iBAAM,QAAQ,WAAE,CAAC,CAAC,CAAC;YACpB,MAAM,CAAC,KAAK,CAAC;QACjB,CAAC;QACD,IAAM,SAAS,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;QAEzC,GAAG,CAAC,CAAC,IAAI,YAAY,IAAI,SAAS,CAAC,CAAC,CAAC;YACjC,IAAM,OAAO,GAAG,SAAS,CAAC,YAAY,CAAC,CAAC,UAAU,EAAE,CAAC;YAErD,GAAG,CAAC,CAAC,IAAI,MAAI,IAAI,OAAO,CAAC,CAAC,CAAC;gBACvB,EAAE,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,MAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;oBAC5C,QAAQ,CAAC;gBACb,CAAC;gBACD,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,MAAI,CAAC,CAAC;gBAEhC,UAAU,CAAC,cAAc,CAAC,MAAI,EAAE,OAAO,CAAC,MAAI,CAAC,CAAC,CAAC;YACnD,CAAC;QACL,CAAC;QAED,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAED,gCAAU,GAAV;QACI,EAAE,CAAC,CAAC,CAAC,iBAAM,QAAQ,WAAE,CAAC,CAAC,CAAC;YACpB,MAAM,CAAC,KAAK,CAAC;QACjB,CAAC;QAED,GAAG,CAAC,CAAa,UAAoB,EAApB,KAAA,IAAI,CAAC,eAAe,EAApB,cAAoB,EAApB,IAAoB;YAAhC,IAAI,MAAI,SAAA;YACT,UAAU,CAAC,gBAAgB,CAAC,MAAI,CAAC,CAAC;SACrC;QAED,IAAI,CAAC,eAAe,GAAG,EAAE,CAAC;QAC1B,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAED,oCAAc,GAAd;QACI,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC;IACxE,CAAC;IAED,sCAAgB,GAAhB;QACI,iBAAM,gBAAgB,WAAE,CAAC;QACzB,IAAI,CAAC,cAAc,EAAE,CAAC;IAC1B,CAAC;IACL,kBAAC;AAAD,CAAC,AAnDD,CAAiC,qBAAa,GAmD7C;AAnDY,kCAAW","sourcesContent":["import * as Path from 'path';\nimport * as Handlebars from 'handlebars';\n\nimport { ResourceStack, Resource } from './stack';\n\nexport class Helper extends Resource {\n private helpers: any;\n\n getHelpers(): any {\n if (!this.helpers) {\n const file = require(this.fileName);\n\n if (typeof file === 'object') {\n this.helpers = file;\n } else if (typeof file === 'function') {\n this.helpers = file();\n } else {\n throw new Error('Invalid helper.');\n }\n }\n\n return this.helpers;\n }\n}\n\nexport class HelperStack extends ResourceStack<Helper> {\n private registeredNames: string[] = [];\n\n constructor() {\n super(Helper, /\\.js$/);\n this.addCoreHelpers();\n }\n\n activate(): boolean {\n if (!super.activate()) {\n return false;\n }\n const resources = this.getAllResources();\n\n for (let resourceName in resources) {\n const helpers = resources[resourceName].getHelpers();\n\n for (let name in helpers) {\n if (this.registeredNames.indexOf(name) !== -1) {\n continue;\n }\n this.registeredNames.push(name);\n\n Handlebars.registerHelper(name, helpers[name]);\n }\n }\n\n return true;\n }\n\n deactivate(): boolean {\n if (!super.activate()) {\n return false;\n }\n\n for (let name of this.registeredNames) {\n Handlebars.unregisterHelper(name);\n }\n\n this.registeredNames = [];\n return true;\n }\n\n addCoreHelpers() {\n this.addOrigin('core', Path.join(__dirname, '..', '..', 'helpers'));\n }\n\n removeAllOrigins() {\n super.removeAllOrigins();\n this.addCoreHelpers();\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/output/utils/resources/templates.js.map b/node_modules/typedoc/dist/lib/output/utils/resources/templates.js.map
index 02bbf8e62..1e83d5bec 100644
--- a/node_modules/typedoc/dist/lib/output/utils/resources/templates.js.map
+++ b/node_modules/typedoc/dist/lib/output/utils/resources/templates.js.map
@@ -1 +1 @@
-{"version":3,"file":"templates.js","sourceRoot":"","sources":["../../../../../src/lib/output/utils/resources/templates.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uCAAyC;AAEzC,wCAA2C;AAC3C,iCAAgD;AAEhD;IAA8B,4BAAQ;IAAtC;;IAkBA,CAAC;IAfG,8BAAW,GAAX;QACI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;YACjB,IAAM,GAAG,GAAG,aAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YACpC,IAAI,CAAC,QAAQ,GAAG,UAAU,CAAC,OAAO,CAAC,GAAG,EAAE;gBACpC,aAAa,EAAE,IAAI;aACtB,CAAC,CAAC;QACP,CAAC;QAED,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IAED,yBAAM,GAAN,UAAO,OAAY,EAAE,OAAa;QAC9B,IAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;QACpC,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACtC,CAAC;IACL,eAAC;AAAD,CAAC,AAlBD,CAA8B,gBAAQ,GAkBrC;AAlBY,4BAAQ;AAoBrB;IAAmC,iCAAuB;IACtD;eACI,kBAAM,QAAQ,EAAE,QAAQ,CAAC;IAC7B,CAAC;IACL,oBAAC;AAAD,CAAC,AAJD,CAAmC,qBAAa,GAI/C;AAJY,sCAAa;AAM1B;IAAkC,gCAAa;IAA/C;QAAA,qEAmCC;QAlCW,qBAAe,GAAa,EAAE,CAAC;;IAkC3C,CAAC;IAhCG,+BAAQ,GAAR;QACI,EAAE,CAAC,CAAC,CAAC,iBAAM,QAAQ,WAAE,CAAC,CAAC,CAAC;YACpB,MAAM,CAAC,KAAK,CAAC;QACjB,CAAC;QACD,IAAM,SAAS,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;QAEzC,GAAG,CAAC,CAAC,IAAI,MAAI,IAAI,SAAS,CAAC,CAAC,CAAC;YACzB,EAAE,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,MAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;gBAC5C,QAAQ,CAAC;YACb,CAAC;YACD,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,MAAI,CAAC,CAAC;YAEhC,IAAM,OAAO,GAAG,SAAS,CAAC,MAAI,CAAC,CAAC;YAChC,IAAM,QAAQ,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;YACvC,UAAU,CAAC,eAAe,CAAC,MAAI,EAAE,QAAQ,CAAC,CAAC;QAC/C,CAAC;QAED,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAED,iCAAU,GAAV;QACI,EAAE,CAAC,CAAC,CAAC,iBAAM,UAAU,WAAE,CAAC,CAAC,CAAC;YACtB,MAAM,CAAC,KAAK,CAAC;QACjB,CAAC;QAED,GAAG,CAAC,CAAa,UAAoB,EAApB,KAAA,IAAI,CAAC,eAAe,EAApB,cAAoB,EAApB,IAAoB;YAAhC,IAAI,MAAI,SAAA;YACT,UAAU,CAAC,iBAAiB,CAAC,MAAI,CAAC,CAAC;SACtC;QAED,IAAI,CAAC,eAAe,GAAG,EAAE,CAAC;QAC1B,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IACL,mBAAC;AAAD,CAAC,AAnCD,CAAkC,aAAa,GAmC9C;AAnCY,oCAAY","sourcesContent":["import * as Handlebars from 'handlebars';\n\nimport {readFile} from '../../../utils/fs';\nimport {ResourceStack, Resource} from './stack';\n\nexport class Template extends Resource {\n private template: HandlebarsTemplateDelegate;\n\n getTemplate(): HandlebarsTemplateDelegate {\n if (!this.template) {\n const raw = readFile(this.fileName);\n this.template = Handlebars.compile(raw, {\n preventIndent: true\n });\n }\n\n return this.template;\n }\n\n render(context: any, options?: any): string {\n const template = this.getTemplate();\n return template(context, options);\n }\n}\n\nexport class TemplateStack extends ResourceStack<Template> {\n constructor() {\n super(Template, /\\.hbs$/);\n }\n}\n\nexport class PartialStack extends TemplateStack {\n private registeredNames: string[] = [];\n\n activate(): boolean {\n if (!super.activate()) {\n return false;\n }\n const resources = this.getAllResources();\n\n for (let name in resources) {\n if (this.registeredNames.indexOf(name) !== -1) {\n continue;\n }\n this.registeredNames.push(name);\n\n const partial = resources[name];\n const template = partial.getTemplate();\n Handlebars.registerPartial(name, template);\n }\n\n return true;\n }\n\n deactivate(): boolean {\n if (!super.deactivate()) {\n return false;\n }\n\n for (let name of this.registeredNames) {\n Handlebars.unregisterPartial(name);\n }\n\n this.registeredNames = [];\n return true;\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"templates.js","sourceRoot":"","sources":["../../../../../src/lib/output/utils/resources/templates.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uCAAyC;AAEzC,wCAA6C;AAC7C,iCAAkD;AAElD;IAA8B,4BAAQ;IAAtC;;IAkBA,CAAC;IAfG,8BAAW,GAAX;QACI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;YACjB,IAAM,GAAG,GAAG,aAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YACpC,IAAI,CAAC,QAAQ,GAAG,UAAU,CAAC,OAAO,CAAC,GAAG,EAAE;gBACpC,aAAa,EAAE,IAAI;aACtB,CAAC,CAAC;QACP,CAAC;QAED,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IAED,yBAAM,GAAN,UAAO,OAAY,EAAE,OAAa;QAC9B,IAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;QACpC,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACtC,CAAC;IACL,eAAC;AAAD,CAAC,AAlBD,CAA8B,gBAAQ,GAkBrC;AAlBY,4BAAQ;AAoBrB;IAAmC,iCAAuB;IACtD;eACI,kBAAM,QAAQ,EAAE,QAAQ,CAAC;IAC7B,CAAC;IACL,oBAAC;AAAD,CAAC,AAJD,CAAmC,qBAAa,GAI/C;AAJY,sCAAa;AAM1B;IAAkC,gCAAa;IAA/C;QAAA,qEAmCC;QAlCW,qBAAe,GAAa,EAAE,CAAC;;IAkC3C,CAAC;IAhCG,+BAAQ,GAAR;QACI,EAAE,CAAC,CAAC,CAAC,iBAAM,QAAQ,WAAE,CAAC,CAAC,CAAC;YACpB,MAAM,CAAC,KAAK,CAAC;QACjB,CAAC;QACD,IAAM,SAAS,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;QAEzC,GAAG,CAAC,CAAC,IAAI,MAAI,IAAI,SAAS,CAAC,CAAC,CAAC;YACzB,EAAE,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,MAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;gBAC5C,QAAQ,CAAC;YACb,CAAC;YACD,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,MAAI,CAAC,CAAC;YAEhC,IAAM,OAAO,GAAG,SAAS,CAAC,MAAI,CAAC,CAAC;YAChC,IAAM,QAAQ,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;YACvC,UAAU,CAAC,eAAe,CAAC,MAAI,EAAE,QAAQ,CAAC,CAAC;QAC/C,CAAC;QAED,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAED,iCAAU,GAAV;QACI,EAAE,CAAC,CAAC,CAAC,iBAAM,UAAU,WAAE,CAAC,CAAC,CAAC;YACtB,MAAM,CAAC,KAAK,CAAC;QACjB,CAAC;QAED,GAAG,CAAC,CAAa,UAAoB,EAApB,KAAA,IAAI,CAAC,eAAe,EAApB,cAAoB,EAApB,IAAoB;YAAhC,IAAI,MAAI,SAAA;YACT,UAAU,CAAC,iBAAiB,CAAC,MAAI,CAAC,CAAC;SACtC;QAED,IAAI,CAAC,eAAe,GAAG,EAAE,CAAC;QAC1B,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IACL,mBAAC;AAAD,CAAC,AAnCD,CAAkC,aAAa,GAmC9C;AAnCY,oCAAY","sourcesContent":["import * as Handlebars from 'handlebars';\n\nimport { readFile } from '../../../utils/fs';\nimport { ResourceStack, Resource } from './stack';\n\nexport class Template extends Resource {\n private template: HandlebarsTemplateDelegate;\n\n getTemplate(): HandlebarsTemplateDelegate {\n if (!this.template) {\n const raw = readFile(this.fileName);\n this.template = Handlebars.compile(raw, {\n preventIndent: true\n });\n }\n\n return this.template;\n }\n\n render(context: any, options?: any): string {\n const template = this.getTemplate();\n return template(context, options);\n }\n}\n\nexport class TemplateStack extends ResourceStack<Template> {\n constructor() {\n super(Template, /\\.hbs$/);\n }\n}\n\nexport class PartialStack extends TemplateStack {\n private registeredNames: string[] = [];\n\n activate(): boolean {\n if (!super.activate()) {\n return false;\n }\n const resources = this.getAllResources();\n\n for (let name in resources) {\n if (this.registeredNames.indexOf(name) !== -1) {\n continue;\n }\n this.registeredNames.push(name);\n\n const partial = resources[name];\n const template = partial.getTemplate();\n Handlebars.registerPartial(name, template);\n }\n\n return true;\n }\n\n deactivate(): boolean {\n if (!super.deactivate()) {\n return false;\n }\n\n for (let name of this.registeredNames) {\n Handlebars.unregisterPartial(name);\n }\n\n this.registeredNames = [];\n return true;\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/utils/component.js b/node_modules/typedoc/dist/lib/utils/component.js
index a395584b5..ab9ba41cb 100644
--- a/node_modules/typedoc/dist/lib/utils/component.js
+++ b/node_modules/typedoc/dist/lib/utils/component.js
@@ -74,10 +74,10 @@ var ComponentEvent = (function (_super) {
_this.component = component;
return _this;
}
+ ComponentEvent.ADDED = 'componentAdded';
+ ComponentEvent.REMOVED = 'componentRemoved';
return ComponentEvent;
}(events_1.Event));
-ComponentEvent.ADDED = 'componentAdded';
-ComponentEvent.REMOVED = 'componentRemoved';
exports.ComponentEvent = ComponentEvent;
var AbstractComponent = (function (_super) {
__extends(AbstractComponent, _super);
diff --git a/node_modules/typedoc/dist/lib/utils/component.js.map b/node_modules/typedoc/dist/lib/utils/component.js.map
index 9c63d86d3..43f778cca 100644
--- a/node_modules/typedoc/dist/lib/utils/component.js.map
+++ b/node_modules/typedoc/dist/lib/utils/component.js.map
@@ -1 +1 @@
-{"version":3,"file":"component.js","sourceRoot":"","sources":["../../../src/lib/utils/component.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,0BAA4B;AAG5B,mCAA0D;AAqB1D,IAAM,aAAa,GAAmC,EAAE,CAAC;AAEzD,mBAA0B,OAAyB;IAC/C,MAAM,CAAC,UAAC,MAAiC;QACrC,IAAM,KAAK,GAAG,MAAM,CAAC,SAAS,CAAC;QAC/B,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,YAAY,iBAAiB,CAAC,CAAC,CAAC,CAAC;YACxC,MAAM,IAAI,KAAK,CAAC,oFAAoF,CAAC,CAAC;QAC1G,CAAC;QAED,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC;YACrB,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,YAAY,kBAAkB,CAAC,CAAC,CAAC,CAAC;gBACzC,MAAM,IAAI,KAAK,CAAC,sHAAsH,CAAC,CAAC;YAC5I,CAAC;YAED,aAAa,CAAC,IAAI,CAAC;gBACf,IAAI,EAAE,KAAK;gBACX,KAAK,EAAE,OAAO,CAAC,UAAU;aAC5B,CAAC,CAAC;QACP,CAAC;QAED,IAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;QAC1B,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;YACP,KAAK,CAAC,aAAa,GAAG,IAAI,CAAC;QAC/B,CAAC;QAED,IAAM,QAAQ,GAAG,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;QACpC,EAAE,CAAC,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;YACpB,GAAG,CAAC,CAAqB,UAAa,EAAb,+BAAa,EAAb,2BAAa,EAAb,IAAa;gBAAjC,IAAI,YAAY,sBAAA;gBACjB,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,YAAY,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;oBACzC,QAAQ,CAAC;gBACb,CAAC;gBAED,IAAM,IAAI,GAAG,YAAY,CAAC,IAAI,CAAC;gBAC/B,IAAM,QAAQ,GAAG,IAAI,CAAC,kBAAkB,IAAI,CAAC,IAAI,CAAC,kBAAkB,GAAG,EAAE,CAAC,CAAC;gBAC3E,QAAQ,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;gBACxB,KAAK,CAAC;aACT;QACL,CAAC;IACL,CAAC,CAAC;AACN,CAAC;AArCD,8BAqCC;AAED,gBAAuB,OAA0B;IAC7C,MAAM,CAAC,UAAS,MAA8B,EAAE,WAAmB;QAC/D,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,YAAY,iBAAiB,CAAC,CAAC,CAAC,CAAC;YACzC,MAAM,IAAI,KAAK,CAAC,+FAA+F,CAAC,CAAC;QACrH,CAAC;QAED,IAAM,IAAI,GAAG,MAAM,CAAC,mBAAmB,CAAC,IAAI,CAAC,MAAM,CAAC,mBAAmB,CAAC,GAAG,EAAE,CAAC,CAAC;QAC/E,OAAO,CAAC,SAAS,GAAG,MAAM,CAAC,gBAAgB,CAAC,CAAC;QAC7C,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAEnB,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,WAAW,EAAE;YACvC,GAAG,EAAE;gBACD,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YAC3D,CAAC;YACD,UAAU,EAAE,IAAI;YAChB,YAAY,EAAE,IAAI;SACrB,CAAC,CAAC;IACP,CAAC,CAAC;AACN,CAAC;AAlBD,wBAkBC;AAED;IAAoC,kCAAK;IASrC,wBAAY,IAAY,EAAE,KAAoB,EAAE,SAA2C;QAA3F,YACI,kBAAM,IAAI,CAAC,SAGd;QAFG,KAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,KAAI,CAAC,SAAS,GAAG,SAAS,CAAC;;IAC/B,CAAC;IACL,qBAAC;AAAD,CAAC,AAdD,CAAoC,cAAK;AAK9B,oBAAK,GAAG,gBAAgB,CAAC;AAEzB,sBAAO,GAAG,kBAAkB,CAAC;AAP3B,wCAAc;AAmB3B;IAAyE,qCAAe;IAmBpF,2BAAY,KAAQ;QAApB,YACI,iBAAO,SAGV;QAFG,KAAI,CAAC,eAAe,GAAG,KAAK,CAAC;QAC7B,KAAI,CAAC,UAAU,EAAE,CAAC;;IACtB,CAAC;IAKS,sCAAU,GAApB,cAAwB,CAAC;IAEf,kCAAM,GAAhB,UAAiB,IAA2B;QAAE,cAAc;aAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;YAAd,6BAAc;;QACxD,iBAAM,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;QAErC,IAAM,KAAK,GAAS,IAAI,CAAC,KAAK,CAAC;QAC/B,EAAE,CAAC,CAAC,KAAK,YAAY,iBAAiB,CAAC,CAAC,CAAC;YACrC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,eAAe,EAAE,SAAS,CAAC,CAAC;QACxD,CAAC;QAED,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAKD,iDAAqB,GAArB;QACI,MAAM,CAAC,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,iBAAiB,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC;IACxE,CAAC;IAKD,sBAAI,0CAAW;aAAf;YACI,EAAE,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC;gBACvB,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC;YAC5C,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,MAAM,CAAC,IAAI,CAAC;YAChB,CAAC;QACL,CAAC;;;OAAA;IAKD,sBAAI,oCAAK;aAAT;YACI,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC;QAChC,CAAC;;;OAAA;IACL,wBAAC;AAAD,CAAC,AAjED,CAAyE,wBAAe,GAiEvF;AAjEqB,8CAAiB;AAsEvC;IAA+F,sCAAoB;IAW/G,4BAAY,KAAQ;QAApB,YACI,kBAAM,KAAK,CAAC,SAKf;QAHG,GAAG,CAAC,CAAC,IAAI,MAAI,IAAI,KAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC;YACvC,KAAI,CAAC,YAAY,CAAC,MAAI,EAAE,KAAI,CAAC,kBAAkB,CAAC,MAAI,CAAC,CAAC,CAAC;QAC3D,CAAC;;IACL,CAAC;IAOD,yCAAY,GAAZ,UAAa,IAAY;QACrB,EAAE,CAAC,CAAC,IAAI,CAAC,kBAAkB,IAAI,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAC3D,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;QACzC,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,MAAM,CAAC,IAAI,CAAC;QAChB,CAAC;IACL,CAAC;IAED,0CAAa,GAAb;QACI,MAAM,CAAC,CAAC,CAAC,MAAM,CAAI,IAAI,CAAC,kBAAkB,CAAC,CAAC;IAChD,CAAC;IAED,yCAAY,GAAZ,UAAa,IAAY;QACrB,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,kBAAkB,IAAI,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC;IACxE,CAAC;IAED,yCAAY,GAAZ,UAAsC,IAAY,EAAE,cAAmC;QACnF,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC;YAC3B,IAAI,CAAC,kBAAkB,GAAG,EAAE,CAAC;QACjC,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAChC,MAAM,IAAI,KAAK,CAAC,4CAA4C,CAAC,CAAC;QAClE,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,IAAM,SAAS,GAAM,OAAO,cAAc,KAAK,UAAU,GAAG,IAAyB,cAAe,CAAC,IAAI,CAAC,GAAO,cAAc,CAAC;YAChI,IAAM,OAAK,GAAG,IAAI,cAAc,CAAC,cAAc,CAAC,KAAK,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC;YAExE,IAAI,CAAC,MAAM,CAAC,OAAK,CAAC,CAAC;YACnB,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC;YAE1C,MAAM,CAAC,SAAS,CAAC;QACrB,CAAC;IACL,CAAC;IAED,4CAAe,GAAf,UAAgB,IAAY;QACxB,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC;YAC3B,MAAM,CAAC,IAAI,CAAC;QAChB,CAAC;QACD,IAAM,SAAS,GAAG,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;QAChD,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;YACZ,OAAO,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;YACrC,SAAS,CAAC,aAAa,EAAE,CAAC;YAC1B,IAAI,CAAC,MAAM,CAAC,IAAI,cAAc,CAAC,cAAc,CAAC,OAAO,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC;YACzE,MAAM,CAAC,SAAS,CAAC;QACrB,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,MAAM,CAAC,IAAI,CAAC;QAChB,CAAC;IACL,CAAC;IAED,gDAAmB,GAAnB;QACI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC;YAC3B,MAAM,CAAC;QACX,CAAC;QACD,GAAG,CAAC,CAAC,IAAI,MAAI,IAAI,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC;YACvC,IAAI,CAAC,kBAAkB,CAAC,MAAI,CAAC,CAAC,aAAa,EAAE,CAAC;QAClD,CAAC;QAED,IAAI,CAAC,kBAAkB,GAAG,EAAE,CAAC;IACjC,CAAC;IACL,yBAAC;AAAD,CAAC,AAnFD,CAA+F,iBAAiB,GAmF/G;AAnFqB,gDAAkB","sourcesContent":["import * as _ from 'lodash';\n\nimport {Application} from '../application';\nimport {EventDispatcher, Event, EventMap} from './events';\nimport {DeclarationOption} from './options/declaration';\n\nexport interface ComponentHost {\n application: Application;\n}\n\nexport interface Component extends AbstractComponent<ComponentHost> {\n\n}\n\nexport interface ComponentClass<T extends Component> extends Function {\n new(owner: ComponentHost): T;\n}\n\nexport interface ComponentOptions {\n name?: string;\n childClass?: Function;\n internal?: boolean;\n}\n\nconst childMappings: {host: any, child: Function}[] = [];\n\nexport function Component(options: ComponentOptions): ClassDecorator {\n return (target: ComponentClass<Component>) => {\n const proto = target.prototype;\n if (!(proto instanceof AbstractComponent)) {\n throw new Error('The `Component` decorator can only be used with a subclass of `AbstractComponent`.');\n }\n\n if (options.childClass) {\n if (!(proto instanceof ChildableComponent)) {\n throw new Error('The `Component` decorator accepts the parameter `childClass` only when used with a subclass of `ChildableComponent`.');\n }\n\n childMappings.push({\n host: proto,\n child: options.childClass\n });\n }\n\n const name = options.name;\n if (name) {\n proto.componentName = name;\n }\n\n const internal = !!options.internal;\n if (name && !internal) {\n for (let childMapping of childMappings) {\n if (!(proto instanceof childMapping.child)) {\n continue;\n }\n\n const host = childMapping.host;\n const defaults = host._defaultComponents || (host._defaultComponents = {});\n defaults[name] = target;\n break;\n }\n }\n };\n}\n\nexport function Option(options: DeclarationOption): PropertyDecorator {\n return function(target: AbstractComponent<any>, propertyKey: string) {\n if (!(target instanceof AbstractComponent)) {\n throw new Error('The `Option` decorator can only be used on properties within an `AbstractComponent` subclass.');\n }\n\n const list = target['_componentOptions'] || (target['_componentOptions'] = []);\n options.component = target['_componentName'];\n list.push(options);\n\n Object.defineProperty(target, propertyKey, {\n get: function () {\n return this.application.options.getValue(options.name);\n },\n enumerable: true,\n configurable: true\n });\n };\n}\n\nexport class ComponentEvent extends Event {\n owner: ComponentHost;\n\n component: AbstractComponent<ComponentHost>;\n\n static ADDED = 'componentAdded';\n\n static REMOVED = 'componentRemoved';\n\n constructor(name: string, owner: ComponentHost, component: AbstractComponent<ComponentHost>) {\n super(name);\n this.owner = owner;\n this.component = component;\n }\n}\n\n/**\n * Component base class.\n */\nexport abstract class AbstractComponent<O extends ComponentHost> extends EventDispatcher implements ComponentHost {\n /**\n * The owner of this component instance.\n */\n private _componentOwner: O;\n\n /**\n * The name of this component as set by the @Component decorator.\n */\n public componentName: string;\n\n /**\n * A list of options defined by this component.\n */\n private _componentOptions: DeclarationOption[];\n\n /**\n * Create new Component instance.\n */\n constructor(owner: O) {\n super();\n this._componentOwner = owner;\n this.initialize();\n }\n\n /**\n * Initialize this component.\n */\n protected initialize() {}\n\n protected bubble(name: Event|EventMap|string, ...args: any[]) {\n super.trigger.apply(this, arguments);\n\n const owner = <any> this.owner;\n if (owner instanceof AbstractComponent) {\n owner.bubble.apply(this._componentOwner, arguments);\n }\n\n return this;\n }\n\n /**\n * Return all option declarations emitted by this component.\n */\n getOptionDeclarations(): DeclarationOption[] {\n return this._componentOptions ? this._componentOptions.slice() : [];\n }\n\n /**\n * Return the application / root component instance.\n */\n get application(): Application {\n if (this._componentOwner) {\n return this._componentOwner.application;\n } else {\n return null;\n }\n }\n\n /**\n * Return the owner of this component.\n */\n get owner(): O {\n return this._componentOwner;\n }\n}\n\n/**\n * Component base class.\n */\nexport abstract class ChildableComponent<O extends ComponentHost, C extends Component> extends AbstractComponent<O> {\n /**\n *\n */\n private _componentChildren: {[name: string]: C};\n\n private _defaultComponents: {[name: string]: ComponentClass<C>};\n\n /**\n * Create new Component instance.\n */\n constructor(owner: O) {\n super(owner);\n\n for (let name in this._defaultComponents) {\n this.addComponent(name, this._defaultComponents[name]);\n }\n }\n\n /**\n * Retrieve a plugin instance.\n *\n * @returns The instance of the plugin or NULL if no plugin with the given class is attached.\n */\n getComponent(name: string): C {\n if (this._componentChildren && this._componentChildren[name]) {\n return this._componentChildren[name];\n } else {\n return null;\n }\n }\n\n getComponents(): C[] {\n return _.values<C>(this._componentChildren);\n }\n\n hasComponent(name: string): boolean {\n return !!(this._componentChildren && this._componentChildren[name]);\n }\n\n addComponent<T extends C & Component>(name: string, componentClass: T|ComponentClass<T>): T {\n if (!this._componentChildren) {\n this._componentChildren = {};\n }\n\n if (this._componentChildren[name]) {\n throw new Error('The component `%s` has already been added.');\n } else {\n const component: T = typeof componentClass === 'function' ? new (<ComponentClass<T>> componentClass)(this) : <T> componentClass;\n const event = new ComponentEvent(ComponentEvent.ADDED, this, component);\n\n this.bubble(event);\n this._componentChildren[name] = component;\n\n return component;\n }\n }\n\n removeComponent(name: string): C {\n if (!this._componentChildren) {\n return null;\n }\n const component = this._componentChildren[name];\n if (component) {\n delete this._componentChildren[name];\n component.stopListening();\n this.bubble(new ComponentEvent(ComponentEvent.REMOVED, this, component));\n return component;\n } else {\n return null;\n }\n }\n\n removeAllComponents() {\n if (!this._componentChildren) {\n return;\n }\n for (let name in this._componentChildren) {\n this._componentChildren[name].stopListening();\n }\n\n this._componentChildren = {};\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"component.js","sourceRoot":"","sources":["../../../src/lib/utils/component.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,0BAA4B;AAG5B,mCAA4D;AAqB5D,IAAM,aAAa,GAAmC,EAAE,CAAC;AAEzD,mBAA0B,OAAyB;IAC/C,MAAM,CAAC,UAAC,MAAgB;QACpB,IAAM,KAAK,GAAG,MAAM,CAAC,SAAS,CAAC;QAC/B,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,YAAY,iBAAiB,CAAC,CAAC,CAAC,CAAC;YACxC,MAAM,IAAI,KAAK,CAAC,oFAAoF,CAAC,CAAC;QAC1G,CAAC;QAED,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC;YACrB,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,YAAY,kBAAkB,CAAC,CAAC,CAAC,CAAC;gBACzC,MAAM,IAAI,KAAK,CAAC,sHAAsH,CAAC,CAAC;YAC5I,CAAC;YAED,aAAa,CAAC,IAAI,CAAC;gBACf,IAAI,EAAE,KAAK;gBACX,KAAK,EAAE,OAAO,CAAC,UAAU;aAC5B,CAAC,CAAC;QACP,CAAC;QAED,IAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;QAC1B,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;YACP,KAAK,CAAC,aAAa,GAAG,IAAI,CAAC;QAC/B,CAAC;QAED,IAAM,QAAQ,GAAG,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;QACpC,EAAE,CAAC,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;YACpB,GAAG,CAAC,CAAqB,UAAa,EAAb,+BAAa,EAAb,2BAAa,EAAb,IAAa;gBAAjC,IAAI,YAAY,sBAAA;gBACjB,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,YAAY,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;oBACzC,QAAQ,CAAC;gBACb,CAAC;gBAED,IAAM,IAAI,GAAG,YAAY,CAAC,IAAI,CAAC;gBAC/B,IAAM,QAAQ,GAAG,IAAI,CAAC,kBAAkB,IAAI,CAAC,IAAI,CAAC,kBAAkB,GAAG,EAAE,CAAC,CAAC;gBAC3E,QAAQ,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;gBACxB,KAAK,CAAC;aACT;QACL,CAAC;IACL,CAAC,CAAC;AACN,CAAC;AArCD,8BAqCC;AAED,gBAAuB,OAA0B;IAC7C,MAAM,CAAC,UAAS,MAA8B,EAAE,WAAmB;QAC/D,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,YAAY,iBAAiB,CAAC,CAAC,CAAC,CAAC;YACzC,MAAM,IAAI,KAAK,CAAC,+FAA+F,CAAC,CAAC;QACrH,CAAC;QAED,IAAM,IAAI,GAAG,MAAM,CAAC,mBAAmB,CAAC,IAAI,CAAC,MAAM,CAAC,mBAAmB,CAAC,GAAG,EAAE,CAAC,CAAC;QAC/E,OAAO,CAAC,SAAS,GAAG,MAAM,CAAC,gBAAgB,CAAC,CAAC;QAC7C,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAEnB,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,WAAW,EAAE;YACvC,GAAG,EAAE;gBACD,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YAC3D,CAAC;YACD,UAAU,EAAE,IAAI;YAChB,YAAY,EAAE,IAAI;SACrB,CAAC,CAAC;IACP,CAAC,CAAC;AACN,CAAC;AAlBD,wBAkBC;AAED;IAAoC,kCAAK;IASrC,wBAAY,IAAY,EAAE,KAAoB,EAAE,SAA2C;QAA3F,YACI,kBAAM,IAAI,CAAC,SAGd;QAFG,KAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,KAAI,CAAC,SAAS,GAAG,SAAS,CAAC;;IAC/B,CAAC;IARM,oBAAK,GAAG,gBAAgB,CAAC;IAEzB,sBAAO,GAAG,kBAAkB,CAAC;IAOxC,qBAAC;CAAA,AAdD,CAAoC,cAAK,GAcxC;AAdY,wCAAc;AAmB3B;IAAyE,qCAAe;IAmBpF,2BAAY,KAAQ;QAApB,YACI,iBAAO,SAGV;QAFG,KAAI,CAAC,eAAe,GAAG,KAAK,CAAC;QAC7B,KAAI,CAAC,UAAU,EAAE,CAAC;;IACtB,CAAC;IAKS,sCAAU,GAApB,cAAwB,CAAC;IAEf,kCAAM,GAAhB,UAAiB,IAA2B;QAAE,cAAc;aAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;YAAd,6BAAc;;QACxD,iBAAM,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;QAErC,IAAM,KAAK,GAAS,IAAI,CAAC,KAAK,CAAC;QAC/B,EAAE,CAAC,CAAC,KAAK,YAAY,iBAAiB,CAAC,CAAC,CAAC;YACrC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,eAAe,EAAE,SAAS,CAAC,CAAC;QACxD,CAAC;QAED,MAAM,CAAC,IAAI,CAAC;IAChB,CAAC;IAKD,iDAAqB,GAArB;QACI,MAAM,CAAC,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,iBAAiB,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC;IACxE,CAAC;IAKD,sBAAI,0CAAW;aAAf;YACI,EAAE,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC;gBACvB,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC;YAC5C,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,MAAM,CAAC,IAAI,CAAC;YAChB,CAAC;QACL,CAAC;;;OAAA;IAKD,sBAAI,oCAAK;aAAT;YACI,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC;QAChC,CAAC;;;OAAA;IACL,wBAAC;AAAD,CAAC,AAjED,CAAyE,wBAAe,GAiEvF;AAjEqB,8CAAiB;AAsEvC;IAA+F,sCAAoB;IAW/G,4BAAY,KAAQ;QAApB,YACI,kBAAM,KAAK,CAAC,SAKf;QAHG,GAAG,CAAC,CAAC,IAAI,MAAI,IAAI,KAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC;YACvC,KAAI,CAAC,YAAY,CAAC,MAAI,EAAE,KAAI,CAAC,kBAAkB,CAAC,MAAI,CAAC,CAAC,CAAC;QAC3D,CAAC;;IACL,CAAC;IAOD,yCAAY,GAAZ,UAAa,IAAY;QACrB,EAAE,CAAC,CAAC,IAAI,CAAC,kBAAkB,IAAI,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAC3D,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;QACzC,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,MAAM,CAAC,IAAI,CAAC;QAChB,CAAC;IACL,CAAC;IAED,0CAAa,GAAb;QACI,MAAM,CAAC,CAAC,CAAC,MAAM,CAAI,IAAI,CAAC,kBAAkB,CAAC,CAAC;IAChD,CAAC;IAED,yCAAY,GAAZ,UAAa,IAAY;QACrB,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,kBAAkB,IAAI,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC;IACxE,CAAC;IAED,yCAAY,GAAZ,UAAsC,IAAY,EAAE,cAAmC;QACnF,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC;YAC3B,IAAI,CAAC,kBAAkB,GAAG,EAAE,CAAC;QACjC,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAChC,MAAM,IAAI,KAAK,CAAC,4CAA4C,CAAC,CAAC;QAClE,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,IAAM,SAAS,GAAM,OAAO,cAAc,KAAK,UAAU,GAAG,IAAyB,cAAe,CAAC,IAAI,CAAC,GAAO,cAAc,CAAC;YAChI,IAAM,OAAK,GAAG,IAAI,cAAc,CAAC,cAAc,CAAC,KAAK,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC;YAExE,IAAI,CAAC,MAAM,CAAC,OAAK,CAAC,CAAC;YACnB,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC;YAE1C,MAAM,CAAC,SAAS,CAAC;QACrB,CAAC;IACL,CAAC;IAED,4CAAe,GAAf,UAAgB,IAAY;QACxB,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC;YAC3B,MAAM,CAAC,IAAI,CAAC;QAChB,CAAC;QACD,IAAM,SAAS,GAAG,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;QAChD,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;YACZ,OAAO,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;YACrC,SAAS,CAAC,aAAa,EAAE,CAAC;YAC1B,IAAI,CAAC,MAAM,CAAC,IAAI,cAAc,CAAC,cAAc,CAAC,OAAO,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC;YACzE,MAAM,CAAC,SAAS,CAAC;QACrB,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,MAAM,CAAC,IAAI,CAAC;QAChB,CAAC;IACL,CAAC;IAED,gDAAmB,GAAnB;QACI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC;YAC3B,MAAM,CAAC;QACX,CAAC;QACD,GAAG,CAAC,CAAC,IAAI,MAAI,IAAI,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC;YACvC,IAAI,CAAC,kBAAkB,CAAC,MAAI,CAAC,CAAC,aAAa,EAAE,CAAC;QAClD,CAAC;QAED,IAAI,CAAC,kBAAkB,GAAG,EAAE,CAAC;IACjC,CAAC;IACL,yBAAC;AAAD,CAAC,AAnFD,CAA+F,iBAAiB,GAmF/G;AAnFqB,gDAAkB","sourcesContent":["import * as _ from 'lodash';\n\nimport { Application } from '../application';\nimport { EventDispatcher, Event, EventMap } from './events';\nimport { DeclarationOption } from './options/declaration';\n\nexport interface ComponentHost {\n application: Application;\n}\n\nexport interface Component extends AbstractComponent<ComponentHost> {\n\n}\n\nexport interface ComponentClass<T extends Component> extends Function {\n new(owner: ComponentHost): T;\n}\n\nexport interface ComponentOptions {\n name?: string;\n childClass?: Function;\n internal?: boolean;\n}\n\nconst childMappings: {host: any, child: Function}[] = [];\n\nexport function Component(options: ComponentOptions): ClassDecorator {\n return (target: Function) => {\n const proto = target.prototype;\n if (!(proto instanceof AbstractComponent)) {\n throw new Error('The `Component` decorator can only be used with a subclass of `AbstractComponent`.');\n }\n\n if (options.childClass) {\n if (!(proto instanceof ChildableComponent)) {\n throw new Error('The `Component` decorator accepts the parameter `childClass` only when used with a subclass of `ChildableComponent`.');\n }\n\n childMappings.push({\n host: proto,\n child: options.childClass\n });\n }\n\n const name = options.name;\n if (name) {\n proto.componentName = name;\n }\n\n const internal = !!options.internal;\n if (name && !internal) {\n for (let childMapping of childMappings) {\n if (!(proto instanceof childMapping.child)) {\n continue;\n }\n\n const host = childMapping.host;\n const defaults = host._defaultComponents || (host._defaultComponents = {});\n defaults[name] = target;\n break;\n }\n }\n };\n}\n\nexport function Option(options: DeclarationOption): PropertyDecorator {\n return function(target: AbstractComponent<any>, propertyKey: string) {\n if (!(target instanceof AbstractComponent)) {\n throw new Error('The `Option` decorator can only be used on properties within an `AbstractComponent` subclass.');\n }\n\n const list = target['_componentOptions'] || (target['_componentOptions'] = []);\n options.component = target['_componentName'];\n list.push(options);\n\n Object.defineProperty(target, propertyKey, {\n get: function () {\n return this.application.options.getValue(options.name);\n },\n enumerable: true,\n configurable: true\n });\n };\n}\n\nexport class ComponentEvent extends Event {\n owner: ComponentHost;\n\n component: AbstractComponent<ComponentHost>;\n\n static ADDED = 'componentAdded';\n\n static REMOVED = 'componentRemoved';\n\n constructor(name: string, owner: ComponentHost, component: AbstractComponent<ComponentHost>) {\n super(name);\n this.owner = owner;\n this.component = component;\n }\n}\n\n/**\n * Component base class.\n */\nexport abstract class AbstractComponent<O extends ComponentHost> extends EventDispatcher implements ComponentHost {\n /**\n * The owner of this component instance.\n */\n private _componentOwner: O;\n\n /**\n * The name of this component as set by the @Component decorator.\n */\n public componentName: string;\n\n /**\n * A list of options defined by this component.\n */\n private _componentOptions: DeclarationOption[];\n\n /**\n * Create new Component instance.\n */\n constructor(owner: O) {\n super();\n this._componentOwner = owner;\n this.initialize();\n }\n\n /**\n * Initialize this component.\n */\n protected initialize() {}\n\n protected bubble(name: Event|EventMap|string, ...args: any[]) {\n super.trigger.apply(this, arguments);\n\n const owner = <any> this.owner;\n if (owner instanceof AbstractComponent) {\n owner.bubble.apply(this._componentOwner, arguments);\n }\n\n return this;\n }\n\n /**\n * Return all option declarations emitted by this component.\n */\n getOptionDeclarations(): DeclarationOption[] {\n return this._componentOptions ? this._componentOptions.slice() : [];\n }\n\n /**\n * Return the application / root component instance.\n */\n get application(): Application {\n if (this._componentOwner) {\n return this._componentOwner.application;\n } else {\n return null;\n }\n }\n\n /**\n * Return the owner of this component.\n */\n get owner(): O {\n return this._componentOwner;\n }\n}\n\n/**\n * Component base class.\n */\nexport abstract class ChildableComponent<O extends ComponentHost, C extends Component> extends AbstractComponent<O> {\n /**\n *\n */\n private _componentChildren: {[name: string]: C};\n\n private _defaultComponents: {[name: string]: ComponentClass<C>};\n\n /**\n * Create new Component instance.\n */\n constructor(owner: O) {\n super(owner);\n\n for (let name in this._defaultComponents) {\n this.addComponent(name, this._defaultComponents[name]);\n }\n }\n\n /**\n * Retrieve a plugin instance.\n *\n * @returns The instance of the plugin or NULL if no plugin with the given class is attached.\n */\n getComponent(name: string): C {\n if (this._componentChildren && this._componentChildren[name]) {\n return this._componentChildren[name];\n } else {\n return null;\n }\n }\n\n getComponents(): C[] {\n return _.values<C>(this._componentChildren);\n }\n\n hasComponent(name: string): boolean {\n return !!(this._componentChildren && this._componentChildren[name]);\n }\n\n addComponent<T extends C & Component>(name: string, componentClass: T|ComponentClass<T>): T {\n if (!this._componentChildren) {\n this._componentChildren = {};\n }\n\n if (this._componentChildren[name]) {\n throw new Error('The component `%s` has already been added.');\n } else {\n const component: T = typeof componentClass === 'function' ? new (<ComponentClass<T>> componentClass)(this) : <T> componentClass;\n const event = new ComponentEvent(ComponentEvent.ADDED, this, component);\n\n this.bubble(event);\n this._componentChildren[name] = component;\n\n return component;\n }\n }\n\n removeComponent(name: string): C {\n if (!this._componentChildren) {\n return null;\n }\n const component = this._componentChildren[name];\n if (component) {\n delete this._componentChildren[name];\n component.stopListening();\n this.bubble(new ComponentEvent(ComponentEvent.REMOVED, this, component));\n return component;\n } else {\n return null;\n }\n }\n\n removeAllComponents() {\n if (!this._componentChildren) {\n return;\n }\n for (let name in this._componentChildren) {\n this._componentChildren[name].stopListening();\n }\n\n this._componentChildren = {};\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/utils/index.js.map b/node_modules/typedoc/dist/lib/utils/index.js.map
index 9a3e4f755..7383a08ab 100644
--- a/node_modules/typedoc/dist/lib/utils/index.js.map
+++ b/node_modules/typedoc/dist/lib/utils/index.js.map
@@ -1 +1 @@
-{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/utils/index.ts"],"names":[],"mappings":";;AAAA,yCAAqF;AAA7E,gCAAA,SAAS,CAAA;AAAE,6BAAA,MAAM,CAAA;AAAE,wCAAA,iBAAiB,CAAA;AAAE,yCAAA,kBAAkB,CAAA;AAChE,mCAAgD;AAAxC,yBAAA,KAAK,CAAA;AAAE,mCAAA,eAAe,CAAA;AAC9B,2BAAuF;AAA/E,6BAAA,aAAa,CAAA;AAAE,+BAAA,eAAe,CAAA;AAAE,sCAAA,sBAAsB,CAAA;AAAE,yBAAA,SAAS,CAAA;AACzE,qCAA0E;AAAlE,2BAAA,MAAM,CAAA;AAAE,6BAAA,QAAQ,CAAA;AAAE,kCAAA,aAAa,CAAA;AAAE,mCAAA,cAAc,CAAA;AACvD,qCAAqC;AAA7B,+BAAA,UAAU,CAAA","sourcesContent":["export {Component, Option, AbstractComponent, ChildableComponent} from './component';\nexport {Event, EventDispatcher} from './events';\nexport {normalizePath, directoryExists, ensureDirectoriesExist, writeFile} from './fs';\nexport {Logger, LogLevel, ConsoleLogger, CallbackLogger} from './loggers';\nexport {PluginHost} from './plugins';\n"]} \ No newline at end of file
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/utils/index.ts"],"names":[],"mappings":";;AAAA,yCAAuF;AAA9E,gCAAA,SAAS,CAAA;AAAE,6BAAA,MAAM,CAAA;AAAE,wCAAA,iBAAiB,CAAA;AAAE,yCAAA,kBAAkB,CAAA;AACjE,mCAAkD;AAAzC,yBAAA,KAAK,CAAA;AAAE,mCAAA,eAAe,CAAA;AAC/B,2BAAyF;AAAhF,6BAAA,aAAa,CAAA;AAAE,+BAAA,eAAe,CAAA;AAAE,sCAAA,sBAAsB,CAAA;AAAE,yBAAA,SAAS,CAAA;AAC1E,qCAA4E;AAAnE,2BAAA,MAAM,CAAA;AAAE,6BAAA,QAAQ,CAAA;AAAE,kCAAA,aAAa,CAAA;AAAE,mCAAA,cAAc,CAAA;AACxD,qCAAuC;AAA9B,+BAAA,UAAU,CAAA","sourcesContent":["export { Component, Option, AbstractComponent, ChildableComponent } from './component';\nexport { Event, EventDispatcher } from './events';\nexport { normalizePath, directoryExists, ensureDirectoriesExist, writeFile } from './fs';\nexport { Logger, LogLevel, ConsoleLogger, CallbackLogger } from './loggers';\nexport { PluginHost } from './plugins';\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/utils/options/help.js b/node_modules/typedoc/dist/lib/utils/options/help.js
index 5e92bf881..e24ab11f7 100644
--- a/node_modules/typedoc/dist/lib/utils/options/help.js
+++ b/node_modules/typedoc/dist/lib/utils/options/help.js
@@ -36,22 +36,20 @@ function getParameterHelp(options, scope) {
}
function getOptionsHelp(options) {
var typeDoc = getParameterHelp(options, declaration_1.ParameterScope.TypeDoc);
- var typeScript = getParameterHelp(options, declaration_1.ParameterScope.TypeScript);
- var margin = Math.max(typeDoc.margin, typeScript.margin);
var output = [];
output.push('Usage:');
output.push(' typedoc --mode modules --out path/to/documentation path/to/sourcefiles');
output.push('', 'TypeDoc options:');
pushHelp(typeDoc);
output.push('', 'TypeScript options:');
- pushHelp(typeScript);
+ output.push('See https://www.typescriptlang.org/docs/handbook/compiler-options.html');
output.push('');
return output.join(ts.sys.newLine);
function pushHelp(columns) {
for (var i = 0; i < columns.names.length; i++) {
var usage = columns.names[i];
var description = columns.helps[i];
- output.push(usage + padding(margin - usage.length + 2) + description);
+ output.push(usage + padding(typeDoc.margin - usage.length + 2) + description);
}
}
function padding(length) {
diff --git a/node_modules/typedoc/dist/lib/utils/options/help.js.map b/node_modules/typedoc/dist/lib/utils/options/help.js.map
index 675472780..be903abaa 100644
--- a/node_modules/typedoc/dist/lib/utils/options/help.js.map
+++ b/node_modules/typedoc/dist/lib/utils/options/help.js.map
@@ -1 +1 @@
-{"version":3,"file":"help.js","sourceRoot":"","sources":["../../../../src/lib/utils/options/help.ts"],"names":[],"mappings":";;AAAA,+BAAiC;AACjC,uCAAyC;AAGzC,6CAA4D;AAc5D,0BAA0B,OAAgB,EAAE,KAAqB;IAC7D,IAAM,UAAU,GAAG,OAAO,CAAC,sBAAsB,CAAC,KAAK,CAAC,CAAC;IACzD,UAAU,CAAC,IAAI,CAAC,UAAC,CAAC,EAAE,CAAC;QACjB,MAAM,CAAC,GAAG,CAAC,aAAa,CAAS,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC;IACjF,CAAC,CAAC,CAAC;IAEH,IAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,IAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,IAAI,MAAM,GAAG,CAAC,CAAC;IAEf,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACzC,IAAM,SAAS,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;QAChC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;YAClB,QAAQ,CAAC;QACb,CAAC;QAED,IAAI,MAAI,GAAG,GAAG,CAAC;QACf,EAAE,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;YAClB,MAAI,IAAI,GAAG,GAAG,SAAS,CAAC,KAAK,CAAC;YAC9B,EAAE,CAAC,CAAC,OAAO,SAAS,CAAC,IAAI,KAAK,WAAW,CAAC,CAAC,CAAC;gBACxC,MAAI,IAAI,GAAG,GAAG,2BAAa,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC;YAC9D,CAAC;YACD,MAAI,IAAI,IAAI,CAAC;QACjB,CAAC;QAED,MAAI,IAAI,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC;QAC9B,EAAE,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;YACjB,MAAI,IAAI,GAAG,GAAG,2BAAa,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC;QAC9D,CAAC;QAED,KAAK,CAAC,IAAI,CAAC,MAAI,CAAC,CAAC;QACjB,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QAC3B,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,MAAI,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3C,CAAC;IAED,MAAM,CAAC,EAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAC,CAAC;AACxD,CAAC;AAOD,wBAA+B,OAAgB;IAC3C,IAAM,OAAO,GAAG,gBAAgB,CAAC,OAAO,EAAE,4BAAc,CAAC,OAAO,CAAC,CAAC;IAClE,IAAM,UAAU,GAAG,gBAAgB,CAAC,OAAO,EAAE,4BAAc,CAAC,UAAU,CAAC,CAAC;IACxE,IAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;IAE3D,IAAM,MAAM,GAAa,EAAE,CAAC;IAC5B,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACtB,MAAM,CAAC,IAAI,CAAC,yEAAyE,CAAC,CAAC;IAEvF,MAAM,CAAC,IAAI,CAAC,EAAE,EAAE,kBAAkB,CAAC,CAAC;IACpC,QAAQ,CAAC,OAAO,CAAC,CAAC;IAElB,MAAM,CAAC,IAAI,CAAC,EAAE,EAAE,qBAAqB,CAAC,CAAC;IACvC,QAAQ,CAAC,UAAU,CAAC,CAAC;IAErB,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAChB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAEnC,kBAAkB,OAAsB;QACpC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YAC5C,IAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAC/B,IAAM,WAAW,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YACrC,MAAM,CAAC,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC;QAC1E,CAAC;IACL,CAAC;IAED,iBAAiB,MAAc;QAC3B,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACvC,CAAC;AACL,CAAC;AA7BD,wCA6BC","sourcesContent":["import * as ts from 'typescript';\nimport * as _ts from '../../ts-internal';\n\nimport {Options} from './options';\nimport {ParameterScope, ParameterHint} from './declaration';\n\nexport interface ParameterHelp {\n names: string[];\n helps: string[];\n margin: number;\n}\n\n/**\n * Prepare parameter information for the [[toString]] method.\n *\n * @param scope The scope of the parameters whose help should be returned.\n * @returns The columns and lines for the help of the requested parameters.\n */\nfunction getParameterHelp(options: Options, scope: ParameterScope): ParameterHelp {\n const parameters = options.getDeclarationsByScope(scope);\n parameters.sort((a, b) => {\n return _ts.compareValues<string>(a.name.toLowerCase(), b.name.toLowerCase());\n });\n\n const names: string[] = [];\n const helps: string[] = [];\n let margin = 0;\n\n for (let i = 0; i < parameters.length; i++) {\n const parameter = parameters[i];\n if (!parameter.help) {\n continue;\n }\n\n let name = ' ';\n if (parameter.short) {\n name += '-' + parameter.short;\n if (typeof parameter.hint !== 'undefined') {\n name += ' ' + ParameterHint[parameter.hint].toUpperCase();\n }\n name += ', ';\n }\n\n name += '--' + parameter.name;\n if (parameter.hint) {\n name += ' ' + ParameterHint[parameter.hint].toUpperCase();\n }\n\n names.push(name);\n helps.push(parameter.help);\n margin = Math.max(name.length, margin);\n }\n\n return {names: names, helps: helps, margin: margin};\n}\n\n/**\n * Print some usage information.\n *\n * Taken from TypeScript (src/compiler/tsc.ts)\n */\nexport function getOptionsHelp(options: Options): string {\n const typeDoc = getParameterHelp(options, ParameterScope.TypeDoc);\n const typeScript = getParameterHelp(options, ParameterScope.TypeScript);\n const margin = Math.max(typeDoc.margin, typeScript.margin);\n\n const output: string[] = [];\n output.push('Usage:');\n output.push(' typedoc --mode modules --out path/to/documentation path/to/sourcefiles');\n\n output.push('', 'TypeDoc options:');\n pushHelp(typeDoc);\n\n output.push('', 'TypeScript options:');\n pushHelp(typeScript);\n\n output.push('');\n return output.join(ts.sys.newLine);\n\n function pushHelp(columns: ParameterHelp) {\n for (let i = 0; i < columns.names.length; i++) {\n const usage = columns.names[i];\n const description = columns.helps[i];\n output.push(usage + padding(margin - usage.length + 2) + description);\n }\n }\n\n function padding(length: number): string {\n return Array(length + 1).join(' ');\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"help.js","sourceRoot":"","sources":["../../../../src/lib/utils/options/help.ts"],"names":[],"mappings":";;AAAA,+BAAiC;AACjC,uCAAyC;AAGzC,6CAA8D;AAc9D,0BAA0B,OAAgB,EAAE,KAAqB;IAC7D,IAAM,UAAU,GAAG,OAAO,CAAC,sBAAsB,CAAC,KAAK,CAAC,CAAC;IACzD,UAAU,CAAC,IAAI,CAAC,UAAC,CAAC,EAAE,CAAC;QACjB,MAAM,CAAC,GAAG,CAAC,aAAa,CAAS,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC;IACjF,CAAC,CAAC,CAAC;IAEH,IAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,IAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,IAAI,MAAM,GAAG,CAAC,CAAC;IAEf,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACzC,IAAM,SAAS,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;QAChC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;YAClB,QAAQ,CAAC;QACb,CAAC;QAED,IAAI,MAAI,GAAG,GAAG,CAAC;QACf,EAAE,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;YAClB,MAAI,IAAI,GAAG,GAAG,SAAS,CAAC,KAAK,CAAC;YAC9B,EAAE,CAAC,CAAC,OAAO,SAAS,CAAC,IAAI,KAAK,WAAW,CAAC,CAAC,CAAC;gBACxC,MAAI,IAAI,GAAG,GAAG,2BAAa,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC;YAC9D,CAAC;YACD,MAAI,IAAI,IAAI,CAAC;QACjB,CAAC;QAED,MAAI,IAAI,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC;QAC9B,EAAE,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;YACjB,MAAI,IAAI,GAAG,GAAG,2BAAa,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC;QAC9D,CAAC;QAED,KAAK,CAAC,IAAI,CAAC,MAAI,CAAC,CAAC;QACjB,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QAC3B,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,MAAI,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3C,CAAC;IAED,MAAM,CAAC,EAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAC,CAAC;AACxD,CAAC;AAOD,wBAA+B,OAAgB;IAC3C,IAAM,OAAO,GAAG,gBAAgB,CAAC,OAAO,EAAE,4BAAc,CAAC,OAAO,CAAC,CAAC;IAElE,IAAM,MAAM,GAAa,EAAE,CAAC;IAC5B,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACtB,MAAM,CAAC,IAAI,CAAC,yEAAyE,CAAC,CAAC;IAEvF,MAAM,CAAC,IAAI,CAAC,EAAE,EAAE,kBAAkB,CAAC,CAAC;IACpC,QAAQ,CAAC,OAAO,CAAC,CAAC;IAElB,MAAM,CAAC,IAAI,CAAC,EAAE,EAAE,qBAAqB,CAAC,CAAC;IACvC,MAAM,CAAC,IAAI,CAAC,wEAAwE,CAAC,CAAC;IAEtF,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAChB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAEnC,kBAAkB,OAAsB;QACpC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YAC5C,IAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAC/B,IAAM,WAAW,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YACrC,MAAM,CAAC,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC;QAClF,CAAC;IACL,CAAC;IAED,iBAAiB,MAAc;QAC3B,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACvC,CAAC;AACL,CAAC;AA3BD,wCA2BC","sourcesContent":["import * as ts from 'typescript';\nimport * as _ts from '../../ts-internal';\n\nimport { Options } from './options';\nimport { ParameterScope, ParameterHint } from './declaration';\n\nexport interface ParameterHelp {\n names: string[];\n helps: string[];\n margin: number;\n}\n\n/**\n * Prepare parameter information for the [[toString]] method.\n *\n * @param scope The scope of the parameters whose help should be returned.\n * @returns The columns and lines for the help of the requested parameters.\n */\nfunction getParameterHelp(options: Options, scope: ParameterScope): ParameterHelp {\n const parameters = options.getDeclarationsByScope(scope);\n parameters.sort((a, b) => {\n return _ts.compareValues<string>(a.name.toLowerCase(), b.name.toLowerCase());\n });\n\n const names: string[] = [];\n const helps: string[] = [];\n let margin = 0;\n\n for (let i = 0; i < parameters.length; i++) {\n const parameter = parameters[i];\n if (!parameter.help) {\n continue;\n }\n\n let name = ' ';\n if (parameter.short) {\n name += '-' + parameter.short;\n if (typeof parameter.hint !== 'undefined') {\n name += ' ' + ParameterHint[parameter.hint].toUpperCase();\n }\n name += ', ';\n }\n\n name += '--' + parameter.name;\n if (parameter.hint) {\n name += ' ' + ParameterHint[parameter.hint].toUpperCase();\n }\n\n names.push(name);\n helps.push(parameter.help);\n margin = Math.max(name.length, margin);\n }\n\n return {names: names, helps: helps, margin: margin};\n}\n\n/**\n * Print some usage information.\n *\n * Taken from TypeScript (src/compiler/tsc.ts)\n */\nexport function getOptionsHelp(options: Options): string {\n const typeDoc = getParameterHelp(options, ParameterScope.TypeDoc);\n\n const output: string[] = [];\n output.push('Usage:');\n output.push(' typedoc --mode modules --out path/to/documentation path/to/sourcefiles');\n\n output.push('', 'TypeDoc options:');\n pushHelp(typeDoc);\n\n output.push('', 'TypeScript options:');\n output.push('See https://www.typescriptlang.org/docs/handbook/compiler-options.html');\n\n output.push('');\n return output.join(ts.sys.newLine);\n\n function pushHelp(columns: ParameterHelp) {\n for (let i = 0; i < columns.names.length; i++) {\n const usage = columns.names[i];\n const description = columns.helps[i];\n output.push(usage + padding(typeDoc.margin - usage.length + 2) + description);\n }\n }\n\n function padding(length: number): string {\n return Array(length + 1).join(' ');\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/utils/options/index.js.map b/node_modules/typedoc/dist/lib/utils/options/index.js.map
index 1c21e3d6a..7ec94757e 100644
--- a/node_modules/typedoc/dist/lib/utils/options/index.js.map
+++ b/node_modules/typedoc/dist/lib/utils/options/index.js.map
@@ -1 +1 @@
-{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/utils/options/index.ts"],"names":[],"mappings":";;AAAA,qCAAsE;AAA9D,4BAAA,OAAO,CAAA;AAAE,oCAAA,eAAe,CAAA;AAEhC,2BAAyB;AACzB,2BAAyB","sourcesContent":["export {Options, OptionsReadMode, OptionsReadResult} from './options';\n\nimport './readers/index';\nimport './sources/index';\n"]} \ No newline at end of file
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/utils/options/index.ts"],"names":[],"mappings":";;AAAA,qCAAwE;AAA/D,4BAAA,OAAO,CAAA;AAAE,oCAAA,eAAe,CAAA;AAEjC,2BAAyB;AACzB,2BAAyB","sourcesContent":["export { Options, OptionsReadMode, OptionsReadResult } from './options';\n\nimport './readers/index';\nimport './sources/index';\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/utils/options/options.js b/node_modules/typedoc/dist/lib/utils/options/options.js
index 856afa04f..fd3a0e808 100644
--- a/node_modules/typedoc/dist/lib/utils/options/options.js
+++ b/node_modules/typedoc/dist/lib/utils/options/options.js
@@ -53,9 +53,9 @@ var DiscoverEvent = (function (_super) {
}
this.errors.push(Util.format.apply(this, arguments));
};
+ DiscoverEvent.DISCOVER = 'optionsDiscover';
return DiscoverEvent;
}(events_1.Event));
-DiscoverEvent.DISCOVER = 'optionsDiscover';
exports.DiscoverEvent = DiscoverEvent;
var Options = (function (_super) {
__extends(Options, _super);
@@ -197,10 +197,10 @@ var Options = (function (_super) {
this.removeDeclaration(declaration);
}
};
+ Options = __decorate([
+ component_1.Component({ name: 'options', internal: true, childClass: OptionsComponent })
+ ], Options);
return Options;
}(component_1.ChildableComponent));
-Options = __decorate([
- component_1.Component({ name: 'options', internal: true, childClass: OptionsComponent })
-], Options);
exports.Options = Options;
//# sourceMappingURL=options.js.map \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/utils/options/options.js.map b/node_modules/typedoc/dist/lib/utils/options/options.js.map
index 5f2ced0cb..6160451d5 100644
--- a/node_modules/typedoc/dist/lib/utils/options/options.js.map
+++ b/node_modules/typedoc/dist/lib/utils/options/options.js.map
@@ -1 +1 @@
-{"version":3,"file":"options.js","sourceRoot":"","sources":["../../../../src/lib/utils/options/options.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,0BAA4B;AAC5B,2BAA6B;AAC7B,+BAAiC;AAEjC,oCAAgC;AAChC,0CAA8E;AAE9E,6CAAmF;AAEnF;IAAsC,oCAA0B;IAAhE;;IAAmE,CAAC;IAAD,uBAAC;AAAD,CAAC,AAApE,CAAsC,6BAAiB,GAAa;AAAvD,4CAAgB;AAE7B,IAAY,eAGX;AAHD,WAAY,eAAe;IACvB,6DAAQ,CAAA;IACR,uDAAK,CAAA;AACT,CAAC,EAHW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAG1B;AAOD;IAAmC,iCAAK;IAAxC;QAAA,qEA0BC;QArBG,gBAAU,GAAa,EAAE,CAAC;QAE1B,YAAM,GAAa,EAAE,CAAC;;IAmB1B,CAAC;IAPG,oCAAY,GAAZ,UAAa,QAAgB;QACzB,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACnC,CAAC;IAED,gCAAQ,GAAR,UAAS,OAAe;QAAE,cAAiB;aAAjB,UAAiB,EAAjB,qBAAiB,EAAjB,IAAiB;YAAjB,6BAAiB;;QACvC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC;IACzD,CAAC;IACL,oBAAC;AAAD,CAAC,AA1BD,CAAmC,cAAK;AAS7B,sBAAQ,GAAG,iBAAiB,CAAC;AAT3B,sCAAa;AA6B1B,IAAa,OAAO;IAAS,2BAAiD;IAA9E;;IAyJA,CAAC;IAlJG,4BAAU,GAAV;QACI,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC;QACvB,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;QACjB,IAAI,CAAC,eAAe,GAAG;YACnB,MAAM,EAAE,EAAE,CAAC,YAAY,CAAC,GAAG;YAC3B,MAAM,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI;SAC7B,CAAC;IACN,CAAC;IAED,sBAAI,GAAJ,UAAK,IAAc,EAAE,IAA6C;QAA7D,qBAAA,EAAA,SAAc;QAAE,qBAAA,EAAA,OAAwB,eAAe,CAAC,KAAK;QAC9D,IAAM,KAAK,GAAI,IAAI,aAAa,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;QACzD,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC;QAClB,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC;QAElB,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACpB,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,EAAE,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;QAE3D,EAAE,CAAC,CAAC,IAAI,KAAK,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC;YACjC,IAAM,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC;YACvC,GAAG,CAAC,CAAc,UAAY,EAAZ,KAAA,KAAK,CAAC,MAAM,EAAZ,cAAY,EAAZ,IAAY;gBAAzB,IAAI,KAAK,SAAA;gBACV,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;aACvB;QACL,CAAC;QAED,MAAM,CAAC;YACH,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC;YAClC,UAAU,EAAE,KAAK,CAAC,UAAU;SAC/B,CAAC;IACN,CAAC;IAED,0BAAQ,GAAR,UAAS,IAAY;QACjB,IAAM,WAAW,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;QAC9C,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC;YACf,MAAM,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,sBAAsB,EAAE,IAAI,CAAC,CAAC,CAAC;QAC/D,CAAC;QAED,EAAE,CAAC,CAAC,WAAW,CAAC,KAAK,KAAK,4BAAc,CAAC,UAAU,CAAC,CAAC,CAAC;YAClD,MAAM,IAAI,KAAK,CAAC,0FAA0F,CAAC,CAAC;QAChH,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;YACtB,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAC7B,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,MAAM,CAAC,WAAW,CAAC,YAAY,CAAC;QACpC,CAAC;IACL,CAAC;IAED,8BAAY,GAAZ;QACI,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAChC,CAAC;IAED,gCAAc,GAAd,UAAe,IAAY;QACvB,IAAI,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;QAE1B,EAAE,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;YAC5B,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QACnC,CAAC;IACL,CAAC;IAED,wCAAsB,GAAtB,UAAuB,KAAqB;QACxC,IAAM,MAAM,GAAwB,EAAE,CAAC;QACvC,GAAG,CAAC,CAAC,IAAI,MAAI,IAAI,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;YACjC,IAAM,WAAW,GAAG,IAAI,CAAC,YAAY,CAAC,MAAI,CAAC,CAAC;YAC5C,EAAE,CAAC,CAAC,WAAW,CAAC,KAAK,KAAK,KAAK,CAAC,CAAC,CAAC;gBAC9B,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YAC7B,CAAC;QACL,CAAC;QAED,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC1B,CAAC;IAED,oCAAkB,GAAlB;QACI,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC;IAChC,CAAC;IAED,0BAAQ,GAAR,UAAS,IAA8B,EAAE,KAAU,EAAE,aAAwB;QACzE,IAAM,WAAW,GAAG,IAAI,YAAY,+BAAiB,GAAG,IAAI,GAAG,IAAI,CAAC,cAAc,CAAU,IAAI,CAAC,CAAC;QAClG,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC;YACf,MAAM,CAAC;QACX,CAAC;QAED,IAAM,GAAG,GAAG,WAAW,CAAC,IAAI,CAAC;QAC7B,EAAE,CAAC,CAAC,WAAW,CAAC,KAAK,KAAK,4BAAc,CAAC,UAAU,CAAC,CAAC,CAAC;YAClD,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,GAAG,WAAW,CAAC,OAAO,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;QAC1E,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,WAAW,CAAC,OAAO,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;QACjE,CAAC;IACL,CAAC;IAED,2BAAS,GAAT,UAAU,GAAW,EAAE,MAAmB,EAAE,aAAwB;QAA7C,uBAAA,EAAA,WAAmB;QACtC,GAAG,CAAC,CAAC,IAAI,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC;YAClB,IAAM,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC;YACvB,IAAM,WAAW,GAAG,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;YAC7C,IAAM,qBAAqB,GAAG,WAAW,IAAI,WAAW,CAAC,KAAK,CAAC,KAAK,QAAQ,CAAC;YAC7E,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC;gBAC/E,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,GAAG,GAAG,GAAG,EAAE,aAAa,CAAC,CAAC;YAC7D,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,GAAG,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC;YACtD,CAAC;QACL,CAAC;IACL,CAAC;IAED,gCAAc,GAAd,UAAe,WAAgD;QAC3D,IAAI,IAAuB,CAAC;QAC5B,EAAE,CAAC,CAAC,CAAC,CAAC,WAAW,YAAY,+BAAiB,CAAC,CAAC,CAAC,CAAC;YAC9C,IAAI,GAAG,IAAI,+BAAiB,CAAqB,WAAW,CAAC,CAAC;QAClE,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,IAAI,GAAuB,WAAW,CAAC;QAC3C,CAAC;QAED,GAAG,CAAC,CAAa,UAAe,EAAf,KAAA,IAAI,CAAC,QAAQ,EAAE,EAAf,cAAe,EAAf,IAAe;YAA3B,IAAI,MAAI,SAAA;YACT,EAAE,CAAC,CAAC,MAAI,IAAI,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;gBAC5B,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,oEAAoE,EAAE,MAAI,EAAE,IAAI,CAAC,YAAY,CAAC,MAAI,CAAC,CAAC,SAAS,CAAC,CAAC;YACjJ,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,IAAI,CAAC,YAAY,CAAC,MAAI,CAAC,GAAG,IAAI,CAAC;YACnC,CAAC;SACJ;IACL,CAAC;IAED,iCAAe,GAAf,UAAgB,YAAqD;QACjE,GAAG,CAAC,CAAoB,UAAY,EAAZ,6BAAY,EAAZ,0BAAY,EAAZ,IAAY;YAA/B,IAAI,WAAW,qBAAA;YAChB,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;SACpC;IACL,CAAC;IAED,mCAAiB,GAAjB,UAAkB,WAA8B;QAC5C,IAAM,KAAK,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACxC,IAAI,IAAY,CAAC;QACjB,GAAG,CAAC,CAAC,IAAI,IAAI,KAAK,CAAC,CAAC,CAAC;YACjB,EAAE,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,WAAW,CAAC,CAAC,CAAC;gBAC1C,OAAO,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;YACnC,CAAC;QACL,CAAC;QAED,IAAI,GAAG,WAAW,CAAC,IAAI,CAAC;QACxB,EAAE,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;YACtB,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAC7B,CAAC;IACL,CAAC;IAED,yCAAuB,GAAvB,UAAwB,IAAY;QAChC,IAAM,WAAW,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;QAC9C,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC;YACd,IAAI,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAC;QACxC,CAAC;IACL,CAAC;IACL,cAAC;AAAD,CAAC,AAzJD,CAA6B,8BAAkB,GAyJ9C;AAzJY,OAAO;IADnB,qBAAS,CAAC,EAAC,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,gBAAgB,EAAC,CAAC;GAC9D,OAAO,CAyJnB;AAzJY,0BAAO","sourcesContent":["import * as _ from 'lodash';\nimport * as Util from 'util';\nimport * as ts from 'typescript';\n\nimport {Event} from '../events';\nimport {Component, AbstractComponent, ChildableComponent} from '../component';\nimport {Application} from '../../application';\nimport {OptionDeclaration, DeclarationOption, ParameterScope} from './declaration';\n\nexport class OptionsComponent extends AbstractComponent<Options> { }\n\nexport enum OptionsReadMode {\n Prefetch,\n Fetch\n}\n\nexport interface OptionsReadResult {\n hasErrors: boolean;\n inputFiles: string[];\n}\n\nexport class DiscoverEvent extends Event {\n data: any;\n\n mode: OptionsReadMode;\n\n inputFiles: string[] = [];\n\n errors: string[] = [];\n\n static DISCOVER = 'optionsDiscover';\n\n /**\n * Add an input/source file.\n *\n * The input files will be used as source files for the compiler. All command line\n * arguments without parameter will be interpreted as being input files.\n *\n * @param fileName The path and filename of the input file.\n */\n addInputFile(fileName: string) {\n this.inputFiles.push(fileName);\n }\n\n addError(message: string, ...args: string[]) {\n this.errors.push(Util.format.apply(this, arguments));\n }\n}\n\n@Component({name: 'options', internal: true, childClass: OptionsComponent})\nexport class Options extends ChildableComponent<Application, OptionsComponent> {\n private declarations: {[name: string]: OptionDeclaration};\n\n private values: {[name: string]: any};\n\n private compilerOptions: ts.CompilerOptions;\n\n initialize() {\n this.declarations = {};\n this.values = {};\n this.compilerOptions = {\n target: ts.ScriptTarget.ES3,\n module: ts.ModuleKind.None\n };\n }\n\n read(data: any = {}, mode: OptionsReadMode = OptionsReadMode.Fetch): OptionsReadResult {\n const event = new DiscoverEvent(DiscoverEvent.DISCOVER);\n event.data = data;\n event.mode = mode;\n\n this.trigger(event);\n this.setValues(event.data, '', event.addError.bind(event));\n\n if (mode === OptionsReadMode.Fetch) {\n const logger = this.application.logger;\n for (let error of event.errors) {\n logger.error(error);\n }\n }\n\n return {\n hasErrors: event.errors.length > 0,\n inputFiles: event.inputFiles\n };\n }\n\n getValue(name: string): any {\n const declaration = this.getDeclaration(name);\n if (!declaration) {\n throw new Error(Util.format('Unknown option `%s`.', name));\n }\n\n if (declaration.scope === ParameterScope.TypeScript) {\n throw new Error('TypeScript options cannot be fetched using `getValue`, use `getCompilerOptions` instead.');\n }\n\n if (name in this.values) {\n return this.values[name];\n } else {\n return declaration.defaultValue;\n }\n }\n\n getRawValues(): any {\n return _.clone(this.values);\n }\n\n getDeclaration(name: string): OptionDeclaration {\n name = name.toLowerCase();\n\n if (name in this.declarations) {\n return this.declarations[name];\n }\n }\n\n getDeclarationsByScope(scope: ParameterScope): OptionDeclaration[] {\n const result: OptionDeclaration[] = [];\n for (let name in this.declarations) {\n const declaration = this.declarations[name];\n if (declaration.scope === scope) {\n result.push(declaration);\n }\n }\n\n return _.uniq(result);\n }\n\n getCompilerOptions(): ts.CompilerOptions {\n return this.compilerOptions;\n }\n\n setValue(name: string|OptionDeclaration, value: any, errorCallback?: Function) {\n const declaration = name instanceof OptionDeclaration ? name : this.getDeclaration(<string> name);\n if (!declaration) {\n return;\n }\n\n const key = declaration.name;\n if (declaration.scope === ParameterScope.TypeScript) {\n this.compilerOptions[key] = declaration.convert(value, errorCallback);\n } else {\n this.values[key] = declaration.convert(value, errorCallback);\n }\n }\n\n setValues(obj: Object, prefix: string = '', errorCallback?: Function) {\n for (let key in obj) {\n const value = obj[key];\n const declaration = this.getDeclaration(key);\n const shouldValueBeAnObject = declaration && declaration['map'] === 'object';\n if (!Array.isArray(value) && typeof value === 'object' && !shouldValueBeAnObject) {\n this.setValues(value, prefix + key + '.', errorCallback);\n } else {\n this.setValue(prefix + key, value, errorCallback);\n }\n }\n }\n\n addDeclaration(declaration: OptionDeclaration|DeclarationOption) {\n let decl: OptionDeclaration;\n if (!(declaration instanceof OptionDeclaration)) {\n decl = new OptionDeclaration(<DeclarationOption> declaration);\n } else {\n decl = <OptionDeclaration> declaration;\n }\n\n for (let name of decl.getNames()) {\n if (name in this.declarations) {\n this.application.logger.error('The option \"%s\" has already been registered by the \"%s\" component.', name, this.declarations[name].component);\n } else {\n this.declarations[name] = decl;\n }\n }\n }\n\n addDeclarations(declarations: (OptionDeclaration|DeclarationOption)[]) {\n for (let declaration of declarations) {\n this.addDeclaration(declaration);\n }\n }\n\n removeDeclaration(declaration: OptionDeclaration) {\n const names = _.keys(this.declarations);\n let name: string;\n for (name in names) {\n if (this.declarations[name] === declaration) {\n delete this.declarations[name];\n }\n }\n\n name = declaration.name;\n if (name in this.values) {\n delete this.values[name];\n }\n }\n\n removeDeclarationByName(name: string) {\n const declaration = this.getDeclaration(name);\n if (declaration) {\n this.removeDeclaration(declaration);\n }\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"options.js","sourceRoot":"","sources":["../../../../src/lib/utils/options/options.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,0BAA4B;AAC5B,2BAA6B;AAC7B,+BAAiC;AAEjC,oCAAkC;AAClC,0CAAgF;AAEhF,6CAAqF;AAErF;IAAsC,oCAA0B;IAAhE;;IAAmE,CAAC;IAAD,uBAAC;AAAD,CAAC,AAApE,CAAsC,6BAAiB,GAAa;AAAvD,4CAAgB;AAE7B,IAAY,eAGX;AAHD,WAAY,eAAe;IACvB,6DAAQ,CAAA;IACR,uDAAK,CAAA;AACT,CAAC,EAHW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAG1B;AAOD;IAAmC,iCAAK;IAAxC;QAAA,qEA0BC;QArBG,gBAAU,GAAa,EAAE,CAAC;QAE1B,YAAM,GAAa,EAAE,CAAC;;IAmB1B,CAAC;IAPG,oCAAY,GAAZ,UAAa,QAAgB;QACzB,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACnC,CAAC;IAED,gCAAQ,GAAR,UAAS,OAAe;QAAE,cAAiB;aAAjB,UAAiB,EAAjB,qBAAiB,EAAjB,IAAiB;YAAjB,6BAAiB;;QACvC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC;IACzD,CAAC;IAhBM,sBAAQ,GAAG,iBAAiB,CAAC;IAiBxC,oBAAC;CAAA,AA1BD,CAAmC,cAAK,GA0BvC;AA1BY,sCAAa;AA6B1B;IAA6B,2BAAiD;IAA9E;;IAyJA,CAAC;IAlJG,4BAAU,GAAV;QACI,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC;QACvB,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;QACjB,IAAI,CAAC,eAAe,GAAG;YACnB,MAAM,EAAE,EAAE,CAAC,YAAY,CAAC,GAAG;YAC3B,MAAM,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI;SAC7B,CAAC;IACN,CAAC;IAED,sBAAI,GAAJ,UAAK,IAAc,EAAE,IAA6C;QAA7D,qBAAA,EAAA,SAAc;QAAE,qBAAA,EAAA,OAAwB,eAAe,CAAC,KAAK;QAC9D,IAAM,KAAK,GAAI,IAAI,aAAa,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;QACzD,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC;QAClB,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC;QAElB,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACpB,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,EAAE,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;QAE3D,EAAE,CAAC,CAAC,IAAI,KAAK,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC;YACjC,IAAM,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC;YACvC,GAAG,CAAC,CAAc,UAAY,EAAZ,KAAA,KAAK,CAAC,MAAM,EAAZ,cAAY,EAAZ,IAAY;gBAAzB,IAAI,KAAK,SAAA;gBACV,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;aACvB;QACL,CAAC;QAED,MAAM,CAAC;YACH,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC;YAClC,UAAU,EAAE,KAAK,CAAC,UAAU;SAC/B,CAAC;IACN,CAAC;IAED,0BAAQ,GAAR,UAAS,IAAY;QACjB,IAAM,WAAW,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;QAC9C,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC;YACf,MAAM,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,sBAAsB,EAAE,IAAI,CAAC,CAAC,CAAC;QAC/D,CAAC;QAED,EAAE,CAAC,CAAC,WAAW,CAAC,KAAK,KAAK,4BAAc,CAAC,UAAU,CAAC,CAAC,CAAC;YAClD,MAAM,IAAI,KAAK,CAAC,0FAA0F,CAAC,CAAC;QAChH,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;YACtB,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAC7B,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,MAAM,CAAC,WAAW,CAAC,YAAY,CAAC;QACpC,CAAC;IACL,CAAC;IAED,8BAAY,GAAZ;QACI,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAChC,CAAC;IAED,gCAAc,GAAd,UAAe,IAAY;QACvB,IAAI,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;QAE1B,EAAE,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;YAC5B,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QACnC,CAAC;IACL,CAAC;IAED,wCAAsB,GAAtB,UAAuB,KAAqB;QACxC,IAAM,MAAM,GAAwB,EAAE,CAAC;QACvC,GAAG,CAAC,CAAC,IAAI,MAAI,IAAI,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;YACjC,IAAM,WAAW,GAAG,IAAI,CAAC,YAAY,CAAC,MAAI,CAAC,CAAC;YAC5C,EAAE,CAAC,CAAC,WAAW,CAAC,KAAK,KAAK,KAAK,CAAC,CAAC,CAAC;gBAC9B,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YAC7B,CAAC;QACL,CAAC;QAED,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC1B,CAAC;IAED,oCAAkB,GAAlB;QACI,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC;IAChC,CAAC;IAED,0BAAQ,GAAR,UAAS,IAA8B,EAAE,KAAU,EAAE,aAAwB;QACzE,IAAM,WAAW,GAAG,IAAI,YAAY,+BAAiB,GAAG,IAAI,GAAG,IAAI,CAAC,cAAc,CAAU,IAAI,CAAC,CAAC;QAClG,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC;YACf,MAAM,CAAC;QACX,CAAC;QAED,IAAM,GAAG,GAAG,WAAW,CAAC,IAAI,CAAC;QAC7B,EAAE,CAAC,CAAC,WAAW,CAAC,KAAK,KAAK,4BAAc,CAAC,UAAU,CAAC,CAAC,CAAC;YAClD,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,GAAG,WAAW,CAAC,OAAO,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;QAC1E,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,WAAW,CAAC,OAAO,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;QACjE,CAAC;IACL,CAAC;IAED,2BAAS,GAAT,UAAU,GAAW,EAAE,MAAmB,EAAE,aAAwB;QAA7C,uBAAA,EAAA,WAAmB;QACtC,GAAG,CAAC,CAAC,IAAI,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC;YAClB,IAAM,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC;YACvB,IAAM,WAAW,GAAG,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;YAC7C,IAAM,qBAAqB,GAAG,WAAW,IAAI,WAAW,CAAC,KAAK,CAAC,KAAK,QAAQ,CAAC;YAC7E,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC;gBAC/E,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,GAAG,GAAG,GAAG,EAAE,aAAa,CAAC,CAAC;YAC7D,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,GAAG,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC;YACtD,CAAC;QACL,CAAC;IACL,CAAC;IAED,gCAAc,GAAd,UAAe,WAAgD;QAC3D,IAAI,IAAuB,CAAC;QAC5B,EAAE,CAAC,CAAC,CAAC,CAAC,WAAW,YAAY,+BAAiB,CAAC,CAAC,CAAC,CAAC;YAC9C,IAAI,GAAG,IAAI,+BAAiB,CAAqB,WAAW,CAAC,CAAC;QAClE,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,IAAI,GAAuB,WAAW,CAAC;QAC3C,CAAC;QAED,GAAG,CAAC,CAAa,UAAe,EAAf,KAAA,IAAI,CAAC,QAAQ,EAAE,EAAf,cAAe,EAAf,IAAe;YAA3B,IAAI,MAAI,SAAA;YACT,EAAE,CAAC,CAAC,MAAI,IAAI,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;gBAC5B,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,oEAAoE,EAAE,MAAI,EAAE,IAAI,CAAC,YAAY,CAAC,MAAI,CAAC,CAAC,SAAS,CAAC,CAAC;YACjJ,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,IAAI,CAAC,YAAY,CAAC,MAAI,CAAC,GAAG,IAAI,CAAC;YACnC,CAAC;SACJ;IACL,CAAC;IAED,iCAAe,GAAf,UAAgB,YAAqD;QACjE,GAAG,CAAC,CAAoB,UAAY,EAAZ,6BAAY,EAAZ,0BAAY,EAAZ,IAAY;YAA/B,IAAI,WAAW,qBAAA;YAChB,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;SACpC;IACL,CAAC;IAED,mCAAiB,GAAjB,UAAkB,WAA8B;QAC5C,IAAM,KAAK,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACxC,IAAI,IAAY,CAAC;QACjB,GAAG,CAAC,CAAC,IAAI,IAAI,KAAK,CAAC,CAAC,CAAC;YACjB,EAAE,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,WAAW,CAAC,CAAC,CAAC;gBAC1C,OAAO,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;YACnC,CAAC;QACL,CAAC;QAED,IAAI,GAAG,WAAW,CAAC,IAAI,CAAC;QACxB,EAAE,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;YACtB,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAC7B,CAAC;IACL,CAAC;IAED,yCAAuB,GAAvB,UAAwB,IAAY;QAChC,IAAM,WAAW,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;QAC9C,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC;YACd,IAAI,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAC;QACxC,CAAC;IACL,CAAC;IAxJQ,OAAO;QADnB,qBAAS,CAAC,EAAC,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,gBAAgB,EAAC,CAAC;OAC9D,OAAO,CAyJnB;IAAD,cAAC;CAAA,AAzJD,CAA6B,8BAAkB,GAyJ9C;AAzJY,0BAAO","sourcesContent":["import * as _ from 'lodash';\nimport * as Util from 'util';\nimport * as ts from 'typescript';\n\nimport { Event } from '../events';\nimport { Component, AbstractComponent, ChildableComponent } from '../component';\nimport { Application } from '../../application';\nimport { OptionDeclaration, DeclarationOption, ParameterScope } from './declaration';\n\nexport class OptionsComponent extends AbstractComponent<Options> { }\n\nexport enum OptionsReadMode {\n Prefetch,\n Fetch\n}\n\nexport interface OptionsReadResult {\n hasErrors: boolean;\n inputFiles: string[];\n}\n\nexport class DiscoverEvent extends Event {\n data: any;\n\n mode: OptionsReadMode;\n\n inputFiles: string[] = [];\n\n errors: string[] = [];\n\n static DISCOVER = 'optionsDiscover';\n\n /**\n * Add an input/source file.\n *\n * The input files will be used as source files for the compiler. All command line\n * arguments without parameter will be interpreted as being input files.\n *\n * @param fileName The path and filename of the input file.\n */\n addInputFile(fileName: string) {\n this.inputFiles.push(fileName);\n }\n\n addError(message: string, ...args: string[]) {\n this.errors.push(Util.format.apply(this, arguments));\n }\n}\n\n@Component({name: 'options', internal: true, childClass: OptionsComponent})\nexport class Options extends ChildableComponent<Application, OptionsComponent> {\n private declarations: {[name: string]: OptionDeclaration};\n\n private values: {[name: string]: any};\n\n private compilerOptions: ts.CompilerOptions;\n\n initialize() {\n this.declarations = {};\n this.values = {};\n this.compilerOptions = {\n target: ts.ScriptTarget.ES3,\n module: ts.ModuleKind.None\n };\n }\n\n read(data: any = {}, mode: OptionsReadMode = OptionsReadMode.Fetch): OptionsReadResult {\n const event = new DiscoverEvent(DiscoverEvent.DISCOVER);\n event.data = data;\n event.mode = mode;\n\n this.trigger(event);\n this.setValues(event.data, '', event.addError.bind(event));\n\n if (mode === OptionsReadMode.Fetch) {\n const logger = this.application.logger;\n for (let error of event.errors) {\n logger.error(error);\n }\n }\n\n return {\n hasErrors: event.errors.length > 0,\n inputFiles: event.inputFiles\n };\n }\n\n getValue(name: string): any {\n const declaration = this.getDeclaration(name);\n if (!declaration) {\n throw new Error(Util.format('Unknown option `%s`.', name));\n }\n\n if (declaration.scope === ParameterScope.TypeScript) {\n throw new Error('TypeScript options cannot be fetched using `getValue`, use `getCompilerOptions` instead.');\n }\n\n if (name in this.values) {\n return this.values[name];\n } else {\n return declaration.defaultValue;\n }\n }\n\n getRawValues(): any {\n return _.clone(this.values);\n }\n\n getDeclaration(name: string): OptionDeclaration {\n name = name.toLowerCase();\n\n if (name in this.declarations) {\n return this.declarations[name];\n }\n }\n\n getDeclarationsByScope(scope: ParameterScope): OptionDeclaration[] {\n const result: OptionDeclaration[] = [];\n for (let name in this.declarations) {\n const declaration = this.declarations[name];\n if (declaration.scope === scope) {\n result.push(declaration);\n }\n }\n\n return _.uniq(result);\n }\n\n getCompilerOptions(): ts.CompilerOptions {\n return this.compilerOptions;\n }\n\n setValue(name: string|OptionDeclaration, value: any, errorCallback?: Function) {\n const declaration = name instanceof OptionDeclaration ? name : this.getDeclaration(<string> name);\n if (!declaration) {\n return;\n }\n\n const key = declaration.name;\n if (declaration.scope === ParameterScope.TypeScript) {\n this.compilerOptions[key] = declaration.convert(value, errorCallback);\n } else {\n this.values[key] = declaration.convert(value, errorCallback);\n }\n }\n\n setValues(obj: Object, prefix: string = '', errorCallback?: Function) {\n for (let key in obj) {\n const value = obj[key];\n const declaration = this.getDeclaration(key);\n const shouldValueBeAnObject = declaration && declaration['map'] === 'object';\n if (!Array.isArray(value) && typeof value === 'object' && !shouldValueBeAnObject) {\n this.setValues(value, prefix + key + '.', errorCallback);\n } else {\n this.setValue(prefix + key, value, errorCallback);\n }\n }\n }\n\n addDeclaration(declaration: OptionDeclaration|DeclarationOption) {\n let decl: OptionDeclaration;\n if (!(declaration instanceof OptionDeclaration)) {\n decl = new OptionDeclaration(<DeclarationOption> declaration);\n } else {\n decl = <OptionDeclaration> declaration;\n }\n\n for (let name of decl.getNames()) {\n if (name in this.declarations) {\n this.application.logger.error('The option \"%s\" has already been registered by the \"%s\" component.', name, this.declarations[name].component);\n } else {\n this.declarations[name] = decl;\n }\n }\n }\n\n addDeclarations(declarations: (OptionDeclaration|DeclarationOption)[]) {\n for (let declaration of declarations) {\n this.addDeclaration(declaration);\n }\n }\n\n removeDeclaration(declaration: OptionDeclaration) {\n const names = _.keys(this.declarations);\n let name: string;\n for (name in names) {\n if (this.declarations[name] === declaration) {\n delete this.declarations[name];\n }\n }\n\n name = declaration.name;\n if (name in this.values) {\n delete this.values[name];\n }\n }\n\n removeDeclarationByName(name: string) {\n const declaration = this.getDeclaration(name);\n if (declaration) {\n this.removeDeclaration(declaration);\n }\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/utils/options/readers/arguments.js b/node_modules/typedoc/dist/lib/utils/options/readers/arguments.js
index be4061289..f94f75ab4 100644
--- a/node_modules/typedoc/dist/lib/utils/options/readers/arguments.js
+++ b/node_modules/typedoc/dist/lib/utils/options/readers/arguments.js
@@ -107,10 +107,10 @@ var ArgumentsReader = (function (_super) {
}
this.parseArguments(event, args);
};
+ ArgumentsReader = __decorate([
+ component_1.Component({ name: 'options:arguments' })
+ ], ArgumentsReader);
return ArgumentsReader;
}(options_1.OptionsComponent));
-ArgumentsReader = __decorate([
- component_1.Component({ name: 'options:arguments' })
-], ArgumentsReader);
exports.ArgumentsReader = ArgumentsReader;
//# sourceMappingURL=arguments.js.map \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/utils/options/readers/arguments.js.map b/node_modules/typedoc/dist/lib/utils/options/readers/arguments.js.map
index 48bd1344a..4d7c88729 100644
--- a/node_modules/typedoc/dist/lib/utils/options/readers/arguments.js.map
+++ b/node_modules/typedoc/dist/lib/utils/options/readers/arguments.js.map
@@ -1 +1 @@
-{"version":3,"file":"arguments.js","sourceRoot":"","sources":["../../../../../src/lib/utils/options/readers/arguments.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AACjC,0CAA4C;AAE5C,6CAA0C;AAC1C,sCAA2D;AAC3D,8CAA6C;AAG7C,IAAa,eAAe;IAAS,mCAAgB;IAArD;;IAoGA,CAAC;IAnGG,oCAAU,GAAV;QACI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,uBAAa,CAAC,QAAQ,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;IACvE,CAAC;IAED,oCAAU,GAAV,UAAW,KAAoB;QAC3B,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC;YACzB,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;QAC/B,CAAC;IACL,CAAC;IAWO,wCAAc,GAAtB,UAAuB,KAAoB,EAAE,IAAe;QACxD,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,IAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACzB,IAAI,GAAG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAErC,sBAAsB,GAAW;YAC7B,IAAM,WAAW,GAAG,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;YAC9C,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC;gBACf,KAAK,CAAC,QAAQ,CAAC,oBAAoB,EAAE,GAAG,CAAC,CAAC;YAC9C,CAAC;YAAC,IAAI,CAAC,EAAE,CAAC,CAAC,WAAW,CAAC,IAAI,KAAK,2BAAa,CAAC,OAAO,CAAC,CAAC,CAAC;gBACpD,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;oBACf,KAAK,CAAC,QAAQ,CAAC,iCAAiC,EAAE,WAAW,CAAC,IAAI,CAAC,CAAC;gBACxE,CAAC;gBAAC,IAAI,CAAC,CAAC;oBACJ,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;gBACjD,CAAC;YACL,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;YACxC,CAAC;QACL,CAAC;QAED,OAAO,KAAK,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;YACzB,IAAM,GAAG,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;YAE1B,EAAE,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC,CAAC;gBAC9C,IAAI,CAAC,iBAAiB,CAAC,KAAK,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;YAChD,CAAC;YAAC,IAAI,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC;gBACxD,YAAY,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,cAAc,CAAC,KAAK,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;YAClG,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;YAC5B,CAAC;QACL,CAAC;IACL,CAAC;IASO,2CAAiB,GAAzB,UAA0B,KAAoB,EAAE,QAAgB;QAC5D,IAAM,IAAI,GAAG,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QACvC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;YACR,KAAK,CAAC,QAAQ,CAAC,sBAAsB,EAAE,QAAQ,CAAC,CAAC;YACjD,MAAM,CAAC;QACX,CAAC;QAED,IAAM,IAAI,GAAa,EAAE,CAAC;QAC1B,IAAI,GAAG,GAAG,CAAC,CAAC;QACZ,OAAO,IAAI,EAAE,CAAC;YACV,OAAO,GAAG,GAAG,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,cAAc,CAAC,KAAK,EAAE,CAAC;gBAC3E,GAAG,EAAE,CAAC;YACV,CAAC;YACD,EAAE,CAAC,CAAC,GAAG,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;gBACrB,KAAK,CAAC;YACV,CAAC;YAED,IAAM,KAAK,GAAG,GAAG,CAAC;YAClB,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC,CAAC;gBAC5D,GAAG,EAAE,CAAC;gBACN,OAAO,GAAG,GAAG,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,GAAG,CAAC,cAAc,CAAC,WAAW,EAAE,CAAC;oBAClF,GAAG,EAAE,CAAC;gBACV,CAAC;gBACD,EAAE,CAAC,CAAC,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;oBACpB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;oBAC1C,GAAG,EAAE,CAAC;gBACV,CAAC;gBAAC,IAAI,CAAC,CAAC;oBACJ,KAAK,CAAC,QAAQ,CAAC,kDAAkD,EAAE,QAAQ,CAAC,CAAC;oBAC7E,MAAM,CAAC;gBACX,CAAC;YACL,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,cAAc,CAAC,KAAK,EAAE,CAAC;oBACrD,GAAG,EAAE,CAAC;gBACV,CAAC;gBACD,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC;YAC1C,CAAC;QACL,CAAC;QAED,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IACrC,CAAC;IACL,sBAAC;AAAD,CAAC,AApGD,CAAqC,0BAAgB,GAoGpD;AApGY,eAAe;IAD3B,qBAAS,CAAC,EAAC,IAAI,EAAE,mBAAmB,EAAC,CAAC;GAC1B,eAAe,CAoG3B;AApGY,0CAAe","sourcesContent":["import * as ts from 'typescript';\nimport * as _ts from '../../../ts-internal';\n\nimport {Component} from '../../component';\nimport {DiscoverEvent, OptionsComponent} from '../options';\nimport {ParameterType} from '../declaration';\n\n@Component({name: 'options:arguments'})\nexport class ArgumentsReader extends OptionsComponent {\n initialize() {\n this.listenTo(this.owner, DiscoverEvent.DISCOVER, this.onDiscover);\n }\n\n onDiscover(event: DiscoverEvent) {\n if (this.application.isCLI) {\n this.parseArguments(event);\n }\n }\n\n /**\n * Read and store the given list of arguments.\n *\n * @param args The list of arguments that should be parsed. When omitted the\n * current command line arguments will be used.\n * @param ignoreUnknownArgs Should unknown arguments be ignored? If so the parser\n * will simply skip all unknown arguments.\n * @returns TRUE on success, otherwise FALSE.\n */\n private parseArguments(event: DiscoverEvent, args?: string[]) {\n let index = 0;\n const owner = this.owner;\n args = args || process.argv.slice(2);\n\n function readArgument(arg: string) {\n const declaration = owner.getDeclaration(arg);\n if (!declaration) {\n event.addError('Unknown option: %s', arg);\n } else if (declaration.type !== ParameterType.Boolean) {\n if (!args[index]) {\n event.addError('Option \"%s\" expects an argument', declaration.name);\n } else {\n event.data[declaration.name] = args[index++];\n }\n } else {\n event.data[declaration.name] = true;\n }\n }\n\n while (index < args.length) {\n const arg = args[index++];\n\n if (arg.charCodeAt(0) === _ts.CharacterCodes.at) {\n this.parseResponseFile(event, arg.slice(1));\n } else if (arg.charCodeAt(0) === _ts.CharacterCodes.minus) {\n readArgument(arg.slice(arg.charCodeAt(1) === _ts.CharacterCodes.minus ? 2 : 1).toLowerCase());\n } else {\n event.addInputFile(arg);\n }\n }\n }\n\n /**\n * Read the arguments stored in the given file.\n *\n * @param filename The path and filename that should be parsed.\n * @param ignoreUnknownArgs Should unknown arguments be ignored?\n * @returns TRUE on success, otherwise FALSE.\n */\n private parseResponseFile(event: DiscoverEvent, filename: string) {\n const text = ts.sys.readFile(filename);\n if (!text) {\n event.addError('File not found: \"%s\"', filename);\n return;\n }\n\n const args: string[] = [];\n let pos = 0;\n while (true) {\n while (pos < text.length && text.charCodeAt(pos) <= _ts.CharacterCodes.space) {\n pos++;\n }\n if (pos >= text.length) {\n break;\n }\n\n const start = pos;\n if (text.charCodeAt(start) === _ts.CharacterCodes.doubleQuote) {\n pos++;\n while (pos < text.length && text.charCodeAt(pos) !== _ts.CharacterCodes.doubleQuote) {\n pos++;\n }\n if (pos < text.length) {\n args.push(text.substring(start + 1, pos));\n pos++;\n } else {\n event.addError('Unterminated quoted string in response file \"%s\"', filename);\n return;\n }\n } else {\n while (text.charCodeAt(pos) > _ts.CharacterCodes.space) {\n pos++;\n }\n args.push(text.substring(start, pos));\n }\n }\n\n this.parseArguments(event, args);\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"arguments.js","sourceRoot":"","sources":["../../../../../src/lib/utils/options/readers/arguments.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AACjC,0CAA4C;AAE5C,6CAA4C;AAC5C,sCAA6D;AAC7D,8CAA+C;AAG/C;IAAqC,mCAAgB;IAArD;;IAoGA,CAAC;IAnGG,oCAAU,GAAV;QACI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,uBAAa,CAAC,QAAQ,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;IACvE,CAAC;IAED,oCAAU,GAAV,UAAW,KAAoB;QAC3B,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC;YACzB,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;QAC/B,CAAC;IACL,CAAC;IAWO,wCAAc,GAAtB,UAAuB,KAAoB,EAAE,IAAe;QACxD,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,IAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACzB,IAAI,GAAG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAErC,sBAAsB,GAAW;YAC7B,IAAM,WAAW,GAAG,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;YAC9C,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC;gBACf,KAAK,CAAC,QAAQ,CAAC,oBAAoB,EAAE,GAAG,CAAC,CAAC;YAC9C,CAAC;YAAC,IAAI,CAAC,EAAE,CAAC,CAAC,WAAW,CAAC,IAAI,KAAK,2BAAa,CAAC,OAAO,CAAC,CAAC,CAAC;gBACpD,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;oBACf,KAAK,CAAC,QAAQ,CAAC,iCAAiC,EAAE,WAAW,CAAC,IAAI,CAAC,CAAC;gBACxE,CAAC;gBAAC,IAAI,CAAC,CAAC;oBACJ,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;gBACjD,CAAC;YACL,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;YACxC,CAAC;QACL,CAAC;QAED,OAAO,KAAK,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;YACzB,IAAM,GAAG,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;YAE1B,EAAE,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC,CAAC;gBAC9C,IAAI,CAAC,iBAAiB,CAAC,KAAK,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;YAChD,CAAC;YAAC,IAAI,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC;gBACxD,YAAY,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,cAAc,CAAC,KAAK,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;YAClG,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;YAC5B,CAAC;QACL,CAAC;IACL,CAAC;IASO,2CAAiB,GAAzB,UAA0B,KAAoB,EAAE,QAAgB;QAC5D,IAAM,IAAI,GAAG,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QACvC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;YACR,KAAK,CAAC,QAAQ,CAAC,sBAAsB,EAAE,QAAQ,CAAC,CAAC;YACjD,MAAM,CAAC;QACX,CAAC;QAED,IAAM,IAAI,GAAa,EAAE,CAAC;QAC1B,IAAI,GAAG,GAAG,CAAC,CAAC;QACZ,OAAO,IAAI,EAAE,CAAC;YACV,OAAO,GAAG,GAAG,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,cAAc,CAAC,KAAK,EAAE,CAAC;gBAC3E,GAAG,EAAE,CAAC;YACV,CAAC;YACD,EAAE,CAAC,CAAC,GAAG,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;gBACrB,KAAK,CAAC;YACV,CAAC;YAED,IAAM,KAAK,GAAG,GAAG,CAAC;YAClB,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC,CAAC;gBAC5D,GAAG,EAAE,CAAC;gBACN,OAAO,GAAG,GAAG,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,GAAG,CAAC,cAAc,CAAC,WAAW,EAAE,CAAC;oBAClF,GAAG,EAAE,CAAC;gBACV,CAAC;gBACD,EAAE,CAAC,CAAC,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;oBACpB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;oBAC1C,GAAG,EAAE,CAAC;gBACV,CAAC;gBAAC,IAAI,CAAC,CAAC;oBACJ,KAAK,CAAC,QAAQ,CAAC,kDAAkD,EAAE,QAAQ,CAAC,CAAC;oBAC7E,MAAM,CAAC;gBACX,CAAC;YACL,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,cAAc,CAAC,KAAK,EAAE,CAAC;oBACrD,GAAG,EAAE,CAAC;gBACV,CAAC;gBACD,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC;YAC1C,CAAC;QACL,CAAC;QAED,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IACrC,CAAC;IAnGQ,eAAe;QAD3B,qBAAS,CAAC,EAAC,IAAI,EAAE,mBAAmB,EAAC,CAAC;OAC1B,eAAe,CAoG3B;IAAD,sBAAC;CAAA,AApGD,CAAqC,0BAAgB,GAoGpD;AApGY,0CAAe","sourcesContent":["import * as ts from 'typescript';\nimport * as _ts from '../../../ts-internal';\n\nimport { Component } from '../../component';\nimport { DiscoverEvent, OptionsComponent } from '../options';\nimport { ParameterType } from '../declaration';\n\n@Component({name: 'options:arguments'})\nexport class ArgumentsReader extends OptionsComponent {\n initialize() {\n this.listenTo(this.owner, DiscoverEvent.DISCOVER, this.onDiscover);\n }\n\n onDiscover(event: DiscoverEvent) {\n if (this.application.isCLI) {\n this.parseArguments(event);\n }\n }\n\n /**\n * Read and store the given list of arguments.\n *\n * @param args The list of arguments that should be parsed. When omitted the\n * current command line arguments will be used.\n * @param ignoreUnknownArgs Should unknown arguments be ignored? If so the parser\n * will simply skip all unknown arguments.\n * @returns TRUE on success, otherwise FALSE.\n */\n private parseArguments(event: DiscoverEvent, args?: string[]) {\n let index = 0;\n const owner = this.owner;\n args = args || process.argv.slice(2);\n\n function readArgument(arg: string) {\n const declaration = owner.getDeclaration(arg);\n if (!declaration) {\n event.addError('Unknown option: %s', arg);\n } else if (declaration.type !== ParameterType.Boolean) {\n if (!args[index]) {\n event.addError('Option \"%s\" expects an argument', declaration.name);\n } else {\n event.data[declaration.name] = args[index++];\n }\n } else {\n event.data[declaration.name] = true;\n }\n }\n\n while (index < args.length) {\n const arg = args[index++];\n\n if (arg.charCodeAt(0) === _ts.CharacterCodes.at) {\n this.parseResponseFile(event, arg.slice(1));\n } else if (arg.charCodeAt(0) === _ts.CharacterCodes.minus) {\n readArgument(arg.slice(arg.charCodeAt(1) === _ts.CharacterCodes.minus ? 2 : 1).toLowerCase());\n } else {\n event.addInputFile(arg);\n }\n }\n }\n\n /**\n * Read the arguments stored in the given file.\n *\n * @param filename The path and filename that should be parsed.\n * @param ignoreUnknownArgs Should unknown arguments be ignored?\n * @returns TRUE on success, otherwise FALSE.\n */\n private parseResponseFile(event: DiscoverEvent, filename: string) {\n const text = ts.sys.readFile(filename);\n if (!text) {\n event.addError('File not found: \"%s\"', filename);\n return;\n }\n\n const args: string[] = [];\n let pos = 0;\n while (true) {\n while (pos < text.length && text.charCodeAt(pos) <= _ts.CharacterCodes.space) {\n pos++;\n }\n if (pos >= text.length) {\n break;\n }\n\n const start = pos;\n if (text.charCodeAt(start) === _ts.CharacterCodes.doubleQuote) {\n pos++;\n while (pos < text.length && text.charCodeAt(pos) !== _ts.CharacterCodes.doubleQuote) {\n pos++;\n }\n if (pos < text.length) {\n args.push(text.substring(start + 1, pos));\n pos++;\n } else {\n event.addError('Unterminated quoted string in response file \"%s\"', filename);\n return;\n }\n } else {\n while (text.charCodeAt(pos) > _ts.CharacterCodes.space) {\n pos++;\n }\n args.push(text.substring(start, pos));\n }\n }\n\n this.parseArguments(event, args);\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/utils/options/readers/index.js.map b/node_modules/typedoc/dist/lib/utils/options/readers/index.js.map
index b4d8ae0ee..fe08a2fbe 100644
--- a/node_modules/typedoc/dist/lib/utils/options/readers/index.js.map
+++ b/node_modules/typedoc/dist/lib/utils/options/readers/index.js.map
@@ -1 +1 @@
-{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/utils/options/readers/index.ts"],"names":[],"mappings":";;AAAA,yCAA4C;AAApC,sCAAA,eAAe,CAAA;AACvB,uCAA0C;AAAlC,oCAAA,cAAc,CAAA;AACtB,qCAAwC;AAAhC,kCAAA,aAAa,CAAA","sourcesContent":["export {ArgumentsReader} from './arguments';\nexport {TSConfigReader} from './tsconfig';\nexport {TypedocReader} from './typedoc';\n"]} \ No newline at end of file
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/utils/options/readers/index.ts"],"names":[],"mappings":";;AAAA,yCAA8C;AAArC,sCAAA,eAAe,CAAA;AACxB,uCAA4C;AAAnC,oCAAA,cAAc,CAAA;AACvB,qCAA0C;AAAjC,kCAAA,aAAa,CAAA","sourcesContent":["export { ArgumentsReader } from './arguments';\nexport { TSConfigReader } from './tsconfig';\nexport { TypedocReader } from './typedoc';\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/utils/options/readers/tsconfig.js b/node_modules/typedoc/dist/lib/utils/options/readers/tsconfig.js
index dc1176ee2..c21db87eb 100644
--- a/node_modules/typedoc/dist/lib/utils/options/readers/tsconfig.js
+++ b/node_modules/typedoc/dist/lib/utils/options/readers/tsconfig.js
@@ -24,11 +24,12 @@ var component_1 = require("../../component");
var options_1 = require("../options");
var declaration_1 = require("../declaration");
var typescript_1 = require("../sources/typescript");
-var TSConfigReader = TSConfigReader_1 = (function (_super) {
+var TSConfigReader = (function (_super) {
__extends(TSConfigReader, _super);
function TSConfigReader() {
return _super !== null && _super.apply(this, arguments) || this;
}
+ TSConfigReader_1 = TSConfigReader;
TSConfigReader.prototype.initialize = function () {
this.listenTo(this.owner, options_1.DiscoverEvent.DISCOVER, this.onDiscover, -100);
};
@@ -66,20 +67,20 @@ var TSConfigReader = TSConfigReader_1 = (function (_super) {
}
_.defaults(event.data, typedocOptions, options);
};
+ TSConfigReader.OPTIONS_KEY = 'tsconfig';
+ __decorate([
+ component_1.Option({
+ name: TSConfigReader_1.OPTIONS_KEY,
+ help: 'Specify a js option file that should be loaded. If not specified TypeDoc will look for \'typedoc.js\' in the current directory.',
+ type: declaration_1.ParameterType.String,
+ hint: declaration_1.ParameterHint.File
+ })
+ ], TSConfigReader.prototype, "options", void 0);
+ TSConfigReader = TSConfigReader_1 = __decorate([
+ component_1.Component({ name: 'options:tsconfig' })
+ ], TSConfigReader);
return TSConfigReader;
+ var TSConfigReader_1;
}(options_1.OptionsComponent));
-TSConfigReader.OPTIONS_KEY = 'tsconfig';
-__decorate([
- component_1.Option({
- name: TSConfigReader_1.OPTIONS_KEY,
- help: 'Specify a js option file that should be loaded. If not specified TypeDoc will look for \'typedoc.js\' in the current directory.',
- type: declaration_1.ParameterType.String,
- hint: declaration_1.ParameterHint.File
- })
-], TSConfigReader.prototype, "options", void 0);
-TSConfigReader = TSConfigReader_1 = __decorate([
- component_1.Component({ name: 'options:tsconfig' })
-], TSConfigReader);
exports.TSConfigReader = TSConfigReader;
-var TSConfigReader_1;
//# sourceMappingURL=tsconfig.js.map \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/utils/options/readers/tsconfig.js.map b/node_modules/typedoc/dist/lib/utils/options/readers/tsconfig.js.map
index 31d3210b4..6340d4466 100644
--- a/node_modules/typedoc/dist/lib/utils/options/readers/tsconfig.js.map
+++ b/node_modules/typedoc/dist/lib/utils/options/readers/tsconfig.js.map
@@ -1 +1 @@
-{"version":3,"file":"tsconfig.js","sourceRoot":"","sources":["../../../../../src/lib/utils/options/readers/tsconfig.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,2BAA6B;AAC7B,uBAAyB;AACzB,0BAA4B;AAC5B,+BAAiC;AAEjC,6CAAkD;AAClD,sCAA2D;AAC3D,8CAA4D;AAC5D,oDAAuD;AAGvD,IAAa,cAAc;IAAS,kCAAgB;IAApD;;IAoEA,CAAC;IAtDG,mCAAU,GAAV;QACI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,uBAAa,CAAC,QAAQ,EAAE,IAAI,CAAC,UAAU,EAAE,CAAC,GAAG,CAAC,CAAC;IAC7E,CAAC;IAED,mCAAU,GAAV,UAAW,KAAoB;QAC3B,EAAE,CAAC,CAAC,gBAAc,CAAC,WAAW,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;YAC3C,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,gBAAc,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;QAC3E,CAAC;QAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC;YAChC,IAAI,IAAI,GAAW,EAAE,CAAC,cAAc,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;YAE7D,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;gBACP,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;YAC3B,CAAC;QACL,CAAC;IACL,CAAC;IAQD,6BAAI,GAAJ,UAAK,KAAoB,EAAE,QAAgB;QACvC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;YAC3B,KAAK,CAAC,QAAQ,CAAC,sCAAsC,EAAE,QAAQ,CAAC,CAAC;YACjE,MAAM,CAAC;QACX,CAAC;QAEO,IAAA,4DAAM,CAAkD;QAChE,EAAE,CAAC,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC;YACvB,KAAK,CAAC,QAAQ,CAAC,mDAAmD,EAAE,QAAQ,CAAC,CAAC;YAC9E,MAAM,CAAC;QACX,CAAC;QACD,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YAC3B,KAAK,CAAC,QAAQ,CAAC,sDAAsD,EAAE,QAAQ,CAAC,CAAC;YACjF,MAAM,CAAC;QACX,CAAC;QAEK,IAAA,oHAKqB,EALnB,wBAAS,EAAE,oBAAO,EAAS,sCAAc,CAKrB;QAE5B,KAAK,CAAC,UAAU,GAAG,SAAS,CAAC;QAE7B,IAAM,OAAO,GAAG,6BAAgB,CAAC,OAAO,CAAC;QACzC,GAAG,CAAC,CAAc,UAAO,EAAP,mBAAO,EAAP,qBAAO,EAAP,IAAO;YAApB,IAAM,GAAG,gBAAA;YACV,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC;SACvB;QAED,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,cAAc,EAAE,OAAO,CAAC,CAAC;IACpD,CAAC;IACL,qBAAC;AAAD,CAAC,AApED,CAAoC,0BAAgB,GAoEnD;AAxDkB,0BAAW,GAAG,UAAU,CAAC;AALxC;IANC,kBAAM,CAAC;QACJ,IAAI,EAAE,gBAAc,CAAC,WAAW;QAChC,IAAI,EAAE,iIAAiI;QACvI,IAAI,EAAE,2BAAa,CAAC,MAAM;QAC1B,IAAI,EAAE,2BAAa,CAAC,IAAI;KAC3B,CAAC;+CACc;AAPP,cAAc;IAD1B,qBAAS,CAAC,EAAC,IAAI,EAAE,kBAAkB,EAAC,CAAC;GACzB,cAAc,CAoE1B;AApEY,wCAAc","sourcesContent":["import * as Path from 'path';\nimport * as FS from 'fs';\nimport * as _ from 'lodash';\nimport * as ts from 'typescript';\n\nimport {Component, Option} from '../../component';\nimport {OptionsComponent, DiscoverEvent} from '../options';\nimport {ParameterType, ParameterHint} from '../declaration';\nimport {TypeScriptSource} from '../sources/typescript';\n\n@Component({name: 'options:tsconfig'})\nexport class TSConfigReader extends OptionsComponent {\n @Option({\n name: TSConfigReader.OPTIONS_KEY,\n help: 'Specify a js option file that should be loaded. If not specified TypeDoc will look for \\'typedoc.js\\' in the current directory.',\n type: ParameterType.String,\n hint: ParameterHint.File\n })\n options: string;\n\n /**\n * The name of the parameter that specifies the tsconfig file.\n */\n private static OPTIONS_KEY = 'tsconfig';\n\n initialize() {\n this.listenTo(this.owner, DiscoverEvent.DISCOVER, this.onDiscover, -100);\n }\n\n onDiscover(event: DiscoverEvent) {\n if (TSConfigReader.OPTIONS_KEY in event.data) {\n this.load(event, Path.resolve(event.data[TSConfigReader.OPTIONS_KEY]));\n } else if (this.application.isCLI) {\n let file: string = ts.findConfigFile('.', ts.sys.fileExists);\n // If file is undefined, we found no file to load.\n if (file) {\n this.load(event, file);\n }\n }\n }\n\n /**\n * Load the specified tsconfig file.\n *\n * @param event The event that triggered the loading. Used to store error messages.\n * @param fileName The absolute path and file name of the tsconfig file.\n */\n load(event: DiscoverEvent, fileName: string) {\n if (!FS.existsSync(fileName)) {\n event.addError('The tsconfig file %s does not exist.', fileName);\n return;\n }\n\n const { config } = ts.readConfigFile(fileName, ts.sys.readFile);\n if (config === undefined) {\n event.addError('The tsconfig file %s does not contain valid JSON.', fileName);\n return;\n }\n if (!_.isPlainObject(config)) {\n event.addError('The tsconfig file %s does not contain a JSON object.', fileName);\n return;\n }\n\n const { fileNames, options, raw: { typedocOptions }} = ts.parseJsonConfigFileContent(\n config,\n ts.sys,\n Path.resolve(Path.dirname(fileName)),\n {},\n Path.resolve(fileName));\n\n event.inputFiles = fileNames;\n\n const ignored = TypeScriptSource.IGNORED;\n for (const key of ignored) {\n delete options[key];\n }\n\n _.defaults(event.data, typedocOptions, options);\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"tsconfig.js","sourceRoot":"","sources":["../../../../../src/lib/utils/options/readers/tsconfig.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,2BAA6B;AAC7B,uBAAyB;AACzB,0BAA4B;AAC5B,+BAAiC;AAEjC,6CAAoD;AACpD,sCAA6D;AAC7D,8CAA8D;AAC9D,oDAAyD;AAGzD;IAAoC,kCAAgB;IAApD;;IAoEA,CAAC;uBApEY,cAAc;IAcvB,mCAAU,GAAV;QACI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,uBAAa,CAAC,QAAQ,EAAE,IAAI,CAAC,UAAU,EAAE,CAAC,GAAG,CAAC,CAAC;IAC7E,CAAC;IAED,mCAAU,GAAV,UAAW,KAAoB;QAC3B,EAAE,CAAC,CAAC,gBAAc,CAAC,WAAW,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;YAC3C,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,gBAAc,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;QAC3E,CAAC;QAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC;YAChC,IAAI,IAAI,GAAW,EAAE,CAAC,cAAc,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;YAE7D,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;gBACP,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;YAC3B,CAAC;QACL,CAAC;IACL,CAAC;IAQD,6BAAI,GAAJ,UAAK,KAAoB,EAAE,QAAgB;QACvC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;YAC3B,KAAK,CAAC,QAAQ,CAAC,sCAAsC,EAAE,QAAQ,CAAC,CAAC;YACjE,MAAM,CAAC;QACX,CAAC;QAEO,IAAA,4DAAM,CAAkD;QAChE,EAAE,CAAC,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC;YACvB,KAAK,CAAC,QAAQ,CAAC,mDAAmD,EAAE,QAAQ,CAAC,CAAC;YAC9E,MAAM,CAAC;QACX,CAAC;QACD,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YAC3B,KAAK,CAAC,QAAQ,CAAC,sDAAsD,EAAE,QAAQ,CAAC,CAAC;YACjF,MAAM,CAAC;QACX,CAAC;QAEK,IAAA,oHAKqB,EALnB,wBAAS,EAAE,oBAAO,EAAS,sCAAc,CAKrB;QAE5B,KAAK,CAAC,UAAU,GAAG,SAAS,CAAC;QAE7B,IAAM,OAAO,GAAG,6BAAgB,CAAC,OAAO,CAAC;QACzC,GAAG,CAAC,CAAc,UAAO,EAAP,mBAAO,EAAP,qBAAO,EAAP,IAAO;YAApB,IAAM,GAAG,gBAAA;YACV,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC;SACvB;QAED,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,cAAc,EAAE,OAAO,CAAC,CAAC;IACpD,CAAC;IAvDc,0BAAW,GAAG,UAAU,CAAC;IALxC;QANC,kBAAM,CAAC;YACJ,IAAI,EAAE,gBAAc,CAAC,WAAW;YAChC,IAAI,EAAE,iIAAiI;YACvI,IAAI,EAAE,2BAAa,CAAC,MAAM;YAC1B,IAAI,EAAE,2BAAa,CAAC,IAAI;SAC3B,CAAC;mDACc;IAPP,cAAc;QAD1B,qBAAS,CAAC,EAAC,IAAI,EAAE,kBAAkB,EAAC,CAAC;OACzB,cAAc,CAoE1B;IAAD,qBAAC;;CAAA,AApED,CAAoC,0BAAgB,GAoEnD;AApEY,wCAAc","sourcesContent":["import * as Path from 'path';\nimport * as FS from 'fs';\nimport * as _ from 'lodash';\nimport * as ts from 'typescript';\n\nimport { Component, Option } from '../../component';\nimport { OptionsComponent, DiscoverEvent } from '../options';\nimport { ParameterType, ParameterHint } from '../declaration';\nimport { TypeScriptSource } from '../sources/typescript';\n\n@Component({name: 'options:tsconfig'})\nexport class TSConfigReader extends OptionsComponent {\n @Option({\n name: TSConfigReader.OPTIONS_KEY,\n help: 'Specify a js option file that should be loaded. If not specified TypeDoc will look for \\'typedoc.js\\' in the current directory.',\n type: ParameterType.String,\n hint: ParameterHint.File\n })\n options: string;\n\n /**\n * The name of the parameter that specifies the tsconfig file.\n */\n private static OPTIONS_KEY = 'tsconfig';\n\n initialize() {\n this.listenTo(this.owner, DiscoverEvent.DISCOVER, this.onDiscover, -100);\n }\n\n onDiscover(event: DiscoverEvent) {\n if (TSConfigReader.OPTIONS_KEY in event.data) {\n this.load(event, Path.resolve(event.data[TSConfigReader.OPTIONS_KEY]));\n } else if (this.application.isCLI) {\n let file: string = ts.findConfigFile('.', ts.sys.fileExists);\n // If file is undefined, we found no file to load.\n if (file) {\n this.load(event, file);\n }\n }\n }\n\n /**\n * Load the specified tsconfig file.\n *\n * @param event The event that triggered the loading. Used to store error messages.\n * @param fileName The absolute path and file name of the tsconfig file.\n */\n load(event: DiscoverEvent, fileName: string) {\n if (!FS.existsSync(fileName)) {\n event.addError('The tsconfig file %s does not exist.', fileName);\n return;\n }\n\n const { config } = ts.readConfigFile(fileName, ts.sys.readFile);\n if (config === undefined) {\n event.addError('The tsconfig file %s does not contain valid JSON.', fileName);\n return;\n }\n if (!_.isPlainObject(config)) {\n event.addError('The tsconfig file %s does not contain a JSON object.', fileName);\n return;\n }\n\n const { fileNames, options, raw: { typedocOptions }} = ts.parseJsonConfigFileContent(\n config,\n ts.sys,\n Path.resolve(Path.dirname(fileName)),\n {},\n Path.resolve(fileName));\n\n event.inputFiles = fileNames;\n\n const ignored = TypeScriptSource.IGNORED;\n for (const key of ignored) {\n delete options[key];\n }\n\n _.defaults(event.data, typedocOptions, options);\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/utils/options/readers/typedoc.js b/node_modules/typedoc/dist/lib/utils/options/readers/typedoc.js
index b173982fc..afda63e3d 100644
--- a/node_modules/typedoc/dist/lib/utils/options/readers/typedoc.js
+++ b/node_modules/typedoc/dist/lib/utils/options/readers/typedoc.js
@@ -22,11 +22,12 @@ var _ = require("lodash");
var component_1 = require("../../component");
var options_1 = require("../options");
var declaration_1 = require("../declaration");
-var TypedocReader = TypedocReader_1 = (function (_super) {
+var TypedocReader = (function (_super) {
__extends(TypedocReader, _super);
function TypedocReader() {
return _super !== null && _super.apply(this, arguments) || this;
}
+ TypedocReader_1 = TypedocReader;
TypedocReader.prototype.initialize = function () {
this.listenTo(this.owner, options_1.DiscoverEvent.DISCOVER, this.onDiscover, -100);
};
@@ -69,20 +70,20 @@ var TypedocReader = TypedocReader_1 = (function (_super) {
_.defaultsDeep(event.data, data);
}
};
+ TypedocReader.OPTIONS_KEY = 'options';
+ __decorate([
+ component_1.Option({
+ name: TypedocReader_1.OPTIONS_KEY,
+ help: 'Specify a js option file that should be loaded. If not specified TypeDoc will look for \'typedoc.js\' in the current directory.',
+ type: declaration_1.ParameterType.String,
+ hint: declaration_1.ParameterHint.File
+ })
+ ], TypedocReader.prototype, "options", void 0);
+ TypedocReader = TypedocReader_1 = __decorate([
+ component_1.Component({ name: 'options:typedoc' })
+ ], TypedocReader);
return TypedocReader;
+ var TypedocReader_1;
}(options_1.OptionsComponent));
-TypedocReader.OPTIONS_KEY = 'options';
-__decorate([
- component_1.Option({
- name: TypedocReader_1.OPTIONS_KEY,
- help: 'Specify a js option file that should be loaded. If not specified TypeDoc will look for \'typedoc.js\' in the current directory.',
- type: declaration_1.ParameterType.String,
- hint: declaration_1.ParameterHint.File
- })
-], TypedocReader.prototype, "options", void 0);
-TypedocReader = TypedocReader_1 = __decorate([
- component_1.Component({ name: 'options:typedoc' })
-], TypedocReader);
exports.TypedocReader = TypedocReader;
-var TypedocReader_1;
//# sourceMappingURL=typedoc.js.map \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/utils/options/readers/typedoc.js.map b/node_modules/typedoc/dist/lib/utils/options/readers/typedoc.js.map
index c8515ab83..252ed61e2 100644
--- a/node_modules/typedoc/dist/lib/utils/options/readers/typedoc.js.map
+++ b/node_modules/typedoc/dist/lib/utils/options/readers/typedoc.js.map
@@ -1 +1 @@
-{"version":3,"file":"typedoc.js","sourceRoot":"","sources":["../../../../../src/lib/utils/options/readers/typedoc.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,2BAA6B;AAC7B,uBAAyB;AACzB,0BAA4B;AAE5B,6CAAkD;AAClD,sCAA2D;AAC3D,8CAA4D;AAG5D,IAAa,aAAa;IAAS,iCAAgB;IAAnD;;IAkEA,CAAC;IApDG,kCAAU,GAAV;QACI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,uBAAa,CAAC,QAAQ,EAAE,IAAI,CAAC,UAAU,EAAE,CAAC,GAAG,CAAC,CAAC;IAC7E,CAAC;IAED,kCAAU,GAAV,UAAW,KAAoB;QAC3B,EAAE,CAAC,CAAC,eAAa,CAAC,WAAW,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;YAC1C,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,eAAa,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;QAC1E,CAAC;QAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC;YAChC,IAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;YACxC,EAAE,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;gBACtB,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;YAC3B,CAAC;QACL,CAAC;IACL,CAAC;IAUD,4BAAI,GAAJ,UAAK,KAAoB,EAAE,UAAkB;QACzC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;YAC7B,KAAK,CAAC,QAAQ,CAAC,oCAAoC,EAAE,UAAU,CAAC,CAAC;YACjE,MAAM,CAAC;QACX,CAAC;QAED,IAAI,IAAI,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;QAC/B,EAAE,CAAC,CAAC,OAAO,IAAI,KAAK,UAAU,CAAC,CAAC,CAAC;YAC7B,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAClC,CAAC;QAED,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC;YAC9B,KAAK,CAAC,QAAQ,CAAC,sFAAsF,EAAE,UAAU,CAAC,CAAC;QACvH,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;gBACX,EAAE,CAAC,CAAC,OAAO,IAAI,CAAC,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAC;oBAC/B,KAAK,CAAC,UAAU,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBAClC,CAAC;gBAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;oBAC7B,KAAK,CAAC,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC;gBAChC,CAAC;gBAAC,IAAI,CAAC,CAAC;oBACJ,KAAK,CAAC,QAAQ,CAAC,0EAA0E,EAAE,UAAU,CAAC,CAAC;gBAC3G,CAAC;gBAED,OAAO,IAAI,CAAC,GAAG,CAAC;YACpB,CAAC;YAED,CAAC,CAAC,YAAY,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QACrC,CAAC;IACL,CAAC;IACL,oBAAC;AAAD,CAAC,AAlED,CAAmC,0BAAgB,GAkElD;AAtDkB,yBAAW,GAAG,SAAS,CAAC;AALvC;IANC,kBAAM,CAAC;QACJ,IAAI,EAAE,eAAa,CAAC,WAAW;QAC/B,IAAI,EAAE,iIAAiI;QACvI,IAAI,EAAE,2BAAa,CAAC,MAAM;QAC1B,IAAI,EAAE,2BAAa,CAAC,IAAI;KAC3B,CAAC;8CACc;AAPP,aAAa;IADzB,qBAAS,CAAC,EAAC,IAAI,EAAE,iBAAiB,EAAC,CAAC;GACxB,aAAa,CAkEzB;AAlEY,sCAAa","sourcesContent":["import * as Path from 'path';\nimport * as FS from 'fs';\nimport * as _ from 'lodash';\n\nimport {Component, Option} from '../../component';\nimport {OptionsComponent, DiscoverEvent} from '../options';\nimport {ParameterType, ParameterHint} from '../declaration';\n\n@Component({name: 'options:typedoc'})\nexport class TypedocReader extends OptionsComponent {\n @Option({\n name: TypedocReader.OPTIONS_KEY,\n help: 'Specify a js option file that should be loaded. If not specified TypeDoc will look for \\'typedoc.js\\' in the current directory.',\n type: ParameterType.String,\n hint: ParameterHint.File\n })\n options: string;\n\n /**\n * The name of the parameter that specifies the options file.\n */\n private static OPTIONS_KEY = 'options';\n\n initialize() {\n this.listenTo(this.owner, DiscoverEvent.DISCOVER, this.onDiscover, -100);\n }\n\n onDiscover(event: DiscoverEvent) {\n if (TypedocReader.OPTIONS_KEY in event.data) {\n this.load(event, Path.resolve(event.data[TypedocReader.OPTIONS_KEY]));\n } else if (this.application.isCLI) {\n const file = Path.resolve('typedoc.js');\n if (FS.existsSync(file)) {\n this.load(event, file);\n }\n }\n }\n\n /**\n * Load the specified option file.\n *\n * @param optionFile The absolute path and file name of the option file.\n * @param ignoreUnknownArgs Should unknown arguments be ignored? If so the parser\n * will simply skip all unknown arguments.\n * @returns TRUE on success, otherwise FALSE.\n */\n load(event: DiscoverEvent, optionFile: string) {\n if (!FS.existsSync(optionFile)) {\n event.addError('The option file %s does not exist.', optionFile);\n return;\n }\n\n let data = require(optionFile);\n if (typeof data === 'function') {\n data = data(this.application);\n }\n\n if (!(typeof data === 'object')) {\n event.addError('The option file %s could not be read, it must either export a function or an object.', optionFile);\n } else {\n if (data.src) {\n if (typeof data.src === 'string') {\n event.inputFiles = [data.src];\n } else if (_.isArray(data.src)) {\n event.inputFiles = data.src;\n } else {\n event.addError('The property \\'src\\' of the option file %s must be a string or an array.', optionFile);\n }\n\n delete data.src;\n }\n\n _.defaultsDeep(event.data, data);\n }\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"typedoc.js","sourceRoot":"","sources":["../../../../../src/lib/utils/options/readers/typedoc.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,2BAA6B;AAC7B,uBAAyB;AACzB,0BAA4B;AAE5B,6CAAoD;AACpD,sCAA6D;AAC7D,8CAA8D;AAG9D;IAAmC,iCAAgB;IAAnD;;IAkEA,CAAC;sBAlEY,aAAa;IActB,kCAAU,GAAV;QACI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,uBAAa,CAAC,QAAQ,EAAE,IAAI,CAAC,UAAU,EAAE,CAAC,GAAG,CAAC,CAAC;IAC7E,CAAC;IAED,kCAAU,GAAV,UAAW,KAAoB;QAC3B,EAAE,CAAC,CAAC,eAAa,CAAC,WAAW,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;YAC1C,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,eAAa,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;QAC1E,CAAC;QAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC;YAChC,IAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;YACxC,EAAE,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;gBACtB,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;YAC3B,CAAC;QACL,CAAC;IACL,CAAC;IAUD,4BAAI,GAAJ,UAAK,KAAoB,EAAE,UAAkB;QACzC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;YAC7B,KAAK,CAAC,QAAQ,CAAC,oCAAoC,EAAE,UAAU,CAAC,CAAC;YACjE,MAAM,CAAC;QACX,CAAC;QAED,IAAI,IAAI,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;QAC/B,EAAE,CAAC,CAAC,OAAO,IAAI,KAAK,UAAU,CAAC,CAAC,CAAC;YAC7B,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAClC,CAAC;QAED,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC;YAC9B,KAAK,CAAC,QAAQ,CAAC,sFAAsF,EAAE,UAAU,CAAC,CAAC;QACvH,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;gBACX,EAAE,CAAC,CAAC,OAAO,IAAI,CAAC,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAC;oBAC/B,KAAK,CAAC,UAAU,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBAClC,CAAC;gBAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;oBAC7B,KAAK,CAAC,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC;gBAChC,CAAC;gBAAC,IAAI,CAAC,CAAC;oBACJ,KAAK,CAAC,QAAQ,CAAC,0EAA0E,EAAE,UAAU,CAAC,CAAC;gBAC3G,CAAC;gBAED,OAAO,IAAI,CAAC,GAAG,CAAC;YACpB,CAAC;YAED,CAAC,CAAC,YAAY,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QACrC,CAAC;IACL,CAAC;IArDc,yBAAW,GAAG,SAAS,CAAC;IALvC;QANC,kBAAM,CAAC;YACJ,IAAI,EAAE,eAAa,CAAC,WAAW;YAC/B,IAAI,EAAE,iIAAiI;YACvI,IAAI,EAAE,2BAAa,CAAC,MAAM;YAC1B,IAAI,EAAE,2BAAa,CAAC,IAAI;SAC3B,CAAC;kDACc;IAPP,aAAa;QADzB,qBAAS,CAAC,EAAC,IAAI,EAAE,iBAAiB,EAAC,CAAC;OACxB,aAAa,CAkEzB;IAAD,oBAAC;;CAAA,AAlED,CAAmC,0BAAgB,GAkElD;AAlEY,sCAAa","sourcesContent":["import * as Path from 'path';\nimport * as FS from 'fs';\nimport * as _ from 'lodash';\n\nimport { Component, Option } from '../../component';\nimport { OptionsComponent, DiscoverEvent } from '../options';\nimport { ParameterType, ParameterHint } from '../declaration';\n\n@Component({name: 'options:typedoc'})\nexport class TypedocReader extends OptionsComponent {\n @Option({\n name: TypedocReader.OPTIONS_KEY,\n help: 'Specify a js option file that should be loaded. If not specified TypeDoc will look for \\'typedoc.js\\' in the current directory.',\n type: ParameterType.String,\n hint: ParameterHint.File\n })\n options: string;\n\n /**\n * The name of the parameter that specifies the options file.\n */\n private static OPTIONS_KEY = 'options';\n\n initialize() {\n this.listenTo(this.owner, DiscoverEvent.DISCOVER, this.onDiscover, -100);\n }\n\n onDiscover(event: DiscoverEvent) {\n if (TypedocReader.OPTIONS_KEY in event.data) {\n this.load(event, Path.resolve(event.data[TypedocReader.OPTIONS_KEY]));\n } else if (this.application.isCLI) {\n const file = Path.resolve('typedoc.js');\n if (FS.existsSync(file)) {\n this.load(event, file);\n }\n }\n }\n\n /**\n * Load the specified option file.\n *\n * @param optionFile The absolute path and file name of the option file.\n * @param ignoreUnknownArgs Should unknown arguments be ignored? If so the parser\n * will simply skip all unknown arguments.\n * @returns TRUE on success, otherwise FALSE.\n */\n load(event: DiscoverEvent, optionFile: string) {\n if (!FS.existsSync(optionFile)) {\n event.addError('The option file %s does not exist.', optionFile);\n return;\n }\n\n let data = require(optionFile);\n if (typeof data === 'function') {\n data = data(this.application);\n }\n\n if (!(typeof data === 'object')) {\n event.addError('The option file %s could not be read, it must either export a function or an object.', optionFile);\n } else {\n if (data.src) {\n if (typeof data.src === 'string') {\n event.inputFiles = [data.src];\n } else if (_.isArray(data.src)) {\n event.inputFiles = data.src;\n } else {\n event.addError('The property \\'src\\' of the option file %s must be a string or an array.', optionFile);\n }\n\n delete data.src;\n }\n\n _.defaultsDeep(event.data, data);\n }\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/utils/options/sources/component.js b/node_modules/typedoc/dist/lib/utils/options/sources/component.js
index ee4f2f878..3bb47dfea 100644
--- a/node_modules/typedoc/dist/lib/utils/options/sources/component.js
+++ b/node_modules/typedoc/dist/lib/utils/options/sources/component.js
@@ -76,10 +76,10 @@ var ComponentSource = (function (_super) {
this.owner.removeDeclarationByName(declaration.name);
}
};
+ ComponentSource = __decorate([
+ component_1.Component({ name: 'options:component' })
+ ], ComponentSource);
return ComponentSource;
}(options_1.OptionsComponent));
-ComponentSource = __decorate([
- component_1.Component({ name: 'options:component' })
-], ComponentSource);
exports.ComponentSource = ComponentSource;
//# sourceMappingURL=component.js.map \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/utils/options/sources/component.js.map b/node_modules/typedoc/dist/lib/utils/options/sources/component.js.map
index ec280d970..652185265 100644
--- a/node_modules/typedoc/dist/lib/utils/options/sources/component.js.map
+++ b/node_modules/typedoc/dist/lib/utils/options/sources/component.js.map
@@ -1 +1 @@
-{"version":3,"file":"component.js","sourceRoot":"","sources":["../../../../../src/lib/utils/options/sources/component.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,6CAAiG;AACjG,sCAA4C;AAG5C,IAAa,eAAe;IAAS,mCAAgB;IAArD;;IA2DA,CAAC;IAxDa,oCAAU,GAApB;QACI,IAAI,CAAC,eAAe,GAAG,EAAE,CAAC;QAC1B,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAEpC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW;YAC1B,GAAC,0BAAc,CAAC,KAAK,IAAK,IAAI,CAAC,gBAAgB;YAC/C,GAAC,0BAAc,CAAC,OAAO,IAAG,IAAI,CAAC,kBAAkB;gBACnD,CAAC;;IACP,CAAC;IAEO,sCAAY,GAApB,UAAqB,SAAiC;QAClD,IAAM,IAAI,GAAG,SAAS,CAAC,aAAa,CAAC;QACrC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;YACR,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,+BAA+B,CAAC,CAAC;YAC/D,MAAM,CAAC;QACX,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;YAC5C,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAChC,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,SAAS,CAAC,qBAAqB,EAAE,CAAC,CAAC;QAClE,CAAC;QAED,EAAE,CAAC,CAAC,SAAS,YAAY,8BAAkB,CAAC,CAAC,CAAC;YAC1C,GAAG,CAAC,CAAc,UAAyB,EAAzB,KAAA,SAAS,CAAC,aAAa,EAAE,EAAzB,cAAyB,EAAzB,IAAyB;gBAAtC,IAAI,KAAK,SAAA;gBACV,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;aAC5B;QACL,CAAC;IACL,CAAC;IAEO,yCAAe,GAAvB,UAAwB,SAAiC;QACrD,IAAM,IAAI,GAAG,SAAS,CAAC,aAAa,CAAC;QACrC,IAAI,KAAK,GAAG,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC/C,EAAE,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;YACf,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;YACrC,GAAG,CAAC,CAAoB,UAAiC,EAAjC,KAAA,SAAS,CAAC,qBAAqB,EAAE,EAAjC,cAAiC,EAAjC,IAAiC;gBAApD,IAAI,WAAW,SAAA;gBAChB,IAAI,CAAC,KAAK,CAAC,uBAAuB,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;aACxD;QACL,CAAC;QAED,EAAE,CAAC,CAAC,SAAS,YAAY,8BAAkB,CAAC,CAAC,CAAC;YAC1C,GAAG,CAAC,CAAc,UAAyB,EAAzB,KAAA,SAAS,CAAC,aAAa,EAAE,EAAzB,cAAyB,EAAzB,IAAyB;gBAAtC,IAAI,KAAK,SAAA;gBACV,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;aAC/B;QACL,CAAC;IACL,CAAC;IAEO,0CAAgB,GAAxB,UAAyB,CAAiB;QACtC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IACnC,CAAC;IAEO,4CAAkB,GAA1B,UAA2B,CAAiB;QACxC,IAAM,YAAY,GAAG,CAAC,CAAC,SAAS,CAAC,qBAAqB,EAAE,CAAC;QACzD,GAAG,CAAC,CAAoB,UAAY,EAAZ,6BAAY,EAAZ,0BAAY,EAAZ,IAAY;YAA/B,IAAI,WAAW,qBAAA;YAChB,IAAI,CAAC,KAAK,CAAC,uBAAuB,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;SACxD;IACL,CAAC;IACL,sBAAC;AAAD,CAAC,AA3DD,CAAqC,0BAAgB,GA2DpD;AA3DY,eAAe;IAD3B,qBAAS,CAAC,EAAC,IAAI,EAAE,mBAAmB,EAAC,CAAC;GAC1B,eAAe,CA2D3B;AA3DY,0CAAe","sourcesContent":["import {Component, ComponentEvent, AbstractComponent, ChildableComponent} from '../../component';\nimport {OptionsComponent} from '../options';\n\n@Component({name: 'options:component'})\nexport class ComponentSource extends OptionsComponent {\n private knownComponents: string[];\n\n protected initialize() {\n this.knownComponents = [];\n this.addComponent(this.application);\n\n this.listenTo(this.application, {\n [ComponentEvent.ADDED]: this.onComponentAdded,\n [ComponentEvent.REMOVED]: this.onComponentRemoved\n });\n }\n\n private addComponent(component: AbstractComponent<any>) {\n const name = component.componentName;\n if (!name) {\n this.application.logger.error('Component without name found.');\n return;\n }\n\n if (this.knownComponents.indexOf(name) === -1) {\n this.knownComponents.push(name);\n this.owner.addDeclarations(component.getOptionDeclarations());\n }\n\n if (component instanceof ChildableComponent) {\n for (let child of component.getComponents()) {\n this.addComponent(child);\n }\n }\n }\n\n private removeComponent(component: AbstractComponent<any>) {\n const name = component.componentName;\n let index = this.knownComponents.indexOf(name);\n if (index !== -1) {\n this.knownComponents.slice(index, 1);\n for (let declaration of component.getOptionDeclarations()) {\n this.owner.removeDeclarationByName(declaration.name);\n }\n }\n\n if (component instanceof ChildableComponent) {\n for (let child of component.getComponents()) {\n this.removeComponent(child);\n }\n }\n }\n\n private onComponentAdded(e: ComponentEvent) {\n this.addComponent(e.component);\n }\n\n private onComponentRemoved(e: ComponentEvent) {\n const declarations = e.component.getOptionDeclarations();\n for (let declaration of declarations) {\n this.owner.removeDeclarationByName(declaration.name);\n }\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"component.js","sourceRoot":"","sources":["../../../../../src/lib/utils/options/sources/component.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,6CAAmG;AACnG,sCAA8C;AAG9C;IAAqC,mCAAgB;IAArD;;IA2DA,CAAC;IAxDa,oCAAU,GAApB;QACI,IAAI,CAAC,eAAe,GAAG,EAAE,CAAC;QAC1B,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAEpC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW;YAC1B,GAAC,0BAAc,CAAC,KAAK,IAAK,IAAI,CAAC,gBAAgB;YAC/C,GAAC,0BAAc,CAAC,OAAO,IAAG,IAAI,CAAC,kBAAkB;gBACnD,CAAC;;IACP,CAAC;IAEO,sCAAY,GAApB,UAAqB,SAAiC;QAClD,IAAM,IAAI,GAAG,SAAS,CAAC,aAAa,CAAC;QACrC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;YACR,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,+BAA+B,CAAC,CAAC;YAC/D,MAAM,CAAC;QACX,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;YAC5C,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAChC,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,SAAS,CAAC,qBAAqB,EAAE,CAAC,CAAC;QAClE,CAAC;QAED,EAAE,CAAC,CAAC,SAAS,YAAY,8BAAkB,CAAC,CAAC,CAAC;YAC1C,GAAG,CAAC,CAAc,UAAyB,EAAzB,KAAA,SAAS,CAAC,aAAa,EAAE,EAAzB,cAAyB,EAAzB,IAAyB;gBAAtC,IAAI,KAAK,SAAA;gBACV,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;aAC5B;QACL,CAAC;IACL,CAAC;IAEO,yCAAe,GAAvB,UAAwB,SAAiC;QACrD,IAAM,IAAI,GAAG,SAAS,CAAC,aAAa,CAAC;QACrC,IAAI,KAAK,GAAG,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC/C,EAAE,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;YACf,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;YACrC,GAAG,CAAC,CAAoB,UAAiC,EAAjC,KAAA,SAAS,CAAC,qBAAqB,EAAE,EAAjC,cAAiC,EAAjC,IAAiC;gBAApD,IAAI,WAAW,SAAA;gBAChB,IAAI,CAAC,KAAK,CAAC,uBAAuB,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;aACxD;QACL,CAAC;QAED,EAAE,CAAC,CAAC,SAAS,YAAY,8BAAkB,CAAC,CAAC,CAAC;YAC1C,GAAG,CAAC,CAAc,UAAyB,EAAzB,KAAA,SAAS,CAAC,aAAa,EAAE,EAAzB,cAAyB,EAAzB,IAAyB;gBAAtC,IAAI,KAAK,SAAA;gBACV,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;aAC/B;QACL,CAAC;IACL,CAAC;IAEO,0CAAgB,GAAxB,UAAyB,CAAiB;QACtC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IACnC,CAAC;IAEO,4CAAkB,GAA1B,UAA2B,CAAiB;QACxC,IAAM,YAAY,GAAG,CAAC,CAAC,SAAS,CAAC,qBAAqB,EAAE,CAAC;QACzD,GAAG,CAAC,CAAoB,UAAY,EAAZ,6BAAY,EAAZ,0BAAY,EAAZ,IAAY;YAA/B,IAAI,WAAW,qBAAA;YAChB,IAAI,CAAC,KAAK,CAAC,uBAAuB,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;SACxD;IACL,CAAC;IA1DQ,eAAe;QAD3B,qBAAS,CAAC,EAAC,IAAI,EAAE,mBAAmB,EAAC,CAAC;OAC1B,eAAe,CA2D3B;IAAD,sBAAC;CAAA,AA3DD,CAAqC,0BAAgB,GA2DpD;AA3DY,0CAAe","sourcesContent":["import { Component, ComponentEvent, AbstractComponent, ChildableComponent } from '../../component';\nimport { OptionsComponent } from '../options';\n\n@Component({name: 'options:component'})\nexport class ComponentSource extends OptionsComponent {\n private knownComponents: string[];\n\n protected initialize() {\n this.knownComponents = [];\n this.addComponent(this.application);\n\n this.listenTo(this.application, {\n [ComponentEvent.ADDED]: this.onComponentAdded,\n [ComponentEvent.REMOVED]: this.onComponentRemoved\n });\n }\n\n private addComponent(component: AbstractComponent<any>) {\n const name = component.componentName;\n if (!name) {\n this.application.logger.error('Component without name found.');\n return;\n }\n\n if (this.knownComponents.indexOf(name) === -1) {\n this.knownComponents.push(name);\n this.owner.addDeclarations(component.getOptionDeclarations());\n }\n\n if (component instanceof ChildableComponent) {\n for (let child of component.getComponents()) {\n this.addComponent(child);\n }\n }\n }\n\n private removeComponent(component: AbstractComponent<any>) {\n const name = component.componentName;\n let index = this.knownComponents.indexOf(name);\n if (index !== -1) {\n this.knownComponents.slice(index, 1);\n for (let declaration of component.getOptionDeclarations()) {\n this.owner.removeDeclarationByName(declaration.name);\n }\n }\n\n if (component instanceof ChildableComponent) {\n for (let child of component.getComponents()) {\n this.removeComponent(child);\n }\n }\n }\n\n private onComponentAdded(e: ComponentEvent) {\n this.addComponent(e.component);\n }\n\n private onComponentRemoved(e: ComponentEvent) {\n const declarations = e.component.getOptionDeclarations();\n for (let declaration of declarations) {\n this.owner.removeDeclarationByName(declaration.name);\n }\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/utils/options/sources/index.js.map b/node_modules/typedoc/dist/lib/utils/options/sources/index.js.map
index 0a5e0e762..1a7141641 100644
--- a/node_modules/typedoc/dist/lib/utils/options/sources/index.js.map
+++ b/node_modules/typedoc/dist/lib/utils/options/sources/index.js.map
@@ -1 +1 @@
-{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/utils/options/sources/index.ts"],"names":[],"mappings":";;AAAA,yCAA4C;AAApC,sCAAA,eAAe,CAAA;AACvB,2CAA8C;AAAtC,wCAAA,gBAAgB,CAAA","sourcesContent":["export {ComponentSource} from './component';\nexport {TypeScriptSource} from './typescript';\n"]} \ No newline at end of file
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/utils/options/sources/index.ts"],"names":[],"mappings":";;AAAA,yCAA8C;AAArC,sCAAA,eAAe,CAAA;AACxB,2CAAgD;AAAvC,wCAAA,gBAAgB,CAAA","sourcesContent":["export { ComponentSource } from './component';\nexport { TypeScriptSource } from './typescript';\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/utils/options/sources/typescript.js b/node_modules/typedoc/dist/lib/utils/options/sources/typescript.js
index 1e43f435c..32236fd2c 100644
--- a/node_modules/typedoc/dist/lib/utils/options/sources/typescript.js
+++ b/node_modules/typedoc/dist/lib/utils/options/sources/typescript.js
@@ -21,11 +21,12 @@ var _ts = require("../../../ts-internal");
var component_1 = require("../../component");
var options_1 = require("../options");
var declaration_1 = require("../declaration");
-var TypeScriptSource = TypeScriptSource_1 = (function (_super) {
+var TypeScriptSource = (function (_super) {
__extends(TypeScriptSource, _super);
function TypeScriptSource() {
return _super !== null && _super.apply(this, arguments) || this;
}
+ TypeScriptSource_1 = TypeScriptSource;
TypeScriptSource.prototype.initialize = function () {
var ignored = TypeScriptSource_1.IGNORED;
this.declarations = [];
@@ -78,16 +79,16 @@ var TypeScriptSource = TypeScriptSource_1 = (function (_super) {
}
this.declarations.push(param);
};
+ TypeScriptSource.IGNORED = [
+ 'out', 'version', 'help',
+ 'watch', 'declaration', 'declarationDir', 'mapRoot',
+ 'sourceMap', 'inlineSources', 'removeComments'
+ ];
+ TypeScriptSource = TypeScriptSource_1 = __decorate([
+ component_1.Component({ name: 'options:typescript' })
+ ], TypeScriptSource);
return TypeScriptSource;
+ var TypeScriptSource_1;
}(options_1.OptionsComponent));
-TypeScriptSource.IGNORED = [
- 'out', 'version', 'help',
- 'watch', 'declaration', 'declarationDir', 'mapRoot',
- 'sourceMap', 'inlineSources', 'removeComments'
-];
-TypeScriptSource = TypeScriptSource_1 = __decorate([
- component_1.Component({ name: 'options:typescript' })
-], TypeScriptSource);
exports.TypeScriptSource = TypeScriptSource;
-var TypeScriptSource_1;
//# sourceMappingURL=typescript.js.map \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/utils/options/sources/typescript.js.map b/node_modules/typedoc/dist/lib/utils/options/sources/typescript.js.map
index 63d498db8..6c67eefbb 100644
--- a/node_modules/typedoc/dist/lib/utils/options/sources/typescript.js.map
+++ b/node_modules/typedoc/dist/lib/utils/options/sources/typescript.js.map
@@ -1 +1 @@
-{"version":3,"file":"typescript.js","sourceRoot":"","sources":["../../../../../src/lib/utils/options/sources/typescript.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AACjC,0CAA4C;AAE5C,6CAA0C;AAC1C,sCAA4C;AAC5C,8CAA+F;AAG/F,IAAa,gBAAgB;IAAS,oCAAgB;IAAtD;;IAwEA,CAAC;IA5DG,qCAAU,GAAV;QACI,IAAM,OAAO,GAAG,kBAAgB,CAAC,OAAO,CAAC;QACzC,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC;QAEvB,GAAG,CAAC,CAAoB,UAAsB,EAAtB,KAAA,GAAG,CAAC,kBAAkB,EAAtB,cAAsB,EAAtB,IAAsB;YAAzC,IAAI,WAAW,SAAA;YAChB,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;gBAC3C,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;YAClC,CAAC;SACJ;IACL,CAAC;IAKD,gDAAqB,GAArB;QACI,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC;IAC7B,CAAC;IAEO,sCAAW,GAAnB,UAAoB,MAA6B;QAC7C,IAAM,KAAK,GAAsB;YAC7B,IAAI,EAAO,MAAM,CAAC,IAAI;YACtB,KAAK,EAAM,MAAM,CAAC,SAAS;YAC3B,IAAI,EAAO,MAAM,CAAC,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC,GAAG,GAAG,IAAI;YAC7D,KAAK,EAAM,4BAAc,CAAC,UAAU;YACpC,SAAS,EAAE,IAAI,CAAC,aAAa;SAChC,CAAC;QAEF,MAAM,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;YAClB,KAAK,QAAQ;gBACT,KAAK,CAAC,IAAI,GAAG,2BAAa,CAAC,MAAM,CAAC;gBAClC,KAAK,CAAC;YACV,KAAK,SAAS;gBACV,KAAK,CAAC,IAAI,GAAG,2BAAa,CAAC,OAAO,CAAC;gBACnC,KAAK,CAAC;YACV,KAAK,QAAQ;gBACT,KAAK,CAAC,IAAI,GAAG,2BAAa,CAAC,MAAM,CAAC;gBAClC,KAAK,CAAC;YACV,KAAK,MAAM;gBACP,KAAK,CAAC,IAAI,GAAG,2BAAa,CAAC,KAAK,CAAC;gBACjC,KAAK,CAAC;YACV;gBACI,KAAK,CAAC,IAAI,GAAG,2BAAa,CAAC,GAAG,CAAC;gBAC/B,KAAK,CAAC,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC;gBACxB,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;oBAClB,IAAM,KAAK,GAAG,GAAG,CAAC,wBAAwB,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;oBAC5D,KAAK,CAAC,QAAQ,GAAG,EAAE,CAAC,4BAA4B,CAAC,KAAK,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;gBAC9E,CAAC;QACT,CAAC;QAED,MAAM,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;YACvB,KAAK,GAAG,CAAC,WAAW,CAAC,IAAI;gBACrB,KAAK,CAAC,IAAI,GAAG,2BAAa,CAAC,IAAI,CAAC;gBAChC,KAAK,CAAC;YACV,KAAK,GAAG,CAAC,WAAW,CAAC,SAAS;gBAC1B,KAAK,CAAC,IAAI,GAAG,2BAAa,CAAC,SAAS,CAAC;gBACrC,KAAK,CAAC;QACd,CAAC;QAED,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAClC,CAAC;IACL,uBAAC;AAAD,CAAC,AAxED,CAAsC,0BAAgB,GAwErD;AAlEU,wBAAO,GAAa;IACvB,KAAK,EAAE,SAAS,EAAE,MAAM;IACxB,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,SAAS;IACnD,WAAW,EAAE,eAAe,EAAE,gBAAgB;CACjD,CAAC;AAVO,gBAAgB;IAD5B,qBAAS,CAAC,EAAC,IAAI,EAAE,oBAAoB,EAAC,CAAC;GAC3B,gBAAgB,CAwE5B;AAxEY,4CAAgB","sourcesContent":["import * as ts from 'typescript';\nimport * as _ts from '../../../ts-internal';\n\nimport {Component} from '../../component';\nimport {OptionsComponent} from '../options';\nimport {DeclarationOption, ParameterScope, ParameterType, ParameterHint} from '../declaration';\n\n@Component({name: 'options:typescript'})\nexport class TypeScriptSource extends OptionsComponent {\n private declarations: DeclarationOption[];\n\n /**\n * A list of all TypeScript parameters that should be ignored.\n */\n static IGNORED: string[] = [\n 'out', 'version', 'help',\n 'watch', 'declaration', 'declarationDir', 'mapRoot',\n 'sourceMap', 'inlineSources', 'removeComments'\n ];\n\n initialize() {\n const ignored = TypeScriptSource.IGNORED;\n this.declarations = [];\n\n for (let declaration of _ts.optionDeclarations) {\n if (ignored.indexOf(declaration.name) === -1) {\n this.addTSOption(declaration);\n }\n }\n }\n\n /**\n * Return all option declarations emitted by this component.\n */\n getOptionDeclarations(): DeclarationOption[] {\n return this.declarations;\n }\n\n private addTSOption(option: _ts.CommandLineOption) {\n const param: DeclarationOption = {\n name: option.name,\n short: option.shortName,\n help: option.description ? option.description.key : null,\n scope: ParameterScope.TypeScript,\n component: this.componentName\n };\n\n switch (option.type) {\n case 'number':\n param.type = ParameterType.Number;\n break;\n case 'boolean':\n param.type = ParameterType.Boolean;\n break;\n case 'string':\n param.type = ParameterType.String;\n break;\n case 'list':\n param.type = ParameterType.Array;\n break;\n default:\n param.type = ParameterType.Map;\n param.map = option.type;\n if (option['error']) {\n const error = _ts.createCompilerDiagnostic(option['error']);\n param.mapError = ts.flattenDiagnosticMessageText(error.messageText, ', ');\n }\n }\n\n switch (option.paramType) {\n case _ts.Diagnostics.FILE:\n param.hint = ParameterHint.File;\n break;\n case _ts.Diagnostics.DIRECTORY:\n param.hint = ParameterHint.Directory;\n break;\n }\n\n this.declarations.push(param);\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"typescript.js","sourceRoot":"","sources":["../../../../../src/lib/utils/options/sources/typescript.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AACjC,0CAA4C;AAE5C,6CAA4C;AAC5C,sCAA8C;AAC9C,8CAAiG;AAGjG;IAAsC,oCAAgB;IAAtD;;IAwEA,CAAC;yBAxEY,gBAAgB;IAYzB,qCAAU,GAAV;QACI,IAAM,OAAO,GAAG,kBAAgB,CAAC,OAAO,CAAC;QACzC,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC;QAEvB,GAAG,CAAC,CAAoB,UAAsB,EAAtB,KAAA,GAAG,CAAC,kBAAkB,EAAtB,cAAsB,EAAtB,IAAsB;YAAzC,IAAI,WAAW,SAAA;YAChB,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;gBAC3C,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;YAClC,CAAC;SACJ;IACL,CAAC;IAKD,gDAAqB,GAArB;QACI,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC;IAC7B,CAAC;IAEO,sCAAW,GAAnB,UAAoB,MAA6B;QAC7C,IAAM,KAAK,GAAsB;YAC7B,IAAI,EAAO,MAAM,CAAC,IAAI;YACtB,KAAK,EAAM,MAAM,CAAC,SAAS;YAC3B,IAAI,EAAO,MAAM,CAAC,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC,GAAG,GAAG,IAAI;YAC7D,KAAK,EAAM,4BAAc,CAAC,UAAU;YACpC,SAAS,EAAE,IAAI,CAAC,aAAa;SAChC,CAAC;QAEF,MAAM,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;YAClB,KAAK,QAAQ;gBACT,KAAK,CAAC,IAAI,GAAG,2BAAa,CAAC,MAAM,CAAC;gBAClC,KAAK,CAAC;YACV,KAAK,SAAS;gBACV,KAAK,CAAC,IAAI,GAAG,2BAAa,CAAC,OAAO,CAAC;gBACnC,KAAK,CAAC;YACV,KAAK,QAAQ;gBACT,KAAK,CAAC,IAAI,GAAG,2BAAa,CAAC,MAAM,CAAC;gBAClC,KAAK,CAAC;YACV,KAAK,MAAM;gBACP,KAAK,CAAC,IAAI,GAAG,2BAAa,CAAC,KAAK,CAAC;gBACjC,KAAK,CAAC;YACV;gBACI,KAAK,CAAC,IAAI,GAAG,2BAAa,CAAC,GAAG,CAAC;gBAC/B,KAAK,CAAC,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC;gBACxB,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;oBAClB,IAAM,KAAK,GAAG,GAAG,CAAC,wBAAwB,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;oBAC5D,KAAK,CAAC,QAAQ,GAAG,EAAE,CAAC,4BAA4B,CAAC,KAAK,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;gBAC9E,CAAC;QACT,CAAC;QAED,MAAM,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;YACvB,KAAK,GAAG,CAAC,WAAW,CAAC,IAAI;gBACrB,KAAK,CAAC,IAAI,GAAG,2BAAa,CAAC,IAAI,CAAC;gBAChC,KAAK,CAAC;YACV,KAAK,GAAG,CAAC,WAAW,CAAC,SAAS;gBAC1B,KAAK,CAAC,IAAI,GAAG,2BAAa,CAAC,SAAS,CAAC;gBACrC,KAAK,CAAC;QACd,CAAC;QAED,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAClC,CAAC;IAjEM,wBAAO,GAAa;QACvB,KAAK,EAAE,SAAS,EAAE,MAAM;QACxB,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,SAAS;QACnD,WAAW,EAAE,eAAe,EAAE,gBAAgB;KACjD,CAAC;IAVO,gBAAgB;QAD5B,qBAAS,CAAC,EAAC,IAAI,EAAE,oBAAoB,EAAC,CAAC;OAC3B,gBAAgB,CAwE5B;IAAD,uBAAC;;CAAA,AAxED,CAAsC,0BAAgB,GAwErD;AAxEY,4CAAgB","sourcesContent":["import * as ts from 'typescript';\nimport * as _ts from '../../../ts-internal';\n\nimport { Component } from '../../component';\nimport { OptionsComponent } from '../options';\nimport { DeclarationOption, ParameterScope, ParameterType, ParameterHint } from '../declaration';\n\n@Component({name: 'options:typescript'})\nexport class TypeScriptSource extends OptionsComponent {\n private declarations: DeclarationOption[];\n\n /**\n * A list of all TypeScript parameters that should be ignored.\n */\n static IGNORED: string[] = [\n 'out', 'version', 'help',\n 'watch', 'declaration', 'declarationDir', 'mapRoot',\n 'sourceMap', 'inlineSources', 'removeComments'\n ];\n\n initialize() {\n const ignored = TypeScriptSource.IGNORED;\n this.declarations = [];\n\n for (let declaration of _ts.optionDeclarations) {\n if (ignored.indexOf(declaration.name) === -1) {\n this.addTSOption(declaration);\n }\n }\n }\n\n /**\n * Return all option declarations emitted by this component.\n */\n getOptionDeclarations(): DeclarationOption[] {\n return this.declarations;\n }\n\n private addTSOption(option: _ts.CommandLineOption) {\n const param: DeclarationOption = {\n name: option.name,\n short: option.shortName,\n help: option.description ? option.description.key : null,\n scope: ParameterScope.TypeScript,\n component: this.componentName\n };\n\n switch (option.type) {\n case 'number':\n param.type = ParameterType.Number;\n break;\n case 'boolean':\n param.type = ParameterType.Boolean;\n break;\n case 'string':\n param.type = ParameterType.String;\n break;\n case 'list':\n param.type = ParameterType.Array;\n break;\n default:\n param.type = ParameterType.Map;\n param.map = option.type;\n if (option['error']) {\n const error = _ts.createCompilerDiagnostic(option['error']);\n param.mapError = ts.flattenDiagnosticMessageText(error.messageText, ', ');\n }\n }\n\n switch (option.paramType) {\n case _ts.Diagnostics.FILE:\n param.hint = ParameterHint.File;\n break;\n case _ts.Diagnostics.DIRECTORY:\n param.hint = ParameterHint.Directory;\n break;\n }\n\n this.declarations.push(param);\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/utils/plugins.js b/node_modules/typedoc/dist/lib/utils/plugins.js
index 41250e540..4d0e99b0c 100644
--- a/node_modules/typedoc/dist/lib/utils/plugins.js
+++ b/node_modules/typedoc/dist/lib/utils/plugins.js
@@ -110,18 +110,18 @@ var PluginHost = (function (_super) {
return false;
}
};
+ __decorate([
+ component_1.Option({
+ name: 'plugin',
+ help: 'Specify the npm plugins that should be loaded. Omit to load all installed plugins, set to \'none\' to load no plugins.',
+ type: declaration_1.ParameterType.String,
+ isArray: true
+ })
+ ], PluginHost.prototype, "plugins", void 0);
+ PluginHost = __decorate([
+ component_1.Component({ name: 'plugin-host', internal: true })
+ ], PluginHost);
return PluginHost;
}(component_1.AbstractComponent));
-__decorate([
- component_1.Option({
- name: 'plugin',
- help: 'Specify the npm plugins that should be loaded. Omit to load all installed plugins, set to \'none\' to load no plugins.',
- type: declaration_1.ParameterType.String,
- isArray: true
- })
-], PluginHost.prototype, "plugins", void 0);
-PluginHost = __decorate([
- component_1.Component({ name: 'plugin-host', internal: true })
-], PluginHost);
exports.PluginHost = PluginHost;
//# sourceMappingURL=plugins.js.map \ No newline at end of file
diff --git a/node_modules/typedoc/dist/lib/utils/plugins.js.map b/node_modules/typedoc/dist/lib/utils/plugins.js.map
index 835106b21..f1db89114 100644
--- a/node_modules/typedoc/dist/lib/utils/plugins.js.map
+++ b/node_modules/typedoc/dist/lib/utils/plugins.js.map
@@ -1 +1 @@
-{"version":3,"file":"plugins.js","sourceRoot":"","sources":["../../../src/lib/utils/plugins.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,uBAAyB;AACzB,2BAA6B;AAC7B,2BAA6B;AAG7B,yCAAiE;AACjE,qDAAoD;AAGpD,IAAa,UAAU;IAAS,8BAA8B;IAA9D;;IA4HA,CAAC;IA5GG,yBAAI,GAAJ;QACI,IAAM,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC;QACvC,IAAM,OAAO,GAAG,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,kBAAkB,EAAE,CAAC;QAE1D,IAAI,CAAS,EAAE,CAAC,GAAW,OAAO,CAAC,MAAM,CAAC;QAC1C,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;YACrB,IAAM,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;YAC1B,EAAE,CAAC,CAAC,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC;gBAC7B,MAAM,CAAC,KAAK,CAAC,mBAAmB,EAAE,MAAM,CAAC,CAAC;gBAC1C,MAAM,CAAC,KAAK,CAAC;YACjB,CAAC;YAAC,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,WAAW,EAAE,KAAK,MAAM,CAAC,CAAC,CAAC;gBACzC,MAAM,CAAC,IAAI,CAAC;YAChB,CAAC;QACL,CAAC;QAED,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;YACrB,IAAM,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;YAC1B,IAAI,CAAC;gBACD,IAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;gBACjC,EAAE,CAAC,CAAC,OAAO,QAAQ,KAAK,UAAU,CAAC,CAAC,CAAC;oBACjC,QAAQ,CAAC,IAAI,CAAC,CAAC;oBACf,MAAM,CAAC,KAAK,CAAC,kBAAkB,EAAE,MAAM,CAAC,CAAC;gBAC7C,CAAC;gBAAC,IAAI,CAAC,CAAC;oBACJ,MAAM,CAAC,KAAK,CAAC,0CAA0C,EAAE,MAAM,CAAC,CAAC;gBACrE,CAAC;YACL,CAAC;YAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;gBACb,MAAM,CAAC,KAAK,CAAC,oCAAoC,EAAE,MAAM,CAAC,CAAC;gBAC3D,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YAChC,CAAC;QACL,CAAC;IACL,CAAC;IAOO,uCAAkB,GAA1B;QACI,IAAM,MAAM,GAAa,EAAE,CAAC;QAC5B,IAAM,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC;QACvC,QAAQ,EAAE,CAAC;QACX,MAAM,CAAC,MAAM,CAAC;QAKd;YACI,IAAI,IAAI,GAAG,OAAO,CAAC,GAAG,EAAE,EAAE,QAAgB,CAAC;YAC3C,GAAG,CAAC;gBACA,IAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC;gBAChD,EAAE,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;oBAChE,eAAe,CAAC,OAAO,CAAC,CAAC;gBAC7B,CAAC;gBAED,QAAQ,GAAG,IAAI,CAAC;gBAChB,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC;YACnD,CAAC,QAAQ,QAAQ,KAAK,IAAI,EAAE;QAChC,CAAC;QAKD,yBAAyB,QAAgB;YACrC,EAAE,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,UAAC,IAAI;gBAClC,IAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;gBACtC,IAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC;gBAChD,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;oBAC3B,MAAM,CAAC;gBACX,CAAC;gBAED,IAAM,IAAI,GAAG,eAAe,CAAC,QAAQ,CAAC,CAAC;gBACvC,EAAE,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;oBACjB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBACtB,CAAC;YACL,CAAC,CAAC,CAAC;QACP,CAAC;QAKD,yBAAyB,QAAgB;YACrC,IAAI,CAAC;gBACD,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,EAAC,QAAQ,EAAE,OAAO,EAAC,CAAC,CAAC,CAAC;YACtE,CAAC;YAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;gBACb,MAAM,CAAC,KAAK,CAAC,oBAAoB,EAAE,QAAQ,CAAC,CAAC;gBAC7C,MAAM,CAAC,EAAE,CAAC;YACd,CAAC;QACL,CAAC;QAKD,kBAAkB,IAAS;YACvB,IAAM,QAAQ,GAAa,IAAI,CAAC,QAAQ,CAAC;YACzC,EAAE,CAAC,CAAC,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;gBACvC,MAAM,CAAC,KAAK,CAAC;YACjB,CAAC;YAED,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;gBAC9C,IAAM,OAAO,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;gBAC5B,EAAE,CAAC,CAAC,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,CAAC,WAAW,EAAE,KAAK,eAAe,CAAC,CAAC,CAAC;oBAC3E,MAAM,CAAC,IAAI,CAAC;gBAChB,CAAC;YACL,CAAC;YAED,MAAM,CAAC,KAAK,CAAC;QACjB,CAAC;IACL,CAAC;IACL,iBAAC;AAAD,CAAC,AA5HD,CAAgC,6BAAiB,GA4HhD;AArHG;IANC,kBAAM,CAAC;QACJ,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,wHAAwH;QAC9H,IAAI,EAAE,2BAAa,CAAC,MAAM;QAC1B,OAAO,EAAE,IAAI;KAChB,CAAC;2CACgB;AAPT,UAAU;IADtB,qBAAS,CAAC,EAAC,IAAI,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAC,CAAC;GACpC,UAAU,CA4HtB;AA5HY,gCAAU","sourcesContent":["import * as FS from 'fs';\nimport * as Path from 'path';\nimport * as Util from 'util';\n\nimport {Application} from '../application';\nimport {AbstractComponent, Component, Option} from './component';\nimport {ParameterType} from './options/declaration';\n\n@Component({name: 'plugin-host', internal: true})\nexport class PluginHost extends AbstractComponent<Application> {\n @Option({\n name: 'plugin',\n help: 'Specify the npm plugins that should be loaded. Omit to load all installed plugins, set to \\'none\\' to load no plugins.',\n type: ParameterType.String,\n isArray: true\n })\n plugins: string[];\n\n /**\n * Load the given list of npm plugins.\n *\n * @param plugins A list of npm modules that should be loaded as plugins. When not specified\n * this function will invoke [[discoverNpmPlugins]] to find a list of all installed plugins.\n * @returns TRUE on success, otherwise FALSE.\n */\n load(): boolean {\n const logger = this.application.logger;\n const plugins = this.plugins || this.discoverNpmPlugins();\n\n let i: number, c: number = plugins.length;\n for (i = 0; i < c; i++) {\n const plugin = plugins[i];\n if (typeof plugin !== 'string') {\n logger.error('Unknown plugin %s', plugin);\n return false;\n } else if (plugin.toLowerCase() === 'none') {\n return true;\n }\n }\n\n for (i = 0; i < c; i++) {\n const plugin = plugins[i];\n try {\n const instance = require(plugin);\n if (typeof instance === 'function') {\n instance(this);\n logger.write('Loaded plugin %s', plugin);\n } else {\n logger.error('The plugin %s did not return a function.', plugin);\n }\n } catch (error) {\n logger.error('The plugin %s could not be loaded.', plugin);\n logger.writeln(error.stack);\n }\n }\n }\n\n /**\n * Discover all installed TypeDoc plugins.\n *\n * @returns A list of all npm module names that are qualified TypeDoc plugins.\n */\n private discoverNpmPlugins(): string[] {\n const result: string[] = [];\n const logger = this.application.logger;\n discover();\n return result;\n\n /**\n * Find all parent folders containing a `node_modules` subdirectory.\n */\n function discover() {\n let path = process.cwd(), previous: string;\n do {\n const modules = Path.join(path, 'node_modules');\n if (FS.existsSync(modules) && FS.lstatSync(modules).isDirectory()) {\n discoverModules(modules);\n }\n\n previous = path;\n path = Path.resolve(Path.join(previous, '..'));\n } while (previous !== path);\n }\n\n /**\n * Scan the given `node_modules` directory for TypeDoc plugins.\n */\n function discoverModules(basePath: string) {\n FS.readdirSync(basePath).forEach((name) => {\n const dir = Path.join(basePath, name);\n const infoFile = Path.join(dir, 'package.json');\n if (!FS.existsSync(infoFile)) {\n return;\n }\n\n const info = loadPackageInfo(infoFile);\n if (isPlugin(info)) {\n result.push(name);\n }\n });\n }\n\n /**\n * Load and parse the given `package.json`.\n */\n function loadPackageInfo(fileName: string): any {\n try {\n return JSON.parse(FS.readFileSync(fileName, {encoding: 'utf-8'}));\n } catch (error) {\n logger.error('Could not parse %s', fileName);\n return {};\n }\n }\n\n /**\n * Test whether the given package info describes a TypeDoc plugin.\n */\n function isPlugin(info: any): boolean {\n const keywords: string[] = info.keywords;\n if (!keywords || !Util.isArray(keywords)) {\n return false;\n }\n\n for (let i = 0, c = keywords.length; i < c; i++) {\n const keyword = keywords[i];\n if (typeof keyword === 'string' && keyword.toLowerCase() === 'typedocplugin') {\n return true;\n }\n }\n\n return false;\n }\n }\n}\n"]} \ No newline at end of file
+{"version":3,"file":"plugins.js","sourceRoot":"","sources":["../../../src/lib/utils/plugins.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,uBAAyB;AACzB,2BAA6B;AAC7B,2BAA6B;AAG7B,yCAAmE;AACnE,qDAAsD;AAGtD;IAAgC,8BAA8B;IAA9D;;IA4HA,CAAC;IA5GG,yBAAI,GAAJ;QACI,IAAM,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC;QACvC,IAAM,OAAO,GAAG,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,kBAAkB,EAAE,CAAC;QAE1D,IAAI,CAAS,EAAE,CAAC,GAAW,OAAO,CAAC,MAAM,CAAC;QAC1C,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;YACrB,IAAM,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;YAC1B,EAAE,CAAC,CAAC,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC;gBAC7B,MAAM,CAAC,KAAK,CAAC,mBAAmB,EAAE,MAAM,CAAC,CAAC;gBAC1C,MAAM,CAAC,KAAK,CAAC;YACjB,CAAC;YAAC,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,WAAW,EAAE,KAAK,MAAM,CAAC,CAAC,CAAC;gBACzC,MAAM,CAAC,IAAI,CAAC;YAChB,CAAC;QACL,CAAC;QAED,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;YACrB,IAAM,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;YAC1B,IAAI,CAAC;gBACD,IAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;gBACjC,EAAE,CAAC,CAAC,OAAO,QAAQ,KAAK,UAAU,CAAC,CAAC,CAAC;oBACjC,QAAQ,CAAC,IAAI,CAAC,CAAC;oBACf,MAAM,CAAC,KAAK,CAAC,kBAAkB,EAAE,MAAM,CAAC,CAAC;gBAC7C,CAAC;gBAAC,IAAI,CAAC,CAAC;oBACJ,MAAM,CAAC,KAAK,CAAC,0CAA0C,EAAE,MAAM,CAAC,CAAC;gBACrE,CAAC;YACL,CAAC;YAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;gBACb,MAAM,CAAC,KAAK,CAAC,oCAAoC,EAAE,MAAM,CAAC,CAAC;gBAC3D,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YAChC,CAAC;QACL,CAAC;IACL,CAAC;IAOO,uCAAkB,GAA1B;QACI,IAAM,MAAM,GAAa,EAAE,CAAC;QAC5B,IAAM,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC;QACvC,QAAQ,EAAE,CAAC;QACX,MAAM,CAAC,MAAM,CAAC;QAKd;YACI,IAAI,IAAI,GAAG,OAAO,CAAC,GAAG,EAAE,EAAE,QAAgB,CAAC;YAC3C,GAAG,CAAC;gBACA,IAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC;gBAChD,EAAE,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;oBAChE,eAAe,CAAC,OAAO,CAAC,CAAC;gBAC7B,CAAC;gBAED,QAAQ,GAAG,IAAI,CAAC;gBAChB,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC;YACnD,CAAC,QAAQ,QAAQ,KAAK,IAAI,EAAE;QAChC,CAAC;QAKD,yBAAyB,QAAgB;YACrC,EAAE,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,UAAC,IAAI;gBAClC,IAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;gBACtC,IAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC;gBAChD,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;oBAC3B,MAAM,CAAC;gBACX,CAAC;gBAED,IAAM,IAAI,GAAG,eAAe,CAAC,QAAQ,CAAC,CAAC;gBACvC,EAAE,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;oBACjB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBACtB,CAAC;YACL,CAAC,CAAC,CAAC;QACP,CAAC;QAKD,yBAAyB,QAAgB;YACrC,IAAI,CAAC;gBACD,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,EAAC,QAAQ,EAAE,OAAO,EAAC,CAAC,CAAC,CAAC;YACtE,CAAC;YAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;gBACb,MAAM,CAAC,KAAK,CAAC,oBAAoB,EAAE,QAAQ,CAAC,CAAC;gBAC7C,MAAM,CAAC,EAAE,CAAC;YACd,CAAC;QACL,CAAC;QAKD,kBAAkB,IAAS;YACvB,IAAM,QAAQ,GAAa,IAAI,CAAC,QAAQ,CAAC;YACzC,EAAE,CAAC,CAAC,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;gBACvC,MAAM,CAAC,KAAK,CAAC;YACjB,CAAC;YAED,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;gBAC9C,IAAM,OAAO,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;gBAC5B,EAAE,CAAC,CAAC,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,CAAC,WAAW,EAAE,KAAK,eAAe,CAAC,CAAC,CAAC;oBAC3E,MAAM,CAAC,IAAI,CAAC;gBAChB,CAAC;YACL,CAAC;YAED,MAAM,CAAC,KAAK,CAAC;QACjB,CAAC;IACL,CAAC;IApHD;QANC,kBAAM,CAAC;YACJ,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,wHAAwH;YAC9H,IAAI,EAAE,2BAAa,CAAC,MAAM;YAC1B,OAAO,EAAE,IAAI;SAChB,CAAC;+CACgB;IAPT,UAAU;QADtB,qBAAS,CAAC,EAAC,IAAI,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAC,CAAC;OACpC,UAAU,CA4HtB;IAAD,iBAAC;CAAA,AA5HD,CAAgC,6BAAiB,GA4HhD;AA5HY,gCAAU","sourcesContent":["import * as FS from 'fs';\nimport * as Path from 'path';\nimport * as Util from 'util';\n\nimport { Application } from '../application';\nimport { AbstractComponent, Component, Option } from './component';\nimport { ParameterType } from './options/declaration';\n\n@Component({name: 'plugin-host', internal: true})\nexport class PluginHost extends AbstractComponent<Application> {\n @Option({\n name: 'plugin',\n help: 'Specify the npm plugins that should be loaded. Omit to load all installed plugins, set to \\'none\\' to load no plugins.',\n type: ParameterType.String,\n isArray: true\n })\n plugins: string[];\n\n /**\n * Load the given list of npm plugins.\n *\n * @param plugins A list of npm modules that should be loaded as plugins. When not specified\n * this function will invoke [[discoverNpmPlugins]] to find a list of all installed plugins.\n * @returns TRUE on success, otherwise FALSE.\n */\n load(): boolean {\n const logger = this.application.logger;\n const plugins = this.plugins || this.discoverNpmPlugins();\n\n let i: number, c: number = plugins.length;\n for (i = 0; i < c; i++) {\n const plugin = plugins[i];\n if (typeof plugin !== 'string') {\n logger.error('Unknown plugin %s', plugin);\n return false;\n } else if (plugin.toLowerCase() === 'none') {\n return true;\n }\n }\n\n for (i = 0; i < c; i++) {\n const plugin = plugins[i];\n try {\n const instance = require(plugin);\n if (typeof instance === 'function') {\n instance(this);\n logger.write('Loaded plugin %s', plugin);\n } else {\n logger.error('The plugin %s did not return a function.', plugin);\n }\n } catch (error) {\n logger.error('The plugin %s could not be loaded.', plugin);\n logger.writeln(error.stack);\n }\n }\n }\n\n /**\n * Discover all installed TypeDoc plugins.\n *\n * @returns A list of all npm module names that are qualified TypeDoc plugins.\n */\n private discoverNpmPlugins(): string[] {\n const result: string[] = [];\n const logger = this.application.logger;\n discover();\n return result;\n\n /**\n * Find all parent folders containing a `node_modules` subdirectory.\n */\n function discover() {\n let path = process.cwd(), previous: string;\n do {\n const modules = Path.join(path, 'node_modules');\n if (FS.existsSync(modules) && FS.lstatSync(modules).isDirectory()) {\n discoverModules(modules);\n }\n\n previous = path;\n path = Path.resolve(Path.join(previous, '..'));\n } while (previous !== path);\n }\n\n /**\n * Scan the given `node_modules` directory for TypeDoc plugins.\n */\n function discoverModules(basePath: string) {\n FS.readdirSync(basePath).forEach((name) => {\n const dir = Path.join(basePath, name);\n const infoFile = Path.join(dir, 'package.json');\n if (!FS.existsSync(infoFile)) {\n return;\n }\n\n const info = loadPackageInfo(infoFile);\n if (isPlugin(info)) {\n result.push(name);\n }\n });\n }\n\n /**\n * Load and parse the given `package.json`.\n */\n function loadPackageInfo(fileName: string): any {\n try {\n return JSON.parse(FS.readFileSync(fileName, {encoding: 'utf-8'}));\n } catch (error) {\n logger.error('Could not parse %s', fileName);\n return {};\n }\n }\n\n /**\n * Test whether the given package info describes a TypeDoc plugin.\n */\n function isPlugin(info: any): boolean {\n const keywords: string[] = info.keywords;\n if (!keywords || !Util.isArray(keywords)) {\n return false;\n }\n\n for (let i = 0, c = keywords.length; i < c; i++) {\n const keyword = keywords[i];\n if (typeof keyword === 'string' && keyword.toLowerCase() === 'typedocplugin') {\n return true;\n }\n }\n\n return false;\n }\n }\n}\n"]} \ No newline at end of file
diff --git a/node_modules/typedoc/node_modules/typescript/.mailmap b/node_modules/typedoc/node_modules/typescript/.mailmap
index 73ebed0cc..97941bcdf 100644
--- a/node_modules/typedoc/node_modules/typescript/.mailmap
+++ b/node_modules/typedoc/node_modules/typescript/.mailmap
@@ -248,4 +248,23 @@ 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
+e-cloud <saintscott119@gmail.com> # @e-cloud
+Andrew Casey <amcasey@users.noreply.github.com> Andrew Casey <andrew.casey@microsoft.com>
+Andrew Stegmaier <andrew.stegmaier@gmail.com>
+Benny Neugebauer <bn@bennyn.de>
+Blaine Bublitz <blaine.bublitz@gmail.com>
+Charles Pierce <cpierce.grad@gmail.com>
+Daniel Król <daniel@krol.me>
+Diogo Franco (Kovensky) <diogomfranco@gmail.com>
+Donald Pipowitch <pipo@senaeh.de>
+Halasi Tamás <trusted.tomato@gmail.com>
+Ika <ikatyang@gmail.com>
+Joe Chung <joechung@microsoft.com>
+Kate Miháliková <kate@katemihalikova.cz>
+Mohsen Azimi <mazimi@lyft.com>
+Noel Varanda <ncwvaranda@gmail.com>
+Reiner Dolp <reiner-dolp@users.noreply.github.com>
+t_ <t-mrt@users.noreply.github.com> # @t_
+TravCav <xurrux@gmail.com> # @TravCav
+Vladimir Kurchatkin <vladimir.kurchatkin@gmail.com>
+William Orr <will@worrbase.com> \ No newline at end of file
diff --git a/node_modules/typedoc/node_modules/typescript/AUTHORS.md b/node_modules/typedoc/node_modules/typescript/AUTHORS.md
index 4772d5371..824c696ce 100644
--- a/node_modules/typedoc/node_modules/typescript/AUTHORS.md
+++ b/node_modules/typedoc/node_modules/typescript/AUTHORS.md
@@ -15,7 +15,9 @@ TypeScript is authored by:
* Anders Hejlsberg
* Andreas Martin
* Andrej Baran
+* Andrew Casey
* Andrew Ochsner
+* Andrew Stegmaier
* Andrew Z Allen
* András Parditka
* Andy Hanson
@@ -31,7 +33,9 @@ TypeScript is authored by:
* Ben Duffield
* Ben Mosher
* Benjamin Bock
+* Benny Neugebauer
* Bill Ticehurst
+* Blaine Bublitz
* Blake Embrey
* @bootstraponline
* Bowden Kelly
@@ -39,6 +43,7 @@ TypeScript is authored by:
* Bryan Forbes
* Caitlin Potter
* @cedvdb
+* Charles Pierce
* Charly POLY
* Chris Bubernak
* Christophe Vidal
@@ -52,6 +57,7 @@ TypeScript is authored by:
* Dan Corder
* Dan Quirk
* Daniel Hollocher
+* Daniel Król
* Daniel Lehenbauer
* Daniel Rosenwasser
* David Kmenta
@@ -60,9 +66,11 @@ TypeScript is authored by:
* David Souther
* Denis Nedelyaev
* Dick van den Brink
+* Diogo Franco (Kovensky)
* Dirk Bäumer
* Dirk Holtwick
* Dom Chen
+* Donald Pipowitch
* Doug Ilijev
* @e-cloud
* Elisée Maurer
@@ -89,12 +97,14 @@ TypeScript is authored by:
* Guilherme Oenning
* Guillaume Salles
* Guy Bedford
+* Halasi Tamás
* Harald Niesche
* Hendrik Liebau
* Herrington Darkholme
* Homa Wong
* Iain Monro
* Igor Novozhilov
+* Ika
* Ingvar Stepanyan
* Isiah Meadows
* Ivo Gabe de Wolff
@@ -111,6 +121,7 @@ TypeScript is authored by:
* Jeffrey Morlan
* Jesse Schalken
* Jiri Tobisek
+* Joe Chung
* Joel Day
* Joey Wilson
* Johannes Rieken
@@ -131,6 +142,7 @@ TypeScript is authored by:
* K. Preißer
* Kagami Sascha Rosylight
* Kanchalai Tanglertsampan
+* Kate Miháliková
* Keith Mashinter
* Ken Howard
* Kenji Imamula
@@ -159,6 +171,7 @@ TypeScript is authored by:
* Mike Busyrev
* Mine Starks
* Mohamed Hegazy
+* Mohsen Azimi
* Myles Megyesi
* Natalie Coley
* Nathan Shively-Sanders
@@ -166,6 +179,7 @@ TypeScript is authored by:
* Nicolas Henry
* Nima Zahedi
* Noah Chen
+* Noel Varanda
* Noj Vek
* Oleg Mihailik
* Oleksandr Chekhovskyi
@@ -186,6 +200,7 @@ TypeScript is authored by:
* Punya Biswal
* Rado Kirov
* Raj Dosanjh
+* Reiner Dolp
* Richard Karmazín
* Richard Knoll
* Richard Sentino
@@ -213,6 +228,7 @@ TypeScript is authored by:
* Sudheesh Singanamalla
* Sébastien Arod
* @T18970237136
+* @t_
* Tarik Ozket
* Tetsuharu Ohzeki
* Thomas Loubiou
@@ -225,13 +241,16 @@ TypeScript is authored by:
* togru
* Tomas Grubliauskas
* Torben Fitschen
+* @TravCav
* TruongSinh Tran-Nguyen
* Vadi Taslim
* Vidar Tonaas Fauske
* Viktor Zozulyak
* Vilic Vane
+* Vladimir Kurchatkin
* Vladimir Matveev
* Wesley Wigham
+* William Orr
* York Yao
* @yortus
* Yuichi Nukiyama
diff --git a/node_modules/typedoc/node_modules/typescript/lib/cancellationToken.js b/node_modules/typedoc/node_modules/typescript/lib/cancellationToken.js
index 0e37b0689..f40321990 100644
--- a/node_modules/typedoc/node_modules/typescript/lib/cancellationToken.js
+++ b/node_modules/typedoc/node_modules/typescript/lib/cancellationToken.js
@@ -1,18 +1,18 @@
-/*! *****************************************************************************
-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.
+***************************************************************************** */
+
"use strict";
var fs = require("fs");
function pipeExists(name) {
diff --git a/node_modules/typedoc/node_modules/typescript/lib/lib.d.ts b/node_modules/typedoc/node_modules/typescript/lib/lib.d.ts
index 80e09b844..1a8b1d728 100644
--- a/node_modules/typedoc/node_modules/typescript/lib/lib.d.ts
+++ b/node_modules/typedoc/node_modules/typescript/lib/lib.d.ts
@@ -87,8 +87,8 @@ interface PropertyDescriptor {
enumerable?: boolean;
value?: any;
writable?: boolean;
- get? (): any;
- set? (v: any): void;
+ get?(): any;
+ set?(v: any): void;
}
interface PropertyDescriptorMap {
@@ -128,7 +128,7 @@ interface Object {
}
interface ObjectConstructor {
- new (value?: any): Object;
+ new(value?: any): Object;
(): any;
(value: any): any;
@@ -286,7 +286,7 @@ interface FunctionConstructor {
* Creates a new function.
* @param args A list of arguments the function accepts.
*/
- new (...args: string[]): Function;
+ new(...args: string[]): Function;
(...args: string[]): Function;
readonly prototype: Function;
}
@@ -423,7 +423,7 @@ interface String {
}
interface StringConstructor {
- new (value?: any): String;
+ new(value?: any): String;
(value?: any): string;
readonly prototype: String;
fromCharCode(...codes: number[]): string;
@@ -440,7 +440,7 @@ interface Boolean {
}
interface BooleanConstructor {
- new (value?: any): Boolean;
+ new(value?: any): Boolean;
(value?: any): boolean;
readonly prototype: Boolean;
}
@@ -477,7 +477,7 @@ interface Number {
}
interface NumberConstructor {
- new (value?: any): Number;
+ new(value?: any): Number;
(value?: any): number;
readonly prototype: Number;
@@ -779,10 +779,10 @@ interface Date {
}
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;
+ 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;
/**
@@ -848,8 +848,8 @@ interface RegExp {
}
interface RegExpConstructor {
- new (pattern: RegExp | string): RegExp;
- new (pattern: string, flags?: string): RegExp;
+ new(pattern: RegExp | string): RegExp;
+ new(pattern: string, flags?: string): RegExp;
(pattern: RegExp | string): RegExp;
(pattern: string, flags?: string): RegExp;
readonly prototype: RegExp;
@@ -876,7 +876,7 @@ interface Error {
}
interface ErrorConstructor {
- new (message?: string): Error;
+ new(message?: string): Error;
(message?: string): Error;
readonly prototype: Error;
}
@@ -887,7 +887,7 @@ interface EvalError extends Error {
}
interface EvalErrorConstructor {
- new (message?: string): EvalError;
+ new(message?: string): EvalError;
(message?: string): EvalError;
readonly prototype: EvalError;
}
@@ -898,7 +898,7 @@ interface RangeError extends Error {
}
interface RangeErrorConstructor {
- new (message?: string): RangeError;
+ new(message?: string): RangeError;
(message?: string): RangeError;
readonly prototype: RangeError;
}
@@ -909,7 +909,7 @@ interface ReferenceError extends Error {
}
interface ReferenceErrorConstructor {
- new (message?: string): ReferenceError;
+ new(message?: string): ReferenceError;
(message?: string): ReferenceError;
readonly prototype: ReferenceError;
}
@@ -920,7 +920,7 @@ interface SyntaxError extends Error {
}
interface SyntaxErrorConstructor {
- new (message?: string): SyntaxError;
+ new(message?: string): SyntaxError;
(message?: string): SyntaxError;
readonly prototype: SyntaxError;
}
@@ -931,7 +931,7 @@ interface TypeError extends Error {
}
interface TypeErrorConstructor {
- new (message?: string): TypeError;
+ new(message?: string): TypeError;
(message?: string): TypeError;
readonly prototype: TypeError;
}
@@ -942,7 +942,7 @@ interface URIError extends Error {
}
interface URIErrorConstructor {
- new (message?: string): URIError;
+ new(message?: string): URIError;
(message?: string): URIError;
readonly prototype: URIError;
}
@@ -992,12 +992,10 @@ interface ReadonlyArray<T> {
* 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.
+ * Returns a string representation of an array. The elements are converted to string using thier toLocalString methods.
*/
- concat<U extends ReadonlyArray<T>>(...items: U[]): T[];
+ toLocaleString(): string;
/**
* Combines two or more arrays.
* @param items Additional items to add to the end of array1.
@@ -1025,7 +1023,6 @@ interface ReadonlyArray<T> {
* @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.
@@ -1037,49 +1034,37 @@ interface ReadonlyArray<T> {
* @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;
+ 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: (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;
+ 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: (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;
+ 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: (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[];
+ 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: (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[];
+ 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: (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[];
+ 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.
@@ -1117,6 +1102,9 @@ interface Array<T> {
* Returns a string representation of an array.
*/
toString(): string;
+ /**
+ * Returns a string representation of an array. The elements are converted to string using thier toLocalString methods.
+ */
toLocaleString(): string;
/**
* Appends new elements to an array, and returns the new length of the array.
@@ -1196,73 +1184,37 @@ interface Array<T> {
* @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;
+ 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: (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;
+ 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: (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];
+ 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], 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];
+ map<U>(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): 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<S extends T>(callbackfn: (value: T, index: number, array: 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: (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[];
+ 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.
@@ -1292,7 +1244,7 @@ interface Array<T> {
}
interface ArrayConstructor {
- new (arrayLength?: number): any[];
+ new(arrayLength?: number): any[];
new <T>(arrayLength: number): T[];
new <T>(...items: T[]): T[];
(arrayLength?: number): any[];
@@ -1406,9 +1358,17 @@ interface ArrayBuffer {
slice(begin: number, end?: number): ArrayBuffer;
}
+/**
+ * Allowed ArrayBuffer types for the buffer of an ArrayBufferView and related Typed Arrays.
+ */
+interface ArrayBufferTypes {
+ ArrayBuffer: ArrayBuffer;
+}
+type ArrayBufferLike = ArrayBufferTypes[keyof ArrayBufferTypes];
+
interface ArrayBufferConstructor {
readonly prototype: ArrayBuffer;
- new (byteLength: number): ArrayBuffer;
+ new(byteLength: number): ArrayBuffer;
isView(arg: any): arg is ArrayBufferView;
}
declare const ArrayBuffer: ArrayBufferConstructor;
@@ -1417,7 +1377,7 @@ interface ArrayBufferView {
/**
* The ArrayBuffer instance referenced by the array.
*/
- buffer: ArrayBuffer;
+ buffer: ArrayBufferLike;
/**
* The length in bytes of the array.
@@ -1559,7 +1519,7 @@ interface DataView {
}
interface DataViewConstructor {
- new (buffer: ArrayBuffer, byteOffset?: number, byteLength?: number): DataView;
+ new(buffer: ArrayBufferLike, byteOffset?: number, byteLength?: number): DataView;
}
declare const DataView: DataViewConstructor;
@@ -1576,7 +1536,7 @@ interface Int8Array {
/**
* The ArrayBuffer instance referenced by the array.
*/
- readonly buffer: ArrayBuffer;
+ readonly buffer: ArrayBufferLike;
/**
* The length in bytes of the array.
@@ -1607,9 +1567,7 @@ interface Int8Array {
* @param thisArg 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;
+ 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
@@ -1628,9 +1586,7 @@ interface Int8Array {
* @param thisArg 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;
+ 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
@@ -1641,9 +1597,7 @@ interface Int8Array {
* @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;
+ 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
@@ -1654,9 +1608,7 @@ interface Int8Array {
* @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;
+ findIndex(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
/**
* Performs the specified action for each element in an array.
@@ -1665,9 +1617,7 @@ interface Int8Array {
* @param thisArg 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;
+ 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.
@@ -1705,9 +1655,7 @@ interface Int8Array {
* @param thisArg 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;
+ map(callbackfn: (this: void, 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
@@ -1784,9 +1732,7 @@ interface Int8Array {
* @param thisArg 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;
+ some(callbackfn: (value: number, index: number, array: Int8Array) => boolean, thisArg?: any): boolean;
/**
* Sorts an array.
@@ -1817,9 +1763,9 @@ interface Int8Array {
}
interface Int8ArrayConstructor {
readonly prototype: Int8Array;
- new (length: number): Int8Array;
- new (array: ArrayLike<number>): Int8Array;
- new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int8Array;
+ new(length: number): Int8Array;
+ new(array: ArrayLike<number>): Int8Array;
+ new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Int8Array;
/**
* The size in bytes of each element in the array.
@@ -1838,11 +1784,8 @@ interface Int8ArrayConstructor {
* @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>, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array;
- from(arrayLike: ArrayLike<number>): Int8Array;
}
declare const Int8Array: Int8ArrayConstructor;
@@ -1860,7 +1803,7 @@ interface Uint8Array {
/**
* The ArrayBuffer instance referenced by the array.
*/
- readonly buffer: ArrayBuffer;
+ readonly buffer: ArrayBufferLike;
/**
* The length in bytes of the array.
@@ -1891,9 +1834,7 @@ interface Uint8Array {
* @param thisArg 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;
+ 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
@@ -1912,9 +1853,7 @@ interface Uint8Array {
* @param thisArg 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;
+ 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
@@ -1925,9 +1864,7 @@ interface Uint8Array {
* @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;
+ 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
@@ -1938,9 +1875,7 @@ interface Uint8Array {
* @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;
+ findIndex(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
/**
* Performs the specified action for each element in an array.
@@ -1949,9 +1884,7 @@ interface Uint8Array {
* @param thisArg 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;
+ 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.
@@ -1989,9 +1922,7 @@ interface Uint8Array {
* @param thisArg 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;
+ map(callbackfn: (this: void, 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
@@ -2068,9 +1999,7 @@ interface Uint8Array {
* @param thisArg 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;
+ some(callbackfn: (value: number, index: number, array: Uint8Array) => boolean, thisArg?: any): boolean;
/**
* Sorts an array.
@@ -2102,9 +2031,9 @@ interface Uint8Array {
interface Uint8ArrayConstructor {
readonly prototype: Uint8Array;
- new (length: number): Uint8Array;
- new (array: ArrayLike<number>): Uint8Array;
- new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8Array;
+ new(length: number): Uint8Array;
+ new(array: ArrayLike<number>): Uint8Array;
+ new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint8Array;
/**
* The size in bytes of each element in the array.
@@ -2123,11 +2052,7 @@ interface Uint8ArrayConstructor {
* @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;
+ from(arrayLike: ArrayLike<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array;
}
declare const Uint8Array: Uint8ArrayConstructor;
@@ -2145,7 +2070,7 @@ interface Uint8ClampedArray {
/**
* The ArrayBuffer instance referenced by the array.
*/
- readonly buffer: ArrayBuffer;
+ readonly buffer: ArrayBufferLike;
/**
* The length in bytes of the array.
@@ -2176,9 +2101,7 @@ interface Uint8ClampedArray {
* @param thisArg 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;
+ 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
@@ -2197,9 +2120,7 @@ interface Uint8ClampedArray {
* @param thisArg 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;
+ 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
@@ -2210,9 +2131,7 @@ interface Uint8ClampedArray {
* @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;
+ 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
@@ -2223,9 +2142,7 @@ interface Uint8ClampedArray {
* @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;
+ findIndex(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
/**
* Performs the specified action for each element in an array.
@@ -2234,9 +2151,7 @@ interface Uint8ClampedArray {
* @param thisArg 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;
+ 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.
@@ -2274,9 +2189,7 @@ interface Uint8ClampedArray {
* @param thisArg 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;
+ map(callbackfn: (this: void, 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
@@ -2353,9 +2266,7 @@ interface Uint8ClampedArray {
* @param thisArg 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;
+ some(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => boolean, thisArg?: any): boolean;
/**
* Sorts an array.
@@ -2387,9 +2298,9 @@ interface Uint8ClampedArray {
interface Uint8ClampedArrayConstructor {
readonly prototype: Uint8ClampedArray;
- new (length: number): Uint8ClampedArray;
- new (array: ArrayLike<number>): Uint8ClampedArray;
- new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8ClampedArray;
+ new(length: number): Uint8ClampedArray;
+ new(array: ArrayLike<number>): Uint8ClampedArray;
+ new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint8ClampedArray;
/**
* The size in bytes of each element in the array.
@@ -2408,11 +2319,7 @@ interface Uint8ClampedArrayConstructor {
* @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;
+ from(arrayLike: ArrayLike<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray;
}
declare const Uint8ClampedArray: Uint8ClampedArrayConstructor;
@@ -2429,7 +2336,7 @@ interface Int16Array {
/**
* The ArrayBuffer instance referenced by the array.
*/
- readonly buffer: ArrayBuffer;
+ readonly buffer: ArrayBufferLike;
/**
* The length in bytes of the array.
@@ -2460,9 +2367,7 @@ interface Int16Array {
* @param thisArg 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;
+ 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
@@ -2481,9 +2386,7 @@ interface Int16Array {
* @param thisArg 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;
+ filter(callbackfn: (this: void, 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
@@ -2494,9 +2397,7 @@ interface Int16Array {
* @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;
+ 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
@@ -2507,9 +2408,7 @@ interface Int16Array {
* @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;
+ findIndex(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
/**
* Performs the specified action for each element in an array.
@@ -2518,10 +2417,7 @@ interface Int16Array {
* @param thisArg 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;
-
+ 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.
@@ -2558,9 +2454,7 @@ interface Int16Array {
* @param thisArg 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;
+ map(callbackfn: (this: void, 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
@@ -2637,9 +2531,7 @@ interface Int16Array {
* @param thisArg 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;
+ some(callbackfn: (value: number, index: number, array: Int16Array) => boolean, thisArg?: any): boolean;
/**
* Sorts an array.
@@ -2671,9 +2563,9 @@ interface Int16Array {
interface Int16ArrayConstructor {
readonly prototype: Int16Array;
- new (length: number): Int16Array;
- new (array: ArrayLike<number>): Int16Array;
- new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int16Array;
+ new(length: number): Int16Array;
+ new(array: ArrayLike<number>): Int16Array;
+ new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Int16Array;
/**
* The size in bytes of each element in the array.
@@ -2692,11 +2584,8 @@ interface Int16ArrayConstructor {
* @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>, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array;
- from(arrayLike: ArrayLike<number>): Int16Array;
}
declare const Int16Array: Int16ArrayConstructor;
@@ -2714,7 +2603,7 @@ interface Uint16Array {
/**
* The ArrayBuffer instance referenced by the array.
*/
- readonly buffer: ArrayBuffer;
+ readonly buffer: ArrayBufferLike;
/**
* The length in bytes of the array.
@@ -2745,9 +2634,7 @@ interface Uint16Array {
* @param thisArg 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;
+ 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
@@ -2766,9 +2653,7 @@ interface Uint16Array {
* @param thisArg 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;
+ 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
@@ -2779,9 +2664,7 @@ interface Uint16Array {
* @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;
+ 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
@@ -2792,9 +2675,7 @@ interface Uint16Array {
* @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;
+ findIndex(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
/**
* Performs the specified action for each element in an array.
@@ -2803,9 +2684,7 @@ interface Uint16Array {
* @param thisArg 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;
+ 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.
@@ -2843,9 +2722,7 @@ interface Uint16Array {
* @param thisArg 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;
+ map(callbackfn: (this: void, 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
@@ -2922,9 +2799,7 @@ interface Uint16Array {
* @param thisArg 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;
+ some(callbackfn: (value: number, index: number, array: Uint16Array) => boolean, thisArg?: any): boolean;
/**
* Sorts an array.
@@ -2956,9 +2831,9 @@ interface Uint16Array {
interface Uint16ArrayConstructor {
readonly prototype: Uint16Array;
- new (length: number): Uint16Array;
- new (array: ArrayLike<number>): Uint16Array;
- new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint16Array;
+ new(length: number): Uint16Array;
+ new(array: ArrayLike<number>): Uint16Array;
+ new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint16Array;
/**
* The size in bytes of each element in the array.
@@ -2977,11 +2852,8 @@ interface Uint16ArrayConstructor {
* @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>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array;
- from(arrayLike: ArrayLike<number>): Uint16Array;
}
declare const Uint16Array: Uint16ArrayConstructor;
@@ -2998,7 +2870,7 @@ interface Int32Array {
/**
* The ArrayBuffer instance referenced by the array.
*/
- readonly buffer: ArrayBuffer;
+ readonly buffer: ArrayBufferLike;
/**
* The length in bytes of the array.
@@ -3029,9 +2901,7 @@ interface Int32Array {
* @param thisArg 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;
+ 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
@@ -3050,9 +2920,7 @@ interface Int32Array {
* @param thisArg 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;
+ 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
@@ -3063,9 +2931,7 @@ interface Int32Array {
* @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;
+ 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
@@ -3076,9 +2942,7 @@ interface Int32Array {
* @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;
+ findIndex(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
/**
* Performs the specified action for each element in an array.
@@ -3087,9 +2951,7 @@ interface Int32Array {
* @param thisArg 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;
+ 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.
@@ -3127,9 +2989,7 @@ interface Int32Array {
* @param thisArg 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;
+ 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
@@ -3206,9 +3066,7 @@ interface Int32Array {
* @param thisArg 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;
+ some(callbackfn: (value: number, index: number, array: Int32Array) => boolean, thisArg?: any): boolean;
/**
* Sorts an array.
@@ -3240,9 +3098,9 @@ interface Int32Array {
interface Int32ArrayConstructor {
readonly prototype: Int32Array;
- new (length: number): Int32Array;
- new (array: ArrayLike<number>): Int32Array;
- new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int32Array;
+ new(length: number): Int32Array;
+ new(array: ArrayLike<number>): Int32Array;
+ new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Int32Array;
/**
* The size in bytes of each element in the array.
@@ -3261,11 +3119,8 @@ interface Int32ArrayConstructor {
* @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>, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array;
- from(arrayLike: ArrayLike<number>): Int32Array;
}
declare const Int32Array: Int32ArrayConstructor;
@@ -3282,7 +3137,7 @@ interface Uint32Array {
/**
* The ArrayBuffer instance referenced by the array.
*/
- readonly buffer: ArrayBuffer;
+ readonly buffer: ArrayBufferLike;
/**
* The length in bytes of the array.
@@ -3313,9 +3168,7 @@ interface Uint32Array {
* @param thisArg 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;
+ 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
@@ -3334,9 +3187,7 @@ interface Uint32Array {
* @param thisArg 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;
+ 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
@@ -3347,9 +3198,7 @@ interface Uint32Array {
* @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;
+ 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
@@ -3360,9 +3209,7 @@ interface Uint32Array {
* @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;
+ findIndex(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
/**
* Performs the specified action for each element in an array.
@@ -3371,10 +3218,7 @@ interface Uint32Array {
* @param thisArg 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;
-
+ 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.
@@ -3411,9 +3255,7 @@ interface Uint32Array {
* @param thisArg 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;
+ map(callbackfn: (this: void, 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
@@ -3490,9 +3332,7 @@ interface Uint32Array {
* @param thisArg 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;
+ some(callbackfn: (value: number, index: number, array: Uint32Array) => boolean, thisArg?: any): boolean;
/**
* Sorts an array.
@@ -3524,9 +3364,9 @@ interface Uint32Array {
interface Uint32ArrayConstructor {
readonly prototype: Uint32Array;
- new (length: number): Uint32Array;
- new (array: ArrayLike<number>): Uint32Array;
- new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint32Array;
+ new(length: number): Uint32Array;
+ new(array: ArrayLike<number>): Uint32Array;
+ new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint32Array;
/**
* The size in bytes of each element in the array.
@@ -3545,11 +3385,8 @@ interface Uint32ArrayConstructor {
* @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>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array;
- from(arrayLike: ArrayLike<number>): Uint32Array;
}
declare const Uint32Array: Uint32ArrayConstructor;
@@ -3566,7 +3403,7 @@ interface Float32Array {
/**
* The ArrayBuffer instance referenced by the array.
*/
- readonly buffer: ArrayBuffer;
+ readonly buffer: ArrayBufferLike;
/**
* The length in bytes of the array.
@@ -3597,9 +3434,7 @@ interface Float32Array {
* @param thisArg 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;
+ 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
@@ -3618,9 +3453,7 @@ interface Float32Array {
* @param thisArg 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;
+ 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
@@ -3631,9 +3464,7 @@ interface Float32Array {
* @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;
+ 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
@@ -3644,9 +3475,7 @@ interface Float32Array {
* @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;
+ findIndex(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
/**
* Performs the specified action for each element in an array.
@@ -3655,9 +3484,7 @@ interface Float32Array {
* @param thisArg 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;
+ 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.
@@ -3695,9 +3522,7 @@ interface Float32Array {
* @param thisArg 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;
+ map(callbackfn: (this: void, 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
@@ -3774,9 +3599,7 @@ interface Float32Array {
* @param thisArg 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;
+ some(callbackfn: (value: number, index: number, array: Float32Array) => boolean, thisArg?: any): boolean;
/**
* Sorts an array.
@@ -3808,9 +3631,9 @@ interface Float32Array {
interface Float32ArrayConstructor {
readonly prototype: Float32Array;
- new (length: number): Float32Array;
- new (array: ArrayLike<number>): Float32Array;
- new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float32Array;
+ new(length: number): Float32Array;
+ new(array: ArrayLike<number>): Float32Array;
+ new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Float32Array;
/**
* The size in bytes of each element in the array.
@@ -3829,11 +3652,8 @@ interface Float32ArrayConstructor {
* @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>, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array;
- from(arrayLike: ArrayLike<number>): Float32Array;
}
declare const Float32Array: Float32ArrayConstructor;
@@ -3851,7 +3671,7 @@ interface Float64Array {
/**
* The ArrayBuffer instance referenced by the array.
*/
- readonly buffer: ArrayBuffer;
+ readonly buffer: ArrayBufferLike;
/**
* The length in bytes of the array.
@@ -3882,9 +3702,7 @@ interface Float64Array {
* @param thisArg 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;
+ 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
@@ -3903,9 +3721,7 @@ interface Float64Array {
* @param thisArg 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;
+ 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
@@ -3916,9 +3732,7 @@ interface Float64Array {
* @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;
+ 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
@@ -3929,9 +3743,7 @@ interface Float64Array {
* @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;
+ findIndex(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
/**
* Performs the specified action for each element in an array.
@@ -3940,9 +3752,7 @@ interface Float64Array {
* @param thisArg 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;
+ 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.
@@ -3980,9 +3790,7 @@ interface Float64Array {
* @param thisArg 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;
+ map(callbackfn: (this: void, 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
@@ -4059,9 +3867,7 @@ interface Float64Array {
* @param thisArg 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;
+ some(callbackfn: (value: number, index: number, array: Float64Array) => boolean, thisArg?: any): boolean;
/**
* Sorts an array.
@@ -4093,9 +3899,9 @@ interface Float64Array {
interface Float64ArrayConstructor {
readonly prototype: Float64Array;
- new (length: number): Float64Array;
- new (array: ArrayLike<number>): Float64Array;
- new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float64Array;
+ new(length: number): Float64Array;
+ new(array: ArrayLike<number>): Float64Array;
+ new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Float64Array;
/**
* The size in bytes of each element in the array.
@@ -4114,11 +3920,8 @@ interface Float64ArrayConstructor {
* @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>, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array;
- from(arrayLike: ArrayLike<number>): Float64Array;
}
declare const Float64Array: Float64ArrayConstructor;
@@ -4151,7 +3954,7 @@ declare namespace Intl {
resolvedOptions(): ResolvedCollatorOptions;
}
var Collator: {
- new (locales?: string | string[], options?: CollatorOptions): Collator;
+ new(locales?: string | string[], options?: CollatorOptions): Collator;
(locales?: string | string[], options?: CollatorOptions): Collator;
supportedLocalesOf(locales: string | string[], options?: CollatorOptions): string[];
};
@@ -4188,7 +3991,7 @@ declare namespace Intl {
resolvedOptions(): ResolvedNumberFormatOptions;
}
var NumberFormat: {
- new (locales?: string | string[], options?: NumberFormatOptions): NumberFormat;
+ new(locales?: string | string[], options?: NumberFormatOptions): NumberFormat;
(locales?: string | string[], options?: NumberFormatOptions): NumberFormat;
supportedLocalesOf(locales: string | string[], options?: NumberFormatOptions): string[];
};
@@ -4231,7 +4034,7 @@ declare namespace Intl {
resolvedOptions(): ResolvedDateTimeFormatOptions;
}
var DateTimeFormat: {
- new (locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat;
+ new(locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat;
(locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat;
supportedLocalesOf(locales: string | string[], options?: DateTimeFormatOptions): string[];
};
@@ -4281,15 +4084,15 @@ interface Date {
/////////////////////////////
-/// IE DOM APIs
+/// DOM APIs
/////////////////////////////
interface Account {
- rpDisplayName?: string;
displayName?: string;
id?: string;
- name?: string;
imageURL?: string;
+ name?: string;
+ rpDisplayName?: string;
}
interface Algorithm {
@@ -4302,32 +4105,32 @@ interface AnimationEventInit extends EventInit {
}
interface AssertionOptions {
- timeoutSeconds?: number;
- rpId?: USVString;
allowList?: ScopedCredentialDescriptor[];
extensions?: WebAuthnExtensions;
+ rpId?: USVString;
+ timeoutSeconds?: number;
}
interface CacheQueryOptions {
- ignoreSearch?: boolean;
+ cacheName?: string;
ignoreMethod?: boolean;
+ ignoreSearch?: boolean;
ignoreVary?: boolean;
- cacheName?: string;
}
interface ClientData {
challenge?: string;
+ extensions?: WebAuthnExtensions;
+ hashAlg?: string | Algorithm;
origin?: string;
rpId?: string;
- hashAlg?: string | Algorithm;
tokenBinding?: string;
- extensions?: WebAuthnExtensions;
}
interface CloseEventInit extends EventInit {
- wasClean?: boolean;
code?: number;
reason?: string;
+ wasClean?: boolean;
}
interface CompositionEventInit extends UIEventInit {
@@ -4367,13 +4170,6 @@ interface CustomEventInit extends EventInit {
detail?: any;
}
-interface DOMRectInit {
- x?: any;
- y?: any;
- width?: any;
- height?: any;
-}
-
interface DeviceAccelerationDict {
x?: number;
y?: number;
@@ -4387,15 +4183,15 @@ interface DeviceLightEventInit extends EventInit {
interface DeviceMotionEventInit extends EventInit {
acceleration?: DeviceAccelerationDict;
accelerationIncludingGravity?: DeviceAccelerationDict;
- rotationRate?: DeviceRotationRateDict;
interval?: number;
+ rotationRate?: DeviceRotationRateDict;
}
interface DeviceOrientationEventInit extends EventInit {
+ absolute?: boolean;
alpha?: number;
beta?: number;
gamma?: number;
- absolute?: boolean;
}
interface DeviceRotationRateDict {
@@ -4404,17 +4200,24 @@ interface DeviceRotationRateDict {
gamma?: number;
}
+interface DOMRectInit {
+ height?: any;
+ width?: any;
+ x?: any;
+ y?: any;
+}
+
interface DoubleRange {
max?: number;
min?: number;
}
interface ErrorEventInit extends EventInit {
- message?: string;
- filename?: string;
- lineno?: number;
colno?: number;
error?: any;
+ filename?: string;
+ lineno?: number;
+ message?: string;
}
interface EventInit {
@@ -4424,9 +4227,8 @@ interface EventInit {
}
interface EventModifierInit extends UIEventInit {
- ctrlKey?: boolean;
- shiftKey?: boolean;
altKey?: boolean;
+ ctrlKey?: boolean;
metaKey?: boolean;
modifierAltGraph?: boolean;
modifierCapsLock?: boolean;
@@ -4439,6 +4241,7 @@ interface EventModifierInit extends UIEventInit {
modifierSuper?: boolean;
modifierSymbol?: boolean;
modifierSymbolLock?: boolean;
+ shiftKey?: boolean;
}
interface ExceptionInformation {
@@ -4451,17 +4254,17 @@ interface FocusEventInit extends UIEventInit {
interface FocusNavigationEventInit extends EventInit {
navigationReason?: string;
+ originHeight?: number;
originLeft?: number;
originTop?: number;
originWidth?: number;
- originHeight?: number;
}
interface FocusNavigationOrigin {
+ originHeight?: number;
originLeft?: number;
originTop?: number;
originWidth?: number;
- originHeight?: number;
}
interface GamepadEventInit extends EventInit {
@@ -4488,11 +4291,11 @@ interface IDBObjectStoreParameters {
}
interface IntersectionObserverEntryInit {
- time?: number;
- rootBounds?: DOMRectInit;
boundingClientRect?: DOMRectInit;
intersectionRect?: DOMRectInit;
+ rootBounds?: DOMRectInit;
target?: Element;
+ time?: number;
}
interface IntersectionObserverInit {
@@ -4517,39 +4320,153 @@ interface LongRange {
min?: number;
}
+interface MediaEncryptedEventInit extends EventInit {
+ initData?: ArrayBuffer;
+ initDataType?: string;
+}
+
+interface MediaKeyMessageEventInit extends EventInit {
+ message?: ArrayBuffer;
+ messageType?: MediaKeyMessageType;
+}
+
+interface MediaKeySystemConfiguration {
+ audioCapabilities?: MediaKeySystemMediaCapability[];
+ distinctiveIdentifier?: MediaKeysRequirement;
+ initDataTypes?: string[];
+ persistentState?: MediaKeysRequirement;
+ videoCapabilities?: MediaKeySystemMediaCapability[];
+}
+
+interface MediaKeySystemMediaCapability {
+ contentType?: string;
+ robustness?: string;
+}
+
+interface MediaStreamConstraints {
+ audio?: boolean | MediaTrackConstraints;
+ video?: boolean | MediaTrackConstraints;
+}
+
+interface MediaStreamErrorEventInit extends EventInit {
+ error?: MediaStreamError;
+}
+
+interface MediaStreamEventInit extends EventInit {
+ stream?: MediaStream;
+}
+
+interface MediaStreamTrackEventInit extends EventInit {
+ track?: MediaStreamTrack;
+}
+
+interface MediaTrackCapabilities {
+ aspectRatio?: number | DoubleRange;
+ deviceId?: string;
+ echoCancellation?: boolean[];
+ facingMode?: string;
+ frameRate?: number | DoubleRange;
+ groupId?: string;
+ height?: number | LongRange;
+ sampleRate?: number | LongRange;
+ sampleSize?: number | LongRange;
+ volume?: number | DoubleRange;
+ width?: number | LongRange;
+}
+
+interface MediaTrackConstraints extends MediaTrackConstraintSet {
+ advanced?: MediaTrackConstraintSet[];
+}
+
+interface MediaTrackConstraintSet {
+ aspectRatio?: number | ConstrainDoubleRange;
+ deviceId?: string | string[] | ConstrainDOMStringParameters;
+ echoCancelation?: boolean | ConstrainBooleanParameters;
+ facingMode?: string | string[] | ConstrainDOMStringParameters;
+ frameRate?: number | ConstrainDoubleRange;
+ groupId?: string | string[] | ConstrainDOMStringParameters;
+ height?: number | ConstrainLongRange;
+ sampleRate?: number | ConstrainLongRange;
+ sampleSize?: number | ConstrainLongRange;
+ volume?: number | ConstrainDoubleRange;
+ width?: number | ConstrainLongRange;
+}
+
+interface MediaTrackSettings {
+ aspectRatio?: number;
+ deviceId?: string;
+ echoCancellation?: boolean;
+ facingMode?: string;
+ frameRate?: number;
+ groupId?: string;
+ height?: number;
+ sampleRate?: number;
+ sampleSize?: number;
+ volume?: number;
+ width?: number;
+}
+
+interface MediaTrackSupportedConstraints {
+ aspectRatio?: boolean;
+ deviceId?: boolean;
+ echoCancellation?: boolean;
+ facingMode?: boolean;
+ frameRate?: boolean;
+ groupId?: boolean;
+ height?: boolean;
+ sampleRate?: boolean;
+ sampleSize?: boolean;
+ volume?: boolean;
+ width?: boolean;
+}
+
+interface MessageEventInit extends EventInit {
+ lastEventId?: string;
+ channel?: string;
+ data?: any;
+ origin?: string;
+ ports?: MessagePort[];
+ source?: Window;
+}
+
+interface MouseEventInit extends EventModifierInit {
+ button?: number;
+ buttons?: number;
+ clientX?: number;
+ clientY?: number;
+ relatedTarget?: EventTarget;
+ screenX?: number;
+ screenY?: number;
+}
+
interface MSAccountInfo {
+ accountImageUri?: string;
+ accountName?: string;
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;
+ deviceClippingEventRatio?: number;
+ deviceEchoEventRatio?: number;
deviceGlitchesEventRatio?: number;
+ deviceHalfDuplexAECEventRatio?: number;
+ deviceHowlingEventCount?: number;
deviceLowSNREventRatio?: number;
deviceLowSpeechLevelEventRatio?: number;
- deviceClippingEventRatio?: number;
- deviceEchoEventRatio?: number;
+ deviceMultipleEndpointsEventCount?: number;
deviceNearEndToEchoRatioEventRatio?: number;
- deviceRenderZeroVolumeEventRatio?: number;
deviceRenderMuteEventRatio?: number;
- deviceMultipleEndpointsEventCount?: number;
- deviceHowlingEventCount?: number;
+ deviceRenderNotFunctioningEventRatio?: number;
+ deviceRenderZeroVolumeEventRatio?: number;
+ networkDelayEventRatio?: number;
+ networkSendQualityEventRatio?: number;
}
interface MSAudioRecvPayload extends MSPayloadBase {
- samplingRate?: number;
- signal?: MSAudioRecvSignal;
- packetReorderRatio?: number;
- packetReorderDepthAvg?: number;
- packetReorderDepthMax?: number;
burstLossLength1?: number;
burstLossLength2?: number;
burstLossLength3?: number;
@@ -4561,31 +4478,36 @@ interface MSAudioRecvPayload extends MSPayloadBase {
fecRecvDistance1?: number;
fecRecvDistance2?: number;
fecRecvDistance3?: number;
+ packetReorderDepthAvg?: number;
+ packetReorderDepthMax?: number;
+ packetReorderRatio?: number;
+ ratioCompressedSamplesAvg?: number;
ratioConcealedSamplesAvg?: number;
ratioStretchedSamplesAvg?: number;
- ratioCompressedSamplesAvg?: number;
+ samplingRate?: number;
+ signal?: MSAudioRecvSignal;
}
interface MSAudioRecvSignal {
initialSignalLevelRMS?: number;
- recvSignalLevelCh1?: number;
recvNoiseLevelCh1?: number;
- renderSignalLevel?: number;
- renderNoiseLevel?: number;
+ recvSignalLevelCh1?: number;
renderLoopbackSignalLevel?: number;
+ renderNoiseLevel?: number;
+ renderSignalLevel?: number;
}
interface MSAudioSendPayload extends MSPayloadBase {
- samplingRate?: number;
- signal?: MSAudioSendSignal;
audioFECUsed?: boolean;
+ samplingRate?: number;
sendMutePercent?: number;
+ signal?: MSAudioSendSignal;
}
interface MSAudioSendSignal {
noiseLevel?: number;
- sendSignalLevelCh1?: number;
sendNoiseLevelCh1?: number;
+ sendSignalLevelCh1?: number;
}
interface MSConnectivity {
@@ -4603,8 +4525,8 @@ interface MSCredentialParameters {
}
interface MSCredentialSpec {
- type?: MSCredentialType;
id?: string;
+ type?: MSCredentialType;
}
interface MSDelay {
@@ -4614,12 +4536,12 @@ interface MSDelay {
interface MSDescription extends RTCStats {
connectivity?: MSConnectivity;
- transport?: RTCIceProtocol;
- networkconnectivity?: MSNetworkConnectivityInfo;
- localAddr?: MSIPAddressInfo;
- remoteAddr?: MSIPAddressInfo;
deviceDevName?: string;
+ localAddr?: MSIPAddressInfo;
+ networkconnectivity?: MSNetworkConnectivityInfo;
reflexiveLocalIPAddr?: MSIPAddressInfo;
+ remoteAddr?: MSIPAddressInfo;
+ transport?: RTCIceProtocol;
}
interface MSFIDOCredentialParameters extends MSCredentialParameters {
@@ -4627,35 +4549,35 @@ interface MSFIDOCredentialParameters extends MSCredentialParameters {
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;
+ alternateServerReceived?: boolean;
+ connCheckMessageIntegrityFailed?: boolean;
connCheckOtherError?: boolean;
- turnAuthUnknownUsernameError?: boolean;
- noRelayServersConfigured?: boolean;
+ fipsAllocationFailure?: boolean;
multipleRelayServersAttempted?: boolean;
+ noRelayServersConfigured?: boolean;
portRangeExhausted?: boolean;
- alternateServerReceived?: boolean;
pseudoTLSFailure?: boolean;
+ tcpNatConnectivityFailed?: boolean;
+ tcpRelayConnectivityFailed?: boolean;
+ turnAuthUnknownUsernameError?: boolean;
+ turnTcpAllocateFailed?: boolean;
+ turnTcpSendFailed?: boolean;
+ turnTcpTimedOut?: boolean;
turnTurnTcpConnectivityFailed?: boolean;
+ turnUdpAllocateFailed?: boolean;
+ turnUdpSendFailed?: boolean;
+ udpLocalConnectivityFailed?: boolean;
+ udpNatConnectivityFailed?: boolean;
+ udpRelayConnectivityFailed?: boolean;
useCandidateChecksFailed?: boolean;
- fipsAllocationFailure?: boolean;
+}
+
+interface MSIPAddressInfo {
+ ipAddr?: string;
+ manufacturerMacAddrMask?: string;
+ port?: number;
}
interface MSJitter {
@@ -4665,28 +4587,28 @@ interface MSJitter {
}
interface MSLocalClientEventBase extends RTCStats {
- networkReceiveQualityEventRatio?: number;
networkBandwidthLowEventRatio?: number;
+ networkReceiveQualityEventRatio?: number;
}
interface MSNetwork extends RTCStats {
- jitter?: MSJitter;
delay?: MSDelay;
+ jitter?: MSJitter;
packetLoss?: MSPacketLoss;
utilization?: MSUtilization;
}
interface MSNetworkConnectivityInfo {
- vpn?: boolean;
linkspeed?: number;
networkConnectionDetails?: string;
+ vpn?: boolean;
}
interface MSNetworkInterfaceType {
interfaceTypeEthernet?: boolean;
- interfaceTypeWireless?: boolean;
interfaceTypePPP?: boolean;
interfaceTypeTunnel?: boolean;
+ interfaceTypeWireless?: boolean;
interfaceTypeWWAN?: boolean;
}
@@ -4704,13 +4626,13 @@ interface MSPayloadBase extends RTCStats {
}
interface MSPortRange {
- min?: number;
max?: number;
+ min?: number;
}
interface MSRelayAddress {
- relayAddress?: string;
port?: number;
+ relayAddress?: string;
}
interface MSSignatureParameters {
@@ -4718,241 +4640,122 @@ interface MSSignatureParameters {
}
interface MSTransportDiagnosticsStats extends RTCStats {
+ allocationTimeInMs?: number;
baseAddress?: string;
+ baseInterface?: MSNetworkInterfaceType;
+ iceRole?: RTCIceRole;
+ iceWarningFlags?: MSIceWarningFlags;
+ interfaces?: MSNetworkInterfaceType;
localAddress?: string;
- localSite?: string;
- networkName?: string;
- remoteAddress?: string;
- remoteSite?: string;
+ localAddrType?: MSIceAddrType;
+ localInterface?: MSNetworkInterfaceType;
localMR?: string;
- remoteMR?: string;
- iceWarningFlags?: MSIceWarningFlags;
- portRangeMin?: number;
- portRangeMax?: number;
localMRTCPPort?: number;
- remoteMRTCPPort?: number;
- stunVer?: number;
- numConsentReqSent?: number;
+ localSite?: string;
+ msRtcEngineVersion?: string;
+ networkName?: string;
numConsentReqReceived?: number;
- numConsentRespSent?: number;
+ numConsentReqSent?: number;
numConsentRespReceived?: number;
- interfaces?: MSNetworkInterfaceType;
- baseInterface?: MSNetworkInterfaceType;
+ numConsentRespSent?: number;
+ portRangeMax?: number;
+ portRangeMin?: number;
protocol?: RTCIceProtocol;
- localInterface?: MSNetworkInterfaceType;
- localAddrType?: MSIceAddrType;
+ remoteAddress?: string;
remoteAddrType?: MSIceAddrType;
- iceRole?: RTCIceRole;
+ remoteMR?: string;
+ remoteMRTCPPort?: number;
+ remoteSite?: string;
rtpRtcpMux?: boolean;
- allocationTimeInMs?: number;
- msRtcEngineVersion?: string;
+ stunVer?: number;
}
interface MSUtilization {
- packets?: number;
bandwidthEstimation?: number;
- bandwidthEstimationMin?: number;
+ bandwidthEstimationAvg?: number;
bandwidthEstimationMax?: number;
+ bandwidthEstimationMin?: number;
bandwidthEstimationStdDev?: number;
- bandwidthEstimationAvg?: number;
+ packets?: number;
}
interface MSVideoPayload extends MSPayloadBase {
+ durationSeconds?: number;
resolution?: string;
videoBitRateAvg?: number;
videoBitRateMax?: number;
videoFrameRateAvg?: number;
videoPacketLossRate?: number;
- durationSeconds?: number;
}
interface MSVideoRecvPayload extends MSVideoPayload {
- videoFrameLossRate?: number;
+ lowBitRateCallPercent?: number;
+ lowFrameRateCallPercent?: number;
+ recvBitRateAverage?: number;
+ recvBitRateMaximum?: number;
recvCodecType?: string;
- recvResolutionWidth?: number;
- recvResolutionHeight?: number;
- videoResolutions?: MSVideoResolutionDistribution;
+ recvFpsHarmonicAverage?: number;
recvFrameRateAverage?: number;
- recvBitRateMaximum?: number;
- recvBitRateAverage?: number;
+ recvNumResSwitches?: number;
+ recvReorderBufferMaxSuccessfullyOrderedExtent?: number;
+ recvReorderBufferMaxSuccessfullyOrderedLateTime?: number;
+ recvReorderBufferPacketsDroppedDueToBufferExhaustion?: number;
+ recvReorderBufferPacketsDroppedDueToTimeout?: number;
+ recvReorderBufferReorderedPackets?: number;
+ recvResolutionHeight?: number;
+ recvResolutionWidth?: 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;
+ videoFrameLossRate?: number;
+ videoPostFECPLR?: number;
+ videoResolutions?: MSVideoResolutionDistribution;
}
interface MSVideoResolutionDistribution {
cifQuality?: number;
- vgaQuality?: number;
- h720Quality?: number;
h1080Quality?: number;
h1440Quality?: number;
h2160Quality?: number;
+ h720Quality?: number;
+ vgaQuality?: number;
}
interface MSVideoSendPayload extends MSVideoPayload {
- sendFrameRateAverage?: number;
- sendBitRateMaximum?: number;
sendBitRateAverage?: number;
- sendVideoStreamsMax?: number;
- sendResolutionWidth?: number;
+ sendBitRateMaximum?: number;
+ sendFrameRateAverage?: 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;
+ sendResolutionWidth?: number;
+ sendVideoStreamsMax?: number;
}
interface MsZoomToOptions {
+ animate?: string;
contentX?: number;
contentY?: number;
+ scaleFactor?: number;
viewportX?: string;
viewportY?: string;
- scaleFactor?: number;
- animate?: string;
}
interface MutationObserverInit {
- childList?: boolean;
+ attributeFilter?: string[];
+ attributeOldValue?: boolean;
attributes?: boolean;
characterData?: boolean;
- subtree?: boolean;
- attributeOldValue?: boolean;
characterDataOldValue?: boolean;
- attributeFilter?: string[];
+ childList?: boolean;
+ subtree?: boolean;
}
interface NotificationOptions {
+ body?: string;
dir?: NotificationDirection;
+ icon?: string;
lang?: string;
- body?: string;
tag?: string;
- icon?: string;
}
interface ObjectURLOptions {
@@ -4961,39 +4764,39 @@ interface ObjectURLOptions {
interface PaymentCurrencyAmount {
currency?: string;
- value?: string;
currencySystem?: string;
+ value?: string;
}
interface PaymentDetails {
- total?: PaymentItem;
displayItems?: PaymentItem[];
- shippingOptions?: PaymentShippingOption[];
- modifiers?: PaymentDetailsModifier[];
error?: string;
+ modifiers?: PaymentDetailsModifier[];
+ shippingOptions?: PaymentShippingOption[];
+ total?: PaymentItem;
}
interface PaymentDetailsModifier {
- supportedMethods?: string[];
- total?: PaymentItem;
additionalDisplayItems?: PaymentItem[];
data?: any;
+ supportedMethods?: string[];
+ total?: PaymentItem;
}
interface PaymentItem {
- label?: string;
amount?: PaymentCurrencyAmount;
+ label?: string;
pending?: boolean;
}
interface PaymentMethodData {
- supportedMethods?: string[];
data?: any;
+ supportedMethods?: string[];
}
interface PaymentOptions {
- requestPayerName?: boolean;
requestPayerEmail?: boolean;
+ requestPayerName?: boolean;
requestPayerPhone?: boolean;
requestShipping?: boolean;
shippingType?: string;
@@ -5003,9 +4806,9 @@ interface PaymentRequestUpdateEventInit extends EventInit {
}
interface PaymentShippingOption {
+ amount?: PaymentCurrencyAmount;
id?: string;
label?: string;
- amount?: PaymentCurrencyAmount;
selected?: boolean;
}
@@ -5014,14 +4817,14 @@ interface PeriodicWaveConstraints {
}
interface PointerEventInit extends MouseEventInit {
- pointerId?: number;
- width?: number;
height?: number;
+ isPrimary?: boolean;
+ pointerId?: number;
+ pointerType?: string;
pressure?: number;
tiltX?: number;
tiltY?: number;
- pointerType?: string;
- isPrimary?: boolean;
+ width?: number;
}
interface PopStateEventInit extends EventInit {
@@ -5030,8 +4833,8 @@ interface PopStateEventInit extends EventInit {
interface PositionOptions {
enableHighAccuracy?: boolean;
- timeout?: number;
maximumAge?: number;
+ timeout?: number;
}
interface ProgressEventInit extends EventInit {
@@ -5041,38 +4844,63 @@ interface ProgressEventInit extends EventInit {
}
interface PushSubscriptionOptionsInit {
- userVisibleOnly?: boolean;
applicationServerKey?: any;
+ userVisibleOnly?: boolean;
+}
+
+interface RegistrationOptions {
+ scope?: string;
+}
+
+interface RequestInit {
+ body?: any;
+ cache?: RequestCache;
+ credentials?: RequestCredentials;
+ headers?: any;
+ integrity?: string;
+ keepalive?: boolean;
+ method?: string;
+ mode?: RequestMode;
+ redirect?: RequestRedirect;
+ referrer?: string;
+ referrerPolicy?: ReferrerPolicy;
+ window?: any;
+}
+
+interface ResponseInit {
+ headers?: any;
+ status?: number;
+ statusText?: string;
}
interface RTCConfiguration {
+ bundlePolicy?: RTCBundlePolicy;
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[];
+ role?: RTCDtlsRole;
+}
+
+interface RTCDTMFToneChangeEventInit extends EventInit {
+ tone?: string;
}
interface RTCIceCandidateAttributes extends RTCStats {
+ addressSourceUrl?: string;
+ candidateType?: RTCStatsIceCandidateType;
ipAddress?: string;
portNumber?: number;
- transport?: string;
- candidateType?: RTCStatsIceCandidateType;
priority?: number;
- addressSourceUrl?: string;
+ transport?: string;
}
interface RTCIceCandidateComplete {
@@ -5080,15 +4908,15 @@ interface RTCIceCandidateComplete {
interface RTCIceCandidateDictionary {
foundation?: string;
- priority?: number;
ip?: string;
- protocol?: RTCIceProtocol;
+ msMTurnSessionId?: string;
port?: number;
- type?: RTCIceCandidateType;
- tcpType?: RTCIceTcpCandidateType;
+ priority?: number;
+ protocol?: RTCIceProtocol;
relatedAddress?: string;
relatedPort?: number;
- msMTurnSessionId?: string;
+ tcpType?: RTCIceTcpCandidateType;
+ type?: RTCIceCandidateType;
}
interface RTCIceCandidateInit {
@@ -5103,19 +4931,19 @@ interface RTCIceCandidatePair {
}
interface RTCIceCandidatePairStats extends RTCStats {
- transportId?: string;
+ availableIncomingBitrate?: number;
+ availableOutgoingBitrate?: number;
+ bytesReceived?: number;
+ bytesSent?: number;
localCandidateId?: string;
- remoteCandidateId?: string;
- state?: RTCStatsIceCandidatePairState;
- priority?: number;
nominated?: boolean;
- writable?: boolean;
+ priority?: number;
readable?: boolean;
- bytesSent?: number;
- bytesReceived?: number;
+ remoteCandidateId?: string;
roundTripTime?: number;
- availableOutgoingBitrate?: number;
- availableIncomingBitrate?: number;
+ state?: RTCStatsIceCandidatePairState;
+ transportId?: string;
+ writable?: boolean;
}
interface RTCIceGatherOptions {
@@ -5125,285 +4953,260 @@ interface RTCIceGatherOptions {
}
interface RTCIceParameters {
- usernameFragment?: string;
- password?: string;
iceLite?: boolean;
+ password?: string;
+ usernameFragment?: string;
}
interface RTCIceServer {
+ credential?: string;
urls?: any;
username?: string;
- credential?: string;
}
interface RTCInboundRTPStreamStats extends RTCRTPStreamStats {
- packetsReceived?: number;
bytesReceived?: number;
- packetsLost?: number;
- jitter?: number;
fractionLost?: number;
+ jitter?: number;
+ packetsLost?: number;
+ packetsReceived?: 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;
+ frameHeight?: number;
+ framesCorrupted?: number;
+ framesDecoded?: number;
+ framesDropped?: number;
+ framesPerSecond?: number;
+ framesReceived?: number;
+ framesSent?: number;
+ frameWidth?: number;
+ remoteSource?: boolean;
+ ssrcIds?: string[];
+ trackIdentifier?: string;
}
interface RTCOfferOptions {
- offerToReceiveVideo?: number;
+ iceRestart?: boolean;
offerToReceiveAudio?: number;
+ offerToReceiveVideo?: number;
voiceActivityDetection?: boolean;
- iceRestart?: boolean;
}
interface RTCOutboundRTPStreamStats extends RTCRTPStreamStats {
- packetsSent?: number;
bytesSent?: number;
- targetBitrate?: number;
+ packetsSent?: number;
roundTripTime?: number;
+ targetBitrate?: 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;
+ type?: string;
}
interface RTCRtcpParameters {
- ssrc?: number;
cname?: string;
- reducedSize?: boolean;
mux?: boolean;
+ reducedSize?: boolean;
+ ssrc?: number;
}
interface RTCRtpCapabilities {
codecs?: RTCRtpCodecCapability[];
- headerExtensions?: RTCRtpHeaderExtension[];
fecMechanisms?: string[];
+ headerExtensions?: RTCRtpHeaderExtension[];
}
interface RTCRtpCodecCapability {
- name?: string;
- kind?: string;
clockRate?: number;
- preferredPayloadType?: number;
+ kind?: string;
maxptime?: number;
- ptime?: number;
+ maxSpatialLayers?: number;
+ maxTemporalLayers?: number;
+ name?: string;
numChannels?: number;
- rtcpFeedback?: RTCRtcpFeedback[];
- parameters?: any;
options?: any;
- maxTemporalLayers?: number;
- maxSpatialLayers?: number;
+ parameters?: any;
+ preferredPayloadType?: number;
+ ptime?: number;
+ rtcpFeedback?: RTCRtcpFeedback[];
svcMultiStreamSupport?: boolean;
}
interface RTCRtpCodecParameters {
- name?: string;
- payloadType?: any;
clockRate?: number;
maxptime?: number;
- ptime?: number;
+ name?: string;
numChannels?: number;
- rtcpFeedback?: RTCRtcpFeedback[];
parameters?: any;
+ payloadType?: any;
+ ptime?: number;
+ rtcpFeedback?: RTCRtcpFeedback[];
}
interface RTCRtpContributingSource {
- timestamp?: number;
- csrc?: number;
audioLevel?: number;
+ csrc?: number;
+ timestamp?: number;
}
interface RTCRtpEncodingParameters {
- ssrc?: number;
+ active?: boolean;
codecPayloadType?: number;
+ dependencyEncodingIds?: string[];
+ encodingId?: string;
fec?: RTCRtpFecParameters;
- rtx?: RTCRtpRtxParameters;
- priority?: number;
+ framerateScale?: number;
maxBitrate?: number;
+ maxFramerate?: number;
minQuality?: number;
+ priority?: number;
resolutionScale?: number;
- framerateScale?: number;
- maxFramerate?: number;
- active?: boolean;
- encodingId?: string;
- dependencyEncodingIds?: string[];
+ rtx?: RTCRtpRtxParameters;
+ ssrc?: number;
ssrcRange?: RTCSsrcRange;
}
interface RTCRtpFecParameters {
- ssrc?: number;
mechanism?: string;
+ ssrc?: number;
}
interface RTCRtpHeaderExtension {
kind?: string;
- uri?: string;
- preferredId?: number;
preferredEncrypt?: boolean;
+ preferredId?: number;
+ uri?: string;
}
interface RTCRtpHeaderExtensionParameters {
- uri?: string;
- id?: number;
encrypt?: boolean;
+ id?: number;
+ uri?: string;
}
interface RTCRtpParameters {
- muxId?: string;
codecs?: RTCRtpCodecParameters[];
- headerExtensions?: RTCRtpHeaderExtensionParameters[];
+ degradationPreference?: RTCDegradationPreference;
encodings?: RTCRtpEncodingParameters[];
+ headerExtensions?: RTCRtpHeaderExtensionParameters[];
+ muxId?: string;
rtcp?: RTCRtcpParameters;
- degradationPreference?: RTCDegradationPreference;
}
interface RTCRtpRtxParameters {
ssrc?: number;
}
+interface RTCRTPStreamStats extends RTCStats {
+ associateStatsId?: string;
+ codecId?: string;
+ firCount?: number;
+ isRemote?: boolean;
+ mediaTrackId?: string;
+ nackCount?: number;
+ pliCount?: number;
+ sliCount?: number;
+ ssrc?: string;
+ transportId?: string;
+}
+
interface RTCRtpUnhandled {
- ssrc?: number;
- payloadType?: number;
muxId?: string;
+ payloadType?: number;
+ ssrc?: number;
}
interface RTCSessionDescriptionInit {
- type?: RTCSdpType;
sdp?: string;
+ type?: RTCSdpType;
}
interface RTCSrtpKeyParam {
keyMethod?: string;
keySalt?: string;
lifetime?: string;
- mkiValue?: number;
mkiLength?: number;
+ mkiValue?: number;
}
interface RTCSrtpSdesParameters {
- tag?: number;
cryptoSuite?: string;
keyParams?: RTCSrtpKeyParam[];
sessionParams?: string[];
+ tag?: number;
}
interface RTCSsrcRange {
- min?: number;
max?: number;
+ min?: number;
}
interface RTCStats {
- timestamp?: number;
- type?: RTCStatsType;
id?: string;
msType?: MSStatsType;
+ timestamp?: number;
+ type?: RTCStatsType;
}
interface RTCStatsReport {
}
interface RTCTransportStats extends RTCStats {
- bytesSent?: number;
- bytesReceived?: number;
- rtcpTransportStatsId?: string;
activeConnection?: boolean;
- selectedCandidatePairId?: string;
+ bytesReceived?: number;
+ bytesSent?: number;
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;
+ rtcpTransportStatsId?: string;
+ selectedCandidatePairId?: string;
}
interface ScopedCredentialDescriptor {
- type?: ScopedCredentialType;
id?: any;
transports?: Transport[];
+ type?: ScopedCredentialType;
}
interface ScopedCredentialOptions {
- timeoutSeconds?: number;
- rpId?: USVString;
excludeList?: ScopedCredentialDescriptor[];
extensions?: WebAuthnExtensions;
+ rpId?: USVString;
+ timeoutSeconds?: number;
}
interface ScopedCredentialParameters {
- type?: ScopedCredentialType;
algorithm?: string | Algorithm;
+ type?: ScopedCredentialType;
}
interface ServiceWorkerMessageEventInit extends EventInit {
data?: any;
- origin?: string;
lastEventId?: string;
- source?: ServiceWorker | MessagePort;
+ origin?: string;
ports?: MessagePort[];
+ source?: ServiceWorker | MessagePort;
}
interface SpeechSynthesisEventInit extends EventInit {
- utterance?: SpeechSynthesisUtterance;
charIndex?: number;
elapsedTime?: number;
name?: string;
+ utterance?: SpeechSynthesisUtterance;
}
interface StoreExceptionsInformation extends ExceptionInformation {
- siteName?: string;
- explanationString?: string;
detailURI?: string;
+ explanationString?: string;
+ siteName?: string;
}
interface StoreSiteSpecificExceptionsInformation extends StoreExceptionsInformation {
@@ -5415,13 +5218,13 @@ interface TrackEventInit extends EventInit {
}
interface TransitionEventInit extends EventInit {
- propertyName?: string;
elapsedTime?: number;
+ propertyName?: string;
}
interface UIEventInit extends EventInit {
- view?: Window;
detail?: number;
+ view?: Window;
}
interface WebAuthnExtensions {
@@ -5430,11 +5233,11 @@ interface WebAuthnExtensions {
interface WebGLContextAttributes {
failIfMajorPerformanceCaveat?: boolean;
alpha?: boolean;
- depth?: boolean;
- stencil?: boolean;
antialias?: boolean;
+ depth?: boolean;
premultipliedAlpha?: boolean;
preserveDrawingBuffer?: boolean;
+ stencil?: boolean;
}
interface WebGLContextEventInit extends EventInit {
@@ -5442,10 +5245,10 @@ interface WebGLContextEventInit extends EventInit {
}
interface WheelEventInit extends MouseEventInit {
+ deltaMode?: number;
deltaX?: number;
deltaY?: number;
deltaZ?: number;
- deltaMode?: number;
}
interface EventListener {
@@ -5464,19 +5267,6 @@ 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;
@@ -5492,8 +5282,21 @@ interface AnalyserNode extends AudioNode {
declare var AnalyserNode: {
prototype: AnalyserNode;
new(): AnalyserNode;
+};
+
+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 AnimationEvent extends Event {
readonly animationName: string;
readonly elapsedTime: number;
@@ -5503,7 +5306,7 @@ interface AnimationEvent extends Event {
declare var AnimationEvent: {
prototype: AnimationEvent;
new(typeArg: string, eventInitDict?: AnimationEventInit): AnimationEvent;
-}
+};
interface ApplicationCacheEventMap {
"cached": Event;
@@ -5548,7 +5351,7 @@ declare var ApplicationCache: {
readonly OBSOLETE: number;
readonly UNCACHED: number;
readonly UPDATEREADY: number;
-}
+};
interface Attr extends Node {
readonly name: string;
@@ -5561,7 +5364,7 @@ interface Attr extends Node {
declare var Attr: {
prototype: Attr;
new(): Attr;
-}
+};
interface AudioBuffer {
readonly duration: number;
@@ -5576,7 +5379,7 @@ interface AudioBuffer {
declare var AudioBuffer: {
prototype: AudioBuffer;
new(): AudioBuffer;
-}
+};
interface AudioBufferSourceNodeEventMap {
"ended": MediaStreamErrorEvent;
@@ -5599,7 +5402,7 @@ interface AudioBufferSourceNode extends AudioNode {
declare var AudioBufferSourceNode: {
prototype: AudioBufferSourceNode;
new(): AudioBufferSourceNode;
-}
+};
interface AudioContextEventMap {
"statechange": Event;
@@ -5645,7 +5448,7 @@ interface AudioContext extends AudioContextBase {
declare var AudioContext: {
prototype: AudioContext;
new(): AudioContext;
-}
+};
interface AudioDestinationNode extends AudioNode {
readonly maxChannelCount: number;
@@ -5654,7 +5457,7 @@ interface AudioDestinationNode extends AudioNode {
declare var AudioDestinationNode: {
prototype: AudioDestinationNode;
new(): AudioDestinationNode;
-}
+};
interface AudioListener {
dopplerFactor: number;
@@ -5667,7 +5470,7 @@ interface AudioListener {
declare var AudioListener: {
prototype: AudioListener;
new(): AudioListener;
-}
+};
interface AudioNode extends EventTarget {
channelCount: number;
@@ -5686,7 +5489,7 @@ interface AudioNode extends EventTarget {
declare var AudioNode: {
prototype: AudioNode;
new(): AudioNode;
-}
+};
interface AudioParam {
readonly defaultValue: number;
@@ -5702,7 +5505,7 @@ interface AudioParam {
declare var AudioParam: {
prototype: AudioParam;
new(): AudioParam;
-}
+};
interface AudioProcessingEvent extends Event {
readonly inputBuffer: AudioBuffer;
@@ -5713,7 +5516,7 @@ interface AudioProcessingEvent extends Event {
declare var AudioProcessingEvent: {
prototype: AudioProcessingEvent;
new(): AudioProcessingEvent;
-}
+};
interface AudioTrack {
enabled: boolean;
@@ -5727,7 +5530,7 @@ interface AudioTrack {
declare var AudioTrack: {
prototype: AudioTrack;
new(): AudioTrack;
-}
+};
interface AudioTrackListEventMap {
"addtrack": TrackEvent;
@@ -5750,7 +5553,7 @@ interface AudioTrackList extends EventTarget {
declare var AudioTrackList: {
prototype: AudioTrackList;
new(): AudioTrackList;
-}
+};
interface BarProp {
readonly visible: boolean;
@@ -5759,7 +5562,7 @@ interface BarProp {
declare var BarProp: {
prototype: BarProp;
new(): BarProp;
-}
+};
interface BeforeUnloadEvent extends Event {
returnValue: any;
@@ -5768,13 +5571,13 @@ interface BeforeUnloadEvent extends Event {
declare var BeforeUnloadEvent: {
prototype: BeforeUnloadEvent;
new(): BeforeUnloadEvent;
-}
+};
interface BiquadFilterNode extends AudioNode {
- readonly Q: AudioParam;
readonly detune: AudioParam;
readonly frequency: AudioParam;
readonly gain: AudioParam;
+ readonly Q: AudioParam;
type: BiquadFilterType;
getFrequencyResponse(frequencyHz: Float32Array, magResponse: Float32Array, phaseResponse: Float32Array): void;
}
@@ -5782,7 +5585,7 @@ interface BiquadFilterNode extends AudioNode {
declare var BiquadFilterNode: {
prototype: BiquadFilterNode;
new(): BiquadFilterNode;
-}
+};
interface Blob {
readonly size: number;
@@ -5795,16 +5598,305 @@ interface 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 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 CDATASection extends Text {
}
declare var CDATASection: {
prototype: CDATASection;
new(): CDATASection;
+};
+
+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, ...optionalParams: any[]): void;
+ groupCollapsed(groupTitle?: string, ...optionalParams: any[]): 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 CSS {
supports(property: string, value?: string): boolean;
}
@@ -5817,7 +5909,7 @@ interface CSSConditionRule extends CSSGroupingRule {
declare var CSSConditionRule: {
prototype: CSSConditionRule;
new(): CSSConditionRule;
-}
+};
interface CSSFontFaceRule extends CSSRule {
readonly style: CSSStyleDeclaration;
@@ -5826,7 +5918,7 @@ interface CSSFontFaceRule extends CSSRule {
declare var CSSFontFaceRule: {
prototype: CSSFontFaceRule;
new(): CSSFontFaceRule;
-}
+};
interface CSSGroupingRule extends CSSRule {
readonly cssRules: CSSRuleList;
@@ -5837,7 +5929,7 @@ interface CSSGroupingRule extends CSSRule {
declare var CSSGroupingRule: {
prototype: CSSGroupingRule;
new(): CSSGroupingRule;
-}
+};
interface CSSImportRule extends CSSRule {
readonly href: string;
@@ -5848,7 +5940,7 @@ interface CSSImportRule extends CSSRule {
declare var CSSImportRule: {
prototype: CSSImportRule;
new(): CSSImportRule;
-}
+};
interface CSSKeyframeRule extends CSSRule {
keyText: string;
@@ -5858,7 +5950,7 @@ interface CSSKeyframeRule extends CSSRule {
declare var CSSKeyframeRule: {
prototype: CSSKeyframeRule;
new(): CSSKeyframeRule;
-}
+};
interface CSSKeyframesRule extends CSSRule {
readonly cssRules: CSSRuleList;
@@ -5871,7 +5963,7 @@ interface CSSKeyframesRule extends CSSRule {
declare var CSSKeyframesRule: {
prototype: CSSKeyframesRule;
new(): CSSKeyframesRule;
-}
+};
interface CSSMediaRule extends CSSConditionRule {
readonly media: MediaList;
@@ -5880,7 +5972,7 @@ interface CSSMediaRule extends CSSConditionRule {
declare var CSSMediaRule: {
prototype: CSSMediaRule;
new(): CSSMediaRule;
-}
+};
interface CSSNamespaceRule extends CSSRule {
readonly namespaceURI: string;
@@ -5890,7 +5982,7 @@ interface CSSNamespaceRule extends CSSRule {
declare var CSSNamespaceRule: {
prototype: CSSNamespaceRule;
new(): CSSNamespaceRule;
-}
+};
interface CSSPageRule extends CSSRule {
readonly pseudoClass: string;
@@ -5902,7 +5994,7 @@ interface CSSPageRule extends CSSRule {
declare var CSSPageRule: {
prototype: CSSPageRule;
new(): CSSPageRule;
-}
+};
interface CSSRule {
cssText: string;
@@ -5912,8 +6004,8 @@ interface CSSRule {
readonly CHARSET_RULE: number;
readonly FONT_FACE_RULE: number;
readonly IMPORT_RULE: number;
- readonly KEYFRAMES_RULE: number;
readonly KEYFRAME_RULE: number;
+ readonly KEYFRAMES_RULE: number;
readonly MEDIA_RULE: number;
readonly NAMESPACE_RULE: number;
readonly PAGE_RULE: number;
@@ -5929,8 +6021,8 @@ declare var CSSRule: {
readonly CHARSET_RULE: number;
readonly FONT_FACE_RULE: number;
readonly IMPORT_RULE: number;
- readonly KEYFRAMES_RULE: number;
readonly KEYFRAME_RULE: number;
+ readonly KEYFRAMES_RULE: number;
readonly MEDIA_RULE: number;
readonly NAMESPACE_RULE: number;
readonly PAGE_RULE: number;
@@ -5938,7 +6030,7 @@ declare var CSSRule: {
readonly SUPPORTS_RULE: number;
readonly UNKNOWN_RULE: number;
readonly VIEWPORT_RULE: number;
-}
+};
interface CSSRuleList {
readonly length: number;
@@ -5949,13 +6041,13 @@ interface CSSRuleList {
declare var CSSRuleList: {
prototype: CSSRuleList;
new(): CSSRuleList;
-}
+};
interface CSSStyleDeclaration {
alignContent: string | null;
alignItems: string | null;
- alignSelf: string | null;
alignmentBaseline: string | null;
+ alignSelf: string | null;
animation: string | null;
animationDelay: string | null;
animationDirection: string | null;
@@ -6031,9 +6123,9 @@ interface CSSStyleDeclaration {
columnRuleColor: any;
columnRuleStyle: string | null;
columnRuleWidth: any;
+ columns: string | null;
columnSpan: string | null;
columnWidth: any;
- columns: string | null;
content: string | null;
counterIncrement: string | null;
counterReset: string | null;
@@ -6103,24 +6195,24 @@ interface CSSStyleDeclaration {
minHeight: string | null;
minWidth: string | null;
msContentZoomChaining: string | null;
+ msContentZooming: 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;
+ msGridColumnSpan: any;
msGridRow: any;
msGridRowAlign: string | null;
- msGridRowSpan: any;
msGridRows: string | null;
+ msGridRowSpan: any;
msHighContrastAdjust: string | null;
msHyphenateLimitChars: string | null;
msHyphenateLimitLines: any;
@@ -6256,9 +6348,9 @@ interface CSSStyleDeclaration {
webkitColumnRuleColor: any;
webkitColumnRuleStyle: string | null;
webkitColumnRuleWidth: any;
+ webkitColumns: string | null;
webkitColumnSpan: string | null;
webkitColumnWidth: any;
- webkitColumns: string | null;
webkitFilter: string | null;
webkitFlex: string | null;
webkitFlexBasis: string | null;
@@ -6310,7 +6402,7 @@ interface CSSStyleDeclaration {
declare var CSSStyleDeclaration: {
prototype: CSSStyleDeclaration;
new(): CSSStyleDeclaration;
-}
+};
interface CSSStyleRule extends CSSRule {
readonly readOnly: boolean;
@@ -6321,7 +6413,7 @@ interface CSSStyleRule extends CSSRule {
declare var CSSStyleRule: {
prototype: CSSStyleRule;
new(): CSSStyleRule;
-}
+};
interface CSSStyleSheet extends StyleSheet {
readonly cssRules: CSSRuleList;
@@ -6347,7 +6439,7 @@ interface CSSStyleSheet extends StyleSheet {
declare var CSSStyleSheet: {
prototype: CSSStyleSheet;
new(): CSSStyleSheet;
-}
+};
interface CSSSupportsRule extends CSSConditionRule {
}
@@ -6355,296 +6447,7 @@ 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;
@@ -6654,150 +6457,7 @@ interface CustomEvent extends Event {
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;
@@ -6808,7 +6468,7 @@ interface DataCue extends TextTrackCue {
declare var DataCue: {
prototype: DataCue;
new(): DataCue;
-}
+};
interface DataTransfer {
dropEffect: string;
@@ -6825,7 +6485,7 @@ interface DataTransfer {
declare var DataTransfer: {
prototype: DataTransfer;
new(): DataTransfer;
-}
+};
interface DataTransferItem {
readonly kind: string;
@@ -6838,7 +6498,7 @@ interface DataTransferItem {
declare var DataTransferItem: {
prototype: DataTransferItem;
new(): DataTransferItem;
-}
+};
interface DataTransferItemList {
readonly length: number;
@@ -6852,7 +6512,7 @@ interface DataTransferItemList {
declare var DataTransferItemList: {
prototype: DataTransferItemList;
new(): DataTransferItemList;
-}
+};
interface DeferredPermissionRequest {
readonly id: number;
@@ -6865,7 +6525,7 @@ interface DeferredPermissionRequest {
declare var DeferredPermissionRequest: {
prototype: DeferredPermissionRequest;
new(): DeferredPermissionRequest;
-}
+};
interface DelayNode extends AudioNode {
readonly delayTime: AudioParam;
@@ -6874,7 +6534,7 @@ interface DelayNode extends AudioNode {
declare var DelayNode: {
prototype: DelayNode;
new(): DelayNode;
-}
+};
interface DeviceAcceleration {
readonly x: number | null;
@@ -6885,7 +6545,7 @@ interface DeviceAcceleration {
declare var DeviceAcceleration: {
prototype: DeviceAcceleration;
new(): DeviceAcceleration;
-}
+};
interface DeviceLightEvent extends Event {
readonly value: number;
@@ -6894,7 +6554,7 @@ interface DeviceLightEvent extends Event {
declare var DeviceLightEvent: {
prototype: DeviceLightEvent;
new(typeArg: string, eventInitDict?: DeviceLightEventInit): DeviceLightEvent;
-}
+};
interface DeviceMotionEvent extends Event {
readonly acceleration: DeviceAcceleration | null;
@@ -6907,7 +6567,7 @@ interface DeviceMotionEvent extends Event {
declare var DeviceMotionEvent: {
prototype: DeviceMotionEvent;
new(typeArg: string, eventInitDict?: DeviceMotionEventInit): DeviceMotionEvent;
-}
+};
interface DeviceOrientationEvent extends Event {
readonly absolute: boolean;
@@ -6920,7 +6580,7 @@ interface DeviceOrientationEvent extends Event {
declare var DeviceOrientationEvent: {
prototype: DeviceOrientationEvent;
new(typeArg: string, eventInitDict?: DeviceOrientationEventInit): DeviceOrientationEvent;
-}
+};
interface DeviceRotationRate {
readonly alpha: number | null;
@@ -6931,7 +6591,7 @@ interface DeviceRotationRate {
declare var DeviceRotationRate: {
prototype: DeviceRotationRate;
new(): DeviceRotationRate;
-}
+};
interface DocumentEventMap extends GlobalEventHandlersEventMap {
"abort": UIEvent;
@@ -7026,299 +6686,291 @@ interface DocumentEventMap extends GlobalEventHandlersEventMap {
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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Gets a reference to the root node of the document.
+ */
documentElement: HTMLElement;
/**
- * Sets or gets the security domain of the document.
- */
+ * Sets or gets the security domain of the document.
+ */
domain: string;
/**
- * Retrieves a collection of all embed objects in the document.
- */
+ * Retrieves a collection of all embed objects in the document.
+ */
embeds: HTMLCollectionOf<HTMLEmbedElement>;
/**
- * Sets or gets the foreground (text) color of the document.
- */
+ * 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.
- */
+ * 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.
- */
+ * Retrieves a collection, in source order, of img objects in the document.
+ */
images: HTMLCollectionOf<HTMLImageElement>;
/**
- * Gets the implementation object of the current document.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Contains information about the current URL.
+ */
readonly location: Location;
- msCSSOMElementFloatMetrics: boolean;
msCapsLockWarningOff: boolean;
+ msCSSOMElementFloatMetrics: boolean;
/**
- * Fires when the user aborts the download.
- * @param ev The event.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ /**
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ /**
+ * 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.
- */
+ /**
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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
- */
+ * 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.
- */
+ * 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.
- */
+ * 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
- */
+ * 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.
- */
+ * 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
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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
- */
+ * 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;
@@ -7338,146 +6990,154 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven
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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Gets the root svg element in the document hierarchy.
+ */
readonly rootElement: SVGSVGElement;
/**
- * Retrieves a collection of all script objects in the document.
- */
+ * 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.
- */
+ * 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.
- */
+ * Contains the title of the document.
+ */
title: string;
+ /**
+ * 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;
readonly visibilityState: VisibilityState;
- /**
- * Sets or gets the color of the links that the user has visited.
- */
+ /**
+ * Sets or gets the color of the links that the user has visited.
+ */
vlinkColor: string;
readonly webkitCurrentFullScreenElement: Element | null;
readonly webkitFullscreenElement: Element | null;
@@ -7486,243 +7146,243 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven
readonly xmlEncoding: string | null;
xmlStandalone: boolean;
/**
- * Gets or sets the version attribute specified in the declaration of an XML document.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Creates a comment object with the specified data.
+ * @param data Sets the comment object's data.
+ */
createComment(data: string): Comment;
/**
- * Creates a new document.
- */
+ * Creates a new document.
+ */
createDocumentFragment(): DocumentFragment;
/**
- * Creates an instance of the element for the specified tag.
- * @param tagName The name of an element.
- */
+ * 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: "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.
- */
+ * 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;
+ createNSResolver(nodeResolver: Node): XPathNSResolver;
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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ /**
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -7731,7 +7391,7 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven
declare var Document: {
prototype: Document;
new(): Document;
-}
+};
interface DocumentFragment extends Node, NodeSelector, ParentNode {
getElementById(elementId: string): HTMLElement | null;
@@ -7740,7 +7400,7 @@ interface DocumentFragment extends Node, NodeSelector, ParentNode {
declare var DocumentFragment: {
prototype: DocumentFragment;
new(): DocumentFragment;
-}
+};
interface DocumentType extends Node, ChildNode {
readonly entities: NamedNodeMap;
@@ -7754,8 +7414,151 @@ interface DocumentType extends Node, ChildNode {
declare var DocumentType: {
prototype: DocumentType;
new(): DocumentType;
+};
+
+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 NO_DATA_ALLOWED_ERR: number;
+ readonly NO_MODIFICATION_ALLOWED_ERR: number;
+ readonly NOT_FOUND_ERR: number;
+ readonly NOT_SUPPORTED_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 NO_DATA_ALLOWED_ERR: number;
+ readonly NO_MODIFICATION_ALLOWED_ERR: number;
+ readonly NOT_FOUND_ERR: number;
+ readonly NOT_SUPPORTED_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;
+ toggle(token: string, force?: boolean): boolean;
+ toString(): string;
+ [index: number]: string;
+}
+
+declare var DOMTokenList: {
+ prototype: DOMTokenList;
+ new(): DOMTokenList;
+};
+
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;
@@ -7764,8 +7567,8 @@ interface DragEvent extends MouseEvent {
declare var DragEvent: {
prototype: DragEvent;
- new(): DragEvent;
-}
+ new(type: "drag" | "dragend" | "dragenter" | "dragexit" | "dragleave" | "dragover" | "dragstart" | "drop", dragEventInit?: { dataTransfer?: DataTransfer }): DragEvent;
+};
interface DynamicsCompressorNode extends AudioNode {
readonly attack: AudioParam;
@@ -7779,27 +7582,7 @@ interface DynamicsCompressorNode extends AudioNode {
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;
@@ -7880,9 +7663,9 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec
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;
+ getAttributeNS(namespaceURI: string, localName: string): string;
getBoundingClientRect(): ClientRect;
getClientRects(): ClientRectList;
getElementsByTagName<K extends keyof ElementListTagNameMap>(name: K): ElementListTagNameMap[K];
@@ -7900,18 +7683,18 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec
msZoomTo(args: MsZoomToOptions): void;
releasePointerCapture(pointerId: number): void;
removeAttribute(qualifiedName: string): void;
- removeAttributeNS(namespaceURI: string, localName: string): void;
removeAttributeNode(oldAttr: Attr): Attr;
+ removeAttributeNS(namespaceURI: string, localName: string): void;
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;
+ setAttributeNS(namespaceURI: string, qualifiedName: string, value: string): void;
setPointerCapture(pointerId: number): void;
webkitMatchesSelector(selectors: string): boolean;
- webkitRequestFullScreen(): void;
webkitRequestFullscreen(): void;
+ webkitRequestFullScreen(): void;
getElementsByClassName(classNames: string): NodeListOf<Element>;
matches(selector: string): boolean;
closest(selector: string): Element | null;
@@ -7922,9 +7705,9 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec
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;
+ insertAdjacentElement(position: InsertPosition, insertedElement: Element): Element | null;
+ insertAdjacentHTML(where: InsertPosition, html: string): void;
+ insertAdjacentText(where: InsertPosition, 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;
@@ -7933,7 +7716,7 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec
declare var Element: {
prototype: Element;
new(): Element;
-}
+};
interface ErrorEvent extends Event {
readonly colno: number;
@@ -7947,12 +7730,12 @@ interface ErrorEvent extends Event {
declare var ErrorEvent: {
prototype: ErrorEvent;
new(type: string, errorEventInitDict?: ErrorEventInit): ErrorEvent;
-}
+};
interface Event {
readonly bubbles: boolean;
- cancelBubble: boolean;
readonly cancelable: boolean;
+ cancelBubble: boolean;
readonly currentTarget: EventTarget;
readonly defaultPrevented: boolean;
readonly eventPhase: number;
@@ -7979,7 +7762,7 @@ declare var Event: {
readonly AT_TARGET: number;
readonly BUBBLING_PHASE: number;
readonly CAPTURING_PHASE: number;
-}
+};
interface EventTarget {
addEventListener(type: string, listener?: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
@@ -7990,8 +7773,28 @@ interface EventTarget {
declare var EventTarget: {
prototype: EventTarget;
new(): EventTarget;
+};
+
+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 ExtensionScriptApis {
extensionIdToShortId(extensionId: string): number;
fireExtensionApiTelemetry(functionName: string, isSucceeded: boolean, isSupported: boolean): void;
@@ -8005,7 +7808,7 @@ interface ExtensionScriptApis {
declare var ExtensionScriptApis: {
prototype: ExtensionScriptApis;
new(): ExtensionScriptApis;
-}
+};
interface External {
}
@@ -8013,7 +7816,7 @@ interface External {
declare var External: {
prototype: External;
new(): External;
-}
+};
interface File extends Blob {
readonly lastModifiedDate: any;
@@ -8024,7 +7827,7 @@ interface File extends Blob {
declare var File: {
prototype: File;
new (parts: (ArrayBuffer | ArrayBufferView | Blob | string)[], filename: string, properties?: FilePropertyBag): File;
-}
+};
interface FileList {
readonly length: number;
@@ -8035,7 +7838,7 @@ interface FileList {
declare var FileList: {
prototype: FileList;
new(): FileList;
-}
+};
interface FileReader extends EventTarget, MSBaseReader {
readonly error: DOMError;
@@ -8050,7 +7853,7 @@ interface FileReader extends EventTarget, MSBaseReader {
declare var FileReader: {
prototype: FileReader;
new(): FileReader;
-}
+};
interface FocusEvent extends UIEvent {
readonly relatedTarget: EventTarget;
@@ -8060,7 +7863,7 @@ interface FocusEvent extends UIEvent {
declare var FocusEvent: {
prototype: FocusEvent;
new(typeArg: string, eventInitDict?: FocusEventInit): FocusEvent;
-}
+};
interface FocusNavigationEvent extends Event {
readonly navigationReason: NavigationReason;
@@ -8074,7 +7877,7 @@ interface FocusNavigationEvent extends Event {
declare var FocusNavigationEvent: {
prototype: FocusNavigationEvent;
new(type: string, eventInitDict?: FocusNavigationEventInit): FocusNavigationEvent;
-}
+};
interface FormData {
append(name: string, value: string | Blob, fileName?: string): void;
@@ -8088,7 +7891,7 @@ interface FormData {
declare var FormData: {
prototype: FormData;
new (form?: HTMLFormElement): FormData;
-}
+};
interface GainNode extends AudioNode {
readonly gain: AudioParam;
@@ -8097,7 +7900,7 @@ interface GainNode extends AudioNode {
declare var GainNode: {
prototype: GainNode;
new(): GainNode;
-}
+};
interface Gamepad {
readonly axes: number[];
@@ -8112,7 +7915,7 @@ interface Gamepad {
declare var Gamepad: {
prototype: Gamepad;
new(): Gamepad;
-}
+};
interface GamepadButton {
readonly pressed: boolean;
@@ -8122,7 +7925,7 @@ interface GamepadButton {
declare var GamepadButton: {
prototype: GamepadButton;
new(): GamepadButton;
-}
+};
interface GamepadEvent extends Event {
readonly gamepad: Gamepad;
@@ -8131,7 +7934,7 @@ interface GamepadEvent extends Event {
declare var GamepadEvent: {
prototype: GamepadEvent;
new(typeArg: string, eventInitDict?: GamepadEventInit): GamepadEvent;
-}
+};
interface Geolocation {
clearWatch(watchId: number): void;
@@ -8142,8 +7945,48 @@ interface Geolocation {
declare var Geolocation: {
prototype: Geolocation;
new(): Geolocation;
+};
+
+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 HTMLAllCollection {
readonly length: number;
item(nameOrIndex?: string): HTMLCollection | Element | null;
@@ -8154,87 +7997,87 @@ interface HTMLAllCollection {
declare var HTMLAllCollection: {
prototype: HTMLAllCollection;
new(): HTMLAllCollection;
-}
+};
interface HTMLAnchorElement extends HTMLElement {
- Methods: string;
/**
- * Sets or retrieves the character set used to encode the object.
- */
+ * Sets or retrieves the character set used to encode the object.
+ */
charset: string;
/**
- * Sets or retrieves the coordinates of the object.
- */
+ * Sets or retrieves the coordinates of the object.
+ */
coords: string;
download: string;
/**
- * Contains the anchor portion of the URL including the hash sign (#).
- */
+ * Contains the anchor portion of the URL including the hash sign (#).
+ */
hash: string;
/**
- * Contains the hostname and port values of the URL.
- */
+ * Contains the hostname and port values of the URL.
+ */
host: string;
/**
- * Contains the hostname of a URL.
- */
+ * Contains the hostname of a URL.
+ */
hostname: string;
/**
- * Sets or retrieves a destination URL or an anchor point.
- */
+ * Sets or retrieves a destination URL or an anchor point.
+ */
href: string;
/**
- * Sets or retrieves the language code of the object.
- */
+ * Sets or retrieves the language code of the object.
+ */
hreflang: string;
+ Methods: string;
readonly mimeType: string;
/**
- * Sets or retrieves the shape of the object.
- */
+ * Sets or retrieves the shape of the object.
+ */
name: string;
readonly nameProp: string;
/**
- * Contains the pathname of the URL.
- */
+ * Contains the pathname of the URL.
+ */
pathname: string;
/**
- * Sets or retrieves the port number associated with a URL.
- */
+ * Sets or retrieves the port number associated with a URL.
+ */
port: string;
/**
- * Contains the protocol of the URL.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the substring of the href property that follows the question mark.
+ */
search: string;
/**
- * Sets or retrieves the shape of the object.
- */
+ * Sets or retrieves the shape of the object.
+ */
shape: string;
/**
- * Sets or retrieves the window or frame at which to target content.
- */
+ * 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.
- */
+ * Retrieves or sets the text of the object as a string.
+ */
text: string;
type: string;
urn: string;
- /**
- * Returns a string representation of an object.
- */
+ /**
+ * 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;
@@ -8243,70 +8086,70 @@ interface HTMLAnchorElement extends HTMLElement {
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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves a character string that can be used to implement your own archive functionality for the object.
+ */
archive: string;
+ /**
+ * 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;
border: string;
code: string;
/**
- * Sets or retrieves the URL of the component.
- */
+ * Sets or retrieves the URL of the component.
+ */
codeBase: string;
/**
- * Sets or retrieves the Internet media type for the code associated with the object.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the height of the object.
+ */
height: string;
hspace: number;
/**
- * Sets or retrieves the shape of the object.
- */
+ * 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.
- */
+ * Sets or retrieves a message to be displayed while an object is loading.
+ */
standby: string;
/**
- * Returns the content type of the object.
- */
+ * 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.
- */
+ * 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;
@@ -8317,66 +8160,66 @@ interface HTMLAppletElement extends HTMLElement {
declare var HTMLAppletElement: {
prototype: HTMLAppletElement;
new(): HTMLAppletElement;
-}
+};
interface HTMLAreaElement extends HTMLElement {
/**
- * Sets or retrieves a text alternative to the graphic.
- */
+ * Sets or retrieves a text alternative to the graphic.
+ */
alt: string;
/**
- * Sets or retrieves the coordinates of the object.
- */
+ * 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 (#).
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the host name part of the location or URL.
+ */
hostname: string;
/**
- * Sets or retrieves a destination URL or an anchor point.
- */
+ * Sets or retrieves a destination URL or an anchor point.
+ */
href: string;
/**
- * Sets or gets whether clicks in this region cause action.
- */
+ * Sets or gets whether clicks in this region cause action.
+ */
noHref: boolean;
/**
- * Sets or retrieves the file name or path specified by the object.
- */
+ * Sets or retrieves the file name or path specified by the object.
+ */
pathname: string;
/**
- * Sets or retrieves the port number associated with a URL.
- */
+ * Sets or retrieves the port number associated with a URL.
+ */
port: string;
/**
- * Sets or retrieves the protocol portion of a URL.
- */
+ * 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.
- */
+ * Sets or retrieves the substring of the href property that follows the question mark.
+ */
search: string;
/**
- * Sets or retrieves the shape of the object.
- */
+ * Sets or retrieves the shape of the object.
+ */
shape: string;
/**
- * Sets or retrieves the window or frame at which to target content.
- */
+ * Sets or retrieves the window or frame at which to target content.
+ */
target: string;
- /**
- * Returns a string representation of an object.
- */
+ /**
+ * 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;
@@ -8385,7 +8228,7 @@ interface HTMLAreaElement extends HTMLElement {
declare var HTMLAreaElement: {
prototype: HTMLAreaElement;
new(): HTMLAreaElement;
-}
+};
interface HTMLAreasCollection extends HTMLCollectionBase {
}
@@ -8393,7 +8236,7 @@ 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;
@@ -8403,30 +8246,16 @@ interface HTMLAudioElement extends HTMLMediaElement {
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.
- */
+ * 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.
- */
+ * 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;
@@ -8435,16 +8264,16 @@ interface HTMLBaseElement extends HTMLElement {
declare var HTMLBaseElement: {
prototype: HTMLBaseElement;
new(): HTMLBaseElement;
-}
+};
interface HTMLBaseFontElement extends HTMLElement, DOML2DeprecatedColorProperty {
/**
- * Sets or retrieves the current typeface family.
- */
+ * Sets or retrieves the current typeface family.
+ */
face: string;
/**
- * Sets or retrieves the font size of the object.
- */
+ * 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;
@@ -8453,7 +8282,7 @@ interface HTMLBaseFontElement extends HTMLElement, DOML2DeprecatedColorProperty
declare var HTMLBaseFontElement: {
prototype: HTMLBaseFontElement;
new(): HTMLBaseFontElement;
-}
+};
interface HTMLBodyElementEventMap extends HTMLElementEventMap {
"afterprint": Event;
@@ -8512,71 +8341,85 @@ interface HTMLBodyElement extends HTMLElement {
declare var HTMLBodyElement: {
prototype: HTMLBodyElement;
new(): HTMLBodyElement;
+};
+
+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 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Overrides the target attribute on a form element.
+ */
formTarget: string;
- /**
- * Sets or retrieves the name of the object.
- */
+ /**
+ * Sets or retrieves the name of the object.
+ */
name: string;
status: any;
/**
- * Gets the classification and default behavior of the button.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ /**
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -8585,32 +8428,32 @@ interface HTMLButtonElement extends HTMLElement {
declare var HTMLButtonElement: {
prototype: HTMLButtonElement;
new(): HTMLButtonElement;
-}
+};
interface HTMLCanvasElement extends HTMLElement {
/**
- * Gets or sets the height of a canvas element on a document.
- */
+ * 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.
- */
+ * 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");
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -8620,42 +8463,31 @@ interface HTMLCanvasElement extends HTMLElement {
declare var HTMLCanvasElement: {
prototype: HTMLCanvasElement;
new(): HTMLCanvasElement;
-}
+};
interface HTMLCollectionBase {
/**
- * Sets or retrieves the number of objects in a collection.
- */
+ * Sets or retrieves the number of objects in a collection.
+ */
readonly length: number;
/**
- * Retrieves an object from various collections.
- */
+ * 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.
- */
+ * 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;
@@ -8666,7 +8498,7 @@ interface HTMLDataElement extends HTMLElement {
declare var HTMLDataElement: {
prototype: HTMLDataElement;
new(): HTMLDataElement;
-}
+};
interface HTMLDataListElement extends HTMLElement {
options: HTMLCollectionOf<HTMLOptionElement>;
@@ -8677,7 +8509,7 @@ interface HTMLDataListElement extends HTMLElement {
declare var HTMLDataListElement: {
prototype: HTMLDataListElement;
new(): HTMLDataListElement;
-}
+};
interface HTMLDirectoryElement extends HTMLElement {
compact: boolean;
@@ -8688,16 +8520,16 @@ interface HTMLDirectoryElement extends HTMLElement {
declare var HTMLDirectoryElement: {
prototype: HTMLDirectoryElement;
new(): HTMLDirectoryElement;
-}
+};
interface HTMLDivElement extends HTMLElement {
/**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
+ * Sets or retrieves how the object is aligned with adjacent text.
+ */
align: string;
/**
- * Sets or retrieves whether the browser automatically performs wordwrap.
- */
+ * 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;
@@ -8706,8 +8538,19 @@ interface HTMLDivElement extends HTMLElement {
declare var HTMLDivElement: {
prototype: HTMLDivElement;
new(): HTMLDivElement;
+};
+
+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 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;
@@ -8716,7 +8559,7 @@ interface HTMLDocument extends Document {
declare var HTMLDocument: {
prototype: HTMLDocument;
new(): HTMLDocument;
-}
+};
interface HTMLElementEventMap extends ElementEventMap {
"abort": UIEvent;
@@ -8889,54 +8732,54 @@ interface HTMLElement extends Element {
declare var HTMLElement: {
prototype: HTMLElement;
new(): HTMLElement;
-}
+};
interface HTMLEmbedElement extends HTMLElement, GetSVGDocument {
/**
- * Sets or retrieves the height of the object.
- */
+ * Sets or retrieves the height of the object.
+ */
height: string;
hidden: any;
/**
- * Gets or sets whether the DLNA PlayTo device is available.
- */
+ * 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.
- */
+ * 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.
- */
+ * Gets or sets the primary DLNA PlayTo device.
+ */
msPlayToPrimary: boolean;
/**
- * Gets the source associated with the media element for use by the PlayToManager.
- */
+ * Gets the source associated with the media element for use by the PlayToManager.
+ */
readonly msPlayToSource: any;
/**
- * Sets or retrieves the name of the object.
- */
+ * Sets or retrieves the name of the object.
+ */
name: string;
/**
- * Retrieves the palette used for the embedded document.
- */
+ * Retrieves the palette used for the embedded document.
+ */
readonly palette: string;
/**
- * Retrieves the URL of the plug-in used to view an embedded document.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the height and width units of the embed object.
+ */
units: string;
/**
- * Sets or retrieves the width of the object.
- */
+ * 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;
@@ -8945,39 +8788,39 @@ interface HTMLEmbedElement extends HTMLElement, GetSVGDocument {
declare var HTMLEmbedElement: {
prototype: HTMLEmbedElement;
new(): HTMLEmbedElement;
-}
+};
interface HTMLFieldSetElement extends HTMLElement {
/**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -8986,12 +8829,12 @@ interface HTMLFieldSetElement extends HTMLElement {
declare var HTMLFieldSetElement: {
prototype: HTMLFieldSetElement;
new(): HTMLFieldSetElement;
-}
+};
interface HTMLFontElement extends HTMLElement, DOML2DeprecatedColorProperty, DOML2DeprecatedSizeProperty {
/**
- * Sets or retrieves the current typeface family.
- */
+ * 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;
@@ -9000,7 +8843,7 @@ interface HTMLFontElement extends HTMLElement, DOML2DeprecatedColorProperty, DOM
declare var HTMLFontElement: {
prototype: HTMLFontElement;
new(): HTMLFontElement;
-}
+};
interface HTMLFormControlsCollection extends HTMLCollectionBase {
namedItem(name: string): HTMLCollection | Element | null;
@@ -9009,74 +8852,74 @@ interface HTMLFormControlsCollection extends HTMLCollectionBase {
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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the MIME encoding for the form.
+ */
encoding: string;
/**
- * Sets or retrieves the encoding type for the form.
- */
+ * Sets or retrieves the encoding type for the form.
+ */
enctype: string;
/**
- * Sets or retrieves the number of objects in a collection.
- */
+ * 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.
- */
+ * Sets or retrieves how to send the form data to the server.
+ */
method: string;
/**
- * Sets or retrieves the name of the object.
- */
+ * Sets or retrieves the name of the object.
+ */
name: string;
/**
- * Designates a form that is not validated when submitted.
- */
+ * Designates a form that is not validated when submitted.
+ */
noValidate: boolean;
/**
- * Sets or retrieves the window or frame at which to target content.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Retrieves a form object or an object from an elements collection.
+ */
namedItem(name: string): any;
/**
- * Fires when the user resets a form.
- */
+ * Fires when the user resets a form.
+ */
reset(): void;
/**
- * Fires when a FORM is about to be submitted.
- */
+ * 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;
@@ -9086,7 +8929,7 @@ interface HTMLFormElement extends HTMLElement {
declare var HTMLFormElement: {
prototype: HTMLFormElement;
new(): HTMLFormElement;
-}
+};
interface HTMLFrameElementEventMap extends HTMLElementEventMap {
"load": Event;
@@ -9094,68 +8937,68 @@ interface HTMLFrameElementEventMap extends HTMLElementEventMap {
interface HTMLFrameElement extends HTMLElement, GetSVGDocument {
/**
- * Specifies the properties of a border drawn around an object.
- */
+ * Specifies the properties of a border drawn around an object.
+ */
border: string;
/**
- * Sets or retrieves the border color of the object.
- */
+ * Sets or retrieves the border color of the object.
+ */
borderColor: any;
/**
- * Retrieves the document object of the page or frame.
- */
+ * Retrieves the document object of the page or frame.
+ */
readonly contentDocument: Document;
/**
- * Retrieves the object of the specified.
- */
+ * Retrieves the object of the specified.
+ */
readonly contentWindow: Window;
/**
- * Sets or retrieves whether to display a border for the frame.
- */
+ * Sets or retrieves whether to display a border for the frame.
+ */
frameBorder: string;
/**
- * Sets or retrieves the amount of additional space between the frames.
- */
+ * Sets or retrieves the amount of additional space between the frames.
+ */
frameSpacing: any;
/**
- * Sets or retrieves the height of the object.
- */
+ * Sets or retrieves the height of the object.
+ */
height: string | number;
/**
- * Sets or retrieves a URI to a long description of the object.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the left and right margin widths before displaying the text in a frame.
+ */
marginWidth: string;
/**
- * Sets or retrieves the frame name.
- */
+ * Sets or retrieves the frame name.
+ */
name: string;
/**
- * Sets or retrieves whether the user can resize the frame.
- */
+ * Sets or retrieves whether the user can resize the frame.
+ */
noResize: boolean;
/**
- * Raised when the object has been completely received from the server.
- */
+ * 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.
- */
+ * Sets or retrieves whether the frame can be scrolled.
+ */
scrolling: string;
/**
- * Sets or retrieves a URL to be loaded by the object.
- */
+ * Sets or retrieves a URL to be loaded by the object.
+ */
src: string;
/**
- * Sets or retrieves the width of the object.
- */
+ * 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;
@@ -9164,7 +9007,7 @@ interface HTMLFrameElement extends HTMLElement, GetSVGDocument {
declare var HTMLFrameElement: {
prototype: HTMLFrameElement;
new(): HTMLFrameElement;
-}
+};
interface HTMLFrameSetElementEventMap extends HTMLElementEventMap {
"afterprint": Event;
@@ -9191,33 +9034,33 @@ interface HTMLFrameSetElementEventMap extends HTMLElementEventMap {
interface HTMLFrameSetElement extends HTMLElement {
border: string;
/**
- * Sets or retrieves the border color of the object.
- */
+ * Sets or retrieves the border color of the object.
+ */
borderColor: any;
/**
- * Sets or retrieves the frame widths of the object.
- */
+ * Sets or retrieves the frame widths of the object.
+ */
cols: string;
/**
- * Sets or retrieves whether to display a border for the frame.
- */
+ * Sets or retrieves whether to display a border for the frame.
+ */
frameBorder: string;
/**
- * Sets or retrieves the amount of additional space between the frames.
- */
+ * 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.
- */
+ * 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.
- */
+ * Fires when the object receives focus.
+ */
onfocus: (this: HTMLFrameSetElement, ev: FocusEvent) => any;
onhashchange: (this: HTMLFrameSetElement, ev: HashChangeEvent) => any;
onload: (this: HTMLFrameSetElement, ev: Event) => any;
@@ -9233,8 +9076,8 @@ interface HTMLFrameSetElement extends HTMLElement {
onstorage: (this: HTMLFrameSetElement, ev: StorageEvent) => any;
onunload: (this: HTMLFrameSetElement, ev: Event) => any;
/**
- * Sets or retrieves the frame heights of the object.
- */
+ * 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;
@@ -9243,29 +9086,7 @@ interface HTMLFrameSetElement extends HTMLElement {
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;
@@ -9276,12 +9097,12 @@ interface HTMLHeadElement extends HTMLElement {
declare var HTMLHeadElement: {
prototype: HTMLHeadElement;
new(): HTMLHeadElement;
-}
+};
interface HTMLHeadingElement extends HTMLElement {
/**
- * Sets or retrieves a value that indicates the table alignment.
- */
+ * 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;
@@ -9290,12 +9111,34 @@ interface HTMLHeadingElement extends HTMLElement {
declare var HTMLHeadingElement: {
prototype: HTMLHeadingElement;
new(): HTMLHeadingElement;
+};
+
+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 HTMLHtmlElement extends HTMLElement {
/**
- * Sets or retrieves the DTD version that governs the current document.
- */
+ * 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;
@@ -9304,7 +9147,7 @@ interface HTMLHtmlElement extends HTMLElement {
declare var HTMLHtmlElement: {
prototype: HTMLHtmlElement;
new(): HTMLHtmlElement;
-}
+};
interface HTMLIFrameElementEventMap extends HTMLElementEventMap {
"load": Event;
@@ -9312,79 +9155,79 @@ interface HTMLIFrameElementEventMap extends HTMLElementEventMap {
interface HTMLIFrameElement extends HTMLElement, GetSVGDocument {
/**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
+ * 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.
- */
+ * Specifies the properties of a border drawn around an object.
+ */
border: string;
/**
- * Retrieves the document object of the page or frame.
- */
+ * Retrieves the document object of the page or frame.
+ */
readonly contentDocument: Document;
/**
- * Retrieves the object of the specified.
- */
+ * Retrieves the object of the specified.
+ */
readonly contentWindow: Window;
/**
- * Sets or retrieves whether to display a border for the frame.
- */
+ * Sets or retrieves whether to display a border for the frame.
+ */
frameBorder: string;
/**
- * Sets or retrieves the amount of additional space between the frames.
- */
+ * Sets or retrieves the amount of additional space between the frames.
+ */
frameSpacing: any;
/**
- * Sets or retrieves the height of the object.
- */
+ * Sets or retrieves the height of the object.
+ */
height: string;
/**
- * Sets or retrieves the horizontal margin for the object.
- */
+ * Sets or retrieves the horizontal margin for the object.
+ */
hspace: number;
/**
- * Sets or retrieves a URI to a long description of the object.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the left and right margin widths before displaying the text in a frame.
+ */
marginWidth: string;
/**
- * Sets or retrieves the frame name.
- */
+ * Sets or retrieves the frame name.
+ */
name: string;
/**
- * Sets or retrieves whether the user can resize the frame.
- */
+ * Sets or retrieves whether the user can resize the frame.
+ */
noResize: boolean;
/**
- * Raised when the object has been completely received from the server.
- */
+ * 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.
- */
+ * Sets or retrieves whether the frame can be scrolled.
+ */
scrolling: string;
/**
- * Sets or retrieves a URL to be loaded by the object.
- */
+ * Sets or retrieves a URL to be loaded by the object.
+ */
src: string;
/**
- * Sets or retrieves the vertical margin for the object.
- */
+ * Sets or retrieves the vertical margin for the object.
+ */
vspace: number;
/**
- * Sets or retrieves the width of the object.
- */
+ * 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;
@@ -9393,86 +9236,86 @@ interface HTMLIFrameElement extends HTMLElement, GetSVGDocument {
declare var HTMLIFrameElement: {
prototype: HTMLIFrameElement;
new(): HTMLIFrameElement;
-}
+};
interface HTMLImageElement extends HTMLElement {
/**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
+ * Sets or retrieves how the object is aligned with adjacent text.
+ */
align: string;
/**
- * Sets or retrieves a text alternative to the graphic.
- */
+ * Sets or retrieves a text alternative to the graphic.
+ */
alt: string;
/**
- * Specifies the properties of a border drawn around an object.
- */
+ * Specifies the properties of a border drawn around an object.
+ */
border: string;
/**
- * Retrieves whether the object is fully loaded.
- */
+ * Retrieves whether the object is fully loaded.
+ */
readonly complete: boolean;
crossOrigin: string | null;
readonly currentSrc: string;
/**
- * Sets or retrieves the height of the object.
- */
+ * Sets or retrieves the height of the object.
+ */
height: number;
/**
- * Sets or retrieves the width of the border to draw around the object.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Gets or sets whether the DLNA PlayTo device is available.
+ */
msPlayToDisabled: boolean;
msPlayToPreferredSourceUri: string;
/**
- * Gets or sets the primary DLNA PlayTo device.
- */
+ * Gets or sets the primary DLNA PlayTo device.
+ */
msPlayToPrimary: boolean;
/**
- * Gets the source associated with the media element for use by the PlayToManager.
- */
+ * Gets the source associated with the media element for use by the PlayToManager.
+ */
readonly msPlayToSource: any;
/**
- * Sets or retrieves the name of the object.
- */
+ * Sets or retrieves the name of the object.
+ */
name: string;
/**
- * The original height of the image resource before sizing.
- */
+ * The original height of the image resource before sizing.
+ */
readonly naturalHeight: number;
/**
- * The original width of the image resource before sizing.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the vertical margin for the object.
+ */
vspace: number;
/**
- * Sets or retrieves the width of the object.
- */
+ * Sets or retrieves the width of the object.
+ */
width: number;
readonly x: number;
readonly y: number;
@@ -9484,210 +9327,210 @@ interface HTMLImageElement extends HTMLElement {
declare var HTMLImageElement: {
prototype: HTMLImageElement;
new(): HTMLImageElement;
-}
+};
interface HTMLInputElement extends HTMLElement {
/**
- * Sets or retrieves a comma-separated list of content types.
- */
+ * Sets or retrieves a comma-separated list of content types.
+ */
accept: string;
/**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
+ * Sets or retrieves how the object is aligned with adjacent text.
+ */
align: string;
/**
- * Sets or retrieves a text alternative to the graphic.
- */
+ * Sets or retrieves a text alternative to the graphic.
+ */
alt: string;
/**
- * Specifies whether autocomplete is applied to an editable text field.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the state of the check box or radio button.
+ */
checked: boolean;
/**
- * Retrieves whether the object is fully loaded.
- */
+ * Retrieves whether the object is fully loaded.
+ */
readonly complete: boolean;
/**
- * Sets or retrieves the state of the check box or radio button.
- */
+ * Sets or retrieves the state of the check box or radio button.
+ */
defaultChecked: boolean;
/**
- * Sets or retrieves the initial contents of the object.
- */
+ * Sets or retrieves the initial contents of the object.
+ */
defaultValue: string;
disabled: boolean;
/**
- * Returns a FileList object on a file type input object.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Overrides the target attribute on a form element.
+ */
formTarget: string;
/**
- * Sets or retrieves the height of the object.
- */
+ * Sets or retrieves the height of the object.
+ */
height: string;
/**
- * Sets or retrieves the width of the border to draw around the object.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Returns the value of the data at the cursor's current position.
+ */
value: string;
valueAsDate: Date;
/**
- * Returns the input field value as a number.
- */
+ * Returns the input field value as a number.
+ */
valueAsNumber: number;
/**
- * Sets or retrieves the vertical margin for the object.
- */
+ * Sets or retrieves the vertical margin for the object.
+ */
vspace: number;
webkitdirectory: boolean;
/**
- * Sets or retrieves the width of the object.
- */
+ * Sets or retrieves the width of the object.
+ */
width: string;
/**
- * Returns whether an element will successfully validate based on forms validation rules and constraints.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -9696,31 +9539,16 @@ interface HTMLInputElement extends HTMLElement {
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.
- */
+ * 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.
- */
+ * 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;
@@ -9729,16 +9557,16 @@ interface HTMLLabelElement extends HTMLElement {
declare var HTMLLabelElement: {
prototype: HTMLLabelElement;
new(): HTMLLabelElement;
-}
+};
interface HTMLLegendElement extends HTMLElement {
/**
- * Retrieves a reference to the form that the object is embedded in.
- */
+ * 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.
- */
+ * 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;
@@ -9747,41 +9575,56 @@ interface HTMLLegendElement extends HTMLElement {
declare var HTMLLegendElement: {
prototype: HTMLLegendElement;
new(): HTMLLegendElement;
+};
+
+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 HTMLLinkElement extends HTMLElement, LinkStyle {
/**
- * Sets or retrieves the character set used to encode the object.
- */
+ * 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.
- */
+ * Sets or retrieves a destination URL or an anchor point.
+ */
href: string;
/**
- * Sets or retrieves the language code of the object.
- */
+ * Sets or retrieves the language code of the object.
+ */
hreflang: string;
/**
- * Sets or retrieves the media type.
- */
+ * Sets or retrieves the media type.
+ */
media: string;
/**
- * Sets or retrieves the relationship between the object and the destination of the link.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the window or frame at which to target content.
+ */
target: string;
/**
- * Sets or retrieves the MIME type of the object.
- */
+ * Sets or retrieves the MIME type of the object.
+ */
type: string;
import?: Document;
integrity: string;
@@ -9792,16 +9635,16 @@ interface HTMLLinkElement extends HTMLElement, LinkStyle {
declare var HTMLLinkElement: {
prototype: HTMLLinkElement;
new(): HTMLLinkElement;
-}
+};
interface HTMLMapElement extends HTMLElement {
/**
- * Retrieves a collection of the area objects defined for the given map object.
- */
+ * Retrieves a collection of the area objects defined for the given map object.
+ */
readonly areas: HTMLAreasCollection;
/**
- * Sets or retrieves the name of the object.
- */
+ * 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;
@@ -9810,7 +9653,7 @@ interface HTMLMapElement extends HTMLElement {
declare var HTMLMapElement: {
prototype: HTMLMapElement;
new(): HTMLMapElement;
-}
+};
interface HTMLMarqueeElementEventMap extends HTMLElementEventMap {
"bounce": Event;
@@ -9842,7 +9685,7 @@ interface HTMLMarqueeElement extends HTMLElement {
declare var HTMLMarqueeElement: {
prototype: HTMLMarqueeElement;
new(): HTMLMarqueeElement;
-}
+};
interface HTMLMediaElementEventMap extends HTMLElementEventMap {
"encrypted": MediaEncryptedEvent;
@@ -9851,162 +9694,162 @@ interface HTMLMediaElementEventMap extends HTMLElementEventMap {
interface HTMLMediaElement extends HTMLElement {
/**
- * Returns an AudioTrackList object with the audio tracks for a given video element.
- */
+ * 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.
- */
+ * Gets or sets a value that indicates whether to start playing the media automatically.
+ */
autoplay: boolean;
/**
- * Gets a collection of buffered time ranges.
- */
+ * 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).
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Gets or sets the primary DLNA PlayTo device.
+ */
msPlayToPrimary: boolean;
/**
- * Gets the source associated with the media element for use by the PlayToManager.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Gets TimeRanges for the current media resource that has been played.
+ */
readonly played: TimeRanges;
/**
- * Gets or sets the current playback position, in seconds.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Resets the audio or video object and loads a new media resource.
+ */
load(): void;
/**
- * Clears all effects from the media pipeline.
- */
+ * Clears all effects from the media pipeline.
+ */
msClearEffects(): void;
msGetAsCastingSource(): any;
/**
- * Inserts the specified audio effect into media pipeline.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
+ * Loads and starts playback of a media resource.
+ */
+ play(): Promise<void>;
setMediaKeys(mediaKeys: MediaKeys | null): Promise<void>;
readonly HAVE_CURRENT_DATA: number;
readonly HAVE_ENOUGH_DATA: number;
@@ -10033,7 +9876,7 @@ declare var HTMLMediaElement: {
readonly NETWORK_IDLE: number;
readonly NETWORK_LOADING: number;
readonly NETWORK_NO_SOURCE: number;
-}
+};
interface HTMLMenuElement extends HTMLElement {
compact: boolean;
@@ -10045,32 +9888,32 @@ interface HTMLMenuElement extends HTMLElement {
declare var HTMLMenuElement: {
prototype: HTMLMenuElement;
new(): HTMLMenuElement;
-}
+};
interface HTMLMetaElement extends HTMLElement {
/**
- * Sets or retrieves the character set used to encode the object.
- */
+ * Sets or retrieves the character set used to encode the object.
+ */
charset: string;
/**
- * Gets or sets meta-information to associate with httpEquiv or name.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -10079,7 +9922,7 @@ interface HTMLMetaElement extends HTMLElement {
declare var HTMLMetaElement: {
prototype: HTMLMetaElement;
new(): HTMLMetaElement;
-}
+};
interface HTMLMeterElement extends HTMLElement {
high: number;
@@ -10095,16 +9938,16 @@ interface HTMLMeterElement extends HTMLElement {
declare var HTMLMeterElement: {
prototype: HTMLMeterElement;
new(): HTMLMeterElement;
-}
+};
interface HTMLModElement extends HTMLElement {
/**
- * Sets or retrieves reference information about the object.
- */
+ * Sets or retrieves reference information about the object.
+ */
cite: string;
/**
- * Sets or retrieves the date and time of a modification to the object.
- */
+ * 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;
@@ -10113,131 +9956,115 @@ interface HTMLModElement extends HTMLElement {
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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves a character string that can be used to implement your own archive functionality for the object.
+ */
archive: string;
+ /**
+ * 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;
border: string;
/**
- * Sets or retrieves the URL of the file containing the compiled Java class.
- */
+ * Sets or retrieves the URL of the file containing the compiled Java class.
+ */
code: string;
/**
- * Sets or retrieves the URL of the component.
- */
+ * Sets or retrieves the URL of the component.
+ */
codeBase: string;
/**
- * Sets or retrieves the Internet media type for the code associated with the object.
- */
+ * 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.
- */
+ * Retrieves the document object of the page or frame.
+ */
readonly contentDocument: Document;
/**
- * Sets or retrieves the URL that references the data of the object.
- */
+ * 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.
- */
+ * Retrieves a reference to the form that the object is embedded in.
+ */
readonly form: HTMLFormElement;
/**
- * Sets or retrieves the height of the object.
- */
+ * Sets or retrieves the height of the object.
+ */
height: string;
hspace: number;
/**
- * Gets or sets whether the DLNA PlayTo device is available.
- */
+ * 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.
- */
+ * 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.
- */
+ * Gets or sets the primary DLNA PlayTo device.
+ */
msPlayToPrimary: boolean;
/**
- * Gets the source associated with the media element for use by the PlayToManager.
- */
+ * Gets the source associated with the media element for use by the PlayToManager.
+ */
readonly msPlayToSource: any;
/**
- * Sets or retrieves the name of the object.
- */
+ * 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.
- */
+ * Sets or retrieves a message to be displayed while an object is loading.
+ */
standby: string;
/**
- * Sets or retrieves the MIME type of the object.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the width of the object.
+ */
width: string;
/**
- * Returns whether an element will successfully validate based on forms validation rules and constraints.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -10246,37 +10073,53 @@ interface HTMLObjectElement extends HTMLElement, GetSVGDocument {
declare var HTMLObjectElement: {
prototype: HTMLObjectElement;
new(): HTMLObjectElement;
+};
+
+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 HTMLOptGroupElement extends HTMLElement {
/**
- * Sets or retrieves the status of an option.
- */
+ * Sets or retrieves the status of an option.
+ */
defaultSelected: boolean;
disabled: boolean;
/**
- * Retrieves a reference to the form that the object is embedded in.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -10285,37 +10128,37 @@ interface HTMLOptGroupElement extends HTMLElement {
declare var HTMLOptGroupElement: {
prototype: HTMLOptGroupElement;
new(): HTMLOptGroupElement;
-}
+};
interface HTMLOptionElement extends HTMLElement {
/**
- * Sets or retrieves the status of an option.
- */
+ * Sets or retrieves the status of an option.
+ */
defaultSelected: boolean;
disabled: boolean;
/**
- * Retrieves a reference to the form that the object is embedded in.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -10324,7 +10167,7 @@ interface HTMLOptionElement extends HTMLElement {
declare var HTMLOptionElement: {
prototype: HTMLOptionElement;
new(): HTMLOptionElement;
-}
+};
interface HTMLOptionsCollection extends HTMLCollectionOf<HTMLOptionElement> {
length: number;
@@ -10336,7 +10179,7 @@ interface HTMLOptionsCollection extends HTMLCollectionOf<HTMLOptionElement> {
declare var HTMLOptionsCollection: {
prototype: HTMLOptionsCollection;
new(): HTMLOptionsCollection;
-}
+};
interface HTMLOutputElement extends HTMLElement {
defaultValue: string;
@@ -10358,12 +10201,12 @@ interface HTMLOutputElement extends HTMLElement {
declare var HTMLOutputElement: {
prototype: HTMLOutputElement;
new(): HTMLOutputElement;
-}
+};
interface HTMLParagraphElement extends HTMLElement {
/**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
+ * 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;
@@ -10373,24 +10216,24 @@ interface HTMLParagraphElement extends HTMLElement {
declare var HTMLParagraphElement: {
prototype: HTMLParagraphElement;
new(): HTMLParagraphElement;
-}
+};
interface HTMLParamElement extends HTMLElement {
/**
- * Sets or retrieves the name of an input parameter for an element.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the value of an input parameter for an element.
+ */
value: string;
/**
- * Sets or retrieves the data type of the value attribute.
- */
+ * 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;
@@ -10399,7 +10242,7 @@ interface HTMLParamElement extends HTMLElement {
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;
@@ -10409,12 +10252,12 @@ interface HTMLPictureElement extends HTMLElement {
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.
- */
+ * 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;
@@ -10423,24 +10266,24 @@ interface HTMLPreElement extends HTMLElement {
declare var HTMLPreElement: {
prototype: HTMLPreElement;
new(): HTMLPreElement;
-}
+};
interface HTMLProgressElement extends HTMLElement {
/**
- * Retrieves a reference to the form that the object is embedded in.
- */
+ * 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.
- */
+ * 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).
- */
+ * 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.
- */
+ * 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;
@@ -10449,12 +10292,12 @@ interface HTMLProgressElement extends HTMLElement {
declare var HTMLProgressElement: {
prototype: HTMLProgressElement;
new(): HTMLProgressElement;
-}
+};
interface HTMLQuoteElement extends HTMLElement {
/**
- * Sets or retrieves reference information about the object.
- */
+ * 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;
@@ -10463,38 +10306,38 @@ interface HTMLQuoteElement extends HTMLElement {
declare var HTMLQuoteElement: {
prototype: HTMLQuoteElement;
new(): HTMLQuoteElement;
-}
+};
interface HTMLScriptElement extends HTMLElement {
async: boolean;
/**
- * Sets or retrieves the character set used to encode the object.
- */
+ * Sets or retrieves the character set used to encode the object.
+ */
charset: string;
crossOrigin: string | null;
/**
- * Sets or retrieves the status of the script.
- */
+ * Sets or retrieves the status of the script.
+ */
defer: boolean;
/**
- * Sets or retrieves the event for which the script is written.
- */
+ * 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.
- */
+ /**
+ * 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.
- */
+ * 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.
- */
+ * Retrieves or sets the text of the object as a string.
+ */
text: string;
/**
- * Sets or retrieves the MIME type for the associated scripting engine.
- */
+ * 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;
@@ -10504,94 +10347,94 @@ interface HTMLScriptElement extends HTMLElement {
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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -10601,18 +10444,18 @@ interface HTMLSelectElement extends HTMLElement {
declare var HTMLSelectElement: {
prototype: HTMLSelectElement;
new(): HTMLSelectElement;
-}
+};
interface HTMLSourceElement extends HTMLElement {
/**
- * Gets or sets the intended media type of the media source.
+ * 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.
- */
+ * The address or URL of the a media resource that is to be considered.
+ */
src: string;
srcset: string;
/**
@@ -10626,7 +10469,7 @@ interface HTMLSourceElement extends HTMLElement {
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;
@@ -10636,17 +10479,17 @@ interface HTMLSpanElement extends HTMLElement {
declare var HTMLSpanElement: {
prototype: HTMLSpanElement;
new(): HTMLSpanElement;
-}
+};
interface HTMLStyleElement extends HTMLElement, LinkStyle {
disabled: boolean;
/**
- * Sets or retrieves the media type.
- */
+ * Sets or retrieves the media type.
+ */
media: string;
/**
- * Retrieves the CSS language in which the style sheet is written.
- */
+ * 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;
@@ -10655,16 +10498,16 @@ interface HTMLStyleElement extends HTMLElement, LinkStyle {
declare var HTMLStyleElement: {
prototype: HTMLStyleElement;
new(): HTMLStyleElement;
-}
+};
interface HTMLTableCaptionElement extends HTMLElement {
/**
- * Sets or retrieves the alignment of the caption or legend.
- */
+ * 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.
- */
+ * 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;
@@ -10673,53 +10516,53 @@ interface HTMLTableCaptionElement extends HTMLElement {
declare var HTMLTableCaptionElement: {
prototype: HTMLTableCaptionElement;
new(): HTMLTableCaptionElement;
-}
+};
interface HTMLTableCellElement extends HTMLElement, HTMLTableAlignment {
/**
- * Sets or retrieves abbreviated text for the object.
- */
+ * Sets or retrieves abbreviated text for the object.
+ */
abbr: string;
/**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves a list of header cells that provide information for the object.
+ */
headers: string;
/**
- * Sets or retrieves the height of the object.
- */
+ * Sets or retrieves the height of the object.
+ */
height: any;
/**
- * Sets or retrieves whether the browser automatically performs wordwrap.
- */
+ * Sets or retrieves whether the browser automatically performs wordwrap.
+ */
noWrap: boolean;
/**
- * Sets or retrieves how many rows in a table the cell should span.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -10728,20 +10571,20 @@ interface HTMLTableCellElement extends HTMLElement, HTMLTableAlignment {
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.
- */
+ * 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.
- */
+ * Sets or retrieves the number of columns in the group.
+ */
span: number;
/**
- * Sets or retrieves the width of the object.
- */
+ * 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;
@@ -10750,7 +10593,7 @@ interface HTMLTableColElement extends HTMLElement, HTMLTableAlignment {
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;
@@ -10760,111 +10603,111 @@ 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.
- */
+ * 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.
- */
+ * Sets or retrieves the width of the border to draw around the object.
+ */
border: string;
/**
- * Sets or retrieves the border color of the object.
- */
+ * Sets or retrieves the border color of the object.
+ */
borderColor: any;
/**
- * Retrieves the caption object of a table.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the amount of space between cells in a table.
+ */
cellSpacing: string;
/**
- * Sets or retrieves the number of columns in the table.
- */
+ * 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.
- */
+ * Sets or retrieves the way the border frame around the table is displayed.
+ */
frame: string;
/**
- * Sets or retrieves the height of the object.
- */
+ * Sets or retrieves the height of the object.
+ */
height: any;
/**
- * Sets or retrieves the number of horizontal rows contained in the object.
- */
+ * 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.
- */
+ * Sets or retrieves which dividing lines (inner borders) are displayed.
+ */
rules: string;
/**
- * Sets or retrieves a description and/or structure of the object.
- */
+ * 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.
- */
+ * 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.
- */
+ * Retrieves the tFoot object of the table.
+ */
tFoot: HTMLTableSectionElement;
/**
- * Retrieves the tHead object of the table.
- */
+ * Retrieves the tHead object of the table.
+ */
tHead: HTMLTableSectionElement;
/**
- * Sets or retrieves the width of the object.
- */
+ * Sets or retrieves the width of the object.
+ */
width: string;
/**
- * Creates an empty caption element in the table.
- */
+ * Creates an empty caption element in the table.
+ */
createCaption(): HTMLTableCaptionElement;
/**
- * Creates an empty tBody element in the table.
- */
+ * Creates an empty tBody element in the table.
+ */
createTBody(): HTMLTableSectionElement;
/**
- * Creates an empty tFoot element in the table.
- */
+ * Creates an empty tFoot element in the table.
+ */
createTFoot(): HTMLTableSectionElement;
/**
- * Returns the tHead element object if successful, or null otherwise.
- */
+ * Returns the tHead element object if successful, or null otherwise.
+ */
createTHead(): HTMLTableSectionElement;
/**
- * Deletes the caption element and its contents from the table.
- */
+ * 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.
- */
+ * 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.
- */
+ * Deletes the tFoot element and its contents from the table.
+ */
deleteTFoot(): void;
/**
- * Deletes the tHead element and its contents from the table.
- */
+ * 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.
- */
+ * 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;
@@ -10873,12 +10716,12 @@ interface HTMLTableElement extends HTMLElement {
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.
- */
+ * 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;
@@ -10887,39 +10730,39 @@ interface HTMLTableHeaderCellElement extends HTMLTableCellElement {
declare var HTMLTableHeaderCellElement: {
prototype: HTMLTableHeaderCellElement;
new(): HTMLTableHeaderCellElement;
-}
+};
interface HTMLTableRowElement extends HTMLElement, HTMLTableAlignment {
/**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
+ * 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.
- */
+ * Retrieves a collection of all cells in the table row.
+ */
cells: HTMLCollectionOf<HTMLTableDataCellElement | HTMLTableHeaderCellElement>;
/**
- * Sets or retrieves the height of the object.
- */
+ * Sets or retrieves the height of the object.
+ */
height: any;
/**
- * Retrieves the position of the object in the rows collection for the table.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -10928,26 +10771,26 @@ interface HTMLTableRowElement extends HTMLElement, HTMLTableAlignment {
declare var HTMLTableRowElement: {
prototype: HTMLTableRowElement;
new(): HTMLTableRowElement;
-}
+};
interface HTMLTableSectionElement extends HTMLElement, HTMLTableAlignment {
/**
- * Sets or retrieves a value that indicates the table alignment.
- */
+ * Sets or retrieves a value that indicates the table alignment.
+ */
align: string;
/**
- * Sets or retrieves the number of horizontal rows contained in the object.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -10956,7 +10799,7 @@ interface HTMLTableSectionElement extends HTMLElement, HTMLTableAlignment {
declare var HTMLTableSectionElement: {
prototype: HTMLTableSectionElement;
new(): HTMLTableSectionElement;
-}
+};
interface HTMLTemplateElement extends HTMLElement {
readonly content: DocumentFragment;
@@ -10967,105 +10810,105 @@ interface HTMLTemplateElement extends HTMLElement {
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.
- */
+ * 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.
- */
+ * Sets or retrieves the width of the object.
+ */
cols: number;
/**
- * Sets or retrieves the initial contents of the object.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the value indicating whether the control is selected.
+ */
status: any;
/**
- * Retrieves the type of control.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -11074,7 +10917,7 @@ interface HTMLTextAreaElement extends HTMLElement {
declare var HTMLTextAreaElement: {
prototype: HTMLTextAreaElement;
new(): HTMLTextAreaElement;
-}
+};
interface HTMLTimeElement extends HTMLElement {
dateTime: string;
@@ -11085,12 +10928,12 @@ interface HTMLTimeElement extends HTMLElement {
declare var HTMLTimeElement: {
prototype: HTMLTimeElement;
new(): HTMLTimeElement;
-}
+};
interface HTMLTitleElement extends HTMLElement {
/**
- * Retrieves or sets the text of the object as a string.
- */
+ * 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;
@@ -11099,7 +10942,7 @@ interface HTMLTitleElement extends HTMLElement {
declare var HTMLTitleElement: {
prototype: HTMLTitleElement;
new(): HTMLTitleElement;
-}
+};
interface HTMLTrackElement extends HTMLElement {
default: boolean;
@@ -11124,7 +10967,7 @@ declare var HTMLTrackElement: {
readonly LOADED: number;
readonly LOADING: number;
readonly NONE: number;
-}
+};
interface HTMLUListElement extends HTMLElement {
compact: boolean;
@@ -11136,7 +10979,7 @@ interface HTMLUListElement extends HTMLElement {
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;
@@ -11146,7 +10989,7 @@ interface HTMLUnknownElement extends HTMLElement {
declare var HTMLUnknownElement: {
prototype: HTMLUnknownElement;
new(): HTMLUnknownElement;
-}
+};
interface HTMLVideoElementEventMap extends HTMLMediaElementEventMap {
"MSVideoFormatChanged": Event;
@@ -11156,8 +10999,8 @@ interface HTMLVideoElementEventMap extends HTMLMediaElementEventMap {
interface HTMLVideoElement extends HTMLMediaElement {
/**
- * Gets or sets the height of the video element.
- */
+ * Gets or sets the height of the video element.
+ */
height: number;
msHorizontalMirror: boolean;
readonly msIsLayoutOptimalForPlayback: boolean;
@@ -11169,31 +11012,31 @@ interface HTMLVideoElement extends HTMLMediaElement {
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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
+ 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;
}
@@ -11201,47 +11044,7 @@ interface HTMLVideoElement extends HTMLMediaElement {
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;
@@ -11265,7 +11068,7 @@ declare var IDBCursor: {
readonly NEXT_NO_DUPLICATE: string;
readonly PREV: string;
readonly PREV_NO_DUPLICATE: string;
-}
+};
interface IDBCursorWithValue extends IDBCursor {
readonly value: any;
@@ -11274,7 +11077,7 @@ interface IDBCursorWithValue extends IDBCursor {
declare var IDBCursorWithValue: {
prototype: IDBCursorWithValue;
new(): IDBCursorWithValue;
-}
+};
interface IDBDatabaseEventMap {
"abort": Event;
@@ -11291,7 +11094,7 @@ interface IDBDatabase extends EventTarget {
close(): void;
createObjectStore(name: string, optionalParameters?: IDBObjectStoreParameters): IDBObjectStore;
deleteObjectStore(name: string): void;
- transaction(storeNames: string | string[], mode?: string): IDBTransaction;
+ transaction(storeNames: string | string[], mode?: IDBTransactionMode): 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;
@@ -11300,7 +11103,7 @@ interface IDBDatabase extends EventTarget {
declare var IDBDatabase: {
prototype: IDBDatabase;
new(): IDBDatabase;
-}
+};
interface IDBFactory {
cmp(first: any, second: any): number;
@@ -11311,7 +11114,7 @@ interface IDBFactory {
declare var IDBFactory: {
prototype: IDBFactory;
new(): IDBFactory;
-}
+};
interface IDBIndex {
keyPath: string | string[];
@@ -11322,14 +11125,14 @@ interface IDBIndex {
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;
+ openCursor(range?: IDBKeyRange | IDBValidKey, direction?: IDBCursorDirection): IDBRequest;
+ openKeyCursor(range?: IDBKeyRange | IDBValidKey, direction?: IDBCursorDirection): IDBRequest;
}
declare var IDBIndex: {
prototype: IDBIndex;
new(): IDBIndex;
-}
+};
interface IDBKeyRange {
readonly lower: any;
@@ -11345,7 +11148,7 @@ declare var IDBKeyRange: {
lowerBound(lower: any, open?: boolean): IDBKeyRange;
only(value: any): IDBKeyRange;
upperBound(upper: any, open?: boolean): IDBKeyRange;
-}
+};
interface IDBObjectStore {
readonly indexNames: DOMStringList;
@@ -11361,14 +11164,14 @@ interface IDBObjectStore {
deleteIndex(indexName: string): void;
get(key: any): IDBRequest;
index(name: string): IDBIndex;
- openCursor(range?: IDBKeyRange | IDBValidKey, direction?: string): IDBRequest;
+ openCursor(range?: IDBKeyRange | IDBValidKey, direction?: IDBCursorDirection): IDBRequest;
put(value: any, key?: IDBKeyRange | IDBValidKey): IDBRequest;
}
declare var IDBObjectStore: {
prototype: IDBObjectStore;
new(): IDBObjectStore;
-}
+};
interface IDBOpenDBRequestEventMap extends IDBRequestEventMap {
"blocked": Event;
@@ -11385,7 +11188,7 @@ interface IDBOpenDBRequest extends IDBRequest {
declare var IDBOpenDBRequest: {
prototype: IDBOpenDBRequest;
new(): IDBOpenDBRequest;
-}
+};
interface IDBRequestEventMap {
"error": Event;
@@ -11393,7 +11196,7 @@ interface IDBRequestEventMap {
}
interface IDBRequest extends EventTarget {
- readonly error: DOMError;
+ readonly error: DOMException;
onerror: (this: IDBRequest, ev: Event) => any;
onsuccess: (this: IDBRequest, ev: Event) => any;
readonly readyState: IDBRequestReadyState;
@@ -11407,7 +11210,7 @@ interface IDBRequest extends EventTarget {
declare var IDBRequest: {
prototype: IDBRequest;
new(): IDBRequest;
-}
+};
interface IDBTransactionEventMap {
"abort": Event;
@@ -11417,7 +11220,7 @@ interface IDBTransactionEventMap {
interface IDBTransaction extends EventTarget {
readonly db: IDBDatabase;
- readonly error: DOMError;
+ readonly error: DOMException;
readonly mode: IDBTransactionMode;
onabort: (this: IDBTransaction, ev: Event) => any;
oncomplete: (this: IDBTransaction, ev: Event) => any;
@@ -11437,7 +11240,7 @@ declare var IDBTransaction: {
readonly READ_ONLY: string;
readonly READ_WRITE: string;
readonly VERSION_CHANGE: string;
-}
+};
interface IDBVersionChangeEvent extends Event {
readonly newVersion: number | null;
@@ -11447,7 +11250,7 @@ interface IDBVersionChangeEvent extends Event {
declare var IDBVersionChangeEvent: {
prototype: IDBVersionChangeEvent;
new(): IDBVersionChangeEvent;
-}
+};
interface IIRFilterNode extends AudioNode {
getFrequencyResponse(frequencyHz: Float32Array, magResponse: Float32Array, phaseResponse: Float32Array): void;
@@ -11456,7 +11259,7 @@ interface IIRFilterNode extends AudioNode {
declare var IIRFilterNode: {
prototype: IIRFilterNode;
new(): IIRFilterNode;
-}
+};
interface ImageData {
data: Uint8ClampedArray;
@@ -11468,7 +11271,7 @@ 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;
@@ -11483,7 +11286,7 @@ interface IntersectionObserver {
declare var IntersectionObserver: {
prototype: IntersectionObserver;
new(callback: IntersectionObserverCallback, options?: IntersectionObserverInit): IntersectionObserver;
-}
+};
interface IntersectionObserverEntry {
readonly boundingClientRect: ClientRect;
@@ -11497,7 +11300,7 @@ interface IntersectionObserverEntry {
declare var IntersectionObserverEntry: {
prototype: IntersectionObserverEntry;
new(intersectionObserverEntryInit: IntersectionObserverEntryInit): IntersectionObserverEntry;
-}
+};
interface KeyboardEvent extends UIEvent {
readonly altKey: boolean;
@@ -11532,7 +11335,7 @@ declare var KeyboardEvent: {
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;
@@ -11542,7 +11345,7 @@ interface ListeningStateChangedEvent extends Event {
declare var ListeningStateChangedEvent: {
prototype: ListeningStateChangedEvent;
new(): ListeningStateChangedEvent;
-}
+};
interface Location {
hash: string;
@@ -11563,7 +11366,7 @@ interface Location {
declare var Location: {
prototype: Location;
new(): Location;
-}
+};
interface LongRunningScriptDetectedEvent extends Event {
readonly executionTime: number;
@@ -11573,8 +11376,390 @@ interface LongRunningScriptDetectedEvent extends Event {
declare var LongRunningScriptDetectedEvent: {
prototype: LongRunningScriptDetectedEvent;
new(): LongRunningScriptDetectedEvent;
+};
+
+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 MediaKeys {
+ createSession(sessionType?: MediaKeySessionType): MediaKeySession;
+ setServerCertificate(serverCertificate: any): Promise<void>;
+}
+
+declare var MediaKeys: {
+ prototype: MediaKeys;
+ new(): MediaKeys;
+};
+
+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 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 MSApp {
clearTemporaryWebDataAsync(): MSAppAsyncOperation;
createBlobFromRandomAccessStream(type: string, seeker: any): Blob;
@@ -11623,7 +11808,7 @@ declare var MSAppAsyncOperation: {
readonly COMPLETED: number;
readonly ERROR: number;
readonly STARTED: number;
-}
+};
interface MSAssertion {
readonly id: string;
@@ -11633,7 +11818,7 @@ interface MSAssertion {
declare var MSAssertion: {
prototype: MSAssertion;
new(): MSAssertion;
-}
+};
interface MSBlobBuilder {
append(data: any, endings?: string): void;
@@ -11643,7 +11828,7 @@ interface MSBlobBuilder {
declare var MSBlobBuilder: {
prototype: MSBlobBuilder;
new(): MSBlobBuilder;
-}
+};
interface MSCredentials {
getAssertion(challenge: string, filter?: MSCredentialFilter, params?: MSSignatureParameters): Promise<MSAssertion>;
@@ -11653,7 +11838,7 @@ interface MSCredentials {
declare var MSCredentials: {
prototype: MSCredentials;
new(): MSCredentials;
-}
+};
interface MSFIDOCredentialAssertion extends MSAssertion {
readonly algorithm: string | Algorithm;
@@ -11665,7 +11850,7 @@ interface MSFIDOCredentialAssertion extends MSAssertion {
declare var MSFIDOCredentialAssertion: {
prototype: MSFIDOCredentialAssertion;
new(): MSFIDOCredentialAssertion;
-}
+};
interface MSFIDOSignature {
readonly authnrData: string;
@@ -11676,7 +11861,7 @@ interface MSFIDOSignature {
declare var MSFIDOSignature: {
prototype: MSFIDOSignature;
new(): MSFIDOSignature;
-}
+};
interface MSFIDOSignatureAssertion extends MSAssertion {
readonly signature: MSFIDOSignature;
@@ -11685,7 +11870,7 @@ interface MSFIDOSignatureAssertion extends MSAssertion {
declare var MSFIDOSignatureAssertion: {
prototype: MSFIDOSignatureAssertion;
new(): MSFIDOSignatureAssertion;
-}
+};
interface MSGesture {
target: Element;
@@ -11696,7 +11881,7 @@ interface MSGesture {
declare var MSGesture: {
prototype: MSGesture;
new(): MSGesture;
-}
+};
interface MSGestureEvent extends UIEvent {
readonly clientX: number;
@@ -11732,7 +11917,7 @@ declare var MSGestureEvent: {
readonly MSGESTURE_FLAG_END: number;
readonly MSGESTURE_FLAG_INERTIA: number;
readonly MSGESTURE_FLAG_NONE: number;
-}
+};
interface MSGraphicsTrust {
readonly constrictionActive: boolean;
@@ -11742,7 +11927,7 @@ interface MSGraphicsTrust {
declare var MSGraphicsTrust: {
prototype: MSGraphicsTrust;
new(): MSGraphicsTrust;
-}
+};
interface MSHTMLWebViewElement extends HTMLElement {
readonly canGoBack: boolean;
@@ -11776,7 +11961,7 @@ interface MSHTMLWebViewElement extends HTMLElement {
declare var MSHTMLWebViewElement: {
prototype: MSHTMLWebViewElement;
new(): MSHTMLWebViewElement;
-}
+};
interface MSInputMethodContextEventMap {
"MSCandidateWindowHide": Event;
@@ -11802,7 +11987,7 @@ interface MSInputMethodContext extends EventTarget {
declare var MSInputMethodContext: {
prototype: MSInputMethodContext;
new(): MSInputMethodContext;
-}
+};
interface MSManipulationEvent extends UIEvent {
readonly currentState: number;
@@ -11831,7 +12016,7 @@ declare var MSManipulationEvent: {
readonly MS_MANIPULATION_STATE_PRESELECT: number;
readonly MS_MANIPULATION_STATE_SELECTING: number;
readonly MS_MANIPULATION_STATE_STOPPED: number;
-}
+};
interface MSMediaKeyError {
readonly code: number;
@@ -11853,7 +12038,7 @@ declare var MSMediaKeyError: {
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;
@@ -11863,7 +12048,7 @@ interface MSMediaKeyMessageEvent extends Event {
declare var MSMediaKeyMessageEvent: {
prototype: MSMediaKeyMessageEvent;
new(): MSMediaKeyMessageEvent;
-}
+};
interface MSMediaKeyNeededEvent extends Event {
readonly initData: Uint8Array | null;
@@ -11872,8 +12057,20 @@ interface MSMediaKeyNeededEvent extends Event {
declare var MSMediaKeyNeededEvent: {
prototype: MSMediaKeyNeededEvent;
new(): MSMediaKeyNeededEvent;
+};
+
+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 MSMediaKeySession extends EventTarget {
readonly error: MSMediaKeyError | null;
readonly keySystem: string;
@@ -11885,19 +12082,7 @@ interface MSMediaKeySession extends EventTarget {
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;
@@ -11920,7 +12105,7 @@ interface MSPointerEvent extends MouseEvent {
declare var MSPointerEvent: {
prototype: MSPointerEvent;
new(typeArg: string, eventInitDict?: PointerEventInit): MSPointerEvent;
-}
+};
interface MSRangeCollection {
readonly length: number;
@@ -11931,7 +12116,7 @@ interface MSRangeCollection {
declare var MSRangeCollection: {
prototype: MSRangeCollection;
new(): MSRangeCollection;
-}
+};
interface MSSiteModeEvent extends Event {
readonly actionURL: string;
@@ -11941,7 +12126,7 @@ interface MSSiteModeEvent extends Event {
declare var MSSiteModeEvent: {
prototype: MSSiteModeEvent;
new(): MSSiteModeEvent;
-}
+};
interface MSStream {
readonly type: string;
@@ -11952,7 +12137,7 @@ interface MSStream {
declare var MSStream: {
prototype: MSStream;
new(): MSStream;
-}
+};
interface MSStreamReader extends EventTarget, MSBaseReader {
readonly error: DOMError;
@@ -11968,7 +12153,7 @@ interface MSStreamReader extends EventTarget, MSBaseReader {
declare var MSStreamReader: {
prototype: MSStreamReader;
new(): MSStreamReader;
-}
+};
interface MSWebViewAsyncOperationEventMap {
"complete": Event;
@@ -12003,7 +12188,7 @@ declare var MSWebViewAsyncOperation: {
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;
@@ -12013,389 +12198,7 @@ interface MSWebViewSettings {
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;
@@ -12415,7 +12218,7 @@ declare var MutationEvent: {
readonly ADDITION: number;
readonly MODIFICATION: number;
readonly REMOVAL: number;
-}
+};
interface MutationObserver {
disconnect(): void;
@@ -12426,7 +12229,7 @@ interface MutationObserver {
declare var MutationObserver: {
prototype: MutationObserver;
new(callback: MutationCallback): MutationObserver;
-}
+};
interface MutationRecord {
readonly addedNodes: NodeList;
@@ -12443,7 +12246,7 @@ interface MutationRecord {
declare var MutationRecord: {
prototype: MutationRecord;
new(): MutationRecord;
-}
+};
interface NamedNodeMap {
readonly length: number;
@@ -12460,7 +12263,7 @@ interface NamedNodeMap {
declare var NamedNodeMap: {
prototype: NamedNodeMap;
new(): NamedNodeMap;
-}
+};
interface NavigationCompletedEvent extends NavigationEvent {
readonly isSuccess: boolean;
@@ -12470,7 +12273,7 @@ interface NavigationCompletedEvent extends NavigationEvent {
declare var NavigationCompletedEvent: {
prototype: NavigationCompletedEvent;
new(): NavigationCompletedEvent;
-}
+};
interface NavigationEvent extends Event {
readonly uri: string;
@@ -12479,7 +12282,7 @@ interface NavigationEvent extends Event {
declare var NavigationEvent: {
prototype: NavigationEvent;
new(): NavigationEvent;
-}
+};
interface NavigationEventWithReferrer extends NavigationEvent {
readonly referer: string;
@@ -12488,7 +12291,7 @@ interface NavigationEventWithReferrer extends NavigationEvent {
declare var NavigationEventWithReferrer: {
prototype: NavigationEventWithReferrer;
new(): NavigationEventWithReferrer;
-}
+};
interface Navigator extends Object, NavigatorID, NavigatorOnLine, NavigatorContentUtils, NavigatorStorageUtils, NavigatorGeolocation, MSNavigatorDoNotTrack, MSFileSaver, NavigatorBeacon, NavigatorConcurrentHardware, NavigatorUserMedia {
readonly authentication: WebAuthentication;
@@ -12505,6 +12308,7 @@ interface Navigator extends Object, NavigatorID, NavigatorOnLine, NavigatorConte
readonly serviceWorker: ServiceWorkerContainer;
readonly webdriver: boolean;
readonly hardwareConcurrency: number;
+ readonly languages: string[];
getGamepads(): Gamepad[];
javaEnabled(): boolean;
msLaunchUri(uri: string, successCallback?: MSLaunchUriCallback, noHandlerCallback?: MSLaunchUriCallback): void;
@@ -12515,7 +12319,7 @@ interface Navigator extends Object, NavigatorID, NavigatorOnLine, NavigatorConte
declare var Navigator: {
prototype: Navigator;
new(): Navigator;
-}
+};
interface Node extends EventTarget {
readonly attributes: NamedNodeMap;
@@ -12590,7 +12394,7 @@ declare var Node: {
readonly NOTATION_NODE: number;
readonly PROCESSING_INSTRUCTION_NODE: number;
readonly TEXT_NODE: number;
-}
+};
interface NodeFilter {
acceptNode(n: Node): number;
@@ -12613,7 +12417,7 @@ declare var NodeFilter: {
readonly SHOW_NOTATION: number;
readonly SHOW_PROCESSING_INSTRUCTION: number;
readonly SHOW_TEXT: number;
-}
+};
interface NodeIterator {
readonly expandEntityReferences: boolean;
@@ -12628,7 +12432,7 @@ interface NodeIterator {
declare var NodeIterator: {
prototype: NodeIterator;
new(): NodeIterator;
-}
+};
interface NodeList {
readonly length: number;
@@ -12639,7 +12443,7 @@ interface NodeList {
declare var NodeList: {
prototype: NodeList;
new(): NodeList;
-}
+};
interface NotificationEventMap {
"click": Event;
@@ -12669,7 +12473,7 @@ declare var Notification: {
prototype: Notification;
new(title: string, options?: NotificationOptions): Notification;
requestPermission(callback?: NotificationPermissionCallback): Promise<NotificationPermission>;
-}
+};
interface OES_element_index_uint {
}
@@ -12677,7 +12481,7 @@ 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;
@@ -12687,7 +12491,7 @@ declare var OES_standard_derivatives: {
prototype: OES_standard_derivatives;
new(): OES_standard_derivatives;
readonly FRAGMENT_SHADER_DERIVATIVE_HINT_OES: number;
-}
+};
interface OES_texture_float {
}
@@ -12695,7 +12499,7 @@ interface OES_texture_float {
declare var OES_texture_float: {
prototype: OES_texture_float;
new(): OES_texture_float;
-}
+};
interface OES_texture_float_linear {
}
@@ -12703,7 +12507,7 @@ 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;
@@ -12713,7 +12517,7 @@ 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 {
}
@@ -12721,7 +12525,7 @@ 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;
@@ -12730,7 +12534,7 @@ interface OfflineAudioCompletionEvent extends Event {
declare var OfflineAudioCompletionEvent: {
prototype: OfflineAudioCompletionEvent;
new(): OfflineAudioCompletionEvent;
-}
+};
interface OfflineAudioContextEventMap extends AudioContextEventMap {
"complete": OfflineAudioCompletionEvent;
@@ -12748,7 +12552,7 @@ interface OfflineAudioContext extends AudioContextBase {
declare var OfflineAudioContext: {
prototype: OfflineAudioContext;
new(numberOfChannels: number, length: number, sampleRate: number): OfflineAudioContext;
-}
+};
interface OscillatorNodeEventMap {
"ended": MediaStreamErrorEvent;
@@ -12769,7 +12573,7 @@ interface OscillatorNode extends AudioNode {
declare var OscillatorNode: {
prototype: OscillatorNode;
new(): OscillatorNode;
-}
+};
interface OverflowEvent extends UIEvent {
readonly horizontalOverflow: boolean;
@@ -12786,7 +12590,7 @@ declare var OverflowEvent: {
readonly BOTH: number;
readonly HORIZONTAL: number;
readonly VERTICAL: number;
-}
+};
interface PageTransitionEvent extends Event {
readonly persisted: boolean;
@@ -12795,7 +12599,7 @@ interface PageTransitionEvent extends Event {
declare var PageTransitionEvent: {
prototype: PageTransitionEvent;
new(): PageTransitionEvent;
-}
+};
interface PannerNode extends AudioNode {
coneInnerAngle: number;
@@ -12814,7 +12618,7 @@ interface PannerNode extends AudioNode {
declare var PannerNode: {
prototype: PannerNode;
new(): PannerNode;
-}
+};
interface Path2D extends Object, CanvasPathMethods {
}
@@ -12822,7 +12626,7 @@ interface Path2D extends Object, CanvasPathMethods {
declare var Path2D: {
prototype: Path2D;
new(path?: Path2D): Path2D;
-}
+};
interface PaymentAddress {
readonly addressLine: string[];
@@ -12842,7 +12646,7 @@ interface PaymentAddress {
declare var PaymentAddress: {
prototype: PaymentAddress;
new(): PaymentAddress;
-}
+};
interface PaymentRequestEventMap {
"shippingaddresschange": Event;
@@ -12864,7 +12668,7 @@ interface PaymentRequest extends EventTarget {
declare var PaymentRequest: {
prototype: PaymentRequest;
new(methodData: PaymentMethodData[], details: PaymentDetails, options?: PaymentOptions): PaymentRequest;
-}
+};
interface PaymentRequestUpdateEvent extends Event {
updateWith(d: Promise<PaymentDetails>): void;
@@ -12873,7 +12677,7 @@ interface PaymentRequestUpdateEvent extends Event {
declare var PaymentRequestUpdateEvent: {
prototype: PaymentRequestUpdateEvent;
new(type: string, eventInitDict?: PaymentRequestUpdateEventInit): PaymentRequestUpdateEvent;
-}
+};
interface PaymentResponse {
readonly details: any;
@@ -12890,36 +12694,7 @@ interface PaymentResponse {
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;
@@ -12942,7 +12717,7 @@ interface Performance {
declare var Performance: {
prototype: Performance;
new(): Performance;
-}
+};
interface PerformanceEntry {
readonly duration: number;
@@ -12954,7 +12729,7 @@ interface PerformanceEntry {
declare var PerformanceEntry: {
prototype: PerformanceEntry;
new(): PerformanceEntry;
-}
+};
interface PerformanceMark extends PerformanceEntry {
}
@@ -12962,7 +12737,7 @@ interface PerformanceMark extends PerformanceEntry {
declare var PerformanceMark: {
prototype: PerformanceMark;
new(): PerformanceMark;
-}
+};
interface PerformanceMeasure extends PerformanceEntry {
}
@@ -12970,7 +12745,7 @@ interface PerformanceMeasure extends PerformanceEntry {
declare var PerformanceMeasure: {
prototype: PerformanceMeasure;
new(): PerformanceMeasure;
-}
+};
interface PerformanceNavigation {
readonly redirectCount: number;
@@ -12989,18 +12764,18 @@ declare var PerformanceNavigation: {
readonly TYPE_NAVIGATE: number;
readonly TYPE_RELOAD: number;
readonly TYPE_RESERVED: number;
-}
+};
interface PerformanceNavigationTiming extends PerformanceEntry {
readonly connectEnd: number;
readonly connectStart: number;
+ readonly domainLookupEnd: number;
+ readonly domainLookupStart: 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;
@@ -13019,7 +12794,7 @@ interface PerformanceNavigationTiming extends PerformanceEntry {
declare var PerformanceNavigationTiming: {
prototype: PerformanceNavigationTiming;
new(): PerformanceNavigationTiming;
-}
+};
interface PerformanceResourceTiming extends PerformanceEntry {
readonly connectEnd: number;
@@ -13038,18 +12813,18 @@ interface PerformanceResourceTiming extends PerformanceEntry {
declare var PerformanceResourceTiming: {
prototype: PerformanceResourceTiming;
new(): PerformanceResourceTiming;
-}
+};
interface PerformanceTiming {
readonly connectEnd: number;
readonly connectStart: number;
+ readonly domainLookupEnd: number;
+ readonly domainLookupStart: 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;
@@ -13069,15 +12844,44 @@ interface PerformanceTiming {
declare var PerformanceTiming: {
prototype: PerformanceTiming;
new(): PerformanceTiming;
+};
+
+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 PeriodicWave {
}
declare var PeriodicWave: {
prototype: PeriodicWave;
new(): PeriodicWave;
-}
+};
interface PermissionRequest extends DeferredPermissionRequest {
readonly state: MSWebViewPermissionState;
@@ -13087,7 +12891,7 @@ interface PermissionRequest extends DeferredPermissionRequest {
declare var PermissionRequest: {
prototype: PermissionRequest;
new(): PermissionRequest;
-}
+};
interface PermissionRequestedEvent extends Event {
readonly permissionRequest: PermissionRequest;
@@ -13096,7 +12900,7 @@ interface PermissionRequestedEvent extends Event {
declare var PermissionRequestedEvent: {
prototype: PermissionRequestedEvent;
new(): PermissionRequestedEvent;
-}
+};
interface Plugin {
readonly description: string;
@@ -13112,7 +12916,7 @@ interface Plugin {
declare var Plugin: {
prototype: Plugin;
new(): Plugin;
-}
+};
interface PluginArray {
readonly length: number;
@@ -13125,7 +12929,7 @@ interface PluginArray {
declare var PluginArray: {
prototype: PluginArray;
new(): PluginArray;
-}
+};
interface PointerEvent extends MouseEvent {
readonly currentPoint: any;
@@ -13148,7 +12952,7 @@ interface PointerEvent extends MouseEvent {
declare var PointerEvent: {
prototype: PointerEvent;
new(typeArg: string, eventInitDict?: PointerEventInit): PointerEvent;
-}
+};
interface PopStateEvent extends Event {
readonly state: any;
@@ -13158,7 +12962,7 @@ interface PopStateEvent extends Event {
declare var PopStateEvent: {
prototype: PopStateEvent;
new(typeArg: string, eventInitDict?: PopStateEventInit): PopStateEvent;
-}
+};
interface Position {
readonly coords: Coordinates;
@@ -13168,7 +12972,7 @@ interface Position {
declare var Position: {
prototype: Position;
new(): Position;
-}
+};
interface PositionError {
readonly code: number;
@@ -13185,7 +12989,7 @@ declare var PositionError: {
readonly PERMISSION_DENIED: number;
readonly POSITION_UNAVAILABLE: number;
readonly TIMEOUT: number;
-}
+};
interface ProcessingInstruction extends CharacterData {
readonly target: string;
@@ -13194,7 +12998,7 @@ interface ProcessingInstruction extends CharacterData {
declare var ProcessingInstruction: {
prototype: ProcessingInstruction;
new(): ProcessingInstruction;
-}
+};
interface ProgressEvent extends Event {
readonly lengthComputable: boolean;
@@ -13206,7 +13010,7 @@ interface ProgressEvent extends Event {
declare var ProgressEvent: {
prototype: ProgressEvent;
new(type: string, eventInitDict?: ProgressEventInit): ProgressEvent;
-}
+};
interface PushManager {
getSubscription(): Promise<PushSubscription>;
@@ -13217,7 +13021,7 @@ interface PushManager {
declare var PushManager: {
prototype: PushManager;
new(): PushManager;
-}
+};
interface PushSubscription {
readonly endpoint: USVString;
@@ -13230,7 +13034,7 @@ interface PushSubscription {
declare var PushSubscription: {
prototype: PushSubscription;
new(): PushSubscription;
-}
+};
interface PushSubscriptionOptions {
readonly applicationServerKey: ArrayBuffer | null;
@@ -13240,17 +13044,114 @@ interface PushSubscriptionOptions {
declare var PushSubscriptionOptions: {
prototype: PushSubscriptionOptions;
new(): PushSubscriptionOptions;
+};
+
+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;
}
-interface RTCDTMFToneChangeEvent extends Event {
- readonly tone: string;
+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 RTCDTMFToneChangeEvent: {
- prototype: RTCDTMFToneChangeEvent;
- new(typeArg: string, eventInitDict: RTCDTMFToneChangeEventInit): RTCDTMFToneChangeEvent;
+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;
+ error: () => Response;
+ redirect: (url: string, status?: number) => Response;
+};
+
interface RTCDtlsTransportEventMap {
"dtlsstatechange": RTCDtlsTransportStateChangedEvent;
"error": Event;
@@ -13273,7 +13174,7 @@ interface RTCDtlsTransport extends RTCStatsProvider {
declare var RTCDtlsTransport: {
prototype: RTCDtlsTransport;
new(transport: RTCIceTransport): RTCDtlsTransport;
-}
+};
interface RTCDtlsTransportStateChangedEvent extends Event {
readonly state: RTCDtlsTransportState;
@@ -13282,7 +13183,7 @@ interface RTCDtlsTransportStateChangedEvent extends Event {
declare var RTCDtlsTransportStateChangedEvent: {
prototype: RTCDtlsTransportStateChangedEvent;
new(): RTCDtlsTransportStateChangedEvent;
-}
+};
interface RTCDtmfSenderEventMap {
"tonechange": RTCDTMFToneChangeEvent;
@@ -13303,19 +13204,28 @@ interface RTCDtmfSender extends EventTarget {
declare var RTCDtmfSender: {
prototype: RTCDtmfSender;
new(sender: RTCRtpSender): RTCDtmfSender;
+};
+
+interface RTCDTMFToneChangeEvent extends Event {
+ readonly tone: string;
}
+declare var RTCDTMFToneChangeEvent: {
+ prototype: RTCDTMFToneChangeEvent;
+ new(typeArg: string, eventInitDict: RTCDTMFToneChangeEventInit): RTCDTMFToneChangeEvent;
+};
+
interface RTCIceCandidate {
candidate: string | null;
- sdpMLineIndex: number | null;
sdpMid: string | null;
+ sdpMLineIndex: number | null;
toJSON(): any;
}
declare var RTCIceCandidate: {
prototype: RTCIceCandidate;
new(candidateInitDict?: RTCIceCandidateInit): RTCIceCandidate;
-}
+};
interface RTCIceCandidatePairChangedEvent extends Event {
readonly pair: RTCIceCandidatePair;
@@ -13324,7 +13234,7 @@ interface RTCIceCandidatePairChangedEvent extends Event {
declare var RTCIceCandidatePairChangedEvent: {
prototype: RTCIceCandidatePairChangedEvent;
new(): RTCIceCandidatePairChangedEvent;
-}
+};
interface RTCIceGathererEventMap {
"error": Event;
@@ -13345,7 +13255,7 @@ interface RTCIceGatherer extends RTCStatsProvider {
declare var RTCIceGatherer: {
prototype: RTCIceGatherer;
new(options: RTCIceGatherOptions): RTCIceGatherer;
-}
+};
interface RTCIceGathererEvent extends Event {
readonly candidate: RTCIceCandidateDictionary | RTCIceCandidateComplete;
@@ -13354,7 +13264,7 @@ interface RTCIceGathererEvent extends Event {
declare var RTCIceGathererEvent: {
prototype: RTCIceGathererEvent;
new(): RTCIceGathererEvent;
-}
+};
interface RTCIceTransportEventMap {
"candidatepairchange": RTCIceCandidatePairChangedEvent;
@@ -13383,7 +13293,7 @@ interface RTCIceTransport extends RTCStatsProvider {
declare var RTCIceTransport: {
prototype: RTCIceTransport;
new(): RTCIceTransport;
-}
+};
interface RTCIceTransportStateChangedEvent extends Event {
readonly state: RTCIceTransportState;
@@ -13392,7 +13302,7 @@ interface RTCIceTransportStateChangedEvent extends Event {
declare var RTCIceTransportStateChangedEvent: {
prototype: RTCIceTransportStateChangedEvent;
new(): RTCIceTransportStateChangedEvent;
-}
+};
interface RTCPeerConnectionEventMap {
"addstream": MediaStreamEvent;
@@ -13438,7 +13348,7 @@ interface RTCPeerConnection extends EventTarget {
declare var RTCPeerConnection: {
prototype: RTCPeerConnection;
new(configuration: RTCConfiguration): RTCPeerConnection;
-}
+};
interface RTCPeerConnectionIceEvent extends Event {
readonly candidate: RTCIceCandidate;
@@ -13447,7 +13357,7 @@ interface RTCPeerConnectionIceEvent extends Event {
declare var RTCPeerConnectionIceEvent: {
prototype: RTCPeerConnectionIceEvent;
new(type: string, eventInitDict: RTCPeerConnectionIceEventInit): RTCPeerConnectionIceEvent;
-}
+};
interface RTCRtpReceiverEventMap {
"error": Event;
@@ -13471,7 +13381,7 @@ declare var RTCRtpReceiver: {
prototype: RTCRtpReceiver;
new(transport: RTCDtlsTransport | RTCSrtpSdesTransport, kind: string, rtcpTransport?: RTCDtlsTransport): RTCRtpReceiver;
getCapabilities(kind?: string): RTCRtpCapabilities;
-}
+};
interface RTCRtpSenderEventMap {
"error": Event;
@@ -13496,7 +13406,7 @@ declare var RTCRtpSender: {
prototype: RTCRtpSender;
new(track: MediaStreamTrack, transport: RTCDtlsTransport | RTCSrtpSdesTransport, rtcpTransport?: RTCDtlsTransport): RTCRtpSender;
getCapabilities(kind?: string): RTCRtpCapabilities;
-}
+};
interface RTCSessionDescription {
sdp: string | null;
@@ -13507,7 +13417,7 @@ interface RTCSessionDescription {
declare var RTCSessionDescription: {
prototype: RTCSessionDescription;
new(descriptionInitDict?: RTCSessionDescriptionInit): RTCSessionDescription;
-}
+};
interface RTCSrtpSdesTransportEventMap {
"error": Event;
@@ -13524,7 +13434,7 @@ declare var RTCSrtpSdesTransport: {
prototype: RTCSrtpSdesTransport;
new(transport: RTCIceTransport, encryptParameters: RTCSrtpSdesParameters, decryptParameters: RTCSrtpSdesParameters): RTCSrtpSdesTransport;
getLocalParameters(): RTCSrtpSdesParameters[];
-}
+};
interface RTCSsrcConflictEvent extends Event {
readonly ssrc: number;
@@ -13533,7 +13443,7 @@ interface RTCSsrcConflictEvent extends Event {
declare var RTCSsrcConflictEvent: {
prototype: RTCSsrcConflictEvent;
new(): RTCSsrcConflictEvent;
-}
+};
interface RTCStatsProvider extends EventTarget {
getStats(): Promise<RTCStatsReport>;
@@ -13543,112 +13453,421 @@ interface RTCStatsProvider extends EventTarget {
declare var RTCStatsProvider: {
prototype: RTCStatsProvider;
new(): RTCStatsProvider;
+};
+
+interface ScopedCredential {
+ readonly id: ArrayBuffer;
+ readonly type: ScopedCredentialType;
}
-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;
+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;
- 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;
+declare var Selection: {
+ prototype: Selection;
+ new(): Selection;
+};
+
+interface ServiceWorkerEventMap extends AbstractWorkerEventMap {
+ "statechange": Event;
}
-interface ReadableStream {
- readonly locked: boolean;
- cancel(): Promise<void>;
- getReader(): ReadableStreamReader;
+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 ReadableStream: {
- prototype: ReadableStream;
- new(): ReadableStream;
+declare var ServiceWorker: {
+ prototype: ServiceWorker;
+ new(): ServiceWorker;
+};
+
+interface ServiceWorkerContainerEventMap {
+ "controllerchange": Event;
+ "message": ServiceWorkerMessageEvent;
}
-interface ReadableStreamReader {
- cancel(): Promise<void>;
- read(): Promise<any>;
- releaseLock(): void;
+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 ReadableStreamReader: {
- prototype: ReadableStreamReader;
- new(): ReadableStreamReader;
+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;
}
-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 ServiceWorkerMessageEvent: {
+ prototype: ServiceWorkerMessageEvent;
+ new(type: string, eventInitDict?: ServiceWorkerMessageEventInit): ServiceWorkerMessageEvent;
+};
+
+interface ServiceWorkerRegistrationEventMap {
+ "updatefound": Event;
}
-declare var Request: {
- prototype: Request;
- new(input: Request | string, init?: RequestInit): Request;
+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;
}
-interface Response extends Object, Body {
- readonly body: ReadableStream | null;
- readonly headers: Headers;
- readonly ok: boolean;
- readonly status: number;
- readonly statusText: string;
- readonly type: ResponseType;
+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;
- clone(): Response;
+ key?: string;
+ oldValue?: string;
+ newValue?: string;
+ storageArea?: Storage;
}
-declare var Response: {
- prototype: Response;
- new(body?: any, init?: ResponseInit): Response;
+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 SVGAElement extends SVGGraphicsElement, SVGURIReference {
readonly target: SVGAnimatedString;
addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGAElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
@@ -13658,7 +13877,7 @@ interface SVGAElement extends SVGGraphicsElement, SVGURIReference {
declare var SVGAElement: {
prototype: SVGAElement;
new(): SVGAElement;
-}
+};
interface SVGAngle {
readonly unitType: number;
@@ -13682,7 +13901,7 @@ declare var SVGAngle: {
readonly SVG_ANGLETYPE_RAD: number;
readonly SVG_ANGLETYPE_UNKNOWN: number;
readonly SVG_ANGLETYPE_UNSPECIFIED: number;
-}
+};
interface SVGAnimatedAngle {
readonly animVal: SVGAngle;
@@ -13692,7 +13911,7 @@ interface SVGAnimatedAngle {
declare var SVGAnimatedAngle: {
prototype: SVGAnimatedAngle;
new(): SVGAnimatedAngle;
-}
+};
interface SVGAnimatedBoolean {
readonly animVal: boolean;
@@ -13702,7 +13921,7 @@ interface SVGAnimatedBoolean {
declare var SVGAnimatedBoolean: {
prototype: SVGAnimatedBoolean;
new(): SVGAnimatedBoolean;
-}
+};
interface SVGAnimatedEnumeration {
readonly animVal: number;
@@ -13712,7 +13931,7 @@ interface SVGAnimatedEnumeration {
declare var SVGAnimatedEnumeration: {
prototype: SVGAnimatedEnumeration;
new(): SVGAnimatedEnumeration;
-}
+};
interface SVGAnimatedInteger {
readonly animVal: number;
@@ -13722,7 +13941,7 @@ interface SVGAnimatedInteger {
declare var SVGAnimatedInteger: {
prototype: SVGAnimatedInteger;
new(): SVGAnimatedInteger;
-}
+};
interface SVGAnimatedLength {
readonly animVal: SVGLength;
@@ -13732,7 +13951,7 @@ interface SVGAnimatedLength {
declare var SVGAnimatedLength: {
prototype: SVGAnimatedLength;
new(): SVGAnimatedLength;
-}
+};
interface SVGAnimatedLengthList {
readonly animVal: SVGLengthList;
@@ -13742,7 +13961,7 @@ interface SVGAnimatedLengthList {
declare var SVGAnimatedLengthList: {
prototype: SVGAnimatedLengthList;
new(): SVGAnimatedLengthList;
-}
+};
interface SVGAnimatedNumber {
readonly animVal: number;
@@ -13752,7 +13971,7 @@ interface SVGAnimatedNumber {
declare var SVGAnimatedNumber: {
prototype: SVGAnimatedNumber;
new(): SVGAnimatedNumber;
-}
+};
interface SVGAnimatedNumberList {
readonly animVal: SVGNumberList;
@@ -13762,7 +13981,7 @@ interface SVGAnimatedNumberList {
declare var SVGAnimatedNumberList: {
prototype: SVGAnimatedNumberList;
new(): SVGAnimatedNumberList;
-}
+};
interface SVGAnimatedPreserveAspectRatio {
readonly animVal: SVGPreserveAspectRatio;
@@ -13772,7 +13991,7 @@ interface SVGAnimatedPreserveAspectRatio {
declare var SVGAnimatedPreserveAspectRatio: {
prototype: SVGAnimatedPreserveAspectRatio;
new(): SVGAnimatedPreserveAspectRatio;
-}
+};
interface SVGAnimatedRect {
readonly animVal: SVGRect;
@@ -13782,7 +14001,7 @@ interface SVGAnimatedRect {
declare var SVGAnimatedRect: {
prototype: SVGAnimatedRect;
new(): SVGAnimatedRect;
-}
+};
interface SVGAnimatedString {
readonly animVal: string;
@@ -13792,7 +14011,7 @@ interface SVGAnimatedString {
declare var SVGAnimatedString: {
prototype: SVGAnimatedString;
new(): SVGAnimatedString;
-}
+};
interface SVGAnimatedTransformList {
readonly animVal: SVGTransformList;
@@ -13802,7 +14021,7 @@ interface SVGAnimatedTransformList {
declare var SVGAnimatedTransformList: {
prototype: SVGAnimatedTransformList;
new(): SVGAnimatedTransformList;
-}
+};
interface SVGCircleElement extends SVGGraphicsElement {
readonly cx: SVGAnimatedLength;
@@ -13815,7 +14034,7 @@ interface SVGCircleElement extends SVGGraphicsElement {
declare var SVGCircleElement: {
prototype: SVGCircleElement;
new(): SVGCircleElement;
-}
+};
interface SVGClipPathElement extends SVGGraphicsElement, SVGUnitTypes {
readonly clipPathUnits: SVGAnimatedEnumeration;
@@ -13826,7 +14045,7 @@ interface SVGClipPathElement extends SVGGraphicsElement, SVGUnitTypes {
declare var SVGClipPathElement: {
prototype: SVGClipPathElement;
new(): SVGClipPathElement;
-}
+};
interface SVGComponentTransferFunctionElement extends SVGElement {
readonly amplitude: SVGAnimatedNumber;
@@ -13855,7 +14074,7 @@ declare var SVGComponentTransferFunctionElement: {
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;
@@ -13865,7 +14084,7 @@ interface SVGDefsElement extends SVGGraphicsElement {
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;
@@ -13875,7 +14094,7 @@ interface SVGDescElement extends SVGElement {
declare var SVGDescElement: {
prototype: SVGDescElement;
new(): SVGDescElement;
-}
+};
interface SVGElementEventMap extends ElementEventMap {
"click": MouseEvent;
@@ -13913,7 +14132,7 @@ interface SVGElement extends Element {
declare var SVGElement: {
prototype: SVGElement;
new(): SVGElement;
-}
+};
interface SVGElementInstance extends EventTarget {
readonly childNodes: SVGElementInstanceList;
@@ -13929,7 +14148,7 @@ interface SVGElementInstance extends EventTarget {
declare var SVGElementInstance: {
prototype: SVGElementInstance;
new(): SVGElementInstance;
-}
+};
interface SVGElementInstanceList {
readonly length: number;
@@ -13939,7 +14158,7 @@ interface SVGElementInstanceList {
declare var SVGElementInstanceList: {
prototype: SVGElementInstanceList;
new(): SVGElementInstanceList;
-}
+};
interface SVGEllipseElement extends SVGGraphicsElement {
readonly cx: SVGAnimatedLength;
@@ -13953,7 +14172,7 @@ interface SVGEllipseElement extends SVGGraphicsElement {
declare var SVGEllipseElement: {
prototype: SVGEllipseElement;
new(): SVGEllipseElement;
-}
+};
interface SVGFEBlendElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
readonly in1: SVGAnimatedString;
@@ -14000,7 +14219,7 @@ declare var SVGFEBlendElement: {
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;
@@ -14023,7 +14242,7 @@ declare var SVGFEColorMatrixElement: {
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;
@@ -14034,7 +14253,7 @@ interface SVGFEComponentTransferElement extends SVGElement, SVGFilterPrimitiveSt
declare var SVGFEComponentTransferElement: {
prototype: SVGFEComponentTransferElement;
new(): SVGFEComponentTransferElement;
-}
+};
interface SVGFECompositeElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
readonly in1: SVGAnimatedString;
@@ -14065,7 +14284,7 @@ declare var SVGFECompositeElement: {
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;
@@ -14095,7 +14314,7 @@ declare var SVGFEConvolveMatrixElement: {
readonly SVG_EDGEMODE_NONE: number;
readonly SVG_EDGEMODE_UNKNOWN: number;
readonly SVG_EDGEMODE_WRAP: number;
-}
+};
interface SVGFEDiffuseLightingElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
readonly diffuseConstant: SVGAnimatedNumber;
@@ -14110,7 +14329,7 @@ interface SVGFEDiffuseLightingElement extends SVGElement, SVGFilterPrimitiveStan
declare var SVGFEDiffuseLightingElement: {
prototype: SVGFEDiffuseLightingElement;
new(): SVGFEDiffuseLightingElement;
-}
+};
interface SVGFEDisplacementMapElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
readonly in1: SVGAnimatedString;
@@ -14135,7 +14354,7 @@ declare var SVGFEDisplacementMapElement: {
readonly SVG_CHANNEL_G: number;
readonly SVG_CHANNEL_R: number;
readonly SVG_CHANNEL_UNKNOWN: number;
-}
+};
interface SVGFEDistantLightElement extends SVGElement {
readonly azimuth: SVGAnimatedNumber;
@@ -14147,7 +14366,7 @@ interface SVGFEDistantLightElement extends SVGElement {
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;
@@ -14157,7 +14376,7 @@ interface SVGFEFloodElement extends SVGElement, SVGFilterPrimitiveStandardAttrib
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;
@@ -14167,7 +14386,7 @@ interface SVGFEFuncAElement extends SVGComponentTransferFunctionElement {
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;
@@ -14177,7 +14396,7 @@ interface SVGFEFuncBElement extends SVGComponentTransferFunctionElement {
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;
@@ -14187,7 +14406,7 @@ interface SVGFEFuncGElement extends SVGComponentTransferFunctionElement {
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;
@@ -14197,7 +14416,7 @@ interface SVGFEFuncRElement extends SVGComponentTransferFunctionElement {
declare var SVGFEFuncRElement: {
prototype: SVGFEFuncRElement;
new(): SVGFEFuncRElement;
-}
+};
interface SVGFEGaussianBlurElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
readonly in1: SVGAnimatedString;
@@ -14211,7 +14430,7 @@ interface SVGFEGaussianBlurElement extends SVGElement, SVGFilterPrimitiveStandar
declare var SVGFEGaussianBlurElement: {
prototype: SVGFEGaussianBlurElement;
new(): SVGFEGaussianBlurElement;
-}
+};
interface SVGFEImageElement extends SVGElement, SVGFilterPrimitiveStandardAttributes, SVGURIReference {
readonly preserveAspectRatio: SVGAnimatedPreserveAspectRatio;
@@ -14222,7 +14441,7 @@ interface SVGFEImageElement extends SVGElement, SVGFilterPrimitiveStandardAttrib
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;
@@ -14232,7 +14451,7 @@ interface SVGFEMergeElement extends SVGElement, SVGFilterPrimitiveStandardAttrib
declare var SVGFEMergeElement: {
prototype: SVGFEMergeElement;
new(): SVGFEMergeElement;
-}
+};
interface SVGFEMergeNodeElement extends SVGElement {
readonly in1: SVGAnimatedString;
@@ -14243,7 +14462,7 @@ interface SVGFEMergeNodeElement extends SVGElement {
declare var SVGFEMergeNodeElement: {
prototype: SVGFEMergeNodeElement;
new(): SVGFEMergeNodeElement;
-}
+};
interface SVGFEMorphologyElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
readonly in1: SVGAnimatedString;
@@ -14263,7 +14482,7 @@ declare var 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;
@@ -14276,7 +14495,7 @@ interface SVGFEOffsetElement extends SVGElement, SVGFilterPrimitiveStandardAttri
declare var SVGFEOffsetElement: {
prototype: SVGFEOffsetElement;
new(): SVGFEOffsetElement;
-}
+};
interface SVGFEPointLightElement extends SVGElement {
readonly x: SVGAnimatedNumber;
@@ -14289,7 +14508,7 @@ interface SVGFEPointLightElement extends SVGElement {
declare var SVGFEPointLightElement: {
prototype: SVGFEPointLightElement;
new(): SVGFEPointLightElement;
-}
+};
interface SVGFESpecularLightingElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
readonly in1: SVGAnimatedString;
@@ -14305,7 +14524,7 @@ interface SVGFESpecularLightingElement extends SVGElement, SVGFilterPrimitiveSta
declare var SVGFESpecularLightingElement: {
prototype: SVGFESpecularLightingElement;
new(): SVGFESpecularLightingElement;
-}
+};
interface SVGFESpotLightElement extends SVGElement {
readonly limitingConeAngle: SVGAnimatedNumber;
@@ -14323,7 +14542,7 @@ interface SVGFESpotLightElement extends SVGElement {
declare var SVGFESpotLightElement: {
prototype: SVGFESpotLightElement;
new(): SVGFESpotLightElement;
-}
+};
interface SVGFETileElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
readonly in1: SVGAnimatedString;
@@ -14334,7 +14553,7 @@ interface SVGFETileElement extends SVGElement, SVGFilterPrimitiveStandardAttribu
declare var SVGFETileElement: {
prototype: SVGFETileElement;
new(): SVGFETileElement;
-}
+};
interface SVGFETurbulenceElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
readonly baseFrequencyX: SVGAnimatedNumber;
@@ -14362,7 +14581,7 @@ declare var SVGFETurbulenceElement: {
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;
@@ -14381,7 +14600,7 @@ interface SVGFilterElement extends SVGElement, SVGUnitTypes, SVGURIReference {
declare var SVGFilterElement: {
prototype: SVGFilterElement;
new(): SVGFilterElement;
-}
+};
interface SVGForeignObjectElement extends SVGGraphicsElement {
readonly height: SVGAnimatedLength;
@@ -14395,7 +14614,7 @@ interface SVGForeignObjectElement extends SVGGraphicsElement {
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;
@@ -14405,7 +14624,7 @@ interface SVGGElement extends SVGGraphicsElement {
declare var SVGGElement: {
prototype: SVGGElement;
new(): SVGGElement;
-}
+};
interface SVGGradientElement extends SVGElement, SVGUnitTypes, SVGURIReference {
readonly gradientTransform: SVGAnimatedTransformList;
@@ -14426,7 +14645,7 @@ declare var SVGGradientElement: {
readonly SVG_SPREADMETHOD_REFLECT: number;
readonly SVG_SPREADMETHOD_REPEAT: number;
readonly SVG_SPREADMETHOD_UNKNOWN: number;
-}
+};
interface SVGGraphicsElement extends SVGElement, SVGTests {
readonly farthestViewportElement: SVGElement;
@@ -14443,7 +14662,7 @@ interface SVGGraphicsElement extends SVGElement, SVGTests {
declare var SVGGraphicsElement: {
prototype: SVGGraphicsElement;
new(): SVGGraphicsElement;
-}
+};
interface SVGImageElement extends SVGGraphicsElement, SVGURIReference {
readonly height: SVGAnimatedLength;
@@ -14458,7 +14677,7 @@ interface SVGImageElement extends SVGGraphicsElement, SVGURIReference {
declare var SVGImageElement: {
prototype: SVGImageElement;
new(): SVGImageElement;
-}
+};
interface SVGLength {
readonly unitType: number;
@@ -14494,7 +14713,7 @@ declare var SVGLength: {
readonly SVG_LENGTHTYPE_PT: number;
readonly SVG_LENGTHTYPE_PX: number;
readonly SVG_LENGTHTYPE_UNKNOWN: number;
-}
+};
interface SVGLengthList {
readonly numberOfItems: number;
@@ -14510,35 +14729,35 @@ interface SVGLengthList {
declare var SVGLengthList: {
prototype: SVGLengthList;
new(): SVGLengthList;
-}
+};
-interface SVGLineElement extends SVGGraphicsElement {
+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: SVGLineElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ 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 SVGLineElement: {
- prototype: SVGLineElement;
- new(): SVGLineElement;
-}
+declare var SVGLinearGradientElement: {
+ prototype: SVGLinearGradientElement;
+ new(): SVGLinearGradientElement;
+};
-interface SVGLinearGradientElement extends SVGGradientElement {
+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: SVGLinearGradientElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ 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 SVGLinearGradientElement: {
- prototype: SVGLinearGradientElement;
- new(): SVGLinearGradientElement;
-}
+declare var SVGLineElement: {
+ prototype: SVGLineElement;
+ new(): SVGLineElement;
+};
interface SVGMarkerElement extends SVGElement, SVGFitToViewBox {
readonly markerHeight: SVGAnimatedLength;
@@ -14550,12 +14769,12 @@ interface SVGMarkerElement extends SVGElement, SVGFitToViewBox {
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;
+ readonly SVG_MARKERUNITS_STROKEWIDTH: number;
+ readonly SVG_MARKERUNITS_UNKNOWN: number;
+ readonly SVG_MARKERUNITS_USERSPACEONUSE: 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;
}
@@ -14563,13 +14782,13 @@ interface SVGMarkerElement extends SVGElement, SVGFitToViewBox {
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;
-}
+ readonly SVG_MARKERUNITS_STROKEWIDTH: number;
+ readonly SVG_MARKERUNITS_UNKNOWN: number;
+ readonly SVG_MARKERUNITS_USERSPACEONUSE: number;
+};
interface SVGMaskElement extends SVGElement, SVGTests, SVGUnitTypes {
readonly height: SVGAnimatedLength;
@@ -14585,7 +14804,7 @@ interface SVGMaskElement extends SVGElement, SVGTests, SVGUnitTypes {
declare var SVGMaskElement: {
prototype: SVGMaskElement;
new(): SVGMaskElement;
-}
+};
interface SVGMatrix {
a: number;
@@ -14610,7 +14829,7 @@ interface 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;
@@ -14620,7 +14839,7 @@ interface SVGMetadataElement extends SVGElement {
declare var SVGMetadataElement: {
prototype: SVGMetadataElement;
new(): SVGMetadataElement;
-}
+};
interface SVGNumber {
value: number;
@@ -14629,7 +14848,7 @@ interface SVGNumber {
declare var SVGNumber: {
prototype: SVGNumber;
new(): SVGNumber;
-}
+};
interface SVGNumberList {
readonly numberOfItems: number;
@@ -14645,7 +14864,7 @@ interface SVGNumberList {
declare var SVGNumberList: {
prototype: SVGNumberList;
new(): SVGNumberList;
-}
+};
interface SVGPathElement extends SVGGraphicsElement {
readonly pathSegList: SVGPathSegList;
@@ -14678,7 +14897,7 @@ interface SVGPathElement extends SVGGraphicsElement {
declare var SVGPathElement: {
prototype: SVGPathElement;
new(): SVGPathElement;
-}
+};
interface SVGPathSeg {
readonly pathSegType: number;
@@ -14728,7 +14947,7 @@ declare var SVGPathSeg: {
readonly PATHSEG_MOVETO_ABS: number;
readonly PATHSEG_MOVETO_REL: number;
readonly PATHSEG_UNKNOWN: number;
-}
+};
interface SVGPathSegArcAbs extends SVGPathSeg {
angle: number;
@@ -14743,7 +14962,7 @@ interface SVGPathSegArcAbs extends SVGPathSeg {
declare var SVGPathSegArcAbs: {
prototype: SVGPathSegArcAbs;
new(): SVGPathSegArcAbs;
-}
+};
interface SVGPathSegArcRel extends SVGPathSeg {
angle: number;
@@ -14758,7 +14977,7 @@ interface SVGPathSegArcRel extends SVGPathSeg {
declare var SVGPathSegArcRel: {
prototype: SVGPathSegArcRel;
new(): SVGPathSegArcRel;
-}
+};
interface SVGPathSegClosePath extends SVGPathSeg {
}
@@ -14766,7 +14985,7 @@ interface SVGPathSegClosePath extends SVGPathSeg {
declare var SVGPathSegClosePath: {
prototype: SVGPathSegClosePath;
new(): SVGPathSegClosePath;
-}
+};
interface SVGPathSegCurvetoCubicAbs extends SVGPathSeg {
x: number;
@@ -14780,7 +14999,7 @@ interface SVGPathSegCurvetoCubicAbs extends SVGPathSeg {
declare var SVGPathSegCurvetoCubicAbs: {
prototype: SVGPathSegCurvetoCubicAbs;
new(): SVGPathSegCurvetoCubicAbs;
-}
+};
interface SVGPathSegCurvetoCubicRel extends SVGPathSeg {
x: number;
@@ -14794,7 +15013,7 @@ interface SVGPathSegCurvetoCubicRel extends SVGPathSeg {
declare var SVGPathSegCurvetoCubicRel: {
prototype: SVGPathSegCurvetoCubicRel;
new(): SVGPathSegCurvetoCubicRel;
-}
+};
interface SVGPathSegCurvetoCubicSmoothAbs extends SVGPathSeg {
x: number;
@@ -14806,7 +15025,7 @@ interface SVGPathSegCurvetoCubicSmoothAbs extends SVGPathSeg {
declare var SVGPathSegCurvetoCubicSmoothAbs: {
prototype: SVGPathSegCurvetoCubicSmoothAbs;
new(): SVGPathSegCurvetoCubicSmoothAbs;
-}
+};
interface SVGPathSegCurvetoCubicSmoothRel extends SVGPathSeg {
x: number;
@@ -14818,7 +15037,7 @@ interface SVGPathSegCurvetoCubicSmoothRel extends SVGPathSeg {
declare var SVGPathSegCurvetoCubicSmoothRel: {
prototype: SVGPathSegCurvetoCubicSmoothRel;
new(): SVGPathSegCurvetoCubicSmoothRel;
-}
+};
interface SVGPathSegCurvetoQuadraticAbs extends SVGPathSeg {
x: number;
@@ -14830,7 +15049,7 @@ interface SVGPathSegCurvetoQuadraticAbs extends SVGPathSeg {
declare var SVGPathSegCurvetoQuadraticAbs: {
prototype: SVGPathSegCurvetoQuadraticAbs;
new(): SVGPathSegCurvetoQuadraticAbs;
-}
+};
interface SVGPathSegCurvetoQuadraticRel extends SVGPathSeg {
x: number;
@@ -14842,7 +15061,7 @@ interface SVGPathSegCurvetoQuadraticRel extends SVGPathSeg {
declare var SVGPathSegCurvetoQuadraticRel: {
prototype: SVGPathSegCurvetoQuadraticRel;
new(): SVGPathSegCurvetoQuadraticRel;
-}
+};
interface SVGPathSegCurvetoQuadraticSmoothAbs extends SVGPathSeg {
x: number;
@@ -14852,7 +15071,7 @@ interface SVGPathSegCurvetoQuadraticSmoothAbs extends SVGPathSeg {
declare var SVGPathSegCurvetoQuadraticSmoothAbs: {
prototype: SVGPathSegCurvetoQuadraticSmoothAbs;
new(): SVGPathSegCurvetoQuadraticSmoothAbs;
-}
+};
interface SVGPathSegCurvetoQuadraticSmoothRel extends SVGPathSeg {
x: number;
@@ -14862,7 +15081,7 @@ interface SVGPathSegCurvetoQuadraticSmoothRel extends SVGPathSeg {
declare var SVGPathSegCurvetoQuadraticSmoothRel: {
prototype: SVGPathSegCurvetoQuadraticSmoothRel;
new(): SVGPathSegCurvetoQuadraticSmoothRel;
-}
+};
interface SVGPathSegLinetoAbs extends SVGPathSeg {
x: number;
@@ -14872,7 +15091,7 @@ interface SVGPathSegLinetoAbs extends SVGPathSeg {
declare var SVGPathSegLinetoAbs: {
prototype: SVGPathSegLinetoAbs;
new(): SVGPathSegLinetoAbs;
-}
+};
interface SVGPathSegLinetoHorizontalAbs extends SVGPathSeg {
x: number;
@@ -14881,7 +15100,7 @@ interface SVGPathSegLinetoHorizontalAbs extends SVGPathSeg {
declare var SVGPathSegLinetoHorizontalAbs: {
prototype: SVGPathSegLinetoHorizontalAbs;
new(): SVGPathSegLinetoHorizontalAbs;
-}
+};
interface SVGPathSegLinetoHorizontalRel extends SVGPathSeg {
x: number;
@@ -14890,7 +15109,7 @@ interface SVGPathSegLinetoHorizontalRel extends SVGPathSeg {
declare var SVGPathSegLinetoHorizontalRel: {
prototype: SVGPathSegLinetoHorizontalRel;
new(): SVGPathSegLinetoHorizontalRel;
-}
+};
interface SVGPathSegLinetoRel extends SVGPathSeg {
x: number;
@@ -14900,7 +15119,7 @@ interface SVGPathSegLinetoRel extends SVGPathSeg {
declare var SVGPathSegLinetoRel: {
prototype: SVGPathSegLinetoRel;
new(): SVGPathSegLinetoRel;
-}
+};
interface SVGPathSegLinetoVerticalAbs extends SVGPathSeg {
y: number;
@@ -14909,7 +15128,7 @@ interface SVGPathSegLinetoVerticalAbs extends SVGPathSeg {
declare var SVGPathSegLinetoVerticalAbs: {
prototype: SVGPathSegLinetoVerticalAbs;
new(): SVGPathSegLinetoVerticalAbs;
-}
+};
interface SVGPathSegLinetoVerticalRel extends SVGPathSeg {
y: number;
@@ -14918,7 +15137,7 @@ interface SVGPathSegLinetoVerticalRel extends SVGPathSeg {
declare var SVGPathSegLinetoVerticalRel: {
prototype: SVGPathSegLinetoVerticalRel;
new(): SVGPathSegLinetoVerticalRel;
-}
+};
interface SVGPathSegList {
readonly numberOfItems: number;
@@ -14934,7 +15153,7 @@ interface SVGPathSegList {
declare var SVGPathSegList: {
prototype: SVGPathSegList;
new(): SVGPathSegList;
-}
+};
interface SVGPathSegMovetoAbs extends SVGPathSeg {
x: number;
@@ -14944,7 +15163,7 @@ interface SVGPathSegMovetoAbs extends SVGPathSeg {
declare var SVGPathSegMovetoAbs: {
prototype: SVGPathSegMovetoAbs;
new(): SVGPathSegMovetoAbs;
-}
+};
interface SVGPathSegMovetoRel extends SVGPathSeg {
x: number;
@@ -14954,7 +15173,7 @@ interface SVGPathSegMovetoRel extends SVGPathSeg {
declare var SVGPathSegMovetoRel: {
prototype: SVGPathSegMovetoRel;
new(): SVGPathSegMovetoRel;
-}
+};
interface SVGPatternElement extends SVGElement, SVGTests, SVGUnitTypes, SVGFitToViewBox, SVGURIReference {
readonly height: SVGAnimatedLength;
@@ -14971,7 +15190,7 @@ interface SVGPatternElement extends SVGElement, SVGTests, SVGUnitTypes, SVGFitTo
declare var SVGPatternElement: {
prototype: SVGPatternElement;
new(): SVGPatternElement;
-}
+};
interface SVGPoint {
x: number;
@@ -14982,7 +15201,7 @@ interface SVGPoint {
declare var SVGPoint: {
prototype: SVGPoint;
new(): SVGPoint;
-}
+};
interface SVGPointList {
readonly numberOfItems: number;
@@ -14998,7 +15217,7 @@ interface SVGPointList {
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;
@@ -15008,7 +15227,7 @@ interface SVGPolygonElement extends SVGGraphicsElement, SVGAnimatedPoints {
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;
@@ -15018,7 +15237,7 @@ interface SVGPolylineElement extends SVGGraphicsElement, SVGAnimatedPoints {
declare var SVGPolylineElement: {
prototype: SVGPolylineElement;
new(): SVGPolylineElement;
-}
+};
interface SVGPreserveAspectRatio {
align: number;
@@ -15056,7 +15275,7 @@ declare var SVGPreserveAspectRatio: {
readonly SVG_PRESERVEASPECTRATIO_XMINYMAX: number;
readonly SVG_PRESERVEASPECTRATIO_XMINYMID: number;
readonly SVG_PRESERVEASPECTRATIO_XMINYMIN: number;
-}
+};
interface SVGRadialGradientElement extends SVGGradientElement {
readonly cx: SVGAnimatedLength;
@@ -15071,7 +15290,7 @@ interface SVGRadialGradientElement extends SVGGradientElement {
declare var SVGRadialGradientElement: {
prototype: SVGRadialGradientElement;
new(): SVGRadialGradientElement;
-}
+};
interface SVGRect {
height: number;
@@ -15083,7 +15302,7 @@ interface SVGRect {
declare var SVGRect: {
prototype: SVGRect;
new(): SVGRect;
-}
+};
interface SVGRectElement extends SVGGraphicsElement {
readonly height: SVGAnimatedLength;
@@ -15099,8 +15318,60 @@ interface SVGRectElement extends SVGGraphicsElement {
declare var SVGRectElement: {
prototype: SVGRectElement;
new(): SVGRectElement;
+};
+
+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 SVGSVGElementEventMap extends SVGElementEventMap {
"SVGAbort": Event;
"SVGError": Event;
@@ -15160,59 +15431,7 @@ interface SVGSVGElement extends SVGGraphicsElement, DocumentEvent, SVGFitToViewB
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;
@@ -15222,7 +15441,7 @@ interface SVGSwitchElement extends SVGGraphicsElement {
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;
@@ -15232,17 +15451,7 @@ interface SVGSymbolElement extends SVGElement, SVGFitToViewBox {
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;
@@ -15269,7 +15478,7 @@ declare var 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;
@@ -15279,7 +15488,7 @@ interface SVGTextElement extends SVGTextPositioningElement {
declare var SVGTextElement: {
prototype: SVGTextElement;
new(): SVGTextElement;
-}
+};
interface SVGTextPathElement extends SVGTextContentElement, SVGURIReference {
readonly method: SVGAnimatedEnumeration;
@@ -15304,7 +15513,7 @@ declare var SVGTextPathElement: {
readonly TEXTPATH_SPACINGTYPE_AUTO: number;
readonly TEXTPATH_SPACINGTYPE_EXACT: number;
readonly TEXTPATH_SPACINGTYPE_UNKNOWN: number;
-}
+};
interface SVGTextPositioningElement extends SVGTextContentElement {
readonly dx: SVGAnimatedLengthList;
@@ -15319,7 +15528,7 @@ interface SVGTextPositioningElement extends SVGTextContentElement {
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;
@@ -15329,7 +15538,7 @@ interface SVGTitleElement extends SVGElement {
declare var SVGTitleElement: {
prototype: SVGTitleElement;
new(): SVGTitleElement;
-}
+};
interface SVGTransform {
readonly angle: number;
@@ -15360,7 +15569,7 @@ declare var SVGTransform: {
readonly SVG_TRANSFORM_SKEWY: number;
readonly SVG_TRANSFORM_TRANSLATE: number;
readonly SVG_TRANSFORM_UNKNOWN: number;
-}
+};
interface SVGTransformList {
readonly numberOfItems: number;
@@ -15378,8 +15587,18 @@ interface SVGTransformList {
declare var SVGTransformList: {
prototype: SVGTransformList;
new(): SVGTransformList;
+};
+
+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 SVGUnitTypes {
readonly SVG_UNIT_TYPE_OBJECTBOUNDINGBOX: number;
readonly SVG_UNIT_TYPE_UNKNOWN: number;
@@ -15401,7 +15620,7 @@ interface SVGUseElement extends SVGGraphicsElement, SVGURIReference {
declare var SVGUseElement: {
prototype: SVGUseElement;
new(): SVGUseElement;
-}
+};
interface SVGViewElement extends SVGElement, SVGZoomAndPan, SVGFitToViewBox {
readonly viewTarget: SVGStringList;
@@ -15412,7 +15631,7 @@ interface SVGViewElement extends SVGElement, SVGZoomAndPan, SVGFitToViewBox {
declare var SVGViewElement: {
prototype: SVGViewElement;
new(): SVGViewElement;
-}
+};
interface SVGZoomAndPan {
readonly zoomAndPan: number;
@@ -15422,7 +15641,7 @@ 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;
@@ -15435,420 +15654,7 @@ interface SVGZoomEvent extends UIEvent {
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;
@@ -15858,7 +15664,7 @@ interface SyncManager {
declare var SyncManager: {
prototype: SyncManager;
new(): SyncManager;
-}
+};
interface Text extends CharacterData {
readonly wholeText: string;
@@ -15869,7 +15675,7 @@ interface Text extends CharacterData {
declare var Text: {
prototype: Text;
new(data?: string): Text;
-}
+};
interface TextEvent extends UIEvent {
readonly data: string;
@@ -15901,7 +15707,7 @@ declare var TextEvent: {
readonly DOM_INPUT_METHOD_SCRIPT: number;
readonly DOM_INPUT_METHOD_UNKNOWN: number;
readonly DOM_INPUT_METHOD_VOICE: number;
-}
+};
interface TextMetrics {
readonly width: number;
@@ -15910,7 +15716,7 @@ interface TextMetrics {
declare var TextMetrics: {
prototype: TextMetrics;
new(): TextMetrics;
-}
+};
interface TextTrackEventMap {
"cuechange": Event;
@@ -15953,7 +15759,7 @@ declare var TextTrack: {
readonly LOADING: number;
readonly NONE: number;
readonly SHOWING: number;
-}
+};
interface TextTrackCueEventMap {
"enter": Event;
@@ -15977,7 +15783,7 @@ interface TextTrackCue extends EventTarget {
declare var TextTrackCue: {
prototype: TextTrackCue;
new(startTime: number, endTime: number, text: string): TextTrackCue;
-}
+};
interface TextTrackCueList {
readonly length: number;
@@ -15989,7 +15795,7 @@ interface TextTrackCueList {
declare var TextTrackCueList: {
prototype: TextTrackCueList;
new(): TextTrackCueList;
-}
+};
interface TextTrackListEventMap {
"addtrack": TrackEvent;
@@ -16007,7 +15813,7 @@ interface TextTrackList extends EventTarget {
declare var TextTrackList: {
prototype: TextTrackList;
new(): TextTrackList;
-}
+};
interface TimeRanges {
readonly length: number;
@@ -16018,7 +15824,7 @@ interface TimeRanges {
declare var TimeRanges: {
prototype: TimeRanges;
new(): TimeRanges;
-}
+};
interface Touch {
readonly clientX: number;
@@ -16034,7 +15840,7 @@ interface Touch {
declare var Touch: {
prototype: Touch;
new(): Touch;
-}
+};
interface TouchEvent extends UIEvent {
readonly altKey: boolean;
@@ -16052,7 +15858,7 @@ interface TouchEvent extends UIEvent {
declare var TouchEvent: {
prototype: TouchEvent;
new(type: string, touchEventInit?: TouchEventInit): TouchEvent;
-}
+};
interface TouchList {
readonly length: number;
@@ -16063,7 +15869,7 @@ interface TouchList {
declare var TouchList: {
prototype: TouchList;
new(): TouchList;
-}
+};
interface TrackEvent extends Event {
readonly track: VideoTrack | AudioTrack | TextTrack | null;
@@ -16072,7 +15878,7 @@ interface TrackEvent extends Event {
declare var TrackEvent: {
prototype: TrackEvent;
new(typeArg: string, eventInitDict?: TrackEventInit): TrackEvent;
-}
+};
interface TransitionEvent extends Event {
readonly elapsedTime: number;
@@ -16083,7 +15889,7 @@ interface TransitionEvent extends Event {
declare var TransitionEvent: {
prototype: TransitionEvent;
new(typeArg: string, eventInitDict?: TransitionEventInit): TransitionEvent;
-}
+};
interface TreeWalker {
currentNode: Node;
@@ -16103,7 +15909,7 @@ interface TreeWalker {
declare var TreeWalker: {
prototype: TreeWalker;
new(): TreeWalker;
-}
+};
interface UIEvent extends Event {
readonly detail: number;
@@ -16114,8 +15920,17 @@ interface UIEvent extends Event {
declare var UIEvent: {
prototype: UIEvent;
new(typeArg: string, eventInitDict?: UIEventInit): UIEvent;
+};
+
+interface UnviewableContentIdentifiedEvent extends NavigationEventWithReferrer {
+ readonly mediaType: string;
}
+declare var UnviewableContentIdentifiedEvent: {
+ prototype: UnviewableContentIdentifiedEvent;
+ new(): UnviewableContentIdentifiedEvent;
+};
+
interface URL {
hash: string;
host: string;
@@ -16137,16 +15952,7 @@ declare var 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;
@@ -16164,7 +15970,7 @@ interface ValidityState {
declare var ValidityState: {
prototype: ValidityState;
new(): ValidityState;
-}
+};
interface VideoPlaybackQuality {
readonly corruptedVideoFrames: number;
@@ -16177,7 +15983,7 @@ interface VideoPlaybackQuality {
declare var VideoPlaybackQuality: {
prototype: VideoPlaybackQuality;
new(): VideoPlaybackQuality;
-}
+};
interface VideoTrack {
readonly id: string;
@@ -16191,7 +15997,7 @@ interface VideoTrack {
declare var VideoTrack: {
prototype: VideoTrack;
new(): VideoTrack;
-}
+};
interface VideoTrackListEventMap {
"addtrack": TrackEvent;
@@ -16215,23 +16021,55 @@ interface VideoTrackList extends EventTarget {
declare var VideoTrackList: {
prototype: VideoTrackList;
new(): VideoTrackList;
+};
+
+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 WEBGL_compressed_texture_s3tc {
+ readonly COMPRESSED_RGB_S3TC_DXT1_EXT: number;
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_RGB_S3TC_DXT1_EXT: number;
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;
@@ -16243,7 +16081,7 @@ declare var 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;
@@ -16253,39 +16091,7 @@ 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;
@@ -16296,7 +16102,7 @@ interface WebGLActiveInfo {
declare var WebGLActiveInfo: {
prototype: WebGLActiveInfo;
new(): WebGLActiveInfo;
-}
+};
interface WebGLBuffer extends WebGLObject {
}
@@ -16304,7 +16110,7 @@ interface WebGLBuffer extends WebGLObject {
declare var WebGLBuffer: {
prototype: WebGLBuffer;
new(): WebGLBuffer;
-}
+};
interface WebGLContextEvent extends Event {
readonly statusMessage: string;
@@ -16313,7 +16119,7 @@ interface WebGLContextEvent extends Event {
declare var WebGLContextEvent: {
prototype: WebGLContextEvent;
new(typeArg: string, eventInitDict?: WebGLContextEventInit): WebGLContextEvent;
-}
+};
interface WebGLFramebuffer extends WebGLObject {
}
@@ -16321,7 +16127,7 @@ interface WebGLFramebuffer extends WebGLObject {
declare var WebGLFramebuffer: {
prototype: WebGLFramebuffer;
new(): WebGLFramebuffer;
-}
+};
interface WebGLObject {
}
@@ -16329,7 +16135,7 @@ interface WebGLObject {
declare var WebGLObject: {
prototype: WebGLObject;
new(): WebGLObject;
-}
+};
interface WebGLProgram extends WebGLObject {
}
@@ -16337,7 +16143,7 @@ interface WebGLProgram extends WebGLObject {
declare var WebGLProgram: {
prototype: WebGLProgram;
new(): WebGLProgram;
-}
+};
interface WebGLRenderbuffer extends WebGLObject {
}
@@ -16345,7 +16151,7 @@ interface WebGLRenderbuffer extends WebGLObject {
declare var WebGLRenderbuffer: {
prototype: WebGLRenderbuffer;
new(): WebGLRenderbuffer;
-}
+};
interface WebGLRenderingContext {
readonly canvas: HTMLCanvasElement;
@@ -16606,13 +16412,13 @@ interface WebGLRenderingContext {
readonly KEEP: number;
readonly LEQUAL: number;
readonly LESS: number;
+ readonly LINE_LOOP: number;
+ readonly LINE_STRIP: number;
+ readonly LINE_WIDTH: 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;
@@ -16637,9 +16443,9 @@ interface WebGLRenderingContext {
readonly NEAREST_MIPMAP_NEAREST: number;
readonly NEVER: number;
readonly NICEST: number;
+ readonly NO_ERROR: 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;
@@ -16669,18 +16475,18 @@ interface WebGLRenderingContext {
readonly REPEAT: number;
readonly REPLACE: number;
readonly RGB: number;
- readonly RGB565: number;
readonly RGB5_A1: number;
+ readonly RGB565: 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 SAMPLER_2D: number;
+ readonly SAMPLER_CUBE: number;
+ readonly SAMPLES: number;
readonly SCISSOR_BOX: number;
readonly SCISSOR_TEST: number;
readonly SHADER_TYPE: number;
@@ -16714,6 +16520,20 @@ interface WebGLRenderingContext {
readonly STREAM_DRAW: number;
readonly SUBPIXEL_BITS: number;
readonly TEXTURE: 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 TEXTURE0: number;
readonly TEXTURE1: number;
readonly TEXTURE10: number;
@@ -16746,23 +16566,9 @@ interface WebGLRenderingContext {
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 TRIANGLES: number;
readonly UNPACK_ALIGNMENT: number;
readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: number;
readonly UNPACK_FLIP_Y_WEBGL: number;
@@ -16908,13 +16714,13 @@ declare var WebGLRenderingContext: {
readonly KEEP: number;
readonly LEQUAL: number;
readonly LESS: number;
+ readonly LINE_LOOP: number;
+ readonly LINE_STRIP: number;
+ readonly LINE_WIDTH: 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;
@@ -16939,9 +16745,9 @@ declare var WebGLRenderingContext: {
readonly NEAREST_MIPMAP_NEAREST: number;
readonly NEVER: number;
readonly NICEST: number;
+ readonly NO_ERROR: 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;
@@ -16971,18 +16777,18 @@ declare var WebGLRenderingContext: {
readonly REPEAT: number;
readonly REPLACE: number;
readonly RGB: number;
- readonly RGB565: number;
readonly RGB5_A1: number;
+ readonly RGB565: 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 SAMPLER_2D: number;
+ readonly SAMPLER_CUBE: number;
+ readonly SAMPLES: number;
readonly SCISSOR_BOX: number;
readonly SCISSOR_TEST: number;
readonly SHADER_TYPE: number;
@@ -17016,6 +16822,20 @@ declare var WebGLRenderingContext: {
readonly STREAM_DRAW: number;
readonly SUBPIXEL_BITS: number;
readonly TEXTURE: 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 TEXTURE0: number;
readonly TEXTURE1: number;
readonly TEXTURE10: number;
@@ -17048,23 +16868,9 @@ declare var WebGLRenderingContext: {
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 TRIANGLES: number;
readonly UNPACK_ALIGNMENT: number;
readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: number;
readonly UNPACK_FLIP_Y_WEBGL: number;
@@ -17088,7 +16894,7 @@ declare var WebGLRenderingContext: {
readonly VERTEX_SHADER: number;
readonly VIEWPORT: number;
readonly ZERO: number;
-}
+};
interface WebGLShader extends WebGLObject {
}
@@ -17096,7 +16902,7 @@ interface WebGLShader extends WebGLObject {
declare var WebGLShader: {
prototype: WebGLShader;
new(): WebGLShader;
-}
+};
interface WebGLShaderPrecisionFormat {
readonly precision: number;
@@ -17107,7 +16913,7 @@ interface WebGLShaderPrecisionFormat {
declare var WebGLShaderPrecisionFormat: {
prototype: WebGLShaderPrecisionFormat;
new(): WebGLShaderPrecisionFormat;
-}
+};
interface WebGLTexture extends WebGLObject {
}
@@ -17115,7 +16921,7 @@ interface WebGLTexture extends WebGLObject {
declare var WebGLTexture: {
prototype: WebGLTexture;
new(): WebGLTexture;
-}
+};
interface WebGLUniformLocation {
}
@@ -17123,7 +16929,7 @@ interface WebGLUniformLocation {
declare var WebGLUniformLocation: {
prototype: WebGLUniformLocation;
new(): WebGLUniformLocation;
-}
+};
interface WebKitCSSMatrix {
a: number;
@@ -17163,7 +16969,7 @@ interface WebKitCSSMatrix {
declare var WebKitCSSMatrix: {
prototype: WebKitCSSMatrix;
new(text?: string): WebKitCSSMatrix;
-}
+};
interface WebKitDirectoryEntry extends WebKitEntry {
createReader(): WebKitDirectoryReader;
@@ -17172,7 +16978,7 @@ interface WebKitDirectoryEntry extends WebKitEntry {
declare var WebKitDirectoryEntry: {
prototype: WebKitDirectoryEntry;
new(): WebKitDirectoryEntry;
-}
+};
interface WebKitDirectoryReader {
readEntries(successCallback: WebKitEntriesCallback, errorCallback?: WebKitErrorCallback): void;
@@ -17181,7 +16987,7 @@ interface WebKitDirectoryReader {
declare var WebKitDirectoryReader: {
prototype: WebKitDirectoryReader;
new(): WebKitDirectoryReader;
-}
+};
interface WebKitEntry {
readonly filesystem: WebKitFileSystem;
@@ -17194,7 +17000,7 @@ interface WebKitEntry {
declare var WebKitEntry: {
prototype: WebKitEntry;
new(): WebKitEntry;
-}
+};
interface WebKitFileEntry extends WebKitEntry {
file(successCallback: WebKitFileCallback, errorCallback?: WebKitErrorCallback): void;
@@ -17203,7 +17009,7 @@ interface WebKitFileEntry extends WebKitEntry {
declare var WebKitFileEntry: {
prototype: WebKitFileEntry;
new(): WebKitFileEntry;
-}
+};
interface WebKitFileSystem {
readonly name: string;
@@ -17213,7 +17019,7 @@ interface WebKitFileSystem {
declare var WebKitFileSystem: {
prototype: WebKitFileSystem;
new(): WebKitFileSystem;
-}
+};
interface WebKitPoint {
x: number;
@@ -17223,8 +17029,18 @@ interface WebKitPoint {
declare var WebKitPoint: {
prototype: WebKitPoint;
new(x?: number, y?: number): WebKitPoint;
+};
+
+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 WebSocketEventMap {
"close": CloseEvent;
"error": Event;
@@ -17260,7 +17076,7 @@ declare var WebSocket: {
readonly CLOSING: number;
readonly CONNECTING: number;
readonly OPEN: number;
-}
+};
interface WheelEvent extends MouseEvent {
readonly deltaMode: number;
@@ -17283,7 +17099,7 @@ declare var WheelEvent: {
readonly DOM_DELTA_LINE: number;
readonly DOM_DELTA_PAGE: number;
readonly DOM_DELTA_PIXEL: number;
-}
+};
interface WindowEventMap extends GlobalEventHandlersEventMap {
"abort": UIEvent;
@@ -17311,6 +17127,7 @@ interface WindowEventMap extends GlobalEventHandlersEventMap {
"durationchange": Event;
"emptied": Event;
"ended": MediaStreamErrorEvent;
+ "error": ErrorEvent;
"focus": FocusEvent;
"hashchange": HashChangeEvent;
"input": Event;
@@ -17369,6 +17186,10 @@ interface WindowEventMap extends GlobalEventHandlersEventMap {
"submit": Event;
"suspend": Event;
"timeupdate": Event;
+ "touchcancel": TouchEvent;
+ "touchend": TouchEvent;
+ "touchmove": TouchEvent;
+ "touchstart": TouchEvent;
"unload": Event;
"volumechange": Event;
"waiting": Event;
@@ -17382,8 +17203,8 @@ interface Window extends EventTarget, WindowTimers, WindowSessionStorage, Window
readonly crypto: Crypto;
defaultStatus: string;
readonly devicePixelRatio: number;
- readonly doNotTrack: string;
readonly document: Document;
+ readonly doNotTrack: string;
event: Event | undefined;
readonly external: External;
readonly frameElement: Element;
@@ -17506,9 +17327,9 @@ interface Window extends EventTarget, WindowTimers, WindowSessionStorage, Window
readonly screenTop: number;
readonly screenX: number;
readonly screenY: number;
+ readonly scrollbars: BarProp;
readonly scrollX: number;
readonly scrollY: number;
- readonly scrollbars: BarProp;
readonly self: Window;
readonly speechSynthesis: SpeechSynthesis;
status: string;
@@ -17564,7 +17385,7 @@ interface Window extends EventTarget, WindowTimers, WindowSessionStorage, Window
declare var Window: {
prototype: Window;
new(): Window;
-}
+};
interface WorkerEventMap extends AbstractWorkerEventMap {
"message": MessageEvent;
@@ -17581,7 +17402,7 @@ interface Worker extends EventTarget, AbstractWorker {
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;
@@ -17591,7 +17412,7 @@ interface XMLDocument extends Document {
declare var XMLDocument: {
prototype: XMLDocument;
new(): XMLDocument;
-}
+};
interface XMLHttpRequestEventMap extends XMLHttpRequestEventTargetEventMap {
"readystatechange": Event;
@@ -17638,7 +17459,7 @@ declare var XMLHttpRequest: {
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;
@@ -17648,7 +17469,7 @@ interface XMLHttpRequestUpload extends EventTarget, XMLHttpRequestEventTarget {
declare var XMLHttpRequestUpload: {
prototype: XMLHttpRequestUpload;
new(): XMLHttpRequestUpload;
-}
+};
interface XMLSerializer {
serializeToString(target: Node): string;
@@ -17657,7 +17478,7 @@ interface XMLSerializer {
declare var XMLSerializer: {
prototype: XMLSerializer;
new(): XMLSerializer;
-}
+};
interface XPathEvaluator {
createExpression(expression: string, resolver: XPathNSResolver): XPathExpression;
@@ -17668,7 +17489,7 @@ interface XPathEvaluator {
declare var XPathEvaluator: {
prototype: XPathEvaluator;
new(): XPathEvaluator;
-}
+};
interface XPathExpression {
evaluate(contextNode: Node, type: number, result: XPathResult | null): XPathResult;
@@ -17677,7 +17498,7 @@ interface XPathExpression {
declare var XPathExpression: {
prototype: XPathExpression;
new(): XPathExpression;
-}
+};
interface XPathNSResolver {
lookupNamespaceURI(prefix: string): string;
@@ -17686,7 +17507,7 @@ interface XPathNSResolver {
declare var XPathNSResolver: {
prototype: XPathNSResolver;
new(): XPathNSResolver;
-}
+};
interface XPathResult {
readonly booleanValue: boolean;
@@ -17723,7 +17544,7 @@ declare var XPathResult: {
readonly STRING_TYPE: number;
readonly UNORDERED_NODE_ITERATOR_TYPE: number;
readonly UNORDERED_NODE_SNAPSHOT_TYPE: number;
-}
+};
interface XSLTProcessor {
clearParameters(): void;
@@ -17739,17 +17560,7 @@ interface XSLTProcessor {
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;
@@ -17786,6 +17597,81 @@ interface ChildNode {
remove(): void;
}
+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 DOML2DeprecatedColorProperty {
color: string;
}
@@ -17794,81 +17680,6 @@ 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;
@@ -17913,16 +17724,16 @@ interface GlobalFetch {
interface HTMLTableAlignment {
/**
- * Sets or retrieves a value that you can use to implement your own ch functionality for the object.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves how text and other content are vertically aligned within the object that contains them.
+ */
vAlign: string;
}
@@ -18147,38 +17958,38 @@ interface ImageBitmap {
interface URLSearchParams {
/**
- * Appends a specified key/value pair as a new search parameter.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Returns all the values association with a given search parameter.
+ */
getAll(name: string): string[];
/**
- * Returns a Boolean indicating if such a search parameter exists.
- */
+ * 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.
- */
+ * 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.
- */
+ * Constructor returning a URLSearchParams object.
+ */
new (init?: string | URLSearchParams): URLSearchParams;
-}
+};
interface NodeListOf<TNode extends Node> extends NodeList {
length: number;
@@ -18426,7 +18237,7 @@ interface ShadowRoot extends DocumentOrShadowRoot, DocumentFragment {
}
interface ShadowRootInit {
- mode: 'open'|'closed';
+ mode: "open" | "closed";
delegatesFocus?: boolean;
}
@@ -18476,68 +18287,68 @@ interface TouchEventInit extends EventModifierInit {
declare type EventListenerOrEventListenerObject = EventListener | EventListenerObject;
+interface DecodeErrorCallback {
+ (error: DOMException): void;
+}
+interface DecodeSuccessCallback {
+ (decodedData: AudioBuffer): void;
+}
interface ErrorEventHandler {
- (message: string, filename?: string, lineno?: number, colno?: number, error?:Error): void;
+ (message: string, filename?: string, lineno?: number, colno?: number, error?: Error): void;
}
-interface PositionCallback {
- (position: Position): void;
+interface ForEachCallback {
+ (keyId: any, status: MediaKeyStatus): void;
}
-interface PositionErrorCallback {
- (error: PositionError): void;
+interface FrameRequestCallback {
+ (time: number): void;
+}
+interface FunctionStringCallback {
+ (data: string): void;
+}
+interface IntersectionObserverCallback {
+ (entries: IntersectionObserverEntry[], observer: IntersectionObserver): void;
}
interface MediaQueryListListener {
(mql: MediaQueryList): void;
}
+interface MSExecAtPriorityFunctionCallback {
+ (...args: any[]): any;
+}
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 NavigatorUserMediaErrorCallback {
+ (error: MediaStreamError): void;
}
-interface DecodeErrorCallback {
- (error: DOMException): void;
+interface NavigatorUserMediaSuccessCallback {
+ (stream: MediaStream): void;
}
-interface VoidFunction {
- (): void;
+interface NotificationPermissionCallback {
+ (permission: NotificationPermission): void;
}
-interface RTCSessionDescriptionCallback {
- (sdp: RTCSessionDescription): void;
+interface PositionCallback {
+ (position: Position): void;
+}
+interface PositionErrorCallback {
+ (error: PositionError): void;
}
interface RTCPeerConnectionErrorCallback {
(error: DOMError): void;
}
+interface RTCSessionDescriptionCallback {
+ (sdp: RTCSessionDescription): 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 VoidFunction {
+ (): void;
}
interface HTMLElementTagNameMap {
"a": HTMLAnchorElement;
@@ -18625,48 +18436,27 @@ interface HTMLElementTagNameMap {
"xmp": HTMLPreElement;
}
-interface ElementTagNameMap {
- "a": HTMLAnchorElement;
+interface ElementTagNameMap extends HTMLElementTagNameMap {
"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;
@@ -18691,307 +18481,67 @@ interface ElementTagNameMap {
"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; };
+type ElementListTagNameMap = {
+ [key in keyof ElementTagNameMap]: NodeListOf<ElementTagNameMap[key]>
+};
+
+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;
@@ -18999,8 +18549,8 @@ 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 doNotTrack: string;
declare var event: Event | undefined;
declare var external: External;
declare var frameElement: Element;
@@ -19123,9 +18673,9 @@ declare var screenLeft: number;
declare var screenTop: number;
declare var screenX: number;
declare var screenY: number;
+declare var scrollbars: BarProp;
declare var scrollX: number;
declare var scrollY: number;
-declare var scrollbars: BarProp;
declare var self: Window;
declare var speechSynthesis: SpeechSynthesis;
declare var status: string;
@@ -19244,6 +18794,7 @@ type BufferSource = ArrayBuffer | ArrayBufferView;
type MouseWheelEvent = WheelEvent;
type ScrollRestoration = "auto" | "manual";
type FormDataEntryValue = string | File;
+type InsertPosition = "beforebegin" | "afterbegin" | "beforeend" | "afterend";
type AppendMode = "segments" | "sequence";
type AudioContextState = "suspended" | "running" | "closed";
type BiquadFilterType = "lowpass" | "highpass" | "bandpass" | "lowshelf" | "highshelf" | "peaking" | "notch" | "allpass";
@@ -19257,6 +18808,12 @@ type IDBCursorDirection = "next" | "nextunique" | "prev" | "prevunique";
type IDBRequestReadyState = "pending" | "done";
type IDBTransactionMode = "readonly" | "readwrite" | "versionchange";
type ListeningState = "inactive" | "active" | "disambiguation";
+type MediaDeviceKind = "audioinput" | "audiooutput" | "videoinput";
+type MediaKeyMessageType = "license-request" | "license-renewal" | "license-release" | "individualization-request";
+type MediaKeySessionType = "temporary" | "persistent-license" | "persistent-release-message";
+type MediaKeysRequirement = "required" | "optional" | "not-allowed";
+type MediaKeyStatus = "usable" | "expired" | "output-downscaled" | "output-not-allowed" | "status-pending" | "internal-error";
+type MediaStreamTrackState = "live" | "ended";
type MSCredentialType = "FIDO_2_0";
type MSIceAddrType = "os" | "stun" | "turn" | "peer-derived";
type MSIceType = "failed" | "direct" | "relay";
@@ -19264,12 +18821,6 @@ type MSStatsType = "description" | "localclientevent" | "inbound-network" | "out
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";
@@ -19281,6 +18832,14 @@ type PaymentComplete = "success" | "fail" | "";
type PaymentShippingType = "shipping" | "delivery" | "pickup";
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 RTCBundlePolicy = "balanced" | "max-compat" | "max-bundle";
type RTCDegradationPreference = "maintain-framerate" | "maintain-resolution" | "balanced";
type RTCDtlsRole = "auto" | "client" | "server";
@@ -19288,9 +18847,9 @@ 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 RTCIceGatherPolicy = "all" | "nohost" | "relay";
type RTCIceProtocol = "udp" | "tcp";
type RTCIceRole = "controlling" | "controlled";
type RTCIceTcpCandidateType = "active" | "passive" | "so";
@@ -19301,14 +18860,6 @@ type RTCSignalingState = "stable" | "have-local-offer" | "have-remote-offer" | "
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";
diff --git a/node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts b/node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts
index 94fb13c32..c96d5463b 100644
--- a/node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts
+++ b/node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts
@@ -20,15 +20,15 @@ and limitations under the License.
/////////////////////////////
-/// IE DOM APIs
+/// DOM APIs
/////////////////////////////
interface Account {
- rpDisplayName?: string;
displayName?: string;
id?: string;
- name?: string;
imageURL?: string;
+ name?: string;
+ rpDisplayName?: string;
}
interface Algorithm {
@@ -41,32 +41,32 @@ interface AnimationEventInit extends EventInit {
}
interface AssertionOptions {
- timeoutSeconds?: number;
- rpId?: USVString;
allowList?: ScopedCredentialDescriptor[];
extensions?: WebAuthnExtensions;
+ rpId?: USVString;
+ timeoutSeconds?: number;
}
interface CacheQueryOptions {
- ignoreSearch?: boolean;
+ cacheName?: string;
ignoreMethod?: boolean;
+ ignoreSearch?: boolean;
ignoreVary?: boolean;
- cacheName?: string;
}
interface ClientData {
challenge?: string;
+ extensions?: WebAuthnExtensions;
+ hashAlg?: string | Algorithm;
origin?: string;
rpId?: string;
- hashAlg?: string | Algorithm;
tokenBinding?: string;
- extensions?: WebAuthnExtensions;
}
interface CloseEventInit extends EventInit {
- wasClean?: boolean;
code?: number;
reason?: string;
+ wasClean?: boolean;
}
interface CompositionEventInit extends UIEventInit {
@@ -106,13 +106,6 @@ interface CustomEventInit extends EventInit {
detail?: any;
}
-interface DOMRectInit {
- x?: any;
- y?: any;
- width?: any;
- height?: any;
-}
-
interface DeviceAccelerationDict {
x?: number;
y?: number;
@@ -126,15 +119,15 @@ interface DeviceLightEventInit extends EventInit {
interface DeviceMotionEventInit extends EventInit {
acceleration?: DeviceAccelerationDict;
accelerationIncludingGravity?: DeviceAccelerationDict;
- rotationRate?: DeviceRotationRateDict;
interval?: number;
+ rotationRate?: DeviceRotationRateDict;
}
interface DeviceOrientationEventInit extends EventInit {
+ absolute?: boolean;
alpha?: number;
beta?: number;
gamma?: number;
- absolute?: boolean;
}
interface DeviceRotationRateDict {
@@ -143,17 +136,24 @@ interface DeviceRotationRateDict {
gamma?: number;
}
+interface DOMRectInit {
+ height?: any;
+ width?: any;
+ x?: any;
+ y?: any;
+}
+
interface DoubleRange {
max?: number;
min?: number;
}
interface ErrorEventInit extends EventInit {
- message?: string;
- filename?: string;
- lineno?: number;
colno?: number;
error?: any;
+ filename?: string;
+ lineno?: number;
+ message?: string;
}
interface EventInit {
@@ -163,9 +163,8 @@ interface EventInit {
}
interface EventModifierInit extends UIEventInit {
- ctrlKey?: boolean;
- shiftKey?: boolean;
altKey?: boolean;
+ ctrlKey?: boolean;
metaKey?: boolean;
modifierAltGraph?: boolean;
modifierCapsLock?: boolean;
@@ -178,6 +177,7 @@ interface EventModifierInit extends UIEventInit {
modifierSuper?: boolean;
modifierSymbol?: boolean;
modifierSymbolLock?: boolean;
+ shiftKey?: boolean;
}
interface ExceptionInformation {
@@ -190,17 +190,17 @@ interface FocusEventInit extends UIEventInit {
interface FocusNavigationEventInit extends EventInit {
navigationReason?: string;
+ originHeight?: number;
originLeft?: number;
originTop?: number;
originWidth?: number;
- originHeight?: number;
}
interface FocusNavigationOrigin {
+ originHeight?: number;
originLeft?: number;
originTop?: number;
originWidth?: number;
- originHeight?: number;
}
interface GamepadEventInit extends EventInit {
@@ -227,11 +227,11 @@ interface IDBObjectStoreParameters {
}
interface IntersectionObserverEntryInit {
- time?: number;
- rootBounds?: DOMRectInit;
boundingClientRect?: DOMRectInit;
intersectionRect?: DOMRectInit;
+ rootBounds?: DOMRectInit;
target?: Element;
+ time?: number;
}
interface IntersectionObserverInit {
@@ -256,39 +256,153 @@ interface LongRange {
min?: number;
}
+interface MediaEncryptedEventInit extends EventInit {
+ initData?: ArrayBuffer;
+ initDataType?: string;
+}
+
+interface MediaKeyMessageEventInit extends EventInit {
+ message?: ArrayBuffer;
+ messageType?: MediaKeyMessageType;
+}
+
+interface MediaKeySystemConfiguration {
+ audioCapabilities?: MediaKeySystemMediaCapability[];
+ distinctiveIdentifier?: MediaKeysRequirement;
+ initDataTypes?: string[];
+ persistentState?: MediaKeysRequirement;
+ videoCapabilities?: MediaKeySystemMediaCapability[];
+}
+
+interface MediaKeySystemMediaCapability {
+ contentType?: string;
+ robustness?: string;
+}
+
+interface MediaStreamConstraints {
+ audio?: boolean | MediaTrackConstraints;
+ video?: boolean | MediaTrackConstraints;
+}
+
+interface MediaStreamErrorEventInit extends EventInit {
+ error?: MediaStreamError;
+}
+
+interface MediaStreamEventInit extends EventInit {
+ stream?: MediaStream;
+}
+
+interface MediaStreamTrackEventInit extends EventInit {
+ track?: MediaStreamTrack;
+}
+
+interface MediaTrackCapabilities {
+ aspectRatio?: number | DoubleRange;
+ deviceId?: string;
+ echoCancellation?: boolean[];
+ facingMode?: string;
+ frameRate?: number | DoubleRange;
+ groupId?: string;
+ height?: number | LongRange;
+ sampleRate?: number | LongRange;
+ sampleSize?: number | LongRange;
+ volume?: number | DoubleRange;
+ width?: number | LongRange;
+}
+
+interface MediaTrackConstraints extends MediaTrackConstraintSet {
+ advanced?: MediaTrackConstraintSet[];
+}
+
+interface MediaTrackConstraintSet {
+ aspectRatio?: number | ConstrainDoubleRange;
+ deviceId?: string | string[] | ConstrainDOMStringParameters;
+ echoCancelation?: boolean | ConstrainBooleanParameters;
+ facingMode?: string | string[] | ConstrainDOMStringParameters;
+ frameRate?: number | ConstrainDoubleRange;
+ groupId?: string | string[] | ConstrainDOMStringParameters;
+ height?: number | ConstrainLongRange;
+ sampleRate?: number | ConstrainLongRange;
+ sampleSize?: number | ConstrainLongRange;
+ volume?: number | ConstrainDoubleRange;
+ width?: number | ConstrainLongRange;
+}
+
+interface MediaTrackSettings {
+ aspectRatio?: number;
+ deviceId?: string;
+ echoCancellation?: boolean;
+ facingMode?: string;
+ frameRate?: number;
+ groupId?: string;
+ height?: number;
+ sampleRate?: number;
+ sampleSize?: number;
+ volume?: number;
+ width?: number;
+}
+
+interface MediaTrackSupportedConstraints {
+ aspectRatio?: boolean;
+ deviceId?: boolean;
+ echoCancellation?: boolean;
+ facingMode?: boolean;
+ frameRate?: boolean;
+ groupId?: boolean;
+ height?: boolean;
+ sampleRate?: boolean;
+ sampleSize?: boolean;
+ volume?: boolean;
+ width?: boolean;
+}
+
+interface MessageEventInit extends EventInit {
+ lastEventId?: string;
+ channel?: string;
+ data?: any;
+ origin?: string;
+ ports?: MessagePort[];
+ source?: Window;
+}
+
+interface MouseEventInit extends EventModifierInit {
+ button?: number;
+ buttons?: number;
+ clientX?: number;
+ clientY?: number;
+ relatedTarget?: EventTarget;
+ screenX?: number;
+ screenY?: number;
+}
+
interface MSAccountInfo {
+ accountImageUri?: string;
+ accountName?: string;
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;
+ deviceClippingEventRatio?: number;
+ deviceEchoEventRatio?: number;
deviceGlitchesEventRatio?: number;
+ deviceHalfDuplexAECEventRatio?: number;
+ deviceHowlingEventCount?: number;
deviceLowSNREventRatio?: number;
deviceLowSpeechLevelEventRatio?: number;
- deviceClippingEventRatio?: number;
- deviceEchoEventRatio?: number;
+ deviceMultipleEndpointsEventCount?: number;
deviceNearEndToEchoRatioEventRatio?: number;
- deviceRenderZeroVolumeEventRatio?: number;
deviceRenderMuteEventRatio?: number;
- deviceMultipleEndpointsEventCount?: number;
- deviceHowlingEventCount?: number;
+ deviceRenderNotFunctioningEventRatio?: number;
+ deviceRenderZeroVolumeEventRatio?: number;
+ networkDelayEventRatio?: number;
+ networkSendQualityEventRatio?: number;
}
interface MSAudioRecvPayload extends MSPayloadBase {
- samplingRate?: number;
- signal?: MSAudioRecvSignal;
- packetReorderRatio?: number;
- packetReorderDepthAvg?: number;
- packetReorderDepthMax?: number;
burstLossLength1?: number;
burstLossLength2?: number;
burstLossLength3?: number;
@@ -300,31 +414,36 @@ interface MSAudioRecvPayload extends MSPayloadBase {
fecRecvDistance1?: number;
fecRecvDistance2?: number;
fecRecvDistance3?: number;
+ packetReorderDepthAvg?: number;
+ packetReorderDepthMax?: number;
+ packetReorderRatio?: number;
+ ratioCompressedSamplesAvg?: number;
ratioConcealedSamplesAvg?: number;
ratioStretchedSamplesAvg?: number;
- ratioCompressedSamplesAvg?: number;
+ samplingRate?: number;
+ signal?: MSAudioRecvSignal;
}
interface MSAudioRecvSignal {
initialSignalLevelRMS?: number;
- recvSignalLevelCh1?: number;
recvNoiseLevelCh1?: number;
- renderSignalLevel?: number;
- renderNoiseLevel?: number;
+ recvSignalLevelCh1?: number;
renderLoopbackSignalLevel?: number;
+ renderNoiseLevel?: number;
+ renderSignalLevel?: number;
}
interface MSAudioSendPayload extends MSPayloadBase {
- samplingRate?: number;
- signal?: MSAudioSendSignal;
audioFECUsed?: boolean;
+ samplingRate?: number;
sendMutePercent?: number;
+ signal?: MSAudioSendSignal;
}
interface MSAudioSendSignal {
noiseLevel?: number;
- sendSignalLevelCh1?: number;
sendNoiseLevelCh1?: number;
+ sendSignalLevelCh1?: number;
}
interface MSConnectivity {
@@ -342,8 +461,8 @@ interface MSCredentialParameters {
}
interface MSCredentialSpec {
- type?: MSCredentialType;
id?: string;
+ type?: MSCredentialType;
}
interface MSDelay {
@@ -353,12 +472,12 @@ interface MSDelay {
interface MSDescription extends RTCStats {
connectivity?: MSConnectivity;
- transport?: RTCIceProtocol;
- networkconnectivity?: MSNetworkConnectivityInfo;
- localAddr?: MSIPAddressInfo;
- remoteAddr?: MSIPAddressInfo;
deviceDevName?: string;
+ localAddr?: MSIPAddressInfo;
+ networkconnectivity?: MSNetworkConnectivityInfo;
reflexiveLocalIPAddr?: MSIPAddressInfo;
+ remoteAddr?: MSIPAddressInfo;
+ transport?: RTCIceProtocol;
}
interface MSFIDOCredentialParameters extends MSCredentialParameters {
@@ -366,35 +485,35 @@ interface MSFIDOCredentialParameters extends MSCredentialParameters {
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;
+ alternateServerReceived?: boolean;
+ connCheckMessageIntegrityFailed?: boolean;
connCheckOtherError?: boolean;
- turnAuthUnknownUsernameError?: boolean;
- noRelayServersConfigured?: boolean;
+ fipsAllocationFailure?: boolean;
multipleRelayServersAttempted?: boolean;
+ noRelayServersConfigured?: boolean;
portRangeExhausted?: boolean;
- alternateServerReceived?: boolean;
pseudoTLSFailure?: boolean;
+ tcpNatConnectivityFailed?: boolean;
+ tcpRelayConnectivityFailed?: boolean;
+ turnAuthUnknownUsernameError?: boolean;
+ turnTcpAllocateFailed?: boolean;
+ turnTcpSendFailed?: boolean;
+ turnTcpTimedOut?: boolean;
turnTurnTcpConnectivityFailed?: boolean;
+ turnUdpAllocateFailed?: boolean;
+ turnUdpSendFailed?: boolean;
+ udpLocalConnectivityFailed?: boolean;
+ udpNatConnectivityFailed?: boolean;
+ udpRelayConnectivityFailed?: boolean;
useCandidateChecksFailed?: boolean;
- fipsAllocationFailure?: boolean;
+}
+
+interface MSIPAddressInfo {
+ ipAddr?: string;
+ manufacturerMacAddrMask?: string;
+ port?: number;
}
interface MSJitter {
@@ -404,28 +523,28 @@ interface MSJitter {
}
interface MSLocalClientEventBase extends RTCStats {
- networkReceiveQualityEventRatio?: number;
networkBandwidthLowEventRatio?: number;
+ networkReceiveQualityEventRatio?: number;
}
interface MSNetwork extends RTCStats {
- jitter?: MSJitter;
delay?: MSDelay;
+ jitter?: MSJitter;
packetLoss?: MSPacketLoss;
utilization?: MSUtilization;
}
interface MSNetworkConnectivityInfo {
- vpn?: boolean;
linkspeed?: number;
networkConnectionDetails?: string;
+ vpn?: boolean;
}
interface MSNetworkInterfaceType {
interfaceTypeEthernet?: boolean;
- interfaceTypeWireless?: boolean;
interfaceTypePPP?: boolean;
interfaceTypeTunnel?: boolean;
+ interfaceTypeWireless?: boolean;
interfaceTypeWWAN?: boolean;
}
@@ -443,13 +562,13 @@ interface MSPayloadBase extends RTCStats {
}
interface MSPortRange {
- min?: number;
max?: number;
+ min?: number;
}
interface MSRelayAddress {
- relayAddress?: string;
port?: number;
+ relayAddress?: string;
}
interface MSSignatureParameters {
@@ -457,241 +576,122 @@ interface MSSignatureParameters {
}
interface MSTransportDiagnosticsStats extends RTCStats {
+ allocationTimeInMs?: number;
baseAddress?: string;
+ baseInterface?: MSNetworkInterfaceType;
+ iceRole?: RTCIceRole;
+ iceWarningFlags?: MSIceWarningFlags;
+ interfaces?: MSNetworkInterfaceType;
localAddress?: string;
- localSite?: string;
- networkName?: string;
- remoteAddress?: string;
- remoteSite?: string;
+ localAddrType?: MSIceAddrType;
+ localInterface?: MSNetworkInterfaceType;
localMR?: string;
- remoteMR?: string;
- iceWarningFlags?: MSIceWarningFlags;
- portRangeMin?: number;
- portRangeMax?: number;
localMRTCPPort?: number;
- remoteMRTCPPort?: number;
- stunVer?: number;
- numConsentReqSent?: number;
+ localSite?: string;
+ msRtcEngineVersion?: string;
+ networkName?: string;
numConsentReqReceived?: number;
- numConsentRespSent?: number;
+ numConsentReqSent?: number;
numConsentRespReceived?: number;
- interfaces?: MSNetworkInterfaceType;
- baseInterface?: MSNetworkInterfaceType;
+ numConsentRespSent?: number;
+ portRangeMax?: number;
+ portRangeMin?: number;
protocol?: RTCIceProtocol;
- localInterface?: MSNetworkInterfaceType;
- localAddrType?: MSIceAddrType;
+ remoteAddress?: string;
remoteAddrType?: MSIceAddrType;
- iceRole?: RTCIceRole;
+ remoteMR?: string;
+ remoteMRTCPPort?: number;
+ remoteSite?: string;
rtpRtcpMux?: boolean;
- allocationTimeInMs?: number;
- msRtcEngineVersion?: string;
+ stunVer?: number;
}
interface MSUtilization {
- packets?: number;
bandwidthEstimation?: number;
- bandwidthEstimationMin?: number;
+ bandwidthEstimationAvg?: number;
bandwidthEstimationMax?: number;
+ bandwidthEstimationMin?: number;
bandwidthEstimationStdDev?: number;
- bandwidthEstimationAvg?: number;
+ packets?: number;
}
interface MSVideoPayload extends MSPayloadBase {
+ durationSeconds?: number;
resolution?: string;
videoBitRateAvg?: number;
videoBitRateMax?: number;
videoFrameRateAvg?: number;
videoPacketLossRate?: number;
- durationSeconds?: number;
}
interface MSVideoRecvPayload extends MSVideoPayload {
- videoFrameLossRate?: number;
+ lowBitRateCallPercent?: number;
+ lowFrameRateCallPercent?: number;
+ recvBitRateAverage?: number;
+ recvBitRateMaximum?: number;
recvCodecType?: string;
- recvResolutionWidth?: number;
- recvResolutionHeight?: number;
- videoResolutions?: MSVideoResolutionDistribution;
+ recvFpsHarmonicAverage?: number;
recvFrameRateAverage?: number;
- recvBitRateMaximum?: number;
- recvBitRateAverage?: number;
+ recvNumResSwitches?: number;
+ recvReorderBufferMaxSuccessfullyOrderedExtent?: number;
+ recvReorderBufferMaxSuccessfullyOrderedLateTime?: number;
+ recvReorderBufferPacketsDroppedDueToBufferExhaustion?: number;
+ recvReorderBufferPacketsDroppedDueToTimeout?: number;
+ recvReorderBufferReorderedPackets?: number;
+ recvResolutionHeight?: number;
+ recvResolutionWidth?: 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;
+ videoFrameLossRate?: number;
+ videoPostFECPLR?: number;
+ videoResolutions?: MSVideoResolutionDistribution;
}
interface MSVideoResolutionDistribution {
cifQuality?: number;
- vgaQuality?: number;
- h720Quality?: number;
h1080Quality?: number;
h1440Quality?: number;
h2160Quality?: number;
+ h720Quality?: number;
+ vgaQuality?: number;
}
interface MSVideoSendPayload extends MSVideoPayload {
- sendFrameRateAverage?: number;
- sendBitRateMaximum?: number;
sendBitRateAverage?: number;
- sendVideoStreamsMax?: number;
- sendResolutionWidth?: number;
+ sendBitRateMaximum?: number;
+ sendFrameRateAverage?: 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;
+ sendResolutionWidth?: number;
+ sendVideoStreamsMax?: number;
}
interface MsZoomToOptions {
+ animate?: string;
contentX?: number;
contentY?: number;
+ scaleFactor?: number;
viewportX?: string;
viewportY?: string;
- scaleFactor?: number;
- animate?: string;
}
interface MutationObserverInit {
- childList?: boolean;
+ attributeFilter?: string[];
+ attributeOldValue?: boolean;
attributes?: boolean;
characterData?: boolean;
- subtree?: boolean;
- attributeOldValue?: boolean;
characterDataOldValue?: boolean;
- attributeFilter?: string[];
+ childList?: boolean;
+ subtree?: boolean;
}
interface NotificationOptions {
+ body?: string;
dir?: NotificationDirection;
+ icon?: string;
lang?: string;
- body?: string;
tag?: string;
- icon?: string;
}
interface ObjectURLOptions {
@@ -700,39 +700,39 @@ interface ObjectURLOptions {
interface PaymentCurrencyAmount {
currency?: string;
- value?: string;
currencySystem?: string;
+ value?: string;
}
interface PaymentDetails {
- total?: PaymentItem;
displayItems?: PaymentItem[];
- shippingOptions?: PaymentShippingOption[];
- modifiers?: PaymentDetailsModifier[];
error?: string;
+ modifiers?: PaymentDetailsModifier[];
+ shippingOptions?: PaymentShippingOption[];
+ total?: PaymentItem;
}
interface PaymentDetailsModifier {
- supportedMethods?: string[];
- total?: PaymentItem;
additionalDisplayItems?: PaymentItem[];
data?: any;
+ supportedMethods?: string[];
+ total?: PaymentItem;
}
interface PaymentItem {
- label?: string;
amount?: PaymentCurrencyAmount;
+ label?: string;
pending?: boolean;
}
interface PaymentMethodData {
- supportedMethods?: string[];
data?: any;
+ supportedMethods?: string[];
}
interface PaymentOptions {
- requestPayerName?: boolean;
requestPayerEmail?: boolean;
+ requestPayerName?: boolean;
requestPayerPhone?: boolean;
requestShipping?: boolean;
shippingType?: string;
@@ -742,9 +742,9 @@ interface PaymentRequestUpdateEventInit extends EventInit {
}
interface PaymentShippingOption {
+ amount?: PaymentCurrencyAmount;
id?: string;
label?: string;
- amount?: PaymentCurrencyAmount;
selected?: boolean;
}
@@ -753,14 +753,14 @@ interface PeriodicWaveConstraints {
}
interface PointerEventInit extends MouseEventInit {
- pointerId?: number;
- width?: number;
height?: number;
+ isPrimary?: boolean;
+ pointerId?: number;
+ pointerType?: string;
pressure?: number;
tiltX?: number;
tiltY?: number;
- pointerType?: string;
- isPrimary?: boolean;
+ width?: number;
}
interface PopStateEventInit extends EventInit {
@@ -769,8 +769,8 @@ interface PopStateEventInit extends EventInit {
interface PositionOptions {
enableHighAccuracy?: boolean;
- timeout?: number;
maximumAge?: number;
+ timeout?: number;
}
interface ProgressEventInit extends EventInit {
@@ -780,38 +780,63 @@ interface ProgressEventInit extends EventInit {
}
interface PushSubscriptionOptionsInit {
- userVisibleOnly?: boolean;
applicationServerKey?: any;
+ userVisibleOnly?: boolean;
+}
+
+interface RegistrationOptions {
+ scope?: string;
+}
+
+interface RequestInit {
+ body?: any;
+ cache?: RequestCache;
+ credentials?: RequestCredentials;
+ headers?: any;
+ integrity?: string;
+ keepalive?: boolean;
+ method?: string;
+ mode?: RequestMode;
+ redirect?: RequestRedirect;
+ referrer?: string;
+ referrerPolicy?: ReferrerPolicy;
+ window?: any;
+}
+
+interface ResponseInit {
+ headers?: any;
+ status?: number;
+ statusText?: string;
}
interface RTCConfiguration {
+ bundlePolicy?: RTCBundlePolicy;
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[];
+ role?: RTCDtlsRole;
+}
+
+interface RTCDTMFToneChangeEventInit extends EventInit {
+ tone?: string;
}
interface RTCIceCandidateAttributes extends RTCStats {
+ addressSourceUrl?: string;
+ candidateType?: RTCStatsIceCandidateType;
ipAddress?: string;
portNumber?: number;
- transport?: string;
- candidateType?: RTCStatsIceCandidateType;
priority?: number;
- addressSourceUrl?: string;
+ transport?: string;
}
interface RTCIceCandidateComplete {
@@ -819,15 +844,15 @@ interface RTCIceCandidateComplete {
interface RTCIceCandidateDictionary {
foundation?: string;
- priority?: number;
ip?: string;
- protocol?: RTCIceProtocol;
+ msMTurnSessionId?: string;
port?: number;
- type?: RTCIceCandidateType;
- tcpType?: RTCIceTcpCandidateType;
+ priority?: number;
+ protocol?: RTCIceProtocol;
relatedAddress?: string;
relatedPort?: number;
- msMTurnSessionId?: string;
+ tcpType?: RTCIceTcpCandidateType;
+ type?: RTCIceCandidateType;
}
interface RTCIceCandidateInit {
@@ -842,19 +867,19 @@ interface RTCIceCandidatePair {
}
interface RTCIceCandidatePairStats extends RTCStats {
- transportId?: string;
+ availableIncomingBitrate?: number;
+ availableOutgoingBitrate?: number;
+ bytesReceived?: number;
+ bytesSent?: number;
localCandidateId?: string;
- remoteCandidateId?: string;
- state?: RTCStatsIceCandidatePairState;
- priority?: number;
nominated?: boolean;
- writable?: boolean;
+ priority?: number;
readable?: boolean;
- bytesSent?: number;
- bytesReceived?: number;
+ remoteCandidateId?: string;
roundTripTime?: number;
- availableOutgoingBitrate?: number;
- availableIncomingBitrate?: number;
+ state?: RTCStatsIceCandidatePairState;
+ transportId?: string;
+ writable?: boolean;
}
interface RTCIceGatherOptions {
@@ -864,285 +889,260 @@ interface RTCIceGatherOptions {
}
interface RTCIceParameters {
- usernameFragment?: string;
- password?: string;
iceLite?: boolean;
+ password?: string;
+ usernameFragment?: string;
}
interface RTCIceServer {
+ credential?: string;
urls?: any;
username?: string;
- credential?: string;
}
interface RTCInboundRTPStreamStats extends RTCRTPStreamStats {
- packetsReceived?: number;
bytesReceived?: number;
- packetsLost?: number;
- jitter?: number;
fractionLost?: number;
+ jitter?: number;
+ packetsLost?: number;
+ packetsReceived?: 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;
+ frameHeight?: number;
+ framesCorrupted?: number;
+ framesDecoded?: number;
+ framesDropped?: number;
+ framesPerSecond?: number;
+ framesReceived?: number;
+ framesSent?: number;
+ frameWidth?: number;
+ remoteSource?: boolean;
+ ssrcIds?: string[];
+ trackIdentifier?: string;
}
interface RTCOfferOptions {
- offerToReceiveVideo?: number;
+ iceRestart?: boolean;
offerToReceiveAudio?: number;
+ offerToReceiveVideo?: number;
voiceActivityDetection?: boolean;
- iceRestart?: boolean;
}
interface RTCOutboundRTPStreamStats extends RTCRTPStreamStats {
- packetsSent?: number;
bytesSent?: number;
- targetBitrate?: number;
+ packetsSent?: number;
roundTripTime?: number;
+ targetBitrate?: 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;
+ type?: string;
}
interface RTCRtcpParameters {
- ssrc?: number;
cname?: string;
- reducedSize?: boolean;
mux?: boolean;
+ reducedSize?: boolean;
+ ssrc?: number;
}
interface RTCRtpCapabilities {
codecs?: RTCRtpCodecCapability[];
- headerExtensions?: RTCRtpHeaderExtension[];
fecMechanisms?: string[];
+ headerExtensions?: RTCRtpHeaderExtension[];
}
interface RTCRtpCodecCapability {
- name?: string;
- kind?: string;
clockRate?: number;
- preferredPayloadType?: number;
+ kind?: string;
maxptime?: number;
- ptime?: number;
+ maxSpatialLayers?: number;
+ maxTemporalLayers?: number;
+ name?: string;
numChannels?: number;
- rtcpFeedback?: RTCRtcpFeedback[];
- parameters?: any;
options?: any;
- maxTemporalLayers?: number;
- maxSpatialLayers?: number;
+ parameters?: any;
+ preferredPayloadType?: number;
+ ptime?: number;
+ rtcpFeedback?: RTCRtcpFeedback[];
svcMultiStreamSupport?: boolean;
}
interface RTCRtpCodecParameters {
- name?: string;
- payloadType?: any;
clockRate?: number;
maxptime?: number;
- ptime?: number;
+ name?: string;
numChannels?: number;
- rtcpFeedback?: RTCRtcpFeedback[];
parameters?: any;
+ payloadType?: any;
+ ptime?: number;
+ rtcpFeedback?: RTCRtcpFeedback[];
}
interface RTCRtpContributingSource {
- timestamp?: number;
- csrc?: number;
audioLevel?: number;
+ csrc?: number;
+ timestamp?: number;
}
interface RTCRtpEncodingParameters {
- ssrc?: number;
+ active?: boolean;
codecPayloadType?: number;
+ dependencyEncodingIds?: string[];
+ encodingId?: string;
fec?: RTCRtpFecParameters;
- rtx?: RTCRtpRtxParameters;
- priority?: number;
+ framerateScale?: number;
maxBitrate?: number;
+ maxFramerate?: number;
minQuality?: number;
+ priority?: number;
resolutionScale?: number;
- framerateScale?: number;
- maxFramerate?: number;
- active?: boolean;
- encodingId?: string;
- dependencyEncodingIds?: string[];
+ rtx?: RTCRtpRtxParameters;
+ ssrc?: number;
ssrcRange?: RTCSsrcRange;
}
interface RTCRtpFecParameters {
- ssrc?: number;
mechanism?: string;
+ ssrc?: number;
}
interface RTCRtpHeaderExtension {
kind?: string;
- uri?: string;
- preferredId?: number;
preferredEncrypt?: boolean;
+ preferredId?: number;
+ uri?: string;
}
interface RTCRtpHeaderExtensionParameters {
- uri?: string;
- id?: number;
encrypt?: boolean;
+ id?: number;
+ uri?: string;
}
interface RTCRtpParameters {
- muxId?: string;
codecs?: RTCRtpCodecParameters[];
- headerExtensions?: RTCRtpHeaderExtensionParameters[];
+ degradationPreference?: RTCDegradationPreference;
encodings?: RTCRtpEncodingParameters[];
+ headerExtensions?: RTCRtpHeaderExtensionParameters[];
+ muxId?: string;
rtcp?: RTCRtcpParameters;
- degradationPreference?: RTCDegradationPreference;
}
interface RTCRtpRtxParameters {
ssrc?: number;
}
+interface RTCRTPStreamStats extends RTCStats {
+ associateStatsId?: string;
+ codecId?: string;
+ firCount?: number;
+ isRemote?: boolean;
+ mediaTrackId?: string;
+ nackCount?: number;
+ pliCount?: number;
+ sliCount?: number;
+ ssrc?: string;
+ transportId?: string;
+}
+
interface RTCRtpUnhandled {
- ssrc?: number;
- payloadType?: number;
muxId?: string;
+ payloadType?: number;
+ ssrc?: number;
}
interface RTCSessionDescriptionInit {
- type?: RTCSdpType;
sdp?: string;
+ type?: RTCSdpType;
}
interface RTCSrtpKeyParam {
keyMethod?: string;
keySalt?: string;
lifetime?: string;
- mkiValue?: number;
mkiLength?: number;
+ mkiValue?: number;
}
interface RTCSrtpSdesParameters {
- tag?: number;
cryptoSuite?: string;
keyParams?: RTCSrtpKeyParam[];
sessionParams?: string[];
+ tag?: number;
}
interface RTCSsrcRange {
- min?: number;
max?: number;
+ min?: number;
}
interface RTCStats {
- timestamp?: number;
- type?: RTCStatsType;
id?: string;
msType?: MSStatsType;
+ timestamp?: number;
+ type?: RTCStatsType;
}
interface RTCStatsReport {
}
interface RTCTransportStats extends RTCStats {
- bytesSent?: number;
- bytesReceived?: number;
- rtcpTransportStatsId?: string;
activeConnection?: boolean;
- selectedCandidatePairId?: string;
+ bytesReceived?: number;
+ bytesSent?: number;
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;
+ rtcpTransportStatsId?: string;
+ selectedCandidatePairId?: string;
}
interface ScopedCredentialDescriptor {
- type?: ScopedCredentialType;
id?: any;
transports?: Transport[];
+ type?: ScopedCredentialType;
}
interface ScopedCredentialOptions {
- timeoutSeconds?: number;
- rpId?: USVString;
excludeList?: ScopedCredentialDescriptor[];
extensions?: WebAuthnExtensions;
+ rpId?: USVString;
+ timeoutSeconds?: number;
}
interface ScopedCredentialParameters {
- type?: ScopedCredentialType;
algorithm?: string | Algorithm;
+ type?: ScopedCredentialType;
}
interface ServiceWorkerMessageEventInit extends EventInit {
data?: any;
- origin?: string;
lastEventId?: string;
- source?: ServiceWorker | MessagePort;
+ origin?: string;
ports?: MessagePort[];
+ source?: ServiceWorker | MessagePort;
}
interface SpeechSynthesisEventInit extends EventInit {
- utterance?: SpeechSynthesisUtterance;
charIndex?: number;
elapsedTime?: number;
name?: string;
+ utterance?: SpeechSynthesisUtterance;
}
interface StoreExceptionsInformation extends ExceptionInformation {
- siteName?: string;
- explanationString?: string;
detailURI?: string;
+ explanationString?: string;
+ siteName?: string;
}
interface StoreSiteSpecificExceptionsInformation extends StoreExceptionsInformation {
@@ -1154,13 +1154,13 @@ interface TrackEventInit extends EventInit {
}
interface TransitionEventInit extends EventInit {
- propertyName?: string;
elapsedTime?: number;
+ propertyName?: string;
}
interface UIEventInit extends EventInit {
- view?: Window;
detail?: number;
+ view?: Window;
}
interface WebAuthnExtensions {
@@ -1169,11 +1169,11 @@ interface WebAuthnExtensions {
interface WebGLContextAttributes {
failIfMajorPerformanceCaveat?: boolean;
alpha?: boolean;
- depth?: boolean;
- stencil?: boolean;
antialias?: boolean;
+ depth?: boolean;
premultipliedAlpha?: boolean;
preserveDrawingBuffer?: boolean;
+ stencil?: boolean;
}
interface WebGLContextEventInit extends EventInit {
@@ -1181,10 +1181,10 @@ interface WebGLContextEventInit extends EventInit {
}
interface WheelEventInit extends MouseEventInit {
+ deltaMode?: number;
deltaX?: number;
deltaY?: number;
deltaZ?: number;
- deltaMode?: number;
}
interface EventListener {
@@ -1203,19 +1203,6 @@ 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;
@@ -1231,8 +1218,21 @@ interface AnalyserNode extends AudioNode {
declare var AnalyserNode: {
prototype: AnalyserNode;
new(): AnalyserNode;
+};
+
+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 AnimationEvent extends Event {
readonly animationName: string;
readonly elapsedTime: number;
@@ -1242,7 +1242,7 @@ interface AnimationEvent extends Event {
declare var AnimationEvent: {
prototype: AnimationEvent;
new(typeArg: string, eventInitDict?: AnimationEventInit): AnimationEvent;
-}
+};
interface ApplicationCacheEventMap {
"cached": Event;
@@ -1287,7 +1287,7 @@ declare var ApplicationCache: {
readonly OBSOLETE: number;
readonly UNCACHED: number;
readonly UPDATEREADY: number;
-}
+};
interface Attr extends Node {
readonly name: string;
@@ -1300,7 +1300,7 @@ interface Attr extends Node {
declare var Attr: {
prototype: Attr;
new(): Attr;
-}
+};
interface AudioBuffer {
readonly duration: number;
@@ -1315,7 +1315,7 @@ interface AudioBuffer {
declare var AudioBuffer: {
prototype: AudioBuffer;
new(): AudioBuffer;
-}
+};
interface AudioBufferSourceNodeEventMap {
"ended": MediaStreamErrorEvent;
@@ -1338,7 +1338,7 @@ interface AudioBufferSourceNode extends AudioNode {
declare var AudioBufferSourceNode: {
prototype: AudioBufferSourceNode;
new(): AudioBufferSourceNode;
-}
+};
interface AudioContextEventMap {
"statechange": Event;
@@ -1384,7 +1384,7 @@ interface AudioContext extends AudioContextBase {
declare var AudioContext: {
prototype: AudioContext;
new(): AudioContext;
-}
+};
interface AudioDestinationNode extends AudioNode {
readonly maxChannelCount: number;
@@ -1393,7 +1393,7 @@ interface AudioDestinationNode extends AudioNode {
declare var AudioDestinationNode: {
prototype: AudioDestinationNode;
new(): AudioDestinationNode;
-}
+};
interface AudioListener {
dopplerFactor: number;
@@ -1406,7 +1406,7 @@ interface AudioListener {
declare var AudioListener: {
prototype: AudioListener;
new(): AudioListener;
-}
+};
interface AudioNode extends EventTarget {
channelCount: number;
@@ -1425,7 +1425,7 @@ interface AudioNode extends EventTarget {
declare var AudioNode: {
prototype: AudioNode;
new(): AudioNode;
-}
+};
interface AudioParam {
readonly defaultValue: number;
@@ -1441,7 +1441,7 @@ interface AudioParam {
declare var AudioParam: {
prototype: AudioParam;
new(): AudioParam;
-}
+};
interface AudioProcessingEvent extends Event {
readonly inputBuffer: AudioBuffer;
@@ -1452,7 +1452,7 @@ interface AudioProcessingEvent extends Event {
declare var AudioProcessingEvent: {
prototype: AudioProcessingEvent;
new(): AudioProcessingEvent;
-}
+};
interface AudioTrack {
enabled: boolean;
@@ -1466,7 +1466,7 @@ interface AudioTrack {
declare var AudioTrack: {
prototype: AudioTrack;
new(): AudioTrack;
-}
+};
interface AudioTrackListEventMap {
"addtrack": TrackEvent;
@@ -1489,7 +1489,7 @@ interface AudioTrackList extends EventTarget {
declare var AudioTrackList: {
prototype: AudioTrackList;
new(): AudioTrackList;
-}
+};
interface BarProp {
readonly visible: boolean;
@@ -1498,7 +1498,7 @@ interface BarProp {
declare var BarProp: {
prototype: BarProp;
new(): BarProp;
-}
+};
interface BeforeUnloadEvent extends Event {
returnValue: any;
@@ -1507,13 +1507,13 @@ interface BeforeUnloadEvent extends Event {
declare var BeforeUnloadEvent: {
prototype: BeforeUnloadEvent;
new(): BeforeUnloadEvent;
-}
+};
interface BiquadFilterNode extends AudioNode {
- readonly Q: AudioParam;
readonly detune: AudioParam;
readonly frequency: AudioParam;
readonly gain: AudioParam;
+ readonly Q: AudioParam;
type: BiquadFilterType;
getFrequencyResponse(frequencyHz: Float32Array, magResponse: Float32Array, phaseResponse: Float32Array): void;
}
@@ -1521,7 +1521,7 @@ interface BiquadFilterNode extends AudioNode {
declare var BiquadFilterNode: {
prototype: BiquadFilterNode;
new(): BiquadFilterNode;
-}
+};
interface Blob {
readonly size: number;
@@ -1534,16 +1534,305 @@ interface 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 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 CDATASection extends Text {
}
declare var CDATASection: {
prototype: CDATASection;
new(): CDATASection;
+};
+
+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, ...optionalParams: any[]): void;
+ groupCollapsed(groupTitle?: string, ...optionalParams: any[]): 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 CSS {
supports(property: string, value?: string): boolean;
}
@@ -1556,7 +1845,7 @@ interface CSSConditionRule extends CSSGroupingRule {
declare var CSSConditionRule: {
prototype: CSSConditionRule;
new(): CSSConditionRule;
-}
+};
interface CSSFontFaceRule extends CSSRule {
readonly style: CSSStyleDeclaration;
@@ -1565,7 +1854,7 @@ interface CSSFontFaceRule extends CSSRule {
declare var CSSFontFaceRule: {
prototype: CSSFontFaceRule;
new(): CSSFontFaceRule;
-}
+};
interface CSSGroupingRule extends CSSRule {
readonly cssRules: CSSRuleList;
@@ -1576,7 +1865,7 @@ interface CSSGroupingRule extends CSSRule {
declare var CSSGroupingRule: {
prototype: CSSGroupingRule;
new(): CSSGroupingRule;
-}
+};
interface CSSImportRule extends CSSRule {
readonly href: string;
@@ -1587,7 +1876,7 @@ interface CSSImportRule extends CSSRule {
declare var CSSImportRule: {
prototype: CSSImportRule;
new(): CSSImportRule;
-}
+};
interface CSSKeyframeRule extends CSSRule {
keyText: string;
@@ -1597,7 +1886,7 @@ interface CSSKeyframeRule extends CSSRule {
declare var CSSKeyframeRule: {
prototype: CSSKeyframeRule;
new(): CSSKeyframeRule;
-}
+};
interface CSSKeyframesRule extends CSSRule {
readonly cssRules: CSSRuleList;
@@ -1610,7 +1899,7 @@ interface CSSKeyframesRule extends CSSRule {
declare var CSSKeyframesRule: {
prototype: CSSKeyframesRule;
new(): CSSKeyframesRule;
-}
+};
interface CSSMediaRule extends CSSConditionRule {
readonly media: MediaList;
@@ -1619,7 +1908,7 @@ interface CSSMediaRule extends CSSConditionRule {
declare var CSSMediaRule: {
prototype: CSSMediaRule;
new(): CSSMediaRule;
-}
+};
interface CSSNamespaceRule extends CSSRule {
readonly namespaceURI: string;
@@ -1629,7 +1918,7 @@ interface CSSNamespaceRule extends CSSRule {
declare var CSSNamespaceRule: {
prototype: CSSNamespaceRule;
new(): CSSNamespaceRule;
-}
+};
interface CSSPageRule extends CSSRule {
readonly pseudoClass: string;
@@ -1641,7 +1930,7 @@ interface CSSPageRule extends CSSRule {
declare var CSSPageRule: {
prototype: CSSPageRule;
new(): CSSPageRule;
-}
+};
interface CSSRule {
cssText: string;
@@ -1651,8 +1940,8 @@ interface CSSRule {
readonly CHARSET_RULE: number;
readonly FONT_FACE_RULE: number;
readonly IMPORT_RULE: number;
- readonly KEYFRAMES_RULE: number;
readonly KEYFRAME_RULE: number;
+ readonly KEYFRAMES_RULE: number;
readonly MEDIA_RULE: number;
readonly NAMESPACE_RULE: number;
readonly PAGE_RULE: number;
@@ -1668,8 +1957,8 @@ declare var CSSRule: {
readonly CHARSET_RULE: number;
readonly FONT_FACE_RULE: number;
readonly IMPORT_RULE: number;
- readonly KEYFRAMES_RULE: number;
readonly KEYFRAME_RULE: number;
+ readonly KEYFRAMES_RULE: number;
readonly MEDIA_RULE: number;
readonly NAMESPACE_RULE: number;
readonly PAGE_RULE: number;
@@ -1677,7 +1966,7 @@ declare var CSSRule: {
readonly SUPPORTS_RULE: number;
readonly UNKNOWN_RULE: number;
readonly VIEWPORT_RULE: number;
-}
+};
interface CSSRuleList {
readonly length: number;
@@ -1688,13 +1977,13 @@ interface CSSRuleList {
declare var CSSRuleList: {
prototype: CSSRuleList;
new(): CSSRuleList;
-}
+};
interface CSSStyleDeclaration {
alignContent: string | null;
alignItems: string | null;
- alignSelf: string | null;
alignmentBaseline: string | null;
+ alignSelf: string | null;
animation: string | null;
animationDelay: string | null;
animationDirection: string | null;
@@ -1770,9 +2059,9 @@ interface CSSStyleDeclaration {
columnRuleColor: any;
columnRuleStyle: string | null;
columnRuleWidth: any;
+ columns: string | null;
columnSpan: string | null;
columnWidth: any;
- columns: string | null;
content: string | null;
counterIncrement: string | null;
counterReset: string | null;
@@ -1842,24 +2131,24 @@ interface CSSStyleDeclaration {
minHeight: string | null;
minWidth: string | null;
msContentZoomChaining: string | null;
+ msContentZooming: 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;
+ msGridColumnSpan: any;
msGridRow: any;
msGridRowAlign: string | null;
- msGridRowSpan: any;
msGridRows: string | null;
+ msGridRowSpan: any;
msHighContrastAdjust: string | null;
msHyphenateLimitChars: string | null;
msHyphenateLimitLines: any;
@@ -1995,9 +2284,9 @@ interface CSSStyleDeclaration {
webkitColumnRuleColor: any;
webkitColumnRuleStyle: string | null;
webkitColumnRuleWidth: any;
+ webkitColumns: string | null;
webkitColumnSpan: string | null;
webkitColumnWidth: any;
- webkitColumns: string | null;
webkitFilter: string | null;
webkitFlex: string | null;
webkitFlexBasis: string | null;
@@ -2049,7 +2338,7 @@ interface CSSStyleDeclaration {
declare var CSSStyleDeclaration: {
prototype: CSSStyleDeclaration;
new(): CSSStyleDeclaration;
-}
+};
interface CSSStyleRule extends CSSRule {
readonly readOnly: boolean;
@@ -2060,7 +2349,7 @@ interface CSSStyleRule extends CSSRule {
declare var CSSStyleRule: {
prototype: CSSStyleRule;
new(): CSSStyleRule;
-}
+};
interface CSSStyleSheet extends StyleSheet {
readonly cssRules: CSSRuleList;
@@ -2086,7 +2375,7 @@ interface CSSStyleSheet extends StyleSheet {
declare var CSSStyleSheet: {
prototype: CSSStyleSheet;
new(): CSSStyleSheet;
-}
+};
interface CSSSupportsRule extends CSSConditionRule {
}
@@ -2094,296 +2383,7 @@ 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;
@@ -2393,150 +2393,7 @@ interface CustomEvent extends Event {
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;
@@ -2547,7 +2404,7 @@ interface DataCue extends TextTrackCue {
declare var DataCue: {
prototype: DataCue;
new(): DataCue;
-}
+};
interface DataTransfer {
dropEffect: string;
@@ -2564,7 +2421,7 @@ interface DataTransfer {
declare var DataTransfer: {
prototype: DataTransfer;
new(): DataTransfer;
-}
+};
interface DataTransferItem {
readonly kind: string;
@@ -2577,7 +2434,7 @@ interface DataTransferItem {
declare var DataTransferItem: {
prototype: DataTransferItem;
new(): DataTransferItem;
-}
+};
interface DataTransferItemList {
readonly length: number;
@@ -2591,7 +2448,7 @@ interface DataTransferItemList {
declare var DataTransferItemList: {
prototype: DataTransferItemList;
new(): DataTransferItemList;
-}
+};
interface DeferredPermissionRequest {
readonly id: number;
@@ -2604,7 +2461,7 @@ interface DeferredPermissionRequest {
declare var DeferredPermissionRequest: {
prototype: DeferredPermissionRequest;
new(): DeferredPermissionRequest;
-}
+};
interface DelayNode extends AudioNode {
readonly delayTime: AudioParam;
@@ -2613,7 +2470,7 @@ interface DelayNode extends AudioNode {
declare var DelayNode: {
prototype: DelayNode;
new(): DelayNode;
-}
+};
interface DeviceAcceleration {
readonly x: number | null;
@@ -2624,7 +2481,7 @@ interface DeviceAcceleration {
declare var DeviceAcceleration: {
prototype: DeviceAcceleration;
new(): DeviceAcceleration;
-}
+};
interface DeviceLightEvent extends Event {
readonly value: number;
@@ -2633,7 +2490,7 @@ interface DeviceLightEvent extends Event {
declare var DeviceLightEvent: {
prototype: DeviceLightEvent;
new(typeArg: string, eventInitDict?: DeviceLightEventInit): DeviceLightEvent;
-}
+};
interface DeviceMotionEvent extends Event {
readonly acceleration: DeviceAcceleration | null;
@@ -2646,7 +2503,7 @@ interface DeviceMotionEvent extends Event {
declare var DeviceMotionEvent: {
prototype: DeviceMotionEvent;
new(typeArg: string, eventInitDict?: DeviceMotionEventInit): DeviceMotionEvent;
-}
+};
interface DeviceOrientationEvent extends Event {
readonly absolute: boolean;
@@ -2659,7 +2516,7 @@ interface DeviceOrientationEvent extends Event {
declare var DeviceOrientationEvent: {
prototype: DeviceOrientationEvent;
new(typeArg: string, eventInitDict?: DeviceOrientationEventInit): DeviceOrientationEvent;
-}
+};
interface DeviceRotationRate {
readonly alpha: number | null;
@@ -2670,7 +2527,7 @@ interface DeviceRotationRate {
declare var DeviceRotationRate: {
prototype: DeviceRotationRate;
new(): DeviceRotationRate;
-}
+};
interface DocumentEventMap extends GlobalEventHandlersEventMap {
"abort": UIEvent;
@@ -2765,299 +2622,291 @@ interface DocumentEventMap extends GlobalEventHandlersEventMap {
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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Gets a reference to the root node of the document.
+ */
documentElement: HTMLElement;
/**
- * Sets or gets the security domain of the document.
- */
+ * Sets or gets the security domain of the document.
+ */
domain: string;
/**
- * Retrieves a collection of all embed objects in the document.
- */
+ * Retrieves a collection of all embed objects in the document.
+ */
embeds: HTMLCollectionOf<HTMLEmbedElement>;
/**
- * Sets or gets the foreground (text) color of the document.
- */
+ * 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.
- */
+ * 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.
- */
+ * Retrieves a collection, in source order, of img objects in the document.
+ */
images: HTMLCollectionOf<HTMLImageElement>;
/**
- * Gets the implementation object of the current document.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Contains information about the current URL.
+ */
readonly location: Location;
- msCSSOMElementFloatMetrics: boolean;
msCapsLockWarningOff: boolean;
+ msCSSOMElementFloatMetrics: boolean;
/**
- * Fires when the user aborts the download.
- * @param ev The event.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ /**
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ /**
+ * 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.
- */
+ /**
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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
- */
+ * 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.
- */
+ * 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.
- */
+ * 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
- */
+ * 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.
- */
+ * 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
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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
- */
+ * 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;
@@ -3077,146 +2926,154 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven
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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Gets the root svg element in the document hierarchy.
+ */
readonly rootElement: SVGSVGElement;
/**
- * Retrieves a collection of all script objects in the document.
- */
+ * 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.
- */
+ * 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.
- */
+ * Contains the title of the document.
+ */
title: string;
+ /**
+ * 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;
readonly visibilityState: VisibilityState;
- /**
- * Sets or gets the color of the links that the user has visited.
- */
+ /**
+ * Sets or gets the color of the links that the user has visited.
+ */
vlinkColor: string;
readonly webkitCurrentFullScreenElement: Element | null;
readonly webkitFullscreenElement: Element | null;
@@ -3225,243 +3082,243 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven
readonly xmlEncoding: string | null;
xmlStandalone: boolean;
/**
- * Gets or sets the version attribute specified in the declaration of an XML document.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Creates a comment object with the specified data.
+ * @param data Sets the comment object's data.
+ */
createComment(data: string): Comment;
/**
- * Creates a new document.
- */
+ * Creates a new document.
+ */
createDocumentFragment(): DocumentFragment;
/**
- * Creates an instance of the element for the specified tag.
- * @param tagName The name of an element.
- */
+ * 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: "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.
- */
+ * 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;
+ createNSResolver(nodeResolver: Node): XPathNSResolver;
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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ /**
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -3470,7 +3327,7 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven
declare var Document: {
prototype: Document;
new(): Document;
-}
+};
interface DocumentFragment extends Node, NodeSelector, ParentNode {
getElementById(elementId: string): HTMLElement | null;
@@ -3479,7 +3336,7 @@ interface DocumentFragment extends Node, NodeSelector, ParentNode {
declare var DocumentFragment: {
prototype: DocumentFragment;
new(): DocumentFragment;
-}
+};
interface DocumentType extends Node, ChildNode {
readonly entities: NamedNodeMap;
@@ -3493,8 +3350,151 @@ interface DocumentType extends Node, ChildNode {
declare var DocumentType: {
prototype: DocumentType;
new(): DocumentType;
+};
+
+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 NO_DATA_ALLOWED_ERR: number;
+ readonly NO_MODIFICATION_ALLOWED_ERR: number;
+ readonly NOT_FOUND_ERR: number;
+ readonly NOT_SUPPORTED_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 NO_DATA_ALLOWED_ERR: number;
+ readonly NO_MODIFICATION_ALLOWED_ERR: number;
+ readonly NOT_FOUND_ERR: number;
+ readonly NOT_SUPPORTED_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;
+ toggle(token: string, force?: boolean): boolean;
+ toString(): string;
+ [index: number]: string;
+}
+
+declare var DOMTokenList: {
+ prototype: DOMTokenList;
+ new(): DOMTokenList;
+};
+
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;
@@ -3503,8 +3503,8 @@ interface DragEvent extends MouseEvent {
declare var DragEvent: {
prototype: DragEvent;
- new(): DragEvent;
-}
+ new(type: "drag" | "dragend" | "dragenter" | "dragexit" | "dragleave" | "dragover" | "dragstart" | "drop", dragEventInit?: { dataTransfer?: DataTransfer }): DragEvent;
+};
interface DynamicsCompressorNode extends AudioNode {
readonly attack: AudioParam;
@@ -3518,27 +3518,7 @@ interface DynamicsCompressorNode extends AudioNode {
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;
@@ -3619,9 +3599,9 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec
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;
+ getAttributeNS(namespaceURI: string, localName: string): string;
getBoundingClientRect(): ClientRect;
getClientRects(): ClientRectList;
getElementsByTagName<K extends keyof ElementListTagNameMap>(name: K): ElementListTagNameMap[K];
@@ -3639,18 +3619,18 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec
msZoomTo(args: MsZoomToOptions): void;
releasePointerCapture(pointerId: number): void;
removeAttribute(qualifiedName: string): void;
- removeAttributeNS(namespaceURI: string, localName: string): void;
removeAttributeNode(oldAttr: Attr): Attr;
+ removeAttributeNS(namespaceURI: string, localName: string): void;
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;
+ setAttributeNS(namespaceURI: string, qualifiedName: string, value: string): void;
setPointerCapture(pointerId: number): void;
webkitMatchesSelector(selectors: string): boolean;
- webkitRequestFullScreen(): void;
webkitRequestFullscreen(): void;
+ webkitRequestFullScreen(): void;
getElementsByClassName(classNames: string): NodeListOf<Element>;
matches(selector: string): boolean;
closest(selector: string): Element | null;
@@ -3661,9 +3641,9 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec
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;
+ insertAdjacentElement(position: InsertPosition, insertedElement: Element): Element | null;
+ insertAdjacentHTML(where: InsertPosition, html: string): void;
+ insertAdjacentText(where: InsertPosition, 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;
@@ -3672,7 +3652,7 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec
declare var Element: {
prototype: Element;
new(): Element;
-}
+};
interface ErrorEvent extends Event {
readonly colno: number;
@@ -3686,12 +3666,12 @@ interface ErrorEvent extends Event {
declare var ErrorEvent: {
prototype: ErrorEvent;
new(type: string, errorEventInitDict?: ErrorEventInit): ErrorEvent;
-}
+};
interface Event {
readonly bubbles: boolean;
- cancelBubble: boolean;
readonly cancelable: boolean;
+ cancelBubble: boolean;
readonly currentTarget: EventTarget;
readonly defaultPrevented: boolean;
readonly eventPhase: number;
@@ -3718,7 +3698,7 @@ declare var Event: {
readonly AT_TARGET: number;
readonly BUBBLING_PHASE: number;
readonly CAPTURING_PHASE: number;
-}
+};
interface EventTarget {
addEventListener(type: string, listener?: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
@@ -3729,8 +3709,28 @@ interface EventTarget {
declare var EventTarget: {
prototype: EventTarget;
new(): EventTarget;
+};
+
+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 ExtensionScriptApis {
extensionIdToShortId(extensionId: string): number;
fireExtensionApiTelemetry(functionName: string, isSucceeded: boolean, isSupported: boolean): void;
@@ -3744,7 +3744,7 @@ interface ExtensionScriptApis {
declare var ExtensionScriptApis: {
prototype: ExtensionScriptApis;
new(): ExtensionScriptApis;
-}
+};
interface External {
}
@@ -3752,7 +3752,7 @@ interface External {
declare var External: {
prototype: External;
new(): External;
-}
+};
interface File extends Blob {
readonly lastModifiedDate: any;
@@ -3763,7 +3763,7 @@ interface File extends Blob {
declare var File: {
prototype: File;
new (parts: (ArrayBuffer | ArrayBufferView | Blob | string)[], filename: string, properties?: FilePropertyBag): File;
-}
+};
interface FileList {
readonly length: number;
@@ -3774,7 +3774,7 @@ interface FileList {
declare var FileList: {
prototype: FileList;
new(): FileList;
-}
+};
interface FileReader extends EventTarget, MSBaseReader {
readonly error: DOMError;
@@ -3789,7 +3789,7 @@ interface FileReader extends EventTarget, MSBaseReader {
declare var FileReader: {
prototype: FileReader;
new(): FileReader;
-}
+};
interface FocusEvent extends UIEvent {
readonly relatedTarget: EventTarget;
@@ -3799,7 +3799,7 @@ interface FocusEvent extends UIEvent {
declare var FocusEvent: {
prototype: FocusEvent;
new(typeArg: string, eventInitDict?: FocusEventInit): FocusEvent;
-}
+};
interface FocusNavigationEvent extends Event {
readonly navigationReason: NavigationReason;
@@ -3813,7 +3813,7 @@ interface FocusNavigationEvent extends Event {
declare var FocusNavigationEvent: {
prototype: FocusNavigationEvent;
new(type: string, eventInitDict?: FocusNavigationEventInit): FocusNavigationEvent;
-}
+};
interface FormData {
append(name: string, value: string | Blob, fileName?: string): void;
@@ -3827,7 +3827,7 @@ interface FormData {
declare var FormData: {
prototype: FormData;
new (form?: HTMLFormElement): FormData;
-}
+};
interface GainNode extends AudioNode {
readonly gain: AudioParam;
@@ -3836,7 +3836,7 @@ interface GainNode extends AudioNode {
declare var GainNode: {
prototype: GainNode;
new(): GainNode;
-}
+};
interface Gamepad {
readonly axes: number[];
@@ -3851,7 +3851,7 @@ interface Gamepad {
declare var Gamepad: {
prototype: Gamepad;
new(): Gamepad;
-}
+};
interface GamepadButton {
readonly pressed: boolean;
@@ -3861,7 +3861,7 @@ interface GamepadButton {
declare var GamepadButton: {
prototype: GamepadButton;
new(): GamepadButton;
-}
+};
interface GamepadEvent extends Event {
readonly gamepad: Gamepad;
@@ -3870,7 +3870,7 @@ interface GamepadEvent extends Event {
declare var GamepadEvent: {
prototype: GamepadEvent;
new(typeArg: string, eventInitDict?: GamepadEventInit): GamepadEvent;
-}
+};
interface Geolocation {
clearWatch(watchId: number): void;
@@ -3881,8 +3881,48 @@ interface Geolocation {
declare var Geolocation: {
prototype: Geolocation;
new(): Geolocation;
+};
+
+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 HTMLAllCollection {
readonly length: number;
item(nameOrIndex?: string): HTMLCollection | Element | null;
@@ -3893,87 +3933,87 @@ interface HTMLAllCollection {
declare var HTMLAllCollection: {
prototype: HTMLAllCollection;
new(): HTMLAllCollection;
-}
+};
interface HTMLAnchorElement extends HTMLElement {
- Methods: string;
/**
- * Sets or retrieves the character set used to encode the object.
- */
+ * Sets or retrieves the character set used to encode the object.
+ */
charset: string;
/**
- * Sets or retrieves the coordinates of the object.
- */
+ * Sets or retrieves the coordinates of the object.
+ */
coords: string;
download: string;
/**
- * Contains the anchor portion of the URL including the hash sign (#).
- */
+ * Contains the anchor portion of the URL including the hash sign (#).
+ */
hash: string;
/**
- * Contains the hostname and port values of the URL.
- */
+ * Contains the hostname and port values of the URL.
+ */
host: string;
/**
- * Contains the hostname of a URL.
- */
+ * Contains the hostname of a URL.
+ */
hostname: string;
/**
- * Sets or retrieves a destination URL or an anchor point.
- */
+ * Sets or retrieves a destination URL or an anchor point.
+ */
href: string;
/**
- * Sets or retrieves the language code of the object.
- */
+ * Sets or retrieves the language code of the object.
+ */
hreflang: string;
+ Methods: string;
readonly mimeType: string;
/**
- * Sets or retrieves the shape of the object.
- */
+ * Sets or retrieves the shape of the object.
+ */
name: string;
readonly nameProp: string;
/**
- * Contains the pathname of the URL.
- */
+ * Contains the pathname of the URL.
+ */
pathname: string;
/**
- * Sets or retrieves the port number associated with a URL.
- */
+ * Sets or retrieves the port number associated with a URL.
+ */
port: string;
/**
- * Contains the protocol of the URL.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the substring of the href property that follows the question mark.
+ */
search: string;
/**
- * Sets or retrieves the shape of the object.
- */
+ * Sets or retrieves the shape of the object.
+ */
shape: string;
/**
- * Sets or retrieves the window or frame at which to target content.
- */
+ * 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.
- */
+ * Retrieves or sets the text of the object as a string.
+ */
text: string;
type: string;
urn: string;
- /**
- * Returns a string representation of an object.
- */
+ /**
+ * 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;
@@ -3982,70 +4022,70 @@ interface HTMLAnchorElement extends HTMLElement {
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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves a character string that can be used to implement your own archive functionality for the object.
+ */
archive: string;
+ /**
+ * 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;
border: string;
code: string;
/**
- * Sets or retrieves the URL of the component.
- */
+ * Sets or retrieves the URL of the component.
+ */
codeBase: string;
/**
- * Sets or retrieves the Internet media type for the code associated with the object.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the height of the object.
+ */
height: string;
hspace: number;
/**
- * Sets or retrieves the shape of the object.
- */
+ * 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.
- */
+ * Sets or retrieves a message to be displayed while an object is loading.
+ */
standby: string;
/**
- * Returns the content type of the object.
- */
+ * 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.
- */
+ * 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;
@@ -4056,66 +4096,66 @@ interface HTMLAppletElement extends HTMLElement {
declare var HTMLAppletElement: {
prototype: HTMLAppletElement;
new(): HTMLAppletElement;
-}
+};
interface HTMLAreaElement extends HTMLElement {
/**
- * Sets or retrieves a text alternative to the graphic.
- */
+ * Sets or retrieves a text alternative to the graphic.
+ */
alt: string;
/**
- * Sets or retrieves the coordinates of the object.
- */
+ * 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 (#).
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the host name part of the location or URL.
+ */
hostname: string;
/**
- * Sets or retrieves a destination URL or an anchor point.
- */
+ * Sets or retrieves a destination URL or an anchor point.
+ */
href: string;
/**
- * Sets or gets whether clicks in this region cause action.
- */
+ * Sets or gets whether clicks in this region cause action.
+ */
noHref: boolean;
/**
- * Sets or retrieves the file name or path specified by the object.
- */
+ * Sets or retrieves the file name or path specified by the object.
+ */
pathname: string;
/**
- * Sets or retrieves the port number associated with a URL.
- */
+ * Sets or retrieves the port number associated with a URL.
+ */
port: string;
/**
- * Sets or retrieves the protocol portion of a URL.
- */
+ * 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.
- */
+ * Sets or retrieves the substring of the href property that follows the question mark.
+ */
search: string;
/**
- * Sets or retrieves the shape of the object.
- */
+ * Sets or retrieves the shape of the object.
+ */
shape: string;
/**
- * Sets or retrieves the window or frame at which to target content.
- */
+ * Sets or retrieves the window or frame at which to target content.
+ */
target: string;
- /**
- * Returns a string representation of an object.
- */
+ /**
+ * 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;
@@ -4124,7 +4164,7 @@ interface HTMLAreaElement extends HTMLElement {
declare var HTMLAreaElement: {
prototype: HTMLAreaElement;
new(): HTMLAreaElement;
-}
+};
interface HTMLAreasCollection extends HTMLCollectionBase {
}
@@ -4132,7 +4172,7 @@ 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;
@@ -4142,30 +4182,16 @@ interface HTMLAudioElement extends HTMLMediaElement {
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.
- */
+ * 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.
- */
+ * 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;
@@ -4174,16 +4200,16 @@ interface HTMLBaseElement extends HTMLElement {
declare var HTMLBaseElement: {
prototype: HTMLBaseElement;
new(): HTMLBaseElement;
-}
+};
interface HTMLBaseFontElement extends HTMLElement, DOML2DeprecatedColorProperty {
/**
- * Sets or retrieves the current typeface family.
- */
+ * Sets or retrieves the current typeface family.
+ */
face: string;
/**
- * Sets or retrieves the font size of the object.
- */
+ * 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;
@@ -4192,7 +4218,7 @@ interface HTMLBaseFontElement extends HTMLElement, DOML2DeprecatedColorProperty
declare var HTMLBaseFontElement: {
prototype: HTMLBaseFontElement;
new(): HTMLBaseFontElement;
-}
+};
interface HTMLBodyElementEventMap extends HTMLElementEventMap {
"afterprint": Event;
@@ -4251,71 +4277,85 @@ interface HTMLBodyElement extends HTMLElement {
declare var HTMLBodyElement: {
prototype: HTMLBodyElement;
new(): HTMLBodyElement;
+};
+
+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 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Overrides the target attribute on a form element.
+ */
formTarget: string;
- /**
- * Sets or retrieves the name of the object.
- */
+ /**
+ * Sets or retrieves the name of the object.
+ */
name: string;
status: any;
/**
- * Gets the classification and default behavior of the button.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ /**
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -4324,32 +4364,32 @@ interface HTMLButtonElement extends HTMLElement {
declare var HTMLButtonElement: {
prototype: HTMLButtonElement;
new(): HTMLButtonElement;
-}
+};
interface HTMLCanvasElement extends HTMLElement {
/**
- * Gets or sets the height of a canvas element on a document.
- */
+ * 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.
- */
+ * 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");
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -4359,42 +4399,31 @@ interface HTMLCanvasElement extends HTMLElement {
declare var HTMLCanvasElement: {
prototype: HTMLCanvasElement;
new(): HTMLCanvasElement;
-}
+};
interface HTMLCollectionBase {
/**
- * Sets or retrieves the number of objects in a collection.
- */
+ * Sets or retrieves the number of objects in a collection.
+ */
readonly length: number;
/**
- * Retrieves an object from various collections.
- */
+ * 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.
- */
+ * 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;
@@ -4405,7 +4434,7 @@ interface HTMLDataElement extends HTMLElement {
declare var HTMLDataElement: {
prototype: HTMLDataElement;
new(): HTMLDataElement;
-}
+};
interface HTMLDataListElement extends HTMLElement {
options: HTMLCollectionOf<HTMLOptionElement>;
@@ -4416,7 +4445,7 @@ interface HTMLDataListElement extends HTMLElement {
declare var HTMLDataListElement: {
prototype: HTMLDataListElement;
new(): HTMLDataListElement;
-}
+};
interface HTMLDirectoryElement extends HTMLElement {
compact: boolean;
@@ -4427,16 +4456,16 @@ interface HTMLDirectoryElement extends HTMLElement {
declare var HTMLDirectoryElement: {
prototype: HTMLDirectoryElement;
new(): HTMLDirectoryElement;
-}
+};
interface HTMLDivElement extends HTMLElement {
/**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
+ * Sets or retrieves how the object is aligned with adjacent text.
+ */
align: string;
/**
- * Sets or retrieves whether the browser automatically performs wordwrap.
- */
+ * 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;
@@ -4445,8 +4474,19 @@ interface HTMLDivElement extends HTMLElement {
declare var HTMLDivElement: {
prototype: HTMLDivElement;
new(): HTMLDivElement;
+};
+
+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 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;
@@ -4455,7 +4495,7 @@ interface HTMLDocument extends Document {
declare var HTMLDocument: {
prototype: HTMLDocument;
new(): HTMLDocument;
-}
+};
interface HTMLElementEventMap extends ElementEventMap {
"abort": UIEvent;
@@ -4628,54 +4668,54 @@ interface HTMLElement extends Element {
declare var HTMLElement: {
prototype: HTMLElement;
new(): HTMLElement;
-}
+};
interface HTMLEmbedElement extends HTMLElement, GetSVGDocument {
/**
- * Sets or retrieves the height of the object.
- */
+ * Sets or retrieves the height of the object.
+ */
height: string;
hidden: any;
/**
- * Gets or sets whether the DLNA PlayTo device is available.
- */
+ * 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.
- */
+ * 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.
- */
+ * Gets or sets the primary DLNA PlayTo device.
+ */
msPlayToPrimary: boolean;
/**
- * Gets the source associated with the media element for use by the PlayToManager.
- */
+ * Gets the source associated with the media element for use by the PlayToManager.
+ */
readonly msPlayToSource: any;
/**
- * Sets or retrieves the name of the object.
- */
+ * Sets or retrieves the name of the object.
+ */
name: string;
/**
- * Retrieves the palette used for the embedded document.
- */
+ * Retrieves the palette used for the embedded document.
+ */
readonly palette: string;
/**
- * Retrieves the URL of the plug-in used to view an embedded document.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the height and width units of the embed object.
+ */
units: string;
/**
- * Sets or retrieves the width of the object.
- */
+ * 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;
@@ -4684,39 +4724,39 @@ interface HTMLEmbedElement extends HTMLElement, GetSVGDocument {
declare var HTMLEmbedElement: {
prototype: HTMLEmbedElement;
new(): HTMLEmbedElement;
-}
+};
interface HTMLFieldSetElement extends HTMLElement {
/**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -4725,12 +4765,12 @@ interface HTMLFieldSetElement extends HTMLElement {
declare var HTMLFieldSetElement: {
prototype: HTMLFieldSetElement;
new(): HTMLFieldSetElement;
-}
+};
interface HTMLFontElement extends HTMLElement, DOML2DeprecatedColorProperty, DOML2DeprecatedSizeProperty {
/**
- * Sets or retrieves the current typeface family.
- */
+ * 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;
@@ -4739,7 +4779,7 @@ interface HTMLFontElement extends HTMLElement, DOML2DeprecatedColorProperty, DOM
declare var HTMLFontElement: {
prototype: HTMLFontElement;
new(): HTMLFontElement;
-}
+};
interface HTMLFormControlsCollection extends HTMLCollectionBase {
namedItem(name: string): HTMLCollection | Element | null;
@@ -4748,74 +4788,74 @@ interface HTMLFormControlsCollection extends HTMLCollectionBase {
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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the MIME encoding for the form.
+ */
encoding: string;
/**
- * Sets or retrieves the encoding type for the form.
- */
+ * Sets or retrieves the encoding type for the form.
+ */
enctype: string;
/**
- * Sets or retrieves the number of objects in a collection.
- */
+ * 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.
- */
+ * Sets or retrieves how to send the form data to the server.
+ */
method: string;
/**
- * Sets or retrieves the name of the object.
- */
+ * Sets or retrieves the name of the object.
+ */
name: string;
/**
- * Designates a form that is not validated when submitted.
- */
+ * Designates a form that is not validated when submitted.
+ */
noValidate: boolean;
/**
- * Sets or retrieves the window or frame at which to target content.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Retrieves a form object or an object from an elements collection.
+ */
namedItem(name: string): any;
/**
- * Fires when the user resets a form.
- */
+ * Fires when the user resets a form.
+ */
reset(): void;
/**
- * Fires when a FORM is about to be submitted.
- */
+ * 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;
@@ -4825,7 +4865,7 @@ interface HTMLFormElement extends HTMLElement {
declare var HTMLFormElement: {
prototype: HTMLFormElement;
new(): HTMLFormElement;
-}
+};
interface HTMLFrameElementEventMap extends HTMLElementEventMap {
"load": Event;
@@ -4833,68 +4873,68 @@ interface HTMLFrameElementEventMap extends HTMLElementEventMap {
interface HTMLFrameElement extends HTMLElement, GetSVGDocument {
/**
- * Specifies the properties of a border drawn around an object.
- */
+ * Specifies the properties of a border drawn around an object.
+ */
border: string;
/**
- * Sets or retrieves the border color of the object.
- */
+ * Sets or retrieves the border color of the object.
+ */
borderColor: any;
/**
- * Retrieves the document object of the page or frame.
- */
+ * Retrieves the document object of the page or frame.
+ */
readonly contentDocument: Document;
/**
- * Retrieves the object of the specified.
- */
+ * Retrieves the object of the specified.
+ */
readonly contentWindow: Window;
/**
- * Sets or retrieves whether to display a border for the frame.
- */
+ * Sets or retrieves whether to display a border for the frame.
+ */
frameBorder: string;
/**
- * Sets or retrieves the amount of additional space between the frames.
- */
+ * Sets or retrieves the amount of additional space between the frames.
+ */
frameSpacing: any;
/**
- * Sets or retrieves the height of the object.
- */
+ * Sets or retrieves the height of the object.
+ */
height: string | number;
/**
- * Sets or retrieves a URI to a long description of the object.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the left and right margin widths before displaying the text in a frame.
+ */
marginWidth: string;
/**
- * Sets or retrieves the frame name.
- */
+ * Sets or retrieves the frame name.
+ */
name: string;
/**
- * Sets or retrieves whether the user can resize the frame.
- */
+ * Sets or retrieves whether the user can resize the frame.
+ */
noResize: boolean;
/**
- * Raised when the object has been completely received from the server.
- */
+ * 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.
- */
+ * Sets or retrieves whether the frame can be scrolled.
+ */
scrolling: string;
/**
- * Sets or retrieves a URL to be loaded by the object.
- */
+ * Sets or retrieves a URL to be loaded by the object.
+ */
src: string;
/**
- * Sets or retrieves the width of the object.
- */
+ * 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;
@@ -4903,7 +4943,7 @@ interface HTMLFrameElement extends HTMLElement, GetSVGDocument {
declare var HTMLFrameElement: {
prototype: HTMLFrameElement;
new(): HTMLFrameElement;
-}
+};
interface HTMLFrameSetElementEventMap extends HTMLElementEventMap {
"afterprint": Event;
@@ -4930,33 +4970,33 @@ interface HTMLFrameSetElementEventMap extends HTMLElementEventMap {
interface HTMLFrameSetElement extends HTMLElement {
border: string;
/**
- * Sets or retrieves the border color of the object.
- */
+ * Sets or retrieves the border color of the object.
+ */
borderColor: any;
/**
- * Sets or retrieves the frame widths of the object.
- */
+ * Sets or retrieves the frame widths of the object.
+ */
cols: string;
/**
- * Sets or retrieves whether to display a border for the frame.
- */
+ * Sets or retrieves whether to display a border for the frame.
+ */
frameBorder: string;
/**
- * Sets or retrieves the amount of additional space between the frames.
- */
+ * 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.
- */
+ * 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.
- */
+ * Fires when the object receives focus.
+ */
onfocus: (this: HTMLFrameSetElement, ev: FocusEvent) => any;
onhashchange: (this: HTMLFrameSetElement, ev: HashChangeEvent) => any;
onload: (this: HTMLFrameSetElement, ev: Event) => any;
@@ -4972,8 +5012,8 @@ interface HTMLFrameSetElement extends HTMLElement {
onstorage: (this: HTMLFrameSetElement, ev: StorageEvent) => any;
onunload: (this: HTMLFrameSetElement, ev: Event) => any;
/**
- * Sets or retrieves the frame heights of the object.
- */
+ * 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;
@@ -4982,29 +5022,7 @@ interface HTMLFrameSetElement extends HTMLElement {
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;
@@ -5015,12 +5033,12 @@ interface HTMLHeadElement extends HTMLElement {
declare var HTMLHeadElement: {
prototype: HTMLHeadElement;
new(): HTMLHeadElement;
-}
+};
interface HTMLHeadingElement extends HTMLElement {
/**
- * Sets or retrieves a value that indicates the table alignment.
- */
+ * 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;
@@ -5029,12 +5047,34 @@ interface HTMLHeadingElement extends HTMLElement {
declare var HTMLHeadingElement: {
prototype: HTMLHeadingElement;
new(): HTMLHeadingElement;
+};
+
+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 HTMLHtmlElement extends HTMLElement {
/**
- * Sets or retrieves the DTD version that governs the current document.
- */
+ * 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;
@@ -5043,7 +5083,7 @@ interface HTMLHtmlElement extends HTMLElement {
declare var HTMLHtmlElement: {
prototype: HTMLHtmlElement;
new(): HTMLHtmlElement;
-}
+};
interface HTMLIFrameElementEventMap extends HTMLElementEventMap {
"load": Event;
@@ -5051,79 +5091,79 @@ interface HTMLIFrameElementEventMap extends HTMLElementEventMap {
interface HTMLIFrameElement extends HTMLElement, GetSVGDocument {
/**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
+ * 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.
- */
+ * Specifies the properties of a border drawn around an object.
+ */
border: string;
/**
- * Retrieves the document object of the page or frame.
- */
+ * Retrieves the document object of the page or frame.
+ */
readonly contentDocument: Document;
/**
- * Retrieves the object of the specified.
- */
+ * Retrieves the object of the specified.
+ */
readonly contentWindow: Window;
/**
- * Sets or retrieves whether to display a border for the frame.
- */
+ * Sets or retrieves whether to display a border for the frame.
+ */
frameBorder: string;
/**
- * Sets or retrieves the amount of additional space between the frames.
- */
+ * Sets or retrieves the amount of additional space between the frames.
+ */
frameSpacing: any;
/**
- * Sets or retrieves the height of the object.
- */
+ * Sets or retrieves the height of the object.
+ */
height: string;
/**
- * Sets or retrieves the horizontal margin for the object.
- */
+ * Sets or retrieves the horizontal margin for the object.
+ */
hspace: number;
/**
- * Sets or retrieves a URI to a long description of the object.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the left and right margin widths before displaying the text in a frame.
+ */
marginWidth: string;
/**
- * Sets or retrieves the frame name.
- */
+ * Sets or retrieves the frame name.
+ */
name: string;
/**
- * Sets or retrieves whether the user can resize the frame.
- */
+ * Sets or retrieves whether the user can resize the frame.
+ */
noResize: boolean;
/**
- * Raised when the object has been completely received from the server.
- */
+ * 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.
- */
+ * Sets or retrieves whether the frame can be scrolled.
+ */
scrolling: string;
/**
- * Sets or retrieves a URL to be loaded by the object.
- */
+ * Sets or retrieves a URL to be loaded by the object.
+ */
src: string;
/**
- * Sets or retrieves the vertical margin for the object.
- */
+ * Sets or retrieves the vertical margin for the object.
+ */
vspace: number;
/**
- * Sets or retrieves the width of the object.
- */
+ * 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;
@@ -5132,86 +5172,86 @@ interface HTMLIFrameElement extends HTMLElement, GetSVGDocument {
declare var HTMLIFrameElement: {
prototype: HTMLIFrameElement;
new(): HTMLIFrameElement;
-}
+};
interface HTMLImageElement extends HTMLElement {
/**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
+ * Sets or retrieves how the object is aligned with adjacent text.
+ */
align: string;
/**
- * Sets or retrieves a text alternative to the graphic.
- */
+ * Sets or retrieves a text alternative to the graphic.
+ */
alt: string;
/**
- * Specifies the properties of a border drawn around an object.
- */
+ * Specifies the properties of a border drawn around an object.
+ */
border: string;
/**
- * Retrieves whether the object is fully loaded.
- */
+ * Retrieves whether the object is fully loaded.
+ */
readonly complete: boolean;
crossOrigin: string | null;
readonly currentSrc: string;
/**
- * Sets or retrieves the height of the object.
- */
+ * Sets or retrieves the height of the object.
+ */
height: number;
/**
- * Sets or retrieves the width of the border to draw around the object.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Gets or sets whether the DLNA PlayTo device is available.
+ */
msPlayToDisabled: boolean;
msPlayToPreferredSourceUri: string;
/**
- * Gets or sets the primary DLNA PlayTo device.
- */
+ * Gets or sets the primary DLNA PlayTo device.
+ */
msPlayToPrimary: boolean;
/**
- * Gets the source associated with the media element for use by the PlayToManager.
- */
+ * Gets the source associated with the media element for use by the PlayToManager.
+ */
readonly msPlayToSource: any;
/**
- * Sets or retrieves the name of the object.
- */
+ * Sets or retrieves the name of the object.
+ */
name: string;
/**
- * The original height of the image resource before sizing.
- */
+ * The original height of the image resource before sizing.
+ */
readonly naturalHeight: number;
/**
- * The original width of the image resource before sizing.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the vertical margin for the object.
+ */
vspace: number;
/**
- * Sets or retrieves the width of the object.
- */
+ * Sets or retrieves the width of the object.
+ */
width: number;
readonly x: number;
readonly y: number;
@@ -5223,210 +5263,210 @@ interface HTMLImageElement extends HTMLElement {
declare var HTMLImageElement: {
prototype: HTMLImageElement;
new(): HTMLImageElement;
-}
+};
interface HTMLInputElement extends HTMLElement {
/**
- * Sets or retrieves a comma-separated list of content types.
- */
+ * Sets or retrieves a comma-separated list of content types.
+ */
accept: string;
/**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
+ * Sets or retrieves how the object is aligned with adjacent text.
+ */
align: string;
/**
- * Sets or retrieves a text alternative to the graphic.
- */
+ * Sets or retrieves a text alternative to the graphic.
+ */
alt: string;
/**
- * Specifies whether autocomplete is applied to an editable text field.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the state of the check box or radio button.
+ */
checked: boolean;
/**
- * Retrieves whether the object is fully loaded.
- */
+ * Retrieves whether the object is fully loaded.
+ */
readonly complete: boolean;
/**
- * Sets or retrieves the state of the check box or radio button.
- */
+ * Sets or retrieves the state of the check box or radio button.
+ */
defaultChecked: boolean;
/**
- * Sets or retrieves the initial contents of the object.
- */
+ * Sets or retrieves the initial contents of the object.
+ */
defaultValue: string;
disabled: boolean;
/**
- * Returns a FileList object on a file type input object.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Overrides the target attribute on a form element.
+ */
formTarget: string;
/**
- * Sets or retrieves the height of the object.
- */
+ * Sets or retrieves the height of the object.
+ */
height: string;
/**
- * Sets or retrieves the width of the border to draw around the object.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Returns the value of the data at the cursor's current position.
+ */
value: string;
valueAsDate: Date;
/**
- * Returns the input field value as a number.
- */
+ * Returns the input field value as a number.
+ */
valueAsNumber: number;
/**
- * Sets or retrieves the vertical margin for the object.
- */
+ * Sets or retrieves the vertical margin for the object.
+ */
vspace: number;
webkitdirectory: boolean;
/**
- * Sets or retrieves the width of the object.
- */
+ * Sets or retrieves the width of the object.
+ */
width: string;
/**
- * Returns whether an element will successfully validate based on forms validation rules and constraints.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -5435,31 +5475,16 @@ interface HTMLInputElement extends HTMLElement {
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.
- */
+ * 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.
- */
+ * 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;
@@ -5468,16 +5493,16 @@ interface HTMLLabelElement extends HTMLElement {
declare var HTMLLabelElement: {
prototype: HTMLLabelElement;
new(): HTMLLabelElement;
-}
+};
interface HTMLLegendElement extends HTMLElement {
/**
- * Retrieves a reference to the form that the object is embedded in.
- */
+ * 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.
- */
+ * 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;
@@ -5486,41 +5511,56 @@ interface HTMLLegendElement extends HTMLElement {
declare var HTMLLegendElement: {
prototype: HTMLLegendElement;
new(): HTMLLegendElement;
+};
+
+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 HTMLLinkElement extends HTMLElement, LinkStyle {
/**
- * Sets or retrieves the character set used to encode the object.
- */
+ * 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.
- */
+ * Sets or retrieves a destination URL or an anchor point.
+ */
href: string;
/**
- * Sets or retrieves the language code of the object.
- */
+ * Sets or retrieves the language code of the object.
+ */
hreflang: string;
/**
- * Sets or retrieves the media type.
- */
+ * Sets or retrieves the media type.
+ */
media: string;
/**
- * Sets or retrieves the relationship between the object and the destination of the link.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the window or frame at which to target content.
+ */
target: string;
/**
- * Sets or retrieves the MIME type of the object.
- */
+ * Sets or retrieves the MIME type of the object.
+ */
type: string;
import?: Document;
integrity: string;
@@ -5531,16 +5571,16 @@ interface HTMLLinkElement extends HTMLElement, LinkStyle {
declare var HTMLLinkElement: {
prototype: HTMLLinkElement;
new(): HTMLLinkElement;
-}
+};
interface HTMLMapElement extends HTMLElement {
/**
- * Retrieves a collection of the area objects defined for the given map object.
- */
+ * Retrieves a collection of the area objects defined for the given map object.
+ */
readonly areas: HTMLAreasCollection;
/**
- * Sets or retrieves the name of the object.
- */
+ * 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;
@@ -5549,7 +5589,7 @@ interface HTMLMapElement extends HTMLElement {
declare var HTMLMapElement: {
prototype: HTMLMapElement;
new(): HTMLMapElement;
-}
+};
interface HTMLMarqueeElementEventMap extends HTMLElementEventMap {
"bounce": Event;
@@ -5581,7 +5621,7 @@ interface HTMLMarqueeElement extends HTMLElement {
declare var HTMLMarqueeElement: {
prototype: HTMLMarqueeElement;
new(): HTMLMarqueeElement;
-}
+};
interface HTMLMediaElementEventMap extends HTMLElementEventMap {
"encrypted": MediaEncryptedEvent;
@@ -5590,162 +5630,162 @@ interface HTMLMediaElementEventMap extends HTMLElementEventMap {
interface HTMLMediaElement extends HTMLElement {
/**
- * Returns an AudioTrackList object with the audio tracks for a given video element.
- */
+ * 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.
- */
+ * Gets or sets a value that indicates whether to start playing the media automatically.
+ */
autoplay: boolean;
/**
- * Gets a collection of buffered time ranges.
- */
+ * 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).
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Gets or sets the primary DLNA PlayTo device.
+ */
msPlayToPrimary: boolean;
/**
- * Gets the source associated with the media element for use by the PlayToManager.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Gets TimeRanges for the current media resource that has been played.
+ */
readonly played: TimeRanges;
/**
- * Gets or sets the current playback position, in seconds.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Resets the audio or video object and loads a new media resource.
+ */
load(): void;
/**
- * Clears all effects from the media pipeline.
- */
+ * Clears all effects from the media pipeline.
+ */
msClearEffects(): void;
msGetAsCastingSource(): any;
/**
- * Inserts the specified audio effect into media pipeline.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
+ * Loads and starts playback of a media resource.
+ */
+ play(): Promise<void>;
setMediaKeys(mediaKeys: MediaKeys | null): Promise<void>;
readonly HAVE_CURRENT_DATA: number;
readonly HAVE_ENOUGH_DATA: number;
@@ -5772,7 +5812,7 @@ declare var HTMLMediaElement: {
readonly NETWORK_IDLE: number;
readonly NETWORK_LOADING: number;
readonly NETWORK_NO_SOURCE: number;
-}
+};
interface HTMLMenuElement extends HTMLElement {
compact: boolean;
@@ -5784,32 +5824,32 @@ interface HTMLMenuElement extends HTMLElement {
declare var HTMLMenuElement: {
prototype: HTMLMenuElement;
new(): HTMLMenuElement;
-}
+};
interface HTMLMetaElement extends HTMLElement {
/**
- * Sets or retrieves the character set used to encode the object.
- */
+ * Sets or retrieves the character set used to encode the object.
+ */
charset: string;
/**
- * Gets or sets meta-information to associate with httpEquiv or name.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -5818,7 +5858,7 @@ interface HTMLMetaElement extends HTMLElement {
declare var HTMLMetaElement: {
prototype: HTMLMetaElement;
new(): HTMLMetaElement;
-}
+};
interface HTMLMeterElement extends HTMLElement {
high: number;
@@ -5834,16 +5874,16 @@ interface HTMLMeterElement extends HTMLElement {
declare var HTMLMeterElement: {
prototype: HTMLMeterElement;
new(): HTMLMeterElement;
-}
+};
interface HTMLModElement extends HTMLElement {
/**
- * Sets or retrieves reference information about the object.
- */
+ * Sets or retrieves reference information about the object.
+ */
cite: string;
/**
- * Sets or retrieves the date and time of a modification to the object.
- */
+ * 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;
@@ -5852,131 +5892,115 @@ interface HTMLModElement extends HTMLElement {
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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves a character string that can be used to implement your own archive functionality for the object.
+ */
archive: string;
+ /**
+ * 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;
border: string;
/**
- * Sets or retrieves the URL of the file containing the compiled Java class.
- */
+ * Sets or retrieves the URL of the file containing the compiled Java class.
+ */
code: string;
/**
- * Sets or retrieves the URL of the component.
- */
+ * Sets or retrieves the URL of the component.
+ */
codeBase: string;
/**
- * Sets or retrieves the Internet media type for the code associated with the object.
- */
+ * 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.
- */
+ * Retrieves the document object of the page or frame.
+ */
readonly contentDocument: Document;
/**
- * Sets or retrieves the URL that references the data of the object.
- */
+ * 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.
- */
+ * Retrieves a reference to the form that the object is embedded in.
+ */
readonly form: HTMLFormElement;
/**
- * Sets or retrieves the height of the object.
- */
+ * Sets or retrieves the height of the object.
+ */
height: string;
hspace: number;
/**
- * Gets or sets whether the DLNA PlayTo device is available.
- */
+ * 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.
- */
+ * 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.
- */
+ * Gets or sets the primary DLNA PlayTo device.
+ */
msPlayToPrimary: boolean;
/**
- * Gets the source associated with the media element for use by the PlayToManager.
- */
+ * Gets the source associated with the media element for use by the PlayToManager.
+ */
readonly msPlayToSource: any;
/**
- * Sets or retrieves the name of the object.
- */
+ * 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.
- */
+ * Sets or retrieves a message to be displayed while an object is loading.
+ */
standby: string;
/**
- * Sets or retrieves the MIME type of the object.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the width of the object.
+ */
width: string;
/**
- * Returns whether an element will successfully validate based on forms validation rules and constraints.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -5985,37 +6009,53 @@ interface HTMLObjectElement extends HTMLElement, GetSVGDocument {
declare var HTMLObjectElement: {
prototype: HTMLObjectElement;
new(): HTMLObjectElement;
+};
+
+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 HTMLOptGroupElement extends HTMLElement {
/**
- * Sets or retrieves the status of an option.
- */
+ * Sets or retrieves the status of an option.
+ */
defaultSelected: boolean;
disabled: boolean;
/**
- * Retrieves a reference to the form that the object is embedded in.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -6024,37 +6064,37 @@ interface HTMLOptGroupElement extends HTMLElement {
declare var HTMLOptGroupElement: {
prototype: HTMLOptGroupElement;
new(): HTMLOptGroupElement;
-}
+};
interface HTMLOptionElement extends HTMLElement {
/**
- * Sets or retrieves the status of an option.
- */
+ * Sets or retrieves the status of an option.
+ */
defaultSelected: boolean;
disabled: boolean;
/**
- * Retrieves a reference to the form that the object is embedded in.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -6063,7 +6103,7 @@ interface HTMLOptionElement extends HTMLElement {
declare var HTMLOptionElement: {
prototype: HTMLOptionElement;
new(): HTMLOptionElement;
-}
+};
interface HTMLOptionsCollection extends HTMLCollectionOf<HTMLOptionElement> {
length: number;
@@ -6075,7 +6115,7 @@ interface HTMLOptionsCollection extends HTMLCollectionOf<HTMLOptionElement> {
declare var HTMLOptionsCollection: {
prototype: HTMLOptionsCollection;
new(): HTMLOptionsCollection;
-}
+};
interface HTMLOutputElement extends HTMLElement {
defaultValue: string;
@@ -6097,12 +6137,12 @@ interface HTMLOutputElement extends HTMLElement {
declare var HTMLOutputElement: {
prototype: HTMLOutputElement;
new(): HTMLOutputElement;
-}
+};
interface HTMLParagraphElement extends HTMLElement {
/**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
+ * 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;
@@ -6112,24 +6152,24 @@ interface HTMLParagraphElement extends HTMLElement {
declare var HTMLParagraphElement: {
prototype: HTMLParagraphElement;
new(): HTMLParagraphElement;
-}
+};
interface HTMLParamElement extends HTMLElement {
/**
- * Sets or retrieves the name of an input parameter for an element.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the value of an input parameter for an element.
+ */
value: string;
/**
- * Sets or retrieves the data type of the value attribute.
- */
+ * 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;
@@ -6138,7 +6178,7 @@ interface HTMLParamElement extends HTMLElement {
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;
@@ -6148,12 +6188,12 @@ interface HTMLPictureElement extends HTMLElement {
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.
- */
+ * 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;
@@ -6162,24 +6202,24 @@ interface HTMLPreElement extends HTMLElement {
declare var HTMLPreElement: {
prototype: HTMLPreElement;
new(): HTMLPreElement;
-}
+};
interface HTMLProgressElement extends HTMLElement {
/**
- * Retrieves a reference to the form that the object is embedded in.
- */
+ * 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.
- */
+ * 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).
- */
+ * 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.
- */
+ * 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;
@@ -6188,12 +6228,12 @@ interface HTMLProgressElement extends HTMLElement {
declare var HTMLProgressElement: {
prototype: HTMLProgressElement;
new(): HTMLProgressElement;
-}
+};
interface HTMLQuoteElement extends HTMLElement {
/**
- * Sets or retrieves reference information about the object.
- */
+ * 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;
@@ -6202,38 +6242,38 @@ interface HTMLQuoteElement extends HTMLElement {
declare var HTMLQuoteElement: {
prototype: HTMLQuoteElement;
new(): HTMLQuoteElement;
-}
+};
interface HTMLScriptElement extends HTMLElement {
async: boolean;
/**
- * Sets or retrieves the character set used to encode the object.
- */
+ * Sets or retrieves the character set used to encode the object.
+ */
charset: string;
crossOrigin: string | null;
/**
- * Sets or retrieves the status of the script.
- */
+ * Sets or retrieves the status of the script.
+ */
defer: boolean;
/**
- * Sets or retrieves the event for which the script is written.
- */
+ * 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.
- */
+ /**
+ * 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.
- */
+ * 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.
- */
+ * Retrieves or sets the text of the object as a string.
+ */
text: string;
/**
- * Sets or retrieves the MIME type for the associated scripting engine.
- */
+ * 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;
@@ -6243,94 +6283,94 @@ interface HTMLScriptElement extends HTMLElement {
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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -6340,18 +6380,18 @@ interface HTMLSelectElement extends HTMLElement {
declare var HTMLSelectElement: {
prototype: HTMLSelectElement;
new(): HTMLSelectElement;
-}
+};
interface HTMLSourceElement extends HTMLElement {
/**
- * Gets or sets the intended media type of the media source.
+ * 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.
- */
+ * The address or URL of the a media resource that is to be considered.
+ */
src: string;
srcset: string;
/**
@@ -6365,7 +6405,7 @@ interface HTMLSourceElement extends HTMLElement {
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;
@@ -6375,17 +6415,17 @@ interface HTMLSpanElement extends HTMLElement {
declare var HTMLSpanElement: {
prototype: HTMLSpanElement;
new(): HTMLSpanElement;
-}
+};
interface HTMLStyleElement extends HTMLElement, LinkStyle {
disabled: boolean;
/**
- * Sets or retrieves the media type.
- */
+ * Sets or retrieves the media type.
+ */
media: string;
/**
- * Retrieves the CSS language in which the style sheet is written.
- */
+ * 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;
@@ -6394,16 +6434,16 @@ interface HTMLStyleElement extends HTMLElement, LinkStyle {
declare var HTMLStyleElement: {
prototype: HTMLStyleElement;
new(): HTMLStyleElement;
-}
+};
interface HTMLTableCaptionElement extends HTMLElement {
/**
- * Sets or retrieves the alignment of the caption or legend.
- */
+ * 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.
- */
+ * 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;
@@ -6412,53 +6452,53 @@ interface HTMLTableCaptionElement extends HTMLElement {
declare var HTMLTableCaptionElement: {
prototype: HTMLTableCaptionElement;
new(): HTMLTableCaptionElement;
-}
+};
interface HTMLTableCellElement extends HTMLElement, HTMLTableAlignment {
/**
- * Sets or retrieves abbreviated text for the object.
- */
+ * Sets or retrieves abbreviated text for the object.
+ */
abbr: string;
/**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves a list of header cells that provide information for the object.
+ */
headers: string;
/**
- * Sets or retrieves the height of the object.
- */
+ * Sets or retrieves the height of the object.
+ */
height: any;
/**
- * Sets or retrieves whether the browser automatically performs wordwrap.
- */
+ * Sets or retrieves whether the browser automatically performs wordwrap.
+ */
noWrap: boolean;
/**
- * Sets or retrieves how many rows in a table the cell should span.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -6467,20 +6507,20 @@ interface HTMLTableCellElement extends HTMLElement, HTMLTableAlignment {
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.
- */
+ * 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.
- */
+ * Sets or retrieves the number of columns in the group.
+ */
span: number;
/**
- * Sets or retrieves the width of the object.
- */
+ * 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;
@@ -6489,7 +6529,7 @@ interface HTMLTableColElement extends HTMLElement, HTMLTableAlignment {
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;
@@ -6499,111 +6539,111 @@ 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.
- */
+ * 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.
- */
+ * Sets or retrieves the width of the border to draw around the object.
+ */
border: string;
/**
- * Sets or retrieves the border color of the object.
- */
+ * Sets or retrieves the border color of the object.
+ */
borderColor: any;
/**
- * Retrieves the caption object of a table.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the amount of space between cells in a table.
+ */
cellSpacing: string;
/**
- * Sets or retrieves the number of columns in the table.
- */
+ * 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.
- */
+ * Sets or retrieves the way the border frame around the table is displayed.
+ */
frame: string;
/**
- * Sets or retrieves the height of the object.
- */
+ * Sets or retrieves the height of the object.
+ */
height: any;
/**
- * Sets or retrieves the number of horizontal rows contained in the object.
- */
+ * 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.
- */
+ * Sets or retrieves which dividing lines (inner borders) are displayed.
+ */
rules: string;
/**
- * Sets or retrieves a description and/or structure of the object.
- */
+ * 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.
- */
+ * 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.
- */
+ * Retrieves the tFoot object of the table.
+ */
tFoot: HTMLTableSectionElement;
/**
- * Retrieves the tHead object of the table.
- */
+ * Retrieves the tHead object of the table.
+ */
tHead: HTMLTableSectionElement;
/**
- * Sets or retrieves the width of the object.
- */
+ * Sets or retrieves the width of the object.
+ */
width: string;
/**
- * Creates an empty caption element in the table.
- */
+ * Creates an empty caption element in the table.
+ */
createCaption(): HTMLTableCaptionElement;
/**
- * Creates an empty tBody element in the table.
- */
+ * Creates an empty tBody element in the table.
+ */
createTBody(): HTMLTableSectionElement;
/**
- * Creates an empty tFoot element in the table.
- */
+ * Creates an empty tFoot element in the table.
+ */
createTFoot(): HTMLTableSectionElement;
/**
- * Returns the tHead element object if successful, or null otherwise.
- */
+ * Returns the tHead element object if successful, or null otherwise.
+ */
createTHead(): HTMLTableSectionElement;
/**
- * Deletes the caption element and its contents from the table.
- */
+ * 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.
- */
+ * 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.
- */
+ * Deletes the tFoot element and its contents from the table.
+ */
deleteTFoot(): void;
/**
- * Deletes the tHead element and its contents from the table.
- */
+ * 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.
- */
+ * 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;
@@ -6612,12 +6652,12 @@ interface HTMLTableElement extends HTMLElement {
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.
- */
+ * 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;
@@ -6626,39 +6666,39 @@ interface HTMLTableHeaderCellElement extends HTMLTableCellElement {
declare var HTMLTableHeaderCellElement: {
prototype: HTMLTableHeaderCellElement;
new(): HTMLTableHeaderCellElement;
-}
+};
interface HTMLTableRowElement extends HTMLElement, HTMLTableAlignment {
/**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
+ * 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.
- */
+ * Retrieves a collection of all cells in the table row.
+ */
cells: HTMLCollectionOf<HTMLTableDataCellElement | HTMLTableHeaderCellElement>;
/**
- * Sets or retrieves the height of the object.
- */
+ * Sets or retrieves the height of the object.
+ */
height: any;
/**
- * Retrieves the position of the object in the rows collection for the table.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -6667,26 +6707,26 @@ interface HTMLTableRowElement extends HTMLElement, HTMLTableAlignment {
declare var HTMLTableRowElement: {
prototype: HTMLTableRowElement;
new(): HTMLTableRowElement;
-}
+};
interface HTMLTableSectionElement extends HTMLElement, HTMLTableAlignment {
/**
- * Sets or retrieves a value that indicates the table alignment.
- */
+ * Sets or retrieves a value that indicates the table alignment.
+ */
align: string;
/**
- * Sets or retrieves the number of horizontal rows contained in the object.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -6695,7 +6735,7 @@ interface HTMLTableSectionElement extends HTMLElement, HTMLTableAlignment {
declare var HTMLTableSectionElement: {
prototype: HTMLTableSectionElement;
new(): HTMLTableSectionElement;
-}
+};
interface HTMLTemplateElement extends HTMLElement {
readonly content: DocumentFragment;
@@ -6706,105 +6746,105 @@ interface HTMLTemplateElement extends HTMLElement {
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.
- */
+ * 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.
- */
+ * Sets or retrieves the width of the object.
+ */
cols: number;
/**
- * Sets or retrieves the initial contents of the object.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the value indicating whether the control is selected.
+ */
status: any;
/**
- * Retrieves the type of control.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -6813,7 +6853,7 @@ interface HTMLTextAreaElement extends HTMLElement {
declare var HTMLTextAreaElement: {
prototype: HTMLTextAreaElement;
new(): HTMLTextAreaElement;
-}
+};
interface HTMLTimeElement extends HTMLElement {
dateTime: string;
@@ -6824,12 +6864,12 @@ interface HTMLTimeElement extends HTMLElement {
declare var HTMLTimeElement: {
prototype: HTMLTimeElement;
new(): HTMLTimeElement;
-}
+};
interface HTMLTitleElement extends HTMLElement {
/**
- * Retrieves or sets the text of the object as a string.
- */
+ * 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;
@@ -6838,7 +6878,7 @@ interface HTMLTitleElement extends HTMLElement {
declare var HTMLTitleElement: {
prototype: HTMLTitleElement;
new(): HTMLTitleElement;
-}
+};
interface HTMLTrackElement extends HTMLElement {
default: boolean;
@@ -6863,7 +6903,7 @@ declare var HTMLTrackElement: {
readonly LOADED: number;
readonly LOADING: number;
readonly NONE: number;
-}
+};
interface HTMLUListElement extends HTMLElement {
compact: boolean;
@@ -6875,7 +6915,7 @@ interface HTMLUListElement extends HTMLElement {
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;
@@ -6885,7 +6925,7 @@ interface HTMLUnknownElement extends HTMLElement {
declare var HTMLUnknownElement: {
prototype: HTMLUnknownElement;
new(): HTMLUnknownElement;
-}
+};
interface HTMLVideoElementEventMap extends HTMLMediaElementEventMap {
"MSVideoFormatChanged": Event;
@@ -6895,8 +6935,8 @@ interface HTMLVideoElementEventMap extends HTMLMediaElementEventMap {
interface HTMLVideoElement extends HTMLMediaElement {
/**
- * Gets or sets the height of the video element.
- */
+ * Gets or sets the height of the video element.
+ */
height: number;
msHorizontalMirror: boolean;
readonly msIsLayoutOptimalForPlayback: boolean;
@@ -6908,31 +6948,31 @@ interface HTMLVideoElement extends HTMLMediaElement {
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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
+ 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;
}
@@ -6940,47 +6980,7 @@ interface HTMLVideoElement extends HTMLMediaElement {
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;
@@ -7004,7 +7004,7 @@ declare var IDBCursor: {
readonly NEXT_NO_DUPLICATE: string;
readonly PREV: string;
readonly PREV_NO_DUPLICATE: string;
-}
+};
interface IDBCursorWithValue extends IDBCursor {
readonly value: any;
@@ -7013,7 +7013,7 @@ interface IDBCursorWithValue extends IDBCursor {
declare var IDBCursorWithValue: {
prototype: IDBCursorWithValue;
new(): IDBCursorWithValue;
-}
+};
interface IDBDatabaseEventMap {
"abort": Event;
@@ -7030,7 +7030,7 @@ interface IDBDatabase extends EventTarget {
close(): void;
createObjectStore(name: string, optionalParameters?: IDBObjectStoreParameters): IDBObjectStore;
deleteObjectStore(name: string): void;
- transaction(storeNames: string | string[], mode?: string): IDBTransaction;
+ transaction(storeNames: string | string[], mode?: IDBTransactionMode): 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;
@@ -7039,7 +7039,7 @@ interface IDBDatabase extends EventTarget {
declare var IDBDatabase: {
prototype: IDBDatabase;
new(): IDBDatabase;
-}
+};
interface IDBFactory {
cmp(first: any, second: any): number;
@@ -7050,7 +7050,7 @@ interface IDBFactory {
declare var IDBFactory: {
prototype: IDBFactory;
new(): IDBFactory;
-}
+};
interface IDBIndex {
keyPath: string | string[];
@@ -7061,14 +7061,14 @@ interface IDBIndex {
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;
+ openCursor(range?: IDBKeyRange | IDBValidKey, direction?: IDBCursorDirection): IDBRequest;
+ openKeyCursor(range?: IDBKeyRange | IDBValidKey, direction?: IDBCursorDirection): IDBRequest;
}
declare var IDBIndex: {
prototype: IDBIndex;
new(): IDBIndex;
-}
+};
interface IDBKeyRange {
readonly lower: any;
@@ -7084,7 +7084,7 @@ declare var IDBKeyRange: {
lowerBound(lower: any, open?: boolean): IDBKeyRange;
only(value: any): IDBKeyRange;
upperBound(upper: any, open?: boolean): IDBKeyRange;
-}
+};
interface IDBObjectStore {
readonly indexNames: DOMStringList;
@@ -7100,14 +7100,14 @@ interface IDBObjectStore {
deleteIndex(indexName: string): void;
get(key: any): IDBRequest;
index(name: string): IDBIndex;
- openCursor(range?: IDBKeyRange | IDBValidKey, direction?: string): IDBRequest;
+ openCursor(range?: IDBKeyRange | IDBValidKey, direction?: IDBCursorDirection): IDBRequest;
put(value: any, key?: IDBKeyRange | IDBValidKey): IDBRequest;
}
declare var IDBObjectStore: {
prototype: IDBObjectStore;
new(): IDBObjectStore;
-}
+};
interface IDBOpenDBRequestEventMap extends IDBRequestEventMap {
"blocked": Event;
@@ -7124,7 +7124,7 @@ interface IDBOpenDBRequest extends IDBRequest {
declare var IDBOpenDBRequest: {
prototype: IDBOpenDBRequest;
new(): IDBOpenDBRequest;
-}
+};
interface IDBRequestEventMap {
"error": Event;
@@ -7132,7 +7132,7 @@ interface IDBRequestEventMap {
}
interface IDBRequest extends EventTarget {
- readonly error: DOMError;
+ readonly error: DOMException;
onerror: (this: IDBRequest, ev: Event) => any;
onsuccess: (this: IDBRequest, ev: Event) => any;
readonly readyState: IDBRequestReadyState;
@@ -7146,7 +7146,7 @@ interface IDBRequest extends EventTarget {
declare var IDBRequest: {
prototype: IDBRequest;
new(): IDBRequest;
-}
+};
interface IDBTransactionEventMap {
"abort": Event;
@@ -7156,7 +7156,7 @@ interface IDBTransactionEventMap {
interface IDBTransaction extends EventTarget {
readonly db: IDBDatabase;
- readonly error: DOMError;
+ readonly error: DOMException;
readonly mode: IDBTransactionMode;
onabort: (this: IDBTransaction, ev: Event) => any;
oncomplete: (this: IDBTransaction, ev: Event) => any;
@@ -7176,7 +7176,7 @@ declare var IDBTransaction: {
readonly READ_ONLY: string;
readonly READ_WRITE: string;
readonly VERSION_CHANGE: string;
-}
+};
interface IDBVersionChangeEvent extends Event {
readonly newVersion: number | null;
@@ -7186,7 +7186,7 @@ interface IDBVersionChangeEvent extends Event {
declare var IDBVersionChangeEvent: {
prototype: IDBVersionChangeEvent;
new(): IDBVersionChangeEvent;
-}
+};
interface IIRFilterNode extends AudioNode {
getFrequencyResponse(frequencyHz: Float32Array, magResponse: Float32Array, phaseResponse: Float32Array): void;
@@ -7195,7 +7195,7 @@ interface IIRFilterNode extends AudioNode {
declare var IIRFilterNode: {
prototype: IIRFilterNode;
new(): IIRFilterNode;
-}
+};
interface ImageData {
data: Uint8ClampedArray;
@@ -7207,7 +7207,7 @@ 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;
@@ -7222,7 +7222,7 @@ interface IntersectionObserver {
declare var IntersectionObserver: {
prototype: IntersectionObserver;
new(callback: IntersectionObserverCallback, options?: IntersectionObserverInit): IntersectionObserver;
-}
+};
interface IntersectionObserverEntry {
readonly boundingClientRect: ClientRect;
@@ -7236,7 +7236,7 @@ interface IntersectionObserverEntry {
declare var IntersectionObserverEntry: {
prototype: IntersectionObserverEntry;
new(intersectionObserverEntryInit: IntersectionObserverEntryInit): IntersectionObserverEntry;
-}
+};
interface KeyboardEvent extends UIEvent {
readonly altKey: boolean;
@@ -7271,7 +7271,7 @@ declare var KeyboardEvent: {
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;
@@ -7281,7 +7281,7 @@ interface ListeningStateChangedEvent extends Event {
declare var ListeningStateChangedEvent: {
prototype: ListeningStateChangedEvent;
new(): ListeningStateChangedEvent;
-}
+};
interface Location {
hash: string;
@@ -7302,7 +7302,7 @@ interface Location {
declare var Location: {
prototype: Location;
new(): Location;
-}
+};
interface LongRunningScriptDetectedEvent extends Event {
readonly executionTime: number;
@@ -7312,8 +7312,390 @@ interface LongRunningScriptDetectedEvent extends Event {
declare var LongRunningScriptDetectedEvent: {
prototype: LongRunningScriptDetectedEvent;
new(): LongRunningScriptDetectedEvent;
+};
+
+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 MediaKeys {
+ createSession(sessionType?: MediaKeySessionType): MediaKeySession;
+ setServerCertificate(serverCertificate: any): Promise<void>;
+}
+
+declare var MediaKeys: {
+ prototype: MediaKeys;
+ new(): MediaKeys;
+};
+
+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 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 MSApp {
clearTemporaryWebDataAsync(): MSAppAsyncOperation;
createBlobFromRandomAccessStream(type: string, seeker: any): Blob;
@@ -7362,7 +7744,7 @@ declare var MSAppAsyncOperation: {
readonly COMPLETED: number;
readonly ERROR: number;
readonly STARTED: number;
-}
+};
interface MSAssertion {
readonly id: string;
@@ -7372,7 +7754,7 @@ interface MSAssertion {
declare var MSAssertion: {
prototype: MSAssertion;
new(): MSAssertion;
-}
+};
interface MSBlobBuilder {
append(data: any, endings?: string): void;
@@ -7382,7 +7764,7 @@ interface MSBlobBuilder {
declare var MSBlobBuilder: {
prototype: MSBlobBuilder;
new(): MSBlobBuilder;
-}
+};
interface MSCredentials {
getAssertion(challenge: string, filter?: MSCredentialFilter, params?: MSSignatureParameters): Promise<MSAssertion>;
@@ -7392,7 +7774,7 @@ interface MSCredentials {
declare var MSCredentials: {
prototype: MSCredentials;
new(): MSCredentials;
-}
+};
interface MSFIDOCredentialAssertion extends MSAssertion {
readonly algorithm: string | Algorithm;
@@ -7404,7 +7786,7 @@ interface MSFIDOCredentialAssertion extends MSAssertion {
declare var MSFIDOCredentialAssertion: {
prototype: MSFIDOCredentialAssertion;
new(): MSFIDOCredentialAssertion;
-}
+};
interface MSFIDOSignature {
readonly authnrData: string;
@@ -7415,7 +7797,7 @@ interface MSFIDOSignature {
declare var MSFIDOSignature: {
prototype: MSFIDOSignature;
new(): MSFIDOSignature;
-}
+};
interface MSFIDOSignatureAssertion extends MSAssertion {
readonly signature: MSFIDOSignature;
@@ -7424,7 +7806,7 @@ interface MSFIDOSignatureAssertion extends MSAssertion {
declare var MSFIDOSignatureAssertion: {
prototype: MSFIDOSignatureAssertion;
new(): MSFIDOSignatureAssertion;
-}
+};
interface MSGesture {
target: Element;
@@ -7435,7 +7817,7 @@ interface MSGesture {
declare var MSGesture: {
prototype: MSGesture;
new(): MSGesture;
-}
+};
interface MSGestureEvent extends UIEvent {
readonly clientX: number;
@@ -7471,7 +7853,7 @@ declare var MSGestureEvent: {
readonly MSGESTURE_FLAG_END: number;
readonly MSGESTURE_FLAG_INERTIA: number;
readonly MSGESTURE_FLAG_NONE: number;
-}
+};
interface MSGraphicsTrust {
readonly constrictionActive: boolean;
@@ -7481,7 +7863,7 @@ interface MSGraphicsTrust {
declare var MSGraphicsTrust: {
prototype: MSGraphicsTrust;
new(): MSGraphicsTrust;
-}
+};
interface MSHTMLWebViewElement extends HTMLElement {
readonly canGoBack: boolean;
@@ -7515,7 +7897,7 @@ interface MSHTMLWebViewElement extends HTMLElement {
declare var MSHTMLWebViewElement: {
prototype: MSHTMLWebViewElement;
new(): MSHTMLWebViewElement;
-}
+};
interface MSInputMethodContextEventMap {
"MSCandidateWindowHide": Event;
@@ -7541,7 +7923,7 @@ interface MSInputMethodContext extends EventTarget {
declare var MSInputMethodContext: {
prototype: MSInputMethodContext;
new(): MSInputMethodContext;
-}
+};
interface MSManipulationEvent extends UIEvent {
readonly currentState: number;
@@ -7570,7 +7952,7 @@ declare var MSManipulationEvent: {
readonly MS_MANIPULATION_STATE_PRESELECT: number;
readonly MS_MANIPULATION_STATE_SELECTING: number;
readonly MS_MANIPULATION_STATE_STOPPED: number;
-}
+};
interface MSMediaKeyError {
readonly code: number;
@@ -7592,7 +7974,7 @@ declare var MSMediaKeyError: {
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;
@@ -7602,7 +7984,7 @@ interface MSMediaKeyMessageEvent extends Event {
declare var MSMediaKeyMessageEvent: {
prototype: MSMediaKeyMessageEvent;
new(): MSMediaKeyMessageEvent;
-}
+};
interface MSMediaKeyNeededEvent extends Event {
readonly initData: Uint8Array | null;
@@ -7611,8 +7993,20 @@ interface MSMediaKeyNeededEvent extends Event {
declare var MSMediaKeyNeededEvent: {
prototype: MSMediaKeyNeededEvent;
new(): MSMediaKeyNeededEvent;
+};
+
+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 MSMediaKeySession extends EventTarget {
readonly error: MSMediaKeyError | null;
readonly keySystem: string;
@@ -7624,19 +8018,7 @@ interface MSMediaKeySession extends EventTarget {
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;
@@ -7659,7 +8041,7 @@ interface MSPointerEvent extends MouseEvent {
declare var MSPointerEvent: {
prototype: MSPointerEvent;
new(typeArg: string, eventInitDict?: PointerEventInit): MSPointerEvent;
-}
+};
interface MSRangeCollection {
readonly length: number;
@@ -7670,7 +8052,7 @@ interface MSRangeCollection {
declare var MSRangeCollection: {
prototype: MSRangeCollection;
new(): MSRangeCollection;
-}
+};
interface MSSiteModeEvent extends Event {
readonly actionURL: string;
@@ -7680,7 +8062,7 @@ interface MSSiteModeEvent extends Event {
declare var MSSiteModeEvent: {
prototype: MSSiteModeEvent;
new(): MSSiteModeEvent;
-}
+};
interface MSStream {
readonly type: string;
@@ -7691,7 +8073,7 @@ interface MSStream {
declare var MSStream: {
prototype: MSStream;
new(): MSStream;
-}
+};
interface MSStreamReader extends EventTarget, MSBaseReader {
readonly error: DOMError;
@@ -7707,7 +8089,7 @@ interface MSStreamReader extends EventTarget, MSBaseReader {
declare var MSStreamReader: {
prototype: MSStreamReader;
new(): MSStreamReader;
-}
+};
interface MSWebViewAsyncOperationEventMap {
"complete": Event;
@@ -7742,7 +8124,7 @@ declare var MSWebViewAsyncOperation: {
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;
@@ -7752,389 +8134,7 @@ interface MSWebViewSettings {
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;
@@ -8154,7 +8154,7 @@ declare var MutationEvent: {
readonly ADDITION: number;
readonly MODIFICATION: number;
readonly REMOVAL: number;
-}
+};
interface MutationObserver {
disconnect(): void;
@@ -8165,7 +8165,7 @@ interface MutationObserver {
declare var MutationObserver: {
prototype: MutationObserver;
new(callback: MutationCallback): MutationObserver;
-}
+};
interface MutationRecord {
readonly addedNodes: NodeList;
@@ -8182,7 +8182,7 @@ interface MutationRecord {
declare var MutationRecord: {
prototype: MutationRecord;
new(): MutationRecord;
-}
+};
interface NamedNodeMap {
readonly length: number;
@@ -8199,7 +8199,7 @@ interface NamedNodeMap {
declare var NamedNodeMap: {
prototype: NamedNodeMap;
new(): NamedNodeMap;
-}
+};
interface NavigationCompletedEvent extends NavigationEvent {
readonly isSuccess: boolean;
@@ -8209,7 +8209,7 @@ interface NavigationCompletedEvent extends NavigationEvent {
declare var NavigationCompletedEvent: {
prototype: NavigationCompletedEvent;
new(): NavigationCompletedEvent;
-}
+};
interface NavigationEvent extends Event {
readonly uri: string;
@@ -8218,7 +8218,7 @@ interface NavigationEvent extends Event {
declare var NavigationEvent: {
prototype: NavigationEvent;
new(): NavigationEvent;
-}
+};
interface NavigationEventWithReferrer extends NavigationEvent {
readonly referer: string;
@@ -8227,7 +8227,7 @@ interface NavigationEventWithReferrer extends NavigationEvent {
declare var NavigationEventWithReferrer: {
prototype: NavigationEventWithReferrer;
new(): NavigationEventWithReferrer;
-}
+};
interface Navigator extends Object, NavigatorID, NavigatorOnLine, NavigatorContentUtils, NavigatorStorageUtils, NavigatorGeolocation, MSNavigatorDoNotTrack, MSFileSaver, NavigatorBeacon, NavigatorConcurrentHardware, NavigatorUserMedia {
readonly authentication: WebAuthentication;
@@ -8244,6 +8244,7 @@ interface Navigator extends Object, NavigatorID, NavigatorOnLine, NavigatorConte
readonly serviceWorker: ServiceWorkerContainer;
readonly webdriver: boolean;
readonly hardwareConcurrency: number;
+ readonly languages: string[];
getGamepads(): Gamepad[];
javaEnabled(): boolean;
msLaunchUri(uri: string, successCallback?: MSLaunchUriCallback, noHandlerCallback?: MSLaunchUriCallback): void;
@@ -8254,7 +8255,7 @@ interface Navigator extends Object, NavigatorID, NavigatorOnLine, NavigatorConte
declare var Navigator: {
prototype: Navigator;
new(): Navigator;
-}
+};
interface Node extends EventTarget {
readonly attributes: NamedNodeMap;
@@ -8329,7 +8330,7 @@ declare var Node: {
readonly NOTATION_NODE: number;
readonly PROCESSING_INSTRUCTION_NODE: number;
readonly TEXT_NODE: number;
-}
+};
interface NodeFilter {
acceptNode(n: Node): number;
@@ -8352,7 +8353,7 @@ declare var NodeFilter: {
readonly SHOW_NOTATION: number;
readonly SHOW_PROCESSING_INSTRUCTION: number;
readonly SHOW_TEXT: number;
-}
+};
interface NodeIterator {
readonly expandEntityReferences: boolean;
@@ -8367,7 +8368,7 @@ interface NodeIterator {
declare var NodeIterator: {
prototype: NodeIterator;
new(): NodeIterator;
-}
+};
interface NodeList {
readonly length: number;
@@ -8378,7 +8379,7 @@ interface NodeList {
declare var NodeList: {
prototype: NodeList;
new(): NodeList;
-}
+};
interface NotificationEventMap {
"click": Event;
@@ -8408,7 +8409,7 @@ declare var Notification: {
prototype: Notification;
new(title: string, options?: NotificationOptions): Notification;
requestPermission(callback?: NotificationPermissionCallback): Promise<NotificationPermission>;
-}
+};
interface OES_element_index_uint {
}
@@ -8416,7 +8417,7 @@ 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;
@@ -8426,7 +8427,7 @@ declare var OES_standard_derivatives: {
prototype: OES_standard_derivatives;
new(): OES_standard_derivatives;
readonly FRAGMENT_SHADER_DERIVATIVE_HINT_OES: number;
-}
+};
interface OES_texture_float {
}
@@ -8434,7 +8435,7 @@ interface OES_texture_float {
declare var OES_texture_float: {
prototype: OES_texture_float;
new(): OES_texture_float;
-}
+};
interface OES_texture_float_linear {
}
@@ -8442,7 +8443,7 @@ 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;
@@ -8452,7 +8453,7 @@ 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 {
}
@@ -8460,7 +8461,7 @@ 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;
@@ -8469,7 +8470,7 @@ interface OfflineAudioCompletionEvent extends Event {
declare var OfflineAudioCompletionEvent: {
prototype: OfflineAudioCompletionEvent;
new(): OfflineAudioCompletionEvent;
-}
+};
interface OfflineAudioContextEventMap extends AudioContextEventMap {
"complete": OfflineAudioCompletionEvent;
@@ -8487,7 +8488,7 @@ interface OfflineAudioContext extends AudioContextBase {
declare var OfflineAudioContext: {
prototype: OfflineAudioContext;
new(numberOfChannels: number, length: number, sampleRate: number): OfflineAudioContext;
-}
+};
interface OscillatorNodeEventMap {
"ended": MediaStreamErrorEvent;
@@ -8508,7 +8509,7 @@ interface OscillatorNode extends AudioNode {
declare var OscillatorNode: {
prototype: OscillatorNode;
new(): OscillatorNode;
-}
+};
interface OverflowEvent extends UIEvent {
readonly horizontalOverflow: boolean;
@@ -8525,7 +8526,7 @@ declare var OverflowEvent: {
readonly BOTH: number;
readonly HORIZONTAL: number;
readonly VERTICAL: number;
-}
+};
interface PageTransitionEvent extends Event {
readonly persisted: boolean;
@@ -8534,7 +8535,7 @@ interface PageTransitionEvent extends Event {
declare var PageTransitionEvent: {
prototype: PageTransitionEvent;
new(): PageTransitionEvent;
-}
+};
interface PannerNode extends AudioNode {
coneInnerAngle: number;
@@ -8553,7 +8554,7 @@ interface PannerNode extends AudioNode {
declare var PannerNode: {
prototype: PannerNode;
new(): PannerNode;
-}
+};
interface Path2D extends Object, CanvasPathMethods {
}
@@ -8561,7 +8562,7 @@ interface Path2D extends Object, CanvasPathMethods {
declare var Path2D: {
prototype: Path2D;
new(path?: Path2D): Path2D;
-}
+};
interface PaymentAddress {
readonly addressLine: string[];
@@ -8581,7 +8582,7 @@ interface PaymentAddress {
declare var PaymentAddress: {
prototype: PaymentAddress;
new(): PaymentAddress;
-}
+};
interface PaymentRequestEventMap {
"shippingaddresschange": Event;
@@ -8603,7 +8604,7 @@ interface PaymentRequest extends EventTarget {
declare var PaymentRequest: {
prototype: PaymentRequest;
new(methodData: PaymentMethodData[], details: PaymentDetails, options?: PaymentOptions): PaymentRequest;
-}
+};
interface PaymentRequestUpdateEvent extends Event {
updateWith(d: Promise<PaymentDetails>): void;
@@ -8612,7 +8613,7 @@ interface PaymentRequestUpdateEvent extends Event {
declare var PaymentRequestUpdateEvent: {
prototype: PaymentRequestUpdateEvent;
new(type: string, eventInitDict?: PaymentRequestUpdateEventInit): PaymentRequestUpdateEvent;
-}
+};
interface PaymentResponse {
readonly details: any;
@@ -8629,36 +8630,7 @@ interface PaymentResponse {
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;
@@ -8681,7 +8653,7 @@ interface Performance {
declare var Performance: {
prototype: Performance;
new(): Performance;
-}
+};
interface PerformanceEntry {
readonly duration: number;
@@ -8693,7 +8665,7 @@ interface PerformanceEntry {
declare var PerformanceEntry: {
prototype: PerformanceEntry;
new(): PerformanceEntry;
-}
+};
interface PerformanceMark extends PerformanceEntry {
}
@@ -8701,7 +8673,7 @@ interface PerformanceMark extends PerformanceEntry {
declare var PerformanceMark: {
prototype: PerformanceMark;
new(): PerformanceMark;
-}
+};
interface PerformanceMeasure extends PerformanceEntry {
}
@@ -8709,7 +8681,7 @@ interface PerformanceMeasure extends PerformanceEntry {
declare var PerformanceMeasure: {
prototype: PerformanceMeasure;
new(): PerformanceMeasure;
-}
+};
interface PerformanceNavigation {
readonly redirectCount: number;
@@ -8728,18 +8700,18 @@ declare var PerformanceNavigation: {
readonly TYPE_NAVIGATE: number;
readonly TYPE_RELOAD: number;
readonly TYPE_RESERVED: number;
-}
+};
interface PerformanceNavigationTiming extends PerformanceEntry {
readonly connectEnd: number;
readonly connectStart: number;
+ readonly domainLookupEnd: number;
+ readonly domainLookupStart: 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;
@@ -8758,7 +8730,7 @@ interface PerformanceNavigationTiming extends PerformanceEntry {
declare var PerformanceNavigationTiming: {
prototype: PerformanceNavigationTiming;
new(): PerformanceNavigationTiming;
-}
+};
interface PerformanceResourceTiming extends PerformanceEntry {
readonly connectEnd: number;
@@ -8777,18 +8749,18 @@ interface PerformanceResourceTiming extends PerformanceEntry {
declare var PerformanceResourceTiming: {
prototype: PerformanceResourceTiming;
new(): PerformanceResourceTiming;
-}
+};
interface PerformanceTiming {
readonly connectEnd: number;
readonly connectStart: number;
+ readonly domainLookupEnd: number;
+ readonly domainLookupStart: 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;
@@ -8808,15 +8780,44 @@ interface PerformanceTiming {
declare var PerformanceTiming: {
prototype: PerformanceTiming;
new(): PerformanceTiming;
+};
+
+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 PeriodicWave {
}
declare var PeriodicWave: {
prototype: PeriodicWave;
new(): PeriodicWave;
-}
+};
interface PermissionRequest extends DeferredPermissionRequest {
readonly state: MSWebViewPermissionState;
@@ -8826,7 +8827,7 @@ interface PermissionRequest extends DeferredPermissionRequest {
declare var PermissionRequest: {
prototype: PermissionRequest;
new(): PermissionRequest;
-}
+};
interface PermissionRequestedEvent extends Event {
readonly permissionRequest: PermissionRequest;
@@ -8835,7 +8836,7 @@ interface PermissionRequestedEvent extends Event {
declare var PermissionRequestedEvent: {
prototype: PermissionRequestedEvent;
new(): PermissionRequestedEvent;
-}
+};
interface Plugin {
readonly description: string;
@@ -8851,7 +8852,7 @@ interface Plugin {
declare var Plugin: {
prototype: Plugin;
new(): Plugin;
-}
+};
interface PluginArray {
readonly length: number;
@@ -8864,7 +8865,7 @@ interface PluginArray {
declare var PluginArray: {
prototype: PluginArray;
new(): PluginArray;
-}
+};
interface PointerEvent extends MouseEvent {
readonly currentPoint: any;
@@ -8887,7 +8888,7 @@ interface PointerEvent extends MouseEvent {
declare var PointerEvent: {
prototype: PointerEvent;
new(typeArg: string, eventInitDict?: PointerEventInit): PointerEvent;
-}
+};
interface PopStateEvent extends Event {
readonly state: any;
@@ -8897,7 +8898,7 @@ interface PopStateEvent extends Event {
declare var PopStateEvent: {
prototype: PopStateEvent;
new(typeArg: string, eventInitDict?: PopStateEventInit): PopStateEvent;
-}
+};
interface Position {
readonly coords: Coordinates;
@@ -8907,7 +8908,7 @@ interface Position {
declare var Position: {
prototype: Position;
new(): Position;
-}
+};
interface PositionError {
readonly code: number;
@@ -8924,7 +8925,7 @@ declare var PositionError: {
readonly PERMISSION_DENIED: number;
readonly POSITION_UNAVAILABLE: number;
readonly TIMEOUT: number;
-}
+};
interface ProcessingInstruction extends CharacterData {
readonly target: string;
@@ -8933,7 +8934,7 @@ interface ProcessingInstruction extends CharacterData {
declare var ProcessingInstruction: {
prototype: ProcessingInstruction;
new(): ProcessingInstruction;
-}
+};
interface ProgressEvent extends Event {
readonly lengthComputable: boolean;
@@ -8945,7 +8946,7 @@ interface ProgressEvent extends Event {
declare var ProgressEvent: {
prototype: ProgressEvent;
new(type: string, eventInitDict?: ProgressEventInit): ProgressEvent;
-}
+};
interface PushManager {
getSubscription(): Promise<PushSubscription>;
@@ -8956,7 +8957,7 @@ interface PushManager {
declare var PushManager: {
prototype: PushManager;
new(): PushManager;
-}
+};
interface PushSubscription {
readonly endpoint: USVString;
@@ -8969,7 +8970,7 @@ interface PushSubscription {
declare var PushSubscription: {
prototype: PushSubscription;
new(): PushSubscription;
-}
+};
interface PushSubscriptionOptions {
readonly applicationServerKey: ArrayBuffer | null;
@@ -8979,17 +8980,114 @@ interface PushSubscriptionOptions {
declare var PushSubscriptionOptions: {
prototype: PushSubscriptionOptions;
new(): PushSubscriptionOptions;
+};
+
+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;
}
-interface RTCDTMFToneChangeEvent extends Event {
- readonly tone: string;
+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 RTCDTMFToneChangeEvent: {
- prototype: RTCDTMFToneChangeEvent;
- new(typeArg: string, eventInitDict: RTCDTMFToneChangeEventInit): RTCDTMFToneChangeEvent;
+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;
+ error: () => Response;
+ redirect: (url: string, status?: number) => Response;
+};
+
interface RTCDtlsTransportEventMap {
"dtlsstatechange": RTCDtlsTransportStateChangedEvent;
"error": Event;
@@ -9012,7 +9110,7 @@ interface RTCDtlsTransport extends RTCStatsProvider {
declare var RTCDtlsTransport: {
prototype: RTCDtlsTransport;
new(transport: RTCIceTransport): RTCDtlsTransport;
-}
+};
interface RTCDtlsTransportStateChangedEvent extends Event {
readonly state: RTCDtlsTransportState;
@@ -9021,7 +9119,7 @@ interface RTCDtlsTransportStateChangedEvent extends Event {
declare var RTCDtlsTransportStateChangedEvent: {
prototype: RTCDtlsTransportStateChangedEvent;
new(): RTCDtlsTransportStateChangedEvent;
-}
+};
interface RTCDtmfSenderEventMap {
"tonechange": RTCDTMFToneChangeEvent;
@@ -9042,19 +9140,28 @@ interface RTCDtmfSender extends EventTarget {
declare var RTCDtmfSender: {
prototype: RTCDtmfSender;
new(sender: RTCRtpSender): RTCDtmfSender;
+};
+
+interface RTCDTMFToneChangeEvent extends Event {
+ readonly tone: string;
}
+declare var RTCDTMFToneChangeEvent: {
+ prototype: RTCDTMFToneChangeEvent;
+ new(typeArg: string, eventInitDict: RTCDTMFToneChangeEventInit): RTCDTMFToneChangeEvent;
+};
+
interface RTCIceCandidate {
candidate: string | null;
- sdpMLineIndex: number | null;
sdpMid: string | null;
+ sdpMLineIndex: number | null;
toJSON(): any;
}
declare var RTCIceCandidate: {
prototype: RTCIceCandidate;
new(candidateInitDict?: RTCIceCandidateInit): RTCIceCandidate;
-}
+};
interface RTCIceCandidatePairChangedEvent extends Event {
readonly pair: RTCIceCandidatePair;
@@ -9063,7 +9170,7 @@ interface RTCIceCandidatePairChangedEvent extends Event {
declare var RTCIceCandidatePairChangedEvent: {
prototype: RTCIceCandidatePairChangedEvent;
new(): RTCIceCandidatePairChangedEvent;
-}
+};
interface RTCIceGathererEventMap {
"error": Event;
@@ -9084,7 +9191,7 @@ interface RTCIceGatherer extends RTCStatsProvider {
declare var RTCIceGatherer: {
prototype: RTCIceGatherer;
new(options: RTCIceGatherOptions): RTCIceGatherer;
-}
+};
interface RTCIceGathererEvent extends Event {
readonly candidate: RTCIceCandidateDictionary | RTCIceCandidateComplete;
@@ -9093,7 +9200,7 @@ interface RTCIceGathererEvent extends Event {
declare var RTCIceGathererEvent: {
prototype: RTCIceGathererEvent;
new(): RTCIceGathererEvent;
-}
+};
interface RTCIceTransportEventMap {
"candidatepairchange": RTCIceCandidatePairChangedEvent;
@@ -9122,7 +9229,7 @@ interface RTCIceTransport extends RTCStatsProvider {
declare var RTCIceTransport: {
prototype: RTCIceTransport;
new(): RTCIceTransport;
-}
+};
interface RTCIceTransportStateChangedEvent extends Event {
readonly state: RTCIceTransportState;
@@ -9131,7 +9238,7 @@ interface RTCIceTransportStateChangedEvent extends Event {
declare var RTCIceTransportStateChangedEvent: {
prototype: RTCIceTransportStateChangedEvent;
new(): RTCIceTransportStateChangedEvent;
-}
+};
interface RTCPeerConnectionEventMap {
"addstream": MediaStreamEvent;
@@ -9177,7 +9284,7 @@ interface RTCPeerConnection extends EventTarget {
declare var RTCPeerConnection: {
prototype: RTCPeerConnection;
new(configuration: RTCConfiguration): RTCPeerConnection;
-}
+};
interface RTCPeerConnectionIceEvent extends Event {
readonly candidate: RTCIceCandidate;
@@ -9186,7 +9293,7 @@ interface RTCPeerConnectionIceEvent extends Event {
declare var RTCPeerConnectionIceEvent: {
prototype: RTCPeerConnectionIceEvent;
new(type: string, eventInitDict: RTCPeerConnectionIceEventInit): RTCPeerConnectionIceEvent;
-}
+};
interface RTCRtpReceiverEventMap {
"error": Event;
@@ -9210,7 +9317,7 @@ declare var RTCRtpReceiver: {
prototype: RTCRtpReceiver;
new(transport: RTCDtlsTransport | RTCSrtpSdesTransport, kind: string, rtcpTransport?: RTCDtlsTransport): RTCRtpReceiver;
getCapabilities(kind?: string): RTCRtpCapabilities;
-}
+};
interface RTCRtpSenderEventMap {
"error": Event;
@@ -9235,7 +9342,7 @@ declare var RTCRtpSender: {
prototype: RTCRtpSender;
new(track: MediaStreamTrack, transport: RTCDtlsTransport | RTCSrtpSdesTransport, rtcpTransport?: RTCDtlsTransport): RTCRtpSender;
getCapabilities(kind?: string): RTCRtpCapabilities;
-}
+};
interface RTCSessionDescription {
sdp: string | null;
@@ -9246,7 +9353,7 @@ interface RTCSessionDescription {
declare var RTCSessionDescription: {
prototype: RTCSessionDescription;
new(descriptionInitDict?: RTCSessionDescriptionInit): RTCSessionDescription;
-}
+};
interface RTCSrtpSdesTransportEventMap {
"error": Event;
@@ -9263,7 +9370,7 @@ declare var RTCSrtpSdesTransport: {
prototype: RTCSrtpSdesTransport;
new(transport: RTCIceTransport, encryptParameters: RTCSrtpSdesParameters, decryptParameters: RTCSrtpSdesParameters): RTCSrtpSdesTransport;
getLocalParameters(): RTCSrtpSdesParameters[];
-}
+};
interface RTCSsrcConflictEvent extends Event {
readonly ssrc: number;
@@ -9272,7 +9379,7 @@ interface RTCSsrcConflictEvent extends Event {
declare var RTCSsrcConflictEvent: {
prototype: RTCSsrcConflictEvent;
new(): RTCSsrcConflictEvent;
-}
+};
interface RTCStatsProvider extends EventTarget {
getStats(): Promise<RTCStatsReport>;
@@ -9282,112 +9389,421 @@ interface RTCStatsProvider extends EventTarget {
declare var RTCStatsProvider: {
prototype: RTCStatsProvider;
new(): RTCStatsProvider;
+};
+
+interface ScopedCredential {
+ readonly id: ArrayBuffer;
+ readonly type: ScopedCredentialType;
}
-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;
+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;
- 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;
+declare var Selection: {
+ prototype: Selection;
+ new(): Selection;
+};
+
+interface ServiceWorkerEventMap extends AbstractWorkerEventMap {
+ "statechange": Event;
}
-interface ReadableStream {
- readonly locked: boolean;
- cancel(): Promise<void>;
- getReader(): ReadableStreamReader;
+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 ReadableStream: {
- prototype: ReadableStream;
- new(): ReadableStream;
+declare var ServiceWorker: {
+ prototype: ServiceWorker;
+ new(): ServiceWorker;
+};
+
+interface ServiceWorkerContainerEventMap {
+ "controllerchange": Event;
+ "message": ServiceWorkerMessageEvent;
}
-interface ReadableStreamReader {
- cancel(): Promise<void>;
- read(): Promise<any>;
- releaseLock(): void;
+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 ReadableStreamReader: {
- prototype: ReadableStreamReader;
- new(): ReadableStreamReader;
+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;
}
-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 ServiceWorkerMessageEvent: {
+ prototype: ServiceWorkerMessageEvent;
+ new(type: string, eventInitDict?: ServiceWorkerMessageEventInit): ServiceWorkerMessageEvent;
+};
+
+interface ServiceWorkerRegistrationEventMap {
+ "updatefound": Event;
}
-declare var Request: {
- prototype: Request;
- new(input: Request | string, init?: RequestInit): Request;
+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;
}
-interface Response extends Object, Body {
- readonly body: ReadableStream | null;
- readonly headers: Headers;
- readonly ok: boolean;
- readonly status: number;
- readonly statusText: string;
- readonly type: ResponseType;
+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;
- clone(): Response;
+ key?: string;
+ oldValue?: string;
+ newValue?: string;
+ storageArea?: Storage;
}
-declare var Response: {
- prototype: Response;
- new(body?: any, init?: ResponseInit): Response;
+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 SVGAElement extends SVGGraphicsElement, SVGURIReference {
readonly target: SVGAnimatedString;
addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGAElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
@@ -9397,7 +9813,7 @@ interface SVGAElement extends SVGGraphicsElement, SVGURIReference {
declare var SVGAElement: {
prototype: SVGAElement;
new(): SVGAElement;
-}
+};
interface SVGAngle {
readonly unitType: number;
@@ -9421,7 +9837,7 @@ declare var SVGAngle: {
readonly SVG_ANGLETYPE_RAD: number;
readonly SVG_ANGLETYPE_UNKNOWN: number;
readonly SVG_ANGLETYPE_UNSPECIFIED: number;
-}
+};
interface SVGAnimatedAngle {
readonly animVal: SVGAngle;
@@ -9431,7 +9847,7 @@ interface SVGAnimatedAngle {
declare var SVGAnimatedAngle: {
prototype: SVGAnimatedAngle;
new(): SVGAnimatedAngle;
-}
+};
interface SVGAnimatedBoolean {
readonly animVal: boolean;
@@ -9441,7 +9857,7 @@ interface SVGAnimatedBoolean {
declare var SVGAnimatedBoolean: {
prototype: SVGAnimatedBoolean;
new(): SVGAnimatedBoolean;
-}
+};
interface SVGAnimatedEnumeration {
readonly animVal: number;
@@ -9451,7 +9867,7 @@ interface SVGAnimatedEnumeration {
declare var SVGAnimatedEnumeration: {
prototype: SVGAnimatedEnumeration;
new(): SVGAnimatedEnumeration;
-}
+};
interface SVGAnimatedInteger {
readonly animVal: number;
@@ -9461,7 +9877,7 @@ interface SVGAnimatedInteger {
declare var SVGAnimatedInteger: {
prototype: SVGAnimatedInteger;
new(): SVGAnimatedInteger;
-}
+};
interface SVGAnimatedLength {
readonly animVal: SVGLength;
@@ -9471,7 +9887,7 @@ interface SVGAnimatedLength {
declare var SVGAnimatedLength: {
prototype: SVGAnimatedLength;
new(): SVGAnimatedLength;
-}
+};
interface SVGAnimatedLengthList {
readonly animVal: SVGLengthList;
@@ -9481,7 +9897,7 @@ interface SVGAnimatedLengthList {
declare var SVGAnimatedLengthList: {
prototype: SVGAnimatedLengthList;
new(): SVGAnimatedLengthList;
-}
+};
interface SVGAnimatedNumber {
readonly animVal: number;
@@ -9491,7 +9907,7 @@ interface SVGAnimatedNumber {
declare var SVGAnimatedNumber: {
prototype: SVGAnimatedNumber;
new(): SVGAnimatedNumber;
-}
+};
interface SVGAnimatedNumberList {
readonly animVal: SVGNumberList;
@@ -9501,7 +9917,7 @@ interface SVGAnimatedNumberList {
declare var SVGAnimatedNumberList: {
prototype: SVGAnimatedNumberList;
new(): SVGAnimatedNumberList;
-}
+};
interface SVGAnimatedPreserveAspectRatio {
readonly animVal: SVGPreserveAspectRatio;
@@ -9511,7 +9927,7 @@ interface SVGAnimatedPreserveAspectRatio {
declare var SVGAnimatedPreserveAspectRatio: {
prototype: SVGAnimatedPreserveAspectRatio;
new(): SVGAnimatedPreserveAspectRatio;
-}
+};
interface SVGAnimatedRect {
readonly animVal: SVGRect;
@@ -9521,7 +9937,7 @@ interface SVGAnimatedRect {
declare var SVGAnimatedRect: {
prototype: SVGAnimatedRect;
new(): SVGAnimatedRect;
-}
+};
interface SVGAnimatedString {
readonly animVal: string;
@@ -9531,7 +9947,7 @@ interface SVGAnimatedString {
declare var SVGAnimatedString: {
prototype: SVGAnimatedString;
new(): SVGAnimatedString;
-}
+};
interface SVGAnimatedTransformList {
readonly animVal: SVGTransformList;
@@ -9541,7 +9957,7 @@ interface SVGAnimatedTransformList {
declare var SVGAnimatedTransformList: {
prototype: SVGAnimatedTransformList;
new(): SVGAnimatedTransformList;
-}
+};
interface SVGCircleElement extends SVGGraphicsElement {
readonly cx: SVGAnimatedLength;
@@ -9554,7 +9970,7 @@ interface SVGCircleElement extends SVGGraphicsElement {
declare var SVGCircleElement: {
prototype: SVGCircleElement;
new(): SVGCircleElement;
-}
+};
interface SVGClipPathElement extends SVGGraphicsElement, SVGUnitTypes {
readonly clipPathUnits: SVGAnimatedEnumeration;
@@ -9565,7 +9981,7 @@ interface SVGClipPathElement extends SVGGraphicsElement, SVGUnitTypes {
declare var SVGClipPathElement: {
prototype: SVGClipPathElement;
new(): SVGClipPathElement;
-}
+};
interface SVGComponentTransferFunctionElement extends SVGElement {
readonly amplitude: SVGAnimatedNumber;
@@ -9594,7 +10010,7 @@ declare var SVGComponentTransferFunctionElement: {
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;
@@ -9604,7 +10020,7 @@ interface SVGDefsElement extends SVGGraphicsElement {
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;
@@ -9614,7 +10030,7 @@ interface SVGDescElement extends SVGElement {
declare var SVGDescElement: {
prototype: SVGDescElement;
new(): SVGDescElement;
-}
+};
interface SVGElementEventMap extends ElementEventMap {
"click": MouseEvent;
@@ -9652,7 +10068,7 @@ interface SVGElement extends Element {
declare var SVGElement: {
prototype: SVGElement;
new(): SVGElement;
-}
+};
interface SVGElementInstance extends EventTarget {
readonly childNodes: SVGElementInstanceList;
@@ -9668,7 +10084,7 @@ interface SVGElementInstance extends EventTarget {
declare var SVGElementInstance: {
prototype: SVGElementInstance;
new(): SVGElementInstance;
-}
+};
interface SVGElementInstanceList {
readonly length: number;
@@ -9678,7 +10094,7 @@ interface SVGElementInstanceList {
declare var SVGElementInstanceList: {
prototype: SVGElementInstanceList;
new(): SVGElementInstanceList;
-}
+};
interface SVGEllipseElement extends SVGGraphicsElement {
readonly cx: SVGAnimatedLength;
@@ -9692,7 +10108,7 @@ interface SVGEllipseElement extends SVGGraphicsElement {
declare var SVGEllipseElement: {
prototype: SVGEllipseElement;
new(): SVGEllipseElement;
-}
+};
interface SVGFEBlendElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
readonly in1: SVGAnimatedString;
@@ -9739,7 +10155,7 @@ declare var SVGFEBlendElement: {
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;
@@ -9762,7 +10178,7 @@ declare var SVGFEColorMatrixElement: {
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;
@@ -9773,7 +10189,7 @@ interface SVGFEComponentTransferElement extends SVGElement, SVGFilterPrimitiveSt
declare var SVGFEComponentTransferElement: {
prototype: SVGFEComponentTransferElement;
new(): SVGFEComponentTransferElement;
-}
+};
interface SVGFECompositeElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
readonly in1: SVGAnimatedString;
@@ -9804,7 +10220,7 @@ declare var SVGFECompositeElement: {
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;
@@ -9834,7 +10250,7 @@ declare var SVGFEConvolveMatrixElement: {
readonly SVG_EDGEMODE_NONE: number;
readonly SVG_EDGEMODE_UNKNOWN: number;
readonly SVG_EDGEMODE_WRAP: number;
-}
+};
interface SVGFEDiffuseLightingElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
readonly diffuseConstant: SVGAnimatedNumber;
@@ -9849,7 +10265,7 @@ interface SVGFEDiffuseLightingElement extends SVGElement, SVGFilterPrimitiveStan
declare var SVGFEDiffuseLightingElement: {
prototype: SVGFEDiffuseLightingElement;
new(): SVGFEDiffuseLightingElement;
-}
+};
interface SVGFEDisplacementMapElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
readonly in1: SVGAnimatedString;
@@ -9874,7 +10290,7 @@ declare var SVGFEDisplacementMapElement: {
readonly SVG_CHANNEL_G: number;
readonly SVG_CHANNEL_R: number;
readonly SVG_CHANNEL_UNKNOWN: number;
-}
+};
interface SVGFEDistantLightElement extends SVGElement {
readonly azimuth: SVGAnimatedNumber;
@@ -9886,7 +10302,7 @@ interface SVGFEDistantLightElement extends SVGElement {
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;
@@ -9896,7 +10312,7 @@ interface SVGFEFloodElement extends SVGElement, SVGFilterPrimitiveStandardAttrib
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;
@@ -9906,7 +10322,7 @@ interface SVGFEFuncAElement extends SVGComponentTransferFunctionElement {
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;
@@ -9916,7 +10332,7 @@ interface SVGFEFuncBElement extends SVGComponentTransferFunctionElement {
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;
@@ -9926,7 +10342,7 @@ interface SVGFEFuncGElement extends SVGComponentTransferFunctionElement {
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;
@@ -9936,7 +10352,7 @@ interface SVGFEFuncRElement extends SVGComponentTransferFunctionElement {
declare var SVGFEFuncRElement: {
prototype: SVGFEFuncRElement;
new(): SVGFEFuncRElement;
-}
+};
interface SVGFEGaussianBlurElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
readonly in1: SVGAnimatedString;
@@ -9950,7 +10366,7 @@ interface SVGFEGaussianBlurElement extends SVGElement, SVGFilterPrimitiveStandar
declare var SVGFEGaussianBlurElement: {
prototype: SVGFEGaussianBlurElement;
new(): SVGFEGaussianBlurElement;
-}
+};
interface SVGFEImageElement extends SVGElement, SVGFilterPrimitiveStandardAttributes, SVGURIReference {
readonly preserveAspectRatio: SVGAnimatedPreserveAspectRatio;
@@ -9961,7 +10377,7 @@ interface SVGFEImageElement extends SVGElement, SVGFilterPrimitiveStandardAttrib
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;
@@ -9971,7 +10387,7 @@ interface SVGFEMergeElement extends SVGElement, SVGFilterPrimitiveStandardAttrib
declare var SVGFEMergeElement: {
prototype: SVGFEMergeElement;
new(): SVGFEMergeElement;
-}
+};
interface SVGFEMergeNodeElement extends SVGElement {
readonly in1: SVGAnimatedString;
@@ -9982,7 +10398,7 @@ interface SVGFEMergeNodeElement extends SVGElement {
declare var SVGFEMergeNodeElement: {
prototype: SVGFEMergeNodeElement;
new(): SVGFEMergeNodeElement;
-}
+};
interface SVGFEMorphologyElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
readonly in1: SVGAnimatedString;
@@ -10002,7 +10418,7 @@ declare var 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;
@@ -10015,7 +10431,7 @@ interface SVGFEOffsetElement extends SVGElement, SVGFilterPrimitiveStandardAttri
declare var SVGFEOffsetElement: {
prototype: SVGFEOffsetElement;
new(): SVGFEOffsetElement;
-}
+};
interface SVGFEPointLightElement extends SVGElement {
readonly x: SVGAnimatedNumber;
@@ -10028,7 +10444,7 @@ interface SVGFEPointLightElement extends SVGElement {
declare var SVGFEPointLightElement: {
prototype: SVGFEPointLightElement;
new(): SVGFEPointLightElement;
-}
+};
interface SVGFESpecularLightingElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
readonly in1: SVGAnimatedString;
@@ -10044,7 +10460,7 @@ interface SVGFESpecularLightingElement extends SVGElement, SVGFilterPrimitiveSta
declare var SVGFESpecularLightingElement: {
prototype: SVGFESpecularLightingElement;
new(): SVGFESpecularLightingElement;
-}
+};
interface SVGFESpotLightElement extends SVGElement {
readonly limitingConeAngle: SVGAnimatedNumber;
@@ -10062,7 +10478,7 @@ interface SVGFESpotLightElement extends SVGElement {
declare var SVGFESpotLightElement: {
prototype: SVGFESpotLightElement;
new(): SVGFESpotLightElement;
-}
+};
interface SVGFETileElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
readonly in1: SVGAnimatedString;
@@ -10073,7 +10489,7 @@ interface SVGFETileElement extends SVGElement, SVGFilterPrimitiveStandardAttribu
declare var SVGFETileElement: {
prototype: SVGFETileElement;
new(): SVGFETileElement;
-}
+};
interface SVGFETurbulenceElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
readonly baseFrequencyX: SVGAnimatedNumber;
@@ -10101,7 +10517,7 @@ declare var SVGFETurbulenceElement: {
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;
@@ -10120,7 +10536,7 @@ interface SVGFilterElement extends SVGElement, SVGUnitTypes, SVGURIReference {
declare var SVGFilterElement: {
prototype: SVGFilterElement;
new(): SVGFilterElement;
-}
+};
interface SVGForeignObjectElement extends SVGGraphicsElement {
readonly height: SVGAnimatedLength;
@@ -10134,7 +10550,7 @@ interface SVGForeignObjectElement extends SVGGraphicsElement {
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;
@@ -10144,7 +10560,7 @@ interface SVGGElement extends SVGGraphicsElement {
declare var SVGGElement: {
prototype: SVGGElement;
new(): SVGGElement;
-}
+};
interface SVGGradientElement extends SVGElement, SVGUnitTypes, SVGURIReference {
readonly gradientTransform: SVGAnimatedTransformList;
@@ -10165,7 +10581,7 @@ declare var SVGGradientElement: {
readonly SVG_SPREADMETHOD_REFLECT: number;
readonly SVG_SPREADMETHOD_REPEAT: number;
readonly SVG_SPREADMETHOD_UNKNOWN: number;
-}
+};
interface SVGGraphicsElement extends SVGElement, SVGTests {
readonly farthestViewportElement: SVGElement;
@@ -10182,7 +10598,7 @@ interface SVGGraphicsElement extends SVGElement, SVGTests {
declare var SVGGraphicsElement: {
prototype: SVGGraphicsElement;
new(): SVGGraphicsElement;
-}
+};
interface SVGImageElement extends SVGGraphicsElement, SVGURIReference {
readonly height: SVGAnimatedLength;
@@ -10197,7 +10613,7 @@ interface SVGImageElement extends SVGGraphicsElement, SVGURIReference {
declare var SVGImageElement: {
prototype: SVGImageElement;
new(): SVGImageElement;
-}
+};
interface SVGLength {
readonly unitType: number;
@@ -10233,7 +10649,7 @@ declare var SVGLength: {
readonly SVG_LENGTHTYPE_PT: number;
readonly SVG_LENGTHTYPE_PX: number;
readonly SVG_LENGTHTYPE_UNKNOWN: number;
-}
+};
interface SVGLengthList {
readonly numberOfItems: number;
@@ -10249,35 +10665,35 @@ interface SVGLengthList {
declare var SVGLengthList: {
prototype: SVGLengthList;
new(): SVGLengthList;
-}
+};
-interface SVGLineElement extends SVGGraphicsElement {
+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: SVGLineElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ 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 SVGLineElement: {
- prototype: SVGLineElement;
- new(): SVGLineElement;
-}
+declare var SVGLinearGradientElement: {
+ prototype: SVGLinearGradientElement;
+ new(): SVGLinearGradientElement;
+};
-interface SVGLinearGradientElement extends SVGGradientElement {
+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: SVGLinearGradientElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ 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 SVGLinearGradientElement: {
- prototype: SVGLinearGradientElement;
- new(): SVGLinearGradientElement;
-}
+declare var SVGLineElement: {
+ prototype: SVGLineElement;
+ new(): SVGLineElement;
+};
interface SVGMarkerElement extends SVGElement, SVGFitToViewBox {
readonly markerHeight: SVGAnimatedLength;
@@ -10289,12 +10705,12 @@ interface SVGMarkerElement extends SVGElement, SVGFitToViewBox {
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;
+ readonly SVG_MARKERUNITS_STROKEWIDTH: number;
+ readonly SVG_MARKERUNITS_UNKNOWN: number;
+ readonly SVG_MARKERUNITS_USERSPACEONUSE: 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;
}
@@ -10302,13 +10718,13 @@ interface SVGMarkerElement extends SVGElement, SVGFitToViewBox {
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;
-}
+ readonly SVG_MARKERUNITS_STROKEWIDTH: number;
+ readonly SVG_MARKERUNITS_UNKNOWN: number;
+ readonly SVG_MARKERUNITS_USERSPACEONUSE: number;
+};
interface SVGMaskElement extends SVGElement, SVGTests, SVGUnitTypes {
readonly height: SVGAnimatedLength;
@@ -10324,7 +10740,7 @@ interface SVGMaskElement extends SVGElement, SVGTests, SVGUnitTypes {
declare var SVGMaskElement: {
prototype: SVGMaskElement;
new(): SVGMaskElement;
-}
+};
interface SVGMatrix {
a: number;
@@ -10349,7 +10765,7 @@ interface 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;
@@ -10359,7 +10775,7 @@ interface SVGMetadataElement extends SVGElement {
declare var SVGMetadataElement: {
prototype: SVGMetadataElement;
new(): SVGMetadataElement;
-}
+};
interface SVGNumber {
value: number;
@@ -10368,7 +10784,7 @@ interface SVGNumber {
declare var SVGNumber: {
prototype: SVGNumber;
new(): SVGNumber;
-}
+};
interface SVGNumberList {
readonly numberOfItems: number;
@@ -10384,7 +10800,7 @@ interface SVGNumberList {
declare var SVGNumberList: {
prototype: SVGNumberList;
new(): SVGNumberList;
-}
+};
interface SVGPathElement extends SVGGraphicsElement {
readonly pathSegList: SVGPathSegList;
@@ -10417,7 +10833,7 @@ interface SVGPathElement extends SVGGraphicsElement {
declare var SVGPathElement: {
prototype: SVGPathElement;
new(): SVGPathElement;
-}
+};
interface SVGPathSeg {
readonly pathSegType: number;
@@ -10467,7 +10883,7 @@ declare var SVGPathSeg: {
readonly PATHSEG_MOVETO_ABS: number;
readonly PATHSEG_MOVETO_REL: number;
readonly PATHSEG_UNKNOWN: number;
-}
+};
interface SVGPathSegArcAbs extends SVGPathSeg {
angle: number;
@@ -10482,7 +10898,7 @@ interface SVGPathSegArcAbs extends SVGPathSeg {
declare var SVGPathSegArcAbs: {
prototype: SVGPathSegArcAbs;
new(): SVGPathSegArcAbs;
-}
+};
interface SVGPathSegArcRel extends SVGPathSeg {
angle: number;
@@ -10497,7 +10913,7 @@ interface SVGPathSegArcRel extends SVGPathSeg {
declare var SVGPathSegArcRel: {
prototype: SVGPathSegArcRel;
new(): SVGPathSegArcRel;
-}
+};
interface SVGPathSegClosePath extends SVGPathSeg {
}
@@ -10505,7 +10921,7 @@ interface SVGPathSegClosePath extends SVGPathSeg {
declare var SVGPathSegClosePath: {
prototype: SVGPathSegClosePath;
new(): SVGPathSegClosePath;
-}
+};
interface SVGPathSegCurvetoCubicAbs extends SVGPathSeg {
x: number;
@@ -10519,7 +10935,7 @@ interface SVGPathSegCurvetoCubicAbs extends SVGPathSeg {
declare var SVGPathSegCurvetoCubicAbs: {
prototype: SVGPathSegCurvetoCubicAbs;
new(): SVGPathSegCurvetoCubicAbs;
-}
+};
interface SVGPathSegCurvetoCubicRel extends SVGPathSeg {
x: number;
@@ -10533,7 +10949,7 @@ interface SVGPathSegCurvetoCubicRel extends SVGPathSeg {
declare var SVGPathSegCurvetoCubicRel: {
prototype: SVGPathSegCurvetoCubicRel;
new(): SVGPathSegCurvetoCubicRel;
-}
+};
interface SVGPathSegCurvetoCubicSmoothAbs extends SVGPathSeg {
x: number;
@@ -10545,7 +10961,7 @@ interface SVGPathSegCurvetoCubicSmoothAbs extends SVGPathSeg {
declare var SVGPathSegCurvetoCubicSmoothAbs: {
prototype: SVGPathSegCurvetoCubicSmoothAbs;
new(): SVGPathSegCurvetoCubicSmoothAbs;
-}
+};
interface SVGPathSegCurvetoCubicSmoothRel extends SVGPathSeg {
x: number;
@@ -10557,7 +10973,7 @@ interface SVGPathSegCurvetoCubicSmoothRel extends SVGPathSeg {
declare var SVGPathSegCurvetoCubicSmoothRel: {
prototype: SVGPathSegCurvetoCubicSmoothRel;
new(): SVGPathSegCurvetoCubicSmoothRel;
-}
+};
interface SVGPathSegCurvetoQuadraticAbs extends SVGPathSeg {
x: number;
@@ -10569,7 +10985,7 @@ interface SVGPathSegCurvetoQuadraticAbs extends SVGPathSeg {
declare var SVGPathSegCurvetoQuadraticAbs: {
prototype: SVGPathSegCurvetoQuadraticAbs;
new(): SVGPathSegCurvetoQuadraticAbs;
-}
+};
interface SVGPathSegCurvetoQuadraticRel extends SVGPathSeg {
x: number;
@@ -10581,7 +10997,7 @@ interface SVGPathSegCurvetoQuadraticRel extends SVGPathSeg {
declare var SVGPathSegCurvetoQuadraticRel: {
prototype: SVGPathSegCurvetoQuadraticRel;
new(): SVGPathSegCurvetoQuadraticRel;
-}
+};
interface SVGPathSegCurvetoQuadraticSmoothAbs extends SVGPathSeg {
x: number;
@@ -10591,7 +11007,7 @@ interface SVGPathSegCurvetoQuadraticSmoothAbs extends SVGPathSeg {
declare var SVGPathSegCurvetoQuadraticSmoothAbs: {
prototype: SVGPathSegCurvetoQuadraticSmoothAbs;
new(): SVGPathSegCurvetoQuadraticSmoothAbs;
-}
+};
interface SVGPathSegCurvetoQuadraticSmoothRel extends SVGPathSeg {
x: number;
@@ -10601,7 +11017,7 @@ interface SVGPathSegCurvetoQuadraticSmoothRel extends SVGPathSeg {
declare var SVGPathSegCurvetoQuadraticSmoothRel: {
prototype: SVGPathSegCurvetoQuadraticSmoothRel;
new(): SVGPathSegCurvetoQuadraticSmoothRel;
-}
+};
interface SVGPathSegLinetoAbs extends SVGPathSeg {
x: number;
@@ -10611,7 +11027,7 @@ interface SVGPathSegLinetoAbs extends SVGPathSeg {
declare var SVGPathSegLinetoAbs: {
prototype: SVGPathSegLinetoAbs;
new(): SVGPathSegLinetoAbs;
-}
+};
interface SVGPathSegLinetoHorizontalAbs extends SVGPathSeg {
x: number;
@@ -10620,7 +11036,7 @@ interface SVGPathSegLinetoHorizontalAbs extends SVGPathSeg {
declare var SVGPathSegLinetoHorizontalAbs: {
prototype: SVGPathSegLinetoHorizontalAbs;
new(): SVGPathSegLinetoHorizontalAbs;
-}
+};
interface SVGPathSegLinetoHorizontalRel extends SVGPathSeg {
x: number;
@@ -10629,7 +11045,7 @@ interface SVGPathSegLinetoHorizontalRel extends SVGPathSeg {
declare var SVGPathSegLinetoHorizontalRel: {
prototype: SVGPathSegLinetoHorizontalRel;
new(): SVGPathSegLinetoHorizontalRel;
-}
+};
interface SVGPathSegLinetoRel extends SVGPathSeg {
x: number;
@@ -10639,7 +11055,7 @@ interface SVGPathSegLinetoRel extends SVGPathSeg {
declare var SVGPathSegLinetoRel: {
prototype: SVGPathSegLinetoRel;
new(): SVGPathSegLinetoRel;
-}
+};
interface SVGPathSegLinetoVerticalAbs extends SVGPathSeg {
y: number;
@@ -10648,7 +11064,7 @@ interface SVGPathSegLinetoVerticalAbs extends SVGPathSeg {
declare var SVGPathSegLinetoVerticalAbs: {
prototype: SVGPathSegLinetoVerticalAbs;
new(): SVGPathSegLinetoVerticalAbs;
-}
+};
interface SVGPathSegLinetoVerticalRel extends SVGPathSeg {
y: number;
@@ -10657,7 +11073,7 @@ interface SVGPathSegLinetoVerticalRel extends SVGPathSeg {
declare var SVGPathSegLinetoVerticalRel: {
prototype: SVGPathSegLinetoVerticalRel;
new(): SVGPathSegLinetoVerticalRel;
-}
+};
interface SVGPathSegList {
readonly numberOfItems: number;
@@ -10673,7 +11089,7 @@ interface SVGPathSegList {
declare var SVGPathSegList: {
prototype: SVGPathSegList;
new(): SVGPathSegList;
-}
+};
interface SVGPathSegMovetoAbs extends SVGPathSeg {
x: number;
@@ -10683,7 +11099,7 @@ interface SVGPathSegMovetoAbs extends SVGPathSeg {
declare var SVGPathSegMovetoAbs: {
prototype: SVGPathSegMovetoAbs;
new(): SVGPathSegMovetoAbs;
-}
+};
interface SVGPathSegMovetoRel extends SVGPathSeg {
x: number;
@@ -10693,7 +11109,7 @@ interface SVGPathSegMovetoRel extends SVGPathSeg {
declare var SVGPathSegMovetoRel: {
prototype: SVGPathSegMovetoRel;
new(): SVGPathSegMovetoRel;
-}
+};
interface SVGPatternElement extends SVGElement, SVGTests, SVGUnitTypes, SVGFitToViewBox, SVGURIReference {
readonly height: SVGAnimatedLength;
@@ -10710,7 +11126,7 @@ interface SVGPatternElement extends SVGElement, SVGTests, SVGUnitTypes, SVGFitTo
declare var SVGPatternElement: {
prototype: SVGPatternElement;
new(): SVGPatternElement;
-}
+};
interface SVGPoint {
x: number;
@@ -10721,7 +11137,7 @@ interface SVGPoint {
declare var SVGPoint: {
prototype: SVGPoint;
new(): SVGPoint;
-}
+};
interface SVGPointList {
readonly numberOfItems: number;
@@ -10737,7 +11153,7 @@ interface SVGPointList {
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;
@@ -10747,7 +11163,7 @@ interface SVGPolygonElement extends SVGGraphicsElement, SVGAnimatedPoints {
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;
@@ -10757,7 +11173,7 @@ interface SVGPolylineElement extends SVGGraphicsElement, SVGAnimatedPoints {
declare var SVGPolylineElement: {
prototype: SVGPolylineElement;
new(): SVGPolylineElement;
-}
+};
interface SVGPreserveAspectRatio {
align: number;
@@ -10795,7 +11211,7 @@ declare var SVGPreserveAspectRatio: {
readonly SVG_PRESERVEASPECTRATIO_XMINYMAX: number;
readonly SVG_PRESERVEASPECTRATIO_XMINYMID: number;
readonly SVG_PRESERVEASPECTRATIO_XMINYMIN: number;
-}
+};
interface SVGRadialGradientElement extends SVGGradientElement {
readonly cx: SVGAnimatedLength;
@@ -10810,7 +11226,7 @@ interface SVGRadialGradientElement extends SVGGradientElement {
declare var SVGRadialGradientElement: {
prototype: SVGRadialGradientElement;
new(): SVGRadialGradientElement;
-}
+};
interface SVGRect {
height: number;
@@ -10822,7 +11238,7 @@ interface SVGRect {
declare var SVGRect: {
prototype: SVGRect;
new(): SVGRect;
-}
+};
interface SVGRectElement extends SVGGraphicsElement {
readonly height: SVGAnimatedLength;
@@ -10838,8 +11254,60 @@ interface SVGRectElement extends SVGGraphicsElement {
declare var SVGRectElement: {
prototype: SVGRectElement;
new(): SVGRectElement;
+};
+
+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 SVGSVGElementEventMap extends SVGElementEventMap {
"SVGAbort": Event;
"SVGError": Event;
@@ -10899,59 +11367,7 @@ interface SVGSVGElement extends SVGGraphicsElement, DocumentEvent, SVGFitToViewB
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;
@@ -10961,7 +11377,7 @@ interface SVGSwitchElement extends SVGGraphicsElement {
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;
@@ -10971,17 +11387,7 @@ interface SVGSymbolElement extends SVGElement, SVGFitToViewBox {
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;
@@ -11008,7 +11414,7 @@ declare var 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;
@@ -11018,7 +11424,7 @@ interface SVGTextElement extends SVGTextPositioningElement {
declare var SVGTextElement: {
prototype: SVGTextElement;
new(): SVGTextElement;
-}
+};
interface SVGTextPathElement extends SVGTextContentElement, SVGURIReference {
readonly method: SVGAnimatedEnumeration;
@@ -11043,7 +11449,7 @@ declare var SVGTextPathElement: {
readonly TEXTPATH_SPACINGTYPE_AUTO: number;
readonly TEXTPATH_SPACINGTYPE_EXACT: number;
readonly TEXTPATH_SPACINGTYPE_UNKNOWN: number;
-}
+};
interface SVGTextPositioningElement extends SVGTextContentElement {
readonly dx: SVGAnimatedLengthList;
@@ -11058,7 +11464,7 @@ interface SVGTextPositioningElement extends SVGTextContentElement {
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;
@@ -11068,7 +11474,7 @@ interface SVGTitleElement extends SVGElement {
declare var SVGTitleElement: {
prototype: SVGTitleElement;
new(): SVGTitleElement;
-}
+};
interface SVGTransform {
readonly angle: number;
@@ -11099,7 +11505,7 @@ declare var SVGTransform: {
readonly SVG_TRANSFORM_SKEWY: number;
readonly SVG_TRANSFORM_TRANSLATE: number;
readonly SVG_TRANSFORM_UNKNOWN: number;
-}
+};
interface SVGTransformList {
readonly numberOfItems: number;
@@ -11117,8 +11523,18 @@ interface SVGTransformList {
declare var SVGTransformList: {
prototype: SVGTransformList;
new(): SVGTransformList;
+};
+
+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 SVGUnitTypes {
readonly SVG_UNIT_TYPE_OBJECTBOUNDINGBOX: number;
readonly SVG_UNIT_TYPE_UNKNOWN: number;
@@ -11140,7 +11556,7 @@ interface SVGUseElement extends SVGGraphicsElement, SVGURIReference {
declare var SVGUseElement: {
prototype: SVGUseElement;
new(): SVGUseElement;
-}
+};
interface SVGViewElement extends SVGElement, SVGZoomAndPan, SVGFitToViewBox {
readonly viewTarget: SVGStringList;
@@ -11151,7 +11567,7 @@ interface SVGViewElement extends SVGElement, SVGZoomAndPan, SVGFitToViewBox {
declare var SVGViewElement: {
prototype: SVGViewElement;
new(): SVGViewElement;
-}
+};
interface SVGZoomAndPan {
readonly zoomAndPan: number;
@@ -11161,7 +11577,7 @@ 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;
@@ -11174,420 +11590,7 @@ interface SVGZoomEvent extends UIEvent {
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;
@@ -11597,7 +11600,7 @@ interface SyncManager {
declare var SyncManager: {
prototype: SyncManager;
new(): SyncManager;
-}
+};
interface Text extends CharacterData {
readonly wholeText: string;
@@ -11608,7 +11611,7 @@ interface Text extends CharacterData {
declare var Text: {
prototype: Text;
new(data?: string): Text;
-}
+};
interface TextEvent extends UIEvent {
readonly data: string;
@@ -11640,7 +11643,7 @@ declare var TextEvent: {
readonly DOM_INPUT_METHOD_SCRIPT: number;
readonly DOM_INPUT_METHOD_UNKNOWN: number;
readonly DOM_INPUT_METHOD_VOICE: number;
-}
+};
interface TextMetrics {
readonly width: number;
@@ -11649,7 +11652,7 @@ interface TextMetrics {
declare var TextMetrics: {
prototype: TextMetrics;
new(): TextMetrics;
-}
+};
interface TextTrackEventMap {
"cuechange": Event;
@@ -11692,7 +11695,7 @@ declare var TextTrack: {
readonly LOADING: number;
readonly NONE: number;
readonly SHOWING: number;
-}
+};
interface TextTrackCueEventMap {
"enter": Event;
@@ -11716,7 +11719,7 @@ interface TextTrackCue extends EventTarget {
declare var TextTrackCue: {
prototype: TextTrackCue;
new(startTime: number, endTime: number, text: string): TextTrackCue;
-}
+};
interface TextTrackCueList {
readonly length: number;
@@ -11728,7 +11731,7 @@ interface TextTrackCueList {
declare var TextTrackCueList: {
prototype: TextTrackCueList;
new(): TextTrackCueList;
-}
+};
interface TextTrackListEventMap {
"addtrack": TrackEvent;
@@ -11746,7 +11749,7 @@ interface TextTrackList extends EventTarget {
declare var TextTrackList: {
prototype: TextTrackList;
new(): TextTrackList;
-}
+};
interface TimeRanges {
readonly length: number;
@@ -11757,7 +11760,7 @@ interface TimeRanges {
declare var TimeRanges: {
prototype: TimeRanges;
new(): TimeRanges;
-}
+};
interface Touch {
readonly clientX: number;
@@ -11773,7 +11776,7 @@ interface Touch {
declare var Touch: {
prototype: Touch;
new(): Touch;
-}
+};
interface TouchEvent extends UIEvent {
readonly altKey: boolean;
@@ -11791,7 +11794,7 @@ interface TouchEvent extends UIEvent {
declare var TouchEvent: {
prototype: TouchEvent;
new(type: string, touchEventInit?: TouchEventInit): TouchEvent;
-}
+};
interface TouchList {
readonly length: number;
@@ -11802,7 +11805,7 @@ interface TouchList {
declare var TouchList: {
prototype: TouchList;
new(): TouchList;
-}
+};
interface TrackEvent extends Event {
readonly track: VideoTrack | AudioTrack | TextTrack | null;
@@ -11811,7 +11814,7 @@ interface TrackEvent extends Event {
declare var TrackEvent: {
prototype: TrackEvent;
new(typeArg: string, eventInitDict?: TrackEventInit): TrackEvent;
-}
+};
interface TransitionEvent extends Event {
readonly elapsedTime: number;
@@ -11822,7 +11825,7 @@ interface TransitionEvent extends Event {
declare var TransitionEvent: {
prototype: TransitionEvent;
new(typeArg: string, eventInitDict?: TransitionEventInit): TransitionEvent;
-}
+};
interface TreeWalker {
currentNode: Node;
@@ -11842,7 +11845,7 @@ interface TreeWalker {
declare var TreeWalker: {
prototype: TreeWalker;
new(): TreeWalker;
-}
+};
interface UIEvent extends Event {
readonly detail: number;
@@ -11853,8 +11856,17 @@ interface UIEvent extends Event {
declare var UIEvent: {
prototype: UIEvent;
new(typeArg: string, eventInitDict?: UIEventInit): UIEvent;
+};
+
+interface UnviewableContentIdentifiedEvent extends NavigationEventWithReferrer {
+ readonly mediaType: string;
}
+declare var UnviewableContentIdentifiedEvent: {
+ prototype: UnviewableContentIdentifiedEvent;
+ new(): UnviewableContentIdentifiedEvent;
+};
+
interface URL {
hash: string;
host: string;
@@ -11876,16 +11888,7 @@ declare var 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;
@@ -11903,7 +11906,7 @@ interface ValidityState {
declare var ValidityState: {
prototype: ValidityState;
new(): ValidityState;
-}
+};
interface VideoPlaybackQuality {
readonly corruptedVideoFrames: number;
@@ -11916,7 +11919,7 @@ interface VideoPlaybackQuality {
declare var VideoPlaybackQuality: {
prototype: VideoPlaybackQuality;
new(): VideoPlaybackQuality;
-}
+};
interface VideoTrack {
readonly id: string;
@@ -11930,7 +11933,7 @@ interface VideoTrack {
declare var VideoTrack: {
prototype: VideoTrack;
new(): VideoTrack;
-}
+};
interface VideoTrackListEventMap {
"addtrack": TrackEvent;
@@ -11954,23 +11957,55 @@ interface VideoTrackList extends EventTarget {
declare var VideoTrackList: {
prototype: VideoTrackList;
new(): VideoTrackList;
+};
+
+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 WEBGL_compressed_texture_s3tc {
+ readonly COMPRESSED_RGB_S3TC_DXT1_EXT: number;
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_RGB_S3TC_DXT1_EXT: number;
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;
@@ -11982,7 +12017,7 @@ declare var 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;
@@ -11992,39 +12027,7 @@ 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;
@@ -12035,7 +12038,7 @@ interface WebGLActiveInfo {
declare var WebGLActiveInfo: {
prototype: WebGLActiveInfo;
new(): WebGLActiveInfo;
-}
+};
interface WebGLBuffer extends WebGLObject {
}
@@ -12043,7 +12046,7 @@ interface WebGLBuffer extends WebGLObject {
declare var WebGLBuffer: {
prototype: WebGLBuffer;
new(): WebGLBuffer;
-}
+};
interface WebGLContextEvent extends Event {
readonly statusMessage: string;
@@ -12052,7 +12055,7 @@ interface WebGLContextEvent extends Event {
declare var WebGLContextEvent: {
prototype: WebGLContextEvent;
new(typeArg: string, eventInitDict?: WebGLContextEventInit): WebGLContextEvent;
-}
+};
interface WebGLFramebuffer extends WebGLObject {
}
@@ -12060,7 +12063,7 @@ interface WebGLFramebuffer extends WebGLObject {
declare var WebGLFramebuffer: {
prototype: WebGLFramebuffer;
new(): WebGLFramebuffer;
-}
+};
interface WebGLObject {
}
@@ -12068,7 +12071,7 @@ interface WebGLObject {
declare var WebGLObject: {
prototype: WebGLObject;
new(): WebGLObject;
-}
+};
interface WebGLProgram extends WebGLObject {
}
@@ -12076,7 +12079,7 @@ interface WebGLProgram extends WebGLObject {
declare var WebGLProgram: {
prototype: WebGLProgram;
new(): WebGLProgram;
-}
+};
interface WebGLRenderbuffer extends WebGLObject {
}
@@ -12084,7 +12087,7 @@ interface WebGLRenderbuffer extends WebGLObject {
declare var WebGLRenderbuffer: {
prototype: WebGLRenderbuffer;
new(): WebGLRenderbuffer;
-}
+};
interface WebGLRenderingContext {
readonly canvas: HTMLCanvasElement;
@@ -12345,13 +12348,13 @@ interface WebGLRenderingContext {
readonly KEEP: number;
readonly LEQUAL: number;
readonly LESS: number;
+ readonly LINE_LOOP: number;
+ readonly LINE_STRIP: number;
+ readonly LINE_WIDTH: 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;
@@ -12376,9 +12379,9 @@ interface WebGLRenderingContext {
readonly NEAREST_MIPMAP_NEAREST: number;
readonly NEVER: number;
readonly NICEST: number;
+ readonly NO_ERROR: 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;
@@ -12408,18 +12411,18 @@ interface WebGLRenderingContext {
readonly REPEAT: number;
readonly REPLACE: number;
readonly RGB: number;
- readonly RGB565: number;
readonly RGB5_A1: number;
+ readonly RGB565: 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 SAMPLER_2D: number;
+ readonly SAMPLER_CUBE: number;
+ readonly SAMPLES: number;
readonly SCISSOR_BOX: number;
readonly SCISSOR_TEST: number;
readonly SHADER_TYPE: number;
@@ -12453,6 +12456,20 @@ interface WebGLRenderingContext {
readonly STREAM_DRAW: number;
readonly SUBPIXEL_BITS: number;
readonly TEXTURE: 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 TEXTURE0: number;
readonly TEXTURE1: number;
readonly TEXTURE10: number;
@@ -12485,23 +12502,9 @@ interface WebGLRenderingContext {
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 TRIANGLES: number;
readonly UNPACK_ALIGNMENT: number;
readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: number;
readonly UNPACK_FLIP_Y_WEBGL: number;
@@ -12647,13 +12650,13 @@ declare var WebGLRenderingContext: {
readonly KEEP: number;
readonly LEQUAL: number;
readonly LESS: number;
+ readonly LINE_LOOP: number;
+ readonly LINE_STRIP: number;
+ readonly LINE_WIDTH: 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;
@@ -12678,9 +12681,9 @@ declare var WebGLRenderingContext: {
readonly NEAREST_MIPMAP_NEAREST: number;
readonly NEVER: number;
readonly NICEST: number;
+ readonly NO_ERROR: 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;
@@ -12710,18 +12713,18 @@ declare var WebGLRenderingContext: {
readonly REPEAT: number;
readonly REPLACE: number;
readonly RGB: number;
- readonly RGB565: number;
readonly RGB5_A1: number;
+ readonly RGB565: 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 SAMPLER_2D: number;
+ readonly SAMPLER_CUBE: number;
+ readonly SAMPLES: number;
readonly SCISSOR_BOX: number;
readonly SCISSOR_TEST: number;
readonly SHADER_TYPE: number;
@@ -12755,6 +12758,20 @@ declare var WebGLRenderingContext: {
readonly STREAM_DRAW: number;
readonly SUBPIXEL_BITS: number;
readonly TEXTURE: 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 TEXTURE0: number;
readonly TEXTURE1: number;
readonly TEXTURE10: number;
@@ -12787,23 +12804,9 @@ declare var WebGLRenderingContext: {
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 TRIANGLES: number;
readonly UNPACK_ALIGNMENT: number;
readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: number;
readonly UNPACK_FLIP_Y_WEBGL: number;
@@ -12827,7 +12830,7 @@ declare var WebGLRenderingContext: {
readonly VERTEX_SHADER: number;
readonly VIEWPORT: number;
readonly ZERO: number;
-}
+};
interface WebGLShader extends WebGLObject {
}
@@ -12835,7 +12838,7 @@ interface WebGLShader extends WebGLObject {
declare var WebGLShader: {
prototype: WebGLShader;
new(): WebGLShader;
-}
+};
interface WebGLShaderPrecisionFormat {
readonly precision: number;
@@ -12846,7 +12849,7 @@ interface WebGLShaderPrecisionFormat {
declare var WebGLShaderPrecisionFormat: {
prototype: WebGLShaderPrecisionFormat;
new(): WebGLShaderPrecisionFormat;
-}
+};
interface WebGLTexture extends WebGLObject {
}
@@ -12854,7 +12857,7 @@ interface WebGLTexture extends WebGLObject {
declare var WebGLTexture: {
prototype: WebGLTexture;
new(): WebGLTexture;
-}
+};
interface WebGLUniformLocation {
}
@@ -12862,7 +12865,7 @@ interface WebGLUniformLocation {
declare var WebGLUniformLocation: {
prototype: WebGLUniformLocation;
new(): WebGLUniformLocation;
-}
+};
interface WebKitCSSMatrix {
a: number;
@@ -12902,7 +12905,7 @@ interface WebKitCSSMatrix {
declare var WebKitCSSMatrix: {
prototype: WebKitCSSMatrix;
new(text?: string): WebKitCSSMatrix;
-}
+};
interface WebKitDirectoryEntry extends WebKitEntry {
createReader(): WebKitDirectoryReader;
@@ -12911,7 +12914,7 @@ interface WebKitDirectoryEntry extends WebKitEntry {
declare var WebKitDirectoryEntry: {
prototype: WebKitDirectoryEntry;
new(): WebKitDirectoryEntry;
-}
+};
interface WebKitDirectoryReader {
readEntries(successCallback: WebKitEntriesCallback, errorCallback?: WebKitErrorCallback): void;
@@ -12920,7 +12923,7 @@ interface WebKitDirectoryReader {
declare var WebKitDirectoryReader: {
prototype: WebKitDirectoryReader;
new(): WebKitDirectoryReader;
-}
+};
interface WebKitEntry {
readonly filesystem: WebKitFileSystem;
@@ -12933,7 +12936,7 @@ interface WebKitEntry {
declare var WebKitEntry: {
prototype: WebKitEntry;
new(): WebKitEntry;
-}
+};
interface WebKitFileEntry extends WebKitEntry {
file(successCallback: WebKitFileCallback, errorCallback?: WebKitErrorCallback): void;
@@ -12942,7 +12945,7 @@ interface WebKitFileEntry extends WebKitEntry {
declare var WebKitFileEntry: {
prototype: WebKitFileEntry;
new(): WebKitFileEntry;
-}
+};
interface WebKitFileSystem {
readonly name: string;
@@ -12952,7 +12955,7 @@ interface WebKitFileSystem {
declare var WebKitFileSystem: {
prototype: WebKitFileSystem;
new(): WebKitFileSystem;
-}
+};
interface WebKitPoint {
x: number;
@@ -12962,8 +12965,18 @@ interface WebKitPoint {
declare var WebKitPoint: {
prototype: WebKitPoint;
new(x?: number, y?: number): WebKitPoint;
+};
+
+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 WebSocketEventMap {
"close": CloseEvent;
"error": Event;
@@ -12999,7 +13012,7 @@ declare var WebSocket: {
readonly CLOSING: number;
readonly CONNECTING: number;
readonly OPEN: number;
-}
+};
interface WheelEvent extends MouseEvent {
readonly deltaMode: number;
@@ -13022,7 +13035,7 @@ declare var WheelEvent: {
readonly DOM_DELTA_LINE: number;
readonly DOM_DELTA_PAGE: number;
readonly DOM_DELTA_PIXEL: number;
-}
+};
interface WindowEventMap extends GlobalEventHandlersEventMap {
"abort": UIEvent;
@@ -13050,6 +13063,7 @@ interface WindowEventMap extends GlobalEventHandlersEventMap {
"durationchange": Event;
"emptied": Event;
"ended": MediaStreamErrorEvent;
+ "error": ErrorEvent;
"focus": FocusEvent;
"hashchange": HashChangeEvent;
"input": Event;
@@ -13108,6 +13122,10 @@ interface WindowEventMap extends GlobalEventHandlersEventMap {
"submit": Event;
"suspend": Event;
"timeupdate": Event;
+ "touchcancel": TouchEvent;
+ "touchend": TouchEvent;
+ "touchmove": TouchEvent;
+ "touchstart": TouchEvent;
"unload": Event;
"volumechange": Event;
"waiting": Event;
@@ -13121,8 +13139,8 @@ interface Window extends EventTarget, WindowTimers, WindowSessionStorage, Window
readonly crypto: Crypto;
defaultStatus: string;
readonly devicePixelRatio: number;
- readonly doNotTrack: string;
readonly document: Document;
+ readonly doNotTrack: string;
event: Event | undefined;
readonly external: External;
readonly frameElement: Element;
@@ -13245,9 +13263,9 @@ interface Window extends EventTarget, WindowTimers, WindowSessionStorage, Window
readonly screenTop: number;
readonly screenX: number;
readonly screenY: number;
+ readonly scrollbars: BarProp;
readonly scrollX: number;
readonly scrollY: number;
- readonly scrollbars: BarProp;
readonly self: Window;
readonly speechSynthesis: SpeechSynthesis;
status: string;
@@ -13303,7 +13321,7 @@ interface Window extends EventTarget, WindowTimers, WindowSessionStorage, Window
declare var Window: {
prototype: Window;
new(): Window;
-}
+};
interface WorkerEventMap extends AbstractWorkerEventMap {
"message": MessageEvent;
@@ -13320,7 +13338,7 @@ interface Worker extends EventTarget, AbstractWorker {
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;
@@ -13330,7 +13348,7 @@ interface XMLDocument extends Document {
declare var XMLDocument: {
prototype: XMLDocument;
new(): XMLDocument;
-}
+};
interface XMLHttpRequestEventMap extends XMLHttpRequestEventTargetEventMap {
"readystatechange": Event;
@@ -13377,7 +13395,7 @@ declare var XMLHttpRequest: {
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;
@@ -13387,7 +13405,7 @@ interface XMLHttpRequestUpload extends EventTarget, XMLHttpRequestEventTarget {
declare var XMLHttpRequestUpload: {
prototype: XMLHttpRequestUpload;
new(): XMLHttpRequestUpload;
-}
+};
interface XMLSerializer {
serializeToString(target: Node): string;
@@ -13396,7 +13414,7 @@ interface XMLSerializer {
declare var XMLSerializer: {
prototype: XMLSerializer;
new(): XMLSerializer;
-}
+};
interface XPathEvaluator {
createExpression(expression: string, resolver: XPathNSResolver): XPathExpression;
@@ -13407,7 +13425,7 @@ interface XPathEvaluator {
declare var XPathEvaluator: {
prototype: XPathEvaluator;
new(): XPathEvaluator;
-}
+};
interface XPathExpression {
evaluate(contextNode: Node, type: number, result: XPathResult | null): XPathResult;
@@ -13416,7 +13434,7 @@ interface XPathExpression {
declare var XPathExpression: {
prototype: XPathExpression;
new(): XPathExpression;
-}
+};
interface XPathNSResolver {
lookupNamespaceURI(prefix: string): string;
@@ -13425,7 +13443,7 @@ interface XPathNSResolver {
declare var XPathNSResolver: {
prototype: XPathNSResolver;
new(): XPathNSResolver;
-}
+};
interface XPathResult {
readonly booleanValue: boolean;
@@ -13462,7 +13480,7 @@ declare var XPathResult: {
readonly STRING_TYPE: number;
readonly UNORDERED_NODE_ITERATOR_TYPE: number;
readonly UNORDERED_NODE_SNAPSHOT_TYPE: number;
-}
+};
interface XSLTProcessor {
clearParameters(): void;
@@ -13478,17 +13496,7 @@ interface XSLTProcessor {
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;
@@ -13525,6 +13533,81 @@ interface ChildNode {
remove(): void;
}
+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 DOML2DeprecatedColorProperty {
color: string;
}
@@ -13533,81 +13616,6 @@ 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;
@@ -13652,16 +13660,16 @@ interface GlobalFetch {
interface HTMLTableAlignment {
/**
- * Sets or retrieves a value that you can use to implement your own ch functionality for the object.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves how text and other content are vertically aligned within the object that contains them.
+ */
vAlign: string;
}
@@ -13886,38 +13894,38 @@ interface ImageBitmap {
interface URLSearchParams {
/**
- * Appends a specified key/value pair as a new search parameter.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Returns all the values association with a given search parameter.
+ */
getAll(name: string): string[];
/**
- * Returns a Boolean indicating if such a search parameter exists.
- */
+ * 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.
- */
+ * 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.
- */
+ * Constructor returning a URLSearchParams object.
+ */
new (init?: string | URLSearchParams): URLSearchParams;
-}
+};
interface NodeListOf<TNode extends Node> extends NodeList {
length: number;
@@ -14165,7 +14173,7 @@ interface ShadowRoot extends DocumentOrShadowRoot, DocumentFragment {
}
interface ShadowRootInit {
- mode: 'open'|'closed';
+ mode: "open" | "closed";
delegatesFocus?: boolean;
}
@@ -14215,68 +14223,68 @@ interface TouchEventInit extends EventModifierInit {
declare type EventListenerOrEventListenerObject = EventListener | EventListenerObject;
+interface DecodeErrorCallback {
+ (error: DOMException): void;
+}
+interface DecodeSuccessCallback {
+ (decodedData: AudioBuffer): void;
+}
interface ErrorEventHandler {
- (message: string, filename?: string, lineno?: number, colno?: number, error?:Error): void;
+ (message: string, filename?: string, lineno?: number, colno?: number, error?: Error): void;
}
-interface PositionCallback {
- (position: Position): void;
+interface ForEachCallback {
+ (keyId: any, status: MediaKeyStatus): void;
}
-interface PositionErrorCallback {
- (error: PositionError): void;
+interface FrameRequestCallback {
+ (time: number): void;
+}
+interface FunctionStringCallback {
+ (data: string): void;
+}
+interface IntersectionObserverCallback {
+ (entries: IntersectionObserverEntry[], observer: IntersectionObserver): void;
}
interface MediaQueryListListener {
(mql: MediaQueryList): void;
}
+interface MSExecAtPriorityFunctionCallback {
+ (...args: any[]): any;
+}
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 NavigatorUserMediaErrorCallback {
+ (error: MediaStreamError): void;
}
-interface DecodeErrorCallback {
- (error: DOMException): void;
+interface NavigatorUserMediaSuccessCallback {
+ (stream: MediaStream): void;
}
-interface VoidFunction {
- (): void;
+interface NotificationPermissionCallback {
+ (permission: NotificationPermission): void;
}
-interface RTCSessionDescriptionCallback {
- (sdp: RTCSessionDescription): void;
+interface PositionCallback {
+ (position: Position): void;
+}
+interface PositionErrorCallback {
+ (error: PositionError): void;
}
interface RTCPeerConnectionErrorCallback {
(error: DOMError): void;
}
+interface RTCSessionDescriptionCallback {
+ (sdp: RTCSessionDescription): 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 VoidFunction {
+ (): void;
}
interface HTMLElementTagNameMap {
"a": HTMLAnchorElement;
@@ -14364,48 +14372,27 @@ interface HTMLElementTagNameMap {
"xmp": HTMLPreElement;
}
-interface ElementTagNameMap {
- "a": HTMLAnchorElement;
+interface ElementTagNameMap extends HTMLElementTagNameMap {
"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;
@@ -14430,307 +14417,67 @@ interface ElementTagNameMap {
"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; };
+type ElementListTagNameMap = {
+ [key in keyof ElementTagNameMap]: NodeListOf<ElementTagNameMap[key]>
+};
+
+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;
@@ -14738,8 +14485,8 @@ 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 doNotTrack: string;
declare var event: Event | undefined;
declare var external: External;
declare var frameElement: Element;
@@ -14862,9 +14609,9 @@ declare var screenLeft: number;
declare var screenTop: number;
declare var screenX: number;
declare var screenY: number;
+declare var scrollbars: BarProp;
declare var scrollX: number;
declare var scrollY: number;
-declare var scrollbars: BarProp;
declare var self: Window;
declare var speechSynthesis: SpeechSynthesis;
declare var status: string;
@@ -14983,6 +14730,7 @@ type BufferSource = ArrayBuffer | ArrayBufferView;
type MouseWheelEvent = WheelEvent;
type ScrollRestoration = "auto" | "manual";
type FormDataEntryValue = string | File;
+type InsertPosition = "beforebegin" | "afterbegin" | "beforeend" | "afterend";
type AppendMode = "segments" | "sequence";
type AudioContextState = "suspended" | "running" | "closed";
type BiquadFilterType = "lowpass" | "highpass" | "bandpass" | "lowshelf" | "highshelf" | "peaking" | "notch" | "allpass";
@@ -14996,6 +14744,12 @@ type IDBCursorDirection = "next" | "nextunique" | "prev" | "prevunique";
type IDBRequestReadyState = "pending" | "done";
type IDBTransactionMode = "readonly" | "readwrite" | "versionchange";
type ListeningState = "inactive" | "active" | "disambiguation";
+type MediaDeviceKind = "audioinput" | "audiooutput" | "videoinput";
+type MediaKeyMessageType = "license-request" | "license-renewal" | "license-release" | "individualization-request";
+type MediaKeySessionType = "temporary" | "persistent-license" | "persistent-release-message";
+type MediaKeysRequirement = "required" | "optional" | "not-allowed";
+type MediaKeyStatus = "usable" | "expired" | "output-downscaled" | "output-not-allowed" | "status-pending" | "internal-error";
+type MediaStreamTrackState = "live" | "ended";
type MSCredentialType = "FIDO_2_0";
type MSIceAddrType = "os" | "stun" | "turn" | "peer-derived";
type MSIceType = "failed" | "direct" | "relay";
@@ -15003,12 +14757,6 @@ type MSStatsType = "description" | "localclientevent" | "inbound-network" | "out
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";
@@ -15020,6 +14768,14 @@ type PaymentComplete = "success" | "fail" | "";
type PaymentShippingType = "shipping" | "delivery" | "pickup";
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 RTCBundlePolicy = "balanced" | "max-compat" | "max-bundle";
type RTCDegradationPreference = "maintain-framerate" | "maintain-resolution" | "balanced";
type RTCDtlsRole = "auto" | "client" | "server";
@@ -15027,9 +14783,9 @@ 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 RTCIceGatherPolicy = "all" | "nohost" | "relay";
type RTCIceProtocol = "udp" | "tcp";
type RTCIceRole = "controlling" | "controlled";
type RTCIceTcpCandidateType = "active" | "passive" | "so";
@@ -15040,14 +14796,6 @@ type RTCSignalingState = "stable" | "have-local-offer" | "have-remote-offer" | "
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";
diff --git a/node_modules/typedoc/node_modules/typescript/lib/lib.es2015.iterable.d.ts b/node_modules/typedoc/node_modules/typescript/lib/lib.es2015.iterable.d.ts
index 1fe1a0e0c..551698607 100644
--- a/node_modules/typedoc/node_modules/typescript/lib/lib.es2015.iterable.d.ts
+++ b/node_modules/typedoc/node_modules/typescript/lib/lib.es2015.iterable.d.ts
@@ -52,17 +52,17 @@ interface Array<T> {
[Symbol.iterator](): IterableIterator<T>;
/**
- * Returns an array of key, value pairs for every entry in the array
+ * Returns an iterable of key, value pairs for every entry in the array
*/
entries(): IterableIterator<[number, T]>;
/**
- * Returns an list of keys in the array
+ * Returns an iterable of keys in the array
*/
keys(): IterableIterator<number>;
/**
- * Returns an list of values in the array
+ * Returns an iterable of values in the array
*/
values(): IterableIterator<T>;
}
@@ -86,21 +86,21 @@ interface ArrayConstructor {
}
interface ReadonlyArray<T> {
- /** Iterator */
+ /** Iterator of values in the array. */
[Symbol.iterator](): IterableIterator<T>;
/**
- * Returns an array of key, value pairs for every entry in the array
+ * Returns an iterable of key, value pairs for every entry in the array
*/
entries(): IterableIterator<[number, T]>;
/**
- * Returns an list of keys in the array
+ * Returns an iterable of keys in the array
*/
keys(): IterableIterator<number>;
/**
- * Returns an list of values in the array
+ * Returns an iterable of values in the array
*/
values(): IterableIterator<T>;
}
@@ -111,9 +111,42 @@ interface IArguments {
}
interface Map<K, V> {
+ /** Returns an iterable of entries in the map. */
[Symbol.iterator](): IterableIterator<[K, V]>;
+
+ /**
+ * Returns an iterable of key, value pairs for every entry in the map.
+ */
entries(): IterableIterator<[K, V]>;
+
+ /**
+ * Returns an iterable of keys in the map
+ */
keys(): IterableIterator<K>;
+
+ /**
+ * Returns an iterable of values in the map
+ */
+ values(): IterableIterator<V>;
+}
+
+interface ReadonlyMap<K, V> {
+ /** Returns an iterable of entries in the map. */
+ [Symbol.iterator](): IterableIterator<[K, V]>;
+
+ /**
+ * Returns an iterable of key, value pairs for every entry in the map.
+ */
+ entries(): IterableIterator<[K, V]>;
+
+ /**
+ * Returns an iterable of keys in the map
+ */
+ keys(): IterableIterator<K>;
+
+ /**
+ * Returns an iterable of values in the map
+ */
values(): IterableIterator<V>;
}
@@ -128,9 +161,40 @@ interface WeakMapConstructor {
}
interface Set<T> {
+ /** Iterates over values in the set. */
+ [Symbol.iterator](): IterableIterator<T>;
+ /**
+ * Returns an iterable of [v,v] pairs for every value `v` in the set.
+ */
+ entries(): IterableIterator<[T, T]>;
+ /**
+ * Despite its name, returns an iterable of the values in the set,
+ */
+ keys(): IterableIterator<T>;
+
+ /**
+ * Returns an iterable of values in the set.
+ */
+ values(): IterableIterator<T>;
+}
+
+interface ReadonlySet<T> {
+ /** Iterates over values in the set. */
[Symbol.iterator](): IterableIterator<T>;
+
+ /**
+ * Returns an iterable of [v,v] pairs for every value `v` in the set.
+ */
entries(): IterableIterator<[T, T]>;
+
+ /**
+ * Despite its name, returns an iterable of the values in the set,
+ */
keys(): IterableIterator<T>;
+
+ /**
+ * Returns an iterable of values in the set.
+ */
values(): IterableIterator<T>;
}
diff --git a/node_modules/typedoc/node_modules/typescript/lib/lib.es2015.proxy.d.ts b/node_modules/typedoc/node_modules/typescript/lib/lib.es2015.proxy.d.ts
index 29b12d91e..440897038 100644
--- a/node_modules/typedoc/node_modules/typescript/lib/lib.es2015.proxy.d.ts
+++ b/node_modules/typedoc/node_modules/typescript/lib/lib.es2015.proxy.d.ts
@@ -23,7 +23,7 @@ interface ProxyHandler<T extends object> {
setPrototypeOf? (target: T, v: any): boolean;
isExtensible? (target: T): boolean;
preventExtensions? (target: T): boolean;
- getOwnPropertyDescriptor? (target: T, p: PropertyKey): PropertyDescriptor;
+ getOwnPropertyDescriptor? (target: T, p: PropertyKey): PropertyDescriptor | undefined;
has? (target: T, p: PropertyKey): boolean;
get? (target: T, p: PropertyKey, receiver: any): any;
set? (target: T, p: PropertyKey, value: any, receiver: any): boolean;
diff --git a/node_modules/typedoc/node_modules/typescript/lib/lib.es2016.full.d.ts b/node_modules/typedoc/node_modules/typescript/lib/lib.es2016.full.d.ts
index 737357fef..09220599d 100644
--- a/node_modules/typedoc/node_modules/typescript/lib/lib.es2016.full.d.ts
+++ b/node_modules/typedoc/node_modules/typescript/lib/lib.es2016.full.d.ts
@@ -23,15 +23,15 @@ and limitations under the License.
/////////////////////////////
-/// IE DOM APIs
+/// DOM APIs
/////////////////////////////
interface Account {
- rpDisplayName?: string;
displayName?: string;
id?: string;
- name?: string;
imageURL?: string;
+ name?: string;
+ rpDisplayName?: string;
}
interface Algorithm {
@@ -44,32 +44,32 @@ interface AnimationEventInit extends EventInit {
}
interface AssertionOptions {
- timeoutSeconds?: number;
- rpId?: USVString;
allowList?: ScopedCredentialDescriptor[];
extensions?: WebAuthnExtensions;
+ rpId?: USVString;
+ timeoutSeconds?: number;
}
interface CacheQueryOptions {
- ignoreSearch?: boolean;
+ cacheName?: string;
ignoreMethod?: boolean;
+ ignoreSearch?: boolean;
ignoreVary?: boolean;
- cacheName?: string;
}
interface ClientData {
challenge?: string;
+ extensions?: WebAuthnExtensions;
+ hashAlg?: string | Algorithm;
origin?: string;
rpId?: string;
- hashAlg?: string | Algorithm;
tokenBinding?: string;
- extensions?: WebAuthnExtensions;
}
interface CloseEventInit extends EventInit {
- wasClean?: boolean;
code?: number;
reason?: string;
+ wasClean?: boolean;
}
interface CompositionEventInit extends UIEventInit {
@@ -109,13 +109,6 @@ interface CustomEventInit extends EventInit {
detail?: any;
}
-interface DOMRectInit {
- x?: any;
- y?: any;
- width?: any;
- height?: any;
-}
-
interface DeviceAccelerationDict {
x?: number;
y?: number;
@@ -129,15 +122,15 @@ interface DeviceLightEventInit extends EventInit {
interface DeviceMotionEventInit extends EventInit {
acceleration?: DeviceAccelerationDict;
accelerationIncludingGravity?: DeviceAccelerationDict;
- rotationRate?: DeviceRotationRateDict;
interval?: number;
+ rotationRate?: DeviceRotationRateDict;
}
interface DeviceOrientationEventInit extends EventInit {
+ absolute?: boolean;
alpha?: number;
beta?: number;
gamma?: number;
- absolute?: boolean;
}
interface DeviceRotationRateDict {
@@ -146,17 +139,24 @@ interface DeviceRotationRateDict {
gamma?: number;
}
+interface DOMRectInit {
+ height?: any;
+ width?: any;
+ x?: any;
+ y?: any;
+}
+
interface DoubleRange {
max?: number;
min?: number;
}
interface ErrorEventInit extends EventInit {
- message?: string;
- filename?: string;
- lineno?: number;
colno?: number;
error?: any;
+ filename?: string;
+ lineno?: number;
+ message?: string;
}
interface EventInit {
@@ -166,9 +166,8 @@ interface EventInit {
}
interface EventModifierInit extends UIEventInit {
- ctrlKey?: boolean;
- shiftKey?: boolean;
altKey?: boolean;
+ ctrlKey?: boolean;
metaKey?: boolean;
modifierAltGraph?: boolean;
modifierCapsLock?: boolean;
@@ -181,6 +180,7 @@ interface EventModifierInit extends UIEventInit {
modifierSuper?: boolean;
modifierSymbol?: boolean;
modifierSymbolLock?: boolean;
+ shiftKey?: boolean;
}
interface ExceptionInformation {
@@ -193,17 +193,17 @@ interface FocusEventInit extends UIEventInit {
interface FocusNavigationEventInit extends EventInit {
navigationReason?: string;
+ originHeight?: number;
originLeft?: number;
originTop?: number;
originWidth?: number;
- originHeight?: number;
}
interface FocusNavigationOrigin {
+ originHeight?: number;
originLeft?: number;
originTop?: number;
originWidth?: number;
- originHeight?: number;
}
interface GamepadEventInit extends EventInit {
@@ -230,11 +230,11 @@ interface IDBObjectStoreParameters {
}
interface IntersectionObserverEntryInit {
- time?: number;
- rootBounds?: DOMRectInit;
boundingClientRect?: DOMRectInit;
intersectionRect?: DOMRectInit;
+ rootBounds?: DOMRectInit;
target?: Element;
+ time?: number;
}
interface IntersectionObserverInit {
@@ -259,39 +259,153 @@ interface LongRange {
min?: number;
}
+interface MediaEncryptedEventInit extends EventInit {
+ initData?: ArrayBuffer;
+ initDataType?: string;
+}
+
+interface MediaKeyMessageEventInit extends EventInit {
+ message?: ArrayBuffer;
+ messageType?: MediaKeyMessageType;
+}
+
+interface MediaKeySystemConfiguration {
+ audioCapabilities?: MediaKeySystemMediaCapability[];
+ distinctiveIdentifier?: MediaKeysRequirement;
+ initDataTypes?: string[];
+ persistentState?: MediaKeysRequirement;
+ videoCapabilities?: MediaKeySystemMediaCapability[];
+}
+
+interface MediaKeySystemMediaCapability {
+ contentType?: string;
+ robustness?: string;
+}
+
+interface MediaStreamConstraints {
+ audio?: boolean | MediaTrackConstraints;
+ video?: boolean | MediaTrackConstraints;
+}
+
+interface MediaStreamErrorEventInit extends EventInit {
+ error?: MediaStreamError;
+}
+
+interface MediaStreamEventInit extends EventInit {
+ stream?: MediaStream;
+}
+
+interface MediaStreamTrackEventInit extends EventInit {
+ track?: MediaStreamTrack;
+}
+
+interface MediaTrackCapabilities {
+ aspectRatio?: number | DoubleRange;
+ deviceId?: string;
+ echoCancellation?: boolean[];
+ facingMode?: string;
+ frameRate?: number | DoubleRange;
+ groupId?: string;
+ height?: number | LongRange;
+ sampleRate?: number | LongRange;
+ sampleSize?: number | LongRange;
+ volume?: number | DoubleRange;
+ width?: number | LongRange;
+}
+
+interface MediaTrackConstraints extends MediaTrackConstraintSet {
+ advanced?: MediaTrackConstraintSet[];
+}
+
+interface MediaTrackConstraintSet {
+ aspectRatio?: number | ConstrainDoubleRange;
+ deviceId?: string | string[] | ConstrainDOMStringParameters;
+ echoCancelation?: boolean | ConstrainBooleanParameters;
+ facingMode?: string | string[] | ConstrainDOMStringParameters;
+ frameRate?: number | ConstrainDoubleRange;
+ groupId?: string | string[] | ConstrainDOMStringParameters;
+ height?: number | ConstrainLongRange;
+ sampleRate?: number | ConstrainLongRange;
+ sampleSize?: number | ConstrainLongRange;
+ volume?: number | ConstrainDoubleRange;
+ width?: number | ConstrainLongRange;
+}
+
+interface MediaTrackSettings {
+ aspectRatio?: number;
+ deviceId?: string;
+ echoCancellation?: boolean;
+ facingMode?: string;
+ frameRate?: number;
+ groupId?: string;
+ height?: number;
+ sampleRate?: number;
+ sampleSize?: number;
+ volume?: number;
+ width?: number;
+}
+
+interface MediaTrackSupportedConstraints {
+ aspectRatio?: boolean;
+ deviceId?: boolean;
+ echoCancellation?: boolean;
+ facingMode?: boolean;
+ frameRate?: boolean;
+ groupId?: boolean;
+ height?: boolean;
+ sampleRate?: boolean;
+ sampleSize?: boolean;
+ volume?: boolean;
+ width?: boolean;
+}
+
+interface MessageEventInit extends EventInit {
+ lastEventId?: string;
+ channel?: string;
+ data?: any;
+ origin?: string;
+ ports?: MessagePort[];
+ source?: Window;
+}
+
+interface MouseEventInit extends EventModifierInit {
+ button?: number;
+ buttons?: number;
+ clientX?: number;
+ clientY?: number;
+ relatedTarget?: EventTarget;
+ screenX?: number;
+ screenY?: number;
+}
+
interface MSAccountInfo {
+ accountImageUri?: string;
+ accountName?: string;
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;
+ deviceClippingEventRatio?: number;
+ deviceEchoEventRatio?: number;
deviceGlitchesEventRatio?: number;
+ deviceHalfDuplexAECEventRatio?: number;
+ deviceHowlingEventCount?: number;
deviceLowSNREventRatio?: number;
deviceLowSpeechLevelEventRatio?: number;
- deviceClippingEventRatio?: number;
- deviceEchoEventRatio?: number;
+ deviceMultipleEndpointsEventCount?: number;
deviceNearEndToEchoRatioEventRatio?: number;
- deviceRenderZeroVolumeEventRatio?: number;
deviceRenderMuteEventRatio?: number;
- deviceMultipleEndpointsEventCount?: number;
- deviceHowlingEventCount?: number;
+ deviceRenderNotFunctioningEventRatio?: number;
+ deviceRenderZeroVolumeEventRatio?: number;
+ networkDelayEventRatio?: number;
+ networkSendQualityEventRatio?: number;
}
interface MSAudioRecvPayload extends MSPayloadBase {
- samplingRate?: number;
- signal?: MSAudioRecvSignal;
- packetReorderRatio?: number;
- packetReorderDepthAvg?: number;
- packetReorderDepthMax?: number;
burstLossLength1?: number;
burstLossLength2?: number;
burstLossLength3?: number;
@@ -303,31 +417,36 @@ interface MSAudioRecvPayload extends MSPayloadBase {
fecRecvDistance1?: number;
fecRecvDistance2?: number;
fecRecvDistance3?: number;
+ packetReorderDepthAvg?: number;
+ packetReorderDepthMax?: number;
+ packetReorderRatio?: number;
+ ratioCompressedSamplesAvg?: number;
ratioConcealedSamplesAvg?: number;
ratioStretchedSamplesAvg?: number;
- ratioCompressedSamplesAvg?: number;
+ samplingRate?: number;
+ signal?: MSAudioRecvSignal;
}
interface MSAudioRecvSignal {
initialSignalLevelRMS?: number;
- recvSignalLevelCh1?: number;
recvNoiseLevelCh1?: number;
- renderSignalLevel?: number;
- renderNoiseLevel?: number;
+ recvSignalLevelCh1?: number;
renderLoopbackSignalLevel?: number;
+ renderNoiseLevel?: number;
+ renderSignalLevel?: number;
}
interface MSAudioSendPayload extends MSPayloadBase {
- samplingRate?: number;
- signal?: MSAudioSendSignal;
audioFECUsed?: boolean;
+ samplingRate?: number;
sendMutePercent?: number;
+ signal?: MSAudioSendSignal;
}
interface MSAudioSendSignal {
noiseLevel?: number;
- sendSignalLevelCh1?: number;
sendNoiseLevelCh1?: number;
+ sendSignalLevelCh1?: number;
}
interface MSConnectivity {
@@ -345,8 +464,8 @@ interface MSCredentialParameters {
}
interface MSCredentialSpec {
- type?: MSCredentialType;
id?: string;
+ type?: MSCredentialType;
}
interface MSDelay {
@@ -356,12 +475,12 @@ interface MSDelay {
interface MSDescription extends RTCStats {
connectivity?: MSConnectivity;
- transport?: RTCIceProtocol;
- networkconnectivity?: MSNetworkConnectivityInfo;
- localAddr?: MSIPAddressInfo;
- remoteAddr?: MSIPAddressInfo;
deviceDevName?: string;
+ localAddr?: MSIPAddressInfo;
+ networkconnectivity?: MSNetworkConnectivityInfo;
reflexiveLocalIPAddr?: MSIPAddressInfo;
+ remoteAddr?: MSIPAddressInfo;
+ transport?: RTCIceProtocol;
}
interface MSFIDOCredentialParameters extends MSCredentialParameters {
@@ -369,35 +488,35 @@ interface MSFIDOCredentialParameters extends MSCredentialParameters {
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;
+ alternateServerReceived?: boolean;
+ connCheckMessageIntegrityFailed?: boolean;
connCheckOtherError?: boolean;
- turnAuthUnknownUsernameError?: boolean;
- noRelayServersConfigured?: boolean;
+ fipsAllocationFailure?: boolean;
multipleRelayServersAttempted?: boolean;
+ noRelayServersConfigured?: boolean;
portRangeExhausted?: boolean;
- alternateServerReceived?: boolean;
pseudoTLSFailure?: boolean;
+ tcpNatConnectivityFailed?: boolean;
+ tcpRelayConnectivityFailed?: boolean;
+ turnAuthUnknownUsernameError?: boolean;
+ turnTcpAllocateFailed?: boolean;
+ turnTcpSendFailed?: boolean;
+ turnTcpTimedOut?: boolean;
turnTurnTcpConnectivityFailed?: boolean;
+ turnUdpAllocateFailed?: boolean;
+ turnUdpSendFailed?: boolean;
+ udpLocalConnectivityFailed?: boolean;
+ udpNatConnectivityFailed?: boolean;
+ udpRelayConnectivityFailed?: boolean;
useCandidateChecksFailed?: boolean;
- fipsAllocationFailure?: boolean;
+}
+
+interface MSIPAddressInfo {
+ ipAddr?: string;
+ manufacturerMacAddrMask?: string;
+ port?: number;
}
interface MSJitter {
@@ -407,28 +526,28 @@ interface MSJitter {
}
interface MSLocalClientEventBase extends RTCStats {
- networkReceiveQualityEventRatio?: number;
networkBandwidthLowEventRatio?: number;
+ networkReceiveQualityEventRatio?: number;
}
interface MSNetwork extends RTCStats {
- jitter?: MSJitter;
delay?: MSDelay;
+ jitter?: MSJitter;
packetLoss?: MSPacketLoss;
utilization?: MSUtilization;
}
interface MSNetworkConnectivityInfo {
- vpn?: boolean;
linkspeed?: number;
networkConnectionDetails?: string;
+ vpn?: boolean;
}
interface MSNetworkInterfaceType {
interfaceTypeEthernet?: boolean;
- interfaceTypeWireless?: boolean;
interfaceTypePPP?: boolean;
interfaceTypeTunnel?: boolean;
+ interfaceTypeWireless?: boolean;
interfaceTypeWWAN?: boolean;
}
@@ -446,13 +565,13 @@ interface MSPayloadBase extends RTCStats {
}
interface MSPortRange {
- min?: number;
max?: number;
+ min?: number;
}
interface MSRelayAddress {
- relayAddress?: string;
port?: number;
+ relayAddress?: string;
}
interface MSSignatureParameters {
@@ -460,241 +579,122 @@ interface MSSignatureParameters {
}
interface MSTransportDiagnosticsStats extends RTCStats {
+ allocationTimeInMs?: number;
baseAddress?: string;
+ baseInterface?: MSNetworkInterfaceType;
+ iceRole?: RTCIceRole;
+ iceWarningFlags?: MSIceWarningFlags;
+ interfaces?: MSNetworkInterfaceType;
localAddress?: string;
- localSite?: string;
- networkName?: string;
- remoteAddress?: string;
- remoteSite?: string;
+ localAddrType?: MSIceAddrType;
+ localInterface?: MSNetworkInterfaceType;
localMR?: string;
- remoteMR?: string;
- iceWarningFlags?: MSIceWarningFlags;
- portRangeMin?: number;
- portRangeMax?: number;
localMRTCPPort?: number;
- remoteMRTCPPort?: number;
- stunVer?: number;
- numConsentReqSent?: number;
+ localSite?: string;
+ msRtcEngineVersion?: string;
+ networkName?: string;
numConsentReqReceived?: number;
- numConsentRespSent?: number;
+ numConsentReqSent?: number;
numConsentRespReceived?: number;
- interfaces?: MSNetworkInterfaceType;
- baseInterface?: MSNetworkInterfaceType;
+ numConsentRespSent?: number;
+ portRangeMax?: number;
+ portRangeMin?: number;
protocol?: RTCIceProtocol;
- localInterface?: MSNetworkInterfaceType;
- localAddrType?: MSIceAddrType;
+ remoteAddress?: string;
remoteAddrType?: MSIceAddrType;
- iceRole?: RTCIceRole;
+ remoteMR?: string;
+ remoteMRTCPPort?: number;
+ remoteSite?: string;
rtpRtcpMux?: boolean;
- allocationTimeInMs?: number;
- msRtcEngineVersion?: string;
+ stunVer?: number;
}
interface MSUtilization {
- packets?: number;
bandwidthEstimation?: number;
- bandwidthEstimationMin?: number;
+ bandwidthEstimationAvg?: number;
bandwidthEstimationMax?: number;
+ bandwidthEstimationMin?: number;
bandwidthEstimationStdDev?: number;
- bandwidthEstimationAvg?: number;
+ packets?: number;
}
interface MSVideoPayload extends MSPayloadBase {
+ durationSeconds?: number;
resolution?: string;
videoBitRateAvg?: number;
videoBitRateMax?: number;
videoFrameRateAvg?: number;
videoPacketLossRate?: number;
- durationSeconds?: number;
}
interface MSVideoRecvPayload extends MSVideoPayload {
- videoFrameLossRate?: number;
+ lowBitRateCallPercent?: number;
+ lowFrameRateCallPercent?: number;
+ recvBitRateAverage?: number;
+ recvBitRateMaximum?: number;
recvCodecType?: string;
- recvResolutionWidth?: number;
- recvResolutionHeight?: number;
- videoResolutions?: MSVideoResolutionDistribution;
+ recvFpsHarmonicAverage?: number;
recvFrameRateAverage?: number;
- recvBitRateMaximum?: number;
- recvBitRateAverage?: number;
+ recvNumResSwitches?: number;
+ recvReorderBufferMaxSuccessfullyOrderedExtent?: number;
+ recvReorderBufferMaxSuccessfullyOrderedLateTime?: number;
+ recvReorderBufferPacketsDroppedDueToBufferExhaustion?: number;
+ recvReorderBufferPacketsDroppedDueToTimeout?: number;
+ recvReorderBufferReorderedPackets?: number;
+ recvResolutionHeight?: number;
+ recvResolutionWidth?: 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;
+ videoFrameLossRate?: number;
+ videoPostFECPLR?: number;
+ videoResolutions?: MSVideoResolutionDistribution;
}
interface MSVideoResolutionDistribution {
cifQuality?: number;
- vgaQuality?: number;
- h720Quality?: number;
h1080Quality?: number;
h1440Quality?: number;
h2160Quality?: number;
+ h720Quality?: number;
+ vgaQuality?: number;
}
interface MSVideoSendPayload extends MSVideoPayload {
- sendFrameRateAverage?: number;
- sendBitRateMaximum?: number;
sendBitRateAverage?: number;
- sendVideoStreamsMax?: number;
- sendResolutionWidth?: number;
+ sendBitRateMaximum?: number;
+ sendFrameRateAverage?: 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;
+ sendResolutionWidth?: number;
+ sendVideoStreamsMax?: number;
}
interface MsZoomToOptions {
+ animate?: string;
contentX?: number;
contentY?: number;
+ scaleFactor?: number;
viewportX?: string;
viewportY?: string;
- scaleFactor?: number;
- animate?: string;
}
interface MutationObserverInit {
- childList?: boolean;
+ attributeFilter?: string[];
+ attributeOldValue?: boolean;
attributes?: boolean;
characterData?: boolean;
- subtree?: boolean;
- attributeOldValue?: boolean;
characterDataOldValue?: boolean;
- attributeFilter?: string[];
+ childList?: boolean;
+ subtree?: boolean;
}
interface NotificationOptions {
+ body?: string;
dir?: NotificationDirection;
+ icon?: string;
lang?: string;
- body?: string;
tag?: string;
- icon?: string;
}
interface ObjectURLOptions {
@@ -703,39 +703,39 @@ interface ObjectURLOptions {
interface PaymentCurrencyAmount {
currency?: string;
- value?: string;
currencySystem?: string;
+ value?: string;
}
interface PaymentDetails {
- total?: PaymentItem;
displayItems?: PaymentItem[];
- shippingOptions?: PaymentShippingOption[];
- modifiers?: PaymentDetailsModifier[];
error?: string;
+ modifiers?: PaymentDetailsModifier[];
+ shippingOptions?: PaymentShippingOption[];
+ total?: PaymentItem;
}
interface PaymentDetailsModifier {
- supportedMethods?: string[];
- total?: PaymentItem;
additionalDisplayItems?: PaymentItem[];
data?: any;
+ supportedMethods?: string[];
+ total?: PaymentItem;
}
interface PaymentItem {
- label?: string;
amount?: PaymentCurrencyAmount;
+ label?: string;
pending?: boolean;
}
interface PaymentMethodData {
- supportedMethods?: string[];
data?: any;
+ supportedMethods?: string[];
}
interface PaymentOptions {
- requestPayerName?: boolean;
requestPayerEmail?: boolean;
+ requestPayerName?: boolean;
requestPayerPhone?: boolean;
requestShipping?: boolean;
shippingType?: string;
@@ -745,9 +745,9 @@ interface PaymentRequestUpdateEventInit extends EventInit {
}
interface PaymentShippingOption {
+ amount?: PaymentCurrencyAmount;
id?: string;
label?: string;
- amount?: PaymentCurrencyAmount;
selected?: boolean;
}
@@ -756,14 +756,14 @@ interface PeriodicWaveConstraints {
}
interface PointerEventInit extends MouseEventInit {
- pointerId?: number;
- width?: number;
height?: number;
+ isPrimary?: boolean;
+ pointerId?: number;
+ pointerType?: string;
pressure?: number;
tiltX?: number;
tiltY?: number;
- pointerType?: string;
- isPrimary?: boolean;
+ width?: number;
}
interface PopStateEventInit extends EventInit {
@@ -772,8 +772,8 @@ interface PopStateEventInit extends EventInit {
interface PositionOptions {
enableHighAccuracy?: boolean;
- timeout?: number;
maximumAge?: number;
+ timeout?: number;
}
interface ProgressEventInit extends EventInit {
@@ -783,38 +783,63 @@ interface ProgressEventInit extends EventInit {
}
interface PushSubscriptionOptionsInit {
- userVisibleOnly?: boolean;
applicationServerKey?: any;
+ userVisibleOnly?: boolean;
+}
+
+interface RegistrationOptions {
+ scope?: string;
+}
+
+interface RequestInit {
+ body?: any;
+ cache?: RequestCache;
+ credentials?: RequestCredentials;
+ headers?: any;
+ integrity?: string;
+ keepalive?: boolean;
+ method?: string;
+ mode?: RequestMode;
+ redirect?: RequestRedirect;
+ referrer?: string;
+ referrerPolicy?: ReferrerPolicy;
+ window?: any;
+}
+
+interface ResponseInit {
+ headers?: any;
+ status?: number;
+ statusText?: string;
}
interface RTCConfiguration {
+ bundlePolicy?: RTCBundlePolicy;
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[];
+ role?: RTCDtlsRole;
+}
+
+interface RTCDTMFToneChangeEventInit extends EventInit {
+ tone?: string;
}
interface RTCIceCandidateAttributes extends RTCStats {
+ addressSourceUrl?: string;
+ candidateType?: RTCStatsIceCandidateType;
ipAddress?: string;
portNumber?: number;
- transport?: string;
- candidateType?: RTCStatsIceCandidateType;
priority?: number;
- addressSourceUrl?: string;
+ transport?: string;
}
interface RTCIceCandidateComplete {
@@ -822,15 +847,15 @@ interface RTCIceCandidateComplete {
interface RTCIceCandidateDictionary {
foundation?: string;
- priority?: number;
ip?: string;
- protocol?: RTCIceProtocol;
+ msMTurnSessionId?: string;
port?: number;
- type?: RTCIceCandidateType;
- tcpType?: RTCIceTcpCandidateType;
+ priority?: number;
+ protocol?: RTCIceProtocol;
relatedAddress?: string;
relatedPort?: number;
- msMTurnSessionId?: string;
+ tcpType?: RTCIceTcpCandidateType;
+ type?: RTCIceCandidateType;
}
interface RTCIceCandidateInit {
@@ -845,19 +870,19 @@ interface RTCIceCandidatePair {
}
interface RTCIceCandidatePairStats extends RTCStats {
- transportId?: string;
+ availableIncomingBitrate?: number;
+ availableOutgoingBitrate?: number;
+ bytesReceived?: number;
+ bytesSent?: number;
localCandidateId?: string;
- remoteCandidateId?: string;
- state?: RTCStatsIceCandidatePairState;
- priority?: number;
nominated?: boolean;
- writable?: boolean;
+ priority?: number;
readable?: boolean;
- bytesSent?: number;
- bytesReceived?: number;
+ remoteCandidateId?: string;
roundTripTime?: number;
- availableOutgoingBitrate?: number;
- availableIncomingBitrate?: number;
+ state?: RTCStatsIceCandidatePairState;
+ transportId?: string;
+ writable?: boolean;
}
interface RTCIceGatherOptions {
@@ -867,285 +892,260 @@ interface RTCIceGatherOptions {
}
interface RTCIceParameters {
- usernameFragment?: string;
- password?: string;
iceLite?: boolean;
+ password?: string;
+ usernameFragment?: string;
}
interface RTCIceServer {
+ credential?: string;
urls?: any;
username?: string;
- credential?: string;
}
interface RTCInboundRTPStreamStats extends RTCRTPStreamStats {
- packetsReceived?: number;
bytesReceived?: number;
- packetsLost?: number;
- jitter?: number;
fractionLost?: number;
+ jitter?: number;
+ packetsLost?: number;
+ packetsReceived?: 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;
+ frameHeight?: number;
+ framesCorrupted?: number;
+ framesDecoded?: number;
+ framesDropped?: number;
+ framesPerSecond?: number;
+ framesReceived?: number;
+ framesSent?: number;
+ frameWidth?: number;
+ remoteSource?: boolean;
+ ssrcIds?: string[];
+ trackIdentifier?: string;
}
interface RTCOfferOptions {
- offerToReceiveVideo?: number;
+ iceRestart?: boolean;
offerToReceiveAudio?: number;
+ offerToReceiveVideo?: number;
voiceActivityDetection?: boolean;
- iceRestart?: boolean;
}
interface RTCOutboundRTPStreamStats extends RTCRTPStreamStats {
- packetsSent?: number;
bytesSent?: number;
- targetBitrate?: number;
+ packetsSent?: number;
roundTripTime?: number;
+ targetBitrate?: 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;
+ type?: string;
}
interface RTCRtcpParameters {
- ssrc?: number;
cname?: string;
- reducedSize?: boolean;
mux?: boolean;
+ reducedSize?: boolean;
+ ssrc?: number;
}
interface RTCRtpCapabilities {
codecs?: RTCRtpCodecCapability[];
- headerExtensions?: RTCRtpHeaderExtension[];
fecMechanisms?: string[];
+ headerExtensions?: RTCRtpHeaderExtension[];
}
interface RTCRtpCodecCapability {
- name?: string;
- kind?: string;
clockRate?: number;
- preferredPayloadType?: number;
+ kind?: string;
maxptime?: number;
- ptime?: number;
+ maxSpatialLayers?: number;
+ maxTemporalLayers?: number;
+ name?: string;
numChannels?: number;
- rtcpFeedback?: RTCRtcpFeedback[];
- parameters?: any;
options?: any;
- maxTemporalLayers?: number;
- maxSpatialLayers?: number;
+ parameters?: any;
+ preferredPayloadType?: number;
+ ptime?: number;
+ rtcpFeedback?: RTCRtcpFeedback[];
svcMultiStreamSupport?: boolean;
}
interface RTCRtpCodecParameters {
- name?: string;
- payloadType?: any;
clockRate?: number;
maxptime?: number;
- ptime?: number;
+ name?: string;
numChannels?: number;
- rtcpFeedback?: RTCRtcpFeedback[];
parameters?: any;
+ payloadType?: any;
+ ptime?: number;
+ rtcpFeedback?: RTCRtcpFeedback[];
}
interface RTCRtpContributingSource {
- timestamp?: number;
- csrc?: number;
audioLevel?: number;
+ csrc?: number;
+ timestamp?: number;
}
interface RTCRtpEncodingParameters {
- ssrc?: number;
+ active?: boolean;
codecPayloadType?: number;
+ dependencyEncodingIds?: string[];
+ encodingId?: string;
fec?: RTCRtpFecParameters;
- rtx?: RTCRtpRtxParameters;
- priority?: number;
+ framerateScale?: number;
maxBitrate?: number;
+ maxFramerate?: number;
minQuality?: number;
+ priority?: number;
resolutionScale?: number;
- framerateScale?: number;
- maxFramerate?: number;
- active?: boolean;
- encodingId?: string;
- dependencyEncodingIds?: string[];
+ rtx?: RTCRtpRtxParameters;
+ ssrc?: number;
ssrcRange?: RTCSsrcRange;
}
interface RTCRtpFecParameters {
- ssrc?: number;
mechanism?: string;
+ ssrc?: number;
}
interface RTCRtpHeaderExtension {
kind?: string;
- uri?: string;
- preferredId?: number;
preferredEncrypt?: boolean;
+ preferredId?: number;
+ uri?: string;
}
interface RTCRtpHeaderExtensionParameters {
- uri?: string;
- id?: number;
encrypt?: boolean;
+ id?: number;
+ uri?: string;
}
interface RTCRtpParameters {
- muxId?: string;
codecs?: RTCRtpCodecParameters[];
- headerExtensions?: RTCRtpHeaderExtensionParameters[];
+ degradationPreference?: RTCDegradationPreference;
encodings?: RTCRtpEncodingParameters[];
+ headerExtensions?: RTCRtpHeaderExtensionParameters[];
+ muxId?: string;
rtcp?: RTCRtcpParameters;
- degradationPreference?: RTCDegradationPreference;
}
interface RTCRtpRtxParameters {
ssrc?: number;
}
+interface RTCRTPStreamStats extends RTCStats {
+ associateStatsId?: string;
+ codecId?: string;
+ firCount?: number;
+ isRemote?: boolean;
+ mediaTrackId?: string;
+ nackCount?: number;
+ pliCount?: number;
+ sliCount?: number;
+ ssrc?: string;
+ transportId?: string;
+}
+
interface RTCRtpUnhandled {
- ssrc?: number;
- payloadType?: number;
muxId?: string;
+ payloadType?: number;
+ ssrc?: number;
}
interface RTCSessionDescriptionInit {
- type?: RTCSdpType;
sdp?: string;
+ type?: RTCSdpType;
}
interface RTCSrtpKeyParam {
keyMethod?: string;
keySalt?: string;
lifetime?: string;
- mkiValue?: number;
mkiLength?: number;
+ mkiValue?: number;
}
interface RTCSrtpSdesParameters {
- tag?: number;
cryptoSuite?: string;
keyParams?: RTCSrtpKeyParam[];
sessionParams?: string[];
+ tag?: number;
}
interface RTCSsrcRange {
- min?: number;
max?: number;
+ min?: number;
}
interface RTCStats {
- timestamp?: number;
- type?: RTCStatsType;
id?: string;
msType?: MSStatsType;
+ timestamp?: number;
+ type?: RTCStatsType;
}
interface RTCStatsReport {
}
interface RTCTransportStats extends RTCStats {
- bytesSent?: number;
- bytesReceived?: number;
- rtcpTransportStatsId?: string;
activeConnection?: boolean;
- selectedCandidatePairId?: string;
+ bytesReceived?: number;
+ bytesSent?: number;
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;
+ rtcpTransportStatsId?: string;
+ selectedCandidatePairId?: string;
}
interface ScopedCredentialDescriptor {
- type?: ScopedCredentialType;
id?: any;
transports?: Transport[];
+ type?: ScopedCredentialType;
}
interface ScopedCredentialOptions {
- timeoutSeconds?: number;
- rpId?: USVString;
excludeList?: ScopedCredentialDescriptor[];
extensions?: WebAuthnExtensions;
+ rpId?: USVString;
+ timeoutSeconds?: number;
}
interface ScopedCredentialParameters {
- type?: ScopedCredentialType;
algorithm?: string | Algorithm;
+ type?: ScopedCredentialType;
}
interface ServiceWorkerMessageEventInit extends EventInit {
data?: any;
- origin?: string;
lastEventId?: string;
- source?: ServiceWorker | MessagePort;
+ origin?: string;
ports?: MessagePort[];
+ source?: ServiceWorker | MessagePort;
}
interface SpeechSynthesisEventInit extends EventInit {
- utterance?: SpeechSynthesisUtterance;
charIndex?: number;
elapsedTime?: number;
name?: string;
+ utterance?: SpeechSynthesisUtterance;
}
interface StoreExceptionsInformation extends ExceptionInformation {
- siteName?: string;
- explanationString?: string;
detailURI?: string;
+ explanationString?: string;
+ siteName?: string;
}
interface StoreSiteSpecificExceptionsInformation extends StoreExceptionsInformation {
@@ -1157,13 +1157,13 @@ interface TrackEventInit extends EventInit {
}
interface TransitionEventInit extends EventInit {
- propertyName?: string;
elapsedTime?: number;
+ propertyName?: string;
}
interface UIEventInit extends EventInit {
- view?: Window;
detail?: number;
+ view?: Window;
}
interface WebAuthnExtensions {
@@ -1172,11 +1172,11 @@ interface WebAuthnExtensions {
interface WebGLContextAttributes {
failIfMajorPerformanceCaveat?: boolean;
alpha?: boolean;
- depth?: boolean;
- stencil?: boolean;
antialias?: boolean;
+ depth?: boolean;
premultipliedAlpha?: boolean;
preserveDrawingBuffer?: boolean;
+ stencil?: boolean;
}
interface WebGLContextEventInit extends EventInit {
@@ -1184,10 +1184,10 @@ interface WebGLContextEventInit extends EventInit {
}
interface WheelEventInit extends MouseEventInit {
+ deltaMode?: number;
deltaX?: number;
deltaY?: number;
deltaZ?: number;
- deltaMode?: number;
}
interface EventListener {
@@ -1206,19 +1206,6 @@ 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;
@@ -1234,8 +1221,21 @@ interface AnalyserNode extends AudioNode {
declare var AnalyserNode: {
prototype: AnalyserNode;
new(): AnalyserNode;
+};
+
+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 AnimationEvent extends Event {
readonly animationName: string;
readonly elapsedTime: number;
@@ -1245,7 +1245,7 @@ interface AnimationEvent extends Event {
declare var AnimationEvent: {
prototype: AnimationEvent;
new(typeArg: string, eventInitDict?: AnimationEventInit): AnimationEvent;
-}
+};
interface ApplicationCacheEventMap {
"cached": Event;
@@ -1290,7 +1290,7 @@ declare var ApplicationCache: {
readonly OBSOLETE: number;
readonly UNCACHED: number;
readonly UPDATEREADY: number;
-}
+};
interface Attr extends Node {
readonly name: string;
@@ -1303,7 +1303,7 @@ interface Attr extends Node {
declare var Attr: {
prototype: Attr;
new(): Attr;
-}
+};
interface AudioBuffer {
readonly duration: number;
@@ -1318,7 +1318,7 @@ interface AudioBuffer {
declare var AudioBuffer: {
prototype: AudioBuffer;
new(): AudioBuffer;
-}
+};
interface AudioBufferSourceNodeEventMap {
"ended": MediaStreamErrorEvent;
@@ -1341,7 +1341,7 @@ interface AudioBufferSourceNode extends AudioNode {
declare var AudioBufferSourceNode: {
prototype: AudioBufferSourceNode;
new(): AudioBufferSourceNode;
-}
+};
interface AudioContextEventMap {
"statechange": Event;
@@ -1387,7 +1387,7 @@ interface AudioContext extends AudioContextBase {
declare var AudioContext: {
prototype: AudioContext;
new(): AudioContext;
-}
+};
interface AudioDestinationNode extends AudioNode {
readonly maxChannelCount: number;
@@ -1396,7 +1396,7 @@ interface AudioDestinationNode extends AudioNode {
declare var AudioDestinationNode: {
prototype: AudioDestinationNode;
new(): AudioDestinationNode;
-}
+};
interface AudioListener {
dopplerFactor: number;
@@ -1409,7 +1409,7 @@ interface AudioListener {
declare var AudioListener: {
prototype: AudioListener;
new(): AudioListener;
-}
+};
interface AudioNode extends EventTarget {
channelCount: number;
@@ -1428,7 +1428,7 @@ interface AudioNode extends EventTarget {
declare var AudioNode: {
prototype: AudioNode;
new(): AudioNode;
-}
+};
interface AudioParam {
readonly defaultValue: number;
@@ -1444,7 +1444,7 @@ interface AudioParam {
declare var AudioParam: {
prototype: AudioParam;
new(): AudioParam;
-}
+};
interface AudioProcessingEvent extends Event {
readonly inputBuffer: AudioBuffer;
@@ -1455,7 +1455,7 @@ interface AudioProcessingEvent extends Event {
declare var AudioProcessingEvent: {
prototype: AudioProcessingEvent;
new(): AudioProcessingEvent;
-}
+};
interface AudioTrack {
enabled: boolean;
@@ -1469,7 +1469,7 @@ interface AudioTrack {
declare var AudioTrack: {
prototype: AudioTrack;
new(): AudioTrack;
-}
+};
interface AudioTrackListEventMap {
"addtrack": TrackEvent;
@@ -1492,7 +1492,7 @@ interface AudioTrackList extends EventTarget {
declare var AudioTrackList: {
prototype: AudioTrackList;
new(): AudioTrackList;
-}
+};
interface BarProp {
readonly visible: boolean;
@@ -1501,7 +1501,7 @@ interface BarProp {
declare var BarProp: {
prototype: BarProp;
new(): BarProp;
-}
+};
interface BeforeUnloadEvent extends Event {
returnValue: any;
@@ -1510,13 +1510,13 @@ interface BeforeUnloadEvent extends Event {
declare var BeforeUnloadEvent: {
prototype: BeforeUnloadEvent;
new(): BeforeUnloadEvent;
-}
+};
interface BiquadFilterNode extends AudioNode {
- readonly Q: AudioParam;
readonly detune: AudioParam;
readonly frequency: AudioParam;
readonly gain: AudioParam;
+ readonly Q: AudioParam;
type: BiquadFilterType;
getFrequencyResponse(frequencyHz: Float32Array, magResponse: Float32Array, phaseResponse: Float32Array): void;
}
@@ -1524,7 +1524,7 @@ interface BiquadFilterNode extends AudioNode {
declare var BiquadFilterNode: {
prototype: BiquadFilterNode;
new(): BiquadFilterNode;
-}
+};
interface Blob {
readonly size: number;
@@ -1537,16 +1537,305 @@ interface 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 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 CDATASection extends Text {
}
declare var CDATASection: {
prototype: CDATASection;
new(): CDATASection;
+};
+
+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, ...optionalParams: any[]): void;
+ groupCollapsed(groupTitle?: string, ...optionalParams: any[]): 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 CSS {
supports(property: string, value?: string): boolean;
}
@@ -1559,7 +1848,7 @@ interface CSSConditionRule extends CSSGroupingRule {
declare var CSSConditionRule: {
prototype: CSSConditionRule;
new(): CSSConditionRule;
-}
+};
interface CSSFontFaceRule extends CSSRule {
readonly style: CSSStyleDeclaration;
@@ -1568,7 +1857,7 @@ interface CSSFontFaceRule extends CSSRule {
declare var CSSFontFaceRule: {
prototype: CSSFontFaceRule;
new(): CSSFontFaceRule;
-}
+};
interface CSSGroupingRule extends CSSRule {
readonly cssRules: CSSRuleList;
@@ -1579,7 +1868,7 @@ interface CSSGroupingRule extends CSSRule {
declare var CSSGroupingRule: {
prototype: CSSGroupingRule;
new(): CSSGroupingRule;
-}
+};
interface CSSImportRule extends CSSRule {
readonly href: string;
@@ -1590,7 +1879,7 @@ interface CSSImportRule extends CSSRule {
declare var CSSImportRule: {
prototype: CSSImportRule;
new(): CSSImportRule;
-}
+};
interface CSSKeyframeRule extends CSSRule {
keyText: string;
@@ -1600,7 +1889,7 @@ interface CSSKeyframeRule extends CSSRule {
declare var CSSKeyframeRule: {
prototype: CSSKeyframeRule;
new(): CSSKeyframeRule;
-}
+};
interface CSSKeyframesRule extends CSSRule {
readonly cssRules: CSSRuleList;
@@ -1613,7 +1902,7 @@ interface CSSKeyframesRule extends CSSRule {
declare var CSSKeyframesRule: {
prototype: CSSKeyframesRule;
new(): CSSKeyframesRule;
-}
+};
interface CSSMediaRule extends CSSConditionRule {
readonly media: MediaList;
@@ -1622,7 +1911,7 @@ interface CSSMediaRule extends CSSConditionRule {
declare var CSSMediaRule: {
prototype: CSSMediaRule;
new(): CSSMediaRule;
-}
+};
interface CSSNamespaceRule extends CSSRule {
readonly namespaceURI: string;
@@ -1632,7 +1921,7 @@ interface CSSNamespaceRule extends CSSRule {
declare var CSSNamespaceRule: {
prototype: CSSNamespaceRule;
new(): CSSNamespaceRule;
-}
+};
interface CSSPageRule extends CSSRule {
readonly pseudoClass: string;
@@ -1644,7 +1933,7 @@ interface CSSPageRule extends CSSRule {
declare var CSSPageRule: {
prototype: CSSPageRule;
new(): CSSPageRule;
-}
+};
interface CSSRule {
cssText: string;
@@ -1654,8 +1943,8 @@ interface CSSRule {
readonly CHARSET_RULE: number;
readonly FONT_FACE_RULE: number;
readonly IMPORT_RULE: number;
- readonly KEYFRAMES_RULE: number;
readonly KEYFRAME_RULE: number;
+ readonly KEYFRAMES_RULE: number;
readonly MEDIA_RULE: number;
readonly NAMESPACE_RULE: number;
readonly PAGE_RULE: number;
@@ -1671,8 +1960,8 @@ declare var CSSRule: {
readonly CHARSET_RULE: number;
readonly FONT_FACE_RULE: number;
readonly IMPORT_RULE: number;
- readonly KEYFRAMES_RULE: number;
readonly KEYFRAME_RULE: number;
+ readonly KEYFRAMES_RULE: number;
readonly MEDIA_RULE: number;
readonly NAMESPACE_RULE: number;
readonly PAGE_RULE: number;
@@ -1680,7 +1969,7 @@ declare var CSSRule: {
readonly SUPPORTS_RULE: number;
readonly UNKNOWN_RULE: number;
readonly VIEWPORT_RULE: number;
-}
+};
interface CSSRuleList {
readonly length: number;
@@ -1691,13 +1980,13 @@ interface CSSRuleList {
declare var CSSRuleList: {
prototype: CSSRuleList;
new(): CSSRuleList;
-}
+};
interface CSSStyleDeclaration {
alignContent: string | null;
alignItems: string | null;
- alignSelf: string | null;
alignmentBaseline: string | null;
+ alignSelf: string | null;
animation: string | null;
animationDelay: string | null;
animationDirection: string | null;
@@ -1773,9 +2062,9 @@ interface CSSStyleDeclaration {
columnRuleColor: any;
columnRuleStyle: string | null;
columnRuleWidth: any;
+ columns: string | null;
columnSpan: string | null;
columnWidth: any;
- columns: string | null;
content: string | null;
counterIncrement: string | null;
counterReset: string | null;
@@ -1845,24 +2134,24 @@ interface CSSStyleDeclaration {
minHeight: string | null;
minWidth: string | null;
msContentZoomChaining: string | null;
+ msContentZooming: 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;
+ msGridColumnSpan: any;
msGridRow: any;
msGridRowAlign: string | null;
- msGridRowSpan: any;
msGridRows: string | null;
+ msGridRowSpan: any;
msHighContrastAdjust: string | null;
msHyphenateLimitChars: string | null;
msHyphenateLimitLines: any;
@@ -1998,9 +2287,9 @@ interface CSSStyleDeclaration {
webkitColumnRuleColor: any;
webkitColumnRuleStyle: string | null;
webkitColumnRuleWidth: any;
+ webkitColumns: string | null;
webkitColumnSpan: string | null;
webkitColumnWidth: any;
- webkitColumns: string | null;
webkitFilter: string | null;
webkitFlex: string | null;
webkitFlexBasis: string | null;
@@ -2052,7 +2341,7 @@ interface CSSStyleDeclaration {
declare var CSSStyleDeclaration: {
prototype: CSSStyleDeclaration;
new(): CSSStyleDeclaration;
-}
+};
interface CSSStyleRule extends CSSRule {
readonly readOnly: boolean;
@@ -2063,7 +2352,7 @@ interface CSSStyleRule extends CSSRule {
declare var CSSStyleRule: {
prototype: CSSStyleRule;
new(): CSSStyleRule;
-}
+};
interface CSSStyleSheet extends StyleSheet {
readonly cssRules: CSSRuleList;
@@ -2089,7 +2378,7 @@ interface CSSStyleSheet extends StyleSheet {
declare var CSSStyleSheet: {
prototype: CSSStyleSheet;
new(): CSSStyleSheet;
-}
+};
interface CSSSupportsRule extends CSSConditionRule {
}
@@ -2097,296 +2386,7 @@ 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;
@@ -2396,150 +2396,7 @@ interface CustomEvent extends Event {
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;
@@ -2550,7 +2407,7 @@ interface DataCue extends TextTrackCue {
declare var DataCue: {
prototype: DataCue;
new(): DataCue;
-}
+};
interface DataTransfer {
dropEffect: string;
@@ -2567,7 +2424,7 @@ interface DataTransfer {
declare var DataTransfer: {
prototype: DataTransfer;
new(): DataTransfer;
-}
+};
interface DataTransferItem {
readonly kind: string;
@@ -2580,7 +2437,7 @@ interface DataTransferItem {
declare var DataTransferItem: {
prototype: DataTransferItem;
new(): DataTransferItem;
-}
+};
interface DataTransferItemList {
readonly length: number;
@@ -2594,7 +2451,7 @@ interface DataTransferItemList {
declare var DataTransferItemList: {
prototype: DataTransferItemList;
new(): DataTransferItemList;
-}
+};
interface DeferredPermissionRequest {
readonly id: number;
@@ -2607,7 +2464,7 @@ interface DeferredPermissionRequest {
declare var DeferredPermissionRequest: {
prototype: DeferredPermissionRequest;
new(): DeferredPermissionRequest;
-}
+};
interface DelayNode extends AudioNode {
readonly delayTime: AudioParam;
@@ -2616,7 +2473,7 @@ interface DelayNode extends AudioNode {
declare var DelayNode: {
prototype: DelayNode;
new(): DelayNode;
-}
+};
interface DeviceAcceleration {
readonly x: number | null;
@@ -2627,7 +2484,7 @@ interface DeviceAcceleration {
declare var DeviceAcceleration: {
prototype: DeviceAcceleration;
new(): DeviceAcceleration;
-}
+};
interface DeviceLightEvent extends Event {
readonly value: number;
@@ -2636,7 +2493,7 @@ interface DeviceLightEvent extends Event {
declare var DeviceLightEvent: {
prototype: DeviceLightEvent;
new(typeArg: string, eventInitDict?: DeviceLightEventInit): DeviceLightEvent;
-}
+};
interface DeviceMotionEvent extends Event {
readonly acceleration: DeviceAcceleration | null;
@@ -2649,7 +2506,7 @@ interface DeviceMotionEvent extends Event {
declare var DeviceMotionEvent: {
prototype: DeviceMotionEvent;
new(typeArg: string, eventInitDict?: DeviceMotionEventInit): DeviceMotionEvent;
-}
+};
interface DeviceOrientationEvent extends Event {
readonly absolute: boolean;
@@ -2662,7 +2519,7 @@ interface DeviceOrientationEvent extends Event {
declare var DeviceOrientationEvent: {
prototype: DeviceOrientationEvent;
new(typeArg: string, eventInitDict?: DeviceOrientationEventInit): DeviceOrientationEvent;
-}
+};
interface DeviceRotationRate {
readonly alpha: number | null;
@@ -2673,7 +2530,7 @@ interface DeviceRotationRate {
declare var DeviceRotationRate: {
prototype: DeviceRotationRate;
new(): DeviceRotationRate;
-}
+};
interface DocumentEventMap extends GlobalEventHandlersEventMap {
"abort": UIEvent;
@@ -2768,299 +2625,291 @@ interface DocumentEventMap extends GlobalEventHandlersEventMap {
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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Gets a reference to the root node of the document.
+ */
documentElement: HTMLElement;
/**
- * Sets or gets the security domain of the document.
- */
+ * Sets or gets the security domain of the document.
+ */
domain: string;
/**
- * Retrieves a collection of all embed objects in the document.
- */
+ * Retrieves a collection of all embed objects in the document.
+ */
embeds: HTMLCollectionOf<HTMLEmbedElement>;
/**
- * Sets or gets the foreground (text) color of the document.
- */
+ * 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.
- */
+ * 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.
- */
+ * Retrieves a collection, in source order, of img objects in the document.
+ */
images: HTMLCollectionOf<HTMLImageElement>;
/**
- * Gets the implementation object of the current document.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Contains information about the current URL.
+ */
readonly location: Location;
- msCSSOMElementFloatMetrics: boolean;
msCapsLockWarningOff: boolean;
+ msCSSOMElementFloatMetrics: boolean;
/**
- * Fires when the user aborts the download.
- * @param ev The event.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ /**
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ /**
+ * 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.
- */
+ /**
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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
- */
+ * 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.
- */
+ * 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.
- */
+ * 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
- */
+ * 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.
- */
+ * 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
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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
- */
+ * 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;
@@ -3080,146 +2929,154 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven
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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Gets the root svg element in the document hierarchy.
+ */
readonly rootElement: SVGSVGElement;
/**
- * Retrieves a collection of all script objects in the document.
- */
+ * 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.
- */
+ * 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.
- */
+ * Contains the title of the document.
+ */
title: string;
+ /**
+ * 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;
readonly visibilityState: VisibilityState;
- /**
- * Sets or gets the color of the links that the user has visited.
- */
+ /**
+ * Sets or gets the color of the links that the user has visited.
+ */
vlinkColor: string;
readonly webkitCurrentFullScreenElement: Element | null;
readonly webkitFullscreenElement: Element | null;
@@ -3228,243 +3085,243 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven
readonly xmlEncoding: string | null;
xmlStandalone: boolean;
/**
- * Gets or sets the version attribute specified in the declaration of an XML document.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Creates a comment object with the specified data.
+ * @param data Sets the comment object's data.
+ */
createComment(data: string): Comment;
/**
- * Creates a new document.
- */
+ * Creates a new document.
+ */
createDocumentFragment(): DocumentFragment;
/**
- * Creates an instance of the element for the specified tag.
- * @param tagName The name of an element.
- */
+ * 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: "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.
- */
+ * 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;
+ createNSResolver(nodeResolver: Node): XPathNSResolver;
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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ /**
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -3473,7 +3330,7 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven
declare var Document: {
prototype: Document;
new(): Document;
-}
+};
interface DocumentFragment extends Node, NodeSelector, ParentNode {
getElementById(elementId: string): HTMLElement | null;
@@ -3482,7 +3339,7 @@ interface DocumentFragment extends Node, NodeSelector, ParentNode {
declare var DocumentFragment: {
prototype: DocumentFragment;
new(): DocumentFragment;
-}
+};
interface DocumentType extends Node, ChildNode {
readonly entities: NamedNodeMap;
@@ -3496,8 +3353,151 @@ interface DocumentType extends Node, ChildNode {
declare var DocumentType: {
prototype: DocumentType;
new(): DocumentType;
+};
+
+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 NO_DATA_ALLOWED_ERR: number;
+ readonly NO_MODIFICATION_ALLOWED_ERR: number;
+ readonly NOT_FOUND_ERR: number;
+ readonly NOT_SUPPORTED_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 NO_DATA_ALLOWED_ERR: number;
+ readonly NO_MODIFICATION_ALLOWED_ERR: number;
+ readonly NOT_FOUND_ERR: number;
+ readonly NOT_SUPPORTED_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;
+ toggle(token: string, force?: boolean): boolean;
+ toString(): string;
+ [index: number]: string;
+}
+
+declare var DOMTokenList: {
+ prototype: DOMTokenList;
+ new(): DOMTokenList;
+};
+
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;
@@ -3506,8 +3506,8 @@ interface DragEvent extends MouseEvent {
declare var DragEvent: {
prototype: DragEvent;
- new(): DragEvent;
-}
+ new(type: "drag" | "dragend" | "dragenter" | "dragexit" | "dragleave" | "dragover" | "dragstart" | "drop", dragEventInit?: { dataTransfer?: DataTransfer }): DragEvent;
+};
interface DynamicsCompressorNode extends AudioNode {
readonly attack: AudioParam;
@@ -3521,27 +3521,7 @@ interface DynamicsCompressorNode extends AudioNode {
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;
@@ -3622,9 +3602,9 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec
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;
+ getAttributeNS(namespaceURI: string, localName: string): string;
getBoundingClientRect(): ClientRect;
getClientRects(): ClientRectList;
getElementsByTagName<K extends keyof ElementListTagNameMap>(name: K): ElementListTagNameMap[K];
@@ -3642,18 +3622,18 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec
msZoomTo(args: MsZoomToOptions): void;
releasePointerCapture(pointerId: number): void;
removeAttribute(qualifiedName: string): void;
- removeAttributeNS(namespaceURI: string, localName: string): void;
removeAttributeNode(oldAttr: Attr): Attr;
+ removeAttributeNS(namespaceURI: string, localName: string): void;
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;
+ setAttributeNS(namespaceURI: string, qualifiedName: string, value: string): void;
setPointerCapture(pointerId: number): void;
webkitMatchesSelector(selectors: string): boolean;
- webkitRequestFullScreen(): void;
webkitRequestFullscreen(): void;
+ webkitRequestFullScreen(): void;
getElementsByClassName(classNames: string): NodeListOf<Element>;
matches(selector: string): boolean;
closest(selector: string): Element | null;
@@ -3664,9 +3644,9 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec
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;
+ insertAdjacentElement(position: InsertPosition, insertedElement: Element): Element | null;
+ insertAdjacentHTML(where: InsertPosition, html: string): void;
+ insertAdjacentText(where: InsertPosition, 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;
@@ -3675,7 +3655,7 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec
declare var Element: {
prototype: Element;
new(): Element;
-}
+};
interface ErrorEvent extends Event {
readonly colno: number;
@@ -3689,12 +3669,12 @@ interface ErrorEvent extends Event {
declare var ErrorEvent: {
prototype: ErrorEvent;
new(type: string, errorEventInitDict?: ErrorEventInit): ErrorEvent;
-}
+};
interface Event {
readonly bubbles: boolean;
- cancelBubble: boolean;
readonly cancelable: boolean;
+ cancelBubble: boolean;
readonly currentTarget: EventTarget;
readonly defaultPrevented: boolean;
readonly eventPhase: number;
@@ -3721,7 +3701,7 @@ declare var Event: {
readonly AT_TARGET: number;
readonly BUBBLING_PHASE: number;
readonly CAPTURING_PHASE: number;
-}
+};
interface EventTarget {
addEventListener(type: string, listener?: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
@@ -3732,8 +3712,28 @@ interface EventTarget {
declare var EventTarget: {
prototype: EventTarget;
new(): EventTarget;
+};
+
+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 ExtensionScriptApis {
extensionIdToShortId(extensionId: string): number;
fireExtensionApiTelemetry(functionName: string, isSucceeded: boolean, isSupported: boolean): void;
@@ -3747,7 +3747,7 @@ interface ExtensionScriptApis {
declare var ExtensionScriptApis: {
prototype: ExtensionScriptApis;
new(): ExtensionScriptApis;
-}
+};
interface External {
}
@@ -3755,7 +3755,7 @@ interface External {
declare var External: {
prototype: External;
new(): External;
-}
+};
interface File extends Blob {
readonly lastModifiedDate: any;
@@ -3766,7 +3766,7 @@ interface File extends Blob {
declare var File: {
prototype: File;
new (parts: (ArrayBuffer | ArrayBufferView | Blob | string)[], filename: string, properties?: FilePropertyBag): File;
-}
+};
interface FileList {
readonly length: number;
@@ -3777,7 +3777,7 @@ interface FileList {
declare var FileList: {
prototype: FileList;
new(): FileList;
-}
+};
interface FileReader extends EventTarget, MSBaseReader {
readonly error: DOMError;
@@ -3792,7 +3792,7 @@ interface FileReader extends EventTarget, MSBaseReader {
declare var FileReader: {
prototype: FileReader;
new(): FileReader;
-}
+};
interface FocusEvent extends UIEvent {
readonly relatedTarget: EventTarget;
@@ -3802,7 +3802,7 @@ interface FocusEvent extends UIEvent {
declare var FocusEvent: {
prototype: FocusEvent;
new(typeArg: string, eventInitDict?: FocusEventInit): FocusEvent;
-}
+};
interface FocusNavigationEvent extends Event {
readonly navigationReason: NavigationReason;
@@ -3816,7 +3816,7 @@ interface FocusNavigationEvent extends Event {
declare var FocusNavigationEvent: {
prototype: FocusNavigationEvent;
new(type: string, eventInitDict?: FocusNavigationEventInit): FocusNavigationEvent;
-}
+};
interface FormData {
append(name: string, value: string | Blob, fileName?: string): void;
@@ -3830,7 +3830,7 @@ interface FormData {
declare var FormData: {
prototype: FormData;
new (form?: HTMLFormElement): FormData;
-}
+};
interface GainNode extends AudioNode {
readonly gain: AudioParam;
@@ -3839,7 +3839,7 @@ interface GainNode extends AudioNode {
declare var GainNode: {
prototype: GainNode;
new(): GainNode;
-}
+};
interface Gamepad {
readonly axes: number[];
@@ -3854,7 +3854,7 @@ interface Gamepad {
declare var Gamepad: {
prototype: Gamepad;
new(): Gamepad;
-}
+};
interface GamepadButton {
readonly pressed: boolean;
@@ -3864,7 +3864,7 @@ interface GamepadButton {
declare var GamepadButton: {
prototype: GamepadButton;
new(): GamepadButton;
-}
+};
interface GamepadEvent extends Event {
readonly gamepad: Gamepad;
@@ -3873,7 +3873,7 @@ interface GamepadEvent extends Event {
declare var GamepadEvent: {
prototype: GamepadEvent;
new(typeArg: string, eventInitDict?: GamepadEventInit): GamepadEvent;
-}
+};
interface Geolocation {
clearWatch(watchId: number): void;
@@ -3884,8 +3884,48 @@ interface Geolocation {
declare var Geolocation: {
prototype: Geolocation;
new(): Geolocation;
+};
+
+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 HTMLAllCollection {
readonly length: number;
item(nameOrIndex?: string): HTMLCollection | Element | null;
@@ -3896,87 +3936,87 @@ interface HTMLAllCollection {
declare var HTMLAllCollection: {
prototype: HTMLAllCollection;
new(): HTMLAllCollection;
-}
+};
interface HTMLAnchorElement extends HTMLElement {
- Methods: string;
/**
- * Sets or retrieves the character set used to encode the object.
- */
+ * Sets or retrieves the character set used to encode the object.
+ */
charset: string;
/**
- * Sets or retrieves the coordinates of the object.
- */
+ * Sets or retrieves the coordinates of the object.
+ */
coords: string;
download: string;
/**
- * Contains the anchor portion of the URL including the hash sign (#).
- */
+ * Contains the anchor portion of the URL including the hash sign (#).
+ */
hash: string;
/**
- * Contains the hostname and port values of the URL.
- */
+ * Contains the hostname and port values of the URL.
+ */
host: string;
/**
- * Contains the hostname of a URL.
- */
+ * Contains the hostname of a URL.
+ */
hostname: string;
/**
- * Sets or retrieves a destination URL or an anchor point.
- */
+ * Sets or retrieves a destination URL or an anchor point.
+ */
href: string;
/**
- * Sets or retrieves the language code of the object.
- */
+ * Sets or retrieves the language code of the object.
+ */
hreflang: string;
+ Methods: string;
readonly mimeType: string;
/**
- * Sets or retrieves the shape of the object.
- */
+ * Sets or retrieves the shape of the object.
+ */
name: string;
readonly nameProp: string;
/**
- * Contains the pathname of the URL.
- */
+ * Contains the pathname of the URL.
+ */
pathname: string;
/**
- * Sets or retrieves the port number associated with a URL.
- */
+ * Sets or retrieves the port number associated with a URL.
+ */
port: string;
/**
- * Contains the protocol of the URL.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the substring of the href property that follows the question mark.
+ */
search: string;
/**
- * Sets or retrieves the shape of the object.
- */
+ * Sets or retrieves the shape of the object.
+ */
shape: string;
/**
- * Sets or retrieves the window or frame at which to target content.
- */
+ * 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.
- */
+ * Retrieves or sets the text of the object as a string.
+ */
text: string;
type: string;
urn: string;
- /**
- * Returns a string representation of an object.
- */
+ /**
+ * 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;
@@ -3985,70 +4025,70 @@ interface HTMLAnchorElement extends HTMLElement {
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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves a character string that can be used to implement your own archive functionality for the object.
+ */
archive: string;
+ /**
+ * 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;
border: string;
code: string;
/**
- * Sets or retrieves the URL of the component.
- */
+ * Sets or retrieves the URL of the component.
+ */
codeBase: string;
/**
- * Sets or retrieves the Internet media type for the code associated with the object.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the height of the object.
+ */
height: string;
hspace: number;
/**
- * Sets or retrieves the shape of the object.
- */
+ * 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.
- */
+ * Sets or retrieves a message to be displayed while an object is loading.
+ */
standby: string;
/**
- * Returns the content type of the object.
- */
+ * 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.
- */
+ * 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;
@@ -4059,66 +4099,66 @@ interface HTMLAppletElement extends HTMLElement {
declare var HTMLAppletElement: {
prototype: HTMLAppletElement;
new(): HTMLAppletElement;
-}
+};
interface HTMLAreaElement extends HTMLElement {
/**
- * Sets or retrieves a text alternative to the graphic.
- */
+ * Sets or retrieves a text alternative to the graphic.
+ */
alt: string;
/**
- * Sets or retrieves the coordinates of the object.
- */
+ * 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 (#).
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the host name part of the location or URL.
+ */
hostname: string;
/**
- * Sets or retrieves a destination URL or an anchor point.
- */
+ * Sets or retrieves a destination URL or an anchor point.
+ */
href: string;
/**
- * Sets or gets whether clicks in this region cause action.
- */
+ * Sets or gets whether clicks in this region cause action.
+ */
noHref: boolean;
/**
- * Sets or retrieves the file name or path specified by the object.
- */
+ * Sets or retrieves the file name or path specified by the object.
+ */
pathname: string;
/**
- * Sets or retrieves the port number associated with a URL.
- */
+ * Sets or retrieves the port number associated with a URL.
+ */
port: string;
/**
- * Sets or retrieves the protocol portion of a URL.
- */
+ * 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.
- */
+ * Sets or retrieves the substring of the href property that follows the question mark.
+ */
search: string;
/**
- * Sets or retrieves the shape of the object.
- */
+ * Sets or retrieves the shape of the object.
+ */
shape: string;
/**
- * Sets or retrieves the window or frame at which to target content.
- */
+ * Sets or retrieves the window or frame at which to target content.
+ */
target: string;
- /**
- * Returns a string representation of an object.
- */
+ /**
+ * 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;
@@ -4127,7 +4167,7 @@ interface HTMLAreaElement extends HTMLElement {
declare var HTMLAreaElement: {
prototype: HTMLAreaElement;
new(): HTMLAreaElement;
-}
+};
interface HTMLAreasCollection extends HTMLCollectionBase {
}
@@ -4135,7 +4175,7 @@ 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;
@@ -4145,30 +4185,16 @@ interface HTMLAudioElement extends HTMLMediaElement {
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.
- */
+ * 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.
- */
+ * 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;
@@ -4177,16 +4203,16 @@ interface HTMLBaseElement extends HTMLElement {
declare var HTMLBaseElement: {
prototype: HTMLBaseElement;
new(): HTMLBaseElement;
-}
+};
interface HTMLBaseFontElement extends HTMLElement, DOML2DeprecatedColorProperty {
/**
- * Sets or retrieves the current typeface family.
- */
+ * Sets or retrieves the current typeface family.
+ */
face: string;
/**
- * Sets or retrieves the font size of the object.
- */
+ * 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;
@@ -4195,7 +4221,7 @@ interface HTMLBaseFontElement extends HTMLElement, DOML2DeprecatedColorProperty
declare var HTMLBaseFontElement: {
prototype: HTMLBaseFontElement;
new(): HTMLBaseFontElement;
-}
+};
interface HTMLBodyElementEventMap extends HTMLElementEventMap {
"afterprint": Event;
@@ -4254,71 +4280,85 @@ interface HTMLBodyElement extends HTMLElement {
declare var HTMLBodyElement: {
prototype: HTMLBodyElement;
new(): HTMLBodyElement;
+};
+
+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 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Overrides the target attribute on a form element.
+ */
formTarget: string;
- /**
- * Sets or retrieves the name of the object.
- */
+ /**
+ * Sets or retrieves the name of the object.
+ */
name: string;
status: any;
/**
- * Gets the classification and default behavior of the button.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ /**
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -4327,32 +4367,32 @@ interface HTMLButtonElement extends HTMLElement {
declare var HTMLButtonElement: {
prototype: HTMLButtonElement;
new(): HTMLButtonElement;
-}
+};
interface HTMLCanvasElement extends HTMLElement {
/**
- * Gets or sets the height of a canvas element on a document.
- */
+ * 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.
- */
+ * 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");
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -4362,42 +4402,31 @@ interface HTMLCanvasElement extends HTMLElement {
declare var HTMLCanvasElement: {
prototype: HTMLCanvasElement;
new(): HTMLCanvasElement;
-}
+};
interface HTMLCollectionBase {
/**
- * Sets or retrieves the number of objects in a collection.
- */
+ * Sets or retrieves the number of objects in a collection.
+ */
readonly length: number;
/**
- * Retrieves an object from various collections.
- */
+ * 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.
- */
+ * 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;
@@ -4408,7 +4437,7 @@ interface HTMLDataElement extends HTMLElement {
declare var HTMLDataElement: {
prototype: HTMLDataElement;
new(): HTMLDataElement;
-}
+};
interface HTMLDataListElement extends HTMLElement {
options: HTMLCollectionOf<HTMLOptionElement>;
@@ -4419,7 +4448,7 @@ interface HTMLDataListElement extends HTMLElement {
declare var HTMLDataListElement: {
prototype: HTMLDataListElement;
new(): HTMLDataListElement;
-}
+};
interface HTMLDirectoryElement extends HTMLElement {
compact: boolean;
@@ -4430,16 +4459,16 @@ interface HTMLDirectoryElement extends HTMLElement {
declare var HTMLDirectoryElement: {
prototype: HTMLDirectoryElement;
new(): HTMLDirectoryElement;
-}
+};
interface HTMLDivElement extends HTMLElement {
/**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
+ * Sets or retrieves how the object is aligned with adjacent text.
+ */
align: string;
/**
- * Sets or retrieves whether the browser automatically performs wordwrap.
- */
+ * 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;
@@ -4448,8 +4477,19 @@ interface HTMLDivElement extends HTMLElement {
declare var HTMLDivElement: {
prototype: HTMLDivElement;
new(): HTMLDivElement;
+};
+
+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 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;
@@ -4458,7 +4498,7 @@ interface HTMLDocument extends Document {
declare var HTMLDocument: {
prototype: HTMLDocument;
new(): HTMLDocument;
-}
+};
interface HTMLElementEventMap extends ElementEventMap {
"abort": UIEvent;
@@ -4631,54 +4671,54 @@ interface HTMLElement extends Element {
declare var HTMLElement: {
prototype: HTMLElement;
new(): HTMLElement;
-}
+};
interface HTMLEmbedElement extends HTMLElement, GetSVGDocument {
/**
- * Sets or retrieves the height of the object.
- */
+ * Sets or retrieves the height of the object.
+ */
height: string;
hidden: any;
/**
- * Gets or sets whether the DLNA PlayTo device is available.
- */
+ * 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.
- */
+ * 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.
- */
+ * Gets or sets the primary DLNA PlayTo device.
+ */
msPlayToPrimary: boolean;
/**
- * Gets the source associated with the media element for use by the PlayToManager.
- */
+ * Gets the source associated with the media element for use by the PlayToManager.
+ */
readonly msPlayToSource: any;
/**
- * Sets or retrieves the name of the object.
- */
+ * Sets or retrieves the name of the object.
+ */
name: string;
/**
- * Retrieves the palette used for the embedded document.
- */
+ * Retrieves the palette used for the embedded document.
+ */
readonly palette: string;
/**
- * Retrieves the URL of the plug-in used to view an embedded document.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the height and width units of the embed object.
+ */
units: string;
/**
- * Sets or retrieves the width of the object.
- */
+ * 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;
@@ -4687,39 +4727,39 @@ interface HTMLEmbedElement extends HTMLElement, GetSVGDocument {
declare var HTMLEmbedElement: {
prototype: HTMLEmbedElement;
new(): HTMLEmbedElement;
-}
+};
interface HTMLFieldSetElement extends HTMLElement {
/**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -4728,12 +4768,12 @@ interface HTMLFieldSetElement extends HTMLElement {
declare var HTMLFieldSetElement: {
prototype: HTMLFieldSetElement;
new(): HTMLFieldSetElement;
-}
+};
interface HTMLFontElement extends HTMLElement, DOML2DeprecatedColorProperty, DOML2DeprecatedSizeProperty {
/**
- * Sets or retrieves the current typeface family.
- */
+ * 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;
@@ -4742,7 +4782,7 @@ interface HTMLFontElement extends HTMLElement, DOML2DeprecatedColorProperty, DOM
declare var HTMLFontElement: {
prototype: HTMLFontElement;
new(): HTMLFontElement;
-}
+};
interface HTMLFormControlsCollection extends HTMLCollectionBase {
namedItem(name: string): HTMLCollection | Element | null;
@@ -4751,74 +4791,74 @@ interface HTMLFormControlsCollection extends HTMLCollectionBase {
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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the MIME encoding for the form.
+ */
encoding: string;
/**
- * Sets or retrieves the encoding type for the form.
- */
+ * Sets or retrieves the encoding type for the form.
+ */
enctype: string;
/**
- * Sets or retrieves the number of objects in a collection.
- */
+ * 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.
- */
+ * Sets or retrieves how to send the form data to the server.
+ */
method: string;
/**
- * Sets or retrieves the name of the object.
- */
+ * Sets or retrieves the name of the object.
+ */
name: string;
/**
- * Designates a form that is not validated when submitted.
- */
+ * Designates a form that is not validated when submitted.
+ */
noValidate: boolean;
/**
- * Sets or retrieves the window or frame at which to target content.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Retrieves a form object or an object from an elements collection.
+ */
namedItem(name: string): any;
/**
- * Fires when the user resets a form.
- */
+ * Fires when the user resets a form.
+ */
reset(): void;
/**
- * Fires when a FORM is about to be submitted.
- */
+ * 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;
@@ -4828,7 +4868,7 @@ interface HTMLFormElement extends HTMLElement {
declare var HTMLFormElement: {
prototype: HTMLFormElement;
new(): HTMLFormElement;
-}
+};
interface HTMLFrameElementEventMap extends HTMLElementEventMap {
"load": Event;
@@ -4836,68 +4876,68 @@ interface HTMLFrameElementEventMap extends HTMLElementEventMap {
interface HTMLFrameElement extends HTMLElement, GetSVGDocument {
/**
- * Specifies the properties of a border drawn around an object.
- */
+ * Specifies the properties of a border drawn around an object.
+ */
border: string;
/**
- * Sets or retrieves the border color of the object.
- */
+ * Sets or retrieves the border color of the object.
+ */
borderColor: any;
/**
- * Retrieves the document object of the page or frame.
- */
+ * Retrieves the document object of the page or frame.
+ */
readonly contentDocument: Document;
/**
- * Retrieves the object of the specified.
- */
+ * Retrieves the object of the specified.
+ */
readonly contentWindow: Window;
/**
- * Sets or retrieves whether to display a border for the frame.
- */
+ * Sets or retrieves whether to display a border for the frame.
+ */
frameBorder: string;
/**
- * Sets or retrieves the amount of additional space between the frames.
- */
+ * Sets or retrieves the amount of additional space between the frames.
+ */
frameSpacing: any;
/**
- * Sets or retrieves the height of the object.
- */
+ * Sets or retrieves the height of the object.
+ */
height: string | number;
/**
- * Sets or retrieves a URI to a long description of the object.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the left and right margin widths before displaying the text in a frame.
+ */
marginWidth: string;
/**
- * Sets or retrieves the frame name.
- */
+ * Sets or retrieves the frame name.
+ */
name: string;
/**
- * Sets or retrieves whether the user can resize the frame.
- */
+ * Sets or retrieves whether the user can resize the frame.
+ */
noResize: boolean;
/**
- * Raised when the object has been completely received from the server.
- */
+ * 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.
- */
+ * Sets or retrieves whether the frame can be scrolled.
+ */
scrolling: string;
/**
- * Sets or retrieves a URL to be loaded by the object.
- */
+ * Sets or retrieves a URL to be loaded by the object.
+ */
src: string;
/**
- * Sets or retrieves the width of the object.
- */
+ * 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;
@@ -4906,7 +4946,7 @@ interface HTMLFrameElement extends HTMLElement, GetSVGDocument {
declare var HTMLFrameElement: {
prototype: HTMLFrameElement;
new(): HTMLFrameElement;
-}
+};
interface HTMLFrameSetElementEventMap extends HTMLElementEventMap {
"afterprint": Event;
@@ -4933,33 +4973,33 @@ interface HTMLFrameSetElementEventMap extends HTMLElementEventMap {
interface HTMLFrameSetElement extends HTMLElement {
border: string;
/**
- * Sets or retrieves the border color of the object.
- */
+ * Sets or retrieves the border color of the object.
+ */
borderColor: any;
/**
- * Sets or retrieves the frame widths of the object.
- */
+ * Sets or retrieves the frame widths of the object.
+ */
cols: string;
/**
- * Sets or retrieves whether to display a border for the frame.
- */
+ * Sets or retrieves whether to display a border for the frame.
+ */
frameBorder: string;
/**
- * Sets or retrieves the amount of additional space between the frames.
- */
+ * 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.
- */
+ * 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.
- */
+ * Fires when the object receives focus.
+ */
onfocus: (this: HTMLFrameSetElement, ev: FocusEvent) => any;
onhashchange: (this: HTMLFrameSetElement, ev: HashChangeEvent) => any;
onload: (this: HTMLFrameSetElement, ev: Event) => any;
@@ -4975,8 +5015,8 @@ interface HTMLFrameSetElement extends HTMLElement {
onstorage: (this: HTMLFrameSetElement, ev: StorageEvent) => any;
onunload: (this: HTMLFrameSetElement, ev: Event) => any;
/**
- * Sets or retrieves the frame heights of the object.
- */
+ * 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;
@@ -4985,29 +5025,7 @@ interface HTMLFrameSetElement extends HTMLElement {
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;
@@ -5018,12 +5036,12 @@ interface HTMLHeadElement extends HTMLElement {
declare var HTMLHeadElement: {
prototype: HTMLHeadElement;
new(): HTMLHeadElement;
-}
+};
interface HTMLHeadingElement extends HTMLElement {
/**
- * Sets or retrieves a value that indicates the table alignment.
- */
+ * 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;
@@ -5032,12 +5050,34 @@ interface HTMLHeadingElement extends HTMLElement {
declare var HTMLHeadingElement: {
prototype: HTMLHeadingElement;
new(): HTMLHeadingElement;
+};
+
+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 HTMLHtmlElement extends HTMLElement {
/**
- * Sets or retrieves the DTD version that governs the current document.
- */
+ * 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;
@@ -5046,7 +5086,7 @@ interface HTMLHtmlElement extends HTMLElement {
declare var HTMLHtmlElement: {
prototype: HTMLHtmlElement;
new(): HTMLHtmlElement;
-}
+};
interface HTMLIFrameElementEventMap extends HTMLElementEventMap {
"load": Event;
@@ -5054,79 +5094,79 @@ interface HTMLIFrameElementEventMap extends HTMLElementEventMap {
interface HTMLIFrameElement extends HTMLElement, GetSVGDocument {
/**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
+ * 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.
- */
+ * Specifies the properties of a border drawn around an object.
+ */
border: string;
/**
- * Retrieves the document object of the page or frame.
- */
+ * Retrieves the document object of the page or frame.
+ */
readonly contentDocument: Document;
/**
- * Retrieves the object of the specified.
- */
+ * Retrieves the object of the specified.
+ */
readonly contentWindow: Window;
/**
- * Sets or retrieves whether to display a border for the frame.
- */
+ * Sets or retrieves whether to display a border for the frame.
+ */
frameBorder: string;
/**
- * Sets or retrieves the amount of additional space between the frames.
- */
+ * Sets or retrieves the amount of additional space between the frames.
+ */
frameSpacing: any;
/**
- * Sets or retrieves the height of the object.
- */
+ * Sets or retrieves the height of the object.
+ */
height: string;
/**
- * Sets or retrieves the horizontal margin for the object.
- */
+ * Sets or retrieves the horizontal margin for the object.
+ */
hspace: number;
/**
- * Sets or retrieves a URI to a long description of the object.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the left and right margin widths before displaying the text in a frame.
+ */
marginWidth: string;
/**
- * Sets or retrieves the frame name.
- */
+ * Sets or retrieves the frame name.
+ */
name: string;
/**
- * Sets or retrieves whether the user can resize the frame.
- */
+ * Sets or retrieves whether the user can resize the frame.
+ */
noResize: boolean;
/**
- * Raised when the object has been completely received from the server.
- */
+ * 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.
- */
+ * Sets or retrieves whether the frame can be scrolled.
+ */
scrolling: string;
/**
- * Sets or retrieves a URL to be loaded by the object.
- */
+ * Sets or retrieves a URL to be loaded by the object.
+ */
src: string;
/**
- * Sets or retrieves the vertical margin for the object.
- */
+ * Sets or retrieves the vertical margin for the object.
+ */
vspace: number;
/**
- * Sets or retrieves the width of the object.
- */
+ * 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;
@@ -5135,86 +5175,86 @@ interface HTMLIFrameElement extends HTMLElement, GetSVGDocument {
declare var HTMLIFrameElement: {
prototype: HTMLIFrameElement;
new(): HTMLIFrameElement;
-}
+};
interface HTMLImageElement extends HTMLElement {
/**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
+ * Sets or retrieves how the object is aligned with adjacent text.
+ */
align: string;
/**
- * Sets or retrieves a text alternative to the graphic.
- */
+ * Sets or retrieves a text alternative to the graphic.
+ */
alt: string;
/**
- * Specifies the properties of a border drawn around an object.
- */
+ * Specifies the properties of a border drawn around an object.
+ */
border: string;
/**
- * Retrieves whether the object is fully loaded.
- */
+ * Retrieves whether the object is fully loaded.
+ */
readonly complete: boolean;
crossOrigin: string | null;
readonly currentSrc: string;
/**
- * Sets or retrieves the height of the object.
- */
+ * Sets or retrieves the height of the object.
+ */
height: number;
/**
- * Sets or retrieves the width of the border to draw around the object.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Gets or sets whether the DLNA PlayTo device is available.
+ */
msPlayToDisabled: boolean;
msPlayToPreferredSourceUri: string;
/**
- * Gets or sets the primary DLNA PlayTo device.
- */
+ * Gets or sets the primary DLNA PlayTo device.
+ */
msPlayToPrimary: boolean;
/**
- * Gets the source associated with the media element for use by the PlayToManager.
- */
+ * Gets the source associated with the media element for use by the PlayToManager.
+ */
readonly msPlayToSource: any;
/**
- * Sets or retrieves the name of the object.
- */
+ * Sets or retrieves the name of the object.
+ */
name: string;
/**
- * The original height of the image resource before sizing.
- */
+ * The original height of the image resource before sizing.
+ */
readonly naturalHeight: number;
/**
- * The original width of the image resource before sizing.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the vertical margin for the object.
+ */
vspace: number;
/**
- * Sets or retrieves the width of the object.
- */
+ * Sets or retrieves the width of the object.
+ */
width: number;
readonly x: number;
readonly y: number;
@@ -5226,210 +5266,210 @@ interface HTMLImageElement extends HTMLElement {
declare var HTMLImageElement: {
prototype: HTMLImageElement;
new(): HTMLImageElement;
-}
+};
interface HTMLInputElement extends HTMLElement {
/**
- * Sets or retrieves a comma-separated list of content types.
- */
+ * Sets or retrieves a comma-separated list of content types.
+ */
accept: string;
/**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
+ * Sets or retrieves how the object is aligned with adjacent text.
+ */
align: string;
/**
- * Sets or retrieves a text alternative to the graphic.
- */
+ * Sets or retrieves a text alternative to the graphic.
+ */
alt: string;
/**
- * Specifies whether autocomplete is applied to an editable text field.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the state of the check box or radio button.
+ */
checked: boolean;
/**
- * Retrieves whether the object is fully loaded.
- */
+ * Retrieves whether the object is fully loaded.
+ */
readonly complete: boolean;
/**
- * Sets or retrieves the state of the check box or radio button.
- */
+ * Sets or retrieves the state of the check box or radio button.
+ */
defaultChecked: boolean;
/**
- * Sets or retrieves the initial contents of the object.
- */
+ * Sets or retrieves the initial contents of the object.
+ */
defaultValue: string;
disabled: boolean;
/**
- * Returns a FileList object on a file type input object.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Overrides the target attribute on a form element.
+ */
formTarget: string;
/**
- * Sets or retrieves the height of the object.
- */
+ * Sets or retrieves the height of the object.
+ */
height: string;
/**
- * Sets or retrieves the width of the border to draw around the object.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Returns the value of the data at the cursor's current position.
+ */
value: string;
valueAsDate: Date;
/**
- * Returns the input field value as a number.
- */
+ * Returns the input field value as a number.
+ */
valueAsNumber: number;
/**
- * Sets or retrieves the vertical margin for the object.
- */
+ * Sets or retrieves the vertical margin for the object.
+ */
vspace: number;
webkitdirectory: boolean;
/**
- * Sets or retrieves the width of the object.
- */
+ * Sets or retrieves the width of the object.
+ */
width: string;
/**
- * Returns whether an element will successfully validate based on forms validation rules and constraints.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -5438,31 +5478,16 @@ interface HTMLInputElement extends HTMLElement {
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.
- */
+ * 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.
- */
+ * 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;
@@ -5471,16 +5496,16 @@ interface HTMLLabelElement extends HTMLElement {
declare var HTMLLabelElement: {
prototype: HTMLLabelElement;
new(): HTMLLabelElement;
-}
+};
interface HTMLLegendElement extends HTMLElement {
/**
- * Retrieves a reference to the form that the object is embedded in.
- */
+ * 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.
- */
+ * 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;
@@ -5489,41 +5514,56 @@ interface HTMLLegendElement extends HTMLElement {
declare var HTMLLegendElement: {
prototype: HTMLLegendElement;
new(): HTMLLegendElement;
+};
+
+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 HTMLLinkElement extends HTMLElement, LinkStyle {
/**
- * Sets or retrieves the character set used to encode the object.
- */
+ * 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.
- */
+ * Sets or retrieves a destination URL or an anchor point.
+ */
href: string;
/**
- * Sets or retrieves the language code of the object.
- */
+ * Sets or retrieves the language code of the object.
+ */
hreflang: string;
/**
- * Sets or retrieves the media type.
- */
+ * Sets or retrieves the media type.
+ */
media: string;
/**
- * Sets or retrieves the relationship between the object and the destination of the link.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the window or frame at which to target content.
+ */
target: string;
/**
- * Sets or retrieves the MIME type of the object.
- */
+ * Sets or retrieves the MIME type of the object.
+ */
type: string;
import?: Document;
integrity: string;
@@ -5534,16 +5574,16 @@ interface HTMLLinkElement extends HTMLElement, LinkStyle {
declare var HTMLLinkElement: {
prototype: HTMLLinkElement;
new(): HTMLLinkElement;
-}
+};
interface HTMLMapElement extends HTMLElement {
/**
- * Retrieves a collection of the area objects defined for the given map object.
- */
+ * Retrieves a collection of the area objects defined for the given map object.
+ */
readonly areas: HTMLAreasCollection;
/**
- * Sets or retrieves the name of the object.
- */
+ * 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;
@@ -5552,7 +5592,7 @@ interface HTMLMapElement extends HTMLElement {
declare var HTMLMapElement: {
prototype: HTMLMapElement;
new(): HTMLMapElement;
-}
+};
interface HTMLMarqueeElementEventMap extends HTMLElementEventMap {
"bounce": Event;
@@ -5584,7 +5624,7 @@ interface HTMLMarqueeElement extends HTMLElement {
declare var HTMLMarqueeElement: {
prototype: HTMLMarqueeElement;
new(): HTMLMarqueeElement;
-}
+};
interface HTMLMediaElementEventMap extends HTMLElementEventMap {
"encrypted": MediaEncryptedEvent;
@@ -5593,162 +5633,162 @@ interface HTMLMediaElementEventMap extends HTMLElementEventMap {
interface HTMLMediaElement extends HTMLElement {
/**
- * Returns an AudioTrackList object with the audio tracks for a given video element.
- */
+ * 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.
- */
+ * Gets or sets a value that indicates whether to start playing the media automatically.
+ */
autoplay: boolean;
/**
- * Gets a collection of buffered time ranges.
- */
+ * 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).
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Gets or sets the primary DLNA PlayTo device.
+ */
msPlayToPrimary: boolean;
/**
- * Gets the source associated with the media element for use by the PlayToManager.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Gets TimeRanges for the current media resource that has been played.
+ */
readonly played: TimeRanges;
/**
- * Gets or sets the current playback position, in seconds.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Resets the audio or video object and loads a new media resource.
+ */
load(): void;
/**
- * Clears all effects from the media pipeline.
- */
+ * Clears all effects from the media pipeline.
+ */
msClearEffects(): void;
msGetAsCastingSource(): any;
/**
- * Inserts the specified audio effect into media pipeline.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
+ * Loads and starts playback of a media resource.
+ */
+ play(): Promise<void>;
setMediaKeys(mediaKeys: MediaKeys | null): Promise<void>;
readonly HAVE_CURRENT_DATA: number;
readonly HAVE_ENOUGH_DATA: number;
@@ -5775,7 +5815,7 @@ declare var HTMLMediaElement: {
readonly NETWORK_IDLE: number;
readonly NETWORK_LOADING: number;
readonly NETWORK_NO_SOURCE: number;
-}
+};
interface HTMLMenuElement extends HTMLElement {
compact: boolean;
@@ -5787,32 +5827,32 @@ interface HTMLMenuElement extends HTMLElement {
declare var HTMLMenuElement: {
prototype: HTMLMenuElement;
new(): HTMLMenuElement;
-}
+};
interface HTMLMetaElement extends HTMLElement {
/**
- * Sets or retrieves the character set used to encode the object.
- */
+ * Sets or retrieves the character set used to encode the object.
+ */
charset: string;
/**
- * Gets or sets meta-information to associate with httpEquiv or name.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -5821,7 +5861,7 @@ interface HTMLMetaElement extends HTMLElement {
declare var HTMLMetaElement: {
prototype: HTMLMetaElement;
new(): HTMLMetaElement;
-}
+};
interface HTMLMeterElement extends HTMLElement {
high: number;
@@ -5837,16 +5877,16 @@ interface HTMLMeterElement extends HTMLElement {
declare var HTMLMeterElement: {
prototype: HTMLMeterElement;
new(): HTMLMeterElement;
-}
+};
interface HTMLModElement extends HTMLElement {
/**
- * Sets or retrieves reference information about the object.
- */
+ * Sets or retrieves reference information about the object.
+ */
cite: string;
/**
- * Sets or retrieves the date and time of a modification to the object.
- */
+ * 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;
@@ -5855,131 +5895,115 @@ interface HTMLModElement extends HTMLElement {
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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves a character string that can be used to implement your own archive functionality for the object.
+ */
archive: string;
+ /**
+ * 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;
border: string;
/**
- * Sets or retrieves the URL of the file containing the compiled Java class.
- */
+ * Sets or retrieves the URL of the file containing the compiled Java class.
+ */
code: string;
/**
- * Sets or retrieves the URL of the component.
- */
+ * Sets or retrieves the URL of the component.
+ */
codeBase: string;
/**
- * Sets or retrieves the Internet media type for the code associated with the object.
- */
+ * 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.
- */
+ * Retrieves the document object of the page or frame.
+ */
readonly contentDocument: Document;
/**
- * Sets or retrieves the URL that references the data of the object.
- */
+ * 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.
- */
+ * Retrieves a reference to the form that the object is embedded in.
+ */
readonly form: HTMLFormElement;
/**
- * Sets or retrieves the height of the object.
- */
+ * Sets or retrieves the height of the object.
+ */
height: string;
hspace: number;
/**
- * Gets or sets whether the DLNA PlayTo device is available.
- */
+ * 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.
- */
+ * 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.
- */
+ * Gets or sets the primary DLNA PlayTo device.
+ */
msPlayToPrimary: boolean;
/**
- * Gets the source associated with the media element for use by the PlayToManager.
- */
+ * Gets the source associated with the media element for use by the PlayToManager.
+ */
readonly msPlayToSource: any;
/**
- * Sets or retrieves the name of the object.
- */
+ * 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.
- */
+ * Sets or retrieves a message to be displayed while an object is loading.
+ */
standby: string;
/**
- * Sets or retrieves the MIME type of the object.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the width of the object.
+ */
width: string;
/**
- * Returns whether an element will successfully validate based on forms validation rules and constraints.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -5988,37 +6012,53 @@ interface HTMLObjectElement extends HTMLElement, GetSVGDocument {
declare var HTMLObjectElement: {
prototype: HTMLObjectElement;
new(): HTMLObjectElement;
+};
+
+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 HTMLOptGroupElement extends HTMLElement {
/**
- * Sets or retrieves the status of an option.
- */
+ * Sets or retrieves the status of an option.
+ */
defaultSelected: boolean;
disabled: boolean;
/**
- * Retrieves a reference to the form that the object is embedded in.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -6027,37 +6067,37 @@ interface HTMLOptGroupElement extends HTMLElement {
declare var HTMLOptGroupElement: {
prototype: HTMLOptGroupElement;
new(): HTMLOptGroupElement;
-}
+};
interface HTMLOptionElement extends HTMLElement {
/**
- * Sets or retrieves the status of an option.
- */
+ * Sets or retrieves the status of an option.
+ */
defaultSelected: boolean;
disabled: boolean;
/**
- * Retrieves a reference to the form that the object is embedded in.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -6066,7 +6106,7 @@ interface HTMLOptionElement extends HTMLElement {
declare var HTMLOptionElement: {
prototype: HTMLOptionElement;
new(): HTMLOptionElement;
-}
+};
interface HTMLOptionsCollection extends HTMLCollectionOf<HTMLOptionElement> {
length: number;
@@ -6078,7 +6118,7 @@ interface HTMLOptionsCollection extends HTMLCollectionOf<HTMLOptionElement> {
declare var HTMLOptionsCollection: {
prototype: HTMLOptionsCollection;
new(): HTMLOptionsCollection;
-}
+};
interface HTMLOutputElement extends HTMLElement {
defaultValue: string;
@@ -6100,12 +6140,12 @@ interface HTMLOutputElement extends HTMLElement {
declare var HTMLOutputElement: {
prototype: HTMLOutputElement;
new(): HTMLOutputElement;
-}
+};
interface HTMLParagraphElement extends HTMLElement {
/**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
+ * 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;
@@ -6115,24 +6155,24 @@ interface HTMLParagraphElement extends HTMLElement {
declare var HTMLParagraphElement: {
prototype: HTMLParagraphElement;
new(): HTMLParagraphElement;
-}
+};
interface HTMLParamElement extends HTMLElement {
/**
- * Sets or retrieves the name of an input parameter for an element.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the value of an input parameter for an element.
+ */
value: string;
/**
- * Sets or retrieves the data type of the value attribute.
- */
+ * 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;
@@ -6141,7 +6181,7 @@ interface HTMLParamElement extends HTMLElement {
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;
@@ -6151,12 +6191,12 @@ interface HTMLPictureElement extends HTMLElement {
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.
- */
+ * 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;
@@ -6165,24 +6205,24 @@ interface HTMLPreElement extends HTMLElement {
declare var HTMLPreElement: {
prototype: HTMLPreElement;
new(): HTMLPreElement;
-}
+};
interface HTMLProgressElement extends HTMLElement {
/**
- * Retrieves a reference to the form that the object is embedded in.
- */
+ * 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.
- */
+ * 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).
- */
+ * 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.
- */
+ * 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;
@@ -6191,12 +6231,12 @@ interface HTMLProgressElement extends HTMLElement {
declare var HTMLProgressElement: {
prototype: HTMLProgressElement;
new(): HTMLProgressElement;
-}
+};
interface HTMLQuoteElement extends HTMLElement {
/**
- * Sets or retrieves reference information about the object.
- */
+ * 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;
@@ -6205,38 +6245,38 @@ interface HTMLQuoteElement extends HTMLElement {
declare var HTMLQuoteElement: {
prototype: HTMLQuoteElement;
new(): HTMLQuoteElement;
-}
+};
interface HTMLScriptElement extends HTMLElement {
async: boolean;
/**
- * Sets or retrieves the character set used to encode the object.
- */
+ * Sets or retrieves the character set used to encode the object.
+ */
charset: string;
crossOrigin: string | null;
/**
- * Sets or retrieves the status of the script.
- */
+ * Sets or retrieves the status of the script.
+ */
defer: boolean;
/**
- * Sets or retrieves the event for which the script is written.
- */
+ * 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.
- */
+ /**
+ * 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.
- */
+ * 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.
- */
+ * Retrieves or sets the text of the object as a string.
+ */
text: string;
/**
- * Sets or retrieves the MIME type for the associated scripting engine.
- */
+ * 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;
@@ -6246,94 +6286,94 @@ interface HTMLScriptElement extends HTMLElement {
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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -6343,18 +6383,18 @@ interface HTMLSelectElement extends HTMLElement {
declare var HTMLSelectElement: {
prototype: HTMLSelectElement;
new(): HTMLSelectElement;
-}
+};
interface HTMLSourceElement extends HTMLElement {
/**
- * Gets or sets the intended media type of the media source.
+ * 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.
- */
+ * The address or URL of the a media resource that is to be considered.
+ */
src: string;
srcset: string;
/**
@@ -6368,7 +6408,7 @@ interface HTMLSourceElement extends HTMLElement {
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;
@@ -6378,17 +6418,17 @@ interface HTMLSpanElement extends HTMLElement {
declare var HTMLSpanElement: {
prototype: HTMLSpanElement;
new(): HTMLSpanElement;
-}
+};
interface HTMLStyleElement extends HTMLElement, LinkStyle {
disabled: boolean;
/**
- * Sets or retrieves the media type.
- */
+ * Sets or retrieves the media type.
+ */
media: string;
/**
- * Retrieves the CSS language in which the style sheet is written.
- */
+ * 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;
@@ -6397,16 +6437,16 @@ interface HTMLStyleElement extends HTMLElement, LinkStyle {
declare var HTMLStyleElement: {
prototype: HTMLStyleElement;
new(): HTMLStyleElement;
-}
+};
interface HTMLTableCaptionElement extends HTMLElement {
/**
- * Sets or retrieves the alignment of the caption or legend.
- */
+ * 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.
- */
+ * 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;
@@ -6415,53 +6455,53 @@ interface HTMLTableCaptionElement extends HTMLElement {
declare var HTMLTableCaptionElement: {
prototype: HTMLTableCaptionElement;
new(): HTMLTableCaptionElement;
-}
+};
interface HTMLTableCellElement extends HTMLElement, HTMLTableAlignment {
/**
- * Sets or retrieves abbreviated text for the object.
- */
+ * Sets or retrieves abbreviated text for the object.
+ */
abbr: string;
/**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves a list of header cells that provide information for the object.
+ */
headers: string;
/**
- * Sets or retrieves the height of the object.
- */
+ * Sets or retrieves the height of the object.
+ */
height: any;
/**
- * Sets or retrieves whether the browser automatically performs wordwrap.
- */
+ * Sets or retrieves whether the browser automatically performs wordwrap.
+ */
noWrap: boolean;
/**
- * Sets or retrieves how many rows in a table the cell should span.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -6470,20 +6510,20 @@ interface HTMLTableCellElement extends HTMLElement, HTMLTableAlignment {
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.
- */
+ * 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.
- */
+ * Sets or retrieves the number of columns in the group.
+ */
span: number;
/**
- * Sets or retrieves the width of the object.
- */
+ * 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;
@@ -6492,7 +6532,7 @@ interface HTMLTableColElement extends HTMLElement, HTMLTableAlignment {
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;
@@ -6502,111 +6542,111 @@ 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.
- */
+ * 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.
- */
+ * Sets or retrieves the width of the border to draw around the object.
+ */
border: string;
/**
- * Sets or retrieves the border color of the object.
- */
+ * Sets or retrieves the border color of the object.
+ */
borderColor: any;
/**
- * Retrieves the caption object of a table.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the amount of space between cells in a table.
+ */
cellSpacing: string;
/**
- * Sets or retrieves the number of columns in the table.
- */
+ * 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.
- */
+ * Sets or retrieves the way the border frame around the table is displayed.
+ */
frame: string;
/**
- * Sets or retrieves the height of the object.
- */
+ * Sets or retrieves the height of the object.
+ */
height: any;
/**
- * Sets or retrieves the number of horizontal rows contained in the object.
- */
+ * 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.
- */
+ * Sets or retrieves which dividing lines (inner borders) are displayed.
+ */
rules: string;
/**
- * Sets or retrieves a description and/or structure of the object.
- */
+ * 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.
- */
+ * 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.
- */
+ * Retrieves the tFoot object of the table.
+ */
tFoot: HTMLTableSectionElement;
/**
- * Retrieves the tHead object of the table.
- */
+ * Retrieves the tHead object of the table.
+ */
tHead: HTMLTableSectionElement;
/**
- * Sets or retrieves the width of the object.
- */
+ * Sets or retrieves the width of the object.
+ */
width: string;
/**
- * Creates an empty caption element in the table.
- */
+ * Creates an empty caption element in the table.
+ */
createCaption(): HTMLTableCaptionElement;
/**
- * Creates an empty tBody element in the table.
- */
+ * Creates an empty tBody element in the table.
+ */
createTBody(): HTMLTableSectionElement;
/**
- * Creates an empty tFoot element in the table.
- */
+ * Creates an empty tFoot element in the table.
+ */
createTFoot(): HTMLTableSectionElement;
/**
- * Returns the tHead element object if successful, or null otherwise.
- */
+ * Returns the tHead element object if successful, or null otherwise.
+ */
createTHead(): HTMLTableSectionElement;
/**
- * Deletes the caption element and its contents from the table.
- */
+ * 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.
- */
+ * 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.
- */
+ * Deletes the tFoot element and its contents from the table.
+ */
deleteTFoot(): void;
/**
- * Deletes the tHead element and its contents from the table.
- */
+ * 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.
- */
+ * 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;
@@ -6615,12 +6655,12 @@ interface HTMLTableElement extends HTMLElement {
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.
- */
+ * 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;
@@ -6629,39 +6669,39 @@ interface HTMLTableHeaderCellElement extends HTMLTableCellElement {
declare var HTMLTableHeaderCellElement: {
prototype: HTMLTableHeaderCellElement;
new(): HTMLTableHeaderCellElement;
-}
+};
interface HTMLTableRowElement extends HTMLElement, HTMLTableAlignment {
/**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
+ * 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.
- */
+ * Retrieves a collection of all cells in the table row.
+ */
cells: HTMLCollectionOf<HTMLTableDataCellElement | HTMLTableHeaderCellElement>;
/**
- * Sets or retrieves the height of the object.
- */
+ * Sets or retrieves the height of the object.
+ */
height: any;
/**
- * Retrieves the position of the object in the rows collection for the table.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -6670,26 +6710,26 @@ interface HTMLTableRowElement extends HTMLElement, HTMLTableAlignment {
declare var HTMLTableRowElement: {
prototype: HTMLTableRowElement;
new(): HTMLTableRowElement;
-}
+};
interface HTMLTableSectionElement extends HTMLElement, HTMLTableAlignment {
/**
- * Sets or retrieves a value that indicates the table alignment.
- */
+ * Sets or retrieves a value that indicates the table alignment.
+ */
align: string;
/**
- * Sets or retrieves the number of horizontal rows contained in the object.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -6698,7 +6738,7 @@ interface HTMLTableSectionElement extends HTMLElement, HTMLTableAlignment {
declare var HTMLTableSectionElement: {
prototype: HTMLTableSectionElement;
new(): HTMLTableSectionElement;
-}
+};
interface HTMLTemplateElement extends HTMLElement {
readonly content: DocumentFragment;
@@ -6709,105 +6749,105 @@ interface HTMLTemplateElement extends HTMLElement {
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.
- */
+ * 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.
- */
+ * Sets or retrieves the width of the object.
+ */
cols: number;
/**
- * Sets or retrieves the initial contents of the object.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the value indicating whether the control is selected.
+ */
status: any;
/**
- * Retrieves the type of control.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -6816,7 +6856,7 @@ interface HTMLTextAreaElement extends HTMLElement {
declare var HTMLTextAreaElement: {
prototype: HTMLTextAreaElement;
new(): HTMLTextAreaElement;
-}
+};
interface HTMLTimeElement extends HTMLElement {
dateTime: string;
@@ -6827,12 +6867,12 @@ interface HTMLTimeElement extends HTMLElement {
declare var HTMLTimeElement: {
prototype: HTMLTimeElement;
new(): HTMLTimeElement;
-}
+};
interface HTMLTitleElement extends HTMLElement {
/**
- * Retrieves or sets the text of the object as a string.
- */
+ * 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;
@@ -6841,7 +6881,7 @@ interface HTMLTitleElement extends HTMLElement {
declare var HTMLTitleElement: {
prototype: HTMLTitleElement;
new(): HTMLTitleElement;
-}
+};
interface HTMLTrackElement extends HTMLElement {
default: boolean;
@@ -6866,7 +6906,7 @@ declare var HTMLTrackElement: {
readonly LOADED: number;
readonly LOADING: number;
readonly NONE: number;
-}
+};
interface HTMLUListElement extends HTMLElement {
compact: boolean;
@@ -6878,7 +6918,7 @@ interface HTMLUListElement extends HTMLElement {
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;
@@ -6888,7 +6928,7 @@ interface HTMLUnknownElement extends HTMLElement {
declare var HTMLUnknownElement: {
prototype: HTMLUnknownElement;
new(): HTMLUnknownElement;
-}
+};
interface HTMLVideoElementEventMap extends HTMLMediaElementEventMap {
"MSVideoFormatChanged": Event;
@@ -6898,8 +6938,8 @@ interface HTMLVideoElementEventMap extends HTMLMediaElementEventMap {
interface HTMLVideoElement extends HTMLMediaElement {
/**
- * Gets or sets the height of the video element.
- */
+ * Gets or sets the height of the video element.
+ */
height: number;
msHorizontalMirror: boolean;
readonly msIsLayoutOptimalForPlayback: boolean;
@@ -6911,31 +6951,31 @@ interface HTMLVideoElement extends HTMLMediaElement {
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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
+ 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;
}
@@ -6943,47 +6983,7 @@ interface HTMLVideoElement extends HTMLMediaElement {
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;
@@ -7007,7 +7007,7 @@ declare var IDBCursor: {
readonly NEXT_NO_DUPLICATE: string;
readonly PREV: string;
readonly PREV_NO_DUPLICATE: string;
-}
+};
interface IDBCursorWithValue extends IDBCursor {
readonly value: any;
@@ -7016,7 +7016,7 @@ interface IDBCursorWithValue extends IDBCursor {
declare var IDBCursorWithValue: {
prototype: IDBCursorWithValue;
new(): IDBCursorWithValue;
-}
+};
interface IDBDatabaseEventMap {
"abort": Event;
@@ -7033,7 +7033,7 @@ interface IDBDatabase extends EventTarget {
close(): void;
createObjectStore(name: string, optionalParameters?: IDBObjectStoreParameters): IDBObjectStore;
deleteObjectStore(name: string): void;
- transaction(storeNames: string | string[], mode?: string): IDBTransaction;
+ transaction(storeNames: string | string[], mode?: IDBTransactionMode): 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;
@@ -7042,7 +7042,7 @@ interface IDBDatabase extends EventTarget {
declare var IDBDatabase: {
prototype: IDBDatabase;
new(): IDBDatabase;
-}
+};
interface IDBFactory {
cmp(first: any, second: any): number;
@@ -7053,7 +7053,7 @@ interface IDBFactory {
declare var IDBFactory: {
prototype: IDBFactory;
new(): IDBFactory;
-}
+};
interface IDBIndex {
keyPath: string | string[];
@@ -7064,14 +7064,14 @@ interface IDBIndex {
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;
+ openCursor(range?: IDBKeyRange | IDBValidKey, direction?: IDBCursorDirection): IDBRequest;
+ openKeyCursor(range?: IDBKeyRange | IDBValidKey, direction?: IDBCursorDirection): IDBRequest;
}
declare var IDBIndex: {
prototype: IDBIndex;
new(): IDBIndex;
-}
+};
interface IDBKeyRange {
readonly lower: any;
@@ -7087,7 +7087,7 @@ declare var IDBKeyRange: {
lowerBound(lower: any, open?: boolean): IDBKeyRange;
only(value: any): IDBKeyRange;
upperBound(upper: any, open?: boolean): IDBKeyRange;
-}
+};
interface IDBObjectStore {
readonly indexNames: DOMStringList;
@@ -7103,14 +7103,14 @@ interface IDBObjectStore {
deleteIndex(indexName: string): void;
get(key: any): IDBRequest;
index(name: string): IDBIndex;
- openCursor(range?: IDBKeyRange | IDBValidKey, direction?: string): IDBRequest;
+ openCursor(range?: IDBKeyRange | IDBValidKey, direction?: IDBCursorDirection): IDBRequest;
put(value: any, key?: IDBKeyRange | IDBValidKey): IDBRequest;
}
declare var IDBObjectStore: {
prototype: IDBObjectStore;
new(): IDBObjectStore;
-}
+};
interface IDBOpenDBRequestEventMap extends IDBRequestEventMap {
"blocked": Event;
@@ -7127,7 +7127,7 @@ interface IDBOpenDBRequest extends IDBRequest {
declare var IDBOpenDBRequest: {
prototype: IDBOpenDBRequest;
new(): IDBOpenDBRequest;
-}
+};
interface IDBRequestEventMap {
"error": Event;
@@ -7135,7 +7135,7 @@ interface IDBRequestEventMap {
}
interface IDBRequest extends EventTarget {
- readonly error: DOMError;
+ readonly error: DOMException;
onerror: (this: IDBRequest, ev: Event) => any;
onsuccess: (this: IDBRequest, ev: Event) => any;
readonly readyState: IDBRequestReadyState;
@@ -7149,7 +7149,7 @@ interface IDBRequest extends EventTarget {
declare var IDBRequest: {
prototype: IDBRequest;
new(): IDBRequest;
-}
+};
interface IDBTransactionEventMap {
"abort": Event;
@@ -7159,7 +7159,7 @@ interface IDBTransactionEventMap {
interface IDBTransaction extends EventTarget {
readonly db: IDBDatabase;
- readonly error: DOMError;
+ readonly error: DOMException;
readonly mode: IDBTransactionMode;
onabort: (this: IDBTransaction, ev: Event) => any;
oncomplete: (this: IDBTransaction, ev: Event) => any;
@@ -7179,7 +7179,7 @@ declare var IDBTransaction: {
readonly READ_ONLY: string;
readonly READ_WRITE: string;
readonly VERSION_CHANGE: string;
-}
+};
interface IDBVersionChangeEvent extends Event {
readonly newVersion: number | null;
@@ -7189,7 +7189,7 @@ interface IDBVersionChangeEvent extends Event {
declare var IDBVersionChangeEvent: {
prototype: IDBVersionChangeEvent;
new(): IDBVersionChangeEvent;
-}
+};
interface IIRFilterNode extends AudioNode {
getFrequencyResponse(frequencyHz: Float32Array, magResponse: Float32Array, phaseResponse: Float32Array): void;
@@ -7198,7 +7198,7 @@ interface IIRFilterNode extends AudioNode {
declare var IIRFilterNode: {
prototype: IIRFilterNode;
new(): IIRFilterNode;
-}
+};
interface ImageData {
data: Uint8ClampedArray;
@@ -7210,7 +7210,7 @@ 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;
@@ -7225,7 +7225,7 @@ interface IntersectionObserver {
declare var IntersectionObserver: {
prototype: IntersectionObserver;
new(callback: IntersectionObserverCallback, options?: IntersectionObserverInit): IntersectionObserver;
-}
+};
interface IntersectionObserverEntry {
readonly boundingClientRect: ClientRect;
@@ -7239,7 +7239,7 @@ interface IntersectionObserverEntry {
declare var IntersectionObserverEntry: {
prototype: IntersectionObserverEntry;
new(intersectionObserverEntryInit: IntersectionObserverEntryInit): IntersectionObserverEntry;
-}
+};
interface KeyboardEvent extends UIEvent {
readonly altKey: boolean;
@@ -7274,7 +7274,7 @@ declare var KeyboardEvent: {
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;
@@ -7284,7 +7284,7 @@ interface ListeningStateChangedEvent extends Event {
declare var ListeningStateChangedEvent: {
prototype: ListeningStateChangedEvent;
new(): ListeningStateChangedEvent;
-}
+};
interface Location {
hash: string;
@@ -7305,7 +7305,7 @@ interface Location {
declare var Location: {
prototype: Location;
new(): Location;
-}
+};
interface LongRunningScriptDetectedEvent extends Event {
readonly executionTime: number;
@@ -7315,8 +7315,390 @@ interface LongRunningScriptDetectedEvent extends Event {
declare var LongRunningScriptDetectedEvent: {
prototype: LongRunningScriptDetectedEvent;
new(): LongRunningScriptDetectedEvent;
+};
+
+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 MediaKeys {
+ createSession(sessionType?: MediaKeySessionType): MediaKeySession;
+ setServerCertificate(serverCertificate: any): Promise<void>;
+}
+
+declare var MediaKeys: {
+ prototype: MediaKeys;
+ new(): MediaKeys;
+};
+
+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 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 MSApp {
clearTemporaryWebDataAsync(): MSAppAsyncOperation;
createBlobFromRandomAccessStream(type: string, seeker: any): Blob;
@@ -7365,7 +7747,7 @@ declare var MSAppAsyncOperation: {
readonly COMPLETED: number;
readonly ERROR: number;
readonly STARTED: number;
-}
+};
interface MSAssertion {
readonly id: string;
@@ -7375,7 +7757,7 @@ interface MSAssertion {
declare var MSAssertion: {
prototype: MSAssertion;
new(): MSAssertion;
-}
+};
interface MSBlobBuilder {
append(data: any, endings?: string): void;
@@ -7385,7 +7767,7 @@ interface MSBlobBuilder {
declare var MSBlobBuilder: {
prototype: MSBlobBuilder;
new(): MSBlobBuilder;
-}
+};
interface MSCredentials {
getAssertion(challenge: string, filter?: MSCredentialFilter, params?: MSSignatureParameters): Promise<MSAssertion>;
@@ -7395,7 +7777,7 @@ interface MSCredentials {
declare var MSCredentials: {
prototype: MSCredentials;
new(): MSCredentials;
-}
+};
interface MSFIDOCredentialAssertion extends MSAssertion {
readonly algorithm: string | Algorithm;
@@ -7407,7 +7789,7 @@ interface MSFIDOCredentialAssertion extends MSAssertion {
declare var MSFIDOCredentialAssertion: {
prototype: MSFIDOCredentialAssertion;
new(): MSFIDOCredentialAssertion;
-}
+};
interface MSFIDOSignature {
readonly authnrData: string;
@@ -7418,7 +7800,7 @@ interface MSFIDOSignature {
declare var MSFIDOSignature: {
prototype: MSFIDOSignature;
new(): MSFIDOSignature;
-}
+};
interface MSFIDOSignatureAssertion extends MSAssertion {
readonly signature: MSFIDOSignature;
@@ -7427,7 +7809,7 @@ interface MSFIDOSignatureAssertion extends MSAssertion {
declare var MSFIDOSignatureAssertion: {
prototype: MSFIDOSignatureAssertion;
new(): MSFIDOSignatureAssertion;
-}
+};
interface MSGesture {
target: Element;
@@ -7438,7 +7820,7 @@ interface MSGesture {
declare var MSGesture: {
prototype: MSGesture;
new(): MSGesture;
-}
+};
interface MSGestureEvent extends UIEvent {
readonly clientX: number;
@@ -7474,7 +7856,7 @@ declare var MSGestureEvent: {
readonly MSGESTURE_FLAG_END: number;
readonly MSGESTURE_FLAG_INERTIA: number;
readonly MSGESTURE_FLAG_NONE: number;
-}
+};
interface MSGraphicsTrust {
readonly constrictionActive: boolean;
@@ -7484,7 +7866,7 @@ interface MSGraphicsTrust {
declare var MSGraphicsTrust: {
prototype: MSGraphicsTrust;
new(): MSGraphicsTrust;
-}
+};
interface MSHTMLWebViewElement extends HTMLElement {
readonly canGoBack: boolean;
@@ -7518,7 +7900,7 @@ interface MSHTMLWebViewElement extends HTMLElement {
declare var MSHTMLWebViewElement: {
prototype: MSHTMLWebViewElement;
new(): MSHTMLWebViewElement;
-}
+};
interface MSInputMethodContextEventMap {
"MSCandidateWindowHide": Event;
@@ -7544,7 +7926,7 @@ interface MSInputMethodContext extends EventTarget {
declare var MSInputMethodContext: {
prototype: MSInputMethodContext;
new(): MSInputMethodContext;
-}
+};
interface MSManipulationEvent extends UIEvent {
readonly currentState: number;
@@ -7573,7 +7955,7 @@ declare var MSManipulationEvent: {
readonly MS_MANIPULATION_STATE_PRESELECT: number;
readonly MS_MANIPULATION_STATE_SELECTING: number;
readonly MS_MANIPULATION_STATE_STOPPED: number;
-}
+};
interface MSMediaKeyError {
readonly code: number;
@@ -7595,7 +7977,7 @@ declare var MSMediaKeyError: {
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;
@@ -7605,7 +7987,7 @@ interface MSMediaKeyMessageEvent extends Event {
declare var MSMediaKeyMessageEvent: {
prototype: MSMediaKeyMessageEvent;
new(): MSMediaKeyMessageEvent;
-}
+};
interface MSMediaKeyNeededEvent extends Event {
readonly initData: Uint8Array | null;
@@ -7614,8 +7996,20 @@ interface MSMediaKeyNeededEvent extends Event {
declare var MSMediaKeyNeededEvent: {
prototype: MSMediaKeyNeededEvent;
new(): MSMediaKeyNeededEvent;
+};
+
+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 MSMediaKeySession extends EventTarget {
readonly error: MSMediaKeyError | null;
readonly keySystem: string;
@@ -7627,19 +8021,7 @@ interface MSMediaKeySession extends EventTarget {
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;
@@ -7662,7 +8044,7 @@ interface MSPointerEvent extends MouseEvent {
declare var MSPointerEvent: {
prototype: MSPointerEvent;
new(typeArg: string, eventInitDict?: PointerEventInit): MSPointerEvent;
-}
+};
interface MSRangeCollection {
readonly length: number;
@@ -7673,7 +8055,7 @@ interface MSRangeCollection {
declare var MSRangeCollection: {
prototype: MSRangeCollection;
new(): MSRangeCollection;
-}
+};
interface MSSiteModeEvent extends Event {
readonly actionURL: string;
@@ -7683,7 +8065,7 @@ interface MSSiteModeEvent extends Event {
declare var MSSiteModeEvent: {
prototype: MSSiteModeEvent;
new(): MSSiteModeEvent;
-}
+};
interface MSStream {
readonly type: string;
@@ -7694,7 +8076,7 @@ interface MSStream {
declare var MSStream: {
prototype: MSStream;
new(): MSStream;
-}
+};
interface MSStreamReader extends EventTarget, MSBaseReader {
readonly error: DOMError;
@@ -7710,7 +8092,7 @@ interface MSStreamReader extends EventTarget, MSBaseReader {
declare var MSStreamReader: {
prototype: MSStreamReader;
new(): MSStreamReader;
-}
+};
interface MSWebViewAsyncOperationEventMap {
"complete": Event;
@@ -7745,7 +8127,7 @@ declare var MSWebViewAsyncOperation: {
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;
@@ -7755,389 +8137,7 @@ interface MSWebViewSettings {
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;
@@ -8157,7 +8157,7 @@ declare var MutationEvent: {
readonly ADDITION: number;
readonly MODIFICATION: number;
readonly REMOVAL: number;
-}
+};
interface MutationObserver {
disconnect(): void;
@@ -8168,7 +8168,7 @@ interface MutationObserver {
declare var MutationObserver: {
prototype: MutationObserver;
new(callback: MutationCallback): MutationObserver;
-}
+};
interface MutationRecord {
readonly addedNodes: NodeList;
@@ -8185,7 +8185,7 @@ interface MutationRecord {
declare var MutationRecord: {
prototype: MutationRecord;
new(): MutationRecord;
-}
+};
interface NamedNodeMap {
readonly length: number;
@@ -8202,7 +8202,7 @@ interface NamedNodeMap {
declare var NamedNodeMap: {
prototype: NamedNodeMap;
new(): NamedNodeMap;
-}
+};
interface NavigationCompletedEvent extends NavigationEvent {
readonly isSuccess: boolean;
@@ -8212,7 +8212,7 @@ interface NavigationCompletedEvent extends NavigationEvent {
declare var NavigationCompletedEvent: {
prototype: NavigationCompletedEvent;
new(): NavigationCompletedEvent;
-}
+};
interface NavigationEvent extends Event {
readonly uri: string;
@@ -8221,7 +8221,7 @@ interface NavigationEvent extends Event {
declare var NavigationEvent: {
prototype: NavigationEvent;
new(): NavigationEvent;
-}
+};
interface NavigationEventWithReferrer extends NavigationEvent {
readonly referer: string;
@@ -8230,7 +8230,7 @@ interface NavigationEventWithReferrer extends NavigationEvent {
declare var NavigationEventWithReferrer: {
prototype: NavigationEventWithReferrer;
new(): NavigationEventWithReferrer;
-}
+};
interface Navigator extends Object, NavigatorID, NavigatorOnLine, NavigatorContentUtils, NavigatorStorageUtils, NavigatorGeolocation, MSNavigatorDoNotTrack, MSFileSaver, NavigatorBeacon, NavigatorConcurrentHardware, NavigatorUserMedia {
readonly authentication: WebAuthentication;
@@ -8247,6 +8247,7 @@ interface Navigator extends Object, NavigatorID, NavigatorOnLine, NavigatorConte
readonly serviceWorker: ServiceWorkerContainer;
readonly webdriver: boolean;
readonly hardwareConcurrency: number;
+ readonly languages: string[];
getGamepads(): Gamepad[];
javaEnabled(): boolean;
msLaunchUri(uri: string, successCallback?: MSLaunchUriCallback, noHandlerCallback?: MSLaunchUriCallback): void;
@@ -8257,7 +8258,7 @@ interface Navigator extends Object, NavigatorID, NavigatorOnLine, NavigatorConte
declare var Navigator: {
prototype: Navigator;
new(): Navigator;
-}
+};
interface Node extends EventTarget {
readonly attributes: NamedNodeMap;
@@ -8332,7 +8333,7 @@ declare var Node: {
readonly NOTATION_NODE: number;
readonly PROCESSING_INSTRUCTION_NODE: number;
readonly TEXT_NODE: number;
-}
+};
interface NodeFilter {
acceptNode(n: Node): number;
@@ -8355,7 +8356,7 @@ declare var NodeFilter: {
readonly SHOW_NOTATION: number;
readonly SHOW_PROCESSING_INSTRUCTION: number;
readonly SHOW_TEXT: number;
-}
+};
interface NodeIterator {
readonly expandEntityReferences: boolean;
@@ -8370,7 +8371,7 @@ interface NodeIterator {
declare var NodeIterator: {
prototype: NodeIterator;
new(): NodeIterator;
-}
+};
interface NodeList {
readonly length: number;
@@ -8381,7 +8382,7 @@ interface NodeList {
declare var NodeList: {
prototype: NodeList;
new(): NodeList;
-}
+};
interface NotificationEventMap {
"click": Event;
@@ -8411,7 +8412,7 @@ declare var Notification: {
prototype: Notification;
new(title: string, options?: NotificationOptions): Notification;
requestPermission(callback?: NotificationPermissionCallback): Promise<NotificationPermission>;
-}
+};
interface OES_element_index_uint {
}
@@ -8419,7 +8420,7 @@ 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;
@@ -8429,7 +8430,7 @@ declare var OES_standard_derivatives: {
prototype: OES_standard_derivatives;
new(): OES_standard_derivatives;
readonly FRAGMENT_SHADER_DERIVATIVE_HINT_OES: number;
-}
+};
interface OES_texture_float {
}
@@ -8437,7 +8438,7 @@ interface OES_texture_float {
declare var OES_texture_float: {
prototype: OES_texture_float;
new(): OES_texture_float;
-}
+};
interface OES_texture_float_linear {
}
@@ -8445,7 +8446,7 @@ 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;
@@ -8455,7 +8456,7 @@ 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 {
}
@@ -8463,7 +8464,7 @@ 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;
@@ -8472,7 +8473,7 @@ interface OfflineAudioCompletionEvent extends Event {
declare var OfflineAudioCompletionEvent: {
prototype: OfflineAudioCompletionEvent;
new(): OfflineAudioCompletionEvent;
-}
+};
interface OfflineAudioContextEventMap extends AudioContextEventMap {
"complete": OfflineAudioCompletionEvent;
@@ -8490,7 +8491,7 @@ interface OfflineAudioContext extends AudioContextBase {
declare var OfflineAudioContext: {
prototype: OfflineAudioContext;
new(numberOfChannels: number, length: number, sampleRate: number): OfflineAudioContext;
-}
+};
interface OscillatorNodeEventMap {
"ended": MediaStreamErrorEvent;
@@ -8511,7 +8512,7 @@ interface OscillatorNode extends AudioNode {
declare var OscillatorNode: {
prototype: OscillatorNode;
new(): OscillatorNode;
-}
+};
interface OverflowEvent extends UIEvent {
readonly horizontalOverflow: boolean;
@@ -8528,7 +8529,7 @@ declare var OverflowEvent: {
readonly BOTH: number;
readonly HORIZONTAL: number;
readonly VERTICAL: number;
-}
+};
interface PageTransitionEvent extends Event {
readonly persisted: boolean;
@@ -8537,7 +8538,7 @@ interface PageTransitionEvent extends Event {
declare var PageTransitionEvent: {
prototype: PageTransitionEvent;
new(): PageTransitionEvent;
-}
+};
interface PannerNode extends AudioNode {
coneInnerAngle: number;
@@ -8556,7 +8557,7 @@ interface PannerNode extends AudioNode {
declare var PannerNode: {
prototype: PannerNode;
new(): PannerNode;
-}
+};
interface Path2D extends Object, CanvasPathMethods {
}
@@ -8564,7 +8565,7 @@ interface Path2D extends Object, CanvasPathMethods {
declare var Path2D: {
prototype: Path2D;
new(path?: Path2D): Path2D;
-}
+};
interface PaymentAddress {
readonly addressLine: string[];
@@ -8584,7 +8585,7 @@ interface PaymentAddress {
declare var PaymentAddress: {
prototype: PaymentAddress;
new(): PaymentAddress;
-}
+};
interface PaymentRequestEventMap {
"shippingaddresschange": Event;
@@ -8606,7 +8607,7 @@ interface PaymentRequest extends EventTarget {
declare var PaymentRequest: {
prototype: PaymentRequest;
new(methodData: PaymentMethodData[], details: PaymentDetails, options?: PaymentOptions): PaymentRequest;
-}
+};
interface PaymentRequestUpdateEvent extends Event {
updateWith(d: Promise<PaymentDetails>): void;
@@ -8615,7 +8616,7 @@ interface PaymentRequestUpdateEvent extends Event {
declare var PaymentRequestUpdateEvent: {
prototype: PaymentRequestUpdateEvent;
new(type: string, eventInitDict?: PaymentRequestUpdateEventInit): PaymentRequestUpdateEvent;
-}
+};
interface PaymentResponse {
readonly details: any;
@@ -8632,36 +8633,7 @@ interface PaymentResponse {
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;
@@ -8684,7 +8656,7 @@ interface Performance {
declare var Performance: {
prototype: Performance;
new(): Performance;
-}
+};
interface PerformanceEntry {
readonly duration: number;
@@ -8696,7 +8668,7 @@ interface PerformanceEntry {
declare var PerformanceEntry: {
prototype: PerformanceEntry;
new(): PerformanceEntry;
-}
+};
interface PerformanceMark extends PerformanceEntry {
}
@@ -8704,7 +8676,7 @@ interface PerformanceMark extends PerformanceEntry {
declare var PerformanceMark: {
prototype: PerformanceMark;
new(): PerformanceMark;
-}
+};
interface PerformanceMeasure extends PerformanceEntry {
}
@@ -8712,7 +8684,7 @@ interface PerformanceMeasure extends PerformanceEntry {
declare var PerformanceMeasure: {
prototype: PerformanceMeasure;
new(): PerformanceMeasure;
-}
+};
interface PerformanceNavigation {
readonly redirectCount: number;
@@ -8731,18 +8703,18 @@ declare var PerformanceNavigation: {
readonly TYPE_NAVIGATE: number;
readonly TYPE_RELOAD: number;
readonly TYPE_RESERVED: number;
-}
+};
interface PerformanceNavigationTiming extends PerformanceEntry {
readonly connectEnd: number;
readonly connectStart: number;
+ readonly domainLookupEnd: number;
+ readonly domainLookupStart: 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;
@@ -8761,7 +8733,7 @@ interface PerformanceNavigationTiming extends PerformanceEntry {
declare var PerformanceNavigationTiming: {
prototype: PerformanceNavigationTiming;
new(): PerformanceNavigationTiming;
-}
+};
interface PerformanceResourceTiming extends PerformanceEntry {
readonly connectEnd: number;
@@ -8780,18 +8752,18 @@ interface PerformanceResourceTiming extends PerformanceEntry {
declare var PerformanceResourceTiming: {
prototype: PerformanceResourceTiming;
new(): PerformanceResourceTiming;
-}
+};
interface PerformanceTiming {
readonly connectEnd: number;
readonly connectStart: number;
+ readonly domainLookupEnd: number;
+ readonly domainLookupStart: 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;
@@ -8811,15 +8783,44 @@ interface PerformanceTiming {
declare var PerformanceTiming: {
prototype: PerformanceTiming;
new(): PerformanceTiming;
+};
+
+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 PeriodicWave {
}
declare var PeriodicWave: {
prototype: PeriodicWave;
new(): PeriodicWave;
-}
+};
interface PermissionRequest extends DeferredPermissionRequest {
readonly state: MSWebViewPermissionState;
@@ -8829,7 +8830,7 @@ interface PermissionRequest extends DeferredPermissionRequest {
declare var PermissionRequest: {
prototype: PermissionRequest;
new(): PermissionRequest;
-}
+};
interface PermissionRequestedEvent extends Event {
readonly permissionRequest: PermissionRequest;
@@ -8838,7 +8839,7 @@ interface PermissionRequestedEvent extends Event {
declare var PermissionRequestedEvent: {
prototype: PermissionRequestedEvent;
new(): PermissionRequestedEvent;
-}
+};
interface Plugin {
readonly description: string;
@@ -8854,7 +8855,7 @@ interface Plugin {
declare var Plugin: {
prototype: Plugin;
new(): Plugin;
-}
+};
interface PluginArray {
readonly length: number;
@@ -8867,7 +8868,7 @@ interface PluginArray {
declare var PluginArray: {
prototype: PluginArray;
new(): PluginArray;
-}
+};
interface PointerEvent extends MouseEvent {
readonly currentPoint: any;
@@ -8890,7 +8891,7 @@ interface PointerEvent extends MouseEvent {
declare var PointerEvent: {
prototype: PointerEvent;
new(typeArg: string, eventInitDict?: PointerEventInit): PointerEvent;
-}
+};
interface PopStateEvent extends Event {
readonly state: any;
@@ -8900,7 +8901,7 @@ interface PopStateEvent extends Event {
declare var PopStateEvent: {
prototype: PopStateEvent;
new(typeArg: string, eventInitDict?: PopStateEventInit): PopStateEvent;
-}
+};
interface Position {
readonly coords: Coordinates;
@@ -8910,7 +8911,7 @@ interface Position {
declare var Position: {
prototype: Position;
new(): Position;
-}
+};
interface PositionError {
readonly code: number;
@@ -8927,7 +8928,7 @@ declare var PositionError: {
readonly PERMISSION_DENIED: number;
readonly POSITION_UNAVAILABLE: number;
readonly TIMEOUT: number;
-}
+};
interface ProcessingInstruction extends CharacterData {
readonly target: string;
@@ -8936,7 +8937,7 @@ interface ProcessingInstruction extends CharacterData {
declare var ProcessingInstruction: {
prototype: ProcessingInstruction;
new(): ProcessingInstruction;
-}
+};
interface ProgressEvent extends Event {
readonly lengthComputable: boolean;
@@ -8948,7 +8949,7 @@ interface ProgressEvent extends Event {
declare var ProgressEvent: {
prototype: ProgressEvent;
new(type: string, eventInitDict?: ProgressEventInit): ProgressEvent;
-}
+};
interface PushManager {
getSubscription(): Promise<PushSubscription>;
@@ -8959,7 +8960,7 @@ interface PushManager {
declare var PushManager: {
prototype: PushManager;
new(): PushManager;
-}
+};
interface PushSubscription {
readonly endpoint: USVString;
@@ -8972,7 +8973,7 @@ interface PushSubscription {
declare var PushSubscription: {
prototype: PushSubscription;
new(): PushSubscription;
-}
+};
interface PushSubscriptionOptions {
readonly applicationServerKey: ArrayBuffer | null;
@@ -8982,17 +8983,114 @@ interface PushSubscriptionOptions {
declare var PushSubscriptionOptions: {
prototype: PushSubscriptionOptions;
new(): PushSubscriptionOptions;
+};
+
+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;
}
-interface RTCDTMFToneChangeEvent extends Event {
- readonly tone: string;
+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 RTCDTMFToneChangeEvent: {
- prototype: RTCDTMFToneChangeEvent;
- new(typeArg: string, eventInitDict: RTCDTMFToneChangeEventInit): RTCDTMFToneChangeEvent;
+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;
+ error: () => Response;
+ redirect: (url: string, status?: number) => Response;
+};
+
interface RTCDtlsTransportEventMap {
"dtlsstatechange": RTCDtlsTransportStateChangedEvent;
"error": Event;
@@ -9015,7 +9113,7 @@ interface RTCDtlsTransport extends RTCStatsProvider {
declare var RTCDtlsTransport: {
prototype: RTCDtlsTransport;
new(transport: RTCIceTransport): RTCDtlsTransport;
-}
+};
interface RTCDtlsTransportStateChangedEvent extends Event {
readonly state: RTCDtlsTransportState;
@@ -9024,7 +9122,7 @@ interface RTCDtlsTransportStateChangedEvent extends Event {
declare var RTCDtlsTransportStateChangedEvent: {
prototype: RTCDtlsTransportStateChangedEvent;
new(): RTCDtlsTransportStateChangedEvent;
-}
+};
interface RTCDtmfSenderEventMap {
"tonechange": RTCDTMFToneChangeEvent;
@@ -9045,19 +9143,28 @@ interface RTCDtmfSender extends EventTarget {
declare var RTCDtmfSender: {
prototype: RTCDtmfSender;
new(sender: RTCRtpSender): RTCDtmfSender;
+};
+
+interface RTCDTMFToneChangeEvent extends Event {
+ readonly tone: string;
}
+declare var RTCDTMFToneChangeEvent: {
+ prototype: RTCDTMFToneChangeEvent;
+ new(typeArg: string, eventInitDict: RTCDTMFToneChangeEventInit): RTCDTMFToneChangeEvent;
+};
+
interface RTCIceCandidate {
candidate: string | null;
- sdpMLineIndex: number | null;
sdpMid: string | null;
+ sdpMLineIndex: number | null;
toJSON(): any;
}
declare var RTCIceCandidate: {
prototype: RTCIceCandidate;
new(candidateInitDict?: RTCIceCandidateInit): RTCIceCandidate;
-}
+};
interface RTCIceCandidatePairChangedEvent extends Event {
readonly pair: RTCIceCandidatePair;
@@ -9066,7 +9173,7 @@ interface RTCIceCandidatePairChangedEvent extends Event {
declare var RTCIceCandidatePairChangedEvent: {
prototype: RTCIceCandidatePairChangedEvent;
new(): RTCIceCandidatePairChangedEvent;
-}
+};
interface RTCIceGathererEventMap {
"error": Event;
@@ -9087,7 +9194,7 @@ interface RTCIceGatherer extends RTCStatsProvider {
declare var RTCIceGatherer: {
prototype: RTCIceGatherer;
new(options: RTCIceGatherOptions): RTCIceGatherer;
-}
+};
interface RTCIceGathererEvent extends Event {
readonly candidate: RTCIceCandidateDictionary | RTCIceCandidateComplete;
@@ -9096,7 +9203,7 @@ interface RTCIceGathererEvent extends Event {
declare var RTCIceGathererEvent: {
prototype: RTCIceGathererEvent;
new(): RTCIceGathererEvent;
-}
+};
interface RTCIceTransportEventMap {
"candidatepairchange": RTCIceCandidatePairChangedEvent;
@@ -9125,7 +9232,7 @@ interface RTCIceTransport extends RTCStatsProvider {
declare var RTCIceTransport: {
prototype: RTCIceTransport;
new(): RTCIceTransport;
-}
+};
interface RTCIceTransportStateChangedEvent extends Event {
readonly state: RTCIceTransportState;
@@ -9134,7 +9241,7 @@ interface RTCIceTransportStateChangedEvent extends Event {
declare var RTCIceTransportStateChangedEvent: {
prototype: RTCIceTransportStateChangedEvent;
new(): RTCIceTransportStateChangedEvent;
-}
+};
interface RTCPeerConnectionEventMap {
"addstream": MediaStreamEvent;
@@ -9180,7 +9287,7 @@ interface RTCPeerConnection extends EventTarget {
declare var RTCPeerConnection: {
prototype: RTCPeerConnection;
new(configuration: RTCConfiguration): RTCPeerConnection;
-}
+};
interface RTCPeerConnectionIceEvent extends Event {
readonly candidate: RTCIceCandidate;
@@ -9189,7 +9296,7 @@ interface RTCPeerConnectionIceEvent extends Event {
declare var RTCPeerConnectionIceEvent: {
prototype: RTCPeerConnectionIceEvent;
new(type: string, eventInitDict: RTCPeerConnectionIceEventInit): RTCPeerConnectionIceEvent;
-}
+};
interface RTCRtpReceiverEventMap {
"error": Event;
@@ -9213,7 +9320,7 @@ declare var RTCRtpReceiver: {
prototype: RTCRtpReceiver;
new(transport: RTCDtlsTransport | RTCSrtpSdesTransport, kind: string, rtcpTransport?: RTCDtlsTransport): RTCRtpReceiver;
getCapabilities(kind?: string): RTCRtpCapabilities;
-}
+};
interface RTCRtpSenderEventMap {
"error": Event;
@@ -9238,7 +9345,7 @@ declare var RTCRtpSender: {
prototype: RTCRtpSender;
new(track: MediaStreamTrack, transport: RTCDtlsTransport | RTCSrtpSdesTransport, rtcpTransport?: RTCDtlsTransport): RTCRtpSender;
getCapabilities(kind?: string): RTCRtpCapabilities;
-}
+};
interface RTCSessionDescription {
sdp: string | null;
@@ -9249,7 +9356,7 @@ interface RTCSessionDescription {
declare var RTCSessionDescription: {
prototype: RTCSessionDescription;
new(descriptionInitDict?: RTCSessionDescriptionInit): RTCSessionDescription;
-}
+};
interface RTCSrtpSdesTransportEventMap {
"error": Event;
@@ -9266,7 +9373,7 @@ declare var RTCSrtpSdesTransport: {
prototype: RTCSrtpSdesTransport;
new(transport: RTCIceTransport, encryptParameters: RTCSrtpSdesParameters, decryptParameters: RTCSrtpSdesParameters): RTCSrtpSdesTransport;
getLocalParameters(): RTCSrtpSdesParameters[];
-}
+};
interface RTCSsrcConflictEvent extends Event {
readonly ssrc: number;
@@ -9275,7 +9382,7 @@ interface RTCSsrcConflictEvent extends Event {
declare var RTCSsrcConflictEvent: {
prototype: RTCSsrcConflictEvent;
new(): RTCSsrcConflictEvent;
-}
+};
interface RTCStatsProvider extends EventTarget {
getStats(): Promise<RTCStatsReport>;
@@ -9285,112 +9392,421 @@ interface RTCStatsProvider extends EventTarget {
declare var RTCStatsProvider: {
prototype: RTCStatsProvider;
new(): RTCStatsProvider;
+};
+
+interface ScopedCredential {
+ readonly id: ArrayBuffer;
+ readonly type: ScopedCredentialType;
}
-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;
+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;
- 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;
+declare var Selection: {
+ prototype: Selection;
+ new(): Selection;
+};
+
+interface ServiceWorkerEventMap extends AbstractWorkerEventMap {
+ "statechange": Event;
}
-interface ReadableStream {
- readonly locked: boolean;
- cancel(): Promise<void>;
- getReader(): ReadableStreamReader;
+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 ReadableStream: {
- prototype: ReadableStream;
- new(): ReadableStream;
+declare var ServiceWorker: {
+ prototype: ServiceWorker;
+ new(): ServiceWorker;
+};
+
+interface ServiceWorkerContainerEventMap {
+ "controllerchange": Event;
+ "message": ServiceWorkerMessageEvent;
}
-interface ReadableStreamReader {
- cancel(): Promise<void>;
- read(): Promise<any>;
- releaseLock(): void;
+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 ReadableStreamReader: {
- prototype: ReadableStreamReader;
- new(): ReadableStreamReader;
+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;
}
-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 ServiceWorkerMessageEvent: {
+ prototype: ServiceWorkerMessageEvent;
+ new(type: string, eventInitDict?: ServiceWorkerMessageEventInit): ServiceWorkerMessageEvent;
+};
+
+interface ServiceWorkerRegistrationEventMap {
+ "updatefound": Event;
}
-declare var Request: {
- prototype: Request;
- new(input: Request | string, init?: RequestInit): Request;
+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;
}
-interface Response extends Object, Body {
- readonly body: ReadableStream | null;
- readonly headers: Headers;
- readonly ok: boolean;
- readonly status: number;
- readonly statusText: string;
- readonly type: ResponseType;
+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;
- clone(): Response;
+ key?: string;
+ oldValue?: string;
+ newValue?: string;
+ storageArea?: Storage;
}
-declare var Response: {
- prototype: Response;
- new(body?: any, init?: ResponseInit): Response;
+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 SVGAElement extends SVGGraphicsElement, SVGURIReference {
readonly target: SVGAnimatedString;
addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGAElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
@@ -9400,7 +9816,7 @@ interface SVGAElement extends SVGGraphicsElement, SVGURIReference {
declare var SVGAElement: {
prototype: SVGAElement;
new(): SVGAElement;
-}
+};
interface SVGAngle {
readonly unitType: number;
@@ -9424,7 +9840,7 @@ declare var SVGAngle: {
readonly SVG_ANGLETYPE_RAD: number;
readonly SVG_ANGLETYPE_UNKNOWN: number;
readonly SVG_ANGLETYPE_UNSPECIFIED: number;
-}
+};
interface SVGAnimatedAngle {
readonly animVal: SVGAngle;
@@ -9434,7 +9850,7 @@ interface SVGAnimatedAngle {
declare var SVGAnimatedAngle: {
prototype: SVGAnimatedAngle;
new(): SVGAnimatedAngle;
-}
+};
interface SVGAnimatedBoolean {
readonly animVal: boolean;
@@ -9444,7 +9860,7 @@ interface SVGAnimatedBoolean {
declare var SVGAnimatedBoolean: {
prototype: SVGAnimatedBoolean;
new(): SVGAnimatedBoolean;
-}
+};
interface SVGAnimatedEnumeration {
readonly animVal: number;
@@ -9454,7 +9870,7 @@ interface SVGAnimatedEnumeration {
declare var SVGAnimatedEnumeration: {
prototype: SVGAnimatedEnumeration;
new(): SVGAnimatedEnumeration;
-}
+};
interface SVGAnimatedInteger {
readonly animVal: number;
@@ -9464,7 +9880,7 @@ interface SVGAnimatedInteger {
declare var SVGAnimatedInteger: {
prototype: SVGAnimatedInteger;
new(): SVGAnimatedInteger;
-}
+};
interface SVGAnimatedLength {
readonly animVal: SVGLength;
@@ -9474,7 +9890,7 @@ interface SVGAnimatedLength {
declare var SVGAnimatedLength: {
prototype: SVGAnimatedLength;
new(): SVGAnimatedLength;
-}
+};
interface SVGAnimatedLengthList {
readonly animVal: SVGLengthList;
@@ -9484,7 +9900,7 @@ interface SVGAnimatedLengthList {
declare var SVGAnimatedLengthList: {
prototype: SVGAnimatedLengthList;
new(): SVGAnimatedLengthList;
-}
+};
interface SVGAnimatedNumber {
readonly animVal: number;
@@ -9494,7 +9910,7 @@ interface SVGAnimatedNumber {
declare var SVGAnimatedNumber: {
prototype: SVGAnimatedNumber;
new(): SVGAnimatedNumber;
-}
+};
interface SVGAnimatedNumberList {
readonly animVal: SVGNumberList;
@@ -9504,7 +9920,7 @@ interface SVGAnimatedNumberList {
declare var SVGAnimatedNumberList: {
prototype: SVGAnimatedNumberList;
new(): SVGAnimatedNumberList;
-}
+};
interface SVGAnimatedPreserveAspectRatio {
readonly animVal: SVGPreserveAspectRatio;
@@ -9514,7 +9930,7 @@ interface SVGAnimatedPreserveAspectRatio {
declare var SVGAnimatedPreserveAspectRatio: {
prototype: SVGAnimatedPreserveAspectRatio;
new(): SVGAnimatedPreserveAspectRatio;
-}
+};
interface SVGAnimatedRect {
readonly animVal: SVGRect;
@@ -9524,7 +9940,7 @@ interface SVGAnimatedRect {
declare var SVGAnimatedRect: {
prototype: SVGAnimatedRect;
new(): SVGAnimatedRect;
-}
+};
interface SVGAnimatedString {
readonly animVal: string;
@@ -9534,7 +9950,7 @@ interface SVGAnimatedString {
declare var SVGAnimatedString: {
prototype: SVGAnimatedString;
new(): SVGAnimatedString;
-}
+};
interface SVGAnimatedTransformList {
readonly animVal: SVGTransformList;
@@ -9544,7 +9960,7 @@ interface SVGAnimatedTransformList {
declare var SVGAnimatedTransformList: {
prototype: SVGAnimatedTransformList;
new(): SVGAnimatedTransformList;
-}
+};
interface SVGCircleElement extends SVGGraphicsElement {
readonly cx: SVGAnimatedLength;
@@ -9557,7 +9973,7 @@ interface SVGCircleElement extends SVGGraphicsElement {
declare var SVGCircleElement: {
prototype: SVGCircleElement;
new(): SVGCircleElement;
-}
+};
interface SVGClipPathElement extends SVGGraphicsElement, SVGUnitTypes {
readonly clipPathUnits: SVGAnimatedEnumeration;
@@ -9568,7 +9984,7 @@ interface SVGClipPathElement extends SVGGraphicsElement, SVGUnitTypes {
declare var SVGClipPathElement: {
prototype: SVGClipPathElement;
new(): SVGClipPathElement;
-}
+};
interface SVGComponentTransferFunctionElement extends SVGElement {
readonly amplitude: SVGAnimatedNumber;
@@ -9597,7 +10013,7 @@ declare var SVGComponentTransferFunctionElement: {
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;
@@ -9607,7 +10023,7 @@ interface SVGDefsElement extends SVGGraphicsElement {
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;
@@ -9617,7 +10033,7 @@ interface SVGDescElement extends SVGElement {
declare var SVGDescElement: {
prototype: SVGDescElement;
new(): SVGDescElement;
-}
+};
interface SVGElementEventMap extends ElementEventMap {
"click": MouseEvent;
@@ -9655,7 +10071,7 @@ interface SVGElement extends Element {
declare var SVGElement: {
prototype: SVGElement;
new(): SVGElement;
-}
+};
interface SVGElementInstance extends EventTarget {
readonly childNodes: SVGElementInstanceList;
@@ -9671,7 +10087,7 @@ interface SVGElementInstance extends EventTarget {
declare var SVGElementInstance: {
prototype: SVGElementInstance;
new(): SVGElementInstance;
-}
+};
interface SVGElementInstanceList {
readonly length: number;
@@ -9681,7 +10097,7 @@ interface SVGElementInstanceList {
declare var SVGElementInstanceList: {
prototype: SVGElementInstanceList;
new(): SVGElementInstanceList;
-}
+};
interface SVGEllipseElement extends SVGGraphicsElement {
readonly cx: SVGAnimatedLength;
@@ -9695,7 +10111,7 @@ interface SVGEllipseElement extends SVGGraphicsElement {
declare var SVGEllipseElement: {
prototype: SVGEllipseElement;
new(): SVGEllipseElement;
-}
+};
interface SVGFEBlendElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
readonly in1: SVGAnimatedString;
@@ -9742,7 +10158,7 @@ declare var SVGFEBlendElement: {
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;
@@ -9765,7 +10181,7 @@ declare var SVGFEColorMatrixElement: {
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;
@@ -9776,7 +10192,7 @@ interface SVGFEComponentTransferElement extends SVGElement, SVGFilterPrimitiveSt
declare var SVGFEComponentTransferElement: {
prototype: SVGFEComponentTransferElement;
new(): SVGFEComponentTransferElement;
-}
+};
interface SVGFECompositeElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
readonly in1: SVGAnimatedString;
@@ -9807,7 +10223,7 @@ declare var SVGFECompositeElement: {
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;
@@ -9837,7 +10253,7 @@ declare var SVGFEConvolveMatrixElement: {
readonly SVG_EDGEMODE_NONE: number;
readonly SVG_EDGEMODE_UNKNOWN: number;
readonly SVG_EDGEMODE_WRAP: number;
-}
+};
interface SVGFEDiffuseLightingElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
readonly diffuseConstant: SVGAnimatedNumber;
@@ -9852,7 +10268,7 @@ interface SVGFEDiffuseLightingElement extends SVGElement, SVGFilterPrimitiveStan
declare var SVGFEDiffuseLightingElement: {
prototype: SVGFEDiffuseLightingElement;
new(): SVGFEDiffuseLightingElement;
-}
+};
interface SVGFEDisplacementMapElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
readonly in1: SVGAnimatedString;
@@ -9877,7 +10293,7 @@ declare var SVGFEDisplacementMapElement: {
readonly SVG_CHANNEL_G: number;
readonly SVG_CHANNEL_R: number;
readonly SVG_CHANNEL_UNKNOWN: number;
-}
+};
interface SVGFEDistantLightElement extends SVGElement {
readonly azimuth: SVGAnimatedNumber;
@@ -9889,7 +10305,7 @@ interface SVGFEDistantLightElement extends SVGElement {
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;
@@ -9899,7 +10315,7 @@ interface SVGFEFloodElement extends SVGElement, SVGFilterPrimitiveStandardAttrib
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;
@@ -9909,7 +10325,7 @@ interface SVGFEFuncAElement extends SVGComponentTransferFunctionElement {
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;
@@ -9919,7 +10335,7 @@ interface SVGFEFuncBElement extends SVGComponentTransferFunctionElement {
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;
@@ -9929,7 +10345,7 @@ interface SVGFEFuncGElement extends SVGComponentTransferFunctionElement {
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;
@@ -9939,7 +10355,7 @@ interface SVGFEFuncRElement extends SVGComponentTransferFunctionElement {
declare var SVGFEFuncRElement: {
prototype: SVGFEFuncRElement;
new(): SVGFEFuncRElement;
-}
+};
interface SVGFEGaussianBlurElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
readonly in1: SVGAnimatedString;
@@ -9953,7 +10369,7 @@ interface SVGFEGaussianBlurElement extends SVGElement, SVGFilterPrimitiveStandar
declare var SVGFEGaussianBlurElement: {
prototype: SVGFEGaussianBlurElement;
new(): SVGFEGaussianBlurElement;
-}
+};
interface SVGFEImageElement extends SVGElement, SVGFilterPrimitiveStandardAttributes, SVGURIReference {
readonly preserveAspectRatio: SVGAnimatedPreserveAspectRatio;
@@ -9964,7 +10380,7 @@ interface SVGFEImageElement extends SVGElement, SVGFilterPrimitiveStandardAttrib
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;
@@ -9974,7 +10390,7 @@ interface SVGFEMergeElement extends SVGElement, SVGFilterPrimitiveStandardAttrib
declare var SVGFEMergeElement: {
prototype: SVGFEMergeElement;
new(): SVGFEMergeElement;
-}
+};
interface SVGFEMergeNodeElement extends SVGElement {
readonly in1: SVGAnimatedString;
@@ -9985,7 +10401,7 @@ interface SVGFEMergeNodeElement extends SVGElement {
declare var SVGFEMergeNodeElement: {
prototype: SVGFEMergeNodeElement;
new(): SVGFEMergeNodeElement;
-}
+};
interface SVGFEMorphologyElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
readonly in1: SVGAnimatedString;
@@ -10005,7 +10421,7 @@ declare var 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;
@@ -10018,7 +10434,7 @@ interface SVGFEOffsetElement extends SVGElement, SVGFilterPrimitiveStandardAttri
declare var SVGFEOffsetElement: {
prototype: SVGFEOffsetElement;
new(): SVGFEOffsetElement;
-}
+};
interface SVGFEPointLightElement extends SVGElement {
readonly x: SVGAnimatedNumber;
@@ -10031,7 +10447,7 @@ interface SVGFEPointLightElement extends SVGElement {
declare var SVGFEPointLightElement: {
prototype: SVGFEPointLightElement;
new(): SVGFEPointLightElement;
-}
+};
interface SVGFESpecularLightingElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
readonly in1: SVGAnimatedString;
@@ -10047,7 +10463,7 @@ interface SVGFESpecularLightingElement extends SVGElement, SVGFilterPrimitiveSta
declare var SVGFESpecularLightingElement: {
prototype: SVGFESpecularLightingElement;
new(): SVGFESpecularLightingElement;
-}
+};
interface SVGFESpotLightElement extends SVGElement {
readonly limitingConeAngle: SVGAnimatedNumber;
@@ -10065,7 +10481,7 @@ interface SVGFESpotLightElement extends SVGElement {
declare var SVGFESpotLightElement: {
prototype: SVGFESpotLightElement;
new(): SVGFESpotLightElement;
-}
+};
interface SVGFETileElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
readonly in1: SVGAnimatedString;
@@ -10076,7 +10492,7 @@ interface SVGFETileElement extends SVGElement, SVGFilterPrimitiveStandardAttribu
declare var SVGFETileElement: {
prototype: SVGFETileElement;
new(): SVGFETileElement;
-}
+};
interface SVGFETurbulenceElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
readonly baseFrequencyX: SVGAnimatedNumber;
@@ -10104,7 +10520,7 @@ declare var SVGFETurbulenceElement: {
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;
@@ -10123,7 +10539,7 @@ interface SVGFilterElement extends SVGElement, SVGUnitTypes, SVGURIReference {
declare var SVGFilterElement: {
prototype: SVGFilterElement;
new(): SVGFilterElement;
-}
+};
interface SVGForeignObjectElement extends SVGGraphicsElement {
readonly height: SVGAnimatedLength;
@@ -10137,7 +10553,7 @@ interface SVGForeignObjectElement extends SVGGraphicsElement {
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;
@@ -10147,7 +10563,7 @@ interface SVGGElement extends SVGGraphicsElement {
declare var SVGGElement: {
prototype: SVGGElement;
new(): SVGGElement;
-}
+};
interface SVGGradientElement extends SVGElement, SVGUnitTypes, SVGURIReference {
readonly gradientTransform: SVGAnimatedTransformList;
@@ -10168,7 +10584,7 @@ declare var SVGGradientElement: {
readonly SVG_SPREADMETHOD_REFLECT: number;
readonly SVG_SPREADMETHOD_REPEAT: number;
readonly SVG_SPREADMETHOD_UNKNOWN: number;
-}
+};
interface SVGGraphicsElement extends SVGElement, SVGTests {
readonly farthestViewportElement: SVGElement;
@@ -10185,7 +10601,7 @@ interface SVGGraphicsElement extends SVGElement, SVGTests {
declare var SVGGraphicsElement: {
prototype: SVGGraphicsElement;
new(): SVGGraphicsElement;
-}
+};
interface SVGImageElement extends SVGGraphicsElement, SVGURIReference {
readonly height: SVGAnimatedLength;
@@ -10200,7 +10616,7 @@ interface SVGImageElement extends SVGGraphicsElement, SVGURIReference {
declare var SVGImageElement: {
prototype: SVGImageElement;
new(): SVGImageElement;
-}
+};
interface SVGLength {
readonly unitType: number;
@@ -10236,7 +10652,7 @@ declare var SVGLength: {
readonly SVG_LENGTHTYPE_PT: number;
readonly SVG_LENGTHTYPE_PX: number;
readonly SVG_LENGTHTYPE_UNKNOWN: number;
-}
+};
interface SVGLengthList {
readonly numberOfItems: number;
@@ -10252,35 +10668,35 @@ interface SVGLengthList {
declare var SVGLengthList: {
prototype: SVGLengthList;
new(): SVGLengthList;
-}
+};
-interface SVGLineElement extends SVGGraphicsElement {
+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: SVGLineElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ 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 SVGLineElement: {
- prototype: SVGLineElement;
- new(): SVGLineElement;
-}
+declare var SVGLinearGradientElement: {
+ prototype: SVGLinearGradientElement;
+ new(): SVGLinearGradientElement;
+};
-interface SVGLinearGradientElement extends SVGGradientElement {
+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: SVGLinearGradientElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ 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 SVGLinearGradientElement: {
- prototype: SVGLinearGradientElement;
- new(): SVGLinearGradientElement;
-}
+declare var SVGLineElement: {
+ prototype: SVGLineElement;
+ new(): SVGLineElement;
+};
interface SVGMarkerElement extends SVGElement, SVGFitToViewBox {
readonly markerHeight: SVGAnimatedLength;
@@ -10292,12 +10708,12 @@ interface SVGMarkerElement extends SVGElement, SVGFitToViewBox {
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;
+ readonly SVG_MARKERUNITS_STROKEWIDTH: number;
+ readonly SVG_MARKERUNITS_UNKNOWN: number;
+ readonly SVG_MARKERUNITS_USERSPACEONUSE: 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;
}
@@ -10305,13 +10721,13 @@ interface SVGMarkerElement extends SVGElement, SVGFitToViewBox {
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;
-}
+ readonly SVG_MARKERUNITS_STROKEWIDTH: number;
+ readonly SVG_MARKERUNITS_UNKNOWN: number;
+ readonly SVG_MARKERUNITS_USERSPACEONUSE: number;
+};
interface SVGMaskElement extends SVGElement, SVGTests, SVGUnitTypes {
readonly height: SVGAnimatedLength;
@@ -10327,7 +10743,7 @@ interface SVGMaskElement extends SVGElement, SVGTests, SVGUnitTypes {
declare var SVGMaskElement: {
prototype: SVGMaskElement;
new(): SVGMaskElement;
-}
+};
interface SVGMatrix {
a: number;
@@ -10352,7 +10768,7 @@ interface 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;
@@ -10362,7 +10778,7 @@ interface SVGMetadataElement extends SVGElement {
declare var SVGMetadataElement: {
prototype: SVGMetadataElement;
new(): SVGMetadataElement;
-}
+};
interface SVGNumber {
value: number;
@@ -10371,7 +10787,7 @@ interface SVGNumber {
declare var SVGNumber: {
prototype: SVGNumber;
new(): SVGNumber;
-}
+};
interface SVGNumberList {
readonly numberOfItems: number;
@@ -10387,7 +10803,7 @@ interface SVGNumberList {
declare var SVGNumberList: {
prototype: SVGNumberList;
new(): SVGNumberList;
-}
+};
interface SVGPathElement extends SVGGraphicsElement {
readonly pathSegList: SVGPathSegList;
@@ -10420,7 +10836,7 @@ interface SVGPathElement extends SVGGraphicsElement {
declare var SVGPathElement: {
prototype: SVGPathElement;
new(): SVGPathElement;
-}
+};
interface SVGPathSeg {
readonly pathSegType: number;
@@ -10470,7 +10886,7 @@ declare var SVGPathSeg: {
readonly PATHSEG_MOVETO_ABS: number;
readonly PATHSEG_MOVETO_REL: number;
readonly PATHSEG_UNKNOWN: number;
-}
+};
interface SVGPathSegArcAbs extends SVGPathSeg {
angle: number;
@@ -10485,7 +10901,7 @@ interface SVGPathSegArcAbs extends SVGPathSeg {
declare var SVGPathSegArcAbs: {
prototype: SVGPathSegArcAbs;
new(): SVGPathSegArcAbs;
-}
+};
interface SVGPathSegArcRel extends SVGPathSeg {
angle: number;
@@ -10500,7 +10916,7 @@ interface SVGPathSegArcRel extends SVGPathSeg {
declare var SVGPathSegArcRel: {
prototype: SVGPathSegArcRel;
new(): SVGPathSegArcRel;
-}
+};
interface SVGPathSegClosePath extends SVGPathSeg {
}
@@ -10508,7 +10924,7 @@ interface SVGPathSegClosePath extends SVGPathSeg {
declare var SVGPathSegClosePath: {
prototype: SVGPathSegClosePath;
new(): SVGPathSegClosePath;
-}
+};
interface SVGPathSegCurvetoCubicAbs extends SVGPathSeg {
x: number;
@@ -10522,7 +10938,7 @@ interface SVGPathSegCurvetoCubicAbs extends SVGPathSeg {
declare var SVGPathSegCurvetoCubicAbs: {
prototype: SVGPathSegCurvetoCubicAbs;
new(): SVGPathSegCurvetoCubicAbs;
-}
+};
interface SVGPathSegCurvetoCubicRel extends SVGPathSeg {
x: number;
@@ -10536,7 +10952,7 @@ interface SVGPathSegCurvetoCubicRel extends SVGPathSeg {
declare var SVGPathSegCurvetoCubicRel: {
prototype: SVGPathSegCurvetoCubicRel;
new(): SVGPathSegCurvetoCubicRel;
-}
+};
interface SVGPathSegCurvetoCubicSmoothAbs extends SVGPathSeg {
x: number;
@@ -10548,7 +10964,7 @@ interface SVGPathSegCurvetoCubicSmoothAbs extends SVGPathSeg {
declare var SVGPathSegCurvetoCubicSmoothAbs: {
prototype: SVGPathSegCurvetoCubicSmoothAbs;
new(): SVGPathSegCurvetoCubicSmoothAbs;
-}
+};
interface SVGPathSegCurvetoCubicSmoothRel extends SVGPathSeg {
x: number;
@@ -10560,7 +10976,7 @@ interface SVGPathSegCurvetoCubicSmoothRel extends SVGPathSeg {
declare var SVGPathSegCurvetoCubicSmoothRel: {
prototype: SVGPathSegCurvetoCubicSmoothRel;
new(): SVGPathSegCurvetoCubicSmoothRel;
-}
+};
interface SVGPathSegCurvetoQuadraticAbs extends SVGPathSeg {
x: number;
@@ -10572,7 +10988,7 @@ interface SVGPathSegCurvetoQuadraticAbs extends SVGPathSeg {
declare var SVGPathSegCurvetoQuadraticAbs: {
prototype: SVGPathSegCurvetoQuadraticAbs;
new(): SVGPathSegCurvetoQuadraticAbs;
-}
+};
interface SVGPathSegCurvetoQuadraticRel extends SVGPathSeg {
x: number;
@@ -10584,7 +11000,7 @@ interface SVGPathSegCurvetoQuadraticRel extends SVGPathSeg {
declare var SVGPathSegCurvetoQuadraticRel: {
prototype: SVGPathSegCurvetoQuadraticRel;
new(): SVGPathSegCurvetoQuadraticRel;
-}
+};
interface SVGPathSegCurvetoQuadraticSmoothAbs extends SVGPathSeg {
x: number;
@@ -10594,7 +11010,7 @@ interface SVGPathSegCurvetoQuadraticSmoothAbs extends SVGPathSeg {
declare var SVGPathSegCurvetoQuadraticSmoothAbs: {
prototype: SVGPathSegCurvetoQuadraticSmoothAbs;
new(): SVGPathSegCurvetoQuadraticSmoothAbs;
-}
+};
interface SVGPathSegCurvetoQuadraticSmoothRel extends SVGPathSeg {
x: number;
@@ -10604,7 +11020,7 @@ interface SVGPathSegCurvetoQuadraticSmoothRel extends SVGPathSeg {
declare var SVGPathSegCurvetoQuadraticSmoothRel: {
prototype: SVGPathSegCurvetoQuadraticSmoothRel;
new(): SVGPathSegCurvetoQuadraticSmoothRel;
-}
+};
interface SVGPathSegLinetoAbs extends SVGPathSeg {
x: number;
@@ -10614,7 +11030,7 @@ interface SVGPathSegLinetoAbs extends SVGPathSeg {
declare var SVGPathSegLinetoAbs: {
prototype: SVGPathSegLinetoAbs;
new(): SVGPathSegLinetoAbs;
-}
+};
interface SVGPathSegLinetoHorizontalAbs extends SVGPathSeg {
x: number;
@@ -10623,7 +11039,7 @@ interface SVGPathSegLinetoHorizontalAbs extends SVGPathSeg {
declare var SVGPathSegLinetoHorizontalAbs: {
prototype: SVGPathSegLinetoHorizontalAbs;
new(): SVGPathSegLinetoHorizontalAbs;
-}
+};
interface SVGPathSegLinetoHorizontalRel extends SVGPathSeg {
x: number;
@@ -10632,7 +11048,7 @@ interface SVGPathSegLinetoHorizontalRel extends SVGPathSeg {
declare var SVGPathSegLinetoHorizontalRel: {
prototype: SVGPathSegLinetoHorizontalRel;
new(): SVGPathSegLinetoHorizontalRel;
-}
+};
interface SVGPathSegLinetoRel extends SVGPathSeg {
x: number;
@@ -10642,7 +11058,7 @@ interface SVGPathSegLinetoRel extends SVGPathSeg {
declare var SVGPathSegLinetoRel: {
prototype: SVGPathSegLinetoRel;
new(): SVGPathSegLinetoRel;
-}
+};
interface SVGPathSegLinetoVerticalAbs extends SVGPathSeg {
y: number;
@@ -10651,7 +11067,7 @@ interface SVGPathSegLinetoVerticalAbs extends SVGPathSeg {
declare var SVGPathSegLinetoVerticalAbs: {
prototype: SVGPathSegLinetoVerticalAbs;
new(): SVGPathSegLinetoVerticalAbs;
-}
+};
interface SVGPathSegLinetoVerticalRel extends SVGPathSeg {
y: number;
@@ -10660,7 +11076,7 @@ interface SVGPathSegLinetoVerticalRel extends SVGPathSeg {
declare var SVGPathSegLinetoVerticalRel: {
prototype: SVGPathSegLinetoVerticalRel;
new(): SVGPathSegLinetoVerticalRel;
-}
+};
interface SVGPathSegList {
readonly numberOfItems: number;
@@ -10676,7 +11092,7 @@ interface SVGPathSegList {
declare var SVGPathSegList: {
prototype: SVGPathSegList;
new(): SVGPathSegList;
-}
+};
interface SVGPathSegMovetoAbs extends SVGPathSeg {
x: number;
@@ -10686,7 +11102,7 @@ interface SVGPathSegMovetoAbs extends SVGPathSeg {
declare var SVGPathSegMovetoAbs: {
prototype: SVGPathSegMovetoAbs;
new(): SVGPathSegMovetoAbs;
-}
+};
interface SVGPathSegMovetoRel extends SVGPathSeg {
x: number;
@@ -10696,7 +11112,7 @@ interface SVGPathSegMovetoRel extends SVGPathSeg {
declare var SVGPathSegMovetoRel: {
prototype: SVGPathSegMovetoRel;
new(): SVGPathSegMovetoRel;
-}
+};
interface SVGPatternElement extends SVGElement, SVGTests, SVGUnitTypes, SVGFitToViewBox, SVGURIReference {
readonly height: SVGAnimatedLength;
@@ -10713,7 +11129,7 @@ interface SVGPatternElement extends SVGElement, SVGTests, SVGUnitTypes, SVGFitTo
declare var SVGPatternElement: {
prototype: SVGPatternElement;
new(): SVGPatternElement;
-}
+};
interface SVGPoint {
x: number;
@@ -10724,7 +11140,7 @@ interface SVGPoint {
declare var SVGPoint: {
prototype: SVGPoint;
new(): SVGPoint;
-}
+};
interface SVGPointList {
readonly numberOfItems: number;
@@ -10740,7 +11156,7 @@ interface SVGPointList {
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;
@@ -10750,7 +11166,7 @@ interface SVGPolygonElement extends SVGGraphicsElement, SVGAnimatedPoints {
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;
@@ -10760,7 +11176,7 @@ interface SVGPolylineElement extends SVGGraphicsElement, SVGAnimatedPoints {
declare var SVGPolylineElement: {
prototype: SVGPolylineElement;
new(): SVGPolylineElement;
-}
+};
interface SVGPreserveAspectRatio {
align: number;
@@ -10798,7 +11214,7 @@ declare var SVGPreserveAspectRatio: {
readonly SVG_PRESERVEASPECTRATIO_XMINYMAX: number;
readonly SVG_PRESERVEASPECTRATIO_XMINYMID: number;
readonly SVG_PRESERVEASPECTRATIO_XMINYMIN: number;
-}
+};
interface SVGRadialGradientElement extends SVGGradientElement {
readonly cx: SVGAnimatedLength;
@@ -10813,7 +11229,7 @@ interface SVGRadialGradientElement extends SVGGradientElement {
declare var SVGRadialGradientElement: {
prototype: SVGRadialGradientElement;
new(): SVGRadialGradientElement;
-}
+};
interface SVGRect {
height: number;
@@ -10825,7 +11241,7 @@ interface SVGRect {
declare var SVGRect: {
prototype: SVGRect;
new(): SVGRect;
-}
+};
interface SVGRectElement extends SVGGraphicsElement {
readonly height: SVGAnimatedLength;
@@ -10841,8 +11257,60 @@ interface SVGRectElement extends SVGGraphicsElement {
declare var SVGRectElement: {
prototype: SVGRectElement;
new(): SVGRectElement;
+};
+
+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 SVGSVGElementEventMap extends SVGElementEventMap {
"SVGAbort": Event;
"SVGError": Event;
@@ -10902,59 +11370,7 @@ interface SVGSVGElement extends SVGGraphicsElement, DocumentEvent, SVGFitToViewB
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;
@@ -10964,7 +11380,7 @@ interface SVGSwitchElement extends SVGGraphicsElement {
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;
@@ -10974,17 +11390,7 @@ interface SVGSymbolElement extends SVGElement, SVGFitToViewBox {
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;
@@ -11011,7 +11417,7 @@ declare var 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;
@@ -11021,7 +11427,7 @@ interface SVGTextElement extends SVGTextPositioningElement {
declare var SVGTextElement: {
prototype: SVGTextElement;
new(): SVGTextElement;
-}
+};
interface SVGTextPathElement extends SVGTextContentElement, SVGURIReference {
readonly method: SVGAnimatedEnumeration;
@@ -11046,7 +11452,7 @@ declare var SVGTextPathElement: {
readonly TEXTPATH_SPACINGTYPE_AUTO: number;
readonly TEXTPATH_SPACINGTYPE_EXACT: number;
readonly TEXTPATH_SPACINGTYPE_UNKNOWN: number;
-}
+};
interface SVGTextPositioningElement extends SVGTextContentElement {
readonly dx: SVGAnimatedLengthList;
@@ -11061,7 +11467,7 @@ interface SVGTextPositioningElement extends SVGTextContentElement {
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;
@@ -11071,7 +11477,7 @@ interface SVGTitleElement extends SVGElement {
declare var SVGTitleElement: {
prototype: SVGTitleElement;
new(): SVGTitleElement;
-}
+};
interface SVGTransform {
readonly angle: number;
@@ -11102,7 +11508,7 @@ declare var SVGTransform: {
readonly SVG_TRANSFORM_SKEWY: number;
readonly SVG_TRANSFORM_TRANSLATE: number;
readonly SVG_TRANSFORM_UNKNOWN: number;
-}
+};
interface SVGTransformList {
readonly numberOfItems: number;
@@ -11120,8 +11526,18 @@ interface SVGTransformList {
declare var SVGTransformList: {
prototype: SVGTransformList;
new(): SVGTransformList;
+};
+
+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 SVGUnitTypes {
readonly SVG_UNIT_TYPE_OBJECTBOUNDINGBOX: number;
readonly SVG_UNIT_TYPE_UNKNOWN: number;
@@ -11143,7 +11559,7 @@ interface SVGUseElement extends SVGGraphicsElement, SVGURIReference {
declare var SVGUseElement: {
prototype: SVGUseElement;
new(): SVGUseElement;
-}
+};
interface SVGViewElement extends SVGElement, SVGZoomAndPan, SVGFitToViewBox {
readonly viewTarget: SVGStringList;
@@ -11154,7 +11570,7 @@ interface SVGViewElement extends SVGElement, SVGZoomAndPan, SVGFitToViewBox {
declare var SVGViewElement: {
prototype: SVGViewElement;
new(): SVGViewElement;
-}
+};
interface SVGZoomAndPan {
readonly zoomAndPan: number;
@@ -11164,7 +11580,7 @@ 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;
@@ -11177,420 +11593,7 @@ interface SVGZoomEvent extends UIEvent {
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;
@@ -11600,7 +11603,7 @@ interface SyncManager {
declare var SyncManager: {
prototype: SyncManager;
new(): SyncManager;
-}
+};
interface Text extends CharacterData {
readonly wholeText: string;
@@ -11611,7 +11614,7 @@ interface Text extends CharacterData {
declare var Text: {
prototype: Text;
new(data?: string): Text;
-}
+};
interface TextEvent extends UIEvent {
readonly data: string;
@@ -11643,7 +11646,7 @@ declare var TextEvent: {
readonly DOM_INPUT_METHOD_SCRIPT: number;
readonly DOM_INPUT_METHOD_UNKNOWN: number;
readonly DOM_INPUT_METHOD_VOICE: number;
-}
+};
interface TextMetrics {
readonly width: number;
@@ -11652,7 +11655,7 @@ interface TextMetrics {
declare var TextMetrics: {
prototype: TextMetrics;
new(): TextMetrics;
-}
+};
interface TextTrackEventMap {
"cuechange": Event;
@@ -11695,7 +11698,7 @@ declare var TextTrack: {
readonly LOADING: number;
readonly NONE: number;
readonly SHOWING: number;
-}
+};
interface TextTrackCueEventMap {
"enter": Event;
@@ -11719,7 +11722,7 @@ interface TextTrackCue extends EventTarget {
declare var TextTrackCue: {
prototype: TextTrackCue;
new(startTime: number, endTime: number, text: string): TextTrackCue;
-}
+};
interface TextTrackCueList {
readonly length: number;
@@ -11731,7 +11734,7 @@ interface TextTrackCueList {
declare var TextTrackCueList: {
prototype: TextTrackCueList;
new(): TextTrackCueList;
-}
+};
interface TextTrackListEventMap {
"addtrack": TrackEvent;
@@ -11749,7 +11752,7 @@ interface TextTrackList extends EventTarget {
declare var TextTrackList: {
prototype: TextTrackList;
new(): TextTrackList;
-}
+};
interface TimeRanges {
readonly length: number;
@@ -11760,7 +11763,7 @@ interface TimeRanges {
declare var TimeRanges: {
prototype: TimeRanges;
new(): TimeRanges;
-}
+};
interface Touch {
readonly clientX: number;
@@ -11776,7 +11779,7 @@ interface Touch {
declare var Touch: {
prototype: Touch;
new(): Touch;
-}
+};
interface TouchEvent extends UIEvent {
readonly altKey: boolean;
@@ -11794,7 +11797,7 @@ interface TouchEvent extends UIEvent {
declare var TouchEvent: {
prototype: TouchEvent;
new(type: string, touchEventInit?: TouchEventInit): TouchEvent;
-}
+};
interface TouchList {
readonly length: number;
@@ -11805,7 +11808,7 @@ interface TouchList {
declare var TouchList: {
prototype: TouchList;
new(): TouchList;
-}
+};
interface TrackEvent extends Event {
readonly track: VideoTrack | AudioTrack | TextTrack | null;
@@ -11814,7 +11817,7 @@ interface TrackEvent extends Event {
declare var TrackEvent: {
prototype: TrackEvent;
new(typeArg: string, eventInitDict?: TrackEventInit): TrackEvent;
-}
+};
interface TransitionEvent extends Event {
readonly elapsedTime: number;
@@ -11825,7 +11828,7 @@ interface TransitionEvent extends Event {
declare var TransitionEvent: {
prototype: TransitionEvent;
new(typeArg: string, eventInitDict?: TransitionEventInit): TransitionEvent;
-}
+};
interface TreeWalker {
currentNode: Node;
@@ -11845,7 +11848,7 @@ interface TreeWalker {
declare var TreeWalker: {
prototype: TreeWalker;
new(): TreeWalker;
-}
+};
interface UIEvent extends Event {
readonly detail: number;
@@ -11856,8 +11859,17 @@ interface UIEvent extends Event {
declare var UIEvent: {
prototype: UIEvent;
new(typeArg: string, eventInitDict?: UIEventInit): UIEvent;
+};
+
+interface UnviewableContentIdentifiedEvent extends NavigationEventWithReferrer {
+ readonly mediaType: string;
}
+declare var UnviewableContentIdentifiedEvent: {
+ prototype: UnviewableContentIdentifiedEvent;
+ new(): UnviewableContentIdentifiedEvent;
+};
+
interface URL {
hash: string;
host: string;
@@ -11879,16 +11891,7 @@ declare var 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;
@@ -11906,7 +11909,7 @@ interface ValidityState {
declare var ValidityState: {
prototype: ValidityState;
new(): ValidityState;
-}
+};
interface VideoPlaybackQuality {
readonly corruptedVideoFrames: number;
@@ -11919,7 +11922,7 @@ interface VideoPlaybackQuality {
declare var VideoPlaybackQuality: {
prototype: VideoPlaybackQuality;
new(): VideoPlaybackQuality;
-}
+};
interface VideoTrack {
readonly id: string;
@@ -11933,7 +11936,7 @@ interface VideoTrack {
declare var VideoTrack: {
prototype: VideoTrack;
new(): VideoTrack;
-}
+};
interface VideoTrackListEventMap {
"addtrack": TrackEvent;
@@ -11957,23 +11960,55 @@ interface VideoTrackList extends EventTarget {
declare var VideoTrackList: {
prototype: VideoTrackList;
new(): VideoTrackList;
+};
+
+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 WEBGL_compressed_texture_s3tc {
+ readonly COMPRESSED_RGB_S3TC_DXT1_EXT: number;
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_RGB_S3TC_DXT1_EXT: number;
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;
@@ -11985,7 +12020,7 @@ declare var 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;
@@ -11995,39 +12030,7 @@ 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;
@@ -12038,7 +12041,7 @@ interface WebGLActiveInfo {
declare var WebGLActiveInfo: {
prototype: WebGLActiveInfo;
new(): WebGLActiveInfo;
-}
+};
interface WebGLBuffer extends WebGLObject {
}
@@ -12046,7 +12049,7 @@ interface WebGLBuffer extends WebGLObject {
declare var WebGLBuffer: {
prototype: WebGLBuffer;
new(): WebGLBuffer;
-}
+};
interface WebGLContextEvent extends Event {
readonly statusMessage: string;
@@ -12055,7 +12058,7 @@ interface WebGLContextEvent extends Event {
declare var WebGLContextEvent: {
prototype: WebGLContextEvent;
new(typeArg: string, eventInitDict?: WebGLContextEventInit): WebGLContextEvent;
-}
+};
interface WebGLFramebuffer extends WebGLObject {
}
@@ -12063,7 +12066,7 @@ interface WebGLFramebuffer extends WebGLObject {
declare var WebGLFramebuffer: {
prototype: WebGLFramebuffer;
new(): WebGLFramebuffer;
-}
+};
interface WebGLObject {
}
@@ -12071,7 +12074,7 @@ interface WebGLObject {
declare var WebGLObject: {
prototype: WebGLObject;
new(): WebGLObject;
-}
+};
interface WebGLProgram extends WebGLObject {
}
@@ -12079,7 +12082,7 @@ interface WebGLProgram extends WebGLObject {
declare var WebGLProgram: {
prototype: WebGLProgram;
new(): WebGLProgram;
-}
+};
interface WebGLRenderbuffer extends WebGLObject {
}
@@ -12087,7 +12090,7 @@ interface WebGLRenderbuffer extends WebGLObject {
declare var WebGLRenderbuffer: {
prototype: WebGLRenderbuffer;
new(): WebGLRenderbuffer;
-}
+};
interface WebGLRenderingContext {
readonly canvas: HTMLCanvasElement;
@@ -12348,13 +12351,13 @@ interface WebGLRenderingContext {
readonly KEEP: number;
readonly LEQUAL: number;
readonly LESS: number;
+ readonly LINE_LOOP: number;
+ readonly LINE_STRIP: number;
+ readonly LINE_WIDTH: 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;
@@ -12379,9 +12382,9 @@ interface WebGLRenderingContext {
readonly NEAREST_MIPMAP_NEAREST: number;
readonly NEVER: number;
readonly NICEST: number;
+ readonly NO_ERROR: 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;
@@ -12411,18 +12414,18 @@ interface WebGLRenderingContext {
readonly REPEAT: number;
readonly REPLACE: number;
readonly RGB: number;
- readonly RGB565: number;
readonly RGB5_A1: number;
+ readonly RGB565: 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 SAMPLER_2D: number;
+ readonly SAMPLER_CUBE: number;
+ readonly SAMPLES: number;
readonly SCISSOR_BOX: number;
readonly SCISSOR_TEST: number;
readonly SHADER_TYPE: number;
@@ -12456,6 +12459,20 @@ interface WebGLRenderingContext {
readonly STREAM_DRAW: number;
readonly SUBPIXEL_BITS: number;
readonly TEXTURE: 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 TEXTURE0: number;
readonly TEXTURE1: number;
readonly TEXTURE10: number;
@@ -12488,23 +12505,9 @@ interface WebGLRenderingContext {
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 TRIANGLES: number;
readonly UNPACK_ALIGNMENT: number;
readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: number;
readonly UNPACK_FLIP_Y_WEBGL: number;
@@ -12650,13 +12653,13 @@ declare var WebGLRenderingContext: {
readonly KEEP: number;
readonly LEQUAL: number;
readonly LESS: number;
+ readonly LINE_LOOP: number;
+ readonly LINE_STRIP: number;
+ readonly LINE_WIDTH: 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;
@@ -12681,9 +12684,9 @@ declare var WebGLRenderingContext: {
readonly NEAREST_MIPMAP_NEAREST: number;
readonly NEVER: number;
readonly NICEST: number;
+ readonly NO_ERROR: 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;
@@ -12713,18 +12716,18 @@ declare var WebGLRenderingContext: {
readonly REPEAT: number;
readonly REPLACE: number;
readonly RGB: number;
- readonly RGB565: number;
readonly RGB5_A1: number;
+ readonly RGB565: 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 SAMPLER_2D: number;
+ readonly SAMPLER_CUBE: number;
+ readonly SAMPLES: number;
readonly SCISSOR_BOX: number;
readonly SCISSOR_TEST: number;
readonly SHADER_TYPE: number;
@@ -12758,6 +12761,20 @@ declare var WebGLRenderingContext: {
readonly STREAM_DRAW: number;
readonly SUBPIXEL_BITS: number;
readonly TEXTURE: 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 TEXTURE0: number;
readonly TEXTURE1: number;
readonly TEXTURE10: number;
@@ -12790,23 +12807,9 @@ declare var WebGLRenderingContext: {
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 TRIANGLES: number;
readonly UNPACK_ALIGNMENT: number;
readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: number;
readonly UNPACK_FLIP_Y_WEBGL: number;
@@ -12830,7 +12833,7 @@ declare var WebGLRenderingContext: {
readonly VERTEX_SHADER: number;
readonly VIEWPORT: number;
readonly ZERO: number;
-}
+};
interface WebGLShader extends WebGLObject {
}
@@ -12838,7 +12841,7 @@ interface WebGLShader extends WebGLObject {
declare var WebGLShader: {
prototype: WebGLShader;
new(): WebGLShader;
-}
+};
interface WebGLShaderPrecisionFormat {
readonly precision: number;
@@ -12849,7 +12852,7 @@ interface WebGLShaderPrecisionFormat {
declare var WebGLShaderPrecisionFormat: {
prototype: WebGLShaderPrecisionFormat;
new(): WebGLShaderPrecisionFormat;
-}
+};
interface WebGLTexture extends WebGLObject {
}
@@ -12857,7 +12860,7 @@ interface WebGLTexture extends WebGLObject {
declare var WebGLTexture: {
prototype: WebGLTexture;
new(): WebGLTexture;
-}
+};
interface WebGLUniformLocation {
}
@@ -12865,7 +12868,7 @@ interface WebGLUniformLocation {
declare var WebGLUniformLocation: {
prototype: WebGLUniformLocation;
new(): WebGLUniformLocation;
-}
+};
interface WebKitCSSMatrix {
a: number;
@@ -12905,7 +12908,7 @@ interface WebKitCSSMatrix {
declare var WebKitCSSMatrix: {
prototype: WebKitCSSMatrix;
new(text?: string): WebKitCSSMatrix;
-}
+};
interface WebKitDirectoryEntry extends WebKitEntry {
createReader(): WebKitDirectoryReader;
@@ -12914,7 +12917,7 @@ interface WebKitDirectoryEntry extends WebKitEntry {
declare var WebKitDirectoryEntry: {
prototype: WebKitDirectoryEntry;
new(): WebKitDirectoryEntry;
-}
+};
interface WebKitDirectoryReader {
readEntries(successCallback: WebKitEntriesCallback, errorCallback?: WebKitErrorCallback): void;
@@ -12923,7 +12926,7 @@ interface WebKitDirectoryReader {
declare var WebKitDirectoryReader: {
prototype: WebKitDirectoryReader;
new(): WebKitDirectoryReader;
-}
+};
interface WebKitEntry {
readonly filesystem: WebKitFileSystem;
@@ -12936,7 +12939,7 @@ interface WebKitEntry {
declare var WebKitEntry: {
prototype: WebKitEntry;
new(): WebKitEntry;
-}
+};
interface WebKitFileEntry extends WebKitEntry {
file(successCallback: WebKitFileCallback, errorCallback?: WebKitErrorCallback): void;
@@ -12945,7 +12948,7 @@ interface WebKitFileEntry extends WebKitEntry {
declare var WebKitFileEntry: {
prototype: WebKitFileEntry;
new(): WebKitFileEntry;
-}
+};
interface WebKitFileSystem {
readonly name: string;
@@ -12955,7 +12958,7 @@ interface WebKitFileSystem {
declare var WebKitFileSystem: {
prototype: WebKitFileSystem;
new(): WebKitFileSystem;
-}
+};
interface WebKitPoint {
x: number;
@@ -12965,8 +12968,18 @@ interface WebKitPoint {
declare var WebKitPoint: {
prototype: WebKitPoint;
new(x?: number, y?: number): WebKitPoint;
+};
+
+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 WebSocketEventMap {
"close": CloseEvent;
"error": Event;
@@ -13002,7 +13015,7 @@ declare var WebSocket: {
readonly CLOSING: number;
readonly CONNECTING: number;
readonly OPEN: number;
-}
+};
interface WheelEvent extends MouseEvent {
readonly deltaMode: number;
@@ -13025,7 +13038,7 @@ declare var WheelEvent: {
readonly DOM_DELTA_LINE: number;
readonly DOM_DELTA_PAGE: number;
readonly DOM_DELTA_PIXEL: number;
-}
+};
interface WindowEventMap extends GlobalEventHandlersEventMap {
"abort": UIEvent;
@@ -13053,6 +13066,7 @@ interface WindowEventMap extends GlobalEventHandlersEventMap {
"durationchange": Event;
"emptied": Event;
"ended": MediaStreamErrorEvent;
+ "error": ErrorEvent;
"focus": FocusEvent;
"hashchange": HashChangeEvent;
"input": Event;
@@ -13111,6 +13125,10 @@ interface WindowEventMap extends GlobalEventHandlersEventMap {
"submit": Event;
"suspend": Event;
"timeupdate": Event;
+ "touchcancel": TouchEvent;
+ "touchend": TouchEvent;
+ "touchmove": TouchEvent;
+ "touchstart": TouchEvent;
"unload": Event;
"volumechange": Event;
"waiting": Event;
@@ -13124,8 +13142,8 @@ interface Window extends EventTarget, WindowTimers, WindowSessionStorage, Window
readonly crypto: Crypto;
defaultStatus: string;
readonly devicePixelRatio: number;
- readonly doNotTrack: string;
readonly document: Document;
+ readonly doNotTrack: string;
event: Event | undefined;
readonly external: External;
readonly frameElement: Element;
@@ -13248,9 +13266,9 @@ interface Window extends EventTarget, WindowTimers, WindowSessionStorage, Window
readonly screenTop: number;
readonly screenX: number;
readonly screenY: number;
+ readonly scrollbars: BarProp;
readonly scrollX: number;
readonly scrollY: number;
- readonly scrollbars: BarProp;
readonly self: Window;
readonly speechSynthesis: SpeechSynthesis;
status: string;
@@ -13306,7 +13324,7 @@ interface Window extends EventTarget, WindowTimers, WindowSessionStorage, Window
declare var Window: {
prototype: Window;
new(): Window;
-}
+};
interface WorkerEventMap extends AbstractWorkerEventMap {
"message": MessageEvent;
@@ -13323,7 +13341,7 @@ interface Worker extends EventTarget, AbstractWorker {
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;
@@ -13333,7 +13351,7 @@ interface XMLDocument extends Document {
declare var XMLDocument: {
prototype: XMLDocument;
new(): XMLDocument;
-}
+};
interface XMLHttpRequestEventMap extends XMLHttpRequestEventTargetEventMap {
"readystatechange": Event;
@@ -13380,7 +13398,7 @@ declare var XMLHttpRequest: {
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;
@@ -13390,7 +13408,7 @@ interface XMLHttpRequestUpload extends EventTarget, XMLHttpRequestEventTarget {
declare var XMLHttpRequestUpload: {
prototype: XMLHttpRequestUpload;
new(): XMLHttpRequestUpload;
-}
+};
interface XMLSerializer {
serializeToString(target: Node): string;
@@ -13399,7 +13417,7 @@ interface XMLSerializer {
declare var XMLSerializer: {
prototype: XMLSerializer;
new(): XMLSerializer;
-}
+};
interface XPathEvaluator {
createExpression(expression: string, resolver: XPathNSResolver): XPathExpression;
@@ -13410,7 +13428,7 @@ interface XPathEvaluator {
declare var XPathEvaluator: {
prototype: XPathEvaluator;
new(): XPathEvaluator;
-}
+};
interface XPathExpression {
evaluate(contextNode: Node, type: number, result: XPathResult | null): XPathResult;
@@ -13419,7 +13437,7 @@ interface XPathExpression {
declare var XPathExpression: {
prototype: XPathExpression;
new(): XPathExpression;
-}
+};
interface XPathNSResolver {
lookupNamespaceURI(prefix: string): string;
@@ -13428,7 +13446,7 @@ interface XPathNSResolver {
declare var XPathNSResolver: {
prototype: XPathNSResolver;
new(): XPathNSResolver;
-}
+};
interface XPathResult {
readonly booleanValue: boolean;
@@ -13465,7 +13483,7 @@ declare var XPathResult: {
readonly STRING_TYPE: number;
readonly UNORDERED_NODE_ITERATOR_TYPE: number;
readonly UNORDERED_NODE_SNAPSHOT_TYPE: number;
-}
+};
interface XSLTProcessor {
clearParameters(): void;
@@ -13481,17 +13499,7 @@ interface XSLTProcessor {
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;
@@ -13528,6 +13536,81 @@ interface ChildNode {
remove(): void;
}
+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 DOML2DeprecatedColorProperty {
color: string;
}
@@ -13536,81 +13619,6 @@ 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;
@@ -13655,16 +13663,16 @@ interface GlobalFetch {
interface HTMLTableAlignment {
/**
- * Sets or retrieves a value that you can use to implement your own ch functionality for the object.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves how text and other content are vertically aligned within the object that contains them.
+ */
vAlign: string;
}
@@ -13889,38 +13897,38 @@ interface ImageBitmap {
interface URLSearchParams {
/**
- * Appends a specified key/value pair as a new search parameter.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Returns all the values association with a given search parameter.
+ */
getAll(name: string): string[];
/**
- * Returns a Boolean indicating if such a search parameter exists.
- */
+ * 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.
- */
+ * 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.
- */
+ * Constructor returning a URLSearchParams object.
+ */
new (init?: string | URLSearchParams): URLSearchParams;
-}
+};
interface NodeListOf<TNode extends Node> extends NodeList {
length: number;
@@ -14168,7 +14176,7 @@ interface ShadowRoot extends DocumentOrShadowRoot, DocumentFragment {
}
interface ShadowRootInit {
- mode: 'open'|'closed';
+ mode: "open" | "closed";
delegatesFocus?: boolean;
}
@@ -14218,68 +14226,68 @@ interface TouchEventInit extends EventModifierInit {
declare type EventListenerOrEventListenerObject = EventListener | EventListenerObject;
+interface DecodeErrorCallback {
+ (error: DOMException): void;
+}
+interface DecodeSuccessCallback {
+ (decodedData: AudioBuffer): void;
+}
interface ErrorEventHandler {
- (message: string, filename?: string, lineno?: number, colno?: number, error?:Error): void;
+ (message: string, filename?: string, lineno?: number, colno?: number, error?: Error): void;
}
-interface PositionCallback {
- (position: Position): void;
+interface ForEachCallback {
+ (keyId: any, status: MediaKeyStatus): void;
}
-interface PositionErrorCallback {
- (error: PositionError): void;
+interface FrameRequestCallback {
+ (time: number): void;
+}
+interface FunctionStringCallback {
+ (data: string): void;
+}
+interface IntersectionObserverCallback {
+ (entries: IntersectionObserverEntry[], observer: IntersectionObserver): void;
}
interface MediaQueryListListener {
(mql: MediaQueryList): void;
}
+interface MSExecAtPriorityFunctionCallback {
+ (...args: any[]): any;
+}
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 NavigatorUserMediaErrorCallback {
+ (error: MediaStreamError): void;
}
-interface DecodeErrorCallback {
- (error: DOMException): void;
+interface NavigatorUserMediaSuccessCallback {
+ (stream: MediaStream): void;
}
-interface VoidFunction {
- (): void;
+interface NotificationPermissionCallback {
+ (permission: NotificationPermission): void;
}
-interface RTCSessionDescriptionCallback {
- (sdp: RTCSessionDescription): void;
+interface PositionCallback {
+ (position: Position): void;
+}
+interface PositionErrorCallback {
+ (error: PositionError): void;
}
interface RTCPeerConnectionErrorCallback {
(error: DOMError): void;
}
+interface RTCSessionDescriptionCallback {
+ (sdp: RTCSessionDescription): 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 VoidFunction {
+ (): void;
}
interface HTMLElementTagNameMap {
"a": HTMLAnchorElement;
@@ -14367,48 +14375,27 @@ interface HTMLElementTagNameMap {
"xmp": HTMLPreElement;
}
-interface ElementTagNameMap {
- "a": HTMLAnchorElement;
+interface ElementTagNameMap extends HTMLElementTagNameMap {
"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;
@@ -14433,307 +14420,67 @@ interface ElementTagNameMap {
"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; };
+type ElementListTagNameMap = {
+ [key in keyof ElementTagNameMap]: NodeListOf<ElementTagNameMap[key]>
+};
+
+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;
@@ -14741,8 +14488,8 @@ 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 doNotTrack: string;
declare var event: Event | undefined;
declare var external: External;
declare var frameElement: Element;
@@ -14865,9 +14612,9 @@ declare var screenLeft: number;
declare var screenTop: number;
declare var screenX: number;
declare var screenY: number;
+declare var scrollbars: BarProp;
declare var scrollX: number;
declare var scrollY: number;
-declare var scrollbars: BarProp;
declare var self: Window;
declare var speechSynthesis: SpeechSynthesis;
declare var status: string;
@@ -14986,6 +14733,7 @@ type BufferSource = ArrayBuffer | ArrayBufferView;
type MouseWheelEvent = WheelEvent;
type ScrollRestoration = "auto" | "manual";
type FormDataEntryValue = string | File;
+type InsertPosition = "beforebegin" | "afterbegin" | "beforeend" | "afterend";
type AppendMode = "segments" | "sequence";
type AudioContextState = "suspended" | "running" | "closed";
type BiquadFilterType = "lowpass" | "highpass" | "bandpass" | "lowshelf" | "highshelf" | "peaking" | "notch" | "allpass";
@@ -14999,6 +14747,12 @@ type IDBCursorDirection = "next" | "nextunique" | "prev" | "prevunique";
type IDBRequestReadyState = "pending" | "done";
type IDBTransactionMode = "readonly" | "readwrite" | "versionchange";
type ListeningState = "inactive" | "active" | "disambiguation";
+type MediaDeviceKind = "audioinput" | "audiooutput" | "videoinput";
+type MediaKeyMessageType = "license-request" | "license-renewal" | "license-release" | "individualization-request";
+type MediaKeySessionType = "temporary" | "persistent-license" | "persistent-release-message";
+type MediaKeysRequirement = "required" | "optional" | "not-allowed";
+type MediaKeyStatus = "usable" | "expired" | "output-downscaled" | "output-not-allowed" | "status-pending" | "internal-error";
+type MediaStreamTrackState = "live" | "ended";
type MSCredentialType = "FIDO_2_0";
type MSIceAddrType = "os" | "stun" | "turn" | "peer-derived";
type MSIceType = "failed" | "direct" | "relay";
@@ -15006,12 +14760,6 @@ type MSStatsType = "description" | "localclientevent" | "inbound-network" | "out
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";
@@ -15023,6 +14771,14 @@ type PaymentComplete = "success" | "fail" | "";
type PaymentShippingType = "shipping" | "delivery" | "pickup";
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 RTCBundlePolicy = "balanced" | "max-compat" | "max-bundle";
type RTCDegradationPreference = "maintain-framerate" | "maintain-resolution" | "balanced";
type RTCDtlsRole = "auto" | "client" | "server";
@@ -15030,9 +14786,9 @@ 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 RTCIceGatherPolicy = "all" | "nohost" | "relay";
type RTCIceProtocol = "udp" | "tcp";
type RTCIceRole = "controlling" | "controlled";
type RTCIceTcpCandidateType = "active" | "passive" | "so";
@@ -15043,14 +14799,6 @@ type RTCSignalingState = "stable" | "have-local-offer" | "have-remote-offer" | "
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";
diff --git a/node_modules/typedoc/node_modules/typescript/lib/lib.es2017.d.ts b/node_modules/typedoc/node_modules/typescript/lib/lib.es2017.d.ts
index a0d3a0aff..b887f51e8 100644
--- a/node_modules/typedoc/node_modules/typescript/lib/lib.es2017.d.ts
+++ b/node_modules/typedoc/node_modules/typescript/lib/lib.es2017.d.ts
@@ -21,4 +21,5 @@ and limitations under the License.
/// <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
+/// <reference path="lib.es2017.string.d.ts" />
+/// <reference path="lib.es2017.intl.d.ts" />
diff --git a/node_modules/typedoc/node_modules/typescript/lib/lib.es2017.full.d.ts b/node_modules/typedoc/node_modules/typescript/lib/lib.es2017.full.d.ts
index dae59bc9a..6c2f26066 100644
--- a/node_modules/typedoc/node_modules/typescript/lib/lib.es2017.full.d.ts
+++ b/node_modules/typedoc/node_modules/typescript/lib/lib.es2017.full.d.ts
@@ -22,18 +22,20 @@ and limitations under the License.
/// <reference path="lib.es2017.object.d.ts" />
/// <reference path="lib.es2017.sharedmemory.d.ts" />
/// <reference path="lib.es2017.string.d.ts" />
+/// <reference path="lib.es2017.intl.d.ts" />
+
/////////////////////////////
-/// IE DOM APIs
+/// DOM APIs
/////////////////////////////
interface Account {
- rpDisplayName?: string;
displayName?: string;
id?: string;
- name?: string;
imageURL?: string;
+ name?: string;
+ rpDisplayName?: string;
}
interface Algorithm {
@@ -46,32 +48,32 @@ interface AnimationEventInit extends EventInit {
}
interface AssertionOptions {
- timeoutSeconds?: number;
- rpId?: USVString;
allowList?: ScopedCredentialDescriptor[];
extensions?: WebAuthnExtensions;
+ rpId?: USVString;
+ timeoutSeconds?: number;
}
interface CacheQueryOptions {
- ignoreSearch?: boolean;
+ cacheName?: string;
ignoreMethod?: boolean;
+ ignoreSearch?: boolean;
ignoreVary?: boolean;
- cacheName?: string;
}
interface ClientData {
challenge?: string;
+ extensions?: WebAuthnExtensions;
+ hashAlg?: string | Algorithm;
origin?: string;
rpId?: string;
- hashAlg?: string | Algorithm;
tokenBinding?: string;
- extensions?: WebAuthnExtensions;
}
interface CloseEventInit extends EventInit {
- wasClean?: boolean;
code?: number;
reason?: string;
+ wasClean?: boolean;
}
interface CompositionEventInit extends UIEventInit {
@@ -111,13 +113,6 @@ interface CustomEventInit extends EventInit {
detail?: any;
}
-interface DOMRectInit {
- x?: any;
- y?: any;
- width?: any;
- height?: any;
-}
-
interface DeviceAccelerationDict {
x?: number;
y?: number;
@@ -131,15 +126,15 @@ interface DeviceLightEventInit extends EventInit {
interface DeviceMotionEventInit extends EventInit {
acceleration?: DeviceAccelerationDict;
accelerationIncludingGravity?: DeviceAccelerationDict;
- rotationRate?: DeviceRotationRateDict;
interval?: number;
+ rotationRate?: DeviceRotationRateDict;
}
interface DeviceOrientationEventInit extends EventInit {
+ absolute?: boolean;
alpha?: number;
beta?: number;
gamma?: number;
- absolute?: boolean;
}
interface DeviceRotationRateDict {
@@ -148,17 +143,24 @@ interface DeviceRotationRateDict {
gamma?: number;
}
+interface DOMRectInit {
+ height?: any;
+ width?: any;
+ x?: any;
+ y?: any;
+}
+
interface DoubleRange {
max?: number;
min?: number;
}
interface ErrorEventInit extends EventInit {
- message?: string;
- filename?: string;
- lineno?: number;
colno?: number;
error?: any;
+ filename?: string;
+ lineno?: number;
+ message?: string;
}
interface EventInit {
@@ -168,9 +170,8 @@ interface EventInit {
}
interface EventModifierInit extends UIEventInit {
- ctrlKey?: boolean;
- shiftKey?: boolean;
altKey?: boolean;
+ ctrlKey?: boolean;
metaKey?: boolean;
modifierAltGraph?: boolean;
modifierCapsLock?: boolean;
@@ -183,6 +184,7 @@ interface EventModifierInit extends UIEventInit {
modifierSuper?: boolean;
modifierSymbol?: boolean;
modifierSymbolLock?: boolean;
+ shiftKey?: boolean;
}
interface ExceptionInformation {
@@ -195,17 +197,17 @@ interface FocusEventInit extends UIEventInit {
interface FocusNavigationEventInit extends EventInit {
navigationReason?: string;
+ originHeight?: number;
originLeft?: number;
originTop?: number;
originWidth?: number;
- originHeight?: number;
}
interface FocusNavigationOrigin {
+ originHeight?: number;
originLeft?: number;
originTop?: number;
originWidth?: number;
- originHeight?: number;
}
interface GamepadEventInit extends EventInit {
@@ -232,11 +234,11 @@ interface IDBObjectStoreParameters {
}
interface IntersectionObserverEntryInit {
- time?: number;
- rootBounds?: DOMRectInit;
boundingClientRect?: DOMRectInit;
intersectionRect?: DOMRectInit;
+ rootBounds?: DOMRectInit;
target?: Element;
+ time?: number;
}
interface IntersectionObserverInit {
@@ -261,39 +263,153 @@ interface LongRange {
min?: number;
}
+interface MediaEncryptedEventInit extends EventInit {
+ initData?: ArrayBuffer;
+ initDataType?: string;
+}
+
+interface MediaKeyMessageEventInit extends EventInit {
+ message?: ArrayBuffer;
+ messageType?: MediaKeyMessageType;
+}
+
+interface MediaKeySystemConfiguration {
+ audioCapabilities?: MediaKeySystemMediaCapability[];
+ distinctiveIdentifier?: MediaKeysRequirement;
+ initDataTypes?: string[];
+ persistentState?: MediaKeysRequirement;
+ videoCapabilities?: MediaKeySystemMediaCapability[];
+}
+
+interface MediaKeySystemMediaCapability {
+ contentType?: string;
+ robustness?: string;
+}
+
+interface MediaStreamConstraints {
+ audio?: boolean | MediaTrackConstraints;
+ video?: boolean | MediaTrackConstraints;
+}
+
+interface MediaStreamErrorEventInit extends EventInit {
+ error?: MediaStreamError;
+}
+
+interface MediaStreamEventInit extends EventInit {
+ stream?: MediaStream;
+}
+
+interface MediaStreamTrackEventInit extends EventInit {
+ track?: MediaStreamTrack;
+}
+
+interface MediaTrackCapabilities {
+ aspectRatio?: number | DoubleRange;
+ deviceId?: string;
+ echoCancellation?: boolean[];
+ facingMode?: string;
+ frameRate?: number | DoubleRange;
+ groupId?: string;
+ height?: number | LongRange;
+ sampleRate?: number | LongRange;
+ sampleSize?: number | LongRange;
+ volume?: number | DoubleRange;
+ width?: number | LongRange;
+}
+
+interface MediaTrackConstraints extends MediaTrackConstraintSet {
+ advanced?: MediaTrackConstraintSet[];
+}
+
+interface MediaTrackConstraintSet {
+ aspectRatio?: number | ConstrainDoubleRange;
+ deviceId?: string | string[] | ConstrainDOMStringParameters;
+ echoCancelation?: boolean | ConstrainBooleanParameters;
+ facingMode?: string | string[] | ConstrainDOMStringParameters;
+ frameRate?: number | ConstrainDoubleRange;
+ groupId?: string | string[] | ConstrainDOMStringParameters;
+ height?: number | ConstrainLongRange;
+ sampleRate?: number | ConstrainLongRange;
+ sampleSize?: number | ConstrainLongRange;
+ volume?: number | ConstrainDoubleRange;
+ width?: number | ConstrainLongRange;
+}
+
+interface MediaTrackSettings {
+ aspectRatio?: number;
+ deviceId?: string;
+ echoCancellation?: boolean;
+ facingMode?: string;
+ frameRate?: number;
+ groupId?: string;
+ height?: number;
+ sampleRate?: number;
+ sampleSize?: number;
+ volume?: number;
+ width?: number;
+}
+
+interface MediaTrackSupportedConstraints {
+ aspectRatio?: boolean;
+ deviceId?: boolean;
+ echoCancellation?: boolean;
+ facingMode?: boolean;
+ frameRate?: boolean;
+ groupId?: boolean;
+ height?: boolean;
+ sampleRate?: boolean;
+ sampleSize?: boolean;
+ volume?: boolean;
+ width?: boolean;
+}
+
+interface MessageEventInit extends EventInit {
+ lastEventId?: string;
+ channel?: string;
+ data?: any;
+ origin?: string;
+ ports?: MessagePort[];
+ source?: Window;
+}
+
+interface MouseEventInit extends EventModifierInit {
+ button?: number;
+ buttons?: number;
+ clientX?: number;
+ clientY?: number;
+ relatedTarget?: EventTarget;
+ screenX?: number;
+ screenY?: number;
+}
+
interface MSAccountInfo {
+ accountImageUri?: string;
+ accountName?: string;
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;
+ deviceClippingEventRatio?: number;
+ deviceEchoEventRatio?: number;
deviceGlitchesEventRatio?: number;
+ deviceHalfDuplexAECEventRatio?: number;
+ deviceHowlingEventCount?: number;
deviceLowSNREventRatio?: number;
deviceLowSpeechLevelEventRatio?: number;
- deviceClippingEventRatio?: number;
- deviceEchoEventRatio?: number;
+ deviceMultipleEndpointsEventCount?: number;
deviceNearEndToEchoRatioEventRatio?: number;
- deviceRenderZeroVolumeEventRatio?: number;
deviceRenderMuteEventRatio?: number;
- deviceMultipleEndpointsEventCount?: number;
- deviceHowlingEventCount?: number;
+ deviceRenderNotFunctioningEventRatio?: number;
+ deviceRenderZeroVolumeEventRatio?: number;
+ networkDelayEventRatio?: number;
+ networkSendQualityEventRatio?: number;
}
interface MSAudioRecvPayload extends MSPayloadBase {
- samplingRate?: number;
- signal?: MSAudioRecvSignal;
- packetReorderRatio?: number;
- packetReorderDepthAvg?: number;
- packetReorderDepthMax?: number;
burstLossLength1?: number;
burstLossLength2?: number;
burstLossLength3?: number;
@@ -305,31 +421,36 @@ interface MSAudioRecvPayload extends MSPayloadBase {
fecRecvDistance1?: number;
fecRecvDistance2?: number;
fecRecvDistance3?: number;
+ packetReorderDepthAvg?: number;
+ packetReorderDepthMax?: number;
+ packetReorderRatio?: number;
+ ratioCompressedSamplesAvg?: number;
ratioConcealedSamplesAvg?: number;
ratioStretchedSamplesAvg?: number;
- ratioCompressedSamplesAvg?: number;
+ samplingRate?: number;
+ signal?: MSAudioRecvSignal;
}
interface MSAudioRecvSignal {
initialSignalLevelRMS?: number;
- recvSignalLevelCh1?: number;
recvNoiseLevelCh1?: number;
- renderSignalLevel?: number;
- renderNoiseLevel?: number;
+ recvSignalLevelCh1?: number;
renderLoopbackSignalLevel?: number;
+ renderNoiseLevel?: number;
+ renderSignalLevel?: number;
}
interface MSAudioSendPayload extends MSPayloadBase {
- samplingRate?: number;
- signal?: MSAudioSendSignal;
audioFECUsed?: boolean;
+ samplingRate?: number;
sendMutePercent?: number;
+ signal?: MSAudioSendSignal;
}
interface MSAudioSendSignal {
noiseLevel?: number;
- sendSignalLevelCh1?: number;
sendNoiseLevelCh1?: number;
+ sendSignalLevelCh1?: number;
}
interface MSConnectivity {
@@ -347,8 +468,8 @@ interface MSCredentialParameters {
}
interface MSCredentialSpec {
- type?: MSCredentialType;
id?: string;
+ type?: MSCredentialType;
}
interface MSDelay {
@@ -358,12 +479,12 @@ interface MSDelay {
interface MSDescription extends RTCStats {
connectivity?: MSConnectivity;
- transport?: RTCIceProtocol;
- networkconnectivity?: MSNetworkConnectivityInfo;
- localAddr?: MSIPAddressInfo;
- remoteAddr?: MSIPAddressInfo;
deviceDevName?: string;
+ localAddr?: MSIPAddressInfo;
+ networkconnectivity?: MSNetworkConnectivityInfo;
reflexiveLocalIPAddr?: MSIPAddressInfo;
+ remoteAddr?: MSIPAddressInfo;
+ transport?: RTCIceProtocol;
}
interface MSFIDOCredentialParameters extends MSCredentialParameters {
@@ -371,35 +492,35 @@ interface MSFIDOCredentialParameters extends MSCredentialParameters {
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;
+ alternateServerReceived?: boolean;
+ connCheckMessageIntegrityFailed?: boolean;
connCheckOtherError?: boolean;
- turnAuthUnknownUsernameError?: boolean;
- noRelayServersConfigured?: boolean;
+ fipsAllocationFailure?: boolean;
multipleRelayServersAttempted?: boolean;
+ noRelayServersConfigured?: boolean;
portRangeExhausted?: boolean;
- alternateServerReceived?: boolean;
pseudoTLSFailure?: boolean;
+ tcpNatConnectivityFailed?: boolean;
+ tcpRelayConnectivityFailed?: boolean;
+ turnAuthUnknownUsernameError?: boolean;
+ turnTcpAllocateFailed?: boolean;
+ turnTcpSendFailed?: boolean;
+ turnTcpTimedOut?: boolean;
turnTurnTcpConnectivityFailed?: boolean;
+ turnUdpAllocateFailed?: boolean;
+ turnUdpSendFailed?: boolean;
+ udpLocalConnectivityFailed?: boolean;
+ udpNatConnectivityFailed?: boolean;
+ udpRelayConnectivityFailed?: boolean;
useCandidateChecksFailed?: boolean;
- fipsAllocationFailure?: boolean;
+}
+
+interface MSIPAddressInfo {
+ ipAddr?: string;
+ manufacturerMacAddrMask?: string;
+ port?: number;
}
interface MSJitter {
@@ -409,28 +530,28 @@ interface MSJitter {
}
interface MSLocalClientEventBase extends RTCStats {
- networkReceiveQualityEventRatio?: number;
networkBandwidthLowEventRatio?: number;
+ networkReceiveQualityEventRatio?: number;
}
interface MSNetwork extends RTCStats {
- jitter?: MSJitter;
delay?: MSDelay;
+ jitter?: MSJitter;
packetLoss?: MSPacketLoss;
utilization?: MSUtilization;
}
interface MSNetworkConnectivityInfo {
- vpn?: boolean;
linkspeed?: number;
networkConnectionDetails?: string;
+ vpn?: boolean;
}
interface MSNetworkInterfaceType {
interfaceTypeEthernet?: boolean;
- interfaceTypeWireless?: boolean;
interfaceTypePPP?: boolean;
interfaceTypeTunnel?: boolean;
+ interfaceTypeWireless?: boolean;
interfaceTypeWWAN?: boolean;
}
@@ -448,13 +569,13 @@ interface MSPayloadBase extends RTCStats {
}
interface MSPortRange {
- min?: number;
max?: number;
+ min?: number;
}
interface MSRelayAddress {
- relayAddress?: string;
port?: number;
+ relayAddress?: string;
}
interface MSSignatureParameters {
@@ -462,241 +583,122 @@ interface MSSignatureParameters {
}
interface MSTransportDiagnosticsStats extends RTCStats {
+ allocationTimeInMs?: number;
baseAddress?: string;
+ baseInterface?: MSNetworkInterfaceType;
+ iceRole?: RTCIceRole;
+ iceWarningFlags?: MSIceWarningFlags;
+ interfaces?: MSNetworkInterfaceType;
localAddress?: string;
- localSite?: string;
- networkName?: string;
- remoteAddress?: string;
- remoteSite?: string;
+ localAddrType?: MSIceAddrType;
+ localInterface?: MSNetworkInterfaceType;
localMR?: string;
- remoteMR?: string;
- iceWarningFlags?: MSIceWarningFlags;
- portRangeMin?: number;
- portRangeMax?: number;
localMRTCPPort?: number;
- remoteMRTCPPort?: number;
- stunVer?: number;
- numConsentReqSent?: number;
+ localSite?: string;
+ msRtcEngineVersion?: string;
+ networkName?: string;
numConsentReqReceived?: number;
- numConsentRespSent?: number;
+ numConsentReqSent?: number;
numConsentRespReceived?: number;
- interfaces?: MSNetworkInterfaceType;
- baseInterface?: MSNetworkInterfaceType;
+ numConsentRespSent?: number;
+ portRangeMax?: number;
+ portRangeMin?: number;
protocol?: RTCIceProtocol;
- localInterface?: MSNetworkInterfaceType;
- localAddrType?: MSIceAddrType;
+ remoteAddress?: string;
remoteAddrType?: MSIceAddrType;
- iceRole?: RTCIceRole;
+ remoteMR?: string;
+ remoteMRTCPPort?: number;
+ remoteSite?: string;
rtpRtcpMux?: boolean;
- allocationTimeInMs?: number;
- msRtcEngineVersion?: string;
+ stunVer?: number;
}
interface MSUtilization {
- packets?: number;
bandwidthEstimation?: number;
- bandwidthEstimationMin?: number;
+ bandwidthEstimationAvg?: number;
bandwidthEstimationMax?: number;
+ bandwidthEstimationMin?: number;
bandwidthEstimationStdDev?: number;
- bandwidthEstimationAvg?: number;
+ packets?: number;
}
interface MSVideoPayload extends MSPayloadBase {
+ durationSeconds?: number;
resolution?: string;
videoBitRateAvg?: number;
videoBitRateMax?: number;
videoFrameRateAvg?: number;
videoPacketLossRate?: number;
- durationSeconds?: number;
}
interface MSVideoRecvPayload extends MSVideoPayload {
- videoFrameLossRate?: number;
+ lowBitRateCallPercent?: number;
+ lowFrameRateCallPercent?: number;
+ recvBitRateAverage?: number;
+ recvBitRateMaximum?: number;
recvCodecType?: string;
- recvResolutionWidth?: number;
- recvResolutionHeight?: number;
- videoResolutions?: MSVideoResolutionDistribution;
+ recvFpsHarmonicAverage?: number;
recvFrameRateAverage?: number;
- recvBitRateMaximum?: number;
- recvBitRateAverage?: number;
+ recvNumResSwitches?: number;
+ recvReorderBufferMaxSuccessfullyOrderedExtent?: number;
+ recvReorderBufferMaxSuccessfullyOrderedLateTime?: number;
+ recvReorderBufferPacketsDroppedDueToBufferExhaustion?: number;
+ recvReorderBufferPacketsDroppedDueToTimeout?: number;
+ recvReorderBufferReorderedPackets?: number;
+ recvResolutionHeight?: number;
+ recvResolutionWidth?: 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;
+ videoFrameLossRate?: number;
+ videoPostFECPLR?: number;
+ videoResolutions?: MSVideoResolutionDistribution;
}
interface MSVideoResolutionDistribution {
cifQuality?: number;
- vgaQuality?: number;
- h720Quality?: number;
h1080Quality?: number;
h1440Quality?: number;
h2160Quality?: number;
+ h720Quality?: number;
+ vgaQuality?: number;
}
interface MSVideoSendPayload extends MSVideoPayload {
- sendFrameRateAverage?: number;
- sendBitRateMaximum?: number;
sendBitRateAverage?: number;
- sendVideoStreamsMax?: number;
- sendResolutionWidth?: number;
+ sendBitRateMaximum?: number;
+ sendFrameRateAverage?: 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;
+ sendResolutionWidth?: number;
+ sendVideoStreamsMax?: number;
}
interface MsZoomToOptions {
+ animate?: string;
contentX?: number;
contentY?: number;
+ scaleFactor?: number;
viewportX?: string;
viewportY?: string;
- scaleFactor?: number;
- animate?: string;
}
interface MutationObserverInit {
- childList?: boolean;
+ attributeFilter?: string[];
+ attributeOldValue?: boolean;
attributes?: boolean;
characterData?: boolean;
- subtree?: boolean;
- attributeOldValue?: boolean;
characterDataOldValue?: boolean;
- attributeFilter?: string[];
+ childList?: boolean;
+ subtree?: boolean;
}
interface NotificationOptions {
+ body?: string;
dir?: NotificationDirection;
+ icon?: string;
lang?: string;
- body?: string;
tag?: string;
- icon?: string;
}
interface ObjectURLOptions {
@@ -705,39 +707,39 @@ interface ObjectURLOptions {
interface PaymentCurrencyAmount {
currency?: string;
- value?: string;
currencySystem?: string;
+ value?: string;
}
interface PaymentDetails {
- total?: PaymentItem;
displayItems?: PaymentItem[];
- shippingOptions?: PaymentShippingOption[];
- modifiers?: PaymentDetailsModifier[];
error?: string;
+ modifiers?: PaymentDetailsModifier[];
+ shippingOptions?: PaymentShippingOption[];
+ total?: PaymentItem;
}
interface PaymentDetailsModifier {
- supportedMethods?: string[];
- total?: PaymentItem;
additionalDisplayItems?: PaymentItem[];
data?: any;
+ supportedMethods?: string[];
+ total?: PaymentItem;
}
interface PaymentItem {
- label?: string;
amount?: PaymentCurrencyAmount;
+ label?: string;
pending?: boolean;
}
interface PaymentMethodData {
- supportedMethods?: string[];
data?: any;
+ supportedMethods?: string[];
}
interface PaymentOptions {
- requestPayerName?: boolean;
requestPayerEmail?: boolean;
+ requestPayerName?: boolean;
requestPayerPhone?: boolean;
requestShipping?: boolean;
shippingType?: string;
@@ -747,9 +749,9 @@ interface PaymentRequestUpdateEventInit extends EventInit {
}
interface PaymentShippingOption {
+ amount?: PaymentCurrencyAmount;
id?: string;
label?: string;
- amount?: PaymentCurrencyAmount;
selected?: boolean;
}
@@ -758,14 +760,14 @@ interface PeriodicWaveConstraints {
}
interface PointerEventInit extends MouseEventInit {
- pointerId?: number;
- width?: number;
height?: number;
+ isPrimary?: boolean;
+ pointerId?: number;
+ pointerType?: string;
pressure?: number;
tiltX?: number;
tiltY?: number;
- pointerType?: string;
- isPrimary?: boolean;
+ width?: number;
}
interface PopStateEventInit extends EventInit {
@@ -774,8 +776,8 @@ interface PopStateEventInit extends EventInit {
interface PositionOptions {
enableHighAccuracy?: boolean;
- timeout?: number;
maximumAge?: number;
+ timeout?: number;
}
interface ProgressEventInit extends EventInit {
@@ -785,38 +787,63 @@ interface ProgressEventInit extends EventInit {
}
interface PushSubscriptionOptionsInit {
- userVisibleOnly?: boolean;
applicationServerKey?: any;
+ userVisibleOnly?: boolean;
+}
+
+interface RegistrationOptions {
+ scope?: string;
+}
+
+interface RequestInit {
+ body?: any;
+ cache?: RequestCache;
+ credentials?: RequestCredentials;
+ headers?: any;
+ integrity?: string;
+ keepalive?: boolean;
+ method?: string;
+ mode?: RequestMode;
+ redirect?: RequestRedirect;
+ referrer?: string;
+ referrerPolicy?: ReferrerPolicy;
+ window?: any;
+}
+
+interface ResponseInit {
+ headers?: any;
+ status?: number;
+ statusText?: string;
}
interface RTCConfiguration {
+ bundlePolicy?: RTCBundlePolicy;
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[];
+ role?: RTCDtlsRole;
+}
+
+interface RTCDTMFToneChangeEventInit extends EventInit {
+ tone?: string;
}
interface RTCIceCandidateAttributes extends RTCStats {
+ addressSourceUrl?: string;
+ candidateType?: RTCStatsIceCandidateType;
ipAddress?: string;
portNumber?: number;
- transport?: string;
- candidateType?: RTCStatsIceCandidateType;
priority?: number;
- addressSourceUrl?: string;
+ transport?: string;
}
interface RTCIceCandidateComplete {
@@ -824,15 +851,15 @@ interface RTCIceCandidateComplete {
interface RTCIceCandidateDictionary {
foundation?: string;
- priority?: number;
ip?: string;
- protocol?: RTCIceProtocol;
+ msMTurnSessionId?: string;
port?: number;
- type?: RTCIceCandidateType;
- tcpType?: RTCIceTcpCandidateType;
+ priority?: number;
+ protocol?: RTCIceProtocol;
relatedAddress?: string;
relatedPort?: number;
- msMTurnSessionId?: string;
+ tcpType?: RTCIceTcpCandidateType;
+ type?: RTCIceCandidateType;
}
interface RTCIceCandidateInit {
@@ -847,19 +874,19 @@ interface RTCIceCandidatePair {
}
interface RTCIceCandidatePairStats extends RTCStats {
- transportId?: string;
+ availableIncomingBitrate?: number;
+ availableOutgoingBitrate?: number;
+ bytesReceived?: number;
+ bytesSent?: number;
localCandidateId?: string;
- remoteCandidateId?: string;
- state?: RTCStatsIceCandidatePairState;
- priority?: number;
nominated?: boolean;
- writable?: boolean;
+ priority?: number;
readable?: boolean;
- bytesSent?: number;
- bytesReceived?: number;
+ remoteCandidateId?: string;
roundTripTime?: number;
- availableOutgoingBitrate?: number;
- availableIncomingBitrate?: number;
+ state?: RTCStatsIceCandidatePairState;
+ transportId?: string;
+ writable?: boolean;
}
interface RTCIceGatherOptions {
@@ -869,285 +896,260 @@ interface RTCIceGatherOptions {
}
interface RTCIceParameters {
- usernameFragment?: string;
- password?: string;
iceLite?: boolean;
+ password?: string;
+ usernameFragment?: string;
}
interface RTCIceServer {
+ credential?: string;
urls?: any;
username?: string;
- credential?: string;
}
interface RTCInboundRTPStreamStats extends RTCRTPStreamStats {
- packetsReceived?: number;
bytesReceived?: number;
- packetsLost?: number;
- jitter?: number;
fractionLost?: number;
+ jitter?: number;
+ packetsLost?: number;
+ packetsReceived?: 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;
+ frameHeight?: number;
+ framesCorrupted?: number;
+ framesDecoded?: number;
+ framesDropped?: number;
+ framesPerSecond?: number;
+ framesReceived?: number;
+ framesSent?: number;
+ frameWidth?: number;
+ remoteSource?: boolean;
+ ssrcIds?: string[];
+ trackIdentifier?: string;
}
interface RTCOfferOptions {
- offerToReceiveVideo?: number;
+ iceRestart?: boolean;
offerToReceiveAudio?: number;
+ offerToReceiveVideo?: number;
voiceActivityDetection?: boolean;
- iceRestart?: boolean;
}
interface RTCOutboundRTPStreamStats extends RTCRTPStreamStats {
- packetsSent?: number;
bytesSent?: number;
- targetBitrate?: number;
+ packetsSent?: number;
roundTripTime?: number;
+ targetBitrate?: 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;
+ type?: string;
}
interface RTCRtcpParameters {
- ssrc?: number;
cname?: string;
- reducedSize?: boolean;
mux?: boolean;
+ reducedSize?: boolean;
+ ssrc?: number;
}
interface RTCRtpCapabilities {
codecs?: RTCRtpCodecCapability[];
- headerExtensions?: RTCRtpHeaderExtension[];
fecMechanisms?: string[];
+ headerExtensions?: RTCRtpHeaderExtension[];
}
interface RTCRtpCodecCapability {
- name?: string;
- kind?: string;
clockRate?: number;
- preferredPayloadType?: number;
+ kind?: string;
maxptime?: number;
- ptime?: number;
+ maxSpatialLayers?: number;
+ maxTemporalLayers?: number;
+ name?: string;
numChannels?: number;
- rtcpFeedback?: RTCRtcpFeedback[];
- parameters?: any;
options?: any;
- maxTemporalLayers?: number;
- maxSpatialLayers?: number;
+ parameters?: any;
+ preferredPayloadType?: number;
+ ptime?: number;
+ rtcpFeedback?: RTCRtcpFeedback[];
svcMultiStreamSupport?: boolean;
}
interface RTCRtpCodecParameters {
- name?: string;
- payloadType?: any;
clockRate?: number;
maxptime?: number;
- ptime?: number;
+ name?: string;
numChannels?: number;
- rtcpFeedback?: RTCRtcpFeedback[];
parameters?: any;
+ payloadType?: any;
+ ptime?: number;
+ rtcpFeedback?: RTCRtcpFeedback[];
}
interface RTCRtpContributingSource {
- timestamp?: number;
- csrc?: number;
audioLevel?: number;
+ csrc?: number;
+ timestamp?: number;
}
interface RTCRtpEncodingParameters {
- ssrc?: number;
+ active?: boolean;
codecPayloadType?: number;
+ dependencyEncodingIds?: string[];
+ encodingId?: string;
fec?: RTCRtpFecParameters;
- rtx?: RTCRtpRtxParameters;
- priority?: number;
+ framerateScale?: number;
maxBitrate?: number;
+ maxFramerate?: number;
minQuality?: number;
+ priority?: number;
resolutionScale?: number;
- framerateScale?: number;
- maxFramerate?: number;
- active?: boolean;
- encodingId?: string;
- dependencyEncodingIds?: string[];
+ rtx?: RTCRtpRtxParameters;
+ ssrc?: number;
ssrcRange?: RTCSsrcRange;
}
interface RTCRtpFecParameters {
- ssrc?: number;
mechanism?: string;
+ ssrc?: number;
}
interface RTCRtpHeaderExtension {
kind?: string;
- uri?: string;
- preferredId?: number;
preferredEncrypt?: boolean;
+ preferredId?: number;
+ uri?: string;
}
interface RTCRtpHeaderExtensionParameters {
- uri?: string;
- id?: number;
encrypt?: boolean;
+ id?: number;
+ uri?: string;
}
interface RTCRtpParameters {
- muxId?: string;
codecs?: RTCRtpCodecParameters[];
- headerExtensions?: RTCRtpHeaderExtensionParameters[];
+ degradationPreference?: RTCDegradationPreference;
encodings?: RTCRtpEncodingParameters[];
+ headerExtensions?: RTCRtpHeaderExtensionParameters[];
+ muxId?: string;
rtcp?: RTCRtcpParameters;
- degradationPreference?: RTCDegradationPreference;
}
interface RTCRtpRtxParameters {
ssrc?: number;
}
+interface RTCRTPStreamStats extends RTCStats {
+ associateStatsId?: string;
+ codecId?: string;
+ firCount?: number;
+ isRemote?: boolean;
+ mediaTrackId?: string;
+ nackCount?: number;
+ pliCount?: number;
+ sliCount?: number;
+ ssrc?: string;
+ transportId?: string;
+}
+
interface RTCRtpUnhandled {
- ssrc?: number;
- payloadType?: number;
muxId?: string;
+ payloadType?: number;
+ ssrc?: number;
}
interface RTCSessionDescriptionInit {
- type?: RTCSdpType;
sdp?: string;
+ type?: RTCSdpType;
}
interface RTCSrtpKeyParam {
keyMethod?: string;
keySalt?: string;
lifetime?: string;
- mkiValue?: number;
mkiLength?: number;
+ mkiValue?: number;
}
interface RTCSrtpSdesParameters {
- tag?: number;
cryptoSuite?: string;
keyParams?: RTCSrtpKeyParam[];
sessionParams?: string[];
+ tag?: number;
}
interface RTCSsrcRange {
- min?: number;
max?: number;
+ min?: number;
}
interface RTCStats {
- timestamp?: number;
- type?: RTCStatsType;
id?: string;
msType?: MSStatsType;
+ timestamp?: number;
+ type?: RTCStatsType;
}
interface RTCStatsReport {
}
interface RTCTransportStats extends RTCStats {
- bytesSent?: number;
- bytesReceived?: number;
- rtcpTransportStatsId?: string;
activeConnection?: boolean;
- selectedCandidatePairId?: string;
+ bytesReceived?: number;
+ bytesSent?: number;
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;
+ rtcpTransportStatsId?: string;
+ selectedCandidatePairId?: string;
}
interface ScopedCredentialDescriptor {
- type?: ScopedCredentialType;
id?: any;
transports?: Transport[];
+ type?: ScopedCredentialType;
}
interface ScopedCredentialOptions {
- timeoutSeconds?: number;
- rpId?: USVString;
excludeList?: ScopedCredentialDescriptor[];
extensions?: WebAuthnExtensions;
+ rpId?: USVString;
+ timeoutSeconds?: number;
}
interface ScopedCredentialParameters {
- type?: ScopedCredentialType;
algorithm?: string | Algorithm;
+ type?: ScopedCredentialType;
}
interface ServiceWorkerMessageEventInit extends EventInit {
data?: any;
- origin?: string;
lastEventId?: string;
- source?: ServiceWorker | MessagePort;
+ origin?: string;
ports?: MessagePort[];
+ source?: ServiceWorker | MessagePort;
}
interface SpeechSynthesisEventInit extends EventInit {
- utterance?: SpeechSynthesisUtterance;
charIndex?: number;
elapsedTime?: number;
name?: string;
+ utterance?: SpeechSynthesisUtterance;
}
interface StoreExceptionsInformation extends ExceptionInformation {
- siteName?: string;
- explanationString?: string;
detailURI?: string;
+ explanationString?: string;
+ siteName?: string;
}
interface StoreSiteSpecificExceptionsInformation extends StoreExceptionsInformation {
@@ -1159,13 +1161,13 @@ interface TrackEventInit extends EventInit {
}
interface TransitionEventInit extends EventInit {
- propertyName?: string;
elapsedTime?: number;
+ propertyName?: string;
}
interface UIEventInit extends EventInit {
- view?: Window;
detail?: number;
+ view?: Window;
}
interface WebAuthnExtensions {
@@ -1174,11 +1176,11 @@ interface WebAuthnExtensions {
interface WebGLContextAttributes {
failIfMajorPerformanceCaveat?: boolean;
alpha?: boolean;
- depth?: boolean;
- stencil?: boolean;
antialias?: boolean;
+ depth?: boolean;
premultipliedAlpha?: boolean;
preserveDrawingBuffer?: boolean;
+ stencil?: boolean;
}
interface WebGLContextEventInit extends EventInit {
@@ -1186,10 +1188,10 @@ interface WebGLContextEventInit extends EventInit {
}
interface WheelEventInit extends MouseEventInit {
+ deltaMode?: number;
deltaX?: number;
deltaY?: number;
deltaZ?: number;
- deltaMode?: number;
}
interface EventListener {
@@ -1208,19 +1210,6 @@ 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;
@@ -1236,8 +1225,21 @@ interface AnalyserNode extends AudioNode {
declare var AnalyserNode: {
prototype: AnalyserNode;
new(): AnalyserNode;
+};
+
+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 AnimationEvent extends Event {
readonly animationName: string;
readonly elapsedTime: number;
@@ -1247,7 +1249,7 @@ interface AnimationEvent extends Event {
declare var AnimationEvent: {
prototype: AnimationEvent;
new(typeArg: string, eventInitDict?: AnimationEventInit): AnimationEvent;
-}
+};
interface ApplicationCacheEventMap {
"cached": Event;
@@ -1292,7 +1294,7 @@ declare var ApplicationCache: {
readonly OBSOLETE: number;
readonly UNCACHED: number;
readonly UPDATEREADY: number;
-}
+};
interface Attr extends Node {
readonly name: string;
@@ -1305,7 +1307,7 @@ interface Attr extends Node {
declare var Attr: {
prototype: Attr;
new(): Attr;
-}
+};
interface AudioBuffer {
readonly duration: number;
@@ -1320,7 +1322,7 @@ interface AudioBuffer {
declare var AudioBuffer: {
prototype: AudioBuffer;
new(): AudioBuffer;
-}
+};
interface AudioBufferSourceNodeEventMap {
"ended": MediaStreamErrorEvent;
@@ -1343,7 +1345,7 @@ interface AudioBufferSourceNode extends AudioNode {
declare var AudioBufferSourceNode: {
prototype: AudioBufferSourceNode;
new(): AudioBufferSourceNode;
-}
+};
interface AudioContextEventMap {
"statechange": Event;
@@ -1389,7 +1391,7 @@ interface AudioContext extends AudioContextBase {
declare var AudioContext: {
prototype: AudioContext;
new(): AudioContext;
-}
+};
interface AudioDestinationNode extends AudioNode {
readonly maxChannelCount: number;
@@ -1398,7 +1400,7 @@ interface AudioDestinationNode extends AudioNode {
declare var AudioDestinationNode: {
prototype: AudioDestinationNode;
new(): AudioDestinationNode;
-}
+};
interface AudioListener {
dopplerFactor: number;
@@ -1411,7 +1413,7 @@ interface AudioListener {
declare var AudioListener: {
prototype: AudioListener;
new(): AudioListener;
-}
+};
interface AudioNode extends EventTarget {
channelCount: number;
@@ -1430,7 +1432,7 @@ interface AudioNode extends EventTarget {
declare var AudioNode: {
prototype: AudioNode;
new(): AudioNode;
-}
+};
interface AudioParam {
readonly defaultValue: number;
@@ -1446,7 +1448,7 @@ interface AudioParam {
declare var AudioParam: {
prototype: AudioParam;
new(): AudioParam;
-}
+};
interface AudioProcessingEvent extends Event {
readonly inputBuffer: AudioBuffer;
@@ -1457,7 +1459,7 @@ interface AudioProcessingEvent extends Event {
declare var AudioProcessingEvent: {
prototype: AudioProcessingEvent;
new(): AudioProcessingEvent;
-}
+};
interface AudioTrack {
enabled: boolean;
@@ -1471,7 +1473,7 @@ interface AudioTrack {
declare var AudioTrack: {
prototype: AudioTrack;
new(): AudioTrack;
-}
+};
interface AudioTrackListEventMap {
"addtrack": TrackEvent;
@@ -1494,7 +1496,7 @@ interface AudioTrackList extends EventTarget {
declare var AudioTrackList: {
prototype: AudioTrackList;
new(): AudioTrackList;
-}
+};
interface BarProp {
readonly visible: boolean;
@@ -1503,7 +1505,7 @@ interface BarProp {
declare var BarProp: {
prototype: BarProp;
new(): BarProp;
-}
+};
interface BeforeUnloadEvent extends Event {
returnValue: any;
@@ -1512,13 +1514,13 @@ interface BeforeUnloadEvent extends Event {
declare var BeforeUnloadEvent: {
prototype: BeforeUnloadEvent;
new(): BeforeUnloadEvent;
-}
+};
interface BiquadFilterNode extends AudioNode {
- readonly Q: AudioParam;
readonly detune: AudioParam;
readonly frequency: AudioParam;
readonly gain: AudioParam;
+ readonly Q: AudioParam;
type: BiquadFilterType;
getFrequencyResponse(frequencyHz: Float32Array, magResponse: Float32Array, phaseResponse: Float32Array): void;
}
@@ -1526,7 +1528,7 @@ interface BiquadFilterNode extends AudioNode {
declare var BiquadFilterNode: {
prototype: BiquadFilterNode;
new(): BiquadFilterNode;
-}
+};
interface Blob {
readonly size: number;
@@ -1539,16 +1541,305 @@ interface 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 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 CDATASection extends Text {
}
declare var CDATASection: {
prototype: CDATASection;
new(): CDATASection;
+};
+
+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, ...optionalParams: any[]): void;
+ groupCollapsed(groupTitle?: string, ...optionalParams: any[]): 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 CSS {
supports(property: string, value?: string): boolean;
}
@@ -1561,7 +1852,7 @@ interface CSSConditionRule extends CSSGroupingRule {
declare var CSSConditionRule: {
prototype: CSSConditionRule;
new(): CSSConditionRule;
-}
+};
interface CSSFontFaceRule extends CSSRule {
readonly style: CSSStyleDeclaration;
@@ -1570,7 +1861,7 @@ interface CSSFontFaceRule extends CSSRule {
declare var CSSFontFaceRule: {
prototype: CSSFontFaceRule;
new(): CSSFontFaceRule;
-}
+};
interface CSSGroupingRule extends CSSRule {
readonly cssRules: CSSRuleList;
@@ -1581,7 +1872,7 @@ interface CSSGroupingRule extends CSSRule {
declare var CSSGroupingRule: {
prototype: CSSGroupingRule;
new(): CSSGroupingRule;
-}
+};
interface CSSImportRule extends CSSRule {
readonly href: string;
@@ -1592,7 +1883,7 @@ interface CSSImportRule extends CSSRule {
declare var CSSImportRule: {
prototype: CSSImportRule;
new(): CSSImportRule;
-}
+};
interface CSSKeyframeRule extends CSSRule {
keyText: string;
@@ -1602,7 +1893,7 @@ interface CSSKeyframeRule extends CSSRule {
declare var CSSKeyframeRule: {
prototype: CSSKeyframeRule;
new(): CSSKeyframeRule;
-}
+};
interface CSSKeyframesRule extends CSSRule {
readonly cssRules: CSSRuleList;
@@ -1615,7 +1906,7 @@ interface CSSKeyframesRule extends CSSRule {
declare var CSSKeyframesRule: {
prototype: CSSKeyframesRule;
new(): CSSKeyframesRule;
-}
+};
interface CSSMediaRule extends CSSConditionRule {
readonly media: MediaList;
@@ -1624,7 +1915,7 @@ interface CSSMediaRule extends CSSConditionRule {
declare var CSSMediaRule: {
prototype: CSSMediaRule;
new(): CSSMediaRule;
-}
+};
interface CSSNamespaceRule extends CSSRule {
readonly namespaceURI: string;
@@ -1634,7 +1925,7 @@ interface CSSNamespaceRule extends CSSRule {
declare var CSSNamespaceRule: {
prototype: CSSNamespaceRule;
new(): CSSNamespaceRule;
-}
+};
interface CSSPageRule extends CSSRule {
readonly pseudoClass: string;
@@ -1646,7 +1937,7 @@ interface CSSPageRule extends CSSRule {
declare var CSSPageRule: {
prototype: CSSPageRule;
new(): CSSPageRule;
-}
+};
interface CSSRule {
cssText: string;
@@ -1656,8 +1947,8 @@ interface CSSRule {
readonly CHARSET_RULE: number;
readonly FONT_FACE_RULE: number;
readonly IMPORT_RULE: number;
- readonly KEYFRAMES_RULE: number;
readonly KEYFRAME_RULE: number;
+ readonly KEYFRAMES_RULE: number;
readonly MEDIA_RULE: number;
readonly NAMESPACE_RULE: number;
readonly PAGE_RULE: number;
@@ -1673,8 +1964,8 @@ declare var CSSRule: {
readonly CHARSET_RULE: number;
readonly FONT_FACE_RULE: number;
readonly IMPORT_RULE: number;
- readonly KEYFRAMES_RULE: number;
readonly KEYFRAME_RULE: number;
+ readonly KEYFRAMES_RULE: number;
readonly MEDIA_RULE: number;
readonly NAMESPACE_RULE: number;
readonly PAGE_RULE: number;
@@ -1682,7 +1973,7 @@ declare var CSSRule: {
readonly SUPPORTS_RULE: number;
readonly UNKNOWN_RULE: number;
readonly VIEWPORT_RULE: number;
-}
+};
interface CSSRuleList {
readonly length: number;
@@ -1693,13 +1984,13 @@ interface CSSRuleList {
declare var CSSRuleList: {
prototype: CSSRuleList;
new(): CSSRuleList;
-}
+};
interface CSSStyleDeclaration {
alignContent: string | null;
alignItems: string | null;
- alignSelf: string | null;
alignmentBaseline: string | null;
+ alignSelf: string | null;
animation: string | null;
animationDelay: string | null;
animationDirection: string | null;
@@ -1775,9 +2066,9 @@ interface CSSStyleDeclaration {
columnRuleColor: any;
columnRuleStyle: string | null;
columnRuleWidth: any;
+ columns: string | null;
columnSpan: string | null;
columnWidth: any;
- columns: string | null;
content: string | null;
counterIncrement: string | null;
counterReset: string | null;
@@ -1847,24 +2138,24 @@ interface CSSStyleDeclaration {
minHeight: string | null;
minWidth: string | null;
msContentZoomChaining: string | null;
+ msContentZooming: 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;
+ msGridColumnSpan: any;
msGridRow: any;
msGridRowAlign: string | null;
- msGridRowSpan: any;
msGridRows: string | null;
+ msGridRowSpan: any;
msHighContrastAdjust: string | null;
msHyphenateLimitChars: string | null;
msHyphenateLimitLines: any;
@@ -2000,9 +2291,9 @@ interface CSSStyleDeclaration {
webkitColumnRuleColor: any;
webkitColumnRuleStyle: string | null;
webkitColumnRuleWidth: any;
+ webkitColumns: string | null;
webkitColumnSpan: string | null;
webkitColumnWidth: any;
- webkitColumns: string | null;
webkitFilter: string | null;
webkitFlex: string | null;
webkitFlexBasis: string | null;
@@ -2054,7 +2345,7 @@ interface CSSStyleDeclaration {
declare var CSSStyleDeclaration: {
prototype: CSSStyleDeclaration;
new(): CSSStyleDeclaration;
-}
+};
interface CSSStyleRule extends CSSRule {
readonly readOnly: boolean;
@@ -2065,7 +2356,7 @@ interface CSSStyleRule extends CSSRule {
declare var CSSStyleRule: {
prototype: CSSStyleRule;
new(): CSSStyleRule;
-}
+};
interface CSSStyleSheet extends StyleSheet {
readonly cssRules: CSSRuleList;
@@ -2091,7 +2382,7 @@ interface CSSStyleSheet extends StyleSheet {
declare var CSSStyleSheet: {
prototype: CSSStyleSheet;
new(): CSSStyleSheet;
-}
+};
interface CSSSupportsRule extends CSSConditionRule {
}
@@ -2099,296 +2390,7 @@ 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;
@@ -2398,150 +2400,7 @@ interface CustomEvent extends Event {
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;
@@ -2552,7 +2411,7 @@ interface DataCue extends TextTrackCue {
declare var DataCue: {
prototype: DataCue;
new(): DataCue;
-}
+};
interface DataTransfer {
dropEffect: string;
@@ -2569,7 +2428,7 @@ interface DataTransfer {
declare var DataTransfer: {
prototype: DataTransfer;
new(): DataTransfer;
-}
+};
interface DataTransferItem {
readonly kind: string;
@@ -2582,7 +2441,7 @@ interface DataTransferItem {
declare var DataTransferItem: {
prototype: DataTransferItem;
new(): DataTransferItem;
-}
+};
interface DataTransferItemList {
readonly length: number;
@@ -2596,7 +2455,7 @@ interface DataTransferItemList {
declare var DataTransferItemList: {
prototype: DataTransferItemList;
new(): DataTransferItemList;
-}
+};
interface DeferredPermissionRequest {
readonly id: number;
@@ -2609,7 +2468,7 @@ interface DeferredPermissionRequest {
declare var DeferredPermissionRequest: {
prototype: DeferredPermissionRequest;
new(): DeferredPermissionRequest;
-}
+};
interface DelayNode extends AudioNode {
readonly delayTime: AudioParam;
@@ -2618,7 +2477,7 @@ interface DelayNode extends AudioNode {
declare var DelayNode: {
prototype: DelayNode;
new(): DelayNode;
-}
+};
interface DeviceAcceleration {
readonly x: number | null;
@@ -2629,7 +2488,7 @@ interface DeviceAcceleration {
declare var DeviceAcceleration: {
prototype: DeviceAcceleration;
new(): DeviceAcceleration;
-}
+};
interface DeviceLightEvent extends Event {
readonly value: number;
@@ -2638,7 +2497,7 @@ interface DeviceLightEvent extends Event {
declare var DeviceLightEvent: {
prototype: DeviceLightEvent;
new(typeArg: string, eventInitDict?: DeviceLightEventInit): DeviceLightEvent;
-}
+};
interface DeviceMotionEvent extends Event {
readonly acceleration: DeviceAcceleration | null;
@@ -2651,7 +2510,7 @@ interface DeviceMotionEvent extends Event {
declare var DeviceMotionEvent: {
prototype: DeviceMotionEvent;
new(typeArg: string, eventInitDict?: DeviceMotionEventInit): DeviceMotionEvent;
-}
+};
interface DeviceOrientationEvent extends Event {
readonly absolute: boolean;
@@ -2664,7 +2523,7 @@ interface DeviceOrientationEvent extends Event {
declare var DeviceOrientationEvent: {
prototype: DeviceOrientationEvent;
new(typeArg: string, eventInitDict?: DeviceOrientationEventInit): DeviceOrientationEvent;
-}
+};
interface DeviceRotationRate {
readonly alpha: number | null;
@@ -2675,7 +2534,7 @@ interface DeviceRotationRate {
declare var DeviceRotationRate: {
prototype: DeviceRotationRate;
new(): DeviceRotationRate;
-}
+};
interface DocumentEventMap extends GlobalEventHandlersEventMap {
"abort": UIEvent;
@@ -2770,299 +2629,291 @@ interface DocumentEventMap extends GlobalEventHandlersEventMap {
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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Gets a reference to the root node of the document.
+ */
documentElement: HTMLElement;
/**
- * Sets or gets the security domain of the document.
- */
+ * Sets or gets the security domain of the document.
+ */
domain: string;
/**
- * Retrieves a collection of all embed objects in the document.
- */
+ * Retrieves a collection of all embed objects in the document.
+ */
embeds: HTMLCollectionOf<HTMLEmbedElement>;
/**
- * Sets or gets the foreground (text) color of the document.
- */
+ * 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.
- */
+ * 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.
- */
+ * Retrieves a collection, in source order, of img objects in the document.
+ */
images: HTMLCollectionOf<HTMLImageElement>;
/**
- * Gets the implementation object of the current document.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Contains information about the current URL.
+ */
readonly location: Location;
- msCSSOMElementFloatMetrics: boolean;
msCapsLockWarningOff: boolean;
+ msCSSOMElementFloatMetrics: boolean;
/**
- * Fires when the user aborts the download.
- * @param ev The event.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ /**
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ /**
+ * 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.
- */
+ /**
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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
- */
+ * 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.
- */
+ * 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.
- */
+ * 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
- */
+ * 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.
- */
+ * 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
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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
- */
+ * 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;
@@ -3082,146 +2933,154 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven
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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Gets the root svg element in the document hierarchy.
+ */
readonly rootElement: SVGSVGElement;
/**
- * Retrieves a collection of all script objects in the document.
- */
+ * 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.
- */
+ * 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.
- */
+ * Contains the title of the document.
+ */
title: string;
+ /**
+ * 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;
readonly visibilityState: VisibilityState;
- /**
- * Sets or gets the color of the links that the user has visited.
- */
+ /**
+ * Sets or gets the color of the links that the user has visited.
+ */
vlinkColor: string;
readonly webkitCurrentFullScreenElement: Element | null;
readonly webkitFullscreenElement: Element | null;
@@ -3230,243 +3089,243 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven
readonly xmlEncoding: string | null;
xmlStandalone: boolean;
/**
- * Gets or sets the version attribute specified in the declaration of an XML document.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Creates a comment object with the specified data.
+ * @param data Sets the comment object's data.
+ */
createComment(data: string): Comment;
/**
- * Creates a new document.
- */
+ * Creates a new document.
+ */
createDocumentFragment(): DocumentFragment;
/**
- * Creates an instance of the element for the specified tag.
- * @param tagName The name of an element.
- */
+ * 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: "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.
- */
+ * 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;
+ createNSResolver(nodeResolver: Node): XPathNSResolver;
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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ /**
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -3475,7 +3334,7 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven
declare var Document: {
prototype: Document;
new(): Document;
-}
+};
interface DocumentFragment extends Node, NodeSelector, ParentNode {
getElementById(elementId: string): HTMLElement | null;
@@ -3484,7 +3343,7 @@ interface DocumentFragment extends Node, NodeSelector, ParentNode {
declare var DocumentFragment: {
prototype: DocumentFragment;
new(): DocumentFragment;
-}
+};
interface DocumentType extends Node, ChildNode {
readonly entities: NamedNodeMap;
@@ -3498,8 +3357,151 @@ interface DocumentType extends Node, ChildNode {
declare var DocumentType: {
prototype: DocumentType;
new(): DocumentType;
+};
+
+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 NO_DATA_ALLOWED_ERR: number;
+ readonly NO_MODIFICATION_ALLOWED_ERR: number;
+ readonly NOT_FOUND_ERR: number;
+ readonly NOT_SUPPORTED_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 NO_DATA_ALLOWED_ERR: number;
+ readonly NO_MODIFICATION_ALLOWED_ERR: number;
+ readonly NOT_FOUND_ERR: number;
+ readonly NOT_SUPPORTED_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;
+ toggle(token: string, force?: boolean): boolean;
+ toString(): string;
+ [index: number]: string;
+}
+
+declare var DOMTokenList: {
+ prototype: DOMTokenList;
+ new(): DOMTokenList;
+};
+
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;
@@ -3508,8 +3510,8 @@ interface DragEvent extends MouseEvent {
declare var DragEvent: {
prototype: DragEvent;
- new(): DragEvent;
-}
+ new(type: "drag" | "dragend" | "dragenter" | "dragexit" | "dragleave" | "dragover" | "dragstart" | "drop", dragEventInit?: { dataTransfer?: DataTransfer }): DragEvent;
+};
interface DynamicsCompressorNode extends AudioNode {
readonly attack: AudioParam;
@@ -3523,27 +3525,7 @@ interface DynamicsCompressorNode extends AudioNode {
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;
@@ -3624,9 +3606,9 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec
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;
+ getAttributeNS(namespaceURI: string, localName: string): string;
getBoundingClientRect(): ClientRect;
getClientRects(): ClientRectList;
getElementsByTagName<K extends keyof ElementListTagNameMap>(name: K): ElementListTagNameMap[K];
@@ -3644,18 +3626,18 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec
msZoomTo(args: MsZoomToOptions): void;
releasePointerCapture(pointerId: number): void;
removeAttribute(qualifiedName: string): void;
- removeAttributeNS(namespaceURI: string, localName: string): void;
removeAttributeNode(oldAttr: Attr): Attr;
+ removeAttributeNS(namespaceURI: string, localName: string): void;
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;
+ setAttributeNS(namespaceURI: string, qualifiedName: string, value: string): void;
setPointerCapture(pointerId: number): void;
webkitMatchesSelector(selectors: string): boolean;
- webkitRequestFullScreen(): void;
webkitRequestFullscreen(): void;
+ webkitRequestFullScreen(): void;
getElementsByClassName(classNames: string): NodeListOf<Element>;
matches(selector: string): boolean;
closest(selector: string): Element | null;
@@ -3666,9 +3648,9 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec
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;
+ insertAdjacentElement(position: InsertPosition, insertedElement: Element): Element | null;
+ insertAdjacentHTML(where: InsertPosition, html: string): void;
+ insertAdjacentText(where: InsertPosition, 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;
@@ -3677,7 +3659,7 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec
declare var Element: {
prototype: Element;
new(): Element;
-}
+};
interface ErrorEvent extends Event {
readonly colno: number;
@@ -3691,12 +3673,12 @@ interface ErrorEvent extends Event {
declare var ErrorEvent: {
prototype: ErrorEvent;
new(type: string, errorEventInitDict?: ErrorEventInit): ErrorEvent;
-}
+};
interface Event {
readonly bubbles: boolean;
- cancelBubble: boolean;
readonly cancelable: boolean;
+ cancelBubble: boolean;
readonly currentTarget: EventTarget;
readonly defaultPrevented: boolean;
readonly eventPhase: number;
@@ -3723,7 +3705,7 @@ declare var Event: {
readonly AT_TARGET: number;
readonly BUBBLING_PHASE: number;
readonly CAPTURING_PHASE: number;
-}
+};
interface EventTarget {
addEventListener(type: string, listener?: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
@@ -3734,8 +3716,28 @@ interface EventTarget {
declare var EventTarget: {
prototype: EventTarget;
new(): EventTarget;
+};
+
+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 ExtensionScriptApis {
extensionIdToShortId(extensionId: string): number;
fireExtensionApiTelemetry(functionName: string, isSucceeded: boolean, isSupported: boolean): void;
@@ -3749,7 +3751,7 @@ interface ExtensionScriptApis {
declare var ExtensionScriptApis: {
prototype: ExtensionScriptApis;
new(): ExtensionScriptApis;
-}
+};
interface External {
}
@@ -3757,7 +3759,7 @@ interface External {
declare var External: {
prototype: External;
new(): External;
-}
+};
interface File extends Blob {
readonly lastModifiedDate: any;
@@ -3768,7 +3770,7 @@ interface File extends Blob {
declare var File: {
prototype: File;
new (parts: (ArrayBuffer | ArrayBufferView | Blob | string)[], filename: string, properties?: FilePropertyBag): File;
-}
+};
interface FileList {
readonly length: number;
@@ -3779,7 +3781,7 @@ interface FileList {
declare var FileList: {
prototype: FileList;
new(): FileList;
-}
+};
interface FileReader extends EventTarget, MSBaseReader {
readonly error: DOMError;
@@ -3794,7 +3796,7 @@ interface FileReader extends EventTarget, MSBaseReader {
declare var FileReader: {
prototype: FileReader;
new(): FileReader;
-}
+};
interface FocusEvent extends UIEvent {
readonly relatedTarget: EventTarget;
@@ -3804,7 +3806,7 @@ interface FocusEvent extends UIEvent {
declare var FocusEvent: {
prototype: FocusEvent;
new(typeArg: string, eventInitDict?: FocusEventInit): FocusEvent;
-}
+};
interface FocusNavigationEvent extends Event {
readonly navigationReason: NavigationReason;
@@ -3818,7 +3820,7 @@ interface FocusNavigationEvent extends Event {
declare var FocusNavigationEvent: {
prototype: FocusNavigationEvent;
new(type: string, eventInitDict?: FocusNavigationEventInit): FocusNavigationEvent;
-}
+};
interface FormData {
append(name: string, value: string | Blob, fileName?: string): void;
@@ -3832,7 +3834,7 @@ interface FormData {
declare var FormData: {
prototype: FormData;
new (form?: HTMLFormElement): FormData;
-}
+};
interface GainNode extends AudioNode {
readonly gain: AudioParam;
@@ -3841,7 +3843,7 @@ interface GainNode extends AudioNode {
declare var GainNode: {
prototype: GainNode;
new(): GainNode;
-}
+};
interface Gamepad {
readonly axes: number[];
@@ -3856,7 +3858,7 @@ interface Gamepad {
declare var Gamepad: {
prototype: Gamepad;
new(): Gamepad;
-}
+};
interface GamepadButton {
readonly pressed: boolean;
@@ -3866,7 +3868,7 @@ interface GamepadButton {
declare var GamepadButton: {
prototype: GamepadButton;
new(): GamepadButton;
-}
+};
interface GamepadEvent extends Event {
readonly gamepad: Gamepad;
@@ -3875,7 +3877,7 @@ interface GamepadEvent extends Event {
declare var GamepadEvent: {
prototype: GamepadEvent;
new(typeArg: string, eventInitDict?: GamepadEventInit): GamepadEvent;
-}
+};
interface Geolocation {
clearWatch(watchId: number): void;
@@ -3886,8 +3888,48 @@ interface Geolocation {
declare var Geolocation: {
prototype: Geolocation;
new(): Geolocation;
+};
+
+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 HTMLAllCollection {
readonly length: number;
item(nameOrIndex?: string): HTMLCollection | Element | null;
@@ -3898,87 +3940,87 @@ interface HTMLAllCollection {
declare var HTMLAllCollection: {
prototype: HTMLAllCollection;
new(): HTMLAllCollection;
-}
+};
interface HTMLAnchorElement extends HTMLElement {
- Methods: string;
/**
- * Sets or retrieves the character set used to encode the object.
- */
+ * Sets or retrieves the character set used to encode the object.
+ */
charset: string;
/**
- * Sets or retrieves the coordinates of the object.
- */
+ * Sets or retrieves the coordinates of the object.
+ */
coords: string;
download: string;
/**
- * Contains the anchor portion of the URL including the hash sign (#).
- */
+ * Contains the anchor portion of the URL including the hash sign (#).
+ */
hash: string;
/**
- * Contains the hostname and port values of the URL.
- */
+ * Contains the hostname and port values of the URL.
+ */
host: string;
/**
- * Contains the hostname of a URL.
- */
+ * Contains the hostname of a URL.
+ */
hostname: string;
/**
- * Sets or retrieves a destination URL or an anchor point.
- */
+ * Sets or retrieves a destination URL or an anchor point.
+ */
href: string;
/**
- * Sets or retrieves the language code of the object.
- */
+ * Sets or retrieves the language code of the object.
+ */
hreflang: string;
+ Methods: string;
readonly mimeType: string;
/**
- * Sets or retrieves the shape of the object.
- */
+ * Sets or retrieves the shape of the object.
+ */
name: string;
readonly nameProp: string;
/**
- * Contains the pathname of the URL.
- */
+ * Contains the pathname of the URL.
+ */
pathname: string;
/**
- * Sets or retrieves the port number associated with a URL.
- */
+ * Sets or retrieves the port number associated with a URL.
+ */
port: string;
/**
- * Contains the protocol of the URL.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the substring of the href property that follows the question mark.
+ */
search: string;
/**
- * Sets or retrieves the shape of the object.
- */
+ * Sets or retrieves the shape of the object.
+ */
shape: string;
/**
- * Sets or retrieves the window or frame at which to target content.
- */
+ * 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.
- */
+ * Retrieves or sets the text of the object as a string.
+ */
text: string;
type: string;
urn: string;
- /**
- * Returns a string representation of an object.
- */
+ /**
+ * 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;
@@ -3987,70 +4029,70 @@ interface HTMLAnchorElement extends HTMLElement {
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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves a character string that can be used to implement your own archive functionality for the object.
+ */
archive: string;
+ /**
+ * 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;
border: string;
code: string;
/**
- * Sets or retrieves the URL of the component.
- */
+ * Sets or retrieves the URL of the component.
+ */
codeBase: string;
/**
- * Sets or retrieves the Internet media type for the code associated with the object.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the height of the object.
+ */
height: string;
hspace: number;
/**
- * Sets or retrieves the shape of the object.
- */
+ * 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.
- */
+ * Sets or retrieves a message to be displayed while an object is loading.
+ */
standby: string;
/**
- * Returns the content type of the object.
- */
+ * 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.
- */
+ * 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;
@@ -4061,66 +4103,66 @@ interface HTMLAppletElement extends HTMLElement {
declare var HTMLAppletElement: {
prototype: HTMLAppletElement;
new(): HTMLAppletElement;
-}
+};
interface HTMLAreaElement extends HTMLElement {
/**
- * Sets or retrieves a text alternative to the graphic.
- */
+ * Sets or retrieves a text alternative to the graphic.
+ */
alt: string;
/**
- * Sets or retrieves the coordinates of the object.
- */
+ * 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 (#).
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the host name part of the location or URL.
+ */
hostname: string;
/**
- * Sets or retrieves a destination URL or an anchor point.
- */
+ * Sets or retrieves a destination URL or an anchor point.
+ */
href: string;
/**
- * Sets or gets whether clicks in this region cause action.
- */
+ * Sets or gets whether clicks in this region cause action.
+ */
noHref: boolean;
/**
- * Sets or retrieves the file name or path specified by the object.
- */
+ * Sets or retrieves the file name or path specified by the object.
+ */
pathname: string;
/**
- * Sets or retrieves the port number associated with a URL.
- */
+ * Sets or retrieves the port number associated with a URL.
+ */
port: string;
/**
- * Sets or retrieves the protocol portion of a URL.
- */
+ * 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.
- */
+ * Sets or retrieves the substring of the href property that follows the question mark.
+ */
search: string;
/**
- * Sets or retrieves the shape of the object.
- */
+ * Sets or retrieves the shape of the object.
+ */
shape: string;
/**
- * Sets or retrieves the window or frame at which to target content.
- */
+ * Sets or retrieves the window or frame at which to target content.
+ */
target: string;
- /**
- * Returns a string representation of an object.
- */
+ /**
+ * 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;
@@ -4129,7 +4171,7 @@ interface HTMLAreaElement extends HTMLElement {
declare var HTMLAreaElement: {
prototype: HTMLAreaElement;
new(): HTMLAreaElement;
-}
+};
interface HTMLAreasCollection extends HTMLCollectionBase {
}
@@ -4137,7 +4179,7 @@ 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;
@@ -4147,30 +4189,16 @@ interface HTMLAudioElement extends HTMLMediaElement {
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.
- */
+ * 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.
- */
+ * 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;
@@ -4179,16 +4207,16 @@ interface HTMLBaseElement extends HTMLElement {
declare var HTMLBaseElement: {
prototype: HTMLBaseElement;
new(): HTMLBaseElement;
-}
+};
interface HTMLBaseFontElement extends HTMLElement, DOML2DeprecatedColorProperty {
/**
- * Sets or retrieves the current typeface family.
- */
+ * Sets or retrieves the current typeface family.
+ */
face: string;
/**
- * Sets or retrieves the font size of the object.
- */
+ * 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;
@@ -4197,7 +4225,7 @@ interface HTMLBaseFontElement extends HTMLElement, DOML2DeprecatedColorProperty
declare var HTMLBaseFontElement: {
prototype: HTMLBaseFontElement;
new(): HTMLBaseFontElement;
-}
+};
interface HTMLBodyElementEventMap extends HTMLElementEventMap {
"afterprint": Event;
@@ -4256,71 +4284,85 @@ interface HTMLBodyElement extends HTMLElement {
declare var HTMLBodyElement: {
prototype: HTMLBodyElement;
new(): HTMLBodyElement;
+};
+
+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 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Overrides the target attribute on a form element.
+ */
formTarget: string;
- /**
- * Sets or retrieves the name of the object.
- */
+ /**
+ * Sets or retrieves the name of the object.
+ */
name: string;
status: any;
/**
- * Gets the classification and default behavior of the button.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ /**
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -4329,32 +4371,32 @@ interface HTMLButtonElement extends HTMLElement {
declare var HTMLButtonElement: {
prototype: HTMLButtonElement;
new(): HTMLButtonElement;
-}
+};
interface HTMLCanvasElement extends HTMLElement {
/**
- * Gets or sets the height of a canvas element on a document.
- */
+ * 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.
- */
+ * 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");
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -4364,42 +4406,31 @@ interface HTMLCanvasElement extends HTMLElement {
declare var HTMLCanvasElement: {
prototype: HTMLCanvasElement;
new(): HTMLCanvasElement;
-}
+};
interface HTMLCollectionBase {
/**
- * Sets or retrieves the number of objects in a collection.
- */
+ * Sets or retrieves the number of objects in a collection.
+ */
readonly length: number;
/**
- * Retrieves an object from various collections.
- */
+ * 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.
- */
+ * 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;
@@ -4410,7 +4441,7 @@ interface HTMLDataElement extends HTMLElement {
declare var HTMLDataElement: {
prototype: HTMLDataElement;
new(): HTMLDataElement;
-}
+};
interface HTMLDataListElement extends HTMLElement {
options: HTMLCollectionOf<HTMLOptionElement>;
@@ -4421,7 +4452,7 @@ interface HTMLDataListElement extends HTMLElement {
declare var HTMLDataListElement: {
prototype: HTMLDataListElement;
new(): HTMLDataListElement;
-}
+};
interface HTMLDirectoryElement extends HTMLElement {
compact: boolean;
@@ -4432,16 +4463,16 @@ interface HTMLDirectoryElement extends HTMLElement {
declare var HTMLDirectoryElement: {
prototype: HTMLDirectoryElement;
new(): HTMLDirectoryElement;
-}
+};
interface HTMLDivElement extends HTMLElement {
/**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
+ * Sets or retrieves how the object is aligned with adjacent text.
+ */
align: string;
/**
- * Sets or retrieves whether the browser automatically performs wordwrap.
- */
+ * 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;
@@ -4450,8 +4481,19 @@ interface HTMLDivElement extends HTMLElement {
declare var HTMLDivElement: {
prototype: HTMLDivElement;
new(): HTMLDivElement;
+};
+
+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 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;
@@ -4460,7 +4502,7 @@ interface HTMLDocument extends Document {
declare var HTMLDocument: {
prototype: HTMLDocument;
new(): HTMLDocument;
-}
+};
interface HTMLElementEventMap extends ElementEventMap {
"abort": UIEvent;
@@ -4633,54 +4675,54 @@ interface HTMLElement extends Element {
declare var HTMLElement: {
prototype: HTMLElement;
new(): HTMLElement;
-}
+};
interface HTMLEmbedElement extends HTMLElement, GetSVGDocument {
/**
- * Sets or retrieves the height of the object.
- */
+ * Sets or retrieves the height of the object.
+ */
height: string;
hidden: any;
/**
- * Gets or sets whether the DLNA PlayTo device is available.
- */
+ * 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.
- */
+ * 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.
- */
+ * Gets or sets the primary DLNA PlayTo device.
+ */
msPlayToPrimary: boolean;
/**
- * Gets the source associated with the media element for use by the PlayToManager.
- */
+ * Gets the source associated with the media element for use by the PlayToManager.
+ */
readonly msPlayToSource: any;
/**
- * Sets or retrieves the name of the object.
- */
+ * Sets or retrieves the name of the object.
+ */
name: string;
/**
- * Retrieves the palette used for the embedded document.
- */
+ * Retrieves the palette used for the embedded document.
+ */
readonly palette: string;
/**
- * Retrieves the URL of the plug-in used to view an embedded document.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the height and width units of the embed object.
+ */
units: string;
/**
- * Sets or retrieves the width of the object.
- */
+ * 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;
@@ -4689,39 +4731,39 @@ interface HTMLEmbedElement extends HTMLElement, GetSVGDocument {
declare var HTMLEmbedElement: {
prototype: HTMLEmbedElement;
new(): HTMLEmbedElement;
-}
+};
interface HTMLFieldSetElement extends HTMLElement {
/**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -4730,12 +4772,12 @@ interface HTMLFieldSetElement extends HTMLElement {
declare var HTMLFieldSetElement: {
prototype: HTMLFieldSetElement;
new(): HTMLFieldSetElement;
-}
+};
interface HTMLFontElement extends HTMLElement, DOML2DeprecatedColorProperty, DOML2DeprecatedSizeProperty {
/**
- * Sets or retrieves the current typeface family.
- */
+ * 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;
@@ -4744,7 +4786,7 @@ interface HTMLFontElement extends HTMLElement, DOML2DeprecatedColorProperty, DOM
declare var HTMLFontElement: {
prototype: HTMLFontElement;
new(): HTMLFontElement;
-}
+};
interface HTMLFormControlsCollection extends HTMLCollectionBase {
namedItem(name: string): HTMLCollection | Element | null;
@@ -4753,74 +4795,74 @@ interface HTMLFormControlsCollection extends HTMLCollectionBase {
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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the MIME encoding for the form.
+ */
encoding: string;
/**
- * Sets or retrieves the encoding type for the form.
- */
+ * Sets or retrieves the encoding type for the form.
+ */
enctype: string;
/**
- * Sets or retrieves the number of objects in a collection.
- */
+ * 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.
- */
+ * Sets or retrieves how to send the form data to the server.
+ */
method: string;
/**
- * Sets or retrieves the name of the object.
- */
+ * Sets or retrieves the name of the object.
+ */
name: string;
/**
- * Designates a form that is not validated when submitted.
- */
+ * Designates a form that is not validated when submitted.
+ */
noValidate: boolean;
/**
- * Sets or retrieves the window or frame at which to target content.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Retrieves a form object or an object from an elements collection.
+ */
namedItem(name: string): any;
/**
- * Fires when the user resets a form.
- */
+ * Fires when the user resets a form.
+ */
reset(): void;
/**
- * Fires when a FORM is about to be submitted.
- */
+ * 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;
@@ -4830,7 +4872,7 @@ interface HTMLFormElement extends HTMLElement {
declare var HTMLFormElement: {
prototype: HTMLFormElement;
new(): HTMLFormElement;
-}
+};
interface HTMLFrameElementEventMap extends HTMLElementEventMap {
"load": Event;
@@ -4838,68 +4880,68 @@ interface HTMLFrameElementEventMap extends HTMLElementEventMap {
interface HTMLFrameElement extends HTMLElement, GetSVGDocument {
/**
- * Specifies the properties of a border drawn around an object.
- */
+ * Specifies the properties of a border drawn around an object.
+ */
border: string;
/**
- * Sets or retrieves the border color of the object.
- */
+ * Sets or retrieves the border color of the object.
+ */
borderColor: any;
/**
- * Retrieves the document object of the page or frame.
- */
+ * Retrieves the document object of the page or frame.
+ */
readonly contentDocument: Document;
/**
- * Retrieves the object of the specified.
- */
+ * Retrieves the object of the specified.
+ */
readonly contentWindow: Window;
/**
- * Sets or retrieves whether to display a border for the frame.
- */
+ * Sets or retrieves whether to display a border for the frame.
+ */
frameBorder: string;
/**
- * Sets or retrieves the amount of additional space between the frames.
- */
+ * Sets or retrieves the amount of additional space between the frames.
+ */
frameSpacing: any;
/**
- * Sets or retrieves the height of the object.
- */
+ * Sets or retrieves the height of the object.
+ */
height: string | number;
/**
- * Sets or retrieves a URI to a long description of the object.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the left and right margin widths before displaying the text in a frame.
+ */
marginWidth: string;
/**
- * Sets or retrieves the frame name.
- */
+ * Sets or retrieves the frame name.
+ */
name: string;
/**
- * Sets or retrieves whether the user can resize the frame.
- */
+ * Sets or retrieves whether the user can resize the frame.
+ */
noResize: boolean;
/**
- * Raised when the object has been completely received from the server.
- */
+ * 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.
- */
+ * Sets or retrieves whether the frame can be scrolled.
+ */
scrolling: string;
/**
- * Sets or retrieves a URL to be loaded by the object.
- */
+ * Sets or retrieves a URL to be loaded by the object.
+ */
src: string;
/**
- * Sets or retrieves the width of the object.
- */
+ * 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;
@@ -4908,7 +4950,7 @@ interface HTMLFrameElement extends HTMLElement, GetSVGDocument {
declare var HTMLFrameElement: {
prototype: HTMLFrameElement;
new(): HTMLFrameElement;
-}
+};
interface HTMLFrameSetElementEventMap extends HTMLElementEventMap {
"afterprint": Event;
@@ -4935,33 +4977,33 @@ interface HTMLFrameSetElementEventMap extends HTMLElementEventMap {
interface HTMLFrameSetElement extends HTMLElement {
border: string;
/**
- * Sets or retrieves the border color of the object.
- */
+ * Sets or retrieves the border color of the object.
+ */
borderColor: any;
/**
- * Sets or retrieves the frame widths of the object.
- */
+ * Sets or retrieves the frame widths of the object.
+ */
cols: string;
/**
- * Sets or retrieves whether to display a border for the frame.
- */
+ * Sets or retrieves whether to display a border for the frame.
+ */
frameBorder: string;
/**
- * Sets or retrieves the amount of additional space between the frames.
- */
+ * 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.
- */
+ * 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.
- */
+ * Fires when the object receives focus.
+ */
onfocus: (this: HTMLFrameSetElement, ev: FocusEvent) => any;
onhashchange: (this: HTMLFrameSetElement, ev: HashChangeEvent) => any;
onload: (this: HTMLFrameSetElement, ev: Event) => any;
@@ -4977,8 +5019,8 @@ interface HTMLFrameSetElement extends HTMLElement {
onstorage: (this: HTMLFrameSetElement, ev: StorageEvent) => any;
onunload: (this: HTMLFrameSetElement, ev: Event) => any;
/**
- * Sets or retrieves the frame heights of the object.
- */
+ * 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;
@@ -4987,29 +5029,7 @@ interface HTMLFrameSetElement extends HTMLElement {
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;
@@ -5020,12 +5040,12 @@ interface HTMLHeadElement extends HTMLElement {
declare var HTMLHeadElement: {
prototype: HTMLHeadElement;
new(): HTMLHeadElement;
-}
+};
interface HTMLHeadingElement extends HTMLElement {
/**
- * Sets or retrieves a value that indicates the table alignment.
- */
+ * 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;
@@ -5034,12 +5054,34 @@ interface HTMLHeadingElement extends HTMLElement {
declare var HTMLHeadingElement: {
prototype: HTMLHeadingElement;
new(): HTMLHeadingElement;
+};
+
+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 HTMLHtmlElement extends HTMLElement {
/**
- * Sets or retrieves the DTD version that governs the current document.
- */
+ * 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;
@@ -5048,7 +5090,7 @@ interface HTMLHtmlElement extends HTMLElement {
declare var HTMLHtmlElement: {
prototype: HTMLHtmlElement;
new(): HTMLHtmlElement;
-}
+};
interface HTMLIFrameElementEventMap extends HTMLElementEventMap {
"load": Event;
@@ -5056,79 +5098,79 @@ interface HTMLIFrameElementEventMap extends HTMLElementEventMap {
interface HTMLIFrameElement extends HTMLElement, GetSVGDocument {
/**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
+ * 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.
- */
+ * Specifies the properties of a border drawn around an object.
+ */
border: string;
/**
- * Retrieves the document object of the page or frame.
- */
+ * Retrieves the document object of the page or frame.
+ */
readonly contentDocument: Document;
/**
- * Retrieves the object of the specified.
- */
+ * Retrieves the object of the specified.
+ */
readonly contentWindow: Window;
/**
- * Sets or retrieves whether to display a border for the frame.
- */
+ * Sets or retrieves whether to display a border for the frame.
+ */
frameBorder: string;
/**
- * Sets or retrieves the amount of additional space between the frames.
- */
+ * Sets or retrieves the amount of additional space between the frames.
+ */
frameSpacing: any;
/**
- * Sets or retrieves the height of the object.
- */
+ * Sets or retrieves the height of the object.
+ */
height: string;
/**
- * Sets or retrieves the horizontal margin for the object.
- */
+ * Sets or retrieves the horizontal margin for the object.
+ */
hspace: number;
/**
- * Sets or retrieves a URI to a long description of the object.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the left and right margin widths before displaying the text in a frame.
+ */
marginWidth: string;
/**
- * Sets or retrieves the frame name.
- */
+ * Sets or retrieves the frame name.
+ */
name: string;
/**
- * Sets or retrieves whether the user can resize the frame.
- */
+ * Sets or retrieves whether the user can resize the frame.
+ */
noResize: boolean;
/**
- * Raised when the object has been completely received from the server.
- */
+ * 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.
- */
+ * Sets or retrieves whether the frame can be scrolled.
+ */
scrolling: string;
/**
- * Sets or retrieves a URL to be loaded by the object.
- */
+ * Sets or retrieves a URL to be loaded by the object.
+ */
src: string;
/**
- * Sets or retrieves the vertical margin for the object.
- */
+ * Sets or retrieves the vertical margin for the object.
+ */
vspace: number;
/**
- * Sets or retrieves the width of the object.
- */
+ * 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;
@@ -5137,86 +5179,86 @@ interface HTMLIFrameElement extends HTMLElement, GetSVGDocument {
declare var HTMLIFrameElement: {
prototype: HTMLIFrameElement;
new(): HTMLIFrameElement;
-}
+};
interface HTMLImageElement extends HTMLElement {
/**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
+ * Sets or retrieves how the object is aligned with adjacent text.
+ */
align: string;
/**
- * Sets or retrieves a text alternative to the graphic.
- */
+ * Sets or retrieves a text alternative to the graphic.
+ */
alt: string;
/**
- * Specifies the properties of a border drawn around an object.
- */
+ * Specifies the properties of a border drawn around an object.
+ */
border: string;
/**
- * Retrieves whether the object is fully loaded.
- */
+ * Retrieves whether the object is fully loaded.
+ */
readonly complete: boolean;
crossOrigin: string | null;
readonly currentSrc: string;
/**
- * Sets or retrieves the height of the object.
- */
+ * Sets or retrieves the height of the object.
+ */
height: number;
/**
- * Sets or retrieves the width of the border to draw around the object.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Gets or sets whether the DLNA PlayTo device is available.
+ */
msPlayToDisabled: boolean;
msPlayToPreferredSourceUri: string;
/**
- * Gets or sets the primary DLNA PlayTo device.
- */
+ * Gets or sets the primary DLNA PlayTo device.
+ */
msPlayToPrimary: boolean;
/**
- * Gets the source associated with the media element for use by the PlayToManager.
- */
+ * Gets the source associated with the media element for use by the PlayToManager.
+ */
readonly msPlayToSource: any;
/**
- * Sets or retrieves the name of the object.
- */
+ * Sets or retrieves the name of the object.
+ */
name: string;
/**
- * The original height of the image resource before sizing.
- */
+ * The original height of the image resource before sizing.
+ */
readonly naturalHeight: number;
/**
- * The original width of the image resource before sizing.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the vertical margin for the object.
+ */
vspace: number;
/**
- * Sets or retrieves the width of the object.
- */
+ * Sets or retrieves the width of the object.
+ */
width: number;
readonly x: number;
readonly y: number;
@@ -5228,210 +5270,210 @@ interface HTMLImageElement extends HTMLElement {
declare var HTMLImageElement: {
prototype: HTMLImageElement;
new(): HTMLImageElement;
-}
+};
interface HTMLInputElement extends HTMLElement {
/**
- * Sets or retrieves a comma-separated list of content types.
- */
+ * Sets or retrieves a comma-separated list of content types.
+ */
accept: string;
/**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
+ * Sets or retrieves how the object is aligned with adjacent text.
+ */
align: string;
/**
- * Sets or retrieves a text alternative to the graphic.
- */
+ * Sets or retrieves a text alternative to the graphic.
+ */
alt: string;
/**
- * Specifies whether autocomplete is applied to an editable text field.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the state of the check box or radio button.
+ */
checked: boolean;
/**
- * Retrieves whether the object is fully loaded.
- */
+ * Retrieves whether the object is fully loaded.
+ */
readonly complete: boolean;
/**
- * Sets or retrieves the state of the check box or radio button.
- */
+ * Sets or retrieves the state of the check box or radio button.
+ */
defaultChecked: boolean;
/**
- * Sets or retrieves the initial contents of the object.
- */
+ * Sets or retrieves the initial contents of the object.
+ */
defaultValue: string;
disabled: boolean;
/**
- * Returns a FileList object on a file type input object.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Overrides the target attribute on a form element.
+ */
formTarget: string;
/**
- * Sets or retrieves the height of the object.
- */
+ * Sets or retrieves the height of the object.
+ */
height: string;
/**
- * Sets or retrieves the width of the border to draw around the object.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Returns the value of the data at the cursor's current position.
+ */
value: string;
valueAsDate: Date;
/**
- * Returns the input field value as a number.
- */
+ * Returns the input field value as a number.
+ */
valueAsNumber: number;
/**
- * Sets or retrieves the vertical margin for the object.
- */
+ * Sets or retrieves the vertical margin for the object.
+ */
vspace: number;
webkitdirectory: boolean;
/**
- * Sets or retrieves the width of the object.
- */
+ * Sets or retrieves the width of the object.
+ */
width: string;
/**
- * Returns whether an element will successfully validate based on forms validation rules and constraints.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -5440,31 +5482,16 @@ interface HTMLInputElement extends HTMLElement {
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.
- */
+ * 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.
- */
+ * 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;
@@ -5473,16 +5500,16 @@ interface HTMLLabelElement extends HTMLElement {
declare var HTMLLabelElement: {
prototype: HTMLLabelElement;
new(): HTMLLabelElement;
-}
+};
interface HTMLLegendElement extends HTMLElement {
/**
- * Retrieves a reference to the form that the object is embedded in.
- */
+ * 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.
- */
+ * 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;
@@ -5491,41 +5518,56 @@ interface HTMLLegendElement extends HTMLElement {
declare var HTMLLegendElement: {
prototype: HTMLLegendElement;
new(): HTMLLegendElement;
+};
+
+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 HTMLLinkElement extends HTMLElement, LinkStyle {
/**
- * Sets or retrieves the character set used to encode the object.
- */
+ * 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.
- */
+ * Sets or retrieves a destination URL or an anchor point.
+ */
href: string;
/**
- * Sets or retrieves the language code of the object.
- */
+ * Sets or retrieves the language code of the object.
+ */
hreflang: string;
/**
- * Sets or retrieves the media type.
- */
+ * Sets or retrieves the media type.
+ */
media: string;
/**
- * Sets or retrieves the relationship between the object and the destination of the link.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the window or frame at which to target content.
+ */
target: string;
/**
- * Sets or retrieves the MIME type of the object.
- */
+ * Sets or retrieves the MIME type of the object.
+ */
type: string;
import?: Document;
integrity: string;
@@ -5536,16 +5578,16 @@ interface HTMLLinkElement extends HTMLElement, LinkStyle {
declare var HTMLLinkElement: {
prototype: HTMLLinkElement;
new(): HTMLLinkElement;
-}
+};
interface HTMLMapElement extends HTMLElement {
/**
- * Retrieves a collection of the area objects defined for the given map object.
- */
+ * Retrieves a collection of the area objects defined for the given map object.
+ */
readonly areas: HTMLAreasCollection;
/**
- * Sets or retrieves the name of the object.
- */
+ * 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;
@@ -5554,7 +5596,7 @@ interface HTMLMapElement extends HTMLElement {
declare var HTMLMapElement: {
prototype: HTMLMapElement;
new(): HTMLMapElement;
-}
+};
interface HTMLMarqueeElementEventMap extends HTMLElementEventMap {
"bounce": Event;
@@ -5586,7 +5628,7 @@ interface HTMLMarqueeElement extends HTMLElement {
declare var HTMLMarqueeElement: {
prototype: HTMLMarqueeElement;
new(): HTMLMarqueeElement;
-}
+};
interface HTMLMediaElementEventMap extends HTMLElementEventMap {
"encrypted": MediaEncryptedEvent;
@@ -5595,162 +5637,162 @@ interface HTMLMediaElementEventMap extends HTMLElementEventMap {
interface HTMLMediaElement extends HTMLElement {
/**
- * Returns an AudioTrackList object with the audio tracks for a given video element.
- */
+ * 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.
- */
+ * Gets or sets a value that indicates whether to start playing the media automatically.
+ */
autoplay: boolean;
/**
- * Gets a collection of buffered time ranges.
- */
+ * 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).
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Gets or sets the primary DLNA PlayTo device.
+ */
msPlayToPrimary: boolean;
/**
- * Gets the source associated with the media element for use by the PlayToManager.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Gets TimeRanges for the current media resource that has been played.
+ */
readonly played: TimeRanges;
/**
- * Gets or sets the current playback position, in seconds.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Resets the audio or video object and loads a new media resource.
+ */
load(): void;
/**
- * Clears all effects from the media pipeline.
- */
+ * Clears all effects from the media pipeline.
+ */
msClearEffects(): void;
msGetAsCastingSource(): any;
/**
- * Inserts the specified audio effect into media pipeline.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
+ * Loads and starts playback of a media resource.
+ */
+ play(): Promise<void>;
setMediaKeys(mediaKeys: MediaKeys | null): Promise<void>;
readonly HAVE_CURRENT_DATA: number;
readonly HAVE_ENOUGH_DATA: number;
@@ -5777,7 +5819,7 @@ declare var HTMLMediaElement: {
readonly NETWORK_IDLE: number;
readonly NETWORK_LOADING: number;
readonly NETWORK_NO_SOURCE: number;
-}
+};
interface HTMLMenuElement extends HTMLElement {
compact: boolean;
@@ -5789,32 +5831,32 @@ interface HTMLMenuElement extends HTMLElement {
declare var HTMLMenuElement: {
prototype: HTMLMenuElement;
new(): HTMLMenuElement;
-}
+};
interface HTMLMetaElement extends HTMLElement {
/**
- * Sets or retrieves the character set used to encode the object.
- */
+ * Sets or retrieves the character set used to encode the object.
+ */
charset: string;
/**
- * Gets or sets meta-information to associate with httpEquiv or name.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -5823,7 +5865,7 @@ interface HTMLMetaElement extends HTMLElement {
declare var HTMLMetaElement: {
prototype: HTMLMetaElement;
new(): HTMLMetaElement;
-}
+};
interface HTMLMeterElement extends HTMLElement {
high: number;
@@ -5839,16 +5881,16 @@ interface HTMLMeterElement extends HTMLElement {
declare var HTMLMeterElement: {
prototype: HTMLMeterElement;
new(): HTMLMeterElement;
-}
+};
interface HTMLModElement extends HTMLElement {
/**
- * Sets or retrieves reference information about the object.
- */
+ * Sets or retrieves reference information about the object.
+ */
cite: string;
/**
- * Sets or retrieves the date and time of a modification to the object.
- */
+ * 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;
@@ -5857,131 +5899,115 @@ interface HTMLModElement extends HTMLElement {
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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves a character string that can be used to implement your own archive functionality for the object.
+ */
archive: string;
+ /**
+ * 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;
border: string;
/**
- * Sets or retrieves the URL of the file containing the compiled Java class.
- */
+ * Sets or retrieves the URL of the file containing the compiled Java class.
+ */
code: string;
/**
- * Sets or retrieves the URL of the component.
- */
+ * Sets or retrieves the URL of the component.
+ */
codeBase: string;
/**
- * Sets or retrieves the Internet media type for the code associated with the object.
- */
+ * 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.
- */
+ * Retrieves the document object of the page or frame.
+ */
readonly contentDocument: Document;
/**
- * Sets or retrieves the URL that references the data of the object.
- */
+ * 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.
- */
+ * Retrieves a reference to the form that the object is embedded in.
+ */
readonly form: HTMLFormElement;
/**
- * Sets or retrieves the height of the object.
- */
+ * Sets or retrieves the height of the object.
+ */
height: string;
hspace: number;
/**
- * Gets or sets whether the DLNA PlayTo device is available.
- */
+ * 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.
- */
+ * 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.
- */
+ * Gets or sets the primary DLNA PlayTo device.
+ */
msPlayToPrimary: boolean;
/**
- * Gets the source associated with the media element for use by the PlayToManager.
- */
+ * Gets the source associated with the media element for use by the PlayToManager.
+ */
readonly msPlayToSource: any;
/**
- * Sets or retrieves the name of the object.
- */
+ * 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.
- */
+ * Sets or retrieves a message to be displayed while an object is loading.
+ */
standby: string;
/**
- * Sets or retrieves the MIME type of the object.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the width of the object.
+ */
width: string;
/**
- * Returns whether an element will successfully validate based on forms validation rules and constraints.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -5990,37 +6016,53 @@ interface HTMLObjectElement extends HTMLElement, GetSVGDocument {
declare var HTMLObjectElement: {
prototype: HTMLObjectElement;
new(): HTMLObjectElement;
+};
+
+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 HTMLOptGroupElement extends HTMLElement {
/**
- * Sets or retrieves the status of an option.
- */
+ * Sets or retrieves the status of an option.
+ */
defaultSelected: boolean;
disabled: boolean;
/**
- * Retrieves a reference to the form that the object is embedded in.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -6029,37 +6071,37 @@ interface HTMLOptGroupElement extends HTMLElement {
declare var HTMLOptGroupElement: {
prototype: HTMLOptGroupElement;
new(): HTMLOptGroupElement;
-}
+};
interface HTMLOptionElement extends HTMLElement {
/**
- * Sets or retrieves the status of an option.
- */
+ * Sets or retrieves the status of an option.
+ */
defaultSelected: boolean;
disabled: boolean;
/**
- * Retrieves a reference to the form that the object is embedded in.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -6068,7 +6110,7 @@ interface HTMLOptionElement extends HTMLElement {
declare var HTMLOptionElement: {
prototype: HTMLOptionElement;
new(): HTMLOptionElement;
-}
+};
interface HTMLOptionsCollection extends HTMLCollectionOf<HTMLOptionElement> {
length: number;
@@ -6080,7 +6122,7 @@ interface HTMLOptionsCollection extends HTMLCollectionOf<HTMLOptionElement> {
declare var HTMLOptionsCollection: {
prototype: HTMLOptionsCollection;
new(): HTMLOptionsCollection;
-}
+};
interface HTMLOutputElement extends HTMLElement {
defaultValue: string;
@@ -6102,12 +6144,12 @@ interface HTMLOutputElement extends HTMLElement {
declare var HTMLOutputElement: {
prototype: HTMLOutputElement;
new(): HTMLOutputElement;
-}
+};
interface HTMLParagraphElement extends HTMLElement {
/**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
+ * 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;
@@ -6117,24 +6159,24 @@ interface HTMLParagraphElement extends HTMLElement {
declare var HTMLParagraphElement: {
prototype: HTMLParagraphElement;
new(): HTMLParagraphElement;
-}
+};
interface HTMLParamElement extends HTMLElement {
/**
- * Sets or retrieves the name of an input parameter for an element.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the value of an input parameter for an element.
+ */
value: string;
/**
- * Sets or retrieves the data type of the value attribute.
- */
+ * 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;
@@ -6143,7 +6185,7 @@ interface HTMLParamElement extends HTMLElement {
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;
@@ -6153,12 +6195,12 @@ interface HTMLPictureElement extends HTMLElement {
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.
- */
+ * 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;
@@ -6167,24 +6209,24 @@ interface HTMLPreElement extends HTMLElement {
declare var HTMLPreElement: {
prototype: HTMLPreElement;
new(): HTMLPreElement;
-}
+};
interface HTMLProgressElement extends HTMLElement {
/**
- * Retrieves a reference to the form that the object is embedded in.
- */
+ * 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.
- */
+ * 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).
- */
+ * 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.
- */
+ * 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;
@@ -6193,12 +6235,12 @@ interface HTMLProgressElement extends HTMLElement {
declare var HTMLProgressElement: {
prototype: HTMLProgressElement;
new(): HTMLProgressElement;
-}
+};
interface HTMLQuoteElement extends HTMLElement {
/**
- * Sets or retrieves reference information about the object.
- */
+ * 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;
@@ -6207,38 +6249,38 @@ interface HTMLQuoteElement extends HTMLElement {
declare var HTMLQuoteElement: {
prototype: HTMLQuoteElement;
new(): HTMLQuoteElement;
-}
+};
interface HTMLScriptElement extends HTMLElement {
async: boolean;
/**
- * Sets or retrieves the character set used to encode the object.
- */
+ * Sets or retrieves the character set used to encode the object.
+ */
charset: string;
crossOrigin: string | null;
/**
- * Sets or retrieves the status of the script.
- */
+ * Sets or retrieves the status of the script.
+ */
defer: boolean;
/**
- * Sets or retrieves the event for which the script is written.
- */
+ * 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.
- */
+ /**
+ * 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.
- */
+ * 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.
- */
+ * Retrieves or sets the text of the object as a string.
+ */
text: string;
/**
- * Sets or retrieves the MIME type for the associated scripting engine.
- */
+ * 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;
@@ -6248,94 +6290,94 @@ interface HTMLScriptElement extends HTMLElement {
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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -6345,18 +6387,18 @@ interface HTMLSelectElement extends HTMLElement {
declare var HTMLSelectElement: {
prototype: HTMLSelectElement;
new(): HTMLSelectElement;
-}
+};
interface HTMLSourceElement extends HTMLElement {
/**
- * Gets or sets the intended media type of the media source.
+ * 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.
- */
+ * The address or URL of the a media resource that is to be considered.
+ */
src: string;
srcset: string;
/**
@@ -6370,7 +6412,7 @@ interface HTMLSourceElement extends HTMLElement {
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;
@@ -6380,17 +6422,17 @@ interface HTMLSpanElement extends HTMLElement {
declare var HTMLSpanElement: {
prototype: HTMLSpanElement;
new(): HTMLSpanElement;
-}
+};
interface HTMLStyleElement extends HTMLElement, LinkStyle {
disabled: boolean;
/**
- * Sets or retrieves the media type.
- */
+ * Sets or retrieves the media type.
+ */
media: string;
/**
- * Retrieves the CSS language in which the style sheet is written.
- */
+ * 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;
@@ -6399,16 +6441,16 @@ interface HTMLStyleElement extends HTMLElement, LinkStyle {
declare var HTMLStyleElement: {
prototype: HTMLStyleElement;
new(): HTMLStyleElement;
-}
+};
interface HTMLTableCaptionElement extends HTMLElement {
/**
- * Sets or retrieves the alignment of the caption or legend.
- */
+ * 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.
- */
+ * 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;
@@ -6417,53 +6459,53 @@ interface HTMLTableCaptionElement extends HTMLElement {
declare var HTMLTableCaptionElement: {
prototype: HTMLTableCaptionElement;
new(): HTMLTableCaptionElement;
-}
+};
interface HTMLTableCellElement extends HTMLElement, HTMLTableAlignment {
/**
- * Sets or retrieves abbreviated text for the object.
- */
+ * Sets or retrieves abbreviated text for the object.
+ */
abbr: string;
/**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves a list of header cells that provide information for the object.
+ */
headers: string;
/**
- * Sets or retrieves the height of the object.
- */
+ * Sets or retrieves the height of the object.
+ */
height: any;
/**
- * Sets or retrieves whether the browser automatically performs wordwrap.
- */
+ * Sets or retrieves whether the browser automatically performs wordwrap.
+ */
noWrap: boolean;
/**
- * Sets or retrieves how many rows in a table the cell should span.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -6472,20 +6514,20 @@ interface HTMLTableCellElement extends HTMLElement, HTMLTableAlignment {
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.
- */
+ * 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.
- */
+ * Sets or retrieves the number of columns in the group.
+ */
span: number;
/**
- * Sets or retrieves the width of the object.
- */
+ * 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;
@@ -6494,7 +6536,7 @@ interface HTMLTableColElement extends HTMLElement, HTMLTableAlignment {
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;
@@ -6504,111 +6546,111 @@ 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.
- */
+ * 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.
- */
+ * Sets or retrieves the width of the border to draw around the object.
+ */
border: string;
/**
- * Sets or retrieves the border color of the object.
- */
+ * Sets or retrieves the border color of the object.
+ */
borderColor: any;
/**
- * Retrieves the caption object of a table.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the amount of space between cells in a table.
+ */
cellSpacing: string;
/**
- * Sets or retrieves the number of columns in the table.
- */
+ * 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.
- */
+ * Sets or retrieves the way the border frame around the table is displayed.
+ */
frame: string;
/**
- * Sets or retrieves the height of the object.
- */
+ * Sets or retrieves the height of the object.
+ */
height: any;
/**
- * Sets or retrieves the number of horizontal rows contained in the object.
- */
+ * 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.
- */
+ * Sets or retrieves which dividing lines (inner borders) are displayed.
+ */
rules: string;
/**
- * Sets or retrieves a description and/or structure of the object.
- */
+ * 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.
- */
+ * 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.
- */
+ * Retrieves the tFoot object of the table.
+ */
tFoot: HTMLTableSectionElement;
/**
- * Retrieves the tHead object of the table.
- */
+ * Retrieves the tHead object of the table.
+ */
tHead: HTMLTableSectionElement;
/**
- * Sets or retrieves the width of the object.
- */
+ * Sets or retrieves the width of the object.
+ */
width: string;
/**
- * Creates an empty caption element in the table.
- */
+ * Creates an empty caption element in the table.
+ */
createCaption(): HTMLTableCaptionElement;
/**
- * Creates an empty tBody element in the table.
- */
+ * Creates an empty tBody element in the table.
+ */
createTBody(): HTMLTableSectionElement;
/**
- * Creates an empty tFoot element in the table.
- */
+ * Creates an empty tFoot element in the table.
+ */
createTFoot(): HTMLTableSectionElement;
/**
- * Returns the tHead element object if successful, or null otherwise.
- */
+ * Returns the tHead element object if successful, or null otherwise.
+ */
createTHead(): HTMLTableSectionElement;
/**
- * Deletes the caption element and its contents from the table.
- */
+ * 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.
- */
+ * 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.
- */
+ * Deletes the tFoot element and its contents from the table.
+ */
deleteTFoot(): void;
/**
- * Deletes the tHead element and its contents from the table.
- */
+ * 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.
- */
+ * 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;
@@ -6617,12 +6659,12 @@ interface HTMLTableElement extends HTMLElement {
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.
- */
+ * 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;
@@ -6631,39 +6673,39 @@ interface HTMLTableHeaderCellElement extends HTMLTableCellElement {
declare var HTMLTableHeaderCellElement: {
prototype: HTMLTableHeaderCellElement;
new(): HTMLTableHeaderCellElement;
-}
+};
interface HTMLTableRowElement extends HTMLElement, HTMLTableAlignment {
/**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
+ * 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.
- */
+ * Retrieves a collection of all cells in the table row.
+ */
cells: HTMLCollectionOf<HTMLTableDataCellElement | HTMLTableHeaderCellElement>;
/**
- * Sets or retrieves the height of the object.
- */
+ * Sets or retrieves the height of the object.
+ */
height: any;
/**
- * Retrieves the position of the object in the rows collection for the table.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -6672,26 +6714,26 @@ interface HTMLTableRowElement extends HTMLElement, HTMLTableAlignment {
declare var HTMLTableRowElement: {
prototype: HTMLTableRowElement;
new(): HTMLTableRowElement;
-}
+};
interface HTMLTableSectionElement extends HTMLElement, HTMLTableAlignment {
/**
- * Sets or retrieves a value that indicates the table alignment.
- */
+ * Sets or retrieves a value that indicates the table alignment.
+ */
align: string;
/**
- * Sets or retrieves the number of horizontal rows contained in the object.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -6700,7 +6742,7 @@ interface HTMLTableSectionElement extends HTMLElement, HTMLTableAlignment {
declare var HTMLTableSectionElement: {
prototype: HTMLTableSectionElement;
new(): HTMLTableSectionElement;
-}
+};
interface HTMLTemplateElement extends HTMLElement {
readonly content: DocumentFragment;
@@ -6711,105 +6753,105 @@ interface HTMLTemplateElement extends HTMLElement {
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.
- */
+ * 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.
- */
+ * Sets or retrieves the width of the object.
+ */
cols: number;
/**
- * Sets or retrieves the initial contents of the object.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the value indicating whether the control is selected.
+ */
status: any;
/**
- * Retrieves the type of control.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -6818,7 +6860,7 @@ interface HTMLTextAreaElement extends HTMLElement {
declare var HTMLTextAreaElement: {
prototype: HTMLTextAreaElement;
new(): HTMLTextAreaElement;
-}
+};
interface HTMLTimeElement extends HTMLElement {
dateTime: string;
@@ -6829,12 +6871,12 @@ interface HTMLTimeElement extends HTMLElement {
declare var HTMLTimeElement: {
prototype: HTMLTimeElement;
new(): HTMLTimeElement;
-}
+};
interface HTMLTitleElement extends HTMLElement {
/**
- * Retrieves or sets the text of the object as a string.
- */
+ * 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;
@@ -6843,7 +6885,7 @@ interface HTMLTitleElement extends HTMLElement {
declare var HTMLTitleElement: {
prototype: HTMLTitleElement;
new(): HTMLTitleElement;
-}
+};
interface HTMLTrackElement extends HTMLElement {
default: boolean;
@@ -6868,7 +6910,7 @@ declare var HTMLTrackElement: {
readonly LOADED: number;
readonly LOADING: number;
readonly NONE: number;
-}
+};
interface HTMLUListElement extends HTMLElement {
compact: boolean;
@@ -6880,7 +6922,7 @@ interface HTMLUListElement extends HTMLElement {
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;
@@ -6890,7 +6932,7 @@ interface HTMLUnknownElement extends HTMLElement {
declare var HTMLUnknownElement: {
prototype: HTMLUnknownElement;
new(): HTMLUnknownElement;
-}
+};
interface HTMLVideoElementEventMap extends HTMLMediaElementEventMap {
"MSVideoFormatChanged": Event;
@@ -6900,8 +6942,8 @@ interface HTMLVideoElementEventMap extends HTMLMediaElementEventMap {
interface HTMLVideoElement extends HTMLMediaElement {
/**
- * Gets or sets the height of the video element.
- */
+ * Gets or sets the height of the video element.
+ */
height: number;
msHorizontalMirror: boolean;
readonly msIsLayoutOptimalForPlayback: boolean;
@@ -6913,31 +6955,31 @@ interface HTMLVideoElement extends HTMLMediaElement {
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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
+ 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;
}
@@ -6945,47 +6987,7 @@ interface HTMLVideoElement extends HTMLMediaElement {
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;
@@ -7009,7 +7011,7 @@ declare var IDBCursor: {
readonly NEXT_NO_DUPLICATE: string;
readonly PREV: string;
readonly PREV_NO_DUPLICATE: string;
-}
+};
interface IDBCursorWithValue extends IDBCursor {
readonly value: any;
@@ -7018,7 +7020,7 @@ interface IDBCursorWithValue extends IDBCursor {
declare var IDBCursorWithValue: {
prototype: IDBCursorWithValue;
new(): IDBCursorWithValue;
-}
+};
interface IDBDatabaseEventMap {
"abort": Event;
@@ -7035,7 +7037,7 @@ interface IDBDatabase extends EventTarget {
close(): void;
createObjectStore(name: string, optionalParameters?: IDBObjectStoreParameters): IDBObjectStore;
deleteObjectStore(name: string): void;
- transaction(storeNames: string | string[], mode?: string): IDBTransaction;
+ transaction(storeNames: string | string[], mode?: IDBTransactionMode): 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;
@@ -7044,7 +7046,7 @@ interface IDBDatabase extends EventTarget {
declare var IDBDatabase: {
prototype: IDBDatabase;
new(): IDBDatabase;
-}
+};
interface IDBFactory {
cmp(first: any, second: any): number;
@@ -7055,7 +7057,7 @@ interface IDBFactory {
declare var IDBFactory: {
prototype: IDBFactory;
new(): IDBFactory;
-}
+};
interface IDBIndex {
keyPath: string | string[];
@@ -7066,14 +7068,14 @@ interface IDBIndex {
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;
+ openCursor(range?: IDBKeyRange | IDBValidKey, direction?: IDBCursorDirection): IDBRequest;
+ openKeyCursor(range?: IDBKeyRange | IDBValidKey, direction?: IDBCursorDirection): IDBRequest;
}
declare var IDBIndex: {
prototype: IDBIndex;
new(): IDBIndex;
-}
+};
interface IDBKeyRange {
readonly lower: any;
@@ -7089,7 +7091,7 @@ declare var IDBKeyRange: {
lowerBound(lower: any, open?: boolean): IDBKeyRange;
only(value: any): IDBKeyRange;
upperBound(upper: any, open?: boolean): IDBKeyRange;
-}
+};
interface IDBObjectStore {
readonly indexNames: DOMStringList;
@@ -7105,14 +7107,14 @@ interface IDBObjectStore {
deleteIndex(indexName: string): void;
get(key: any): IDBRequest;
index(name: string): IDBIndex;
- openCursor(range?: IDBKeyRange | IDBValidKey, direction?: string): IDBRequest;
+ openCursor(range?: IDBKeyRange | IDBValidKey, direction?: IDBCursorDirection): IDBRequest;
put(value: any, key?: IDBKeyRange | IDBValidKey): IDBRequest;
}
declare var IDBObjectStore: {
prototype: IDBObjectStore;
new(): IDBObjectStore;
-}
+};
interface IDBOpenDBRequestEventMap extends IDBRequestEventMap {
"blocked": Event;
@@ -7129,7 +7131,7 @@ interface IDBOpenDBRequest extends IDBRequest {
declare var IDBOpenDBRequest: {
prototype: IDBOpenDBRequest;
new(): IDBOpenDBRequest;
-}
+};
interface IDBRequestEventMap {
"error": Event;
@@ -7137,7 +7139,7 @@ interface IDBRequestEventMap {
}
interface IDBRequest extends EventTarget {
- readonly error: DOMError;
+ readonly error: DOMException;
onerror: (this: IDBRequest, ev: Event) => any;
onsuccess: (this: IDBRequest, ev: Event) => any;
readonly readyState: IDBRequestReadyState;
@@ -7151,7 +7153,7 @@ interface IDBRequest extends EventTarget {
declare var IDBRequest: {
prototype: IDBRequest;
new(): IDBRequest;
-}
+};
interface IDBTransactionEventMap {
"abort": Event;
@@ -7161,7 +7163,7 @@ interface IDBTransactionEventMap {
interface IDBTransaction extends EventTarget {
readonly db: IDBDatabase;
- readonly error: DOMError;
+ readonly error: DOMException;
readonly mode: IDBTransactionMode;
onabort: (this: IDBTransaction, ev: Event) => any;
oncomplete: (this: IDBTransaction, ev: Event) => any;
@@ -7181,7 +7183,7 @@ declare var IDBTransaction: {
readonly READ_ONLY: string;
readonly READ_WRITE: string;
readonly VERSION_CHANGE: string;
-}
+};
interface IDBVersionChangeEvent extends Event {
readonly newVersion: number | null;
@@ -7191,7 +7193,7 @@ interface IDBVersionChangeEvent extends Event {
declare var IDBVersionChangeEvent: {
prototype: IDBVersionChangeEvent;
new(): IDBVersionChangeEvent;
-}
+};
interface IIRFilterNode extends AudioNode {
getFrequencyResponse(frequencyHz: Float32Array, magResponse: Float32Array, phaseResponse: Float32Array): void;
@@ -7200,7 +7202,7 @@ interface IIRFilterNode extends AudioNode {
declare var IIRFilterNode: {
prototype: IIRFilterNode;
new(): IIRFilterNode;
-}
+};
interface ImageData {
data: Uint8ClampedArray;
@@ -7212,7 +7214,7 @@ 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;
@@ -7227,7 +7229,7 @@ interface IntersectionObserver {
declare var IntersectionObserver: {
prototype: IntersectionObserver;
new(callback: IntersectionObserverCallback, options?: IntersectionObserverInit): IntersectionObserver;
-}
+};
interface IntersectionObserverEntry {
readonly boundingClientRect: ClientRect;
@@ -7241,7 +7243,7 @@ interface IntersectionObserverEntry {
declare var IntersectionObserverEntry: {
prototype: IntersectionObserverEntry;
new(intersectionObserverEntryInit: IntersectionObserverEntryInit): IntersectionObserverEntry;
-}
+};
interface KeyboardEvent extends UIEvent {
readonly altKey: boolean;
@@ -7276,7 +7278,7 @@ declare var KeyboardEvent: {
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;
@@ -7286,7 +7288,7 @@ interface ListeningStateChangedEvent extends Event {
declare var ListeningStateChangedEvent: {
prototype: ListeningStateChangedEvent;
new(): ListeningStateChangedEvent;
-}
+};
interface Location {
hash: string;
@@ -7307,7 +7309,7 @@ interface Location {
declare var Location: {
prototype: Location;
new(): Location;
-}
+};
interface LongRunningScriptDetectedEvent extends Event {
readonly executionTime: number;
@@ -7317,8 +7319,390 @@ interface LongRunningScriptDetectedEvent extends Event {
declare var LongRunningScriptDetectedEvent: {
prototype: LongRunningScriptDetectedEvent;
new(): LongRunningScriptDetectedEvent;
+};
+
+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 MediaKeys {
+ createSession(sessionType?: MediaKeySessionType): MediaKeySession;
+ setServerCertificate(serverCertificate: any): Promise<void>;
+}
+
+declare var MediaKeys: {
+ prototype: MediaKeys;
+ new(): MediaKeys;
+};
+
+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 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 MSApp {
clearTemporaryWebDataAsync(): MSAppAsyncOperation;
createBlobFromRandomAccessStream(type: string, seeker: any): Blob;
@@ -7367,7 +7751,7 @@ declare var MSAppAsyncOperation: {
readonly COMPLETED: number;
readonly ERROR: number;
readonly STARTED: number;
-}
+};
interface MSAssertion {
readonly id: string;
@@ -7377,7 +7761,7 @@ interface MSAssertion {
declare var MSAssertion: {
prototype: MSAssertion;
new(): MSAssertion;
-}
+};
interface MSBlobBuilder {
append(data: any, endings?: string): void;
@@ -7387,7 +7771,7 @@ interface MSBlobBuilder {
declare var MSBlobBuilder: {
prototype: MSBlobBuilder;
new(): MSBlobBuilder;
-}
+};
interface MSCredentials {
getAssertion(challenge: string, filter?: MSCredentialFilter, params?: MSSignatureParameters): Promise<MSAssertion>;
@@ -7397,7 +7781,7 @@ interface MSCredentials {
declare var MSCredentials: {
prototype: MSCredentials;
new(): MSCredentials;
-}
+};
interface MSFIDOCredentialAssertion extends MSAssertion {
readonly algorithm: string | Algorithm;
@@ -7409,7 +7793,7 @@ interface MSFIDOCredentialAssertion extends MSAssertion {
declare var MSFIDOCredentialAssertion: {
prototype: MSFIDOCredentialAssertion;
new(): MSFIDOCredentialAssertion;
-}
+};
interface MSFIDOSignature {
readonly authnrData: string;
@@ -7420,7 +7804,7 @@ interface MSFIDOSignature {
declare var MSFIDOSignature: {
prototype: MSFIDOSignature;
new(): MSFIDOSignature;
-}
+};
interface MSFIDOSignatureAssertion extends MSAssertion {
readonly signature: MSFIDOSignature;
@@ -7429,7 +7813,7 @@ interface MSFIDOSignatureAssertion extends MSAssertion {
declare var MSFIDOSignatureAssertion: {
prototype: MSFIDOSignatureAssertion;
new(): MSFIDOSignatureAssertion;
-}
+};
interface MSGesture {
target: Element;
@@ -7440,7 +7824,7 @@ interface MSGesture {
declare var MSGesture: {
prototype: MSGesture;
new(): MSGesture;
-}
+};
interface MSGestureEvent extends UIEvent {
readonly clientX: number;
@@ -7476,7 +7860,7 @@ declare var MSGestureEvent: {
readonly MSGESTURE_FLAG_END: number;
readonly MSGESTURE_FLAG_INERTIA: number;
readonly MSGESTURE_FLAG_NONE: number;
-}
+};
interface MSGraphicsTrust {
readonly constrictionActive: boolean;
@@ -7486,7 +7870,7 @@ interface MSGraphicsTrust {
declare var MSGraphicsTrust: {
prototype: MSGraphicsTrust;
new(): MSGraphicsTrust;
-}
+};
interface MSHTMLWebViewElement extends HTMLElement {
readonly canGoBack: boolean;
@@ -7520,7 +7904,7 @@ interface MSHTMLWebViewElement extends HTMLElement {
declare var MSHTMLWebViewElement: {
prototype: MSHTMLWebViewElement;
new(): MSHTMLWebViewElement;
-}
+};
interface MSInputMethodContextEventMap {
"MSCandidateWindowHide": Event;
@@ -7546,7 +7930,7 @@ interface MSInputMethodContext extends EventTarget {
declare var MSInputMethodContext: {
prototype: MSInputMethodContext;
new(): MSInputMethodContext;
-}
+};
interface MSManipulationEvent extends UIEvent {
readonly currentState: number;
@@ -7575,7 +7959,7 @@ declare var MSManipulationEvent: {
readonly MS_MANIPULATION_STATE_PRESELECT: number;
readonly MS_MANIPULATION_STATE_SELECTING: number;
readonly MS_MANIPULATION_STATE_STOPPED: number;
-}
+};
interface MSMediaKeyError {
readonly code: number;
@@ -7597,7 +7981,7 @@ declare var MSMediaKeyError: {
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;
@@ -7607,7 +7991,7 @@ interface MSMediaKeyMessageEvent extends Event {
declare var MSMediaKeyMessageEvent: {
prototype: MSMediaKeyMessageEvent;
new(): MSMediaKeyMessageEvent;
-}
+};
interface MSMediaKeyNeededEvent extends Event {
readonly initData: Uint8Array | null;
@@ -7616,8 +8000,20 @@ interface MSMediaKeyNeededEvent extends Event {
declare var MSMediaKeyNeededEvent: {
prototype: MSMediaKeyNeededEvent;
new(): MSMediaKeyNeededEvent;
+};
+
+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 MSMediaKeySession extends EventTarget {
readonly error: MSMediaKeyError | null;
readonly keySystem: string;
@@ -7629,19 +8025,7 @@ interface MSMediaKeySession extends EventTarget {
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;
@@ -7664,7 +8048,7 @@ interface MSPointerEvent extends MouseEvent {
declare var MSPointerEvent: {
prototype: MSPointerEvent;
new(typeArg: string, eventInitDict?: PointerEventInit): MSPointerEvent;
-}
+};
interface MSRangeCollection {
readonly length: number;
@@ -7675,7 +8059,7 @@ interface MSRangeCollection {
declare var MSRangeCollection: {
prototype: MSRangeCollection;
new(): MSRangeCollection;
-}
+};
interface MSSiteModeEvent extends Event {
readonly actionURL: string;
@@ -7685,7 +8069,7 @@ interface MSSiteModeEvent extends Event {
declare var MSSiteModeEvent: {
prototype: MSSiteModeEvent;
new(): MSSiteModeEvent;
-}
+};
interface MSStream {
readonly type: string;
@@ -7696,7 +8080,7 @@ interface MSStream {
declare var MSStream: {
prototype: MSStream;
new(): MSStream;
-}
+};
interface MSStreamReader extends EventTarget, MSBaseReader {
readonly error: DOMError;
@@ -7712,7 +8096,7 @@ interface MSStreamReader extends EventTarget, MSBaseReader {
declare var MSStreamReader: {
prototype: MSStreamReader;
new(): MSStreamReader;
-}
+};
interface MSWebViewAsyncOperationEventMap {
"complete": Event;
@@ -7747,7 +8131,7 @@ declare var MSWebViewAsyncOperation: {
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;
@@ -7757,389 +8141,7 @@ interface MSWebViewSettings {
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;
@@ -8159,7 +8161,7 @@ declare var MutationEvent: {
readonly ADDITION: number;
readonly MODIFICATION: number;
readonly REMOVAL: number;
-}
+};
interface MutationObserver {
disconnect(): void;
@@ -8170,7 +8172,7 @@ interface MutationObserver {
declare var MutationObserver: {
prototype: MutationObserver;
new(callback: MutationCallback): MutationObserver;
-}
+};
interface MutationRecord {
readonly addedNodes: NodeList;
@@ -8187,7 +8189,7 @@ interface MutationRecord {
declare var MutationRecord: {
prototype: MutationRecord;
new(): MutationRecord;
-}
+};
interface NamedNodeMap {
readonly length: number;
@@ -8204,7 +8206,7 @@ interface NamedNodeMap {
declare var NamedNodeMap: {
prototype: NamedNodeMap;
new(): NamedNodeMap;
-}
+};
interface NavigationCompletedEvent extends NavigationEvent {
readonly isSuccess: boolean;
@@ -8214,7 +8216,7 @@ interface NavigationCompletedEvent extends NavigationEvent {
declare var NavigationCompletedEvent: {
prototype: NavigationCompletedEvent;
new(): NavigationCompletedEvent;
-}
+};
interface NavigationEvent extends Event {
readonly uri: string;
@@ -8223,7 +8225,7 @@ interface NavigationEvent extends Event {
declare var NavigationEvent: {
prototype: NavigationEvent;
new(): NavigationEvent;
-}
+};
interface NavigationEventWithReferrer extends NavigationEvent {
readonly referer: string;
@@ -8232,7 +8234,7 @@ interface NavigationEventWithReferrer extends NavigationEvent {
declare var NavigationEventWithReferrer: {
prototype: NavigationEventWithReferrer;
new(): NavigationEventWithReferrer;
-}
+};
interface Navigator extends Object, NavigatorID, NavigatorOnLine, NavigatorContentUtils, NavigatorStorageUtils, NavigatorGeolocation, MSNavigatorDoNotTrack, MSFileSaver, NavigatorBeacon, NavigatorConcurrentHardware, NavigatorUserMedia {
readonly authentication: WebAuthentication;
@@ -8249,6 +8251,7 @@ interface Navigator extends Object, NavigatorID, NavigatorOnLine, NavigatorConte
readonly serviceWorker: ServiceWorkerContainer;
readonly webdriver: boolean;
readonly hardwareConcurrency: number;
+ readonly languages: string[];
getGamepads(): Gamepad[];
javaEnabled(): boolean;
msLaunchUri(uri: string, successCallback?: MSLaunchUriCallback, noHandlerCallback?: MSLaunchUriCallback): void;
@@ -8259,7 +8262,7 @@ interface Navigator extends Object, NavigatorID, NavigatorOnLine, NavigatorConte
declare var Navigator: {
prototype: Navigator;
new(): Navigator;
-}
+};
interface Node extends EventTarget {
readonly attributes: NamedNodeMap;
@@ -8334,7 +8337,7 @@ declare var Node: {
readonly NOTATION_NODE: number;
readonly PROCESSING_INSTRUCTION_NODE: number;
readonly TEXT_NODE: number;
-}
+};
interface NodeFilter {
acceptNode(n: Node): number;
@@ -8357,7 +8360,7 @@ declare var NodeFilter: {
readonly SHOW_NOTATION: number;
readonly SHOW_PROCESSING_INSTRUCTION: number;
readonly SHOW_TEXT: number;
-}
+};
interface NodeIterator {
readonly expandEntityReferences: boolean;
@@ -8372,7 +8375,7 @@ interface NodeIterator {
declare var NodeIterator: {
prototype: NodeIterator;
new(): NodeIterator;
-}
+};
interface NodeList {
readonly length: number;
@@ -8383,7 +8386,7 @@ interface NodeList {
declare var NodeList: {
prototype: NodeList;
new(): NodeList;
-}
+};
interface NotificationEventMap {
"click": Event;
@@ -8413,7 +8416,7 @@ declare var Notification: {
prototype: Notification;
new(title: string, options?: NotificationOptions): Notification;
requestPermission(callback?: NotificationPermissionCallback): Promise<NotificationPermission>;
-}
+};
interface OES_element_index_uint {
}
@@ -8421,7 +8424,7 @@ 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;
@@ -8431,7 +8434,7 @@ declare var OES_standard_derivatives: {
prototype: OES_standard_derivatives;
new(): OES_standard_derivatives;
readonly FRAGMENT_SHADER_DERIVATIVE_HINT_OES: number;
-}
+};
interface OES_texture_float {
}
@@ -8439,7 +8442,7 @@ interface OES_texture_float {
declare var OES_texture_float: {
prototype: OES_texture_float;
new(): OES_texture_float;
-}
+};
interface OES_texture_float_linear {
}
@@ -8447,7 +8450,7 @@ 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;
@@ -8457,7 +8460,7 @@ 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 {
}
@@ -8465,7 +8468,7 @@ 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;
@@ -8474,7 +8477,7 @@ interface OfflineAudioCompletionEvent extends Event {
declare var OfflineAudioCompletionEvent: {
prototype: OfflineAudioCompletionEvent;
new(): OfflineAudioCompletionEvent;
-}
+};
interface OfflineAudioContextEventMap extends AudioContextEventMap {
"complete": OfflineAudioCompletionEvent;
@@ -8492,7 +8495,7 @@ interface OfflineAudioContext extends AudioContextBase {
declare var OfflineAudioContext: {
prototype: OfflineAudioContext;
new(numberOfChannels: number, length: number, sampleRate: number): OfflineAudioContext;
-}
+};
interface OscillatorNodeEventMap {
"ended": MediaStreamErrorEvent;
@@ -8513,7 +8516,7 @@ interface OscillatorNode extends AudioNode {
declare var OscillatorNode: {
prototype: OscillatorNode;
new(): OscillatorNode;
-}
+};
interface OverflowEvent extends UIEvent {
readonly horizontalOverflow: boolean;
@@ -8530,7 +8533,7 @@ declare var OverflowEvent: {
readonly BOTH: number;
readonly HORIZONTAL: number;
readonly VERTICAL: number;
-}
+};
interface PageTransitionEvent extends Event {
readonly persisted: boolean;
@@ -8539,7 +8542,7 @@ interface PageTransitionEvent extends Event {
declare var PageTransitionEvent: {
prototype: PageTransitionEvent;
new(): PageTransitionEvent;
-}
+};
interface PannerNode extends AudioNode {
coneInnerAngle: number;
@@ -8558,7 +8561,7 @@ interface PannerNode extends AudioNode {
declare var PannerNode: {
prototype: PannerNode;
new(): PannerNode;
-}
+};
interface Path2D extends Object, CanvasPathMethods {
}
@@ -8566,7 +8569,7 @@ interface Path2D extends Object, CanvasPathMethods {
declare var Path2D: {
prototype: Path2D;
new(path?: Path2D): Path2D;
-}
+};
interface PaymentAddress {
readonly addressLine: string[];
@@ -8586,7 +8589,7 @@ interface PaymentAddress {
declare var PaymentAddress: {
prototype: PaymentAddress;
new(): PaymentAddress;
-}
+};
interface PaymentRequestEventMap {
"shippingaddresschange": Event;
@@ -8608,7 +8611,7 @@ interface PaymentRequest extends EventTarget {
declare var PaymentRequest: {
prototype: PaymentRequest;
new(methodData: PaymentMethodData[], details: PaymentDetails, options?: PaymentOptions): PaymentRequest;
-}
+};
interface PaymentRequestUpdateEvent extends Event {
updateWith(d: Promise<PaymentDetails>): void;
@@ -8617,7 +8620,7 @@ interface PaymentRequestUpdateEvent extends Event {
declare var PaymentRequestUpdateEvent: {
prototype: PaymentRequestUpdateEvent;
new(type: string, eventInitDict?: PaymentRequestUpdateEventInit): PaymentRequestUpdateEvent;
-}
+};
interface PaymentResponse {
readonly details: any;
@@ -8634,36 +8637,7 @@ interface PaymentResponse {
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;
@@ -8686,7 +8660,7 @@ interface Performance {
declare var Performance: {
prototype: Performance;
new(): Performance;
-}
+};
interface PerformanceEntry {
readonly duration: number;
@@ -8698,7 +8672,7 @@ interface PerformanceEntry {
declare var PerformanceEntry: {
prototype: PerformanceEntry;
new(): PerformanceEntry;
-}
+};
interface PerformanceMark extends PerformanceEntry {
}
@@ -8706,7 +8680,7 @@ interface PerformanceMark extends PerformanceEntry {
declare var PerformanceMark: {
prototype: PerformanceMark;
new(): PerformanceMark;
-}
+};
interface PerformanceMeasure extends PerformanceEntry {
}
@@ -8714,7 +8688,7 @@ interface PerformanceMeasure extends PerformanceEntry {
declare var PerformanceMeasure: {
prototype: PerformanceMeasure;
new(): PerformanceMeasure;
-}
+};
interface PerformanceNavigation {
readonly redirectCount: number;
@@ -8733,18 +8707,18 @@ declare var PerformanceNavigation: {
readonly TYPE_NAVIGATE: number;
readonly TYPE_RELOAD: number;
readonly TYPE_RESERVED: number;
-}
+};
interface PerformanceNavigationTiming extends PerformanceEntry {
readonly connectEnd: number;
readonly connectStart: number;
+ readonly domainLookupEnd: number;
+ readonly domainLookupStart: 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;
@@ -8763,7 +8737,7 @@ interface PerformanceNavigationTiming extends PerformanceEntry {
declare var PerformanceNavigationTiming: {
prototype: PerformanceNavigationTiming;
new(): PerformanceNavigationTiming;
-}
+};
interface PerformanceResourceTiming extends PerformanceEntry {
readonly connectEnd: number;
@@ -8782,18 +8756,18 @@ interface PerformanceResourceTiming extends PerformanceEntry {
declare var PerformanceResourceTiming: {
prototype: PerformanceResourceTiming;
new(): PerformanceResourceTiming;
-}
+};
interface PerformanceTiming {
readonly connectEnd: number;
readonly connectStart: number;
+ readonly domainLookupEnd: number;
+ readonly domainLookupStart: 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;
@@ -8813,15 +8787,44 @@ interface PerformanceTiming {
declare var PerformanceTiming: {
prototype: PerformanceTiming;
new(): PerformanceTiming;
+};
+
+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 PeriodicWave {
}
declare var PeriodicWave: {
prototype: PeriodicWave;
new(): PeriodicWave;
-}
+};
interface PermissionRequest extends DeferredPermissionRequest {
readonly state: MSWebViewPermissionState;
@@ -8831,7 +8834,7 @@ interface PermissionRequest extends DeferredPermissionRequest {
declare var PermissionRequest: {
prototype: PermissionRequest;
new(): PermissionRequest;
-}
+};
interface PermissionRequestedEvent extends Event {
readonly permissionRequest: PermissionRequest;
@@ -8840,7 +8843,7 @@ interface PermissionRequestedEvent extends Event {
declare var PermissionRequestedEvent: {
prototype: PermissionRequestedEvent;
new(): PermissionRequestedEvent;
-}
+};
interface Plugin {
readonly description: string;
@@ -8856,7 +8859,7 @@ interface Plugin {
declare var Plugin: {
prototype: Plugin;
new(): Plugin;
-}
+};
interface PluginArray {
readonly length: number;
@@ -8869,7 +8872,7 @@ interface PluginArray {
declare var PluginArray: {
prototype: PluginArray;
new(): PluginArray;
-}
+};
interface PointerEvent extends MouseEvent {
readonly currentPoint: any;
@@ -8892,7 +8895,7 @@ interface PointerEvent extends MouseEvent {
declare var PointerEvent: {
prototype: PointerEvent;
new(typeArg: string, eventInitDict?: PointerEventInit): PointerEvent;
-}
+};
interface PopStateEvent extends Event {
readonly state: any;
@@ -8902,7 +8905,7 @@ interface PopStateEvent extends Event {
declare var PopStateEvent: {
prototype: PopStateEvent;
new(typeArg: string, eventInitDict?: PopStateEventInit): PopStateEvent;
-}
+};
interface Position {
readonly coords: Coordinates;
@@ -8912,7 +8915,7 @@ interface Position {
declare var Position: {
prototype: Position;
new(): Position;
-}
+};
interface PositionError {
readonly code: number;
@@ -8929,7 +8932,7 @@ declare var PositionError: {
readonly PERMISSION_DENIED: number;
readonly POSITION_UNAVAILABLE: number;
readonly TIMEOUT: number;
-}
+};
interface ProcessingInstruction extends CharacterData {
readonly target: string;
@@ -8938,7 +8941,7 @@ interface ProcessingInstruction extends CharacterData {
declare var ProcessingInstruction: {
prototype: ProcessingInstruction;
new(): ProcessingInstruction;
-}
+};
interface ProgressEvent extends Event {
readonly lengthComputable: boolean;
@@ -8950,7 +8953,7 @@ interface ProgressEvent extends Event {
declare var ProgressEvent: {
prototype: ProgressEvent;
new(type: string, eventInitDict?: ProgressEventInit): ProgressEvent;
-}
+};
interface PushManager {
getSubscription(): Promise<PushSubscription>;
@@ -8961,7 +8964,7 @@ interface PushManager {
declare var PushManager: {
prototype: PushManager;
new(): PushManager;
-}
+};
interface PushSubscription {
readonly endpoint: USVString;
@@ -8974,7 +8977,7 @@ interface PushSubscription {
declare var PushSubscription: {
prototype: PushSubscription;
new(): PushSubscription;
-}
+};
interface PushSubscriptionOptions {
readonly applicationServerKey: ArrayBuffer | null;
@@ -8984,17 +8987,114 @@ interface PushSubscriptionOptions {
declare var PushSubscriptionOptions: {
prototype: PushSubscriptionOptions;
new(): PushSubscriptionOptions;
+};
+
+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;
}
-interface RTCDTMFToneChangeEvent extends Event {
- readonly tone: string;
+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 RTCDTMFToneChangeEvent: {
- prototype: RTCDTMFToneChangeEvent;
- new(typeArg: string, eventInitDict: RTCDTMFToneChangeEventInit): RTCDTMFToneChangeEvent;
+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;
+ error: () => Response;
+ redirect: (url: string, status?: number) => Response;
+};
+
interface RTCDtlsTransportEventMap {
"dtlsstatechange": RTCDtlsTransportStateChangedEvent;
"error": Event;
@@ -9017,7 +9117,7 @@ interface RTCDtlsTransport extends RTCStatsProvider {
declare var RTCDtlsTransport: {
prototype: RTCDtlsTransport;
new(transport: RTCIceTransport): RTCDtlsTransport;
-}
+};
interface RTCDtlsTransportStateChangedEvent extends Event {
readonly state: RTCDtlsTransportState;
@@ -9026,7 +9126,7 @@ interface RTCDtlsTransportStateChangedEvent extends Event {
declare var RTCDtlsTransportStateChangedEvent: {
prototype: RTCDtlsTransportStateChangedEvent;
new(): RTCDtlsTransportStateChangedEvent;
-}
+};
interface RTCDtmfSenderEventMap {
"tonechange": RTCDTMFToneChangeEvent;
@@ -9047,19 +9147,28 @@ interface RTCDtmfSender extends EventTarget {
declare var RTCDtmfSender: {
prototype: RTCDtmfSender;
new(sender: RTCRtpSender): RTCDtmfSender;
+};
+
+interface RTCDTMFToneChangeEvent extends Event {
+ readonly tone: string;
}
+declare var RTCDTMFToneChangeEvent: {
+ prototype: RTCDTMFToneChangeEvent;
+ new(typeArg: string, eventInitDict: RTCDTMFToneChangeEventInit): RTCDTMFToneChangeEvent;
+};
+
interface RTCIceCandidate {
candidate: string | null;
- sdpMLineIndex: number | null;
sdpMid: string | null;
+ sdpMLineIndex: number | null;
toJSON(): any;
}
declare var RTCIceCandidate: {
prototype: RTCIceCandidate;
new(candidateInitDict?: RTCIceCandidateInit): RTCIceCandidate;
-}
+};
interface RTCIceCandidatePairChangedEvent extends Event {
readonly pair: RTCIceCandidatePair;
@@ -9068,7 +9177,7 @@ interface RTCIceCandidatePairChangedEvent extends Event {
declare var RTCIceCandidatePairChangedEvent: {
prototype: RTCIceCandidatePairChangedEvent;
new(): RTCIceCandidatePairChangedEvent;
-}
+};
interface RTCIceGathererEventMap {
"error": Event;
@@ -9089,7 +9198,7 @@ interface RTCIceGatherer extends RTCStatsProvider {
declare var RTCIceGatherer: {
prototype: RTCIceGatherer;
new(options: RTCIceGatherOptions): RTCIceGatherer;
-}
+};
interface RTCIceGathererEvent extends Event {
readonly candidate: RTCIceCandidateDictionary | RTCIceCandidateComplete;
@@ -9098,7 +9207,7 @@ interface RTCIceGathererEvent extends Event {
declare var RTCIceGathererEvent: {
prototype: RTCIceGathererEvent;
new(): RTCIceGathererEvent;
-}
+};
interface RTCIceTransportEventMap {
"candidatepairchange": RTCIceCandidatePairChangedEvent;
@@ -9127,7 +9236,7 @@ interface RTCIceTransport extends RTCStatsProvider {
declare var RTCIceTransport: {
prototype: RTCIceTransport;
new(): RTCIceTransport;
-}
+};
interface RTCIceTransportStateChangedEvent extends Event {
readonly state: RTCIceTransportState;
@@ -9136,7 +9245,7 @@ interface RTCIceTransportStateChangedEvent extends Event {
declare var RTCIceTransportStateChangedEvent: {
prototype: RTCIceTransportStateChangedEvent;
new(): RTCIceTransportStateChangedEvent;
-}
+};
interface RTCPeerConnectionEventMap {
"addstream": MediaStreamEvent;
@@ -9182,7 +9291,7 @@ interface RTCPeerConnection extends EventTarget {
declare var RTCPeerConnection: {
prototype: RTCPeerConnection;
new(configuration: RTCConfiguration): RTCPeerConnection;
-}
+};
interface RTCPeerConnectionIceEvent extends Event {
readonly candidate: RTCIceCandidate;
@@ -9191,7 +9300,7 @@ interface RTCPeerConnectionIceEvent extends Event {
declare var RTCPeerConnectionIceEvent: {
prototype: RTCPeerConnectionIceEvent;
new(type: string, eventInitDict: RTCPeerConnectionIceEventInit): RTCPeerConnectionIceEvent;
-}
+};
interface RTCRtpReceiverEventMap {
"error": Event;
@@ -9215,7 +9324,7 @@ declare var RTCRtpReceiver: {
prototype: RTCRtpReceiver;
new(transport: RTCDtlsTransport | RTCSrtpSdesTransport, kind: string, rtcpTransport?: RTCDtlsTransport): RTCRtpReceiver;
getCapabilities(kind?: string): RTCRtpCapabilities;
-}
+};
interface RTCRtpSenderEventMap {
"error": Event;
@@ -9240,7 +9349,7 @@ declare var RTCRtpSender: {
prototype: RTCRtpSender;
new(track: MediaStreamTrack, transport: RTCDtlsTransport | RTCSrtpSdesTransport, rtcpTransport?: RTCDtlsTransport): RTCRtpSender;
getCapabilities(kind?: string): RTCRtpCapabilities;
-}
+};
interface RTCSessionDescription {
sdp: string | null;
@@ -9251,7 +9360,7 @@ interface RTCSessionDescription {
declare var RTCSessionDescription: {
prototype: RTCSessionDescription;
new(descriptionInitDict?: RTCSessionDescriptionInit): RTCSessionDescription;
-}
+};
interface RTCSrtpSdesTransportEventMap {
"error": Event;
@@ -9268,7 +9377,7 @@ declare var RTCSrtpSdesTransport: {
prototype: RTCSrtpSdesTransport;
new(transport: RTCIceTransport, encryptParameters: RTCSrtpSdesParameters, decryptParameters: RTCSrtpSdesParameters): RTCSrtpSdesTransport;
getLocalParameters(): RTCSrtpSdesParameters[];
-}
+};
interface RTCSsrcConflictEvent extends Event {
readonly ssrc: number;
@@ -9277,7 +9386,7 @@ interface RTCSsrcConflictEvent extends Event {
declare var RTCSsrcConflictEvent: {
prototype: RTCSsrcConflictEvent;
new(): RTCSsrcConflictEvent;
-}
+};
interface RTCStatsProvider extends EventTarget {
getStats(): Promise<RTCStatsReport>;
@@ -9287,112 +9396,421 @@ interface RTCStatsProvider extends EventTarget {
declare var RTCStatsProvider: {
prototype: RTCStatsProvider;
new(): RTCStatsProvider;
+};
+
+interface ScopedCredential {
+ readonly id: ArrayBuffer;
+ readonly type: ScopedCredentialType;
}
-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;
+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;
- 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;
+declare var Selection: {
+ prototype: Selection;
+ new(): Selection;
+};
+
+interface ServiceWorkerEventMap extends AbstractWorkerEventMap {
+ "statechange": Event;
}
-interface ReadableStream {
- readonly locked: boolean;
- cancel(): Promise<void>;
- getReader(): ReadableStreamReader;
+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 ReadableStream: {
- prototype: ReadableStream;
- new(): ReadableStream;
+declare var ServiceWorker: {
+ prototype: ServiceWorker;
+ new(): ServiceWorker;
+};
+
+interface ServiceWorkerContainerEventMap {
+ "controllerchange": Event;
+ "message": ServiceWorkerMessageEvent;
}
-interface ReadableStreamReader {
- cancel(): Promise<void>;
- read(): Promise<any>;
- releaseLock(): void;
+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 ReadableStreamReader: {
- prototype: ReadableStreamReader;
- new(): ReadableStreamReader;
+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;
}
-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 ServiceWorkerMessageEvent: {
+ prototype: ServiceWorkerMessageEvent;
+ new(type: string, eventInitDict?: ServiceWorkerMessageEventInit): ServiceWorkerMessageEvent;
+};
+
+interface ServiceWorkerRegistrationEventMap {
+ "updatefound": Event;
}
-declare var Request: {
- prototype: Request;
- new(input: Request | string, init?: RequestInit): Request;
+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;
}
-interface Response extends Object, Body {
- readonly body: ReadableStream | null;
- readonly headers: Headers;
- readonly ok: boolean;
- readonly status: number;
- readonly statusText: string;
- readonly type: ResponseType;
+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;
- clone(): Response;
+ key?: string;
+ oldValue?: string;
+ newValue?: string;
+ storageArea?: Storage;
}
-declare var Response: {
- prototype: Response;
- new(body?: any, init?: ResponseInit): Response;
+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 SVGAElement extends SVGGraphicsElement, SVGURIReference {
readonly target: SVGAnimatedString;
addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGAElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
@@ -9402,7 +9820,7 @@ interface SVGAElement extends SVGGraphicsElement, SVGURIReference {
declare var SVGAElement: {
prototype: SVGAElement;
new(): SVGAElement;
-}
+};
interface SVGAngle {
readonly unitType: number;
@@ -9426,7 +9844,7 @@ declare var SVGAngle: {
readonly SVG_ANGLETYPE_RAD: number;
readonly SVG_ANGLETYPE_UNKNOWN: number;
readonly SVG_ANGLETYPE_UNSPECIFIED: number;
-}
+};
interface SVGAnimatedAngle {
readonly animVal: SVGAngle;
@@ -9436,7 +9854,7 @@ interface SVGAnimatedAngle {
declare var SVGAnimatedAngle: {
prototype: SVGAnimatedAngle;
new(): SVGAnimatedAngle;
-}
+};
interface SVGAnimatedBoolean {
readonly animVal: boolean;
@@ -9446,7 +9864,7 @@ interface SVGAnimatedBoolean {
declare var SVGAnimatedBoolean: {
prototype: SVGAnimatedBoolean;
new(): SVGAnimatedBoolean;
-}
+};
interface SVGAnimatedEnumeration {
readonly animVal: number;
@@ -9456,7 +9874,7 @@ interface SVGAnimatedEnumeration {
declare var SVGAnimatedEnumeration: {
prototype: SVGAnimatedEnumeration;
new(): SVGAnimatedEnumeration;
-}
+};
interface SVGAnimatedInteger {
readonly animVal: number;
@@ -9466,7 +9884,7 @@ interface SVGAnimatedInteger {
declare var SVGAnimatedInteger: {
prototype: SVGAnimatedInteger;
new(): SVGAnimatedInteger;
-}
+};
interface SVGAnimatedLength {
readonly animVal: SVGLength;
@@ -9476,7 +9894,7 @@ interface SVGAnimatedLength {
declare var SVGAnimatedLength: {
prototype: SVGAnimatedLength;
new(): SVGAnimatedLength;
-}
+};
interface SVGAnimatedLengthList {
readonly animVal: SVGLengthList;
@@ -9486,7 +9904,7 @@ interface SVGAnimatedLengthList {
declare var SVGAnimatedLengthList: {
prototype: SVGAnimatedLengthList;
new(): SVGAnimatedLengthList;
-}
+};
interface SVGAnimatedNumber {
readonly animVal: number;
@@ -9496,7 +9914,7 @@ interface SVGAnimatedNumber {
declare var SVGAnimatedNumber: {
prototype: SVGAnimatedNumber;
new(): SVGAnimatedNumber;
-}
+};
interface SVGAnimatedNumberList {
readonly animVal: SVGNumberList;
@@ -9506,7 +9924,7 @@ interface SVGAnimatedNumberList {
declare var SVGAnimatedNumberList: {
prototype: SVGAnimatedNumberList;
new(): SVGAnimatedNumberList;
-}
+};
interface SVGAnimatedPreserveAspectRatio {
readonly animVal: SVGPreserveAspectRatio;
@@ -9516,7 +9934,7 @@ interface SVGAnimatedPreserveAspectRatio {
declare var SVGAnimatedPreserveAspectRatio: {
prototype: SVGAnimatedPreserveAspectRatio;
new(): SVGAnimatedPreserveAspectRatio;
-}
+};
interface SVGAnimatedRect {
readonly animVal: SVGRect;
@@ -9526,7 +9944,7 @@ interface SVGAnimatedRect {
declare var SVGAnimatedRect: {
prototype: SVGAnimatedRect;
new(): SVGAnimatedRect;
-}
+};
interface SVGAnimatedString {
readonly animVal: string;
@@ -9536,7 +9954,7 @@ interface SVGAnimatedString {
declare var SVGAnimatedString: {
prototype: SVGAnimatedString;
new(): SVGAnimatedString;
-}
+};
interface SVGAnimatedTransformList {
readonly animVal: SVGTransformList;
@@ -9546,7 +9964,7 @@ interface SVGAnimatedTransformList {
declare var SVGAnimatedTransformList: {
prototype: SVGAnimatedTransformList;
new(): SVGAnimatedTransformList;
-}
+};
interface SVGCircleElement extends SVGGraphicsElement {
readonly cx: SVGAnimatedLength;
@@ -9559,7 +9977,7 @@ interface SVGCircleElement extends SVGGraphicsElement {
declare var SVGCircleElement: {
prototype: SVGCircleElement;
new(): SVGCircleElement;
-}
+};
interface SVGClipPathElement extends SVGGraphicsElement, SVGUnitTypes {
readonly clipPathUnits: SVGAnimatedEnumeration;
@@ -9570,7 +9988,7 @@ interface SVGClipPathElement extends SVGGraphicsElement, SVGUnitTypes {
declare var SVGClipPathElement: {
prototype: SVGClipPathElement;
new(): SVGClipPathElement;
-}
+};
interface SVGComponentTransferFunctionElement extends SVGElement {
readonly amplitude: SVGAnimatedNumber;
@@ -9599,7 +10017,7 @@ declare var SVGComponentTransferFunctionElement: {
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;
@@ -9609,7 +10027,7 @@ interface SVGDefsElement extends SVGGraphicsElement {
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;
@@ -9619,7 +10037,7 @@ interface SVGDescElement extends SVGElement {
declare var SVGDescElement: {
prototype: SVGDescElement;
new(): SVGDescElement;
-}
+};
interface SVGElementEventMap extends ElementEventMap {
"click": MouseEvent;
@@ -9657,7 +10075,7 @@ interface SVGElement extends Element {
declare var SVGElement: {
prototype: SVGElement;
new(): SVGElement;
-}
+};
interface SVGElementInstance extends EventTarget {
readonly childNodes: SVGElementInstanceList;
@@ -9673,7 +10091,7 @@ interface SVGElementInstance extends EventTarget {
declare var SVGElementInstance: {
prototype: SVGElementInstance;
new(): SVGElementInstance;
-}
+};
interface SVGElementInstanceList {
readonly length: number;
@@ -9683,7 +10101,7 @@ interface SVGElementInstanceList {
declare var SVGElementInstanceList: {
prototype: SVGElementInstanceList;
new(): SVGElementInstanceList;
-}
+};
interface SVGEllipseElement extends SVGGraphicsElement {
readonly cx: SVGAnimatedLength;
@@ -9697,7 +10115,7 @@ interface SVGEllipseElement extends SVGGraphicsElement {
declare var SVGEllipseElement: {
prototype: SVGEllipseElement;
new(): SVGEllipseElement;
-}
+};
interface SVGFEBlendElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
readonly in1: SVGAnimatedString;
@@ -9744,7 +10162,7 @@ declare var SVGFEBlendElement: {
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;
@@ -9767,7 +10185,7 @@ declare var SVGFEColorMatrixElement: {
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;
@@ -9778,7 +10196,7 @@ interface SVGFEComponentTransferElement extends SVGElement, SVGFilterPrimitiveSt
declare var SVGFEComponentTransferElement: {
prototype: SVGFEComponentTransferElement;
new(): SVGFEComponentTransferElement;
-}
+};
interface SVGFECompositeElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
readonly in1: SVGAnimatedString;
@@ -9809,7 +10227,7 @@ declare var SVGFECompositeElement: {
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;
@@ -9839,7 +10257,7 @@ declare var SVGFEConvolveMatrixElement: {
readonly SVG_EDGEMODE_NONE: number;
readonly SVG_EDGEMODE_UNKNOWN: number;
readonly SVG_EDGEMODE_WRAP: number;
-}
+};
interface SVGFEDiffuseLightingElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
readonly diffuseConstant: SVGAnimatedNumber;
@@ -9854,7 +10272,7 @@ interface SVGFEDiffuseLightingElement extends SVGElement, SVGFilterPrimitiveStan
declare var SVGFEDiffuseLightingElement: {
prototype: SVGFEDiffuseLightingElement;
new(): SVGFEDiffuseLightingElement;
-}
+};
interface SVGFEDisplacementMapElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
readonly in1: SVGAnimatedString;
@@ -9879,7 +10297,7 @@ declare var SVGFEDisplacementMapElement: {
readonly SVG_CHANNEL_G: number;
readonly SVG_CHANNEL_R: number;
readonly SVG_CHANNEL_UNKNOWN: number;
-}
+};
interface SVGFEDistantLightElement extends SVGElement {
readonly azimuth: SVGAnimatedNumber;
@@ -9891,7 +10309,7 @@ interface SVGFEDistantLightElement extends SVGElement {
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;
@@ -9901,7 +10319,7 @@ interface SVGFEFloodElement extends SVGElement, SVGFilterPrimitiveStandardAttrib
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;
@@ -9911,7 +10329,7 @@ interface SVGFEFuncAElement extends SVGComponentTransferFunctionElement {
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;
@@ -9921,7 +10339,7 @@ interface SVGFEFuncBElement extends SVGComponentTransferFunctionElement {
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;
@@ -9931,7 +10349,7 @@ interface SVGFEFuncGElement extends SVGComponentTransferFunctionElement {
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;
@@ -9941,7 +10359,7 @@ interface SVGFEFuncRElement extends SVGComponentTransferFunctionElement {
declare var SVGFEFuncRElement: {
prototype: SVGFEFuncRElement;
new(): SVGFEFuncRElement;
-}
+};
interface SVGFEGaussianBlurElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
readonly in1: SVGAnimatedString;
@@ -9955,7 +10373,7 @@ interface SVGFEGaussianBlurElement extends SVGElement, SVGFilterPrimitiveStandar
declare var SVGFEGaussianBlurElement: {
prototype: SVGFEGaussianBlurElement;
new(): SVGFEGaussianBlurElement;
-}
+};
interface SVGFEImageElement extends SVGElement, SVGFilterPrimitiveStandardAttributes, SVGURIReference {
readonly preserveAspectRatio: SVGAnimatedPreserveAspectRatio;
@@ -9966,7 +10384,7 @@ interface SVGFEImageElement extends SVGElement, SVGFilterPrimitiveStandardAttrib
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;
@@ -9976,7 +10394,7 @@ interface SVGFEMergeElement extends SVGElement, SVGFilterPrimitiveStandardAttrib
declare var SVGFEMergeElement: {
prototype: SVGFEMergeElement;
new(): SVGFEMergeElement;
-}
+};
interface SVGFEMergeNodeElement extends SVGElement {
readonly in1: SVGAnimatedString;
@@ -9987,7 +10405,7 @@ interface SVGFEMergeNodeElement extends SVGElement {
declare var SVGFEMergeNodeElement: {
prototype: SVGFEMergeNodeElement;
new(): SVGFEMergeNodeElement;
-}
+};
interface SVGFEMorphologyElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
readonly in1: SVGAnimatedString;
@@ -10007,7 +10425,7 @@ declare var 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;
@@ -10020,7 +10438,7 @@ interface SVGFEOffsetElement extends SVGElement, SVGFilterPrimitiveStandardAttri
declare var SVGFEOffsetElement: {
prototype: SVGFEOffsetElement;
new(): SVGFEOffsetElement;
-}
+};
interface SVGFEPointLightElement extends SVGElement {
readonly x: SVGAnimatedNumber;
@@ -10033,7 +10451,7 @@ interface SVGFEPointLightElement extends SVGElement {
declare var SVGFEPointLightElement: {
prototype: SVGFEPointLightElement;
new(): SVGFEPointLightElement;
-}
+};
interface SVGFESpecularLightingElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
readonly in1: SVGAnimatedString;
@@ -10049,7 +10467,7 @@ interface SVGFESpecularLightingElement extends SVGElement, SVGFilterPrimitiveSta
declare var SVGFESpecularLightingElement: {
prototype: SVGFESpecularLightingElement;
new(): SVGFESpecularLightingElement;
-}
+};
interface SVGFESpotLightElement extends SVGElement {
readonly limitingConeAngle: SVGAnimatedNumber;
@@ -10067,7 +10485,7 @@ interface SVGFESpotLightElement extends SVGElement {
declare var SVGFESpotLightElement: {
prototype: SVGFESpotLightElement;
new(): SVGFESpotLightElement;
-}
+};
interface SVGFETileElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
readonly in1: SVGAnimatedString;
@@ -10078,7 +10496,7 @@ interface SVGFETileElement extends SVGElement, SVGFilterPrimitiveStandardAttribu
declare var SVGFETileElement: {
prototype: SVGFETileElement;
new(): SVGFETileElement;
-}
+};
interface SVGFETurbulenceElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
readonly baseFrequencyX: SVGAnimatedNumber;
@@ -10106,7 +10524,7 @@ declare var SVGFETurbulenceElement: {
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;
@@ -10125,7 +10543,7 @@ interface SVGFilterElement extends SVGElement, SVGUnitTypes, SVGURIReference {
declare var SVGFilterElement: {
prototype: SVGFilterElement;
new(): SVGFilterElement;
-}
+};
interface SVGForeignObjectElement extends SVGGraphicsElement {
readonly height: SVGAnimatedLength;
@@ -10139,7 +10557,7 @@ interface SVGForeignObjectElement extends SVGGraphicsElement {
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;
@@ -10149,7 +10567,7 @@ interface SVGGElement extends SVGGraphicsElement {
declare var SVGGElement: {
prototype: SVGGElement;
new(): SVGGElement;
-}
+};
interface SVGGradientElement extends SVGElement, SVGUnitTypes, SVGURIReference {
readonly gradientTransform: SVGAnimatedTransformList;
@@ -10170,7 +10588,7 @@ declare var SVGGradientElement: {
readonly SVG_SPREADMETHOD_REFLECT: number;
readonly SVG_SPREADMETHOD_REPEAT: number;
readonly SVG_SPREADMETHOD_UNKNOWN: number;
-}
+};
interface SVGGraphicsElement extends SVGElement, SVGTests {
readonly farthestViewportElement: SVGElement;
@@ -10187,7 +10605,7 @@ interface SVGGraphicsElement extends SVGElement, SVGTests {
declare var SVGGraphicsElement: {
prototype: SVGGraphicsElement;
new(): SVGGraphicsElement;
-}
+};
interface SVGImageElement extends SVGGraphicsElement, SVGURIReference {
readonly height: SVGAnimatedLength;
@@ -10202,7 +10620,7 @@ interface SVGImageElement extends SVGGraphicsElement, SVGURIReference {
declare var SVGImageElement: {
prototype: SVGImageElement;
new(): SVGImageElement;
-}
+};
interface SVGLength {
readonly unitType: number;
@@ -10238,7 +10656,7 @@ declare var SVGLength: {
readonly SVG_LENGTHTYPE_PT: number;
readonly SVG_LENGTHTYPE_PX: number;
readonly SVG_LENGTHTYPE_UNKNOWN: number;
-}
+};
interface SVGLengthList {
readonly numberOfItems: number;
@@ -10254,35 +10672,35 @@ interface SVGLengthList {
declare var SVGLengthList: {
prototype: SVGLengthList;
new(): SVGLengthList;
-}
+};
-interface SVGLineElement extends SVGGraphicsElement {
+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: SVGLineElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ 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 SVGLineElement: {
- prototype: SVGLineElement;
- new(): SVGLineElement;
-}
+declare var SVGLinearGradientElement: {
+ prototype: SVGLinearGradientElement;
+ new(): SVGLinearGradientElement;
+};
-interface SVGLinearGradientElement extends SVGGradientElement {
+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: SVGLinearGradientElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ 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 SVGLinearGradientElement: {
- prototype: SVGLinearGradientElement;
- new(): SVGLinearGradientElement;
-}
+declare var SVGLineElement: {
+ prototype: SVGLineElement;
+ new(): SVGLineElement;
+};
interface SVGMarkerElement extends SVGElement, SVGFitToViewBox {
readonly markerHeight: SVGAnimatedLength;
@@ -10294,12 +10712,12 @@ interface SVGMarkerElement extends SVGElement, SVGFitToViewBox {
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;
+ readonly SVG_MARKERUNITS_STROKEWIDTH: number;
+ readonly SVG_MARKERUNITS_UNKNOWN: number;
+ readonly SVG_MARKERUNITS_USERSPACEONUSE: 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;
}
@@ -10307,13 +10725,13 @@ interface SVGMarkerElement extends SVGElement, SVGFitToViewBox {
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;
-}
+ readonly SVG_MARKERUNITS_STROKEWIDTH: number;
+ readonly SVG_MARKERUNITS_UNKNOWN: number;
+ readonly SVG_MARKERUNITS_USERSPACEONUSE: number;
+};
interface SVGMaskElement extends SVGElement, SVGTests, SVGUnitTypes {
readonly height: SVGAnimatedLength;
@@ -10329,7 +10747,7 @@ interface SVGMaskElement extends SVGElement, SVGTests, SVGUnitTypes {
declare var SVGMaskElement: {
prototype: SVGMaskElement;
new(): SVGMaskElement;
-}
+};
interface SVGMatrix {
a: number;
@@ -10354,7 +10772,7 @@ interface 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;
@@ -10364,7 +10782,7 @@ interface SVGMetadataElement extends SVGElement {
declare var SVGMetadataElement: {
prototype: SVGMetadataElement;
new(): SVGMetadataElement;
-}
+};
interface SVGNumber {
value: number;
@@ -10373,7 +10791,7 @@ interface SVGNumber {
declare var SVGNumber: {
prototype: SVGNumber;
new(): SVGNumber;
-}
+};
interface SVGNumberList {
readonly numberOfItems: number;
@@ -10389,7 +10807,7 @@ interface SVGNumberList {
declare var SVGNumberList: {
prototype: SVGNumberList;
new(): SVGNumberList;
-}
+};
interface SVGPathElement extends SVGGraphicsElement {
readonly pathSegList: SVGPathSegList;
@@ -10422,7 +10840,7 @@ interface SVGPathElement extends SVGGraphicsElement {
declare var SVGPathElement: {
prototype: SVGPathElement;
new(): SVGPathElement;
-}
+};
interface SVGPathSeg {
readonly pathSegType: number;
@@ -10472,7 +10890,7 @@ declare var SVGPathSeg: {
readonly PATHSEG_MOVETO_ABS: number;
readonly PATHSEG_MOVETO_REL: number;
readonly PATHSEG_UNKNOWN: number;
-}
+};
interface SVGPathSegArcAbs extends SVGPathSeg {
angle: number;
@@ -10487,7 +10905,7 @@ interface SVGPathSegArcAbs extends SVGPathSeg {
declare var SVGPathSegArcAbs: {
prototype: SVGPathSegArcAbs;
new(): SVGPathSegArcAbs;
-}
+};
interface SVGPathSegArcRel extends SVGPathSeg {
angle: number;
@@ -10502,7 +10920,7 @@ interface SVGPathSegArcRel extends SVGPathSeg {
declare var SVGPathSegArcRel: {
prototype: SVGPathSegArcRel;
new(): SVGPathSegArcRel;
-}
+};
interface SVGPathSegClosePath extends SVGPathSeg {
}
@@ -10510,7 +10928,7 @@ interface SVGPathSegClosePath extends SVGPathSeg {
declare var SVGPathSegClosePath: {
prototype: SVGPathSegClosePath;
new(): SVGPathSegClosePath;
-}
+};
interface SVGPathSegCurvetoCubicAbs extends SVGPathSeg {
x: number;
@@ -10524,7 +10942,7 @@ interface SVGPathSegCurvetoCubicAbs extends SVGPathSeg {
declare var SVGPathSegCurvetoCubicAbs: {
prototype: SVGPathSegCurvetoCubicAbs;
new(): SVGPathSegCurvetoCubicAbs;
-}
+};
interface SVGPathSegCurvetoCubicRel extends SVGPathSeg {
x: number;
@@ -10538,7 +10956,7 @@ interface SVGPathSegCurvetoCubicRel extends SVGPathSeg {
declare var SVGPathSegCurvetoCubicRel: {
prototype: SVGPathSegCurvetoCubicRel;
new(): SVGPathSegCurvetoCubicRel;
-}
+};
interface SVGPathSegCurvetoCubicSmoothAbs extends SVGPathSeg {
x: number;
@@ -10550,7 +10968,7 @@ interface SVGPathSegCurvetoCubicSmoothAbs extends SVGPathSeg {
declare var SVGPathSegCurvetoCubicSmoothAbs: {
prototype: SVGPathSegCurvetoCubicSmoothAbs;
new(): SVGPathSegCurvetoCubicSmoothAbs;
-}
+};
interface SVGPathSegCurvetoCubicSmoothRel extends SVGPathSeg {
x: number;
@@ -10562,7 +10980,7 @@ interface SVGPathSegCurvetoCubicSmoothRel extends SVGPathSeg {
declare var SVGPathSegCurvetoCubicSmoothRel: {
prototype: SVGPathSegCurvetoCubicSmoothRel;
new(): SVGPathSegCurvetoCubicSmoothRel;
-}
+};
interface SVGPathSegCurvetoQuadraticAbs extends SVGPathSeg {
x: number;
@@ -10574,7 +10992,7 @@ interface SVGPathSegCurvetoQuadraticAbs extends SVGPathSeg {
declare var SVGPathSegCurvetoQuadraticAbs: {
prototype: SVGPathSegCurvetoQuadraticAbs;
new(): SVGPathSegCurvetoQuadraticAbs;
-}
+};
interface SVGPathSegCurvetoQuadraticRel extends SVGPathSeg {
x: number;
@@ -10586,7 +11004,7 @@ interface SVGPathSegCurvetoQuadraticRel extends SVGPathSeg {
declare var SVGPathSegCurvetoQuadraticRel: {
prototype: SVGPathSegCurvetoQuadraticRel;
new(): SVGPathSegCurvetoQuadraticRel;
-}
+};
interface SVGPathSegCurvetoQuadraticSmoothAbs extends SVGPathSeg {
x: number;
@@ -10596,7 +11014,7 @@ interface SVGPathSegCurvetoQuadraticSmoothAbs extends SVGPathSeg {
declare var SVGPathSegCurvetoQuadraticSmoothAbs: {
prototype: SVGPathSegCurvetoQuadraticSmoothAbs;
new(): SVGPathSegCurvetoQuadraticSmoothAbs;
-}
+};
interface SVGPathSegCurvetoQuadraticSmoothRel extends SVGPathSeg {
x: number;
@@ -10606,7 +11024,7 @@ interface SVGPathSegCurvetoQuadraticSmoothRel extends SVGPathSeg {
declare var SVGPathSegCurvetoQuadraticSmoothRel: {
prototype: SVGPathSegCurvetoQuadraticSmoothRel;
new(): SVGPathSegCurvetoQuadraticSmoothRel;
-}
+};
interface SVGPathSegLinetoAbs extends SVGPathSeg {
x: number;
@@ -10616,7 +11034,7 @@ interface SVGPathSegLinetoAbs extends SVGPathSeg {
declare var SVGPathSegLinetoAbs: {
prototype: SVGPathSegLinetoAbs;
new(): SVGPathSegLinetoAbs;
-}
+};
interface SVGPathSegLinetoHorizontalAbs extends SVGPathSeg {
x: number;
@@ -10625,7 +11043,7 @@ interface SVGPathSegLinetoHorizontalAbs extends SVGPathSeg {
declare var SVGPathSegLinetoHorizontalAbs: {
prototype: SVGPathSegLinetoHorizontalAbs;
new(): SVGPathSegLinetoHorizontalAbs;
-}
+};
interface SVGPathSegLinetoHorizontalRel extends SVGPathSeg {
x: number;
@@ -10634,7 +11052,7 @@ interface SVGPathSegLinetoHorizontalRel extends SVGPathSeg {
declare var SVGPathSegLinetoHorizontalRel: {
prototype: SVGPathSegLinetoHorizontalRel;
new(): SVGPathSegLinetoHorizontalRel;
-}
+};
interface SVGPathSegLinetoRel extends SVGPathSeg {
x: number;
@@ -10644,7 +11062,7 @@ interface SVGPathSegLinetoRel extends SVGPathSeg {
declare var SVGPathSegLinetoRel: {
prototype: SVGPathSegLinetoRel;
new(): SVGPathSegLinetoRel;
-}
+};
interface SVGPathSegLinetoVerticalAbs extends SVGPathSeg {
y: number;
@@ -10653,7 +11071,7 @@ interface SVGPathSegLinetoVerticalAbs extends SVGPathSeg {
declare var SVGPathSegLinetoVerticalAbs: {
prototype: SVGPathSegLinetoVerticalAbs;
new(): SVGPathSegLinetoVerticalAbs;
-}
+};
interface SVGPathSegLinetoVerticalRel extends SVGPathSeg {
y: number;
@@ -10662,7 +11080,7 @@ interface SVGPathSegLinetoVerticalRel extends SVGPathSeg {
declare var SVGPathSegLinetoVerticalRel: {
prototype: SVGPathSegLinetoVerticalRel;
new(): SVGPathSegLinetoVerticalRel;
-}
+};
interface SVGPathSegList {
readonly numberOfItems: number;
@@ -10678,7 +11096,7 @@ interface SVGPathSegList {
declare var SVGPathSegList: {
prototype: SVGPathSegList;
new(): SVGPathSegList;
-}
+};
interface SVGPathSegMovetoAbs extends SVGPathSeg {
x: number;
@@ -10688,7 +11106,7 @@ interface SVGPathSegMovetoAbs extends SVGPathSeg {
declare var SVGPathSegMovetoAbs: {
prototype: SVGPathSegMovetoAbs;
new(): SVGPathSegMovetoAbs;
-}
+};
interface SVGPathSegMovetoRel extends SVGPathSeg {
x: number;
@@ -10698,7 +11116,7 @@ interface SVGPathSegMovetoRel extends SVGPathSeg {
declare var SVGPathSegMovetoRel: {
prototype: SVGPathSegMovetoRel;
new(): SVGPathSegMovetoRel;
-}
+};
interface SVGPatternElement extends SVGElement, SVGTests, SVGUnitTypes, SVGFitToViewBox, SVGURIReference {
readonly height: SVGAnimatedLength;
@@ -10715,7 +11133,7 @@ interface SVGPatternElement extends SVGElement, SVGTests, SVGUnitTypes, SVGFitTo
declare var SVGPatternElement: {
prototype: SVGPatternElement;
new(): SVGPatternElement;
-}
+};
interface SVGPoint {
x: number;
@@ -10726,7 +11144,7 @@ interface SVGPoint {
declare var SVGPoint: {
prototype: SVGPoint;
new(): SVGPoint;
-}
+};
interface SVGPointList {
readonly numberOfItems: number;
@@ -10742,7 +11160,7 @@ interface SVGPointList {
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;
@@ -10752,7 +11170,7 @@ interface SVGPolygonElement extends SVGGraphicsElement, SVGAnimatedPoints {
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;
@@ -10762,7 +11180,7 @@ interface SVGPolylineElement extends SVGGraphicsElement, SVGAnimatedPoints {
declare var SVGPolylineElement: {
prototype: SVGPolylineElement;
new(): SVGPolylineElement;
-}
+};
interface SVGPreserveAspectRatio {
align: number;
@@ -10800,7 +11218,7 @@ declare var SVGPreserveAspectRatio: {
readonly SVG_PRESERVEASPECTRATIO_XMINYMAX: number;
readonly SVG_PRESERVEASPECTRATIO_XMINYMID: number;
readonly SVG_PRESERVEASPECTRATIO_XMINYMIN: number;
-}
+};
interface SVGRadialGradientElement extends SVGGradientElement {
readonly cx: SVGAnimatedLength;
@@ -10815,7 +11233,7 @@ interface SVGRadialGradientElement extends SVGGradientElement {
declare var SVGRadialGradientElement: {
prototype: SVGRadialGradientElement;
new(): SVGRadialGradientElement;
-}
+};
interface SVGRect {
height: number;
@@ -10827,7 +11245,7 @@ interface SVGRect {
declare var SVGRect: {
prototype: SVGRect;
new(): SVGRect;
-}
+};
interface SVGRectElement extends SVGGraphicsElement {
readonly height: SVGAnimatedLength;
@@ -10843,8 +11261,60 @@ interface SVGRectElement extends SVGGraphicsElement {
declare var SVGRectElement: {
prototype: SVGRectElement;
new(): SVGRectElement;
+};
+
+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 SVGSVGElementEventMap extends SVGElementEventMap {
"SVGAbort": Event;
"SVGError": Event;
@@ -10904,59 +11374,7 @@ interface SVGSVGElement extends SVGGraphicsElement, DocumentEvent, SVGFitToViewB
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;
@@ -10966,7 +11384,7 @@ interface SVGSwitchElement extends SVGGraphicsElement {
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;
@@ -10976,17 +11394,7 @@ interface SVGSymbolElement extends SVGElement, SVGFitToViewBox {
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;
@@ -11013,7 +11421,7 @@ declare var 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;
@@ -11023,7 +11431,7 @@ interface SVGTextElement extends SVGTextPositioningElement {
declare var SVGTextElement: {
prototype: SVGTextElement;
new(): SVGTextElement;
-}
+};
interface SVGTextPathElement extends SVGTextContentElement, SVGURIReference {
readonly method: SVGAnimatedEnumeration;
@@ -11048,7 +11456,7 @@ declare var SVGTextPathElement: {
readonly TEXTPATH_SPACINGTYPE_AUTO: number;
readonly TEXTPATH_SPACINGTYPE_EXACT: number;
readonly TEXTPATH_SPACINGTYPE_UNKNOWN: number;
-}
+};
interface SVGTextPositioningElement extends SVGTextContentElement {
readonly dx: SVGAnimatedLengthList;
@@ -11063,7 +11471,7 @@ interface SVGTextPositioningElement extends SVGTextContentElement {
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;
@@ -11073,7 +11481,7 @@ interface SVGTitleElement extends SVGElement {
declare var SVGTitleElement: {
prototype: SVGTitleElement;
new(): SVGTitleElement;
-}
+};
interface SVGTransform {
readonly angle: number;
@@ -11104,7 +11512,7 @@ declare var SVGTransform: {
readonly SVG_TRANSFORM_SKEWY: number;
readonly SVG_TRANSFORM_TRANSLATE: number;
readonly SVG_TRANSFORM_UNKNOWN: number;
-}
+};
interface SVGTransformList {
readonly numberOfItems: number;
@@ -11122,8 +11530,18 @@ interface SVGTransformList {
declare var SVGTransformList: {
prototype: SVGTransformList;
new(): SVGTransformList;
+};
+
+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 SVGUnitTypes {
readonly SVG_UNIT_TYPE_OBJECTBOUNDINGBOX: number;
readonly SVG_UNIT_TYPE_UNKNOWN: number;
@@ -11145,7 +11563,7 @@ interface SVGUseElement extends SVGGraphicsElement, SVGURIReference {
declare var SVGUseElement: {
prototype: SVGUseElement;
new(): SVGUseElement;
-}
+};
interface SVGViewElement extends SVGElement, SVGZoomAndPan, SVGFitToViewBox {
readonly viewTarget: SVGStringList;
@@ -11156,7 +11574,7 @@ interface SVGViewElement extends SVGElement, SVGZoomAndPan, SVGFitToViewBox {
declare var SVGViewElement: {
prototype: SVGViewElement;
new(): SVGViewElement;
-}
+};
interface SVGZoomAndPan {
readonly zoomAndPan: number;
@@ -11166,7 +11584,7 @@ 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;
@@ -11179,420 +11597,7 @@ interface SVGZoomEvent extends UIEvent {
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;
@@ -11602,7 +11607,7 @@ interface SyncManager {
declare var SyncManager: {
prototype: SyncManager;
new(): SyncManager;
-}
+};
interface Text extends CharacterData {
readonly wholeText: string;
@@ -11613,7 +11618,7 @@ interface Text extends CharacterData {
declare var Text: {
prototype: Text;
new(data?: string): Text;
-}
+};
interface TextEvent extends UIEvent {
readonly data: string;
@@ -11645,7 +11650,7 @@ declare var TextEvent: {
readonly DOM_INPUT_METHOD_SCRIPT: number;
readonly DOM_INPUT_METHOD_UNKNOWN: number;
readonly DOM_INPUT_METHOD_VOICE: number;
-}
+};
interface TextMetrics {
readonly width: number;
@@ -11654,7 +11659,7 @@ interface TextMetrics {
declare var TextMetrics: {
prototype: TextMetrics;
new(): TextMetrics;
-}
+};
interface TextTrackEventMap {
"cuechange": Event;
@@ -11697,7 +11702,7 @@ declare var TextTrack: {
readonly LOADING: number;
readonly NONE: number;
readonly SHOWING: number;
-}
+};
interface TextTrackCueEventMap {
"enter": Event;
@@ -11721,7 +11726,7 @@ interface TextTrackCue extends EventTarget {
declare var TextTrackCue: {
prototype: TextTrackCue;
new(startTime: number, endTime: number, text: string): TextTrackCue;
-}
+};
interface TextTrackCueList {
readonly length: number;
@@ -11733,7 +11738,7 @@ interface TextTrackCueList {
declare var TextTrackCueList: {
prototype: TextTrackCueList;
new(): TextTrackCueList;
-}
+};
interface TextTrackListEventMap {
"addtrack": TrackEvent;
@@ -11751,7 +11756,7 @@ interface TextTrackList extends EventTarget {
declare var TextTrackList: {
prototype: TextTrackList;
new(): TextTrackList;
-}
+};
interface TimeRanges {
readonly length: number;
@@ -11762,7 +11767,7 @@ interface TimeRanges {
declare var TimeRanges: {
prototype: TimeRanges;
new(): TimeRanges;
-}
+};
interface Touch {
readonly clientX: number;
@@ -11778,7 +11783,7 @@ interface Touch {
declare var Touch: {
prototype: Touch;
new(): Touch;
-}
+};
interface TouchEvent extends UIEvent {
readonly altKey: boolean;
@@ -11796,7 +11801,7 @@ interface TouchEvent extends UIEvent {
declare var TouchEvent: {
prototype: TouchEvent;
new(type: string, touchEventInit?: TouchEventInit): TouchEvent;
-}
+};
interface TouchList {
readonly length: number;
@@ -11807,7 +11812,7 @@ interface TouchList {
declare var TouchList: {
prototype: TouchList;
new(): TouchList;
-}
+};
interface TrackEvent extends Event {
readonly track: VideoTrack | AudioTrack | TextTrack | null;
@@ -11816,7 +11821,7 @@ interface TrackEvent extends Event {
declare var TrackEvent: {
prototype: TrackEvent;
new(typeArg: string, eventInitDict?: TrackEventInit): TrackEvent;
-}
+};
interface TransitionEvent extends Event {
readonly elapsedTime: number;
@@ -11827,7 +11832,7 @@ interface TransitionEvent extends Event {
declare var TransitionEvent: {
prototype: TransitionEvent;
new(typeArg: string, eventInitDict?: TransitionEventInit): TransitionEvent;
-}
+};
interface TreeWalker {
currentNode: Node;
@@ -11847,7 +11852,7 @@ interface TreeWalker {
declare var TreeWalker: {
prototype: TreeWalker;
new(): TreeWalker;
-}
+};
interface UIEvent extends Event {
readonly detail: number;
@@ -11858,8 +11863,17 @@ interface UIEvent extends Event {
declare var UIEvent: {
prototype: UIEvent;
new(typeArg: string, eventInitDict?: UIEventInit): UIEvent;
+};
+
+interface UnviewableContentIdentifiedEvent extends NavigationEventWithReferrer {
+ readonly mediaType: string;
}
+declare var UnviewableContentIdentifiedEvent: {
+ prototype: UnviewableContentIdentifiedEvent;
+ new(): UnviewableContentIdentifiedEvent;
+};
+
interface URL {
hash: string;
host: string;
@@ -11881,16 +11895,7 @@ declare var 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;
@@ -11908,7 +11913,7 @@ interface ValidityState {
declare var ValidityState: {
prototype: ValidityState;
new(): ValidityState;
-}
+};
interface VideoPlaybackQuality {
readonly corruptedVideoFrames: number;
@@ -11921,7 +11926,7 @@ interface VideoPlaybackQuality {
declare var VideoPlaybackQuality: {
prototype: VideoPlaybackQuality;
new(): VideoPlaybackQuality;
-}
+};
interface VideoTrack {
readonly id: string;
@@ -11935,7 +11940,7 @@ interface VideoTrack {
declare var VideoTrack: {
prototype: VideoTrack;
new(): VideoTrack;
-}
+};
interface VideoTrackListEventMap {
"addtrack": TrackEvent;
@@ -11959,23 +11964,55 @@ interface VideoTrackList extends EventTarget {
declare var VideoTrackList: {
prototype: VideoTrackList;
new(): VideoTrackList;
+};
+
+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 WEBGL_compressed_texture_s3tc {
+ readonly COMPRESSED_RGB_S3TC_DXT1_EXT: number;
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_RGB_S3TC_DXT1_EXT: number;
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;
@@ -11987,7 +12024,7 @@ declare var 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;
@@ -11997,39 +12034,7 @@ 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;
@@ -12040,7 +12045,7 @@ interface WebGLActiveInfo {
declare var WebGLActiveInfo: {
prototype: WebGLActiveInfo;
new(): WebGLActiveInfo;
-}
+};
interface WebGLBuffer extends WebGLObject {
}
@@ -12048,7 +12053,7 @@ interface WebGLBuffer extends WebGLObject {
declare var WebGLBuffer: {
prototype: WebGLBuffer;
new(): WebGLBuffer;
-}
+};
interface WebGLContextEvent extends Event {
readonly statusMessage: string;
@@ -12057,7 +12062,7 @@ interface WebGLContextEvent extends Event {
declare var WebGLContextEvent: {
prototype: WebGLContextEvent;
new(typeArg: string, eventInitDict?: WebGLContextEventInit): WebGLContextEvent;
-}
+};
interface WebGLFramebuffer extends WebGLObject {
}
@@ -12065,7 +12070,7 @@ interface WebGLFramebuffer extends WebGLObject {
declare var WebGLFramebuffer: {
prototype: WebGLFramebuffer;
new(): WebGLFramebuffer;
-}
+};
interface WebGLObject {
}
@@ -12073,7 +12078,7 @@ interface WebGLObject {
declare var WebGLObject: {
prototype: WebGLObject;
new(): WebGLObject;
-}
+};
interface WebGLProgram extends WebGLObject {
}
@@ -12081,7 +12086,7 @@ interface WebGLProgram extends WebGLObject {
declare var WebGLProgram: {
prototype: WebGLProgram;
new(): WebGLProgram;
-}
+};
interface WebGLRenderbuffer extends WebGLObject {
}
@@ -12089,7 +12094,7 @@ interface WebGLRenderbuffer extends WebGLObject {
declare var WebGLRenderbuffer: {
prototype: WebGLRenderbuffer;
new(): WebGLRenderbuffer;
-}
+};
interface WebGLRenderingContext {
readonly canvas: HTMLCanvasElement;
@@ -12350,13 +12355,13 @@ interface WebGLRenderingContext {
readonly KEEP: number;
readonly LEQUAL: number;
readonly LESS: number;
+ readonly LINE_LOOP: number;
+ readonly LINE_STRIP: number;
+ readonly LINE_WIDTH: 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;
@@ -12381,9 +12386,9 @@ interface WebGLRenderingContext {
readonly NEAREST_MIPMAP_NEAREST: number;
readonly NEVER: number;
readonly NICEST: number;
+ readonly NO_ERROR: 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;
@@ -12413,18 +12418,18 @@ interface WebGLRenderingContext {
readonly REPEAT: number;
readonly REPLACE: number;
readonly RGB: number;
- readonly RGB565: number;
readonly RGB5_A1: number;
+ readonly RGB565: 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 SAMPLER_2D: number;
+ readonly SAMPLER_CUBE: number;
+ readonly SAMPLES: number;
readonly SCISSOR_BOX: number;
readonly SCISSOR_TEST: number;
readonly SHADER_TYPE: number;
@@ -12458,6 +12463,20 @@ interface WebGLRenderingContext {
readonly STREAM_DRAW: number;
readonly SUBPIXEL_BITS: number;
readonly TEXTURE: 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 TEXTURE0: number;
readonly TEXTURE1: number;
readonly TEXTURE10: number;
@@ -12490,23 +12509,9 @@ interface WebGLRenderingContext {
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 TRIANGLES: number;
readonly UNPACK_ALIGNMENT: number;
readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: number;
readonly UNPACK_FLIP_Y_WEBGL: number;
@@ -12652,13 +12657,13 @@ declare var WebGLRenderingContext: {
readonly KEEP: number;
readonly LEQUAL: number;
readonly LESS: number;
+ readonly LINE_LOOP: number;
+ readonly LINE_STRIP: number;
+ readonly LINE_WIDTH: 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;
@@ -12683,9 +12688,9 @@ declare var WebGLRenderingContext: {
readonly NEAREST_MIPMAP_NEAREST: number;
readonly NEVER: number;
readonly NICEST: number;
+ readonly NO_ERROR: 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;
@@ -12715,18 +12720,18 @@ declare var WebGLRenderingContext: {
readonly REPEAT: number;
readonly REPLACE: number;
readonly RGB: number;
- readonly RGB565: number;
readonly RGB5_A1: number;
+ readonly RGB565: 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 SAMPLER_2D: number;
+ readonly SAMPLER_CUBE: number;
+ readonly SAMPLES: number;
readonly SCISSOR_BOX: number;
readonly SCISSOR_TEST: number;
readonly SHADER_TYPE: number;
@@ -12760,6 +12765,20 @@ declare var WebGLRenderingContext: {
readonly STREAM_DRAW: number;
readonly SUBPIXEL_BITS: number;
readonly TEXTURE: 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 TEXTURE0: number;
readonly TEXTURE1: number;
readonly TEXTURE10: number;
@@ -12792,23 +12811,9 @@ declare var WebGLRenderingContext: {
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 TRIANGLES: number;
readonly UNPACK_ALIGNMENT: number;
readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: number;
readonly UNPACK_FLIP_Y_WEBGL: number;
@@ -12832,7 +12837,7 @@ declare var WebGLRenderingContext: {
readonly VERTEX_SHADER: number;
readonly VIEWPORT: number;
readonly ZERO: number;
-}
+};
interface WebGLShader extends WebGLObject {
}
@@ -12840,7 +12845,7 @@ interface WebGLShader extends WebGLObject {
declare var WebGLShader: {
prototype: WebGLShader;
new(): WebGLShader;
-}
+};
interface WebGLShaderPrecisionFormat {
readonly precision: number;
@@ -12851,7 +12856,7 @@ interface WebGLShaderPrecisionFormat {
declare var WebGLShaderPrecisionFormat: {
prototype: WebGLShaderPrecisionFormat;
new(): WebGLShaderPrecisionFormat;
-}
+};
interface WebGLTexture extends WebGLObject {
}
@@ -12859,7 +12864,7 @@ interface WebGLTexture extends WebGLObject {
declare var WebGLTexture: {
prototype: WebGLTexture;
new(): WebGLTexture;
-}
+};
interface WebGLUniformLocation {
}
@@ -12867,7 +12872,7 @@ interface WebGLUniformLocation {
declare var WebGLUniformLocation: {
prototype: WebGLUniformLocation;
new(): WebGLUniformLocation;
-}
+};
interface WebKitCSSMatrix {
a: number;
@@ -12907,7 +12912,7 @@ interface WebKitCSSMatrix {
declare var WebKitCSSMatrix: {
prototype: WebKitCSSMatrix;
new(text?: string): WebKitCSSMatrix;
-}
+};
interface WebKitDirectoryEntry extends WebKitEntry {
createReader(): WebKitDirectoryReader;
@@ -12916,7 +12921,7 @@ interface WebKitDirectoryEntry extends WebKitEntry {
declare var WebKitDirectoryEntry: {
prototype: WebKitDirectoryEntry;
new(): WebKitDirectoryEntry;
-}
+};
interface WebKitDirectoryReader {
readEntries(successCallback: WebKitEntriesCallback, errorCallback?: WebKitErrorCallback): void;
@@ -12925,7 +12930,7 @@ interface WebKitDirectoryReader {
declare var WebKitDirectoryReader: {
prototype: WebKitDirectoryReader;
new(): WebKitDirectoryReader;
-}
+};
interface WebKitEntry {
readonly filesystem: WebKitFileSystem;
@@ -12938,7 +12943,7 @@ interface WebKitEntry {
declare var WebKitEntry: {
prototype: WebKitEntry;
new(): WebKitEntry;
-}
+};
interface WebKitFileEntry extends WebKitEntry {
file(successCallback: WebKitFileCallback, errorCallback?: WebKitErrorCallback): void;
@@ -12947,7 +12952,7 @@ interface WebKitFileEntry extends WebKitEntry {
declare var WebKitFileEntry: {
prototype: WebKitFileEntry;
new(): WebKitFileEntry;
-}
+};
interface WebKitFileSystem {
readonly name: string;
@@ -12957,7 +12962,7 @@ interface WebKitFileSystem {
declare var WebKitFileSystem: {
prototype: WebKitFileSystem;
new(): WebKitFileSystem;
-}
+};
interface WebKitPoint {
x: number;
@@ -12967,8 +12972,18 @@ interface WebKitPoint {
declare var WebKitPoint: {
prototype: WebKitPoint;
new(x?: number, y?: number): WebKitPoint;
+};
+
+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 WebSocketEventMap {
"close": CloseEvent;
"error": Event;
@@ -13004,7 +13019,7 @@ declare var WebSocket: {
readonly CLOSING: number;
readonly CONNECTING: number;
readonly OPEN: number;
-}
+};
interface WheelEvent extends MouseEvent {
readonly deltaMode: number;
@@ -13027,7 +13042,7 @@ declare var WheelEvent: {
readonly DOM_DELTA_LINE: number;
readonly DOM_DELTA_PAGE: number;
readonly DOM_DELTA_PIXEL: number;
-}
+};
interface WindowEventMap extends GlobalEventHandlersEventMap {
"abort": UIEvent;
@@ -13055,6 +13070,7 @@ interface WindowEventMap extends GlobalEventHandlersEventMap {
"durationchange": Event;
"emptied": Event;
"ended": MediaStreamErrorEvent;
+ "error": ErrorEvent;
"focus": FocusEvent;
"hashchange": HashChangeEvent;
"input": Event;
@@ -13113,6 +13129,10 @@ interface WindowEventMap extends GlobalEventHandlersEventMap {
"submit": Event;
"suspend": Event;
"timeupdate": Event;
+ "touchcancel": TouchEvent;
+ "touchend": TouchEvent;
+ "touchmove": TouchEvent;
+ "touchstart": TouchEvent;
"unload": Event;
"volumechange": Event;
"waiting": Event;
@@ -13126,8 +13146,8 @@ interface Window extends EventTarget, WindowTimers, WindowSessionStorage, Window
readonly crypto: Crypto;
defaultStatus: string;
readonly devicePixelRatio: number;
- readonly doNotTrack: string;
readonly document: Document;
+ readonly doNotTrack: string;
event: Event | undefined;
readonly external: External;
readonly frameElement: Element;
@@ -13250,9 +13270,9 @@ interface Window extends EventTarget, WindowTimers, WindowSessionStorage, Window
readonly screenTop: number;
readonly screenX: number;
readonly screenY: number;
+ readonly scrollbars: BarProp;
readonly scrollX: number;
readonly scrollY: number;
- readonly scrollbars: BarProp;
readonly self: Window;
readonly speechSynthesis: SpeechSynthesis;
status: string;
@@ -13308,7 +13328,7 @@ interface Window extends EventTarget, WindowTimers, WindowSessionStorage, Window
declare var Window: {
prototype: Window;
new(): Window;
-}
+};
interface WorkerEventMap extends AbstractWorkerEventMap {
"message": MessageEvent;
@@ -13325,7 +13345,7 @@ interface Worker extends EventTarget, AbstractWorker {
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;
@@ -13335,7 +13355,7 @@ interface XMLDocument extends Document {
declare var XMLDocument: {
prototype: XMLDocument;
new(): XMLDocument;
-}
+};
interface XMLHttpRequestEventMap extends XMLHttpRequestEventTargetEventMap {
"readystatechange": Event;
@@ -13382,7 +13402,7 @@ declare var XMLHttpRequest: {
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;
@@ -13392,7 +13412,7 @@ interface XMLHttpRequestUpload extends EventTarget, XMLHttpRequestEventTarget {
declare var XMLHttpRequestUpload: {
prototype: XMLHttpRequestUpload;
new(): XMLHttpRequestUpload;
-}
+};
interface XMLSerializer {
serializeToString(target: Node): string;
@@ -13401,7 +13421,7 @@ interface XMLSerializer {
declare var XMLSerializer: {
prototype: XMLSerializer;
new(): XMLSerializer;
-}
+};
interface XPathEvaluator {
createExpression(expression: string, resolver: XPathNSResolver): XPathExpression;
@@ -13412,7 +13432,7 @@ interface XPathEvaluator {
declare var XPathEvaluator: {
prototype: XPathEvaluator;
new(): XPathEvaluator;
-}
+};
interface XPathExpression {
evaluate(contextNode: Node, type: number, result: XPathResult | null): XPathResult;
@@ -13421,7 +13441,7 @@ interface XPathExpression {
declare var XPathExpression: {
prototype: XPathExpression;
new(): XPathExpression;
-}
+};
interface XPathNSResolver {
lookupNamespaceURI(prefix: string): string;
@@ -13430,7 +13450,7 @@ interface XPathNSResolver {
declare var XPathNSResolver: {
prototype: XPathNSResolver;
new(): XPathNSResolver;
-}
+};
interface XPathResult {
readonly booleanValue: boolean;
@@ -13467,7 +13487,7 @@ declare var XPathResult: {
readonly STRING_TYPE: number;
readonly UNORDERED_NODE_ITERATOR_TYPE: number;
readonly UNORDERED_NODE_SNAPSHOT_TYPE: number;
-}
+};
interface XSLTProcessor {
clearParameters(): void;
@@ -13483,17 +13503,7 @@ interface XSLTProcessor {
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;
@@ -13530,6 +13540,81 @@ interface ChildNode {
remove(): void;
}
+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 DOML2DeprecatedColorProperty {
color: string;
}
@@ -13538,81 +13623,6 @@ 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;
@@ -13657,16 +13667,16 @@ interface GlobalFetch {
interface HTMLTableAlignment {
/**
- * Sets or retrieves a value that you can use to implement your own ch functionality for the object.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves how text and other content are vertically aligned within the object that contains them.
+ */
vAlign: string;
}
@@ -13891,38 +13901,38 @@ interface ImageBitmap {
interface URLSearchParams {
/**
- * Appends a specified key/value pair as a new search parameter.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Returns all the values association with a given search parameter.
+ */
getAll(name: string): string[];
/**
- * Returns a Boolean indicating if such a search parameter exists.
- */
+ * 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.
- */
+ * 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.
- */
+ * Constructor returning a URLSearchParams object.
+ */
new (init?: string | URLSearchParams): URLSearchParams;
-}
+};
interface NodeListOf<TNode extends Node> extends NodeList {
length: number;
@@ -14170,7 +14180,7 @@ interface ShadowRoot extends DocumentOrShadowRoot, DocumentFragment {
}
interface ShadowRootInit {
- mode: 'open'|'closed';
+ mode: "open" | "closed";
delegatesFocus?: boolean;
}
@@ -14220,68 +14230,68 @@ interface TouchEventInit extends EventModifierInit {
declare type EventListenerOrEventListenerObject = EventListener | EventListenerObject;
+interface DecodeErrorCallback {
+ (error: DOMException): void;
+}
+interface DecodeSuccessCallback {
+ (decodedData: AudioBuffer): void;
+}
interface ErrorEventHandler {
- (message: string, filename?: string, lineno?: number, colno?: number, error?:Error): void;
+ (message: string, filename?: string, lineno?: number, colno?: number, error?: Error): void;
}
-interface PositionCallback {
- (position: Position): void;
+interface ForEachCallback {
+ (keyId: any, status: MediaKeyStatus): void;
}
-interface PositionErrorCallback {
- (error: PositionError): void;
+interface FrameRequestCallback {
+ (time: number): void;
+}
+interface FunctionStringCallback {
+ (data: string): void;
+}
+interface IntersectionObserverCallback {
+ (entries: IntersectionObserverEntry[], observer: IntersectionObserver): void;
}
interface MediaQueryListListener {
(mql: MediaQueryList): void;
}
+interface MSExecAtPriorityFunctionCallback {
+ (...args: any[]): any;
+}
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 NavigatorUserMediaErrorCallback {
+ (error: MediaStreamError): void;
}
-interface DecodeErrorCallback {
- (error: DOMException): void;
+interface NavigatorUserMediaSuccessCallback {
+ (stream: MediaStream): void;
}
-interface VoidFunction {
- (): void;
+interface NotificationPermissionCallback {
+ (permission: NotificationPermission): void;
}
-interface RTCSessionDescriptionCallback {
- (sdp: RTCSessionDescription): void;
+interface PositionCallback {
+ (position: Position): void;
+}
+interface PositionErrorCallback {
+ (error: PositionError): void;
}
interface RTCPeerConnectionErrorCallback {
(error: DOMError): void;
}
+interface RTCSessionDescriptionCallback {
+ (sdp: RTCSessionDescription): 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 VoidFunction {
+ (): void;
}
interface HTMLElementTagNameMap {
"a": HTMLAnchorElement;
@@ -14369,48 +14379,27 @@ interface HTMLElementTagNameMap {
"xmp": HTMLPreElement;
}
-interface ElementTagNameMap {
- "a": HTMLAnchorElement;
+interface ElementTagNameMap extends HTMLElementTagNameMap {
"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;
@@ -14435,307 +14424,67 @@ interface ElementTagNameMap {
"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; };
+type ElementListTagNameMap = {
+ [key in keyof ElementTagNameMap]: NodeListOf<ElementTagNameMap[key]>
+};
+
+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;
@@ -14743,8 +14492,8 @@ 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 doNotTrack: string;
declare var event: Event | undefined;
declare var external: External;
declare var frameElement: Element;
@@ -14867,9 +14616,9 @@ declare var screenLeft: number;
declare var screenTop: number;
declare var screenX: number;
declare var screenY: number;
+declare var scrollbars: BarProp;
declare var scrollX: number;
declare var scrollY: number;
-declare var scrollbars: BarProp;
declare var self: Window;
declare var speechSynthesis: SpeechSynthesis;
declare var status: string;
@@ -14988,6 +14737,7 @@ type BufferSource = ArrayBuffer | ArrayBufferView;
type MouseWheelEvent = WheelEvent;
type ScrollRestoration = "auto" | "manual";
type FormDataEntryValue = string | File;
+type InsertPosition = "beforebegin" | "afterbegin" | "beforeend" | "afterend";
type AppendMode = "segments" | "sequence";
type AudioContextState = "suspended" | "running" | "closed";
type BiquadFilterType = "lowpass" | "highpass" | "bandpass" | "lowshelf" | "highshelf" | "peaking" | "notch" | "allpass";
@@ -15001,6 +14751,12 @@ type IDBCursorDirection = "next" | "nextunique" | "prev" | "prevunique";
type IDBRequestReadyState = "pending" | "done";
type IDBTransactionMode = "readonly" | "readwrite" | "versionchange";
type ListeningState = "inactive" | "active" | "disambiguation";
+type MediaDeviceKind = "audioinput" | "audiooutput" | "videoinput";
+type MediaKeyMessageType = "license-request" | "license-renewal" | "license-release" | "individualization-request";
+type MediaKeySessionType = "temporary" | "persistent-license" | "persistent-release-message";
+type MediaKeysRequirement = "required" | "optional" | "not-allowed";
+type MediaKeyStatus = "usable" | "expired" | "output-downscaled" | "output-not-allowed" | "status-pending" | "internal-error";
+type MediaStreamTrackState = "live" | "ended";
type MSCredentialType = "FIDO_2_0";
type MSIceAddrType = "os" | "stun" | "turn" | "peer-derived";
type MSIceType = "failed" | "direct" | "relay";
@@ -15008,12 +14764,6 @@ type MSStatsType = "description" | "localclientevent" | "inbound-network" | "out
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";
@@ -15025,6 +14775,14 @@ type PaymentComplete = "success" | "fail" | "";
type PaymentShippingType = "shipping" | "delivery" | "pickup";
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 RTCBundlePolicy = "balanced" | "max-compat" | "max-bundle";
type RTCDegradationPreference = "maintain-framerate" | "maintain-resolution" | "balanced";
type RTCDtlsRole = "auto" | "client" | "server";
@@ -15032,9 +14790,9 @@ 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 RTCIceGatherPolicy = "all" | "nohost" | "relay";
type RTCIceProtocol = "udp" | "tcp";
type RTCIceRole = "controlling" | "controlled";
type RTCIceTcpCandidateType = "active" | "passive" | "so";
@@ -15045,14 +14803,6 @@ type RTCSignalingState = "stable" | "have-local-offer" | "have-remote-offer" | "
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";
diff --git a/node_modules/typedoc/node_modules/typescript/lib/lib.es2017.intl.d.ts b/node_modules/typedoc/node_modules/typescript/lib/lib.es2017.intl.d.ts
new file mode 100644
index 000000000..dd1bf6d89
--- /dev/null
+++ b/node_modules/typedoc/node_modules/typescript/lib/lib.es2017.intl.d.ts
@@ -0,0 +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.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+type DateTimeFormatPartTypes = "day" | "dayPeriod" | "era" | "hour" | "literal" | "minute" | "month" | "second" | "timeZoneName" | "weekday" | "year";
+
+interface DateTimeFormatPart {
+ type: DateTimeFormatPartTypes;
+ value: string;
+}
+
+interface DateTimeFormat {
+ formatToParts(date?: Date | number): DateTimeFormatPart[];
+}
diff --git a/node_modules/typedoc/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts b/node_modules/typedoc/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts
index c0254f1dc..50a38686a 100644
--- a/node_modules/typedoc/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts
+++ b/node_modules/typedoc/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts
@@ -43,5 +43,96 @@ interface SharedArrayBufferConstructor {
readonly prototype: SharedArrayBuffer;
new (byteLength: number): SharedArrayBuffer;
}
+declare var SharedArrayBuffer: SharedArrayBufferConstructor;
-declare var SharedArrayBuffer: SharedArrayBufferConstructor; \ No newline at end of file
+interface ArrayBufferTypes {
+ SharedArrayBuffer: SharedArrayBuffer;
+}
+
+interface Atomics {
+ /**
+ * Adds a value to the value at the given position in the array, returning the original value.
+ * Until this atomic operation completes, any other read or write operation against the array
+ * will block.
+ */
+ add(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number;
+
+ /**
+ * Stores the bitwise AND of a value with the value at the given position in the array,
+ * returning the original value. Until this atomic operation completes, any other read or
+ * write operation against the array will block.
+ */
+ and(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number;
+
+ /**
+ * Replaces the value at the given position in the array if the original value equals the given
+ * expected value, returning the original value. Until this atomic operation completes, any
+ * other read or write operation against the array will block.
+ */
+ compareExchange(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, expectedValue: number, replacementValue: number): number;
+
+ /**
+ * Replaces the value at the given position in the array, returning the original value. Until
+ * this atomic operation completes, any other read or write operation against the array will
+ * block.
+ */
+ exchange(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number;
+
+ /**
+ * Returns a value indicating whether high-performance algorithms can use atomic operations
+ * (`true`) or must use locks (`false`) for the given number of bytes-per-element of a typed
+ * array.
+ */
+ isLockFree(size: number): boolean;
+
+ /**
+ * Returns the value at the given position in the array. Until this atomic operation completes,
+ * any other read or write operation against the array will block.
+ */
+ load(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number): number;
+
+ /**
+ * Stores the bitwise OR of a value with the value at the given position in the array,
+ * returning the original value. Until this atomic operation completes, any other read or write
+ * operation against the array will block.
+ */
+ or(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number;
+
+ /**
+ * Stores a value at the given position in the array, returning the new value. Until this
+ * atomic operation completes, any other read or write operation against the array will block.
+ */
+ store(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number;
+
+ /**
+ * Subtracts a value from the value at the given position in the array, returning the original
+ * value. Until this atomic operation completes, any other read or write operation against the
+ * array will block.
+ */
+ sub(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number;
+
+ /**
+ * If the value at the given position in the array is equal to the provided value, the current
+ * agent is put to sleep causing execution to suspend until the timeout expires (returning
+ * `"timed-out"`) or until the agent is awoken (returning `"ok"`); otherwise, returns
+ * `"not-equal"`.
+ */
+ wait(typedArray: Int32Array, index: number, value: number, timeout?: number): "ok" | "not-equal" | "timed-out";
+
+ /**
+ * Wakes up sleeping agents that are waiting on the given index of the array, returning the
+ * number of agents that were awoken.
+ */
+ wake(typedArray: Int32Array, index: number, count: number): number;
+
+ /**
+ * Stores the bitwise XOR of a value with the value at the given position in the array,
+ * returning the original value. Until this atomic operation completes, any other read or write
+ * operation against the array will block.
+ */
+ xor(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number;
+
+ readonly [Symbol.toStringTag]: "Atomics";
+}
+
+declare var Atomics: Atomics; \ No newline at end of file
diff --git a/node_modules/typedoc/node_modules/typescript/lib/lib.es5.d.ts b/node_modules/typedoc/node_modules/typescript/lib/lib.es5.d.ts
index 1d19198d1..f628dc4fe 100644
--- a/node_modules/typedoc/node_modules/typescript/lib/lib.es5.d.ts
+++ b/node_modules/typedoc/node_modules/typescript/lib/lib.es5.d.ts
@@ -87,8 +87,8 @@ interface PropertyDescriptor {
enumerable?: boolean;
value?: any;
writable?: boolean;
- get? (): any;
- set? (v: any): void;
+ get?(): any;
+ set?(v: any): void;
}
interface PropertyDescriptorMap {
@@ -128,7 +128,7 @@ interface Object {
}
interface ObjectConstructor {
- new (value?: any): Object;
+ new(value?: any): Object;
(): any;
(value: any): any;
@@ -286,7 +286,7 @@ interface FunctionConstructor {
* Creates a new function.
* @param args A list of arguments the function accepts.
*/
- new (...args: string[]): Function;
+ new(...args: string[]): Function;
(...args: string[]): Function;
readonly prototype: Function;
}
@@ -423,7 +423,7 @@ interface String {
}
interface StringConstructor {
- new (value?: any): String;
+ new(value?: any): String;
(value?: any): string;
readonly prototype: String;
fromCharCode(...codes: number[]): string;
@@ -440,7 +440,7 @@ interface Boolean {
}
interface BooleanConstructor {
- new (value?: any): Boolean;
+ new(value?: any): Boolean;
(value?: any): boolean;
readonly prototype: Boolean;
}
@@ -477,7 +477,7 @@ interface Number {
}
interface NumberConstructor {
- new (value?: any): Number;
+ new(value?: any): Number;
(value?: any): number;
readonly prototype: Number;
@@ -779,10 +779,10 @@ interface Date {
}
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;
+ 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;
/**
@@ -848,8 +848,8 @@ interface RegExp {
}
interface RegExpConstructor {
- new (pattern: RegExp | string): RegExp;
- new (pattern: string, flags?: string): RegExp;
+ new(pattern: RegExp | string): RegExp;
+ new(pattern: string, flags?: string): RegExp;
(pattern: RegExp | string): RegExp;
(pattern: string, flags?: string): RegExp;
readonly prototype: RegExp;
@@ -876,7 +876,7 @@ interface Error {
}
interface ErrorConstructor {
- new (message?: string): Error;
+ new(message?: string): Error;
(message?: string): Error;
readonly prototype: Error;
}
@@ -887,7 +887,7 @@ interface EvalError extends Error {
}
interface EvalErrorConstructor {
- new (message?: string): EvalError;
+ new(message?: string): EvalError;
(message?: string): EvalError;
readonly prototype: EvalError;
}
@@ -898,7 +898,7 @@ interface RangeError extends Error {
}
interface RangeErrorConstructor {
- new (message?: string): RangeError;
+ new(message?: string): RangeError;
(message?: string): RangeError;
readonly prototype: RangeError;
}
@@ -909,7 +909,7 @@ interface ReferenceError extends Error {
}
interface ReferenceErrorConstructor {
- new (message?: string): ReferenceError;
+ new(message?: string): ReferenceError;
(message?: string): ReferenceError;
readonly prototype: ReferenceError;
}
@@ -920,7 +920,7 @@ interface SyntaxError extends Error {
}
interface SyntaxErrorConstructor {
- new (message?: string): SyntaxError;
+ new(message?: string): SyntaxError;
(message?: string): SyntaxError;
readonly prototype: SyntaxError;
}
@@ -931,7 +931,7 @@ interface TypeError extends Error {
}
interface TypeErrorConstructor {
- new (message?: string): TypeError;
+ new(message?: string): TypeError;
(message?: string): TypeError;
readonly prototype: TypeError;
}
@@ -942,7 +942,7 @@ interface URIError extends Error {
}
interface URIErrorConstructor {
- new (message?: string): URIError;
+ new(message?: string): URIError;
(message?: string): URIError;
readonly prototype: URIError;
}
@@ -992,12 +992,10 @@ interface ReadonlyArray<T> {
* 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.
+ * Returns a string representation of an array. The elements are converted to string using thier toLocalString methods.
*/
- concat<U extends ReadonlyArray<T>>(...items: U[]): T[];
+ toLocaleString(): string;
/**
* Combines two or more arrays.
* @param items Additional items to add to the end of array1.
@@ -1025,7 +1023,6 @@ interface ReadonlyArray<T> {
* @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.
@@ -1037,49 +1034,37 @@ interface ReadonlyArray<T> {
* @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;
+ 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: (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;
+ 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: (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;
+ 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: (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[];
+ 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: (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[];
+ 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: (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[];
+ 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.
@@ -1117,6 +1102,9 @@ interface Array<T> {
* Returns a string representation of an array.
*/
toString(): string;
+ /**
+ * Returns a string representation of an array. The elements are converted to string using thier toLocalString methods.
+ */
toLocaleString(): string;
/**
* Appends new elements to an array, and returns the new length of the array.
@@ -1196,73 +1184,37 @@ interface Array<T> {
* @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;
+ 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: (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;
+ 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: (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];
+ 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], 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];
+ map<U>(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): 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<S extends T>(callbackfn: (value: T, index: number, array: 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: (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[];
+ 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.
@@ -1292,7 +1244,7 @@ interface Array<T> {
}
interface ArrayConstructor {
- new (arrayLength?: number): any[];
+ new(arrayLength?: number): any[];
new <T>(arrayLength: number): T[];
new <T>(...items: T[]): T[];
(arrayLength?: number): any[];
@@ -1406,9 +1358,17 @@ interface ArrayBuffer {
slice(begin: number, end?: number): ArrayBuffer;
}
+/**
+ * Allowed ArrayBuffer types for the buffer of an ArrayBufferView and related Typed Arrays.
+ */
+interface ArrayBufferTypes {
+ ArrayBuffer: ArrayBuffer;
+}
+type ArrayBufferLike = ArrayBufferTypes[keyof ArrayBufferTypes];
+
interface ArrayBufferConstructor {
readonly prototype: ArrayBuffer;
- new (byteLength: number): ArrayBuffer;
+ new(byteLength: number): ArrayBuffer;
isView(arg: any): arg is ArrayBufferView;
}
declare const ArrayBuffer: ArrayBufferConstructor;
@@ -1417,7 +1377,7 @@ interface ArrayBufferView {
/**
* The ArrayBuffer instance referenced by the array.
*/
- buffer: ArrayBuffer;
+ buffer: ArrayBufferLike;
/**
* The length in bytes of the array.
@@ -1559,7 +1519,7 @@ interface DataView {
}
interface DataViewConstructor {
- new (buffer: ArrayBuffer, byteOffset?: number, byteLength?: number): DataView;
+ new(buffer: ArrayBufferLike, byteOffset?: number, byteLength?: number): DataView;
}
declare const DataView: DataViewConstructor;
@@ -1576,7 +1536,7 @@ interface Int8Array {
/**
* The ArrayBuffer instance referenced by the array.
*/
- readonly buffer: ArrayBuffer;
+ readonly buffer: ArrayBufferLike;
/**
* The length in bytes of the array.
@@ -1607,9 +1567,7 @@ interface Int8Array {
* @param thisArg 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;
+ 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
@@ -1628,9 +1586,7 @@ interface Int8Array {
* @param thisArg 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;
+ 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
@@ -1641,9 +1597,7 @@ interface Int8Array {
* @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;
+ 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
@@ -1654,9 +1608,7 @@ interface Int8Array {
* @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;
+ findIndex(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
/**
* Performs the specified action for each element in an array.
@@ -1665,9 +1617,7 @@ interface Int8Array {
* @param thisArg 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;
+ 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.
@@ -1705,9 +1655,7 @@ interface Int8Array {
* @param thisArg 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;
+ map(callbackfn: (this: void, 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
@@ -1784,9 +1732,7 @@ interface Int8Array {
* @param thisArg 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;
+ some(callbackfn: (value: number, index: number, array: Int8Array) => boolean, thisArg?: any): boolean;
/**
* Sorts an array.
@@ -1817,9 +1763,9 @@ interface Int8Array {
}
interface Int8ArrayConstructor {
readonly prototype: Int8Array;
- new (length: number): Int8Array;
- new (array: ArrayLike<number>): Int8Array;
- new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int8Array;
+ new(length: number): Int8Array;
+ new(array: ArrayLike<number>): Int8Array;
+ new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Int8Array;
/**
* The size in bytes of each element in the array.
@@ -1838,11 +1784,8 @@ interface Int8ArrayConstructor {
* @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>, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array;
- from(arrayLike: ArrayLike<number>): Int8Array;
}
declare const Int8Array: Int8ArrayConstructor;
@@ -1860,7 +1803,7 @@ interface Uint8Array {
/**
* The ArrayBuffer instance referenced by the array.
*/
- readonly buffer: ArrayBuffer;
+ readonly buffer: ArrayBufferLike;
/**
* The length in bytes of the array.
@@ -1891,9 +1834,7 @@ interface Uint8Array {
* @param thisArg 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;
+ 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
@@ -1912,9 +1853,7 @@ interface Uint8Array {
* @param thisArg 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;
+ 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
@@ -1925,9 +1864,7 @@ interface Uint8Array {
* @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;
+ 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
@@ -1938,9 +1875,7 @@ interface Uint8Array {
* @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;
+ findIndex(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
/**
* Performs the specified action for each element in an array.
@@ -1949,9 +1884,7 @@ interface Uint8Array {
* @param thisArg 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;
+ 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.
@@ -1989,9 +1922,7 @@ interface Uint8Array {
* @param thisArg 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;
+ map(callbackfn: (this: void, 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
@@ -2068,9 +1999,7 @@ interface Uint8Array {
* @param thisArg 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;
+ some(callbackfn: (value: number, index: number, array: Uint8Array) => boolean, thisArg?: any): boolean;
/**
* Sorts an array.
@@ -2102,9 +2031,9 @@ interface Uint8Array {
interface Uint8ArrayConstructor {
readonly prototype: Uint8Array;
- new (length: number): Uint8Array;
- new (array: ArrayLike<number>): Uint8Array;
- new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8Array;
+ new(length: number): Uint8Array;
+ new(array: ArrayLike<number>): Uint8Array;
+ new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint8Array;
/**
* The size in bytes of each element in the array.
@@ -2123,11 +2052,7 @@ interface Uint8ArrayConstructor {
* @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;
+ from(arrayLike: ArrayLike<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array;
}
declare const Uint8Array: Uint8ArrayConstructor;
@@ -2145,7 +2070,7 @@ interface Uint8ClampedArray {
/**
* The ArrayBuffer instance referenced by the array.
*/
- readonly buffer: ArrayBuffer;
+ readonly buffer: ArrayBufferLike;
/**
* The length in bytes of the array.
@@ -2176,9 +2101,7 @@ interface Uint8ClampedArray {
* @param thisArg 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;
+ 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
@@ -2197,9 +2120,7 @@ interface Uint8ClampedArray {
* @param thisArg 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;
+ 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
@@ -2210,9 +2131,7 @@ interface Uint8ClampedArray {
* @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;
+ 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
@@ -2223,9 +2142,7 @@ interface Uint8ClampedArray {
* @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;
+ findIndex(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
/**
* Performs the specified action for each element in an array.
@@ -2234,9 +2151,7 @@ interface Uint8ClampedArray {
* @param thisArg 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;
+ 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.
@@ -2274,9 +2189,7 @@ interface Uint8ClampedArray {
* @param thisArg 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;
+ map(callbackfn: (this: void, 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
@@ -2353,9 +2266,7 @@ interface Uint8ClampedArray {
* @param thisArg 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;
+ some(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => boolean, thisArg?: any): boolean;
/**
* Sorts an array.
@@ -2387,9 +2298,9 @@ interface Uint8ClampedArray {
interface Uint8ClampedArrayConstructor {
readonly prototype: Uint8ClampedArray;
- new (length: number): Uint8ClampedArray;
- new (array: ArrayLike<number>): Uint8ClampedArray;
- new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8ClampedArray;
+ new(length: number): Uint8ClampedArray;
+ new(array: ArrayLike<number>): Uint8ClampedArray;
+ new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint8ClampedArray;
/**
* The size in bytes of each element in the array.
@@ -2408,11 +2319,7 @@ interface Uint8ClampedArrayConstructor {
* @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;
+ from(arrayLike: ArrayLike<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray;
}
declare const Uint8ClampedArray: Uint8ClampedArrayConstructor;
@@ -2429,7 +2336,7 @@ interface Int16Array {
/**
* The ArrayBuffer instance referenced by the array.
*/
- readonly buffer: ArrayBuffer;
+ readonly buffer: ArrayBufferLike;
/**
* The length in bytes of the array.
@@ -2460,9 +2367,7 @@ interface Int16Array {
* @param thisArg 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;
+ 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
@@ -2481,9 +2386,7 @@ interface Int16Array {
* @param thisArg 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;
+ filter(callbackfn: (this: void, 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
@@ -2494,9 +2397,7 @@ interface Int16Array {
* @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;
+ 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
@@ -2507,9 +2408,7 @@ interface Int16Array {
* @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;
+ findIndex(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
/**
* Performs the specified action for each element in an array.
@@ -2518,10 +2417,7 @@ interface Int16Array {
* @param thisArg 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;
-
+ 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.
@@ -2558,9 +2454,7 @@ interface Int16Array {
* @param thisArg 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;
+ map(callbackfn: (this: void, 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
@@ -2637,9 +2531,7 @@ interface Int16Array {
* @param thisArg 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;
+ some(callbackfn: (value: number, index: number, array: Int16Array) => boolean, thisArg?: any): boolean;
/**
* Sorts an array.
@@ -2671,9 +2563,9 @@ interface Int16Array {
interface Int16ArrayConstructor {
readonly prototype: Int16Array;
- new (length: number): Int16Array;
- new (array: ArrayLike<number>): Int16Array;
- new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int16Array;
+ new(length: number): Int16Array;
+ new(array: ArrayLike<number>): Int16Array;
+ new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Int16Array;
/**
* The size in bytes of each element in the array.
@@ -2692,11 +2584,8 @@ interface Int16ArrayConstructor {
* @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>, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array;
- from(arrayLike: ArrayLike<number>): Int16Array;
}
declare const Int16Array: Int16ArrayConstructor;
@@ -2714,7 +2603,7 @@ interface Uint16Array {
/**
* The ArrayBuffer instance referenced by the array.
*/
- readonly buffer: ArrayBuffer;
+ readonly buffer: ArrayBufferLike;
/**
* The length in bytes of the array.
@@ -2745,9 +2634,7 @@ interface Uint16Array {
* @param thisArg 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;
+ 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
@@ -2766,9 +2653,7 @@ interface Uint16Array {
* @param thisArg 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;
+ 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
@@ -2779,9 +2664,7 @@ interface Uint16Array {
* @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;
+ 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
@@ -2792,9 +2675,7 @@ interface Uint16Array {
* @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;
+ findIndex(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
/**
* Performs the specified action for each element in an array.
@@ -2803,9 +2684,7 @@ interface Uint16Array {
* @param thisArg 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;
+ 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.
@@ -2843,9 +2722,7 @@ interface Uint16Array {
* @param thisArg 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;
+ map(callbackfn: (this: void, 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
@@ -2922,9 +2799,7 @@ interface Uint16Array {
* @param thisArg 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;
+ some(callbackfn: (value: number, index: number, array: Uint16Array) => boolean, thisArg?: any): boolean;
/**
* Sorts an array.
@@ -2956,9 +2831,9 @@ interface Uint16Array {
interface Uint16ArrayConstructor {
readonly prototype: Uint16Array;
- new (length: number): Uint16Array;
- new (array: ArrayLike<number>): Uint16Array;
- new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint16Array;
+ new(length: number): Uint16Array;
+ new(array: ArrayLike<number>): Uint16Array;
+ new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint16Array;
/**
* The size in bytes of each element in the array.
@@ -2977,11 +2852,8 @@ interface Uint16ArrayConstructor {
* @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>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array;
- from(arrayLike: ArrayLike<number>): Uint16Array;
}
declare const Uint16Array: Uint16ArrayConstructor;
@@ -2998,7 +2870,7 @@ interface Int32Array {
/**
* The ArrayBuffer instance referenced by the array.
*/
- readonly buffer: ArrayBuffer;
+ readonly buffer: ArrayBufferLike;
/**
* The length in bytes of the array.
@@ -3029,9 +2901,7 @@ interface Int32Array {
* @param thisArg 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;
+ 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
@@ -3050,9 +2920,7 @@ interface Int32Array {
* @param thisArg 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;
+ 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
@@ -3063,9 +2931,7 @@ interface Int32Array {
* @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;
+ 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
@@ -3076,9 +2942,7 @@ interface Int32Array {
* @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;
+ findIndex(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
/**
* Performs the specified action for each element in an array.
@@ -3087,9 +2951,7 @@ interface Int32Array {
* @param thisArg 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;
+ 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.
@@ -3127,9 +2989,7 @@ interface Int32Array {
* @param thisArg 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;
+ 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
@@ -3206,9 +3066,7 @@ interface Int32Array {
* @param thisArg 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;
+ some(callbackfn: (value: number, index: number, array: Int32Array) => boolean, thisArg?: any): boolean;
/**
* Sorts an array.
@@ -3240,9 +3098,9 @@ interface Int32Array {
interface Int32ArrayConstructor {
readonly prototype: Int32Array;
- new (length: number): Int32Array;
- new (array: ArrayLike<number>): Int32Array;
- new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int32Array;
+ new(length: number): Int32Array;
+ new(array: ArrayLike<number>): Int32Array;
+ new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Int32Array;
/**
* The size in bytes of each element in the array.
@@ -3261,11 +3119,8 @@ interface Int32ArrayConstructor {
* @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>, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array;
- from(arrayLike: ArrayLike<number>): Int32Array;
}
declare const Int32Array: Int32ArrayConstructor;
@@ -3282,7 +3137,7 @@ interface Uint32Array {
/**
* The ArrayBuffer instance referenced by the array.
*/
- readonly buffer: ArrayBuffer;
+ readonly buffer: ArrayBufferLike;
/**
* The length in bytes of the array.
@@ -3313,9 +3168,7 @@ interface Uint32Array {
* @param thisArg 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;
+ 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
@@ -3334,9 +3187,7 @@ interface Uint32Array {
* @param thisArg 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;
+ 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
@@ -3347,9 +3198,7 @@ interface Uint32Array {
* @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;
+ 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
@@ -3360,9 +3209,7 @@ interface Uint32Array {
* @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;
+ findIndex(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
/**
* Performs the specified action for each element in an array.
@@ -3371,10 +3218,7 @@ interface Uint32Array {
* @param thisArg 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;
-
+ 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.
@@ -3411,9 +3255,7 @@ interface Uint32Array {
* @param thisArg 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;
+ map(callbackfn: (this: void, 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
@@ -3490,9 +3332,7 @@ interface Uint32Array {
* @param thisArg 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;
+ some(callbackfn: (value: number, index: number, array: Uint32Array) => boolean, thisArg?: any): boolean;
/**
* Sorts an array.
@@ -3524,9 +3364,9 @@ interface Uint32Array {
interface Uint32ArrayConstructor {
readonly prototype: Uint32Array;
- new (length: number): Uint32Array;
- new (array: ArrayLike<number>): Uint32Array;
- new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint32Array;
+ new(length: number): Uint32Array;
+ new(array: ArrayLike<number>): Uint32Array;
+ new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint32Array;
/**
* The size in bytes of each element in the array.
@@ -3545,11 +3385,8 @@ interface Uint32ArrayConstructor {
* @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>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array;
- from(arrayLike: ArrayLike<number>): Uint32Array;
}
declare const Uint32Array: Uint32ArrayConstructor;
@@ -3566,7 +3403,7 @@ interface Float32Array {
/**
* The ArrayBuffer instance referenced by the array.
*/
- readonly buffer: ArrayBuffer;
+ readonly buffer: ArrayBufferLike;
/**
* The length in bytes of the array.
@@ -3597,9 +3434,7 @@ interface Float32Array {
* @param thisArg 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;
+ 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
@@ -3618,9 +3453,7 @@ interface Float32Array {
* @param thisArg 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;
+ 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
@@ -3631,9 +3464,7 @@ interface Float32Array {
* @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;
+ 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
@@ -3644,9 +3475,7 @@ interface Float32Array {
* @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;
+ findIndex(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
/**
* Performs the specified action for each element in an array.
@@ -3655,9 +3484,7 @@ interface Float32Array {
* @param thisArg 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;
+ 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.
@@ -3695,9 +3522,7 @@ interface Float32Array {
* @param thisArg 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;
+ map(callbackfn: (this: void, 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
@@ -3774,9 +3599,7 @@ interface Float32Array {
* @param thisArg 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;
+ some(callbackfn: (value: number, index: number, array: Float32Array) => boolean, thisArg?: any): boolean;
/**
* Sorts an array.
@@ -3808,9 +3631,9 @@ interface Float32Array {
interface Float32ArrayConstructor {
readonly prototype: Float32Array;
- new (length: number): Float32Array;
- new (array: ArrayLike<number>): Float32Array;
- new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float32Array;
+ new(length: number): Float32Array;
+ new(array: ArrayLike<number>): Float32Array;
+ new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Float32Array;
/**
* The size in bytes of each element in the array.
@@ -3829,11 +3652,8 @@ interface Float32ArrayConstructor {
* @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>, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array;
- from(arrayLike: ArrayLike<number>): Float32Array;
}
declare const Float32Array: Float32ArrayConstructor;
@@ -3851,7 +3671,7 @@ interface Float64Array {
/**
* The ArrayBuffer instance referenced by the array.
*/
- readonly buffer: ArrayBuffer;
+ readonly buffer: ArrayBufferLike;
/**
* The length in bytes of the array.
@@ -3882,9 +3702,7 @@ interface Float64Array {
* @param thisArg 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;
+ 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
@@ -3903,9 +3721,7 @@ interface Float64Array {
* @param thisArg 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;
+ 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
@@ -3916,9 +3732,7 @@ interface Float64Array {
* @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;
+ 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
@@ -3929,9 +3743,7 @@ interface Float64Array {
* @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;
+ findIndex(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
/**
* Performs the specified action for each element in an array.
@@ -3940,9 +3752,7 @@ interface Float64Array {
* @param thisArg 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;
+ 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.
@@ -3980,9 +3790,7 @@ interface Float64Array {
* @param thisArg 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;
+ map(callbackfn: (this: void, 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
@@ -4059,9 +3867,7 @@ interface Float64Array {
* @param thisArg 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;
+ some(callbackfn: (value: number, index: number, array: Float64Array) => boolean, thisArg?: any): boolean;
/**
* Sorts an array.
@@ -4093,9 +3899,9 @@ interface Float64Array {
interface Float64ArrayConstructor {
readonly prototype: Float64Array;
- new (length: number): Float64Array;
- new (array: ArrayLike<number>): Float64Array;
- new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float64Array;
+ new(length: number): Float64Array;
+ new(array: ArrayLike<number>): Float64Array;
+ new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Float64Array;
/**
* The size in bytes of each element in the array.
@@ -4114,11 +3920,8 @@ interface Float64ArrayConstructor {
* @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>, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array;
- from(arrayLike: ArrayLike<number>): Float64Array;
}
declare const Float64Array: Float64ArrayConstructor;
@@ -4151,7 +3954,7 @@ declare namespace Intl {
resolvedOptions(): ResolvedCollatorOptions;
}
var Collator: {
- new (locales?: string | string[], options?: CollatorOptions): Collator;
+ new(locales?: string | string[], options?: CollatorOptions): Collator;
(locales?: string | string[], options?: CollatorOptions): Collator;
supportedLocalesOf(locales: string | string[], options?: CollatorOptions): string[];
};
@@ -4188,7 +3991,7 @@ declare namespace Intl {
resolvedOptions(): ResolvedNumberFormatOptions;
}
var NumberFormat: {
- new (locales?: string | string[], options?: NumberFormatOptions): NumberFormat;
+ new(locales?: string | string[], options?: NumberFormatOptions): NumberFormat;
(locales?: string | string[], options?: NumberFormatOptions): NumberFormat;
supportedLocalesOf(locales: string | string[], options?: NumberFormatOptions): string[];
};
@@ -4231,7 +4034,7 @@ declare namespace Intl {
resolvedOptions(): ResolvedDateTimeFormatOptions;
}
var DateTimeFormat: {
- new (locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat;
+ new(locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat;
(locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat;
supportedLocalesOf(locales: string | string[], options?: DateTimeFormatOptions): string[];
};
diff --git a/node_modules/typedoc/node_modules/typescript/lib/lib.es6.d.ts b/node_modules/typedoc/node_modules/typescript/lib/lib.es6.d.ts
index 76dc84306..588c609a1 100644
--- a/node_modules/typedoc/node_modules/typescript/lib/lib.es6.d.ts
+++ b/node_modules/typedoc/node_modules/typescript/lib/lib.es6.d.ts
@@ -87,8 +87,8 @@ interface PropertyDescriptor {
enumerable?: boolean;
value?: any;
writable?: boolean;
- get? (): any;
- set? (v: any): void;
+ get?(): any;
+ set?(v: any): void;
}
interface PropertyDescriptorMap {
@@ -128,7 +128,7 @@ interface Object {
}
interface ObjectConstructor {
- new (value?: any): Object;
+ new(value?: any): Object;
(): any;
(value: any): any;
@@ -286,7 +286,7 @@ interface FunctionConstructor {
* Creates a new function.
* @param args A list of arguments the function accepts.
*/
- new (...args: string[]): Function;
+ new(...args: string[]): Function;
(...args: string[]): Function;
readonly prototype: Function;
}
@@ -423,7 +423,7 @@ interface String {
}
interface StringConstructor {
- new (value?: any): String;
+ new(value?: any): String;
(value?: any): string;
readonly prototype: String;
fromCharCode(...codes: number[]): string;
@@ -440,7 +440,7 @@ interface Boolean {
}
interface BooleanConstructor {
- new (value?: any): Boolean;
+ new(value?: any): Boolean;
(value?: any): boolean;
readonly prototype: Boolean;
}
@@ -477,7 +477,7 @@ interface Number {
}
interface NumberConstructor {
- new (value?: any): Number;
+ new(value?: any): Number;
(value?: any): number;
readonly prototype: Number;
@@ -779,10 +779,10 @@ interface Date {
}
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;
+ 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;
/**
@@ -848,8 +848,8 @@ interface RegExp {
}
interface RegExpConstructor {
- new (pattern: RegExp | string): RegExp;
- new (pattern: string, flags?: string): RegExp;
+ new(pattern: RegExp | string): RegExp;
+ new(pattern: string, flags?: string): RegExp;
(pattern: RegExp | string): RegExp;
(pattern: string, flags?: string): RegExp;
readonly prototype: RegExp;
@@ -876,7 +876,7 @@ interface Error {
}
interface ErrorConstructor {
- new (message?: string): Error;
+ new(message?: string): Error;
(message?: string): Error;
readonly prototype: Error;
}
@@ -887,7 +887,7 @@ interface EvalError extends Error {
}
interface EvalErrorConstructor {
- new (message?: string): EvalError;
+ new(message?: string): EvalError;
(message?: string): EvalError;
readonly prototype: EvalError;
}
@@ -898,7 +898,7 @@ interface RangeError extends Error {
}
interface RangeErrorConstructor {
- new (message?: string): RangeError;
+ new(message?: string): RangeError;
(message?: string): RangeError;
readonly prototype: RangeError;
}
@@ -909,7 +909,7 @@ interface ReferenceError extends Error {
}
interface ReferenceErrorConstructor {
- new (message?: string): ReferenceError;
+ new(message?: string): ReferenceError;
(message?: string): ReferenceError;
readonly prototype: ReferenceError;
}
@@ -920,7 +920,7 @@ interface SyntaxError extends Error {
}
interface SyntaxErrorConstructor {
- new (message?: string): SyntaxError;
+ new(message?: string): SyntaxError;
(message?: string): SyntaxError;
readonly prototype: SyntaxError;
}
@@ -931,7 +931,7 @@ interface TypeError extends Error {
}
interface TypeErrorConstructor {
- new (message?: string): TypeError;
+ new(message?: string): TypeError;
(message?: string): TypeError;
readonly prototype: TypeError;
}
@@ -942,7 +942,7 @@ interface URIError extends Error {
}
interface URIErrorConstructor {
- new (message?: string): URIError;
+ new(message?: string): URIError;
(message?: string): URIError;
readonly prototype: URIError;
}
@@ -992,12 +992,10 @@ interface ReadonlyArray<T> {
* 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.
+ * Returns a string representation of an array. The elements are converted to string using thier toLocalString methods.
*/
- concat<U extends ReadonlyArray<T>>(...items: U[]): T[];
+ toLocaleString(): string;
/**
* Combines two or more arrays.
* @param items Additional items to add to the end of array1.
@@ -1025,7 +1023,6 @@ interface ReadonlyArray<T> {
* @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.
@@ -1037,49 +1034,37 @@ interface ReadonlyArray<T> {
* @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;
+ 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: (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;
+ 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: (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;
+ 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: (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[];
+ 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: (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[];
+ 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: (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[];
+ 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.
@@ -1117,6 +1102,9 @@ interface Array<T> {
* Returns a string representation of an array.
*/
toString(): string;
+ /**
+ * Returns a string representation of an array. The elements are converted to string using thier toLocalString methods.
+ */
toLocaleString(): string;
/**
* Appends new elements to an array, and returns the new length of the array.
@@ -1196,73 +1184,37 @@ interface Array<T> {
* @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;
+ 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: (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;
+ 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: (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];
+ 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], 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];
+ map<U>(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): 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<S extends T>(callbackfn: (value: T, index: number, array: 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: (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[];
+ 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.
@@ -1292,7 +1244,7 @@ interface Array<T> {
}
interface ArrayConstructor {
- new (arrayLength?: number): any[];
+ new(arrayLength?: number): any[];
new <T>(arrayLength: number): T[];
new <T>(...items: T[]): T[];
(arrayLength?: number): any[];
@@ -1406,9 +1358,17 @@ interface ArrayBuffer {
slice(begin: number, end?: number): ArrayBuffer;
}
+/**
+ * Allowed ArrayBuffer types for the buffer of an ArrayBufferView and related Typed Arrays.
+ */
+interface ArrayBufferTypes {
+ ArrayBuffer: ArrayBuffer;
+}
+type ArrayBufferLike = ArrayBufferTypes[keyof ArrayBufferTypes];
+
interface ArrayBufferConstructor {
readonly prototype: ArrayBuffer;
- new (byteLength: number): ArrayBuffer;
+ new(byteLength: number): ArrayBuffer;
isView(arg: any): arg is ArrayBufferView;
}
declare const ArrayBuffer: ArrayBufferConstructor;
@@ -1417,7 +1377,7 @@ interface ArrayBufferView {
/**
* The ArrayBuffer instance referenced by the array.
*/
- buffer: ArrayBuffer;
+ buffer: ArrayBufferLike;
/**
* The length in bytes of the array.
@@ -1559,7 +1519,7 @@ interface DataView {
}
interface DataViewConstructor {
- new (buffer: ArrayBuffer, byteOffset?: number, byteLength?: number): DataView;
+ new(buffer: ArrayBufferLike, byteOffset?: number, byteLength?: number): DataView;
}
declare const DataView: DataViewConstructor;
@@ -1576,7 +1536,7 @@ interface Int8Array {
/**
* The ArrayBuffer instance referenced by the array.
*/
- readonly buffer: ArrayBuffer;
+ readonly buffer: ArrayBufferLike;
/**
* The length in bytes of the array.
@@ -1607,9 +1567,7 @@ interface Int8Array {
* @param thisArg 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;
+ 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
@@ -1628,9 +1586,7 @@ interface Int8Array {
* @param thisArg 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;
+ 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
@@ -1641,9 +1597,7 @@ interface Int8Array {
* @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;
+ 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
@@ -1654,9 +1608,7 @@ interface Int8Array {
* @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;
+ findIndex(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
/**
* Performs the specified action for each element in an array.
@@ -1665,9 +1617,7 @@ interface Int8Array {
* @param thisArg 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;
+ 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.
@@ -1705,9 +1655,7 @@ interface Int8Array {
* @param thisArg 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;
+ map(callbackfn: (this: void, 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
@@ -1784,9 +1732,7 @@ interface Int8Array {
* @param thisArg 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;
+ some(callbackfn: (value: number, index: number, array: Int8Array) => boolean, thisArg?: any): boolean;
/**
* Sorts an array.
@@ -1817,9 +1763,9 @@ interface Int8Array {
}
interface Int8ArrayConstructor {
readonly prototype: Int8Array;
- new (length: number): Int8Array;
- new (array: ArrayLike<number>): Int8Array;
- new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int8Array;
+ new(length: number): Int8Array;
+ new(array: ArrayLike<number>): Int8Array;
+ new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Int8Array;
/**
* The size in bytes of each element in the array.
@@ -1838,11 +1784,8 @@ interface Int8ArrayConstructor {
* @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>, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array;
- from(arrayLike: ArrayLike<number>): Int8Array;
}
declare const Int8Array: Int8ArrayConstructor;
@@ -1860,7 +1803,7 @@ interface Uint8Array {
/**
* The ArrayBuffer instance referenced by the array.
*/
- readonly buffer: ArrayBuffer;
+ readonly buffer: ArrayBufferLike;
/**
* The length in bytes of the array.
@@ -1891,9 +1834,7 @@ interface Uint8Array {
* @param thisArg 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;
+ 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
@@ -1912,9 +1853,7 @@ interface Uint8Array {
* @param thisArg 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;
+ 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
@@ -1925,9 +1864,7 @@ interface Uint8Array {
* @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;
+ 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
@@ -1938,9 +1875,7 @@ interface Uint8Array {
* @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;
+ findIndex(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
/**
* Performs the specified action for each element in an array.
@@ -1949,9 +1884,7 @@ interface Uint8Array {
* @param thisArg 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;
+ 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.
@@ -1989,9 +1922,7 @@ interface Uint8Array {
* @param thisArg 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;
+ map(callbackfn: (this: void, 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
@@ -2068,9 +1999,7 @@ interface Uint8Array {
* @param thisArg 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;
+ some(callbackfn: (value: number, index: number, array: Uint8Array) => boolean, thisArg?: any): boolean;
/**
* Sorts an array.
@@ -2102,9 +2031,9 @@ interface Uint8Array {
interface Uint8ArrayConstructor {
readonly prototype: Uint8Array;
- new (length: number): Uint8Array;
- new (array: ArrayLike<number>): Uint8Array;
- new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8Array;
+ new(length: number): Uint8Array;
+ new(array: ArrayLike<number>): Uint8Array;
+ new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint8Array;
/**
* The size in bytes of each element in the array.
@@ -2123,11 +2052,7 @@ interface Uint8ArrayConstructor {
* @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;
+ from(arrayLike: ArrayLike<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array;
}
declare const Uint8Array: Uint8ArrayConstructor;
@@ -2145,7 +2070,7 @@ interface Uint8ClampedArray {
/**
* The ArrayBuffer instance referenced by the array.
*/
- readonly buffer: ArrayBuffer;
+ readonly buffer: ArrayBufferLike;
/**
* The length in bytes of the array.
@@ -2176,9 +2101,7 @@ interface Uint8ClampedArray {
* @param thisArg 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;
+ 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
@@ -2197,9 +2120,7 @@ interface Uint8ClampedArray {
* @param thisArg 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;
+ 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
@@ -2210,9 +2131,7 @@ interface Uint8ClampedArray {
* @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;
+ 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
@@ -2223,9 +2142,7 @@ interface Uint8ClampedArray {
* @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;
+ findIndex(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
/**
* Performs the specified action for each element in an array.
@@ -2234,9 +2151,7 @@ interface Uint8ClampedArray {
* @param thisArg 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;
+ 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.
@@ -2274,9 +2189,7 @@ interface Uint8ClampedArray {
* @param thisArg 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;
+ map(callbackfn: (this: void, 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
@@ -2353,9 +2266,7 @@ interface Uint8ClampedArray {
* @param thisArg 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;
+ some(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => boolean, thisArg?: any): boolean;
/**
* Sorts an array.
@@ -2387,9 +2298,9 @@ interface Uint8ClampedArray {
interface Uint8ClampedArrayConstructor {
readonly prototype: Uint8ClampedArray;
- new (length: number): Uint8ClampedArray;
- new (array: ArrayLike<number>): Uint8ClampedArray;
- new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8ClampedArray;
+ new(length: number): Uint8ClampedArray;
+ new(array: ArrayLike<number>): Uint8ClampedArray;
+ new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint8ClampedArray;
/**
* The size in bytes of each element in the array.
@@ -2408,11 +2319,7 @@ interface Uint8ClampedArrayConstructor {
* @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;
+ from(arrayLike: ArrayLike<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray;
}
declare const Uint8ClampedArray: Uint8ClampedArrayConstructor;
@@ -2429,7 +2336,7 @@ interface Int16Array {
/**
* The ArrayBuffer instance referenced by the array.
*/
- readonly buffer: ArrayBuffer;
+ readonly buffer: ArrayBufferLike;
/**
* The length in bytes of the array.
@@ -2460,9 +2367,7 @@ interface Int16Array {
* @param thisArg 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;
+ 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
@@ -2481,9 +2386,7 @@ interface Int16Array {
* @param thisArg 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;
+ filter(callbackfn: (this: void, 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
@@ -2494,9 +2397,7 @@ interface Int16Array {
* @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;
+ 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
@@ -2507,9 +2408,7 @@ interface Int16Array {
* @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;
+ findIndex(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
/**
* Performs the specified action for each element in an array.
@@ -2518,10 +2417,7 @@ interface Int16Array {
* @param thisArg 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;
-
+ 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.
@@ -2558,9 +2454,7 @@ interface Int16Array {
* @param thisArg 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;
+ map(callbackfn: (this: void, 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
@@ -2637,9 +2531,7 @@ interface Int16Array {
* @param thisArg 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;
+ some(callbackfn: (value: number, index: number, array: Int16Array) => boolean, thisArg?: any): boolean;
/**
* Sorts an array.
@@ -2671,9 +2563,9 @@ interface Int16Array {
interface Int16ArrayConstructor {
readonly prototype: Int16Array;
- new (length: number): Int16Array;
- new (array: ArrayLike<number>): Int16Array;
- new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int16Array;
+ new(length: number): Int16Array;
+ new(array: ArrayLike<number>): Int16Array;
+ new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Int16Array;
/**
* The size in bytes of each element in the array.
@@ -2692,11 +2584,8 @@ interface Int16ArrayConstructor {
* @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>, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array;
- from(arrayLike: ArrayLike<number>): Int16Array;
}
declare const Int16Array: Int16ArrayConstructor;
@@ -2714,7 +2603,7 @@ interface Uint16Array {
/**
* The ArrayBuffer instance referenced by the array.
*/
- readonly buffer: ArrayBuffer;
+ readonly buffer: ArrayBufferLike;
/**
* The length in bytes of the array.
@@ -2745,9 +2634,7 @@ interface Uint16Array {
* @param thisArg 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;
+ 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
@@ -2766,9 +2653,7 @@ interface Uint16Array {
* @param thisArg 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;
+ 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
@@ -2779,9 +2664,7 @@ interface Uint16Array {
* @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;
+ 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
@@ -2792,9 +2675,7 @@ interface Uint16Array {
* @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;
+ findIndex(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
/**
* Performs the specified action for each element in an array.
@@ -2803,9 +2684,7 @@ interface Uint16Array {
* @param thisArg 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;
+ 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.
@@ -2843,9 +2722,7 @@ interface Uint16Array {
* @param thisArg 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;
+ map(callbackfn: (this: void, 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
@@ -2922,9 +2799,7 @@ interface Uint16Array {
* @param thisArg 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;
+ some(callbackfn: (value: number, index: number, array: Uint16Array) => boolean, thisArg?: any): boolean;
/**
* Sorts an array.
@@ -2956,9 +2831,9 @@ interface Uint16Array {
interface Uint16ArrayConstructor {
readonly prototype: Uint16Array;
- new (length: number): Uint16Array;
- new (array: ArrayLike<number>): Uint16Array;
- new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint16Array;
+ new(length: number): Uint16Array;
+ new(array: ArrayLike<number>): Uint16Array;
+ new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint16Array;
/**
* The size in bytes of each element in the array.
@@ -2977,11 +2852,8 @@ interface Uint16ArrayConstructor {
* @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>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array;
- from(arrayLike: ArrayLike<number>): Uint16Array;
}
declare const Uint16Array: Uint16ArrayConstructor;
@@ -2998,7 +2870,7 @@ interface Int32Array {
/**
* The ArrayBuffer instance referenced by the array.
*/
- readonly buffer: ArrayBuffer;
+ readonly buffer: ArrayBufferLike;
/**
* The length in bytes of the array.
@@ -3029,9 +2901,7 @@ interface Int32Array {
* @param thisArg 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;
+ 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
@@ -3050,9 +2920,7 @@ interface Int32Array {
* @param thisArg 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;
+ 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
@@ -3063,9 +2931,7 @@ interface Int32Array {
* @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;
+ 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
@@ -3076,9 +2942,7 @@ interface Int32Array {
* @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;
+ findIndex(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
/**
* Performs the specified action for each element in an array.
@@ -3087,9 +2951,7 @@ interface Int32Array {
* @param thisArg 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;
+ 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.
@@ -3127,9 +2989,7 @@ interface Int32Array {
* @param thisArg 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;
+ 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
@@ -3206,9 +3066,7 @@ interface Int32Array {
* @param thisArg 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;
+ some(callbackfn: (value: number, index: number, array: Int32Array) => boolean, thisArg?: any): boolean;
/**
* Sorts an array.
@@ -3240,9 +3098,9 @@ interface Int32Array {
interface Int32ArrayConstructor {
readonly prototype: Int32Array;
- new (length: number): Int32Array;
- new (array: ArrayLike<number>): Int32Array;
- new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int32Array;
+ new(length: number): Int32Array;
+ new(array: ArrayLike<number>): Int32Array;
+ new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Int32Array;
/**
* The size in bytes of each element in the array.
@@ -3261,11 +3119,8 @@ interface Int32ArrayConstructor {
* @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>, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array;
- from(arrayLike: ArrayLike<number>): Int32Array;
}
declare const Int32Array: Int32ArrayConstructor;
@@ -3282,7 +3137,7 @@ interface Uint32Array {
/**
* The ArrayBuffer instance referenced by the array.
*/
- readonly buffer: ArrayBuffer;
+ readonly buffer: ArrayBufferLike;
/**
* The length in bytes of the array.
@@ -3313,9 +3168,7 @@ interface Uint32Array {
* @param thisArg 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;
+ 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
@@ -3334,9 +3187,7 @@ interface Uint32Array {
* @param thisArg 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;
+ 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
@@ -3347,9 +3198,7 @@ interface Uint32Array {
* @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;
+ 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
@@ -3360,9 +3209,7 @@ interface Uint32Array {
* @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;
+ findIndex(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
/**
* Performs the specified action for each element in an array.
@@ -3371,10 +3218,7 @@ interface Uint32Array {
* @param thisArg 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;
-
+ 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.
@@ -3411,9 +3255,7 @@ interface Uint32Array {
* @param thisArg 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;
+ map(callbackfn: (this: void, 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
@@ -3490,9 +3332,7 @@ interface Uint32Array {
* @param thisArg 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;
+ some(callbackfn: (value: number, index: number, array: Uint32Array) => boolean, thisArg?: any): boolean;
/**
* Sorts an array.
@@ -3524,9 +3364,9 @@ interface Uint32Array {
interface Uint32ArrayConstructor {
readonly prototype: Uint32Array;
- new (length: number): Uint32Array;
- new (array: ArrayLike<number>): Uint32Array;
- new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint32Array;
+ new(length: number): Uint32Array;
+ new(array: ArrayLike<number>): Uint32Array;
+ new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint32Array;
/**
* The size in bytes of each element in the array.
@@ -3545,11 +3385,8 @@ interface Uint32ArrayConstructor {
* @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>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array;
- from(arrayLike: ArrayLike<number>): Uint32Array;
}
declare const Uint32Array: Uint32ArrayConstructor;
@@ -3566,7 +3403,7 @@ interface Float32Array {
/**
* The ArrayBuffer instance referenced by the array.
*/
- readonly buffer: ArrayBuffer;
+ readonly buffer: ArrayBufferLike;
/**
* The length in bytes of the array.
@@ -3597,9 +3434,7 @@ interface Float32Array {
* @param thisArg 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;
+ 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
@@ -3618,9 +3453,7 @@ interface Float32Array {
* @param thisArg 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;
+ 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
@@ -3631,9 +3464,7 @@ interface Float32Array {
* @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;
+ 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
@@ -3644,9 +3475,7 @@ interface Float32Array {
* @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;
+ findIndex(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
/**
* Performs the specified action for each element in an array.
@@ -3655,9 +3484,7 @@ interface Float32Array {
* @param thisArg 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;
+ 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.
@@ -3695,9 +3522,7 @@ interface Float32Array {
* @param thisArg 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;
+ map(callbackfn: (this: void, 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
@@ -3774,9 +3599,7 @@ interface Float32Array {
* @param thisArg 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;
+ some(callbackfn: (value: number, index: number, array: Float32Array) => boolean, thisArg?: any): boolean;
/**
* Sorts an array.
@@ -3808,9 +3631,9 @@ interface Float32Array {
interface Float32ArrayConstructor {
readonly prototype: Float32Array;
- new (length: number): Float32Array;
- new (array: ArrayLike<number>): Float32Array;
- new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float32Array;
+ new(length: number): Float32Array;
+ new(array: ArrayLike<number>): Float32Array;
+ new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Float32Array;
/**
* The size in bytes of each element in the array.
@@ -3829,11 +3652,8 @@ interface Float32ArrayConstructor {
* @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>, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array;
- from(arrayLike: ArrayLike<number>): Float32Array;
}
declare const Float32Array: Float32ArrayConstructor;
@@ -3851,7 +3671,7 @@ interface Float64Array {
/**
* The ArrayBuffer instance referenced by the array.
*/
- readonly buffer: ArrayBuffer;
+ readonly buffer: ArrayBufferLike;
/**
* The length in bytes of the array.
@@ -3882,9 +3702,7 @@ interface Float64Array {
* @param thisArg 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;
+ 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
@@ -3903,9 +3721,7 @@ interface Float64Array {
* @param thisArg 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;
+ 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
@@ -3916,9 +3732,7 @@ interface Float64Array {
* @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;
+ 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
@@ -3929,9 +3743,7 @@ interface Float64Array {
* @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;
+ findIndex(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
/**
* Performs the specified action for each element in an array.
@@ -3940,9 +3752,7 @@ interface Float64Array {
* @param thisArg 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;
+ 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.
@@ -3980,9 +3790,7 @@ interface Float64Array {
* @param thisArg 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;
+ map(callbackfn: (this: void, 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
@@ -4059,9 +3867,7 @@ interface Float64Array {
* @param thisArg 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;
+ some(callbackfn: (value: number, index: number, array: Float64Array) => boolean, thisArg?: any): boolean;
/**
* Sorts an array.
@@ -4093,9 +3899,9 @@ interface Float64Array {
interface Float64ArrayConstructor {
readonly prototype: Float64Array;
- new (length: number): Float64Array;
- new (array: ArrayLike<number>): Float64Array;
- new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float64Array;
+ new(length: number): Float64Array;
+ new(array: ArrayLike<number>): Float64Array;
+ new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Float64Array;
/**
* The size in bytes of each element in the array.
@@ -4114,11 +3920,8 @@ interface Float64ArrayConstructor {
* @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>, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array;
- from(arrayLike: ArrayLike<number>): Float64Array;
}
declare const Float64Array: Float64ArrayConstructor;
@@ -4151,7 +3954,7 @@ declare namespace Intl {
resolvedOptions(): ResolvedCollatorOptions;
}
var Collator: {
- new (locales?: string | string[], options?: CollatorOptions): Collator;
+ new(locales?: string | string[], options?: CollatorOptions): Collator;
(locales?: string | string[], options?: CollatorOptions): Collator;
supportedLocalesOf(locales: string | string[], options?: CollatorOptions): string[];
};
@@ -4188,7 +3991,7 @@ declare namespace Intl {
resolvedOptions(): ResolvedNumberFormatOptions;
}
var NumberFormat: {
- new (locales?: string | string[], options?: NumberFormatOptions): NumberFormat;
+ new(locales?: string | string[], options?: NumberFormatOptions): NumberFormat;
(locales?: string | string[], options?: NumberFormatOptions): NumberFormat;
supportedLocalesOf(locales: string | string[], options?: NumberFormatOptions): string[];
};
@@ -4231,7 +4034,7 @@ declare namespace Intl {
resolvedOptions(): ResolvedDateTimeFormatOptions;
}
var DateTimeFormat: {
- new (locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat;
+ new(locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat;
(locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat;
supportedLocalesOf(locales: string | string[], options?: DateTimeFormatOptions): string[];
};
@@ -4977,17 +4780,17 @@ interface Array<T> {
[Symbol.iterator](): IterableIterator<T>;
/**
- * Returns an array of key, value pairs for every entry in the array
+ * Returns an iterable of key, value pairs for every entry in the array
*/
entries(): IterableIterator<[number, T]>;
/**
- * Returns an list of keys in the array
+ * Returns an iterable of keys in the array
*/
keys(): IterableIterator<number>;
/**
- * Returns an list of values in the array
+ * Returns an iterable of values in the array
*/
values(): IterableIterator<T>;
}
@@ -5011,21 +4814,21 @@ interface ArrayConstructor {
}
interface ReadonlyArray<T> {
- /** Iterator */
+ /** Iterator of values in the array. */
[Symbol.iterator](): IterableIterator<T>;
/**
- * Returns an array of key, value pairs for every entry in the array
+ * Returns an iterable of key, value pairs for every entry in the array
*/
entries(): IterableIterator<[number, T]>;
/**
- * Returns an list of keys in the array
+ * Returns an iterable of keys in the array
*/
keys(): IterableIterator<number>;
/**
- * Returns an list of values in the array
+ * Returns an iterable of values in the array
*/
values(): IterableIterator<T>;
}
@@ -5036,9 +4839,42 @@ interface IArguments {
}
interface Map<K, V> {
+ /** Returns an iterable of entries in the map. */
[Symbol.iterator](): IterableIterator<[K, V]>;
+
+ /**
+ * Returns an iterable of key, value pairs for every entry in the map.
+ */
entries(): IterableIterator<[K, V]>;
+
+ /**
+ * Returns an iterable of keys in the map
+ */
keys(): IterableIterator<K>;
+
+ /**
+ * Returns an iterable of values in the map
+ */
+ values(): IterableIterator<V>;
+}
+
+interface ReadonlyMap<K, V> {
+ /** Returns an iterable of entries in the map. */
+ [Symbol.iterator](): IterableIterator<[K, V]>;
+
+ /**
+ * Returns an iterable of key, value pairs for every entry in the map.
+ */
+ entries(): IterableIterator<[K, V]>;
+
+ /**
+ * Returns an iterable of keys in the map
+ */
+ keys(): IterableIterator<K>;
+
+ /**
+ * Returns an iterable of values in the map
+ */
values(): IterableIterator<V>;
}
@@ -5053,9 +4889,40 @@ interface WeakMapConstructor {
}
interface Set<T> {
+ /** Iterates over values in the set. */
[Symbol.iterator](): IterableIterator<T>;
+ /**
+ * Returns an iterable of [v,v] pairs for every value `v` in the set.
+ */
entries(): IterableIterator<[T, T]>;
+ /**
+ * Despite its name, returns an iterable of the values in the set,
+ */
keys(): IterableIterator<T>;
+
+ /**
+ * Returns an iterable of values in the set.
+ */
+ values(): IterableIterator<T>;
+}
+
+interface ReadonlySet<T> {
+ /** Iterates over values in the set. */
+ [Symbol.iterator](): IterableIterator<T>;
+
+ /**
+ * Returns an iterable of [v,v] pairs for every value `v` in the set.
+ */
+ entries(): IterableIterator<[T, T]>;
+
+ /**
+ * Despite its name, returns an iterable of the values in the set,
+ */
+ keys(): IterableIterator<T>;
+
+ /**
+ * Returns an iterable of values in the set.
+ */
values(): IterableIterator<T>;
}
@@ -5637,7 +5504,7 @@ interface ProxyHandler<T extends object> {
setPrototypeOf? (target: T, v: any): boolean;
isExtensible? (target: T): boolean;
preventExtensions? (target: T): boolean;
- getOwnPropertyDescriptor? (target: T, p: PropertyKey): PropertyDescriptor;
+ getOwnPropertyDescriptor? (target: T, p: PropertyKey): PropertyDescriptor | undefined;
has? (target: T, p: PropertyKey): boolean;
get? (target: T, p: PropertyKey, receiver: any): any;
set? (target: T, p: PropertyKey, value: any, receiver: any): boolean;
@@ -6041,15 +5908,15 @@ interface Float64Array {
/////////////////////////////
-/// IE DOM APIs
+/// DOM APIs
/////////////////////////////
interface Account {
- rpDisplayName?: string;
displayName?: string;
id?: string;
- name?: string;
imageURL?: string;
+ name?: string;
+ rpDisplayName?: string;
}
interface Algorithm {
@@ -6062,32 +5929,32 @@ interface AnimationEventInit extends EventInit {
}
interface AssertionOptions {
- timeoutSeconds?: number;
- rpId?: USVString;
allowList?: ScopedCredentialDescriptor[];
extensions?: WebAuthnExtensions;
+ rpId?: USVString;
+ timeoutSeconds?: number;
}
interface CacheQueryOptions {
- ignoreSearch?: boolean;
+ cacheName?: string;
ignoreMethod?: boolean;
+ ignoreSearch?: boolean;
ignoreVary?: boolean;
- cacheName?: string;
}
interface ClientData {
challenge?: string;
+ extensions?: WebAuthnExtensions;
+ hashAlg?: string | Algorithm;
origin?: string;
rpId?: string;
- hashAlg?: string | Algorithm;
tokenBinding?: string;
- extensions?: WebAuthnExtensions;
}
interface CloseEventInit extends EventInit {
- wasClean?: boolean;
code?: number;
reason?: string;
+ wasClean?: boolean;
}
interface CompositionEventInit extends UIEventInit {
@@ -6127,13 +5994,6 @@ interface CustomEventInit extends EventInit {
detail?: any;
}
-interface DOMRectInit {
- x?: any;
- y?: any;
- width?: any;
- height?: any;
-}
-
interface DeviceAccelerationDict {
x?: number;
y?: number;
@@ -6147,15 +6007,15 @@ interface DeviceLightEventInit extends EventInit {
interface DeviceMotionEventInit extends EventInit {
acceleration?: DeviceAccelerationDict;
accelerationIncludingGravity?: DeviceAccelerationDict;
- rotationRate?: DeviceRotationRateDict;
interval?: number;
+ rotationRate?: DeviceRotationRateDict;
}
interface DeviceOrientationEventInit extends EventInit {
+ absolute?: boolean;
alpha?: number;
beta?: number;
gamma?: number;
- absolute?: boolean;
}
interface DeviceRotationRateDict {
@@ -6164,17 +6024,24 @@ interface DeviceRotationRateDict {
gamma?: number;
}
+interface DOMRectInit {
+ height?: any;
+ width?: any;
+ x?: any;
+ y?: any;
+}
+
interface DoubleRange {
max?: number;
min?: number;
}
interface ErrorEventInit extends EventInit {
- message?: string;
- filename?: string;
- lineno?: number;
colno?: number;
error?: any;
+ filename?: string;
+ lineno?: number;
+ message?: string;
}
interface EventInit {
@@ -6184,9 +6051,8 @@ interface EventInit {
}
interface EventModifierInit extends UIEventInit {
- ctrlKey?: boolean;
- shiftKey?: boolean;
altKey?: boolean;
+ ctrlKey?: boolean;
metaKey?: boolean;
modifierAltGraph?: boolean;
modifierCapsLock?: boolean;
@@ -6199,6 +6065,7 @@ interface EventModifierInit extends UIEventInit {
modifierSuper?: boolean;
modifierSymbol?: boolean;
modifierSymbolLock?: boolean;
+ shiftKey?: boolean;
}
interface ExceptionInformation {
@@ -6211,17 +6078,17 @@ interface FocusEventInit extends UIEventInit {
interface FocusNavigationEventInit extends EventInit {
navigationReason?: string;
+ originHeight?: number;
originLeft?: number;
originTop?: number;
originWidth?: number;
- originHeight?: number;
}
interface FocusNavigationOrigin {
+ originHeight?: number;
originLeft?: number;
originTop?: number;
originWidth?: number;
- originHeight?: number;
}
interface GamepadEventInit extends EventInit {
@@ -6248,11 +6115,11 @@ interface IDBObjectStoreParameters {
}
interface IntersectionObserverEntryInit {
- time?: number;
- rootBounds?: DOMRectInit;
boundingClientRect?: DOMRectInit;
intersectionRect?: DOMRectInit;
+ rootBounds?: DOMRectInit;
target?: Element;
+ time?: number;
}
interface IntersectionObserverInit {
@@ -6277,39 +6144,153 @@ interface LongRange {
min?: number;
}
+interface MediaEncryptedEventInit extends EventInit {
+ initData?: ArrayBuffer;
+ initDataType?: string;
+}
+
+interface MediaKeyMessageEventInit extends EventInit {
+ message?: ArrayBuffer;
+ messageType?: MediaKeyMessageType;
+}
+
+interface MediaKeySystemConfiguration {
+ audioCapabilities?: MediaKeySystemMediaCapability[];
+ distinctiveIdentifier?: MediaKeysRequirement;
+ initDataTypes?: string[];
+ persistentState?: MediaKeysRequirement;
+ videoCapabilities?: MediaKeySystemMediaCapability[];
+}
+
+interface MediaKeySystemMediaCapability {
+ contentType?: string;
+ robustness?: string;
+}
+
+interface MediaStreamConstraints {
+ audio?: boolean | MediaTrackConstraints;
+ video?: boolean | MediaTrackConstraints;
+}
+
+interface MediaStreamErrorEventInit extends EventInit {
+ error?: MediaStreamError;
+}
+
+interface MediaStreamEventInit extends EventInit {
+ stream?: MediaStream;
+}
+
+interface MediaStreamTrackEventInit extends EventInit {
+ track?: MediaStreamTrack;
+}
+
+interface MediaTrackCapabilities {
+ aspectRatio?: number | DoubleRange;
+ deviceId?: string;
+ echoCancellation?: boolean[];
+ facingMode?: string;
+ frameRate?: number | DoubleRange;
+ groupId?: string;
+ height?: number | LongRange;
+ sampleRate?: number | LongRange;
+ sampleSize?: number | LongRange;
+ volume?: number | DoubleRange;
+ width?: number | LongRange;
+}
+
+interface MediaTrackConstraints extends MediaTrackConstraintSet {
+ advanced?: MediaTrackConstraintSet[];
+}
+
+interface MediaTrackConstraintSet {
+ aspectRatio?: number | ConstrainDoubleRange;
+ deviceId?: string | string[] | ConstrainDOMStringParameters;
+ echoCancelation?: boolean | ConstrainBooleanParameters;
+ facingMode?: string | string[] | ConstrainDOMStringParameters;
+ frameRate?: number | ConstrainDoubleRange;
+ groupId?: string | string[] | ConstrainDOMStringParameters;
+ height?: number | ConstrainLongRange;
+ sampleRate?: number | ConstrainLongRange;
+ sampleSize?: number | ConstrainLongRange;
+ volume?: number | ConstrainDoubleRange;
+ width?: number | ConstrainLongRange;
+}
+
+interface MediaTrackSettings {
+ aspectRatio?: number;
+ deviceId?: string;
+ echoCancellation?: boolean;
+ facingMode?: string;
+ frameRate?: number;
+ groupId?: string;
+ height?: number;
+ sampleRate?: number;
+ sampleSize?: number;
+ volume?: number;
+ width?: number;
+}
+
+interface MediaTrackSupportedConstraints {
+ aspectRatio?: boolean;
+ deviceId?: boolean;
+ echoCancellation?: boolean;
+ facingMode?: boolean;
+ frameRate?: boolean;
+ groupId?: boolean;
+ height?: boolean;
+ sampleRate?: boolean;
+ sampleSize?: boolean;
+ volume?: boolean;
+ width?: boolean;
+}
+
+interface MessageEventInit extends EventInit {
+ lastEventId?: string;
+ channel?: string;
+ data?: any;
+ origin?: string;
+ ports?: MessagePort[];
+ source?: Window;
+}
+
+interface MouseEventInit extends EventModifierInit {
+ button?: number;
+ buttons?: number;
+ clientX?: number;
+ clientY?: number;
+ relatedTarget?: EventTarget;
+ screenX?: number;
+ screenY?: number;
+}
+
interface MSAccountInfo {
+ accountImageUri?: string;
+ accountName?: string;
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;
+ deviceClippingEventRatio?: number;
+ deviceEchoEventRatio?: number;
deviceGlitchesEventRatio?: number;
+ deviceHalfDuplexAECEventRatio?: number;
+ deviceHowlingEventCount?: number;
deviceLowSNREventRatio?: number;
deviceLowSpeechLevelEventRatio?: number;
- deviceClippingEventRatio?: number;
- deviceEchoEventRatio?: number;
+ deviceMultipleEndpointsEventCount?: number;
deviceNearEndToEchoRatioEventRatio?: number;
- deviceRenderZeroVolumeEventRatio?: number;
deviceRenderMuteEventRatio?: number;
- deviceMultipleEndpointsEventCount?: number;
- deviceHowlingEventCount?: number;
+ deviceRenderNotFunctioningEventRatio?: number;
+ deviceRenderZeroVolumeEventRatio?: number;
+ networkDelayEventRatio?: number;
+ networkSendQualityEventRatio?: number;
}
interface MSAudioRecvPayload extends MSPayloadBase {
- samplingRate?: number;
- signal?: MSAudioRecvSignal;
- packetReorderRatio?: number;
- packetReorderDepthAvg?: number;
- packetReorderDepthMax?: number;
burstLossLength1?: number;
burstLossLength2?: number;
burstLossLength3?: number;
@@ -6321,31 +6302,36 @@ interface MSAudioRecvPayload extends MSPayloadBase {
fecRecvDistance1?: number;
fecRecvDistance2?: number;
fecRecvDistance3?: number;
+ packetReorderDepthAvg?: number;
+ packetReorderDepthMax?: number;
+ packetReorderRatio?: number;
+ ratioCompressedSamplesAvg?: number;
ratioConcealedSamplesAvg?: number;
ratioStretchedSamplesAvg?: number;
- ratioCompressedSamplesAvg?: number;
+ samplingRate?: number;
+ signal?: MSAudioRecvSignal;
}
interface MSAudioRecvSignal {
initialSignalLevelRMS?: number;
- recvSignalLevelCh1?: number;
recvNoiseLevelCh1?: number;
- renderSignalLevel?: number;
- renderNoiseLevel?: number;
+ recvSignalLevelCh1?: number;
renderLoopbackSignalLevel?: number;
+ renderNoiseLevel?: number;
+ renderSignalLevel?: number;
}
interface MSAudioSendPayload extends MSPayloadBase {
- samplingRate?: number;
- signal?: MSAudioSendSignal;
audioFECUsed?: boolean;
+ samplingRate?: number;
sendMutePercent?: number;
+ signal?: MSAudioSendSignal;
}
interface MSAudioSendSignal {
noiseLevel?: number;
- sendSignalLevelCh1?: number;
sendNoiseLevelCh1?: number;
+ sendSignalLevelCh1?: number;
}
interface MSConnectivity {
@@ -6363,8 +6349,8 @@ interface MSCredentialParameters {
}
interface MSCredentialSpec {
- type?: MSCredentialType;
id?: string;
+ type?: MSCredentialType;
}
interface MSDelay {
@@ -6374,12 +6360,12 @@ interface MSDelay {
interface MSDescription extends RTCStats {
connectivity?: MSConnectivity;
- transport?: RTCIceProtocol;
- networkconnectivity?: MSNetworkConnectivityInfo;
- localAddr?: MSIPAddressInfo;
- remoteAddr?: MSIPAddressInfo;
deviceDevName?: string;
+ localAddr?: MSIPAddressInfo;
+ networkconnectivity?: MSNetworkConnectivityInfo;
reflexiveLocalIPAddr?: MSIPAddressInfo;
+ remoteAddr?: MSIPAddressInfo;
+ transport?: RTCIceProtocol;
}
interface MSFIDOCredentialParameters extends MSCredentialParameters {
@@ -6387,35 +6373,35 @@ interface MSFIDOCredentialParameters extends MSCredentialParameters {
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;
+ alternateServerReceived?: boolean;
+ connCheckMessageIntegrityFailed?: boolean;
connCheckOtherError?: boolean;
- turnAuthUnknownUsernameError?: boolean;
- noRelayServersConfigured?: boolean;
+ fipsAllocationFailure?: boolean;
multipleRelayServersAttempted?: boolean;
+ noRelayServersConfigured?: boolean;
portRangeExhausted?: boolean;
- alternateServerReceived?: boolean;
pseudoTLSFailure?: boolean;
+ tcpNatConnectivityFailed?: boolean;
+ tcpRelayConnectivityFailed?: boolean;
+ turnAuthUnknownUsernameError?: boolean;
+ turnTcpAllocateFailed?: boolean;
+ turnTcpSendFailed?: boolean;
+ turnTcpTimedOut?: boolean;
turnTurnTcpConnectivityFailed?: boolean;
+ turnUdpAllocateFailed?: boolean;
+ turnUdpSendFailed?: boolean;
+ udpLocalConnectivityFailed?: boolean;
+ udpNatConnectivityFailed?: boolean;
+ udpRelayConnectivityFailed?: boolean;
useCandidateChecksFailed?: boolean;
- fipsAllocationFailure?: boolean;
+}
+
+interface MSIPAddressInfo {
+ ipAddr?: string;
+ manufacturerMacAddrMask?: string;
+ port?: number;
}
interface MSJitter {
@@ -6425,28 +6411,28 @@ interface MSJitter {
}
interface MSLocalClientEventBase extends RTCStats {
- networkReceiveQualityEventRatio?: number;
networkBandwidthLowEventRatio?: number;
+ networkReceiveQualityEventRatio?: number;
}
interface MSNetwork extends RTCStats {
- jitter?: MSJitter;
delay?: MSDelay;
+ jitter?: MSJitter;
packetLoss?: MSPacketLoss;
utilization?: MSUtilization;
}
interface MSNetworkConnectivityInfo {
- vpn?: boolean;
linkspeed?: number;
networkConnectionDetails?: string;
+ vpn?: boolean;
}
interface MSNetworkInterfaceType {
interfaceTypeEthernet?: boolean;
- interfaceTypeWireless?: boolean;
interfaceTypePPP?: boolean;
interfaceTypeTunnel?: boolean;
+ interfaceTypeWireless?: boolean;
interfaceTypeWWAN?: boolean;
}
@@ -6464,13 +6450,13 @@ interface MSPayloadBase extends RTCStats {
}
interface MSPortRange {
- min?: number;
max?: number;
+ min?: number;
}
interface MSRelayAddress {
- relayAddress?: string;
port?: number;
+ relayAddress?: string;
}
interface MSSignatureParameters {
@@ -6478,241 +6464,122 @@ interface MSSignatureParameters {
}
interface MSTransportDiagnosticsStats extends RTCStats {
+ allocationTimeInMs?: number;
baseAddress?: string;
+ baseInterface?: MSNetworkInterfaceType;
+ iceRole?: RTCIceRole;
+ iceWarningFlags?: MSIceWarningFlags;
+ interfaces?: MSNetworkInterfaceType;
localAddress?: string;
- localSite?: string;
- networkName?: string;
- remoteAddress?: string;
- remoteSite?: string;
+ localAddrType?: MSIceAddrType;
+ localInterface?: MSNetworkInterfaceType;
localMR?: string;
- remoteMR?: string;
- iceWarningFlags?: MSIceWarningFlags;
- portRangeMin?: number;
- portRangeMax?: number;
localMRTCPPort?: number;
- remoteMRTCPPort?: number;
- stunVer?: number;
- numConsentReqSent?: number;
+ localSite?: string;
+ msRtcEngineVersion?: string;
+ networkName?: string;
numConsentReqReceived?: number;
- numConsentRespSent?: number;
+ numConsentReqSent?: number;
numConsentRespReceived?: number;
- interfaces?: MSNetworkInterfaceType;
- baseInterface?: MSNetworkInterfaceType;
+ numConsentRespSent?: number;
+ portRangeMax?: number;
+ portRangeMin?: number;
protocol?: RTCIceProtocol;
- localInterface?: MSNetworkInterfaceType;
- localAddrType?: MSIceAddrType;
+ remoteAddress?: string;
remoteAddrType?: MSIceAddrType;
- iceRole?: RTCIceRole;
+ remoteMR?: string;
+ remoteMRTCPPort?: number;
+ remoteSite?: string;
rtpRtcpMux?: boolean;
- allocationTimeInMs?: number;
- msRtcEngineVersion?: string;
+ stunVer?: number;
}
interface MSUtilization {
- packets?: number;
bandwidthEstimation?: number;
- bandwidthEstimationMin?: number;
+ bandwidthEstimationAvg?: number;
bandwidthEstimationMax?: number;
+ bandwidthEstimationMin?: number;
bandwidthEstimationStdDev?: number;
- bandwidthEstimationAvg?: number;
+ packets?: number;
}
interface MSVideoPayload extends MSPayloadBase {
+ durationSeconds?: number;
resolution?: string;
videoBitRateAvg?: number;
videoBitRateMax?: number;
videoFrameRateAvg?: number;
videoPacketLossRate?: number;
- durationSeconds?: number;
}
interface MSVideoRecvPayload extends MSVideoPayload {
- videoFrameLossRate?: number;
+ lowBitRateCallPercent?: number;
+ lowFrameRateCallPercent?: number;
+ recvBitRateAverage?: number;
+ recvBitRateMaximum?: number;
recvCodecType?: string;
- recvResolutionWidth?: number;
- recvResolutionHeight?: number;
- videoResolutions?: MSVideoResolutionDistribution;
+ recvFpsHarmonicAverage?: number;
recvFrameRateAverage?: number;
- recvBitRateMaximum?: number;
- recvBitRateAverage?: number;
+ recvNumResSwitches?: number;
+ recvReorderBufferMaxSuccessfullyOrderedExtent?: number;
+ recvReorderBufferMaxSuccessfullyOrderedLateTime?: number;
+ recvReorderBufferPacketsDroppedDueToBufferExhaustion?: number;
+ recvReorderBufferPacketsDroppedDueToTimeout?: number;
+ recvReorderBufferReorderedPackets?: number;
+ recvResolutionHeight?: number;
+ recvResolutionWidth?: 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;
+ videoFrameLossRate?: number;
+ videoPostFECPLR?: number;
+ videoResolutions?: MSVideoResolutionDistribution;
}
interface MSVideoResolutionDistribution {
cifQuality?: number;
- vgaQuality?: number;
- h720Quality?: number;
h1080Quality?: number;
h1440Quality?: number;
h2160Quality?: number;
+ h720Quality?: number;
+ vgaQuality?: number;
}
interface MSVideoSendPayload extends MSVideoPayload {
- sendFrameRateAverage?: number;
- sendBitRateMaximum?: number;
sendBitRateAverage?: number;
- sendVideoStreamsMax?: number;
- sendResolutionWidth?: number;
+ sendBitRateMaximum?: number;
+ sendFrameRateAverage?: 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;
+ sendResolutionWidth?: number;
+ sendVideoStreamsMax?: number;
}
interface MsZoomToOptions {
+ animate?: string;
contentX?: number;
contentY?: number;
+ scaleFactor?: number;
viewportX?: string;
viewportY?: string;
- scaleFactor?: number;
- animate?: string;
}
interface MutationObserverInit {
- childList?: boolean;
+ attributeFilter?: string[];
+ attributeOldValue?: boolean;
attributes?: boolean;
characterData?: boolean;
- subtree?: boolean;
- attributeOldValue?: boolean;
characterDataOldValue?: boolean;
- attributeFilter?: string[];
+ childList?: boolean;
+ subtree?: boolean;
}
interface NotificationOptions {
+ body?: string;
dir?: NotificationDirection;
+ icon?: string;
lang?: string;
- body?: string;
tag?: string;
- icon?: string;
}
interface ObjectURLOptions {
@@ -6721,39 +6588,39 @@ interface ObjectURLOptions {
interface PaymentCurrencyAmount {
currency?: string;
- value?: string;
currencySystem?: string;
+ value?: string;
}
interface PaymentDetails {
- total?: PaymentItem;
displayItems?: PaymentItem[];
- shippingOptions?: PaymentShippingOption[];
- modifiers?: PaymentDetailsModifier[];
error?: string;
+ modifiers?: PaymentDetailsModifier[];
+ shippingOptions?: PaymentShippingOption[];
+ total?: PaymentItem;
}
interface PaymentDetailsModifier {
- supportedMethods?: string[];
- total?: PaymentItem;
additionalDisplayItems?: PaymentItem[];
data?: any;
+ supportedMethods?: string[];
+ total?: PaymentItem;
}
interface PaymentItem {
- label?: string;
amount?: PaymentCurrencyAmount;
+ label?: string;
pending?: boolean;
}
interface PaymentMethodData {
- supportedMethods?: string[];
data?: any;
+ supportedMethods?: string[];
}
interface PaymentOptions {
- requestPayerName?: boolean;
requestPayerEmail?: boolean;
+ requestPayerName?: boolean;
requestPayerPhone?: boolean;
requestShipping?: boolean;
shippingType?: string;
@@ -6763,9 +6630,9 @@ interface PaymentRequestUpdateEventInit extends EventInit {
}
interface PaymentShippingOption {
+ amount?: PaymentCurrencyAmount;
id?: string;
label?: string;
- amount?: PaymentCurrencyAmount;
selected?: boolean;
}
@@ -6774,14 +6641,14 @@ interface PeriodicWaveConstraints {
}
interface PointerEventInit extends MouseEventInit {
- pointerId?: number;
- width?: number;
height?: number;
+ isPrimary?: boolean;
+ pointerId?: number;
+ pointerType?: string;
pressure?: number;
tiltX?: number;
tiltY?: number;
- pointerType?: string;
- isPrimary?: boolean;
+ width?: number;
}
interface PopStateEventInit extends EventInit {
@@ -6790,8 +6657,8 @@ interface PopStateEventInit extends EventInit {
interface PositionOptions {
enableHighAccuracy?: boolean;
- timeout?: number;
maximumAge?: number;
+ timeout?: number;
}
interface ProgressEventInit extends EventInit {
@@ -6801,38 +6668,63 @@ interface ProgressEventInit extends EventInit {
}
interface PushSubscriptionOptionsInit {
- userVisibleOnly?: boolean;
applicationServerKey?: any;
+ userVisibleOnly?: boolean;
+}
+
+interface RegistrationOptions {
+ scope?: string;
+}
+
+interface RequestInit {
+ body?: any;
+ cache?: RequestCache;
+ credentials?: RequestCredentials;
+ headers?: any;
+ integrity?: string;
+ keepalive?: boolean;
+ method?: string;
+ mode?: RequestMode;
+ redirect?: RequestRedirect;
+ referrer?: string;
+ referrerPolicy?: ReferrerPolicy;
+ window?: any;
+}
+
+interface ResponseInit {
+ headers?: any;
+ status?: number;
+ statusText?: string;
}
interface RTCConfiguration {
+ bundlePolicy?: RTCBundlePolicy;
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[];
+ role?: RTCDtlsRole;
+}
+
+interface RTCDTMFToneChangeEventInit extends EventInit {
+ tone?: string;
}
interface RTCIceCandidateAttributes extends RTCStats {
+ addressSourceUrl?: string;
+ candidateType?: RTCStatsIceCandidateType;
ipAddress?: string;
portNumber?: number;
- transport?: string;
- candidateType?: RTCStatsIceCandidateType;
priority?: number;
- addressSourceUrl?: string;
+ transport?: string;
}
interface RTCIceCandidateComplete {
@@ -6840,15 +6732,15 @@ interface RTCIceCandidateComplete {
interface RTCIceCandidateDictionary {
foundation?: string;
- priority?: number;
ip?: string;
- protocol?: RTCIceProtocol;
+ msMTurnSessionId?: string;
port?: number;
- type?: RTCIceCandidateType;
- tcpType?: RTCIceTcpCandidateType;
+ priority?: number;
+ protocol?: RTCIceProtocol;
relatedAddress?: string;
relatedPort?: number;
- msMTurnSessionId?: string;
+ tcpType?: RTCIceTcpCandidateType;
+ type?: RTCIceCandidateType;
}
interface RTCIceCandidateInit {
@@ -6863,19 +6755,19 @@ interface RTCIceCandidatePair {
}
interface RTCIceCandidatePairStats extends RTCStats {
- transportId?: string;
+ availableIncomingBitrate?: number;
+ availableOutgoingBitrate?: number;
+ bytesReceived?: number;
+ bytesSent?: number;
localCandidateId?: string;
- remoteCandidateId?: string;
- state?: RTCStatsIceCandidatePairState;
- priority?: number;
nominated?: boolean;
- writable?: boolean;
+ priority?: number;
readable?: boolean;
- bytesSent?: number;
- bytesReceived?: number;
+ remoteCandidateId?: string;
roundTripTime?: number;
- availableOutgoingBitrate?: number;
- availableIncomingBitrate?: number;
+ state?: RTCStatsIceCandidatePairState;
+ transportId?: string;
+ writable?: boolean;
}
interface RTCIceGatherOptions {
@@ -6885,285 +6777,260 @@ interface RTCIceGatherOptions {
}
interface RTCIceParameters {
- usernameFragment?: string;
- password?: string;
iceLite?: boolean;
+ password?: string;
+ usernameFragment?: string;
}
interface RTCIceServer {
+ credential?: string;
urls?: any;
username?: string;
- credential?: string;
}
interface RTCInboundRTPStreamStats extends RTCRTPStreamStats {
- packetsReceived?: number;
bytesReceived?: number;
- packetsLost?: number;
- jitter?: number;
fractionLost?: number;
+ jitter?: number;
+ packetsLost?: number;
+ packetsReceived?: 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;
+ frameHeight?: number;
+ framesCorrupted?: number;
+ framesDecoded?: number;
+ framesDropped?: number;
+ framesPerSecond?: number;
+ framesReceived?: number;
+ framesSent?: number;
+ frameWidth?: number;
+ remoteSource?: boolean;
+ ssrcIds?: string[];
+ trackIdentifier?: string;
}
interface RTCOfferOptions {
- offerToReceiveVideo?: number;
+ iceRestart?: boolean;
offerToReceiveAudio?: number;
+ offerToReceiveVideo?: number;
voiceActivityDetection?: boolean;
- iceRestart?: boolean;
}
interface RTCOutboundRTPStreamStats extends RTCRTPStreamStats {
- packetsSent?: number;
bytesSent?: number;
- targetBitrate?: number;
+ packetsSent?: number;
roundTripTime?: number;
+ targetBitrate?: 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;
+ type?: string;
}
interface RTCRtcpParameters {
- ssrc?: number;
cname?: string;
- reducedSize?: boolean;
mux?: boolean;
+ reducedSize?: boolean;
+ ssrc?: number;
}
interface RTCRtpCapabilities {
codecs?: RTCRtpCodecCapability[];
- headerExtensions?: RTCRtpHeaderExtension[];
fecMechanisms?: string[];
+ headerExtensions?: RTCRtpHeaderExtension[];
}
interface RTCRtpCodecCapability {
- name?: string;
- kind?: string;
clockRate?: number;
- preferredPayloadType?: number;
+ kind?: string;
maxptime?: number;
- ptime?: number;
+ maxSpatialLayers?: number;
+ maxTemporalLayers?: number;
+ name?: string;
numChannels?: number;
- rtcpFeedback?: RTCRtcpFeedback[];
- parameters?: any;
options?: any;
- maxTemporalLayers?: number;
- maxSpatialLayers?: number;
+ parameters?: any;
+ preferredPayloadType?: number;
+ ptime?: number;
+ rtcpFeedback?: RTCRtcpFeedback[];
svcMultiStreamSupport?: boolean;
}
interface RTCRtpCodecParameters {
- name?: string;
- payloadType?: any;
clockRate?: number;
maxptime?: number;
- ptime?: number;
+ name?: string;
numChannels?: number;
- rtcpFeedback?: RTCRtcpFeedback[];
parameters?: any;
+ payloadType?: any;
+ ptime?: number;
+ rtcpFeedback?: RTCRtcpFeedback[];
}
interface RTCRtpContributingSource {
- timestamp?: number;
- csrc?: number;
audioLevel?: number;
+ csrc?: number;
+ timestamp?: number;
}
interface RTCRtpEncodingParameters {
- ssrc?: number;
+ active?: boolean;
codecPayloadType?: number;
+ dependencyEncodingIds?: string[];
+ encodingId?: string;
fec?: RTCRtpFecParameters;
- rtx?: RTCRtpRtxParameters;
- priority?: number;
+ framerateScale?: number;
maxBitrate?: number;
+ maxFramerate?: number;
minQuality?: number;
+ priority?: number;
resolutionScale?: number;
- framerateScale?: number;
- maxFramerate?: number;
- active?: boolean;
- encodingId?: string;
- dependencyEncodingIds?: string[];
+ rtx?: RTCRtpRtxParameters;
+ ssrc?: number;
ssrcRange?: RTCSsrcRange;
}
interface RTCRtpFecParameters {
- ssrc?: number;
mechanism?: string;
+ ssrc?: number;
}
interface RTCRtpHeaderExtension {
kind?: string;
- uri?: string;
- preferredId?: number;
preferredEncrypt?: boolean;
+ preferredId?: number;
+ uri?: string;
}
interface RTCRtpHeaderExtensionParameters {
- uri?: string;
- id?: number;
encrypt?: boolean;
+ id?: number;
+ uri?: string;
}
interface RTCRtpParameters {
- muxId?: string;
codecs?: RTCRtpCodecParameters[];
- headerExtensions?: RTCRtpHeaderExtensionParameters[];
+ degradationPreference?: RTCDegradationPreference;
encodings?: RTCRtpEncodingParameters[];
+ headerExtensions?: RTCRtpHeaderExtensionParameters[];
+ muxId?: string;
rtcp?: RTCRtcpParameters;
- degradationPreference?: RTCDegradationPreference;
}
interface RTCRtpRtxParameters {
ssrc?: number;
}
+interface RTCRTPStreamStats extends RTCStats {
+ associateStatsId?: string;
+ codecId?: string;
+ firCount?: number;
+ isRemote?: boolean;
+ mediaTrackId?: string;
+ nackCount?: number;
+ pliCount?: number;
+ sliCount?: number;
+ ssrc?: string;
+ transportId?: string;
+}
+
interface RTCRtpUnhandled {
- ssrc?: number;
- payloadType?: number;
muxId?: string;
+ payloadType?: number;
+ ssrc?: number;
}
interface RTCSessionDescriptionInit {
- type?: RTCSdpType;
sdp?: string;
+ type?: RTCSdpType;
}
interface RTCSrtpKeyParam {
keyMethod?: string;
keySalt?: string;
lifetime?: string;
- mkiValue?: number;
mkiLength?: number;
+ mkiValue?: number;
}
interface RTCSrtpSdesParameters {
- tag?: number;
cryptoSuite?: string;
keyParams?: RTCSrtpKeyParam[];
sessionParams?: string[];
+ tag?: number;
}
interface RTCSsrcRange {
- min?: number;
max?: number;
+ min?: number;
}
interface RTCStats {
- timestamp?: number;
- type?: RTCStatsType;
id?: string;
msType?: MSStatsType;
+ timestamp?: number;
+ type?: RTCStatsType;
}
interface RTCStatsReport {
}
interface RTCTransportStats extends RTCStats {
- bytesSent?: number;
- bytesReceived?: number;
- rtcpTransportStatsId?: string;
activeConnection?: boolean;
- selectedCandidatePairId?: string;
+ bytesReceived?: number;
+ bytesSent?: number;
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;
+ rtcpTransportStatsId?: string;
+ selectedCandidatePairId?: string;
}
interface ScopedCredentialDescriptor {
- type?: ScopedCredentialType;
id?: any;
transports?: Transport[];
+ type?: ScopedCredentialType;
}
interface ScopedCredentialOptions {
- timeoutSeconds?: number;
- rpId?: USVString;
excludeList?: ScopedCredentialDescriptor[];
extensions?: WebAuthnExtensions;
+ rpId?: USVString;
+ timeoutSeconds?: number;
}
interface ScopedCredentialParameters {
- type?: ScopedCredentialType;
algorithm?: string | Algorithm;
+ type?: ScopedCredentialType;
}
interface ServiceWorkerMessageEventInit extends EventInit {
data?: any;
- origin?: string;
lastEventId?: string;
- source?: ServiceWorker | MessagePort;
+ origin?: string;
ports?: MessagePort[];
+ source?: ServiceWorker | MessagePort;
}
interface SpeechSynthesisEventInit extends EventInit {
- utterance?: SpeechSynthesisUtterance;
charIndex?: number;
elapsedTime?: number;
name?: string;
+ utterance?: SpeechSynthesisUtterance;
}
interface StoreExceptionsInformation extends ExceptionInformation {
- siteName?: string;
- explanationString?: string;
detailURI?: string;
+ explanationString?: string;
+ siteName?: string;
}
interface StoreSiteSpecificExceptionsInformation extends StoreExceptionsInformation {
@@ -7175,13 +7042,13 @@ interface TrackEventInit extends EventInit {
}
interface TransitionEventInit extends EventInit {
- propertyName?: string;
elapsedTime?: number;
+ propertyName?: string;
}
interface UIEventInit extends EventInit {
- view?: Window;
detail?: number;
+ view?: Window;
}
interface WebAuthnExtensions {
@@ -7190,11 +7057,11 @@ interface WebAuthnExtensions {
interface WebGLContextAttributes {
failIfMajorPerformanceCaveat?: boolean;
alpha?: boolean;
- depth?: boolean;
- stencil?: boolean;
antialias?: boolean;
+ depth?: boolean;
premultipliedAlpha?: boolean;
preserveDrawingBuffer?: boolean;
+ stencil?: boolean;
}
interface WebGLContextEventInit extends EventInit {
@@ -7202,10 +7069,10 @@ interface WebGLContextEventInit extends EventInit {
}
interface WheelEventInit extends MouseEventInit {
+ deltaMode?: number;
deltaX?: number;
deltaY?: number;
deltaZ?: number;
- deltaMode?: number;
}
interface EventListener {
@@ -7224,19 +7091,6 @@ 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;
@@ -7252,8 +7106,21 @@ interface AnalyserNode extends AudioNode {
declare var AnalyserNode: {
prototype: AnalyserNode;
new(): AnalyserNode;
+};
+
+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 AnimationEvent extends Event {
readonly animationName: string;
readonly elapsedTime: number;
@@ -7263,7 +7130,7 @@ interface AnimationEvent extends Event {
declare var AnimationEvent: {
prototype: AnimationEvent;
new(typeArg: string, eventInitDict?: AnimationEventInit): AnimationEvent;
-}
+};
interface ApplicationCacheEventMap {
"cached": Event;
@@ -7308,7 +7175,7 @@ declare var ApplicationCache: {
readonly OBSOLETE: number;
readonly UNCACHED: number;
readonly UPDATEREADY: number;
-}
+};
interface Attr extends Node {
readonly name: string;
@@ -7321,7 +7188,7 @@ interface Attr extends Node {
declare var Attr: {
prototype: Attr;
new(): Attr;
-}
+};
interface AudioBuffer {
readonly duration: number;
@@ -7336,7 +7203,7 @@ interface AudioBuffer {
declare var AudioBuffer: {
prototype: AudioBuffer;
new(): AudioBuffer;
-}
+};
interface AudioBufferSourceNodeEventMap {
"ended": MediaStreamErrorEvent;
@@ -7359,7 +7226,7 @@ interface AudioBufferSourceNode extends AudioNode {
declare var AudioBufferSourceNode: {
prototype: AudioBufferSourceNode;
new(): AudioBufferSourceNode;
-}
+};
interface AudioContextEventMap {
"statechange": Event;
@@ -7405,7 +7272,7 @@ interface AudioContext extends AudioContextBase {
declare var AudioContext: {
prototype: AudioContext;
new(): AudioContext;
-}
+};
interface AudioDestinationNode extends AudioNode {
readonly maxChannelCount: number;
@@ -7414,7 +7281,7 @@ interface AudioDestinationNode extends AudioNode {
declare var AudioDestinationNode: {
prototype: AudioDestinationNode;
new(): AudioDestinationNode;
-}
+};
interface AudioListener {
dopplerFactor: number;
@@ -7427,7 +7294,7 @@ interface AudioListener {
declare var AudioListener: {
prototype: AudioListener;
new(): AudioListener;
-}
+};
interface AudioNode extends EventTarget {
channelCount: number;
@@ -7446,7 +7313,7 @@ interface AudioNode extends EventTarget {
declare var AudioNode: {
prototype: AudioNode;
new(): AudioNode;
-}
+};
interface AudioParam {
readonly defaultValue: number;
@@ -7462,7 +7329,7 @@ interface AudioParam {
declare var AudioParam: {
prototype: AudioParam;
new(): AudioParam;
-}
+};
interface AudioProcessingEvent extends Event {
readonly inputBuffer: AudioBuffer;
@@ -7473,7 +7340,7 @@ interface AudioProcessingEvent extends Event {
declare var AudioProcessingEvent: {
prototype: AudioProcessingEvent;
new(): AudioProcessingEvent;
-}
+};
interface AudioTrack {
enabled: boolean;
@@ -7487,7 +7354,7 @@ interface AudioTrack {
declare var AudioTrack: {
prototype: AudioTrack;
new(): AudioTrack;
-}
+};
interface AudioTrackListEventMap {
"addtrack": TrackEvent;
@@ -7510,7 +7377,7 @@ interface AudioTrackList extends EventTarget {
declare var AudioTrackList: {
prototype: AudioTrackList;
new(): AudioTrackList;
-}
+};
interface BarProp {
readonly visible: boolean;
@@ -7519,7 +7386,7 @@ interface BarProp {
declare var BarProp: {
prototype: BarProp;
new(): BarProp;
-}
+};
interface BeforeUnloadEvent extends Event {
returnValue: any;
@@ -7528,13 +7395,13 @@ interface BeforeUnloadEvent extends Event {
declare var BeforeUnloadEvent: {
prototype: BeforeUnloadEvent;
new(): BeforeUnloadEvent;
-}
+};
interface BiquadFilterNode extends AudioNode {
- readonly Q: AudioParam;
readonly detune: AudioParam;
readonly frequency: AudioParam;
readonly gain: AudioParam;
+ readonly Q: AudioParam;
type: BiquadFilterType;
getFrequencyResponse(frequencyHz: Float32Array, magResponse: Float32Array, phaseResponse: Float32Array): void;
}
@@ -7542,7 +7409,7 @@ interface BiquadFilterNode extends AudioNode {
declare var BiquadFilterNode: {
prototype: BiquadFilterNode;
new(): BiquadFilterNode;
-}
+};
interface Blob {
readonly size: number;
@@ -7555,16 +7422,305 @@ interface 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 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 CDATASection extends Text {
}
declare var CDATASection: {
prototype: CDATASection;
new(): CDATASection;
+};
+
+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, ...optionalParams: any[]): void;
+ groupCollapsed(groupTitle?: string, ...optionalParams: any[]): 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 CSS {
supports(property: string, value?: string): boolean;
}
@@ -7577,7 +7733,7 @@ interface CSSConditionRule extends CSSGroupingRule {
declare var CSSConditionRule: {
prototype: CSSConditionRule;
new(): CSSConditionRule;
-}
+};
interface CSSFontFaceRule extends CSSRule {
readonly style: CSSStyleDeclaration;
@@ -7586,7 +7742,7 @@ interface CSSFontFaceRule extends CSSRule {
declare var CSSFontFaceRule: {
prototype: CSSFontFaceRule;
new(): CSSFontFaceRule;
-}
+};
interface CSSGroupingRule extends CSSRule {
readonly cssRules: CSSRuleList;
@@ -7597,7 +7753,7 @@ interface CSSGroupingRule extends CSSRule {
declare var CSSGroupingRule: {
prototype: CSSGroupingRule;
new(): CSSGroupingRule;
-}
+};
interface CSSImportRule extends CSSRule {
readonly href: string;
@@ -7608,7 +7764,7 @@ interface CSSImportRule extends CSSRule {
declare var CSSImportRule: {
prototype: CSSImportRule;
new(): CSSImportRule;
-}
+};
interface CSSKeyframeRule extends CSSRule {
keyText: string;
@@ -7618,7 +7774,7 @@ interface CSSKeyframeRule extends CSSRule {
declare var CSSKeyframeRule: {
prototype: CSSKeyframeRule;
new(): CSSKeyframeRule;
-}
+};
interface CSSKeyframesRule extends CSSRule {
readonly cssRules: CSSRuleList;
@@ -7631,7 +7787,7 @@ interface CSSKeyframesRule extends CSSRule {
declare var CSSKeyframesRule: {
prototype: CSSKeyframesRule;
new(): CSSKeyframesRule;
-}
+};
interface CSSMediaRule extends CSSConditionRule {
readonly media: MediaList;
@@ -7640,7 +7796,7 @@ interface CSSMediaRule extends CSSConditionRule {
declare var CSSMediaRule: {
prototype: CSSMediaRule;
new(): CSSMediaRule;
-}
+};
interface CSSNamespaceRule extends CSSRule {
readonly namespaceURI: string;
@@ -7650,7 +7806,7 @@ interface CSSNamespaceRule extends CSSRule {
declare var CSSNamespaceRule: {
prototype: CSSNamespaceRule;
new(): CSSNamespaceRule;
-}
+};
interface CSSPageRule extends CSSRule {
readonly pseudoClass: string;
@@ -7662,7 +7818,7 @@ interface CSSPageRule extends CSSRule {
declare var CSSPageRule: {
prototype: CSSPageRule;
new(): CSSPageRule;
-}
+};
interface CSSRule {
cssText: string;
@@ -7672,8 +7828,8 @@ interface CSSRule {
readonly CHARSET_RULE: number;
readonly FONT_FACE_RULE: number;
readonly IMPORT_RULE: number;
- readonly KEYFRAMES_RULE: number;
readonly KEYFRAME_RULE: number;
+ readonly KEYFRAMES_RULE: number;
readonly MEDIA_RULE: number;
readonly NAMESPACE_RULE: number;
readonly PAGE_RULE: number;
@@ -7689,8 +7845,8 @@ declare var CSSRule: {
readonly CHARSET_RULE: number;
readonly FONT_FACE_RULE: number;
readonly IMPORT_RULE: number;
- readonly KEYFRAMES_RULE: number;
readonly KEYFRAME_RULE: number;
+ readonly KEYFRAMES_RULE: number;
readonly MEDIA_RULE: number;
readonly NAMESPACE_RULE: number;
readonly PAGE_RULE: number;
@@ -7698,7 +7854,7 @@ declare var CSSRule: {
readonly SUPPORTS_RULE: number;
readonly UNKNOWN_RULE: number;
readonly VIEWPORT_RULE: number;
-}
+};
interface CSSRuleList {
readonly length: number;
@@ -7709,13 +7865,13 @@ interface CSSRuleList {
declare var CSSRuleList: {
prototype: CSSRuleList;
new(): CSSRuleList;
-}
+};
interface CSSStyleDeclaration {
alignContent: string | null;
alignItems: string | null;
- alignSelf: string | null;
alignmentBaseline: string | null;
+ alignSelf: string | null;
animation: string | null;
animationDelay: string | null;
animationDirection: string | null;
@@ -7791,9 +7947,9 @@ interface CSSStyleDeclaration {
columnRuleColor: any;
columnRuleStyle: string | null;
columnRuleWidth: any;
+ columns: string | null;
columnSpan: string | null;
columnWidth: any;
- columns: string | null;
content: string | null;
counterIncrement: string | null;
counterReset: string | null;
@@ -7863,24 +8019,24 @@ interface CSSStyleDeclaration {
minHeight: string | null;
minWidth: string | null;
msContentZoomChaining: string | null;
+ msContentZooming: 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;
+ msGridColumnSpan: any;
msGridRow: any;
msGridRowAlign: string | null;
- msGridRowSpan: any;
msGridRows: string | null;
+ msGridRowSpan: any;
msHighContrastAdjust: string | null;
msHyphenateLimitChars: string | null;
msHyphenateLimitLines: any;
@@ -8016,9 +8172,9 @@ interface CSSStyleDeclaration {
webkitColumnRuleColor: any;
webkitColumnRuleStyle: string | null;
webkitColumnRuleWidth: any;
+ webkitColumns: string | null;
webkitColumnSpan: string | null;
webkitColumnWidth: any;
- webkitColumns: string | null;
webkitFilter: string | null;
webkitFlex: string | null;
webkitFlexBasis: string | null;
@@ -8070,7 +8226,7 @@ interface CSSStyleDeclaration {
declare var CSSStyleDeclaration: {
prototype: CSSStyleDeclaration;
new(): CSSStyleDeclaration;
-}
+};
interface CSSStyleRule extends CSSRule {
readonly readOnly: boolean;
@@ -8081,7 +8237,7 @@ interface CSSStyleRule extends CSSRule {
declare var CSSStyleRule: {
prototype: CSSStyleRule;
new(): CSSStyleRule;
-}
+};
interface CSSStyleSheet extends StyleSheet {
readonly cssRules: CSSRuleList;
@@ -8107,7 +8263,7 @@ interface CSSStyleSheet extends StyleSheet {
declare var CSSStyleSheet: {
prototype: CSSStyleSheet;
new(): CSSStyleSheet;
-}
+};
interface CSSSupportsRule extends CSSConditionRule {
}
@@ -8115,296 +8271,7 @@ 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;
@@ -8414,150 +8281,7 @@ interface CustomEvent extends Event {
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;
@@ -8568,7 +8292,7 @@ interface DataCue extends TextTrackCue {
declare var DataCue: {
prototype: DataCue;
new(): DataCue;
-}
+};
interface DataTransfer {
dropEffect: string;
@@ -8585,7 +8309,7 @@ interface DataTransfer {
declare var DataTransfer: {
prototype: DataTransfer;
new(): DataTransfer;
-}
+};
interface DataTransferItem {
readonly kind: string;
@@ -8598,7 +8322,7 @@ interface DataTransferItem {
declare var DataTransferItem: {
prototype: DataTransferItem;
new(): DataTransferItem;
-}
+};
interface DataTransferItemList {
readonly length: number;
@@ -8612,7 +8336,7 @@ interface DataTransferItemList {
declare var DataTransferItemList: {
prototype: DataTransferItemList;
new(): DataTransferItemList;
-}
+};
interface DeferredPermissionRequest {
readonly id: number;
@@ -8625,7 +8349,7 @@ interface DeferredPermissionRequest {
declare var DeferredPermissionRequest: {
prototype: DeferredPermissionRequest;
new(): DeferredPermissionRequest;
-}
+};
interface DelayNode extends AudioNode {
readonly delayTime: AudioParam;
@@ -8634,7 +8358,7 @@ interface DelayNode extends AudioNode {
declare var DelayNode: {
prototype: DelayNode;
new(): DelayNode;
-}
+};
interface DeviceAcceleration {
readonly x: number | null;
@@ -8645,7 +8369,7 @@ interface DeviceAcceleration {
declare var DeviceAcceleration: {
prototype: DeviceAcceleration;
new(): DeviceAcceleration;
-}
+};
interface DeviceLightEvent extends Event {
readonly value: number;
@@ -8654,7 +8378,7 @@ interface DeviceLightEvent extends Event {
declare var DeviceLightEvent: {
prototype: DeviceLightEvent;
new(typeArg: string, eventInitDict?: DeviceLightEventInit): DeviceLightEvent;
-}
+};
interface DeviceMotionEvent extends Event {
readonly acceleration: DeviceAcceleration | null;
@@ -8667,7 +8391,7 @@ interface DeviceMotionEvent extends Event {
declare var DeviceMotionEvent: {
prototype: DeviceMotionEvent;
new(typeArg: string, eventInitDict?: DeviceMotionEventInit): DeviceMotionEvent;
-}
+};
interface DeviceOrientationEvent extends Event {
readonly absolute: boolean;
@@ -8680,7 +8404,7 @@ interface DeviceOrientationEvent extends Event {
declare var DeviceOrientationEvent: {
prototype: DeviceOrientationEvent;
new(typeArg: string, eventInitDict?: DeviceOrientationEventInit): DeviceOrientationEvent;
-}
+};
interface DeviceRotationRate {
readonly alpha: number | null;
@@ -8691,7 +8415,7 @@ interface DeviceRotationRate {
declare var DeviceRotationRate: {
prototype: DeviceRotationRate;
new(): DeviceRotationRate;
-}
+};
interface DocumentEventMap extends GlobalEventHandlersEventMap {
"abort": UIEvent;
@@ -8786,299 +8510,291 @@ interface DocumentEventMap extends GlobalEventHandlersEventMap {
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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Gets a reference to the root node of the document.
+ */
documentElement: HTMLElement;
/**
- * Sets or gets the security domain of the document.
- */
+ * Sets or gets the security domain of the document.
+ */
domain: string;
/**
- * Retrieves a collection of all embed objects in the document.
- */
+ * Retrieves a collection of all embed objects in the document.
+ */
embeds: HTMLCollectionOf<HTMLEmbedElement>;
/**
- * Sets or gets the foreground (text) color of the document.
- */
+ * 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.
- */
+ * 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.
- */
+ * Retrieves a collection, in source order, of img objects in the document.
+ */
images: HTMLCollectionOf<HTMLImageElement>;
/**
- * Gets the implementation object of the current document.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Contains information about the current URL.
+ */
readonly location: Location;
- msCSSOMElementFloatMetrics: boolean;
msCapsLockWarningOff: boolean;
+ msCSSOMElementFloatMetrics: boolean;
/**
- * Fires when the user aborts the download.
- * @param ev The event.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ /**
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ /**
+ * 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.
- */
+ /**
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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
- */
+ * 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.
- */
+ * 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.
- */
+ * 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
- */
+ * 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.
- */
+ * 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
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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
- */
+ * 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;
@@ -9098,146 +8814,154 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven
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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Gets the root svg element in the document hierarchy.
+ */
readonly rootElement: SVGSVGElement;
/**
- * Retrieves a collection of all script objects in the document.
- */
+ * 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.
- */
+ * 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.
- */
+ * Contains the title of the document.
+ */
title: string;
+ /**
+ * 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;
readonly visibilityState: VisibilityState;
- /**
- * Sets or gets the color of the links that the user has visited.
- */
+ /**
+ * Sets or gets the color of the links that the user has visited.
+ */
vlinkColor: string;
readonly webkitCurrentFullScreenElement: Element | null;
readonly webkitFullscreenElement: Element | null;
@@ -9246,243 +8970,243 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven
readonly xmlEncoding: string | null;
xmlStandalone: boolean;
/**
- * Gets or sets the version attribute specified in the declaration of an XML document.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Creates a comment object with the specified data.
+ * @param data Sets the comment object's data.
+ */
createComment(data: string): Comment;
/**
- * Creates a new document.
- */
+ * Creates a new document.
+ */
createDocumentFragment(): DocumentFragment;
/**
- * Creates an instance of the element for the specified tag.
- * @param tagName The name of an element.
- */
+ * 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: "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.
- */
+ * 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;
+ createNSResolver(nodeResolver: Node): XPathNSResolver;
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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ /**
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -9491,7 +9215,7 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven
declare var Document: {
prototype: Document;
new(): Document;
-}
+};
interface DocumentFragment extends Node, NodeSelector, ParentNode {
getElementById(elementId: string): HTMLElement | null;
@@ -9500,7 +9224,7 @@ interface DocumentFragment extends Node, NodeSelector, ParentNode {
declare var DocumentFragment: {
prototype: DocumentFragment;
new(): DocumentFragment;
-}
+};
interface DocumentType extends Node, ChildNode {
readonly entities: NamedNodeMap;
@@ -9514,8 +9238,151 @@ interface DocumentType extends Node, ChildNode {
declare var DocumentType: {
prototype: DocumentType;
new(): DocumentType;
+};
+
+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 NO_DATA_ALLOWED_ERR: number;
+ readonly NO_MODIFICATION_ALLOWED_ERR: number;
+ readonly NOT_FOUND_ERR: number;
+ readonly NOT_SUPPORTED_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 NO_DATA_ALLOWED_ERR: number;
+ readonly NO_MODIFICATION_ALLOWED_ERR: number;
+ readonly NOT_FOUND_ERR: number;
+ readonly NOT_SUPPORTED_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;
+ toggle(token: string, force?: boolean): boolean;
+ toString(): string;
+ [index: number]: string;
+}
+
+declare var DOMTokenList: {
+ prototype: DOMTokenList;
+ new(): DOMTokenList;
+};
+
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;
@@ -9524,8 +9391,8 @@ interface DragEvent extends MouseEvent {
declare var DragEvent: {
prototype: DragEvent;
- new(): DragEvent;
-}
+ new(type: "drag" | "dragend" | "dragenter" | "dragexit" | "dragleave" | "dragover" | "dragstart" | "drop", dragEventInit?: { dataTransfer?: DataTransfer }): DragEvent;
+};
interface DynamicsCompressorNode extends AudioNode {
readonly attack: AudioParam;
@@ -9539,27 +9406,7 @@ interface DynamicsCompressorNode extends AudioNode {
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;
@@ -9640,9 +9487,9 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec
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;
+ getAttributeNS(namespaceURI: string, localName: string): string;
getBoundingClientRect(): ClientRect;
getClientRects(): ClientRectList;
getElementsByTagName<K extends keyof ElementListTagNameMap>(name: K): ElementListTagNameMap[K];
@@ -9660,18 +9507,18 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec
msZoomTo(args: MsZoomToOptions): void;
releasePointerCapture(pointerId: number): void;
removeAttribute(qualifiedName: string): void;
- removeAttributeNS(namespaceURI: string, localName: string): void;
removeAttributeNode(oldAttr: Attr): Attr;
+ removeAttributeNS(namespaceURI: string, localName: string): void;
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;
+ setAttributeNS(namespaceURI: string, qualifiedName: string, value: string): void;
setPointerCapture(pointerId: number): void;
webkitMatchesSelector(selectors: string): boolean;
- webkitRequestFullScreen(): void;
webkitRequestFullscreen(): void;
+ webkitRequestFullScreen(): void;
getElementsByClassName(classNames: string): NodeListOf<Element>;
matches(selector: string): boolean;
closest(selector: string): Element | null;
@@ -9682,9 +9529,9 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec
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;
+ insertAdjacentElement(position: InsertPosition, insertedElement: Element): Element | null;
+ insertAdjacentHTML(where: InsertPosition, html: string): void;
+ insertAdjacentText(where: InsertPosition, 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;
@@ -9693,7 +9540,7 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec
declare var Element: {
prototype: Element;
new(): Element;
-}
+};
interface ErrorEvent extends Event {
readonly colno: number;
@@ -9707,12 +9554,12 @@ interface ErrorEvent extends Event {
declare var ErrorEvent: {
prototype: ErrorEvent;
new(type: string, errorEventInitDict?: ErrorEventInit): ErrorEvent;
-}
+};
interface Event {
readonly bubbles: boolean;
- cancelBubble: boolean;
readonly cancelable: boolean;
+ cancelBubble: boolean;
readonly currentTarget: EventTarget;
readonly defaultPrevented: boolean;
readonly eventPhase: number;
@@ -9739,7 +9586,7 @@ declare var Event: {
readonly AT_TARGET: number;
readonly BUBBLING_PHASE: number;
readonly CAPTURING_PHASE: number;
-}
+};
interface EventTarget {
addEventListener(type: string, listener?: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
@@ -9750,8 +9597,28 @@ interface EventTarget {
declare var EventTarget: {
prototype: EventTarget;
new(): EventTarget;
+};
+
+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 ExtensionScriptApis {
extensionIdToShortId(extensionId: string): number;
fireExtensionApiTelemetry(functionName: string, isSucceeded: boolean, isSupported: boolean): void;
@@ -9765,7 +9632,7 @@ interface ExtensionScriptApis {
declare var ExtensionScriptApis: {
prototype: ExtensionScriptApis;
new(): ExtensionScriptApis;
-}
+};
interface External {
}
@@ -9773,7 +9640,7 @@ interface External {
declare var External: {
prototype: External;
new(): External;
-}
+};
interface File extends Blob {
readonly lastModifiedDate: any;
@@ -9784,7 +9651,7 @@ interface File extends Blob {
declare var File: {
prototype: File;
new (parts: (ArrayBuffer | ArrayBufferView | Blob | string)[], filename: string, properties?: FilePropertyBag): File;
-}
+};
interface FileList {
readonly length: number;
@@ -9795,7 +9662,7 @@ interface FileList {
declare var FileList: {
prototype: FileList;
new(): FileList;
-}
+};
interface FileReader extends EventTarget, MSBaseReader {
readonly error: DOMError;
@@ -9810,7 +9677,7 @@ interface FileReader extends EventTarget, MSBaseReader {
declare var FileReader: {
prototype: FileReader;
new(): FileReader;
-}
+};
interface FocusEvent extends UIEvent {
readonly relatedTarget: EventTarget;
@@ -9820,7 +9687,7 @@ interface FocusEvent extends UIEvent {
declare var FocusEvent: {
prototype: FocusEvent;
new(typeArg: string, eventInitDict?: FocusEventInit): FocusEvent;
-}
+};
interface FocusNavigationEvent extends Event {
readonly navigationReason: NavigationReason;
@@ -9834,7 +9701,7 @@ interface FocusNavigationEvent extends Event {
declare var FocusNavigationEvent: {
prototype: FocusNavigationEvent;
new(type: string, eventInitDict?: FocusNavigationEventInit): FocusNavigationEvent;
-}
+};
interface FormData {
append(name: string, value: string | Blob, fileName?: string): void;
@@ -9848,7 +9715,7 @@ interface FormData {
declare var FormData: {
prototype: FormData;
new (form?: HTMLFormElement): FormData;
-}
+};
interface GainNode extends AudioNode {
readonly gain: AudioParam;
@@ -9857,7 +9724,7 @@ interface GainNode extends AudioNode {
declare var GainNode: {
prototype: GainNode;
new(): GainNode;
-}
+};
interface Gamepad {
readonly axes: number[];
@@ -9872,7 +9739,7 @@ interface Gamepad {
declare var Gamepad: {
prototype: Gamepad;
new(): Gamepad;
-}
+};
interface GamepadButton {
readonly pressed: boolean;
@@ -9882,7 +9749,7 @@ interface GamepadButton {
declare var GamepadButton: {
prototype: GamepadButton;
new(): GamepadButton;
-}
+};
interface GamepadEvent extends Event {
readonly gamepad: Gamepad;
@@ -9891,7 +9758,7 @@ interface GamepadEvent extends Event {
declare var GamepadEvent: {
prototype: GamepadEvent;
new(typeArg: string, eventInitDict?: GamepadEventInit): GamepadEvent;
-}
+};
interface Geolocation {
clearWatch(watchId: number): void;
@@ -9902,8 +9769,48 @@ interface Geolocation {
declare var Geolocation: {
prototype: Geolocation;
new(): Geolocation;
+};
+
+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 HTMLAllCollection {
readonly length: number;
item(nameOrIndex?: string): HTMLCollection | Element | null;
@@ -9914,87 +9821,87 @@ interface HTMLAllCollection {
declare var HTMLAllCollection: {
prototype: HTMLAllCollection;
new(): HTMLAllCollection;
-}
+};
interface HTMLAnchorElement extends HTMLElement {
- Methods: string;
/**
- * Sets or retrieves the character set used to encode the object.
- */
+ * Sets or retrieves the character set used to encode the object.
+ */
charset: string;
/**
- * Sets or retrieves the coordinates of the object.
- */
+ * Sets or retrieves the coordinates of the object.
+ */
coords: string;
download: string;
/**
- * Contains the anchor portion of the URL including the hash sign (#).
- */
+ * Contains the anchor portion of the URL including the hash sign (#).
+ */
hash: string;
/**
- * Contains the hostname and port values of the URL.
- */
+ * Contains the hostname and port values of the URL.
+ */
host: string;
/**
- * Contains the hostname of a URL.
- */
+ * Contains the hostname of a URL.
+ */
hostname: string;
/**
- * Sets or retrieves a destination URL or an anchor point.
- */
+ * Sets or retrieves a destination URL or an anchor point.
+ */
href: string;
/**
- * Sets or retrieves the language code of the object.
- */
+ * Sets or retrieves the language code of the object.
+ */
hreflang: string;
+ Methods: string;
readonly mimeType: string;
/**
- * Sets or retrieves the shape of the object.
- */
+ * Sets or retrieves the shape of the object.
+ */
name: string;
readonly nameProp: string;
/**
- * Contains the pathname of the URL.
- */
+ * Contains the pathname of the URL.
+ */
pathname: string;
/**
- * Sets or retrieves the port number associated with a URL.
- */
+ * Sets or retrieves the port number associated with a URL.
+ */
port: string;
/**
- * Contains the protocol of the URL.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the substring of the href property that follows the question mark.
+ */
search: string;
/**
- * Sets or retrieves the shape of the object.
- */
+ * Sets or retrieves the shape of the object.
+ */
shape: string;
/**
- * Sets or retrieves the window or frame at which to target content.
- */
+ * 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.
- */
+ * Retrieves or sets the text of the object as a string.
+ */
text: string;
type: string;
urn: string;
- /**
- * Returns a string representation of an object.
- */
+ /**
+ * 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;
@@ -10003,70 +9910,70 @@ interface HTMLAnchorElement extends HTMLElement {
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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves a character string that can be used to implement your own archive functionality for the object.
+ */
archive: string;
+ /**
+ * 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;
border: string;
code: string;
/**
- * Sets or retrieves the URL of the component.
- */
+ * Sets or retrieves the URL of the component.
+ */
codeBase: string;
/**
- * Sets or retrieves the Internet media type for the code associated with the object.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the height of the object.
+ */
height: string;
hspace: number;
/**
- * Sets or retrieves the shape of the object.
- */
+ * 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.
- */
+ * Sets or retrieves a message to be displayed while an object is loading.
+ */
standby: string;
/**
- * Returns the content type of the object.
- */
+ * 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.
- */
+ * 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;
@@ -10077,66 +9984,66 @@ interface HTMLAppletElement extends HTMLElement {
declare var HTMLAppletElement: {
prototype: HTMLAppletElement;
new(): HTMLAppletElement;
-}
+};
interface HTMLAreaElement extends HTMLElement {
/**
- * Sets or retrieves a text alternative to the graphic.
- */
+ * Sets or retrieves a text alternative to the graphic.
+ */
alt: string;
/**
- * Sets or retrieves the coordinates of the object.
- */
+ * 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 (#).
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the host name part of the location or URL.
+ */
hostname: string;
/**
- * Sets or retrieves a destination URL or an anchor point.
- */
+ * Sets or retrieves a destination URL or an anchor point.
+ */
href: string;
/**
- * Sets or gets whether clicks in this region cause action.
- */
+ * Sets or gets whether clicks in this region cause action.
+ */
noHref: boolean;
/**
- * Sets or retrieves the file name or path specified by the object.
- */
+ * Sets or retrieves the file name or path specified by the object.
+ */
pathname: string;
/**
- * Sets or retrieves the port number associated with a URL.
- */
+ * Sets or retrieves the port number associated with a URL.
+ */
port: string;
/**
- * Sets or retrieves the protocol portion of a URL.
- */
+ * 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.
- */
+ * Sets or retrieves the substring of the href property that follows the question mark.
+ */
search: string;
/**
- * Sets or retrieves the shape of the object.
- */
+ * Sets or retrieves the shape of the object.
+ */
shape: string;
/**
- * Sets or retrieves the window or frame at which to target content.
- */
+ * Sets or retrieves the window or frame at which to target content.
+ */
target: string;
- /**
- * Returns a string representation of an object.
- */
+ /**
+ * 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;
@@ -10145,7 +10052,7 @@ interface HTMLAreaElement extends HTMLElement {
declare var HTMLAreaElement: {
prototype: HTMLAreaElement;
new(): HTMLAreaElement;
-}
+};
interface HTMLAreasCollection extends HTMLCollectionBase {
}
@@ -10153,7 +10060,7 @@ 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;
@@ -10163,30 +10070,16 @@ interface HTMLAudioElement extends HTMLMediaElement {
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.
- */
+ * 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.
- */
+ * 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;
@@ -10195,16 +10088,16 @@ interface HTMLBaseElement extends HTMLElement {
declare var HTMLBaseElement: {
prototype: HTMLBaseElement;
new(): HTMLBaseElement;
-}
+};
interface HTMLBaseFontElement extends HTMLElement, DOML2DeprecatedColorProperty {
/**
- * Sets or retrieves the current typeface family.
- */
+ * Sets or retrieves the current typeface family.
+ */
face: string;
/**
- * Sets or retrieves the font size of the object.
- */
+ * 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;
@@ -10213,7 +10106,7 @@ interface HTMLBaseFontElement extends HTMLElement, DOML2DeprecatedColorProperty
declare var HTMLBaseFontElement: {
prototype: HTMLBaseFontElement;
new(): HTMLBaseFontElement;
-}
+};
interface HTMLBodyElementEventMap extends HTMLElementEventMap {
"afterprint": Event;
@@ -10272,71 +10165,85 @@ interface HTMLBodyElement extends HTMLElement {
declare var HTMLBodyElement: {
prototype: HTMLBodyElement;
new(): HTMLBodyElement;
+};
+
+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 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Overrides the target attribute on a form element.
+ */
formTarget: string;
- /**
- * Sets or retrieves the name of the object.
- */
+ /**
+ * Sets or retrieves the name of the object.
+ */
name: string;
status: any;
/**
- * Gets the classification and default behavior of the button.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ /**
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -10345,32 +10252,32 @@ interface HTMLButtonElement extends HTMLElement {
declare var HTMLButtonElement: {
prototype: HTMLButtonElement;
new(): HTMLButtonElement;
-}
+};
interface HTMLCanvasElement extends HTMLElement {
/**
- * Gets or sets the height of a canvas element on a document.
- */
+ * 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.
- */
+ * 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");
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -10380,42 +10287,31 @@ interface HTMLCanvasElement extends HTMLElement {
declare var HTMLCanvasElement: {
prototype: HTMLCanvasElement;
new(): HTMLCanvasElement;
-}
+};
interface HTMLCollectionBase {
/**
- * Sets or retrieves the number of objects in a collection.
- */
+ * Sets or retrieves the number of objects in a collection.
+ */
readonly length: number;
/**
- * Retrieves an object from various collections.
- */
+ * 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.
- */
+ * 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;
@@ -10426,7 +10322,7 @@ interface HTMLDataElement extends HTMLElement {
declare var HTMLDataElement: {
prototype: HTMLDataElement;
new(): HTMLDataElement;
-}
+};
interface HTMLDataListElement extends HTMLElement {
options: HTMLCollectionOf<HTMLOptionElement>;
@@ -10437,7 +10333,7 @@ interface HTMLDataListElement extends HTMLElement {
declare var HTMLDataListElement: {
prototype: HTMLDataListElement;
new(): HTMLDataListElement;
-}
+};
interface HTMLDirectoryElement extends HTMLElement {
compact: boolean;
@@ -10448,16 +10344,16 @@ interface HTMLDirectoryElement extends HTMLElement {
declare var HTMLDirectoryElement: {
prototype: HTMLDirectoryElement;
new(): HTMLDirectoryElement;
-}
+};
interface HTMLDivElement extends HTMLElement {
/**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
+ * Sets or retrieves how the object is aligned with adjacent text.
+ */
align: string;
/**
- * Sets or retrieves whether the browser automatically performs wordwrap.
- */
+ * 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;
@@ -10466,8 +10362,19 @@ interface HTMLDivElement extends HTMLElement {
declare var HTMLDivElement: {
prototype: HTMLDivElement;
new(): HTMLDivElement;
+};
+
+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 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;
@@ -10476,7 +10383,7 @@ interface HTMLDocument extends Document {
declare var HTMLDocument: {
prototype: HTMLDocument;
new(): HTMLDocument;
-}
+};
interface HTMLElementEventMap extends ElementEventMap {
"abort": UIEvent;
@@ -10649,54 +10556,54 @@ interface HTMLElement extends Element {
declare var HTMLElement: {
prototype: HTMLElement;
new(): HTMLElement;
-}
+};
interface HTMLEmbedElement extends HTMLElement, GetSVGDocument {
/**
- * Sets or retrieves the height of the object.
- */
+ * Sets or retrieves the height of the object.
+ */
height: string;
hidden: any;
/**
- * Gets or sets whether the DLNA PlayTo device is available.
- */
+ * 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.
- */
+ * 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.
- */
+ * Gets or sets the primary DLNA PlayTo device.
+ */
msPlayToPrimary: boolean;
/**
- * Gets the source associated with the media element for use by the PlayToManager.
- */
+ * Gets the source associated with the media element for use by the PlayToManager.
+ */
readonly msPlayToSource: any;
/**
- * Sets or retrieves the name of the object.
- */
+ * Sets or retrieves the name of the object.
+ */
name: string;
/**
- * Retrieves the palette used for the embedded document.
- */
+ * Retrieves the palette used for the embedded document.
+ */
readonly palette: string;
/**
- * Retrieves the URL of the plug-in used to view an embedded document.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the height and width units of the embed object.
+ */
units: string;
/**
- * Sets or retrieves the width of the object.
- */
+ * 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;
@@ -10705,39 +10612,39 @@ interface HTMLEmbedElement extends HTMLElement, GetSVGDocument {
declare var HTMLEmbedElement: {
prototype: HTMLEmbedElement;
new(): HTMLEmbedElement;
-}
+};
interface HTMLFieldSetElement extends HTMLElement {
/**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -10746,12 +10653,12 @@ interface HTMLFieldSetElement extends HTMLElement {
declare var HTMLFieldSetElement: {
prototype: HTMLFieldSetElement;
new(): HTMLFieldSetElement;
-}
+};
interface HTMLFontElement extends HTMLElement, DOML2DeprecatedColorProperty, DOML2DeprecatedSizeProperty {
/**
- * Sets or retrieves the current typeface family.
- */
+ * 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;
@@ -10760,7 +10667,7 @@ interface HTMLFontElement extends HTMLElement, DOML2DeprecatedColorProperty, DOM
declare var HTMLFontElement: {
prototype: HTMLFontElement;
new(): HTMLFontElement;
-}
+};
interface HTMLFormControlsCollection extends HTMLCollectionBase {
namedItem(name: string): HTMLCollection | Element | null;
@@ -10769,74 +10676,74 @@ interface HTMLFormControlsCollection extends HTMLCollectionBase {
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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the MIME encoding for the form.
+ */
encoding: string;
/**
- * Sets or retrieves the encoding type for the form.
- */
+ * Sets or retrieves the encoding type for the form.
+ */
enctype: string;
/**
- * Sets or retrieves the number of objects in a collection.
- */
+ * 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.
- */
+ * Sets or retrieves how to send the form data to the server.
+ */
method: string;
/**
- * Sets or retrieves the name of the object.
- */
+ * Sets or retrieves the name of the object.
+ */
name: string;
/**
- * Designates a form that is not validated when submitted.
- */
+ * Designates a form that is not validated when submitted.
+ */
noValidate: boolean;
/**
- * Sets or retrieves the window or frame at which to target content.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Retrieves a form object or an object from an elements collection.
+ */
namedItem(name: string): any;
/**
- * Fires when the user resets a form.
- */
+ * Fires when the user resets a form.
+ */
reset(): void;
/**
- * Fires when a FORM is about to be submitted.
- */
+ * 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;
@@ -10846,7 +10753,7 @@ interface HTMLFormElement extends HTMLElement {
declare var HTMLFormElement: {
prototype: HTMLFormElement;
new(): HTMLFormElement;
-}
+};
interface HTMLFrameElementEventMap extends HTMLElementEventMap {
"load": Event;
@@ -10854,68 +10761,68 @@ interface HTMLFrameElementEventMap extends HTMLElementEventMap {
interface HTMLFrameElement extends HTMLElement, GetSVGDocument {
/**
- * Specifies the properties of a border drawn around an object.
- */
+ * Specifies the properties of a border drawn around an object.
+ */
border: string;
/**
- * Sets or retrieves the border color of the object.
- */
+ * Sets or retrieves the border color of the object.
+ */
borderColor: any;
/**
- * Retrieves the document object of the page or frame.
- */
+ * Retrieves the document object of the page or frame.
+ */
readonly contentDocument: Document;
/**
- * Retrieves the object of the specified.
- */
+ * Retrieves the object of the specified.
+ */
readonly contentWindow: Window;
/**
- * Sets or retrieves whether to display a border for the frame.
- */
+ * Sets or retrieves whether to display a border for the frame.
+ */
frameBorder: string;
/**
- * Sets or retrieves the amount of additional space between the frames.
- */
+ * Sets or retrieves the amount of additional space between the frames.
+ */
frameSpacing: any;
/**
- * Sets or retrieves the height of the object.
- */
+ * Sets or retrieves the height of the object.
+ */
height: string | number;
/**
- * Sets or retrieves a URI to a long description of the object.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the left and right margin widths before displaying the text in a frame.
+ */
marginWidth: string;
/**
- * Sets or retrieves the frame name.
- */
+ * Sets or retrieves the frame name.
+ */
name: string;
/**
- * Sets or retrieves whether the user can resize the frame.
- */
+ * Sets or retrieves whether the user can resize the frame.
+ */
noResize: boolean;
/**
- * Raised when the object has been completely received from the server.
- */
+ * 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.
- */
+ * Sets or retrieves whether the frame can be scrolled.
+ */
scrolling: string;
/**
- * Sets or retrieves a URL to be loaded by the object.
- */
+ * Sets or retrieves a URL to be loaded by the object.
+ */
src: string;
/**
- * Sets or retrieves the width of the object.
- */
+ * 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;
@@ -10924,7 +10831,7 @@ interface HTMLFrameElement extends HTMLElement, GetSVGDocument {
declare var HTMLFrameElement: {
prototype: HTMLFrameElement;
new(): HTMLFrameElement;
-}
+};
interface HTMLFrameSetElementEventMap extends HTMLElementEventMap {
"afterprint": Event;
@@ -10951,33 +10858,33 @@ interface HTMLFrameSetElementEventMap extends HTMLElementEventMap {
interface HTMLFrameSetElement extends HTMLElement {
border: string;
/**
- * Sets or retrieves the border color of the object.
- */
+ * Sets or retrieves the border color of the object.
+ */
borderColor: any;
/**
- * Sets or retrieves the frame widths of the object.
- */
+ * Sets or retrieves the frame widths of the object.
+ */
cols: string;
/**
- * Sets or retrieves whether to display a border for the frame.
- */
+ * Sets or retrieves whether to display a border for the frame.
+ */
frameBorder: string;
/**
- * Sets or retrieves the amount of additional space between the frames.
- */
+ * 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.
- */
+ * 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.
- */
+ * Fires when the object receives focus.
+ */
onfocus: (this: HTMLFrameSetElement, ev: FocusEvent) => any;
onhashchange: (this: HTMLFrameSetElement, ev: HashChangeEvent) => any;
onload: (this: HTMLFrameSetElement, ev: Event) => any;
@@ -10993,8 +10900,8 @@ interface HTMLFrameSetElement extends HTMLElement {
onstorage: (this: HTMLFrameSetElement, ev: StorageEvent) => any;
onunload: (this: HTMLFrameSetElement, ev: Event) => any;
/**
- * Sets or retrieves the frame heights of the object.
- */
+ * 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;
@@ -11003,29 +10910,7 @@ interface HTMLFrameSetElement extends HTMLElement {
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;
@@ -11036,12 +10921,12 @@ interface HTMLHeadElement extends HTMLElement {
declare var HTMLHeadElement: {
prototype: HTMLHeadElement;
new(): HTMLHeadElement;
-}
+};
interface HTMLHeadingElement extends HTMLElement {
/**
- * Sets or retrieves a value that indicates the table alignment.
- */
+ * 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;
@@ -11050,12 +10935,34 @@ interface HTMLHeadingElement extends HTMLElement {
declare var HTMLHeadingElement: {
prototype: HTMLHeadingElement;
new(): HTMLHeadingElement;
+};
+
+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 HTMLHtmlElement extends HTMLElement {
/**
- * Sets or retrieves the DTD version that governs the current document.
- */
+ * 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;
@@ -11064,7 +10971,7 @@ interface HTMLHtmlElement extends HTMLElement {
declare var HTMLHtmlElement: {
prototype: HTMLHtmlElement;
new(): HTMLHtmlElement;
-}
+};
interface HTMLIFrameElementEventMap extends HTMLElementEventMap {
"load": Event;
@@ -11072,79 +10979,79 @@ interface HTMLIFrameElementEventMap extends HTMLElementEventMap {
interface HTMLIFrameElement extends HTMLElement, GetSVGDocument {
/**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
+ * 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.
- */
+ * Specifies the properties of a border drawn around an object.
+ */
border: string;
/**
- * Retrieves the document object of the page or frame.
- */
+ * Retrieves the document object of the page or frame.
+ */
readonly contentDocument: Document;
/**
- * Retrieves the object of the specified.
- */
+ * Retrieves the object of the specified.
+ */
readonly contentWindow: Window;
/**
- * Sets or retrieves whether to display a border for the frame.
- */
+ * Sets or retrieves whether to display a border for the frame.
+ */
frameBorder: string;
/**
- * Sets or retrieves the amount of additional space between the frames.
- */
+ * Sets or retrieves the amount of additional space between the frames.
+ */
frameSpacing: any;
/**
- * Sets or retrieves the height of the object.
- */
+ * Sets or retrieves the height of the object.
+ */
height: string;
/**
- * Sets or retrieves the horizontal margin for the object.
- */
+ * Sets or retrieves the horizontal margin for the object.
+ */
hspace: number;
/**
- * Sets or retrieves a URI to a long description of the object.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the left and right margin widths before displaying the text in a frame.
+ */
marginWidth: string;
/**
- * Sets or retrieves the frame name.
- */
+ * Sets or retrieves the frame name.
+ */
name: string;
/**
- * Sets or retrieves whether the user can resize the frame.
- */
+ * Sets or retrieves whether the user can resize the frame.
+ */
noResize: boolean;
/**
- * Raised when the object has been completely received from the server.
- */
+ * 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.
- */
+ * Sets or retrieves whether the frame can be scrolled.
+ */
scrolling: string;
/**
- * Sets or retrieves a URL to be loaded by the object.
- */
+ * Sets or retrieves a URL to be loaded by the object.
+ */
src: string;
/**
- * Sets or retrieves the vertical margin for the object.
- */
+ * Sets or retrieves the vertical margin for the object.
+ */
vspace: number;
/**
- * Sets or retrieves the width of the object.
- */
+ * 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;
@@ -11153,86 +11060,86 @@ interface HTMLIFrameElement extends HTMLElement, GetSVGDocument {
declare var HTMLIFrameElement: {
prototype: HTMLIFrameElement;
new(): HTMLIFrameElement;
-}
+};
interface HTMLImageElement extends HTMLElement {
/**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
+ * Sets or retrieves how the object is aligned with adjacent text.
+ */
align: string;
/**
- * Sets or retrieves a text alternative to the graphic.
- */
+ * Sets or retrieves a text alternative to the graphic.
+ */
alt: string;
/**
- * Specifies the properties of a border drawn around an object.
- */
+ * Specifies the properties of a border drawn around an object.
+ */
border: string;
/**
- * Retrieves whether the object is fully loaded.
- */
+ * Retrieves whether the object is fully loaded.
+ */
readonly complete: boolean;
crossOrigin: string | null;
readonly currentSrc: string;
/**
- * Sets or retrieves the height of the object.
- */
+ * Sets or retrieves the height of the object.
+ */
height: number;
/**
- * Sets or retrieves the width of the border to draw around the object.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Gets or sets whether the DLNA PlayTo device is available.
+ */
msPlayToDisabled: boolean;
msPlayToPreferredSourceUri: string;
/**
- * Gets or sets the primary DLNA PlayTo device.
- */
+ * Gets or sets the primary DLNA PlayTo device.
+ */
msPlayToPrimary: boolean;
/**
- * Gets the source associated with the media element for use by the PlayToManager.
- */
+ * Gets the source associated with the media element for use by the PlayToManager.
+ */
readonly msPlayToSource: any;
/**
- * Sets or retrieves the name of the object.
- */
+ * Sets or retrieves the name of the object.
+ */
name: string;
/**
- * The original height of the image resource before sizing.
- */
+ * The original height of the image resource before sizing.
+ */
readonly naturalHeight: number;
/**
- * The original width of the image resource before sizing.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the vertical margin for the object.
+ */
vspace: number;
/**
- * Sets or retrieves the width of the object.
- */
+ * Sets or retrieves the width of the object.
+ */
width: number;
readonly x: number;
readonly y: number;
@@ -11244,210 +11151,210 @@ interface HTMLImageElement extends HTMLElement {
declare var HTMLImageElement: {
prototype: HTMLImageElement;
new(): HTMLImageElement;
-}
+};
interface HTMLInputElement extends HTMLElement {
/**
- * Sets or retrieves a comma-separated list of content types.
- */
+ * Sets or retrieves a comma-separated list of content types.
+ */
accept: string;
/**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
+ * Sets or retrieves how the object is aligned with adjacent text.
+ */
align: string;
/**
- * Sets or retrieves a text alternative to the graphic.
- */
+ * Sets or retrieves a text alternative to the graphic.
+ */
alt: string;
/**
- * Specifies whether autocomplete is applied to an editable text field.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the state of the check box or radio button.
+ */
checked: boolean;
/**
- * Retrieves whether the object is fully loaded.
- */
+ * Retrieves whether the object is fully loaded.
+ */
readonly complete: boolean;
/**
- * Sets or retrieves the state of the check box or radio button.
- */
+ * Sets or retrieves the state of the check box or radio button.
+ */
defaultChecked: boolean;
/**
- * Sets or retrieves the initial contents of the object.
- */
+ * Sets or retrieves the initial contents of the object.
+ */
defaultValue: string;
disabled: boolean;
/**
- * Returns a FileList object on a file type input object.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Overrides the target attribute on a form element.
+ */
formTarget: string;
/**
- * Sets or retrieves the height of the object.
- */
+ * Sets or retrieves the height of the object.
+ */
height: string;
/**
- * Sets or retrieves the width of the border to draw around the object.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Returns the value of the data at the cursor's current position.
+ */
value: string;
valueAsDate: Date;
/**
- * Returns the input field value as a number.
- */
+ * Returns the input field value as a number.
+ */
valueAsNumber: number;
/**
- * Sets or retrieves the vertical margin for the object.
- */
+ * Sets or retrieves the vertical margin for the object.
+ */
vspace: number;
webkitdirectory: boolean;
/**
- * Sets or retrieves the width of the object.
- */
+ * Sets or retrieves the width of the object.
+ */
width: string;
/**
- * Returns whether an element will successfully validate based on forms validation rules and constraints.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -11456,31 +11363,16 @@ interface HTMLInputElement extends HTMLElement {
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.
- */
+ * 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.
- */
+ * 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;
@@ -11489,16 +11381,16 @@ interface HTMLLabelElement extends HTMLElement {
declare var HTMLLabelElement: {
prototype: HTMLLabelElement;
new(): HTMLLabelElement;
-}
+};
interface HTMLLegendElement extends HTMLElement {
/**
- * Retrieves a reference to the form that the object is embedded in.
- */
+ * 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.
- */
+ * 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;
@@ -11507,41 +11399,56 @@ interface HTMLLegendElement extends HTMLElement {
declare var HTMLLegendElement: {
prototype: HTMLLegendElement;
new(): HTMLLegendElement;
+};
+
+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 HTMLLinkElement extends HTMLElement, LinkStyle {
/**
- * Sets or retrieves the character set used to encode the object.
- */
+ * 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.
- */
+ * Sets or retrieves a destination URL or an anchor point.
+ */
href: string;
/**
- * Sets or retrieves the language code of the object.
- */
+ * Sets or retrieves the language code of the object.
+ */
hreflang: string;
/**
- * Sets or retrieves the media type.
- */
+ * Sets or retrieves the media type.
+ */
media: string;
/**
- * Sets or retrieves the relationship between the object and the destination of the link.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the window or frame at which to target content.
+ */
target: string;
/**
- * Sets or retrieves the MIME type of the object.
- */
+ * Sets or retrieves the MIME type of the object.
+ */
type: string;
import?: Document;
integrity: string;
@@ -11552,16 +11459,16 @@ interface HTMLLinkElement extends HTMLElement, LinkStyle {
declare var HTMLLinkElement: {
prototype: HTMLLinkElement;
new(): HTMLLinkElement;
-}
+};
interface HTMLMapElement extends HTMLElement {
/**
- * Retrieves a collection of the area objects defined for the given map object.
- */
+ * Retrieves a collection of the area objects defined for the given map object.
+ */
readonly areas: HTMLAreasCollection;
/**
- * Sets or retrieves the name of the object.
- */
+ * 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;
@@ -11570,7 +11477,7 @@ interface HTMLMapElement extends HTMLElement {
declare var HTMLMapElement: {
prototype: HTMLMapElement;
new(): HTMLMapElement;
-}
+};
interface HTMLMarqueeElementEventMap extends HTMLElementEventMap {
"bounce": Event;
@@ -11602,7 +11509,7 @@ interface HTMLMarqueeElement extends HTMLElement {
declare var HTMLMarqueeElement: {
prototype: HTMLMarqueeElement;
new(): HTMLMarqueeElement;
-}
+};
interface HTMLMediaElementEventMap extends HTMLElementEventMap {
"encrypted": MediaEncryptedEvent;
@@ -11611,162 +11518,162 @@ interface HTMLMediaElementEventMap extends HTMLElementEventMap {
interface HTMLMediaElement extends HTMLElement {
/**
- * Returns an AudioTrackList object with the audio tracks for a given video element.
- */
+ * 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.
- */
+ * Gets or sets a value that indicates whether to start playing the media automatically.
+ */
autoplay: boolean;
/**
- * Gets a collection of buffered time ranges.
- */
+ * 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).
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Gets or sets the primary DLNA PlayTo device.
+ */
msPlayToPrimary: boolean;
/**
- * Gets the source associated with the media element for use by the PlayToManager.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Gets TimeRanges for the current media resource that has been played.
+ */
readonly played: TimeRanges;
/**
- * Gets or sets the current playback position, in seconds.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Resets the audio or video object and loads a new media resource.
+ */
load(): void;
/**
- * Clears all effects from the media pipeline.
- */
+ * Clears all effects from the media pipeline.
+ */
msClearEffects(): void;
msGetAsCastingSource(): any;
/**
- * Inserts the specified audio effect into media pipeline.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
+ * Loads and starts playback of a media resource.
+ */
+ play(): Promise<void>;
setMediaKeys(mediaKeys: MediaKeys | null): Promise<void>;
readonly HAVE_CURRENT_DATA: number;
readonly HAVE_ENOUGH_DATA: number;
@@ -11793,7 +11700,7 @@ declare var HTMLMediaElement: {
readonly NETWORK_IDLE: number;
readonly NETWORK_LOADING: number;
readonly NETWORK_NO_SOURCE: number;
-}
+};
interface HTMLMenuElement extends HTMLElement {
compact: boolean;
@@ -11805,32 +11712,32 @@ interface HTMLMenuElement extends HTMLElement {
declare var HTMLMenuElement: {
prototype: HTMLMenuElement;
new(): HTMLMenuElement;
-}
+};
interface HTMLMetaElement extends HTMLElement {
/**
- * Sets or retrieves the character set used to encode the object.
- */
+ * Sets or retrieves the character set used to encode the object.
+ */
charset: string;
/**
- * Gets or sets meta-information to associate with httpEquiv or name.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -11839,7 +11746,7 @@ interface HTMLMetaElement extends HTMLElement {
declare var HTMLMetaElement: {
prototype: HTMLMetaElement;
new(): HTMLMetaElement;
-}
+};
interface HTMLMeterElement extends HTMLElement {
high: number;
@@ -11855,16 +11762,16 @@ interface HTMLMeterElement extends HTMLElement {
declare var HTMLMeterElement: {
prototype: HTMLMeterElement;
new(): HTMLMeterElement;
-}
+};
interface HTMLModElement extends HTMLElement {
/**
- * Sets or retrieves reference information about the object.
- */
+ * Sets or retrieves reference information about the object.
+ */
cite: string;
/**
- * Sets or retrieves the date and time of a modification to the object.
- */
+ * 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;
@@ -11873,131 +11780,115 @@ interface HTMLModElement extends HTMLElement {
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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves a character string that can be used to implement your own archive functionality for the object.
+ */
archive: string;
+ /**
+ * 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;
border: string;
/**
- * Sets or retrieves the URL of the file containing the compiled Java class.
- */
+ * Sets or retrieves the URL of the file containing the compiled Java class.
+ */
code: string;
/**
- * Sets or retrieves the URL of the component.
- */
+ * Sets or retrieves the URL of the component.
+ */
codeBase: string;
/**
- * Sets or retrieves the Internet media type for the code associated with the object.
- */
+ * 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.
- */
+ * Retrieves the document object of the page or frame.
+ */
readonly contentDocument: Document;
/**
- * Sets or retrieves the URL that references the data of the object.
- */
+ * 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.
- */
+ * Retrieves a reference to the form that the object is embedded in.
+ */
readonly form: HTMLFormElement;
/**
- * Sets or retrieves the height of the object.
- */
+ * Sets or retrieves the height of the object.
+ */
height: string;
hspace: number;
/**
- * Gets or sets whether the DLNA PlayTo device is available.
- */
+ * 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.
- */
+ * 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.
- */
+ * Gets or sets the primary DLNA PlayTo device.
+ */
msPlayToPrimary: boolean;
/**
- * Gets the source associated with the media element for use by the PlayToManager.
- */
+ * Gets the source associated with the media element for use by the PlayToManager.
+ */
readonly msPlayToSource: any;
/**
- * Sets or retrieves the name of the object.
- */
+ * 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.
- */
+ * Sets or retrieves a message to be displayed while an object is loading.
+ */
standby: string;
/**
- * Sets or retrieves the MIME type of the object.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the width of the object.
+ */
width: string;
/**
- * Returns whether an element will successfully validate based on forms validation rules and constraints.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -12006,37 +11897,53 @@ interface HTMLObjectElement extends HTMLElement, GetSVGDocument {
declare var HTMLObjectElement: {
prototype: HTMLObjectElement;
new(): HTMLObjectElement;
+};
+
+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 HTMLOptGroupElement extends HTMLElement {
/**
- * Sets or retrieves the status of an option.
- */
+ * Sets or retrieves the status of an option.
+ */
defaultSelected: boolean;
disabled: boolean;
/**
- * Retrieves a reference to the form that the object is embedded in.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -12045,37 +11952,37 @@ interface HTMLOptGroupElement extends HTMLElement {
declare var HTMLOptGroupElement: {
prototype: HTMLOptGroupElement;
new(): HTMLOptGroupElement;
-}
+};
interface HTMLOptionElement extends HTMLElement {
/**
- * Sets or retrieves the status of an option.
- */
+ * Sets or retrieves the status of an option.
+ */
defaultSelected: boolean;
disabled: boolean;
/**
- * Retrieves a reference to the form that the object is embedded in.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -12084,7 +11991,7 @@ interface HTMLOptionElement extends HTMLElement {
declare var HTMLOptionElement: {
prototype: HTMLOptionElement;
new(): HTMLOptionElement;
-}
+};
interface HTMLOptionsCollection extends HTMLCollectionOf<HTMLOptionElement> {
length: number;
@@ -12096,7 +12003,7 @@ interface HTMLOptionsCollection extends HTMLCollectionOf<HTMLOptionElement> {
declare var HTMLOptionsCollection: {
prototype: HTMLOptionsCollection;
new(): HTMLOptionsCollection;
-}
+};
interface HTMLOutputElement extends HTMLElement {
defaultValue: string;
@@ -12118,12 +12025,12 @@ interface HTMLOutputElement extends HTMLElement {
declare var HTMLOutputElement: {
prototype: HTMLOutputElement;
new(): HTMLOutputElement;
-}
+};
interface HTMLParagraphElement extends HTMLElement {
/**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
+ * 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;
@@ -12133,24 +12040,24 @@ interface HTMLParagraphElement extends HTMLElement {
declare var HTMLParagraphElement: {
prototype: HTMLParagraphElement;
new(): HTMLParagraphElement;
-}
+};
interface HTMLParamElement extends HTMLElement {
/**
- * Sets or retrieves the name of an input parameter for an element.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the value of an input parameter for an element.
+ */
value: string;
/**
- * Sets or retrieves the data type of the value attribute.
- */
+ * 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;
@@ -12159,7 +12066,7 @@ interface HTMLParamElement extends HTMLElement {
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;
@@ -12169,12 +12076,12 @@ interface HTMLPictureElement extends HTMLElement {
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.
- */
+ * 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;
@@ -12183,24 +12090,24 @@ interface HTMLPreElement extends HTMLElement {
declare var HTMLPreElement: {
prototype: HTMLPreElement;
new(): HTMLPreElement;
-}
+};
interface HTMLProgressElement extends HTMLElement {
/**
- * Retrieves a reference to the form that the object is embedded in.
- */
+ * 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.
- */
+ * 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).
- */
+ * 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.
- */
+ * 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;
@@ -12209,12 +12116,12 @@ interface HTMLProgressElement extends HTMLElement {
declare var HTMLProgressElement: {
prototype: HTMLProgressElement;
new(): HTMLProgressElement;
-}
+};
interface HTMLQuoteElement extends HTMLElement {
/**
- * Sets or retrieves reference information about the object.
- */
+ * 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;
@@ -12223,38 +12130,38 @@ interface HTMLQuoteElement extends HTMLElement {
declare var HTMLQuoteElement: {
prototype: HTMLQuoteElement;
new(): HTMLQuoteElement;
-}
+};
interface HTMLScriptElement extends HTMLElement {
async: boolean;
/**
- * Sets or retrieves the character set used to encode the object.
- */
+ * Sets or retrieves the character set used to encode the object.
+ */
charset: string;
crossOrigin: string | null;
/**
- * Sets or retrieves the status of the script.
- */
+ * Sets or retrieves the status of the script.
+ */
defer: boolean;
/**
- * Sets or retrieves the event for which the script is written.
- */
+ * 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.
- */
+ /**
+ * 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.
- */
+ * 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.
- */
+ * Retrieves or sets the text of the object as a string.
+ */
text: string;
/**
- * Sets or retrieves the MIME type for the associated scripting engine.
- */
+ * 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;
@@ -12264,94 +12171,94 @@ interface HTMLScriptElement extends HTMLElement {
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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -12361,18 +12268,18 @@ interface HTMLSelectElement extends HTMLElement {
declare var HTMLSelectElement: {
prototype: HTMLSelectElement;
new(): HTMLSelectElement;
-}
+};
interface HTMLSourceElement extends HTMLElement {
/**
- * Gets or sets the intended media type of the media source.
+ * 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.
- */
+ * The address or URL of the a media resource that is to be considered.
+ */
src: string;
srcset: string;
/**
@@ -12386,7 +12293,7 @@ interface HTMLSourceElement extends HTMLElement {
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;
@@ -12396,17 +12303,17 @@ interface HTMLSpanElement extends HTMLElement {
declare var HTMLSpanElement: {
prototype: HTMLSpanElement;
new(): HTMLSpanElement;
-}
+};
interface HTMLStyleElement extends HTMLElement, LinkStyle {
disabled: boolean;
/**
- * Sets or retrieves the media type.
- */
+ * Sets or retrieves the media type.
+ */
media: string;
/**
- * Retrieves the CSS language in which the style sheet is written.
- */
+ * 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;
@@ -12415,16 +12322,16 @@ interface HTMLStyleElement extends HTMLElement, LinkStyle {
declare var HTMLStyleElement: {
prototype: HTMLStyleElement;
new(): HTMLStyleElement;
-}
+};
interface HTMLTableCaptionElement extends HTMLElement {
/**
- * Sets or retrieves the alignment of the caption or legend.
- */
+ * 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.
- */
+ * 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;
@@ -12433,53 +12340,53 @@ interface HTMLTableCaptionElement extends HTMLElement {
declare var HTMLTableCaptionElement: {
prototype: HTMLTableCaptionElement;
new(): HTMLTableCaptionElement;
-}
+};
interface HTMLTableCellElement extends HTMLElement, HTMLTableAlignment {
/**
- * Sets or retrieves abbreviated text for the object.
- */
+ * Sets or retrieves abbreviated text for the object.
+ */
abbr: string;
/**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves a list of header cells that provide information for the object.
+ */
headers: string;
/**
- * Sets or retrieves the height of the object.
- */
+ * Sets or retrieves the height of the object.
+ */
height: any;
/**
- * Sets or retrieves whether the browser automatically performs wordwrap.
- */
+ * Sets or retrieves whether the browser automatically performs wordwrap.
+ */
noWrap: boolean;
/**
- * Sets or retrieves how many rows in a table the cell should span.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -12488,20 +12395,20 @@ interface HTMLTableCellElement extends HTMLElement, HTMLTableAlignment {
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.
- */
+ * 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.
- */
+ * Sets or retrieves the number of columns in the group.
+ */
span: number;
/**
- * Sets or retrieves the width of the object.
- */
+ * 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;
@@ -12510,7 +12417,7 @@ interface HTMLTableColElement extends HTMLElement, HTMLTableAlignment {
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;
@@ -12520,111 +12427,111 @@ 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.
- */
+ * 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.
- */
+ * Sets or retrieves the width of the border to draw around the object.
+ */
border: string;
/**
- * Sets or retrieves the border color of the object.
- */
+ * Sets or retrieves the border color of the object.
+ */
borderColor: any;
/**
- * Retrieves the caption object of a table.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the amount of space between cells in a table.
+ */
cellSpacing: string;
/**
- * Sets or retrieves the number of columns in the table.
- */
+ * 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.
- */
+ * Sets or retrieves the way the border frame around the table is displayed.
+ */
frame: string;
/**
- * Sets or retrieves the height of the object.
- */
+ * Sets or retrieves the height of the object.
+ */
height: any;
/**
- * Sets or retrieves the number of horizontal rows contained in the object.
- */
+ * 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.
- */
+ * Sets or retrieves which dividing lines (inner borders) are displayed.
+ */
rules: string;
/**
- * Sets or retrieves a description and/or structure of the object.
- */
+ * 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.
- */
+ * 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.
- */
+ * Retrieves the tFoot object of the table.
+ */
tFoot: HTMLTableSectionElement;
/**
- * Retrieves the tHead object of the table.
- */
+ * Retrieves the tHead object of the table.
+ */
tHead: HTMLTableSectionElement;
/**
- * Sets or retrieves the width of the object.
- */
+ * Sets or retrieves the width of the object.
+ */
width: string;
/**
- * Creates an empty caption element in the table.
- */
+ * Creates an empty caption element in the table.
+ */
createCaption(): HTMLTableCaptionElement;
/**
- * Creates an empty tBody element in the table.
- */
+ * Creates an empty tBody element in the table.
+ */
createTBody(): HTMLTableSectionElement;
/**
- * Creates an empty tFoot element in the table.
- */
+ * Creates an empty tFoot element in the table.
+ */
createTFoot(): HTMLTableSectionElement;
/**
- * Returns the tHead element object if successful, or null otherwise.
- */
+ * Returns the tHead element object if successful, or null otherwise.
+ */
createTHead(): HTMLTableSectionElement;
/**
- * Deletes the caption element and its contents from the table.
- */
+ * 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.
- */
+ * 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.
- */
+ * Deletes the tFoot element and its contents from the table.
+ */
deleteTFoot(): void;
/**
- * Deletes the tHead element and its contents from the table.
- */
+ * 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.
- */
+ * 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;
@@ -12633,12 +12540,12 @@ interface HTMLTableElement extends HTMLElement {
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.
- */
+ * 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;
@@ -12647,39 +12554,39 @@ interface HTMLTableHeaderCellElement extends HTMLTableCellElement {
declare var HTMLTableHeaderCellElement: {
prototype: HTMLTableHeaderCellElement;
new(): HTMLTableHeaderCellElement;
-}
+};
interface HTMLTableRowElement extends HTMLElement, HTMLTableAlignment {
/**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
+ * 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.
- */
+ * Retrieves a collection of all cells in the table row.
+ */
cells: HTMLCollectionOf<HTMLTableDataCellElement | HTMLTableHeaderCellElement>;
/**
- * Sets or retrieves the height of the object.
- */
+ * Sets or retrieves the height of the object.
+ */
height: any;
/**
- * Retrieves the position of the object in the rows collection for the table.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -12688,26 +12595,26 @@ interface HTMLTableRowElement extends HTMLElement, HTMLTableAlignment {
declare var HTMLTableRowElement: {
prototype: HTMLTableRowElement;
new(): HTMLTableRowElement;
-}
+};
interface HTMLTableSectionElement extends HTMLElement, HTMLTableAlignment {
/**
- * Sets or retrieves a value that indicates the table alignment.
- */
+ * Sets or retrieves a value that indicates the table alignment.
+ */
align: string;
/**
- * Sets or retrieves the number of horizontal rows contained in the object.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -12716,7 +12623,7 @@ interface HTMLTableSectionElement extends HTMLElement, HTMLTableAlignment {
declare var HTMLTableSectionElement: {
prototype: HTMLTableSectionElement;
new(): HTMLTableSectionElement;
-}
+};
interface HTMLTemplateElement extends HTMLElement {
readonly content: DocumentFragment;
@@ -12727,105 +12634,105 @@ interface HTMLTemplateElement extends HTMLElement {
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.
- */
+ * 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.
- */
+ * Sets or retrieves the width of the object.
+ */
cols: number;
/**
- * Sets or retrieves the initial contents of the object.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the value indicating whether the control is selected.
+ */
status: any;
/**
- * Retrieves the type of control.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -12834,7 +12741,7 @@ interface HTMLTextAreaElement extends HTMLElement {
declare var HTMLTextAreaElement: {
prototype: HTMLTextAreaElement;
new(): HTMLTextAreaElement;
-}
+};
interface HTMLTimeElement extends HTMLElement {
dateTime: string;
@@ -12845,12 +12752,12 @@ interface HTMLTimeElement extends HTMLElement {
declare var HTMLTimeElement: {
prototype: HTMLTimeElement;
new(): HTMLTimeElement;
-}
+};
interface HTMLTitleElement extends HTMLElement {
/**
- * Retrieves or sets the text of the object as a string.
- */
+ * 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;
@@ -12859,7 +12766,7 @@ interface HTMLTitleElement extends HTMLElement {
declare var HTMLTitleElement: {
prototype: HTMLTitleElement;
new(): HTMLTitleElement;
-}
+};
interface HTMLTrackElement extends HTMLElement {
default: boolean;
@@ -12884,7 +12791,7 @@ declare var HTMLTrackElement: {
readonly LOADED: number;
readonly LOADING: number;
readonly NONE: number;
-}
+};
interface HTMLUListElement extends HTMLElement {
compact: boolean;
@@ -12896,7 +12803,7 @@ interface HTMLUListElement extends HTMLElement {
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;
@@ -12906,7 +12813,7 @@ interface HTMLUnknownElement extends HTMLElement {
declare var HTMLUnknownElement: {
prototype: HTMLUnknownElement;
new(): HTMLUnknownElement;
-}
+};
interface HTMLVideoElementEventMap extends HTMLMediaElementEventMap {
"MSVideoFormatChanged": Event;
@@ -12916,8 +12823,8 @@ interface HTMLVideoElementEventMap extends HTMLMediaElementEventMap {
interface HTMLVideoElement extends HTMLMediaElement {
/**
- * Gets or sets the height of the video element.
- */
+ * Gets or sets the height of the video element.
+ */
height: number;
msHorizontalMirror: boolean;
readonly msIsLayoutOptimalForPlayback: boolean;
@@ -12929,31 +12836,31 @@ interface HTMLVideoElement extends HTMLMediaElement {
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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
+ 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;
}
@@ -12961,47 +12868,7 @@ interface HTMLVideoElement extends HTMLMediaElement {
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;
@@ -13025,7 +12892,7 @@ declare var IDBCursor: {
readonly NEXT_NO_DUPLICATE: string;
readonly PREV: string;
readonly PREV_NO_DUPLICATE: string;
-}
+};
interface IDBCursorWithValue extends IDBCursor {
readonly value: any;
@@ -13034,7 +12901,7 @@ interface IDBCursorWithValue extends IDBCursor {
declare var IDBCursorWithValue: {
prototype: IDBCursorWithValue;
new(): IDBCursorWithValue;
-}
+};
interface IDBDatabaseEventMap {
"abort": Event;
@@ -13051,7 +12918,7 @@ interface IDBDatabase extends EventTarget {
close(): void;
createObjectStore(name: string, optionalParameters?: IDBObjectStoreParameters): IDBObjectStore;
deleteObjectStore(name: string): void;
- transaction(storeNames: string | string[], mode?: string): IDBTransaction;
+ transaction(storeNames: string | string[], mode?: IDBTransactionMode): 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;
@@ -13060,7 +12927,7 @@ interface IDBDatabase extends EventTarget {
declare var IDBDatabase: {
prototype: IDBDatabase;
new(): IDBDatabase;
-}
+};
interface IDBFactory {
cmp(first: any, second: any): number;
@@ -13071,7 +12938,7 @@ interface IDBFactory {
declare var IDBFactory: {
prototype: IDBFactory;
new(): IDBFactory;
-}
+};
interface IDBIndex {
keyPath: string | string[];
@@ -13082,14 +12949,14 @@ interface IDBIndex {
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;
+ openCursor(range?: IDBKeyRange | IDBValidKey, direction?: IDBCursorDirection): IDBRequest;
+ openKeyCursor(range?: IDBKeyRange | IDBValidKey, direction?: IDBCursorDirection): IDBRequest;
}
declare var IDBIndex: {
prototype: IDBIndex;
new(): IDBIndex;
-}
+};
interface IDBKeyRange {
readonly lower: any;
@@ -13105,7 +12972,7 @@ declare var IDBKeyRange: {
lowerBound(lower: any, open?: boolean): IDBKeyRange;
only(value: any): IDBKeyRange;
upperBound(upper: any, open?: boolean): IDBKeyRange;
-}
+};
interface IDBObjectStore {
readonly indexNames: DOMStringList;
@@ -13121,14 +12988,14 @@ interface IDBObjectStore {
deleteIndex(indexName: string): void;
get(key: any): IDBRequest;
index(name: string): IDBIndex;
- openCursor(range?: IDBKeyRange | IDBValidKey, direction?: string): IDBRequest;
+ openCursor(range?: IDBKeyRange | IDBValidKey, direction?: IDBCursorDirection): IDBRequest;
put(value: any, key?: IDBKeyRange | IDBValidKey): IDBRequest;
}
declare var IDBObjectStore: {
prototype: IDBObjectStore;
new(): IDBObjectStore;
-}
+};
interface IDBOpenDBRequestEventMap extends IDBRequestEventMap {
"blocked": Event;
@@ -13145,7 +13012,7 @@ interface IDBOpenDBRequest extends IDBRequest {
declare var IDBOpenDBRequest: {
prototype: IDBOpenDBRequest;
new(): IDBOpenDBRequest;
-}
+};
interface IDBRequestEventMap {
"error": Event;
@@ -13153,7 +13020,7 @@ interface IDBRequestEventMap {
}
interface IDBRequest extends EventTarget {
- readonly error: DOMError;
+ readonly error: DOMException;
onerror: (this: IDBRequest, ev: Event) => any;
onsuccess: (this: IDBRequest, ev: Event) => any;
readonly readyState: IDBRequestReadyState;
@@ -13167,7 +13034,7 @@ interface IDBRequest extends EventTarget {
declare var IDBRequest: {
prototype: IDBRequest;
new(): IDBRequest;
-}
+};
interface IDBTransactionEventMap {
"abort": Event;
@@ -13177,7 +13044,7 @@ interface IDBTransactionEventMap {
interface IDBTransaction extends EventTarget {
readonly db: IDBDatabase;
- readonly error: DOMError;
+ readonly error: DOMException;
readonly mode: IDBTransactionMode;
onabort: (this: IDBTransaction, ev: Event) => any;
oncomplete: (this: IDBTransaction, ev: Event) => any;
@@ -13197,7 +13064,7 @@ declare var IDBTransaction: {
readonly READ_ONLY: string;
readonly READ_WRITE: string;
readonly VERSION_CHANGE: string;
-}
+};
interface IDBVersionChangeEvent extends Event {
readonly newVersion: number | null;
@@ -13207,7 +13074,7 @@ interface IDBVersionChangeEvent extends Event {
declare var IDBVersionChangeEvent: {
prototype: IDBVersionChangeEvent;
new(): IDBVersionChangeEvent;
-}
+};
interface IIRFilterNode extends AudioNode {
getFrequencyResponse(frequencyHz: Float32Array, magResponse: Float32Array, phaseResponse: Float32Array): void;
@@ -13216,7 +13083,7 @@ interface IIRFilterNode extends AudioNode {
declare var IIRFilterNode: {
prototype: IIRFilterNode;
new(): IIRFilterNode;
-}
+};
interface ImageData {
data: Uint8ClampedArray;
@@ -13228,7 +13095,7 @@ 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;
@@ -13243,7 +13110,7 @@ interface IntersectionObserver {
declare var IntersectionObserver: {
prototype: IntersectionObserver;
new(callback: IntersectionObserverCallback, options?: IntersectionObserverInit): IntersectionObserver;
-}
+};
interface IntersectionObserverEntry {
readonly boundingClientRect: ClientRect;
@@ -13257,7 +13124,7 @@ interface IntersectionObserverEntry {
declare var IntersectionObserverEntry: {
prototype: IntersectionObserverEntry;
new(intersectionObserverEntryInit: IntersectionObserverEntryInit): IntersectionObserverEntry;
-}
+};
interface KeyboardEvent extends UIEvent {
readonly altKey: boolean;
@@ -13292,7 +13159,7 @@ declare var KeyboardEvent: {
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;
@@ -13302,7 +13169,7 @@ interface ListeningStateChangedEvent extends Event {
declare var ListeningStateChangedEvent: {
prototype: ListeningStateChangedEvent;
new(): ListeningStateChangedEvent;
-}
+};
interface Location {
hash: string;
@@ -13323,7 +13190,7 @@ interface Location {
declare var Location: {
prototype: Location;
new(): Location;
-}
+};
interface LongRunningScriptDetectedEvent extends Event {
readonly executionTime: number;
@@ -13333,8 +13200,390 @@ interface LongRunningScriptDetectedEvent extends Event {
declare var LongRunningScriptDetectedEvent: {
prototype: LongRunningScriptDetectedEvent;
new(): LongRunningScriptDetectedEvent;
+};
+
+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 MediaKeys {
+ createSession(sessionType?: MediaKeySessionType): MediaKeySession;
+ setServerCertificate(serverCertificate: any): Promise<void>;
+}
+
+declare var MediaKeys: {
+ prototype: MediaKeys;
+ new(): MediaKeys;
+};
+
+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 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 MSApp {
clearTemporaryWebDataAsync(): MSAppAsyncOperation;
createBlobFromRandomAccessStream(type: string, seeker: any): Blob;
@@ -13383,7 +13632,7 @@ declare var MSAppAsyncOperation: {
readonly COMPLETED: number;
readonly ERROR: number;
readonly STARTED: number;
-}
+};
interface MSAssertion {
readonly id: string;
@@ -13393,7 +13642,7 @@ interface MSAssertion {
declare var MSAssertion: {
prototype: MSAssertion;
new(): MSAssertion;
-}
+};
interface MSBlobBuilder {
append(data: any, endings?: string): void;
@@ -13403,7 +13652,7 @@ interface MSBlobBuilder {
declare var MSBlobBuilder: {
prototype: MSBlobBuilder;
new(): MSBlobBuilder;
-}
+};
interface MSCredentials {
getAssertion(challenge: string, filter?: MSCredentialFilter, params?: MSSignatureParameters): Promise<MSAssertion>;
@@ -13413,7 +13662,7 @@ interface MSCredentials {
declare var MSCredentials: {
prototype: MSCredentials;
new(): MSCredentials;
-}
+};
interface MSFIDOCredentialAssertion extends MSAssertion {
readonly algorithm: string | Algorithm;
@@ -13425,7 +13674,7 @@ interface MSFIDOCredentialAssertion extends MSAssertion {
declare var MSFIDOCredentialAssertion: {
prototype: MSFIDOCredentialAssertion;
new(): MSFIDOCredentialAssertion;
-}
+};
interface MSFIDOSignature {
readonly authnrData: string;
@@ -13436,7 +13685,7 @@ interface MSFIDOSignature {
declare var MSFIDOSignature: {
prototype: MSFIDOSignature;
new(): MSFIDOSignature;
-}
+};
interface MSFIDOSignatureAssertion extends MSAssertion {
readonly signature: MSFIDOSignature;
@@ -13445,7 +13694,7 @@ interface MSFIDOSignatureAssertion extends MSAssertion {
declare var MSFIDOSignatureAssertion: {
prototype: MSFIDOSignatureAssertion;
new(): MSFIDOSignatureAssertion;
-}
+};
interface MSGesture {
target: Element;
@@ -13456,7 +13705,7 @@ interface MSGesture {
declare var MSGesture: {
prototype: MSGesture;
new(): MSGesture;
-}
+};
interface MSGestureEvent extends UIEvent {
readonly clientX: number;
@@ -13492,7 +13741,7 @@ declare var MSGestureEvent: {
readonly MSGESTURE_FLAG_END: number;
readonly MSGESTURE_FLAG_INERTIA: number;
readonly MSGESTURE_FLAG_NONE: number;
-}
+};
interface MSGraphicsTrust {
readonly constrictionActive: boolean;
@@ -13502,7 +13751,7 @@ interface MSGraphicsTrust {
declare var MSGraphicsTrust: {
prototype: MSGraphicsTrust;
new(): MSGraphicsTrust;
-}
+};
interface MSHTMLWebViewElement extends HTMLElement {
readonly canGoBack: boolean;
@@ -13536,7 +13785,7 @@ interface MSHTMLWebViewElement extends HTMLElement {
declare var MSHTMLWebViewElement: {
prototype: MSHTMLWebViewElement;
new(): MSHTMLWebViewElement;
-}
+};
interface MSInputMethodContextEventMap {
"MSCandidateWindowHide": Event;
@@ -13562,7 +13811,7 @@ interface MSInputMethodContext extends EventTarget {
declare var MSInputMethodContext: {
prototype: MSInputMethodContext;
new(): MSInputMethodContext;
-}
+};
interface MSManipulationEvent extends UIEvent {
readonly currentState: number;
@@ -13591,7 +13840,7 @@ declare var MSManipulationEvent: {
readonly MS_MANIPULATION_STATE_PRESELECT: number;
readonly MS_MANIPULATION_STATE_SELECTING: number;
readonly MS_MANIPULATION_STATE_STOPPED: number;
-}
+};
interface MSMediaKeyError {
readonly code: number;
@@ -13613,7 +13862,7 @@ declare var MSMediaKeyError: {
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;
@@ -13623,7 +13872,7 @@ interface MSMediaKeyMessageEvent extends Event {
declare var MSMediaKeyMessageEvent: {
prototype: MSMediaKeyMessageEvent;
new(): MSMediaKeyMessageEvent;
-}
+};
interface MSMediaKeyNeededEvent extends Event {
readonly initData: Uint8Array | null;
@@ -13632,8 +13881,20 @@ interface MSMediaKeyNeededEvent extends Event {
declare var MSMediaKeyNeededEvent: {
prototype: MSMediaKeyNeededEvent;
new(): MSMediaKeyNeededEvent;
+};
+
+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 MSMediaKeySession extends EventTarget {
readonly error: MSMediaKeyError | null;
readonly keySystem: string;
@@ -13645,19 +13906,7 @@ interface MSMediaKeySession extends EventTarget {
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;
@@ -13680,7 +13929,7 @@ interface MSPointerEvent extends MouseEvent {
declare var MSPointerEvent: {
prototype: MSPointerEvent;
new(typeArg: string, eventInitDict?: PointerEventInit): MSPointerEvent;
-}
+};
interface MSRangeCollection {
readonly length: number;
@@ -13691,7 +13940,7 @@ interface MSRangeCollection {
declare var MSRangeCollection: {
prototype: MSRangeCollection;
new(): MSRangeCollection;
-}
+};
interface MSSiteModeEvent extends Event {
readonly actionURL: string;
@@ -13701,7 +13950,7 @@ interface MSSiteModeEvent extends Event {
declare var MSSiteModeEvent: {
prototype: MSSiteModeEvent;
new(): MSSiteModeEvent;
-}
+};
interface MSStream {
readonly type: string;
@@ -13712,7 +13961,7 @@ interface MSStream {
declare var MSStream: {
prototype: MSStream;
new(): MSStream;
-}
+};
interface MSStreamReader extends EventTarget, MSBaseReader {
readonly error: DOMError;
@@ -13728,7 +13977,7 @@ interface MSStreamReader extends EventTarget, MSBaseReader {
declare var MSStreamReader: {
prototype: MSStreamReader;
new(): MSStreamReader;
-}
+};
interface MSWebViewAsyncOperationEventMap {
"complete": Event;
@@ -13763,7 +14012,7 @@ declare var MSWebViewAsyncOperation: {
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;
@@ -13773,389 +14022,7 @@ interface MSWebViewSettings {
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;
@@ -14175,7 +14042,7 @@ declare var MutationEvent: {
readonly ADDITION: number;
readonly MODIFICATION: number;
readonly REMOVAL: number;
-}
+};
interface MutationObserver {
disconnect(): void;
@@ -14186,7 +14053,7 @@ interface MutationObserver {
declare var MutationObserver: {
prototype: MutationObserver;
new(callback: MutationCallback): MutationObserver;
-}
+};
interface MutationRecord {
readonly addedNodes: NodeList;
@@ -14203,7 +14070,7 @@ interface MutationRecord {
declare var MutationRecord: {
prototype: MutationRecord;
new(): MutationRecord;
-}
+};
interface NamedNodeMap {
readonly length: number;
@@ -14220,7 +14087,7 @@ interface NamedNodeMap {
declare var NamedNodeMap: {
prototype: NamedNodeMap;
new(): NamedNodeMap;
-}
+};
interface NavigationCompletedEvent extends NavigationEvent {
readonly isSuccess: boolean;
@@ -14230,7 +14097,7 @@ interface NavigationCompletedEvent extends NavigationEvent {
declare var NavigationCompletedEvent: {
prototype: NavigationCompletedEvent;
new(): NavigationCompletedEvent;
-}
+};
interface NavigationEvent extends Event {
readonly uri: string;
@@ -14239,7 +14106,7 @@ interface NavigationEvent extends Event {
declare var NavigationEvent: {
prototype: NavigationEvent;
new(): NavigationEvent;
-}
+};
interface NavigationEventWithReferrer extends NavigationEvent {
readonly referer: string;
@@ -14248,7 +14115,7 @@ interface NavigationEventWithReferrer extends NavigationEvent {
declare var NavigationEventWithReferrer: {
prototype: NavigationEventWithReferrer;
new(): NavigationEventWithReferrer;
-}
+};
interface Navigator extends Object, NavigatorID, NavigatorOnLine, NavigatorContentUtils, NavigatorStorageUtils, NavigatorGeolocation, MSNavigatorDoNotTrack, MSFileSaver, NavigatorBeacon, NavigatorConcurrentHardware, NavigatorUserMedia {
readonly authentication: WebAuthentication;
@@ -14265,6 +14132,7 @@ interface Navigator extends Object, NavigatorID, NavigatorOnLine, NavigatorConte
readonly serviceWorker: ServiceWorkerContainer;
readonly webdriver: boolean;
readonly hardwareConcurrency: number;
+ readonly languages: string[];
getGamepads(): Gamepad[];
javaEnabled(): boolean;
msLaunchUri(uri: string, successCallback?: MSLaunchUriCallback, noHandlerCallback?: MSLaunchUriCallback): void;
@@ -14275,7 +14143,7 @@ interface Navigator extends Object, NavigatorID, NavigatorOnLine, NavigatorConte
declare var Navigator: {
prototype: Navigator;
new(): Navigator;
-}
+};
interface Node extends EventTarget {
readonly attributes: NamedNodeMap;
@@ -14350,7 +14218,7 @@ declare var Node: {
readonly NOTATION_NODE: number;
readonly PROCESSING_INSTRUCTION_NODE: number;
readonly TEXT_NODE: number;
-}
+};
interface NodeFilter {
acceptNode(n: Node): number;
@@ -14373,7 +14241,7 @@ declare var NodeFilter: {
readonly SHOW_NOTATION: number;
readonly SHOW_PROCESSING_INSTRUCTION: number;
readonly SHOW_TEXT: number;
-}
+};
interface NodeIterator {
readonly expandEntityReferences: boolean;
@@ -14388,7 +14256,7 @@ interface NodeIterator {
declare var NodeIterator: {
prototype: NodeIterator;
new(): NodeIterator;
-}
+};
interface NodeList {
readonly length: number;
@@ -14399,7 +14267,7 @@ interface NodeList {
declare var NodeList: {
prototype: NodeList;
new(): NodeList;
-}
+};
interface NotificationEventMap {
"click": Event;
@@ -14429,7 +14297,7 @@ declare var Notification: {
prototype: Notification;
new(title: string, options?: NotificationOptions): Notification;
requestPermission(callback?: NotificationPermissionCallback): Promise<NotificationPermission>;
-}
+};
interface OES_element_index_uint {
}
@@ -14437,7 +14305,7 @@ 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;
@@ -14447,7 +14315,7 @@ declare var OES_standard_derivatives: {
prototype: OES_standard_derivatives;
new(): OES_standard_derivatives;
readonly FRAGMENT_SHADER_DERIVATIVE_HINT_OES: number;
-}
+};
interface OES_texture_float {
}
@@ -14455,7 +14323,7 @@ interface OES_texture_float {
declare var OES_texture_float: {
prototype: OES_texture_float;
new(): OES_texture_float;
-}
+};
interface OES_texture_float_linear {
}
@@ -14463,7 +14331,7 @@ 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;
@@ -14473,7 +14341,7 @@ 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 {
}
@@ -14481,7 +14349,7 @@ 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;
@@ -14490,7 +14358,7 @@ interface OfflineAudioCompletionEvent extends Event {
declare var OfflineAudioCompletionEvent: {
prototype: OfflineAudioCompletionEvent;
new(): OfflineAudioCompletionEvent;
-}
+};
interface OfflineAudioContextEventMap extends AudioContextEventMap {
"complete": OfflineAudioCompletionEvent;
@@ -14508,7 +14376,7 @@ interface OfflineAudioContext extends AudioContextBase {
declare var OfflineAudioContext: {
prototype: OfflineAudioContext;
new(numberOfChannels: number, length: number, sampleRate: number): OfflineAudioContext;
-}
+};
interface OscillatorNodeEventMap {
"ended": MediaStreamErrorEvent;
@@ -14529,7 +14397,7 @@ interface OscillatorNode extends AudioNode {
declare var OscillatorNode: {
prototype: OscillatorNode;
new(): OscillatorNode;
-}
+};
interface OverflowEvent extends UIEvent {
readonly horizontalOverflow: boolean;
@@ -14546,7 +14414,7 @@ declare var OverflowEvent: {
readonly BOTH: number;
readonly HORIZONTAL: number;
readonly VERTICAL: number;
-}
+};
interface PageTransitionEvent extends Event {
readonly persisted: boolean;
@@ -14555,7 +14423,7 @@ interface PageTransitionEvent extends Event {
declare var PageTransitionEvent: {
prototype: PageTransitionEvent;
new(): PageTransitionEvent;
-}
+};
interface PannerNode extends AudioNode {
coneInnerAngle: number;
@@ -14574,7 +14442,7 @@ interface PannerNode extends AudioNode {
declare var PannerNode: {
prototype: PannerNode;
new(): PannerNode;
-}
+};
interface Path2D extends Object, CanvasPathMethods {
}
@@ -14582,7 +14450,7 @@ interface Path2D extends Object, CanvasPathMethods {
declare var Path2D: {
prototype: Path2D;
new(path?: Path2D): Path2D;
-}
+};
interface PaymentAddress {
readonly addressLine: string[];
@@ -14602,7 +14470,7 @@ interface PaymentAddress {
declare var PaymentAddress: {
prototype: PaymentAddress;
new(): PaymentAddress;
-}
+};
interface PaymentRequestEventMap {
"shippingaddresschange": Event;
@@ -14624,7 +14492,7 @@ interface PaymentRequest extends EventTarget {
declare var PaymentRequest: {
prototype: PaymentRequest;
new(methodData: PaymentMethodData[], details: PaymentDetails, options?: PaymentOptions): PaymentRequest;
-}
+};
interface PaymentRequestUpdateEvent extends Event {
updateWith(d: Promise<PaymentDetails>): void;
@@ -14633,7 +14501,7 @@ interface PaymentRequestUpdateEvent extends Event {
declare var PaymentRequestUpdateEvent: {
prototype: PaymentRequestUpdateEvent;
new(type: string, eventInitDict?: PaymentRequestUpdateEventInit): PaymentRequestUpdateEvent;
-}
+};
interface PaymentResponse {
readonly details: any;
@@ -14650,36 +14518,7 @@ interface PaymentResponse {
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;
@@ -14702,7 +14541,7 @@ interface Performance {
declare var Performance: {
prototype: Performance;
new(): Performance;
-}
+};
interface PerformanceEntry {
readonly duration: number;
@@ -14714,7 +14553,7 @@ interface PerformanceEntry {
declare var PerformanceEntry: {
prototype: PerformanceEntry;
new(): PerformanceEntry;
-}
+};
interface PerformanceMark extends PerformanceEntry {
}
@@ -14722,7 +14561,7 @@ interface PerformanceMark extends PerformanceEntry {
declare var PerformanceMark: {
prototype: PerformanceMark;
new(): PerformanceMark;
-}
+};
interface PerformanceMeasure extends PerformanceEntry {
}
@@ -14730,7 +14569,7 @@ interface PerformanceMeasure extends PerformanceEntry {
declare var PerformanceMeasure: {
prototype: PerformanceMeasure;
new(): PerformanceMeasure;
-}
+};
interface PerformanceNavigation {
readonly redirectCount: number;
@@ -14749,18 +14588,18 @@ declare var PerformanceNavigation: {
readonly TYPE_NAVIGATE: number;
readonly TYPE_RELOAD: number;
readonly TYPE_RESERVED: number;
-}
+};
interface PerformanceNavigationTiming extends PerformanceEntry {
readonly connectEnd: number;
readonly connectStart: number;
+ readonly domainLookupEnd: number;
+ readonly domainLookupStart: 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;
@@ -14779,7 +14618,7 @@ interface PerformanceNavigationTiming extends PerformanceEntry {
declare var PerformanceNavigationTiming: {
prototype: PerformanceNavigationTiming;
new(): PerformanceNavigationTiming;
-}
+};
interface PerformanceResourceTiming extends PerformanceEntry {
readonly connectEnd: number;
@@ -14798,18 +14637,18 @@ interface PerformanceResourceTiming extends PerformanceEntry {
declare var PerformanceResourceTiming: {
prototype: PerformanceResourceTiming;
new(): PerformanceResourceTiming;
-}
+};
interface PerformanceTiming {
readonly connectEnd: number;
readonly connectStart: number;
+ readonly domainLookupEnd: number;
+ readonly domainLookupStart: 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;
@@ -14829,15 +14668,44 @@ interface PerformanceTiming {
declare var PerformanceTiming: {
prototype: PerformanceTiming;
new(): PerformanceTiming;
+};
+
+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 PeriodicWave {
}
declare var PeriodicWave: {
prototype: PeriodicWave;
new(): PeriodicWave;
-}
+};
interface PermissionRequest extends DeferredPermissionRequest {
readonly state: MSWebViewPermissionState;
@@ -14847,7 +14715,7 @@ interface PermissionRequest extends DeferredPermissionRequest {
declare var PermissionRequest: {
prototype: PermissionRequest;
new(): PermissionRequest;
-}
+};
interface PermissionRequestedEvent extends Event {
readonly permissionRequest: PermissionRequest;
@@ -14856,7 +14724,7 @@ interface PermissionRequestedEvent extends Event {
declare var PermissionRequestedEvent: {
prototype: PermissionRequestedEvent;
new(): PermissionRequestedEvent;
-}
+};
interface Plugin {
readonly description: string;
@@ -14872,7 +14740,7 @@ interface Plugin {
declare var Plugin: {
prototype: Plugin;
new(): Plugin;
-}
+};
interface PluginArray {
readonly length: number;
@@ -14885,7 +14753,7 @@ interface PluginArray {
declare var PluginArray: {
prototype: PluginArray;
new(): PluginArray;
-}
+};
interface PointerEvent extends MouseEvent {
readonly currentPoint: any;
@@ -14908,7 +14776,7 @@ interface PointerEvent extends MouseEvent {
declare var PointerEvent: {
prototype: PointerEvent;
new(typeArg: string, eventInitDict?: PointerEventInit): PointerEvent;
-}
+};
interface PopStateEvent extends Event {
readonly state: any;
@@ -14918,7 +14786,7 @@ interface PopStateEvent extends Event {
declare var PopStateEvent: {
prototype: PopStateEvent;
new(typeArg: string, eventInitDict?: PopStateEventInit): PopStateEvent;
-}
+};
interface Position {
readonly coords: Coordinates;
@@ -14928,7 +14796,7 @@ interface Position {
declare var Position: {
prototype: Position;
new(): Position;
-}
+};
interface PositionError {
readonly code: number;
@@ -14945,7 +14813,7 @@ declare var PositionError: {
readonly PERMISSION_DENIED: number;
readonly POSITION_UNAVAILABLE: number;
readonly TIMEOUT: number;
-}
+};
interface ProcessingInstruction extends CharacterData {
readonly target: string;
@@ -14954,7 +14822,7 @@ interface ProcessingInstruction extends CharacterData {
declare var ProcessingInstruction: {
prototype: ProcessingInstruction;
new(): ProcessingInstruction;
-}
+};
interface ProgressEvent extends Event {
readonly lengthComputable: boolean;
@@ -14966,7 +14834,7 @@ interface ProgressEvent extends Event {
declare var ProgressEvent: {
prototype: ProgressEvent;
new(type: string, eventInitDict?: ProgressEventInit): ProgressEvent;
-}
+};
interface PushManager {
getSubscription(): Promise<PushSubscription>;
@@ -14977,7 +14845,7 @@ interface PushManager {
declare var PushManager: {
prototype: PushManager;
new(): PushManager;
-}
+};
interface PushSubscription {
readonly endpoint: USVString;
@@ -14990,7 +14858,7 @@ interface PushSubscription {
declare var PushSubscription: {
prototype: PushSubscription;
new(): PushSubscription;
-}
+};
interface PushSubscriptionOptions {
readonly applicationServerKey: ArrayBuffer | null;
@@ -15000,17 +14868,114 @@ interface PushSubscriptionOptions {
declare var PushSubscriptionOptions: {
prototype: PushSubscriptionOptions;
new(): PushSubscriptionOptions;
+};
+
+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;
}
-interface RTCDTMFToneChangeEvent extends Event {
- readonly tone: string;
+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 RTCDTMFToneChangeEvent: {
- prototype: RTCDTMFToneChangeEvent;
- new(typeArg: string, eventInitDict: RTCDTMFToneChangeEventInit): RTCDTMFToneChangeEvent;
+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;
+ error: () => Response;
+ redirect: (url: string, status?: number) => Response;
+};
+
interface RTCDtlsTransportEventMap {
"dtlsstatechange": RTCDtlsTransportStateChangedEvent;
"error": Event;
@@ -15033,7 +14998,7 @@ interface RTCDtlsTransport extends RTCStatsProvider {
declare var RTCDtlsTransport: {
prototype: RTCDtlsTransport;
new(transport: RTCIceTransport): RTCDtlsTransport;
-}
+};
interface RTCDtlsTransportStateChangedEvent extends Event {
readonly state: RTCDtlsTransportState;
@@ -15042,7 +15007,7 @@ interface RTCDtlsTransportStateChangedEvent extends Event {
declare var RTCDtlsTransportStateChangedEvent: {
prototype: RTCDtlsTransportStateChangedEvent;
new(): RTCDtlsTransportStateChangedEvent;
-}
+};
interface RTCDtmfSenderEventMap {
"tonechange": RTCDTMFToneChangeEvent;
@@ -15063,19 +15028,28 @@ interface RTCDtmfSender extends EventTarget {
declare var RTCDtmfSender: {
prototype: RTCDtmfSender;
new(sender: RTCRtpSender): RTCDtmfSender;
+};
+
+interface RTCDTMFToneChangeEvent extends Event {
+ readonly tone: string;
}
+declare var RTCDTMFToneChangeEvent: {
+ prototype: RTCDTMFToneChangeEvent;
+ new(typeArg: string, eventInitDict: RTCDTMFToneChangeEventInit): RTCDTMFToneChangeEvent;
+};
+
interface RTCIceCandidate {
candidate: string | null;
- sdpMLineIndex: number | null;
sdpMid: string | null;
+ sdpMLineIndex: number | null;
toJSON(): any;
}
declare var RTCIceCandidate: {
prototype: RTCIceCandidate;
new(candidateInitDict?: RTCIceCandidateInit): RTCIceCandidate;
-}
+};
interface RTCIceCandidatePairChangedEvent extends Event {
readonly pair: RTCIceCandidatePair;
@@ -15084,7 +15058,7 @@ interface RTCIceCandidatePairChangedEvent extends Event {
declare var RTCIceCandidatePairChangedEvent: {
prototype: RTCIceCandidatePairChangedEvent;
new(): RTCIceCandidatePairChangedEvent;
-}
+};
interface RTCIceGathererEventMap {
"error": Event;
@@ -15105,7 +15079,7 @@ interface RTCIceGatherer extends RTCStatsProvider {
declare var RTCIceGatherer: {
prototype: RTCIceGatherer;
new(options: RTCIceGatherOptions): RTCIceGatherer;
-}
+};
interface RTCIceGathererEvent extends Event {
readonly candidate: RTCIceCandidateDictionary | RTCIceCandidateComplete;
@@ -15114,7 +15088,7 @@ interface RTCIceGathererEvent extends Event {
declare var RTCIceGathererEvent: {
prototype: RTCIceGathererEvent;
new(): RTCIceGathererEvent;
-}
+};
interface RTCIceTransportEventMap {
"candidatepairchange": RTCIceCandidatePairChangedEvent;
@@ -15143,7 +15117,7 @@ interface RTCIceTransport extends RTCStatsProvider {
declare var RTCIceTransport: {
prototype: RTCIceTransport;
new(): RTCIceTransport;
-}
+};
interface RTCIceTransportStateChangedEvent extends Event {
readonly state: RTCIceTransportState;
@@ -15152,7 +15126,7 @@ interface RTCIceTransportStateChangedEvent extends Event {
declare var RTCIceTransportStateChangedEvent: {
prototype: RTCIceTransportStateChangedEvent;
new(): RTCIceTransportStateChangedEvent;
-}
+};
interface RTCPeerConnectionEventMap {
"addstream": MediaStreamEvent;
@@ -15198,7 +15172,7 @@ interface RTCPeerConnection extends EventTarget {
declare var RTCPeerConnection: {
prototype: RTCPeerConnection;
new(configuration: RTCConfiguration): RTCPeerConnection;
-}
+};
interface RTCPeerConnectionIceEvent extends Event {
readonly candidate: RTCIceCandidate;
@@ -15207,7 +15181,7 @@ interface RTCPeerConnectionIceEvent extends Event {
declare var RTCPeerConnectionIceEvent: {
prototype: RTCPeerConnectionIceEvent;
new(type: string, eventInitDict: RTCPeerConnectionIceEventInit): RTCPeerConnectionIceEvent;
-}
+};
interface RTCRtpReceiverEventMap {
"error": Event;
@@ -15231,7 +15205,7 @@ declare var RTCRtpReceiver: {
prototype: RTCRtpReceiver;
new(transport: RTCDtlsTransport | RTCSrtpSdesTransport, kind: string, rtcpTransport?: RTCDtlsTransport): RTCRtpReceiver;
getCapabilities(kind?: string): RTCRtpCapabilities;
-}
+};
interface RTCRtpSenderEventMap {
"error": Event;
@@ -15256,7 +15230,7 @@ declare var RTCRtpSender: {
prototype: RTCRtpSender;
new(track: MediaStreamTrack, transport: RTCDtlsTransport | RTCSrtpSdesTransport, rtcpTransport?: RTCDtlsTransport): RTCRtpSender;
getCapabilities(kind?: string): RTCRtpCapabilities;
-}
+};
interface RTCSessionDescription {
sdp: string | null;
@@ -15267,7 +15241,7 @@ interface RTCSessionDescription {
declare var RTCSessionDescription: {
prototype: RTCSessionDescription;
new(descriptionInitDict?: RTCSessionDescriptionInit): RTCSessionDescription;
-}
+};
interface RTCSrtpSdesTransportEventMap {
"error": Event;
@@ -15284,7 +15258,7 @@ declare var RTCSrtpSdesTransport: {
prototype: RTCSrtpSdesTransport;
new(transport: RTCIceTransport, encryptParameters: RTCSrtpSdesParameters, decryptParameters: RTCSrtpSdesParameters): RTCSrtpSdesTransport;
getLocalParameters(): RTCSrtpSdesParameters[];
-}
+};
interface RTCSsrcConflictEvent extends Event {
readonly ssrc: number;
@@ -15293,7 +15267,7 @@ interface RTCSsrcConflictEvent extends Event {
declare var RTCSsrcConflictEvent: {
prototype: RTCSsrcConflictEvent;
new(): RTCSsrcConflictEvent;
-}
+};
interface RTCStatsProvider extends EventTarget {
getStats(): Promise<RTCStatsReport>;
@@ -15303,112 +15277,421 @@ interface RTCStatsProvider extends EventTarget {
declare var RTCStatsProvider: {
prototype: RTCStatsProvider;
new(): RTCStatsProvider;
+};
+
+interface ScopedCredential {
+ readonly id: ArrayBuffer;
+ readonly type: ScopedCredentialType;
}
-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;
+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;
- 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;
+declare var Selection: {
+ prototype: Selection;
+ new(): Selection;
+};
+
+interface ServiceWorkerEventMap extends AbstractWorkerEventMap {
+ "statechange": Event;
}
-interface ReadableStream {
- readonly locked: boolean;
- cancel(): Promise<void>;
- getReader(): ReadableStreamReader;
+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 ReadableStream: {
- prototype: ReadableStream;
- new(): ReadableStream;
+declare var ServiceWorker: {
+ prototype: ServiceWorker;
+ new(): ServiceWorker;
+};
+
+interface ServiceWorkerContainerEventMap {
+ "controllerchange": Event;
+ "message": ServiceWorkerMessageEvent;
}
-interface ReadableStreamReader {
- cancel(): Promise<void>;
- read(): Promise<any>;
- releaseLock(): void;
+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 ReadableStreamReader: {
- prototype: ReadableStreamReader;
- new(): ReadableStreamReader;
+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;
}
-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 ServiceWorkerMessageEvent: {
+ prototype: ServiceWorkerMessageEvent;
+ new(type: string, eventInitDict?: ServiceWorkerMessageEventInit): ServiceWorkerMessageEvent;
+};
+
+interface ServiceWorkerRegistrationEventMap {
+ "updatefound": Event;
}
-declare var Request: {
- prototype: Request;
- new(input: Request | string, init?: RequestInit): Request;
+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;
}
-interface Response extends Object, Body {
- readonly body: ReadableStream | null;
- readonly headers: Headers;
- readonly ok: boolean;
- readonly status: number;
- readonly statusText: string;
- readonly type: ResponseType;
+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;
- clone(): Response;
+ key?: string;
+ oldValue?: string;
+ newValue?: string;
+ storageArea?: Storage;
}
-declare var Response: {
- prototype: Response;
- new(body?: any, init?: ResponseInit): Response;
+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 SVGAElement extends SVGGraphicsElement, SVGURIReference {
readonly target: SVGAnimatedString;
addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGAElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
@@ -15418,7 +15701,7 @@ interface SVGAElement extends SVGGraphicsElement, SVGURIReference {
declare var SVGAElement: {
prototype: SVGAElement;
new(): SVGAElement;
-}
+};
interface SVGAngle {
readonly unitType: number;
@@ -15442,7 +15725,7 @@ declare var SVGAngle: {
readonly SVG_ANGLETYPE_RAD: number;
readonly SVG_ANGLETYPE_UNKNOWN: number;
readonly SVG_ANGLETYPE_UNSPECIFIED: number;
-}
+};
interface SVGAnimatedAngle {
readonly animVal: SVGAngle;
@@ -15452,7 +15735,7 @@ interface SVGAnimatedAngle {
declare var SVGAnimatedAngle: {
prototype: SVGAnimatedAngle;
new(): SVGAnimatedAngle;
-}
+};
interface SVGAnimatedBoolean {
readonly animVal: boolean;
@@ -15462,7 +15745,7 @@ interface SVGAnimatedBoolean {
declare var SVGAnimatedBoolean: {
prototype: SVGAnimatedBoolean;
new(): SVGAnimatedBoolean;
-}
+};
interface SVGAnimatedEnumeration {
readonly animVal: number;
@@ -15472,7 +15755,7 @@ interface SVGAnimatedEnumeration {
declare var SVGAnimatedEnumeration: {
prototype: SVGAnimatedEnumeration;
new(): SVGAnimatedEnumeration;
-}
+};
interface SVGAnimatedInteger {
readonly animVal: number;
@@ -15482,7 +15765,7 @@ interface SVGAnimatedInteger {
declare var SVGAnimatedInteger: {
prototype: SVGAnimatedInteger;
new(): SVGAnimatedInteger;
-}
+};
interface SVGAnimatedLength {
readonly animVal: SVGLength;
@@ -15492,7 +15775,7 @@ interface SVGAnimatedLength {
declare var SVGAnimatedLength: {
prototype: SVGAnimatedLength;
new(): SVGAnimatedLength;
-}
+};
interface SVGAnimatedLengthList {
readonly animVal: SVGLengthList;
@@ -15502,7 +15785,7 @@ interface SVGAnimatedLengthList {
declare var SVGAnimatedLengthList: {
prototype: SVGAnimatedLengthList;
new(): SVGAnimatedLengthList;
-}
+};
interface SVGAnimatedNumber {
readonly animVal: number;
@@ -15512,7 +15795,7 @@ interface SVGAnimatedNumber {
declare var SVGAnimatedNumber: {
prototype: SVGAnimatedNumber;
new(): SVGAnimatedNumber;
-}
+};
interface SVGAnimatedNumberList {
readonly animVal: SVGNumberList;
@@ -15522,7 +15805,7 @@ interface SVGAnimatedNumberList {
declare var SVGAnimatedNumberList: {
prototype: SVGAnimatedNumberList;
new(): SVGAnimatedNumberList;
-}
+};
interface SVGAnimatedPreserveAspectRatio {
readonly animVal: SVGPreserveAspectRatio;
@@ -15532,7 +15815,7 @@ interface SVGAnimatedPreserveAspectRatio {
declare var SVGAnimatedPreserveAspectRatio: {
prototype: SVGAnimatedPreserveAspectRatio;
new(): SVGAnimatedPreserveAspectRatio;
-}
+};
interface SVGAnimatedRect {
readonly animVal: SVGRect;
@@ -15542,7 +15825,7 @@ interface SVGAnimatedRect {
declare var SVGAnimatedRect: {
prototype: SVGAnimatedRect;
new(): SVGAnimatedRect;
-}
+};
interface SVGAnimatedString {
readonly animVal: string;
@@ -15552,7 +15835,7 @@ interface SVGAnimatedString {
declare var SVGAnimatedString: {
prototype: SVGAnimatedString;
new(): SVGAnimatedString;
-}
+};
interface SVGAnimatedTransformList {
readonly animVal: SVGTransformList;
@@ -15562,7 +15845,7 @@ interface SVGAnimatedTransformList {
declare var SVGAnimatedTransformList: {
prototype: SVGAnimatedTransformList;
new(): SVGAnimatedTransformList;
-}
+};
interface SVGCircleElement extends SVGGraphicsElement {
readonly cx: SVGAnimatedLength;
@@ -15575,7 +15858,7 @@ interface SVGCircleElement extends SVGGraphicsElement {
declare var SVGCircleElement: {
prototype: SVGCircleElement;
new(): SVGCircleElement;
-}
+};
interface SVGClipPathElement extends SVGGraphicsElement, SVGUnitTypes {
readonly clipPathUnits: SVGAnimatedEnumeration;
@@ -15586,7 +15869,7 @@ interface SVGClipPathElement extends SVGGraphicsElement, SVGUnitTypes {
declare var SVGClipPathElement: {
prototype: SVGClipPathElement;
new(): SVGClipPathElement;
-}
+};
interface SVGComponentTransferFunctionElement extends SVGElement {
readonly amplitude: SVGAnimatedNumber;
@@ -15615,7 +15898,7 @@ declare var SVGComponentTransferFunctionElement: {
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;
@@ -15625,7 +15908,7 @@ interface SVGDefsElement extends SVGGraphicsElement {
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;
@@ -15635,7 +15918,7 @@ interface SVGDescElement extends SVGElement {
declare var SVGDescElement: {
prototype: SVGDescElement;
new(): SVGDescElement;
-}
+};
interface SVGElementEventMap extends ElementEventMap {
"click": MouseEvent;
@@ -15673,7 +15956,7 @@ interface SVGElement extends Element {
declare var SVGElement: {
prototype: SVGElement;
new(): SVGElement;
-}
+};
interface SVGElementInstance extends EventTarget {
readonly childNodes: SVGElementInstanceList;
@@ -15689,7 +15972,7 @@ interface SVGElementInstance extends EventTarget {
declare var SVGElementInstance: {
prototype: SVGElementInstance;
new(): SVGElementInstance;
-}
+};
interface SVGElementInstanceList {
readonly length: number;
@@ -15699,7 +15982,7 @@ interface SVGElementInstanceList {
declare var SVGElementInstanceList: {
prototype: SVGElementInstanceList;
new(): SVGElementInstanceList;
-}
+};
interface SVGEllipseElement extends SVGGraphicsElement {
readonly cx: SVGAnimatedLength;
@@ -15713,7 +15996,7 @@ interface SVGEllipseElement extends SVGGraphicsElement {
declare var SVGEllipseElement: {
prototype: SVGEllipseElement;
new(): SVGEllipseElement;
-}
+};
interface SVGFEBlendElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
readonly in1: SVGAnimatedString;
@@ -15760,7 +16043,7 @@ declare var SVGFEBlendElement: {
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;
@@ -15783,7 +16066,7 @@ declare var SVGFEColorMatrixElement: {
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;
@@ -15794,7 +16077,7 @@ interface SVGFEComponentTransferElement extends SVGElement, SVGFilterPrimitiveSt
declare var SVGFEComponentTransferElement: {
prototype: SVGFEComponentTransferElement;
new(): SVGFEComponentTransferElement;
-}
+};
interface SVGFECompositeElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
readonly in1: SVGAnimatedString;
@@ -15825,7 +16108,7 @@ declare var SVGFECompositeElement: {
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;
@@ -15855,7 +16138,7 @@ declare var SVGFEConvolveMatrixElement: {
readonly SVG_EDGEMODE_NONE: number;
readonly SVG_EDGEMODE_UNKNOWN: number;
readonly SVG_EDGEMODE_WRAP: number;
-}
+};
interface SVGFEDiffuseLightingElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
readonly diffuseConstant: SVGAnimatedNumber;
@@ -15870,7 +16153,7 @@ interface SVGFEDiffuseLightingElement extends SVGElement, SVGFilterPrimitiveStan
declare var SVGFEDiffuseLightingElement: {
prototype: SVGFEDiffuseLightingElement;
new(): SVGFEDiffuseLightingElement;
-}
+};
interface SVGFEDisplacementMapElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
readonly in1: SVGAnimatedString;
@@ -15895,7 +16178,7 @@ declare var SVGFEDisplacementMapElement: {
readonly SVG_CHANNEL_G: number;
readonly SVG_CHANNEL_R: number;
readonly SVG_CHANNEL_UNKNOWN: number;
-}
+};
interface SVGFEDistantLightElement extends SVGElement {
readonly azimuth: SVGAnimatedNumber;
@@ -15907,7 +16190,7 @@ interface SVGFEDistantLightElement extends SVGElement {
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;
@@ -15917,7 +16200,7 @@ interface SVGFEFloodElement extends SVGElement, SVGFilterPrimitiveStandardAttrib
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;
@@ -15927,7 +16210,7 @@ interface SVGFEFuncAElement extends SVGComponentTransferFunctionElement {
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;
@@ -15937,7 +16220,7 @@ interface SVGFEFuncBElement extends SVGComponentTransferFunctionElement {
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;
@@ -15947,7 +16230,7 @@ interface SVGFEFuncGElement extends SVGComponentTransferFunctionElement {
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;
@@ -15957,7 +16240,7 @@ interface SVGFEFuncRElement extends SVGComponentTransferFunctionElement {
declare var SVGFEFuncRElement: {
prototype: SVGFEFuncRElement;
new(): SVGFEFuncRElement;
-}
+};
interface SVGFEGaussianBlurElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
readonly in1: SVGAnimatedString;
@@ -15971,7 +16254,7 @@ interface SVGFEGaussianBlurElement extends SVGElement, SVGFilterPrimitiveStandar
declare var SVGFEGaussianBlurElement: {
prototype: SVGFEGaussianBlurElement;
new(): SVGFEGaussianBlurElement;
-}
+};
interface SVGFEImageElement extends SVGElement, SVGFilterPrimitiveStandardAttributes, SVGURIReference {
readonly preserveAspectRatio: SVGAnimatedPreserveAspectRatio;
@@ -15982,7 +16265,7 @@ interface SVGFEImageElement extends SVGElement, SVGFilterPrimitiveStandardAttrib
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;
@@ -15992,7 +16275,7 @@ interface SVGFEMergeElement extends SVGElement, SVGFilterPrimitiveStandardAttrib
declare var SVGFEMergeElement: {
prototype: SVGFEMergeElement;
new(): SVGFEMergeElement;
-}
+};
interface SVGFEMergeNodeElement extends SVGElement {
readonly in1: SVGAnimatedString;
@@ -16003,7 +16286,7 @@ interface SVGFEMergeNodeElement extends SVGElement {
declare var SVGFEMergeNodeElement: {
prototype: SVGFEMergeNodeElement;
new(): SVGFEMergeNodeElement;
-}
+};
interface SVGFEMorphologyElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
readonly in1: SVGAnimatedString;
@@ -16023,7 +16306,7 @@ declare var 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;
@@ -16036,7 +16319,7 @@ interface SVGFEOffsetElement extends SVGElement, SVGFilterPrimitiveStandardAttri
declare var SVGFEOffsetElement: {
prototype: SVGFEOffsetElement;
new(): SVGFEOffsetElement;
-}
+};
interface SVGFEPointLightElement extends SVGElement {
readonly x: SVGAnimatedNumber;
@@ -16049,7 +16332,7 @@ interface SVGFEPointLightElement extends SVGElement {
declare var SVGFEPointLightElement: {
prototype: SVGFEPointLightElement;
new(): SVGFEPointLightElement;
-}
+};
interface SVGFESpecularLightingElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
readonly in1: SVGAnimatedString;
@@ -16065,7 +16348,7 @@ interface SVGFESpecularLightingElement extends SVGElement, SVGFilterPrimitiveSta
declare var SVGFESpecularLightingElement: {
prototype: SVGFESpecularLightingElement;
new(): SVGFESpecularLightingElement;
-}
+};
interface SVGFESpotLightElement extends SVGElement {
readonly limitingConeAngle: SVGAnimatedNumber;
@@ -16083,7 +16366,7 @@ interface SVGFESpotLightElement extends SVGElement {
declare var SVGFESpotLightElement: {
prototype: SVGFESpotLightElement;
new(): SVGFESpotLightElement;
-}
+};
interface SVGFETileElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
readonly in1: SVGAnimatedString;
@@ -16094,7 +16377,7 @@ interface SVGFETileElement extends SVGElement, SVGFilterPrimitiveStandardAttribu
declare var SVGFETileElement: {
prototype: SVGFETileElement;
new(): SVGFETileElement;
-}
+};
interface SVGFETurbulenceElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
readonly baseFrequencyX: SVGAnimatedNumber;
@@ -16122,7 +16405,7 @@ declare var SVGFETurbulenceElement: {
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;
@@ -16141,7 +16424,7 @@ interface SVGFilterElement extends SVGElement, SVGUnitTypes, SVGURIReference {
declare var SVGFilterElement: {
prototype: SVGFilterElement;
new(): SVGFilterElement;
-}
+};
interface SVGForeignObjectElement extends SVGGraphicsElement {
readonly height: SVGAnimatedLength;
@@ -16155,7 +16438,7 @@ interface SVGForeignObjectElement extends SVGGraphicsElement {
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;
@@ -16165,7 +16448,7 @@ interface SVGGElement extends SVGGraphicsElement {
declare var SVGGElement: {
prototype: SVGGElement;
new(): SVGGElement;
-}
+};
interface SVGGradientElement extends SVGElement, SVGUnitTypes, SVGURIReference {
readonly gradientTransform: SVGAnimatedTransformList;
@@ -16186,7 +16469,7 @@ declare var SVGGradientElement: {
readonly SVG_SPREADMETHOD_REFLECT: number;
readonly SVG_SPREADMETHOD_REPEAT: number;
readonly SVG_SPREADMETHOD_UNKNOWN: number;
-}
+};
interface SVGGraphicsElement extends SVGElement, SVGTests {
readonly farthestViewportElement: SVGElement;
@@ -16203,7 +16486,7 @@ interface SVGGraphicsElement extends SVGElement, SVGTests {
declare var SVGGraphicsElement: {
prototype: SVGGraphicsElement;
new(): SVGGraphicsElement;
-}
+};
interface SVGImageElement extends SVGGraphicsElement, SVGURIReference {
readonly height: SVGAnimatedLength;
@@ -16218,7 +16501,7 @@ interface SVGImageElement extends SVGGraphicsElement, SVGURIReference {
declare var SVGImageElement: {
prototype: SVGImageElement;
new(): SVGImageElement;
-}
+};
interface SVGLength {
readonly unitType: number;
@@ -16254,7 +16537,7 @@ declare var SVGLength: {
readonly SVG_LENGTHTYPE_PT: number;
readonly SVG_LENGTHTYPE_PX: number;
readonly SVG_LENGTHTYPE_UNKNOWN: number;
-}
+};
interface SVGLengthList {
readonly numberOfItems: number;
@@ -16270,35 +16553,35 @@ interface SVGLengthList {
declare var SVGLengthList: {
prototype: SVGLengthList;
new(): SVGLengthList;
-}
+};
-interface SVGLineElement extends SVGGraphicsElement {
+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: SVGLineElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ 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 SVGLineElement: {
- prototype: SVGLineElement;
- new(): SVGLineElement;
-}
+declare var SVGLinearGradientElement: {
+ prototype: SVGLinearGradientElement;
+ new(): SVGLinearGradientElement;
+};
-interface SVGLinearGradientElement extends SVGGradientElement {
+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: SVGLinearGradientElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ 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 SVGLinearGradientElement: {
- prototype: SVGLinearGradientElement;
- new(): SVGLinearGradientElement;
-}
+declare var SVGLineElement: {
+ prototype: SVGLineElement;
+ new(): SVGLineElement;
+};
interface SVGMarkerElement extends SVGElement, SVGFitToViewBox {
readonly markerHeight: SVGAnimatedLength;
@@ -16310,12 +16593,12 @@ interface SVGMarkerElement extends SVGElement, SVGFitToViewBox {
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;
+ readonly SVG_MARKERUNITS_STROKEWIDTH: number;
+ readonly SVG_MARKERUNITS_UNKNOWN: number;
+ readonly SVG_MARKERUNITS_USERSPACEONUSE: 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;
}
@@ -16323,13 +16606,13 @@ interface SVGMarkerElement extends SVGElement, SVGFitToViewBox {
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;
-}
+ readonly SVG_MARKERUNITS_STROKEWIDTH: number;
+ readonly SVG_MARKERUNITS_UNKNOWN: number;
+ readonly SVG_MARKERUNITS_USERSPACEONUSE: number;
+};
interface SVGMaskElement extends SVGElement, SVGTests, SVGUnitTypes {
readonly height: SVGAnimatedLength;
@@ -16345,7 +16628,7 @@ interface SVGMaskElement extends SVGElement, SVGTests, SVGUnitTypes {
declare var SVGMaskElement: {
prototype: SVGMaskElement;
new(): SVGMaskElement;
-}
+};
interface SVGMatrix {
a: number;
@@ -16370,7 +16653,7 @@ interface 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;
@@ -16380,7 +16663,7 @@ interface SVGMetadataElement extends SVGElement {
declare var SVGMetadataElement: {
prototype: SVGMetadataElement;
new(): SVGMetadataElement;
-}
+};
interface SVGNumber {
value: number;
@@ -16389,7 +16672,7 @@ interface SVGNumber {
declare var SVGNumber: {
prototype: SVGNumber;
new(): SVGNumber;
-}
+};
interface SVGNumberList {
readonly numberOfItems: number;
@@ -16405,7 +16688,7 @@ interface SVGNumberList {
declare var SVGNumberList: {
prototype: SVGNumberList;
new(): SVGNumberList;
-}
+};
interface SVGPathElement extends SVGGraphicsElement {
readonly pathSegList: SVGPathSegList;
@@ -16438,7 +16721,7 @@ interface SVGPathElement extends SVGGraphicsElement {
declare var SVGPathElement: {
prototype: SVGPathElement;
new(): SVGPathElement;
-}
+};
interface SVGPathSeg {
readonly pathSegType: number;
@@ -16488,7 +16771,7 @@ declare var SVGPathSeg: {
readonly PATHSEG_MOVETO_ABS: number;
readonly PATHSEG_MOVETO_REL: number;
readonly PATHSEG_UNKNOWN: number;
-}
+};
interface SVGPathSegArcAbs extends SVGPathSeg {
angle: number;
@@ -16503,7 +16786,7 @@ interface SVGPathSegArcAbs extends SVGPathSeg {
declare var SVGPathSegArcAbs: {
prototype: SVGPathSegArcAbs;
new(): SVGPathSegArcAbs;
-}
+};
interface SVGPathSegArcRel extends SVGPathSeg {
angle: number;
@@ -16518,7 +16801,7 @@ interface SVGPathSegArcRel extends SVGPathSeg {
declare var SVGPathSegArcRel: {
prototype: SVGPathSegArcRel;
new(): SVGPathSegArcRel;
-}
+};
interface SVGPathSegClosePath extends SVGPathSeg {
}
@@ -16526,7 +16809,7 @@ interface SVGPathSegClosePath extends SVGPathSeg {
declare var SVGPathSegClosePath: {
prototype: SVGPathSegClosePath;
new(): SVGPathSegClosePath;
-}
+};
interface SVGPathSegCurvetoCubicAbs extends SVGPathSeg {
x: number;
@@ -16540,7 +16823,7 @@ interface SVGPathSegCurvetoCubicAbs extends SVGPathSeg {
declare var SVGPathSegCurvetoCubicAbs: {
prototype: SVGPathSegCurvetoCubicAbs;
new(): SVGPathSegCurvetoCubicAbs;
-}
+};
interface SVGPathSegCurvetoCubicRel extends SVGPathSeg {
x: number;
@@ -16554,7 +16837,7 @@ interface SVGPathSegCurvetoCubicRel extends SVGPathSeg {
declare var SVGPathSegCurvetoCubicRel: {
prototype: SVGPathSegCurvetoCubicRel;
new(): SVGPathSegCurvetoCubicRel;
-}
+};
interface SVGPathSegCurvetoCubicSmoothAbs extends SVGPathSeg {
x: number;
@@ -16566,7 +16849,7 @@ interface SVGPathSegCurvetoCubicSmoothAbs extends SVGPathSeg {
declare var SVGPathSegCurvetoCubicSmoothAbs: {
prototype: SVGPathSegCurvetoCubicSmoothAbs;
new(): SVGPathSegCurvetoCubicSmoothAbs;
-}
+};
interface SVGPathSegCurvetoCubicSmoothRel extends SVGPathSeg {
x: number;
@@ -16578,7 +16861,7 @@ interface SVGPathSegCurvetoCubicSmoothRel extends SVGPathSeg {
declare var SVGPathSegCurvetoCubicSmoothRel: {
prototype: SVGPathSegCurvetoCubicSmoothRel;
new(): SVGPathSegCurvetoCubicSmoothRel;
-}
+};
interface SVGPathSegCurvetoQuadraticAbs extends SVGPathSeg {
x: number;
@@ -16590,7 +16873,7 @@ interface SVGPathSegCurvetoQuadraticAbs extends SVGPathSeg {
declare var SVGPathSegCurvetoQuadraticAbs: {
prototype: SVGPathSegCurvetoQuadraticAbs;
new(): SVGPathSegCurvetoQuadraticAbs;
-}
+};
interface SVGPathSegCurvetoQuadraticRel extends SVGPathSeg {
x: number;
@@ -16602,7 +16885,7 @@ interface SVGPathSegCurvetoQuadraticRel extends SVGPathSeg {
declare var SVGPathSegCurvetoQuadraticRel: {
prototype: SVGPathSegCurvetoQuadraticRel;
new(): SVGPathSegCurvetoQuadraticRel;
-}
+};
interface SVGPathSegCurvetoQuadraticSmoothAbs extends SVGPathSeg {
x: number;
@@ -16612,7 +16895,7 @@ interface SVGPathSegCurvetoQuadraticSmoothAbs extends SVGPathSeg {
declare var SVGPathSegCurvetoQuadraticSmoothAbs: {
prototype: SVGPathSegCurvetoQuadraticSmoothAbs;
new(): SVGPathSegCurvetoQuadraticSmoothAbs;
-}
+};
interface SVGPathSegCurvetoQuadraticSmoothRel extends SVGPathSeg {
x: number;
@@ -16622,7 +16905,7 @@ interface SVGPathSegCurvetoQuadraticSmoothRel extends SVGPathSeg {
declare var SVGPathSegCurvetoQuadraticSmoothRel: {
prototype: SVGPathSegCurvetoQuadraticSmoothRel;
new(): SVGPathSegCurvetoQuadraticSmoothRel;
-}
+};
interface SVGPathSegLinetoAbs extends SVGPathSeg {
x: number;
@@ -16632,7 +16915,7 @@ interface SVGPathSegLinetoAbs extends SVGPathSeg {
declare var SVGPathSegLinetoAbs: {
prototype: SVGPathSegLinetoAbs;
new(): SVGPathSegLinetoAbs;
-}
+};
interface SVGPathSegLinetoHorizontalAbs extends SVGPathSeg {
x: number;
@@ -16641,7 +16924,7 @@ interface SVGPathSegLinetoHorizontalAbs extends SVGPathSeg {
declare var SVGPathSegLinetoHorizontalAbs: {
prototype: SVGPathSegLinetoHorizontalAbs;
new(): SVGPathSegLinetoHorizontalAbs;
-}
+};
interface SVGPathSegLinetoHorizontalRel extends SVGPathSeg {
x: number;
@@ -16650,7 +16933,7 @@ interface SVGPathSegLinetoHorizontalRel extends SVGPathSeg {
declare var SVGPathSegLinetoHorizontalRel: {
prototype: SVGPathSegLinetoHorizontalRel;
new(): SVGPathSegLinetoHorizontalRel;
-}
+};
interface SVGPathSegLinetoRel extends SVGPathSeg {
x: number;
@@ -16660,7 +16943,7 @@ interface SVGPathSegLinetoRel extends SVGPathSeg {
declare var SVGPathSegLinetoRel: {
prototype: SVGPathSegLinetoRel;
new(): SVGPathSegLinetoRel;
-}
+};
interface SVGPathSegLinetoVerticalAbs extends SVGPathSeg {
y: number;
@@ -16669,7 +16952,7 @@ interface SVGPathSegLinetoVerticalAbs extends SVGPathSeg {
declare var SVGPathSegLinetoVerticalAbs: {
prototype: SVGPathSegLinetoVerticalAbs;
new(): SVGPathSegLinetoVerticalAbs;
-}
+};
interface SVGPathSegLinetoVerticalRel extends SVGPathSeg {
y: number;
@@ -16678,7 +16961,7 @@ interface SVGPathSegLinetoVerticalRel extends SVGPathSeg {
declare var SVGPathSegLinetoVerticalRel: {
prototype: SVGPathSegLinetoVerticalRel;
new(): SVGPathSegLinetoVerticalRel;
-}
+};
interface SVGPathSegList {
readonly numberOfItems: number;
@@ -16694,7 +16977,7 @@ interface SVGPathSegList {
declare var SVGPathSegList: {
prototype: SVGPathSegList;
new(): SVGPathSegList;
-}
+};
interface SVGPathSegMovetoAbs extends SVGPathSeg {
x: number;
@@ -16704,7 +16987,7 @@ interface SVGPathSegMovetoAbs extends SVGPathSeg {
declare var SVGPathSegMovetoAbs: {
prototype: SVGPathSegMovetoAbs;
new(): SVGPathSegMovetoAbs;
-}
+};
interface SVGPathSegMovetoRel extends SVGPathSeg {
x: number;
@@ -16714,7 +16997,7 @@ interface SVGPathSegMovetoRel extends SVGPathSeg {
declare var SVGPathSegMovetoRel: {
prototype: SVGPathSegMovetoRel;
new(): SVGPathSegMovetoRel;
-}
+};
interface SVGPatternElement extends SVGElement, SVGTests, SVGUnitTypes, SVGFitToViewBox, SVGURIReference {
readonly height: SVGAnimatedLength;
@@ -16731,7 +17014,7 @@ interface SVGPatternElement extends SVGElement, SVGTests, SVGUnitTypes, SVGFitTo
declare var SVGPatternElement: {
prototype: SVGPatternElement;
new(): SVGPatternElement;
-}
+};
interface SVGPoint {
x: number;
@@ -16742,7 +17025,7 @@ interface SVGPoint {
declare var SVGPoint: {
prototype: SVGPoint;
new(): SVGPoint;
-}
+};
interface SVGPointList {
readonly numberOfItems: number;
@@ -16758,7 +17041,7 @@ interface SVGPointList {
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;
@@ -16768,7 +17051,7 @@ interface SVGPolygonElement extends SVGGraphicsElement, SVGAnimatedPoints {
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;
@@ -16778,7 +17061,7 @@ interface SVGPolylineElement extends SVGGraphicsElement, SVGAnimatedPoints {
declare var SVGPolylineElement: {
prototype: SVGPolylineElement;
new(): SVGPolylineElement;
-}
+};
interface SVGPreserveAspectRatio {
align: number;
@@ -16816,7 +17099,7 @@ declare var SVGPreserveAspectRatio: {
readonly SVG_PRESERVEASPECTRATIO_XMINYMAX: number;
readonly SVG_PRESERVEASPECTRATIO_XMINYMID: number;
readonly SVG_PRESERVEASPECTRATIO_XMINYMIN: number;
-}
+};
interface SVGRadialGradientElement extends SVGGradientElement {
readonly cx: SVGAnimatedLength;
@@ -16831,7 +17114,7 @@ interface SVGRadialGradientElement extends SVGGradientElement {
declare var SVGRadialGradientElement: {
prototype: SVGRadialGradientElement;
new(): SVGRadialGradientElement;
-}
+};
interface SVGRect {
height: number;
@@ -16843,7 +17126,7 @@ interface SVGRect {
declare var SVGRect: {
prototype: SVGRect;
new(): SVGRect;
-}
+};
interface SVGRectElement extends SVGGraphicsElement {
readonly height: SVGAnimatedLength;
@@ -16859,8 +17142,60 @@ interface SVGRectElement extends SVGGraphicsElement {
declare var SVGRectElement: {
prototype: SVGRectElement;
new(): SVGRectElement;
+};
+
+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 SVGSVGElementEventMap extends SVGElementEventMap {
"SVGAbort": Event;
"SVGError": Event;
@@ -16920,59 +17255,7 @@ interface SVGSVGElement extends SVGGraphicsElement, DocumentEvent, SVGFitToViewB
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;
@@ -16982,7 +17265,7 @@ interface SVGSwitchElement extends SVGGraphicsElement {
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;
@@ -16992,17 +17275,7 @@ interface SVGSymbolElement extends SVGElement, SVGFitToViewBox {
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;
@@ -17029,7 +17302,7 @@ declare var 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;
@@ -17039,7 +17312,7 @@ interface SVGTextElement extends SVGTextPositioningElement {
declare var SVGTextElement: {
prototype: SVGTextElement;
new(): SVGTextElement;
-}
+};
interface SVGTextPathElement extends SVGTextContentElement, SVGURIReference {
readonly method: SVGAnimatedEnumeration;
@@ -17064,7 +17337,7 @@ declare var SVGTextPathElement: {
readonly TEXTPATH_SPACINGTYPE_AUTO: number;
readonly TEXTPATH_SPACINGTYPE_EXACT: number;
readonly TEXTPATH_SPACINGTYPE_UNKNOWN: number;
-}
+};
interface SVGTextPositioningElement extends SVGTextContentElement {
readonly dx: SVGAnimatedLengthList;
@@ -17079,7 +17352,7 @@ interface SVGTextPositioningElement extends SVGTextContentElement {
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;
@@ -17089,7 +17362,7 @@ interface SVGTitleElement extends SVGElement {
declare var SVGTitleElement: {
prototype: SVGTitleElement;
new(): SVGTitleElement;
-}
+};
interface SVGTransform {
readonly angle: number;
@@ -17120,7 +17393,7 @@ declare var SVGTransform: {
readonly SVG_TRANSFORM_SKEWY: number;
readonly SVG_TRANSFORM_TRANSLATE: number;
readonly SVG_TRANSFORM_UNKNOWN: number;
-}
+};
interface SVGTransformList {
readonly numberOfItems: number;
@@ -17138,8 +17411,18 @@ interface SVGTransformList {
declare var SVGTransformList: {
prototype: SVGTransformList;
new(): SVGTransformList;
+};
+
+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 SVGUnitTypes {
readonly SVG_UNIT_TYPE_OBJECTBOUNDINGBOX: number;
readonly SVG_UNIT_TYPE_UNKNOWN: number;
@@ -17161,7 +17444,7 @@ interface SVGUseElement extends SVGGraphicsElement, SVGURIReference {
declare var SVGUseElement: {
prototype: SVGUseElement;
new(): SVGUseElement;
-}
+};
interface SVGViewElement extends SVGElement, SVGZoomAndPan, SVGFitToViewBox {
readonly viewTarget: SVGStringList;
@@ -17172,7 +17455,7 @@ interface SVGViewElement extends SVGElement, SVGZoomAndPan, SVGFitToViewBox {
declare var SVGViewElement: {
prototype: SVGViewElement;
new(): SVGViewElement;
-}
+};
interface SVGZoomAndPan {
readonly zoomAndPan: number;
@@ -17182,7 +17465,7 @@ 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;
@@ -17195,420 +17478,7 @@ interface SVGZoomEvent extends UIEvent {
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;
@@ -17618,7 +17488,7 @@ interface SyncManager {
declare var SyncManager: {
prototype: SyncManager;
new(): SyncManager;
-}
+};
interface Text extends CharacterData {
readonly wholeText: string;
@@ -17629,7 +17499,7 @@ interface Text extends CharacterData {
declare var Text: {
prototype: Text;
new(data?: string): Text;
-}
+};
interface TextEvent extends UIEvent {
readonly data: string;
@@ -17661,7 +17531,7 @@ declare var TextEvent: {
readonly DOM_INPUT_METHOD_SCRIPT: number;
readonly DOM_INPUT_METHOD_UNKNOWN: number;
readonly DOM_INPUT_METHOD_VOICE: number;
-}
+};
interface TextMetrics {
readonly width: number;
@@ -17670,7 +17540,7 @@ interface TextMetrics {
declare var TextMetrics: {
prototype: TextMetrics;
new(): TextMetrics;
-}
+};
interface TextTrackEventMap {
"cuechange": Event;
@@ -17713,7 +17583,7 @@ declare var TextTrack: {
readonly LOADING: number;
readonly NONE: number;
readonly SHOWING: number;
-}
+};
interface TextTrackCueEventMap {
"enter": Event;
@@ -17737,7 +17607,7 @@ interface TextTrackCue extends EventTarget {
declare var TextTrackCue: {
prototype: TextTrackCue;
new(startTime: number, endTime: number, text: string): TextTrackCue;
-}
+};
interface TextTrackCueList {
readonly length: number;
@@ -17749,7 +17619,7 @@ interface TextTrackCueList {
declare var TextTrackCueList: {
prototype: TextTrackCueList;
new(): TextTrackCueList;
-}
+};
interface TextTrackListEventMap {
"addtrack": TrackEvent;
@@ -17767,7 +17637,7 @@ interface TextTrackList extends EventTarget {
declare var TextTrackList: {
prototype: TextTrackList;
new(): TextTrackList;
-}
+};
interface TimeRanges {
readonly length: number;
@@ -17778,7 +17648,7 @@ interface TimeRanges {
declare var TimeRanges: {
prototype: TimeRanges;
new(): TimeRanges;
-}
+};
interface Touch {
readonly clientX: number;
@@ -17794,7 +17664,7 @@ interface Touch {
declare var Touch: {
prototype: Touch;
new(): Touch;
-}
+};
interface TouchEvent extends UIEvent {
readonly altKey: boolean;
@@ -17812,7 +17682,7 @@ interface TouchEvent extends UIEvent {
declare var TouchEvent: {
prototype: TouchEvent;
new(type: string, touchEventInit?: TouchEventInit): TouchEvent;
-}
+};
interface TouchList {
readonly length: number;
@@ -17823,7 +17693,7 @@ interface TouchList {
declare var TouchList: {
prototype: TouchList;
new(): TouchList;
-}
+};
interface TrackEvent extends Event {
readonly track: VideoTrack | AudioTrack | TextTrack | null;
@@ -17832,7 +17702,7 @@ interface TrackEvent extends Event {
declare var TrackEvent: {
prototype: TrackEvent;
new(typeArg: string, eventInitDict?: TrackEventInit): TrackEvent;
-}
+};
interface TransitionEvent extends Event {
readonly elapsedTime: number;
@@ -17843,7 +17713,7 @@ interface TransitionEvent extends Event {
declare var TransitionEvent: {
prototype: TransitionEvent;
new(typeArg: string, eventInitDict?: TransitionEventInit): TransitionEvent;
-}
+};
interface TreeWalker {
currentNode: Node;
@@ -17863,7 +17733,7 @@ interface TreeWalker {
declare var TreeWalker: {
prototype: TreeWalker;
new(): TreeWalker;
-}
+};
interface UIEvent extends Event {
readonly detail: number;
@@ -17874,8 +17744,17 @@ interface UIEvent extends Event {
declare var UIEvent: {
prototype: UIEvent;
new(typeArg: string, eventInitDict?: UIEventInit): UIEvent;
+};
+
+interface UnviewableContentIdentifiedEvent extends NavigationEventWithReferrer {
+ readonly mediaType: string;
}
+declare var UnviewableContentIdentifiedEvent: {
+ prototype: UnviewableContentIdentifiedEvent;
+ new(): UnviewableContentIdentifiedEvent;
+};
+
interface URL {
hash: string;
host: string;
@@ -17897,16 +17776,7 @@ declare var 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;
@@ -17924,7 +17794,7 @@ interface ValidityState {
declare var ValidityState: {
prototype: ValidityState;
new(): ValidityState;
-}
+};
interface VideoPlaybackQuality {
readonly corruptedVideoFrames: number;
@@ -17937,7 +17807,7 @@ interface VideoPlaybackQuality {
declare var VideoPlaybackQuality: {
prototype: VideoPlaybackQuality;
new(): VideoPlaybackQuality;
-}
+};
interface VideoTrack {
readonly id: string;
@@ -17951,7 +17821,7 @@ interface VideoTrack {
declare var VideoTrack: {
prototype: VideoTrack;
new(): VideoTrack;
-}
+};
interface VideoTrackListEventMap {
"addtrack": TrackEvent;
@@ -17975,23 +17845,55 @@ interface VideoTrackList extends EventTarget {
declare var VideoTrackList: {
prototype: VideoTrackList;
new(): VideoTrackList;
+};
+
+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 WEBGL_compressed_texture_s3tc {
+ readonly COMPRESSED_RGB_S3TC_DXT1_EXT: number;
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_RGB_S3TC_DXT1_EXT: number;
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;
@@ -18003,7 +17905,7 @@ declare var 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;
@@ -18013,39 +17915,7 @@ 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;
@@ -18056,7 +17926,7 @@ interface WebGLActiveInfo {
declare var WebGLActiveInfo: {
prototype: WebGLActiveInfo;
new(): WebGLActiveInfo;
-}
+};
interface WebGLBuffer extends WebGLObject {
}
@@ -18064,7 +17934,7 @@ interface WebGLBuffer extends WebGLObject {
declare var WebGLBuffer: {
prototype: WebGLBuffer;
new(): WebGLBuffer;
-}
+};
interface WebGLContextEvent extends Event {
readonly statusMessage: string;
@@ -18073,7 +17943,7 @@ interface WebGLContextEvent extends Event {
declare var WebGLContextEvent: {
prototype: WebGLContextEvent;
new(typeArg: string, eventInitDict?: WebGLContextEventInit): WebGLContextEvent;
-}
+};
interface WebGLFramebuffer extends WebGLObject {
}
@@ -18081,7 +17951,7 @@ interface WebGLFramebuffer extends WebGLObject {
declare var WebGLFramebuffer: {
prototype: WebGLFramebuffer;
new(): WebGLFramebuffer;
-}
+};
interface WebGLObject {
}
@@ -18089,7 +17959,7 @@ interface WebGLObject {
declare var WebGLObject: {
prototype: WebGLObject;
new(): WebGLObject;
-}
+};
interface WebGLProgram extends WebGLObject {
}
@@ -18097,7 +17967,7 @@ interface WebGLProgram extends WebGLObject {
declare var WebGLProgram: {
prototype: WebGLProgram;
new(): WebGLProgram;
-}
+};
interface WebGLRenderbuffer extends WebGLObject {
}
@@ -18105,7 +17975,7 @@ interface WebGLRenderbuffer extends WebGLObject {
declare var WebGLRenderbuffer: {
prototype: WebGLRenderbuffer;
new(): WebGLRenderbuffer;
-}
+};
interface WebGLRenderingContext {
readonly canvas: HTMLCanvasElement;
@@ -18366,13 +18236,13 @@ interface WebGLRenderingContext {
readonly KEEP: number;
readonly LEQUAL: number;
readonly LESS: number;
+ readonly LINE_LOOP: number;
+ readonly LINE_STRIP: number;
+ readonly LINE_WIDTH: 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;
@@ -18397,9 +18267,9 @@ interface WebGLRenderingContext {
readonly NEAREST_MIPMAP_NEAREST: number;
readonly NEVER: number;
readonly NICEST: number;
+ readonly NO_ERROR: 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;
@@ -18429,18 +18299,18 @@ interface WebGLRenderingContext {
readonly REPEAT: number;
readonly REPLACE: number;
readonly RGB: number;
- readonly RGB565: number;
readonly RGB5_A1: number;
+ readonly RGB565: 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 SAMPLER_2D: number;
+ readonly SAMPLER_CUBE: number;
+ readonly SAMPLES: number;
readonly SCISSOR_BOX: number;
readonly SCISSOR_TEST: number;
readonly SHADER_TYPE: number;
@@ -18474,6 +18344,20 @@ interface WebGLRenderingContext {
readonly STREAM_DRAW: number;
readonly SUBPIXEL_BITS: number;
readonly TEXTURE: 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 TEXTURE0: number;
readonly TEXTURE1: number;
readonly TEXTURE10: number;
@@ -18506,23 +18390,9 @@ interface WebGLRenderingContext {
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 TRIANGLES: number;
readonly UNPACK_ALIGNMENT: number;
readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: number;
readonly UNPACK_FLIP_Y_WEBGL: number;
@@ -18668,13 +18538,13 @@ declare var WebGLRenderingContext: {
readonly KEEP: number;
readonly LEQUAL: number;
readonly LESS: number;
+ readonly LINE_LOOP: number;
+ readonly LINE_STRIP: number;
+ readonly LINE_WIDTH: 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;
@@ -18699,9 +18569,9 @@ declare var WebGLRenderingContext: {
readonly NEAREST_MIPMAP_NEAREST: number;
readonly NEVER: number;
readonly NICEST: number;
+ readonly NO_ERROR: 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;
@@ -18731,18 +18601,18 @@ declare var WebGLRenderingContext: {
readonly REPEAT: number;
readonly REPLACE: number;
readonly RGB: number;
- readonly RGB565: number;
readonly RGB5_A1: number;
+ readonly RGB565: 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 SAMPLER_2D: number;
+ readonly SAMPLER_CUBE: number;
+ readonly SAMPLES: number;
readonly SCISSOR_BOX: number;
readonly SCISSOR_TEST: number;
readonly SHADER_TYPE: number;
@@ -18776,6 +18646,20 @@ declare var WebGLRenderingContext: {
readonly STREAM_DRAW: number;
readonly SUBPIXEL_BITS: number;
readonly TEXTURE: 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 TEXTURE0: number;
readonly TEXTURE1: number;
readonly TEXTURE10: number;
@@ -18808,23 +18692,9 @@ declare var WebGLRenderingContext: {
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 TRIANGLES: number;
readonly UNPACK_ALIGNMENT: number;
readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: number;
readonly UNPACK_FLIP_Y_WEBGL: number;
@@ -18848,7 +18718,7 @@ declare var WebGLRenderingContext: {
readonly VERTEX_SHADER: number;
readonly VIEWPORT: number;
readonly ZERO: number;
-}
+};
interface WebGLShader extends WebGLObject {
}
@@ -18856,7 +18726,7 @@ interface WebGLShader extends WebGLObject {
declare var WebGLShader: {
prototype: WebGLShader;
new(): WebGLShader;
-}
+};
interface WebGLShaderPrecisionFormat {
readonly precision: number;
@@ -18867,7 +18737,7 @@ interface WebGLShaderPrecisionFormat {
declare var WebGLShaderPrecisionFormat: {
prototype: WebGLShaderPrecisionFormat;
new(): WebGLShaderPrecisionFormat;
-}
+};
interface WebGLTexture extends WebGLObject {
}
@@ -18875,7 +18745,7 @@ interface WebGLTexture extends WebGLObject {
declare var WebGLTexture: {
prototype: WebGLTexture;
new(): WebGLTexture;
-}
+};
interface WebGLUniformLocation {
}
@@ -18883,7 +18753,7 @@ interface WebGLUniformLocation {
declare var WebGLUniformLocation: {
prototype: WebGLUniformLocation;
new(): WebGLUniformLocation;
-}
+};
interface WebKitCSSMatrix {
a: number;
@@ -18923,7 +18793,7 @@ interface WebKitCSSMatrix {
declare var WebKitCSSMatrix: {
prototype: WebKitCSSMatrix;
new(text?: string): WebKitCSSMatrix;
-}
+};
interface WebKitDirectoryEntry extends WebKitEntry {
createReader(): WebKitDirectoryReader;
@@ -18932,7 +18802,7 @@ interface WebKitDirectoryEntry extends WebKitEntry {
declare var WebKitDirectoryEntry: {
prototype: WebKitDirectoryEntry;
new(): WebKitDirectoryEntry;
-}
+};
interface WebKitDirectoryReader {
readEntries(successCallback: WebKitEntriesCallback, errorCallback?: WebKitErrorCallback): void;
@@ -18941,7 +18811,7 @@ interface WebKitDirectoryReader {
declare var WebKitDirectoryReader: {
prototype: WebKitDirectoryReader;
new(): WebKitDirectoryReader;
-}
+};
interface WebKitEntry {
readonly filesystem: WebKitFileSystem;
@@ -18954,7 +18824,7 @@ interface WebKitEntry {
declare var WebKitEntry: {
prototype: WebKitEntry;
new(): WebKitEntry;
-}
+};
interface WebKitFileEntry extends WebKitEntry {
file(successCallback: WebKitFileCallback, errorCallback?: WebKitErrorCallback): void;
@@ -18963,7 +18833,7 @@ interface WebKitFileEntry extends WebKitEntry {
declare var WebKitFileEntry: {
prototype: WebKitFileEntry;
new(): WebKitFileEntry;
-}
+};
interface WebKitFileSystem {
readonly name: string;
@@ -18973,7 +18843,7 @@ interface WebKitFileSystem {
declare var WebKitFileSystem: {
prototype: WebKitFileSystem;
new(): WebKitFileSystem;
-}
+};
interface WebKitPoint {
x: number;
@@ -18983,8 +18853,18 @@ interface WebKitPoint {
declare var WebKitPoint: {
prototype: WebKitPoint;
new(x?: number, y?: number): WebKitPoint;
+};
+
+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 WebSocketEventMap {
"close": CloseEvent;
"error": Event;
@@ -19020,7 +18900,7 @@ declare var WebSocket: {
readonly CLOSING: number;
readonly CONNECTING: number;
readonly OPEN: number;
-}
+};
interface WheelEvent extends MouseEvent {
readonly deltaMode: number;
@@ -19043,7 +18923,7 @@ declare var WheelEvent: {
readonly DOM_DELTA_LINE: number;
readonly DOM_DELTA_PAGE: number;
readonly DOM_DELTA_PIXEL: number;
-}
+};
interface WindowEventMap extends GlobalEventHandlersEventMap {
"abort": UIEvent;
@@ -19071,6 +18951,7 @@ interface WindowEventMap extends GlobalEventHandlersEventMap {
"durationchange": Event;
"emptied": Event;
"ended": MediaStreamErrorEvent;
+ "error": ErrorEvent;
"focus": FocusEvent;
"hashchange": HashChangeEvent;
"input": Event;
@@ -19129,6 +19010,10 @@ interface WindowEventMap extends GlobalEventHandlersEventMap {
"submit": Event;
"suspend": Event;
"timeupdate": Event;
+ "touchcancel": TouchEvent;
+ "touchend": TouchEvent;
+ "touchmove": TouchEvent;
+ "touchstart": TouchEvent;
"unload": Event;
"volumechange": Event;
"waiting": Event;
@@ -19142,8 +19027,8 @@ interface Window extends EventTarget, WindowTimers, WindowSessionStorage, Window
readonly crypto: Crypto;
defaultStatus: string;
readonly devicePixelRatio: number;
- readonly doNotTrack: string;
readonly document: Document;
+ readonly doNotTrack: string;
event: Event | undefined;
readonly external: External;
readonly frameElement: Element;
@@ -19266,9 +19151,9 @@ interface Window extends EventTarget, WindowTimers, WindowSessionStorage, Window
readonly screenTop: number;
readonly screenX: number;
readonly screenY: number;
+ readonly scrollbars: BarProp;
readonly scrollX: number;
readonly scrollY: number;
- readonly scrollbars: BarProp;
readonly self: Window;
readonly speechSynthesis: SpeechSynthesis;
status: string;
@@ -19324,7 +19209,7 @@ interface Window extends EventTarget, WindowTimers, WindowSessionStorage, Window
declare var Window: {
prototype: Window;
new(): Window;
-}
+};
interface WorkerEventMap extends AbstractWorkerEventMap {
"message": MessageEvent;
@@ -19341,7 +19226,7 @@ interface Worker extends EventTarget, AbstractWorker {
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;
@@ -19351,7 +19236,7 @@ interface XMLDocument extends Document {
declare var XMLDocument: {
prototype: XMLDocument;
new(): XMLDocument;
-}
+};
interface XMLHttpRequestEventMap extends XMLHttpRequestEventTargetEventMap {
"readystatechange": Event;
@@ -19398,7 +19283,7 @@ declare var XMLHttpRequest: {
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;
@@ -19408,7 +19293,7 @@ interface XMLHttpRequestUpload extends EventTarget, XMLHttpRequestEventTarget {
declare var XMLHttpRequestUpload: {
prototype: XMLHttpRequestUpload;
new(): XMLHttpRequestUpload;
-}
+};
interface XMLSerializer {
serializeToString(target: Node): string;
@@ -19417,7 +19302,7 @@ interface XMLSerializer {
declare var XMLSerializer: {
prototype: XMLSerializer;
new(): XMLSerializer;
-}
+};
interface XPathEvaluator {
createExpression(expression: string, resolver: XPathNSResolver): XPathExpression;
@@ -19428,7 +19313,7 @@ interface XPathEvaluator {
declare var XPathEvaluator: {
prototype: XPathEvaluator;
new(): XPathEvaluator;
-}
+};
interface XPathExpression {
evaluate(contextNode: Node, type: number, result: XPathResult | null): XPathResult;
@@ -19437,7 +19322,7 @@ interface XPathExpression {
declare var XPathExpression: {
prototype: XPathExpression;
new(): XPathExpression;
-}
+};
interface XPathNSResolver {
lookupNamespaceURI(prefix: string): string;
@@ -19446,7 +19331,7 @@ interface XPathNSResolver {
declare var XPathNSResolver: {
prototype: XPathNSResolver;
new(): XPathNSResolver;
-}
+};
interface XPathResult {
readonly booleanValue: boolean;
@@ -19483,7 +19368,7 @@ declare var XPathResult: {
readonly STRING_TYPE: number;
readonly UNORDERED_NODE_ITERATOR_TYPE: number;
readonly UNORDERED_NODE_SNAPSHOT_TYPE: number;
-}
+};
interface XSLTProcessor {
clearParameters(): void;
@@ -19499,17 +19384,7 @@ interface XSLTProcessor {
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;
@@ -19546,6 +19421,81 @@ interface ChildNode {
remove(): void;
}
+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 DOML2DeprecatedColorProperty {
color: string;
}
@@ -19554,81 +19504,6 @@ 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;
@@ -19673,16 +19548,16 @@ interface GlobalFetch {
interface HTMLTableAlignment {
/**
- * Sets or retrieves a value that you can use to implement your own ch functionality for the object.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves how text and other content are vertically aligned within the object that contains them.
+ */
vAlign: string;
}
@@ -19907,38 +19782,38 @@ interface ImageBitmap {
interface URLSearchParams {
/**
- * Appends a specified key/value pair as a new search parameter.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Returns all the values association with a given search parameter.
+ */
getAll(name: string): string[];
/**
- * Returns a Boolean indicating if such a search parameter exists.
- */
+ * 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.
- */
+ * 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.
- */
+ * Constructor returning a URLSearchParams object.
+ */
new (init?: string | URLSearchParams): URLSearchParams;
-}
+};
interface NodeListOf<TNode extends Node> extends NodeList {
length: number;
@@ -20186,7 +20061,7 @@ interface ShadowRoot extends DocumentOrShadowRoot, DocumentFragment {
}
interface ShadowRootInit {
- mode: 'open'|'closed';
+ mode: "open" | "closed";
delegatesFocus?: boolean;
}
@@ -20236,68 +20111,68 @@ interface TouchEventInit extends EventModifierInit {
declare type EventListenerOrEventListenerObject = EventListener | EventListenerObject;
+interface DecodeErrorCallback {
+ (error: DOMException): void;
+}
+interface DecodeSuccessCallback {
+ (decodedData: AudioBuffer): void;
+}
interface ErrorEventHandler {
- (message: string, filename?: string, lineno?: number, colno?: number, error?:Error): void;
+ (message: string, filename?: string, lineno?: number, colno?: number, error?: Error): void;
}
-interface PositionCallback {
- (position: Position): void;
+interface ForEachCallback {
+ (keyId: any, status: MediaKeyStatus): void;
}
-interface PositionErrorCallback {
- (error: PositionError): void;
+interface FrameRequestCallback {
+ (time: number): void;
+}
+interface FunctionStringCallback {
+ (data: string): void;
+}
+interface IntersectionObserverCallback {
+ (entries: IntersectionObserverEntry[], observer: IntersectionObserver): void;
}
interface MediaQueryListListener {
(mql: MediaQueryList): void;
}
+interface MSExecAtPriorityFunctionCallback {
+ (...args: any[]): any;
+}
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 NavigatorUserMediaErrorCallback {
+ (error: MediaStreamError): void;
}
-interface DecodeErrorCallback {
- (error: DOMException): void;
+interface NavigatorUserMediaSuccessCallback {
+ (stream: MediaStream): void;
}
-interface VoidFunction {
- (): void;
+interface NotificationPermissionCallback {
+ (permission: NotificationPermission): void;
}
-interface RTCSessionDescriptionCallback {
- (sdp: RTCSessionDescription): void;
+interface PositionCallback {
+ (position: Position): void;
+}
+interface PositionErrorCallback {
+ (error: PositionError): void;
}
interface RTCPeerConnectionErrorCallback {
(error: DOMError): void;
}
+interface RTCSessionDescriptionCallback {
+ (sdp: RTCSessionDescription): 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 VoidFunction {
+ (): void;
}
interface HTMLElementTagNameMap {
"a": HTMLAnchorElement;
@@ -20385,48 +20260,27 @@ interface HTMLElementTagNameMap {
"xmp": HTMLPreElement;
}
-interface ElementTagNameMap {
- "a": HTMLAnchorElement;
+interface ElementTagNameMap extends HTMLElementTagNameMap {
"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;
@@ -20451,307 +20305,67 @@ interface ElementTagNameMap {
"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; };
+type ElementListTagNameMap = {
+ [key in keyof ElementTagNameMap]: NodeListOf<ElementTagNameMap[key]>
+};
+
+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;
@@ -20759,8 +20373,8 @@ 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 doNotTrack: string;
declare var event: Event | undefined;
declare var external: External;
declare var frameElement: Element;
@@ -20883,9 +20497,9 @@ declare var screenLeft: number;
declare var screenTop: number;
declare var screenX: number;
declare var screenY: number;
+declare var scrollbars: BarProp;
declare var scrollX: number;
declare var scrollY: number;
-declare var scrollbars: BarProp;
declare var self: Window;
declare var speechSynthesis: SpeechSynthesis;
declare var status: string;
@@ -21004,6 +20618,7 @@ type BufferSource = ArrayBuffer | ArrayBufferView;
type MouseWheelEvent = WheelEvent;
type ScrollRestoration = "auto" | "manual";
type FormDataEntryValue = string | File;
+type InsertPosition = "beforebegin" | "afterbegin" | "beforeend" | "afterend";
type AppendMode = "segments" | "sequence";
type AudioContextState = "suspended" | "running" | "closed";
type BiquadFilterType = "lowpass" | "highpass" | "bandpass" | "lowshelf" | "highshelf" | "peaking" | "notch" | "allpass";
@@ -21017,6 +20632,12 @@ type IDBCursorDirection = "next" | "nextunique" | "prev" | "prevunique";
type IDBRequestReadyState = "pending" | "done";
type IDBTransactionMode = "readonly" | "readwrite" | "versionchange";
type ListeningState = "inactive" | "active" | "disambiguation";
+type MediaDeviceKind = "audioinput" | "audiooutput" | "videoinput";
+type MediaKeyMessageType = "license-request" | "license-renewal" | "license-release" | "individualization-request";
+type MediaKeySessionType = "temporary" | "persistent-license" | "persistent-release-message";
+type MediaKeysRequirement = "required" | "optional" | "not-allowed";
+type MediaKeyStatus = "usable" | "expired" | "output-downscaled" | "output-not-allowed" | "status-pending" | "internal-error";
+type MediaStreamTrackState = "live" | "ended";
type MSCredentialType = "FIDO_2_0";
type MSIceAddrType = "os" | "stun" | "turn" | "peer-derived";
type MSIceType = "failed" | "direct" | "relay";
@@ -21024,12 +20645,6 @@ type MSStatsType = "description" | "localclientevent" | "inbound-network" | "out
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";
@@ -21041,6 +20656,14 @@ type PaymentComplete = "success" | "fail" | "";
type PaymentShippingType = "shipping" | "delivery" | "pickup";
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 RTCBundlePolicy = "balanced" | "max-compat" | "max-bundle";
type RTCDegradationPreference = "maintain-framerate" | "maintain-resolution" | "balanced";
type RTCDtlsRole = "auto" | "client" | "server";
@@ -21048,9 +20671,9 @@ 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 RTCIceGatherPolicy = "all" | "nohost" | "relay";
type RTCIceProtocol = "udp" | "tcp";
type RTCIceRole = "controlling" | "controlled";
type RTCIceTcpCandidateType = "active" | "passive" | "so";
@@ -21061,14 +20684,6 @@ type RTCSignalingState = "stable" | "have-local-offer" | "have-remote-offer" | "
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";
diff --git a/node_modules/typedoc/node_modules/typescript/lib/lib.esnext.full.d.ts b/node_modules/typedoc/node_modules/typescript/lib/lib.esnext.full.d.ts
index d285df3f4..4d06a07f6 100644
--- a/node_modules/typedoc/node_modules/typescript/lib/lib.esnext.full.d.ts
+++ b/node_modules/typedoc/node_modules/typescript/lib/lib.esnext.full.d.ts
@@ -24,15 +24,15 @@ and limitations under the License.
/////////////////////////////
-/// IE DOM APIs
+/// DOM APIs
/////////////////////////////
interface Account {
- rpDisplayName?: string;
displayName?: string;
id?: string;
- name?: string;
imageURL?: string;
+ name?: string;
+ rpDisplayName?: string;
}
interface Algorithm {
@@ -45,32 +45,32 @@ interface AnimationEventInit extends EventInit {
}
interface AssertionOptions {
- timeoutSeconds?: number;
- rpId?: USVString;
allowList?: ScopedCredentialDescriptor[];
extensions?: WebAuthnExtensions;
+ rpId?: USVString;
+ timeoutSeconds?: number;
}
interface CacheQueryOptions {
- ignoreSearch?: boolean;
+ cacheName?: string;
ignoreMethod?: boolean;
+ ignoreSearch?: boolean;
ignoreVary?: boolean;
- cacheName?: string;
}
interface ClientData {
challenge?: string;
+ extensions?: WebAuthnExtensions;
+ hashAlg?: string | Algorithm;
origin?: string;
rpId?: string;
- hashAlg?: string | Algorithm;
tokenBinding?: string;
- extensions?: WebAuthnExtensions;
}
interface CloseEventInit extends EventInit {
- wasClean?: boolean;
code?: number;
reason?: string;
+ wasClean?: boolean;
}
interface CompositionEventInit extends UIEventInit {
@@ -110,13 +110,6 @@ interface CustomEventInit extends EventInit {
detail?: any;
}
-interface DOMRectInit {
- x?: any;
- y?: any;
- width?: any;
- height?: any;
-}
-
interface DeviceAccelerationDict {
x?: number;
y?: number;
@@ -130,15 +123,15 @@ interface DeviceLightEventInit extends EventInit {
interface DeviceMotionEventInit extends EventInit {
acceleration?: DeviceAccelerationDict;
accelerationIncludingGravity?: DeviceAccelerationDict;
- rotationRate?: DeviceRotationRateDict;
interval?: number;
+ rotationRate?: DeviceRotationRateDict;
}
interface DeviceOrientationEventInit extends EventInit {
+ absolute?: boolean;
alpha?: number;
beta?: number;
gamma?: number;
- absolute?: boolean;
}
interface DeviceRotationRateDict {
@@ -147,17 +140,24 @@ interface DeviceRotationRateDict {
gamma?: number;
}
+interface DOMRectInit {
+ height?: any;
+ width?: any;
+ x?: any;
+ y?: any;
+}
+
interface DoubleRange {
max?: number;
min?: number;
}
interface ErrorEventInit extends EventInit {
- message?: string;
- filename?: string;
- lineno?: number;
colno?: number;
error?: any;
+ filename?: string;
+ lineno?: number;
+ message?: string;
}
interface EventInit {
@@ -167,9 +167,8 @@ interface EventInit {
}
interface EventModifierInit extends UIEventInit {
- ctrlKey?: boolean;
- shiftKey?: boolean;
altKey?: boolean;
+ ctrlKey?: boolean;
metaKey?: boolean;
modifierAltGraph?: boolean;
modifierCapsLock?: boolean;
@@ -182,6 +181,7 @@ interface EventModifierInit extends UIEventInit {
modifierSuper?: boolean;
modifierSymbol?: boolean;
modifierSymbolLock?: boolean;
+ shiftKey?: boolean;
}
interface ExceptionInformation {
@@ -194,17 +194,17 @@ interface FocusEventInit extends UIEventInit {
interface FocusNavigationEventInit extends EventInit {
navigationReason?: string;
+ originHeight?: number;
originLeft?: number;
originTop?: number;
originWidth?: number;
- originHeight?: number;
}
interface FocusNavigationOrigin {
+ originHeight?: number;
originLeft?: number;
originTop?: number;
originWidth?: number;
- originHeight?: number;
}
interface GamepadEventInit extends EventInit {
@@ -231,11 +231,11 @@ interface IDBObjectStoreParameters {
}
interface IntersectionObserverEntryInit {
- time?: number;
- rootBounds?: DOMRectInit;
boundingClientRect?: DOMRectInit;
intersectionRect?: DOMRectInit;
+ rootBounds?: DOMRectInit;
target?: Element;
+ time?: number;
}
interface IntersectionObserverInit {
@@ -260,39 +260,153 @@ interface LongRange {
min?: number;
}
+interface MediaEncryptedEventInit extends EventInit {
+ initData?: ArrayBuffer;
+ initDataType?: string;
+}
+
+interface MediaKeyMessageEventInit extends EventInit {
+ message?: ArrayBuffer;
+ messageType?: MediaKeyMessageType;
+}
+
+interface MediaKeySystemConfiguration {
+ audioCapabilities?: MediaKeySystemMediaCapability[];
+ distinctiveIdentifier?: MediaKeysRequirement;
+ initDataTypes?: string[];
+ persistentState?: MediaKeysRequirement;
+ videoCapabilities?: MediaKeySystemMediaCapability[];
+}
+
+interface MediaKeySystemMediaCapability {
+ contentType?: string;
+ robustness?: string;
+}
+
+interface MediaStreamConstraints {
+ audio?: boolean | MediaTrackConstraints;
+ video?: boolean | MediaTrackConstraints;
+}
+
+interface MediaStreamErrorEventInit extends EventInit {
+ error?: MediaStreamError;
+}
+
+interface MediaStreamEventInit extends EventInit {
+ stream?: MediaStream;
+}
+
+interface MediaStreamTrackEventInit extends EventInit {
+ track?: MediaStreamTrack;
+}
+
+interface MediaTrackCapabilities {
+ aspectRatio?: number | DoubleRange;
+ deviceId?: string;
+ echoCancellation?: boolean[];
+ facingMode?: string;
+ frameRate?: number | DoubleRange;
+ groupId?: string;
+ height?: number | LongRange;
+ sampleRate?: number | LongRange;
+ sampleSize?: number | LongRange;
+ volume?: number | DoubleRange;
+ width?: number | LongRange;
+}
+
+interface MediaTrackConstraints extends MediaTrackConstraintSet {
+ advanced?: MediaTrackConstraintSet[];
+}
+
+interface MediaTrackConstraintSet {
+ aspectRatio?: number | ConstrainDoubleRange;
+ deviceId?: string | string[] | ConstrainDOMStringParameters;
+ echoCancelation?: boolean | ConstrainBooleanParameters;
+ facingMode?: string | string[] | ConstrainDOMStringParameters;
+ frameRate?: number | ConstrainDoubleRange;
+ groupId?: string | string[] | ConstrainDOMStringParameters;
+ height?: number | ConstrainLongRange;
+ sampleRate?: number | ConstrainLongRange;
+ sampleSize?: number | ConstrainLongRange;
+ volume?: number | ConstrainDoubleRange;
+ width?: number | ConstrainLongRange;
+}
+
+interface MediaTrackSettings {
+ aspectRatio?: number;
+ deviceId?: string;
+ echoCancellation?: boolean;
+ facingMode?: string;
+ frameRate?: number;
+ groupId?: string;
+ height?: number;
+ sampleRate?: number;
+ sampleSize?: number;
+ volume?: number;
+ width?: number;
+}
+
+interface MediaTrackSupportedConstraints {
+ aspectRatio?: boolean;
+ deviceId?: boolean;
+ echoCancellation?: boolean;
+ facingMode?: boolean;
+ frameRate?: boolean;
+ groupId?: boolean;
+ height?: boolean;
+ sampleRate?: boolean;
+ sampleSize?: boolean;
+ volume?: boolean;
+ width?: boolean;
+}
+
+interface MessageEventInit extends EventInit {
+ lastEventId?: string;
+ channel?: string;
+ data?: any;
+ origin?: string;
+ ports?: MessagePort[];
+ source?: Window;
+}
+
+interface MouseEventInit extends EventModifierInit {
+ button?: number;
+ buttons?: number;
+ clientX?: number;
+ clientY?: number;
+ relatedTarget?: EventTarget;
+ screenX?: number;
+ screenY?: number;
+}
+
interface MSAccountInfo {
+ accountImageUri?: string;
+ accountName?: string;
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;
+ deviceClippingEventRatio?: number;
+ deviceEchoEventRatio?: number;
deviceGlitchesEventRatio?: number;
+ deviceHalfDuplexAECEventRatio?: number;
+ deviceHowlingEventCount?: number;
deviceLowSNREventRatio?: number;
deviceLowSpeechLevelEventRatio?: number;
- deviceClippingEventRatio?: number;
- deviceEchoEventRatio?: number;
+ deviceMultipleEndpointsEventCount?: number;
deviceNearEndToEchoRatioEventRatio?: number;
- deviceRenderZeroVolumeEventRatio?: number;
deviceRenderMuteEventRatio?: number;
- deviceMultipleEndpointsEventCount?: number;
- deviceHowlingEventCount?: number;
+ deviceRenderNotFunctioningEventRatio?: number;
+ deviceRenderZeroVolumeEventRatio?: number;
+ networkDelayEventRatio?: number;
+ networkSendQualityEventRatio?: number;
}
interface MSAudioRecvPayload extends MSPayloadBase {
- samplingRate?: number;
- signal?: MSAudioRecvSignal;
- packetReorderRatio?: number;
- packetReorderDepthAvg?: number;
- packetReorderDepthMax?: number;
burstLossLength1?: number;
burstLossLength2?: number;
burstLossLength3?: number;
@@ -304,31 +418,36 @@ interface MSAudioRecvPayload extends MSPayloadBase {
fecRecvDistance1?: number;
fecRecvDistance2?: number;
fecRecvDistance3?: number;
+ packetReorderDepthAvg?: number;
+ packetReorderDepthMax?: number;
+ packetReorderRatio?: number;
+ ratioCompressedSamplesAvg?: number;
ratioConcealedSamplesAvg?: number;
ratioStretchedSamplesAvg?: number;
- ratioCompressedSamplesAvg?: number;
+ samplingRate?: number;
+ signal?: MSAudioRecvSignal;
}
interface MSAudioRecvSignal {
initialSignalLevelRMS?: number;
- recvSignalLevelCh1?: number;
recvNoiseLevelCh1?: number;
- renderSignalLevel?: number;
- renderNoiseLevel?: number;
+ recvSignalLevelCh1?: number;
renderLoopbackSignalLevel?: number;
+ renderNoiseLevel?: number;
+ renderSignalLevel?: number;
}
interface MSAudioSendPayload extends MSPayloadBase {
- samplingRate?: number;
- signal?: MSAudioSendSignal;
audioFECUsed?: boolean;
+ samplingRate?: number;
sendMutePercent?: number;
+ signal?: MSAudioSendSignal;
}
interface MSAudioSendSignal {
noiseLevel?: number;
- sendSignalLevelCh1?: number;
sendNoiseLevelCh1?: number;
+ sendSignalLevelCh1?: number;
}
interface MSConnectivity {
@@ -346,8 +465,8 @@ interface MSCredentialParameters {
}
interface MSCredentialSpec {
- type?: MSCredentialType;
id?: string;
+ type?: MSCredentialType;
}
interface MSDelay {
@@ -357,12 +476,12 @@ interface MSDelay {
interface MSDescription extends RTCStats {
connectivity?: MSConnectivity;
- transport?: RTCIceProtocol;
- networkconnectivity?: MSNetworkConnectivityInfo;
- localAddr?: MSIPAddressInfo;
- remoteAddr?: MSIPAddressInfo;
deviceDevName?: string;
+ localAddr?: MSIPAddressInfo;
+ networkconnectivity?: MSNetworkConnectivityInfo;
reflexiveLocalIPAddr?: MSIPAddressInfo;
+ remoteAddr?: MSIPAddressInfo;
+ transport?: RTCIceProtocol;
}
interface MSFIDOCredentialParameters extends MSCredentialParameters {
@@ -370,35 +489,35 @@ interface MSFIDOCredentialParameters extends MSCredentialParameters {
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;
+ alternateServerReceived?: boolean;
+ connCheckMessageIntegrityFailed?: boolean;
connCheckOtherError?: boolean;
- turnAuthUnknownUsernameError?: boolean;
- noRelayServersConfigured?: boolean;
+ fipsAllocationFailure?: boolean;
multipleRelayServersAttempted?: boolean;
+ noRelayServersConfigured?: boolean;
portRangeExhausted?: boolean;
- alternateServerReceived?: boolean;
pseudoTLSFailure?: boolean;
+ tcpNatConnectivityFailed?: boolean;
+ tcpRelayConnectivityFailed?: boolean;
+ turnAuthUnknownUsernameError?: boolean;
+ turnTcpAllocateFailed?: boolean;
+ turnTcpSendFailed?: boolean;
+ turnTcpTimedOut?: boolean;
turnTurnTcpConnectivityFailed?: boolean;
+ turnUdpAllocateFailed?: boolean;
+ turnUdpSendFailed?: boolean;
+ udpLocalConnectivityFailed?: boolean;
+ udpNatConnectivityFailed?: boolean;
+ udpRelayConnectivityFailed?: boolean;
useCandidateChecksFailed?: boolean;
- fipsAllocationFailure?: boolean;
+}
+
+interface MSIPAddressInfo {
+ ipAddr?: string;
+ manufacturerMacAddrMask?: string;
+ port?: number;
}
interface MSJitter {
@@ -408,28 +527,28 @@ interface MSJitter {
}
interface MSLocalClientEventBase extends RTCStats {
- networkReceiveQualityEventRatio?: number;
networkBandwidthLowEventRatio?: number;
+ networkReceiveQualityEventRatio?: number;
}
interface MSNetwork extends RTCStats {
- jitter?: MSJitter;
delay?: MSDelay;
+ jitter?: MSJitter;
packetLoss?: MSPacketLoss;
utilization?: MSUtilization;
}
interface MSNetworkConnectivityInfo {
- vpn?: boolean;
linkspeed?: number;
networkConnectionDetails?: string;
+ vpn?: boolean;
}
interface MSNetworkInterfaceType {
interfaceTypeEthernet?: boolean;
- interfaceTypeWireless?: boolean;
interfaceTypePPP?: boolean;
interfaceTypeTunnel?: boolean;
+ interfaceTypeWireless?: boolean;
interfaceTypeWWAN?: boolean;
}
@@ -447,13 +566,13 @@ interface MSPayloadBase extends RTCStats {
}
interface MSPortRange {
- min?: number;
max?: number;
+ min?: number;
}
interface MSRelayAddress {
- relayAddress?: string;
port?: number;
+ relayAddress?: string;
}
interface MSSignatureParameters {
@@ -461,241 +580,122 @@ interface MSSignatureParameters {
}
interface MSTransportDiagnosticsStats extends RTCStats {
+ allocationTimeInMs?: number;
baseAddress?: string;
+ baseInterface?: MSNetworkInterfaceType;
+ iceRole?: RTCIceRole;
+ iceWarningFlags?: MSIceWarningFlags;
+ interfaces?: MSNetworkInterfaceType;
localAddress?: string;
- localSite?: string;
- networkName?: string;
- remoteAddress?: string;
- remoteSite?: string;
+ localAddrType?: MSIceAddrType;
+ localInterface?: MSNetworkInterfaceType;
localMR?: string;
- remoteMR?: string;
- iceWarningFlags?: MSIceWarningFlags;
- portRangeMin?: number;
- portRangeMax?: number;
localMRTCPPort?: number;
- remoteMRTCPPort?: number;
- stunVer?: number;
- numConsentReqSent?: number;
+ localSite?: string;
+ msRtcEngineVersion?: string;
+ networkName?: string;
numConsentReqReceived?: number;
- numConsentRespSent?: number;
+ numConsentReqSent?: number;
numConsentRespReceived?: number;
- interfaces?: MSNetworkInterfaceType;
- baseInterface?: MSNetworkInterfaceType;
+ numConsentRespSent?: number;
+ portRangeMax?: number;
+ portRangeMin?: number;
protocol?: RTCIceProtocol;
- localInterface?: MSNetworkInterfaceType;
- localAddrType?: MSIceAddrType;
+ remoteAddress?: string;
remoteAddrType?: MSIceAddrType;
- iceRole?: RTCIceRole;
+ remoteMR?: string;
+ remoteMRTCPPort?: number;
+ remoteSite?: string;
rtpRtcpMux?: boolean;
- allocationTimeInMs?: number;
- msRtcEngineVersion?: string;
+ stunVer?: number;
}
interface MSUtilization {
- packets?: number;
bandwidthEstimation?: number;
- bandwidthEstimationMin?: number;
+ bandwidthEstimationAvg?: number;
bandwidthEstimationMax?: number;
+ bandwidthEstimationMin?: number;
bandwidthEstimationStdDev?: number;
- bandwidthEstimationAvg?: number;
+ packets?: number;
}
interface MSVideoPayload extends MSPayloadBase {
+ durationSeconds?: number;
resolution?: string;
videoBitRateAvg?: number;
videoBitRateMax?: number;
videoFrameRateAvg?: number;
videoPacketLossRate?: number;
- durationSeconds?: number;
}
interface MSVideoRecvPayload extends MSVideoPayload {
- videoFrameLossRate?: number;
+ lowBitRateCallPercent?: number;
+ lowFrameRateCallPercent?: number;
+ recvBitRateAverage?: number;
+ recvBitRateMaximum?: number;
recvCodecType?: string;
- recvResolutionWidth?: number;
- recvResolutionHeight?: number;
- videoResolutions?: MSVideoResolutionDistribution;
+ recvFpsHarmonicAverage?: number;
recvFrameRateAverage?: number;
- recvBitRateMaximum?: number;
- recvBitRateAverage?: number;
+ recvNumResSwitches?: number;
+ recvReorderBufferMaxSuccessfullyOrderedExtent?: number;
+ recvReorderBufferMaxSuccessfullyOrderedLateTime?: number;
+ recvReorderBufferPacketsDroppedDueToBufferExhaustion?: number;
+ recvReorderBufferPacketsDroppedDueToTimeout?: number;
+ recvReorderBufferReorderedPackets?: number;
+ recvResolutionHeight?: number;
+ recvResolutionWidth?: 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;
+ videoFrameLossRate?: number;
+ videoPostFECPLR?: number;
+ videoResolutions?: MSVideoResolutionDistribution;
}
interface MSVideoResolutionDistribution {
cifQuality?: number;
- vgaQuality?: number;
- h720Quality?: number;
h1080Quality?: number;
h1440Quality?: number;
h2160Quality?: number;
+ h720Quality?: number;
+ vgaQuality?: number;
}
interface MSVideoSendPayload extends MSVideoPayload {
- sendFrameRateAverage?: number;
- sendBitRateMaximum?: number;
sendBitRateAverage?: number;
- sendVideoStreamsMax?: number;
- sendResolutionWidth?: number;
+ sendBitRateMaximum?: number;
+ sendFrameRateAverage?: 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;
+ sendResolutionWidth?: number;
+ sendVideoStreamsMax?: number;
}
interface MsZoomToOptions {
+ animate?: string;
contentX?: number;
contentY?: number;
+ scaleFactor?: number;
viewportX?: string;
viewportY?: string;
- scaleFactor?: number;
- animate?: string;
}
interface MutationObserverInit {
- childList?: boolean;
+ attributeFilter?: string[];
+ attributeOldValue?: boolean;
attributes?: boolean;
characterData?: boolean;
- subtree?: boolean;
- attributeOldValue?: boolean;
characterDataOldValue?: boolean;
- attributeFilter?: string[];
+ childList?: boolean;
+ subtree?: boolean;
}
interface NotificationOptions {
+ body?: string;
dir?: NotificationDirection;
+ icon?: string;
lang?: string;
- body?: string;
tag?: string;
- icon?: string;
}
interface ObjectURLOptions {
@@ -704,39 +704,39 @@ interface ObjectURLOptions {
interface PaymentCurrencyAmount {
currency?: string;
- value?: string;
currencySystem?: string;
+ value?: string;
}
interface PaymentDetails {
- total?: PaymentItem;
displayItems?: PaymentItem[];
- shippingOptions?: PaymentShippingOption[];
- modifiers?: PaymentDetailsModifier[];
error?: string;
+ modifiers?: PaymentDetailsModifier[];
+ shippingOptions?: PaymentShippingOption[];
+ total?: PaymentItem;
}
interface PaymentDetailsModifier {
- supportedMethods?: string[];
- total?: PaymentItem;
additionalDisplayItems?: PaymentItem[];
data?: any;
+ supportedMethods?: string[];
+ total?: PaymentItem;
}
interface PaymentItem {
- label?: string;
amount?: PaymentCurrencyAmount;
+ label?: string;
pending?: boolean;
}
interface PaymentMethodData {
- supportedMethods?: string[];
data?: any;
+ supportedMethods?: string[];
}
interface PaymentOptions {
- requestPayerName?: boolean;
requestPayerEmail?: boolean;
+ requestPayerName?: boolean;
requestPayerPhone?: boolean;
requestShipping?: boolean;
shippingType?: string;
@@ -746,9 +746,9 @@ interface PaymentRequestUpdateEventInit extends EventInit {
}
interface PaymentShippingOption {
+ amount?: PaymentCurrencyAmount;
id?: string;
label?: string;
- amount?: PaymentCurrencyAmount;
selected?: boolean;
}
@@ -757,14 +757,14 @@ interface PeriodicWaveConstraints {
}
interface PointerEventInit extends MouseEventInit {
- pointerId?: number;
- width?: number;
height?: number;
+ isPrimary?: boolean;
+ pointerId?: number;
+ pointerType?: string;
pressure?: number;
tiltX?: number;
tiltY?: number;
- pointerType?: string;
- isPrimary?: boolean;
+ width?: number;
}
interface PopStateEventInit extends EventInit {
@@ -773,8 +773,8 @@ interface PopStateEventInit extends EventInit {
interface PositionOptions {
enableHighAccuracy?: boolean;
- timeout?: number;
maximumAge?: number;
+ timeout?: number;
}
interface ProgressEventInit extends EventInit {
@@ -784,38 +784,63 @@ interface ProgressEventInit extends EventInit {
}
interface PushSubscriptionOptionsInit {
- userVisibleOnly?: boolean;
applicationServerKey?: any;
+ userVisibleOnly?: boolean;
+}
+
+interface RegistrationOptions {
+ scope?: string;
+}
+
+interface RequestInit {
+ body?: any;
+ cache?: RequestCache;
+ credentials?: RequestCredentials;
+ headers?: any;
+ integrity?: string;
+ keepalive?: boolean;
+ method?: string;
+ mode?: RequestMode;
+ redirect?: RequestRedirect;
+ referrer?: string;
+ referrerPolicy?: ReferrerPolicy;
+ window?: any;
+}
+
+interface ResponseInit {
+ headers?: any;
+ status?: number;
+ statusText?: string;
}
interface RTCConfiguration {
+ bundlePolicy?: RTCBundlePolicy;
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[];
+ role?: RTCDtlsRole;
+}
+
+interface RTCDTMFToneChangeEventInit extends EventInit {
+ tone?: string;
}
interface RTCIceCandidateAttributes extends RTCStats {
+ addressSourceUrl?: string;
+ candidateType?: RTCStatsIceCandidateType;
ipAddress?: string;
portNumber?: number;
- transport?: string;
- candidateType?: RTCStatsIceCandidateType;
priority?: number;
- addressSourceUrl?: string;
+ transport?: string;
}
interface RTCIceCandidateComplete {
@@ -823,15 +848,15 @@ interface RTCIceCandidateComplete {
interface RTCIceCandidateDictionary {
foundation?: string;
- priority?: number;
ip?: string;
- protocol?: RTCIceProtocol;
+ msMTurnSessionId?: string;
port?: number;
- type?: RTCIceCandidateType;
- tcpType?: RTCIceTcpCandidateType;
+ priority?: number;
+ protocol?: RTCIceProtocol;
relatedAddress?: string;
relatedPort?: number;
- msMTurnSessionId?: string;
+ tcpType?: RTCIceTcpCandidateType;
+ type?: RTCIceCandidateType;
}
interface RTCIceCandidateInit {
@@ -846,19 +871,19 @@ interface RTCIceCandidatePair {
}
interface RTCIceCandidatePairStats extends RTCStats {
- transportId?: string;
+ availableIncomingBitrate?: number;
+ availableOutgoingBitrate?: number;
+ bytesReceived?: number;
+ bytesSent?: number;
localCandidateId?: string;
- remoteCandidateId?: string;
- state?: RTCStatsIceCandidatePairState;
- priority?: number;
nominated?: boolean;
- writable?: boolean;
+ priority?: number;
readable?: boolean;
- bytesSent?: number;
- bytesReceived?: number;
+ remoteCandidateId?: string;
roundTripTime?: number;
- availableOutgoingBitrate?: number;
- availableIncomingBitrate?: number;
+ state?: RTCStatsIceCandidatePairState;
+ transportId?: string;
+ writable?: boolean;
}
interface RTCIceGatherOptions {
@@ -868,285 +893,260 @@ interface RTCIceGatherOptions {
}
interface RTCIceParameters {
- usernameFragment?: string;
- password?: string;
iceLite?: boolean;
+ password?: string;
+ usernameFragment?: string;
}
interface RTCIceServer {
+ credential?: string;
urls?: any;
username?: string;
- credential?: string;
}
interface RTCInboundRTPStreamStats extends RTCRTPStreamStats {
- packetsReceived?: number;
bytesReceived?: number;
- packetsLost?: number;
- jitter?: number;
fractionLost?: number;
+ jitter?: number;
+ packetsLost?: number;
+ packetsReceived?: 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;
+ frameHeight?: number;
+ framesCorrupted?: number;
+ framesDecoded?: number;
+ framesDropped?: number;
+ framesPerSecond?: number;
+ framesReceived?: number;
+ framesSent?: number;
+ frameWidth?: number;
+ remoteSource?: boolean;
+ ssrcIds?: string[];
+ trackIdentifier?: string;
}
interface RTCOfferOptions {
- offerToReceiveVideo?: number;
+ iceRestart?: boolean;
offerToReceiveAudio?: number;
+ offerToReceiveVideo?: number;
voiceActivityDetection?: boolean;
- iceRestart?: boolean;
}
interface RTCOutboundRTPStreamStats extends RTCRTPStreamStats {
- packetsSent?: number;
bytesSent?: number;
- targetBitrate?: number;
+ packetsSent?: number;
roundTripTime?: number;
+ targetBitrate?: 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;
+ type?: string;
}
interface RTCRtcpParameters {
- ssrc?: number;
cname?: string;
- reducedSize?: boolean;
mux?: boolean;
+ reducedSize?: boolean;
+ ssrc?: number;
}
interface RTCRtpCapabilities {
codecs?: RTCRtpCodecCapability[];
- headerExtensions?: RTCRtpHeaderExtension[];
fecMechanisms?: string[];
+ headerExtensions?: RTCRtpHeaderExtension[];
}
interface RTCRtpCodecCapability {
- name?: string;
- kind?: string;
clockRate?: number;
- preferredPayloadType?: number;
+ kind?: string;
maxptime?: number;
- ptime?: number;
+ maxSpatialLayers?: number;
+ maxTemporalLayers?: number;
+ name?: string;
numChannels?: number;
- rtcpFeedback?: RTCRtcpFeedback[];
- parameters?: any;
options?: any;
- maxTemporalLayers?: number;
- maxSpatialLayers?: number;
+ parameters?: any;
+ preferredPayloadType?: number;
+ ptime?: number;
+ rtcpFeedback?: RTCRtcpFeedback[];
svcMultiStreamSupport?: boolean;
}
interface RTCRtpCodecParameters {
- name?: string;
- payloadType?: any;
clockRate?: number;
maxptime?: number;
- ptime?: number;
+ name?: string;
numChannels?: number;
- rtcpFeedback?: RTCRtcpFeedback[];
parameters?: any;
+ payloadType?: any;
+ ptime?: number;
+ rtcpFeedback?: RTCRtcpFeedback[];
}
interface RTCRtpContributingSource {
- timestamp?: number;
- csrc?: number;
audioLevel?: number;
+ csrc?: number;
+ timestamp?: number;
}
interface RTCRtpEncodingParameters {
- ssrc?: number;
+ active?: boolean;
codecPayloadType?: number;
+ dependencyEncodingIds?: string[];
+ encodingId?: string;
fec?: RTCRtpFecParameters;
- rtx?: RTCRtpRtxParameters;
- priority?: number;
+ framerateScale?: number;
maxBitrate?: number;
+ maxFramerate?: number;
minQuality?: number;
+ priority?: number;
resolutionScale?: number;
- framerateScale?: number;
- maxFramerate?: number;
- active?: boolean;
- encodingId?: string;
- dependencyEncodingIds?: string[];
+ rtx?: RTCRtpRtxParameters;
+ ssrc?: number;
ssrcRange?: RTCSsrcRange;
}
interface RTCRtpFecParameters {
- ssrc?: number;
mechanism?: string;
+ ssrc?: number;
}
interface RTCRtpHeaderExtension {
kind?: string;
- uri?: string;
- preferredId?: number;
preferredEncrypt?: boolean;
+ preferredId?: number;
+ uri?: string;
}
interface RTCRtpHeaderExtensionParameters {
- uri?: string;
- id?: number;
encrypt?: boolean;
+ id?: number;
+ uri?: string;
}
interface RTCRtpParameters {
- muxId?: string;
codecs?: RTCRtpCodecParameters[];
- headerExtensions?: RTCRtpHeaderExtensionParameters[];
+ degradationPreference?: RTCDegradationPreference;
encodings?: RTCRtpEncodingParameters[];
+ headerExtensions?: RTCRtpHeaderExtensionParameters[];
+ muxId?: string;
rtcp?: RTCRtcpParameters;
- degradationPreference?: RTCDegradationPreference;
}
interface RTCRtpRtxParameters {
ssrc?: number;
}
+interface RTCRTPStreamStats extends RTCStats {
+ associateStatsId?: string;
+ codecId?: string;
+ firCount?: number;
+ isRemote?: boolean;
+ mediaTrackId?: string;
+ nackCount?: number;
+ pliCount?: number;
+ sliCount?: number;
+ ssrc?: string;
+ transportId?: string;
+}
+
interface RTCRtpUnhandled {
- ssrc?: number;
- payloadType?: number;
muxId?: string;
+ payloadType?: number;
+ ssrc?: number;
}
interface RTCSessionDescriptionInit {
- type?: RTCSdpType;
sdp?: string;
+ type?: RTCSdpType;
}
interface RTCSrtpKeyParam {
keyMethod?: string;
keySalt?: string;
lifetime?: string;
- mkiValue?: number;
mkiLength?: number;
+ mkiValue?: number;
}
interface RTCSrtpSdesParameters {
- tag?: number;
cryptoSuite?: string;
keyParams?: RTCSrtpKeyParam[];
sessionParams?: string[];
+ tag?: number;
}
interface RTCSsrcRange {
- min?: number;
max?: number;
+ min?: number;
}
interface RTCStats {
- timestamp?: number;
- type?: RTCStatsType;
id?: string;
msType?: MSStatsType;
+ timestamp?: number;
+ type?: RTCStatsType;
}
interface RTCStatsReport {
}
interface RTCTransportStats extends RTCStats {
- bytesSent?: number;
- bytesReceived?: number;
- rtcpTransportStatsId?: string;
activeConnection?: boolean;
- selectedCandidatePairId?: string;
+ bytesReceived?: number;
+ bytesSent?: number;
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;
+ rtcpTransportStatsId?: string;
+ selectedCandidatePairId?: string;
}
interface ScopedCredentialDescriptor {
- type?: ScopedCredentialType;
id?: any;
transports?: Transport[];
+ type?: ScopedCredentialType;
}
interface ScopedCredentialOptions {
- timeoutSeconds?: number;
- rpId?: USVString;
excludeList?: ScopedCredentialDescriptor[];
extensions?: WebAuthnExtensions;
+ rpId?: USVString;
+ timeoutSeconds?: number;
}
interface ScopedCredentialParameters {
- type?: ScopedCredentialType;
algorithm?: string | Algorithm;
+ type?: ScopedCredentialType;
}
interface ServiceWorkerMessageEventInit extends EventInit {
data?: any;
- origin?: string;
lastEventId?: string;
- source?: ServiceWorker | MessagePort;
+ origin?: string;
ports?: MessagePort[];
+ source?: ServiceWorker | MessagePort;
}
interface SpeechSynthesisEventInit extends EventInit {
- utterance?: SpeechSynthesisUtterance;
charIndex?: number;
elapsedTime?: number;
name?: string;
+ utterance?: SpeechSynthesisUtterance;
}
interface StoreExceptionsInformation extends ExceptionInformation {
- siteName?: string;
- explanationString?: string;
detailURI?: string;
+ explanationString?: string;
+ siteName?: string;
}
interface StoreSiteSpecificExceptionsInformation extends StoreExceptionsInformation {
@@ -1158,13 +1158,13 @@ interface TrackEventInit extends EventInit {
}
interface TransitionEventInit extends EventInit {
- propertyName?: string;
elapsedTime?: number;
+ propertyName?: string;
}
interface UIEventInit extends EventInit {
- view?: Window;
detail?: number;
+ view?: Window;
}
interface WebAuthnExtensions {
@@ -1173,11 +1173,11 @@ interface WebAuthnExtensions {
interface WebGLContextAttributes {
failIfMajorPerformanceCaveat?: boolean;
alpha?: boolean;
- depth?: boolean;
- stencil?: boolean;
antialias?: boolean;
+ depth?: boolean;
premultipliedAlpha?: boolean;
preserveDrawingBuffer?: boolean;
+ stencil?: boolean;
}
interface WebGLContextEventInit extends EventInit {
@@ -1185,10 +1185,10 @@ interface WebGLContextEventInit extends EventInit {
}
interface WheelEventInit extends MouseEventInit {
+ deltaMode?: number;
deltaX?: number;
deltaY?: number;
deltaZ?: number;
- deltaMode?: number;
}
interface EventListener {
@@ -1207,19 +1207,6 @@ 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;
@@ -1235,8 +1222,21 @@ interface AnalyserNode extends AudioNode {
declare var AnalyserNode: {
prototype: AnalyserNode;
new(): AnalyserNode;
+};
+
+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 AnimationEvent extends Event {
readonly animationName: string;
readonly elapsedTime: number;
@@ -1246,7 +1246,7 @@ interface AnimationEvent extends Event {
declare var AnimationEvent: {
prototype: AnimationEvent;
new(typeArg: string, eventInitDict?: AnimationEventInit): AnimationEvent;
-}
+};
interface ApplicationCacheEventMap {
"cached": Event;
@@ -1291,7 +1291,7 @@ declare var ApplicationCache: {
readonly OBSOLETE: number;
readonly UNCACHED: number;
readonly UPDATEREADY: number;
-}
+};
interface Attr extends Node {
readonly name: string;
@@ -1304,7 +1304,7 @@ interface Attr extends Node {
declare var Attr: {
prototype: Attr;
new(): Attr;
-}
+};
interface AudioBuffer {
readonly duration: number;
@@ -1319,7 +1319,7 @@ interface AudioBuffer {
declare var AudioBuffer: {
prototype: AudioBuffer;
new(): AudioBuffer;
-}
+};
interface AudioBufferSourceNodeEventMap {
"ended": MediaStreamErrorEvent;
@@ -1342,7 +1342,7 @@ interface AudioBufferSourceNode extends AudioNode {
declare var AudioBufferSourceNode: {
prototype: AudioBufferSourceNode;
new(): AudioBufferSourceNode;
-}
+};
interface AudioContextEventMap {
"statechange": Event;
@@ -1388,7 +1388,7 @@ interface AudioContext extends AudioContextBase {
declare var AudioContext: {
prototype: AudioContext;
new(): AudioContext;
-}
+};
interface AudioDestinationNode extends AudioNode {
readonly maxChannelCount: number;
@@ -1397,7 +1397,7 @@ interface AudioDestinationNode extends AudioNode {
declare var AudioDestinationNode: {
prototype: AudioDestinationNode;
new(): AudioDestinationNode;
-}
+};
interface AudioListener {
dopplerFactor: number;
@@ -1410,7 +1410,7 @@ interface AudioListener {
declare var AudioListener: {
prototype: AudioListener;
new(): AudioListener;
-}
+};
interface AudioNode extends EventTarget {
channelCount: number;
@@ -1429,7 +1429,7 @@ interface AudioNode extends EventTarget {
declare var AudioNode: {
prototype: AudioNode;
new(): AudioNode;
-}
+};
interface AudioParam {
readonly defaultValue: number;
@@ -1445,7 +1445,7 @@ interface AudioParam {
declare var AudioParam: {
prototype: AudioParam;
new(): AudioParam;
-}
+};
interface AudioProcessingEvent extends Event {
readonly inputBuffer: AudioBuffer;
@@ -1456,7 +1456,7 @@ interface AudioProcessingEvent extends Event {
declare var AudioProcessingEvent: {
prototype: AudioProcessingEvent;
new(): AudioProcessingEvent;
-}
+};
interface AudioTrack {
enabled: boolean;
@@ -1470,7 +1470,7 @@ interface AudioTrack {
declare var AudioTrack: {
prototype: AudioTrack;
new(): AudioTrack;
-}
+};
interface AudioTrackListEventMap {
"addtrack": TrackEvent;
@@ -1493,7 +1493,7 @@ interface AudioTrackList extends EventTarget {
declare var AudioTrackList: {
prototype: AudioTrackList;
new(): AudioTrackList;
-}
+};
interface BarProp {
readonly visible: boolean;
@@ -1502,7 +1502,7 @@ interface BarProp {
declare var BarProp: {
prototype: BarProp;
new(): BarProp;
-}
+};
interface BeforeUnloadEvent extends Event {
returnValue: any;
@@ -1511,13 +1511,13 @@ interface BeforeUnloadEvent extends Event {
declare var BeforeUnloadEvent: {
prototype: BeforeUnloadEvent;
new(): BeforeUnloadEvent;
-}
+};
interface BiquadFilterNode extends AudioNode {
- readonly Q: AudioParam;
readonly detune: AudioParam;
readonly frequency: AudioParam;
readonly gain: AudioParam;
+ readonly Q: AudioParam;
type: BiquadFilterType;
getFrequencyResponse(frequencyHz: Float32Array, magResponse: Float32Array, phaseResponse: Float32Array): void;
}
@@ -1525,7 +1525,7 @@ interface BiquadFilterNode extends AudioNode {
declare var BiquadFilterNode: {
prototype: BiquadFilterNode;
new(): BiquadFilterNode;
-}
+};
interface Blob {
readonly size: number;
@@ -1538,16 +1538,305 @@ interface 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 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 CDATASection extends Text {
}
declare var CDATASection: {
prototype: CDATASection;
new(): CDATASection;
+};
+
+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, ...optionalParams: any[]): void;
+ groupCollapsed(groupTitle?: string, ...optionalParams: any[]): 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 CSS {
supports(property: string, value?: string): boolean;
}
@@ -1560,7 +1849,7 @@ interface CSSConditionRule extends CSSGroupingRule {
declare var CSSConditionRule: {
prototype: CSSConditionRule;
new(): CSSConditionRule;
-}
+};
interface CSSFontFaceRule extends CSSRule {
readonly style: CSSStyleDeclaration;
@@ -1569,7 +1858,7 @@ interface CSSFontFaceRule extends CSSRule {
declare var CSSFontFaceRule: {
prototype: CSSFontFaceRule;
new(): CSSFontFaceRule;
-}
+};
interface CSSGroupingRule extends CSSRule {
readonly cssRules: CSSRuleList;
@@ -1580,7 +1869,7 @@ interface CSSGroupingRule extends CSSRule {
declare var CSSGroupingRule: {
prototype: CSSGroupingRule;
new(): CSSGroupingRule;
-}
+};
interface CSSImportRule extends CSSRule {
readonly href: string;
@@ -1591,7 +1880,7 @@ interface CSSImportRule extends CSSRule {
declare var CSSImportRule: {
prototype: CSSImportRule;
new(): CSSImportRule;
-}
+};
interface CSSKeyframeRule extends CSSRule {
keyText: string;
@@ -1601,7 +1890,7 @@ interface CSSKeyframeRule extends CSSRule {
declare var CSSKeyframeRule: {
prototype: CSSKeyframeRule;
new(): CSSKeyframeRule;
-}
+};
interface CSSKeyframesRule extends CSSRule {
readonly cssRules: CSSRuleList;
@@ -1614,7 +1903,7 @@ interface CSSKeyframesRule extends CSSRule {
declare var CSSKeyframesRule: {
prototype: CSSKeyframesRule;
new(): CSSKeyframesRule;
-}
+};
interface CSSMediaRule extends CSSConditionRule {
readonly media: MediaList;
@@ -1623,7 +1912,7 @@ interface CSSMediaRule extends CSSConditionRule {
declare var CSSMediaRule: {
prototype: CSSMediaRule;
new(): CSSMediaRule;
-}
+};
interface CSSNamespaceRule extends CSSRule {
readonly namespaceURI: string;
@@ -1633,7 +1922,7 @@ interface CSSNamespaceRule extends CSSRule {
declare var CSSNamespaceRule: {
prototype: CSSNamespaceRule;
new(): CSSNamespaceRule;
-}
+};
interface CSSPageRule extends CSSRule {
readonly pseudoClass: string;
@@ -1645,7 +1934,7 @@ interface CSSPageRule extends CSSRule {
declare var CSSPageRule: {
prototype: CSSPageRule;
new(): CSSPageRule;
-}
+};
interface CSSRule {
cssText: string;
@@ -1655,8 +1944,8 @@ interface CSSRule {
readonly CHARSET_RULE: number;
readonly FONT_FACE_RULE: number;
readonly IMPORT_RULE: number;
- readonly KEYFRAMES_RULE: number;
readonly KEYFRAME_RULE: number;
+ readonly KEYFRAMES_RULE: number;
readonly MEDIA_RULE: number;
readonly NAMESPACE_RULE: number;
readonly PAGE_RULE: number;
@@ -1672,8 +1961,8 @@ declare var CSSRule: {
readonly CHARSET_RULE: number;
readonly FONT_FACE_RULE: number;
readonly IMPORT_RULE: number;
- readonly KEYFRAMES_RULE: number;
readonly KEYFRAME_RULE: number;
+ readonly KEYFRAMES_RULE: number;
readonly MEDIA_RULE: number;
readonly NAMESPACE_RULE: number;
readonly PAGE_RULE: number;
@@ -1681,7 +1970,7 @@ declare var CSSRule: {
readonly SUPPORTS_RULE: number;
readonly UNKNOWN_RULE: number;
readonly VIEWPORT_RULE: number;
-}
+};
interface CSSRuleList {
readonly length: number;
@@ -1692,13 +1981,13 @@ interface CSSRuleList {
declare var CSSRuleList: {
prototype: CSSRuleList;
new(): CSSRuleList;
-}
+};
interface CSSStyleDeclaration {
alignContent: string | null;
alignItems: string | null;
- alignSelf: string | null;
alignmentBaseline: string | null;
+ alignSelf: string | null;
animation: string | null;
animationDelay: string | null;
animationDirection: string | null;
@@ -1774,9 +2063,9 @@ interface CSSStyleDeclaration {
columnRuleColor: any;
columnRuleStyle: string | null;
columnRuleWidth: any;
+ columns: string | null;
columnSpan: string | null;
columnWidth: any;
- columns: string | null;
content: string | null;
counterIncrement: string | null;
counterReset: string | null;
@@ -1846,24 +2135,24 @@ interface CSSStyleDeclaration {
minHeight: string | null;
minWidth: string | null;
msContentZoomChaining: string | null;
+ msContentZooming: 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;
+ msGridColumnSpan: any;
msGridRow: any;
msGridRowAlign: string | null;
- msGridRowSpan: any;
msGridRows: string | null;
+ msGridRowSpan: any;
msHighContrastAdjust: string | null;
msHyphenateLimitChars: string | null;
msHyphenateLimitLines: any;
@@ -1999,9 +2288,9 @@ interface CSSStyleDeclaration {
webkitColumnRuleColor: any;
webkitColumnRuleStyle: string | null;
webkitColumnRuleWidth: any;
+ webkitColumns: string | null;
webkitColumnSpan: string | null;
webkitColumnWidth: any;
- webkitColumns: string | null;
webkitFilter: string | null;
webkitFlex: string | null;
webkitFlexBasis: string | null;
@@ -2053,7 +2342,7 @@ interface CSSStyleDeclaration {
declare var CSSStyleDeclaration: {
prototype: CSSStyleDeclaration;
new(): CSSStyleDeclaration;
-}
+};
interface CSSStyleRule extends CSSRule {
readonly readOnly: boolean;
@@ -2064,7 +2353,7 @@ interface CSSStyleRule extends CSSRule {
declare var CSSStyleRule: {
prototype: CSSStyleRule;
new(): CSSStyleRule;
-}
+};
interface CSSStyleSheet extends StyleSheet {
readonly cssRules: CSSRuleList;
@@ -2090,7 +2379,7 @@ interface CSSStyleSheet extends StyleSheet {
declare var CSSStyleSheet: {
prototype: CSSStyleSheet;
new(): CSSStyleSheet;
-}
+};
interface CSSSupportsRule extends CSSConditionRule {
}
@@ -2098,296 +2387,7 @@ 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;
@@ -2397,150 +2397,7 @@ interface CustomEvent extends Event {
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;
@@ -2551,7 +2408,7 @@ interface DataCue extends TextTrackCue {
declare var DataCue: {
prototype: DataCue;
new(): DataCue;
-}
+};
interface DataTransfer {
dropEffect: string;
@@ -2568,7 +2425,7 @@ interface DataTransfer {
declare var DataTransfer: {
prototype: DataTransfer;
new(): DataTransfer;
-}
+};
interface DataTransferItem {
readonly kind: string;
@@ -2581,7 +2438,7 @@ interface DataTransferItem {
declare var DataTransferItem: {
prototype: DataTransferItem;
new(): DataTransferItem;
-}
+};
interface DataTransferItemList {
readonly length: number;
@@ -2595,7 +2452,7 @@ interface DataTransferItemList {
declare var DataTransferItemList: {
prototype: DataTransferItemList;
new(): DataTransferItemList;
-}
+};
interface DeferredPermissionRequest {
readonly id: number;
@@ -2608,7 +2465,7 @@ interface DeferredPermissionRequest {
declare var DeferredPermissionRequest: {
prototype: DeferredPermissionRequest;
new(): DeferredPermissionRequest;
-}
+};
interface DelayNode extends AudioNode {
readonly delayTime: AudioParam;
@@ -2617,7 +2474,7 @@ interface DelayNode extends AudioNode {
declare var DelayNode: {
prototype: DelayNode;
new(): DelayNode;
-}
+};
interface DeviceAcceleration {
readonly x: number | null;
@@ -2628,7 +2485,7 @@ interface DeviceAcceleration {
declare var DeviceAcceleration: {
prototype: DeviceAcceleration;
new(): DeviceAcceleration;
-}
+};
interface DeviceLightEvent extends Event {
readonly value: number;
@@ -2637,7 +2494,7 @@ interface DeviceLightEvent extends Event {
declare var DeviceLightEvent: {
prototype: DeviceLightEvent;
new(typeArg: string, eventInitDict?: DeviceLightEventInit): DeviceLightEvent;
-}
+};
interface DeviceMotionEvent extends Event {
readonly acceleration: DeviceAcceleration | null;
@@ -2650,7 +2507,7 @@ interface DeviceMotionEvent extends Event {
declare var DeviceMotionEvent: {
prototype: DeviceMotionEvent;
new(typeArg: string, eventInitDict?: DeviceMotionEventInit): DeviceMotionEvent;
-}
+};
interface DeviceOrientationEvent extends Event {
readonly absolute: boolean;
@@ -2663,7 +2520,7 @@ interface DeviceOrientationEvent extends Event {
declare var DeviceOrientationEvent: {
prototype: DeviceOrientationEvent;
new(typeArg: string, eventInitDict?: DeviceOrientationEventInit): DeviceOrientationEvent;
-}
+};
interface DeviceRotationRate {
readonly alpha: number | null;
@@ -2674,7 +2531,7 @@ interface DeviceRotationRate {
declare var DeviceRotationRate: {
prototype: DeviceRotationRate;
new(): DeviceRotationRate;
-}
+};
interface DocumentEventMap extends GlobalEventHandlersEventMap {
"abort": UIEvent;
@@ -2769,299 +2626,291 @@ interface DocumentEventMap extends GlobalEventHandlersEventMap {
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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Gets a reference to the root node of the document.
+ */
documentElement: HTMLElement;
/**
- * Sets or gets the security domain of the document.
- */
+ * Sets or gets the security domain of the document.
+ */
domain: string;
/**
- * Retrieves a collection of all embed objects in the document.
- */
+ * Retrieves a collection of all embed objects in the document.
+ */
embeds: HTMLCollectionOf<HTMLEmbedElement>;
/**
- * Sets or gets the foreground (text) color of the document.
- */
+ * 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.
- */
+ * 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.
- */
+ * Retrieves a collection, in source order, of img objects in the document.
+ */
images: HTMLCollectionOf<HTMLImageElement>;
/**
- * Gets the implementation object of the current document.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Contains information about the current URL.
+ */
readonly location: Location;
- msCSSOMElementFloatMetrics: boolean;
msCapsLockWarningOff: boolean;
+ msCSSOMElementFloatMetrics: boolean;
/**
- * Fires when the user aborts the download.
- * @param ev The event.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ /**
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ /**
+ * 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.
- */
+ /**
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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
- */
+ * 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.
- */
+ * 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.
- */
+ * 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
- */
+ * 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.
- */
+ * 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
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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
- */
+ * 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;
@@ -3081,146 +2930,154 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven
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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Gets the root svg element in the document hierarchy.
+ */
readonly rootElement: SVGSVGElement;
/**
- * Retrieves a collection of all script objects in the document.
- */
+ * 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.
- */
+ * 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.
- */
+ * Contains the title of the document.
+ */
title: string;
+ /**
+ * 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;
readonly visibilityState: VisibilityState;
- /**
- * Sets or gets the color of the links that the user has visited.
- */
+ /**
+ * Sets or gets the color of the links that the user has visited.
+ */
vlinkColor: string;
readonly webkitCurrentFullScreenElement: Element | null;
readonly webkitFullscreenElement: Element | null;
@@ -3229,243 +3086,243 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven
readonly xmlEncoding: string | null;
xmlStandalone: boolean;
/**
- * Gets or sets the version attribute specified in the declaration of an XML document.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Creates a comment object with the specified data.
+ * @param data Sets the comment object's data.
+ */
createComment(data: string): Comment;
/**
- * Creates a new document.
- */
+ * Creates a new document.
+ */
createDocumentFragment(): DocumentFragment;
/**
- * Creates an instance of the element for the specified tag.
- * @param tagName The name of an element.
- */
+ * 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: "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.
- */
+ * 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;
+ createNSResolver(nodeResolver: Node): XPathNSResolver;
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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ /**
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -3474,7 +3331,7 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven
declare var Document: {
prototype: Document;
new(): Document;
-}
+};
interface DocumentFragment extends Node, NodeSelector, ParentNode {
getElementById(elementId: string): HTMLElement | null;
@@ -3483,7 +3340,7 @@ interface DocumentFragment extends Node, NodeSelector, ParentNode {
declare var DocumentFragment: {
prototype: DocumentFragment;
new(): DocumentFragment;
-}
+};
interface DocumentType extends Node, ChildNode {
readonly entities: NamedNodeMap;
@@ -3497,8 +3354,151 @@ interface DocumentType extends Node, ChildNode {
declare var DocumentType: {
prototype: DocumentType;
new(): DocumentType;
+};
+
+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 NO_DATA_ALLOWED_ERR: number;
+ readonly NO_MODIFICATION_ALLOWED_ERR: number;
+ readonly NOT_FOUND_ERR: number;
+ readonly NOT_SUPPORTED_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 NO_DATA_ALLOWED_ERR: number;
+ readonly NO_MODIFICATION_ALLOWED_ERR: number;
+ readonly NOT_FOUND_ERR: number;
+ readonly NOT_SUPPORTED_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;
+ toggle(token: string, force?: boolean): boolean;
+ toString(): string;
+ [index: number]: string;
+}
+
+declare var DOMTokenList: {
+ prototype: DOMTokenList;
+ new(): DOMTokenList;
+};
+
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;
@@ -3507,8 +3507,8 @@ interface DragEvent extends MouseEvent {
declare var DragEvent: {
prototype: DragEvent;
- new(): DragEvent;
-}
+ new(type: "drag" | "dragend" | "dragenter" | "dragexit" | "dragleave" | "dragover" | "dragstart" | "drop", dragEventInit?: { dataTransfer?: DataTransfer }): DragEvent;
+};
interface DynamicsCompressorNode extends AudioNode {
readonly attack: AudioParam;
@@ -3522,27 +3522,7 @@ interface DynamicsCompressorNode extends AudioNode {
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;
@@ -3623,9 +3603,9 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec
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;
+ getAttributeNS(namespaceURI: string, localName: string): string;
getBoundingClientRect(): ClientRect;
getClientRects(): ClientRectList;
getElementsByTagName<K extends keyof ElementListTagNameMap>(name: K): ElementListTagNameMap[K];
@@ -3643,18 +3623,18 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec
msZoomTo(args: MsZoomToOptions): void;
releasePointerCapture(pointerId: number): void;
removeAttribute(qualifiedName: string): void;
- removeAttributeNS(namespaceURI: string, localName: string): void;
removeAttributeNode(oldAttr: Attr): Attr;
+ removeAttributeNS(namespaceURI: string, localName: string): void;
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;
+ setAttributeNS(namespaceURI: string, qualifiedName: string, value: string): void;
setPointerCapture(pointerId: number): void;
webkitMatchesSelector(selectors: string): boolean;
- webkitRequestFullScreen(): void;
webkitRequestFullscreen(): void;
+ webkitRequestFullScreen(): void;
getElementsByClassName(classNames: string): NodeListOf<Element>;
matches(selector: string): boolean;
closest(selector: string): Element | null;
@@ -3665,9 +3645,9 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec
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;
+ insertAdjacentElement(position: InsertPosition, insertedElement: Element): Element | null;
+ insertAdjacentHTML(where: InsertPosition, html: string): void;
+ insertAdjacentText(where: InsertPosition, 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;
@@ -3676,7 +3656,7 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec
declare var Element: {
prototype: Element;
new(): Element;
-}
+};
interface ErrorEvent extends Event {
readonly colno: number;
@@ -3690,12 +3670,12 @@ interface ErrorEvent extends Event {
declare var ErrorEvent: {
prototype: ErrorEvent;
new(type: string, errorEventInitDict?: ErrorEventInit): ErrorEvent;
-}
+};
interface Event {
readonly bubbles: boolean;
- cancelBubble: boolean;
readonly cancelable: boolean;
+ cancelBubble: boolean;
readonly currentTarget: EventTarget;
readonly defaultPrevented: boolean;
readonly eventPhase: number;
@@ -3722,7 +3702,7 @@ declare var Event: {
readonly AT_TARGET: number;
readonly BUBBLING_PHASE: number;
readonly CAPTURING_PHASE: number;
-}
+};
interface EventTarget {
addEventListener(type: string, listener?: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
@@ -3733,8 +3713,28 @@ interface EventTarget {
declare var EventTarget: {
prototype: EventTarget;
new(): EventTarget;
+};
+
+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 ExtensionScriptApis {
extensionIdToShortId(extensionId: string): number;
fireExtensionApiTelemetry(functionName: string, isSucceeded: boolean, isSupported: boolean): void;
@@ -3748,7 +3748,7 @@ interface ExtensionScriptApis {
declare var ExtensionScriptApis: {
prototype: ExtensionScriptApis;
new(): ExtensionScriptApis;
-}
+};
interface External {
}
@@ -3756,7 +3756,7 @@ interface External {
declare var External: {
prototype: External;
new(): External;
-}
+};
interface File extends Blob {
readonly lastModifiedDate: any;
@@ -3767,7 +3767,7 @@ interface File extends Blob {
declare var File: {
prototype: File;
new (parts: (ArrayBuffer | ArrayBufferView | Blob | string)[], filename: string, properties?: FilePropertyBag): File;
-}
+};
interface FileList {
readonly length: number;
@@ -3778,7 +3778,7 @@ interface FileList {
declare var FileList: {
prototype: FileList;
new(): FileList;
-}
+};
interface FileReader extends EventTarget, MSBaseReader {
readonly error: DOMError;
@@ -3793,7 +3793,7 @@ interface FileReader extends EventTarget, MSBaseReader {
declare var FileReader: {
prototype: FileReader;
new(): FileReader;
-}
+};
interface FocusEvent extends UIEvent {
readonly relatedTarget: EventTarget;
@@ -3803,7 +3803,7 @@ interface FocusEvent extends UIEvent {
declare var FocusEvent: {
prototype: FocusEvent;
new(typeArg: string, eventInitDict?: FocusEventInit): FocusEvent;
-}
+};
interface FocusNavigationEvent extends Event {
readonly navigationReason: NavigationReason;
@@ -3817,7 +3817,7 @@ interface FocusNavigationEvent extends Event {
declare var FocusNavigationEvent: {
prototype: FocusNavigationEvent;
new(type: string, eventInitDict?: FocusNavigationEventInit): FocusNavigationEvent;
-}
+};
interface FormData {
append(name: string, value: string | Blob, fileName?: string): void;
@@ -3831,7 +3831,7 @@ interface FormData {
declare var FormData: {
prototype: FormData;
new (form?: HTMLFormElement): FormData;
-}
+};
interface GainNode extends AudioNode {
readonly gain: AudioParam;
@@ -3840,7 +3840,7 @@ interface GainNode extends AudioNode {
declare var GainNode: {
prototype: GainNode;
new(): GainNode;
-}
+};
interface Gamepad {
readonly axes: number[];
@@ -3855,7 +3855,7 @@ interface Gamepad {
declare var Gamepad: {
prototype: Gamepad;
new(): Gamepad;
-}
+};
interface GamepadButton {
readonly pressed: boolean;
@@ -3865,7 +3865,7 @@ interface GamepadButton {
declare var GamepadButton: {
prototype: GamepadButton;
new(): GamepadButton;
-}
+};
interface GamepadEvent extends Event {
readonly gamepad: Gamepad;
@@ -3874,7 +3874,7 @@ interface GamepadEvent extends Event {
declare var GamepadEvent: {
prototype: GamepadEvent;
new(typeArg: string, eventInitDict?: GamepadEventInit): GamepadEvent;
-}
+};
interface Geolocation {
clearWatch(watchId: number): void;
@@ -3885,8 +3885,48 @@ interface Geolocation {
declare var Geolocation: {
prototype: Geolocation;
new(): Geolocation;
+};
+
+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 HTMLAllCollection {
readonly length: number;
item(nameOrIndex?: string): HTMLCollection | Element | null;
@@ -3897,87 +3937,87 @@ interface HTMLAllCollection {
declare var HTMLAllCollection: {
prototype: HTMLAllCollection;
new(): HTMLAllCollection;
-}
+};
interface HTMLAnchorElement extends HTMLElement {
- Methods: string;
/**
- * Sets or retrieves the character set used to encode the object.
- */
+ * Sets or retrieves the character set used to encode the object.
+ */
charset: string;
/**
- * Sets or retrieves the coordinates of the object.
- */
+ * Sets or retrieves the coordinates of the object.
+ */
coords: string;
download: string;
/**
- * Contains the anchor portion of the URL including the hash sign (#).
- */
+ * Contains the anchor portion of the URL including the hash sign (#).
+ */
hash: string;
/**
- * Contains the hostname and port values of the URL.
- */
+ * Contains the hostname and port values of the URL.
+ */
host: string;
/**
- * Contains the hostname of a URL.
- */
+ * Contains the hostname of a URL.
+ */
hostname: string;
/**
- * Sets or retrieves a destination URL or an anchor point.
- */
+ * Sets or retrieves a destination URL or an anchor point.
+ */
href: string;
/**
- * Sets or retrieves the language code of the object.
- */
+ * Sets or retrieves the language code of the object.
+ */
hreflang: string;
+ Methods: string;
readonly mimeType: string;
/**
- * Sets or retrieves the shape of the object.
- */
+ * Sets or retrieves the shape of the object.
+ */
name: string;
readonly nameProp: string;
/**
- * Contains the pathname of the URL.
- */
+ * Contains the pathname of the URL.
+ */
pathname: string;
/**
- * Sets or retrieves the port number associated with a URL.
- */
+ * Sets or retrieves the port number associated with a URL.
+ */
port: string;
/**
- * Contains the protocol of the URL.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the substring of the href property that follows the question mark.
+ */
search: string;
/**
- * Sets or retrieves the shape of the object.
- */
+ * Sets or retrieves the shape of the object.
+ */
shape: string;
/**
- * Sets or retrieves the window or frame at which to target content.
- */
+ * 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.
- */
+ * Retrieves or sets the text of the object as a string.
+ */
text: string;
type: string;
urn: string;
- /**
- * Returns a string representation of an object.
- */
+ /**
+ * 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;
@@ -3986,70 +4026,70 @@ interface HTMLAnchorElement extends HTMLElement {
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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves a character string that can be used to implement your own archive functionality for the object.
+ */
archive: string;
+ /**
+ * 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;
border: string;
code: string;
/**
- * Sets or retrieves the URL of the component.
- */
+ * Sets or retrieves the URL of the component.
+ */
codeBase: string;
/**
- * Sets or retrieves the Internet media type for the code associated with the object.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the height of the object.
+ */
height: string;
hspace: number;
/**
- * Sets or retrieves the shape of the object.
- */
+ * 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.
- */
+ * Sets or retrieves a message to be displayed while an object is loading.
+ */
standby: string;
/**
- * Returns the content type of the object.
- */
+ * 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.
- */
+ * 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;
@@ -4060,66 +4100,66 @@ interface HTMLAppletElement extends HTMLElement {
declare var HTMLAppletElement: {
prototype: HTMLAppletElement;
new(): HTMLAppletElement;
-}
+};
interface HTMLAreaElement extends HTMLElement {
/**
- * Sets or retrieves a text alternative to the graphic.
- */
+ * Sets or retrieves a text alternative to the graphic.
+ */
alt: string;
/**
- * Sets or retrieves the coordinates of the object.
- */
+ * 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 (#).
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the host name part of the location or URL.
+ */
hostname: string;
/**
- * Sets or retrieves a destination URL or an anchor point.
- */
+ * Sets or retrieves a destination URL or an anchor point.
+ */
href: string;
/**
- * Sets or gets whether clicks in this region cause action.
- */
+ * Sets or gets whether clicks in this region cause action.
+ */
noHref: boolean;
/**
- * Sets or retrieves the file name or path specified by the object.
- */
+ * Sets or retrieves the file name or path specified by the object.
+ */
pathname: string;
/**
- * Sets or retrieves the port number associated with a URL.
- */
+ * Sets or retrieves the port number associated with a URL.
+ */
port: string;
/**
- * Sets or retrieves the protocol portion of a URL.
- */
+ * 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.
- */
+ * Sets or retrieves the substring of the href property that follows the question mark.
+ */
search: string;
/**
- * Sets or retrieves the shape of the object.
- */
+ * Sets or retrieves the shape of the object.
+ */
shape: string;
/**
- * Sets or retrieves the window or frame at which to target content.
- */
+ * Sets or retrieves the window or frame at which to target content.
+ */
target: string;
- /**
- * Returns a string representation of an object.
- */
+ /**
+ * 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;
@@ -4128,7 +4168,7 @@ interface HTMLAreaElement extends HTMLElement {
declare var HTMLAreaElement: {
prototype: HTMLAreaElement;
new(): HTMLAreaElement;
-}
+};
interface HTMLAreasCollection extends HTMLCollectionBase {
}
@@ -4136,7 +4176,7 @@ 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;
@@ -4146,30 +4186,16 @@ interface HTMLAudioElement extends HTMLMediaElement {
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.
- */
+ * 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.
- */
+ * 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;
@@ -4178,16 +4204,16 @@ interface HTMLBaseElement extends HTMLElement {
declare var HTMLBaseElement: {
prototype: HTMLBaseElement;
new(): HTMLBaseElement;
-}
+};
interface HTMLBaseFontElement extends HTMLElement, DOML2DeprecatedColorProperty {
/**
- * Sets or retrieves the current typeface family.
- */
+ * Sets or retrieves the current typeface family.
+ */
face: string;
/**
- * Sets or retrieves the font size of the object.
- */
+ * 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;
@@ -4196,7 +4222,7 @@ interface HTMLBaseFontElement extends HTMLElement, DOML2DeprecatedColorProperty
declare var HTMLBaseFontElement: {
prototype: HTMLBaseFontElement;
new(): HTMLBaseFontElement;
-}
+};
interface HTMLBodyElementEventMap extends HTMLElementEventMap {
"afterprint": Event;
@@ -4255,71 +4281,85 @@ interface HTMLBodyElement extends HTMLElement {
declare var HTMLBodyElement: {
prototype: HTMLBodyElement;
new(): HTMLBodyElement;
+};
+
+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 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Overrides the target attribute on a form element.
+ */
formTarget: string;
- /**
- * Sets or retrieves the name of the object.
- */
+ /**
+ * Sets or retrieves the name of the object.
+ */
name: string;
status: any;
/**
- * Gets the classification and default behavior of the button.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ /**
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -4328,32 +4368,32 @@ interface HTMLButtonElement extends HTMLElement {
declare var HTMLButtonElement: {
prototype: HTMLButtonElement;
new(): HTMLButtonElement;
-}
+};
interface HTMLCanvasElement extends HTMLElement {
/**
- * Gets or sets the height of a canvas element on a document.
- */
+ * 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.
- */
+ * 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");
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -4363,42 +4403,31 @@ interface HTMLCanvasElement extends HTMLElement {
declare var HTMLCanvasElement: {
prototype: HTMLCanvasElement;
new(): HTMLCanvasElement;
-}
+};
interface HTMLCollectionBase {
/**
- * Sets or retrieves the number of objects in a collection.
- */
+ * Sets or retrieves the number of objects in a collection.
+ */
readonly length: number;
/**
- * Retrieves an object from various collections.
- */
+ * 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.
- */
+ * 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;
@@ -4409,7 +4438,7 @@ interface HTMLDataElement extends HTMLElement {
declare var HTMLDataElement: {
prototype: HTMLDataElement;
new(): HTMLDataElement;
-}
+};
interface HTMLDataListElement extends HTMLElement {
options: HTMLCollectionOf<HTMLOptionElement>;
@@ -4420,7 +4449,7 @@ interface HTMLDataListElement extends HTMLElement {
declare var HTMLDataListElement: {
prototype: HTMLDataListElement;
new(): HTMLDataListElement;
-}
+};
interface HTMLDirectoryElement extends HTMLElement {
compact: boolean;
@@ -4431,16 +4460,16 @@ interface HTMLDirectoryElement extends HTMLElement {
declare var HTMLDirectoryElement: {
prototype: HTMLDirectoryElement;
new(): HTMLDirectoryElement;
-}
+};
interface HTMLDivElement extends HTMLElement {
/**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
+ * Sets or retrieves how the object is aligned with adjacent text.
+ */
align: string;
/**
- * Sets or retrieves whether the browser automatically performs wordwrap.
- */
+ * 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;
@@ -4449,8 +4478,19 @@ interface HTMLDivElement extends HTMLElement {
declare var HTMLDivElement: {
prototype: HTMLDivElement;
new(): HTMLDivElement;
+};
+
+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 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;
@@ -4459,7 +4499,7 @@ interface HTMLDocument extends Document {
declare var HTMLDocument: {
prototype: HTMLDocument;
new(): HTMLDocument;
-}
+};
interface HTMLElementEventMap extends ElementEventMap {
"abort": UIEvent;
@@ -4632,54 +4672,54 @@ interface HTMLElement extends Element {
declare var HTMLElement: {
prototype: HTMLElement;
new(): HTMLElement;
-}
+};
interface HTMLEmbedElement extends HTMLElement, GetSVGDocument {
/**
- * Sets or retrieves the height of the object.
- */
+ * Sets or retrieves the height of the object.
+ */
height: string;
hidden: any;
/**
- * Gets or sets whether the DLNA PlayTo device is available.
- */
+ * 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.
- */
+ * 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.
- */
+ * Gets or sets the primary DLNA PlayTo device.
+ */
msPlayToPrimary: boolean;
/**
- * Gets the source associated with the media element for use by the PlayToManager.
- */
+ * Gets the source associated with the media element for use by the PlayToManager.
+ */
readonly msPlayToSource: any;
/**
- * Sets or retrieves the name of the object.
- */
+ * Sets or retrieves the name of the object.
+ */
name: string;
/**
- * Retrieves the palette used for the embedded document.
- */
+ * Retrieves the palette used for the embedded document.
+ */
readonly palette: string;
/**
- * Retrieves the URL of the plug-in used to view an embedded document.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the height and width units of the embed object.
+ */
units: string;
/**
- * Sets or retrieves the width of the object.
- */
+ * 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;
@@ -4688,39 +4728,39 @@ interface HTMLEmbedElement extends HTMLElement, GetSVGDocument {
declare var HTMLEmbedElement: {
prototype: HTMLEmbedElement;
new(): HTMLEmbedElement;
-}
+};
interface HTMLFieldSetElement extends HTMLElement {
/**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -4729,12 +4769,12 @@ interface HTMLFieldSetElement extends HTMLElement {
declare var HTMLFieldSetElement: {
prototype: HTMLFieldSetElement;
new(): HTMLFieldSetElement;
-}
+};
interface HTMLFontElement extends HTMLElement, DOML2DeprecatedColorProperty, DOML2DeprecatedSizeProperty {
/**
- * Sets or retrieves the current typeface family.
- */
+ * 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;
@@ -4743,7 +4783,7 @@ interface HTMLFontElement extends HTMLElement, DOML2DeprecatedColorProperty, DOM
declare var HTMLFontElement: {
prototype: HTMLFontElement;
new(): HTMLFontElement;
-}
+};
interface HTMLFormControlsCollection extends HTMLCollectionBase {
namedItem(name: string): HTMLCollection | Element | null;
@@ -4752,74 +4792,74 @@ interface HTMLFormControlsCollection extends HTMLCollectionBase {
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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the MIME encoding for the form.
+ */
encoding: string;
/**
- * Sets or retrieves the encoding type for the form.
- */
+ * Sets or retrieves the encoding type for the form.
+ */
enctype: string;
/**
- * Sets or retrieves the number of objects in a collection.
- */
+ * 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.
- */
+ * Sets or retrieves how to send the form data to the server.
+ */
method: string;
/**
- * Sets or retrieves the name of the object.
- */
+ * Sets or retrieves the name of the object.
+ */
name: string;
/**
- * Designates a form that is not validated when submitted.
- */
+ * Designates a form that is not validated when submitted.
+ */
noValidate: boolean;
/**
- * Sets or retrieves the window or frame at which to target content.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Retrieves a form object or an object from an elements collection.
+ */
namedItem(name: string): any;
/**
- * Fires when the user resets a form.
- */
+ * Fires when the user resets a form.
+ */
reset(): void;
/**
- * Fires when a FORM is about to be submitted.
- */
+ * 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;
@@ -4829,7 +4869,7 @@ interface HTMLFormElement extends HTMLElement {
declare var HTMLFormElement: {
prototype: HTMLFormElement;
new(): HTMLFormElement;
-}
+};
interface HTMLFrameElementEventMap extends HTMLElementEventMap {
"load": Event;
@@ -4837,68 +4877,68 @@ interface HTMLFrameElementEventMap extends HTMLElementEventMap {
interface HTMLFrameElement extends HTMLElement, GetSVGDocument {
/**
- * Specifies the properties of a border drawn around an object.
- */
+ * Specifies the properties of a border drawn around an object.
+ */
border: string;
/**
- * Sets or retrieves the border color of the object.
- */
+ * Sets or retrieves the border color of the object.
+ */
borderColor: any;
/**
- * Retrieves the document object of the page or frame.
- */
+ * Retrieves the document object of the page or frame.
+ */
readonly contentDocument: Document;
/**
- * Retrieves the object of the specified.
- */
+ * Retrieves the object of the specified.
+ */
readonly contentWindow: Window;
/**
- * Sets or retrieves whether to display a border for the frame.
- */
+ * Sets or retrieves whether to display a border for the frame.
+ */
frameBorder: string;
/**
- * Sets or retrieves the amount of additional space between the frames.
- */
+ * Sets or retrieves the amount of additional space between the frames.
+ */
frameSpacing: any;
/**
- * Sets or retrieves the height of the object.
- */
+ * Sets or retrieves the height of the object.
+ */
height: string | number;
/**
- * Sets or retrieves a URI to a long description of the object.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the left and right margin widths before displaying the text in a frame.
+ */
marginWidth: string;
/**
- * Sets or retrieves the frame name.
- */
+ * Sets or retrieves the frame name.
+ */
name: string;
/**
- * Sets or retrieves whether the user can resize the frame.
- */
+ * Sets or retrieves whether the user can resize the frame.
+ */
noResize: boolean;
/**
- * Raised when the object has been completely received from the server.
- */
+ * 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.
- */
+ * Sets or retrieves whether the frame can be scrolled.
+ */
scrolling: string;
/**
- * Sets or retrieves a URL to be loaded by the object.
- */
+ * Sets or retrieves a URL to be loaded by the object.
+ */
src: string;
/**
- * Sets or retrieves the width of the object.
- */
+ * 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;
@@ -4907,7 +4947,7 @@ interface HTMLFrameElement extends HTMLElement, GetSVGDocument {
declare var HTMLFrameElement: {
prototype: HTMLFrameElement;
new(): HTMLFrameElement;
-}
+};
interface HTMLFrameSetElementEventMap extends HTMLElementEventMap {
"afterprint": Event;
@@ -4934,33 +4974,33 @@ interface HTMLFrameSetElementEventMap extends HTMLElementEventMap {
interface HTMLFrameSetElement extends HTMLElement {
border: string;
/**
- * Sets or retrieves the border color of the object.
- */
+ * Sets or retrieves the border color of the object.
+ */
borderColor: any;
/**
- * Sets or retrieves the frame widths of the object.
- */
+ * Sets or retrieves the frame widths of the object.
+ */
cols: string;
/**
- * Sets or retrieves whether to display a border for the frame.
- */
+ * Sets or retrieves whether to display a border for the frame.
+ */
frameBorder: string;
/**
- * Sets or retrieves the amount of additional space between the frames.
- */
+ * 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.
- */
+ * 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.
- */
+ * Fires when the object receives focus.
+ */
onfocus: (this: HTMLFrameSetElement, ev: FocusEvent) => any;
onhashchange: (this: HTMLFrameSetElement, ev: HashChangeEvent) => any;
onload: (this: HTMLFrameSetElement, ev: Event) => any;
@@ -4976,8 +5016,8 @@ interface HTMLFrameSetElement extends HTMLElement {
onstorage: (this: HTMLFrameSetElement, ev: StorageEvent) => any;
onunload: (this: HTMLFrameSetElement, ev: Event) => any;
/**
- * Sets or retrieves the frame heights of the object.
- */
+ * 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;
@@ -4986,29 +5026,7 @@ interface HTMLFrameSetElement extends HTMLElement {
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;
@@ -5019,12 +5037,12 @@ interface HTMLHeadElement extends HTMLElement {
declare var HTMLHeadElement: {
prototype: HTMLHeadElement;
new(): HTMLHeadElement;
-}
+};
interface HTMLHeadingElement extends HTMLElement {
/**
- * Sets or retrieves a value that indicates the table alignment.
- */
+ * 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;
@@ -5033,12 +5051,34 @@ interface HTMLHeadingElement extends HTMLElement {
declare var HTMLHeadingElement: {
prototype: HTMLHeadingElement;
new(): HTMLHeadingElement;
+};
+
+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 HTMLHtmlElement extends HTMLElement {
/**
- * Sets or retrieves the DTD version that governs the current document.
- */
+ * 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;
@@ -5047,7 +5087,7 @@ interface HTMLHtmlElement extends HTMLElement {
declare var HTMLHtmlElement: {
prototype: HTMLHtmlElement;
new(): HTMLHtmlElement;
-}
+};
interface HTMLIFrameElementEventMap extends HTMLElementEventMap {
"load": Event;
@@ -5055,79 +5095,79 @@ interface HTMLIFrameElementEventMap extends HTMLElementEventMap {
interface HTMLIFrameElement extends HTMLElement, GetSVGDocument {
/**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
+ * 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.
- */
+ * Specifies the properties of a border drawn around an object.
+ */
border: string;
/**
- * Retrieves the document object of the page or frame.
- */
+ * Retrieves the document object of the page or frame.
+ */
readonly contentDocument: Document;
/**
- * Retrieves the object of the specified.
- */
+ * Retrieves the object of the specified.
+ */
readonly contentWindow: Window;
/**
- * Sets or retrieves whether to display a border for the frame.
- */
+ * Sets or retrieves whether to display a border for the frame.
+ */
frameBorder: string;
/**
- * Sets or retrieves the amount of additional space between the frames.
- */
+ * Sets or retrieves the amount of additional space between the frames.
+ */
frameSpacing: any;
/**
- * Sets or retrieves the height of the object.
- */
+ * Sets or retrieves the height of the object.
+ */
height: string;
/**
- * Sets or retrieves the horizontal margin for the object.
- */
+ * Sets or retrieves the horizontal margin for the object.
+ */
hspace: number;
/**
- * Sets or retrieves a URI to a long description of the object.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the left and right margin widths before displaying the text in a frame.
+ */
marginWidth: string;
/**
- * Sets or retrieves the frame name.
- */
+ * Sets or retrieves the frame name.
+ */
name: string;
/**
- * Sets or retrieves whether the user can resize the frame.
- */
+ * Sets or retrieves whether the user can resize the frame.
+ */
noResize: boolean;
/**
- * Raised when the object has been completely received from the server.
- */
+ * 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.
- */
+ * Sets or retrieves whether the frame can be scrolled.
+ */
scrolling: string;
/**
- * Sets or retrieves a URL to be loaded by the object.
- */
+ * Sets or retrieves a URL to be loaded by the object.
+ */
src: string;
/**
- * Sets or retrieves the vertical margin for the object.
- */
+ * Sets or retrieves the vertical margin for the object.
+ */
vspace: number;
/**
- * Sets or retrieves the width of the object.
- */
+ * 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;
@@ -5136,86 +5176,86 @@ interface HTMLIFrameElement extends HTMLElement, GetSVGDocument {
declare var HTMLIFrameElement: {
prototype: HTMLIFrameElement;
new(): HTMLIFrameElement;
-}
+};
interface HTMLImageElement extends HTMLElement {
/**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
+ * Sets or retrieves how the object is aligned with adjacent text.
+ */
align: string;
/**
- * Sets or retrieves a text alternative to the graphic.
- */
+ * Sets or retrieves a text alternative to the graphic.
+ */
alt: string;
/**
- * Specifies the properties of a border drawn around an object.
- */
+ * Specifies the properties of a border drawn around an object.
+ */
border: string;
/**
- * Retrieves whether the object is fully loaded.
- */
+ * Retrieves whether the object is fully loaded.
+ */
readonly complete: boolean;
crossOrigin: string | null;
readonly currentSrc: string;
/**
- * Sets or retrieves the height of the object.
- */
+ * Sets or retrieves the height of the object.
+ */
height: number;
/**
- * Sets or retrieves the width of the border to draw around the object.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Gets or sets whether the DLNA PlayTo device is available.
+ */
msPlayToDisabled: boolean;
msPlayToPreferredSourceUri: string;
/**
- * Gets or sets the primary DLNA PlayTo device.
- */
+ * Gets or sets the primary DLNA PlayTo device.
+ */
msPlayToPrimary: boolean;
/**
- * Gets the source associated with the media element for use by the PlayToManager.
- */
+ * Gets the source associated with the media element for use by the PlayToManager.
+ */
readonly msPlayToSource: any;
/**
- * Sets or retrieves the name of the object.
- */
+ * Sets or retrieves the name of the object.
+ */
name: string;
/**
- * The original height of the image resource before sizing.
- */
+ * The original height of the image resource before sizing.
+ */
readonly naturalHeight: number;
/**
- * The original width of the image resource before sizing.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the vertical margin for the object.
+ */
vspace: number;
/**
- * Sets or retrieves the width of the object.
- */
+ * Sets or retrieves the width of the object.
+ */
width: number;
readonly x: number;
readonly y: number;
@@ -5227,210 +5267,210 @@ interface HTMLImageElement extends HTMLElement {
declare var HTMLImageElement: {
prototype: HTMLImageElement;
new(): HTMLImageElement;
-}
+};
interface HTMLInputElement extends HTMLElement {
/**
- * Sets or retrieves a comma-separated list of content types.
- */
+ * Sets or retrieves a comma-separated list of content types.
+ */
accept: string;
/**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
+ * Sets or retrieves how the object is aligned with adjacent text.
+ */
align: string;
/**
- * Sets or retrieves a text alternative to the graphic.
- */
+ * Sets or retrieves a text alternative to the graphic.
+ */
alt: string;
/**
- * Specifies whether autocomplete is applied to an editable text field.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the state of the check box or radio button.
+ */
checked: boolean;
/**
- * Retrieves whether the object is fully loaded.
- */
+ * Retrieves whether the object is fully loaded.
+ */
readonly complete: boolean;
/**
- * Sets or retrieves the state of the check box or radio button.
- */
+ * Sets or retrieves the state of the check box or radio button.
+ */
defaultChecked: boolean;
/**
- * Sets or retrieves the initial contents of the object.
- */
+ * Sets or retrieves the initial contents of the object.
+ */
defaultValue: string;
disabled: boolean;
/**
- * Returns a FileList object on a file type input object.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Overrides the target attribute on a form element.
+ */
formTarget: string;
/**
- * Sets or retrieves the height of the object.
- */
+ * Sets or retrieves the height of the object.
+ */
height: string;
/**
- * Sets or retrieves the width of the border to draw around the object.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Returns the value of the data at the cursor's current position.
+ */
value: string;
valueAsDate: Date;
/**
- * Returns the input field value as a number.
- */
+ * Returns the input field value as a number.
+ */
valueAsNumber: number;
/**
- * Sets or retrieves the vertical margin for the object.
- */
+ * Sets or retrieves the vertical margin for the object.
+ */
vspace: number;
webkitdirectory: boolean;
/**
- * Sets or retrieves the width of the object.
- */
+ * Sets or retrieves the width of the object.
+ */
width: string;
/**
- * Returns whether an element will successfully validate based on forms validation rules and constraints.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -5439,31 +5479,16 @@ interface HTMLInputElement extends HTMLElement {
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.
- */
+ * 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.
- */
+ * 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;
@@ -5472,16 +5497,16 @@ interface HTMLLabelElement extends HTMLElement {
declare var HTMLLabelElement: {
prototype: HTMLLabelElement;
new(): HTMLLabelElement;
-}
+};
interface HTMLLegendElement extends HTMLElement {
/**
- * Retrieves a reference to the form that the object is embedded in.
- */
+ * 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.
- */
+ * 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;
@@ -5490,41 +5515,56 @@ interface HTMLLegendElement extends HTMLElement {
declare var HTMLLegendElement: {
prototype: HTMLLegendElement;
new(): HTMLLegendElement;
+};
+
+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 HTMLLinkElement extends HTMLElement, LinkStyle {
/**
- * Sets or retrieves the character set used to encode the object.
- */
+ * 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.
- */
+ * Sets or retrieves a destination URL or an anchor point.
+ */
href: string;
/**
- * Sets or retrieves the language code of the object.
- */
+ * Sets or retrieves the language code of the object.
+ */
hreflang: string;
/**
- * Sets or retrieves the media type.
- */
+ * Sets or retrieves the media type.
+ */
media: string;
/**
- * Sets or retrieves the relationship between the object and the destination of the link.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the window or frame at which to target content.
+ */
target: string;
/**
- * Sets or retrieves the MIME type of the object.
- */
+ * Sets or retrieves the MIME type of the object.
+ */
type: string;
import?: Document;
integrity: string;
@@ -5535,16 +5575,16 @@ interface HTMLLinkElement extends HTMLElement, LinkStyle {
declare var HTMLLinkElement: {
prototype: HTMLLinkElement;
new(): HTMLLinkElement;
-}
+};
interface HTMLMapElement extends HTMLElement {
/**
- * Retrieves a collection of the area objects defined for the given map object.
- */
+ * Retrieves a collection of the area objects defined for the given map object.
+ */
readonly areas: HTMLAreasCollection;
/**
- * Sets or retrieves the name of the object.
- */
+ * 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;
@@ -5553,7 +5593,7 @@ interface HTMLMapElement extends HTMLElement {
declare var HTMLMapElement: {
prototype: HTMLMapElement;
new(): HTMLMapElement;
-}
+};
interface HTMLMarqueeElementEventMap extends HTMLElementEventMap {
"bounce": Event;
@@ -5585,7 +5625,7 @@ interface HTMLMarqueeElement extends HTMLElement {
declare var HTMLMarqueeElement: {
prototype: HTMLMarqueeElement;
new(): HTMLMarqueeElement;
-}
+};
interface HTMLMediaElementEventMap extends HTMLElementEventMap {
"encrypted": MediaEncryptedEvent;
@@ -5594,162 +5634,162 @@ interface HTMLMediaElementEventMap extends HTMLElementEventMap {
interface HTMLMediaElement extends HTMLElement {
/**
- * Returns an AudioTrackList object with the audio tracks for a given video element.
- */
+ * 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.
- */
+ * Gets or sets a value that indicates whether to start playing the media automatically.
+ */
autoplay: boolean;
/**
- * Gets a collection of buffered time ranges.
- */
+ * 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).
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Gets or sets the primary DLNA PlayTo device.
+ */
msPlayToPrimary: boolean;
/**
- * Gets the source associated with the media element for use by the PlayToManager.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Gets TimeRanges for the current media resource that has been played.
+ */
readonly played: TimeRanges;
/**
- * Gets or sets the current playback position, in seconds.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Resets the audio or video object and loads a new media resource.
+ */
load(): void;
/**
- * Clears all effects from the media pipeline.
- */
+ * Clears all effects from the media pipeline.
+ */
msClearEffects(): void;
msGetAsCastingSource(): any;
/**
- * Inserts the specified audio effect into media pipeline.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
+ * Loads and starts playback of a media resource.
+ */
+ play(): Promise<void>;
setMediaKeys(mediaKeys: MediaKeys | null): Promise<void>;
readonly HAVE_CURRENT_DATA: number;
readonly HAVE_ENOUGH_DATA: number;
@@ -5776,7 +5816,7 @@ declare var HTMLMediaElement: {
readonly NETWORK_IDLE: number;
readonly NETWORK_LOADING: number;
readonly NETWORK_NO_SOURCE: number;
-}
+};
interface HTMLMenuElement extends HTMLElement {
compact: boolean;
@@ -5788,32 +5828,32 @@ interface HTMLMenuElement extends HTMLElement {
declare var HTMLMenuElement: {
prototype: HTMLMenuElement;
new(): HTMLMenuElement;
-}
+};
interface HTMLMetaElement extends HTMLElement {
/**
- * Sets or retrieves the character set used to encode the object.
- */
+ * Sets or retrieves the character set used to encode the object.
+ */
charset: string;
/**
- * Gets or sets meta-information to associate with httpEquiv or name.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -5822,7 +5862,7 @@ interface HTMLMetaElement extends HTMLElement {
declare var HTMLMetaElement: {
prototype: HTMLMetaElement;
new(): HTMLMetaElement;
-}
+};
interface HTMLMeterElement extends HTMLElement {
high: number;
@@ -5838,16 +5878,16 @@ interface HTMLMeterElement extends HTMLElement {
declare var HTMLMeterElement: {
prototype: HTMLMeterElement;
new(): HTMLMeterElement;
-}
+};
interface HTMLModElement extends HTMLElement {
/**
- * Sets or retrieves reference information about the object.
- */
+ * Sets or retrieves reference information about the object.
+ */
cite: string;
/**
- * Sets or retrieves the date and time of a modification to the object.
- */
+ * 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;
@@ -5856,131 +5896,115 @@ interface HTMLModElement extends HTMLElement {
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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves a character string that can be used to implement your own archive functionality for the object.
+ */
archive: string;
+ /**
+ * 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;
border: string;
/**
- * Sets or retrieves the URL of the file containing the compiled Java class.
- */
+ * Sets or retrieves the URL of the file containing the compiled Java class.
+ */
code: string;
/**
- * Sets or retrieves the URL of the component.
- */
+ * Sets or retrieves the URL of the component.
+ */
codeBase: string;
/**
- * Sets or retrieves the Internet media type for the code associated with the object.
- */
+ * 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.
- */
+ * Retrieves the document object of the page or frame.
+ */
readonly contentDocument: Document;
/**
- * Sets or retrieves the URL that references the data of the object.
- */
+ * 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.
- */
+ * Retrieves a reference to the form that the object is embedded in.
+ */
readonly form: HTMLFormElement;
/**
- * Sets or retrieves the height of the object.
- */
+ * Sets or retrieves the height of the object.
+ */
height: string;
hspace: number;
/**
- * Gets or sets whether the DLNA PlayTo device is available.
- */
+ * 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.
- */
+ * 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.
- */
+ * Gets or sets the primary DLNA PlayTo device.
+ */
msPlayToPrimary: boolean;
/**
- * Gets the source associated with the media element for use by the PlayToManager.
- */
+ * Gets the source associated with the media element for use by the PlayToManager.
+ */
readonly msPlayToSource: any;
/**
- * Sets or retrieves the name of the object.
- */
+ * 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.
- */
+ * Sets or retrieves a message to be displayed while an object is loading.
+ */
standby: string;
/**
- * Sets or retrieves the MIME type of the object.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the width of the object.
+ */
width: string;
/**
- * Returns whether an element will successfully validate based on forms validation rules and constraints.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -5989,37 +6013,53 @@ interface HTMLObjectElement extends HTMLElement, GetSVGDocument {
declare var HTMLObjectElement: {
prototype: HTMLObjectElement;
new(): HTMLObjectElement;
+};
+
+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 HTMLOptGroupElement extends HTMLElement {
/**
- * Sets or retrieves the status of an option.
- */
+ * Sets or retrieves the status of an option.
+ */
defaultSelected: boolean;
disabled: boolean;
/**
- * Retrieves a reference to the form that the object is embedded in.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -6028,37 +6068,37 @@ interface HTMLOptGroupElement extends HTMLElement {
declare var HTMLOptGroupElement: {
prototype: HTMLOptGroupElement;
new(): HTMLOptGroupElement;
-}
+};
interface HTMLOptionElement extends HTMLElement {
/**
- * Sets or retrieves the status of an option.
- */
+ * Sets or retrieves the status of an option.
+ */
defaultSelected: boolean;
disabled: boolean;
/**
- * Retrieves a reference to the form that the object is embedded in.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -6067,7 +6107,7 @@ interface HTMLOptionElement extends HTMLElement {
declare var HTMLOptionElement: {
prototype: HTMLOptionElement;
new(): HTMLOptionElement;
-}
+};
interface HTMLOptionsCollection extends HTMLCollectionOf<HTMLOptionElement> {
length: number;
@@ -6079,7 +6119,7 @@ interface HTMLOptionsCollection extends HTMLCollectionOf<HTMLOptionElement> {
declare var HTMLOptionsCollection: {
prototype: HTMLOptionsCollection;
new(): HTMLOptionsCollection;
-}
+};
interface HTMLOutputElement extends HTMLElement {
defaultValue: string;
@@ -6101,12 +6141,12 @@ interface HTMLOutputElement extends HTMLElement {
declare var HTMLOutputElement: {
prototype: HTMLOutputElement;
new(): HTMLOutputElement;
-}
+};
interface HTMLParagraphElement extends HTMLElement {
/**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
+ * 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;
@@ -6116,24 +6156,24 @@ interface HTMLParagraphElement extends HTMLElement {
declare var HTMLParagraphElement: {
prototype: HTMLParagraphElement;
new(): HTMLParagraphElement;
-}
+};
interface HTMLParamElement extends HTMLElement {
/**
- * Sets or retrieves the name of an input parameter for an element.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the value of an input parameter for an element.
+ */
value: string;
/**
- * Sets or retrieves the data type of the value attribute.
- */
+ * 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;
@@ -6142,7 +6182,7 @@ interface HTMLParamElement extends HTMLElement {
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;
@@ -6152,12 +6192,12 @@ interface HTMLPictureElement extends HTMLElement {
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.
- */
+ * 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;
@@ -6166,24 +6206,24 @@ interface HTMLPreElement extends HTMLElement {
declare var HTMLPreElement: {
prototype: HTMLPreElement;
new(): HTMLPreElement;
-}
+};
interface HTMLProgressElement extends HTMLElement {
/**
- * Retrieves a reference to the form that the object is embedded in.
- */
+ * 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.
- */
+ * 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).
- */
+ * 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.
- */
+ * 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;
@@ -6192,12 +6232,12 @@ interface HTMLProgressElement extends HTMLElement {
declare var HTMLProgressElement: {
prototype: HTMLProgressElement;
new(): HTMLProgressElement;
-}
+};
interface HTMLQuoteElement extends HTMLElement {
/**
- * Sets or retrieves reference information about the object.
- */
+ * 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;
@@ -6206,38 +6246,38 @@ interface HTMLQuoteElement extends HTMLElement {
declare var HTMLQuoteElement: {
prototype: HTMLQuoteElement;
new(): HTMLQuoteElement;
-}
+};
interface HTMLScriptElement extends HTMLElement {
async: boolean;
/**
- * Sets or retrieves the character set used to encode the object.
- */
+ * Sets or retrieves the character set used to encode the object.
+ */
charset: string;
crossOrigin: string | null;
/**
- * Sets or retrieves the status of the script.
- */
+ * Sets or retrieves the status of the script.
+ */
defer: boolean;
/**
- * Sets or retrieves the event for which the script is written.
- */
+ * 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.
- */
+ /**
+ * 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.
- */
+ * 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.
- */
+ * Retrieves or sets the text of the object as a string.
+ */
text: string;
/**
- * Sets or retrieves the MIME type for the associated scripting engine.
- */
+ * 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;
@@ -6247,94 +6287,94 @@ interface HTMLScriptElement extends HTMLElement {
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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -6344,18 +6384,18 @@ interface HTMLSelectElement extends HTMLElement {
declare var HTMLSelectElement: {
prototype: HTMLSelectElement;
new(): HTMLSelectElement;
-}
+};
interface HTMLSourceElement extends HTMLElement {
/**
- * Gets or sets the intended media type of the media source.
+ * 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.
- */
+ * The address or URL of the a media resource that is to be considered.
+ */
src: string;
srcset: string;
/**
@@ -6369,7 +6409,7 @@ interface HTMLSourceElement extends HTMLElement {
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;
@@ -6379,17 +6419,17 @@ interface HTMLSpanElement extends HTMLElement {
declare var HTMLSpanElement: {
prototype: HTMLSpanElement;
new(): HTMLSpanElement;
-}
+};
interface HTMLStyleElement extends HTMLElement, LinkStyle {
disabled: boolean;
/**
- * Sets or retrieves the media type.
- */
+ * Sets or retrieves the media type.
+ */
media: string;
/**
- * Retrieves the CSS language in which the style sheet is written.
- */
+ * 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;
@@ -6398,16 +6438,16 @@ interface HTMLStyleElement extends HTMLElement, LinkStyle {
declare var HTMLStyleElement: {
prototype: HTMLStyleElement;
new(): HTMLStyleElement;
-}
+};
interface HTMLTableCaptionElement extends HTMLElement {
/**
- * Sets or retrieves the alignment of the caption or legend.
- */
+ * 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.
- */
+ * 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;
@@ -6416,53 +6456,53 @@ interface HTMLTableCaptionElement extends HTMLElement {
declare var HTMLTableCaptionElement: {
prototype: HTMLTableCaptionElement;
new(): HTMLTableCaptionElement;
-}
+};
interface HTMLTableCellElement extends HTMLElement, HTMLTableAlignment {
/**
- * Sets or retrieves abbreviated text for the object.
- */
+ * Sets or retrieves abbreviated text for the object.
+ */
abbr: string;
/**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves a list of header cells that provide information for the object.
+ */
headers: string;
/**
- * Sets or retrieves the height of the object.
- */
+ * Sets or retrieves the height of the object.
+ */
height: any;
/**
- * Sets or retrieves whether the browser automatically performs wordwrap.
- */
+ * Sets or retrieves whether the browser automatically performs wordwrap.
+ */
noWrap: boolean;
/**
- * Sets or retrieves how many rows in a table the cell should span.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -6471,20 +6511,20 @@ interface HTMLTableCellElement extends HTMLElement, HTMLTableAlignment {
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.
- */
+ * 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.
- */
+ * Sets or retrieves the number of columns in the group.
+ */
span: number;
/**
- * Sets or retrieves the width of the object.
- */
+ * 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;
@@ -6493,7 +6533,7 @@ interface HTMLTableColElement extends HTMLElement, HTMLTableAlignment {
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;
@@ -6503,111 +6543,111 @@ 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.
- */
+ * 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.
- */
+ * Sets or retrieves the width of the border to draw around the object.
+ */
border: string;
/**
- * Sets or retrieves the border color of the object.
- */
+ * Sets or retrieves the border color of the object.
+ */
borderColor: any;
/**
- * Retrieves the caption object of a table.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the amount of space between cells in a table.
+ */
cellSpacing: string;
/**
- * Sets or retrieves the number of columns in the table.
- */
+ * 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.
- */
+ * Sets or retrieves the way the border frame around the table is displayed.
+ */
frame: string;
/**
- * Sets or retrieves the height of the object.
- */
+ * Sets or retrieves the height of the object.
+ */
height: any;
/**
- * Sets or retrieves the number of horizontal rows contained in the object.
- */
+ * 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.
- */
+ * Sets or retrieves which dividing lines (inner borders) are displayed.
+ */
rules: string;
/**
- * Sets or retrieves a description and/or structure of the object.
- */
+ * 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.
- */
+ * 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.
- */
+ * Retrieves the tFoot object of the table.
+ */
tFoot: HTMLTableSectionElement;
/**
- * Retrieves the tHead object of the table.
- */
+ * Retrieves the tHead object of the table.
+ */
tHead: HTMLTableSectionElement;
/**
- * Sets or retrieves the width of the object.
- */
+ * Sets or retrieves the width of the object.
+ */
width: string;
/**
- * Creates an empty caption element in the table.
- */
+ * Creates an empty caption element in the table.
+ */
createCaption(): HTMLTableCaptionElement;
/**
- * Creates an empty tBody element in the table.
- */
+ * Creates an empty tBody element in the table.
+ */
createTBody(): HTMLTableSectionElement;
/**
- * Creates an empty tFoot element in the table.
- */
+ * Creates an empty tFoot element in the table.
+ */
createTFoot(): HTMLTableSectionElement;
/**
- * Returns the tHead element object if successful, or null otherwise.
- */
+ * Returns the tHead element object if successful, or null otherwise.
+ */
createTHead(): HTMLTableSectionElement;
/**
- * Deletes the caption element and its contents from the table.
- */
+ * 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.
- */
+ * 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.
- */
+ * Deletes the tFoot element and its contents from the table.
+ */
deleteTFoot(): void;
/**
- * Deletes the tHead element and its contents from the table.
- */
+ * 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.
- */
+ * 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;
@@ -6616,12 +6656,12 @@ interface HTMLTableElement extends HTMLElement {
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.
- */
+ * 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;
@@ -6630,39 +6670,39 @@ interface HTMLTableHeaderCellElement extends HTMLTableCellElement {
declare var HTMLTableHeaderCellElement: {
prototype: HTMLTableHeaderCellElement;
new(): HTMLTableHeaderCellElement;
-}
+};
interface HTMLTableRowElement extends HTMLElement, HTMLTableAlignment {
/**
- * Sets or retrieves how the object is aligned with adjacent text.
- */
+ * 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.
- */
+ * Retrieves a collection of all cells in the table row.
+ */
cells: HTMLCollectionOf<HTMLTableDataCellElement | HTMLTableHeaderCellElement>;
/**
- * Sets or retrieves the height of the object.
- */
+ * Sets or retrieves the height of the object.
+ */
height: any;
/**
- * Retrieves the position of the object in the rows collection for the table.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -6671,26 +6711,26 @@ interface HTMLTableRowElement extends HTMLElement, HTMLTableAlignment {
declare var HTMLTableRowElement: {
prototype: HTMLTableRowElement;
new(): HTMLTableRowElement;
-}
+};
interface HTMLTableSectionElement extends HTMLElement, HTMLTableAlignment {
/**
- * Sets or retrieves a value that indicates the table alignment.
- */
+ * Sets or retrieves a value that indicates the table alignment.
+ */
align: string;
/**
- * Sets or retrieves the number of horizontal rows contained in the object.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -6699,7 +6739,7 @@ interface HTMLTableSectionElement extends HTMLElement, HTMLTableAlignment {
declare var HTMLTableSectionElement: {
prototype: HTMLTableSectionElement;
new(): HTMLTableSectionElement;
-}
+};
interface HTMLTemplateElement extends HTMLElement {
readonly content: DocumentFragment;
@@ -6710,105 +6750,105 @@ interface HTMLTemplateElement extends HTMLElement {
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.
- */
+ * 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.
- */
+ * Sets or retrieves the width of the object.
+ */
cols: number;
/**
- * Sets or retrieves the initial contents of the object.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves the value indicating whether the control is selected.
+ */
status: any;
/**
- * Retrieves the type of control.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
@@ -6817,7 +6857,7 @@ interface HTMLTextAreaElement extends HTMLElement {
declare var HTMLTextAreaElement: {
prototype: HTMLTextAreaElement;
new(): HTMLTextAreaElement;
-}
+};
interface HTMLTimeElement extends HTMLElement {
dateTime: string;
@@ -6828,12 +6868,12 @@ interface HTMLTimeElement extends HTMLElement {
declare var HTMLTimeElement: {
prototype: HTMLTimeElement;
new(): HTMLTimeElement;
-}
+};
interface HTMLTitleElement extends HTMLElement {
/**
- * Retrieves or sets the text of the object as a string.
- */
+ * 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;
@@ -6842,7 +6882,7 @@ interface HTMLTitleElement extends HTMLElement {
declare var HTMLTitleElement: {
prototype: HTMLTitleElement;
new(): HTMLTitleElement;
-}
+};
interface HTMLTrackElement extends HTMLElement {
default: boolean;
@@ -6867,7 +6907,7 @@ declare var HTMLTrackElement: {
readonly LOADED: number;
readonly LOADING: number;
readonly NONE: number;
-}
+};
interface HTMLUListElement extends HTMLElement {
compact: boolean;
@@ -6879,7 +6919,7 @@ interface HTMLUListElement extends HTMLElement {
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;
@@ -6889,7 +6929,7 @@ interface HTMLUnknownElement extends HTMLElement {
declare var HTMLUnknownElement: {
prototype: HTMLUnknownElement;
new(): HTMLUnknownElement;
-}
+};
interface HTMLVideoElementEventMap extends HTMLMediaElementEventMap {
"MSVideoFormatChanged": Event;
@@ -6899,8 +6939,8 @@ interface HTMLVideoElementEventMap extends HTMLMediaElementEventMap {
interface HTMLVideoElement extends HTMLMediaElement {
/**
- * Gets or sets the height of the video element.
- */
+ * Gets or sets the height of the video element.
+ */
height: number;
msHorizontalMirror: boolean;
readonly msIsLayoutOptimalForPlayback: boolean;
@@ -6912,31 +6952,31 @@ interface HTMLVideoElement extends HTMLMediaElement {
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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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;
+ 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;
}
@@ -6944,47 +6984,7 @@ interface HTMLVideoElement extends HTMLMediaElement {
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;
@@ -7008,7 +7008,7 @@ declare var IDBCursor: {
readonly NEXT_NO_DUPLICATE: string;
readonly PREV: string;
readonly PREV_NO_DUPLICATE: string;
-}
+};
interface IDBCursorWithValue extends IDBCursor {
readonly value: any;
@@ -7017,7 +7017,7 @@ interface IDBCursorWithValue extends IDBCursor {
declare var IDBCursorWithValue: {
prototype: IDBCursorWithValue;
new(): IDBCursorWithValue;
-}
+};
interface IDBDatabaseEventMap {
"abort": Event;
@@ -7034,7 +7034,7 @@ interface IDBDatabase extends EventTarget {
close(): void;
createObjectStore(name: string, optionalParameters?: IDBObjectStoreParameters): IDBObjectStore;
deleteObjectStore(name: string): void;
- transaction(storeNames: string | string[], mode?: string): IDBTransaction;
+ transaction(storeNames: string | string[], mode?: IDBTransactionMode): 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;
@@ -7043,7 +7043,7 @@ interface IDBDatabase extends EventTarget {
declare var IDBDatabase: {
prototype: IDBDatabase;
new(): IDBDatabase;
-}
+};
interface IDBFactory {
cmp(first: any, second: any): number;
@@ -7054,7 +7054,7 @@ interface IDBFactory {
declare var IDBFactory: {
prototype: IDBFactory;
new(): IDBFactory;
-}
+};
interface IDBIndex {
keyPath: string | string[];
@@ -7065,14 +7065,14 @@ interface IDBIndex {
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;
+ openCursor(range?: IDBKeyRange | IDBValidKey, direction?: IDBCursorDirection): IDBRequest;
+ openKeyCursor(range?: IDBKeyRange | IDBValidKey, direction?: IDBCursorDirection): IDBRequest;
}
declare var IDBIndex: {
prototype: IDBIndex;
new(): IDBIndex;
-}
+};
interface IDBKeyRange {
readonly lower: any;
@@ -7088,7 +7088,7 @@ declare var IDBKeyRange: {
lowerBound(lower: any, open?: boolean): IDBKeyRange;
only(value: any): IDBKeyRange;
upperBound(upper: any, open?: boolean): IDBKeyRange;
-}
+};
interface IDBObjectStore {
readonly indexNames: DOMStringList;
@@ -7104,14 +7104,14 @@ interface IDBObjectStore {
deleteIndex(indexName: string): void;
get(key: any): IDBRequest;
index(name: string): IDBIndex;
- openCursor(range?: IDBKeyRange | IDBValidKey, direction?: string): IDBRequest;
+ openCursor(range?: IDBKeyRange | IDBValidKey, direction?: IDBCursorDirection): IDBRequest;
put(value: any, key?: IDBKeyRange | IDBValidKey): IDBRequest;
}
declare var IDBObjectStore: {
prototype: IDBObjectStore;
new(): IDBObjectStore;
-}
+};
interface IDBOpenDBRequestEventMap extends IDBRequestEventMap {
"blocked": Event;
@@ -7128,7 +7128,7 @@ interface IDBOpenDBRequest extends IDBRequest {
declare var IDBOpenDBRequest: {
prototype: IDBOpenDBRequest;
new(): IDBOpenDBRequest;
-}
+};
interface IDBRequestEventMap {
"error": Event;
@@ -7136,7 +7136,7 @@ interface IDBRequestEventMap {
}
interface IDBRequest extends EventTarget {
- readonly error: DOMError;
+ readonly error: DOMException;
onerror: (this: IDBRequest, ev: Event) => any;
onsuccess: (this: IDBRequest, ev: Event) => any;
readonly readyState: IDBRequestReadyState;
@@ -7150,7 +7150,7 @@ interface IDBRequest extends EventTarget {
declare var IDBRequest: {
prototype: IDBRequest;
new(): IDBRequest;
-}
+};
interface IDBTransactionEventMap {
"abort": Event;
@@ -7160,7 +7160,7 @@ interface IDBTransactionEventMap {
interface IDBTransaction extends EventTarget {
readonly db: IDBDatabase;
- readonly error: DOMError;
+ readonly error: DOMException;
readonly mode: IDBTransactionMode;
onabort: (this: IDBTransaction, ev: Event) => any;
oncomplete: (this: IDBTransaction, ev: Event) => any;
@@ -7180,7 +7180,7 @@ declare var IDBTransaction: {
readonly READ_ONLY: string;
readonly READ_WRITE: string;
readonly VERSION_CHANGE: string;
-}
+};
interface IDBVersionChangeEvent extends Event {
readonly newVersion: number | null;
@@ -7190,7 +7190,7 @@ interface IDBVersionChangeEvent extends Event {
declare var IDBVersionChangeEvent: {
prototype: IDBVersionChangeEvent;
new(): IDBVersionChangeEvent;
-}
+};
interface IIRFilterNode extends AudioNode {
getFrequencyResponse(frequencyHz: Float32Array, magResponse: Float32Array, phaseResponse: Float32Array): void;
@@ -7199,7 +7199,7 @@ interface IIRFilterNode extends AudioNode {
declare var IIRFilterNode: {
prototype: IIRFilterNode;
new(): IIRFilterNode;
-}
+};
interface ImageData {
data: Uint8ClampedArray;
@@ -7211,7 +7211,7 @@ 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;
@@ -7226,7 +7226,7 @@ interface IntersectionObserver {
declare var IntersectionObserver: {
prototype: IntersectionObserver;
new(callback: IntersectionObserverCallback, options?: IntersectionObserverInit): IntersectionObserver;
-}
+};
interface IntersectionObserverEntry {
readonly boundingClientRect: ClientRect;
@@ -7240,7 +7240,7 @@ interface IntersectionObserverEntry {
declare var IntersectionObserverEntry: {
prototype: IntersectionObserverEntry;
new(intersectionObserverEntryInit: IntersectionObserverEntryInit): IntersectionObserverEntry;
-}
+};
interface KeyboardEvent extends UIEvent {
readonly altKey: boolean;
@@ -7275,7 +7275,7 @@ declare var KeyboardEvent: {
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;
@@ -7285,7 +7285,7 @@ interface ListeningStateChangedEvent extends Event {
declare var ListeningStateChangedEvent: {
prototype: ListeningStateChangedEvent;
new(): ListeningStateChangedEvent;
-}
+};
interface Location {
hash: string;
@@ -7306,7 +7306,7 @@ interface Location {
declare var Location: {
prototype: Location;
new(): Location;
-}
+};
interface LongRunningScriptDetectedEvent extends Event {
readonly executionTime: number;
@@ -7316,8 +7316,390 @@ interface LongRunningScriptDetectedEvent extends Event {
declare var LongRunningScriptDetectedEvent: {
prototype: LongRunningScriptDetectedEvent;
new(): LongRunningScriptDetectedEvent;
+};
+
+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 MediaKeys {
+ createSession(sessionType?: MediaKeySessionType): MediaKeySession;
+ setServerCertificate(serverCertificate: any): Promise<void>;
+}
+
+declare var MediaKeys: {
+ prototype: MediaKeys;
+ new(): MediaKeys;
+};
+
+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 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 MSApp {
clearTemporaryWebDataAsync(): MSAppAsyncOperation;
createBlobFromRandomAccessStream(type: string, seeker: any): Blob;
@@ -7366,7 +7748,7 @@ declare var MSAppAsyncOperation: {
readonly COMPLETED: number;
readonly ERROR: number;
readonly STARTED: number;
-}
+};
interface MSAssertion {
readonly id: string;
@@ -7376,7 +7758,7 @@ interface MSAssertion {
declare var MSAssertion: {
prototype: MSAssertion;
new(): MSAssertion;
-}
+};
interface MSBlobBuilder {
append(data: any, endings?: string): void;
@@ -7386,7 +7768,7 @@ interface MSBlobBuilder {
declare var MSBlobBuilder: {
prototype: MSBlobBuilder;
new(): MSBlobBuilder;
-}
+};
interface MSCredentials {
getAssertion(challenge: string, filter?: MSCredentialFilter, params?: MSSignatureParameters): Promise<MSAssertion>;
@@ -7396,7 +7778,7 @@ interface MSCredentials {
declare var MSCredentials: {
prototype: MSCredentials;
new(): MSCredentials;
-}
+};
interface MSFIDOCredentialAssertion extends MSAssertion {
readonly algorithm: string | Algorithm;
@@ -7408,7 +7790,7 @@ interface MSFIDOCredentialAssertion extends MSAssertion {
declare var MSFIDOCredentialAssertion: {
prototype: MSFIDOCredentialAssertion;
new(): MSFIDOCredentialAssertion;
-}
+};
interface MSFIDOSignature {
readonly authnrData: string;
@@ -7419,7 +7801,7 @@ interface MSFIDOSignature {
declare var MSFIDOSignature: {
prototype: MSFIDOSignature;
new(): MSFIDOSignature;
-}
+};
interface MSFIDOSignatureAssertion extends MSAssertion {
readonly signature: MSFIDOSignature;
@@ -7428,7 +7810,7 @@ interface MSFIDOSignatureAssertion extends MSAssertion {
declare var MSFIDOSignatureAssertion: {
prototype: MSFIDOSignatureAssertion;
new(): MSFIDOSignatureAssertion;
-}
+};
interface MSGesture {
target: Element;
@@ -7439,7 +7821,7 @@ interface MSGesture {
declare var MSGesture: {
prototype: MSGesture;
new(): MSGesture;
-}
+};
interface MSGestureEvent extends UIEvent {
readonly clientX: number;
@@ -7475,7 +7857,7 @@ declare var MSGestureEvent: {
readonly MSGESTURE_FLAG_END: number;
readonly MSGESTURE_FLAG_INERTIA: number;
readonly MSGESTURE_FLAG_NONE: number;
-}
+};
interface MSGraphicsTrust {
readonly constrictionActive: boolean;
@@ -7485,7 +7867,7 @@ interface MSGraphicsTrust {
declare var MSGraphicsTrust: {
prototype: MSGraphicsTrust;
new(): MSGraphicsTrust;
-}
+};
interface MSHTMLWebViewElement extends HTMLElement {
readonly canGoBack: boolean;
@@ -7519,7 +7901,7 @@ interface MSHTMLWebViewElement extends HTMLElement {
declare var MSHTMLWebViewElement: {
prototype: MSHTMLWebViewElement;
new(): MSHTMLWebViewElement;
-}
+};
interface MSInputMethodContextEventMap {
"MSCandidateWindowHide": Event;
@@ -7545,7 +7927,7 @@ interface MSInputMethodContext extends EventTarget {
declare var MSInputMethodContext: {
prototype: MSInputMethodContext;
new(): MSInputMethodContext;
-}
+};
interface MSManipulationEvent extends UIEvent {
readonly currentState: number;
@@ -7574,7 +7956,7 @@ declare var MSManipulationEvent: {
readonly MS_MANIPULATION_STATE_PRESELECT: number;
readonly MS_MANIPULATION_STATE_SELECTING: number;
readonly MS_MANIPULATION_STATE_STOPPED: number;
-}
+};
interface MSMediaKeyError {
readonly code: number;
@@ -7596,7 +7978,7 @@ declare var MSMediaKeyError: {
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;
@@ -7606,7 +7988,7 @@ interface MSMediaKeyMessageEvent extends Event {
declare var MSMediaKeyMessageEvent: {
prototype: MSMediaKeyMessageEvent;
new(): MSMediaKeyMessageEvent;
-}
+};
interface MSMediaKeyNeededEvent extends Event {
readonly initData: Uint8Array | null;
@@ -7615,8 +7997,20 @@ interface MSMediaKeyNeededEvent extends Event {
declare var MSMediaKeyNeededEvent: {
prototype: MSMediaKeyNeededEvent;
new(): MSMediaKeyNeededEvent;
+};
+
+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 MSMediaKeySession extends EventTarget {
readonly error: MSMediaKeyError | null;
readonly keySystem: string;
@@ -7628,19 +8022,7 @@ interface MSMediaKeySession extends EventTarget {
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;
@@ -7663,7 +8045,7 @@ interface MSPointerEvent extends MouseEvent {
declare var MSPointerEvent: {
prototype: MSPointerEvent;
new(typeArg: string, eventInitDict?: PointerEventInit): MSPointerEvent;
-}
+};
interface MSRangeCollection {
readonly length: number;
@@ -7674,7 +8056,7 @@ interface MSRangeCollection {
declare var MSRangeCollection: {
prototype: MSRangeCollection;
new(): MSRangeCollection;
-}
+};
interface MSSiteModeEvent extends Event {
readonly actionURL: string;
@@ -7684,7 +8066,7 @@ interface MSSiteModeEvent extends Event {
declare var MSSiteModeEvent: {
prototype: MSSiteModeEvent;
new(): MSSiteModeEvent;
-}
+};
interface MSStream {
readonly type: string;
@@ -7695,7 +8077,7 @@ interface MSStream {
declare var MSStream: {
prototype: MSStream;
new(): MSStream;
-}
+};
interface MSStreamReader extends EventTarget, MSBaseReader {
readonly error: DOMError;
@@ -7711,7 +8093,7 @@ interface MSStreamReader extends EventTarget, MSBaseReader {
declare var MSStreamReader: {
prototype: MSStreamReader;
new(): MSStreamReader;
-}
+};
interface MSWebViewAsyncOperationEventMap {
"complete": Event;
@@ -7746,7 +8128,7 @@ declare var MSWebViewAsyncOperation: {
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;
@@ -7756,389 +8138,7 @@ interface MSWebViewSettings {
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;
@@ -8158,7 +8158,7 @@ declare var MutationEvent: {
readonly ADDITION: number;
readonly MODIFICATION: number;
readonly REMOVAL: number;
-}
+};
interface MutationObserver {
disconnect(): void;
@@ -8169,7 +8169,7 @@ interface MutationObserver {
declare var MutationObserver: {
prototype: MutationObserver;
new(callback: MutationCallback): MutationObserver;
-}
+};
interface MutationRecord {
readonly addedNodes: NodeList;
@@ -8186,7 +8186,7 @@ interface MutationRecord {
declare var MutationRecord: {
prototype: MutationRecord;
new(): MutationRecord;
-}
+};
interface NamedNodeMap {
readonly length: number;
@@ -8203,7 +8203,7 @@ interface NamedNodeMap {
declare var NamedNodeMap: {
prototype: NamedNodeMap;
new(): NamedNodeMap;
-}
+};
interface NavigationCompletedEvent extends NavigationEvent {
readonly isSuccess: boolean;
@@ -8213,7 +8213,7 @@ interface NavigationCompletedEvent extends NavigationEvent {
declare var NavigationCompletedEvent: {
prototype: NavigationCompletedEvent;
new(): NavigationCompletedEvent;
-}
+};
interface NavigationEvent extends Event {
readonly uri: string;
@@ -8222,7 +8222,7 @@ interface NavigationEvent extends Event {
declare var NavigationEvent: {
prototype: NavigationEvent;
new(): NavigationEvent;
-}
+};
interface NavigationEventWithReferrer extends NavigationEvent {
readonly referer: string;
@@ -8231,7 +8231,7 @@ interface NavigationEventWithReferrer extends NavigationEvent {
declare var NavigationEventWithReferrer: {
prototype: NavigationEventWithReferrer;
new(): NavigationEventWithReferrer;
-}
+};
interface Navigator extends Object, NavigatorID, NavigatorOnLine, NavigatorContentUtils, NavigatorStorageUtils, NavigatorGeolocation, MSNavigatorDoNotTrack, MSFileSaver, NavigatorBeacon, NavigatorConcurrentHardware, NavigatorUserMedia {
readonly authentication: WebAuthentication;
@@ -8248,6 +8248,7 @@ interface Navigator extends Object, NavigatorID, NavigatorOnLine, NavigatorConte
readonly serviceWorker: ServiceWorkerContainer;
readonly webdriver: boolean;
readonly hardwareConcurrency: number;
+ readonly languages: string[];
getGamepads(): Gamepad[];
javaEnabled(): boolean;
msLaunchUri(uri: string, successCallback?: MSLaunchUriCallback, noHandlerCallback?: MSLaunchUriCallback): void;
@@ -8258,7 +8259,7 @@ interface Navigator extends Object, NavigatorID, NavigatorOnLine, NavigatorConte
declare var Navigator: {
prototype: Navigator;
new(): Navigator;
-}
+};
interface Node extends EventTarget {
readonly attributes: NamedNodeMap;
@@ -8333,7 +8334,7 @@ declare var Node: {
readonly NOTATION_NODE: number;
readonly PROCESSING_INSTRUCTION_NODE: number;
readonly TEXT_NODE: number;
-}
+};
interface NodeFilter {
acceptNode(n: Node): number;
@@ -8356,7 +8357,7 @@ declare var NodeFilter: {
readonly SHOW_NOTATION: number;
readonly SHOW_PROCESSING_INSTRUCTION: number;
readonly SHOW_TEXT: number;
-}
+};
interface NodeIterator {
readonly expandEntityReferences: boolean;
@@ -8371,7 +8372,7 @@ interface NodeIterator {
declare var NodeIterator: {
prototype: NodeIterator;
new(): NodeIterator;
-}
+};
interface NodeList {
readonly length: number;
@@ -8382,7 +8383,7 @@ interface NodeList {
declare var NodeList: {
prototype: NodeList;
new(): NodeList;
-}
+};
interface NotificationEventMap {
"click": Event;
@@ -8412,7 +8413,7 @@ declare var Notification: {
prototype: Notification;
new(title: string, options?: NotificationOptions): Notification;
requestPermission(callback?: NotificationPermissionCallback): Promise<NotificationPermission>;
-}
+};
interface OES_element_index_uint {
}
@@ -8420,7 +8421,7 @@ 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;
@@ -8430,7 +8431,7 @@ declare var OES_standard_derivatives: {
prototype: OES_standard_derivatives;
new(): OES_standard_derivatives;
readonly FRAGMENT_SHADER_DERIVATIVE_HINT_OES: number;
-}
+};
interface OES_texture_float {
}
@@ -8438,7 +8439,7 @@ interface OES_texture_float {
declare var OES_texture_float: {
prototype: OES_texture_float;
new(): OES_texture_float;
-}
+};
interface OES_texture_float_linear {
}
@@ -8446,7 +8447,7 @@ 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;
@@ -8456,7 +8457,7 @@ 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 {
}
@@ -8464,7 +8465,7 @@ 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;
@@ -8473,7 +8474,7 @@ interface OfflineAudioCompletionEvent extends Event {
declare var OfflineAudioCompletionEvent: {
prototype: OfflineAudioCompletionEvent;
new(): OfflineAudioCompletionEvent;
-}
+};
interface OfflineAudioContextEventMap extends AudioContextEventMap {
"complete": OfflineAudioCompletionEvent;
@@ -8491,7 +8492,7 @@ interface OfflineAudioContext extends AudioContextBase {
declare var OfflineAudioContext: {
prototype: OfflineAudioContext;
new(numberOfChannels: number, length: number, sampleRate: number): OfflineAudioContext;
-}
+};
interface OscillatorNodeEventMap {
"ended": MediaStreamErrorEvent;
@@ -8512,7 +8513,7 @@ interface OscillatorNode extends AudioNode {
declare var OscillatorNode: {
prototype: OscillatorNode;
new(): OscillatorNode;
-}
+};
interface OverflowEvent extends UIEvent {
readonly horizontalOverflow: boolean;
@@ -8529,7 +8530,7 @@ declare var OverflowEvent: {
readonly BOTH: number;
readonly HORIZONTAL: number;
readonly VERTICAL: number;
-}
+};
interface PageTransitionEvent extends Event {
readonly persisted: boolean;
@@ -8538,7 +8539,7 @@ interface PageTransitionEvent extends Event {
declare var PageTransitionEvent: {
prototype: PageTransitionEvent;
new(): PageTransitionEvent;
-}
+};
interface PannerNode extends AudioNode {
coneInnerAngle: number;
@@ -8557,7 +8558,7 @@ interface PannerNode extends AudioNode {
declare var PannerNode: {
prototype: PannerNode;
new(): PannerNode;
-}
+};
interface Path2D extends Object, CanvasPathMethods {
}
@@ -8565,7 +8566,7 @@ interface Path2D extends Object, CanvasPathMethods {
declare var Path2D: {
prototype: Path2D;
new(path?: Path2D): Path2D;
-}
+};
interface PaymentAddress {
readonly addressLine: string[];
@@ -8585,7 +8586,7 @@ interface PaymentAddress {
declare var PaymentAddress: {
prototype: PaymentAddress;
new(): PaymentAddress;
-}
+};
interface PaymentRequestEventMap {
"shippingaddresschange": Event;
@@ -8607,7 +8608,7 @@ interface PaymentRequest extends EventTarget {
declare var PaymentRequest: {
prototype: PaymentRequest;
new(methodData: PaymentMethodData[], details: PaymentDetails, options?: PaymentOptions): PaymentRequest;
-}
+};
interface PaymentRequestUpdateEvent extends Event {
updateWith(d: Promise<PaymentDetails>): void;
@@ -8616,7 +8617,7 @@ interface PaymentRequestUpdateEvent extends Event {
declare var PaymentRequestUpdateEvent: {
prototype: PaymentRequestUpdateEvent;
new(type: string, eventInitDict?: PaymentRequestUpdateEventInit): PaymentRequestUpdateEvent;
-}
+};
interface PaymentResponse {
readonly details: any;
@@ -8633,36 +8634,7 @@ interface PaymentResponse {
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;
@@ -8685,7 +8657,7 @@ interface Performance {
declare var Performance: {
prototype: Performance;
new(): Performance;
-}
+};
interface PerformanceEntry {
readonly duration: number;
@@ -8697,7 +8669,7 @@ interface PerformanceEntry {
declare var PerformanceEntry: {
prototype: PerformanceEntry;
new(): PerformanceEntry;
-}
+};
interface PerformanceMark extends PerformanceEntry {
}
@@ -8705,7 +8677,7 @@ interface PerformanceMark extends PerformanceEntry {
declare var PerformanceMark: {
prototype: PerformanceMark;
new(): PerformanceMark;
-}
+};
interface PerformanceMeasure extends PerformanceEntry {
}
@@ -8713,7 +8685,7 @@ interface PerformanceMeasure extends PerformanceEntry {
declare var PerformanceMeasure: {
prototype: PerformanceMeasure;
new(): PerformanceMeasure;
-}
+};
interface PerformanceNavigation {
readonly redirectCount: number;
@@ -8732,18 +8704,18 @@ declare var PerformanceNavigation: {
readonly TYPE_NAVIGATE: number;
readonly TYPE_RELOAD: number;
readonly TYPE_RESERVED: number;
-}
+};
interface PerformanceNavigationTiming extends PerformanceEntry {
readonly connectEnd: number;
readonly connectStart: number;
+ readonly domainLookupEnd: number;
+ readonly domainLookupStart: 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;
@@ -8762,7 +8734,7 @@ interface PerformanceNavigationTiming extends PerformanceEntry {
declare var PerformanceNavigationTiming: {
prototype: PerformanceNavigationTiming;
new(): PerformanceNavigationTiming;
-}
+};
interface PerformanceResourceTiming extends PerformanceEntry {
readonly connectEnd: number;
@@ -8781,18 +8753,18 @@ interface PerformanceResourceTiming extends PerformanceEntry {
declare var PerformanceResourceTiming: {
prototype: PerformanceResourceTiming;
new(): PerformanceResourceTiming;
-}
+};
interface PerformanceTiming {
readonly connectEnd: number;
readonly connectStart: number;
+ readonly domainLookupEnd: number;
+ readonly domainLookupStart: 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;
@@ -8812,15 +8784,44 @@ interface PerformanceTiming {
declare var PerformanceTiming: {
prototype: PerformanceTiming;
new(): PerformanceTiming;
+};
+
+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 PeriodicWave {
}
declare var PeriodicWave: {
prototype: PeriodicWave;
new(): PeriodicWave;
-}
+};
interface PermissionRequest extends DeferredPermissionRequest {
readonly state: MSWebViewPermissionState;
@@ -8830,7 +8831,7 @@ interface PermissionRequest extends DeferredPermissionRequest {
declare var PermissionRequest: {
prototype: PermissionRequest;
new(): PermissionRequest;
-}
+};
interface PermissionRequestedEvent extends Event {
readonly permissionRequest: PermissionRequest;
@@ -8839,7 +8840,7 @@ interface PermissionRequestedEvent extends Event {
declare var PermissionRequestedEvent: {
prototype: PermissionRequestedEvent;
new(): PermissionRequestedEvent;
-}
+};
interface Plugin {
readonly description: string;
@@ -8855,7 +8856,7 @@ interface Plugin {
declare var Plugin: {
prototype: Plugin;
new(): Plugin;
-}
+};
interface PluginArray {
readonly length: number;
@@ -8868,7 +8869,7 @@ interface PluginArray {
declare var PluginArray: {
prototype: PluginArray;
new(): PluginArray;
-}
+};
interface PointerEvent extends MouseEvent {
readonly currentPoint: any;
@@ -8891,7 +8892,7 @@ interface PointerEvent extends MouseEvent {
declare var PointerEvent: {
prototype: PointerEvent;
new(typeArg: string, eventInitDict?: PointerEventInit): PointerEvent;
-}
+};
interface PopStateEvent extends Event {
readonly state: any;
@@ -8901,7 +8902,7 @@ interface PopStateEvent extends Event {
declare var PopStateEvent: {
prototype: PopStateEvent;
new(typeArg: string, eventInitDict?: PopStateEventInit): PopStateEvent;
-}
+};
interface Position {
readonly coords: Coordinates;
@@ -8911,7 +8912,7 @@ interface Position {
declare var Position: {
prototype: Position;
new(): Position;
-}
+};
interface PositionError {
readonly code: number;
@@ -8928,7 +8929,7 @@ declare var PositionError: {
readonly PERMISSION_DENIED: number;
readonly POSITION_UNAVAILABLE: number;
readonly TIMEOUT: number;
-}
+};
interface ProcessingInstruction extends CharacterData {
readonly target: string;
@@ -8937,7 +8938,7 @@ interface ProcessingInstruction extends CharacterData {
declare var ProcessingInstruction: {
prototype: ProcessingInstruction;
new(): ProcessingInstruction;
-}
+};
interface ProgressEvent extends Event {
readonly lengthComputable: boolean;
@@ -8949,7 +8950,7 @@ interface ProgressEvent extends Event {
declare var ProgressEvent: {
prototype: ProgressEvent;
new(type: string, eventInitDict?: ProgressEventInit): ProgressEvent;
-}
+};
interface PushManager {
getSubscription(): Promise<PushSubscription>;
@@ -8960,7 +8961,7 @@ interface PushManager {
declare var PushManager: {
prototype: PushManager;
new(): PushManager;
-}
+};
interface PushSubscription {
readonly endpoint: USVString;
@@ -8973,7 +8974,7 @@ interface PushSubscription {
declare var PushSubscription: {
prototype: PushSubscription;
new(): PushSubscription;
-}
+};
interface PushSubscriptionOptions {
readonly applicationServerKey: ArrayBuffer | null;
@@ -8983,17 +8984,114 @@ interface PushSubscriptionOptions {
declare var PushSubscriptionOptions: {
prototype: PushSubscriptionOptions;
new(): PushSubscriptionOptions;
+};
+
+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;
}
-interface RTCDTMFToneChangeEvent extends Event {
- readonly tone: string;
+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 RTCDTMFToneChangeEvent: {
- prototype: RTCDTMFToneChangeEvent;
- new(typeArg: string, eventInitDict: RTCDTMFToneChangeEventInit): RTCDTMFToneChangeEvent;
+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;
+ error: () => Response;
+ redirect: (url: string, status?: number) => Response;
+};
+
interface RTCDtlsTransportEventMap {
"dtlsstatechange": RTCDtlsTransportStateChangedEvent;
"error": Event;
@@ -9016,7 +9114,7 @@ interface RTCDtlsTransport extends RTCStatsProvider {
declare var RTCDtlsTransport: {
prototype: RTCDtlsTransport;
new(transport: RTCIceTransport): RTCDtlsTransport;
-}
+};
interface RTCDtlsTransportStateChangedEvent extends Event {
readonly state: RTCDtlsTransportState;
@@ -9025,7 +9123,7 @@ interface RTCDtlsTransportStateChangedEvent extends Event {
declare var RTCDtlsTransportStateChangedEvent: {
prototype: RTCDtlsTransportStateChangedEvent;
new(): RTCDtlsTransportStateChangedEvent;
-}
+};
interface RTCDtmfSenderEventMap {
"tonechange": RTCDTMFToneChangeEvent;
@@ -9046,19 +9144,28 @@ interface RTCDtmfSender extends EventTarget {
declare var RTCDtmfSender: {
prototype: RTCDtmfSender;
new(sender: RTCRtpSender): RTCDtmfSender;
+};
+
+interface RTCDTMFToneChangeEvent extends Event {
+ readonly tone: string;
}
+declare var RTCDTMFToneChangeEvent: {
+ prototype: RTCDTMFToneChangeEvent;
+ new(typeArg: string, eventInitDict: RTCDTMFToneChangeEventInit): RTCDTMFToneChangeEvent;
+};
+
interface RTCIceCandidate {
candidate: string | null;
- sdpMLineIndex: number | null;
sdpMid: string | null;
+ sdpMLineIndex: number | null;
toJSON(): any;
}
declare var RTCIceCandidate: {
prototype: RTCIceCandidate;
new(candidateInitDict?: RTCIceCandidateInit): RTCIceCandidate;
-}
+};
interface RTCIceCandidatePairChangedEvent extends Event {
readonly pair: RTCIceCandidatePair;
@@ -9067,7 +9174,7 @@ interface RTCIceCandidatePairChangedEvent extends Event {
declare var RTCIceCandidatePairChangedEvent: {
prototype: RTCIceCandidatePairChangedEvent;
new(): RTCIceCandidatePairChangedEvent;
-}
+};
interface RTCIceGathererEventMap {
"error": Event;
@@ -9088,7 +9195,7 @@ interface RTCIceGatherer extends RTCStatsProvider {
declare var RTCIceGatherer: {
prototype: RTCIceGatherer;
new(options: RTCIceGatherOptions): RTCIceGatherer;
-}
+};
interface RTCIceGathererEvent extends Event {
readonly candidate: RTCIceCandidateDictionary | RTCIceCandidateComplete;
@@ -9097,7 +9204,7 @@ interface RTCIceGathererEvent extends Event {
declare var RTCIceGathererEvent: {
prototype: RTCIceGathererEvent;
new(): RTCIceGathererEvent;
-}
+};
interface RTCIceTransportEventMap {
"candidatepairchange": RTCIceCandidatePairChangedEvent;
@@ -9126,7 +9233,7 @@ interface RTCIceTransport extends RTCStatsProvider {
declare var RTCIceTransport: {
prototype: RTCIceTransport;
new(): RTCIceTransport;
-}
+};
interface RTCIceTransportStateChangedEvent extends Event {
readonly state: RTCIceTransportState;
@@ -9135,7 +9242,7 @@ interface RTCIceTransportStateChangedEvent extends Event {
declare var RTCIceTransportStateChangedEvent: {
prototype: RTCIceTransportStateChangedEvent;
new(): RTCIceTransportStateChangedEvent;
-}
+};
interface RTCPeerConnectionEventMap {
"addstream": MediaStreamEvent;
@@ -9181,7 +9288,7 @@ interface RTCPeerConnection extends EventTarget {
declare var RTCPeerConnection: {
prototype: RTCPeerConnection;
new(configuration: RTCConfiguration): RTCPeerConnection;
-}
+};
interface RTCPeerConnectionIceEvent extends Event {
readonly candidate: RTCIceCandidate;
@@ -9190,7 +9297,7 @@ interface RTCPeerConnectionIceEvent extends Event {
declare var RTCPeerConnectionIceEvent: {
prototype: RTCPeerConnectionIceEvent;
new(type: string, eventInitDict: RTCPeerConnectionIceEventInit): RTCPeerConnectionIceEvent;
-}
+};
interface RTCRtpReceiverEventMap {
"error": Event;
@@ -9214,7 +9321,7 @@ declare var RTCRtpReceiver: {
prototype: RTCRtpReceiver;
new(transport: RTCDtlsTransport | RTCSrtpSdesTransport, kind: string, rtcpTransport?: RTCDtlsTransport): RTCRtpReceiver;
getCapabilities(kind?: string): RTCRtpCapabilities;
-}
+};
interface RTCRtpSenderEventMap {
"error": Event;
@@ -9239,7 +9346,7 @@ declare var RTCRtpSender: {
prototype: RTCRtpSender;
new(track: MediaStreamTrack, transport: RTCDtlsTransport | RTCSrtpSdesTransport, rtcpTransport?: RTCDtlsTransport): RTCRtpSender;
getCapabilities(kind?: string): RTCRtpCapabilities;
-}
+};
interface RTCSessionDescription {
sdp: string | null;
@@ -9250,7 +9357,7 @@ interface RTCSessionDescription {
declare var RTCSessionDescription: {
prototype: RTCSessionDescription;
new(descriptionInitDict?: RTCSessionDescriptionInit): RTCSessionDescription;
-}
+};
interface RTCSrtpSdesTransportEventMap {
"error": Event;
@@ -9267,7 +9374,7 @@ declare var RTCSrtpSdesTransport: {
prototype: RTCSrtpSdesTransport;
new(transport: RTCIceTransport, encryptParameters: RTCSrtpSdesParameters, decryptParameters: RTCSrtpSdesParameters): RTCSrtpSdesTransport;
getLocalParameters(): RTCSrtpSdesParameters[];
-}
+};
interface RTCSsrcConflictEvent extends Event {
readonly ssrc: number;
@@ -9276,7 +9383,7 @@ interface RTCSsrcConflictEvent extends Event {
declare var RTCSsrcConflictEvent: {
prototype: RTCSsrcConflictEvent;
new(): RTCSsrcConflictEvent;
-}
+};
interface RTCStatsProvider extends EventTarget {
getStats(): Promise<RTCStatsReport>;
@@ -9286,112 +9393,421 @@ interface RTCStatsProvider extends EventTarget {
declare var RTCStatsProvider: {
prototype: RTCStatsProvider;
new(): RTCStatsProvider;
+};
+
+interface ScopedCredential {
+ readonly id: ArrayBuffer;
+ readonly type: ScopedCredentialType;
}
-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;
+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;
- 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;
+declare var Selection: {
+ prototype: Selection;
+ new(): Selection;
+};
+
+interface ServiceWorkerEventMap extends AbstractWorkerEventMap {
+ "statechange": Event;
}
-interface ReadableStream {
- readonly locked: boolean;
- cancel(): Promise<void>;
- getReader(): ReadableStreamReader;
+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 ReadableStream: {
- prototype: ReadableStream;
- new(): ReadableStream;
+declare var ServiceWorker: {
+ prototype: ServiceWorker;
+ new(): ServiceWorker;
+};
+
+interface ServiceWorkerContainerEventMap {
+ "controllerchange": Event;
+ "message": ServiceWorkerMessageEvent;
}
-interface ReadableStreamReader {
- cancel(): Promise<void>;
- read(): Promise<any>;
- releaseLock(): void;
+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 ReadableStreamReader: {
- prototype: ReadableStreamReader;
- new(): ReadableStreamReader;
+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;
}
-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 ServiceWorkerMessageEvent: {
+ prototype: ServiceWorkerMessageEvent;
+ new(type: string, eventInitDict?: ServiceWorkerMessageEventInit): ServiceWorkerMessageEvent;
+};
+
+interface ServiceWorkerRegistrationEventMap {
+ "updatefound": Event;
}
-declare var Request: {
- prototype: Request;
- new(input: Request | string, init?: RequestInit): Request;
+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;
}
-interface Response extends Object, Body {
- readonly body: ReadableStream | null;
- readonly headers: Headers;
- readonly ok: boolean;
- readonly status: number;
- readonly statusText: string;
- readonly type: ResponseType;
+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;
- clone(): Response;
+ key?: string;
+ oldValue?: string;
+ newValue?: string;
+ storageArea?: Storage;
}
-declare var Response: {
- prototype: Response;
- new(body?: any, init?: ResponseInit): Response;
+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 SVGAElement extends SVGGraphicsElement, SVGURIReference {
readonly target: SVGAnimatedString;
addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGAElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
@@ -9401,7 +9817,7 @@ interface SVGAElement extends SVGGraphicsElement, SVGURIReference {
declare var SVGAElement: {
prototype: SVGAElement;
new(): SVGAElement;
-}
+};
interface SVGAngle {
readonly unitType: number;
@@ -9425,7 +9841,7 @@ declare var SVGAngle: {
readonly SVG_ANGLETYPE_RAD: number;
readonly SVG_ANGLETYPE_UNKNOWN: number;
readonly SVG_ANGLETYPE_UNSPECIFIED: number;
-}
+};
interface SVGAnimatedAngle {
readonly animVal: SVGAngle;
@@ -9435,7 +9851,7 @@ interface SVGAnimatedAngle {
declare var SVGAnimatedAngle: {
prototype: SVGAnimatedAngle;
new(): SVGAnimatedAngle;
-}
+};
interface SVGAnimatedBoolean {
readonly animVal: boolean;
@@ -9445,7 +9861,7 @@ interface SVGAnimatedBoolean {
declare var SVGAnimatedBoolean: {
prototype: SVGAnimatedBoolean;
new(): SVGAnimatedBoolean;
-}
+};
interface SVGAnimatedEnumeration {
readonly animVal: number;
@@ -9455,7 +9871,7 @@ interface SVGAnimatedEnumeration {
declare var SVGAnimatedEnumeration: {
prototype: SVGAnimatedEnumeration;
new(): SVGAnimatedEnumeration;
-}
+};
interface SVGAnimatedInteger {
readonly animVal: number;
@@ -9465,7 +9881,7 @@ interface SVGAnimatedInteger {
declare var SVGAnimatedInteger: {
prototype: SVGAnimatedInteger;
new(): SVGAnimatedInteger;
-}
+};
interface SVGAnimatedLength {
readonly animVal: SVGLength;
@@ -9475,7 +9891,7 @@ interface SVGAnimatedLength {
declare var SVGAnimatedLength: {
prototype: SVGAnimatedLength;
new(): SVGAnimatedLength;
-}
+};
interface SVGAnimatedLengthList {
readonly animVal: SVGLengthList;
@@ -9485,7 +9901,7 @@ interface SVGAnimatedLengthList {
declare var SVGAnimatedLengthList: {
prototype: SVGAnimatedLengthList;
new(): SVGAnimatedLengthList;
-}
+};
interface SVGAnimatedNumber {
readonly animVal: number;
@@ -9495,7 +9911,7 @@ interface SVGAnimatedNumber {
declare var SVGAnimatedNumber: {
prototype: SVGAnimatedNumber;
new(): SVGAnimatedNumber;
-}
+};
interface SVGAnimatedNumberList {
readonly animVal: SVGNumberList;
@@ -9505,7 +9921,7 @@ interface SVGAnimatedNumberList {
declare var SVGAnimatedNumberList: {
prototype: SVGAnimatedNumberList;
new(): SVGAnimatedNumberList;
-}
+};
interface SVGAnimatedPreserveAspectRatio {
readonly animVal: SVGPreserveAspectRatio;
@@ -9515,7 +9931,7 @@ interface SVGAnimatedPreserveAspectRatio {
declare var SVGAnimatedPreserveAspectRatio: {
prototype: SVGAnimatedPreserveAspectRatio;
new(): SVGAnimatedPreserveAspectRatio;
-}
+};
interface SVGAnimatedRect {
readonly animVal: SVGRect;
@@ -9525,7 +9941,7 @@ interface SVGAnimatedRect {
declare var SVGAnimatedRect: {
prototype: SVGAnimatedRect;
new(): SVGAnimatedRect;
-}
+};
interface SVGAnimatedString {
readonly animVal: string;
@@ -9535,7 +9951,7 @@ interface SVGAnimatedString {
declare var SVGAnimatedString: {
prototype: SVGAnimatedString;
new(): SVGAnimatedString;
-}
+};
interface SVGAnimatedTransformList {
readonly animVal: SVGTransformList;
@@ -9545,7 +9961,7 @@ interface SVGAnimatedTransformList {
declare var SVGAnimatedTransformList: {
prototype: SVGAnimatedTransformList;
new(): SVGAnimatedTransformList;
-}
+};
interface SVGCircleElement extends SVGGraphicsElement {
readonly cx: SVGAnimatedLength;
@@ -9558,7 +9974,7 @@ interface SVGCircleElement extends SVGGraphicsElement {
declare var SVGCircleElement: {
prototype: SVGCircleElement;
new(): SVGCircleElement;
-}
+};
interface SVGClipPathElement extends SVGGraphicsElement, SVGUnitTypes {
readonly clipPathUnits: SVGAnimatedEnumeration;
@@ -9569,7 +9985,7 @@ interface SVGClipPathElement extends SVGGraphicsElement, SVGUnitTypes {
declare var SVGClipPathElement: {
prototype: SVGClipPathElement;
new(): SVGClipPathElement;
-}
+};
interface SVGComponentTransferFunctionElement extends SVGElement {
readonly amplitude: SVGAnimatedNumber;
@@ -9598,7 +10014,7 @@ declare var SVGComponentTransferFunctionElement: {
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;
@@ -9608,7 +10024,7 @@ interface SVGDefsElement extends SVGGraphicsElement {
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;
@@ -9618,7 +10034,7 @@ interface SVGDescElement extends SVGElement {
declare var SVGDescElement: {
prototype: SVGDescElement;
new(): SVGDescElement;
-}
+};
interface SVGElementEventMap extends ElementEventMap {
"click": MouseEvent;
@@ -9656,7 +10072,7 @@ interface SVGElement extends Element {
declare var SVGElement: {
prototype: SVGElement;
new(): SVGElement;
-}
+};
interface SVGElementInstance extends EventTarget {
readonly childNodes: SVGElementInstanceList;
@@ -9672,7 +10088,7 @@ interface SVGElementInstance extends EventTarget {
declare var SVGElementInstance: {
prototype: SVGElementInstance;
new(): SVGElementInstance;
-}
+};
interface SVGElementInstanceList {
readonly length: number;
@@ -9682,7 +10098,7 @@ interface SVGElementInstanceList {
declare var SVGElementInstanceList: {
prototype: SVGElementInstanceList;
new(): SVGElementInstanceList;
-}
+};
interface SVGEllipseElement extends SVGGraphicsElement {
readonly cx: SVGAnimatedLength;
@@ -9696,7 +10112,7 @@ interface SVGEllipseElement extends SVGGraphicsElement {
declare var SVGEllipseElement: {
prototype: SVGEllipseElement;
new(): SVGEllipseElement;
-}
+};
interface SVGFEBlendElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
readonly in1: SVGAnimatedString;
@@ -9743,7 +10159,7 @@ declare var SVGFEBlendElement: {
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;
@@ -9766,7 +10182,7 @@ declare var SVGFEColorMatrixElement: {
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;
@@ -9777,7 +10193,7 @@ interface SVGFEComponentTransferElement extends SVGElement, SVGFilterPrimitiveSt
declare var SVGFEComponentTransferElement: {
prototype: SVGFEComponentTransferElement;
new(): SVGFEComponentTransferElement;
-}
+};
interface SVGFECompositeElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
readonly in1: SVGAnimatedString;
@@ -9808,7 +10224,7 @@ declare var SVGFECompositeElement: {
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;
@@ -9838,7 +10254,7 @@ declare var SVGFEConvolveMatrixElement: {
readonly SVG_EDGEMODE_NONE: number;
readonly SVG_EDGEMODE_UNKNOWN: number;
readonly SVG_EDGEMODE_WRAP: number;
-}
+};
interface SVGFEDiffuseLightingElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
readonly diffuseConstant: SVGAnimatedNumber;
@@ -9853,7 +10269,7 @@ interface SVGFEDiffuseLightingElement extends SVGElement, SVGFilterPrimitiveStan
declare var SVGFEDiffuseLightingElement: {
prototype: SVGFEDiffuseLightingElement;
new(): SVGFEDiffuseLightingElement;
-}
+};
interface SVGFEDisplacementMapElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
readonly in1: SVGAnimatedString;
@@ -9878,7 +10294,7 @@ declare var SVGFEDisplacementMapElement: {
readonly SVG_CHANNEL_G: number;
readonly SVG_CHANNEL_R: number;
readonly SVG_CHANNEL_UNKNOWN: number;
-}
+};
interface SVGFEDistantLightElement extends SVGElement {
readonly azimuth: SVGAnimatedNumber;
@@ -9890,7 +10306,7 @@ interface SVGFEDistantLightElement extends SVGElement {
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;
@@ -9900,7 +10316,7 @@ interface SVGFEFloodElement extends SVGElement, SVGFilterPrimitiveStandardAttrib
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;
@@ -9910,7 +10326,7 @@ interface SVGFEFuncAElement extends SVGComponentTransferFunctionElement {
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;
@@ -9920,7 +10336,7 @@ interface SVGFEFuncBElement extends SVGComponentTransferFunctionElement {
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;
@@ -9930,7 +10346,7 @@ interface SVGFEFuncGElement extends SVGComponentTransferFunctionElement {
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;
@@ -9940,7 +10356,7 @@ interface SVGFEFuncRElement extends SVGComponentTransferFunctionElement {
declare var SVGFEFuncRElement: {
prototype: SVGFEFuncRElement;
new(): SVGFEFuncRElement;
-}
+};
interface SVGFEGaussianBlurElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
readonly in1: SVGAnimatedString;
@@ -9954,7 +10370,7 @@ interface SVGFEGaussianBlurElement extends SVGElement, SVGFilterPrimitiveStandar
declare var SVGFEGaussianBlurElement: {
prototype: SVGFEGaussianBlurElement;
new(): SVGFEGaussianBlurElement;
-}
+};
interface SVGFEImageElement extends SVGElement, SVGFilterPrimitiveStandardAttributes, SVGURIReference {
readonly preserveAspectRatio: SVGAnimatedPreserveAspectRatio;
@@ -9965,7 +10381,7 @@ interface SVGFEImageElement extends SVGElement, SVGFilterPrimitiveStandardAttrib
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;
@@ -9975,7 +10391,7 @@ interface SVGFEMergeElement extends SVGElement, SVGFilterPrimitiveStandardAttrib
declare var SVGFEMergeElement: {
prototype: SVGFEMergeElement;
new(): SVGFEMergeElement;
-}
+};
interface SVGFEMergeNodeElement extends SVGElement {
readonly in1: SVGAnimatedString;
@@ -9986,7 +10402,7 @@ interface SVGFEMergeNodeElement extends SVGElement {
declare var SVGFEMergeNodeElement: {
prototype: SVGFEMergeNodeElement;
new(): SVGFEMergeNodeElement;
-}
+};
interface SVGFEMorphologyElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
readonly in1: SVGAnimatedString;
@@ -10006,7 +10422,7 @@ declare var 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;
@@ -10019,7 +10435,7 @@ interface SVGFEOffsetElement extends SVGElement, SVGFilterPrimitiveStandardAttri
declare var SVGFEOffsetElement: {
prototype: SVGFEOffsetElement;
new(): SVGFEOffsetElement;
-}
+};
interface SVGFEPointLightElement extends SVGElement {
readonly x: SVGAnimatedNumber;
@@ -10032,7 +10448,7 @@ interface SVGFEPointLightElement extends SVGElement {
declare var SVGFEPointLightElement: {
prototype: SVGFEPointLightElement;
new(): SVGFEPointLightElement;
-}
+};
interface SVGFESpecularLightingElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
readonly in1: SVGAnimatedString;
@@ -10048,7 +10464,7 @@ interface SVGFESpecularLightingElement extends SVGElement, SVGFilterPrimitiveSta
declare var SVGFESpecularLightingElement: {
prototype: SVGFESpecularLightingElement;
new(): SVGFESpecularLightingElement;
-}
+};
interface SVGFESpotLightElement extends SVGElement {
readonly limitingConeAngle: SVGAnimatedNumber;
@@ -10066,7 +10482,7 @@ interface SVGFESpotLightElement extends SVGElement {
declare var SVGFESpotLightElement: {
prototype: SVGFESpotLightElement;
new(): SVGFESpotLightElement;
-}
+};
interface SVGFETileElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
readonly in1: SVGAnimatedString;
@@ -10077,7 +10493,7 @@ interface SVGFETileElement extends SVGElement, SVGFilterPrimitiveStandardAttribu
declare var SVGFETileElement: {
prototype: SVGFETileElement;
new(): SVGFETileElement;
-}
+};
interface SVGFETurbulenceElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
readonly baseFrequencyX: SVGAnimatedNumber;
@@ -10105,7 +10521,7 @@ declare var SVGFETurbulenceElement: {
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;
@@ -10124,7 +10540,7 @@ interface SVGFilterElement extends SVGElement, SVGUnitTypes, SVGURIReference {
declare var SVGFilterElement: {
prototype: SVGFilterElement;
new(): SVGFilterElement;
-}
+};
interface SVGForeignObjectElement extends SVGGraphicsElement {
readonly height: SVGAnimatedLength;
@@ -10138,7 +10554,7 @@ interface SVGForeignObjectElement extends SVGGraphicsElement {
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;
@@ -10148,7 +10564,7 @@ interface SVGGElement extends SVGGraphicsElement {
declare var SVGGElement: {
prototype: SVGGElement;
new(): SVGGElement;
-}
+};
interface SVGGradientElement extends SVGElement, SVGUnitTypes, SVGURIReference {
readonly gradientTransform: SVGAnimatedTransformList;
@@ -10169,7 +10585,7 @@ declare var SVGGradientElement: {
readonly SVG_SPREADMETHOD_REFLECT: number;
readonly SVG_SPREADMETHOD_REPEAT: number;
readonly SVG_SPREADMETHOD_UNKNOWN: number;
-}
+};
interface SVGGraphicsElement extends SVGElement, SVGTests {
readonly farthestViewportElement: SVGElement;
@@ -10186,7 +10602,7 @@ interface SVGGraphicsElement extends SVGElement, SVGTests {
declare var SVGGraphicsElement: {
prototype: SVGGraphicsElement;
new(): SVGGraphicsElement;
-}
+};
interface SVGImageElement extends SVGGraphicsElement, SVGURIReference {
readonly height: SVGAnimatedLength;
@@ -10201,7 +10617,7 @@ interface SVGImageElement extends SVGGraphicsElement, SVGURIReference {
declare var SVGImageElement: {
prototype: SVGImageElement;
new(): SVGImageElement;
-}
+};
interface SVGLength {
readonly unitType: number;
@@ -10237,7 +10653,7 @@ declare var SVGLength: {
readonly SVG_LENGTHTYPE_PT: number;
readonly SVG_LENGTHTYPE_PX: number;
readonly SVG_LENGTHTYPE_UNKNOWN: number;
-}
+};
interface SVGLengthList {
readonly numberOfItems: number;
@@ -10253,35 +10669,35 @@ interface SVGLengthList {
declare var SVGLengthList: {
prototype: SVGLengthList;
new(): SVGLengthList;
-}
+};
-interface SVGLineElement extends SVGGraphicsElement {
+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: SVGLineElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ 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 SVGLineElement: {
- prototype: SVGLineElement;
- new(): SVGLineElement;
-}
+declare var SVGLinearGradientElement: {
+ prototype: SVGLinearGradientElement;
+ new(): SVGLinearGradientElement;
+};
-interface SVGLinearGradientElement extends SVGGradientElement {
+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: SVGLinearGradientElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void;
+ 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 SVGLinearGradientElement: {
- prototype: SVGLinearGradientElement;
- new(): SVGLinearGradientElement;
-}
+declare var SVGLineElement: {
+ prototype: SVGLineElement;
+ new(): SVGLineElement;
+};
interface SVGMarkerElement extends SVGElement, SVGFitToViewBox {
readonly markerHeight: SVGAnimatedLength;
@@ -10293,12 +10709,12 @@ interface SVGMarkerElement extends SVGElement, SVGFitToViewBox {
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;
+ readonly SVG_MARKERUNITS_STROKEWIDTH: number;
+ readonly SVG_MARKERUNITS_UNKNOWN: number;
+ readonly SVG_MARKERUNITS_USERSPACEONUSE: 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;
}
@@ -10306,13 +10722,13 @@ interface SVGMarkerElement extends SVGElement, SVGFitToViewBox {
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;
-}
+ readonly SVG_MARKERUNITS_STROKEWIDTH: number;
+ readonly SVG_MARKERUNITS_UNKNOWN: number;
+ readonly SVG_MARKERUNITS_USERSPACEONUSE: number;
+};
interface SVGMaskElement extends SVGElement, SVGTests, SVGUnitTypes {
readonly height: SVGAnimatedLength;
@@ -10328,7 +10744,7 @@ interface SVGMaskElement extends SVGElement, SVGTests, SVGUnitTypes {
declare var SVGMaskElement: {
prototype: SVGMaskElement;
new(): SVGMaskElement;
-}
+};
interface SVGMatrix {
a: number;
@@ -10353,7 +10769,7 @@ interface 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;
@@ -10363,7 +10779,7 @@ interface SVGMetadataElement extends SVGElement {
declare var SVGMetadataElement: {
prototype: SVGMetadataElement;
new(): SVGMetadataElement;
-}
+};
interface SVGNumber {
value: number;
@@ -10372,7 +10788,7 @@ interface SVGNumber {
declare var SVGNumber: {
prototype: SVGNumber;
new(): SVGNumber;
-}
+};
interface SVGNumberList {
readonly numberOfItems: number;
@@ -10388,7 +10804,7 @@ interface SVGNumberList {
declare var SVGNumberList: {
prototype: SVGNumberList;
new(): SVGNumberList;
-}
+};
interface SVGPathElement extends SVGGraphicsElement {
readonly pathSegList: SVGPathSegList;
@@ -10421,7 +10837,7 @@ interface SVGPathElement extends SVGGraphicsElement {
declare var SVGPathElement: {
prototype: SVGPathElement;
new(): SVGPathElement;
-}
+};
interface SVGPathSeg {
readonly pathSegType: number;
@@ -10471,7 +10887,7 @@ declare var SVGPathSeg: {
readonly PATHSEG_MOVETO_ABS: number;
readonly PATHSEG_MOVETO_REL: number;
readonly PATHSEG_UNKNOWN: number;
-}
+};
interface SVGPathSegArcAbs extends SVGPathSeg {
angle: number;
@@ -10486,7 +10902,7 @@ interface SVGPathSegArcAbs extends SVGPathSeg {
declare var SVGPathSegArcAbs: {
prototype: SVGPathSegArcAbs;
new(): SVGPathSegArcAbs;
-}
+};
interface SVGPathSegArcRel extends SVGPathSeg {
angle: number;
@@ -10501,7 +10917,7 @@ interface SVGPathSegArcRel extends SVGPathSeg {
declare var SVGPathSegArcRel: {
prototype: SVGPathSegArcRel;
new(): SVGPathSegArcRel;
-}
+};
interface SVGPathSegClosePath extends SVGPathSeg {
}
@@ -10509,7 +10925,7 @@ interface SVGPathSegClosePath extends SVGPathSeg {
declare var SVGPathSegClosePath: {
prototype: SVGPathSegClosePath;
new(): SVGPathSegClosePath;
-}
+};
interface SVGPathSegCurvetoCubicAbs extends SVGPathSeg {
x: number;
@@ -10523,7 +10939,7 @@ interface SVGPathSegCurvetoCubicAbs extends SVGPathSeg {
declare var SVGPathSegCurvetoCubicAbs: {
prototype: SVGPathSegCurvetoCubicAbs;
new(): SVGPathSegCurvetoCubicAbs;
-}
+};
interface SVGPathSegCurvetoCubicRel extends SVGPathSeg {
x: number;
@@ -10537,7 +10953,7 @@ interface SVGPathSegCurvetoCubicRel extends SVGPathSeg {
declare var SVGPathSegCurvetoCubicRel: {
prototype: SVGPathSegCurvetoCubicRel;
new(): SVGPathSegCurvetoCubicRel;
-}
+};
interface SVGPathSegCurvetoCubicSmoothAbs extends SVGPathSeg {
x: number;
@@ -10549,7 +10965,7 @@ interface SVGPathSegCurvetoCubicSmoothAbs extends SVGPathSeg {
declare var SVGPathSegCurvetoCubicSmoothAbs: {
prototype: SVGPathSegCurvetoCubicSmoothAbs;
new(): SVGPathSegCurvetoCubicSmoothAbs;
-}
+};
interface SVGPathSegCurvetoCubicSmoothRel extends SVGPathSeg {
x: number;
@@ -10561,7 +10977,7 @@ interface SVGPathSegCurvetoCubicSmoothRel extends SVGPathSeg {
declare var SVGPathSegCurvetoCubicSmoothRel: {
prototype: SVGPathSegCurvetoCubicSmoothRel;
new(): SVGPathSegCurvetoCubicSmoothRel;
-}
+};
interface SVGPathSegCurvetoQuadraticAbs extends SVGPathSeg {
x: number;
@@ -10573,7 +10989,7 @@ interface SVGPathSegCurvetoQuadraticAbs extends SVGPathSeg {
declare var SVGPathSegCurvetoQuadraticAbs: {
prototype: SVGPathSegCurvetoQuadraticAbs;
new(): SVGPathSegCurvetoQuadraticAbs;
-}
+};
interface SVGPathSegCurvetoQuadraticRel extends SVGPathSeg {
x: number;
@@ -10585,7 +11001,7 @@ interface SVGPathSegCurvetoQuadraticRel extends SVGPathSeg {
declare var SVGPathSegCurvetoQuadraticRel: {
prototype: SVGPathSegCurvetoQuadraticRel;
new(): SVGPathSegCurvetoQuadraticRel;
-}
+};
interface SVGPathSegCurvetoQuadraticSmoothAbs extends SVGPathSeg {
x: number;
@@ -10595,7 +11011,7 @@ interface SVGPathSegCurvetoQuadraticSmoothAbs extends SVGPathSeg {
declare var SVGPathSegCurvetoQuadraticSmoothAbs: {
prototype: SVGPathSegCurvetoQuadraticSmoothAbs;
new(): SVGPathSegCurvetoQuadraticSmoothAbs;
-}
+};
interface SVGPathSegCurvetoQuadraticSmoothRel extends SVGPathSeg {
x: number;
@@ -10605,7 +11021,7 @@ interface SVGPathSegCurvetoQuadraticSmoothRel extends SVGPathSeg {
declare var SVGPathSegCurvetoQuadraticSmoothRel: {
prototype: SVGPathSegCurvetoQuadraticSmoothRel;
new(): SVGPathSegCurvetoQuadraticSmoothRel;
-}
+};
interface SVGPathSegLinetoAbs extends SVGPathSeg {
x: number;
@@ -10615,7 +11031,7 @@ interface SVGPathSegLinetoAbs extends SVGPathSeg {
declare var SVGPathSegLinetoAbs: {
prototype: SVGPathSegLinetoAbs;
new(): SVGPathSegLinetoAbs;
-}
+};
interface SVGPathSegLinetoHorizontalAbs extends SVGPathSeg {
x: number;
@@ -10624,7 +11040,7 @@ interface SVGPathSegLinetoHorizontalAbs extends SVGPathSeg {
declare var SVGPathSegLinetoHorizontalAbs: {
prototype: SVGPathSegLinetoHorizontalAbs;
new(): SVGPathSegLinetoHorizontalAbs;
-}
+};
interface SVGPathSegLinetoHorizontalRel extends SVGPathSeg {
x: number;
@@ -10633,7 +11049,7 @@ interface SVGPathSegLinetoHorizontalRel extends SVGPathSeg {
declare var SVGPathSegLinetoHorizontalRel: {
prototype: SVGPathSegLinetoHorizontalRel;
new(): SVGPathSegLinetoHorizontalRel;
-}
+};
interface SVGPathSegLinetoRel extends SVGPathSeg {
x: number;
@@ -10643,7 +11059,7 @@ interface SVGPathSegLinetoRel extends SVGPathSeg {
declare var SVGPathSegLinetoRel: {
prototype: SVGPathSegLinetoRel;
new(): SVGPathSegLinetoRel;
-}
+};
interface SVGPathSegLinetoVerticalAbs extends SVGPathSeg {
y: number;
@@ -10652,7 +11068,7 @@ interface SVGPathSegLinetoVerticalAbs extends SVGPathSeg {
declare var SVGPathSegLinetoVerticalAbs: {
prototype: SVGPathSegLinetoVerticalAbs;
new(): SVGPathSegLinetoVerticalAbs;
-}
+};
interface SVGPathSegLinetoVerticalRel extends SVGPathSeg {
y: number;
@@ -10661,7 +11077,7 @@ interface SVGPathSegLinetoVerticalRel extends SVGPathSeg {
declare var SVGPathSegLinetoVerticalRel: {
prototype: SVGPathSegLinetoVerticalRel;
new(): SVGPathSegLinetoVerticalRel;
-}
+};
interface SVGPathSegList {
readonly numberOfItems: number;
@@ -10677,7 +11093,7 @@ interface SVGPathSegList {
declare var SVGPathSegList: {
prototype: SVGPathSegList;
new(): SVGPathSegList;
-}
+};
interface SVGPathSegMovetoAbs extends SVGPathSeg {
x: number;
@@ -10687,7 +11103,7 @@ interface SVGPathSegMovetoAbs extends SVGPathSeg {
declare var SVGPathSegMovetoAbs: {
prototype: SVGPathSegMovetoAbs;
new(): SVGPathSegMovetoAbs;
-}
+};
interface SVGPathSegMovetoRel extends SVGPathSeg {
x: number;
@@ -10697,7 +11113,7 @@ interface SVGPathSegMovetoRel extends SVGPathSeg {
declare var SVGPathSegMovetoRel: {
prototype: SVGPathSegMovetoRel;
new(): SVGPathSegMovetoRel;
-}
+};
interface SVGPatternElement extends SVGElement, SVGTests, SVGUnitTypes, SVGFitToViewBox, SVGURIReference {
readonly height: SVGAnimatedLength;
@@ -10714,7 +11130,7 @@ interface SVGPatternElement extends SVGElement, SVGTests, SVGUnitTypes, SVGFitTo
declare var SVGPatternElement: {
prototype: SVGPatternElement;
new(): SVGPatternElement;
-}
+};
interface SVGPoint {
x: number;
@@ -10725,7 +11141,7 @@ interface SVGPoint {
declare var SVGPoint: {
prototype: SVGPoint;
new(): SVGPoint;
-}
+};
interface SVGPointList {
readonly numberOfItems: number;
@@ -10741,7 +11157,7 @@ interface SVGPointList {
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;
@@ -10751,7 +11167,7 @@ interface SVGPolygonElement extends SVGGraphicsElement, SVGAnimatedPoints {
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;
@@ -10761,7 +11177,7 @@ interface SVGPolylineElement extends SVGGraphicsElement, SVGAnimatedPoints {
declare var SVGPolylineElement: {
prototype: SVGPolylineElement;
new(): SVGPolylineElement;
-}
+};
interface SVGPreserveAspectRatio {
align: number;
@@ -10799,7 +11215,7 @@ declare var SVGPreserveAspectRatio: {
readonly SVG_PRESERVEASPECTRATIO_XMINYMAX: number;
readonly SVG_PRESERVEASPECTRATIO_XMINYMID: number;
readonly SVG_PRESERVEASPECTRATIO_XMINYMIN: number;
-}
+};
interface SVGRadialGradientElement extends SVGGradientElement {
readonly cx: SVGAnimatedLength;
@@ -10814,7 +11230,7 @@ interface SVGRadialGradientElement extends SVGGradientElement {
declare var SVGRadialGradientElement: {
prototype: SVGRadialGradientElement;
new(): SVGRadialGradientElement;
-}
+};
interface SVGRect {
height: number;
@@ -10826,7 +11242,7 @@ interface SVGRect {
declare var SVGRect: {
prototype: SVGRect;
new(): SVGRect;
-}
+};
interface SVGRectElement extends SVGGraphicsElement {
readonly height: SVGAnimatedLength;
@@ -10842,8 +11258,60 @@ interface SVGRectElement extends SVGGraphicsElement {
declare var SVGRectElement: {
prototype: SVGRectElement;
new(): SVGRectElement;
+};
+
+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 SVGSVGElementEventMap extends SVGElementEventMap {
"SVGAbort": Event;
"SVGError": Event;
@@ -10903,59 +11371,7 @@ interface SVGSVGElement extends SVGGraphicsElement, DocumentEvent, SVGFitToViewB
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;
@@ -10965,7 +11381,7 @@ interface SVGSwitchElement extends SVGGraphicsElement {
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;
@@ -10975,17 +11391,7 @@ interface SVGSymbolElement extends SVGElement, SVGFitToViewBox {
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;
@@ -11012,7 +11418,7 @@ declare var 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;
@@ -11022,7 +11428,7 @@ interface SVGTextElement extends SVGTextPositioningElement {
declare var SVGTextElement: {
prototype: SVGTextElement;
new(): SVGTextElement;
-}
+};
interface SVGTextPathElement extends SVGTextContentElement, SVGURIReference {
readonly method: SVGAnimatedEnumeration;
@@ -11047,7 +11453,7 @@ declare var SVGTextPathElement: {
readonly TEXTPATH_SPACINGTYPE_AUTO: number;
readonly TEXTPATH_SPACINGTYPE_EXACT: number;
readonly TEXTPATH_SPACINGTYPE_UNKNOWN: number;
-}
+};
interface SVGTextPositioningElement extends SVGTextContentElement {
readonly dx: SVGAnimatedLengthList;
@@ -11062,7 +11468,7 @@ interface SVGTextPositioningElement extends SVGTextContentElement {
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;
@@ -11072,7 +11478,7 @@ interface SVGTitleElement extends SVGElement {
declare var SVGTitleElement: {
prototype: SVGTitleElement;
new(): SVGTitleElement;
-}
+};
interface SVGTransform {
readonly angle: number;
@@ -11103,7 +11509,7 @@ declare var SVGTransform: {
readonly SVG_TRANSFORM_SKEWY: number;
readonly SVG_TRANSFORM_TRANSLATE: number;
readonly SVG_TRANSFORM_UNKNOWN: number;
-}
+};
interface SVGTransformList {
readonly numberOfItems: number;
@@ -11121,8 +11527,18 @@ interface SVGTransformList {
declare var SVGTransformList: {
prototype: SVGTransformList;
new(): SVGTransformList;
+};
+
+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 SVGUnitTypes {
readonly SVG_UNIT_TYPE_OBJECTBOUNDINGBOX: number;
readonly SVG_UNIT_TYPE_UNKNOWN: number;
@@ -11144,7 +11560,7 @@ interface SVGUseElement extends SVGGraphicsElement, SVGURIReference {
declare var SVGUseElement: {
prototype: SVGUseElement;
new(): SVGUseElement;
-}
+};
interface SVGViewElement extends SVGElement, SVGZoomAndPan, SVGFitToViewBox {
readonly viewTarget: SVGStringList;
@@ -11155,7 +11571,7 @@ interface SVGViewElement extends SVGElement, SVGZoomAndPan, SVGFitToViewBox {
declare var SVGViewElement: {
prototype: SVGViewElement;
new(): SVGViewElement;
-}
+};
interface SVGZoomAndPan {
readonly zoomAndPan: number;
@@ -11165,7 +11581,7 @@ 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;
@@ -11178,420 +11594,7 @@ interface SVGZoomEvent extends UIEvent {
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;
@@ -11601,7 +11604,7 @@ interface SyncManager {
declare var SyncManager: {
prototype: SyncManager;
new(): SyncManager;
-}
+};
interface Text extends CharacterData {
readonly wholeText: string;
@@ -11612,7 +11615,7 @@ interface Text extends CharacterData {
declare var Text: {
prototype: Text;
new(data?: string): Text;
-}
+};
interface TextEvent extends UIEvent {
readonly data: string;
@@ -11644,7 +11647,7 @@ declare var TextEvent: {
readonly DOM_INPUT_METHOD_SCRIPT: number;
readonly DOM_INPUT_METHOD_UNKNOWN: number;
readonly DOM_INPUT_METHOD_VOICE: number;
-}
+};
interface TextMetrics {
readonly width: number;
@@ -11653,7 +11656,7 @@ interface TextMetrics {
declare var TextMetrics: {
prototype: TextMetrics;
new(): TextMetrics;
-}
+};
interface TextTrackEventMap {
"cuechange": Event;
@@ -11696,7 +11699,7 @@ declare var TextTrack: {
readonly LOADING: number;
readonly NONE: number;
readonly SHOWING: number;
-}
+};
interface TextTrackCueEventMap {
"enter": Event;
@@ -11720,7 +11723,7 @@ interface TextTrackCue extends EventTarget {
declare var TextTrackCue: {
prototype: TextTrackCue;
new(startTime: number, endTime: number, text: string): TextTrackCue;
-}
+};
interface TextTrackCueList {
readonly length: number;
@@ -11732,7 +11735,7 @@ interface TextTrackCueList {
declare var TextTrackCueList: {
prototype: TextTrackCueList;
new(): TextTrackCueList;
-}
+};
interface TextTrackListEventMap {
"addtrack": TrackEvent;
@@ -11750,7 +11753,7 @@ interface TextTrackList extends EventTarget {
declare var TextTrackList: {
prototype: TextTrackList;
new(): TextTrackList;
-}
+};
interface TimeRanges {
readonly length: number;
@@ -11761,7 +11764,7 @@ interface TimeRanges {
declare var TimeRanges: {
prototype: TimeRanges;
new(): TimeRanges;
-}
+};
interface Touch {
readonly clientX: number;
@@ -11777,7 +11780,7 @@ interface Touch {
declare var Touch: {
prototype: Touch;
new(): Touch;
-}
+};
interface TouchEvent extends UIEvent {
readonly altKey: boolean;
@@ -11795,7 +11798,7 @@ interface TouchEvent extends UIEvent {
declare var TouchEvent: {
prototype: TouchEvent;
new(type: string, touchEventInit?: TouchEventInit): TouchEvent;
-}
+};
interface TouchList {
readonly length: number;
@@ -11806,7 +11809,7 @@ interface TouchList {
declare var TouchList: {
prototype: TouchList;
new(): TouchList;
-}
+};
interface TrackEvent extends Event {
readonly track: VideoTrack | AudioTrack | TextTrack | null;
@@ -11815,7 +11818,7 @@ interface TrackEvent extends Event {
declare var TrackEvent: {
prototype: TrackEvent;
new(typeArg: string, eventInitDict?: TrackEventInit): TrackEvent;
-}
+};
interface TransitionEvent extends Event {
readonly elapsedTime: number;
@@ -11826,7 +11829,7 @@ interface TransitionEvent extends Event {
declare var TransitionEvent: {
prototype: TransitionEvent;
new(typeArg: string, eventInitDict?: TransitionEventInit): TransitionEvent;
-}
+};
interface TreeWalker {
currentNode: Node;
@@ -11846,7 +11849,7 @@ interface TreeWalker {
declare var TreeWalker: {
prototype: TreeWalker;
new(): TreeWalker;
-}
+};
interface UIEvent extends Event {
readonly detail: number;
@@ -11857,8 +11860,17 @@ interface UIEvent extends Event {
declare var UIEvent: {
prototype: UIEvent;
new(typeArg: string, eventInitDict?: UIEventInit): UIEvent;
+};
+
+interface UnviewableContentIdentifiedEvent extends NavigationEventWithReferrer {
+ readonly mediaType: string;
}
+declare var UnviewableContentIdentifiedEvent: {
+ prototype: UnviewableContentIdentifiedEvent;
+ new(): UnviewableContentIdentifiedEvent;
+};
+
interface URL {
hash: string;
host: string;
@@ -11880,16 +11892,7 @@ declare var 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;
@@ -11907,7 +11910,7 @@ interface ValidityState {
declare var ValidityState: {
prototype: ValidityState;
new(): ValidityState;
-}
+};
interface VideoPlaybackQuality {
readonly corruptedVideoFrames: number;
@@ -11920,7 +11923,7 @@ interface VideoPlaybackQuality {
declare var VideoPlaybackQuality: {
prototype: VideoPlaybackQuality;
new(): VideoPlaybackQuality;
-}
+};
interface VideoTrack {
readonly id: string;
@@ -11934,7 +11937,7 @@ interface VideoTrack {
declare var VideoTrack: {
prototype: VideoTrack;
new(): VideoTrack;
-}
+};
interface VideoTrackListEventMap {
"addtrack": TrackEvent;
@@ -11958,23 +11961,55 @@ interface VideoTrackList extends EventTarget {
declare var VideoTrackList: {
prototype: VideoTrackList;
new(): VideoTrackList;
+};
+
+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 WEBGL_compressed_texture_s3tc {
+ readonly COMPRESSED_RGB_S3TC_DXT1_EXT: number;
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_RGB_S3TC_DXT1_EXT: number;
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;
@@ -11986,7 +12021,7 @@ declare var 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;
@@ -11996,39 +12031,7 @@ 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;
@@ -12039,7 +12042,7 @@ interface WebGLActiveInfo {
declare var WebGLActiveInfo: {
prototype: WebGLActiveInfo;
new(): WebGLActiveInfo;
-}
+};
interface WebGLBuffer extends WebGLObject {
}
@@ -12047,7 +12050,7 @@ interface WebGLBuffer extends WebGLObject {
declare var WebGLBuffer: {
prototype: WebGLBuffer;
new(): WebGLBuffer;
-}
+};
interface WebGLContextEvent extends Event {
readonly statusMessage: string;
@@ -12056,7 +12059,7 @@ interface WebGLContextEvent extends Event {
declare var WebGLContextEvent: {
prototype: WebGLContextEvent;
new(typeArg: string, eventInitDict?: WebGLContextEventInit): WebGLContextEvent;
-}
+};
interface WebGLFramebuffer extends WebGLObject {
}
@@ -12064,7 +12067,7 @@ interface WebGLFramebuffer extends WebGLObject {
declare var WebGLFramebuffer: {
prototype: WebGLFramebuffer;
new(): WebGLFramebuffer;
-}
+};
interface WebGLObject {
}
@@ -12072,7 +12075,7 @@ interface WebGLObject {
declare var WebGLObject: {
prototype: WebGLObject;
new(): WebGLObject;
-}
+};
interface WebGLProgram extends WebGLObject {
}
@@ -12080,7 +12083,7 @@ interface WebGLProgram extends WebGLObject {
declare var WebGLProgram: {
prototype: WebGLProgram;
new(): WebGLProgram;
-}
+};
interface WebGLRenderbuffer extends WebGLObject {
}
@@ -12088,7 +12091,7 @@ interface WebGLRenderbuffer extends WebGLObject {
declare var WebGLRenderbuffer: {
prototype: WebGLRenderbuffer;
new(): WebGLRenderbuffer;
-}
+};
interface WebGLRenderingContext {
readonly canvas: HTMLCanvasElement;
@@ -12349,13 +12352,13 @@ interface WebGLRenderingContext {
readonly KEEP: number;
readonly LEQUAL: number;
readonly LESS: number;
+ readonly LINE_LOOP: number;
+ readonly LINE_STRIP: number;
+ readonly LINE_WIDTH: 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;
@@ -12380,9 +12383,9 @@ interface WebGLRenderingContext {
readonly NEAREST_MIPMAP_NEAREST: number;
readonly NEVER: number;
readonly NICEST: number;
+ readonly NO_ERROR: 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;
@@ -12412,18 +12415,18 @@ interface WebGLRenderingContext {
readonly REPEAT: number;
readonly REPLACE: number;
readonly RGB: number;
- readonly RGB565: number;
readonly RGB5_A1: number;
+ readonly RGB565: 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 SAMPLER_2D: number;
+ readonly SAMPLER_CUBE: number;
+ readonly SAMPLES: number;
readonly SCISSOR_BOX: number;
readonly SCISSOR_TEST: number;
readonly SHADER_TYPE: number;
@@ -12457,6 +12460,20 @@ interface WebGLRenderingContext {
readonly STREAM_DRAW: number;
readonly SUBPIXEL_BITS: number;
readonly TEXTURE: 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 TEXTURE0: number;
readonly TEXTURE1: number;
readonly TEXTURE10: number;
@@ -12489,23 +12506,9 @@ interface WebGLRenderingContext {
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 TRIANGLES: number;
readonly UNPACK_ALIGNMENT: number;
readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: number;
readonly UNPACK_FLIP_Y_WEBGL: number;
@@ -12651,13 +12654,13 @@ declare var WebGLRenderingContext: {
readonly KEEP: number;
readonly LEQUAL: number;
readonly LESS: number;
+ readonly LINE_LOOP: number;
+ readonly LINE_STRIP: number;
+ readonly LINE_WIDTH: 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;
@@ -12682,9 +12685,9 @@ declare var WebGLRenderingContext: {
readonly NEAREST_MIPMAP_NEAREST: number;
readonly NEVER: number;
readonly NICEST: number;
+ readonly NO_ERROR: 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;
@@ -12714,18 +12717,18 @@ declare var WebGLRenderingContext: {
readonly REPEAT: number;
readonly REPLACE: number;
readonly RGB: number;
- readonly RGB565: number;
readonly RGB5_A1: number;
+ readonly RGB565: 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 SAMPLER_2D: number;
+ readonly SAMPLER_CUBE: number;
+ readonly SAMPLES: number;
readonly SCISSOR_BOX: number;
readonly SCISSOR_TEST: number;
readonly SHADER_TYPE: number;
@@ -12759,6 +12762,20 @@ declare var WebGLRenderingContext: {
readonly STREAM_DRAW: number;
readonly SUBPIXEL_BITS: number;
readonly TEXTURE: 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 TEXTURE0: number;
readonly TEXTURE1: number;
readonly TEXTURE10: number;
@@ -12791,23 +12808,9 @@ declare var WebGLRenderingContext: {
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 TRIANGLES: number;
readonly UNPACK_ALIGNMENT: number;
readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: number;
readonly UNPACK_FLIP_Y_WEBGL: number;
@@ -12831,7 +12834,7 @@ declare var WebGLRenderingContext: {
readonly VERTEX_SHADER: number;
readonly VIEWPORT: number;
readonly ZERO: number;
-}
+};
interface WebGLShader extends WebGLObject {
}
@@ -12839,7 +12842,7 @@ interface WebGLShader extends WebGLObject {
declare var WebGLShader: {
prototype: WebGLShader;
new(): WebGLShader;
-}
+};
interface WebGLShaderPrecisionFormat {
readonly precision: number;
@@ -12850,7 +12853,7 @@ interface WebGLShaderPrecisionFormat {
declare var WebGLShaderPrecisionFormat: {
prototype: WebGLShaderPrecisionFormat;
new(): WebGLShaderPrecisionFormat;
-}
+};
interface WebGLTexture extends WebGLObject {
}
@@ -12858,7 +12861,7 @@ interface WebGLTexture extends WebGLObject {
declare var WebGLTexture: {
prototype: WebGLTexture;
new(): WebGLTexture;
-}
+};
interface WebGLUniformLocation {
}
@@ -12866,7 +12869,7 @@ interface WebGLUniformLocation {
declare var WebGLUniformLocation: {
prototype: WebGLUniformLocation;
new(): WebGLUniformLocation;
-}
+};
interface WebKitCSSMatrix {
a: number;
@@ -12906,7 +12909,7 @@ interface WebKitCSSMatrix {
declare var WebKitCSSMatrix: {
prototype: WebKitCSSMatrix;
new(text?: string): WebKitCSSMatrix;
-}
+};
interface WebKitDirectoryEntry extends WebKitEntry {
createReader(): WebKitDirectoryReader;
@@ -12915,7 +12918,7 @@ interface WebKitDirectoryEntry extends WebKitEntry {
declare var WebKitDirectoryEntry: {
prototype: WebKitDirectoryEntry;
new(): WebKitDirectoryEntry;
-}
+};
interface WebKitDirectoryReader {
readEntries(successCallback: WebKitEntriesCallback, errorCallback?: WebKitErrorCallback): void;
@@ -12924,7 +12927,7 @@ interface WebKitDirectoryReader {
declare var WebKitDirectoryReader: {
prototype: WebKitDirectoryReader;
new(): WebKitDirectoryReader;
-}
+};
interface WebKitEntry {
readonly filesystem: WebKitFileSystem;
@@ -12937,7 +12940,7 @@ interface WebKitEntry {
declare var WebKitEntry: {
prototype: WebKitEntry;
new(): WebKitEntry;
-}
+};
interface WebKitFileEntry extends WebKitEntry {
file(successCallback: WebKitFileCallback, errorCallback?: WebKitErrorCallback): void;
@@ -12946,7 +12949,7 @@ interface WebKitFileEntry extends WebKitEntry {
declare var WebKitFileEntry: {
prototype: WebKitFileEntry;
new(): WebKitFileEntry;
-}
+};
interface WebKitFileSystem {
readonly name: string;
@@ -12956,7 +12959,7 @@ interface WebKitFileSystem {
declare var WebKitFileSystem: {
prototype: WebKitFileSystem;
new(): WebKitFileSystem;
-}
+};
interface WebKitPoint {
x: number;
@@ -12966,8 +12969,18 @@ interface WebKitPoint {
declare var WebKitPoint: {
prototype: WebKitPoint;
new(x?: number, y?: number): WebKitPoint;
+};
+
+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 WebSocketEventMap {
"close": CloseEvent;
"error": Event;
@@ -13003,7 +13016,7 @@ declare var WebSocket: {
readonly CLOSING: number;
readonly CONNECTING: number;
readonly OPEN: number;
-}
+};
interface WheelEvent extends MouseEvent {
readonly deltaMode: number;
@@ -13026,7 +13039,7 @@ declare var WheelEvent: {
readonly DOM_DELTA_LINE: number;
readonly DOM_DELTA_PAGE: number;
readonly DOM_DELTA_PIXEL: number;
-}
+};
interface WindowEventMap extends GlobalEventHandlersEventMap {
"abort": UIEvent;
@@ -13054,6 +13067,7 @@ interface WindowEventMap extends GlobalEventHandlersEventMap {
"durationchange": Event;
"emptied": Event;
"ended": MediaStreamErrorEvent;
+ "error": ErrorEvent;
"focus": FocusEvent;
"hashchange": HashChangeEvent;
"input": Event;
@@ -13112,6 +13126,10 @@ interface WindowEventMap extends GlobalEventHandlersEventMap {
"submit": Event;
"suspend": Event;
"timeupdate": Event;
+ "touchcancel": TouchEvent;
+ "touchend": TouchEvent;
+ "touchmove": TouchEvent;
+ "touchstart": TouchEvent;
"unload": Event;
"volumechange": Event;
"waiting": Event;
@@ -13125,8 +13143,8 @@ interface Window extends EventTarget, WindowTimers, WindowSessionStorage, Window
readonly crypto: Crypto;
defaultStatus: string;
readonly devicePixelRatio: number;
- readonly doNotTrack: string;
readonly document: Document;
+ readonly doNotTrack: string;
event: Event | undefined;
readonly external: External;
readonly frameElement: Element;
@@ -13249,9 +13267,9 @@ interface Window extends EventTarget, WindowTimers, WindowSessionStorage, Window
readonly screenTop: number;
readonly screenX: number;
readonly screenY: number;
+ readonly scrollbars: BarProp;
readonly scrollX: number;
readonly scrollY: number;
- readonly scrollbars: BarProp;
readonly self: Window;
readonly speechSynthesis: SpeechSynthesis;
status: string;
@@ -13307,7 +13325,7 @@ interface Window extends EventTarget, WindowTimers, WindowSessionStorage, Window
declare var Window: {
prototype: Window;
new(): Window;
-}
+};
interface WorkerEventMap extends AbstractWorkerEventMap {
"message": MessageEvent;
@@ -13324,7 +13342,7 @@ interface Worker extends EventTarget, AbstractWorker {
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;
@@ -13334,7 +13352,7 @@ interface XMLDocument extends Document {
declare var XMLDocument: {
prototype: XMLDocument;
new(): XMLDocument;
-}
+};
interface XMLHttpRequestEventMap extends XMLHttpRequestEventTargetEventMap {
"readystatechange": Event;
@@ -13381,7 +13399,7 @@ declare var XMLHttpRequest: {
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;
@@ -13391,7 +13409,7 @@ interface XMLHttpRequestUpload extends EventTarget, XMLHttpRequestEventTarget {
declare var XMLHttpRequestUpload: {
prototype: XMLHttpRequestUpload;
new(): XMLHttpRequestUpload;
-}
+};
interface XMLSerializer {
serializeToString(target: Node): string;
@@ -13400,7 +13418,7 @@ interface XMLSerializer {
declare var XMLSerializer: {
prototype: XMLSerializer;
new(): XMLSerializer;
-}
+};
interface XPathEvaluator {
createExpression(expression: string, resolver: XPathNSResolver): XPathExpression;
@@ -13411,7 +13429,7 @@ interface XPathEvaluator {
declare var XPathEvaluator: {
prototype: XPathEvaluator;
new(): XPathEvaluator;
-}
+};
interface XPathExpression {
evaluate(contextNode: Node, type: number, result: XPathResult | null): XPathResult;
@@ -13420,7 +13438,7 @@ interface XPathExpression {
declare var XPathExpression: {
prototype: XPathExpression;
new(): XPathExpression;
-}
+};
interface XPathNSResolver {
lookupNamespaceURI(prefix: string): string;
@@ -13429,7 +13447,7 @@ interface XPathNSResolver {
declare var XPathNSResolver: {
prototype: XPathNSResolver;
new(): XPathNSResolver;
-}
+};
interface XPathResult {
readonly booleanValue: boolean;
@@ -13466,7 +13484,7 @@ declare var XPathResult: {
readonly STRING_TYPE: number;
readonly UNORDERED_NODE_ITERATOR_TYPE: number;
readonly UNORDERED_NODE_SNAPSHOT_TYPE: number;
-}
+};
interface XSLTProcessor {
clearParameters(): void;
@@ -13482,17 +13500,7 @@ interface XSLTProcessor {
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;
@@ -13529,6 +13537,81 @@ interface ChildNode {
remove(): void;
}
+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 DOML2DeprecatedColorProperty {
color: string;
}
@@ -13537,81 +13620,6 @@ 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;
@@ -13656,16 +13664,16 @@ interface GlobalFetch {
interface HTMLTableAlignment {
/**
- * Sets or retrieves a value that you can use to implement your own ch functionality for the object.
- */
+ * 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.
- */
+ * 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.
- */
+ * Sets or retrieves how text and other content are vertically aligned within the object that contains them.
+ */
vAlign: string;
}
@@ -13890,38 +13898,38 @@ interface ImageBitmap {
interface URLSearchParams {
/**
- * Appends a specified key/value pair as a new search parameter.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Returns all the values association with a given search parameter.
+ */
getAll(name: string): string[];
/**
- * Returns a Boolean indicating if such a search parameter exists.
- */
+ * 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.
- */
+ * 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.
- */
+ * Constructor returning a URLSearchParams object.
+ */
new (init?: string | URLSearchParams): URLSearchParams;
-}
+};
interface NodeListOf<TNode extends Node> extends NodeList {
length: number;
@@ -14169,7 +14177,7 @@ interface ShadowRoot extends DocumentOrShadowRoot, DocumentFragment {
}
interface ShadowRootInit {
- mode: 'open'|'closed';
+ mode: "open" | "closed";
delegatesFocus?: boolean;
}
@@ -14219,68 +14227,68 @@ interface TouchEventInit extends EventModifierInit {
declare type EventListenerOrEventListenerObject = EventListener | EventListenerObject;
+interface DecodeErrorCallback {
+ (error: DOMException): void;
+}
+interface DecodeSuccessCallback {
+ (decodedData: AudioBuffer): void;
+}
interface ErrorEventHandler {
- (message: string, filename?: string, lineno?: number, colno?: number, error?:Error): void;
+ (message: string, filename?: string, lineno?: number, colno?: number, error?: Error): void;
}
-interface PositionCallback {
- (position: Position): void;
+interface ForEachCallback {
+ (keyId: any, status: MediaKeyStatus): void;
}
-interface PositionErrorCallback {
- (error: PositionError): void;
+interface FrameRequestCallback {
+ (time: number): void;
+}
+interface FunctionStringCallback {
+ (data: string): void;
+}
+interface IntersectionObserverCallback {
+ (entries: IntersectionObserverEntry[], observer: IntersectionObserver): void;
}
interface MediaQueryListListener {
(mql: MediaQueryList): void;
}
+interface MSExecAtPriorityFunctionCallback {
+ (...args: any[]): any;
+}
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 NavigatorUserMediaErrorCallback {
+ (error: MediaStreamError): void;
}
-interface DecodeErrorCallback {
- (error: DOMException): void;
+interface NavigatorUserMediaSuccessCallback {
+ (stream: MediaStream): void;
}
-interface VoidFunction {
- (): void;
+interface NotificationPermissionCallback {
+ (permission: NotificationPermission): void;
}
-interface RTCSessionDescriptionCallback {
- (sdp: RTCSessionDescription): void;
+interface PositionCallback {
+ (position: Position): void;
+}
+interface PositionErrorCallback {
+ (error: PositionError): void;
}
interface RTCPeerConnectionErrorCallback {
(error: DOMError): void;
}
+interface RTCSessionDescriptionCallback {
+ (sdp: RTCSessionDescription): 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 VoidFunction {
+ (): void;
}
interface HTMLElementTagNameMap {
"a": HTMLAnchorElement;
@@ -14368,48 +14376,27 @@ interface HTMLElementTagNameMap {
"xmp": HTMLPreElement;
}
-interface ElementTagNameMap {
- "a": HTMLAnchorElement;
+interface ElementTagNameMap extends HTMLElementTagNameMap {
"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;
@@ -14434,307 +14421,67 @@ interface ElementTagNameMap {
"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; };
+type ElementListTagNameMap = {
+ [key in keyof ElementTagNameMap]: NodeListOf<ElementTagNameMap[key]>
+};
+
+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;
@@ -14742,8 +14489,8 @@ 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 doNotTrack: string;
declare var event: Event | undefined;
declare var external: External;
declare var frameElement: Element;
@@ -14866,9 +14613,9 @@ declare var screenLeft: number;
declare var screenTop: number;
declare var screenX: number;
declare var screenY: number;
+declare var scrollbars: BarProp;
declare var scrollX: number;
declare var scrollY: number;
-declare var scrollbars: BarProp;
declare var self: Window;
declare var speechSynthesis: SpeechSynthesis;
declare var status: string;
@@ -14987,6 +14734,7 @@ type BufferSource = ArrayBuffer | ArrayBufferView;
type MouseWheelEvent = WheelEvent;
type ScrollRestoration = "auto" | "manual";
type FormDataEntryValue = string | File;
+type InsertPosition = "beforebegin" | "afterbegin" | "beforeend" | "afterend";
type AppendMode = "segments" | "sequence";
type AudioContextState = "suspended" | "running" | "closed";
type BiquadFilterType = "lowpass" | "highpass" | "bandpass" | "lowshelf" | "highshelf" | "peaking" | "notch" | "allpass";
@@ -15000,6 +14748,12 @@ type IDBCursorDirection = "next" | "nextunique" | "prev" | "prevunique";
type IDBRequestReadyState = "pending" | "done";
type IDBTransactionMode = "readonly" | "readwrite" | "versionchange";
type ListeningState = "inactive" | "active" | "disambiguation";
+type MediaDeviceKind = "audioinput" | "audiooutput" | "videoinput";
+type MediaKeyMessageType = "license-request" | "license-renewal" | "license-release" | "individualization-request";
+type MediaKeySessionType = "temporary" | "persistent-license" | "persistent-release-message";
+type MediaKeysRequirement = "required" | "optional" | "not-allowed";
+type MediaKeyStatus = "usable" | "expired" | "output-downscaled" | "output-not-allowed" | "status-pending" | "internal-error";
+type MediaStreamTrackState = "live" | "ended";
type MSCredentialType = "FIDO_2_0";
type MSIceAddrType = "os" | "stun" | "turn" | "peer-derived";
type MSIceType = "failed" | "direct" | "relay";
@@ -15007,12 +14761,6 @@ type MSStatsType = "description" | "localclientevent" | "inbound-network" | "out
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";
@@ -15024,6 +14772,14 @@ type PaymentComplete = "success" | "fail" | "";
type PaymentShippingType = "shipping" | "delivery" | "pickup";
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 RTCBundlePolicy = "balanced" | "max-compat" | "max-bundle";
type RTCDegradationPreference = "maintain-framerate" | "maintain-resolution" | "balanced";
type RTCDtlsRole = "auto" | "client" | "server";
@@ -15031,9 +14787,9 @@ 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 RTCIceGatherPolicy = "all" | "nohost" | "relay";
type RTCIceProtocol = "udp" | "tcp";
type RTCIceRole = "controlling" | "controlled";
type RTCIceTcpCandidateType = "active" | "passive" | "so";
@@ -15044,14 +14800,6 @@ type RTCSignalingState = "stable" | "have-local-offer" | "have-remote-offer" | "
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";
diff --git a/node_modules/typedoc/node_modules/typescript/lib/lib.webworker.d.ts b/node_modules/typedoc/node_modules/typescript/lib/lib.webworker.d.ts
index 4e7672f79..997b007a8 100644
--- a/node_modules/typedoc/node_modules/typescript/lib/lib.webworker.d.ts
+++ b/node_modules/typedoc/node_modules/typescript/lib/lib.webworker.d.ts
@@ -20,7 +20,7 @@ and limitations under the License.
/////////////////////////////
-/// IE Worker APIs
+/// Worker APIs
/////////////////////////////
interface Algorithm {
@@ -28,16 +28,16 @@ interface Algorithm {
}
interface CacheQueryOptions {
- ignoreSearch?: boolean;
+ cacheName?: string;
ignoreMethod?: boolean;
+ ignoreSearch?: boolean;
ignoreVary?: boolean;
- cacheName?: string;
}
interface CloseEventInit extends EventInit {
- wasClean?: boolean;
code?: number;
reason?: string;
+ wasClean?: boolean;
}
interface EventInit {
@@ -69,16 +69,16 @@ interface MessageEventInit extends EventInit {
channel?: string;
data?: any;
origin?: string;
- source?: any;
ports?: MessagePort[];
+ source?: any;
}
interface NotificationOptions {
+ body?: string;
dir?: NotificationDirection;
+ icon?: string;
lang?: string;
- body?: string;
tag?: string;
- icon?: string;
}
interface ObjectURLOptions {
@@ -86,29 +86,29 @@ interface ObjectURLOptions {
}
interface PushSubscriptionOptionsInit {
- userVisibleOnly?: boolean;
applicationServerKey?: any;
+ userVisibleOnly?: boolean;
}
interface RequestInit {
- method?: string;
- headers?: any;
body?: any;
- referrer?: string;
- referrerPolicy?: ReferrerPolicy;
- mode?: RequestMode;
- credentials?: RequestCredentials;
cache?: RequestCache;
- redirect?: RequestRedirect;
+ credentials?: RequestCredentials;
+ headers?: any;
integrity?: string;
keepalive?: boolean;
+ method?: string;
+ mode?: RequestMode;
+ redirect?: RequestRedirect;
+ referrer?: string;
+ referrerPolicy?: ReferrerPolicy;
window?: any;
}
interface ResponseInit {
+ headers?: any;
status?: number;
statusText?: string;
- headers?: any;
}
interface ClientQueryOptions {
@@ -176,7 +176,7 @@ interface AudioBuffer {
declare var AudioBuffer: {
prototype: AudioBuffer;
new(): AudioBuffer;
-}
+};
interface Blob {
readonly size: number;
@@ -189,7 +189,7 @@ interface Blob {
declare var Blob: {
prototype: Blob;
new (blobParts?: any[], options?: BlobPropertyBag): Blob;
-}
+};
interface Cache {
add(request: RequestInfo): Promise<void>;
@@ -204,7 +204,7 @@ interface Cache {
declare var Cache: {
prototype: Cache;
new(): Cache;
-}
+};
interface CacheStorage {
delete(cacheName: string): Promise<boolean>;
@@ -217,7 +217,7 @@ interface CacheStorage {
declare var CacheStorage: {
prototype: CacheStorage;
new(): CacheStorage;
-}
+};
interface CloseEvent extends Event {
readonly code: number;
@@ -229,7 +229,7 @@ interface CloseEvent extends Event {
declare var CloseEvent: {
prototype: CloseEvent;
new(typeArg: string, eventInitDict?: CloseEventInit): CloseEvent;
-}
+};
interface Console {
assert(test?: boolean, message?: string, ...optionalParams: any[]): void;
@@ -240,8 +240,8 @@ interface Console {
dirxml(value: any): void;
error(message?: any, ...optionalParams: any[]): void;
exception(message?: string, ...optionalParams: any[]): void;
- group(groupTitle?: string): void;
- groupCollapsed(groupTitle?: string): void;
+ group(groupTitle?: string, ...optionalParams: any[]): void;
+ groupCollapsed(groupTitle?: string, ...optionalParams: any[]): void;
groupEnd(): void;
info(message?: any, ...optionalParams: any[]): void;
log(message?: any, ...optionalParams: any[]): void;
@@ -259,7 +259,7 @@ interface Console {
declare var Console: {
prototype: Console;
new(): Console;
-}
+};
interface Coordinates {
readonly accuracy: number;
@@ -274,7 +274,7 @@ interface Coordinates {
declare var Coordinates: {
prototype: Coordinates;
new(): Coordinates;
-}
+};
interface CryptoKey {
readonly algorithm: KeyAlgorithm;
@@ -286,7 +286,7 @@ interface CryptoKey {
declare var CryptoKey: {
prototype: CryptoKey;
new(): CryptoKey;
-}
+};
interface DOMError {
readonly name: string;
@@ -296,7 +296,7 @@ interface DOMError {
declare var DOMError: {
prototype: DOMError;
new(): DOMError;
-}
+};
interface DOMException {
readonly code: number;
@@ -316,10 +316,10 @@ interface DOMException {
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 NOT_FOUND_ERR: number;
+ readonly NOT_SUPPORTED_ERR: number;
readonly PARSE_ERR: number;
readonly QUOTA_EXCEEDED_ERR: number;
readonly SECURITY_ERR: number;
@@ -348,10 +348,10 @@ declare var DOMException: {
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 NOT_FOUND_ERR: number;
+ readonly NOT_SUPPORTED_ERR: number;
readonly PARSE_ERR: number;
readonly QUOTA_EXCEEDED_ERR: number;
readonly SECURITY_ERR: number;
@@ -362,7 +362,7 @@ declare var DOMException: {
readonly URL_MISMATCH_ERR: number;
readonly VALIDATION_ERR: number;
readonly WRONG_DOCUMENT_ERR: number;
-}
+};
interface DOMStringList {
readonly length: number;
@@ -374,7 +374,7 @@ interface DOMStringList {
declare var DOMStringList: {
prototype: DOMStringList;
new(): DOMStringList;
-}
+};
interface ErrorEvent extends Event {
readonly colno: number;
@@ -388,12 +388,12 @@ interface ErrorEvent extends Event {
declare var ErrorEvent: {
prototype: ErrorEvent;
new(type: string, errorEventInitDict?: ErrorEventInit): ErrorEvent;
-}
+};
interface Event {
readonly bubbles: boolean;
- cancelBubble: boolean;
readonly cancelable: boolean;
+ cancelBubble: boolean;
readonly currentTarget: EventTarget;
readonly defaultPrevented: boolean;
readonly eventPhase: number;
@@ -420,7 +420,7 @@ declare var Event: {
readonly AT_TARGET: number;
readonly BUBBLING_PHASE: number;
readonly CAPTURING_PHASE: number;
-}
+};
interface EventTarget {
addEventListener(type: string, listener?: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
@@ -431,7 +431,7 @@ interface EventTarget {
declare var EventTarget: {
prototype: EventTarget;
new(): EventTarget;
-}
+};
interface File extends Blob {
readonly lastModifiedDate: any;
@@ -442,7 +442,7 @@ interface File extends Blob {
declare var File: {
prototype: File;
new (parts: (ArrayBuffer | ArrayBufferView | Blob | string)[], filename: string, properties?: FilePropertyBag): File;
-}
+};
interface FileList {
readonly length: number;
@@ -453,7 +453,7 @@ interface FileList {
declare var FileList: {
prototype: FileList;
new(): FileList;
-}
+};
interface FileReader extends EventTarget, MSBaseReader {
readonly error: DOMError;
@@ -468,8 +468,17 @@ interface FileReader extends EventTarget, MSBaseReader {
declare var FileReader: {
prototype: FileReader;
new(): FileReader;
+};
+
+interface FormData {
+ append(name: string, value: string | Blob, fileName?: string): void;
}
+declare var FormData: {
+ prototype: FormData;
+ new(): FormData;
+};
+
interface Headers {
append(name: string, value: string): void;
delete(name: string): void;
@@ -482,7 +491,7 @@ interface Headers {
declare var Headers: {
prototype: Headers;
new(init?: any): Headers;
-}
+};
interface IDBCursor {
readonly direction: IDBCursorDirection;
@@ -506,7 +515,7 @@ declare var IDBCursor: {
readonly NEXT_NO_DUPLICATE: string;
readonly PREV: string;
readonly PREV_NO_DUPLICATE: string;
-}
+};
interface IDBCursorWithValue extends IDBCursor {
readonly value: any;
@@ -515,7 +524,7 @@ interface IDBCursorWithValue extends IDBCursor {
declare var IDBCursorWithValue: {
prototype: IDBCursorWithValue;
new(): IDBCursorWithValue;
-}
+};
interface IDBDatabaseEventMap {
"abort": Event;
@@ -532,7 +541,7 @@ interface IDBDatabase extends EventTarget {
close(): void;
createObjectStore(name: string, optionalParameters?: IDBObjectStoreParameters): IDBObjectStore;
deleteObjectStore(name: string): void;
- transaction(storeNames: string | string[], mode?: string): IDBTransaction;
+ transaction(storeNames: string | string[], mode?: IDBTransactionMode): 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;
@@ -541,7 +550,7 @@ interface IDBDatabase extends EventTarget {
declare var IDBDatabase: {
prototype: IDBDatabase;
new(): IDBDatabase;
-}
+};
interface IDBFactory {
cmp(first: any, second: any): number;
@@ -552,7 +561,7 @@ interface IDBFactory {
declare var IDBFactory: {
prototype: IDBFactory;
new(): IDBFactory;
-}
+};
interface IDBIndex {
keyPath: string | string[];
@@ -563,14 +572,14 @@ interface IDBIndex {
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;
+ openCursor(range?: IDBKeyRange | IDBValidKey, direction?: IDBCursorDirection): IDBRequest;
+ openKeyCursor(range?: IDBKeyRange | IDBValidKey, direction?: IDBCursorDirection): IDBRequest;
}
declare var IDBIndex: {
prototype: IDBIndex;
new(): IDBIndex;
-}
+};
interface IDBKeyRange {
readonly lower: any;
@@ -586,7 +595,7 @@ declare var IDBKeyRange: {
lowerBound(lower: any, open?: boolean): IDBKeyRange;
only(value: any): IDBKeyRange;
upperBound(upper: any, open?: boolean): IDBKeyRange;
-}
+};
interface IDBObjectStore {
readonly indexNames: DOMStringList;
@@ -602,14 +611,14 @@ interface IDBObjectStore {
deleteIndex(indexName: string): void;
get(key: any): IDBRequest;
index(name: string): IDBIndex;
- openCursor(range?: IDBKeyRange | IDBValidKey, direction?: string): IDBRequest;
+ openCursor(range?: IDBKeyRange | IDBValidKey, direction?: IDBCursorDirection): IDBRequest;
put(value: any, key?: IDBKeyRange | IDBValidKey): IDBRequest;
}
declare var IDBObjectStore: {
prototype: IDBObjectStore;
new(): IDBObjectStore;
-}
+};
interface IDBOpenDBRequestEventMap extends IDBRequestEventMap {
"blocked": Event;
@@ -626,7 +635,7 @@ interface IDBOpenDBRequest extends IDBRequest {
declare var IDBOpenDBRequest: {
prototype: IDBOpenDBRequest;
new(): IDBOpenDBRequest;
-}
+};
interface IDBRequestEventMap {
"error": Event;
@@ -634,7 +643,7 @@ interface IDBRequestEventMap {
}
interface IDBRequest extends EventTarget {
- readonly error: DOMError;
+ readonly error: DOMException;
onerror: (this: IDBRequest, ev: Event) => any;
onsuccess: (this: IDBRequest, ev: Event) => any;
readonly readyState: IDBRequestReadyState;
@@ -648,7 +657,7 @@ interface IDBRequest extends EventTarget {
declare var IDBRequest: {
prototype: IDBRequest;
new(): IDBRequest;
-}
+};
interface IDBTransactionEventMap {
"abort": Event;
@@ -658,7 +667,7 @@ interface IDBTransactionEventMap {
interface IDBTransaction extends EventTarget {
readonly db: IDBDatabase;
- readonly error: DOMError;
+ readonly error: DOMException;
readonly mode: IDBTransactionMode;
onabort: (this: IDBTransaction, ev: Event) => any;
oncomplete: (this: IDBTransaction, ev: Event) => any;
@@ -678,7 +687,7 @@ declare var IDBTransaction: {
readonly READ_ONLY: string;
readonly READ_WRITE: string;
readonly VERSION_CHANGE: string;
-}
+};
interface IDBVersionChangeEvent extends Event {
readonly newVersion: number | null;
@@ -688,7 +697,7 @@ interface IDBVersionChangeEvent extends Event {
declare var IDBVersionChangeEvent: {
prototype: IDBVersionChangeEvent;
new(): IDBVersionChangeEvent;
-}
+};
interface ImageData {
data: Uint8ClampedArray;
@@ -700,7 +709,7 @@ declare var ImageData: {
prototype: ImageData;
new(width: number, height: number): ImageData;
new(array: Uint8ClampedArray, width: number, height: number): ImageData;
-}
+};
interface MessageChannel {
readonly port1: MessagePort;
@@ -710,7 +719,7 @@ interface MessageChannel {
declare var MessageChannel: {
prototype: MessageChannel;
new(): MessageChannel;
-}
+};
interface MessageEvent extends Event {
readonly data: any;
@@ -723,7 +732,7 @@ interface MessageEvent extends Event {
declare var MessageEvent: {
prototype: MessageEvent;
new(type: string, eventInitDict?: MessageEventInit): MessageEvent;
-}
+};
interface MessagePortEventMap {
"message": MessageEvent;
@@ -741,7 +750,7 @@ interface MessagePort extends EventTarget {
declare var MessagePort: {
prototype: MessagePort;
new(): MessagePort;
-}
+};
interface NotificationEventMap {
"click": Event;
@@ -771,7 +780,7 @@ declare var Notification: {
prototype: Notification;
new(title: string, options?: NotificationOptions): Notification;
requestPermission(callback?: NotificationPermissionCallback): Promise<NotificationPermission>;
-}
+};
interface Performance {
readonly navigation: PerformanceNavigation;
@@ -794,7 +803,7 @@ interface Performance {
declare var Performance: {
prototype: Performance;
new(): Performance;
-}
+};
interface PerformanceNavigation {
readonly redirectCount: number;
@@ -813,18 +822,18 @@ declare var PerformanceNavigation: {
readonly TYPE_NAVIGATE: number;
readonly TYPE_RELOAD: number;
readonly TYPE_RESERVED: number;
-}
+};
interface PerformanceTiming {
readonly connectEnd: number;
readonly connectStart: number;
+ readonly domainLookupEnd: number;
+ readonly domainLookupStart: 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;
@@ -844,7 +853,7 @@ interface PerformanceTiming {
declare var PerformanceTiming: {
prototype: PerformanceTiming;
new(): PerformanceTiming;
-}
+};
interface Position {
readonly coords: Coordinates;
@@ -854,7 +863,7 @@ interface Position {
declare var Position: {
prototype: Position;
new(): Position;
-}
+};
interface PositionError {
readonly code: number;
@@ -871,7 +880,7 @@ declare var PositionError: {
readonly PERMISSION_DENIED: number;
readonly POSITION_UNAVAILABLE: number;
readonly TIMEOUT: number;
-}
+};
interface ProgressEvent extends Event {
readonly lengthComputable: boolean;
@@ -883,7 +892,7 @@ interface ProgressEvent extends Event {
declare var ProgressEvent: {
prototype: ProgressEvent;
new(type: string, eventInitDict?: ProgressEventInit): ProgressEvent;
-}
+};
interface PushManager {
getSubscription(): Promise<PushSubscription>;
@@ -894,7 +903,7 @@ interface PushManager {
declare var PushManager: {
prototype: PushManager;
new(): PushManager;
-}
+};
interface PushSubscription {
readonly endpoint: USVString;
@@ -907,7 +916,7 @@ interface PushSubscription {
declare var PushSubscription: {
prototype: PushSubscription;
new(): PushSubscription;
-}
+};
interface PushSubscriptionOptions {
readonly applicationServerKey: ArrayBuffer | null;
@@ -917,7 +926,7 @@ interface PushSubscriptionOptions {
declare var PushSubscriptionOptions: {
prototype: PushSubscriptionOptions;
new(): PushSubscriptionOptions;
-}
+};
interface ReadableStream {
readonly locked: boolean;
@@ -928,7 +937,7 @@ interface ReadableStream {
declare var ReadableStream: {
prototype: ReadableStream;
new(): ReadableStream;
-}
+};
interface ReadableStreamReader {
cancel(): Promise<void>;
@@ -939,7 +948,7 @@ interface ReadableStreamReader {
declare var ReadableStreamReader: {
prototype: ReadableStreamReader;
new(): ReadableStreamReader;
-}
+};
interface Request extends Object, Body {
readonly cache: RequestCache;
@@ -961,7 +970,7 @@ interface Request extends Object, Body {
declare var Request: {
prototype: Request;
new(input: Request | string, init?: RequestInit): Request;
-}
+};
interface Response extends Object, Body {
readonly body: ReadableStream | null;
@@ -977,7 +986,9 @@ interface Response extends Object, Body {
declare var Response: {
prototype: Response;
new(body?: any, init?: ResponseInit): Response;
-}
+ error: () => Response;
+ redirect: (url: string, status?: number) => Response;
+};
interface ServiceWorkerEventMap extends AbstractWorkerEventMap {
"statechange": Event;
@@ -995,7 +1006,7 @@ interface ServiceWorker extends EventTarget, AbstractWorker {
declare var ServiceWorker: {
prototype: ServiceWorker;
new(): ServiceWorker;
-}
+};
interface ServiceWorkerRegistrationEventMap {
"updatefound": Event;
@@ -1020,7 +1031,7 @@ interface ServiceWorkerRegistration extends EventTarget {
declare var ServiceWorkerRegistration: {
prototype: ServiceWorkerRegistration;
new(): ServiceWorkerRegistration;
-}
+};
interface SyncManager {
getTags(): any;
@@ -1030,7 +1041,7 @@ interface SyncManager {
declare var SyncManager: {
prototype: SyncManager;
new(): SyncManager;
-}
+};
interface URL {
hash: string;
@@ -1053,7 +1064,7 @@ declare var URL: {
new(url: string, base?: string): URL;
createObjectURL(object: any, options?: ObjectURLOptions): string;
revokeObjectURL(url: string): void;
-}
+};
interface WebSocketEventMap {
"close": CloseEvent;
@@ -1090,7 +1101,7 @@ declare var WebSocket: {
readonly CLOSING: number;
readonly CONNECTING: number;
readonly OPEN: number;
-}
+};
interface WorkerEventMap extends AbstractWorkerEventMap {
"message": MessageEvent;
@@ -1107,7 +1118,7 @@ interface Worker extends EventTarget, AbstractWorker {
declare var Worker: {
prototype: Worker;
new(stringUrl: string): Worker;
-}
+};
interface XMLHttpRequestEventMap extends XMLHttpRequestEventTargetEventMap {
"readystatechange": Event;
@@ -1153,7 +1164,7 @@ declare var XMLHttpRequest: {
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;
@@ -1163,7 +1174,7 @@ interface XMLHttpRequestUpload extends EventTarget, XMLHttpRequestEventTarget {
declare var XMLHttpRequestUpload: {
prototype: XMLHttpRequestUpload;
new(): XMLHttpRequestUpload;
-}
+};
interface AbstractWorkerEventMap {
"error": ErrorEvent;
@@ -1278,7 +1289,7 @@ interface Client {
declare var Client: {
prototype: Client;
new(): Client;
-}
+};
interface Clients {
claim(): Promise<void>;
@@ -1290,7 +1301,7 @@ interface Clients {
declare var Clients: {
prototype: Clients;
new(): Clients;
-}
+};
interface DedicatedWorkerGlobalScopeEventMap extends WorkerGlobalScopeEventMap {
"message": MessageEvent;
@@ -1307,7 +1318,7 @@ interface DedicatedWorkerGlobalScope extends WorkerGlobalScope {
declare var DedicatedWorkerGlobalScope: {
prototype: DedicatedWorkerGlobalScope;
new(): DedicatedWorkerGlobalScope;
-}
+};
interface ExtendableEvent extends Event {
waitUntil(f: Promise<any>): void;
@@ -1316,7 +1327,7 @@ interface ExtendableEvent extends Event {
declare var ExtendableEvent: {
prototype: ExtendableEvent;
new(type: string, eventInitDict?: ExtendableEventInit): ExtendableEvent;
-}
+};
interface ExtendableMessageEvent extends ExtendableEvent {
readonly data: any;
@@ -1329,7 +1340,7 @@ interface ExtendableMessageEvent extends ExtendableEvent {
declare var ExtendableMessageEvent: {
prototype: ExtendableMessageEvent;
new(type: string, eventInitDict?: ExtendableMessageEventInit): ExtendableMessageEvent;
-}
+};
interface FetchEvent extends ExtendableEvent {
readonly clientId: string | null;
@@ -1341,7 +1352,7 @@ interface FetchEvent extends ExtendableEvent {
declare var FetchEvent: {
prototype: FetchEvent;
new(type: string, eventInitDict: FetchEventInit): FetchEvent;
-}
+};
interface FileReaderSync {
readAsArrayBuffer(blob: Blob): any;
@@ -1353,7 +1364,7 @@ interface FileReaderSync {
declare var FileReaderSync: {
prototype: FileReaderSync;
new(): FileReaderSync;
-}
+};
interface NotificationEvent extends ExtendableEvent {
readonly action: string;
@@ -1363,7 +1374,7 @@ interface NotificationEvent extends ExtendableEvent {
declare var NotificationEvent: {
prototype: NotificationEvent;
new(type: string, eventInitDict: NotificationEventInit): NotificationEvent;
-}
+};
interface PushEvent extends ExtendableEvent {
readonly data: PushMessageData | null;
@@ -1372,7 +1383,7 @@ interface PushEvent extends ExtendableEvent {
declare var PushEvent: {
prototype: PushEvent;
new(type: string, eventInitDict?: PushEventInit): PushEvent;
-}
+};
interface PushMessageData {
arrayBuffer(): ArrayBuffer;
@@ -1384,7 +1395,7 @@ interface PushMessageData {
declare var PushMessageData: {
prototype: PushMessageData;
new(): PushMessageData;
-}
+};
interface ServiceWorkerGlobalScopeEventMap extends WorkerGlobalScopeEventMap {
"activate": ExtendableEvent;
@@ -1418,7 +1429,7 @@ interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
declare var ServiceWorkerGlobalScope: {
prototype: ServiceWorkerGlobalScope;
new(): ServiceWorkerGlobalScope;
-}
+};
interface SyncEvent extends ExtendableEvent {
readonly lastChance: boolean;
@@ -1428,7 +1439,7 @@ interface SyncEvent extends ExtendableEvent {
declare var SyncEvent: {
prototype: SyncEvent;
new(type: string, init: SyncEventInit): SyncEvent;
-}
+};
interface WindowClient extends Client {
readonly focused: boolean;
@@ -1440,7 +1451,7 @@ interface WindowClient extends Client {
declare var WindowClient: {
prototype: WindowClient;
new(): WindowClient;
-}
+};
interface WorkerGlobalScopeEventMap {
"error": ErrorEvent;
@@ -1463,7 +1474,7 @@ interface WorkerGlobalScope extends EventTarget, WorkerUtils, WindowConsole, Glo
declare var WorkerGlobalScope: {
prototype: WorkerGlobalScope;
new(): WorkerGlobalScope;
-}
+};
interface WorkerLocation {
readonly hash: string;
@@ -1481,7 +1492,7 @@ interface WorkerLocation {
declare var WorkerLocation: {
prototype: WorkerLocation;
new(): WorkerLocation;
-}
+};
interface WorkerNavigator extends Object, NavigatorID, NavigatorOnLine, NavigatorBeacon, NavigatorConcurrentHardware {
readonly hardwareConcurrency: number;
@@ -1490,7 +1501,7 @@ interface WorkerNavigator extends Object, NavigatorID, NavigatorOnLine, Navigato
declare var WorkerNavigator: {
prototype: WorkerNavigator;
new(): WorkerNavigator;
-}
+};
interface WorkerUtils extends Object, WindowBase64 {
readonly indexedDB: IDBFactory;
@@ -1533,38 +1544,38 @@ interface ImageBitmap {
interface URLSearchParams {
/**
- * Appends a specified key/value pair as a new search parameter.
- */
+ * 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.
- */
+ * 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.
- */
+ * 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.
- */
+ * Returns all the values association with a given search parameter.
+ */
getAll(name: string): string[];
/**
- * Returns a Boolean indicating if such a search parameter exists.
- */
+ * 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.
- */
+ * 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.
- */
+ * Constructor returning a URLSearchParams object.
+ */
new (init?: string | URLSearchParams): URLSearchParams;
-}
+};
interface BlobPropertyBag {
type?: string;
@@ -1771,30 +1782,30 @@ interface AddEventListenerOptions extends EventListenerOptions {
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 DecodeErrorCallback {
+ (error: DOMException): void;
}
interface DecodeSuccessCallback {
(decodedData: AudioBuffer): void;
}
-interface DecodeErrorCallback {
- (error: DOMException): void;
-}
-interface FunctionStringCallback {
- (data: string): void;
+interface ErrorEventHandler {
+ (message: string, filename?: string, lineno?: number, colno?: number, error?: Error): void;
}
interface ForEachCallback {
(keyId: any, status: MediaKeyStatus): void;
}
+interface FunctionStringCallback {
+ (data: string): void;
+}
interface NotificationPermissionCallback {
(permission: NotificationPermission): void;
}
+interface PositionCallback {
+ (position: Position): void;
+}
+interface PositionErrorCallback {
+ (error: PositionError): void;
+}
declare var onmessage: (this: DedicatedWorkerGlobalScope, ev: MessageEvent) => any;
declare function close(): void;
declare function postMessage(message: any, transfer?: any[]): void;
diff --git a/node_modules/typedoc/node_modules/typescript/lib/protocol.d.ts b/node_modules/typedoc/node_modules/typescript/lib/protocol.d.ts
index 9e26197e2..55a0d7087 100644
--- a/node_modules/typedoc/node_modules/typescript/lib/protocol.d.ts
+++ b/node_modules/typedoc/node_modules/typescript/lib/protocol.d.ts
@@ -1,1894 +1,1979 @@
-/**
- * Declaration module describing the TypeScript Server protocol
- */
-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";
- }
- /**
- * A TypeScript Server message
- */
- interface Message {
- /**
- * Sequence number of the message
- */
- seq: number;
- /**
- * One of "request", "response", or "event"
- */
- type: "request" | "response" | "event";
- }
- /**
- * Client-initiated request message
- */
- interface Request extends Message {
- /**
- * The command to execute
- */
- command: string;
- /**
- * Object containing arguments for the command
- */
- arguments?: any;
- }
- /**
- * Request to reload the project structure for all the opened files
- */
- interface ReloadProjectsRequest extends Message {
- command: CommandTypes.ReloadProjects;
- }
- /**
- * Server-initiated event message
- */
- interface Event extends Message {
- /**
- * Name of event
- */
- event: string;
- /**
- * Event-specific information
- */
- body?: any;
- }
- /**
- * Response by server to client request message.
- */
- interface Response extends Message {
- /**
- * Sequence number of the request message.
- */
- request_seq: number;
- /**
- * Outcome of the request.
- */
- success: boolean;
- /**
- * The command requested.
- */
- command: string;
- /**
- * Contains error message if success === false.
- */
- message?: string;
- /**
- * Contains message body if success === true.
- */
- body?: any;
- }
- /**
- * Arguments for FileRequest messages.
- */
- interface FileRequestArgs {
- /**
- * The file for the request (absolute pathname required).
- */
- file: string;
- projectFileName?: string;
- }
- /**
- * Requests a JS Doc comment template for a given position
- */
- interface DocCommentTemplateRequest extends FileLocationRequest {
- command: CommandTypes.DocCommentTemplate;
- }
- /**
- * Response to DocCommentTemplateRequest
- */
- interface DocCommandTemplateResponse extends Response {
- body?: TextInsertion;
- }
- /**
- * A request to get TODO comments from the file
- */
- interface TodoCommentRequest extends FileRequest {
- command: CommandTypes.TodoComments;
- arguments: TodoCommentRequestArgs;
- }
- /**
- * Arguments for TodoCommentRequest request.
- */
- interface TodoCommentRequestArgs extends FileRequestArgs {
- /**
- * Array of target TodoCommentDescriptors that describes TODO comments to be found
- */
- descriptors: TodoCommentDescriptor[];
- }
- /**
- * Response for TodoCommentRequest request.
- */
- interface TodoCommentsResponse extends Response {
- body?: TodoComment[];
- }
- /**
- * A request to get indentation for a location in file
- */
- interface IndentationRequest extends FileLocationRequest {
- command: CommandTypes.Indentation;
- arguments: IndentationRequestArgs;
- }
- /**
- * Response for IndentationRequest request.
- */
- interface IndentationResponse extends Response {
- body?: IndentationResult;
- }
- /**
- * Indentation result representing where indentation should be placed
- */
- interface IndentationResult {
- /**
- * The base position in the document that the indent should be relative to
- */
- position: number;
- /**
- * The number of columns the indent should be at relative to the position's column.
- */
- indentation: number;
- }
- /**
- * Arguments for IndentationRequest request.
- */
- interface IndentationRequestArgs extends FileLocationRequestArgs {
- /**
- * An optional set of settings to be used when computing indentation.
- * If argument is omitted - then it will use settings for file that were previously set via 'configure' request or global settings.
- */
- options?: EditorSettings;
- }
- /**
- * Arguments for ProjectInfoRequest request.
- */
- interface ProjectInfoRequestArgs extends FileRequestArgs {
- /**
- * Indicate if the file name list of the project is needed
- */
- needFileNameList: boolean;
- }
- /**
- * A request to get the project information of the current file.
- */
- interface ProjectInfoRequest extends Request {
- command: CommandTypes.ProjectInfo;
- arguments: ProjectInfoRequestArgs;
- }
- /**
- * A request to retrieve compiler options diagnostics for a project
- */
- interface CompilerOptionsDiagnosticsRequest extends Request {
- arguments: CompilerOptionsDiagnosticsRequestArgs;
- }
- /**
- * Arguments for CompilerOptionsDiagnosticsRequest request.
- */
- interface CompilerOptionsDiagnosticsRequestArgs {
- /**
- * Name of the project to retrieve compiler options diagnostics.
- */
- projectFileName: string;
- }
- /**
- * 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
- */
- configFileName: string;
- /**
- * 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
- */
- languageServiceDisabled?: boolean;
- }
- /**
- * Represents diagnostic info that includes location of diagnostic in two forms
- * - start position and length of the error span
- * - startLocation and endLocation - a pair of Location objects that store start/end line and offset of the error span.
- */
- interface DiagnosticWithLinePosition {
- message: string;
- start: number;
- length: number;
- startLocation: Location;
- endLocation: Location;
- category: string;
- code: number;
- }
- /**
- * Response message for "projectInfo" request
- */
- interface ProjectInfoResponse extends Response {
- body?: ProjectInfo;
- }
- /**
- * 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.
- */
- interface FileLocationRequestArgs extends FileRequestArgs {
- /**
- * The line number for the request (1-based).
- */
- line: number;
- /**
- * The character offset (on the line) for the request (1-based).
- */
- offset: number;
- }
- /**
- * 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.
- */
- interface CodeFixRequestArgs extends FileRequestArgs {
- /**
- * The line number for the request (1-based).
- */
- startLine: number;
- /**
- * The character offset (on the line) for the request (1-based).
- */
- startOffset: number;
- /**
- * The line number for the request (1-based).
- */
- endLine: number;
- /**
- * The character offset (on the line) for the request (1-based).
- */
- endOffset: number;
- /**
- * Errorcodes we want to get the fixes for.
- */
- errorCodes?: number[];
- }
- /**
- * Response for GetCodeFixes request.
- */
- interface GetCodeFixesResponse extends Response {
- body?: CodeAction[];
- }
- /**
- * A request whose arguments specify a file location (file, line, col).
- */
- interface FileLocationRequest extends FileRequest {
- arguments: FileLocationRequestArgs;
- }
- /**
- * A request to get codes of supported code fixes.
- */
- interface GetSupportedCodeFixesRequest extends Request {
- command: CommandTypes.GetSupportedCodeFixes;
- }
- /**
- * A response for GetSupportedCodeFixesRequest request.
- */
- interface GetSupportedCodeFixesResponse extends Response {
- /**
- * List of error codes supported by the server.
- */
- body?: string[];
- }
- /**
- * Arguments for EncodedSemanticClassificationsRequest request.
- */
- interface EncodedSemanticClassificationsRequestArgs extends FileRequestArgs {
- /**
- * Start position of the span.
- */
- start: number;
- /**
- * Length of the span.
- */
- length: number;
- }
- /**
- * Arguments in document highlight request; include: filesToSearch, file,
- * line, offset.
- */
- interface DocumentHighlightsRequestArgs extends FileLocationRequestArgs {
- /**
- * List of files to search for document highlights.
- */
- 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.
- */
- 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.
- */
- 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.
- */
- interface ImplementationRequest extends FileLocationRequest {
- command: CommandTypes.Implementation;
- }
- /**
- * 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.
- */
- interface TextSpan {
- /**
- * First character of the definition.
- */
- start: Location;
- /**
- * 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.
- */
- interface FileSpan extends TextSpan {
- /**
- * File containing text span.
- */
- file: string;
- }
- /**
- * Definition response message. Gives text range for definition.
- */
- interface DefinitionResponse extends Response {
- body?: FileSpan[];
- }
- /**
- * Definition response message. Gives text range for definition.
- */
- interface TypeDefinitionResponse extends Response {
- body?: FileSpan[];
- }
- /**
- * Implementation response message. Gives text range for implementations.
- */
- interface ImplementationResponse extends Response {
- body?: FileSpan[];
- }
- /**
- * Request to get brace completion for a location in the file.
- */
- interface BraceCompletionRequest extends FileLocationRequest {
- command: CommandTypes.BraceCompletion;
- arguments: BraceCompletionRequestArgs;
- }
- /**
- * Argument for BraceCompletionRequest request.
- */
- interface BraceCompletionRequestArgs extends FileLocationRequestArgs {
- /**
- * Kind of opening brace
- */
- 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.
- */
- interface OccurrencesRequest extends FileLocationRequest {
- command: CommandTypes.Occurrences;
- }
- interface OccurrencesResponseItem extends FileSpan {
- /**
- * 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.
- */
- interface DocumentHighlightsRequest extends FileLocationRequest {
- command: CommandTypes.DocumentHighlights;
- arguments: DocumentHighlightsRequestArgs;
- }
- /**
- * Span augmented with extra information that denotes the kind of the highlighting to be used for span.
- * Kind is taken from HighlightSpanKind type.
- */
- interface HighlightSpan extends TextSpan {
- kind: string;
- }
- /**
- * Represents a set of highligh spans for a give name
- */
- interface DocumentHighlightsItem {
- /**
- * File containing highlight spans.
- */
- file: string;
- /**
- * Spans to highlight in file.
- */
- highlightSpans: HighlightSpan[];
- }
- /**
- * Response for a DocumentHighlightsRequest request.
- */
- interface DocumentHighlightsResponse extends Response {
- 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.
- */
- 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).
- */
- lineText: string;
- /**
- * True if reference is a write location, false otherwise.
- */
- isWriteAccess: boolean;
- /**
- * True if reference is a definition, false otherwise.
- */
- isDefinition: boolean;
- }
- /**
- * The body of a "references" response message.
- */
- interface ReferencesResponseBody {
- /**
- * The file locations referencing the symbol.
- */
- refs: ReferencesResponseItem[];
- /**
- * The name of the symbol.
- */
- symbolName: string;
- /**
- * The start character offset of the symbol (on the line provided by the references request).
- */
- symbolStartOffset: number;
- /**
- * The full display name of the symbol.
- */
- symbolDisplayString: string;
- }
- /**
- * Response to "references" request.
- */
- interface ReferencesResponse extends Response {
- body?: ReferencesResponseBody;
- }
- /**
- * Argument for RenameRequest request.
- */
- interface RenameRequestArgs extends FileLocationRequestArgs {
- /**
- * Should text at specified location be found/changed in comments?
- */
- findInComments?: boolean;
- /**
- * Should text at specified location be found/changed in strings?
- */
- 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.
- */
- interface RenameRequest extends FileLocationRequest {
- command: CommandTypes.Rename;
- arguments: RenameRequestArgs;
- }
- /**
- * Information about the item to be renamed.
- */
- interface RenameInfo {
- /**
- * True if item can be renamed.
- */
- canRename: boolean;
- /**
- * Error message if item can not be renamed.
- */
- localizedErrorMessage?: string;
- /**
- * Display name of the item to be renamed.
- */
- displayName: string;
- /**
- * Full display name of item to be renamed.
- */
- fullDisplayName: string;
- /**
- * The items's kind (such as 'className' or 'parameterName' or plain 'text').
- */
- kind: string;
- /**
- * Optional modifiers for the kind (such as 'public').
- */
- kindModifiers: string;
- }
- /**
- * A group of text spans, all in 'file'.
- */
- interface SpanGroup {
- /** The file to which the spans apply */
- file: string;
- /** The text spans in this group */
- locs: TextSpan[];
- }
- interface RenameResponseBody {
- /**
- * Information about the item to be renamed.
- */
- info: RenameInfo;
- /**
- * An array of span groups (one per file) that refer to the item to be renamed.
- */
- locs: SpanGroup[];
- }
- /**
- * Rename response message.
- */
- interface RenameResponse extends Response {
- body?: RenameResponseBody;
- }
- /**
- * 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 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.
- */
- interface ExternalFile {
- /**
- * Name of file file
- */
- fileName: string;
- /**
- * Script kind of the file
- */
- scriptKind?: ScriptKindName | ts.ScriptKind;
- /**
- * Whether file has mixed content (i.e. .cshtml file that combines html markup with C#/JavaScript)
- */
- hasMixedContent?: boolean;
- /**
- * Content of the file
- */
- content?: string;
- }
- /**
- * Represent an external project
- */
- interface ExternalProject {
- /**
- * Project name
- */
- projectFileName: string;
- /**
- * List of root files in project
- */
- rootFiles: ExternalFile[];
- /**
- * Compiler options for the project
- */
- options: ExternalProjectCompilerOptions;
- /**
- * @deprecated typingOptions. Use typeAcquisition instead
- */
- typingOptions?: TypeAcquisition;
- /**
- * Explicitly specified type acquisition for the project
- */
- typeAcquisition?: TypeAcquisition;
- }
- interface CompileOnSaveMixin {
- /**
- * If compile on save is enabled for the project
- */
- compileOnSave?: boolean;
- }
- /**
- * For external projects, some of the project settings are sent together with
- * compiler settings.
- */
- type ExternalProjectCompilerOptions = CompilerOptions & CompileOnSaveMixin;
- /**
- * Represents a set of changes that happen in project
- */
- interface ProjectChanges {
- /**
- * List of added files
- */
- added: string[];
- /**
- * List of removed files
- */
- removed: string[];
- /**
- * List of updated files
- */
- updated: string[];
- }
- /**
- * Information found in a configure request.
- */
- interface ConfigureRequestArguments {
- /**
- * 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.
- */
- 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.
- */
- interface ConfigureRequest extends Request {
- command: CommandTypes.Configure;
- arguments: ConfigureRequestArguments;
- }
- /**
- * 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.
- */
- 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.
- * Then the known content will be used upon opening instead of the disk copy
- */
- fileContent?: string;
- /**
- * Used to specify the script kind of the file explicitly. It could be one of the following:
- * "TS", "JS", "TSX", "JSX"
- */
- scriptKindName?: ScriptKindName;
- /**
- * Used to limit the searching for project config file. If given the searching will stop at this
- * root path; otherwise it will go all the way up to the dist root path.
- */
- projectRootPath?: string;
- }
- 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.
- */
- interface OpenRequest extends Request {
- command: CommandTypes.Open;
- arguments: OpenRequestArgs;
- }
- /**
- * Request to open or update external project
- */
- interface OpenExternalProjectRequest extends Request {
- command: CommandTypes.OpenExternalProject;
- arguments: OpenExternalProjectArgs;
- }
- /**
- * Arguments to OpenExternalProjectRequest request
- */
- type OpenExternalProjectArgs = ExternalProject;
- /**
- * Request to open multiple external projects
- */
- interface OpenExternalProjectsRequest extends Request {
- command: CommandTypes.OpenExternalProjects;
- arguments: OpenExternalProjectsArgs;
- }
- /**
- * Arguments to OpenExternalProjectsRequest
- */
- interface OpenExternalProjectsArgs {
- /**
- * List of external projects to open or update
- */
- projects: ExternalProject[];
- }
- /**
- * Response to OpenExternalProjectRequest request. This is just an acknowledgement, so
- * no body field is required.
- */
- interface OpenExternalProjectResponse extends Response {
- }
- /**
- * Response to OpenExternalProjectsRequest request. This is just an acknowledgement, so
- * no body field is required.
- */
- interface OpenExternalProjectsResponse extends Response {
- }
- /**
- * Request to close external project.
- */
- interface CloseExternalProjectRequest extends Request {
- command: CommandTypes.CloseExternalProject;
- arguments: CloseExternalProjectRequestArgs;
- }
- /**
- * Arguments to CloseExternalProjectRequest request
- */
- interface CloseExternalProjectRequestArgs {
- /**
- * Name of the project to close
- */
- projectFileName: string;
- }
- /**
- * Response to CloseExternalProjectRequest request. This is just an acknowledgement, so
- * no body field is required.
- */
- interface CloseExternalProjectResponse extends Response {
- }
- /**
- * Request to set compiler options for inferred projects.
- * External projects are opened / closed explicitly.
- * Configured projects are opened when user opens loose file that has 'tsconfig.json' or 'jsconfig.json' anywhere in one of containing folders.
- * This configuration file will be used to obtain a list of files and configuration settings for the project.
- * Inferred projects are created when user opens a loose file that is not the part of external project
- * or configured project and will contain only open file and transitive closure of referenced files if 'useOneInferredProject' is false,
- * or all open loose files and its transitive closure of referenced files if 'useOneInferredProject' is true.
- */
- interface SetCompilerOptionsForInferredProjectsRequest extends Request {
- command: CommandTypes.CompilerOptionsForInferredProjects;
- arguments: SetCompilerOptionsForInferredProjectsArgs;
- }
- /**
- * Argument for SetCompilerOptionsForInferredProjectsRequest request.
- */
- interface SetCompilerOptionsForInferredProjectsArgs {
- /**
- * Compiler options to be used with inferred projects.
- */
- options: ExternalProjectCompilerOptions;
- }
- /**
- * 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.
- */
- 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.
- */
- interface CloseRequest extends FileRequest {
- command: CommandTypes.Close;
- }
- /**
- * Request to obtain the list of files that should be regenerated if target file is recompiled.
- * NOTE: this us query-only operation and does not generate any output on disk.
- */
- interface CompileOnSaveAffectedFileListRequest extends FileRequest {
- command: CommandTypes.CompileOnSaveAffectedFileList;
- }
- /**
- * Contains a list of files that should be regenerated in a project
- */
- interface CompileOnSaveAffectedFileListSingleProject {
- /**
- * Project name
- */
- projectFileName: string;
- /**
- * 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;
- */
- interface CompileOnSaveAffectedFileListResponse extends Response {
- body: CompileOnSaveAffectedFileListSingleProject[];
- }
- /**
- * Request to recompile the file. All generated outputs (.js, .d.ts or .js.map files) is written on disk.
- */
- interface CompileOnSaveEmitFileRequest extends FileRequest {
- command: CommandTypes.CompileOnSaveEmitFile;
- arguments: CompileOnSaveEmitFileRequestArgs;
- }
- /**
- * Arguments for CompileOnSaveEmitFileRequest
- */
- interface CompileOnSaveEmitFileRequestArgs extends FileRequestArgs {
- /**
- * if true - then file should be recompiled even if it does not have any changes.
- */
- 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.
- */
- interface QuickInfoRequest extends FileLocationRequest {
- command: CommandTypes.Quickinfo;
- }
- /**
- * Body of QuickInfoResponse.
- */
- interface QuickInfoResponseBody {
- /**
- * The symbol's kind (such as 'className' or 'parameterName' or plain 'text').
- */
- kind: string;
- /**
- * Optional modifiers for the kind (such as 'public').
- */
- kindModifiers: string;
- /**
- * Starting file location of symbol.
- */
- start: Location;
- /**
- * One past last character of symbol.
- */
- end: Location;
- /**
- * Type and kind of symbol.
- */
- displayString: string;
- /**
- * Documentation associated with symbol.
- */
- documentation: string;
- /**
- * JSDoc tags associated with symbol.
- */
- tags: JSDocTagInfo[];
- }
- /**
- * Quickinfo response message.
- */
- interface QuickInfoResponse extends Response {
- body?: QuickInfoResponseBody;
- }
- /**
- * Arguments for format messages.
- */
- interface FormatRequestArgs extends FileLocationRequestArgs {
- /**
- * 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.
- */
- endOffset: number;
- /**
- * Format options to be used.
- */
- 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.
- */
- 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.
- */
- interface CodeEdit {
- /**
- * First character of the text span to edit.
- */
- start: Location;
- /**
- * 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).
- */
- newText: string;
- }
- interface FileCodeEdits {
- fileName: string;
- textChanges: CodeEdit[];
- }
- interface CodeFixResponse extends Response {
- /** The code actions that are available */
- body?: CodeAction[];
- }
- interface CodeAction {
- /** Description of the code action to display in the UI of the editor */
- description: string;
- /** Text changes to apply to each file as part of the code action */
- changes: FileCodeEdits[];
- }
- /**
- * Format and format on key response message.
- */
- interface FormatResponse extends Response {
- body?: CodeEdit[];
- }
- /**
- * Arguments for format on key messages.
- */
- interface FormatOnKeyRequestArgs extends FileLocationRequestArgs {
- /**
- * 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.
- */
- interface FormatOnKeyRequest extends FileLocationRequest {
- command: CommandTypes.Formatonkey;
- arguments: FormatOnKeyRequestArgs;
- }
- /**
- * Arguments for completions messages.
- */
- interface CompletionsRequestArgs extends FileLocationRequestArgs {
- /**
- * 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.
- */
- interface CompletionsRequest extends FileLocationRequest {
- command: CommandTypes.Completions;
- arguments: CompletionsRequestArgs;
- }
- /**
- * Arguments for completion details request.
- */
- interface CompletionDetailsRequestArgs extends FileLocationRequestArgs {
- /**
- * 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.
- */
- interface CompletionDetailsRequest extends FileLocationRequest {
- command: CommandTypes.CompletionDetails;
- arguments: CompletionDetailsRequestArgs;
- }
- /**
- * Part of a symbol description.
- */
- interface SymbolDisplayPart {
- /**
- * Text of an item describing the symbol.
- */
- text: string;
- /**
- * The symbol's kind (such as 'className' or 'parameterName' or plain 'text').
- */
- kind: string;
- }
- /**
- * An item found in a completion response.
- */
- interface CompletionEntry {
- /**
- * The symbol's name.
- */
- name: string;
- /**
- * The symbol's kind (such as 'className' or 'parameterName').
- */
- kind: string;
- /**
- * 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
- * is often the same as the name but may be different in certain circumstances.
- */
- sortText: string;
- /**
- * An optional span that indicates the text to be replaced by this completion item. If present,
- * this span should be used instead of the default one.
- */
- replacementSpan?: TextSpan;
- }
- /**
- * Additional completion entry details, available on demand
- */
- interface CompletionEntryDetails {
- /**
- * The symbol's name.
- */
- name: string;
- /**
- * The symbol's kind (such as 'className' or 'parameterName').
- */
- kind: string;
- /**
- * Optional modifiers for the kind (such as 'public').
- */
- kindModifiers: string;
- /**
- * Display parts of the symbol (similar to quick info).
- */
- displayParts: SymbolDisplayPart[];
- /**
- * Documentation strings for the symbol.
- */
- documentation: SymbolDisplayPart[];
- /**
- * JSDoc tags for the symbol.
- */
- tags: JSDocTagInfo[];
- }
- interface CompletionsResponse extends Response {
- body?: CompletionEntry[];
- }
- interface CompletionDetailsResponse extends Response {
- body?: CompletionEntryDetails[];
- }
- /**
- * Signature help information for a single parameter
- */
- interface SignatureHelpParameter {
- /**
- * The parameter's name
- */
- name: string;
- /**
- * Documentation of the parameter.
- */
- documentation: SymbolDisplayPart[];
- /**
- * Display parts of the parameter.
- */
- displayParts: SymbolDisplayPart[];
- /**
- * Whether the parameter is optional or not.
- */
- isOptional: boolean;
- }
- /**
- * Represents a single signature to show in signature help.
- */
- interface SignatureHelpItem {
- /**
- * Whether the signature accepts a variable number of arguments.
- */
- isVariadic: boolean;
- /**
- * The prefix display parts.
- */
- prefixDisplayParts: SymbolDisplayPart[];
- /**
- * The suffix display parts.
- */
- suffixDisplayParts: SymbolDisplayPart[];
- /**
- * The separator display parts.
- */
- separatorDisplayParts: SymbolDisplayPart[];
- /**
- * The signature helps items for the parameters.
- */
- parameters: SignatureHelpParameter[];
- /**
- * 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.
- */
- interface SignatureHelpItems {
- /**
- * The signature help items.
- */
- items: SignatureHelpItem[];
- /**
- * The span for which signature help should appear on a signature
- */
- applicableSpan: TextSpan;
- /**
- * The item selected in the set of available help items.
- */
- selectedItemIndex: number;
- /**
- * The argument selected in the set of parameters.
- */
- argumentIndex: number;
- /**
- * The argument count
- */
- argumentCount: number;
- }
- /**
- * Arguments of a signature help request.
- */
- interface SignatureHelpRequestArgs extends FileLocationRequestArgs {
- }
- /**
- * 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;
- }
- /**
- * Response object for a SignatureHelpRequest.
- */
- interface SignatureHelpResponse extends Response {
- body?: SignatureHelpItems;
- }
- /**
- * Synchronous request for semantic diagnostics of one file.
- */
- interface SemanticDiagnosticsSyncRequest extends FileRequest {
- command: CommandTypes.SemanticDiagnosticsSync;
- arguments: SemanticDiagnosticsSyncRequestArgs;
- }
- interface SemanticDiagnosticsSyncRequestArgs extends FileRequestArgs {
- includeLinePosition?: boolean;
- }
- /**
- * Response object for synchronous sematic diagnostics request.
- */
- interface SemanticDiagnosticsSyncResponse extends Response {
- body?: Diagnostic[] | DiagnosticWithLinePosition[];
- }
- /**
- * Synchronous request for syntactic diagnostics of one file.
- */
- interface SyntacticDiagnosticsSyncRequest extends FileRequest {
- command: CommandTypes.SyntacticDiagnosticsSync;
- arguments: SyntacticDiagnosticsSyncRequestArgs;
- }
- interface SyntacticDiagnosticsSyncRequestArgs extends FileRequestArgs {
- includeLinePosition?: boolean;
- }
- /**
- * Response object for synchronous syntactic diagnostics request.
- */
- interface SyntacticDiagnosticsSyncResponse extends Response {
- body?: Diagnostic[] | DiagnosticWithLinePosition[];
- }
- /**
- * Arguments for GeterrForProject request.
- */
- interface GeterrForProjectRequestArgs {
- /**
- * 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: number;
- }
- /**
- * 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.
- */
- interface GeterrRequestArgs {
- /**
- * 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: 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.
- */
- 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.
- */
- interface Diagnostic {
- /**
- * Starting file location at which text applies.
- */
- start: Location;
- /**
- * The last file location at which the text applies.
- */
- end: Location;
- /**
- * Text of diagnostic message.
- */
- text: string;
- /**
- * The category of the diagnostic message, e.g. "error" vs. "warning"
- */
- category: string;
- /**
- * The error code of the diagnostic message.
- */
- code?: number;
- /**
- * The name of the plugin reporting the message.
- */
- source?: string;
- }
- interface DiagnosticEventBody {
- /**
- * The file for which diagnostic information is reported.
- */
- file: string;
- /**
- * 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.
- */
- interface DiagnosticEvent extends Event {
- body?: DiagnosticEventBody;
- }
- interface ConfigFileDiagnosticEventBody {
- /**
- * The file which trigged the searching and error-checking of the config file
- */
- triggerFile: string;
- /**
- * The name of the found config file.
- */
- configFile: string;
- /**
- * An arry of diagnostic information items for the found config file.
- */
- diagnostics: Diagnostic[];
- }
- /**
- * Event message for "configFileDiag" event type.
- * This event provides errors for a found config file.
- */
- interface ConfigFileDiagnosticEvent extends Event {
- body?: ConfigFileDiagnosticEventBody;
- event: "configFileDiag";
- }
- type ProjectLanguageServiceStateEventName = "projectLanguageServiceState";
- interface ProjectLanguageServiceStateEvent extends Event {
- event: ProjectLanguageServiceStateEventName;
- body?: ProjectLanguageServiceStateEventBody;
- }
- interface ProjectLanguageServiceStateEventBody {
- /**
- * Project name that has changes in the state of language service.
- * For configured projects this will be the config file path.
- * For external projects this will be the name of the projects specified when project was open.
- * For inferred projects this event is not raised.
- */
- projectName: string;
- /**
- * True if language service state switched from disabled to enabled
- * and false otherwise.
- */
- languageServiceEnabled: boolean;
- }
- /**
- * Arguments for reload request.
- */
- interface ReloadRequestArgs extends FileRequestArgs {
- /**
- * 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.
- */
- interface ReloadRequest extends FileRequest {
- command: CommandTypes.Reload;
- arguments: ReloadRequestArgs;
- }
- /**
- * Response to "reload" request. This is just an acknowledgement, so
- * no body field is required.
- */
- interface ReloadResponse extends Response {
- }
- /**
- * Arguments for saveto request.
- */
- interface SavetoRequestArgs extends FileRequestArgs {
- /**
- * 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.
- */
- interface SavetoRequest extends FileRequest {
- command: CommandTypes.Saveto;
- arguments: SavetoRequestArgs;
- }
- /**
- * Arguments for navto request message.
- */
- interface NavtoRequestArgs extends FileRequestArgs {
- /**
- * 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.
- */
- maxResultCount?: number;
- /**
- * 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.
- */
- interface NavtoRequest extends FileRequest {
- command: CommandTypes.Navto;
- arguments: NavtoRequestArgs;
- }
- /**
- * An item found in a navto response.
- */
- interface NavtoItem {
- /**
- * The symbol's name.
- */
- name: string;
- /**
- * The symbol's kind (such as 'className' or 'parameterName').
- */
- kind: string;
- /**
- * exact, substring, or prefix.
- */
- matchKind?: string;
- /**
- * If this was a case sensitive or insensitive match.
- */
- isCaseSensitive?: boolean;
- /**
- * Optional modifiers for the kind (such as 'public').
- */
- kindModifiers?: string;
- /**
- * The file in which the symbol is found.
- */
- file: string;
- /**
- * The location within file at which the symbol is found.
- */
- start: Location;
- /**
- * 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.
- */
- containerName?: string;
- /**
- * 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.
- */
- interface NavtoResponse extends Response {
- body?: NavtoItem[];
- }
- /**
- * Arguments for change request message.
- */
- interface ChangeRequestArgs extends FormatRequestArgs {
- /**
- * 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.
- */
- interface ChangeRequest extends FileLocationRequest {
- command: CommandTypes.Change;
- arguments: ChangeRequestArgs;
- }
- /**
- * 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.
- */
- 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.
- */
- interface NavBarRequest extends FileRequest {
- command: CommandTypes.NavBar;
- }
- /**
- * NavTree request; value of command field is "navtree".
- * Return response giving the navigation tree of the requested file.
- */
- interface NavTreeRequest extends FileRequest {
- command: CommandTypes.NavTree;
- }
- interface NavigationBarItem {
- /**
- * The item's display text.
- */
- text: string;
- /**
- * The symbol's kind (such as 'className' or 'parameterName').
- */
- kind: string;
- /**
- * Optional modifiers for the kind (such as 'public').
- */
- kindModifiers?: string;
- /**
- * The definition locations of the item.
- */
- spans: TextSpan[];
- /**
- * Optional children.
- */
- childItems?: NavigationBarItem[];
- /**
- * 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 */
- 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 {
- /**
- * Comma separated list of installed typing packages
- */
- installedPackages: string;
- /**
- * true if install request succeeded, otherwise - false
- */
- installSuccess: boolean;
- /**
- * version of typings installer
- */
- 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[];
- }
- 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;
- alwaysStrict?: boolean;
- baseUrl?: string;
- charset?: string;
- checkJs?: boolean;
- declaration?: boolean;
- declarationDir?: string;
- disableSizeLimit?: boolean;
- downlevelIteration?: boolean;
- emitBOM?: boolean;
- emitDecoratorMetadata?: boolean;
- experimentalDecorators?: boolean;
- forceConsistentCasingInFileNames?: boolean;
- importHelpers?: 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;
- strict?: boolean;
- strictNullChecks?: boolean;
- suppressExcessPropertyErrors?: boolean;
- suppressImplicitAnyIndexErrors?: boolean;
- target?: ScriptTarget | ts.ScriptTarget;
- traceResolution?: boolean;
- types?: string[];
- /** Paths used to used to compute primary types search locations */
- 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";
- }
- type ScriptTarget = ScriptTarget.ES3 | ScriptTarget.ES5 | ScriptTarget.ES6 | ScriptTarget.ES2015;
-}
+/**
+ * Declaration module describing the TypeScript Server protocol
+ */
+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";
+ type GetApplicableRefactors = "getApplicableRefactors";
+ type GetRefactorCodeActions = "getRefactorCodeActions";
+ type GetEditsForRefactor = "getEditsForRefactor";
+ }
+ /**
+ * A TypeScript Server message
+ */
+ interface Message {
+ /**
+ * Sequence number of the message
+ */
+ seq: number;
+ /**
+ * One of "request", "response", or "event"
+ */
+ type: "request" | "response" | "event";
+ }
+ /**
+ * Client-initiated request message
+ */
+ interface Request extends Message {
+ /**
+ * The command to execute
+ */
+ command: string;
+ /**
+ * Object containing arguments for the command
+ */
+ arguments?: any;
+ }
+ /**
+ * Request to reload the project structure for all the opened files
+ */
+ interface ReloadProjectsRequest extends Message {
+ command: CommandTypes.ReloadProjects;
+ }
+ /**
+ * Server-initiated event message
+ */
+ interface Event extends Message {
+ /**
+ * Name of event
+ */
+ event: string;
+ /**
+ * Event-specific information
+ */
+ body?: any;
+ }
+ /**
+ * Response by server to client request message.
+ */
+ interface Response extends Message {
+ /**
+ * Sequence number of the request message.
+ */
+ request_seq: number;
+ /**
+ * Outcome of the request.
+ */
+ success: boolean;
+ /**
+ * The command requested.
+ */
+ command: string;
+ /**
+ * Contains error message if success === false.
+ */
+ message?: string;
+ /**
+ * Contains message body if success === true.
+ */
+ body?: any;
+ }
+ /**
+ * Arguments for FileRequest messages.
+ */
+ interface FileRequestArgs {
+ /**
+ * The file for the request (absolute pathname required).
+ */
+ file: string;
+ projectFileName?: string;
+ }
+ /**
+ * Requests a JS Doc comment template for a given position
+ */
+ interface DocCommentTemplateRequest extends FileLocationRequest {
+ command: CommandTypes.DocCommentTemplate;
+ }
+ /**
+ * Response to DocCommentTemplateRequest
+ */
+ interface DocCommandTemplateResponse extends Response {
+ body?: TextInsertion;
+ }
+ /**
+ * A request to get TODO comments from the file
+ */
+ interface TodoCommentRequest extends FileRequest {
+ command: CommandTypes.TodoComments;
+ arguments: TodoCommentRequestArgs;
+ }
+ /**
+ * Arguments for TodoCommentRequest request.
+ */
+ interface TodoCommentRequestArgs extends FileRequestArgs {
+ /**
+ * Array of target TodoCommentDescriptors that describes TODO comments to be found
+ */
+ descriptors: TodoCommentDescriptor[];
+ }
+ /**
+ * Response for TodoCommentRequest request.
+ */
+ interface TodoCommentsResponse extends Response {
+ body?: TodoComment[];
+ }
+ /**
+ * A request to get indentation for a location in file
+ */
+ interface IndentationRequest extends FileLocationRequest {
+ command: CommandTypes.Indentation;
+ arguments: IndentationRequestArgs;
+ }
+ /**
+ * Response for IndentationRequest request.
+ */
+ interface IndentationResponse extends Response {
+ body?: IndentationResult;
+ }
+ /**
+ * Indentation result representing where indentation should be placed
+ */
+ interface IndentationResult {
+ /**
+ * The base position in the document that the indent should be relative to
+ */
+ position: number;
+ /**
+ * The number of columns the indent should be at relative to the position's column.
+ */
+ indentation: number;
+ }
+ /**
+ * Arguments for IndentationRequest request.
+ */
+ interface IndentationRequestArgs extends FileLocationRequestArgs {
+ /**
+ * An optional set of settings to be used when computing indentation.
+ * If argument is omitted - then it will use settings for file that were previously set via 'configure' request or global settings.
+ */
+ options?: EditorSettings;
+ }
+ /**
+ * Arguments for ProjectInfoRequest request.
+ */
+ interface ProjectInfoRequestArgs extends FileRequestArgs {
+ /**
+ * Indicate if the file name list of the project is needed
+ */
+ needFileNameList: boolean;
+ }
+ /**
+ * A request to get the project information of the current file.
+ */
+ interface ProjectInfoRequest extends Request {
+ command: CommandTypes.ProjectInfo;
+ arguments: ProjectInfoRequestArgs;
+ }
+ /**
+ * A request to retrieve compiler options diagnostics for a project
+ */
+ interface CompilerOptionsDiagnosticsRequest extends Request {
+ arguments: CompilerOptionsDiagnosticsRequestArgs;
+ }
+ /**
+ * Arguments for CompilerOptionsDiagnosticsRequest request.
+ */
+ interface CompilerOptionsDiagnosticsRequestArgs {
+ /**
+ * Name of the project to retrieve compiler options diagnostics.
+ */
+ projectFileName: string;
+ }
+ /**
+ * 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
+ */
+ configFileName: string;
+ /**
+ * 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
+ */
+ languageServiceDisabled?: boolean;
+ }
+ /**
+ * Represents diagnostic info that includes location of diagnostic in two forms
+ * - start position and length of the error span
+ * - startLocation and endLocation - a pair of Location objects that store start/end line and offset of the error span.
+ */
+ interface DiagnosticWithLinePosition {
+ message: string;
+ start: number;
+ length: number;
+ startLocation: Location;
+ endLocation: Location;
+ category: string;
+ code: number;
+ }
+ /**
+ * Response message for "projectInfo" request
+ */
+ interface ProjectInfoResponse extends Response {
+ body?: ProjectInfo;
+ }
+ /**
+ * 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.
+ */
+ interface FileLocationRequestArgs extends FileRequestArgs {
+ /**
+ * The line number for the request (1-based).
+ */
+ line: number;
+ /**
+ * The character offset (on the line) for the request (1-based).
+ */
+ offset: number;
+ }
+ type FileLocationOrRangeRequestArgs = FileLocationRequestArgs | FileRangeRequestArgs;
+ /**
+ * Request refactorings at a given position or selection area.
+ */
+ interface GetApplicableRefactorsRequest extends Request {
+ command: CommandTypes.GetApplicableRefactors;
+ arguments: GetApplicableRefactorsRequestArgs;
+ }
+ type GetApplicableRefactorsRequestArgs = FileLocationOrRangeRequestArgs;
+ /**
+ * Response is a list of available refactorings.
+ * Each refactoring exposes one or more "Actions"; a user selects one action to invoke a refactoring
+ */
+ interface GetApplicableRefactorsResponse extends Response {
+ body?: ApplicableRefactorInfo[];
+ }
+ /**
+ * A set of one or more available refactoring actions, grouped under a parent refactoring.
+ */
+ interface ApplicableRefactorInfo {
+ /**
+ * The programmatic name of the refactoring
+ */
+ name: string;
+ /**
+ * A description of this refactoring category to show to the user.
+ * If the refactoring gets inlined (see below), this text will not be visible.
+ */
+ description: string;
+ /**
+ * Inlineable refactorings can have their actions hoisted out to the top level
+ * of a context menu. Non-inlineanable refactorings should always be shown inside
+ * their parent grouping.
+ *
+ * If not specified, this value is assumed to be 'true'
+ */
+ inlineable?: boolean;
+ actions: RefactorActionInfo[];
+ }
+ /**
+ * Represents a single refactoring action - for example, the "Extract Method..." refactor might
+ * offer several actions, each corresponding to a surround class or closure to extract into.
+ */
+ type RefactorActionInfo = {
+ /**
+ * The programmatic name of the refactoring action
+ */
+ name: string;
+ /**
+ * A description of this refactoring action to show to the user.
+ * If the parent refactoring is inlined away, this will be the only text shown,
+ * so this description should make sense by itself if the parent is inlineable=true
+ */
+ description: string;
+ };
+ interface GetEditsForRefactorRequest extends Request {
+ command: CommandTypes.GetEditsForRefactor;
+ arguments: GetEditsForRefactorRequestArgs;
+ }
+ /**
+ * Request the edits that a particular refactoring action produces.
+ * Callers must specify the name of the refactor and the name of the action.
+ */
+ type GetEditsForRefactorRequestArgs = FileLocationOrRangeRequestArgs & {
+ refactor: string;
+ action: string;
+ };
+ interface GetEditsForRefactorResponse extends Response {
+ body?: RefactorEditInfo;
+ }
+ type RefactorEditInfo = {
+ edits: FileCodeEdits[];
+ /**
+ * An optional location where the editor should start a rename operation once
+ * the refactoring edits have been applied
+ */
+ renameLocation?: Location;
+ renameFilename?: string;
+ };
+ /**
+ * Request for the available codefixes at a specific position.
+ */
+ interface CodeFixRequest extends Request {
+ command: CommandTypes.GetCodeFixes;
+ arguments: CodeFixRequestArgs;
+ }
+ interface FileRangeRequestArgs extends FileRequestArgs {
+ /**
+ * The line number for the request (1-based).
+ */
+ startLine: number;
+ /**
+ * The character offset (on the line) for the request (1-based).
+ */
+ startOffset: number;
+ /**
+ * The line number for the request (1-based).
+ */
+ endLine: number;
+ /**
+ * The character offset (on the line) for the request (1-based).
+ */
+ endOffset: number;
+ }
+ /**
+ * Instances of this interface specify errorcodes on a specific location in a sourcefile.
+ */
+ interface CodeFixRequestArgs extends FileRangeRequestArgs {
+ /**
+ * Errorcodes we want to get the fixes for.
+ */
+ errorCodes?: number[];
+ }
+ /**
+ * Response for GetCodeFixes request.
+ */
+ interface GetCodeFixesResponse extends Response {
+ body?: CodeAction[];
+ }
+ /**
+ * A request whose arguments specify a file location (file, line, col).
+ */
+ interface FileLocationRequest extends FileRequest {
+ arguments: FileLocationRequestArgs;
+ }
+ /**
+ * A request to get codes of supported code fixes.
+ */
+ interface GetSupportedCodeFixesRequest extends Request {
+ command: CommandTypes.GetSupportedCodeFixes;
+ }
+ /**
+ * A response for GetSupportedCodeFixesRequest request.
+ */
+ interface GetSupportedCodeFixesResponse extends Response {
+ /**
+ * List of error codes supported by the server.
+ */
+ body?: string[];
+ }
+ /**
+ * Arguments for EncodedSemanticClassificationsRequest request.
+ */
+ interface EncodedSemanticClassificationsRequestArgs extends FileRequestArgs {
+ /**
+ * Start position of the span.
+ */
+ start: number;
+ /**
+ * Length of the span.
+ */
+ length: number;
+ }
+ /**
+ * Arguments in document highlight request; include: filesToSearch, file,
+ * line, offset.
+ */
+ interface DocumentHighlightsRequestArgs extends FileLocationRequestArgs {
+ /**
+ * List of files to search for document highlights.
+ */
+ 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.
+ */
+ 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.
+ */
+ 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.
+ */
+ interface ImplementationRequest extends FileLocationRequest {
+ command: CommandTypes.Implementation;
+ }
+ /**
+ * 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.
+ */
+ interface TextSpan {
+ /**
+ * First character of the definition.
+ */
+ start: Location;
+ /**
+ * 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.
+ */
+ interface FileSpan extends TextSpan {
+ /**
+ * File containing text span.
+ */
+ file: string;
+ }
+ /**
+ * Definition response message. Gives text range for definition.
+ */
+ interface DefinitionResponse extends Response {
+ body?: FileSpan[];
+ }
+ /**
+ * Definition response message. Gives text range for definition.
+ */
+ interface TypeDefinitionResponse extends Response {
+ body?: FileSpan[];
+ }
+ /**
+ * Implementation response message. Gives text range for implementations.
+ */
+ interface ImplementationResponse extends Response {
+ body?: FileSpan[];
+ }
+ /**
+ * Request to get brace completion for a location in the file.
+ */
+ interface BraceCompletionRequest extends FileLocationRequest {
+ command: CommandTypes.BraceCompletion;
+ arguments: BraceCompletionRequestArgs;
+ }
+ /**
+ * Argument for BraceCompletionRequest request.
+ */
+ interface BraceCompletionRequestArgs extends FileLocationRequestArgs {
+ /**
+ * Kind of opening brace
+ */
+ 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.
+ */
+ interface OccurrencesRequest extends FileLocationRequest {
+ command: CommandTypes.Occurrences;
+ }
+ interface OccurrencesResponseItem extends FileSpan {
+ /**
+ * 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.
+ */
+ interface DocumentHighlightsRequest extends FileLocationRequest {
+ command: CommandTypes.DocumentHighlights;
+ arguments: DocumentHighlightsRequestArgs;
+ }
+ /**
+ * Span augmented with extra information that denotes the kind of the highlighting to be used for span.
+ * Kind is taken from HighlightSpanKind type.
+ */
+ interface HighlightSpan extends TextSpan {
+ kind: string;
+ }
+ /**
+ * Represents a set of highligh spans for a give name
+ */
+ interface DocumentHighlightsItem {
+ /**
+ * File containing highlight spans.
+ */
+ file: string;
+ /**
+ * Spans to highlight in file.
+ */
+ highlightSpans: HighlightSpan[];
+ }
+ /**
+ * Response for a DocumentHighlightsRequest request.
+ */
+ interface DocumentHighlightsResponse extends Response {
+ 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.
+ */
+ 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).
+ */
+ lineText: string;
+ /**
+ * True if reference is a write location, false otherwise.
+ */
+ isWriteAccess: boolean;
+ /**
+ * True if reference is a definition, false otherwise.
+ */
+ isDefinition: boolean;
+ }
+ /**
+ * The body of a "references" response message.
+ */
+ interface ReferencesResponseBody {
+ /**
+ * The file locations referencing the symbol.
+ */
+ refs: ReferencesResponseItem[];
+ /**
+ * The name of the symbol.
+ */
+ symbolName: string;
+ /**
+ * The start character offset of the symbol (on the line provided by the references request).
+ */
+ symbolStartOffset: number;
+ /**
+ * The full display name of the symbol.
+ */
+ symbolDisplayString: string;
+ }
+ /**
+ * Response to "references" request.
+ */
+ interface ReferencesResponse extends Response {
+ body?: ReferencesResponseBody;
+ }
+ /**
+ * Argument for RenameRequest request.
+ */
+ interface RenameRequestArgs extends FileLocationRequestArgs {
+ /**
+ * Should text at specified location be found/changed in comments?
+ */
+ findInComments?: boolean;
+ /**
+ * Should text at specified location be found/changed in strings?
+ */
+ 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.
+ */
+ interface RenameRequest extends FileLocationRequest {
+ command: CommandTypes.Rename;
+ arguments: RenameRequestArgs;
+ }
+ /**
+ * Information about the item to be renamed.
+ */
+ interface RenameInfo {
+ /**
+ * True if item can be renamed.
+ */
+ canRename: boolean;
+ /**
+ * Error message if item can not be renamed.
+ */
+ localizedErrorMessage?: string;
+ /**
+ * Display name of the item to be renamed.
+ */
+ displayName: string;
+ /**
+ * Full display name of item to be renamed.
+ */
+ fullDisplayName: string;
+ /**
+ * The items's kind (such as 'className' or 'parameterName' or plain 'text').
+ */
+ kind: string;
+ /**
+ * Optional modifiers for the kind (such as 'public').
+ */
+ kindModifiers: string;
+ }
+ /**
+ * A group of text spans, all in 'file'.
+ */
+ interface SpanGroup {
+ /** The file to which the spans apply */
+ file: string;
+ /** The text spans in this group */
+ locs: TextSpan[];
+ }
+ interface RenameResponseBody {
+ /**
+ * Information about the item to be renamed.
+ */
+ info: RenameInfo;
+ /**
+ * An array of span groups (one per file) that refer to the item to be renamed.
+ */
+ locs: SpanGroup[];
+ }
+ /**
+ * Rename response message.
+ */
+ interface RenameResponse extends Response {
+ body?: RenameResponseBody;
+ }
+ /**
+ * 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 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.
+ */
+ interface ExternalFile {
+ /**
+ * Name of file file
+ */
+ fileName: string;
+ /**
+ * Script kind of the file
+ */
+ scriptKind?: ScriptKindName | ts.ScriptKind;
+ /**
+ * Whether file has mixed content (i.e. .cshtml file that combines html markup with C#/JavaScript)
+ */
+ hasMixedContent?: boolean;
+ /**
+ * Content of the file
+ */
+ content?: string;
+ }
+ /**
+ * Represent an external project
+ */
+ interface ExternalProject {
+ /**
+ * Project name
+ */
+ projectFileName: string;
+ /**
+ * List of root files in project
+ */
+ rootFiles: ExternalFile[];
+ /**
+ * Compiler options for the project
+ */
+ options: ExternalProjectCompilerOptions;
+ /**
+ * @deprecated typingOptions. Use typeAcquisition instead
+ */
+ typingOptions?: TypeAcquisition;
+ /**
+ * Explicitly specified type acquisition for the project
+ */
+ typeAcquisition?: TypeAcquisition;
+ }
+ interface CompileOnSaveMixin {
+ /**
+ * If compile on save is enabled for the project
+ */
+ compileOnSave?: boolean;
+ }
+ /**
+ * For external projects, some of the project settings are sent together with
+ * compiler settings.
+ */
+ type ExternalProjectCompilerOptions = CompilerOptions & CompileOnSaveMixin;
+ /**
+ * Represents a set of changes that happen in project
+ */
+ interface ProjectChanges {
+ /**
+ * List of added files
+ */
+ added: string[];
+ /**
+ * List of removed files
+ */
+ removed: string[];
+ /**
+ * List of updated files
+ */
+ updated: string[];
+ }
+ /**
+ * Information found in a configure request.
+ */
+ interface ConfigureRequestArguments {
+ /**
+ * 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.
+ */
+ 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.
+ */
+ interface ConfigureRequest extends Request {
+ command: CommandTypes.Configure;
+ arguments: ConfigureRequestArguments;
+ }
+ /**
+ * 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.
+ */
+ 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.
+ * Then the known content will be used upon opening instead of the disk copy
+ */
+ fileContent?: string;
+ /**
+ * Used to specify the script kind of the file explicitly. It could be one of the following:
+ * "TS", "JS", "TSX", "JSX"
+ */
+ scriptKindName?: ScriptKindName;
+ /**
+ * Used to limit the searching for project config file. If given the searching will stop at this
+ * root path; otherwise it will go all the way up to the dist root path.
+ */
+ projectRootPath?: string;
+ }
+ 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.
+ */
+ interface OpenRequest extends Request {
+ command: CommandTypes.Open;
+ arguments: OpenRequestArgs;
+ }
+ /**
+ * Request to open or update external project
+ */
+ interface OpenExternalProjectRequest extends Request {
+ command: CommandTypes.OpenExternalProject;
+ arguments: OpenExternalProjectArgs;
+ }
+ /**
+ * Arguments to OpenExternalProjectRequest request
+ */
+ type OpenExternalProjectArgs = ExternalProject;
+ /**
+ * Request to open multiple external projects
+ */
+ interface OpenExternalProjectsRequest extends Request {
+ command: CommandTypes.OpenExternalProjects;
+ arguments: OpenExternalProjectsArgs;
+ }
+ /**
+ * Arguments to OpenExternalProjectsRequest
+ */
+ interface OpenExternalProjectsArgs {
+ /**
+ * List of external projects to open or update
+ */
+ projects: ExternalProject[];
+ }
+ /**
+ * Response to OpenExternalProjectRequest request. This is just an acknowledgement, so
+ * no body field is required.
+ */
+ interface OpenExternalProjectResponse extends Response {
+ }
+ /**
+ * Response to OpenExternalProjectsRequest request. This is just an acknowledgement, so
+ * no body field is required.
+ */
+ interface OpenExternalProjectsResponse extends Response {
+ }
+ /**
+ * Request to close external project.
+ */
+ interface CloseExternalProjectRequest extends Request {
+ command: CommandTypes.CloseExternalProject;
+ arguments: CloseExternalProjectRequestArgs;
+ }
+ /**
+ * Arguments to CloseExternalProjectRequest request
+ */
+ interface CloseExternalProjectRequestArgs {
+ /**
+ * Name of the project to close
+ */
+ projectFileName: string;
+ }
+ /**
+ * Response to CloseExternalProjectRequest request. This is just an acknowledgement, so
+ * no body field is required.
+ */
+ interface CloseExternalProjectResponse extends Response {
+ }
+ /**
+ * Request to set compiler options for inferred projects.
+ * External projects are opened / closed explicitly.
+ * Configured projects are opened when user opens loose file that has 'tsconfig.json' or 'jsconfig.json' anywhere in one of containing folders.
+ * This configuration file will be used to obtain a list of files and configuration settings for the project.
+ * Inferred projects are created when user opens a loose file that is not the part of external project
+ * or configured project and will contain only open file and transitive closure of referenced files if 'useOneInferredProject' is false,
+ * or all open loose files and its transitive closure of referenced files if 'useOneInferredProject' is true.
+ */
+ interface SetCompilerOptionsForInferredProjectsRequest extends Request {
+ command: CommandTypes.CompilerOptionsForInferredProjects;
+ arguments: SetCompilerOptionsForInferredProjectsArgs;
+ }
+ /**
+ * Argument for SetCompilerOptionsForInferredProjectsRequest request.
+ */
+ interface SetCompilerOptionsForInferredProjectsArgs {
+ /**
+ * Compiler options to be used with inferred projects.
+ */
+ options: ExternalProjectCompilerOptions;
+ }
+ /**
+ * 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.
+ */
+ 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.
+ */
+ interface CloseRequest extends FileRequest {
+ command: CommandTypes.Close;
+ }
+ /**
+ * Request to obtain the list of files that should be regenerated if target file is recompiled.
+ * NOTE: this us query-only operation and does not generate any output on disk.
+ */
+ interface CompileOnSaveAffectedFileListRequest extends FileRequest {
+ command: CommandTypes.CompileOnSaveAffectedFileList;
+ }
+ /**
+ * Contains a list of files that should be regenerated in a project
+ */
+ interface CompileOnSaveAffectedFileListSingleProject {
+ /**
+ * Project name
+ */
+ projectFileName: string;
+ /**
+ * 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;
+ */
+ interface CompileOnSaveAffectedFileListResponse extends Response {
+ body: CompileOnSaveAffectedFileListSingleProject[];
+ }
+ /**
+ * Request to recompile the file. All generated outputs (.js, .d.ts or .js.map files) is written on disk.
+ */
+ interface CompileOnSaveEmitFileRequest extends FileRequest {
+ command: CommandTypes.CompileOnSaveEmitFile;
+ arguments: CompileOnSaveEmitFileRequestArgs;
+ }
+ /**
+ * Arguments for CompileOnSaveEmitFileRequest
+ */
+ interface CompileOnSaveEmitFileRequestArgs extends FileRequestArgs {
+ /**
+ * if true - then file should be recompiled even if it does not have any changes.
+ */
+ 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.
+ */
+ interface QuickInfoRequest extends FileLocationRequest {
+ command: CommandTypes.Quickinfo;
+ }
+ /**
+ * Body of QuickInfoResponse.
+ */
+ interface QuickInfoResponseBody {
+ /**
+ * The symbol's kind (such as 'className' or 'parameterName' or plain 'text').
+ */
+ kind: string;
+ /**
+ * Optional modifiers for the kind (such as 'public').
+ */
+ kindModifiers: string;
+ /**
+ * Starting file location of symbol.
+ */
+ start: Location;
+ /**
+ * One past last character of symbol.
+ */
+ end: Location;
+ /**
+ * Type and kind of symbol.
+ */
+ displayString: string;
+ /**
+ * Documentation associated with symbol.
+ */
+ documentation: string;
+ /**
+ * JSDoc tags associated with symbol.
+ */
+ tags: JSDocTagInfo[];
+ }
+ /**
+ * Quickinfo response message.
+ */
+ interface QuickInfoResponse extends Response {
+ body?: QuickInfoResponseBody;
+ }
+ /**
+ * Arguments for format messages.
+ */
+ interface FormatRequestArgs extends FileLocationRequestArgs {
+ /**
+ * 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.
+ */
+ endOffset: number;
+ /**
+ * Format options to be used.
+ */
+ 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.
+ */
+ 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.
+ */
+ interface CodeEdit {
+ /**
+ * First character of the text span to edit.
+ */
+ start: Location;
+ /**
+ * 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).
+ */
+ newText: string;
+ }
+ interface FileCodeEdits {
+ fileName: string;
+ textChanges: CodeEdit[];
+ }
+ interface CodeFixResponse extends Response {
+ /** The code actions that are available */
+ body?: CodeAction[];
+ }
+ interface CodeAction {
+ /** Description of the code action to display in the UI of the editor */
+ description: string;
+ /** Text changes to apply to each file as part of the code action */
+ changes: FileCodeEdits[];
+ }
+ /**
+ * Format and format on key response message.
+ */
+ interface FormatResponse extends Response {
+ body?: CodeEdit[];
+ }
+ /**
+ * Arguments for format on key messages.
+ */
+ interface FormatOnKeyRequestArgs extends FileLocationRequestArgs {
+ /**
+ * 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.
+ */
+ interface FormatOnKeyRequest extends FileLocationRequest {
+ command: CommandTypes.Formatonkey;
+ arguments: FormatOnKeyRequestArgs;
+ }
+ /**
+ * Arguments for completions messages.
+ */
+ interface CompletionsRequestArgs extends FileLocationRequestArgs {
+ /**
+ * 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.
+ */
+ interface CompletionsRequest extends FileLocationRequest {
+ command: CommandTypes.Completions;
+ arguments: CompletionsRequestArgs;
+ }
+ /**
+ * Arguments for completion details request.
+ */
+ interface CompletionDetailsRequestArgs extends FileLocationRequestArgs {
+ /**
+ * 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.
+ */
+ interface CompletionDetailsRequest extends FileLocationRequest {
+ command: CommandTypes.CompletionDetails;
+ arguments: CompletionDetailsRequestArgs;
+ }
+ /**
+ * Part of a symbol description.
+ */
+ interface SymbolDisplayPart {
+ /**
+ * Text of an item describing the symbol.
+ */
+ text: string;
+ /**
+ * The symbol's kind (such as 'className' or 'parameterName' or plain 'text').
+ */
+ kind: string;
+ }
+ /**
+ * An item found in a completion response.
+ */
+ interface CompletionEntry {
+ /**
+ * The symbol's name.
+ */
+ name: string;
+ /**
+ * The symbol's kind (such as 'className' or 'parameterName').
+ */
+ kind: string;
+ /**
+ * 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
+ * is often the same as the name but may be different in certain circumstances.
+ */
+ sortText: string;
+ /**
+ * An optional span that indicates the text to be replaced by this completion item. If present,
+ * this span should be used instead of the default one.
+ */
+ replacementSpan?: TextSpan;
+ }
+ /**
+ * Additional completion entry details, available on demand
+ */
+ interface CompletionEntryDetails {
+ /**
+ * The symbol's name.
+ */
+ name: string;
+ /**
+ * The symbol's kind (such as 'className' or 'parameterName').
+ */
+ kind: string;
+ /**
+ * Optional modifiers for the kind (such as 'public').
+ */
+ kindModifiers: string;
+ /**
+ * Display parts of the symbol (similar to quick info).
+ */
+ displayParts: SymbolDisplayPart[];
+ /**
+ * Documentation strings for the symbol.
+ */
+ documentation: SymbolDisplayPart[];
+ /**
+ * JSDoc tags for the symbol.
+ */
+ tags: JSDocTagInfo[];
+ }
+ interface CompletionsResponse extends Response {
+ body?: CompletionEntry[];
+ }
+ interface CompletionDetailsResponse extends Response {
+ body?: CompletionEntryDetails[];
+ }
+ /**
+ * Signature help information for a single parameter
+ */
+ interface SignatureHelpParameter {
+ /**
+ * The parameter's name
+ */
+ name: string;
+ /**
+ * Documentation of the parameter.
+ */
+ documentation: SymbolDisplayPart[];
+ /**
+ * Display parts of the parameter.
+ */
+ displayParts: SymbolDisplayPart[];
+ /**
+ * Whether the parameter is optional or not.
+ */
+ isOptional: boolean;
+ }
+ /**
+ * Represents a single signature to show in signature help.
+ */
+ interface SignatureHelpItem {
+ /**
+ * Whether the signature accepts a variable number of arguments.
+ */
+ isVariadic: boolean;
+ /**
+ * The prefix display parts.
+ */
+ prefixDisplayParts: SymbolDisplayPart[];
+ /**
+ * The suffix display parts.
+ */
+ suffixDisplayParts: SymbolDisplayPart[];
+ /**
+ * The separator display parts.
+ */
+ separatorDisplayParts: SymbolDisplayPart[];
+ /**
+ * The signature helps items for the parameters.
+ */
+ parameters: SignatureHelpParameter[];
+ /**
+ * 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.
+ */
+ interface SignatureHelpItems {
+ /**
+ * The signature help items.
+ */
+ items: SignatureHelpItem[];
+ /**
+ * The span for which signature help should appear on a signature
+ */
+ applicableSpan: TextSpan;
+ /**
+ * The item selected in the set of available help items.
+ */
+ selectedItemIndex: number;
+ /**
+ * The argument selected in the set of parameters.
+ */
+ argumentIndex: number;
+ /**
+ * The argument count
+ */
+ argumentCount: number;
+ }
+ /**
+ * Arguments of a signature help request.
+ */
+ interface SignatureHelpRequestArgs extends FileLocationRequestArgs {
+ }
+ /**
+ * 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;
+ }
+ /**
+ * Response object for a SignatureHelpRequest.
+ */
+ interface SignatureHelpResponse extends Response {
+ body?: SignatureHelpItems;
+ }
+ /**
+ * Synchronous request for semantic diagnostics of one file.
+ */
+ interface SemanticDiagnosticsSyncRequest extends FileRequest {
+ command: CommandTypes.SemanticDiagnosticsSync;
+ arguments: SemanticDiagnosticsSyncRequestArgs;
+ }
+ interface SemanticDiagnosticsSyncRequestArgs extends FileRequestArgs {
+ includeLinePosition?: boolean;
+ }
+ /**
+ * Response object for synchronous sematic diagnostics request.
+ */
+ interface SemanticDiagnosticsSyncResponse extends Response {
+ body?: Diagnostic[] | DiagnosticWithLinePosition[];
+ }
+ /**
+ * Synchronous request for syntactic diagnostics of one file.
+ */
+ interface SyntacticDiagnosticsSyncRequest extends FileRequest {
+ command: CommandTypes.SyntacticDiagnosticsSync;
+ arguments: SyntacticDiagnosticsSyncRequestArgs;
+ }
+ interface SyntacticDiagnosticsSyncRequestArgs extends FileRequestArgs {
+ includeLinePosition?: boolean;
+ }
+ /**
+ * Response object for synchronous syntactic diagnostics request.
+ */
+ interface SyntacticDiagnosticsSyncResponse extends Response {
+ body?: Diagnostic[] | DiagnosticWithLinePosition[];
+ }
+ /**
+ * Arguments for GeterrForProject request.
+ */
+ interface GeterrForProjectRequestArgs {
+ /**
+ * 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: number;
+ }
+ /**
+ * 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.
+ */
+ interface GeterrRequestArgs {
+ /**
+ * 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: 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.
+ */
+ 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.
+ */
+ interface Diagnostic {
+ /**
+ * Starting file location at which text applies.
+ */
+ start: Location;
+ /**
+ * The last file location at which the text applies.
+ */
+ end: Location;
+ /**
+ * Text of diagnostic message.
+ */
+ text: string;
+ /**
+ * The category of the diagnostic message, e.g. "error" vs. "warning"
+ */
+ category: string;
+ /**
+ * The error code of the diagnostic message.
+ */
+ code?: number;
+ /**
+ * The name of the plugin reporting the message.
+ */
+ source?: string;
+ }
+ interface DiagnosticEventBody {
+ /**
+ * The file for which diagnostic information is reported.
+ */
+ file: string;
+ /**
+ * 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.
+ */
+ interface DiagnosticEvent extends Event {
+ body?: DiagnosticEventBody;
+ }
+ interface ConfigFileDiagnosticEventBody {
+ /**
+ * The file which trigged the searching and error-checking of the config file
+ */
+ triggerFile: string;
+ /**
+ * The name of the found config file.
+ */
+ configFile: string;
+ /**
+ * An arry of diagnostic information items for the found config file.
+ */
+ diagnostics: Diagnostic[];
+ }
+ /**
+ * Event message for "configFileDiag" event type.
+ * This event provides errors for a found config file.
+ */
+ interface ConfigFileDiagnosticEvent extends Event {
+ body?: ConfigFileDiagnosticEventBody;
+ event: "configFileDiag";
+ }
+ type ProjectLanguageServiceStateEventName = "projectLanguageServiceState";
+ interface ProjectLanguageServiceStateEvent extends Event {
+ event: ProjectLanguageServiceStateEventName;
+ body?: ProjectLanguageServiceStateEventBody;
+ }
+ interface ProjectLanguageServiceStateEventBody {
+ /**
+ * Project name that has changes in the state of language service.
+ * For configured projects this will be the config file path.
+ * For external projects this will be the name of the projects specified when project was open.
+ * For inferred projects this event is not raised.
+ */
+ projectName: string;
+ /**
+ * True if language service state switched from disabled to enabled
+ * and false otherwise.
+ */
+ languageServiceEnabled: boolean;
+ }
+ /**
+ * Arguments for reload request.
+ */
+ interface ReloadRequestArgs extends FileRequestArgs {
+ /**
+ * 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.
+ */
+ interface ReloadRequest extends FileRequest {
+ command: CommandTypes.Reload;
+ arguments: ReloadRequestArgs;
+ }
+ /**
+ * Response to "reload" request. This is just an acknowledgement, so
+ * no body field is required.
+ */
+ interface ReloadResponse extends Response {
+ }
+ /**
+ * Arguments for saveto request.
+ */
+ interface SavetoRequestArgs extends FileRequestArgs {
+ /**
+ * 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.
+ */
+ interface SavetoRequest extends FileRequest {
+ command: CommandTypes.Saveto;
+ arguments: SavetoRequestArgs;
+ }
+ /**
+ * Arguments for navto request message.
+ */
+ interface NavtoRequestArgs extends FileRequestArgs {
+ /**
+ * 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.
+ */
+ maxResultCount?: number;
+ /**
+ * 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.
+ */
+ interface NavtoRequest extends FileRequest {
+ command: CommandTypes.Navto;
+ arguments: NavtoRequestArgs;
+ }
+ /**
+ * An item found in a navto response.
+ */
+ interface NavtoItem {
+ /**
+ * The symbol's name.
+ */
+ name: string;
+ /**
+ * The symbol's kind (such as 'className' or 'parameterName').
+ */
+ kind: string;
+ /**
+ * exact, substring, or prefix.
+ */
+ matchKind?: string;
+ /**
+ * If this was a case sensitive or insensitive match.
+ */
+ isCaseSensitive?: boolean;
+ /**
+ * Optional modifiers for the kind (such as 'public').
+ */
+ kindModifiers?: string;
+ /**
+ * The file in which the symbol is found.
+ */
+ file: string;
+ /**
+ * The location within file at which the symbol is found.
+ */
+ start: Location;
+ /**
+ * 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.
+ */
+ containerName?: string;
+ /**
+ * 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.
+ */
+ interface NavtoResponse extends Response {
+ body?: NavtoItem[];
+ }
+ /**
+ * Arguments for change request message.
+ */
+ interface ChangeRequestArgs extends FormatRequestArgs {
+ /**
+ * 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.
+ */
+ interface ChangeRequest extends FileLocationRequest {
+ command: CommandTypes.Change;
+ arguments: ChangeRequestArgs;
+ }
+ /**
+ * 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.
+ */
+ 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.
+ */
+ interface NavBarRequest extends FileRequest {
+ command: CommandTypes.NavBar;
+ }
+ /**
+ * NavTree request; value of command field is "navtree".
+ * Return response giving the navigation tree of the requested file.
+ */
+ interface NavTreeRequest extends FileRequest {
+ command: CommandTypes.NavTree;
+ }
+ interface NavigationBarItem {
+ /**
+ * The item's display text.
+ */
+ text: string;
+ /**
+ * The symbol's kind (such as 'className' or 'parameterName').
+ */
+ kind: string;
+ /**
+ * Optional modifiers for the kind (such as 'public').
+ */
+ kindModifiers?: string;
+ /**
+ * The definition locations of the item.
+ */
+ spans: TextSpan[];
+ /**
+ * Optional children.
+ */
+ childItems?: NavigationBarItem[];
+ /**
+ * 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 */
+ 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 {
+ /**
+ * Comma separated list of installed typing packages
+ */
+ installedPackages: string;
+ /**
+ * true if install request succeeded, otherwise - false
+ */
+ installSuccess: boolean;
+ /**
+ * version of typings installer
+ */
+ 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[];
+ }
+ 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;
+ insertSpaceAfterTypeAssertion?: boolean;
+ insertSpaceBeforeFunctionParenthesis?: boolean;
+ placeOpenBraceOnNewLineForFunctions?: boolean;
+ placeOpenBraceOnNewLineForControlBlocks?: boolean;
+ }
+ interface CompilerOptions {
+ allowJs?: boolean;
+ allowSyntheticDefaultImports?: boolean;
+ allowUnreachableCode?: boolean;
+ allowUnusedLabels?: boolean;
+ alwaysStrict?: boolean;
+ baseUrl?: string;
+ charset?: string;
+ checkJs?: boolean;
+ declaration?: boolean;
+ declarationDir?: string;
+ disableSizeLimit?: boolean;
+ downlevelIteration?: boolean;
+ emitBOM?: boolean;
+ emitDecoratorMetadata?: boolean;
+ experimentalDecorators?: boolean;
+ forceConsistentCasingInFileNames?: boolean;
+ importHelpers?: 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;
+ strict?: boolean;
+ strictNullChecks?: boolean;
+ suppressExcessPropertyErrors?: boolean;
+ suppressImplicitAnyIndexErrors?: boolean;
+ target?: ScriptTarget | ts.ScriptTarget;
+ traceResolution?: boolean;
+ types?: string[];
+ /** Paths used to used to compute primary types search locations */
+ 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";
+ }
+ type ScriptTarget = ScriptTarget.ES3 | ScriptTarget.ES5 | ScriptTarget.ES6 | ScriptTarget.ES2015;
+}
declare namespace ts.server.protocol {
interface TextInsertion {
diff --git a/node_modules/typedoc/node_modules/typescript/lib/tsc.js b/node_modules/typedoc/node_modules/typescript/lib/tsc.js
index ce6130fb5..a613e1645 100644
--- a/node_modules/typedoc/node_modules/typescript/lib/tsc.js
+++ b/node_modules/typedoc/node_modules/typescript/lib/tsc.js
@@ -1,18 +1,18 @@
-/*! *****************************************************************************
-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.
+***************************************************************************** */
+
var ts;
(function (ts) {
var OperationCanceledException = (function () {
@@ -30,12 +30,20 @@ var ts;
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[NodeBuilderFlags["NoTruncation"] = 1] = "NoTruncation";
+ NodeBuilderFlags[NodeBuilderFlags["WriteArrayAsGenericType"] = 2] = "WriteArrayAsGenericType";
+ NodeBuilderFlags[NodeBuilderFlags["WriteTypeArgumentsOfSignature"] = 32] = "WriteTypeArgumentsOfSignature";
+ NodeBuilderFlags[NodeBuilderFlags["UseFullyQualifiedType"] = 64] = "UseFullyQualifiedType";
+ NodeBuilderFlags[NodeBuilderFlags["SuppressAnyReturnType"] = 256] = "SuppressAnyReturnType";
+ NodeBuilderFlags[NodeBuilderFlags["WriteTypeParametersInQualifiedName"] = 512] = "WriteTypeParametersInQualifiedName";
+ NodeBuilderFlags[NodeBuilderFlags["AllowThisInObjectLiteral"] = 1024] = "AllowThisInObjectLiteral";
+ NodeBuilderFlags[NodeBuilderFlags["AllowQualifedNameInPlaceOfIdentifier"] = 2048] = "AllowQualifedNameInPlaceOfIdentifier";
+ NodeBuilderFlags[NodeBuilderFlags["AllowAnonymousIdentifier"] = 8192] = "AllowAnonymousIdentifier";
+ NodeBuilderFlags[NodeBuilderFlags["AllowEmptyUnionOrIntersection"] = 16384] = "AllowEmptyUnionOrIntersection";
+ NodeBuilderFlags[NodeBuilderFlags["AllowEmptyTuple"] = 32768] = "AllowEmptyTuple";
+ NodeBuilderFlags[NodeBuilderFlags["IgnoreErrors"] = 60416] = "IgnoreErrors";
+ NodeBuilderFlags[NodeBuilderFlags["InObjectTypeLiteral"] = 1048576] = "InObjectTypeLiteral";
+ NodeBuilderFlags[NodeBuilderFlags["InTypeAlias"] = 8388608] = "InTypeAlias";
})(NodeBuilderFlags = ts.NodeBuilderFlags || (ts.NodeBuilderFlags = {}));
var TypeReferenceSerializationKind;
(function (TypeReferenceSerializationKind) {
@@ -70,6 +78,7 @@ var ts;
ModuleKind[ModuleKind["UMD"] = 3] = "UMD";
ModuleKind[ModuleKind["System"] = 4] = "System";
ModuleKind[ModuleKind["ES2015"] = 5] = "ES2015";
+ ModuleKind[ModuleKind["ESNext"] = 6] = "ESNext";
})(ModuleKind = ts.ModuleKind || (ts.ModuleKind = {}));
var Extension;
(function (Extension) {
@@ -142,7 +151,7 @@ var ts;
})(ts || (ts = {}));
var ts;
(function (ts) {
- ts.version = "2.3.2";
+ ts.version = "2.4.1";
})(ts || (ts = {}));
(function (ts) {
ts.collator = typeof Intl === "object" && typeof Intl.Collator === "function" ? new Intl.Collator(undefined, { usage: "sort", sensitivity: "accent" }) : undefined;
@@ -159,10 +168,11 @@ var ts;
ts.createMap = createMap;
function createMapFromTemplate(template) {
var map = new MapCtr();
- for (var key in template)
+ for (var key in template) {
if (hasOwnProperty.call(template, key)) {
map.set(key, template[key]);
}
+ }
return map;
}
ts.createMapFromTemplate = createMapFromTemplate;
@@ -315,6 +325,15 @@ var ts;
}
}
ts.zipWith = zipWith;
+ function zipToMap(keys, values) {
+ Debug.assert(keys.length === values.length);
+ var map = createMap();
+ for (var i = 0; i < keys.length; ++i) {
+ map.set(keys[i], values[i]);
+ }
+ return map;
+ }
+ ts.zipToMap = zipToMap;
function every(array, callback) {
if (array) {
for (var i = 0; i < array.length; i++) {
@@ -519,6 +538,40 @@ var ts;
return result;
}
ts.flatMap = flatMap;
+ function sameFlatMap(array, mapfn) {
+ var result;
+ if (array) {
+ for (var i = 0; i < array.length; i++) {
+ var item = array[i];
+ var mapped = mapfn(item, i);
+ if (result || item !== mapped || isArray(mapped)) {
+ if (!result) {
+ result = array.slice(0, i);
+ }
+ if (isArray(mapped)) {
+ addRange(result, mapped);
+ }
+ else {
+ result.push(mapped);
+ }
+ }
+ }
+ }
+ return result || array;
+ }
+ ts.sameFlatMap = sameFlatMap;
+ function mapDefined(array, mapFn) {
+ var result = [];
+ for (var i = 0; i < array.length; i++) {
+ var item = array[i];
+ var mapped = mapFn(item, i);
+ if (mapped !== undefined) {
+ result.push(mapped);
+ }
+ }
+ return result;
+ }
+ ts.mapDefined = mapDefined;
function span(array, f) {
if (array) {
for (var i = 0; i < array.length; i++) {
@@ -712,12 +765,21 @@ var ts;
return to;
}
ts.append = append;
- function addRange(to, from) {
+ function toOffset(array, offset) {
+ return offset < 0 ? array.length + offset : offset;
+ }
+ function addRange(to, from, start, end) {
if (from === undefined)
return to;
- for (var _i = 0, from_1 = from; _i < from_1.length; _i++) {
- var v = from_1[_i];
- to = append(to, v);
+ if (to === undefined)
+ return from.slice(start, end);
+ start = start === undefined ? 0 : toOffset(from, start);
+ end = end === undefined ? from.length : toOffset(from, end);
+ for (var i = start; i < end && i < from.length; i++) {
+ var v = from[i];
+ if (v !== undefined) {
+ to.push(from[i]);
+ }
}
return to;
}
@@ -740,16 +802,22 @@ var ts;
return true;
}
ts.rangeEquals = rangeEquals;
+ function elementAt(array, offset) {
+ if (array) {
+ offset = toOffset(array, offset);
+ if (offset < array.length) {
+ return array[offset];
+ }
+ }
+ return undefined;
+ }
+ ts.elementAt = elementAt;
function firstOrUndefined(array) {
- return array && array.length > 0
- ? array[0]
- : undefined;
+ return elementAt(array, 0);
}
ts.firstOrUndefined = firstOrUndefined;
function lastOrUndefined(array) {
- return array && array.length > 0
- ? array[array.length - 1]
- : undefined;
+ return elementAt(array, -1);
}
ts.lastOrUndefined = lastOrUndefined;
function singleOrUndefined(array) {
@@ -854,10 +922,11 @@ var ts;
ts.getProperty = getProperty;
function getOwnKeys(map) {
var keys = [];
- for (var key in map)
+ for (var key in map) {
if (hasOwnProperty.call(map, key)) {
keys.push(key);
}
+ }
return keys;
}
ts.getOwnKeys = getOwnKeys;
@@ -917,10 +986,11 @@ var ts;
}
for (var _a = 0, args_1 = args; _a < args_1.length; _a++) {
var arg = args_1[_a];
- for (var p in arg)
+ for (var p in arg) {
if (hasProperty(arg, p)) {
t[p] = arg[p];
}
+ }
}
return t;
}
@@ -930,18 +1000,20 @@ var ts;
return true;
if (!left || !right)
return false;
- for (var key in left)
+ for (var key in left) {
if (hasOwnProperty.call(left, key)) {
if (!hasOwnProperty.call(right, key) === undefined)
return false;
if (equalityComparer ? !equalityComparer(left[key], right[key]) : left[key] !== right[key])
return false;
}
- for (var key in right)
+ }
+ for (var key in right) {
if (hasOwnProperty.call(right, key)) {
if (!hasOwnProperty.call(left, key))
return false;
}
+ }
return true;
}
ts.equalOwnProperties = equalOwnProperties;
@@ -972,14 +1044,16 @@ var ts;
ts.clone = clone;
function extend(first, second) {
var result = {};
- for (var id in second)
+ for (var id in second) {
if (hasOwnProperty.call(second, id)) {
result[id] = second[id];
}
- for (var id in first)
+ }
+ for (var id in first) {
if (hasOwnProperty.call(first, id)) {
result[id] = first[id];
}
+ }
return result;
}
ts.extend = extend;
@@ -1013,6 +1087,16 @@ var ts;
return Array.isArray ? Array.isArray(value) : value instanceof Array;
}
ts.isArray = isArray;
+ function tryCast(value, test) {
+ return value !== undefined && test(value) ? value : undefined;
+ }
+ ts.tryCast = tryCast;
+ function cast(value, test) {
+ if (value !== undefined && test(value))
+ return value;
+ Debug.fail("Invalid cast. The supplied value did not pass the test '" + Debug.getFunctionName(test) + "'.");
+ }
+ ts.cast = cast;
function noop() { }
ts.noop = noop;
function notImplemented() {
@@ -1543,6 +1627,10 @@ var ts;
return str.lastIndexOf(prefix, 0) === 0;
}
ts.startsWith = startsWith;
+ function removePrefix(str, prefix) {
+ return startsWith(str, prefix) ? str.substr(prefix.length) : str;
+ }
+ ts.removePrefix = removePrefix;
function endsWith(str, suffix) {
var expectedPos = str.length - suffix.length;
return expectedPos >= 0 && str.indexOf(suffix, expectedPos) === expectedPos;
@@ -1556,7 +1644,7 @@ var ts;
return path.length > extension.length && endsWith(path, extension);
}
ts.fileExtensionIs = fileExtensionIs;
- function fileExtensionIsAny(path, extensions) {
+ function fileExtensionIsOneOf(path, extensions) {
for (var _i = 0, extensions_1 = extensions; _i < extensions_1.length; _i++) {
var extension = extensions_1[_i];
if (fileExtensionIs(path, extension)) {
@@ -1565,7 +1653,7 @@ var ts;
}
return false;
}
- ts.fileExtensionIsAny = fileExtensionIsAny;
+ ts.fileExtensionIsOneOf = fileExtensionIsOneOf;
var reservedCharacterPattern = /[^\w\s\/]/g;
var wildcardCharCodes = [42, 63];
var singleAsteriskRegexFragmentFiles = "([^./]|(\\.(?!min\\.js$))?)*";
@@ -1690,7 +1778,7 @@ var ts;
var _loop_1 = function (current) {
var name = combinePaths(path, current);
var absoluteName = combinePaths(absolutePath, current);
- if (extensions && !fileExtensionIsAny(name, extensions))
+ if (extensions && !fileExtensionIsOneOf(name, extensions))
return "continue";
if (excludeRegex && excludeRegex.test(absoluteName))
return "continue";
@@ -1870,8 +1958,11 @@ var ts;
this.name = name;
this.declarations = undefined;
}
- function Type(_checker, flags) {
+ function Type(checker, flags) {
this.flags = flags;
+ if (Debug.isDebugging) {
+ this.checker = checker;
+ }
}
function Signature() {
}
@@ -1886,6 +1977,11 @@ var ts;
this.parent = undefined;
this.original = undefined;
}
+ function SourceMapSource(fileName, text, skipTrivia) {
+ this.fileName = fileName;
+ this.text = text;
+ this.skipTrivia = skipTrivia || (function (pos) { return pos; });
+ }
ts.objectAllocator = {
getNodeConstructor: function () { return Node; },
getTokenConstructor: function () { return Node; },
@@ -1893,30 +1989,49 @@ var ts;
getSourceFileConstructor: function () { return Node; },
getSymbolConstructor: function () { return Symbol; },
getTypeConstructor: function () { return Type; },
- getSignatureConstructor: function () { return Signature; }
+ getSignatureConstructor: function () { return Signature; },
+ getSourceMapSourceConstructor: function () { return SourceMapSource; },
};
var Debug;
(function (Debug) {
Debug.currentAssertionLevel = 0;
+ Debug.isDebugging = false;
function shouldAssert(level) {
return Debug.currentAssertionLevel >= level;
}
Debug.shouldAssert = shouldAssert;
- function assert(expression, message, verboseDebugInfo) {
+ function assert(expression, message, verboseDebugInfo, stackCrawlMark) {
if (!expression) {
- var verboseDebugString = "";
if (verboseDebugInfo) {
- verboseDebugString = "\r\nVerbose Debug Information: " + verboseDebugInfo();
+ message += "\r\nVerbose Debug Information: " + verboseDebugInfo();
}
- debugger;
- throw new Error("Debug Failure. False expression: " + (message || "") + verboseDebugString);
+ fail(message ? "False expression: " + message : "False expression.", stackCrawlMark || assert);
}
}
Debug.assert = assert;
- function fail(message) {
- Debug.assert(false, message);
+ function fail(message, stackCrawlMark) {
+ debugger;
+ var e = new Error(message ? "Debug Failure. " : "Debug Failure.");
+ if (Error.captureStackTrace) {
+ Error.captureStackTrace(e, stackCrawlMark || fail);
+ }
+ throw e;
}
Debug.fail = fail;
+ function getFunctionName(func) {
+ if (typeof func !== "function") {
+ return "";
+ }
+ else if (func.hasOwnProperty("name")) {
+ return func.name;
+ }
+ else {
+ var text = Function.prototype.toString.call(func);
+ var match = /^function\s+([\w\$]+)\s*\(/.exec(text);
+ return match ? match[1] : "";
+ }
+ }
+ Debug.getFunctionName = getFunctionName;
})(Debug = ts.Debug || (ts.Debug = {}));
function orderedRemoveItem(array, item) {
for (var i = 0; i < array.length; i++) {
@@ -2338,6 +2453,7 @@ var ts;
realpath: function (path) {
return _fs.realpathSync(path);
},
+ debugMode: ts.some(process.execArgv, function (arg) { return /^--(inspect|debug)(-brk)?(=\d+)?$/i.test(arg); }),
tryEnableSourceMapsForHost: function () {
try {
require("source-map-support").install();
@@ -2416,6 +2532,9 @@ var ts;
? 1
: 0;
}
+ if (ts.sys && ts.sys.debugMode) {
+ ts.Debug.isDebugging = true;
+ }
})(ts || (ts = {}));
var ts;
(function (ts) {
@@ -2579,6 +2698,7 @@ var ts;
Line_terminator_not_permitted_before_arrow: { code: 1200, category: ts.DiagnosticCategory.Error, key: "Line_terminator_not_permitted_before_arrow_1200", message: "Line terminator not permitted before arrow." },
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: 1202, category: ts.DiagnosticCategory.Error, key: "Import_assignment_cannot_be_used_when_targeting_ECMAScript_2015_modules_Consider_using_import_Asteri_1202", message: "Import assignment cannot be used when targeting ECMAScript 2015 modules. Consider using 'import * as ns from \"mod\"', 'import {a} from \"mod\"', 'import d from \"mod\"', or another module format instead." },
Export_assignment_cannot_be_used_when_targeting_ECMAScript_2015_modules_Consider_using_export_default_or_another_module_format_instead: { code: 1203, category: ts.DiagnosticCategory.Error, key: "Export_assignment_cannot_be_used_when_targeting_ECMAScript_2015_modules_Consider_using_export_defaul_1203", message: "Export assignment cannot be used when targeting ECMAScript 2015 modules. Consider using 'export default' or another module format instead." },
+ Cannot_re_export_a_type_when_the_isolatedModules_flag_is_provided: { code: 1205, category: ts.DiagnosticCategory.Error, key: "Cannot_re_export_a_type_when_the_isolatedModules_flag_is_provided_1205", message: "Cannot re-export a type when the '--isolatedModules' flag is provided." },
Decorators_are_not_valid_here: { code: 1206, category: ts.DiagnosticCategory.Error, key: "Decorators_are_not_valid_here_1206", message: "Decorators are not valid here." },
Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name: { code: 1207, category: ts.DiagnosticCategory.Error, key: "Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name_1207", message: "Decorators cannot be applied to multiple get/set accessors of the same name." },
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." },
@@ -2640,6 +2760,10 @@ var ts;
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." },
+ Dynamic_import_cannot_be_used_when_targeting_ECMAScript_2015_modules: { code: 1323, category: ts.DiagnosticCategory.Error, key: "Dynamic_import_cannot_be_used_when_targeting_ECMAScript_2015_modules_1323", message: "Dynamic import cannot be used when targeting ECMAScript 2015 modules." },
+ Dynamic_import_must_have_one_specifier_as_an_argument: { code: 1324, category: ts.DiagnosticCategory.Error, key: "Dynamic_import_must_have_one_specifier_as_an_argument_1324", message: "Dynamic import must have one specifier as an argument." },
+ Specifier_of_dynamic_import_cannot_be_spread_element: { code: 1325, category: ts.DiagnosticCategory.Error, key: "Specifier_of_dynamic_import_cannot_be_spread_element_1325", message: "Specifier of dynamic import cannot be spread element." },
+ Dynamic_import_cannot_have_type_arguments: { code: 1326, category: ts.DiagnosticCategory.Error, key: "Dynamic_import_cannot_have_type_arguments_1326", message: "Dynamic import cannot have type arguments" },
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." },
@@ -2686,7 +2810,7 @@ var ts;
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." },
+ Call_target_does_not_contain_any_signatures: { code: 2346, category: ts.DiagnosticCategory.Error, key: "Call_target_does_not_contain_any_signatures_2346", message: "Call target does not contain any signatures." },
Untyped_function_calls_may_not_accept_type_arguments: { code: 2347, category: ts.DiagnosticCategory.Error, key: "Untyped_function_calls_may_not_accept_type_arguments_2347", message: "Untyped function calls may not accept type arguments." },
Value_of_type_0_is_not_callable_Did_you_mean_to_include_new: { code: 2348, category: ts.DiagnosticCategory.Error, key: "Value_of_type_0_is_not_callable_Did_you_mean_to_include_new_2348", message: "Value of type '{0}' is not callable. Did you mean to include 'new'?" },
Cannot_invoke_an_expression_whose_type_lacks_a_call_signature_Type_0_has_no_compatible_call_signatures: { code: 2349, category: ts.DiagnosticCategory.Error, key: "Cannot_invoke_an_expression_whose_type_lacks_a_call_signature_Type_0_has_no_compatible_call_signatur_2349", message: "Cannot invoke an expression whose type lacks a call signature. Type '{0}' has no compatible call signatures." },
@@ -2881,6 +3005,15 @@ var ts;
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." },
+ Property_0_does_not_exist_on_type_1_Did_you_mean_2: { code: 2551, category: ts.DiagnosticCategory.Error, key: "Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551", message: "Property '{0}' does not exist on type '{1}'. Did you mean '{2}'?" },
+ Cannot_find_name_0_Did_you_mean_1: { code: 2552, category: ts.DiagnosticCategory.Error, key: "Cannot_find_name_0_Did_you_mean_1_2552", message: "Cannot find name '{0}'. Did you mean '{1}'?" },
+ Computed_values_are_not_permitted_in_an_enum_with_string_valued_members: { code: 2553, category: ts.DiagnosticCategory.Error, key: "Computed_values_are_not_permitted_in_an_enum_with_string_valued_members_2553", message: "Computed values are not permitted in an enum with string valued members." },
+ Expected_0_arguments_but_got_1: { code: 2554, category: ts.DiagnosticCategory.Error, key: "Expected_0_arguments_but_got_1_2554", message: "Expected {0} arguments, but got {1}." },
+ Expected_at_least_0_arguments_but_got_1: { code: 2555, category: ts.DiagnosticCategory.Error, key: "Expected_at_least_0_arguments_but_got_1_2555", message: "Expected at least {0} arguments, but got {1}." },
+ Expected_0_arguments_but_got_a_minimum_of_1: { code: 2556, category: ts.DiagnosticCategory.Error, key: "Expected_0_arguments_but_got_a_minimum_of_1_2556", message: "Expected {0} arguments, but got a minimum of {1}." },
+ Expected_at_least_0_arguments_but_got_a_minimum_of_1: { code: 2557, category: ts.DiagnosticCategory.Error, key: "Expected_at_least_0_arguments_but_got_a_minimum_of_1_2557", message: "Expected at least {0} arguments, but got a minimum of {1}." },
+ Expected_0_type_arguments_but_got_1: { code: 2558, category: ts.DiagnosticCategory.Error, key: "Expected_0_type_arguments_but_got_1_2558", message: "Expected {0} type arguments, but got {1}." },
+ Type_0_has_no_properties_in_common_with_type_1: { code: 2559, category: ts.DiagnosticCategory.Error, key: "Type_0_has_no_properties_in_common_with_type_1_2559", message: "Type '{0}' has no properties in common with type '{1}'." },
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." },
@@ -2892,7 +3025,6 @@ var ts;
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}'." },
@@ -2951,6 +3083,8 @@ var ts;
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." },
_0_are_specified_twice_The_attribute_named_0_will_be_overwritten: { code: 2710, category: ts.DiagnosticCategory.Error, key: "_0_are_specified_twice_The_attribute_named_0_will_be_overwritten_2710", message: "'{0}' are specified twice. The attribute named '{0}' will be overwritten." },
+ A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option: { code: 2711, category: ts.DiagnosticCategory.Error, key: "A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES20_2711", message: "A dynamic import call returns a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your `--lib` option." },
+ A_dynamic_import_call_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: 2712, category: ts.DiagnosticCategory.Error, key: "A_dynamic_import_call_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declarat_2712", message: "A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option." },
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}'." },
@@ -3025,7 +3159,7 @@ var ts;
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." },
+ Property_0_of_exported_class_expression_may_not_be_private_or_protected: { code: 4094, category: ts.DiagnosticCategory.Error, key: "Property_0_of_exported_class_expression_may_not_be_private_or_protected_4094", message: "Property '{0}' of exported class expression may not be private or protected." },
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}'." },
@@ -3067,7 +3201,7 @@ var ts;
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_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'." },
+ Specify_module_code_generation_Colon_commonjs_amd_system_umd_es2015_or_ESNext: { code: 6016, category: ts.DiagnosticCategory.Message, key: "Specify_module_code_generation_Colon_commonjs_amd_system_umd_es2015_or_ESNext_6016", message: "Specify module code generation: 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'." },
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_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'." },
@@ -3176,6 +3310,7 @@ var ts;
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." },
+ Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1: { code: 6137, category: ts.DiagnosticCategory.Error, key: "Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1_6137", message: "Cannot import type declaration files. Consider importing '{0}' instead of '{1}'." },
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}'." },
@@ -3221,6 +3356,9 @@ var ts;
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}'" },
+ Reusing_resolution_of_module_0_to_file_1_from_old_program: { code: 6183, category: ts.DiagnosticCategory.Message, key: "Reusing_resolution_of_module_0_to_file_1_from_old_program_6183", message: "Reusing resolution of module '{0}' to file '{1}' from old program." },
+ Reusing_module_resolutions_originating_in_0_since_resolutions_are_unchanged_from_old_program: { code: 6184, category: ts.DiagnosticCategory.Message, key: "Reusing_module_resolutions_originating_in_0_since_resolutions_are_unchanged_from_old_program_6184", message: "Reusing module resolutions originating in '{0}' since resolutions are unchanged from old program." },
+ Disable_strict_checking_of_generic_signatures_in_function_types: { code: 6185, category: ts.DiagnosticCategory.Message, key: "Disable_strict_checking_of_generic_signatures_in_function_types_6185", message: "Disable strict checking of generic signatures in function types." },
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." },
@@ -3247,6 +3385,8 @@ var ts;
Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation: { code: 7032, category: ts.DiagnosticCategory.Error, key: "Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation_7032", message: "Property '{0}' implicitly has type 'any', because its set accessor lacks a parameter type annotation." },
Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation: { code: 7033, category: ts.DiagnosticCategory.Error, key: "Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation_7033", message: "Property '{0}' implicitly has type 'any', because its get accessor lacks a return type annotation." },
Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined: { code: 7034, category: ts.DiagnosticCategory.Error, key: "Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined_7034", message: "Variable '{0}' implicitly has type '{1}' in some locations where its type cannot be determined." },
+ Try_npm_install_types_Slash_0_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0: { code: 7035, category: ts.DiagnosticCategory.Error, key: "Try_npm_install_types_Slash_0_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_mod_7035", message: "Try `npm install @types/{0}` if it exists or add a new declaration (.d.ts) file containing `declare module '{0}';`" },
+ Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0: { code: 7036, category: ts.DiagnosticCategory.Error, key: "Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0_7036", message: "Dynamic import's specifier must be of type 'string', but here has type '{0}'." },
You_cannot_rename_this_element: { code: 8000, category: ts.DiagnosticCategory.Error, key: "You_cannot_rename_this_element_8000", message: "You cannot rename this element." },
You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library: { code: 8001, category: ts.DiagnosticCategory.Error, key: "You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library_8001", message: "You cannot rename elements that are defined in the standard TypeScript library." },
import_can_only_be_used_in_a_ts_file: { code: 8002, category: ts.DiagnosticCategory.Error, key: "import_can_only_be_used_in_a_ts_file_8002", message: "'import ... =' can only be used in a .ts file." },
@@ -3295,12 +3435,18 @@ var ts;
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}'." },
+ Declare_property_0: { code: 90016, category: ts.DiagnosticCategory.Message, key: "Declare_property_0_90016", message: "Declare property '{0}'." },
+ Add_index_signature_for_property_0: { code: 90017, category: ts.DiagnosticCategory.Message, key: "Add_index_signature_for_property_0_90017", message: "Add index signature for 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}'." },
+ Change_spelling_to_0: { code: 90022, category: ts.DiagnosticCategory.Message, key: "Change_spelling_to_0_90022", message: "Change spelling to '{0}'." },
+ Declare_method_0: { code: 90023, category: ts.DiagnosticCategory.Message, key: "Declare_method_0_90023", message: "Declare method '{0}'." },
+ Declare_static_method_0: { code: 90024, category: ts.DiagnosticCategory.Message, key: "Declare_static_method_0_90024", message: "Declare static method '{0}'." },
+ Prefix_0_with_an_underscore: { code: 90025, category: ts.DiagnosticCategory.Message, key: "Prefix_0_with_an_underscore_90025", message: "Prefix '{0}' with an underscore." },
+ Convert_function_to_an_ES2015_class: { code: 95001, category: ts.DiagnosticCategory.Message, key: "Convert_function_to_an_ES2015_class_95001", message: "Convert function to an ES2015 class" },
+ Convert_function_0_to_class: { code: 95002, category: ts.DiagnosticCategory.Message, key: "Convert_function_0_to_class_95002", message: "Convert function '{0}' to class" },
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." },
@@ -3593,6 +3739,7 @@ var ts;
case 32:
case 47:
case 60:
+ case 124:
case 61:
case 62:
return true;
@@ -3654,6 +3801,7 @@ var ts;
}
break;
case 60:
+ case 124:
case 61:
case 62:
if (isConflictMarkerTrivia(text, pos)) {
@@ -3707,10 +3855,10 @@ var ts;
}
}
else {
- ts.Debug.assert(ch === 61);
+ ts.Debug.assert(ch === 124 || ch === 61);
while (pos < len) {
- var ch_1 = text.charCodeAt(pos);
- if (ch_1 === 62 && isConflictMarkerTrivia(text, pos)) {
+ var currentChar = text.charCodeAt(pos);
+ if ((currentChar === 61 || currentChar === 62) && currentChar !== ch && isConflictMarkerTrivia(text, pos)) {
break;
}
pos++;
@@ -3849,9 +3997,10 @@ var ts;
}
ts.getTrailingCommentRanges = getTrailingCommentRanges;
function getShebang(text) {
- return shebangTriviaRegex.test(text)
- ? shebangTriviaRegex.exec(text)[0]
- : undefined;
+ var match = shebangTriviaRegex.exec(text);
+ if (match) {
+ return match[0];
+ }
}
ts.getShebang = getShebang;
function isIdentifierStart(ch, languageVersion) {
@@ -4389,13 +4538,13 @@ var ts;
pos += 2;
var commentClosed = false;
while (pos < end) {
- var ch_2 = text.charCodeAt(pos);
- if (ch_2 === 42 && text.charCodeAt(pos + 1) === 47) {
+ var ch_1 = text.charCodeAt(pos);
+ if (ch_1 === 42 && text.charCodeAt(pos + 1) === 47) {
pos += 2;
commentClosed = true;
break;
}
- if (isLineBreak(ch_2)) {
+ if (isLineBreak(ch_1)) {
precedingLineBreak = true;
}
pos++;
@@ -4550,6 +4699,15 @@ var ts;
pos++;
return token = 17;
case 124:
+ if (isConflictMarkerTrivia(text, pos)) {
+ pos = scanConflictMarkerTrivia(text, pos, error);
+ if (skipTrivia) {
+ continue;
+ }
+ else {
+ return token = 7;
+ }
+ }
if (text.charCodeAt(pos + 1) === 124) {
return pos += 2, token = 54;
}
@@ -4933,7 +5091,7 @@ var ts;
clear: function () { return str_1 = ""; },
trackSymbol: ts.noop,
reportInaccessibleThisError: ts.noop,
- reportIllegalExtends: ts.noop
+ reportPrivateInBaseOfClassExpression: ts.noop,
};
}
return stringWriters.pop();
@@ -4981,9 +5139,7 @@ var ts;
}
ts.typeDirectiveIsEqualTo = typeDirectiveIsEqualTo;
function hasChangesInResolutions(names, newResolutions, oldResolutions, comparer) {
- if (names.length !== newResolutions.length) {
- return false;
- }
+ ts.Debug.assert(names.length === newResolutions.length);
for (var i = 0; i < names.length; i++) {
var newResolution = newResolutions[i];
var oldResolution = oldResolutions && oldResolutions.get(names[i]);
@@ -5080,34 +5236,22 @@ var ts;
return !nodeIsMissing(node);
}
ts.nodeIsPresent = nodeIsPresent;
- function isToken(n) {
- return n.kind >= 0 && n.kind <= 142;
- }
- ts.isToken = isToken;
function getTokenPosOfNode(node, sourceFile, includeJsDoc) {
if (nodeIsMissing(node)) {
return node.pos;
}
- if (isJSDocNode(node)) {
+ if (ts.isJSDocNode(node)) {
return ts.skipTrivia((sourceFile || getSourceFileOfNode(node)).text, node.pos, false, true);
}
if (includeJsDoc && node.jsDoc && node.jsDoc.length > 0) {
return getTokenPosOfNode(node.jsDoc[0]);
}
- if (node.kind === 294 && node._children.length > 0) {
+ if (node.kind === 295 && 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 >= 267 && node.kind <= 293;
- }
- ts.isJSDocNode = isJSDocNode;
- function isJSDocTag(node) {
- return node.kind >= 283 && node.kind <= 293;
- }
- ts.isJSDocTag = isJSDocTag;
function getNonDecoratorTokenPosOfNode(node, sourceFile) {
if (nodeIsMissing(node) || !node.decorators) {
return getTokenPosOfNode(node, sourceFile);
@@ -5140,26 +5284,28 @@ var ts;
if (!nodeIsSynthesized(node) && node.parent) {
return getSourceTextOfNodeFromSourceFile(sourceFile, node);
}
+ var escapeText = ts.getEmitFlags(node) & 16777216 ? escapeString : escapeNonAsciiString;
switch (node.kind) {
case 9:
- return getQuotedEscapedLiteralText('"', node.text, '"');
+ return '"' + escapeText(node.text) + '"';
case 13:
- return getQuotedEscapedLiteralText("`", node.text, "`");
+ return "`" + escapeText(node.text) + "`";
case 14:
- return getQuotedEscapedLiteralText("`", node.text, "${");
+ return "`" + escapeText(node.text) + "${";
case 15:
- return getQuotedEscapedLiteralText("}", node.text, "${");
+ return "}" + escapeText(node.text) + "${";
case 16:
- return getQuotedEscapedLiteralText("}", node.text, "`");
+ return "}" + escapeText(node.text) + "`";
case 8:
return node.text;
}
ts.Debug.fail("Literal kind '" + node.kind + "' not accounted for.");
}
ts.getLiteralText = getLiteralText;
- function getQuotedEscapedLiteralText(leftQuote, text, rightQuote) {
- return leftQuote + escapeNonAsciiCharacters(escapeString(text)) + rightQuote;
+ function getTextOfConstantValue(value) {
+ return typeof value === "string" ? '"' + escapeNonAsciiString(value) + '"' : "" + value;
}
+ ts.getTextOfConstantValue = getTextOfConstantValue;
function escapeIdentifier(identifier) {
return identifier.length >= 2 && identifier.charCodeAt(0) === 95 && identifier.charCodeAt(1) === 95 ? "_" + identifier : identifier;
}
@@ -5193,7 +5339,7 @@ var ts;
function isBlockScopedContainerTopLevel(node) {
return node.kind === 265 ||
node.kind === 233 ||
- isFunctionLike(node);
+ ts.isFunctionLike(node);
}
ts.isBlockScopedContainerTopLevel = isBlockScopedContainerTopLevel;
function isGlobalScopeAugmentation(module) {
@@ -5235,7 +5381,7 @@ var ts;
case 187:
return true;
case 207:
- return parentNode && !isFunctionLike(parentNode);
+ return parentNode && !ts.isFunctionLike(parentNode);
}
return false;
}
@@ -5366,10 +5512,6 @@ var ts;
return (file.externalModuleIndicator || file.commonJsModuleIndicator) !== undefined;
}
ts.isExternalOrCommonJsModule = isExternalOrCommonJsModule;
- function isDeclarationFile(file) {
- return file.isDeclarationFile;
- }
- ts.isDeclarationFile = isDeclarationFile;
function isConstEnumDeclaration(node) {
return node.kind === 232 && isConst(node);
}
@@ -5387,6 +5529,10 @@ var ts;
return n.kind === 181 && n.expression.kind === 97;
}
ts.isSuperCall = isSuperCall;
+ function isImportCall(n) {
+ return n.kind === 181 && n.expression.kind === 91;
+ }
+ ts.isImportCall = isImportCall;
function isPrologueDirective(node) {
return node.kind === 210
&& node.expression.kind === 9;
@@ -5497,10 +5643,6 @@ var ts;
return false;
}
ts.isChildOfNodeWithKind = isChildOfNodeWithKind;
- function isPrefixUnaryExpression(node) {
- return node.kind === 192;
- }
- ts.isPrefixUnaryExpression = isPrefixUnaryExpression;
function forEachReturnStatement(body, visitor) {
return traverse(body);
function traverse(node) {
@@ -5546,7 +5688,7 @@ var ts;
case 199:
return;
default:
- if (isFunctionLike(node)) {
+ if (ts.isFunctionLike(node)) {
var name = node.name;
if (name && name.kind === 144) {
traverse(name.expression);
@@ -5589,38 +5731,6 @@ var ts;
return false;
}
ts.isVariableLike = isVariableLike;
- function isAccessor(node) {
- return node && (node.kind === 153 || node.kind === 154);
- }
- ts.isAccessor = isAccessor;
- function isClassLike(node) {
- return node && (node.kind === 229 || node.kind === 199);
- }
- ts.isClassLike = isClassLike;
- function isFunctionLike(node) {
- return node && isFunctionLikeKind(node.kind);
- }
- ts.isFunctionLike = isFunctionLike;
- function isFunctionLikeKind(kind) {
- switch (kind) {
- case 152:
- case 186:
- case 228:
- case 187:
- case 151:
- case 150:
- case 153:
- case 154:
- case 155:
- case 156:
- case 157:
- case 160:
- case 161:
- return true;
- }
- return false;
- }
- ts.isFunctionLikeKind = isFunctionLikeKind;
function introducesArgumentsExoticObject(node) {
switch (node.kind) {
case 151:
@@ -5635,20 +5745,6 @@ var ts;
return false;
}
ts.introducesArgumentsExoticObject = introducesArgumentsExoticObject;
- function isIterationStatement(node, lookInLabeledStatements) {
- switch (node.kind) {
- case 214:
- case 215:
- case 216:
- case 212:
- case 213:
- return true;
- case 222:
- return lookInLabeledStatements && isIterationStatement(node.statement, lookInLabeledStatements);
- }
- return false;
- }
- ts.isIterationStatement = isIterationStatement;
function unwrapInnermostStatementOfLabel(node, beforeUnwrapLabelCallback) {
while (true) {
if (beforeUnwrapLabelCallback) {
@@ -5662,7 +5758,7 @@ var ts;
}
ts.unwrapInnermostStatementOfLabel = unwrapInnermostStatementOfLabel;
function isFunctionBlock(node) {
- return node && node.kind === 207 && isFunctionLike(node.parent);
+ return node && node.kind === 207 && ts.isFunctionLike(node.parent);
}
ts.isFunctionBlock = isFunctionBlock;
function isObjectLiteralMethod(node) {
@@ -5686,7 +5782,7 @@ var ts;
function getContainingFunction(node) {
while (true) {
node = node.parent;
- if (!node || isFunctionLike(node)) {
+ if (!node || ts.isFunctionLike(node)) {
return node;
}
}
@@ -5695,7 +5791,7 @@ var ts;
function getContainingClass(node) {
while (true) {
node = node.parent;
- if (!node || isClassLike(node)) {
+ if (!node || ts.isClassLike(node)) {
return node;
}
}
@@ -5709,16 +5805,16 @@ var ts;
}
switch (node.kind) {
case 144:
- if (isClassLike(node.parent.parent)) {
+ if (ts.isClassLike(node.parent.parent)) {
return node;
}
node = node.parent;
break;
case 147:
- if (node.parent.kind === 146 && isClassElement(node.parent.parent)) {
+ if (node.parent.kind === 146 && ts.isClassElement(node.parent.parent)) {
node = node.parent.parent;
}
- else if (isClassElement(node.parent)) {
+ else if (ts.isClassElement(node.parent)) {
node = node.parent;
}
break;
@@ -5784,10 +5880,10 @@ var ts;
case 154:
return node;
case 147:
- if (node.parent.kind === 146 && isClassElement(node.parent.parent)) {
+ if (node.parent.kind === 146 && ts.isClassElement(node.parent.parent)) {
node = node.parent.parent;
}
- else if (isClassElement(node.parent)) {
+ else if (ts.isClassElement(node.parent)) {
node = node.parent;
}
break;
@@ -5831,25 +5927,11 @@ var ts;
return undefined;
}
ts.getEntityNameFromTypeNode = getEntityNameFromTypeNode;
- function isCallLikeExpression(node) {
- switch (node.kind) {
- case 251:
- case 250:
- case 181:
- case 182:
- case 183:
- case 147:
- return true;
- default:
- return false;
- }
- }
- ts.isCallLikeExpression = isCallLikeExpression;
function getInvokedExpression(node) {
if (node.kind === 183) {
return node.tag;
}
- else if (isJsxOpeningLikeElement(node)) {
+ else if (ts.isJsxOpeningLikeElement(node)) {
return node.tagName;
}
return node.expression;
@@ -6072,11 +6154,11 @@ var ts;
}
ts.getRightMostAssignedExpression = getRightMostAssignedExpression;
function isExportsIdentifier(node) {
- return isIdentifier(node) && node.text === "exports";
+ return ts.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";
+ return ts.isPropertyAccessExpression(node) && ts.isIdentifier(node.expression) && node.expression.text === "module" && node.name.text === "exports";
}
ts.isModuleExportsPropertyAccessExpression = isModuleExportsPropertyAccessExpression;
function getSpecialPropertyAssignmentKind(expression) {
@@ -6179,35 +6261,24 @@ var ts;
}
ts.getCommentsFromJSDoc = getCommentsFromJSDoc;
function hasJSDocParameterTags(node) {
- var parameterTags = getJSDocTags(node, 286);
+ var parameterTags = getJSDocTags(node, 287);
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 === 286) {
- if (doc.kind === kind) {
- result.push(doc);
- }
- }
- else {
- var tags = doc.tags;
- if (tags) {
- result.push.apply(result, ts.filter(tags, function (tag) { return tag.kind === kind; }));
- }
- }
- }
- return result;
- }
+ return ts.flatMap(getJSDocs(node), function (doc) {
+ return doc.kind === 283
+ ? ts.filter(doc.tags, function (tag) { return tag.kind === kind; })
+ : doc.kind === kind && doc;
+ });
}
function getFirstJSDocTag(node, kind) {
return node && ts.firstOrUndefined(getJSDocTags(node, kind));
}
function getJSDocs(node) {
+ if (ts.isJSDocTypedefTag(node)) {
+ return [node.parent];
+ }
var cache = node.jsDocCache;
if (!cache) {
getJSDocsWorker(node);
@@ -6251,29 +6322,44 @@ var ts;
}
ts.getJSDocs = getJSDocs;
function getJSDocParameterTags(param) {
- if (!isParameter(param)) {
- return undefined;
- }
var func = param.parent;
- var tags = getJSDocTags(func, 286);
+ var tags = getJSDocTags(func, 287);
if (!param.name) {
var i = func.parameters.indexOf(param);
- var paramTags = ts.filter(tags, function (tag) { return tag.kind === 286; });
+ var paramTags = ts.filter(tags, function (tag) { return tag.kind === 287; });
if (paramTags && 0 <= i && i < paramTags.length) {
return [paramTags[i]];
}
}
else if (param.name.kind === 71) {
var name_1 = param.name.text;
- return ts.filter(tags, function (tag) { return tag.kind === 286 && tag.parameterName.text === name_1; });
+ return ts.filter(tags, function (tag) { return tag.kind === 287 && tag.name.text === name_1; });
}
else {
return undefined;
}
}
ts.getJSDocParameterTags = getJSDocParameterTags;
+ function getParameterFromJSDoc(node) {
+ var name = node.name.text;
+ var grandParent = node.parent.parent;
+ ts.Debug.assert(node.parent.kind === 283);
+ if (!ts.isFunctionLike(grandParent)) {
+ return undefined;
+ }
+ return ts.find(grandParent.parameters, function (p) {
+ return p.name.kind === 71 && p.name.text === name;
+ });
+ }
+ ts.getParameterFromJSDoc = getParameterFromJSDoc;
+ function getTypeParameterFromJsDoc(node) {
+ var name = node.name.text;
+ var typeParameters = node.parent.parent.parent.typeParameters;
+ return ts.find(typeParameters, function (p) { return p.name.text === name; });
+ }
+ ts.getTypeParameterFromJsDoc = getTypeParameterFromJsDoc;
function getJSDocType(node) {
- var tag = getFirstJSDocTag(node, 288);
+ var tag = getFirstJSDocTag(node, 289);
if (!tag && node.kind === 146) {
var paramTags = getJSDocParameterTags(node);
if (paramTags) {
@@ -6287,12 +6373,21 @@ var ts;
return getFirstJSDocTag(node, 285);
}
ts.getJSDocAugmentsTag = getJSDocAugmentsTag;
+ function getJSDocClassTag(node) {
+ return getFirstJSDocTag(node, 286);
+ }
+ ts.getJSDocClassTag = getJSDocClassTag;
function getJSDocReturnTag(node) {
- return getFirstJSDocTag(node, 287);
+ return getFirstJSDocTag(node, 288);
}
ts.getJSDocReturnTag = getJSDocReturnTag;
+ function getJSDocReturnType(node) {
+ var returnTag = getJSDocReturnTag(node);
+ return returnTag && returnTag.typeExpression && returnTag.typeExpression.type;
+ }
+ ts.getJSDocReturnType = getJSDocReturnType;
function getJSDocTemplateTag(node) {
- return getFirstJSDocTag(node, 289);
+ return getFirstJSDocTag(node, 290);
}
ts.getJSDocTemplateTag = getJSDocTemplateTag;
function hasRestParameter(s) {
@@ -6392,25 +6487,35 @@ var ts;
}
ts.isInAmbientContext = isInAmbientContext;
function isDeclarationName(name) {
- if (name.kind !== 71 && name.kind !== 9 && name.kind !== 8) {
- return false;
- }
- var parent = name.parent;
- if (parent.kind === 242 || parent.kind === 246) {
- if (parent.propertyName) {
- return true;
- }
- }
- if (isDeclaration(parent)) {
- return parent.name === name;
+ switch (name.kind) {
+ case 71:
+ case 9:
+ case 8:
+ return ts.isDeclaration(name.parent) && name.parent.name === name;
+ default:
+ return false;
}
- return false;
}
ts.isDeclarationName = isDeclarationName;
+ function isAnyDeclarationName(name) {
+ switch (name.kind) {
+ case 71:
+ case 9:
+ case 8:
+ if (ts.isDeclaration(name.parent)) {
+ return name.parent.name === name;
+ }
+ var binExp = name.parent.parent;
+ return ts.isBinaryExpression(binExp) && getSpecialPropertyAssignmentKind(binExp) !== 0 && ts.getNameOfDeclaration(binExp) === name;
+ default:
+ return false;
+ }
+ }
+ ts.isAnyDeclarationName = isAnyDeclarationName;
function isLiteralComputedPropertyDeclarationName(node) {
return (node.kind === 9 || node.kind === 8) &&
node.parent.kind === 144 &&
- isDeclaration(node.parent.parent);
+ ts.isDeclaration(node.parent.parent);
}
ts.isLiteralComputedPropertyDeclarationName = isLiteralComputedPropertyDeclarationName;
function isIdentifierName(node) {
@@ -6506,21 +6611,19 @@ var ts;
var isNoDefaultLibRegEx = /^(\/\/\/\s*<reference\s+no-default-lib\s*=\s*)('|")(.+?)\2\s*\/>/gim;
if (simpleReferenceRegEx.test(comment)) {
if (isNoDefaultLibRegEx.test(comment)) {
- return {
- isNoDefaultLib: true
- };
+ return { isNoDefaultLib: true };
}
else {
var refMatchResult = ts.fullTripleSlashReferencePathRegEx.exec(comment);
var refLibResult = !refMatchResult && ts.fullTripleSlashReferenceTypeReferenceDirectiveRegEx.exec(comment);
- if (refMatchResult || refLibResult) {
- var start = commentRange.pos;
- var end = commentRange.end;
+ var match = refMatchResult || refLibResult;
+ if (match) {
+ var pos = commentRange.pos + match[1].length + match[2].length;
return {
fileReference: {
- pos: start,
- end: end,
- fileName: (refMatchResult || refLibResult)[3]
+ pos: pos,
+ end: pos + match[3].length,
+ fileName: match[3]
},
isNoDefaultLib: false,
isTypeReferenceDirective: !!refLibResult
@@ -6544,6 +6647,9 @@ var ts;
}
ts.isTrivia = isTrivia;
function getFunctionFlags(node) {
+ if (!node) {
+ return 4;
+ }
var flags = 0;
switch (node.kind) {
case 228:
@@ -6577,10 +6683,6 @@ var ts;
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
@@ -6588,7 +6690,8 @@ var ts;
}
ts.isStringOrNumericLiteral = isStringOrNumericLiteral;
function hasDynamicName(declaration) {
- return declaration.name && isDynamicName(declaration.name);
+ var name = ts.getNameOfDeclaration(declaration);
+ return name && isDynamicName(name);
}
ts.hasDynamicName = hasDynamicName;
function isDynamicName(name) {
@@ -6598,7 +6701,7 @@ var ts;
}
ts.isDynamicName = isDynamicName;
function isWellKnownSymbolSyntactically(node) {
- return isPropertyAccessExpression(node) && isESSymbolIdentifier(node.expression);
+ return ts.isPropertyAccessExpression(node) && isESSymbolIdentifier(node.expression);
}
ts.isWellKnownSymbolSyntactically = isWellKnownSymbolSyntactically;
function getPropertyNameForPropertyNameNode(name) {
@@ -6630,24 +6733,6 @@ var ts;
return node.text === "push" || node.text === "unshift";
}
ts.isPushOrUnshiftIdentifier = isPushOrUnshiftIdentifier;
- function isModifierKind(token) {
- switch (token) {
- case 117:
- case 120:
- case 76:
- case 124:
- case 79:
- case 84:
- case 114:
- case 112:
- case 113:
- case 131:
- case 115:
- return true;
- }
- return false;
- }
- ts.isModifierKind = isModifierKind;
function isParameterDeclaration(node) {
var root = getRootDeclaration(node);
return root.kind === 146;
@@ -6686,7 +6771,7 @@ var ts;
}
ts.getOriginalSourceFileOrBundle = getOriginalSourceFileOrBundle;
function getOriginalSourceFile(sourceFile) {
- return ts.getParseTreeNode(sourceFile, isSourceFile) || sourceFile;
+ return ts.getParseTreeNode(sourceFile, ts.isSourceFile) || sourceFile;
}
function getOriginalSourceFiles(sourceFiles) {
return ts.sameMap(sourceFiles, getOriginalSourceFile);
@@ -6858,6 +6943,8 @@ var ts;
return 2;
case 198:
return 1;
+ case 298:
+ return 0;
default:
return -1;
}
@@ -6961,12 +7048,13 @@ var ts;
return "\\u" + paddedHexCode;
}
var nonAsciiCharacters = /[^\u0000-\u007F]/g;
- function escapeNonAsciiCharacters(s) {
+ function escapeNonAsciiString(s) {
+ s = escapeString(s);
return nonAsciiCharacters.test(s) ?
s.replace(nonAsciiCharacters, function (c) { return get16BitUnicodeEscapeSequence(c.charCodeAt(0)); }) :
s;
}
- ts.escapeNonAsciiCharacters = escapeNonAsciiCharacters;
+ ts.escapeNonAsciiString = escapeNonAsciiString;
var indentStrings = ["", " "];
function getIndentString(level) {
if (indentStrings[level] === undefined) {
@@ -7055,7 +7143,7 @@ var ts;
ts.getResolvedExternalModuleName = getResolvedExternalModuleName;
function getExternalModuleNameFromDeclaration(host, resolver, declaration) {
var file = resolver.getExternalModuleFileFromDeclaration(declaration);
- if (!file || isDeclarationFile(file)) {
+ if (!file || file.isDeclarationFile) {
return undefined;
}
return getResolvedExternalModuleName(host, file);
@@ -7107,7 +7195,7 @@ var ts;
}
ts.getSourceFilesToEmit = getSourceFilesToEmit;
function sourceFileMayBeEmitted(sourceFile, options, isSourceFileFromExternalLibrary) {
- return !(options.noEmitForJsFiles && isSourceFileJavaScript(sourceFile)) && !isDeclarationFile(sourceFile) && !isSourceFileFromExternalLibrary(sourceFile);
+ return !(options.noEmitForJsFiles && isSourceFileJavaScript(sourceFile)) && !sourceFile.isDeclarationFile && !isSourceFileFromExternalLibrary(sourceFile);
}
ts.sourceFileMayBeEmitted = sourceFileMayBeEmitted;
function forEachEmittedFile(host, action, sourceFilesOrTargetSourceFile, emitOnlyDtsFiles) {
@@ -7178,12 +7266,16 @@ var ts;
});
}
ts.getFirstConstructorWithBody = getFirstConstructorWithBody;
- function getSetAccessorTypeAnnotationNode(accessor) {
+ function getSetAccessorValueParameter(accessor) {
if (accessor && accessor.parameters.length > 0) {
var hasThis = accessor.parameters.length === 2 && parameterIsThisKeyword(accessor.parameters[0]);
- return accessor.parameters[hasThis ? 1 : 0].type;
+ return accessor.parameters[hasThis ? 1 : 0];
}
}
+ function getSetAccessorTypeAnnotationNode(accessor) {
+ var parameter = getSetAccessorValueParameter(accessor);
+ return parameter && parameter.type;
+ }
ts.getSetAccessorTypeAnnotationNode = getSetAccessorTypeAnnotationNode;
function getThisParameter(signature) {
if (signature.parameters.length) {
@@ -7254,6 +7346,39 @@ var ts;
};
}
ts.getAllAccessorDeclarations = getAllAccessorDeclarations;
+ function getEffectiveTypeAnnotationNode(node) {
+ if (node.type) {
+ return node.type;
+ }
+ if (node.flags & 65536) {
+ return getJSDocType(node);
+ }
+ }
+ ts.getEffectiveTypeAnnotationNode = getEffectiveTypeAnnotationNode;
+ function getEffectiveReturnTypeNode(node) {
+ if (node.type) {
+ return node.type;
+ }
+ if (node.flags & 65536) {
+ return getJSDocReturnType(node);
+ }
+ }
+ ts.getEffectiveReturnTypeNode = getEffectiveReturnTypeNode;
+ function getEffectiveTypeParameterDeclarations(node) {
+ if (node.typeParameters) {
+ return node.typeParameters;
+ }
+ if (node.flags & 65536) {
+ var templateTag = getJSDocTemplateTag(node);
+ return templateTag && templateTag.typeParameters;
+ }
+ }
+ ts.getEffectiveTypeParameterDeclarations = getEffectiveTypeParameterDeclarations;
+ function getEffectiveSetAccessorTypeAnnotationNode(node) {
+ var parameter = getSetAccessorValueParameter(node);
+ return parameter && getEffectiveTypeAnnotationNode(parameter);
+ }
+ ts.getEffectiveSetAccessorTypeAnnotationNode = getEffectiveSetAccessorTypeAnnotationNode;
function emitNewLineBeforeLeadingComments(lineMap, writer, node, leadingComments) {
emitNewLineBeforeLeadingCommentsOfPosition(lineMap, writer, node.pos, leadingComments);
}
@@ -7415,6 +7540,12 @@ var ts;
if (node.modifierFlagsCache & 536870912) {
return node.modifierFlagsCache & ~536870912;
}
+ var flags = getModifierFlagsNoCache(node);
+ node.modifierFlagsCache = flags | 536870912;
+ return flags;
+ }
+ ts.getModifierFlags = getModifierFlags;
+ function getModifierFlagsNoCache(node) {
var flags = 0;
if (node.modifiers) {
for (var _i = 0, _a = node.modifiers; _i < _a.length; _i++) {
@@ -7425,10 +7556,9 @@ var ts;
if (node.flags & 4 || (node.kind === 71 && node.isInJSDocNamespace)) {
flags |= 1;
}
- node.modifierFlagsCache = flags | 536870912;
return flags;
}
- ts.getModifierFlags = getModifierFlags;
+ ts.getModifierFlagsNoCache = getModifierFlagsNoCache;
function modifierToFlag(token) {
switch (token) {
case 115: return 32;
@@ -7459,17 +7589,17 @@ var ts;
function tryGetClassExtendingExpressionWithTypeArguments(node) {
if (node.kind === 201 &&
node.parent.token === 85 &&
- isClassLike(node.parent.parent)) {
+ ts.isClassLike(node.parent.parent)) {
return node.parent.parent;
}
}
ts.tryGetClassExtendingExpressionWithTypeArguments = tryGetClassExtendingExpressionWithTypeArguments;
function isAssignmentExpression(node, excludeCompoundAssignment) {
- return isBinaryExpression(node)
+ return ts.isBinaryExpression(node)
&& (excludeCompoundAssignment
? node.operatorToken.kind === 58
: isAssignmentOperator(node.operatorToken.kind))
- && isLeftHandSideExpression(node.left);
+ && ts.isLeftHandSideExpression(node.left);
}
ts.isAssignmentExpression = isAssignmentExpression;
function isDestructuringAssignment(node) {
@@ -7489,7 +7619,7 @@ var ts;
if (node.kind === 71) {
return true;
}
- else if (isPropertyAccessExpression(node)) {
+ else if (ts.isPropertyAccessExpression(node)) {
return isSupportedExpressionWithTypeArgumentsRest(node.expression);
}
else {
@@ -7506,7 +7636,7 @@ var ts;
&& node.parent
&& node.parent.token === 108
&& node.parent.parent
- && isClassLike(node.parent.parent);
+ && ts.isClassLike(node.parent.parent);
}
ts.isExpressionWithTypeArgumentsInClassImplementsClause = isExpressionWithTypeArgumentsInClassImplementsClause;
function isEntityNameExpression(node) {
@@ -7530,11 +7660,11 @@ var ts;
}
ts.isEmptyArrayLiteral = isEmptyArrayLiteral;
function getLocalSymbolForExportDefault(symbol) {
- return isExportDefaultSymbol(symbol) ? symbol.valueDeclaration.localSymbol : undefined;
+ return isExportDefaultSymbol(symbol) ? symbol.declarations[0].localSymbol : undefined;
}
ts.getLocalSymbolForExportDefault = getLocalSymbolForExportDefault;
function isExportDefaultSymbol(symbol) {
- return symbol && symbol.valueDeclaration && hasModifier(symbol.valueDeclaration, 512);
+ return symbol && ts.length(symbol.declarations) > 0 && hasModifier(symbol.declarations[0], 512);
}
function tryExtractTypeScriptExtension(fileName) {
return ts.find(ts.supportedTypescriptExtensionsForExtractExtension, function (extension) { return ts.fileExtensionIs(fileName, extension); });
@@ -7596,13 +7726,13 @@ var ts;
var carriageReturnLineFeed = "\r\n";
var lineFeed = "\n";
function getNewLineCharacter(options) {
- if (options.newLine === 0) {
- return carriageReturnLineFeed;
- }
- else if (options.newLine === 1) {
- return lineFeed;
+ switch (options.newLine) {
+ case 0:
+ return carriageReturnLineFeed;
+ case 1:
+ return lineFeed;
}
- else if (ts.sys) {
+ if (ts.sys) {
return ts.sys.newLine;
}
return carriageReturnLineFeed;
@@ -7674,27 +7804,74 @@ var ts;
}
return false;
}
- var syntaxKindCache = [];
- function formatSyntaxKind(kind) {
- var syntaxKindEnum = ts.SyntaxKind;
- if (syntaxKindEnum) {
- var cached = syntaxKindCache[kind];
- if (cached !== undefined) {
- return cached;
- }
- for (var name in syntaxKindEnum) {
- if (syntaxKindEnum[name] === kind) {
- var result = kind + " (" + name + ")";
- syntaxKindCache[kind] = result;
- return result;
+ function formatEnum(value, enumObject, isFlags) {
+ if (value === void 0) { value = 0; }
+ var members = getEnumMembers(enumObject);
+ if (value === 0) {
+ return members.length > 0 && members[0][0] === 0 ? members[0][1] : "0";
+ }
+ if (isFlags) {
+ var result = "";
+ var remainingFlags = value;
+ for (var i = members.length - 1; i >= 0 && remainingFlags !== 0; i--) {
+ var _a = members[i], enumValue = _a[0], enumName = _a[1];
+ if (enumValue !== 0 && (remainingFlags & enumValue) === enumValue) {
+ remainingFlags &= ~enumValue;
+ result = "" + enumName + (result ? ", " : "") + result;
}
}
+ if (remainingFlags === 0) {
+ return result;
+ }
}
else {
- return kind.toString();
+ for (var _i = 0, members_1 = members; _i < members_1.length; _i++) {
+ var _b = members_1[_i], enumValue = _b[0], enumName = _b[1];
+ if (enumValue === value) {
+ return enumName;
+ }
+ }
+ }
+ return value.toString();
+ }
+ function getEnumMembers(enumObject) {
+ var result = [];
+ for (var name in enumObject) {
+ var value = enumObject[name];
+ if (typeof value === "number") {
+ result.push([value, name]);
+ }
}
+ return ts.stableSort(result, function (x, y) { return ts.compareValues(x[0], y[0]); });
+ }
+ function formatSyntaxKind(kind) {
+ return formatEnum(kind, ts.SyntaxKind, false);
}
ts.formatSyntaxKind = formatSyntaxKind;
+ function formatModifierFlags(flags) {
+ return formatEnum(flags, ts.ModifierFlags, true);
+ }
+ ts.formatModifierFlags = formatModifierFlags;
+ function formatTransformFlags(flags) {
+ return formatEnum(flags, ts.TransformFlags, true);
+ }
+ ts.formatTransformFlags = formatTransformFlags;
+ function formatEmitFlags(flags) {
+ return formatEnum(flags, ts.EmitFlags, true);
+ }
+ ts.formatEmitFlags = formatEmitFlags;
+ function formatSymbolFlags(flags) {
+ return formatEnum(flags, ts.SymbolFlags, true);
+ }
+ ts.formatSymbolFlags = formatSymbolFlags;
+ function formatTypeFlags(flags) {
+ return formatEnum(flags, ts.TypeFlags, true);
+ }
+ ts.formatTypeFlags = formatTypeFlags;
+ function formatObjectFlags(flags) {
+ return formatEnum(flags, ts.ObjectFlags, true);
+ }
+ ts.formatObjectFlags = formatObjectFlags;
function getRangePos(range) {
return range ? range.pos : -1;
}
@@ -7811,23 +7988,993 @@ var ts;
return node.symbol && getDeclarationOfKind(node.symbol, kind) === node;
}
ts.isFirstDeclarationOfKind = isFirstDeclarationOfKind;
- function isNodeArray(array) {
- return array.hasOwnProperty("pos")
- && array.hasOwnProperty("end");
+ function isWatchSet(options) {
+ return options.watch && options.hasOwnProperty("watch");
}
- ts.isNodeArray = isNodeArray;
+ ts.isWatchSet = isWatchSet;
+ function getCheckFlags(symbol) {
+ return symbol.flags & 134217728 ? symbol.checkFlags : 0;
+ }
+ ts.getCheckFlags = getCheckFlags;
+ function getDeclarationModifierFlagsFromSymbol(s) {
+ 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;
+ }
+ ts.getDeclarationModifierFlagsFromSymbol = getDeclarationModifierFlagsFromSymbol;
+ function levenshtein(s1, s2) {
+ var previous = new Array(s2.length + 1);
+ var current = new Array(s2.length + 1);
+ for (var i = 0; i < s2.length + 1; i++) {
+ previous[i] = i;
+ current[i] = -1;
+ }
+ for (var i = 1; i < s1.length + 1; i++) {
+ current[0] = i;
+ for (var j = 1; j < s2.length + 1; j++) {
+ current[j] = Math.min(previous[j] + 1, current[j - 1] + 1, previous[j - 1] + (s1[i - 1] === s2[j - 1] ? 0 : 2));
+ }
+ var tmp = previous;
+ previous = current;
+ current = tmp;
+ }
+ return previous[previous.length - 1];
+ }
+ ts.levenshtein = levenshtein;
+})(ts || (ts = {}));
+(function (ts) {
+ function getDefaultLibFileName(options) {
+ switch (options.target) {
+ case 5:
+ return "lib.esnext.full.d.ts";
+ case 4:
+ return "lib.es2017.full.d.ts";
+ case 3:
+ return "lib.es2016.full.d.ts";
+ case 2:
+ return "lib.es6.d.ts";
+ default:
+ return "lib.d.ts";
+ }
+ }
+ ts.getDefaultLibFileName = getDefaultLibFileName;
+ function textSpanEnd(span) {
+ return span.start + span.length;
+ }
+ ts.textSpanEnd = textSpanEnd;
+ function textSpanIsEmpty(span) {
+ return span.length === 0;
+ }
+ ts.textSpanIsEmpty = textSpanIsEmpty;
+ function textSpanContainsPosition(span, position) {
+ return position >= span.start && position < textSpanEnd(span);
+ }
+ ts.textSpanContainsPosition = textSpanContainsPosition;
+ function textSpanContainsTextSpan(span, other) {
+ return other.start >= span.start && textSpanEnd(other) <= textSpanEnd(span);
+ }
+ ts.textSpanContainsTextSpan = textSpanContainsTextSpan;
+ function textSpanOverlapsWith(span, other) {
+ var overlapStart = Math.max(span.start, other.start);
+ var overlapEnd = Math.min(textSpanEnd(span), textSpanEnd(other));
+ return overlapStart < overlapEnd;
+ }
+ ts.textSpanOverlapsWith = textSpanOverlapsWith;
+ function textSpanOverlap(span1, span2) {
+ var overlapStart = Math.max(span1.start, span2.start);
+ var overlapEnd = Math.min(textSpanEnd(span1), textSpanEnd(span2));
+ if (overlapStart < overlapEnd) {
+ return createTextSpanFromBounds(overlapStart, overlapEnd);
+ }
+ return undefined;
+ }
+ ts.textSpanOverlap = textSpanOverlap;
+ function textSpanIntersectsWithTextSpan(span, other) {
+ return other.start <= textSpanEnd(span) && textSpanEnd(other) >= span.start;
+ }
+ ts.textSpanIntersectsWithTextSpan = textSpanIntersectsWithTextSpan;
+ function textSpanIntersectsWith(span, start, length) {
+ var end = start + length;
+ return start <= textSpanEnd(span) && end >= span.start;
+ }
+ ts.textSpanIntersectsWith = textSpanIntersectsWith;
+ function decodedTextSpanIntersectsWith(start1, length1, start2, length2) {
+ var end1 = start1 + length1;
+ var end2 = start2 + length2;
+ return start2 <= end1 && end2 >= start1;
+ }
+ ts.decodedTextSpanIntersectsWith = decodedTextSpanIntersectsWith;
+ function textSpanIntersectsWithPosition(span, position) {
+ return position <= textSpanEnd(span) && position >= span.start;
+ }
+ ts.textSpanIntersectsWithPosition = textSpanIntersectsWithPosition;
+ function textSpanIntersection(span1, span2) {
+ var intersectStart = Math.max(span1.start, span2.start);
+ var intersectEnd = Math.min(textSpanEnd(span1), textSpanEnd(span2));
+ if (intersectStart <= intersectEnd) {
+ return createTextSpanFromBounds(intersectStart, intersectEnd);
+ }
+ return undefined;
+ }
+ ts.textSpanIntersection = textSpanIntersection;
+ function createTextSpan(start, length) {
+ if (start < 0) {
+ throw new Error("start < 0");
+ }
+ if (length < 0) {
+ throw new Error("length < 0");
+ }
+ return { start: start, length: length };
+ }
+ ts.createTextSpan = createTextSpan;
+ function createTextSpanFromBounds(start, end) {
+ return createTextSpan(start, end - start);
+ }
+ ts.createTextSpanFromBounds = createTextSpanFromBounds;
+ function textChangeRangeNewSpan(range) {
+ return createTextSpan(range.span.start, range.newLength);
+ }
+ ts.textChangeRangeNewSpan = textChangeRangeNewSpan;
+ function textChangeRangeIsUnchanged(range) {
+ return textSpanIsEmpty(range.span) && range.newLength === 0;
+ }
+ ts.textChangeRangeIsUnchanged = textChangeRangeIsUnchanged;
+ function createTextChangeRange(span, newLength) {
+ if (newLength < 0) {
+ throw new Error("newLength < 0");
+ }
+ return { span: span, newLength: newLength };
+ }
+ ts.createTextChangeRange = createTextChangeRange;
+ ts.unchangedTextChangeRange = createTextChangeRange(createTextSpan(0, 0), 0);
+ function collapseTextChangeRangesAcrossMultipleVersions(changes) {
+ if (changes.length === 0) {
+ return ts.unchangedTextChangeRange;
+ }
+ if (changes.length === 1) {
+ return changes[0];
+ }
+ var change0 = changes[0];
+ var oldStartN = change0.span.start;
+ var oldEndN = textSpanEnd(change0.span);
+ var newEndN = oldStartN + change0.newLength;
+ for (var i = 1; i < changes.length; i++) {
+ var nextChange = changes[i];
+ var oldStart1 = oldStartN;
+ var oldEnd1 = oldEndN;
+ var newEnd1 = newEndN;
+ var oldStart2 = nextChange.span.start;
+ var oldEnd2 = textSpanEnd(nextChange.span);
+ var newEnd2 = oldStart2 + nextChange.newLength;
+ oldStartN = Math.min(oldStart1, oldStart2);
+ oldEndN = Math.max(oldEnd1, oldEnd1 + (oldEnd2 - newEnd1));
+ newEndN = Math.max(newEnd2, newEnd2 + (newEnd1 - oldEnd2));
+ }
+ return createTextChangeRange(createTextSpanFromBounds(oldStartN, oldEndN), newEndN - oldStartN);
+ }
+ ts.collapseTextChangeRangesAcrossMultipleVersions = collapseTextChangeRangesAcrossMultipleVersions;
+ function getTypeParameterOwner(d) {
+ if (d && d.kind === 145) {
+ for (var current = d; current; current = current.parent) {
+ if (ts.isFunctionLike(current) || ts.isClassLike(current) || current.kind === 230) {
+ return current;
+ }
+ }
+ }
+ }
+ ts.getTypeParameterOwner = getTypeParameterOwner;
+ function isParameterPropertyDeclaration(node) {
+ return ts.hasModifier(node, 92) && node.parent.kind === 152 && ts.isClassLike(node.parent.parent);
+ }
+ ts.isParameterPropertyDeclaration = isParameterPropertyDeclaration;
+ function walkUpBindingElementsAndPatterns(node) {
+ while (node && (node.kind === 176 || ts.isBindingPattern(node))) {
+ node = node.parent;
+ }
+ return node;
+ }
+ function getCombinedModifierFlags(node) {
+ node = walkUpBindingElementsAndPatterns(node);
+ var flags = ts.getModifierFlags(node);
+ if (node.kind === 226) {
+ node = node.parent;
+ }
+ if (node && node.kind === 227) {
+ flags |= ts.getModifierFlags(node);
+ node = node.parent;
+ }
+ if (node && node.kind === 208) {
+ flags |= ts.getModifierFlags(node);
+ }
+ return flags;
+ }
+ ts.getCombinedModifierFlags = getCombinedModifierFlags;
+ function getCombinedNodeFlags(node) {
+ node = walkUpBindingElementsAndPatterns(node);
+ var flags = node.flags;
+ if (node.kind === 226) {
+ node = node.parent;
+ }
+ if (node && node.kind === 227) {
+ flags |= node.flags;
+ node = node.parent;
+ }
+ if (node && node.kind === 208) {
+ flags |= node.flags;
+ }
+ return flags;
+ }
+ ts.getCombinedNodeFlags = getCombinedNodeFlags;
+ function validateLocaleAndSetLanguage(locale, sys, errors) {
+ var matchResult = /^([a-z]+)([_\-]([a-z]+))?$/.exec(locale.toLowerCase());
+ if (!matchResult) {
+ if (errors) {
+ errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1, "en", "ja-jp"));
+ }
+ return;
+ }
+ var language = matchResult[1];
+ var territory = matchResult[3];
+ if (!trySetLanguageAndTerritory(language, territory, errors)) {
+ trySetLanguageAndTerritory(language, undefined, errors);
+ }
+ function trySetLanguageAndTerritory(language, territory, errors) {
+ var compilerFilePath = ts.normalizePath(sys.getExecutingFilePath());
+ var containingDirectoryPath = ts.getDirectoryPath(compilerFilePath);
+ var filePath = ts.combinePaths(containingDirectoryPath, language);
+ if (territory) {
+ filePath = filePath + "-" + territory;
+ }
+ filePath = sys.resolvePath(ts.combinePaths(filePath, "diagnosticMessages.generated.json"));
+ if (!sys.fileExists(filePath)) {
+ return false;
+ }
+ var fileContents = "";
+ try {
+ fileContents = sys.readFile(filePath);
+ }
+ catch (e) {
+ if (errors) {
+ errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Unable_to_open_file_0, filePath));
+ }
+ return false;
+ }
+ try {
+ ts.localizedDiagnosticMessages = JSON.parse(fileContents);
+ }
+ catch (e) {
+ if (errors) {
+ errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Corrupted_locale_file_0, filePath));
+ }
+ return false;
+ }
+ return true;
+ }
+ }
+ 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;
+ function getNameOfDeclaration(declaration) {
+ if (!declaration) {
+ return undefined;
+ }
+ if (declaration.kind === 194) {
+ var expr = declaration;
+ switch (ts.getSpecialPropertyAssignmentKind(expr)) {
+ case 1:
+ case 4:
+ case 5:
+ case 3:
+ return expr.left.name;
+ default:
+ return undefined;
+ }
+ }
+ else {
+ return declaration.name;
+ }
+ }
+ ts.getNameOfDeclaration = getNameOfDeclaration;
+})(ts || (ts = {}));
+(function (ts) {
+ function isNumericLiteral(node) {
+ return node.kind === 8;
+ }
+ ts.isNumericLiteral = isNumericLiteral;
+ function isStringLiteral(node) {
+ return node.kind === 9;
+ }
+ ts.isStringLiteral = isStringLiteral;
+ function isJsxText(node) {
+ return node.kind === 10;
+ }
+ ts.isJsxText = isJsxText;
+ function isRegularExpressionLiteral(node) {
+ return node.kind === 12;
+ }
+ ts.isRegularExpressionLiteral = isRegularExpressionLiteral;
function isNoSubstitutionTemplateLiteral(node) {
return node.kind === 13;
}
ts.isNoSubstitutionTemplateLiteral = isNoSubstitutionTemplateLiteral;
+ function isTemplateHead(node) {
+ return node.kind === 14;
+ }
+ ts.isTemplateHead = isTemplateHead;
+ function isTemplateMiddle(node) {
+ return node.kind === 15;
+ }
+ ts.isTemplateMiddle = isTemplateMiddle;
+ function isTemplateTail(node) {
+ return node.kind === 16;
+ }
+ ts.isTemplateTail = isTemplateTail;
+ function isIdentifier(node) {
+ return node.kind === 71;
+ }
+ ts.isIdentifier = isIdentifier;
+ function isQualifiedName(node) {
+ return node.kind === 143;
+ }
+ ts.isQualifiedName = isQualifiedName;
+ function isComputedPropertyName(node) {
+ return node.kind === 144;
+ }
+ ts.isComputedPropertyName = isComputedPropertyName;
+ function isTypeParameterDeclaration(node) {
+ return node.kind === 145;
+ }
+ ts.isTypeParameterDeclaration = isTypeParameterDeclaration;
+ function isParameter(node) {
+ return node.kind === 146;
+ }
+ ts.isParameter = isParameter;
+ function isDecorator(node) {
+ return node.kind === 147;
+ }
+ ts.isDecorator = isDecorator;
+ function isPropertySignature(node) {
+ return node.kind === 148;
+ }
+ ts.isPropertySignature = isPropertySignature;
+ function isPropertyDeclaration(node) {
+ return node.kind === 149;
+ }
+ ts.isPropertyDeclaration = isPropertyDeclaration;
+ function isMethodSignature(node) {
+ return node.kind === 150;
+ }
+ ts.isMethodSignature = isMethodSignature;
+ function isMethodDeclaration(node) {
+ return node.kind === 151;
+ }
+ ts.isMethodDeclaration = isMethodDeclaration;
+ function isConstructorDeclaration(node) {
+ return node.kind === 152;
+ }
+ ts.isConstructorDeclaration = isConstructorDeclaration;
+ function isGetAccessorDeclaration(node) {
+ return node.kind === 153;
+ }
+ ts.isGetAccessorDeclaration = isGetAccessorDeclaration;
+ function isSetAccessorDeclaration(node) {
+ return node.kind === 154;
+ }
+ ts.isSetAccessorDeclaration = isSetAccessorDeclaration;
+ function isCallSignatureDeclaration(node) {
+ return node.kind === 155;
+ }
+ ts.isCallSignatureDeclaration = isCallSignatureDeclaration;
+ function isConstructSignatureDeclaration(node) {
+ return node.kind === 156;
+ }
+ ts.isConstructSignatureDeclaration = isConstructSignatureDeclaration;
+ function isIndexSignatureDeclaration(node) {
+ return node.kind === 157;
+ }
+ ts.isIndexSignatureDeclaration = isIndexSignatureDeclaration;
+ function isTypePredicateNode(node) {
+ return node.kind === 158;
+ }
+ ts.isTypePredicateNode = isTypePredicateNode;
+ function isTypeReferenceNode(node) {
+ return node.kind === 159;
+ }
+ ts.isTypeReferenceNode = isTypeReferenceNode;
+ function isFunctionTypeNode(node) {
+ return node.kind === 160;
+ }
+ ts.isFunctionTypeNode = isFunctionTypeNode;
+ function isConstructorTypeNode(node) {
+ return node.kind === 161;
+ }
+ ts.isConstructorTypeNode = isConstructorTypeNode;
+ function isTypeQueryNode(node) {
+ return node.kind === 162;
+ }
+ ts.isTypeQueryNode = isTypeQueryNode;
+ function isTypeLiteralNode(node) {
+ return node.kind === 163;
+ }
+ ts.isTypeLiteralNode = isTypeLiteralNode;
+ function isArrayTypeNode(node) {
+ return node.kind === 164;
+ }
+ ts.isArrayTypeNode = isArrayTypeNode;
+ function isTupleTypeNode(node) {
+ return node.kind === 165;
+ }
+ ts.isTupleTypeNode = isTupleTypeNode;
+ function isUnionTypeNode(node) {
+ return node.kind === 166;
+ }
+ ts.isUnionTypeNode = isUnionTypeNode;
+ function isIntersectionTypeNode(node) {
+ return node.kind === 167;
+ }
+ ts.isIntersectionTypeNode = isIntersectionTypeNode;
+ function isParenthesizedTypeNode(node) {
+ return node.kind === 168;
+ }
+ ts.isParenthesizedTypeNode = isParenthesizedTypeNode;
+ function isThisTypeNode(node) {
+ return node.kind === 169;
+ }
+ ts.isThisTypeNode = isThisTypeNode;
+ function isTypeOperatorNode(node) {
+ return node.kind === 170;
+ }
+ ts.isTypeOperatorNode = isTypeOperatorNode;
+ function isIndexedAccessTypeNode(node) {
+ return node.kind === 171;
+ }
+ ts.isIndexedAccessTypeNode = isIndexedAccessTypeNode;
+ function isMappedTypeNode(node) {
+ return node.kind === 172;
+ }
+ ts.isMappedTypeNode = isMappedTypeNode;
+ function isLiteralTypeNode(node) {
+ return node.kind === 173;
+ }
+ ts.isLiteralTypeNode = isLiteralTypeNode;
+ function isObjectBindingPattern(node) {
+ return node.kind === 174;
+ }
+ ts.isObjectBindingPattern = isObjectBindingPattern;
+ function isArrayBindingPattern(node) {
+ return node.kind === 175;
+ }
+ ts.isArrayBindingPattern = isArrayBindingPattern;
+ function isBindingElement(node) {
+ return node.kind === 176;
+ }
+ ts.isBindingElement = isBindingElement;
+ function isArrayLiteralExpression(node) {
+ return node.kind === 177;
+ }
+ ts.isArrayLiteralExpression = isArrayLiteralExpression;
+ function isObjectLiteralExpression(node) {
+ return node.kind === 178;
+ }
+ ts.isObjectLiteralExpression = isObjectLiteralExpression;
+ function isPropertyAccessExpression(node) {
+ return node.kind === 179;
+ }
+ ts.isPropertyAccessExpression = isPropertyAccessExpression;
+ function isElementAccessExpression(node) {
+ return node.kind === 180;
+ }
+ ts.isElementAccessExpression = isElementAccessExpression;
+ function isCallExpression(node) {
+ return node.kind === 181;
+ }
+ ts.isCallExpression = isCallExpression;
+ function isNewExpression(node) {
+ return node.kind === 182;
+ }
+ ts.isNewExpression = isNewExpression;
+ function isTaggedTemplateExpression(node) {
+ return node.kind === 183;
+ }
+ ts.isTaggedTemplateExpression = isTaggedTemplateExpression;
+ function isTypeAssertion(node) {
+ return node.kind === 184;
+ }
+ ts.isTypeAssertion = isTypeAssertion;
+ function isParenthesizedExpression(node) {
+ return node.kind === 185;
+ }
+ ts.isParenthesizedExpression = isParenthesizedExpression;
+ function isFunctionExpression(node) {
+ return node.kind === 186;
+ }
+ ts.isFunctionExpression = isFunctionExpression;
+ function isArrowFunction(node) {
+ return node.kind === 187;
+ }
+ ts.isArrowFunction = isArrowFunction;
+ function isDeleteExpression(node) {
+ return node.kind === 188;
+ }
+ ts.isDeleteExpression = isDeleteExpression;
+ function isTypeOfExpression(node) {
+ return node.kind === 191;
+ }
+ ts.isTypeOfExpression = isTypeOfExpression;
+ function isVoidExpression(node) {
+ return node.kind === 190;
+ }
+ ts.isVoidExpression = isVoidExpression;
+ function isAwaitExpression(node) {
+ return node.kind === 191;
+ }
+ ts.isAwaitExpression = isAwaitExpression;
+ function isPrefixUnaryExpression(node) {
+ return node.kind === 192;
+ }
+ ts.isPrefixUnaryExpression = isPrefixUnaryExpression;
+ function isPostfixUnaryExpression(node) {
+ return node.kind === 193;
+ }
+ ts.isPostfixUnaryExpression = isPostfixUnaryExpression;
+ function isBinaryExpression(node) {
+ return node.kind === 194;
+ }
+ ts.isBinaryExpression = isBinaryExpression;
+ function isConditionalExpression(node) {
+ return node.kind === 195;
+ }
+ ts.isConditionalExpression = isConditionalExpression;
+ function isTemplateExpression(node) {
+ return node.kind === 196;
+ }
+ ts.isTemplateExpression = isTemplateExpression;
+ function isYieldExpression(node) {
+ return node.kind === 197;
+ }
+ ts.isYieldExpression = isYieldExpression;
+ function isSpreadElement(node) {
+ return node.kind === 198;
+ }
+ ts.isSpreadElement = isSpreadElement;
+ function isClassExpression(node) {
+ return node.kind === 199;
+ }
+ ts.isClassExpression = isClassExpression;
+ function isOmittedExpression(node) {
+ return node.kind === 200;
+ }
+ ts.isOmittedExpression = isOmittedExpression;
+ function isExpressionWithTypeArguments(node) {
+ return node.kind === 201;
+ }
+ ts.isExpressionWithTypeArguments = isExpressionWithTypeArguments;
+ function isAsExpression(node) {
+ return node.kind === 202;
+ }
+ ts.isAsExpression = isAsExpression;
+ function isNonNullExpression(node) {
+ return node.kind === 203;
+ }
+ ts.isNonNullExpression = isNonNullExpression;
+ function isMetaProperty(node) {
+ return node.kind === 204;
+ }
+ ts.isMetaProperty = isMetaProperty;
+ function isTemplateSpan(node) {
+ return node.kind === 205;
+ }
+ ts.isTemplateSpan = isTemplateSpan;
+ function isSemicolonClassElement(node) {
+ return node.kind === 206;
+ }
+ ts.isSemicolonClassElement = isSemicolonClassElement;
+ function isBlock(node) {
+ return node.kind === 207;
+ }
+ ts.isBlock = isBlock;
+ function isVariableStatement(node) {
+ return node.kind === 208;
+ }
+ ts.isVariableStatement = isVariableStatement;
+ function isEmptyStatement(node) {
+ return node.kind === 209;
+ }
+ ts.isEmptyStatement = isEmptyStatement;
+ function isExpressionStatement(node) {
+ return node.kind === 210;
+ }
+ ts.isExpressionStatement = isExpressionStatement;
+ function isIfStatement(node) {
+ return node.kind === 211;
+ }
+ ts.isIfStatement = isIfStatement;
+ function isDoStatement(node) {
+ return node.kind === 212;
+ }
+ ts.isDoStatement = isDoStatement;
+ function isWhileStatement(node) {
+ return node.kind === 213;
+ }
+ ts.isWhileStatement = isWhileStatement;
+ function isForStatement(node) {
+ return node.kind === 214;
+ }
+ ts.isForStatement = isForStatement;
+ function isForInStatement(node) {
+ return node.kind === 215;
+ }
+ ts.isForInStatement = isForInStatement;
+ function isForOfStatement(node) {
+ return node.kind === 216;
+ }
+ ts.isForOfStatement = isForOfStatement;
+ function isContinueStatement(node) {
+ return node.kind === 217;
+ }
+ ts.isContinueStatement = isContinueStatement;
+ function isBreakStatement(node) {
+ return node.kind === 218;
+ }
+ ts.isBreakStatement = isBreakStatement;
+ function isReturnStatement(node) {
+ return node.kind === 219;
+ }
+ ts.isReturnStatement = isReturnStatement;
+ function isWithStatement(node) {
+ return node.kind === 220;
+ }
+ ts.isWithStatement = isWithStatement;
+ function isSwitchStatement(node) {
+ return node.kind === 221;
+ }
+ ts.isSwitchStatement = isSwitchStatement;
+ function isLabeledStatement(node) {
+ return node.kind === 222;
+ }
+ ts.isLabeledStatement = isLabeledStatement;
+ function isThrowStatement(node) {
+ return node.kind === 223;
+ }
+ ts.isThrowStatement = isThrowStatement;
+ function isTryStatement(node) {
+ return node.kind === 224;
+ }
+ ts.isTryStatement = isTryStatement;
+ function isDebuggerStatement(node) {
+ return node.kind === 225;
+ }
+ ts.isDebuggerStatement = isDebuggerStatement;
+ function isVariableDeclaration(node) {
+ return node.kind === 226;
+ }
+ ts.isVariableDeclaration = isVariableDeclaration;
+ function isVariableDeclarationList(node) {
+ return node.kind === 227;
+ }
+ ts.isVariableDeclarationList = isVariableDeclarationList;
+ function isFunctionDeclaration(node) {
+ return node.kind === 228;
+ }
+ ts.isFunctionDeclaration = isFunctionDeclaration;
+ function isClassDeclaration(node) {
+ return node.kind === 229;
+ }
+ ts.isClassDeclaration = isClassDeclaration;
+ function isInterfaceDeclaration(node) {
+ return node.kind === 230;
+ }
+ ts.isInterfaceDeclaration = isInterfaceDeclaration;
+ function isTypeAliasDeclaration(node) {
+ return node.kind === 231;
+ }
+ ts.isTypeAliasDeclaration = isTypeAliasDeclaration;
+ function isEnumDeclaration(node) {
+ return node.kind === 232;
+ }
+ ts.isEnumDeclaration = isEnumDeclaration;
+ function isModuleDeclaration(node) {
+ return node.kind === 233;
+ }
+ ts.isModuleDeclaration = isModuleDeclaration;
+ function isModuleBlock(node) {
+ return node.kind === 234;
+ }
+ ts.isModuleBlock = isModuleBlock;
+ function isCaseBlock(node) {
+ return node.kind === 235;
+ }
+ ts.isCaseBlock = isCaseBlock;
+ function isNamespaceExportDeclaration(node) {
+ return node.kind === 236;
+ }
+ ts.isNamespaceExportDeclaration = isNamespaceExportDeclaration;
+ function isImportEqualsDeclaration(node) {
+ return node.kind === 237;
+ }
+ ts.isImportEqualsDeclaration = isImportEqualsDeclaration;
+ function isImportDeclaration(node) {
+ return node.kind === 238;
+ }
+ ts.isImportDeclaration = isImportDeclaration;
+ function isImportClause(node) {
+ return node.kind === 239;
+ }
+ ts.isImportClause = isImportClause;
+ function isNamespaceImport(node) {
+ return node.kind === 240;
+ }
+ ts.isNamespaceImport = isNamespaceImport;
+ function isNamedImports(node) {
+ return node.kind === 241;
+ }
+ ts.isNamedImports = isNamedImports;
+ function isImportSpecifier(node) {
+ return node.kind === 242;
+ }
+ ts.isImportSpecifier = isImportSpecifier;
+ function isExportAssignment(node) {
+ return node.kind === 243;
+ }
+ ts.isExportAssignment = isExportAssignment;
+ function isExportDeclaration(node) {
+ return node.kind === 244;
+ }
+ ts.isExportDeclaration = isExportDeclaration;
+ function isNamedExports(node) {
+ return node.kind === 245;
+ }
+ ts.isNamedExports = isNamedExports;
+ function isExportSpecifier(node) {
+ return node.kind === 246;
+ }
+ ts.isExportSpecifier = isExportSpecifier;
+ function isMissingDeclaration(node) {
+ return node.kind === 247;
+ }
+ ts.isMissingDeclaration = isMissingDeclaration;
+ function isExternalModuleReference(node) {
+ return node.kind === 248;
+ }
+ ts.isExternalModuleReference = isExternalModuleReference;
+ function isJsxElement(node) {
+ return node.kind === 249;
+ }
+ ts.isJsxElement = isJsxElement;
+ function isJsxSelfClosingElement(node) {
+ return node.kind === 250;
+ }
+ ts.isJsxSelfClosingElement = isJsxSelfClosingElement;
+ function isJsxOpeningElement(node) {
+ return node.kind === 251;
+ }
+ ts.isJsxOpeningElement = isJsxOpeningElement;
+ function isJsxClosingElement(node) {
+ return node.kind === 252;
+ }
+ ts.isJsxClosingElement = isJsxClosingElement;
+ function isJsxAttribute(node) {
+ return node.kind === 253;
+ }
+ ts.isJsxAttribute = isJsxAttribute;
+ function isJsxAttributes(node) {
+ return node.kind === 254;
+ }
+ ts.isJsxAttributes = isJsxAttributes;
+ function isJsxSpreadAttribute(node) {
+ return node.kind === 255;
+ }
+ ts.isJsxSpreadAttribute = isJsxSpreadAttribute;
+ function isJsxExpression(node) {
+ return node.kind === 256;
+ }
+ ts.isJsxExpression = isJsxExpression;
+ function isCaseClause(node) {
+ return node.kind === 257;
+ }
+ ts.isCaseClause = isCaseClause;
+ function isDefaultClause(node) {
+ return node.kind === 258;
+ }
+ ts.isDefaultClause = isDefaultClause;
+ function isHeritageClause(node) {
+ return node.kind === 259;
+ }
+ ts.isHeritageClause = isHeritageClause;
+ function isCatchClause(node) {
+ return node.kind === 260;
+ }
+ ts.isCatchClause = isCatchClause;
+ function isPropertyAssignment(node) {
+ return node.kind === 261;
+ }
+ ts.isPropertyAssignment = isPropertyAssignment;
+ function isShorthandPropertyAssignment(node) {
+ return node.kind === 262;
+ }
+ ts.isShorthandPropertyAssignment = isShorthandPropertyAssignment;
+ function isSpreadAssignment(node) {
+ return node.kind === 263;
+ }
+ ts.isSpreadAssignment = isSpreadAssignment;
+ function isEnumMember(node) {
+ return node.kind === 264;
+ }
+ ts.isEnumMember = isEnumMember;
+ function isSourceFile(node) {
+ return node.kind === 265;
+ }
+ ts.isSourceFile = isSourceFile;
+ function isBundle(node) {
+ return node.kind === 266;
+ }
+ ts.isBundle = isBundle;
+ function isJSDocTypeExpression(node) {
+ return node.kind === 267;
+ }
+ ts.isJSDocTypeExpression = isJSDocTypeExpression;
+ function isJSDocAllType(node) {
+ return node.kind === 268;
+ }
+ ts.isJSDocAllType = isJSDocAllType;
+ function isJSDocUnknownType(node) {
+ return node.kind === 269;
+ }
+ ts.isJSDocUnknownType = isJSDocUnknownType;
+ function isJSDocArrayType(node) {
+ return node.kind === 270;
+ }
+ ts.isJSDocArrayType = isJSDocArrayType;
+ function isJSDocUnionType(node) {
+ return node.kind === 271;
+ }
+ ts.isJSDocUnionType = isJSDocUnionType;
+ function isJSDocTupleType(node) {
+ return node.kind === 272;
+ }
+ ts.isJSDocTupleType = isJSDocTupleType;
+ function isJSDocNullableType(node) {
+ return node.kind === 273;
+ }
+ ts.isJSDocNullableType = isJSDocNullableType;
+ function isJSDocNonNullableType(node) {
+ return node.kind === 274;
+ }
+ ts.isJSDocNonNullableType = isJSDocNonNullableType;
+ function isJSDocRecordType(node) {
+ return node.kind === 275;
+ }
+ ts.isJSDocRecordType = isJSDocRecordType;
+ function isJSDocRecordMember(node) {
+ return node.kind === 276;
+ }
+ ts.isJSDocRecordMember = isJSDocRecordMember;
+ function isJSDocTypeReference(node) {
+ return node.kind === 277;
+ }
+ ts.isJSDocTypeReference = isJSDocTypeReference;
+ function isJSDocOptionalType(node) {
+ return node.kind === 278;
+ }
+ ts.isJSDocOptionalType = isJSDocOptionalType;
+ function isJSDocFunctionType(node) {
+ return node.kind === 279;
+ }
+ ts.isJSDocFunctionType = isJSDocFunctionType;
+ function isJSDocVariadicType(node) {
+ return node.kind === 280;
+ }
+ ts.isJSDocVariadicType = isJSDocVariadicType;
+ function isJSDocConstructorType(node) {
+ return node.kind === 281;
+ }
+ ts.isJSDocConstructorType = isJSDocConstructorType;
+ function isJSDocThisType(node) {
+ return node.kind === 282;
+ }
+ ts.isJSDocThisType = isJSDocThisType;
+ function isJSDoc(node) {
+ return node.kind === 283;
+ }
+ ts.isJSDoc = isJSDoc;
+ function isJSDocAugmentsTag(node) {
+ return node.kind === 285;
+ }
+ ts.isJSDocAugmentsTag = isJSDocAugmentsTag;
+ function isJSDocParameterTag(node) {
+ return node.kind === 287;
+ }
+ ts.isJSDocParameterTag = isJSDocParameterTag;
+ function isJSDocReturnTag(node) {
+ return node.kind === 288;
+ }
+ ts.isJSDocReturnTag = isJSDocReturnTag;
+ function isJSDocTypeTag(node) {
+ return node.kind === 289;
+ }
+ ts.isJSDocTypeTag = isJSDocTypeTag;
+ function isJSDocTemplateTag(node) {
+ return node.kind === 290;
+ }
+ ts.isJSDocTemplateTag = isJSDocTemplateTag;
+ function isJSDocTypedefTag(node) {
+ return node.kind === 291;
+ }
+ ts.isJSDocTypedefTag = isJSDocTypedefTag;
+ function isJSDocPropertyTag(node) {
+ return node.kind === 292;
+ }
+ ts.isJSDocPropertyTag = isJSDocPropertyTag;
+ function isJSDocTypeLiteral(node) {
+ return node.kind === 293;
+ }
+ ts.isJSDocTypeLiteral = isJSDocTypeLiteral;
+ function isJSDocLiteralType(node) {
+ return node.kind === 294;
+ }
+ ts.isJSDocLiteralType = isJSDocLiteralType;
+})(ts || (ts = {}));
+(function (ts) {
+ function isNode(node) {
+ return isNodeKind(node.kind);
+ }
+ ts.isNode = isNode;
+ function isNodeKind(kind) {
+ return kind >= 143;
+ }
+ ts.isNodeKind = isNodeKind;
+ function isToken(n) {
+ return n.kind >= 0 && n.kind <= 142;
+ }
+ ts.isToken = isToken;
+ function isNodeArray(array) {
+ return array.hasOwnProperty("pos")
+ && array.hasOwnProperty("end");
+ }
+ ts.isNodeArray = isNodeArray;
function isLiteralKind(kind) {
return 8 <= kind && kind <= 13;
}
ts.isLiteralKind = isLiteralKind;
- function isTextualLiteralKind(kind) {
- return kind === 9 || kind === 13;
- }
- ts.isTextualLiteralKind = isTextualLiteralKind;
function isLiteralExpression(node) {
return isLiteralKind(node.kind);
}
@@ -7836,40 +8983,38 @@ var ts;
return 13 <= kind && kind <= 16;
}
ts.isTemplateLiteralKind = isTemplateLiteralKind;
- function isTemplateHead(node) {
- return node.kind === 14;
- }
- ts.isTemplateHead = isTemplateHead;
function isTemplateMiddleOrTemplateTail(node) {
var kind = node.kind;
return kind === 15
|| kind === 16;
}
ts.isTemplateMiddleOrTemplateTail = isTemplateMiddleOrTemplateTail;
- function isIdentifier(node) {
- return node.kind === 71;
- }
- ts.isIdentifier = isIdentifier;
- function isVoidExpression(node) {
- return node.kind === 190;
- }
- ts.isVoidExpression = isVoidExpression;
function isGeneratedIdentifier(node) {
- return isIdentifier(node) && node.autoGenerateKind > 0;
+ return ts.isIdentifier(node) && node.autoGenerateKind > 0;
}
ts.isGeneratedIdentifier = isGeneratedIdentifier;
+ function isModifierKind(token) {
+ switch (token) {
+ case 117:
+ case 120:
+ case 76:
+ case 124:
+ case 79:
+ case 84:
+ case 114:
+ case 112:
+ case 113:
+ case 131:
+ case 115:
+ return true;
+ }
+ return false;
+ }
+ ts.isModifierKind = isModifierKind;
function isModifier(node) {
return isModifierKind(node.kind);
}
ts.isModifier = isModifier;
- function isQualifiedName(node) {
- return node.kind === 143;
- }
- ts.isQualifiedName = isQualifiedName;
- function isComputedPropertyName(node) {
- return node.kind === 144;
- }
- ts.isComputedPropertyName = isComputedPropertyName;
function isEntityName(node) {
var kind = node.kind;
return kind === 143
@@ -7884,12 +9029,6 @@ var ts;
|| kind === 144;
}
ts.isPropertyName = isPropertyName;
- function isModuleName(node) {
- var kind = node.kind;
- return kind === 71
- || kind === 9;
- }
- ts.isModuleName = isModuleName;
function isBindingName(node) {
var kind = node.kind;
return kind === 71
@@ -7897,22 +9036,30 @@ var ts;
|| kind === 175;
}
ts.isBindingName = isBindingName;
- function isTypeParameter(node) {
- return node.kind === 145;
- }
- ts.isTypeParameter = isTypeParameter;
- function isParameter(node) {
- return node.kind === 146;
- }
- ts.isParameter = isParameter;
- function isDecorator(node) {
- return node.kind === 147;
+ function isFunctionLike(node) {
+ return node && isFunctionLikeKind(node.kind);
}
- ts.isDecorator = isDecorator;
- function isMethodDeclaration(node) {
- return node.kind === 151;
+ ts.isFunctionLike = isFunctionLike;
+ function isFunctionLikeKind(kind) {
+ switch (kind) {
+ case 152:
+ case 186:
+ case 228:
+ case 187:
+ case 151:
+ case 150:
+ case 153:
+ case 154:
+ case 155:
+ case 156:
+ case 157:
+ case 160:
+ case 161:
+ return true;
+ }
+ return false;
}
- ts.isMethodDeclaration = isMethodDeclaration;
+ ts.isFunctionLikeKind = isFunctionLikeKind;
function isClassElement(node) {
var kind = node.kind;
return kind === 152
@@ -7921,9 +9068,28 @@ var ts;
|| kind === 153
|| kind === 154
|| kind === 157
- || kind === 206;
+ || kind === 206
+ || kind === 247;
}
ts.isClassElement = isClassElement;
+ function isClassLike(node) {
+ return node && (node.kind === 229 || node.kind === 199);
+ }
+ ts.isClassLike = isClassLike;
+ function isAccessor(node) {
+ return node && (node.kind === 153 || node.kind === 154);
+ }
+ ts.isAccessor = isAccessor;
+ function isTypeElement(node) {
+ var kind = node.kind;
+ return kind === 156
+ || kind === 155
+ || kind === 148
+ || kind === 150
+ || kind === 157
+ || kind === 247;
+ }
+ ts.isTypeElement = isTypeElement;
function isObjectLiteralElementLike(node) {
var kind = node.kind;
return kind === 261
@@ -7954,14 +9120,15 @@ var ts;
return isTypeNodeKind(node.kind);
}
ts.isTypeNode = isTypeNode;
- function isArrayBindingPattern(node) {
- return node.kind === 175;
- }
- ts.isArrayBindingPattern = isArrayBindingPattern;
- function isObjectBindingPattern(node) {
- return node.kind === 174;
+ function isFunctionOrConstructorTypeNode(node) {
+ switch (node.kind) {
+ case 160:
+ case 161:
+ return true;
+ }
+ return false;
}
- ts.isObjectBindingPattern = isObjectBindingPattern;
+ ts.isFunctionOrConstructorTypeNode = isFunctionOrConstructorTypeNode;
function isBindingPattern(node) {
if (node) {
var kind = node.kind;
@@ -7977,10 +9144,6 @@ var ts;
|| kind === 178;
}
ts.isAssignmentPattern = isAssignmentPattern;
- function isBindingElement(node) {
- return node.kind === 176;
- }
- ts.isBindingElement = isBindingElement;
function isArrayBindingElement(node) {
var kind = node.kind;
return kind === 176
@@ -8020,54 +9183,36 @@ var ts;
return false;
}
ts.isArrayBindingOrAssignmentPattern = isArrayBindingOrAssignmentPattern;
- function isArrayLiteralExpression(node) {
- return node.kind === 177;
- }
- ts.isArrayLiteralExpression = isArrayLiteralExpression;
- function isObjectLiteralExpression(node) {
- return node.kind === 178;
- }
- ts.isObjectLiteralExpression = isObjectLiteralExpression;
- function isPropertyAccessExpression(node) {
- return node.kind === 179;
- }
- ts.isPropertyAccessExpression = isPropertyAccessExpression;
function isPropertyAccessOrQualifiedName(node) {
var kind = node.kind;
return kind === 179
|| kind === 143;
}
ts.isPropertyAccessOrQualifiedName = isPropertyAccessOrQualifiedName;
- function isElementAccessExpression(node) {
- return node.kind === 180;
- }
- ts.isElementAccessExpression = isElementAccessExpression;
- function isBinaryExpression(node) {
- return node.kind === 194;
- }
- ts.isBinaryExpression = isBinaryExpression;
- function isConditionalExpression(node) {
- return node.kind === 195;
+ function isCallLikeExpression(node) {
+ switch (node.kind) {
+ case 251:
+ case 250:
+ case 181:
+ case 182:
+ case 183:
+ case 147:
+ return true;
+ default:
+ return false;
+ }
}
- ts.isConditionalExpression = isConditionalExpression;
- function isCallExpression(node) {
- return node.kind === 181;
+ ts.isCallLikeExpression = isCallLikeExpression;
+ function isCallOrNewExpression(node) {
+ return node.kind === 181 || node.kind === 182;
}
- ts.isCallExpression = isCallExpression;
+ ts.isCallOrNewExpression = isCallOrNewExpression;
function isTemplateLiteral(node) {
var kind = node.kind;
return kind === 196
|| kind === 13;
}
ts.isTemplateLiteral = isTemplateLiteral;
- function isSpreadExpression(node) {
- return node.kind === 198;
- }
- ts.isSpreadExpression = isSpreadExpression;
- function isExpressionWithTypeArguments(node) {
- return node.kind === 201;
- }
- ts.isExpressionWithTypeArguments = isExpressionWithTypeArguments;
function isLeftHandSideExpressionKind(kind) {
return kind === 179
|| kind === 180
@@ -8121,6 +9266,7 @@ var ts;
|| kind === 198
|| kind === 202
|| kind === 200
+ || kind === 298
|| isUnaryExpressionKind(kind);
}
function isExpression(node) {
@@ -8134,11 +9280,11 @@ var ts;
}
ts.isAssertionExpression = isAssertionExpression;
function isPartiallyEmittedExpression(node) {
- return node.kind === 296;
+ return node.kind === 297;
}
ts.isPartiallyEmittedExpression = isPartiallyEmittedExpression;
function isNotEmittedStatement(node) {
- return node.kind === 295;
+ return node.kind === 296;
}
ts.isNotEmittedStatement = isNotEmittedStatement;
function isNotEmittedOrPartiallyEmittedNode(node) {
@@ -8146,44 +9292,38 @@ var ts;
|| isPartiallyEmittedExpression(node);
}
ts.isNotEmittedOrPartiallyEmittedNode = isNotEmittedOrPartiallyEmittedNode;
- function isOmittedExpression(node) {
- return node.kind === 200;
- }
- ts.isOmittedExpression = isOmittedExpression;
- function isTemplateSpan(node) {
- return node.kind === 205;
+ function isIterationStatement(node, lookInLabeledStatements) {
+ switch (node.kind) {
+ case 214:
+ case 215:
+ case 216:
+ case 212:
+ case 213:
+ return true;
+ case 222:
+ return lookInLabeledStatements && isIterationStatement(node.statement, lookInLabeledStatements);
+ }
+ return false;
}
- ts.isTemplateSpan = isTemplateSpan;
- function isBlock(node) {
- return node.kind === 207;
+ ts.isIterationStatement = isIterationStatement;
+ function isForInOrOfStatement(node) {
+ return node.kind === 215 || node.kind === 216;
}
- ts.isBlock = isBlock;
+ ts.isForInOrOfStatement = isForInOrOfStatement;
function isConciseBody(node) {
- return isBlock(node)
+ return ts.isBlock(node)
|| isExpression(node);
}
ts.isConciseBody = isConciseBody;
function isFunctionBody(node) {
- return isBlock(node);
+ return ts.isBlock(node);
}
ts.isFunctionBody = isFunctionBody;
function isForInitializer(node) {
- return isVariableDeclarationList(node)
+ return ts.isVariableDeclarationList(node)
|| isExpression(node);
}
ts.isForInitializer = isForInitializer;
- function isVariableDeclaration(node) {
- return node.kind === 226;
- }
- ts.isVariableDeclaration = isVariableDeclaration;
- function isVariableDeclarationList(node) {
- return node.kind === 227;
- }
- ts.isVariableDeclarationList = isVariableDeclarationList;
- function isCaseBlock(node) {
- return node.kind === 235;
- }
- ts.isCaseBlock = isCaseBlock;
function isModuleBody(node) {
var kind = node.kind;
return kind === 234
@@ -8203,32 +9343,12 @@ var ts;
|| kind === 233;
}
ts.isJSDocNamespaceBody = isJSDocNamespaceBody;
- function isImportEqualsDeclaration(node) {
- return node.kind === 237;
- }
- ts.isImportEqualsDeclaration = isImportEqualsDeclaration;
- function isImportClause(node) {
- return node.kind === 239;
- }
- ts.isImportClause = isImportClause;
function isNamedImportBindings(node) {
var kind = node.kind;
return kind === 241
|| kind === 240;
}
ts.isNamedImportBindings = isNamedImportBindings;
- function isImportSpecifier(node) {
- return node.kind === 242;
- }
- ts.isImportSpecifier = isImportSpecifier;
- function isNamedExports(node) {
- return node.kind === 245;
- }
- ts.isNamedExports = isNamedExports;
- function isExportSpecifier(node) {
- return node.kind === 246;
- }
- ts.isExportSpecifier = isExportSpecifier;
function isModuleOrEnumDeclaration(node) {
return node.kind === 233 || node.kind === 232;
}
@@ -8264,7 +9384,7 @@ var ts;
|| kind === 231
|| kind === 145
|| kind === 226
- || kind === 290;
+ || kind === 291;
}
function isDeclarationStatementKind(kind) {
return kind === 228
@@ -8299,11 +9419,14 @@ var ts;
|| kind === 208
|| kind === 213
|| kind === 220
- || kind === 295
- || kind === 298
- || kind === 297;
+ || kind === 296
+ || kind === 300
+ || kind === 299;
}
function isDeclaration(node) {
+ if (node.kind === 145) {
+ return node.parent.kind !== 290 || ts.isInJavaScriptFile(node);
+ }
return isDeclarationKind(node.kind);
}
ts.isDeclaration = isDeclaration;
@@ -8329,14 +9452,6 @@ var ts;
|| kind === 71;
}
ts.isModuleReference = isModuleReference;
- function isJsxOpeningElement(node) {
- return node.kind === 251;
- }
- ts.isJsxOpeningElement = isJsxOpeningElement;
- function isJsxClosingElement(node) {
- return node.kind === 252;
- }
- ts.isJsxClosingElement = isJsxClosingElement;
function isJsxTagNameExpression(node) {
var kind = node.kind;
return kind === 99
@@ -8352,25 +9467,12 @@ var ts;
|| kind === 10;
}
ts.isJsxChild = isJsxChild;
- function isJsxAttributes(node) {
- var kind = node.kind;
- return kind === 254;
- }
- ts.isJsxAttributes = isJsxAttributes;
function isJsxAttributeLike(node) {
var kind = node.kind;
return kind === 253
|| kind === 255;
}
ts.isJsxAttributeLike = isJsxAttributeLike;
- function isJsxSpreadAttribute(node) {
- return node.kind === 255;
- }
- ts.isJsxSpreadAttribute = isJsxSpreadAttribute;
- function isJsxAttribute(node) {
- return node.kind === 253;
- }
- ts.isJsxAttribute = isJsxAttribute;
function isStringLiteralOrJsxExpression(node) {
var kind = node.kind;
return kind === 9
@@ -8389,293 +9491,18 @@ var ts;
|| kind === 258;
}
ts.isCaseOrDefaultClause = isCaseOrDefaultClause;
- function isHeritageClause(node) {
- return node.kind === 259;
- }
- ts.isHeritageClause = isHeritageClause;
- function isCatchClause(node) {
- return node.kind === 260;
- }
- ts.isCatchClause = isCatchClause;
- function isPropertyAssignment(node) {
- return node.kind === 261;
- }
- ts.isPropertyAssignment = isPropertyAssignment;
- function isShorthandPropertyAssignment(node) {
- return node.kind === 262;
- }
- ts.isShorthandPropertyAssignment = isShorthandPropertyAssignment;
- function isEnumMember(node) {
- return node.kind === 264;
- }
- ts.isEnumMember = isEnumMember;
- function isSourceFile(node) {
- return node.kind === 265;
- }
- ts.isSourceFile = isSourceFile;
- function isWatchSet(options) {
- return options.watch && options.hasOwnProperty("watch");
- }
- ts.isWatchSet = isWatchSet;
-})(ts || (ts = {}));
-(function (ts) {
- function getDefaultLibFileName(options) {
- switch (options.target) {
- case 5:
- return "lib.esnext.full.d.ts";
- case 4:
- return "lib.es2017.full.d.ts";
- case 3:
- return "lib.es2016.full.d.ts";
- case 2:
- return "lib.es6.d.ts";
- default:
- return "lib.d.ts";
- }
- }
- ts.getDefaultLibFileName = getDefaultLibFileName;
- function textSpanEnd(span) {
- return span.start + span.length;
- }
- ts.textSpanEnd = textSpanEnd;
- function textSpanIsEmpty(span) {
- return span.length === 0;
- }
- ts.textSpanIsEmpty = textSpanIsEmpty;
- function textSpanContainsPosition(span, position) {
- return position >= span.start && position < textSpanEnd(span);
- }
- ts.textSpanContainsPosition = textSpanContainsPosition;
- function textSpanContainsTextSpan(span, other) {
- return other.start >= span.start && textSpanEnd(other) <= textSpanEnd(span);
- }
- ts.textSpanContainsTextSpan = textSpanContainsTextSpan;
- function textSpanOverlapsWith(span, other) {
- var overlapStart = Math.max(span.start, other.start);
- var overlapEnd = Math.min(textSpanEnd(span), textSpanEnd(other));
- return overlapStart < overlapEnd;
- }
- ts.textSpanOverlapsWith = textSpanOverlapsWith;
- function textSpanOverlap(span1, span2) {
- var overlapStart = Math.max(span1.start, span2.start);
- var overlapEnd = Math.min(textSpanEnd(span1), textSpanEnd(span2));
- if (overlapStart < overlapEnd) {
- return createTextSpanFromBounds(overlapStart, overlapEnd);
- }
- return undefined;
- }
- ts.textSpanOverlap = textSpanOverlap;
- function textSpanIntersectsWithTextSpan(span, other) {
- return other.start <= textSpanEnd(span) && textSpanEnd(other) >= span.start;
- }
- ts.textSpanIntersectsWithTextSpan = textSpanIntersectsWithTextSpan;
- function textSpanIntersectsWith(span, start, length) {
- var end = start + length;
- return start <= textSpanEnd(span) && end >= span.start;
- }
- ts.textSpanIntersectsWith = textSpanIntersectsWith;
- function decodedTextSpanIntersectsWith(start1, length1, start2, length2) {
- var end1 = start1 + length1;
- var end2 = start2 + length2;
- return start2 <= end1 && end2 >= start1;
- }
- ts.decodedTextSpanIntersectsWith = decodedTextSpanIntersectsWith;
- function textSpanIntersectsWithPosition(span, position) {
- return position <= textSpanEnd(span) && position >= span.start;
- }
- ts.textSpanIntersectsWithPosition = textSpanIntersectsWithPosition;
- function textSpanIntersection(span1, span2) {
- var intersectStart = Math.max(span1.start, span2.start);
- var intersectEnd = Math.min(textSpanEnd(span1), textSpanEnd(span2));
- if (intersectStart <= intersectEnd) {
- return createTextSpanFromBounds(intersectStart, intersectEnd);
- }
- return undefined;
- }
- ts.textSpanIntersection = textSpanIntersection;
- function createTextSpan(start, length) {
- if (start < 0) {
- throw new Error("start < 0");
- }
- if (length < 0) {
- throw new Error("length < 0");
- }
- return { start: start, length: length };
- }
- ts.createTextSpan = createTextSpan;
- function createTextSpanFromBounds(start, end) {
- return createTextSpan(start, end - start);
- }
- ts.createTextSpanFromBounds = createTextSpanFromBounds;
- function textChangeRangeNewSpan(range) {
- return createTextSpan(range.span.start, range.newLength);
- }
- ts.textChangeRangeNewSpan = textChangeRangeNewSpan;
- function textChangeRangeIsUnchanged(range) {
- return textSpanIsEmpty(range.span) && range.newLength === 0;
- }
- ts.textChangeRangeIsUnchanged = textChangeRangeIsUnchanged;
- function createTextChangeRange(span, newLength) {
- if (newLength < 0) {
- throw new Error("newLength < 0");
- }
- return { span: span, newLength: newLength };
- }
- ts.createTextChangeRange = createTextChangeRange;
- ts.unchangedTextChangeRange = createTextChangeRange(createTextSpan(0, 0), 0);
- function collapseTextChangeRangesAcrossMultipleVersions(changes) {
- if (changes.length === 0) {
- return ts.unchangedTextChangeRange;
- }
- if (changes.length === 1) {
- return changes[0];
- }
- var change0 = changes[0];
- var oldStartN = change0.span.start;
- var oldEndN = textSpanEnd(change0.span);
- var newEndN = oldStartN + change0.newLength;
- for (var i = 1; i < changes.length; i++) {
- var nextChange = changes[i];
- var oldStart1 = oldStartN;
- var oldEnd1 = oldEndN;
- var newEnd1 = newEndN;
- var oldStart2 = nextChange.span.start;
- var oldEnd2 = textSpanEnd(nextChange.span);
- var newEnd2 = oldStart2 + nextChange.newLength;
- oldStartN = Math.min(oldStart1, oldStart2);
- oldEndN = Math.max(oldEnd1, oldEnd1 + (oldEnd2 - newEnd1));
- newEndN = Math.max(newEnd2, newEnd2 + (newEnd1 - oldEnd2));
- }
- return createTextChangeRange(createTextSpanFromBounds(oldStartN, oldEndN), newEndN - oldStartN);
- }
- ts.collapseTextChangeRangesAcrossMultipleVersions = collapseTextChangeRangesAcrossMultipleVersions;
- function getTypeParameterOwner(d) {
- if (d && d.kind === 145) {
- for (var current = d; current; current = current.parent) {
- if (ts.isFunctionLike(current) || ts.isClassLike(current) || current.kind === 230) {
- return current;
- }
- }
- }
- }
- ts.getTypeParameterOwner = getTypeParameterOwner;
- function isParameterPropertyDeclaration(node) {
- return ts.hasModifier(node, 92) && node.parent.kind === 152 && ts.isClassLike(node.parent.parent);
- }
- ts.isParameterPropertyDeclaration = isParameterPropertyDeclaration;
- function walkUpBindingElementsAndPatterns(node) {
- while (node && (node.kind === 176 || ts.isBindingPattern(node))) {
- node = node.parent;
- }
- return node;
- }
- function getCombinedModifierFlags(node) {
- node = walkUpBindingElementsAndPatterns(node);
- var flags = ts.getModifierFlags(node);
- if (node.kind === 226) {
- node = node.parent;
- }
- if (node && node.kind === 227) {
- flags |= ts.getModifierFlags(node);
- node = node.parent;
- }
- if (node && node.kind === 208) {
- flags |= ts.getModifierFlags(node);
- }
- return flags;
- }
- ts.getCombinedModifierFlags = getCombinedModifierFlags;
- function getCombinedNodeFlags(node) {
- node = walkUpBindingElementsAndPatterns(node);
- var flags = node.flags;
- if (node.kind === 226) {
- node = node.parent;
- }
- if (node && node.kind === 227) {
- flags |= node.flags;
- node = node.parent;
- }
- if (node && node.kind === 208) {
- flags |= node.flags;
- }
- return flags;
- }
- ts.getCombinedNodeFlags = getCombinedNodeFlags;
- function validateLocaleAndSetLanguage(locale, sys, errors) {
- var matchResult = /^([a-z]+)([_\-]([a-z]+))?$/.exec(locale.toLowerCase());
- if (!matchResult) {
- if (errors) {
- errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1, "en", "ja-jp"));
- }
- return;
- }
- var language = matchResult[1];
- var territory = matchResult[3];
- if (!trySetLanguageAndTerritory(language, territory, errors)) {
- trySetLanguageAndTerritory(language, undefined, errors);
- }
- function trySetLanguageAndTerritory(language, territory, errors) {
- var compilerFilePath = ts.normalizePath(sys.getExecutingFilePath());
- var containingDirectoryPath = ts.getDirectoryPath(compilerFilePath);
- var filePath = ts.combinePaths(containingDirectoryPath, language);
- if (territory) {
- filePath = filePath + "-" + territory;
- }
- filePath = sys.resolvePath(ts.combinePaths(filePath, "diagnosticMessages.generated.json"));
- if (!sys.fileExists(filePath)) {
- return false;
- }
- var fileContents = "";
- try {
- fileContents = sys.readFile(filePath);
- }
- catch (e) {
- if (errors) {
- errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Unable_to_open_file_0, filePath));
- }
- return false;
- }
- try {
- ts.localizedDiagnosticMessages = JSON.parse(fileContents);
- }
- catch (e) {
- if (errors) {
- errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Corrupted_locale_file_0, filePath));
- }
- return false;
- }
- return true;
- }
- }
- 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;
+ function isJSDocNode(node) {
+ return node.kind >= 267 && node.kind <= 294;
}
- 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.isJSDocNode = isJSDocNode;
+ function isJSDocCommentContainingNode(node) {
+ return node.kind === 283 || isJSDocTag(node);
}
- 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.isJSDocCommentContainingNode = isJSDocCommentContainingNode;
+ function isJSDocTag(node) {
+ return node.kind >= 284 && node.kind <= 294;
}
- ts.unescapeIdentifier = unescapeIdentifier;
+ ts.isJSDocTag = isJSDocTag;
})(ts || (ts = {}));
var ts;
(function (ts) {
@@ -8755,15 +9582,24 @@ var ts;
node.textSourceNode = sourceNode;
return node;
}
- function createIdentifier(text) {
+ function createIdentifier(text, typeArguments) {
var node = createSynthesizedNode(71);
node.text = ts.escapeIdentifier(text);
node.originalKeywordKind = text ? ts.stringToToken(text) : 0;
node.autoGenerateKind = 0;
node.autoGenerateId = 0;
+ if (typeArguments) {
+ node.typeArguments = createNodeArray(typeArguments);
+ }
return node;
}
ts.createIdentifier = createIdentifier;
+ function updateIdentifier(node, typeArguments) {
+ return node.typeArguments !== typeArguments
+ ? updateNode(createIdentifier(node.text, typeArguments), node)
+ : node;
+ }
+ ts.updateIdentifier = updateIdentifier;
var nextAutoGenerateId = 0;
function createTempVariable(recordTempVariable) {
var name = createIdentifier("");
@@ -8851,225 +9687,12 @@ var ts;
: node;
}
ts.updateComputedPropertyName = updateComputedPropertyName;
- 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(160, 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(161, 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(155, 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(156, 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(150, 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(169);
- }
- ts.createThisTypeNode = createThisTypeNode;
- function createLiteralTypeNode(literal) {
- var literalTypeNode = createSynthesizedNode(173);
- 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(159);
- 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(158);
- 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(162);
- 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(164);
- 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(163);
- 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(165);
- 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(172);
- 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(170);
- typeOperatorNode.operator = 127;
- 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(171);
- 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(145);
- typeParameter.name = asName(name);
- typeParameter.constraint = constraint;
- typeParameter.default = defaultType;
- return typeParameter;
+ var node = createSynthesizedNode(145);
+ node.name = asName(name);
+ node.constraint = constraint;
+ node.default = defaultType;
+ return node;
}
ts.createTypeParameterDeclaration = createTypeParameterDeclaration;
function updateTypeParameterDeclaration(node, name, constraint, defaultType) {
@@ -9080,42 +9703,6 @@ var ts;
: node;
}
ts.updateTypeParameterDeclaration = updateTypeParameterDeclaration;
- function createPropertySignature(name, questionToken, type, initializer) {
- var propertySignature = createSynthesizedNode(148);
- 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(157);
- 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(146);
node.decorators = asNodeArray(decorators);
@@ -9152,6 +9739,26 @@ var ts;
: node;
}
ts.updateDecorator = updateDecorator;
+ function createPropertySignature(modifiers, name, questionToken, type, initializer) {
+ var node = createSynthesizedNode(148);
+ node.modifiers = asNodeArray(modifiers);
+ node.name = asName(name);
+ node.questionToken = questionToken;
+ node.type = type;
+ node.initializer = initializer;
+ return node;
+ }
+ ts.createPropertySignature = createPropertySignature;
+ function updatePropertySignature(node, modifiers, name, questionToken, type, initializer) {
+ return node.modifiers !== modifiers
+ || node.name !== name
+ || node.questionToken !== questionToken
+ || node.type !== type
+ || node.initializer !== initializer
+ ? updateNode(createPropertySignature(modifiers, name, questionToken, type, initializer), node)
+ : node;
+ }
+ ts.updatePropertySignature = updatePropertySignature;
function createProperty(decorators, modifiers, name, questionToken, type, initializer) {
var node = createSynthesizedNode(149);
node.decorators = asNodeArray(decorators);
@@ -9173,7 +9780,24 @@ var ts;
: node;
}
ts.updateProperty = updateProperty;
- function createMethodDeclaration(decorators, modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body) {
+ function createMethodSignature(typeParameters, parameters, type, name, questionToken) {
+ var node = createSignatureDeclaration(150, typeParameters, parameters, type);
+ node.name = asName(name);
+ node.questionToken = questionToken;
+ return node;
+ }
+ 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 createMethod(decorators, modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body) {
var node = createSynthesizedNode(151);
node.decorators = asNodeArray(decorators);
node.modifiers = asNodeArray(modifiers);
@@ -9186,7 +9810,7 @@ var ts;
node.body = body;
return node;
}
- ts.createMethodDeclaration = createMethodDeclaration;
+ ts.createMethod = createMethod;
function updateMethod(node, decorators, modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body) {
return node.decorators !== decorators
|| node.modifiers !== modifiers
@@ -9196,7 +9820,7 @@ var ts;
|| node.parameters !== parameters
|| node.type !== type
|| node.body !== body
- ? updateNode(createMethodDeclaration(decorators, modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body), node)
+ ? updateNode(createMethod(decorators, modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body), node)
: node;
}
ts.updateMethod = updateMethod;
@@ -9264,6 +9888,249 @@ var ts;
: node;
}
ts.updateSetAccessor = updateSetAccessor;
+ function createCallSignature(typeParameters, parameters, type) {
+ return createSignatureDeclaration(155, typeParameters, parameters, type);
+ }
+ ts.createCallSignature = createCallSignature;
+ function updateCallSignature(node, typeParameters, parameters, type) {
+ return updateSignatureDeclaration(node, typeParameters, parameters, type);
+ }
+ ts.updateCallSignature = updateCallSignature;
+ function createConstructSignature(typeParameters, parameters, type) {
+ return createSignatureDeclaration(156, typeParameters, parameters, type);
+ }
+ ts.createConstructSignature = createConstructSignature;
+ function updateConstructSignature(node, typeParameters, parameters, type) {
+ return updateSignatureDeclaration(node, typeParameters, parameters, type);
+ }
+ ts.updateConstructSignature = updateConstructSignature;
+ function createIndexSignature(decorators, modifiers, parameters, type) {
+ var node = createSynthesizedNode(157);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
+ node.parameters = createNodeArray(parameters);
+ node.type = type;
+ return node;
+ }
+ ts.createIndexSignature = createIndexSignature;
+ function updateIndexSignature(node, decorators, modifiers, parameters, type) {
+ return node.parameters !== parameters
+ || node.type !== type
+ || node.decorators !== decorators
+ || node.modifiers !== modifiers
+ ? updateNode(createIndexSignature(decorators, modifiers, parameters, type), node)
+ : node;
+ }
+ ts.updateIndexSignature = updateIndexSignature;
+ function createSignatureDeclaration(kind, typeParameters, parameters, type) {
+ var node = createSynthesizedNode(kind);
+ node.typeParameters = asNodeArray(typeParameters);
+ node.parameters = asNodeArray(parameters);
+ node.type = type;
+ return node;
+ }
+ 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 createKeywordTypeNode(kind) {
+ return createSynthesizedNode(kind);
+ }
+ ts.createKeywordTypeNode = createKeywordTypeNode;
+ function createTypePredicateNode(parameterName, type) {
+ var node = createSynthesizedNode(158);
+ node.parameterName = asName(parameterName);
+ node.type = type;
+ return node;
+ }
+ 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 createTypeReferenceNode(typeName, typeArguments) {
+ var node = createSynthesizedNode(159);
+ node.typeName = asName(typeName);
+ node.typeArguments = typeArguments && ts.parenthesizeTypeParameters(typeArguments);
+ return node;
+ }
+ 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 createFunctionTypeNode(typeParameters, parameters, type) {
+ return createSignatureDeclaration(160, 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(161, typeParameters, parameters, type);
+ }
+ ts.createConstructorTypeNode = createConstructorTypeNode;
+ function updateConstructorTypeNode(node, typeParameters, parameters, type) {
+ return updateSignatureDeclaration(node, typeParameters, parameters, type);
+ }
+ ts.updateConstructorTypeNode = updateConstructorTypeNode;
+ function createTypeQueryNode(exprName) {
+ var node = createSynthesizedNode(162);
+ node.exprName = exprName;
+ return node;
+ }
+ ts.createTypeQueryNode = createTypeQueryNode;
+ function updateTypeQueryNode(node, exprName) {
+ return node.exprName !== exprName
+ ? updateNode(createTypeQueryNode(exprName), node)
+ : node;
+ }
+ ts.updateTypeQueryNode = updateTypeQueryNode;
+ function createTypeLiteralNode(members) {
+ var node = createSynthesizedNode(163);
+ node.members = createNodeArray(members);
+ return node;
+ }
+ ts.createTypeLiteralNode = createTypeLiteralNode;
+ function updateTypeLiteralNode(node, members) {
+ return node.members !== members
+ ? updateNode(createTypeLiteralNode(members), node)
+ : node;
+ }
+ ts.updateTypeLiteralNode = updateTypeLiteralNode;
+ function createArrayTypeNode(elementType) {
+ var node = createSynthesizedNode(164);
+ node.elementType = ts.parenthesizeElementTypeMember(elementType);
+ return node;
+ }
+ ts.createArrayTypeNode = createArrayTypeNode;
+ function updateArrayTypeNode(node, elementType) {
+ return node.elementType !== elementType
+ ? updateNode(createArrayTypeNode(elementType), node)
+ : node;
+ }
+ ts.updateArrayTypeNode = updateArrayTypeNode;
+ function createTupleTypeNode(elementTypes) {
+ var node = createSynthesizedNode(165);
+ node.elementTypes = createNodeArray(elementTypes);
+ return node;
+ }
+ ts.createTupleTypeNode = createTupleTypeNode;
+ function updateTypleTypeNode(node, elementTypes) {
+ return node.elementTypes !== elementTypes
+ ? updateNode(createTupleTypeNode(elementTypes), node)
+ : node;
+ }
+ ts.updateTypleTypeNode = updateTypleTypeNode;
+ function createUnionTypeNode(types) {
+ return createUnionOrIntersectionTypeNode(166, types);
+ }
+ ts.createUnionTypeNode = createUnionTypeNode;
+ function updateUnionTypeNode(node, types) {
+ return updateUnionOrIntersectionTypeNode(node, types);
+ }
+ ts.updateUnionTypeNode = updateUnionTypeNode;
+ function createIntersectionTypeNode(types) {
+ return createUnionOrIntersectionTypeNode(167, types);
+ }
+ ts.createIntersectionTypeNode = createIntersectionTypeNode;
+ function updateIntersectionTypeNode(node, types) {
+ return updateUnionOrIntersectionTypeNode(node, types);
+ }
+ ts.updateIntersectionTypeNode = updateIntersectionTypeNode;
+ function createUnionOrIntersectionTypeNode(kind, types) {
+ var node = createSynthesizedNode(kind);
+ node.types = ts.parenthesizeElementTypeMembers(types);
+ return node;
+ }
+ ts.createUnionOrIntersectionTypeNode = createUnionOrIntersectionTypeNode;
+ function updateUnionOrIntersectionTypeNode(node, types) {
+ return node.types !== types
+ ? updateNode(createUnionOrIntersectionTypeNode(node.kind, types), node)
+ : node;
+ }
+ function createParenthesizedType(type) {
+ var node = createSynthesizedNode(168);
+ node.type = type;
+ return node;
+ }
+ ts.createParenthesizedType = createParenthesizedType;
+ function updateParenthesizedType(node, type) {
+ return node.type !== type
+ ? updateNode(createParenthesizedType(type), node)
+ : node;
+ }
+ ts.updateParenthesizedType = updateParenthesizedType;
+ function createThisTypeNode() {
+ return createSynthesizedNode(169);
+ }
+ ts.createThisTypeNode = createThisTypeNode;
+ function createTypeOperatorNode(type) {
+ var node = createSynthesizedNode(170);
+ node.operator = 127;
+ node.type = ts.parenthesizeElementTypeMember(type);
+ return node;
+ }
+ ts.createTypeOperatorNode = createTypeOperatorNode;
+ function updateTypeOperatorNode(node, type) {
+ return node.type !== type ? updateNode(createTypeOperatorNode(type), node) : node;
+ }
+ ts.updateTypeOperatorNode = updateTypeOperatorNode;
+ function createIndexedAccessTypeNode(objectType, indexType) {
+ var node = createSynthesizedNode(171);
+ node.objectType = ts.parenthesizeElementTypeMember(objectType);
+ node.indexType = indexType;
+ return node;
+ }
+ 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 createMappedTypeNode(readonlyToken, typeParameter, questionToken, type) {
+ var node = createSynthesizedNode(172);
+ node.readonlyToken = readonlyToken;
+ node.typeParameter = typeParameter;
+ node.questionToken = questionToken;
+ node.type = type;
+ return node;
+ }
+ 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 createLiteralTypeNode(literal) {
+ var node = createSynthesizedNode(173);
+ node.literal = literal;
+ return node;
+ }
+ ts.createLiteralTypeNode = createLiteralTypeNode;
+ function updateLiteralTypeNode(node, literal) {
+ return node.literal !== literal
+ ? updateNode(createLiteralTypeNode(literal), node)
+ : node;
+ }
+ ts.updateLiteralTypeNode = updateLiteralTypeNode;
function createObjectBindingPattern(elements) {
var node = createSynthesizedNode(174);
node.elements = createNodeArray(elements);
@@ -9309,9 +10176,8 @@ var ts;
function createArrayLiteral(elements, multiLine) {
var node = createSynthesizedNode(177);
node.elements = ts.parenthesizeListElements(createNodeArray(elements));
- if (multiLine) {
+ if (multiLine)
node.multiLine = true;
- }
return node;
}
ts.createArrayLiteral = createArrayLiteral;
@@ -9324,9 +10190,8 @@ var ts;
function createObjectLiteral(properties, multiLine) {
var node = createSynthesizedNode(178);
node.properties = createNodeArray(properties);
- if (multiLine) {
+ if (multiLine)
node.multiLine = true;
- }
return node;
}
ts.createObjectLiteral = createObjectLiteral;
@@ -9340,7 +10205,7 @@ var ts;
var node = createSynthesizedNode(179);
node.expression = ts.parenthesizeForAccess(expression);
node.name = asName(name);
- setEmitFlags(node, 65536);
+ setEmitFlags(node, 131072);
return node;
}
ts.createPropertyAccess = createPropertyAccess;
@@ -9374,9 +10239,9 @@ var ts;
}
ts.createCall = createCall;
function updateCall(node, expression, typeArguments, argumentsArray) {
- return expression !== node.expression
- || typeArguments !== node.typeArguments
- || argumentsArray !== node.arguments
+ return node.expression !== expression
+ || node.typeArguments !== typeArguments
+ || node.arguments !== argumentsArray
? updateNode(createCall(expression, typeArguments, argumentsArray), node)
: node;
}
@@ -9566,10 +10431,10 @@ var ts;
return node;
}
ts.createBinary = createBinary;
- function updateBinary(node, left, right) {
+ function updateBinary(node, left, right, operator) {
return node.left !== left
|| node.right !== right
- ? updateNode(createBinary(left, node.operatorToken, right), node)
+ ? updateNode(createBinary(left, operator || node.operatorToken, right), node)
: node;
}
ts.updateBinary = updateBinary;
@@ -9696,6 +10561,19 @@ var ts;
: node;
}
ts.updateNonNullExpression = updateNonNullExpression;
+ function createMetaProperty(keywordToken, name) {
+ var node = createSynthesizedNode(204);
+ node.keywordToken = keywordToken;
+ node.name = name;
+ return node;
+ }
+ ts.createMetaProperty = createMetaProperty;
+ function updateMetaProperty(node, name) {
+ return node.name !== name
+ ? updateNode(createMetaProperty(node.keywordToken, name), node)
+ : node;
+ }
+ ts.updateMetaProperty = updateMetaProperty;
function createTemplateSpan(expression, literal) {
var node = createSynthesizedNode(205);
node.expression = expression;
@@ -9710,6 +10588,10 @@ var ts;
: node;
}
ts.updateTemplateSpan = updateTemplateSpan;
+ function createSemicolonClassElement() {
+ return createSynthesizedNode(206);
+ }
+ ts.createSemicolonClassElement = createSemicolonClassElement;
function createBlock(statements, multiLine) {
var block = createSynthesizedNode(207);
block.statements = createNodeArray(statements);
@@ -9719,7 +10601,7 @@ var ts;
}
ts.createBlock = createBlock;
function updateBlock(node, statements) {
- return statements !== node.statements
+ return node.statements !== statements
? updateNode(createBlock(statements, node.multiLine), node)
: node;
}
@@ -9739,35 +10621,6 @@ var ts;
: node;
}
ts.updateVariableStatement = updateVariableStatement;
- function createVariableDeclarationList(declarations, flags) {
- var node = createSynthesizedNode(227);
- node.flags |= flags;
- node.declarations = createNodeArray(declarations);
- return node;
- }
- ts.createVariableDeclarationList = createVariableDeclarationList;
- function updateVariableDeclarationList(node, declarations) {
- return node.declarations !== declarations
- ? updateNode(createVariableDeclarationList(declarations, node.flags), node)
- : node;
- }
- ts.updateVariableDeclarationList = updateVariableDeclarationList;
- function createVariableDeclaration(name, type, initializer) {
- var node = createSynthesizedNode(226);
- node.name = asName(name);
- node.type = type;
- node.initializer = initializer !== undefined ? ts.parenthesizeExpressionForList(initializer) : undefined;
- return node;
- }
- ts.createVariableDeclaration = createVariableDeclaration;
- function updateVariableDeclaration(node, name, type, initializer) {
- return node.name !== name
- || node.type !== type
- || node.initializer !== initializer
- ? updateNode(createVariableDeclaration(name, type, initializer), node)
- : node;
- }
- ts.updateVariableDeclaration = updateVariableDeclaration;
function createEmptyStatement() {
return createSynthesizedNode(209);
}
@@ -9986,6 +10839,39 @@ var ts;
: node;
}
ts.updateTry = updateTry;
+ function createDebuggerStatement() {
+ return createSynthesizedNode(225);
+ }
+ ts.createDebuggerStatement = createDebuggerStatement;
+ function createVariableDeclaration(name, type, initializer) {
+ var node = createSynthesizedNode(226);
+ node.name = asName(name);
+ node.type = type;
+ node.initializer = initializer !== undefined ? ts.parenthesizeExpressionForList(initializer) : undefined;
+ return node;
+ }
+ ts.createVariableDeclaration = createVariableDeclaration;
+ function updateVariableDeclaration(node, name, type, initializer) {
+ return node.name !== name
+ || node.type !== type
+ || node.initializer !== initializer
+ ? updateNode(createVariableDeclaration(name, type, initializer), node)
+ : node;
+ }
+ ts.updateVariableDeclaration = updateVariableDeclaration;
+ function createVariableDeclarationList(declarations, flags) {
+ var node = createSynthesizedNode(227);
+ node.flags |= flags & 3;
+ node.declarations = createNodeArray(declarations);
+ return node;
+ }
+ ts.createVariableDeclarationList = createVariableDeclarationList;
+ function updateVariableDeclarationList(node, declarations) {
+ return node.declarations !== declarations
+ ? updateNode(createVariableDeclarationList(declarations, node.flags), node)
+ : node;
+ }
+ ts.updateVariableDeclarationList = updateVariableDeclarationList;
function createFunctionDeclaration(decorators, modifiers, asteriskToken, name, typeParameters, parameters, type, body) {
var node = createSynthesizedNode(228);
node.decorators = asNodeArray(decorators);
@@ -10034,6 +10920,48 @@ var ts;
: node;
}
ts.updateClassDeclaration = updateClassDeclaration;
+ function createInterfaceDeclaration(decorators, modifiers, name, typeParameters, heritageClauses, members) {
+ var node = createSynthesizedNode(230);
+ 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.createInterfaceDeclaration = createInterfaceDeclaration;
+ function updateInterfaceDeclaration(node, decorators, modifiers, name, typeParameters, heritageClauses, members) {
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.name !== name
+ || node.typeParameters !== typeParameters
+ || node.heritageClauses !== heritageClauses
+ || node.members !== members
+ ? updateNode(createInterfaceDeclaration(decorators, modifiers, name, typeParameters, heritageClauses, members), node)
+ : node;
+ }
+ ts.updateInterfaceDeclaration = updateInterfaceDeclaration;
+ function createTypeAliasDeclaration(decorators, modifiers, name, typeParameters, type) {
+ var node = createSynthesizedNode(231);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
+ node.name = asName(name);
+ node.typeParameters = asNodeArray(typeParameters);
+ node.type = type;
+ return node;
+ }
+ ts.createTypeAliasDeclaration = createTypeAliasDeclaration;
+ function updateTypeAliasDeclaration(node, decorators, modifiers, name, typeParameters, type) {
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.name !== name
+ || node.typeParameters !== typeParameters
+ || node.type !== type
+ ? updateNode(createTypeAliasDeclaration(decorators, modifiers, name, typeParameters, type), node)
+ : node;
+ }
+ ts.updateTypeAliasDeclaration = updateTypeAliasDeclaration;
function createEnumDeclaration(decorators, modifiers, name, members) {
var node = createSynthesizedNode(232);
node.decorators = asNodeArray(decorators);
@@ -10054,7 +10982,7 @@ var ts;
ts.updateEnumDeclaration = updateEnumDeclaration;
function createModuleDeclaration(decorators, modifiers, name, body, flags) {
var node = createSynthesizedNode(233);
- node.flags |= flags;
+ node.flags |= flags & (16 | 4 | 512);
node.decorators = asNodeArray(decorators);
node.modifiers = asNodeArray(modifiers);
node.name = name;
@@ -10095,6 +11023,18 @@ var ts;
: node;
}
ts.updateCaseBlock = updateCaseBlock;
+ function createNamespaceExportDeclaration(name) {
+ var node = createSynthesizedNode(236);
+ node.name = asName(name);
+ return node;
+ }
+ ts.createNamespaceExportDeclaration = createNamespaceExportDeclaration;
+ function updateNamespaceExportDeclaration(node, name) {
+ return node.name !== name
+ ? updateNode(createNamespaceExportDeclaration(name), node)
+ : node;
+ }
+ ts.updateNamespaceExportDeclaration = updateNamespaceExportDeclaration;
function createImportEqualsDeclaration(decorators, modifiers, name, moduleReference) {
var node = createSynthesizedNode(237);
node.decorators = asNodeArray(decorators);
@@ -10125,7 +11065,8 @@ var ts;
function updateImportDeclaration(node, decorators, modifiers, importClause, moduleSpecifier) {
return node.decorators !== decorators
|| node.modifiers !== modifiers
- || node.importClause !== importClause || node.moduleSpecifier !== moduleSpecifier
+ || node.importClause !== importClause
+ || node.moduleSpecifier !== moduleSpecifier
? updateNode(createImportDeclaration(decorators, modifiers, importClause, moduleSpecifier), node)
: node;
}
@@ -10311,19 +11252,6 @@ var ts;
: node;
}
ts.updateJsxClosingElement = updateJsxClosingElement;
- function createJsxAttributes(properties) {
- var jsxAttributes = createSynthesizedNode(254);
- 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(253);
node.name = name;
@@ -10338,6 +11266,18 @@ var ts;
: node;
}
ts.updateJsxAttribute = updateJsxAttribute;
+ function createJsxAttributes(properties) {
+ var node = createSynthesizedNode(254);
+ node.properties = createNodeArray(properties);
+ return node;
+ }
+ ts.createJsxAttributes = createJsxAttributes;
+ function updateJsxAttributes(node, properties) {
+ return node.properties !== properties
+ ? updateNode(createJsxAttributes(properties), node)
+ : node;
+ }
+ ts.updateJsxAttributes = updateJsxAttributes;
function createJsxSpreadAttribute(expression) {
var node = createSynthesizedNode(255);
node.expression = expression;
@@ -10363,20 +11303,6 @@ var ts;
: node;
}
ts.updateJsxExpression = updateJsxExpression;
- function createHeritageClause(token, types) {
- var node = createSynthesizedNode(259);
- node.token = token;
- node.types = createNodeArray(types);
- return node;
- }
- ts.createHeritageClause = createHeritageClause;
- function updateHeritageClause(node, types) {
- if (node.types !== types) {
- return updateNode(createHeritageClause(node.token, types), node);
- }
- return node;
- }
- ts.updateHeritageClause = updateHeritageClause;
function createCaseClause(expression, statements) {
var node = createSynthesizedNode(257);
node.expression = ts.parenthesizeExpressionForList(expression);
@@ -10385,10 +11311,10 @@ var ts;
}
ts.createCaseClause = createCaseClause;
function updateCaseClause(node, expression, statements) {
- if (node.expression !== expression || node.statements !== statements) {
- return updateNode(createCaseClause(expression, statements), node);
- }
- return node;
+ return node.expression !== expression
+ || node.statements !== statements
+ ? updateNode(createCaseClause(expression, statements), node)
+ : node;
}
ts.updateCaseClause = updateCaseClause;
function createDefaultClause(statements) {
@@ -10398,12 +11324,24 @@ var ts;
}
ts.createDefaultClause = createDefaultClause;
function updateDefaultClause(node, statements) {
- if (node.statements !== statements) {
- return updateNode(createDefaultClause(statements), node);
- }
- return node;
+ return node.statements !== statements
+ ? updateNode(createDefaultClause(statements), node)
+ : node;
}
ts.updateDefaultClause = updateDefaultClause;
+ function createHeritageClause(token, types) {
+ var node = createSynthesizedNode(259);
+ node.token = token;
+ node.types = createNodeArray(types);
+ return node;
+ }
+ ts.createHeritageClause = createHeritageClause;
+ function updateHeritageClause(node, types) {
+ return node.types !== types
+ ? updateNode(createHeritageClause(node.token, types), node)
+ : node;
+ }
+ ts.updateHeritageClause = updateHeritageClause;
function createCatchClause(variableDeclaration, block) {
var node = createSynthesizedNode(260);
node.variableDeclaration = typeof variableDeclaration === "string" ? createVariableDeclaration(variableDeclaration) : variableDeclaration;
@@ -10412,10 +11350,10 @@ var ts;
}
ts.createCatchClause = createCatchClause;
function updateCatchClause(node, variableDeclaration, block) {
- if (node.variableDeclaration !== variableDeclaration || node.block !== block) {
- return updateNode(createCatchClause(variableDeclaration, block), node);
- }
- return node;
+ return node.variableDeclaration !== variableDeclaration
+ || node.block !== block
+ ? updateNode(createCatchClause(variableDeclaration, block), node)
+ : node;
}
ts.updateCatchClause = updateCatchClause;
function createPropertyAssignment(name, initializer) {
@@ -10427,10 +11365,10 @@ var ts;
}
ts.createPropertyAssignment = createPropertyAssignment;
function updatePropertyAssignment(node, name, initializer) {
- if (node.name !== name || node.initializer !== initializer) {
- return updateNode(createPropertyAssignment(name, initializer), node);
- }
- return node;
+ return node.name !== name
+ || node.initializer !== initializer
+ ? updateNode(createPropertyAssignment(name, initializer), node)
+ : node;
}
ts.updatePropertyAssignment = updatePropertyAssignment;
function createShorthandPropertyAssignment(name, objectAssignmentInitializer) {
@@ -10441,10 +11379,10 @@ var ts;
}
ts.createShorthandPropertyAssignment = createShorthandPropertyAssignment;
function updateShorthandPropertyAssignment(node, name, objectAssignmentInitializer) {
- if (node.name !== name || node.objectAssignmentInitializer !== objectAssignmentInitializer) {
- return updateNode(createShorthandPropertyAssignment(name, objectAssignmentInitializer), node);
- }
- return node;
+ return node.name !== name
+ || node.objectAssignmentInitializer !== objectAssignmentInitializer
+ ? updateNode(createShorthandPropertyAssignment(name, objectAssignmentInitializer), node)
+ : node;
}
ts.updateShorthandPropertyAssignment = updateShorthandPropertyAssignment;
function createSpreadAssignment(expression) {
@@ -10454,10 +11392,9 @@ var ts;
}
ts.createSpreadAssignment = createSpreadAssignment;
function updateSpreadAssignment(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createSpreadAssignment(expression), node);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createSpreadAssignment(expression), node)
+ : node;
}
ts.updateSpreadAssignment = updateSpreadAssignment;
function createEnumMember(name, initializer) {
@@ -10545,28 +11482,28 @@ var ts;
}
ts.getMutableClone = getMutableClone;
function createNotEmittedStatement(original) {
- var node = createSynthesizedNode(295);
+ var node = createSynthesizedNode(296);
node.original = original;
setTextRange(node, original);
return node;
}
ts.createNotEmittedStatement = createNotEmittedStatement;
function createEndOfDeclarationMarker(original) {
- var node = createSynthesizedNode(298);
+ var node = createSynthesizedNode(300);
node.emitNode = {};
node.original = original;
return node;
}
ts.createEndOfDeclarationMarker = createEndOfDeclarationMarker;
function createMergeDeclarationMarker(original) {
- var node = createSynthesizedNode(297);
+ var node = createSynthesizedNode(299);
node.emitNode = {};
node.original = original;
return node;
}
ts.createMergeDeclarationMarker = createMergeDeclarationMarker;
function createPartiallyEmittedExpression(expression, original) {
- var node = createSynthesizedNode(296);
+ var node = createSynthesizedNode(297);
node.expression = expression;
node.original = original;
setTextRange(node, original);
@@ -10580,6 +11517,29 @@ var ts;
return node;
}
ts.updatePartiallyEmittedExpression = updatePartiallyEmittedExpression;
+ function flattenCommaElements(node) {
+ if (ts.nodeIsSynthesized(node) && !ts.isParseTreeNode(node) && !node.original && !node.emitNode && !node.id) {
+ if (node.kind === 298) {
+ return node.elements;
+ }
+ if (ts.isBinaryExpression(node) && node.operatorToken.kind === 26) {
+ return [node.left, node.right];
+ }
+ }
+ return node;
+ }
+ function createCommaList(elements) {
+ var node = createSynthesizedNode(298);
+ node.elements = createNodeArray(ts.sameFlatMap(elements, flattenCommaElements));
+ return node;
+ }
+ ts.createCommaList = createCommaList;
+ function updateCommaList(node, elements) {
+ return node.elements !== elements
+ ? updateNode(createCommaList(elements), node)
+ : node;
+ }
+ ts.updateCommaList = updateCommaList;
function createBundle(sourceFiles) {
var node = ts.createNode(266);
node.sourceFiles = sourceFiles;
@@ -10593,6 +11553,10 @@ var ts;
return node;
}
ts.updateBundle = updateBundle;
+ function createImmediatelyInvokedFunctionExpression(statements, param, paramValue) {
+ return createCall(createFunctionExpression(undefined, undefined, undefined, undefined, param ? [param] : [], undefined, createBlock(statements, true)), undefined, paramValue ? [paramValue] : []);
+ }
+ ts.createImmediatelyInvokedFunctionExpression = createImmediatelyInvokedFunctionExpression;
function createComma(left, right) {
return createBinary(left, 26, right);
}
@@ -10715,6 +11679,11 @@ var ts;
return node;
}
ts.setSourceMapRange = setSourceMapRange;
+ var SourceMapSource;
+ function createSourceMapSource(fileName, text, skipTrivia) {
+ return new (SourceMapSource || (SourceMapSource = ts.objectAllocator.getSourceMapSourceConstructor()))(fileName, text, skipTrivia);
+ }
+ ts.createSourceMapSource = createSourceMapSource;
function getTokenSourceMapRange(node, token) {
var emitNode = node.emitNode;
var tokenSourceMapRanges = emitNode && emitNode.tokenSourceMapRanges;
@@ -10890,6 +11859,25 @@ var ts;
}
})(ts || (ts = {}));
(function (ts) {
+ ts.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 createTypeCheck(value, tag) {
return tag === "undefined"
? ts.createStrictEquality(value, ts.createVoidZero())
@@ -11130,7 +12118,9 @@ var ts;
}
ts.createCallBinding = createCallBinding;
function inlineExpressions(expressions) {
- return ts.reduceLeft(expressions, ts.createComma);
+ return expressions.length > 10
+ ? ts.createCommaList(expressions)
+ : ts.reduceLeft(expressions, ts.createComma);
}
ts.inlineExpressions = inlineExpressions;
function createExpressionFromEntityName(node) {
@@ -11208,6 +12198,14 @@ var ts;
function createExpressionForMethodDeclaration(method, receiver) {
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 getInternalName(node, allowComments, allowSourceMaps) {
+ return getName(node, allowComments, allowSourceMaps, 16384 | 32768);
+ }
+ ts.getInternalName = getInternalName;
+ function isInternalName(node) {
+ return (ts.getEmitFlags(node) & 32768) !== 0;
+ }
+ ts.isInternalName = isInternalName;
function getLocalName(node, allowComments, allowSourceMaps) {
return getName(node, allowComments, allowSourceMaps, 16384);
}
@@ -11229,9 +12227,10 @@ var ts;
}
ts.getDeclarationName = getDeclarationName;
function getName(node, allowComments, allowSourceMaps, emitFlags) {
- if (node.name && ts.isIdentifier(node.name) && !ts.isGeneratedIdentifier(node.name)) {
- var name = ts.getMutableClone(node.name);
- emitFlags |= ts.getEmitFlags(node.name);
+ var nodeName = ts.getNameOfDeclaration(node);
+ if (nodeName && ts.isIdentifier(nodeName) && !ts.isGeneratedIdentifier(nodeName)) {
+ var name = ts.getMutableClone(nodeName);
+ emitFlags |= ts.getEmitFlags(nodeName);
if (!allowSourceMaps)
emitFlags |= 48;
if (!allowComments)
@@ -11266,6 +12265,18 @@ var ts;
return ts.isBlock(node) ? node : ts.setTextRange(ts.createBlock([ts.setTextRange(ts.createReturn(node), node)], multiLine), node);
}
ts.convertToFunctionBody = convertToFunctionBody;
+ function convertFunctionDeclarationToExpression(node) {
+ ts.Debug.assert(!!node.body);
+ var updated = ts.createFunctionExpression(node.modifiers, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body);
+ ts.setOriginalNode(updated, node);
+ ts.setTextRange(updated, node);
+ if (node.startsOnNewLine) {
+ updated.startsOnNewLine = true;
+ }
+ ts.aggregateTransformFlags(updated);
+ return updated;
+ }
+ ts.convertFunctionDeclarationToExpression = convertFunctionDeclarationToExpression;
function isUseStrictPrologue(node) {
return node.expression.text === "use strict";
}
@@ -11302,7 +12313,7 @@ var ts;
var numStatements = source.length;
while (statementOffset < numStatements) {
var statement = source[statementOffset];
- if (ts.getEmitFlags(statement) & 524288) {
+ if (ts.getEmitFlags(statement) & 1048576) {
target.push(visitor ? ts.visitNode(statement, visitor, ts.isStatement) : statement);
}
else {
@@ -11342,16 +12353,6 @@ var ts;
return statements;
}
ts.ensureUseStrict = ensureUseStrict;
- function parenthesizeConditionalHead(condition) {
- var conditionalPrecedence = ts.getOperatorPrecedence(195, 55);
- 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 === 185) {
@@ -11508,7 +12509,7 @@ var ts;
if (kind === 186 || kind === 187) {
var mutableCall = ts.getMutableClone(emittedExpression);
mutableCall.expression = ts.setTextRange(ts.createParen(callee), callee);
- return recreatePartiallyEmittedExpressions(expression, mutableCall);
+ return recreateOuterExpressions(expression, mutableCall, 4);
}
}
else {
@@ -11520,14 +12521,34 @@ var ts;
return expression;
}
ts.parenthesizeExpressionForExpressionStatement = parenthesizeExpressionForExpressionStatement;
- function recreatePartiallyEmittedExpressions(originalOuterExpression, newInnerExpression) {
- if (ts.isPartiallyEmittedExpression(originalOuterExpression)) {
- var clone_1 = ts.getMutableClone(originalOuterExpression);
- clone_1.expression = recreatePartiallyEmittedExpressions(clone_1.expression, newInnerExpression);
- return clone_1;
+ function parenthesizeElementTypeMember(member) {
+ switch (member.kind) {
+ case 166:
+ case 167:
+ case 160:
+ case 161:
+ return ts.createParenthesizedType(member);
}
- return newInnerExpression;
+ return member;
+ }
+ ts.parenthesizeElementTypeMember = parenthesizeElementTypeMember;
+ function parenthesizeElementTypeMembers(members) {
+ return ts.createNodeArray(ts.sameMap(members, parenthesizeElementTypeMember));
}
+ ts.parenthesizeElementTypeMembers = parenthesizeElementTypeMembers;
+ function parenthesizeTypeParameters(typeParameters) {
+ if (ts.some(typeParameters)) {
+ var nodeArray = ts.createNodeArray();
+ for (var i = 0; i < typeParameters.length; ++i) {
+ var entry = typeParameters[i];
+ nodeArray.push(i === 0 && ts.isFunctionOrConstructorTypeNode(entry) && entry.typeParameters ?
+ ts.createParenthesizedType(entry) :
+ entry);
+ }
+ return nodeArray;
+ }
+ }
+ ts.parenthesizeTypeParameters = parenthesizeTypeParameters;
function getLeftmostExpression(node) {
while (true) {
switch (node.kind) {
@@ -11545,7 +12566,7 @@ var ts;
case 179:
node = node.expression;
continue;
- case 296:
+ case 297:
node = node.expression;
continue;
}
@@ -11559,6 +12580,21 @@ var ts;
return body;
}
ts.parenthesizeConciseBody = parenthesizeConciseBody;
+ function isOuterExpression(node, kinds) {
+ if (kinds === void 0) { kinds = 7; }
+ switch (node.kind) {
+ case 185:
+ return (kinds & 1) !== 0;
+ case 184:
+ case 202:
+ case 203:
+ return (kinds & 2) !== 0;
+ case 297:
+ return (kinds & 4) !== 0;
+ }
+ return false;
+ }
+ ts.isOuterExpression = isOuterExpression;
function skipOuterExpressions(node, kinds) {
if (kinds === void 0) { kinds = 7; }
var previousNode;
@@ -11585,19 +12621,36 @@ var ts;
}
ts.skipParentheses = skipParentheses;
function skipAssertions(node) {
- while (ts.isAssertionExpression(node)) {
+ while (ts.isAssertionExpression(node) || node.kind === 203) {
node = node.expression;
}
return node;
}
ts.skipAssertions = skipAssertions;
function skipPartiallyEmittedExpressions(node) {
- while (node.kind === 296) {
+ while (node.kind === 297) {
node = node.expression;
}
return node;
}
ts.skipPartiallyEmittedExpressions = skipPartiallyEmittedExpressions;
+ function updateOuterExpression(outerExpression, expression) {
+ switch (outerExpression.kind) {
+ case 185: return ts.updateParen(outerExpression, expression);
+ case 184: return ts.updateTypeAssertion(outerExpression, outerExpression.type, expression);
+ case 202: return ts.updateAsExpression(outerExpression, expression, outerExpression.type);
+ case 203: return ts.updateNonNullExpression(outerExpression, expression);
+ case 297: return ts.updatePartiallyEmittedExpression(outerExpression, expression);
+ }
+ }
+ function recreateOuterExpressions(outerExpression, innerExpression, kinds) {
+ if (kinds === void 0) { kinds = 7; }
+ if (outerExpression && isOuterExpression(outerExpression, kinds)) {
+ return updateOuterExpression(outerExpression, recreateOuterExpressions(outerExpression.expression, innerExpression));
+ }
+ return innerExpression;
+ }
+ ts.recreateOuterExpressions = recreateOuterExpressions;
function startOnNewLine(node) {
node.startsOnNewLine = true;
return node;
@@ -11609,23 +12662,33 @@ var ts;
return emitNode && emitNode.externalHelpersModuleName;
}
ts.getExternalHelpersModuleName = getExternalHelpersModuleName;
- function getOrCreateExternalHelpersModuleNameIfNeeded(node, compilerOptions) {
- if (compilerOptions.importHelpers && (ts.isExternalModule(node) || compilerOptions.isolatedModules)) {
+ function getOrCreateExternalHelpersModuleNameIfNeeded(node, compilerOptions, hasExportStarsToExportValues) {
+ if (compilerOptions.importHelpers && ts.isEffectiveExternalModule(node, compilerOptions)) {
var externalHelpersModuleName = getExternalHelpersModuleName(node);
if (externalHelpersModuleName) {
return externalHelpersModuleName;
}
- var helpers = ts.getEmitHelpers(node);
- if (helpers) {
- 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 = ts.getOrCreateEmitNode(parseNode);
- return emitNode.externalHelpersModuleName || (emitNode.externalHelpersModuleName = ts.createUniqueName(ts.externalHelpersModuleNameText));
+ var moduleKind = ts.getEmitModuleKind(compilerOptions);
+ var create = hasExportStarsToExportValues
+ && moduleKind !== ts.ModuleKind.System
+ && moduleKind !== ts.ModuleKind.ES2015;
+ if (!create) {
+ var helpers = ts.getEmitHelpers(node);
+ if (helpers) {
+ for (var _i = 0, helpers_2 = helpers; _i < helpers_2.length; _i++) {
+ var helper = helpers_2[_i];
+ if (!helper.scoped) {
+ create = true;
+ break;
+ }
}
}
}
+ if (create) {
+ var parseNode = ts.getOriginalNode(node, ts.isSourceFile);
+ var emitNode = ts.getOrCreateEmitNode(parseNode);
+ return emitNode.externalHelpersModuleName || (emitNode.externalHelpersModuleName = ts.createUniqueName(ts.externalHelpersModuleNameText));
+ }
}
}
ts.getOrCreateExternalHelpersModuleNameIfNeeded = getOrCreateExternalHelpersModuleNameIfNeeded;
@@ -11665,7 +12728,7 @@ var ts;
if (file.moduleName) {
return ts.createLiteral(file.moduleName);
}
- if (!ts.isDeclarationFile(file) && (options.out || options.outFile)) {
+ if (!file.isDeclarationFile && (options.out || options.outFile)) {
return ts.createLiteral(ts.getExternalModuleNameFromPath(host, file.fileName));
}
return undefined;
@@ -11689,7 +12752,7 @@ var ts;
if (ts.isAssignmentExpression(bindingElement, true)) {
return bindingElement.right;
}
- if (ts.isSpreadExpression(bindingElement)) {
+ if (ts.isSpreadElement(bindingElement)) {
return getInitializerOfBindingOrAssignmentElement(bindingElement.expression);
}
}
@@ -11712,7 +12775,7 @@ var ts;
if (ts.isAssignmentExpression(bindingElement, true)) {
return getTargetOfBindingOrAssignmentElement(bindingElement.left);
}
- if (ts.isSpreadExpression(bindingElement)) {
+ if (ts.isSpreadElement(bindingElement)) {
return getTargetOfBindingOrAssignmentElement(bindingElement.expression);
}
return bindingElement;
@@ -11847,11 +12910,6 @@ var ts;
var hasExportDefault = false;
var exportEquals = undefined;
var hasExportStarsToExportValues = false;
- var externalHelpersModuleName = getOrCreateExternalHelpersModuleNameIfNeeded(sourceFile, compilerOptions);
- 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) {
@@ -11941,6 +12999,11 @@ var ts;
break;
}
}
+ var externalHelpersModuleName = getOrCreateExternalHelpersModuleNameIfNeeded(sourceFile, compilerOptions, hasExportStarsToExportValues);
+ var externalHelpersImportDeclaration = externalHelpersModuleName && ts.createImportDeclaration(undefined, undefined, ts.createImportClause(undefined, ts.createNamespaceImport(externalHelpersModuleName)), ts.createLiteral(ts.externalHelpersModuleNameText));
+ if (externalHelpersImportDeclaration) {
+ externalImports.unshift(externalHelpersImportDeclaration);
+ }
return { externalImports: externalImports, exportSpecifiers: exportSpecifiers, exportEquals: exportEquals, hasExportStarsToExportValues: hasExportStarsToExportValues, exportedBindings: exportedBindings, exportedNames: exportedNames, externalHelpersImportDeclaration: externalHelpersImportDeclaration };
}
ts.collectExternalModuleInfo = collectExternalModuleInfo;
@@ -11985,7 +13048,7 @@ var ts;
else if (kind === 71) {
return new (IdentifierConstructor || (IdentifierConstructor = ts.objectAllocator.getIdentifierConstructor()))(kind, pos, end);
}
- else if (kind < 143) {
+ else if (!ts.isNodeKind(kind)) {
return new (TokenConstructor || (TokenConstructor = ts.objectAllocator.getTokenConstructor()))(kind, pos, end);
}
else {
@@ -12322,6 +13385,8 @@ var ts;
return visitNode(cbNode, node.expression);
case 247:
return visitNodes(cbNodes, node.decorators);
+ case 298:
+ return visitNodes(cbNodes, node.elements);
case 249:
return visitNode(cbNode, node.openingElement) ||
visitNodes(cbNodes, node.children) ||
@@ -12375,31 +13440,31 @@ var ts;
visitNode(cbNode, node.type);
case 283:
return visitNodes(cbNodes, node.tags);
- case 286:
+ case 287:
return visitNode(cbNode, node.preParameterName) ||
visitNode(cbNode, node.typeExpression) ||
visitNode(cbNode, node.postParameterName);
- case 287:
- return visitNode(cbNode, node.typeExpression);
case 288:
return visitNode(cbNode, node.typeExpression);
+ case 289:
+ return visitNode(cbNode, node.typeExpression);
case 285:
return visitNode(cbNode, node.typeExpression);
- case 289:
- return visitNodes(cbNodes, node.typeParameters);
case 290:
+ return visitNodes(cbNodes, node.typeParameters);
+ case 291:
return visitNode(cbNode, node.typeExpression) ||
visitNode(cbNode, node.fullName) ||
visitNode(cbNode, node.name) ||
visitNode(cbNode, node.jsDocTypeLiteral);
- case 292:
+ case 293:
return visitNodes(cbNodes, node.jsDocPropertyTags);
- case 291:
+ case 292:
return visitNode(cbNode, node.typeExpression) ||
visitNode(cbNode, node.name);
- case 296:
+ case 297:
return visitNode(cbNode, node.expression);
- case 293:
+ case 294:
return visitNode(cbNode, node.literal);
}
}
@@ -12422,7 +13487,9 @@ var ts;
}
ts.isExternalModule = isExternalModule;
function updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks) {
- return IncrementalParser.updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks);
+ var newSourceFile = IncrementalParser.updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks);
+ newSourceFile.flags |= (sourceFile.flags & 524288);
+ return newSourceFile;
}
ts.updateSourceFile = updateSourceFile;
function parseIsolatedJSDocComment(content, start, length) {
@@ -12511,7 +13578,7 @@ var ts;
processReferenceComments(sourceFile);
sourceFile.statements = parseList(0, parseStatement);
ts.Debug.assert(token() === 1);
- sourceFile.endOfFileToken = parseTokenNode();
+ sourceFile.endOfFileToken = addJSDocComment(parseTokenNode());
setExternalModuleIndicator(sourceFile);
sourceFile.nodeCount = nodeCount;
sourceFile.identifierCount = identifierCount;
@@ -12790,7 +13857,7 @@ var ts;
if (!(pos >= 0)) {
pos = scanner.getStartPos();
}
- return kind >= 143 ? new NodeConstructor(kind, pos, pos) :
+ return ts.isNodeKind(kind) ? new NodeConstructor(kind, pos, pos) :
kind === 71 ? new IdentifierConstructor(kind, pos, pos) :
new TokenConstructor(kind, pos, pos);
}
@@ -12899,12 +13966,12 @@ var ts;
if (token() === 84) {
nextToken();
if (token() === 79) {
- return lookAhead(nextTokenIsClassOrFunctionOrAsync);
+ return lookAhead(nextTokenCanFollowDefaultKeyword);
}
return token() !== 39 && token() !== 118 && token() !== 17 && canFollowModifier();
}
if (token() === 79) {
- return nextTokenIsClassOrFunctionOrAsync();
+ return nextTokenCanFollowDefaultKeyword();
}
if (token() === 115) {
nextToken();
@@ -12922,9 +13989,10 @@ var ts;
|| token() === 24
|| isLiteralPropertyName();
}
- function nextTokenIsClassOrFunctionOrAsync() {
+ function nextTokenCanFollowDefaultKeyword() {
nextToken();
return token() === 75 || token() === 89 ||
+ token() === 109 ||
(token() === 117 && lookAhead(nextTokenIsClassKeywordOnSameLine)) ||
(token() === 120 && lookAhead(nextTokenIsFunctionKeywordOnSameLine));
}
@@ -13656,7 +14724,7 @@ var ts;
if (token() === 19 || token() === 27) {
return parseSignatureMember(155);
}
- if (token() === 94 && lookAhead(isStartOfConstructSignature)) {
+ if (token() === 94 && lookAhead(nextTokenIsOpenParenOrLessThan)) {
return parseSignatureMember(156);
}
var fullStart = getNodePos();
@@ -13666,7 +14734,7 @@ var ts;
}
return parsePropertyOrMethodSignature(fullStart, modifiers);
}
- function isStartOfConstructSignature() {
+ function nextTokenIsOpenParenOrLessThan() {
nextToken();
return token() === 19 || token() === 27;
}
@@ -13976,6 +15044,8 @@ var ts;
case 63:
case 71:
return true;
+ case 91:
+ return lookAhead(nextTokenIsOpenParenOrLessThan);
default:
return isIdentifier();
}
@@ -14400,10 +15470,10 @@ var ts;
}
function parseUnaryExpressionOrHigher() {
if (isUpdateExpression()) {
- var incrementExpression = parseIncrementExpression();
+ var updateExpression = parseUpdateExpression();
return token() === 40 ?
- parseBinaryExpressionRest(getBinaryOperatorPrecedence(), incrementExpression) :
- incrementExpression;
+ parseBinaryExpressionRest(getBinaryOperatorPrecedence(), updateExpression) :
+ updateExpression;
}
var unaryOperator = token();
var simpleUnaryExpression = parseSimpleUnaryExpression();
@@ -14438,7 +15508,7 @@ var ts;
return parseAwaitExpression();
}
default:
- return parseIncrementExpression();
+ return parseUpdateExpression();
}
}
function isUpdateExpression() {
@@ -14460,7 +15530,7 @@ var ts;
return true;
}
}
- function parseIncrementExpression() {
+ function parseUpdateExpression() {
if (token() === 43 || token() === 44) {
var node = createNode(192);
node.operator = token();
@@ -14483,9 +15553,14 @@ var ts;
return expression;
}
function parseLeftHandSideExpressionOrHigher() {
- var expression = token() === 97
- ? parseSuperExpression()
- : parseMemberExpressionOrHigher();
+ var expression;
+ if (token() === 91 && lookAhead(nextTokenIsOpenParenOrLessThan)) {
+ sourceFile.flags |= 524288;
+ expression = parseTokenNode();
+ }
+ else {
+ expression = token() === 97 ? parseSuperExpression() : parseMemberExpressionOrHigher();
+ }
return parseCallExpressionRest(expression);
}
function parseMemberExpressionOrHigher() {
@@ -15302,9 +16377,10 @@ var ts;
case 74:
case 87:
return true;
+ case 91:
+ return isStartOfDeclaration() || lookAhead(nextTokenIsOpenParenOrLessThan);
case 76:
case 84:
- case 91:
return isStartOfDeclaration();
case 120:
case 124:
@@ -16280,7 +17356,10 @@ var ts;
case 17:
return parseJSDocRecordType();
case 89:
- return parseJSDocFunctionType();
+ if (lookAhead(nextTokenIsOpenParen)) {
+ return parseJSDocFunctionType();
+ }
+ break;
case 24:
return parseJSDocVariadicType();
case 94:
@@ -16296,7 +17375,6 @@ var ts;
case 95:
case 139:
case 130:
- case 134:
return parseTokenNode();
case 9:
case 8:
@@ -16434,7 +17512,7 @@ var ts;
return finishNode(result);
}
function parseJSDocLiteralType() {
- var result = createNode(293);
+ var result = createNode(294);
result.literal = parseLiteralTypeNode();
return finishNode(result);
}
@@ -16473,10 +17551,17 @@ var ts;
if (comment) {
comment.parent = parent;
}
+ if (ts.isInJavaScriptFile(parent)) {
+ if (!sourceFile.jsDocDiagnostics) {
+ sourceFile.jsDocDiagnostics = [];
+ }
+ (_a = sourceFile.jsDocDiagnostics).push.apply(_a, parseDiagnostics);
+ }
currentToken = saveToken;
parseDiagnostics.length = saveParseDiagnosticsLength;
parseErrorBeforeNextFinishedNode = saveParseErrorBeforeNextFinishedNode;
return comment;
+ var _a;
}
JSDocParser.parseJSDocComment = parseJSDocComment;
function parseJSDocCommentWorker(start, length) {
@@ -16621,8 +17706,14 @@ var ts;
case "augments":
tag = parseAugmentsTag(atToken, tagName);
break;
+ case "class":
+ case "constructor":
+ tag = parseClassTag(atToken, tagName);
+ break;
+ case "arg":
+ case "argument":
case "param":
- tag = parseParamTag(atToken, tagName);
+ tag = parseParameterOrPropertyTag(atToken, tagName, true);
break;
case "return":
case "returns":
@@ -16729,27 +17820,23 @@ var ts;
return parseJSDocTypeExpression();
});
}
- function parseParamTag(atToken, tagName) {
- var typeExpression = tryParseTypeExpression();
- skipWhitespace();
- var name;
- var isBracketed;
- if (parseOptionalToken(21)) {
- name = parseJSDocIdentifierName();
+ function parseBracketNameInPropertyAndParamTag() {
+ var isBracketed = parseOptional(21);
+ var name = parseJSDocIdentifierName(true);
+ if (isBracketed) {
skipWhitespace();
- isBracketed = true;
if (parseOptionalToken(58)) {
parseExpression();
}
parseExpected(22);
}
- else if (ts.tokenIsIdentifierOrKeyword(token())) {
- name = parseJSDocIdentifierName();
- }
- if (!name) {
- parseErrorAtPosition(scanner.getStartPos(), 0, ts.Diagnostics.Identifier_expected);
- return undefined;
- }
+ return { name: name, isBracketed: isBracketed };
+ }
+ function parseParameterOrPropertyTag(atToken, tagName, shouldParseParamTag) {
+ var typeExpression = tryParseTypeExpression();
+ skipWhitespace();
+ var _a = parseBracketNameInPropertyAndParamTag(), name = _a.name, isBracketed = _a.isBracketed;
+ skipWhitespace();
var preName, postName;
if (typeExpression) {
postName = name;
@@ -16760,52 +17847,38 @@ var ts;
if (!typeExpression) {
typeExpression = tryParseTypeExpression();
}
- var result = createNode(286, atToken.pos);
+ var result = shouldParseParamTag ?
+ createNode(287, atToken.pos) :
+ createNode(292, atToken.pos);
result.atToken = atToken;
result.tagName = tagName;
result.preParameterName = preName;
result.typeExpression = typeExpression;
result.postParameterName = postName;
- result.parameterName = postName || preName;
+ result.name = postName || preName;
result.isBracketed = isBracketed;
return finishNode(result);
}
function parseReturnTag(atToken, tagName) {
- if (ts.forEach(tags, function (t) { return t.kind === 287; })) {
+ 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 result = createNode(287, atToken.pos);
+ var result = createNode(288, 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 === 288; })) {
+ if (ts.forEach(tags, function (t) { return t.kind === 289; })) {
parseErrorAtPosition(tagName.pos, scanner.getTokenPos() - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text);
}
- var result = createNode(288, atToken.pos);
+ var result = createNode(289, atToken.pos);
result.atToken = atToken;
result.tagName = tagName;
result.typeExpression = tryParseTypeExpression();
return finishNode(result);
}
- function parsePropertyTag(atToken, tagName) {
- var typeExpression = tryParseTypeExpression();
- skipWhitespace();
- var name = parseJSDocIdentifierName();
- skipWhitespace();
- if (!name) {
- parseErrorAtPosition(scanner.getStartPos(), 0, ts.Diagnostics.Identifier_expected);
- return undefined;
- }
- var result = createNode(291, atToken.pos);
- result.atToken = atToken;
- result.tagName = tagName;
- result.name = name;
- result.typeExpression = typeExpression;
- return finishNode(result);
- }
function parseAugmentsTag(atToken, tagName) {
var typeExpression = tryParseTypeExpression();
var result = createNode(285, atToken.pos);
@@ -16814,10 +17887,16 @@ var ts;
result.typeExpression = typeExpression;
return finishNode(result);
}
+ function parseClassTag(atToken, tagName) {
+ var tag = createNode(286, atToken.pos);
+ tag.atToken = atToken;
+ tag.tagName = tagName;
+ return finishNode(tag);
+ }
function parseTypedefTag(atToken, tagName) {
var typeExpression = tryParseTypeExpression();
skipWhitespace();
- var typedefTag = createNode(290, atToken.pos);
+ var typedefTag = createNode(291, atToken.pos);
typedefTag.atToken = atToken;
typedefTag.tagName = tagName;
typedefTag.fullName = parseJSDocTypeNameWithNamespace(0);
@@ -16838,7 +17917,7 @@ var ts;
var jsDocTypeReference = typeExpression.type;
if (jsDocTypeReference.name.kind === 71) {
var name = jsDocTypeReference.name;
- if (name.text === "Object") {
+ if (name.text === "Object" || name.text === "object") {
typedefTag.jsDocTypeLiteral = scanChildTags();
}
}
@@ -16852,7 +17931,7 @@ var ts;
}
return finishNode(typedefTag);
function scanChildTags() {
- var jsDocTypeLiteral = createNode(292, scanner.getStartPos());
+ var jsDocTypeLiteral = createNode(293, scanner.getStartPos());
var resumePos = scanner.getStartPos();
var canParseTag = true;
var seenAsterisk = false;
@@ -16898,7 +17977,7 @@ var ts;
jsDocNamespaceNode.flags |= flags;
jsDocNamespaceNode.name = typeNameOrNamespaceName;
jsDocNamespaceNode.body = parseJSDocTypeNameWithNamespace(4);
- return jsDocNamespaceNode;
+ return finishNode(jsDocNamespaceNode);
}
if (typeNameOrNamespaceName && flags & 4) {
typeNameOrNamespaceName.isInJSDocNamespace = true;
@@ -16925,7 +18004,7 @@ var ts;
return true;
case "prop":
case "property":
- var propertyTag = parsePropertyTag(atToken, tagName);
+ var propertyTag = parseParameterOrPropertyTag(atToken, tagName, false);
if (propertyTag) {
if (!parentTag.jsDocPropertyTags) {
parentTag.jsDocPropertyTags = [];
@@ -16938,7 +18017,7 @@ var ts;
return false;
}
function parseTemplateTag(atToken, tagName) {
- if (ts.forEach(tags, function (t) { return t.kind === 289; })) {
+ if (ts.forEach(tags, function (t) { return t.kind === 290; })) {
parseErrorAtPosition(tagName.pos, scanner.getTokenPos() - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text);
}
var typeParameters = createNodeArray();
@@ -16961,7 +18040,7 @@ var ts;
break;
}
}
- var result = createNode(289, atToken.pos);
+ var result = createNode(290, atToken.pos);
result.atToken = atToken;
result.tagName = tagName;
result.typeParameters = typeParameters;
@@ -16972,13 +18051,19 @@ var ts;
function nextJSDocToken() {
return currentToken = scanner.scanJSDocToken();
}
- function parseJSDocIdentifierName() {
- return createJSDocIdentifier(ts.tokenIsIdentifierOrKeyword(token()));
+ function parseJSDocIdentifierName(createIfMissing) {
+ if (createIfMissing === void 0) { createIfMissing = false; }
+ return createJSDocIdentifier(ts.tokenIsIdentifierOrKeyword(token()), createIfMissing);
}
- function createJSDocIdentifier(isIdentifier) {
+ function createJSDocIdentifier(isIdentifier, createIfMissing) {
if (!isIdentifier) {
- parseErrorAtCurrentToken(ts.Diagnostics.Identifier_expected);
- return undefined;
+ if (createIfMissing) {
+ return createMissingNode(71, true, ts.Diagnostics.Identifier_expected);
+ }
+ else {
+ parseErrorAtCurrentToken(ts.Diagnostics.Identifier_expected);
+ return undefined;
+ }
}
var pos = scanner.getTokenPos();
var end = scanner.getTextPos();
@@ -17359,7 +18444,7 @@ var ts;
inStrictMode = bindInStrictMode(file, opts);
classifiableNames = ts.createMap();
symbolCount = 0;
- skipTransformFlagAggregation = ts.isDeclarationFile(file);
+ skipTransformFlagAggregation = file.isDeclarationFile;
Symbol = ts.objectAllocator.getSymbolConstructor();
if (!file.locals) {
bind(file);
@@ -17387,7 +18472,7 @@ var ts;
}
return bindSourceFile;
function bindInStrictMode(file, opts) {
- if ((opts.alwaysStrict === undefined ? opts.strict : opts.alwaysStrict) && !ts.isDeclarationFile(file)) {
+ if ((opts.alwaysStrict === undefined ? opts.strict : opts.alwaysStrict) && !file.isDeclarationFile) {
return true;
}
else {
@@ -17420,19 +18505,20 @@ var ts;
}
}
function getDeclarationName(node) {
- if (node.name) {
+ var name = ts.getNameOfDeclaration(node);
+ if (name) {
if (ts.isAmbientModule(node)) {
- return ts.isGlobalScopeAugmentation(node) ? "__global" : "\"" + node.name.text + "\"";
+ return ts.isGlobalScopeAugmentation(node) ? "__global" : "\"" + name.text + "\"";
}
- if (node.name.kind === 144) {
- var nameExpression = node.name.expression;
+ if (name.kind === 144) {
+ var nameExpression = name.expression;
if (ts.isStringOrNumericLiteral(nameExpression)) {
return nameExpression.text;
}
ts.Debug.assert(ts.isWellKnownSymbolSyntactically(nameExpression));
return ts.getPropertyNameForKnownSymbolName(nameExpression.name.text);
}
- return node.name.text;
+ return name.text;
}
switch (node.kind) {
case 152:
@@ -17450,15 +18536,8 @@ var ts;
case 243:
return node.isExportEquals ? "export=" : "default";
case 194:
- 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;
+ if (ts.getSpecialPropertyAssignmentKind(node) === 2) {
+ return "export=";
}
ts.Debug.fail("Unknown binary declaration kind");
break;
@@ -17472,7 +18551,7 @@ var ts;
var functionType = node.parent;
var index = ts.indexOf(functionType.parameters, node);
return "arg" + index;
- case 290:
+ case 291:
var parentNode = node.parent && node.parent.parent;
var nameFromParentNode = void 0;
if (parentNode && parentNode.kind === 208) {
@@ -17528,9 +18607,9 @@ var ts;
}
}
ts.forEach(symbol.declarations, function (declaration) {
- file.bindDiagnostics.push(ts.createDiagnosticForNode(declaration.name || declaration, message_1, getDisplayName(declaration)));
+ file.bindDiagnostics.push(ts.createDiagnosticForNode(ts.getNameOfDeclaration(declaration) || declaration, message_1, getDisplayName(declaration)));
});
- file.bindDiagnostics.push(ts.createDiagnosticForNode(node.name || node, message_1, getDisplayName(node)));
+ file.bindDiagnostics.push(ts.createDiagnosticForNode(ts.getNameOfDeclaration(node) || node, message_1, getDisplayName(node)));
symbol = createSymbol(0, name);
}
}
@@ -17550,7 +18629,9 @@ var ts;
}
}
else {
- var isJSDocTypedefInJSDocNamespace = node.kind === 290 &&
+ if (node.kind === 291)
+ ts.Debug.assert(ts.isInJavaScriptFile(node));
+ var isJSDocTypedefInJSDocNamespace = node.kind === 291 &&
node.name &&
node.name.kind === 71 &&
node.name.isInJSDocNamespace;
@@ -17679,8 +18760,19 @@ var ts;
ts.forEachChild(node, bind, bindEach);
}
function bindChildrenWorker(node) {
- if (ts.isInJavaScriptFile(node) && node.jsDoc) {
- ts.forEach(node.jsDoc, bind);
+ if (node.jsDoc) {
+ if (ts.isInJavaScriptFile(node)) {
+ for (var _i = 0, _a = node.jsDoc; _i < _a.length; _i++) {
+ var j = _a[_i];
+ bind(j);
+ }
+ }
+ else {
+ for (var _b = 0, _c = node.jsDoc; _b < _c.length; _b++) {
+ var j = _c[_b];
+ setParentPointers(node, j);
+ }
+ }
}
if (checkUnreachable(node)) {
bindEachChild(node);
@@ -17750,7 +18842,7 @@ var ts;
case 283:
bindJSDocComment(node);
break;
- case 290:
+ case 291:
bindJSDocTypedefTag(node);
break;
default:
@@ -18327,13 +19419,13 @@ var ts;
}
function bindVariableDeclarationFlow(node) {
bindEachChild(node);
- if (node.initializer || node.parent.parent.kind === 215 || node.parent.parent.kind === 216) {
+ if (node.initializer || ts.isForInOrOfStatement(node.parent.parent)) {
bindInitializedVariableFlow(node);
}
}
function bindJSDocComment(node) {
ts.forEachChild(node, function (n) {
- if (n.kind !== 290) {
+ if (n.kind !== 291) {
bind(n);
}
});
@@ -18373,7 +19465,7 @@ var ts;
case 232:
case 178:
case 163:
- case 292:
+ case 293:
case 275:
case 254:
return 1;
@@ -18443,7 +19535,7 @@ var ts;
case 178:
case 230:
case 275:
- case 292:
+ case 293:
case 254:
return declareSymbol(container.symbol.members, container.symbol, node, symbolFlags, symbolExcludes);
case 160:
@@ -18726,9 +19818,8 @@ var ts;
}
node.parent = parent;
var saveInStrictMode = inStrictMode;
- if (ts.isInJavaScriptFile(node)) {
+ if (ts.isInJavaScriptFile(node))
bindJSDocTypedefTagIfAny(node);
- }
bindWorker(node);
if (node.kind > 142) {
var saveParent = parent;
@@ -18758,7 +19849,7 @@ var ts;
}
for (var _b = 0, _c = jsDoc.tags; _b < _c.length; _b++) {
var tag = _c[_b];
- if (tag.kind === 290) {
+ if (tag.kind === 291) {
var savedParent = parent;
parent = jsDoc;
bind(tag);
@@ -18790,7 +19881,7 @@ var ts;
case 71:
if (node.isInJSDocNamespace) {
var parentNode = node.parent;
- while (parentNode && parentNode.kind !== 290) {
+ while (parentNode && parentNode.kind !== 291) {
parentNode = parentNode.parent;
}
bindBlockScopedDeclaration(parentNode, 524288, 793064);
@@ -18856,10 +19947,7 @@ var ts;
return bindVariableDeclarationOrBindingElement(node);
case 149:
case 148:
- case 276:
- return bindPropertyOrMethodOrAccessor(node, 4 | (node.questionToken ? 67108864 : 0), 0);
- case 291:
- return bindJSDocProperty(node);
+ return bindPropertyWorker(node);
case 261:
case 262:
return bindPropertyOrMethodOrAccessor(node, 4, 0);
@@ -18897,13 +19985,10 @@ var ts;
return bindPropertyOrMethodOrAccessor(node, 65536, 74687);
case 160:
case 161:
- case 279:
return bindFunctionOrConstructorType(node);
case 163:
case 172:
- case 292:
- case 275:
- return bindAnonymousDeclaration(node, 2048, "__type");
+ return bindAnonymousTypeWorker(node);
case 178:
return bindObjectLiteralExpression(node);
case 186:
@@ -18920,11 +20005,6 @@ var ts;
return bindClassLikeDeclaration(node);
case 230:
return bindBlockScopedDeclaration(node, 64, 792968);
- case 290:
- if (!node.fullName || node.fullName.kind === 71) {
- return bindBlockScopedDeclaration(node, 524288, 793064);
- }
- break;
case 231:
return bindBlockScopedDeclaration(node, 524288, 793064);
case 232:
@@ -18957,8 +20037,31 @@ var ts;
}
case 234:
return updateStrictModeStatementList(node.statements);
+ case 276:
+ return bindPropertyWorker(node);
+ case 292:
+ return declareSymbolAndAddToSymbolTable(node, node.isBracketed || (node.typeExpression && node.typeExpression.type.kind === 278) ?
+ 4 | 67108864 : 4, 0);
+ case 279:
+ return bindFunctionOrConstructorType(node);
+ case 293:
+ case 275:
+ return bindAnonymousTypeWorker(node);
+ case 291: {
+ var fullName = node.fullName;
+ if (!fullName || fullName.kind === 71) {
+ return bindBlockScopedDeclaration(node, 524288, 793064);
+ }
+ break;
+ }
}
}
+ function bindPropertyWorker(node) {
+ return bindPropertyOrMethodOrAccessor(node, 4 | (node.questionToken ? 67108864 : 0), 0);
+ }
+ function bindAnonymousTypeWorker(node) {
+ return bindAnonymousDeclaration(node, 2048, "__type");
+ }
function checkTypePredicate(node) {
var parameterName = node.parameterName, type = node.type;
if (parameterName && parameterName.kind === 71) {
@@ -19175,7 +20278,7 @@ var ts;
}
}
function bindParameter(node) {
- if (inStrictMode) {
+ if (inStrictMode && !ts.isInAmbientContext(node)) {
checkStrictModeEvalOrArguments(node, node.name);
}
if (ts.isBindingPattern(node.name)) {
@@ -19190,7 +20293,7 @@ var ts;
}
}
function bindFunctionDeclaration(node) {
- if (!ts.isDeclarationFile(file) && !ts.isInAmbientContext(node)) {
+ if (!file.isDeclarationFile && !ts.isInAmbientContext(node)) {
if (ts.isAsyncFunction(node)) {
emitFlags |= 1024;
}
@@ -19205,7 +20308,7 @@ var ts;
}
}
function bindFunctionExpression(node) {
- if (!ts.isDeclarationFile(file) && !ts.isInAmbientContext(node)) {
+ if (!file.isDeclarationFile && !ts.isInAmbientContext(node)) {
if (ts.isAsyncFunction(node)) {
emitFlags |= 1024;
}
@@ -19218,10 +20321,8 @@ var ts;
return bindAnonymousDeclaration(node, 16, bindingName);
}
function bindPropertyOrMethodOrAccessor(node, symbolFlags, symbolExcludes) {
- if (!ts.isDeclarationFile(file) && !ts.isInAmbientContext(node)) {
- if (ts.isAsyncFunction(node)) {
- emitFlags |= 1024;
- }
+ if (!file.isDeclarationFile && !ts.isInAmbientContext(node) && ts.isAsyncFunction(node)) {
+ emitFlags |= 1024;
}
if (currentFlow && ts.isObjectLiteralOrClassExpressionMethod(node)) {
node.flowNode = currentFlow;
@@ -19230,9 +20331,6 @@ var ts;
? bindAnonymousDeclaration(node, symbolFlags, "__computed")
: declareSymbolAndAddToSymbolTable(node, symbolFlags, symbolExcludes);
}
- function bindJSDocProperty(node) {
- return declareSymbolAndAddToSymbolTable(node, 4, 0);
- }
function shouldReportErrorOnModuleDeclaration(node) {
var instanceState = getModuleInstanceState(node);
return instanceState === 1 || (instanceState === 2 && options.preserveConstEnums);
@@ -19331,6 +20429,9 @@ var ts;
|| isSuperOrSuperProperty(expression, expressionKind)) {
transformFlags |= 192;
}
+ if (expression.kind === 91) {
+ transformFlags |= 67108864;
+ }
node.transformFlags = transformFlags | 536870912;
return transformFlags & ~537396545;
}
@@ -19780,6 +20881,7 @@ var ts;
case 171:
case 172:
case 173:
+ case 236:
transformFlags = 3;
excludeFlags = -3;
break;
@@ -19920,6 +21022,10 @@ var ts;
}
}
ts.getTransformFlagsSubtreeExclusions = getTransformFlagsSubtreeExclusions;
+ function setParentPointers(parent, child) {
+ child.parent = parent;
+ ts.forEachChild(child, function (childsChild) { return setParentPointers(child, childsChild); });
+ }
})(ts || (ts = {}));
var ts;
(function (ts) {
@@ -19944,12 +21050,11 @@ var ts;
ts.Debug.assert(ts.extensionIsTypeScript(resolved.extension));
return resolved.path;
}
- function resolvedModuleFromResolved(_a, isExternalLibraryImport) {
- var path = _a.path, extension = _a.extension;
- return { resolvedFileName: path, extension: extension, isExternalLibraryImport: isExternalLibraryImport };
- }
function createResolvedModuleWithFailedLookupLocations(resolved, isExternalLibraryImport, failedLookupLocations) {
- return { resolvedModule: resolved && resolvedModuleFromResolved(resolved, isExternalLibraryImport), failedLookupLocations: failedLookupLocations };
+ return {
+ resolvedModule: resolved && { resolvedFileName: resolved.path, extension: resolved.extension, isExternalLibraryImport: isExternalLibraryImport },
+ failedLookupLocations: failedLookupLocations
+ };
}
function moduleHasNonRelativeName(moduleName) {
return !(ts.isRootedDiskPath(moduleName) || ts.isExternalModuleNameRelative(moduleName));
@@ -20233,6 +21338,8 @@ var ts;
case ts.ModuleResolutionKind.Classic:
result = classicNameResolver(moduleName, containingFile, compilerOptions, host, cache);
break;
+ default:
+ ts.Debug.fail("Unexpected moduleResolution: " + moduleResolution);
}
if (perFolderCache) {
perFolderCache.set(moduleName, result);
@@ -20349,10 +21456,12 @@ var ts;
if (state.traceEnabled) {
trace(state.host, ts.Diagnostics.Trying_substitution_0_candidate_module_location_Colon_1, subst, path);
}
- var tsExtension = ts.tryGetExtensionFromPath(candidate);
- if (tsExtension !== undefined) {
+ var extension = ts.tryGetExtensionFromPath(candidate);
+ if (extension !== undefined) {
var path_1 = tryFile(candidate, failedLookupLocations, false, state);
- return path_1 && { path: path_1, extension: tsExtension };
+ if (path_1 !== undefined) {
+ return { path: path_1, extension: extension };
+ }
}
return loader(extensions, candidate, failedLookupLocations, !directoryProbablyExists(ts.getDirectoryPath(candidate), state.host), state);
});
@@ -20366,12 +21475,18 @@ var ts;
}
}
function nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache) {
- return nodeModuleNameResolverWorker(moduleName, containingFile, compilerOptions, host, cache, false);
+ return nodeModuleNameResolverWorker(moduleName, ts.getDirectoryPath(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);
+ function resolveJavaScriptModule(moduleName, initialDir, host) {
+ var _a = nodeModuleNameResolverWorker(moduleName, initialDir, { moduleResolution: ts.ModuleResolutionKind.NodeJs, allowJs: true }, host, undefined, true), resolvedModule = _a.resolvedModule, failedLookupLocations = _a.failedLookupLocations;
+ if (!resolvedModule) {
+ throw new Error("Could not resolve JS module " + moduleName + " starting at " + initialDir + ". Looked in: " + failedLookupLocations.join(", "));
+ }
+ return resolvedModule.resolvedFileName;
+ }
+ ts.resolveJavaScriptModule = resolveJavaScriptModule;
+ function nodeModuleNameResolverWorker(moduleName, containingDirectory, compilerOptions, host, cache, jsOnly) {
var traceEnabled = isTraceEnabled(compilerOptions, host);
var failedLookupLocations = [];
var state = { compilerOptions: compilerOptions, host: host, traceEnabled: traceEnabled };
@@ -20401,7 +21516,6 @@ var ts;
}
}
}
- ts.nodeModuleNameResolverWorker = nodeModuleNameResolverWorker;
function realpath(path, host, traceEnabled) {
if (!host.realpath) {
return path;
@@ -20602,9 +21716,10 @@ var ts;
return loadModuleFromNodeModulesFolder(Extensions.DtsOnly, mangleScopedPackage(moduleName, state), nodeModulesAtTypes_1, nodeModulesAtTypesExists, failedLookupLocations, state);
}
}
+ var mangledScopedPackageSeparator = "__";
function mangleScopedPackage(moduleName, state) {
if (ts.startsWith(moduleName, "@")) {
- var replaceSlash = moduleName.replace(ts.directorySeparator, "__");
+ var replaceSlash = moduleName.replace(ts.directorySeparator, mangledScopedPackageSeparator);
if (replaceSlash !== moduleName) {
var mangled = replaceSlash.slice(1);
if (state.traceEnabled) {
@@ -20615,6 +21730,16 @@ var ts;
}
return moduleName;
}
+ function getPackageNameFromAtTypesDirectory(mangledName) {
+ var withoutAtTypePrefix = ts.removePrefix(mangledName, "@types/");
+ if (withoutAtTypePrefix !== mangledName) {
+ return withoutAtTypePrefix.indexOf("__") !== -1 ?
+ "@" + withoutAtTypePrefix.replace(mangledScopedPackageSeparator, ts.directorySeparator) :
+ withoutAtTypePrefix;
+ }
+ return mangledName;
+ }
+ ts.getPackageNameFromAtTypesDirectory = getPackageNameFromAtTypesDirectory;
function tryFindNonRelativeModuleNameInCache(cache, moduleName, containingDirectory, traceEnabled, host) {
var result = cache && cache.get(containingDirectory);
if (result) {
@@ -20720,6 +21845,7 @@ var ts;
var Signature = ts.objectAllocator.getSignatureConstructor();
var typeCount = 0;
var symbolCount = 0;
+ var enumCount = 0;
var symbolInstantiationDepth = 0;
var emptyArray = [];
var emptySymbols = ts.createMap();
@@ -20864,13 +21990,21 @@ var ts;
tryFindAmbientModuleWithoutAugmentations: function (moduleName) {
return tryFindAmbientModule(moduleName, false);
},
- getApparentType: getApparentType
+ getApparentType: getApparentType,
+ getAllPossiblePropertiesOfType: getAllPossiblePropertiesOfType,
+ getSuggestionForNonexistentProperty: getSuggestionForNonexistentProperty,
+ getSuggestionForNonexistentSymbol: getSuggestionForNonexistentSymbol,
+ getBaseConstraintOfType: getBaseConstraintOfType,
+ getJsxNamespace: getJsxNamespace,
+ resolveNameAtLocation: function (location, name, meaning) {
+ location = ts.getParseTreeNode(location);
+ return resolveName(location, name, meaning, undefined, name);
+ },
};
var tupleTypes = [];
var unionTypes = ts.createMap();
var intersectionTypes = ts.createMap();
- var stringLiteralTypes = ts.createMap();
- var numericLiteralTypes = ts.createMap();
+ var literalTypes = ts.createMap();
var indexedAccessTypes = ts.createMap();
var evolvingArrayTypes = [];
var unknownSymbol = createSymbol(4, "unknown");
@@ -20943,11 +22077,13 @@ var ts;
var flowLoopStart = 0;
var flowLoopCount = 0;
var visitedFlowCount = 0;
- var emptyStringType = getLiteralTypeForText(32, "");
- var zeroType = getLiteralTypeForText(64, "0");
+ var emptyStringType = getLiteralType("");
+ var zeroType = getLiteralType(0);
var resolutionTargets = [];
var resolutionResults = [];
var resolutionPropertyNames = [];
+ var suggestionCount = 0;
+ var maximumSuggestionCount = 10;
var mergedSymbols = [];
var symbolLinks = [];
var nodeLinks = [];
@@ -21131,16 +22267,16 @@ var ts;
recordMergedSymbol(target, source);
}
else if (target.flags & 1024) {
- error(source.declarations[0].name, ts.Diagnostics.Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity, symbolToString(target));
+ error(ts.getNameOfDeclaration(source.declarations[0]), 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;
ts.forEach(source.declarations, function (node) {
- error(node.name ? node.name : node, message_2, symbolToString(source));
+ error(ts.getNameOfDeclaration(node) || node, message_2, symbolToString(source));
});
ts.forEach(target.declarations, function (node) {
- error(node.name ? node.name : node, message_2, symbolToString(source));
+ error(ts.getNameOfDeclaration(node) || node, message_2, symbolToString(source));
});
}
}
@@ -21213,9 +22349,6 @@ 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 === 265 && !ts.isExternalOrCommonJsModule(node);
}
@@ -21223,7 +22356,7 @@ var ts;
if (meaning) {
var symbol = symbols.get(name);
if (symbol) {
- ts.Debug.assert((getCheckFlags(symbol) & 1) === 0, "Should never get an instantiated symbol here.");
+ ts.Debug.assert((ts.getCheckFlags(symbol) & 1) === 0, "Should never get an instantiated symbol here.");
if (symbol.flags & meaning) {
return symbol;
}
@@ -21251,7 +22384,9 @@ var ts;
var useFile = ts.getSourceFileOfNode(usage);
if (declarationFile !== useFile) {
if ((modulekind && (declarationFile.externalModuleIndicator || useFile.externalModuleIndicator)) ||
- (!compilerOptions.outFile && !compilerOptions.out)) {
+ (!compilerOptions.outFile && !compilerOptions.out) ||
+ isInTypeQuery(usage) ||
+ ts.isInAmbientContext(declaration)) {
return true;
}
if (isUsedInFunctionOrInstanceProperty(usage, declaration)) {
@@ -21290,14 +22425,7 @@ var ts;
}
break;
}
- switch (declaration.parent.parent.kind) {
- case 215:
- case 216:
- if (isSameScopeDescendentOf(usage, declaration.parent.parent.expression, container)) {
- return true;
- }
- }
- return false;
+ return ts.isForInOrOfStatement(declaration.parent.parent) && isSameScopeDescendentOf(usage, declaration.parent.parent.expression, container);
}
function isUsedInFunctionOrInstanceProperty(usage, declaration, container) {
return !!ts.findAncestor(usage, function (current) {
@@ -21326,7 +22454,11 @@ var ts;
});
}
}
- function resolveName(location, name, meaning, nameNotFoundMessage, nameArg) {
+ function resolveName(location, name, meaning, nameNotFoundMessage, nameArg, suggestedNameNotFoundMessage) {
+ return resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, getSymbol, suggestedNameNotFoundMessage);
+ }
+ function resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, lookup, suggestedNameNotFoundMessage) {
+ var originalLocation = location;
var result;
var lastLocation;
var propertyWithInvalidInitializer;
@@ -21335,7 +22467,7 @@ var ts;
var isInExternalModule = false;
loop: while (location) {
if (location.locals && !isGlobalSourceFile(location)) {
- if (result = getSymbol(location.locals, name, meaning)) {
+ if (result = lookup(location.locals, name, meaning)) {
var useResult = true;
if (ts.isFunctionLike(location) && lastLocation && lastLocation !== location.body) {
if (meaning & result.flags & 793064 && lastLocation.kind !== 283) {
@@ -21382,12 +22514,12 @@ var ts;
break;
}
}
- if (result = getSymbol(moduleExports, name, meaning & 8914931)) {
+ if (result = lookup(moduleExports, name, meaning & 8914931)) {
break loop;
}
break;
case 232:
- if (result = getSymbol(getSymbolOfNode(location).exports, name, meaning & 8)) {
+ if (result = lookup(getSymbolOfNode(location).exports, name, meaning & 8)) {
break loop;
}
break;
@@ -21396,7 +22528,7 @@ var ts;
if (ts.isClassLike(location.parent) && !(ts.getModifierFlags(location) & 32)) {
var ctor = findConstructorDeclaration(location.parent);
if (ctor && ctor.locals) {
- if (getSymbol(ctor.locals, name, meaning & 107455)) {
+ if (lookup(ctor.locals, name, meaning & 107455)) {
propertyWithInvalidInitializer = location;
}
}
@@ -21405,7 +22537,7 @@ var ts;
case 229:
case 199:
case 230:
- if (result = getSymbol(getSymbolOfNode(location).members, name, meaning & 793064)) {
+ if (result = lookup(getSymbolOfNode(location).members, name, meaning & 793064)) {
if (!isTypeParameterSymbolDeclaredInContainer(result, location)) {
result = undefined;
break;
@@ -21427,7 +22559,7 @@ var ts;
case 144:
grandparent = location.parent.parent;
if (ts.isClassLike(grandparent) || grandparent.kind === 230) {
- if (result = getSymbol(getSymbolOfNode(grandparent).members, name, meaning & 793064)) {
+ if (result = lookup(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;
}
@@ -21474,7 +22606,7 @@ var ts;
result.isReferenced = true;
}
if (!result) {
- result = getSymbol(globals, name, meaning);
+ result = lookup(globals, name, meaning);
}
if (!result) {
if (nameNotFoundMessage) {
@@ -21484,7 +22616,17 @@ var ts;
!checkAndReportErrorForUsingTypeAsNamespace(errorLocation, name, meaning) &&
!checkAndReportErrorForUsingTypeAsValue(errorLocation, name, meaning) &&
!checkAndReportErrorForUsingNamespaceModuleAsValue(errorLocation, name, meaning)) {
- error(errorLocation, nameNotFoundMessage, typeof nameArg === "string" ? nameArg : ts.declarationNameToString(nameArg));
+ var suggestion = void 0;
+ if (suggestedNameNotFoundMessage && suggestionCount < maximumSuggestionCount) {
+ suggestion = getSuggestionForNonexistentSymbol(originalLocation, name, meaning);
+ if (suggestion) {
+ error(errorLocation, suggestedNameNotFoundMessage, typeof nameArg === "string" ? nameArg : ts.declarationNameToString(nameArg), suggestion);
+ }
+ }
+ if (!suggestion) {
+ error(errorLocation, nameNotFoundMessage, typeof nameArg === "string" ? nameArg : ts.declarationNameToString(nameArg));
+ }
+ suggestionCount++;
}
}
return undefined;
@@ -21495,8 +22637,9 @@ 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 ||
- ((meaning & 32 || meaning & 384) && (meaning & 107455) === 107455)) {
+ if (errorLocation &&
+ (meaning & 2 ||
+ ((meaning & 32 || meaning & 384) && (meaning & 107455) === 107455))) {
var exportOrLocalSymbol = getExportSymbolOfValueSymbolIfExported(result);
if (exportOrLocalSymbol.flags & 2 || exportOrLocalSymbol.flags & 32 || exportOrLocalSymbol.flags & 384) {
checkResolvedBlockScopedVariable(exportOrLocalSymbol, errorLocation);
@@ -21581,6 +22724,10 @@ var ts;
}
function checkAndReportErrorForUsingTypeAsValue(errorLocation, name, meaning) {
if (meaning & (107455 & ~1024)) {
+ if (name === "any" || name === "string" || name === "number" || name === "boolean" || name === "never") {
+ error(errorLocation, ts.Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here, name);
+ return true;
+ }
var symbol = resolveSymbol(resolveName(errorLocation, name, 793064 & ~107455, undefined, undefined));
if (symbol && !(symbol.flags & 1024)) {
error(errorLocation, ts.Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here, name);
@@ -21612,13 +22759,13 @@ var ts;
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));
+ error(errorLocation, ts.Diagnostics.Block_scoped_variable_0_used_before_its_declaration, ts.declarationNameToString(ts.getNameOfDeclaration(declaration)));
}
else if (result.flags & 32) {
- error(errorLocation, ts.Diagnostics.Class_0_used_before_its_declaration, ts.declarationNameToString(declaration.name));
+ error(errorLocation, ts.Diagnostics.Class_0_used_before_its_declaration, ts.declarationNameToString(ts.getNameOfDeclaration(declaration)));
}
- else if (result.flags & 384) {
- error(errorLocation, ts.Diagnostics.Enum_0_used_before_its_declaration, ts.declarationNameToString(declaration.name));
+ else if (result.flags & 256) {
+ error(errorLocation, ts.Diagnostics.Enum_0_used_before_its_declaration, ts.declarationNameToString(ts.getNameOfDeclaration(declaration)));
}
}
}
@@ -21630,7 +22777,7 @@ var ts;
if (node.kind === 237) {
return node;
}
- return ts.findAncestor(node, function (n) { return n.kind === 238; });
+ return ts.findAncestor(node, ts.isImportDeclaration);
}
}
function getDeclarationOfAliasSymbol(symbol) {
@@ -21669,6 +22816,9 @@ var ts;
return resolveESModuleSymbol(resolveExternalModuleName(node, moduleSpecifier), moduleSpecifier, dontResolveAlias);
}
function combineValueAndTypeSymbols(valueSymbol, typeSymbol) {
+ if (valueSymbol === unknownSymbol && typeSymbol === unknownSymbol) {
+ return unknownSymbol;
+ }
if (valueSymbol.flags & (793064 | 1920)) {
return valueSymbol;
}
@@ -21733,10 +22883,10 @@ var ts;
function getTargetOfNamespaceExportDeclaration(node, dontResolveAlias) {
return resolveExternalModuleSymbol(node.parent.symbol, dontResolveAlias);
}
- function getTargetOfExportSpecifier(node, dontResolveAlias) {
+ function getTargetOfExportSpecifier(node, meaning, dontResolveAlias) {
return node.parent.parent.moduleSpecifier ?
getExternalModuleMember(node.parent.parent, node, dontResolveAlias) :
- resolveEntityName(node.propertyName || node.name, 107455 | 793064 | 1920, false, dontResolveAlias);
+ resolveEntityName(node.propertyName || node.name, meaning, false, dontResolveAlias);
}
function getTargetOfExportAssignment(node, dontResolveAlias) {
return resolveEntityName(node.expression, 107455 | 793064 | 1920, false, dontResolveAlias);
@@ -21752,15 +22902,19 @@ var ts;
case 242:
return getTargetOfImportSpecifier(node, dontRecursivelyResolve);
case 246:
- return getTargetOfExportSpecifier(node, dontRecursivelyResolve);
+ return getTargetOfExportSpecifier(node, 107455 | 793064 | 1920, dontRecursivelyResolve);
case 243:
return getTargetOfExportAssignment(node, dontRecursivelyResolve);
case 236:
return getTargetOfNamespaceExportDeclaration(node, dontRecursivelyResolve);
}
}
+ function isNonLocalAlias(symbol, excludes) {
+ if (excludes === void 0) { excludes = 107455 | 793064 | 1920; }
+ return symbol && (symbol.flags & (8388608 | excludes)) === 8388608;
+ }
function resolveSymbol(symbol, dontResolveAlias) {
- var shouldResolve = !dontResolveAlias && symbol && symbol.flags & 8388608 && !(symbol.flags & (107455 | 793064 | 1920));
+ var shouldResolve = !dontResolveAlias && isNonLocalAlias(symbol);
return shouldResolve ? resolveAlias(symbol) : symbol;
}
function resolveAlias(symbol) {
@@ -21874,7 +23028,7 @@ var ts;
else {
ts.Debug.fail("Unknown entity name kind.");
}
- ts.Debug.assert((getCheckFlags(symbol) & 1) === 0, "Should never get an instantiated symbol here.");
+ ts.Debug.assert((ts.getCheckFlags(symbol) & 1) === 0, "Should never get an instantiated symbol here.");
return (symbol.flags & meaning) || dontResolveAlias ? symbol : resolveAlias(symbol);
}
function resolveExternalModuleName(location, moduleReferenceExpression) {
@@ -21894,6 +23048,11 @@ var ts;
if (moduleName === undefined) {
return;
}
+ if (ts.startsWith(moduleReference, "@types/")) {
+ var diag = ts.Diagnostics.Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1;
+ var withoutAtTypePrefix = ts.removePrefix(moduleReference, "@types/");
+ error(errorNode, diag, withoutAtTypePrefix, moduleReference);
+ }
var ambientModule = tryFindAmbientModule(moduleName, true);
if (ambientModule) {
return ambientModule;
@@ -21923,7 +23082,9 @@ var ts;
error(errorNode, diag, moduleReference, resolvedModule.resolvedFileName);
}
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);
+ var errorInfo = ts.chainDiagnosticMessages(undefined, ts.Diagnostics.Try_npm_install_types_Slash_0_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0, moduleReference);
+ errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type, moduleReference, resolvedModule.resolvedFileName);
+ diagnostics.add(ts.createDiagnosticForNodeFromMessageChain(errorNode, errorInfo));
}
return undefined;
}
@@ -21951,7 +23112,6 @@ var ts;
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;
}
@@ -22061,8 +23221,8 @@ var ts;
}
function findConstructorDeclaration(node) {
var members = node.members;
- for (var _i = 0, members_1 = members; _i < members_1.length; _i++) {
- var member = members_1[_i];
+ for (var _i = 0, members_2 = members; _i < members_2.length; _i++) {
+ var member = members_2[_i];
if (member.kind === 152 && ts.nodeIsPresent(member.body)) {
return member;
}
@@ -22092,7 +23252,7 @@ var ts;
return type;
}
function createTypeofType() {
- return getUnionType(ts.convertToArray(typeofEQFacts.keys(), function (s) { return getLiteralTypeForText(32, s); }));
+ return getUnionType(ts.convertToArray(typeofEQFacts.keys(), getLiteralType));
}
function isReservedMemberName(name) {
return name.charCodeAt(0) === 95 &&
@@ -22188,7 +23348,7 @@ var ts;
if (!useOnlyExternalAliasing ||
ts.forEach(symbolFromSymbolTable.declarations, ts.isExternalModuleImportEqualsDeclaration)) {
var resolvedImportedSymbol = resolveAlias(symbolFromSymbolTable);
- if (isAccessible(symbolFromSymbolTable, resolveAlias(symbolFromSymbolTable))) {
+ if (isAccessible(symbolFromSymbolTable, resolvedImportedSymbol)) {
return [symbolFromSymbolTable];
}
var accessibleSymbolsFromExports = resolvedImportedSymbol.exports ? getAccessibleSymbolChainFromSymbolTableWorker(resolvedImportedSymbol.exports, visitedSymbolTables) : undefined;
@@ -22362,34 +23522,59 @@ var ts;
return result;
}
function typeToString(type, enclosingDeclaration, flags) {
- var writer = ts.getSingleLineStringWriter();
- getSymbolDisplayBuilder().buildTypeDisplay(type, writer, enclosingDeclaration, flags);
- var result = writer.string();
- ts.releaseStringWriter(writer);
- var maxLength = compilerOptions.noErrorTruncation || flags & 4 ? undefined : 100;
+ var typeNode = nodeBuilder.typeToTypeNode(type, enclosingDeclaration, toNodeBuilderFlags(flags) | ts.NodeBuilderFlags.IgnoreErrors | ts.NodeBuilderFlags.WriteTypeParametersInQualifiedName);
+ ts.Debug.assert(typeNode !== undefined, "should always get typenode");
+ var options = { removeComments: true };
+ var writer = ts.createTextWriter("");
+ var printer = ts.createPrinter(options);
+ var sourceFile = enclosingDeclaration && ts.getSourceFileOfNode(enclosingDeclaration);
+ printer.writeNode(3, typeNode, sourceFile, writer);
+ var result = writer.getText();
+ var maxLength = compilerOptions.noErrorTruncation || flags & 8 ? undefined : 100;
if (maxLength && result.length >= maxLength) {
- result = result.substr(0, maxLength - "...".length) + "...";
+ return result.substr(0, maxLength - "...".length) + "...";
}
return result;
+ function toNodeBuilderFlags(flags) {
+ var result = ts.NodeBuilderFlags.None;
+ if (!flags) {
+ return result;
+ }
+ if (flags & 8) {
+ result |= ts.NodeBuilderFlags.NoTruncation;
+ }
+ if (flags & 256) {
+ result |= ts.NodeBuilderFlags.UseFullyQualifiedType;
+ }
+ if (flags & 4096) {
+ result |= ts.NodeBuilderFlags.SuppressAnyReturnType;
+ }
+ if (flags & 1) {
+ result |= ts.NodeBuilderFlags.WriteArrayAsGenericType;
+ }
+ if (flags & 64) {
+ result |= ts.NodeBuilderFlags.WriteTypeArgumentsOfSignature;
+ }
+ return result;
+ }
}
function createNodeBuilder() {
- var context;
return {
typeToTypeNode: function (type, enclosingDeclaration, flags) {
- context = createNodeBuilderContext(enclosingDeclaration, flags);
- var resultingNode = typeToTypeNodeHelper(type);
+ var context = createNodeBuilderContext(enclosingDeclaration, flags);
+ var resultingNode = typeToTypeNodeHelper(type, context);
var result = context.encounteredError ? undefined : resultingNode;
return result;
},
indexInfoToIndexSignatureDeclaration: function (indexInfo, kind, enclosingDeclaration, flags) {
- context = createNodeBuilderContext(enclosingDeclaration, flags);
- var resultingNode = indexInfoToIndexSignatureDeclarationHelper(indexInfo, kind);
+ var context = createNodeBuilderContext(enclosingDeclaration, flags);
+ var resultingNode = indexInfoToIndexSignatureDeclarationHelper(indexInfo, kind, context);
var result = context.encounteredError ? undefined : resultingNode;
return result;
},
signatureToSignatureDeclaration: function (signature, kind, enclosingDeclaration, flags) {
- context = createNodeBuilderContext(enclosingDeclaration, flags);
- var resultingNode = signatureToSignatureDeclarationHelper(signature, kind);
+ var context = createNodeBuilderContext(enclosingDeclaration, flags);
+ var resultingNode = signatureToSignatureDeclarationHelper(signature, kind, context);
var result = context.encounteredError ? undefined : resultingNode;
return result;
}
@@ -22399,12 +23584,12 @@ var ts;
enclosingDeclaration: enclosingDeclaration,
flags: flags,
encounteredError: false,
- inObjectTypeLiteral: false,
- checkAlias: true,
symbolStack: undefined
};
}
- function typeToTypeNodeHelper(type) {
+ function typeToTypeNodeHelper(type, context) {
+ var inTypeAlias = context.flags & ts.NodeBuilderFlags.InTypeAlias;
+ context.flags &= ~ts.NodeBuilderFlags.InTypeAlias;
if (!type) {
context.encounteredError = true;
return undefined;
@@ -22421,23 +23606,25 @@ var ts;
if (type.flags & 8) {
return ts.createKeywordTypeNode(122);
}
- if (type.flags & 16) {
- var name = symbolToName(type.symbol, false);
+ if (type.flags & 256 && !(type.flags & 65536)) {
+ var parentSymbol = getParentOfSymbol(type.symbol);
+ var parentName = symbolToName(parentSymbol, context, 793064, false);
+ var enumLiteralName = getDeclaredTypeOfSymbol(parentSymbol) === type ? parentName : ts.createQualifiedName(parentName, getNameOfSymbol(type.symbol, context));
+ return ts.createTypeReferenceNode(enumLiteralName, undefined);
+ }
+ if (type.flags & 272) {
+ var name = symbolToName(type.symbol, context, 793064, false);
return ts.createTypeReferenceNode(name, undefined);
}
if (type.flags & (32)) {
- return ts.createLiteralTypeNode((ts.createLiteral(type.text)));
+ return ts.createLiteralTypeNode(ts.setEmitFlags(ts.createLiteral(type.value), 16777216));
}
if (type.flags & (64)) {
- return ts.createLiteralTypeNode((ts.createNumericLiteral(type.text)));
+ return ts.createLiteralTypeNode((ts.createLiteral(type.value)));
}
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(105);
}
@@ -22457,8 +23644,8 @@ var ts;
return ts.createKeywordTypeNode(134);
}
if (type.flags & 16384 && type.isThisType) {
- if (context.inObjectTypeLiteral) {
- if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.allowThisInObjectLiteral)) {
+ if (context.flags & ts.NodeBuilderFlags.InObjectTypeLiteral) {
+ if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.AllowThisInObjectLiteral)) {
context.encounteredError = true;
}
}
@@ -22469,72 +23656,53 @@ var ts;
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);
+ if (type.flags & 16384 || objectFlags & 3) {
+ var name = symbolToName(type.symbol, context, 793064, false);
return ts.createTypeReferenceNode(name, undefined);
}
- if (context.checkAlias && type.aliasSymbol) {
- var name = symbolToName(type.aliasSymbol, false);
- var typeArgumentNodes = type.aliasTypeArguments && mapToTypeNodeArray(type.aliasTypeArguments);
+ if (!inTypeAlias && type.aliasSymbol &&
+ isSymbolAccessible(type.aliasSymbol, context.enclosingDeclaration, 793064, false).accessibility === 0) {
+ var name = symbolToTypeReferenceName(type.aliasSymbol);
+ var typeArgumentNodes = mapToTypeNodes(type.aliasTypeArguments, context);
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(166, unionTypeNodes);
+ if (type.flags & (65536 | 131072)) {
+ var types = type.flags & 65536 ? formatUnionTypes(type.types) : type.types;
+ var typeNodes = mapToTypeNodes(types, context);
+ if (typeNodes && typeNodes.length > 0) {
+ var unionOrIntersectionTypeNode = ts.createUnionOrIntersectionTypeNode(type.flags & 65536 ? 166 : 167, typeNodes);
+ return unionOrIntersectionTypeNode;
}
else {
- if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.allowEmptyUnionOrIntersection)) {
+ if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.AllowEmptyUnionOrIntersection)) {
context.encounteredError = true;
}
return undefined;
}
}
- if (type.flags & 131072) {
- return ts.createUnionOrIntersectionTypeNode(167, 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);
+ var indexTypeNode = typeToTypeNodeHelper(indexedType, context);
return ts.createTypeOperatorNode(indexTypeNode);
}
if (type.flags & 524288) {
- var objectTypeNode = typeToTypeNodeHelper(type.objectType);
- var indexTypeNode = typeToTypeNodeHelper(type.indexType);
+ var objectTypeNode = typeToTypeNodeHelper(type.objectType, context);
+ var indexTypeNode = typeToTypeNodeHelper(type.indexType, context);
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(131) : undefined;
var questionToken = type.declaration && type.declaration.questionToken ? ts.createToken(55) : undefined;
- return ts.createMappedTypeNode(readonlyToken, typeParameterNode, questionToken, templateTypeNode);
+ var typeParameterNode = typeParameterToDeclaration(getTypeParameterFromMappedType(type), context);
+ var templateTypeNode = typeToTypeNodeHelper(getTemplateTypeFromMappedType(type), context);
+ var mappedTypeNode = ts.createMappedTypeNode(readonlyToken, typeParameterNode, questionToken, templateTypeNode);
+ return ts.setEmitFlags(mappedTypeNode, 1);
}
function createAnonymousTypeNode(type) {
var symbol = type.symbol;
@@ -22542,12 +23710,12 @@ var ts;
if (symbol.flags & 32 && !getBaseTypeVariableOfClass(symbol) ||
symbol.flags & (384 | 512) ||
shouldWriteTypeOfFunctionSymbol()) {
- return createTypeQueryNodeFromSymbol(symbol);
+ return createTypeQueryNodeFromSymbol(symbol, 107455);
}
else if (ts.contains(context.symbolStack, symbol)) {
var typeAlias = getTypeAliasForTypeLiteral(type);
if (typeAlias) {
- var entityName = symbolToName(typeAlias, false);
+ var entityName = symbolToName(typeAlias, context, 793064, false);
return ts.createTypeReferenceNode(entityName, undefined);
}
else {
@@ -22589,41 +23757,52 @@ var ts;
var resolved = resolveStructuredTypeMembers(type);
if (!resolved.properties.length && !resolved.stringIndexInfo && !resolved.numberIndexInfo) {
if (!resolved.callSignatures.length && !resolved.constructSignatures.length) {
- return ts.createTypeLiteralNode(undefined);
+ return ts.setEmitFlags(ts.createTypeLiteralNode(undefined), 1);
}
if (resolved.callSignatures.length === 1 && !resolved.constructSignatures.length) {
var signature = resolved.callSignatures[0];
- return signatureToSignatureDeclarationHelper(signature, 160);
+ var signatureNode = signatureToSignatureDeclarationHelper(signature, 160, context);
+ return signatureNode;
}
if (resolved.constructSignatures.length === 1 && !resolved.callSignatures.length) {
var signature = resolved.constructSignatures[0];
- return signatureToSignatureDeclarationHelper(signature, 161);
+ var signatureNode = signatureToSignatureDeclarationHelper(signature, 161, context);
+ return signatureNode;
}
}
- var saveInObjectTypeLiteral = context.inObjectTypeLiteral;
- context.inObjectTypeLiteral = true;
+ var savedFlags = context.flags;
+ context.flags |= ts.NodeBuilderFlags.InObjectTypeLiteral;
var members = createTypeNodesFromResolvedType(resolved);
- context.inObjectTypeLiteral = saveInObjectTypeLiteral;
- return ts.createTypeLiteralNode(members);
+ context.flags = savedFlags;
+ var typeLiteralNode = ts.createTypeLiteralNode(members);
+ return ts.setEmitFlags(typeLiteralNode, 1);
}
- function createTypeQueryNodeFromSymbol(symbol) {
- var entityName = symbolToName(symbol, false);
+ function createTypeQueryNodeFromSymbol(symbol, symbolFlags) {
+ var entityName = symbolToName(symbol, context, symbolFlags, false);
return ts.createTypeQueryNode(entityName);
}
+ function symbolToTypeReferenceName(symbol) {
+ var entityName = symbol.flags & 32 || !isReservedMemberName(symbol.name) ? symbolToName(symbol, context, 793064, false) : ts.createIdentifier("");
+ return entityName;
+ }
function typeReferenceToTypeNode(type) {
var typeArguments = type.typeArguments || emptyArray;
if (type.target === globalArrayType) {
- var elementType = typeToTypeNodeHelper(typeArguments[0]);
+ if (context.flags & ts.NodeBuilderFlags.WriteArrayAsGenericType) {
+ var typeArgumentNode = typeToTypeNodeHelper(typeArguments[0], context);
+ return ts.createTypeReferenceNode("Array", [typeArgumentNode]);
+ }
+ var elementType = typeToTypeNodeHelper(typeArguments[0], context);
return ts.createArrayTypeNode(elementType);
}
else if (type.target.objectFlags & 8) {
if (typeArguments.length > 0) {
- var tupleConstituentNodes = mapToTypeNodeArray(typeArguments.slice(0, getTypeReferenceArity(type)));
+ var tupleConstituentNodes = mapToTypeNodes(typeArguments.slice(0, getTypeReferenceArity(type)), context);
if (tupleConstituentNodes && tupleConstituentNodes.length > 0) {
return ts.createTupleTypeNode(tupleConstituentNodes);
}
}
- if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.allowEmptyTuple)) {
+ if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.AllowEmptyTuple)) {
context.encounteredError = true;
}
return undefined;
@@ -22631,7 +23810,7 @@ var ts;
else {
var outerTypeParameters = type.target.outerTypeParameters;
var i = 0;
- var qualifiedName = undefined;
+ var qualifiedName = void 0;
if (outerTypeParameters) {
var length_1 = outerTypeParameters.length;
while (i < length_1) {
@@ -22641,48 +23820,72 @@ var ts;
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 {
+ var typeArgumentSlice = mapToTypeNodes(typeArguments.slice(start, i), context);
+ var typeArgumentNodes_1 = typeArgumentSlice && ts.createNodeArray(typeArgumentSlice);
+ var namePart = symbolToTypeReferenceName(parent);
+ (namePart.kind === 71 ? namePart : namePart.right).typeArguments = typeArgumentNodes_1;
+ if (qualifiedName) {
ts.Debug.assert(!qualifiedName.right);
- qualifiedName.right = qualifiedNamePart;
+ qualifiedName = addToQualifiedNameMissingRightIdentifier(qualifiedName, namePart);
qualifiedName = ts.createQualifiedName(qualifiedName, undefined);
}
+ else {
+ qualifiedName = ts.createQualifiedName(namePart, undefined);
+ }
}
}
}
var entityName = undefined;
- var nameIdentifier = symbolToName(type.symbol, true);
+ var nameIdentifier = symbolToTypeReferenceName(type.symbol);
if (qualifiedName) {
ts.Debug.assert(!qualifiedName.right);
- qualifiedName.right = nameIdentifier;
+ qualifiedName = addToQualifiedNameMissingRightIdentifier(qualifiedName, 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;
+ var typeArgumentNodes = void 0;
+ if (typeArguments.length > 0) {
+ var typeParameterCount = (type.target.typeParameters || emptyArray).length;
+ typeArgumentNodes = mapToTypeNodes(typeArguments.slice(i, typeParameterCount), context);
+ }
+ if (typeArgumentNodes) {
+ var lastIdentifier = entityName.kind === 71 ? entityName : entityName.right;
+ lastIdentifier.typeArguments = undefined;
+ }
return ts.createTypeReferenceNode(entityName, typeArgumentNodes);
}
}
+ function addToQualifiedNameMissingRightIdentifier(left, right) {
+ ts.Debug.assert(left.right === undefined);
+ if (right.kind === 71) {
+ left.right = right;
+ return left;
+ }
+ var rightPart = right;
+ while (rightPart.left.kind !== 71) {
+ rightPart = rightPart.left;
+ }
+ left.right = rightPart.left;
+ rightPart.left = left;
+ return right;
+ }
function createTypeNodesFromResolvedType(resolvedType) {
var typeElements = [];
for (var _i = 0, _a = resolvedType.callSignatures; _i < _a.length; _i++) {
var signature = _a[_i];
- typeElements.push(signatureToSignatureDeclarationHelper(signature, 155));
+ typeElements.push(signatureToSignatureDeclarationHelper(signature, 155, context));
}
for (var _b = 0, _c = resolvedType.constructSignatures; _b < _c.length; _b++) {
var signature = _c[_b];
- typeElements.push(signatureToSignatureDeclarationHelper(signature, 156));
+ typeElements.push(signatureToSignatureDeclarationHelper(signature, 156, context));
}
if (resolvedType.stringIndexInfo) {
- typeElements.push(indexInfoToIndexSignatureDeclarationHelper(resolvedType.stringIndexInfo, 0));
+ typeElements.push(indexInfoToIndexSignatureDeclarationHelper(resolvedType.stringIndexInfo, 0, context));
}
if (resolvedType.numberIndexInfo) {
- typeElements.push(indexInfoToIndexSignatureDeclarationHelper(resolvedType.numberIndexInfo, 1));
+ typeElements.push(indexInfoToIndexSignatureDeclarationHelper(resolvedType.numberIndexInfo, 1, context));
}
var properties = resolvedType.properties;
if (!properties) {
@@ -22691,74 +23894,126 @@ var ts;
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 saveEnclosingDeclaration = context.enclosingDeclaration;
+ context.enclosingDeclaration = undefined;
+ var propertyName = symbolToName(propertySymbol, context, 107455, true);
+ context.enclosingDeclaration = saveEnclosingDeclaration;
var optionalToken = propertySymbol.flags & 67108864 ? ts.createToken(55) : 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, 150);
+ var methodDeclaration = signatureToSignatureDeclarationHelper(signature, 150, context);
methodDeclaration.name = propertyName;
methodDeclaration.questionToken = optionalToken;
typeElements.push(methodDeclaration);
}
}
else {
- var propertyTypeNode = propertyType ? typeToTypeNodeHelper(propertyType) : ts.createKeywordTypeNode(119);
- typeElements.push(ts.createPropertySignature(propertyName, optionalToken, propertyTypeNode, undefined));
+ var propertyTypeNode = propertyType ? typeToTypeNodeHelper(propertyType, context) : ts.createKeywordTypeNode(119);
+ var modifiers = isReadonlySymbol(propertySymbol) ? [ts.createToken(131)] : undefined;
+ var propertySignature = ts.createPropertySignature(modifiers, propertyName, optionalToken, propertyTypeNode, undefined);
+ typeElements.push(propertySignature);
}
}
return typeElements.length ? typeElements : undefined;
}
}
- function indexInfoToIndexSignatureDeclarationHelper(indexInfo, kind) {
+ function mapToTypeNodes(types, context) {
+ if (ts.some(types)) {
+ var result = [];
+ for (var i = 0; i < types.length; ++i) {
+ var type = types[i];
+ var typeNode = typeToTypeNodeHelper(type, context);
+ if (typeNode) {
+ result.push(typeNode);
+ }
+ }
+ return result;
+ }
+ }
+ function indexInfoToIndexSignatureDeclarationHelper(indexInfo, kind, context) {
+ var name = ts.getNameFromIndexInfo(indexInfo) || "x";
var indexerTypeNode = ts.createKeywordTypeNode(kind === 0 ? 136 : 133);
- 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(131)] : undefined, [indexingParameter], typeNode);
+ var typeNode = typeToTypeNodeHelper(indexInfo.type, context);
+ return ts.createIndexSignature(undefined, indexInfo.isReadonly ? [ts.createToken(131)] : 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); });
+ function signatureToSignatureDeclarationHelper(signature, kind, context) {
+ var typeParameters = signature.typeParameters && signature.typeParameters.map(function (parameter) { return typeParameterToDeclaration(parameter, context); });
+ var parameters = signature.parameters.map(function (parameter) { return symbolToParameterDeclaration(parameter, context); });
+ if (signature.thisParameter) {
+ var thisParameter = symbolToParameterDeclaration(signature.thisParameter, context);
+ parameters.unshift(thisParameter);
+ }
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);
+ var parameterName = typePredicate.kind === 1 ?
+ ts.setEmitFlags(ts.createIdentifier(typePredicate.parameterName), 16777216) :
+ ts.createThisTypeNode();
+ var typeNode = typeToTypeNodeHelper(typePredicate.type, context);
returnTypeNode = ts.createTypePredicateNode(parameterName, typeNode);
}
else {
var returnType = getReturnTypeOfSignature(signature);
- returnTypeNode = returnType && typeToTypeNodeHelper(returnType);
+ returnTypeNode = returnType && typeToTypeNodeHelper(returnType, context);
}
- var returnTypeNodeExceptAny = returnTypeNode && returnTypeNode.kind !== 119 ? returnTypeNode : undefined;
- return ts.createSignatureDeclaration(kind, typeParameters, parameters, returnTypeNodeExceptAny);
+ if (context.flags & ts.NodeBuilderFlags.SuppressAnyReturnType) {
+ if (returnTypeNode && returnTypeNode.kind === 119) {
+ returnTypeNode = undefined;
+ }
+ }
+ else if (!returnTypeNode) {
+ returnTypeNode = ts.createKeywordTypeNode(119);
+ }
+ return ts.createSignatureDeclaration(kind, typeParameters, parameters, returnTypeNode);
}
- function typeParameterToDeclaration(type) {
+ function typeParameterToDeclaration(type, context) {
+ var name = symbolToName(type.symbol, context, 793064, true);
var constraint = getConstraintFromTypeParameter(type);
- var constraintNode = constraint && typeToTypeNodeHelper(constraint);
+ var constraintNode = constraint && typeToTypeNodeHelper(constraint, context);
var defaultParameter = getDefaultFromTypeParameter(type);
- var defaultParameterNode = defaultParameter && typeToTypeNodeHelper(defaultParameter);
- var name = symbolToName(type.symbol, true);
+ var defaultParameterNode = defaultParameter && typeToTypeNodeHelper(defaultParameter, context);
return ts.createTypeParameterDeclaration(name, constraintNode, defaultParameterNode);
}
- function symbolToParameterDeclaration(parameterSymbol) {
+ function symbolToParameterDeclaration(parameterSymbol, context) {
var parameterDeclaration = ts.getDeclarationOfKind(parameterSymbol, 146);
+ if (isTransientSymbol(parameterSymbol) && parameterSymbol.isRestParameter) {
+ return ts.createParameter(undefined, undefined, parameterSymbol.isRestParameter ? ts.createToken(24) : undefined, "args", undefined, typeToTypeNodeHelper(anyArrayType, context), undefined);
+ }
+ var modifiers = parameterDeclaration.modifiers && parameterDeclaration.modifiers.map(ts.getSynthesizedClone);
+ var dotDotDotToken = ts.isRestParameter(parameterDeclaration) ? ts.createToken(24) : undefined;
+ var name = parameterDeclaration.name ?
+ parameterDeclaration.name.kind === 71 ?
+ ts.setEmitFlags(ts.getSynthesizedClone(parameterDeclaration.name), 16777216) :
+ cloneBindingName(parameterDeclaration.name) :
+ parameterSymbol.name;
+ var questionToken = isOptionalParameter(parameterDeclaration) ? ts.createToken(55) : undefined;
var parameterType = getTypeOfSymbol(parameterSymbol);
- var parameterTypeNode = typeToTypeNodeHelper(parameterType);
- var parameterNode = ts.createParameter(parameterDeclaration.decorators, parameterDeclaration.modifiers, parameterDeclaration.dotDotDotToken && ts.createToken(24), ts.getSynthesizedClone(parameterDeclaration.name), parameterDeclaration.questionToken && ts.createToken(55), parameterTypeNode, parameterDeclaration.initializer);
+ if (isRequiredInitializedParameter(parameterDeclaration)) {
+ parameterType = getNullableType(parameterType, 2048);
+ }
+ var parameterTypeNode = typeToTypeNodeHelper(parameterType, context);
+ var parameterNode = ts.createParameter(undefined, modifiers, dotDotDotToken, name, questionToken, parameterTypeNode, undefined);
return parameterNode;
+ function cloneBindingName(node) {
+ return elideInitializerAndSetEmitFlags(node);
+ function elideInitializerAndSetEmitFlags(node) {
+ var visited = ts.visitEachChild(node, elideInitializerAndSetEmitFlags, ts.nullTransformationContext, undefined, elideInitializerAndSetEmitFlags);
+ var clone = ts.nodeIsSynthesized(visited) ? visited : ts.getSynthesizedClone(visited);
+ if (clone.kind === 176) {
+ clone.initializer = undefined;
+ }
+ return ts.setEmitFlags(clone, 1 | 16777216);
+ }
+ }
}
- function symbolToName(symbol, expectsIdentifier) {
+ function symbolToName(symbol, context, meaning, expectsIdentifier) {
var chain;
var isTypeParameter = symbol.flags & 262144;
- if (!isTypeParameter && context.enclosingDeclaration) {
- chain = getSymbolChain(symbol, 0, true);
+ if (!isTypeParameter && (context.enclosingDeclaration || context.flags & ts.NodeBuilderFlags.UseFullyQualifiedType)) {
+ chain = getSymbolChain(symbol, meaning, true);
ts.Debug.assert(chain && chain.length > 0);
}
else {
@@ -22766,18 +24021,18 @@ var ts;
}
if (expectsIdentifier && chain.length !== 1
&& !context.encounteredError
- && !(context.flags & ts.NodeBuilderFlags.allowQualifedNameInPlaceOfIdentifier)) {
+ && !(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 typeParameterNodes;
+ if (context.flags & ts.NodeBuilderFlags.WriteTypeParametersInQualifiedName && index > 0) {
var parentSymbol = chain[index - 1];
var typeParameters = void 0;
- if (getCheckFlags(symbol) & 1) {
+ if (ts.getCheckFlags(symbol) & 1) {
typeParameters = getTypeParametersOfClassOrInterface(parentSymbol);
}
else {
@@ -22786,20 +24041,10 @@ var ts;
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);
- }
+ typeParameterNodes = mapToTypeNodes(typeParameters, context);
}
- var symbolName = getNameOfSymbol(symbol);
- var symbolNameWithTypeParameters = typeParameterString.length > 0 ? symbolName + "<" + typeParameterString + ">" : symbolName;
- var identifier = ts.createIdentifier(symbolNameWithTypeParameters);
+ var symbolName = getNameOfSymbol(symbol, context);
+ var identifier = ts.setEmitFlags(ts.createIdentifier(symbolName, typeParameterNodes), 16777216);
return index > 0 ? ts.createQualifiedName(createEntityNameFromSymbolChain(chain, index - 1), identifier) : identifier;
}
function getSymbolChain(symbol, meaning, endOfChain) {
@@ -22825,28 +24070,29 @@ var ts;
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 === 226) {
- return ts.declarationNameToString(declaration.parent.name);
- }
- if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.allowAnonymousIdentifier)) {
- context.encounteredError = true;
- }
- switch (declaration.kind) {
- case 199:
- return "(Anonymous class)";
- case 186:
- case 187:
- return "(Anonymous function)";
- }
+ }
+ function getNameOfSymbol(symbol, context) {
+ var declaration = ts.firstOrUndefined(symbol.declarations);
+ if (declaration) {
+ var name = ts.getNameOfDeclaration(declaration);
+ if (name) {
+ return ts.declarationNameToString(name);
+ }
+ if (declaration.parent && declaration.parent.kind === 226) {
+ return ts.declarationNameToString(declaration.parent.name);
+ }
+ if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.AllowAnonymousIdentifier)) {
+ context.encounteredError = true;
+ }
+ switch (declaration.kind) {
+ case 199:
+ return "(Anonymous class)";
+ case 186:
+ case 187:
+ return "(Anonymous function)";
}
- return symbol.name;
}
+ return symbol.name;
}
}
function typePredicateToString(typePredicate, enclosingDeclaration, flags) {
@@ -22864,12 +24110,14 @@ var ts;
flags |= t.flags;
if (!(t.flags & 6144)) {
if (t.flags & (128 | 256)) {
- var baseType = t.flags & 128 ? booleanType : t.baseType;
- var count = baseType.types.length;
- if (i + count <= types.length && types[i + count - 1] === baseType.types[count - 1]) {
- result.push(baseType);
- i += count - 1;
- continue;
+ var baseType = t.flags & 128 ? booleanType : getBaseTypeOfEnumLiteralType(t);
+ if (baseType.flags & 65536) {
+ var count = baseType.types.length;
+ if (i + count <= types.length && types[i + count - 1] === baseType.types[count - 1]) {
+ result.push(baseType);
+ i += count - 1;
+ continue;
+ }
}
}
result.push(t);
@@ -22905,13 +24153,14 @@ var ts;
ts.isExternalModuleAugmentation(node.parent.parent);
}
function literalTypeToString(type) {
- return type.flags & 32 ? "\"" + ts.escapeString(type.text) + "\"" : type.text;
+ return type.flags & 32 ? "\"" + ts.escapeString(type.value) + "\"" : "" + type.value;
}
function getNameOfSymbol(symbol) {
if (symbol.declarations && symbol.declarations.length) {
var declaration = symbol.declarations[0];
- if (declaration.name) {
- return ts.declarationNameToString(declaration.name);
+ var name = ts.getNameOfDeclaration(declaration);
+ if (name) {
+ return ts.declarationNameToString(name);
}
if (declaration.parent && declaration.parent.kind === 226) {
return ts.declarationNameToString(declaration.parent.name);
@@ -22954,8 +24203,9 @@ var ts;
function appendParentTypeArgumentsAndSymbolName(symbol) {
if (parentSymbol) {
if (flags & 1) {
- if (getCheckFlags(symbol) & 1) {
- buildDisplayForTypeArgumentsAndDelimiters(getTypeParametersOfClassOrInterface(parentSymbol), symbol.mapper, writer, enclosingDeclaration);
+ if (ts.getCheckFlags(symbol) & 1) {
+ var params = getTypeParametersOfClassOrInterface(parentSymbol.flags & 8388608 ? resolveAlias(parentSymbol) : parentSymbol);
+ buildDisplayForTypeArgumentsAndDelimiters(params, symbol.mapper, writer, enclosingDeclaration);
}
else {
buildTypeParameterDisplayFromSymbol(parentSymbol, writer, enclosingDeclaration);
@@ -22991,7 +24241,7 @@ var ts;
}
}
var isTypeParameter = symbol.flags & 262144;
- var typeFormatFlag = 128 & typeFlags;
+ var typeFormatFlag = 256 & typeFlags;
if (!isTypeParameter && (enclosingDeclaration || typeFormatFlag)) {
walkSymbol(symbol, meaning, true);
}
@@ -23000,13 +24250,13 @@ var ts;
}
}
function buildTypeDisplay(type, writer, enclosingDeclaration, globalFlags, symbolStack) {
- var globalFlagsToPass = globalFlags & 16;
+ var globalFlagsToPass = globalFlags & (32 | 16384);
var inObjectTypeLiteral = false;
return writeType(type, globalFlags);
function writeType(type, flags) {
- var nextFlags = flags & ~512;
+ var nextFlags = flags & ~1024;
if (type.flags & 16793231) {
- writer.writeKeyword(!(globalFlags & 16) && isTypeAny(type)
+ writer.writeKeyword(!(globalFlags & 32) && isTypeAny(type)
? "any"
: type.intrinsicName);
}
@@ -23019,15 +24269,18 @@ var ts;
else if (getObjectFlags(type) & 4) {
writeTypeReference(type, nextFlags);
}
- else if (type.flags & 256) {
- buildSymbolDisplay(getParentOfSymbol(type.symbol), writer, enclosingDeclaration, 793064, 0, nextFlags);
- writePunctuation(writer, 23);
- appendSymbolNameOnly(type.symbol, writer);
+ else if (type.flags & 256 && !(type.flags & 65536)) {
+ var parent = getParentOfSymbol(type.symbol);
+ buildSymbolDisplay(parent, writer, enclosingDeclaration, 793064, 0, nextFlags);
+ if (getDeclaredTypeOfSymbol(parent) !== type) {
+ writePunctuation(writer, 23);
+ appendSymbolNameOnly(type.symbol, writer);
+ }
}
- else if (getObjectFlags(type) & 3 || type.flags & (16 | 16384)) {
+ else if (getObjectFlags(type) & 3 || type.flags & (272 | 16384)) {
buildSymbolDisplay(type.symbol, writer, enclosingDeclaration, 793064, 0, nextFlags);
}
- else if (!(flags & 512) && type.aliasSymbol &&
+ else if (!(flags & 1024) && type.aliasSymbol &&
isSymbolAccessible(type.aliasSymbol, enclosingDeclaration, 793064, false).accessibility === 0) {
var typeArguments = type.aliasTypeArguments;
writeSymbolTypeReference(type.aliasSymbol, typeArguments, 0, ts.length(typeArguments), nextFlags);
@@ -23042,12 +24295,18 @@ var ts;
writer.writeStringLiteral(literalTypeToString(type));
}
else if (type.flags & 262144) {
+ if (flags & 128) {
+ writePunctuation(writer, 19);
+ }
writer.writeKeyword("keyof");
writeSpace(writer);
- writeType(type.type, 64);
+ writeType(type.type, 128);
+ if (flags & 128) {
+ writePunctuation(writer, 20);
+ }
}
else if (type.flags & 524288) {
- writeType(type.objectType, 64);
+ writeType(type.objectType, 128);
writePunctuation(writer, 21);
writeType(type.indexType, 0);
writePunctuation(writer, 22);
@@ -23069,7 +24328,7 @@ var ts;
writePunctuation(writer, delimiter);
writeSpace(writer);
}
- writeType(types[i], delimiter === 26 ? 0 : 64);
+ writeType(types[i], delimiter === 26 ? 0 : 128);
}
}
function writeSymbolTypeReference(symbol, typeArguments, pos, end, flags) {
@@ -23078,7 +24337,7 @@ var ts;
}
if (pos < end) {
writePunctuation(writer, 27);
- writeType(typeArguments[pos], 256);
+ writeType(typeArguments[pos], 512);
pos++;
while (pos < end) {
writePunctuation(writer, 26);
@@ -23092,7 +24351,7 @@ var ts;
function writeTypeReference(type, flags) {
var typeArguments = type.typeArguments || emptyArray;
if (type.target === globalArrayType && !(flags & 1)) {
- writeType(typeArguments[0], 64);
+ writeType(typeArguments[0], 128);
writePunctuation(writer, 21);
writePunctuation(writer, 22);
}
@@ -23101,6 +24360,11 @@ var ts;
writeTypeList(type.typeArguments.slice(0, getTypeReferenceArity(type)), 26);
writePunctuation(writer, 22);
}
+ else if (flags & 16384 &&
+ type.symbol.valueDeclaration &&
+ type.symbol.valueDeclaration.kind === 199) {
+ writeAnonymousType(getDeclaredTypeOfClassOrInterface(type.symbol), flags);
+ }
else {
var outerTypeParameters = type.target.outerTypeParameters;
var i = 0;
@@ -23123,7 +24387,7 @@ var ts;
}
}
function writeUnionOrIntersectionType(type, flags) {
- if (flags & 64) {
+ if (flags & 128) {
writePunctuation(writer, 19);
}
if (type.flags & 65536) {
@@ -23132,14 +24396,16 @@ var ts;
else {
writeTypeList(type.types, 48);
}
- if (flags & 64) {
+ if (flags & 128) {
writePunctuation(writer, 20);
}
}
function writeAnonymousType(type, flags) {
var symbol = type.symbol;
if (symbol) {
- if (symbol.flags & 32 && !getBaseTypeVariableOfClass(symbol) ||
+ if (symbol.flags & 32 &&
+ !getBaseTypeVariableOfClass(symbol) &&
+ !(symbol.valueDeclaration.kind === 199 && flags & 16384) ||
symbol.flags & (384 | 512)) {
writeTypeOfSymbol(type, flags);
}
@@ -23159,9 +24425,17 @@ var ts;
if (!symbolStack) {
symbolStack = [];
}
- symbolStack.push(symbol);
- writeLiteralType(type, flags);
- symbolStack.pop();
+ var isConstructorObject = type.flags & 32768 &&
+ getObjectFlags(type) & 16 &&
+ type.symbol && type.symbol.flags & 32;
+ if (isConstructorObject) {
+ writeLiteralType(type, flags);
+ }
+ else {
+ symbolStack.push(symbol);
+ writeLiteralType(type, flags);
+ symbolStack.pop();
+ }
}
}
else {
@@ -23176,7 +24450,7 @@ var ts;
return declaration.parent.kind === 265 || declaration.parent.kind === 234;
}));
if (isStaticMethodSymbol || isNonLocalFunctionSymbol) {
- return !!(flags & 2) ||
+ return !!(flags & 4) ||
(ts.contains(symbolStack, symbol));
}
}
@@ -23197,11 +24471,11 @@ var ts;
}
}
function shouldAddParenthesisAroundFunctionType(callSignature, flags) {
- if (flags & 64) {
+ if (flags & 128) {
return true;
}
- else if (flags & 256) {
- var typeParameters = callSignature.target && (flags & 32) ?
+ else if (flags & 512) {
+ var typeParameters = callSignature.target && (flags & 64) ?
callSignature.target.typeParameters : callSignature.typeParameters;
return typeParameters && typeParameters.length !== 0;
}
@@ -23226,20 +24500,20 @@ var ts;
if (parenthesizeSignature) {
writePunctuation(writer, 19);
}
- buildSignatureDisplay(resolved.callSignatures[0], writer, enclosingDeclaration, globalFlagsToPass | 8, undefined, symbolStack);
+ buildSignatureDisplay(resolved.callSignatures[0], writer, enclosingDeclaration, globalFlagsToPass | 16, undefined, symbolStack);
if (parenthesizeSignature) {
writePunctuation(writer, 20);
}
return;
}
if (resolved.constructSignatures.length === 1 && !resolved.callSignatures.length) {
- if (flags & 64) {
+ if (flags & 128) {
writePunctuation(writer, 19);
}
writeKeyword(writer, 94);
writeSpace(writer);
- buildSignatureDisplay(resolved.constructSignatures[0], writer, enclosingDeclaration, globalFlagsToPass | 8, undefined, symbolStack);
- if (flags & 64) {
+ buildSignatureDisplay(resolved.constructSignatures[0], writer, enclosingDeclaration, globalFlagsToPass | 16, undefined, symbolStack);
+ if (flags & 128) {
writePunctuation(writer, 20);
}
return;
@@ -23272,6 +24546,14 @@ var ts;
buildIndexSignatureDisplay(resolved.numberIndexInfo, writer, 1, enclosingDeclaration, globalFlags, symbolStack);
for (var _d = 0, _e = resolved.properties; _d < _e.length; _d++) {
var p = _e[_d];
+ if (globalFlags & 16384) {
+ if (p.flags & 16777216) {
+ continue;
+ }
+ if (ts.getDeclarationModifierFlagsFromSymbol(p) & (8 | 16)) {
+ writer.reportPrivateInBaseOfClassExpression(p.name);
+ }
+ }
var t = getTypeOfSymbol(p);
if (p.flags & (16 | 8192) && !getPropertiesOfObjectType(t).length) {
var signatures = getSignaturesOfType(t, 0);
@@ -23287,7 +24569,7 @@ var ts;
writePropertyWithModifiers(p);
writePunctuation(writer, 56);
writeSpace(writer);
- writeType(t, 0);
+ writeType(t, globalFlags & 16384);
writePunctuation(writer, 25);
writer.writeLine();
}
@@ -23361,7 +24643,7 @@ var ts;
writeSpace(writer);
var type = getTypeOfSymbol(p);
if (parameterNode && isRequiredInitializedParameter(parameterNode)) {
- type = includeFalsyTypes(type, 2048);
+ type = getNullableType(type, 2048);
}
buildTypeDisplay(type, writer, enclosingDeclaration, flags, symbolStack);
}
@@ -23420,7 +24702,7 @@ var ts;
function buildDisplayForTypeArgumentsAndDelimiters(typeParameters, mapper, writer, enclosingDeclaration) {
if (typeParameters && typeParameters.length) {
writePunctuation(writer, 27);
- var flags = 256;
+ var flags = 512;
for (var i = 0; i < typeParameters.length; i++) {
if (i > 0) {
writePunctuation(writer, 26);
@@ -23460,10 +24742,10 @@ var ts;
}
function buildReturnTypeDisplay(signature, writer, enclosingDeclaration, flags, symbolStack) {
var returnType = getReturnTypeOfSignature(signature);
- if (flags & 2048 && isTypeAny(returnType)) {
+ if (flags & 4096 && isTypeAny(returnType)) {
return;
}
- if (flags & 8) {
+ if (flags & 16) {
writeSpace(writer);
writePunctuation(writer, 36);
}
@@ -23483,7 +24765,7 @@ var ts;
writeKeyword(writer, 94);
writeSpace(writer);
}
- if (signature.target && (flags & 32)) {
+ if (signature.target && (flags & 64)) {
buildDisplayForTypeArgumentsAndDelimiters(signature.target.typeParameters, signature.mapper, writer, enclosingDeclaration);
}
else {
@@ -23612,10 +24894,7 @@ var ts;
exportSymbol = resolveName(node.parent, node.text, 107455 | 793064 | 1920 | 8388608, ts.Diagnostics.Cannot_find_name_0, node);
}
else if (node.parent.kind === 246) {
- var exportSpecifier = node.parent;
- exportSymbol = exportSpecifier.parent.parent.moduleSpecifier ?
- getExternalModuleMember(exportSpecifier.parent.parent, exportSpecifier) :
- resolveEntityName(exportSpecifier.propertyName || exportSpecifier.name, 107455 | 793064 | 1920 | 8388608);
+ exportSymbol = getTargetOfExportSpecifier(node.parent, 107455 | 793064 | 1920 | 8388608);
}
var result = [];
if (exportSymbol) {
@@ -23736,7 +25015,7 @@ var ts;
for (var _a = 0, _b = getPropertiesOfType(source); _a < _b.length; _a++) {
var prop = _b[_a];
var inNamesToRemove = names.has(prop.name);
- var isPrivate = getDeclarationModifierFlagsFromSymbol(prop) & (8 | 16);
+ var isPrivate = ts.getDeclarationModifierFlagsFromSymbol(prop) & (8 | 16);
var isSetOnlyAccessor = prop.flags & 65536 && !(prop.flags & 32768);
if (!inNamesToRemove && !isPrivate && !isClassMethod(prop) && !isSetOnlyAccessor) {
members.set(prop.name, prop);
@@ -23836,15 +25115,9 @@ var ts;
return expr.kind === 177 && expr.elements.length === 0;
}
function addOptionality(type, optional) {
- return strictNullChecks && optional ? includeFalsyTypes(type, 2048) : type;
+ return strictNullChecks && optional ? getNullableType(type, 2048) : type;
}
function getTypeForVariableLikeDeclaration(declaration, includeOptionality) {
- if (declaration.flags & 65536) {
- var type = getTypeForDeclarationFromJSDocComment(declaration);
- if (type && type !== unknownType) {
- return type;
- }
- }
if (declaration.parent.parent.kind === 215) {
var indexType = getIndexType(checkNonNullExpression(declaration.parent.parent.expression));
return indexType.flags & (16384 | 262144) ? indexType : stringType;
@@ -23856,8 +25129,9 @@ var ts;
if (ts.isBindingPattern(declaration.parent)) {
return getTypeForBindingElement(declaration);
}
- if (declaration.type) {
- var declaredType = getTypeFromTypeNode(declaration.type);
+ var typeNode = ts.getEffectiveTypeAnnotationNode(declaration);
+ if (typeNode) {
+ var declaredType = getTypeFromTypeNode(typeNode);
return addOptionality(declaredType, declaration.questionToken && includeOptionality);
}
if ((noImplicitAny || declaration.flags & 65536) &&
@@ -23914,6 +25188,7 @@ var ts;
var types = [];
var definedInConstructor = false;
var definedInMethod = false;
+ var jsDocType;
for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
var declaration = _a[_i];
var expression = declaration.kind === 194 ? declaration :
@@ -23930,16 +25205,23 @@ var ts;
definedInMethod = true;
}
}
- if (expression.flags & 65536) {
- var type = getTypeForDeclarationFromJSDocComment(expression.parent);
- if (type && type !== unknownType) {
- types.push(getWidenedType(type));
- continue;
+ var type_1 = getTypeForDeclarationFromJSDocComment(expression.parent);
+ if (type_1) {
+ var declarationType = getWidenedType(type_1);
+ if (!jsDocType) {
+ jsDocType = declarationType;
+ }
+ else if (jsDocType !== unknownType && declarationType !== unknownType && !isTypeIdenticalTo(jsDocType, declarationType)) {
+ var name = ts.getNameOfDeclaration(declaration);
+ error(name, ts.Diagnostics.Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2, ts.declarationNameToString(name), typeToString(jsDocType), typeToString(declarationType));
}
}
- types.push(getWidenedLiteralType(checkExpressionCached(expression.right)));
+ else if (!jsDocType) {
+ types.push(getWidenedLiteralType(checkExpressionCached(expression.right)));
+ }
}
- return getWidenedType(addOptionality(getUnionType(types, true), definedInMethod && !definedInConstructor));
+ var type = jsDocType || getUnionType(types, true);
+ return getWidenedType(addOptionality(type, definedInMethod && !definedInConstructor));
}
function getTypeFromBindingElement(element, includePatternInType, reportErrors) {
if (element.initializer) {
@@ -24039,7 +25321,7 @@ var ts;
if (declaration.kind === 243) {
return links.type = checkExpression(declaration.expression);
}
- if (declaration.flags & 65536 && declaration.kind === 291 && declaration.typeExpression) {
+ if (declaration.flags & 65536 && declaration.kind === 292 && declaration.typeExpression) {
return links.type = getTypeFromTypeNode(declaration.typeExpression.type);
}
if (!pushTypeResolution(symbol, 0)) {
@@ -24063,10 +25345,11 @@ var ts;
function getAnnotatedAccessorType(accessor) {
if (accessor) {
if (accessor.kind === 153) {
- return accessor.type && getTypeFromTypeNode(accessor.type);
+ var getterTypeAnnotation = ts.getEffectiveReturnTypeNode(accessor);
+ return getterTypeAnnotation && getTypeFromTypeNode(getterTypeAnnotation);
}
else {
- var setterTypeAnnotation = ts.getSetAccessorTypeAnnotationNode(accessor);
+ var setterTypeAnnotation = ts.getEffectiveSetAccessorTypeAnnotationNode(accessor);
return setterTypeAnnotation && getTypeFromTypeNode(setterTypeAnnotation);
}
}
@@ -24149,7 +25432,7 @@ var ts;
links.type = baseTypeVariable ? getIntersectionType([type, baseTypeVariable]) : type;
}
else {
- links.type = strictNullChecks && symbol.flags & 67108864 ? includeFalsyTypes(type, 2048) : type;
+ links.type = strictNullChecks && symbol.flags & 67108864 ? getNullableType(type, 2048) : type;
}
}
}
@@ -24195,7 +25478,7 @@ var ts;
return links.type;
}
function reportCircularityError(symbol) {
- if (symbol.valueDeclaration.type) {
+ if (ts.getEffectiveTypeAnnotationNode(symbol.valueDeclaration)) {
error(symbol.valueDeclaration, ts.Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol));
return unknownType;
}
@@ -24205,7 +25488,7 @@ var ts;
return anyType;
}
function getTypeOfSymbol(symbol) {
- if (getCheckFlags(symbol) & 1) {
+ if (ts.getCheckFlags(symbol) & 1) {
return getTypeOfInstantiatedSymbol(symbol);
}
if (symbol.flags & (3 | 4)) {
@@ -24324,11 +25607,8 @@ var ts;
}
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;
+ var typeArguments = ts.map(typeArgumentNodes, getTypeFromTypeNode);
+ return ts.sameMap(signatures, function (sig) { return ts.some(sig.typeParameters) ? getSignatureInstantiation(sig, typeArguments) : sig; });
}
function getBaseConstructorTypeOfClass(type) {
if (!type.resolvedBaseConstructorType) {
@@ -24381,11 +25661,12 @@ var ts;
return;
}
var baseTypeNode = getBaseTypeNodeOfClass(type);
+ var typeArgs = typeArgumentsFromTypeReferenceNode(baseTypeNode);
var baseType;
var originalBaseType = baseConstructorType && baseConstructorType.symbol ? getDeclaredTypeOfSymbol(baseConstructorType.symbol) : undefined;
if (baseConstructorType.symbol && baseConstructorType.symbol.flags & 32 &&
areAllOuterTypeParametersApplied(originalBaseType)) {
- baseType = getTypeFromClassOrInterfaceReference(baseTypeNode, baseConstructorType.symbol);
+ baseType = getTypeFromClassOrInterfaceReference(baseTypeNode, baseConstructorType.symbol, typeArgs);
}
else if (baseConstructorType.flags & 1) {
baseType = baseConstructorType;
@@ -24519,7 +25800,7 @@ var ts;
if (!pushTypeResolution(symbol, 2)) {
return unknownType;
}
- var declaration = ts.getDeclarationOfKind(symbol, 290);
+ var declaration = ts.getDeclarationOfKind(symbol, 291);
var type = void 0;
if (declaration) {
if (declaration.jsDocTypeLiteral) {
@@ -24549,77 +25830,80 @@ var ts;
}
return links.declaredType;
}
- function isLiteralEnumMember(symbol, member) {
+ function isLiteralEnumMember(member) {
var expr = member.initializer;
if (!expr) {
return !ts.isInAmbientContext(member);
}
- return expr.kind === 8 ||
+ return expr.kind === 9 || expr.kind === 8 ||
expr.kind === 192 && expr.operator === 38 &&
expr.operand.kind === 8 ||
- expr.kind === 71 && !!symbol.exports.get(expr.text);
+ expr.kind === 71 && (ts.nodeIsMissing(expr) || !!getSymbolOfNode(member.parent).exports.get(expr.text));
}
- function enumHasLiteralMembers(symbol) {
+ function getEnumKind(symbol) {
+ var links = getSymbolLinks(symbol);
+ if (links.enumKind !== undefined) {
+ return links.enumKind;
+ }
+ var hasNonLiteralMember = false;
for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
var declaration = _a[_i];
if (declaration.kind === 232) {
for (var _b = 0, _c = declaration.members; _b < _c.length; _b++) {
var member = _c[_b];
- if (!isLiteralEnumMember(symbol, member)) {
- return false;
+ if (member.initializer && member.initializer.kind === 9) {
+ return links.enumKind = 1;
+ }
+ if (!isLiteralEnumMember(member)) {
+ hasNonLiteralMember = true;
}
}
}
}
- return true;
+ return links.enumKind = hasNonLiteralMember ? 0 : 1;
}
- function createEnumLiteralType(symbol, baseType, text) {
- var type = createType(256);
- type.symbol = symbol;
- type.baseType = baseType;
- type.text = text;
- return type;
+ function getBaseTypeOfEnumLiteralType(type) {
+ return type.flags & 256 && !(type.flags & 65536) ? getDeclaredTypeOfSymbol(getParentOfSymbol(type.symbol)) : type;
}
function getDeclaredTypeOfEnum(symbol) {
var links = getSymbolLinks(symbol);
- if (!links.declaredType) {
- var enumType = links.declaredType = createType(16);
- enumType.symbol = symbol;
- if (enumHasLiteralMembers(symbol)) {
- var memberTypeList = [];
- var memberTypes = [];
- for (var _i = 0, _a = enumType.symbol.declarations; _i < _a.length; _i++) {
- var declaration = _a[_i];
- if (declaration.kind === 232) {
- computeEnumMemberValues(declaration);
- for (var _b = 0, _c = declaration.members; _b < _c.length; _b++) {
- var member = _c[_b];
- var memberSymbol = getSymbolOfNode(member);
- var value = getEnumMemberValue(member);
- if (!memberTypes[value]) {
- var memberType = memberTypes[value] = createEnumLiteralType(memberSymbol, enumType, "" + value);
- memberTypeList.push(memberType);
- }
- }
+ if (links.declaredType) {
+ return links.declaredType;
+ }
+ if (getEnumKind(symbol) === 1) {
+ enumCount++;
+ var memberTypeList = [];
+ for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
+ var declaration = _a[_i];
+ if (declaration.kind === 232) {
+ for (var _b = 0, _c = declaration.members; _b < _c.length; _b++) {
+ var member = _c[_b];
+ var memberType = getLiteralType(getEnumMemberValue(member), enumCount, getSymbolOfNode(member));
+ getSymbolLinks(getSymbolOfNode(member)).declaredType = memberType;
+ memberTypeList.push(memberType);
}
}
- enumType.memberTypes = memberTypes;
- if (memberTypeList.length > 1) {
- enumType.flags |= 65536;
- enumType.types = memberTypeList;
- unionTypes.set(getTypeListId(memberTypeList), enumType);
+ }
+ if (memberTypeList.length) {
+ var enumType_1 = getUnionType(memberTypeList, false, symbol, undefined);
+ if (enumType_1.flags & 65536) {
+ enumType_1.flags |= 256;
+ enumType_1.symbol = symbol;
}
+ return links.declaredType = enumType_1;
}
}
- return links.declaredType;
+ var enumType = createType(16);
+ enumType.symbol = symbol;
+ return links.declaredType = enumType;
}
function getDeclaredTypeOfEnumMember(symbol) {
var links = getSymbolLinks(symbol);
if (!links.declaredType) {
var enumType = getDeclaredTypeOfEnum(getParentOfSymbol(symbol));
- links.declaredType = enumType.flags & 65536 ?
- enumType.memberTypes[getEnumMemberValue(symbol.valueDeclaration)] :
- enumType;
+ if (!links.declaredType) {
+ links.declaredType = enumType;
+ }
}
return links.declaredType;
}
@@ -24693,11 +25977,15 @@ var ts;
return false;
}
function isIndependentVariableLikeDeclaration(node) {
- return node.type && isIndependentType(node.type) || !node.type && !node.initializer;
+ var typeNode = ts.getEffectiveTypeAnnotationNode(node);
+ return typeNode ? isIndependentType(typeNode) : !node.initializer;
}
function isIndependentFunctionLikeDeclaration(node) {
- if (node.kind !== 152 && (!node.type || !isIndependentType(node.type))) {
- return false;
+ if (node.kind !== 152) {
+ var typeNode = ts.getEffectiveReturnTypeNode(node);
+ if (!typeNode || !isIndependentType(typeNode)) {
+ return false;
+ }
}
for (var _i = 0, _a = node.parameters; _i < _a.length; _i++) {
var parameter = _a[_i];
@@ -24851,7 +26139,7 @@ var ts;
}
var baseTypeNode = getBaseTypeNodeOfClass(classType);
var isJavaScript = ts.isInJavaScriptFile(baseTypeNode);
- var typeArguments = ts.map(baseTypeNode.typeArguments, getTypeFromTypeNode);
+ var typeArguments = typeArgumentsFromTypeReferenceNode(baseTypeNode);
var typeArgCount = ts.length(typeArguments);
var result = [];
for (var _i = 0, baseSignatures_1 = baseSignatures; _i < baseSignatures_1.length; _i++) {
@@ -24928,8 +26216,8 @@ var ts;
function getUnionIndexInfo(types, kind) {
var indexTypes = [];
var isAnyReadonly = false;
- for (var _i = 0, types_2 = types; _i < types_2.length; _i++) {
- var type = types_2[_i];
+ for (var _i = 0, types_1 = types; _i < types_1.length; _i++) {
+ var type = types_1[_i];
var indexInfo = getIndexInfoOfType(type, kind);
if (!indexInfo) {
return undefined;
@@ -25073,7 +26361,7 @@ var ts;
var templateMapper = type.mapper ? combineTypeMappers(type.mapper, iterationMapper) : iterationMapper;
var propType = instantiateType(templateType, templateMapper);
if (t.flags & 32) {
- var propName = t.text;
+ var propName = t.value;
var modifiersProp = getPropertyOfType(modifiersType, propName);
var isOptional = templateOptional || !!(modifiersProp && modifiersProp.flags & 67108864);
var prop = createSymbol(4 | (isOptional ? 67108864 : 0), propName);
@@ -25081,6 +26369,7 @@ var ts;
prop.type = propType;
if (propertySymbol) {
prop.syntheticOrigin = propertySymbol;
+ prop.declarations = propertySymbol.declarations;
}
members.set(propName, prop);
}
@@ -25193,6 +26482,27 @@ var ts;
getPropertiesOfUnionOrIntersectionType(type) :
getPropertiesOfObjectType(type);
}
+ function getAllPossiblePropertiesOfType(type) {
+ if (type.flags & 65536) {
+ var props = ts.createMap();
+ for (var _i = 0, _a = type.types; _i < _a.length; _i++) {
+ var memberType = _a[_i];
+ if (memberType.flags & 8190) {
+ continue;
+ }
+ for (var _b = 0, _c = getPropertiesOfType(memberType); _b < _c.length; _b++) {
+ var name = _c[_b].name;
+ if (!props.has(name)) {
+ props.set(name, createUnionOrIntersectionProperty(type, name));
+ }
+ }
+ }
+ return ts.arrayFrom(props.values());
+ }
+ else {
+ return getPropertiesOfType(type);
+ }
+ }
function getConstraintOfType(type) {
return type.flags & 16384 ? getConstraintOfTypeParameter(type) :
type.flags & 524288 ? getConstraintOfIndexedAccess(type) :
@@ -25249,8 +26559,8 @@ var ts;
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];
+ for (var _i = 0, types_2 = types; _i < types_2.length; _i++) {
+ var type_2 = types_2[_i];
var baseType = getBaseConstraint(type_2);
if (baseType) {
baseTypes.push(baseType);
@@ -25282,7 +26592,7 @@ var ts;
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; });
+ var defaultDeclaration = typeParameter.symbol && ts.forEach(typeParameter.symbol.declarations, function (decl) { return ts.isTypeParameterDeclaration(decl) && decl.default; });
typeParameter.default = defaultDeclaration ? getTypeFromTypeNode(defaultDeclaration) : noConstraintType;
}
}
@@ -25292,7 +26602,7 @@ var ts;
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 & 84 ? globalNumberType :
t.flags & 136 ? globalBooleanType :
t.flags & 512 ? getGlobalESSymbolType(languageVersion >= 2) :
t.flags & 16777216 ? emptyObjectType :
@@ -25306,12 +26616,12 @@ var ts;
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];
+ for (var _i = 0, types_3 = types; _i < types_3.length; _i++) {
+ var current = types_3[_i];
var type = getApparentType(current);
if (type !== unknownType) {
var prop = getPropertyOfType(type, name);
- var modifiers = prop ? getDeclarationModifierFlagsFromSymbol(prop) : 0;
+ var modifiers = prop ? ts.getDeclarationModifierFlagsFromSymbol(prop) : 0;
if (prop && !(modifiers & excludeModifiers)) {
commonFlags &= prop.flags;
if (!props) {
@@ -25377,7 +26687,7 @@ var ts;
}
function getPropertyOfUnionOrIntersectionType(type, name) {
var property = getUnionOrIntersectionProperty(type, name);
- return property && !(getCheckFlags(property) & 16) ? property : undefined;
+ return property && !(ts.getCheckFlags(property) & 16) ? property : undefined;
}
function getPropertyOfType(type, name) {
type = getApparentType(type);
@@ -25441,20 +26751,14 @@ var ts;
}
return undefined;
}
- function getTypeParametersFromJSDocTemplate(declaration) {
- if (declaration.flags & 65536) {
- var templateTag = ts.getJSDocTemplateTag(declaration);
- if (templateTag) {
- return getTypeParametersFromDeclaration(templateTag.typeParameters);
- }
- }
- return undefined;
- }
- function getTypeParametersFromDeclaration(typeParameterDeclarations) {
- var result = [];
- ts.forEach(typeParameterDeclarations, function (node) {
+ function getTypeParametersFromDeclaration(declaration) {
+ var result;
+ ts.forEach(ts.getEffectiveTypeParameterDeclarations(declaration), function (node) {
var tp = getDeclaredTypeOfTypeParameter(node.symbol);
if (!ts.contains(result, tp)) {
+ if (!result) {
+ result = [];
+ }
result.push(tp);
}
});
@@ -25611,14 +26915,20 @@ var ts;
var classType = declaration.kind === 152 ?
getDeclaredTypeOfClassOrInterface(getMergedSymbol(declaration.parent.symbol))
: undefined;
- var typeParameters = classType ? classType.localTypeParameters :
- declaration.typeParameters ? getTypeParametersFromDeclaration(declaration.typeParameters) :
- getTypeParametersFromJSDocTemplate(declaration);
+ var typeParameters = classType ? classType.localTypeParameters : getTypeParametersFromDeclaration(declaration);
var returnType = getSignatureReturnTypeFromDeclaration(declaration, isJSConstructSignature, classType);
var typePredicate = declaration.type && declaration.type.kind === 158 ?
createTypePredicateFromTypePredicateNode(declaration.type) :
undefined;
- links.resolvedSignature = createSignature(declaration, typeParameters, thisParameter, parameters, returnType, typePredicate, minArgumentCount, ts.hasRestParameter(declaration), hasLiteralTypes);
+ var hasRestLikeParameter = ts.hasRestParameter(declaration);
+ if (!hasRestLikeParameter && ts.isInJavaScriptFile(declaration) && !ts.hasJSDocParameterTags(declaration) && containsArgumentsReference(declaration)) {
+ hasRestLikeParameter = true;
+ var syntheticArgsSymbol = createSymbol(3, "args");
+ syntheticArgsSymbol.type = anyArrayType;
+ syntheticArgsSymbol.isRestParameter = true;
+ parameters.push(syntheticArgsSymbol);
+ }
+ links.resolvedSignature = createSignature(declaration, typeParameters, thisParameter, parameters, returnType, typePredicate, minArgumentCount, hasRestLikeParameter, hasLiteralTypes);
}
return links.resolvedSignature;
}
@@ -25629,14 +26939,9 @@ var ts;
else if (classType) {
return classType;
}
- else if (declaration.type) {
- return getTypeFromTypeNode(declaration.type);
- }
- if (declaration.flags & 65536) {
- var type = getReturnTypeFromJSDocComment(declaration);
- if (type && type !== unknownType) {
- return type;
- }
+ var typeNode = ts.getEffectiveReturnTypeNode(declaration);
+ if (typeNode) {
+ return getTypeFromTypeNode(typeNode);
}
if (declaration.kind === 153 && !ts.hasDynamicName(declaration)) {
var setter = ts.getDeclarationOfKind(declaration.symbol, 154);
@@ -25740,8 +27045,9 @@ var ts;
type = anyType;
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));
+ var name = ts.getNameOfDeclaration(declaration);
+ if (name) {
+ error(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(name));
}
else {
error(declaration, ts.Diagnostics.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);
@@ -25868,8 +27174,8 @@ var ts;
}
function getPropagatingFlagsOfTypes(types, excludeKinds) {
var result = 0;
- for (var _i = 0, types_5 = types; _i < types_5.length; _i++) {
- var type = types_5[_i];
+ for (var _i = 0, types_4 = types; _i < types_4.length; _i++) {
+ var type = types_4[_i];
if (!(type.flags & excludeKinds)) {
result |= type.flags;
}
@@ -25899,7 +27205,7 @@ var ts;
function getTypeReferenceArity(type) {
return ts.length(type.target.typeParameters);
}
- function getTypeFromClassOrInterfaceReference(node, symbol) {
+ function getTypeFromClassOrInterfaceReference(node, symbol, typeArgs) {
var type = getDeclaredTypeOfSymbol(getMergedSymbol(symbol));
var typeParameters = type.localTypeParameters;
if (typeParameters) {
@@ -25911,7 +27217,7 @@ var ts;
: ts.Diagnostics.Generic_type_0_requires_between_1_and_2_type_arguments, typeToString(type, undefined, 1), minTypeArgumentCount, typeParameters.length);
return unknownType;
}
- var typeArguments = ts.concatenate(type.outerTypeParameters, fillMissingTypeArguments(ts.map(node.typeArguments, getTypeFromTypeNode), typeParameters, minTypeArgumentCount, node));
+ var typeArguments = ts.concatenate(type.outerTypeParameters, fillMissingTypeArguments(typeArgs, typeParameters, minTypeArgumentCount, node));
return createTypeReference(type, typeArguments);
}
if (node.typeArguments) {
@@ -25931,7 +27237,7 @@ var ts;
}
return instantiation;
}
- function getTypeFromTypeAliasReference(node, symbol) {
+ function getTypeFromTypeAliasReference(node, symbol, typeArguments) {
var type = getDeclaredTypeOfSymbol(symbol);
var typeParameters = getSymbolLinks(symbol).typeParameters;
if (typeParameters) {
@@ -25943,7 +27249,6 @@ var ts;
: 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);
return getTypeAliasInstantiation(symbol, typeArguments);
}
if (node.typeArguments) {
@@ -25973,26 +27278,44 @@ var ts;
}
return undefined;
}
- function resolveTypeReferenceName(typeReferenceName) {
+ function resolveTypeReferenceName(typeReferenceName, meaning) {
if (!typeReferenceName) {
return unknownSymbol;
}
- return resolveEntityName(typeReferenceName, 793064) || unknownSymbol;
+ return resolveEntityName(typeReferenceName, meaning) || unknownSymbol;
}
function getTypeReferenceType(node, symbol) {
+ var typeArguments = typeArgumentsFromTypeReferenceNode(node);
if (symbol === unknownSymbol) {
return unknownType;
}
+ var type = getTypeReferenceTypeWorker(node, symbol, typeArguments);
+ if (type) {
+ return type;
+ }
+ if (symbol.flags & 107455 && node.kind === 277) {
+ var valueType = getTypeOfSymbol(symbol);
+ if (valueType.symbol && !isInferredClassType(valueType)) {
+ var referenceType = getTypeReferenceTypeWorker(node, valueType.symbol, typeArguments);
+ if (referenceType) {
+ return referenceType;
+ }
+ }
+ resolveTypeReferenceName(getTypeReferenceName(node), 793064);
+ return valueType;
+ }
+ return getTypeFromNonGenericTypeReference(node, symbol);
+ }
+ function getTypeReferenceTypeWorker(node, symbol, typeArguments) {
if (symbol.flags & (32 | 64)) {
- return getTypeFromClassOrInterfaceReference(node, symbol);
+ return getTypeFromClassOrInterfaceReference(node, symbol, typeArguments);
}
if (symbol.flags & 524288) {
- return getTypeFromTypeAliasReference(node, symbol);
+ return getTypeFromTypeAliasReference(node, symbol, typeArguments);
}
- if (symbol.flags & 107455 && node.kind === 277) {
- return getTypeOfSymbol(symbol);
+ if (symbol.flags & 16 && node.kind === 277 && (symbol.members || ts.getJSDocClassTag(symbol.valueDeclaration))) {
+ return getInferredClassType(symbol);
}
- return getTypeFromNonGenericTypeReference(node, symbol);
}
function getPrimitiveTypeFromJSDocTypeReference(node) {
if (ts.isIdentifier(node.name)) {
@@ -26012,7 +27335,8 @@ var ts;
case "Object":
return anyType;
case "Function":
- return anyFunctionType;
+ case "function":
+ return globalFunctionType;
case "Array":
case "array":
return !node.typeArguments || !node.typeArguments.length ? createArrayType(anyType) : undefined;
@@ -26031,31 +27355,23 @@ var ts;
if (!links.resolvedType) {
var symbol = void 0;
var type = void 0;
+ var meaning = 793064;
if (node.kind === 277) {
type = getPrimitiveTypeFromJSDocTypeReference(node);
- if (!type) {
- var typeReferenceName = getTypeReferenceName(node);
- symbol = resolveTypeReferenceName(typeReferenceName);
- type = getTypeReferenceType(node, symbol);
- }
+ meaning |= 107455;
}
- else {
- var typeNameOrExpression = node.kind === 159
- ? node.typeName
- : ts.isEntityNameExpression(node.expression)
- ? node.expression
- : undefined;
- symbol = typeNameOrExpression && resolveEntityName(typeNameOrExpression, 793064) || unknownSymbol;
- type = symbol === unknownSymbol ? unknownType :
- symbol.flags & (32 | 64) ? getTypeFromClassOrInterfaceReference(node, symbol) :
- symbol.flags & 524288 ? getTypeFromTypeAliasReference(node, symbol) :
- getTypeFromNonGenericTypeReference(node, symbol);
+ if (!type) {
+ symbol = resolveTypeReferenceName(getTypeReferenceName(node), meaning);
+ type = getTypeReferenceType(node, symbol);
}
links.resolvedSymbol = symbol;
links.resolvedType = type;
}
return links.resolvedType;
}
+ function typeArgumentsFromTypeReferenceNode(node) {
+ return ts.map(node.typeArguments, getTypeFromTypeNode);
+ }
function getTypeFromTypeQueryNode(node) {
var links = getNodeLinks(node);
if (!links.resolvedType) {
@@ -26277,14 +27593,14 @@ var ts;
}
}
function addTypesToUnion(typeSet, types) {
- for (var _i = 0, types_6 = types; _i < types_6.length; _i++) {
- var type = types_6[_i];
+ for (var _i = 0, types_5 = types; _i < types_5.length; _i++) {
+ var type = types_5[_i];
addTypeToUnion(typeSet, type);
}
}
function containsIdenticalType(types, type) {
- for (var _i = 0, types_7 = types; _i < types_7.length; _i++) {
- var t = types_7[_i];
+ for (var _i = 0, types_6 = types; _i < types_6.length; _i++) {
+ var t = types_6[_i];
if (isTypeIdenticalTo(t, type)) {
return true;
}
@@ -26292,8 +27608,8 @@ var ts;
return false;
}
function isSubtypeOfAny(candidate, types) {
- for (var _i = 0, types_8 = types; _i < types_8.length; _i++) {
- var type = types_8[_i];
+ for (var _i = 0, types_7 = types; _i < types_7.length; _i++) {
+ var type = types_7[_i];
if (candidate !== type && isTypeSubtypeOf(candidate, type)) {
return true;
}
@@ -26397,10 +27713,13 @@ var ts;
else if (type.flags & 1) {
typeSet.containsAny = true;
}
+ else if (type.flags & 8192) {
+ typeSet.containsNever = true;
+ }
else if (getObjectFlags(type) & 16 && isEmptyObjectType(type)) {
typeSet.containsEmptyObject = true;
}
- else if (!(type.flags & 8192) && (strictNullChecks || !(type.flags & 6144)) && !ts.contains(typeSet, type)) {
+ else if ((strictNullChecks || !(type.flags & 6144)) && !ts.contains(typeSet, type)) {
if (type.flags & 32768) {
typeSet.containsObjectType = true;
}
@@ -26414,8 +27733,8 @@ var ts;
}
}
function addTypesToIntersection(typeSet, types) {
- for (var _i = 0, types_9 = types; _i < types_9.length; _i++) {
- var type = types_9[_i];
+ for (var _i = 0, types_8 = types; _i < types_8.length; _i++) {
+ var type = types_8[_i];
addTypeToIntersection(typeSet, type);
}
}
@@ -26425,6 +27744,9 @@ var ts;
}
var typeSet = [];
addTypesToIntersection(typeSet, types);
+ if (typeSet.containsNever) {
+ return neverType;
+ }
if (typeSet.containsAny) {
return anyType;
}
@@ -26466,9 +27788,9 @@ var ts;
return type.resolvedIndexType;
}
function getLiteralTypeFromPropertyName(prop) {
- return getDeclarationModifierFlagsFromSymbol(prop) & 24 || ts.startsWith(prop.name, "__@") ?
+ return ts.getDeclarationModifierFlagsFromSymbol(prop) & 24 || ts.startsWith(prop.name, "__@") ?
neverType :
- getLiteralTypeForText(32, ts.unescapeIdentifier(prop.name));
+ getLiteralType(ts.unescapeIdentifier(prop.name));
}
function getLiteralTypeFromPropertyNames(type) {
return getUnionType(ts.map(getPropertiesOfType(type), getLiteralTypeFromPropertyName));
@@ -26498,12 +27820,12 @@ var ts;
}
function getPropertyTypeForIndexType(objectType, indexType, accessNode, cacheSymbol) {
var accessExpression = accessNode && accessNode.kind === 180 ? accessNode : undefined;
- var propName = indexType.flags & (32 | 64 | 256) ?
- indexType.text :
+ var propName = indexType.flags & 96 ?
+ "" + indexType.value :
accessExpression && checkThatExpressionIsProperSymbolReference(accessExpression.argumentExpression, indexType, false) ?
ts.getPropertyNameForKnownSymbolName(accessExpression.argumentExpression.name.text) :
undefined;
- if (propName) {
+ if (propName !== undefined) {
var prop = getPropertyOfType(objectType, propName);
if (prop) {
if (accessExpression) {
@@ -26518,11 +27840,11 @@ var ts;
return getTypeOfSymbol(prop);
}
}
- if (isTypeAnyOrAllConstituentTypesHaveKind(indexType, 262178 | 340 | 512)) {
+ if (isTypeAnyOrAllConstituentTypesHaveKind(indexType, 262178 | 84 | 512)) {
if (isTypeAny(objectType)) {
return anyType;
}
- var indexInfo = isTypeAnyOrAllConstituentTypesHaveKind(indexType, 340) && getIndexInfoOfType(objectType, 1) ||
+ var indexInfo = isTypeAnyOrAllConstituentTypesHaveKind(indexType, 84) && getIndexInfoOfType(objectType, 1) ||
getIndexInfoOfType(objectType, 0) ||
undefined;
if (indexInfo) {
@@ -26547,7 +27869,7 @@ var ts;
if (accessNode) {
var indexNode = accessNode.kind === 180 ? 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));
+ error(indexNode, ts.Diagnostics.Property_0_does_not_exist_on_type_1, "" + indexType.value, typeToString(objectType));
}
else if (indexType.flags & (2 | 4)) {
error(indexNode, ts.Diagnostics.Type_0_has_no_matching_index_signature_for_type_1, typeToString(objectType), typeToString(indexType));
@@ -26647,11 +27969,9 @@ var ts;
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;
}
@@ -26679,7 +27999,7 @@ var ts;
for (var _i = 0, _a = getPropertiesOfType(right); _i < _a.length; _i++) {
var rightProp = _a[_i];
var isSetterWithoutGetter = rightProp.flags & 65536 && !(rightProp.flags & 32768);
- if (getDeclarationModifierFlagsFromSymbol(rightProp) & (8 | 16)) {
+ if (ts.getDeclarationModifierFlagsFromSymbol(rightProp) & (8 | 16)) {
skippedPrivateMembers.set(rightProp.name, true);
}
else if (!isClassMethod(rightProp) && !isSetterWithoutGetter) {
@@ -26696,7 +28016,7 @@ var ts;
if (members.has(leftProp.name)) {
var rightProp = members.get(leftProp.name);
var rightType = getTypeOfSymbol(rightProp);
- if (maybeTypeOfKind(rightType, 2048) || rightProp.flags & 67108864) {
+ if (rightProp.flags & 67108864) {
var declarations = ts.concatenate(leftProp.declarations, rightProp.declarations);
var flags = 4 | (leftProp.flags & 67108864);
var result = createSymbol(flags, leftProp.name);
@@ -26727,15 +28047,16 @@ var ts;
function isClassMethod(prop) {
return prop.flags & 8192 && ts.find(prop.declarations, function (decl) { return ts.isClassLike(decl.parent); });
}
- function createLiteralType(flags, text) {
+ function createLiteralType(flags, value, symbol) {
var type = createType(flags);
- type.text = text;
+ type.symbol = symbol;
+ type.value = value;
return type;
}
function getFreshTypeOfLiteralType(type) {
if (type.flags & 96 && !(type.flags & 1048576)) {
if (!type.freshType) {
- var freshType = createLiteralType(type.flags | 1048576, type.text);
+ var freshType = createLiteralType(type.flags | 1048576, type.value, type.symbol);
freshType.regularType = type;
type.freshType = freshType;
}
@@ -26746,11 +28067,13 @@ var ts;
function getRegularTypeOfLiteralType(type) {
return type.flags & 96 && type.flags & 1048576 ? type.regularType : type;
}
- function getLiteralTypeForText(flags, text) {
- var map = flags & 32 ? stringLiteralTypes : numericLiteralTypes;
- var type = map.get(text);
+ function getLiteralType(value, enumId, symbol) {
+ var qualifier = typeof value === "number" ? "#" : "@";
+ var key = enumId ? enumId + qualifier + value : qualifier + value;
+ var type = literalTypes.get(key);
if (!type) {
- map.set(text, type = createLiteralType(flags, text));
+ var flags = (typeof value === "number" ? 64 : 32) | (enumId ? 256 : 0);
+ literalTypes.set(key, type = createLiteralType(flags, value, symbol));
}
return type;
}
@@ -26825,7 +28148,7 @@ var ts;
return getTypeFromThisTypeNode(node);
case 173:
return getTypeFromLiteralTypeNode(node);
- case 293:
+ case 294:
return getTypeFromLiteralTypeNode(node.literal);
case 159:
case 277:
@@ -26859,7 +28182,7 @@ var ts;
case 160:
case 161:
case 163:
- case 292:
+ case 293:
case 279:
return getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node);
case 170:
@@ -26932,23 +28255,13 @@ var ts;
mapper.mappedTypes = typeParameters;
return mapper;
}
- function getInferenceMapper(context) {
- if (!context.mapper) {
- var mapper = function (t) {
- var typeParameters = context.signature.typeParameters;
- for (var i = 0; i < typeParameters.length; i++) {
- if (t === typeParameters[i]) {
- context.inferences[i].isFixed = true;
- return getInferredType(context, i);
- }
- }
- return t;
- };
- mapper.mappedTypes = context.signature.typeParameters;
- mapper.context = context;
- context.mapper = mapper;
- }
- return context.mapper;
+ function isInferenceContext(mapper) {
+ return !!mapper.signature;
+ }
+ function cloneTypeMapper(mapper) {
+ return mapper && isInferenceContext(mapper) ?
+ createInferenceContext(mapper.signature, mapper.flags | 2, mapper.inferences) :
+ mapper;
}
function identityMapper(type) {
return type;
@@ -26999,13 +28312,13 @@ var ts;
if (signature.typePredicate) {
freshTypePredicate = cloneTypePredicate(signature.typePredicate, mapper);
}
- var result = createSignature(signature.declaration, freshTypeParameters, signature.thisParameter && instantiateSymbol(signature.thisParameter, mapper), instantiateList(signature.parameters, mapper, instantiateSymbol), instantiateType(signature.resolvedReturnType, mapper), freshTypePredicate, signature.minArgumentCount, signature.hasRestParameter, signature.hasLiteralTypes);
+ var result = createSignature(signature.declaration, freshTypeParameters, signature.thisParameter && instantiateSymbol(signature.thisParameter, mapper), instantiateList(signature.parameters, mapper, instantiateSymbol), undefined, freshTypePredicate, signature.minArgumentCount, signature.hasRestParameter, signature.hasLiteralTypes);
result.target = signature;
result.mapper = mapper;
return result;
}
function instantiateSymbol(symbol, mapper) {
- if (getCheckFlags(symbol) & 1) {
+ if (ts.getCheckFlags(symbol) & 1) {
var links = getSymbolLinks(symbol);
symbol = links.target;
mapper = combineTypeMappers(links.mapper, mapper);
@@ -27085,10 +28398,10 @@ var ts;
case 199:
case 230:
case 231:
- var declaration = node;
- if (declaration.typeParameters) {
- for (var _i = 0, _a = declaration.typeParameters; _i < _a.length; _i++) {
- var d = _a[_i];
+ var typeParameters = ts.getEffectiveTypeParameterDeclarations(node);
+ if (typeParameters) {
+ for (var _i = 0, typeParameters_1 = typeParameters; _i < typeParameters_1.length; _i++) {
+ var d = typeParameters_1[_i];
if (ts.contains(mappedTypes, getDeclaredTypeOfTypeParameter(getSymbolOfNode(d)))) {
return true;
}
@@ -27108,8 +28421,8 @@ var ts;
break;
case 279:
var func = node;
- for (var _b = 0, _c = func.parameters; _b < _c.length; _b++) {
- var p = _c[_b];
+ for (var _a = 0, _b = func.parameters; _a < _b.length; _a++) {
+ var p = _b[_a];
if (ts.contains(mappedTypes, getTypeOfNode(p))) {
return true;
}
@@ -27208,7 +28521,7 @@ var ts;
if (node.typeParameters) {
return false;
}
- if (ts.forEach(node.parameters, function (p) { return !p.type; })) {
+ if (ts.forEach(node.parameters, function (p) { return !ts.getEffectiveTypeAnnotationNode(p); })) {
return true;
}
if (node.kind === 187) {
@@ -27261,9 +28574,6 @@ var ts;
function areTypesComparable(type1, type2) {
return isTypeComparableTo(type1, type2) || isTypeComparableTo(type2, type1);
}
- function checkTypeSubtypeOf(source, target, errorNode, headMessage, containingMessageChain) {
- return checkTypeRelatedTo(source, target, subtypeRelation, errorNode, headMessage, containingMessageChain);
- }
function checkTypeAssignableTo(source, target, errorNode, headMessage, containingMessageChain) {
return checkTypeRelatedTo(source, target, assignableRelation, errorNode, headMessage, containingMessageChain);
}
@@ -27271,17 +28581,18 @@ 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;
}
if (!target.hasRestParameter && source.minArgumentCount > target.parameters.length) {
return 0;
}
- source = getErasedSignature(source);
- target = getErasedSignature(target);
+ if (source.typeParameters) {
+ source = instantiateSignatureInContextOf(source, target);
+ }
var result = -1;
var sourceThisType = getThisTypeOfSignature(source);
if (sourceThisType && sourceThisType !== voidType) {
@@ -27304,9 +28615,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);
@@ -27333,7 +28650,8 @@ var ts;
}
}
else {
- result &= compareTypes(sourceReturnType, targetReturnType, reportErrors);
+ result &= checkAsCallback && compareTypes(targetReturnType, sourceReturnType, false) ||
+ compareTypes(sourceReturnType, targetReturnType, reportErrors);
}
}
return result;
@@ -27405,33 +28723,32 @@ var ts;
}
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;
+ type.flags & 16777216 ? true :
+ 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) {
+ function isEnumTypeRelatedTo(sourceSymbol, targetSymbol, errorReporter) {
+ if (sourceSymbol === targetSymbol) {
return true;
}
- var id = source.id + "," + target.id;
+ var id = getSymbolId(sourceSymbol) + "," + getSymbolId(targetSymbol);
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)) {
+ if (sourceSymbol.name !== targetSymbol.name || !(sourceSymbol.flags & 256) || !(targetSymbol.flags & 256)) {
enumRelation.set(id, false);
return false;
}
- var targetEnumType = getTypeOfSymbol(target.symbol);
- for (var _i = 0, _a = getPropertiesOfType(getTypeOfSymbol(source.symbol)); _i < _a.length; _i++) {
+ var targetEnumType = getTypeOfSymbol(targetSymbol);
+ for (var _i = 0, _a = getPropertiesOfType(getTypeOfSymbol(sourceSymbol)); _i < _a.length; _i++) {
var property = _a[_i];
if (property.flags & 8) {
var targetProperty = getPropertyOfType(targetEnumType, property.name);
if (!targetProperty || !(targetProperty.flags & 8)) {
if (errorReporter) {
- errorReporter(ts.Diagnostics.Property_0_is_missing_in_type_1, property.name, typeToString(target, undefined, 128));
+ errorReporter(ts.Diagnostics.Property_0_is_missing_in_type_1, property.name, typeToString(getDeclaredTypeOfSymbol(targetSymbol), undefined, 256));
}
enumRelation.set(id, false);
return false;
@@ -27442,42 +28759,47 @@ var ts;
return true;
}
function isSimpleTypeRelatedTo(source, target, relation, errorReporter) {
- if (target.flags & 8192)
+ var s = source.flags;
+ var t = target.flags;
+ if (t & 8192)
return false;
- if (target.flags & 1 || source.flags & 8192)
+ if (t & 1 || s & 8192)
return true;
- if (source.flags & 262178 && target.flags & 2)
+ if (s & 262178 && t & 2)
return true;
- if (source.flags & 340 && target.flags & 4)
+ if (s & 32 && s & 256 &&
+ t & 32 && !(t & 256) &&
+ source.value === target.value)
return true;
- if (source.flags & 136 && target.flags & 8)
+ if (s & 84 && t & 4)
return true;
- if (source.flags & 256 && target.flags & 16 && source.baseType === target)
+ if (s & 64 && s & 256 &&
+ t & 64 && !(t & 256) &&
+ source.value === target.value)
return true;
- if (source.flags & 16 && target.flags & 16 && isEnumTypeRelatedTo(source, target, errorReporter))
+ if (s & 136 && t & 8)
return true;
- if (source.flags & 2048 && (!strictNullChecks || target.flags & (2048 | 1024)))
+ if (s & 16 && t & 16 && isEnumTypeRelatedTo(source.symbol, target.symbol, errorReporter))
return true;
- if (source.flags & 4096 && (!strictNullChecks || target.flags & 4096))
+ if (s & 256 && t & 256) {
+ if (s & 65536 && t & 65536 && isEnumTypeRelatedTo(source.symbol, target.symbol, errorReporter))
+ return true;
+ if (s & 224 && t & 224 &&
+ source.value === target.value &&
+ isEnumTypeRelatedTo(getParentOfSymbol(source.symbol), getParentOfSymbol(target.symbol), errorReporter))
+ return true;
+ }
+ if (s & 2048 && (!strictNullChecks || t & (2048 | 1024)))
return true;
- if (source.flags & 32768 && target.flags & 16777216)
+ if (s & 4096 && (!strictNullChecks || t & 4096))
+ return true;
+ if (s & 32768 && t & 16777216)
return true;
if (relation === assignableRelation || relation === comparableRelation) {
- if (source.flags & 1)
- return true;
- if ((source.flags & 4 | source.flags & 64) && target.flags & 272)
+ if (s & 1)
return true;
- if (source.flags & 256 &&
- target.flags & 256 &&
- source.text === target.text &&
- isEnumTypeRelatedTo(source.baseType, target.baseType, errorReporter)) {
- return true;
- }
- if (source.flags & 256 &&
- target.flags & 16 &&
- isEnumTypeRelatedTo(target, source.baseType, errorReporter)) {
+ if (s & (4 | 64) && !(s & 256) && (t & 16 || t & 64 && t & 256))
return true;
- }
}
return false;
}
@@ -27511,6 +28833,7 @@ var ts;
var expandingFlags;
var depth = 0;
var overflow = false;
+ var isIntersectionConstituent = false;
ts.Debug.assert(relation !== identityRelation || !errorNode, "no error reporting in identity checking");
var result = isRelatedTo(source, target, !!errorNode, headMessage);
if (overflow) {
@@ -27531,8 +28854,8 @@ var ts;
var sourceType = typeToString(source);
var targetType = typeToString(target);
if (sourceType === targetType) {
- sourceType = typeToString(source, undefined, 128);
- targetType = typeToString(target, undefined, 128);
+ sourceType = typeToString(source, undefined, 256);
+ targetType = typeToString(target, undefined, 256);
}
if (!message) {
if (relation === comparableRelation) {
@@ -27575,7 +28898,6 @@ var ts;
return false;
}
function isRelatedTo(source, target, reportErrors, headMessage) {
- var result;
if (source.flags & 96 && source.flags & 1048576) {
source = source.regularType;
}
@@ -27600,42 +28922,47 @@ var ts;
source = getRegularTypeOfObjectLiteral(source);
}
}
+ if (relation !== comparableRelation &&
+ !(source.flags & 196608) &&
+ !(target.flags & 65536) &&
+ !isIntersectionConstituent &&
+ source !== globalObjectType &&
+ getPropertiesOfType(source).length > 0 &&
+ isWeakType(target) &&
+ !hasCommonProperties(source, target)) {
+ if (reportErrors) {
+ reportError(ts.Diagnostics.Type_0_has_no_properties_in_common_with_type_1, typeToString(source), typeToString(target));
+ }
+ return 0;
+ }
+ var result = 0;
var saveErrorInfo = errorInfo;
+ var saveIsIntersectionConstituent = isIntersectionConstituent;
+ isIntersectionConstituent = false;
if (source.flags & 65536) {
- if (relation === comparableRelation) {
- result = someTypeRelatedToType(source, target, reportErrors && !(source.flags & 8190));
- }
- else {
- result = eachTypeRelatedToType(source, target, reportErrors && !(source.flags & 8190));
- }
- if (result) {
- return result;
- }
+ result = relation === comparableRelation ?
+ someTypeRelatedToType(source, target, reportErrors && !(source.flags & 8190)) :
+ eachTypeRelatedToType(source, target, reportErrors && !(source.flags & 8190));
}
else {
if (target.flags & 65536) {
- if (result = typeRelatedToSomeType(source, target, reportErrors && !(source.flags & 8190) && !(target.flags & 8190))) {
- return result;
- }
+ result = typeRelatedToSomeType(source, target, reportErrors && !(source.flags & 8190) && !(target.flags & 8190));
}
else if (target.flags & 131072) {
- if (result = typeRelatedToEachType(source, target, reportErrors)) {
- return result;
- }
+ isIntersectionConstituent = true;
+ result = typeRelatedToEachType(source, target, reportErrors);
}
else if (source.flags & 131072) {
- if (result = someTypeRelatedToType(source, target, false)) {
- return result;
- }
+ result = someTypeRelatedToType(source, target, false);
}
- if (source.flags & 1032192 || target.flags & 1032192) {
+ if (!result && (source.flags & 1032192 || target.flags & 1032192)) {
if (result = recursiveTypeRelatedTo(source, target, reportErrors)) {
errorInfo = saveErrorInfo;
- return result;
}
}
}
- if (reportErrors) {
+ isIntersectionConstituent = saveIsIntersectionConstituent;
+ if (!result && reportErrors) {
if (source.flags & 32768 && target.flags & 8190) {
tryElaborateErrorsForPrimitivesAndObjects(source, target);
}
@@ -27644,7 +28971,7 @@ var ts;
}
reportRelationError(headMessage, source, target);
}
- return 0;
+ return result;
}
function isIdenticalTo(source, target) {
var result;
@@ -27661,24 +28988,6 @@ var ts;
}
return 0;
}
- function isKnownProperty(type, name, isComparingJsxAttributes) {
- if (type.flags & 32768) {
- var resolved = resolveStructuredTypeMembers(type);
- 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, isComparingJsxAttributes)) {
- return true;
- }
- }
- }
- return false;
- }
function hasExcessProperties(source, target, reportErrors) {
if (maybeTypeOfKind(target, 32768) && !(getObjectFlags(target) & 512)) {
var isComparingJsxAttributes = !!(source.flags & 33554432);
@@ -27686,8 +28995,7 @@ var ts;
(isTypeSubsetOf(globalObjectType, target) || (!isComparingJsxAttributes && isEmptyObjectType(target)))) {
return false;
}
- for (var _i = 0, _a = getPropertiesOfObjectType(source); _i < _a.length; _i++) {
- var prop = _a[_i];
+ var _loop_4 = function (prop) {
if (!isKnownProperty(target, prop.name, isComparingJsxAttributes)) {
if (reportErrors) {
ts.Debug.assert(!!errorNode);
@@ -27695,12 +29003,21 @@ var ts;
reportError(ts.Diagnostics.Property_0_does_not_exist_on_type_1, symbolToString(prop), typeToString(target));
}
else {
- errorNode = prop.valueDeclaration;
+ var objectLiteralDeclaration_1 = source.symbol && ts.firstOrUndefined(source.symbol.declarations);
+ if (prop.valueDeclaration && ts.findAncestor(prop.valueDeclaration, function (d) { return d === objectLiteralDeclaration_1; })) {
+ 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;
+ return { value: true };
}
+ };
+ for (var _i = 0, _a = getPropertiesOfObjectType(source); _i < _a.length; _i++) {
+ var prop = _a[_i];
+ var state_2 = _loop_4(prop);
+ if (typeof state_2 === "object")
+ return state_2.value;
}
}
return false;
@@ -28027,10 +29344,10 @@ var ts;
}
}
else if (!(targetProp.flags & 16777216)) {
- var sourcePropFlags = getDeclarationModifierFlagsFromSymbol(sourceProp);
- var targetPropFlags = getDeclarationModifierFlagsFromSymbol(targetProp);
+ var sourcePropFlags = ts.getDeclarationModifierFlagsFromSymbol(sourceProp);
+ var targetPropFlags = ts.getDeclarationModifierFlagsFromSymbol(targetProp);
if (sourcePropFlags & 8 || targetPropFlags & 8) {
- if (getCheckFlags(sourceProp) & 256) {
+ if (ts.getCheckFlags(sourceProp) & 256) {
if (reportErrors) {
reportError(ts.Diagnostics.Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1, symbolToString(sourceProp), typeToString(source));
}
@@ -28081,6 +29398,29 @@ var ts;
}
return result;
}
+ function isWeakType(type) {
+ if (type.flags & 32768) {
+ var resolved = resolveStructuredTypeMembers(type);
+ return resolved.callSignatures.length === 0 && resolved.constructSignatures.length === 0 &&
+ !resolved.stringIndexInfo && !resolved.numberIndexInfo &&
+ resolved.properties.length > 0 &&
+ ts.every(resolved.properties, function (p) { return !!(p.flags & 67108864); });
+ }
+ if (type.flags & 131072) {
+ return ts.every(type.types, isWeakType);
+ }
+ return false;
+ }
+ function hasCommonProperties(source, target) {
+ var isComparingJsxAttributes = !!(source.flags & 33554432);
+ for (var _i = 0, _a = getPropertiesOfType(source); _i < _a.length; _i++) {
+ var prop = _a[_i];
+ if (isKnownProperty(target, prop.name, isComparingJsxAttributes)) {
+ return true;
+ }
+ }
+ return false;
+ }
function propertiesIdenticalTo(source, target) {
if (!(source.flags & 32768 && target.flags & 32768)) {
return 0;
@@ -28127,28 +29467,43 @@ var ts;
}
var result = -1;
var saveErrorInfo = errorInfo;
- outer: for (var _i = 0, targetSignatures_1 = targetSignatures; _i < targetSignatures_1.length; _i++) {
- var t = targetSignatures_1[_i];
- var shouldElaborateErrors = reportErrors;
- for (var _a = 0, sourceSignatures_1 = sourceSignatures; _a < sourceSignatures_1.length; _a++) {
- var s = sourceSignatures_1[_a];
- var related = signatureRelatedTo(s, t, shouldElaborateErrors);
- if (related) {
- result &= related;
- errorInfo = saveErrorInfo;
- continue outer;
+ if (getObjectFlags(source) & 64 && getObjectFlags(target) & 64 && source.symbol === target.symbol) {
+ for (var i = 0; i < targetSignatures.length; i++) {
+ var related = signatureRelatedTo(sourceSignatures[i], targetSignatures[i], true, reportErrors);
+ if (!related) {
+ return 0;
}
- shouldElaborateErrors = false;
+ result &= related;
}
- if (shouldElaborateErrors) {
- reportError(ts.Diagnostics.Type_0_provides_no_match_for_the_signature_1, typeToString(source), signatureToString(t, undefined, undefined, kind));
+ }
+ else if (sourceSignatures.length === 1 && targetSignatures.length === 1) {
+ var eraseGenerics = relation === comparableRelation || compilerOptions.noStrictGenericChecks;
+ result = signatureRelatedTo(sourceSignatures[0], targetSignatures[0], eraseGenerics, reportErrors);
+ }
+ else {
+ outer: for (var _i = 0, targetSignatures_1 = targetSignatures; _i < targetSignatures_1.length; _i++) {
+ var t = targetSignatures_1[_i];
+ var shouldElaborateErrors = reportErrors;
+ for (var _a = 0, sourceSignatures_1 = sourceSignatures; _a < sourceSignatures_1.length; _a++) {
+ var s = sourceSignatures_1[_a];
+ var related = signatureRelatedTo(s, t, true, shouldElaborateErrors);
+ if (related) {
+ result &= related;
+ errorInfo = saveErrorInfo;
+ continue outer;
+ }
+ shouldElaborateErrors = false;
+ }
+ if (shouldElaborateErrors) {
+ reportError(ts.Diagnostics.Type_0_provides_no_match_for_the_signature_1, typeToString(source), signatureToString(t, undefined, undefined, kind));
+ }
+ return 0;
}
- return 0;
}
return result;
}
- function signatureRelatedTo(source, target, reportErrors) {
- return compareSignaturesRelated(source, target, false, reportErrors, reportError, isRelatedTo);
+ function signatureRelatedTo(source, target, erase, reportErrors) {
+ return compareSignaturesRelated(erase ? getErasedSignature(source) : source, erase ? getErasedSignature(target) : target, false, false, reportErrors, reportError, isRelatedTo);
}
function signaturesIdenticalTo(source, target, kind) {
var sourceSignatures = getSignaturesOfType(source, kind);
@@ -28254,7 +29609,7 @@ var ts;
}
}
function forEachProperty(prop, callback) {
- if (getCheckFlags(prop) & 6) {
+ if (ts.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);
@@ -28277,11 +29632,11 @@ var ts;
});
}
function isValidOverrideOf(sourceProp, targetProp) {
- return !forEachProperty(targetProp, function (tp) { return getDeclarationModifierFlagsFromSymbol(tp) & 16 ?
+ return !forEachProperty(targetProp, function (tp) { return ts.getDeclarationModifierFlagsFromSymbol(tp) & 16 ?
!isPropertyInClassDerivedFrom(sourceProp, getDeclaringClass(tp)) : false; });
}
function isClassDerivedFromDeclaringClasses(checkClass, prop) {
- return forEachProperty(prop, function (p) { return getDeclarationModifierFlagsFromSymbol(p) & 16 ?
+ return forEachProperty(prop, function (p) { return ts.getDeclarationModifierFlagsFromSymbol(p) & 16 ?
!hasBaseType(checkClass, getDeclaringClass(p)) : false; }) ? undefined : checkClass;
}
function isAbstractConstructorType(type) {
@@ -28320,8 +29675,8 @@ var ts;
if (sourceProp === targetProp) {
return -1;
}
- var sourcePropAccessibility = getDeclarationModifierFlagsFromSymbol(sourceProp) & 24;
- var targetPropAccessibility = getDeclarationModifierFlagsFromSymbol(targetProp) & 24;
+ var sourcePropAccessibility = ts.getDeclarationModifierFlagsFromSymbol(sourceProp) & 24;
+ var targetPropAccessibility = ts.getDeclarationModifierFlagsFromSymbol(targetProp) & 24;
if (sourcePropAccessibility !== targetPropAccessibility) {
return 0;
}
@@ -28398,18 +29753,10 @@ var ts;
function isRestParameterIndex(signature, parameterIndex) {
return signature.hasRestParameter && parameterIndex >= signature.parameters.length - 1;
}
- function isSupertypeOfEach(candidate, types) {
- 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;
- }
- return true;
- }
function literalTypesWithSameBaseType(types) {
var commonBaseType;
- for (var _i = 0, types_11 = types; _i < types_11.length; _i++) {
- var t = types_11[_i];
+ for (var _i = 0, types_9 = types; _i < types_9.length; _i++) {
+ var t = types_9[_i];
var baseType = getBaseTypeOfLiteralType(t);
if (!commonBaseType) {
commonBaseType = baseType;
@@ -28421,45 +29768,18 @@ var ts;
return true;
}
function getSupertypeOrUnion(types) {
- return literalTypesWithSameBaseType(types) ? getUnionType(types) : ts.forEach(types, function (t) { return isSupertypeOfEach(t, types) ? t : undefined; });
+ return literalTypesWithSameBaseType(types) ?
+ getUnionType(types) :
+ ts.reduceLeft(types, function (s, t) { return isTypeSubtypeOf(s, t) ? t : s; });
}
function getCommonSupertype(types) {
if (!strictNullChecks) {
return getSupertypeOrUnion(types);
}
var primaryTypes = ts.filter(types, function (t) { return !(t.flags & 6144); });
- if (!primaryTypes.length) {
- return getUnionType(types, true);
- }
- var supertype = getSupertypeOrUnion(primaryTypes);
- return supertype && includeFalsyTypes(supertype, getFalsyFlagsOfTypes(types) & 6144);
- }
- function reportNoCommonSupertypeError(types, errorLocation, errorMessageChainHead) {
- var bestSupertype;
- var bestSupertypeDownfallType;
- var bestSupertypeScore = 0;
- for (var i = 0; i < types.length; i++) {
- var score = 0;
- var downfallType = undefined;
- for (var j = 0; j < types.length; j++) {
- if (isTypeSubtypeOf(types[j], types[i])) {
- score++;
- }
- else if (!downfallType) {
- downfallType = types[j];
- }
- }
- ts.Debug.assert(!!downfallType, "If there is no common supertype, each type should have a downfallType");
- if (score > bestSupertypeScore) {
- bestSupertype = types[i];
- bestSupertypeDownfallType = downfallType;
- bestSupertypeScore = score;
- }
- if (bestSupertypeScore === types.length - 1) {
- break;
- }
- }
- checkTypeSubtypeOf(bestSupertypeDownfallType, bestSupertype, errorLocation, ts.Diagnostics.Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0, errorMessageChainHead);
+ return primaryTypes.length ?
+ getNullableType(getSupertypeOrUnion(primaryTypes), getFalsyFlagsOfTypes(types) & 6144) :
+ getUnionType(types, true);
}
function isArrayType(type) {
return getObjectFlags(type) & 4 && type.target === globalArrayType;
@@ -28472,27 +29792,27 @@ var ts;
return !!getPropertyOfType(type, "0");
}
function isUnitType(type) {
- return (type.flags & (480 | 2048 | 4096)) !== 0;
+ return (type.flags & (224 | 2048 | 4096)) !== 0;
}
function isLiteralType(type) {
return type.flags & 8 ? true :
- type.flags & 65536 ? type.flags & 16 ? true : !ts.forEach(type.types, function (t) { return !isUnitType(t); }) :
+ type.flags & 65536 ? type.flags & 256 ? true : !ts.forEach(type.types, function (t) { return !isUnitType(t); }) :
isUnitType(type);
}
function getBaseTypeOfLiteralType(type) {
- return type.flags & 32 ? stringType :
- type.flags & 64 ? numberType :
- type.flags & 128 ? booleanType :
- type.flags & 256 ? type.baseType :
- type.flags & 65536 && !(type.flags & 16) ? getUnionType(ts.sameMap(type.types, getBaseTypeOfLiteralType)) :
+ return type.flags & 256 ? getBaseTypeOfEnumLiteralType(type) :
+ type.flags & 32 ? stringType :
+ type.flags & 64 ? numberType :
+ type.flags & 128 ? booleanType :
+ type.flags & 65536 ? getUnionType(ts.sameMap(type.types, getBaseTypeOfLiteralType)) :
type;
}
function getWidenedLiteralType(type) {
- return type.flags & 32 && type.flags & 1048576 ? stringType :
- type.flags & 64 && type.flags & 1048576 ? numberType :
- type.flags & 128 ? booleanType :
- type.flags & 256 ? type.baseType :
- type.flags & 65536 && !(type.flags & 16) ? getUnionType(ts.sameMap(type.types, getWidenedLiteralType)) :
+ return type.flags & 256 ? getBaseTypeOfEnumLiteralType(type) :
+ type.flags & 32 && type.flags & 1048576 ? stringType :
+ type.flags & 64 && type.flags & 1048576 ? numberType :
+ type.flags & 128 ? booleanType :
+ type.flags & 65536 ? getUnionType(ts.sameMap(type.types, getWidenedLiteralType)) :
type;
}
function isTupleType(type) {
@@ -28500,43 +29820,43 @@ var ts;
}
function getFalsyFlagsOfTypes(types) {
var result = 0;
- for (var _i = 0, types_12 = types; _i < types_12.length; _i++) {
- var t = types_12[_i];
+ for (var _i = 0, types_10 = types; _i < types_10.length; _i++) {
+ var t = types_10[_i];
result |= getFalsyFlags(t);
}
return result;
}
function getFalsyFlags(type) {
return type.flags & 65536 ? getFalsyFlagsOfTypes(type.types) :
- type.flags & 32 ? type.text === "" ? 32 : 0 :
- type.flags & 64 ? type.text === "0" ? 64 : 0 :
+ type.flags & 32 ? type.value === "" ? 32 : 0 :
+ type.flags & 64 ? type.value === 0 ? 64 : 0 :
type.flags & 128 ? type === falseType ? 128 : 0 :
type.flags & 7406;
}
- function includeFalsyTypes(type, flags) {
- if ((getFalsyFlags(type) & flags) === flags) {
- return type;
- }
- var types = [type];
- if (flags & 262178)
- types.push(emptyStringType);
- if (flags & 340)
- types.push(zeroType);
- if (flags & 136)
- types.push(falseType);
- if (flags & 1024)
- types.push(voidType);
- if (flags & 2048)
- types.push(undefinedType);
- if (flags & 4096)
- types.push(nullType);
- return getUnionType(types);
- }
function removeDefinitelyFalsyTypes(type) {
return getFalsyFlags(type) & 7392 ?
filterType(type, function (t) { return !(getFalsyFlags(t) & 7392); }) :
type;
}
+ function extractDefinitelyFalsyTypes(type) {
+ return mapType(type, getDefinitelyFalsyPartOfType);
+ }
+ function getDefinitelyFalsyPartOfType(type) {
+ return type.flags & 2 ? emptyStringType :
+ type.flags & 4 ? zeroType :
+ type.flags & 8 || type === falseType ? falseType :
+ type.flags & (1024 | 2048 | 4096) ||
+ type.flags & 32 && type.value === "" ||
+ type.flags & 64 && type.value === 0 ? type :
+ neverType;
+ }
+ function getNullableType(type, flags) {
+ var missing = (flags & ~type.flags) & (2048 | 4096);
+ return missing === 0 ? type :
+ missing === 2048 ? getUnionType([type, undefinedType]) :
+ missing === 4096 ? getUnionType([type, nullType]) :
+ getUnionType([type, undefinedType, nullType]);
+ }
function getNonNullableType(type) {
return strictNullChecks ? getTypeWithFacts(type, 524288) : type;
}
@@ -28681,7 +30001,7 @@ var ts;
default:
diagnostic = ts.Diagnostics.Variable_0_implicitly_has_an_1_type;
}
- error(declaration, diagnostic, ts.declarationNameToString(declaration.name), typeAsString);
+ error(declaration, diagnostic, ts.declarationNameToString(ts.getNameOfDeclaration(declaration)), typeAsString);
}
function reportErrorsFromWidening(declaration, type) {
if (produceDiagnostics && noImplicitAny && type.flags & 2097152) {
@@ -28710,29 +30030,49 @@ var ts;
callback(getTypeAtPosition(source, i), getTypeAtPosition(target, i));
}
}
- function createInferenceContext(signature, inferUnionTypes, useAnyForNoInferences) {
- var inferences = ts.map(signature.typeParameters, createTypeInferencesObject);
+ function createInferenceContext(signature, flags, baseInferences) {
+ var inferences = baseInferences ? ts.map(baseInferences, cloneInferenceInfo) : ts.map(signature.typeParameters, createInferenceInfo);
+ var context = mapper;
+ context.mappedTypes = signature.typeParameters;
+ context.signature = signature;
+ context.inferences = inferences;
+ context.flags = flags;
+ return context;
+ function mapper(t) {
+ for (var i = 0; i < inferences.length; i++) {
+ if (t === inferences[i].typeParameter) {
+ inferences[i].isFixed = true;
+ return getInferredType(context, i);
+ }
+ }
+ return t;
+ }
+ }
+ function createInferenceInfo(typeParameter) {
return {
- signature: signature,
- inferUnionTypes: inferUnionTypes,
- inferences: inferences,
- inferredTypes: new Array(signature.typeParameters.length),
- useAnyForNoInferences: useAnyForNoInferences
+ typeParameter: typeParameter,
+ candidates: undefined,
+ inferredType: undefined,
+ priority: undefined,
+ topLevel: true,
+ isFixed: false
};
}
- function createTypeInferencesObject() {
+ function cloneInferenceInfo(inference) {
return {
- primary: undefined,
- secondary: undefined,
- topLevel: true,
- isFixed: false,
+ typeParameter: inference.typeParameter,
+ candidates: inference.candidates && inference.candidates.slice(),
+ inferredType: inference.inferredType,
+ priority: inference.priority,
+ topLevel: inference.topLevel,
+ isFixed: inference.isFixed
};
}
function couldContainTypeVariables(type) {
var objectFlags = getObjectFlags(type);
return !!(type.flags & 540672 ||
objectFlags & 4 && ts.forEach(type.typeArguments, couldContainTypeVariables) ||
- objectFlags & 16 && type.symbol && type.symbol.flags & (8192 | 2048 | 32) ||
+ objectFlags & 16 && type.symbol && type.symbol.flags & (16 | 8192 | 2048 | 32) ||
objectFlags & 32 ||
type.flags & 196608 && couldUnionOrIntersectionContainTypeVariables(type));
}
@@ -28751,14 +30091,13 @@ var ts;
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 typeParameter = getIndexedAccessType(getConstraintTypeFromMappedType(target).type, getTypeParameterFromMappedType(target));
+ var inference = createInferenceInfo(typeParameter);
+ var inferences = [inference];
var templateType = getTemplateTypeFromMappedType(target);
var readonlyMask = target.declaration.readonlyToken ? false : true;
var optionalMask = target.declaration.questionToken ? 0 : 67108864;
- var members = createSymbolTable(properties);
+ var members = ts.createMap();
for (var _i = 0, properties_5 = properties; _i < properties_5.length; _i++) {
var prop = properties_5[_i];
var inferredPropType = inferTargetType(getTypeOfSymbol(prop));
@@ -28780,31 +30119,16 @@ var ts;
}
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);
+ inference.candidates = undefined;
+ inferTypes(inferences, sourceType, templateType);
+ return inference.candidates && getUnionType(inference.candidates, 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;
- var inferiority = 0;
- var visited = ts.createMap();
+ function inferTypes(inferences, originalSource, originalTarget, priority) {
+ if (priority === void 0) { priority = 0; }
+ var symbolStack;
+ var visited;
inferFromTypes(originalSource, originalTarget);
- function isInProcess(source, target) {
- for (var i = 0; i < depth; i++) {
- if (source === sourceStack[i] && target === targetStack[i]) {
- return true;
- }
- }
- return false;
- }
function inferFromTypes(source, target) {
if (!couldContainTypeVariables(target)) {
return;
@@ -28817,7 +30141,7 @@ var ts;
}
return;
}
- if (source.flags & 65536 && target.flags & 65536 && !(source.flags & 16 && target.flags & 16) ||
+ if (source.flags & 65536 && target.flags & 65536 && !(source.flags & 256 && target.flags & 256) ||
source.flags & 131072 && target.flags & 131072) {
if (source === target) {
for (var _i = 0, _a = source.types; _i < _a.length; _i++) {
@@ -28846,25 +30170,24 @@ var ts;
}
}
if (target.flags & 540672) {
- if (source.flags & 8388608) {
+ if (source.flags & 8388608 || source === silentNeverType) {
return;
}
- 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 = []) :
- inferences.primary || (inferences.primary = []);
- if (!ts.contains(candidates, source)) {
- candidates.push(source);
- }
- if (target.flags & 16384 && !isTypeParameterAtTopLevel(originalTarget, target)) {
- inferences.topLevel = false;
- }
+ var inference = getInferenceInfoForType(target);
+ if (inference) {
+ if (!inference.isFixed) {
+ if (!inference.candidates || priority < inference.priority) {
+ inference.candidates = [source];
+ inference.priority = priority;
+ }
+ else if (priority === inference.priority) {
+ inference.candidates.push(source);
+ }
+ if (!(priority & 4) && target.flags & 16384 && !isTypeParameterAtTopLevel(originalTarget, target)) {
+ inference.topLevel = false;
}
- return;
}
+ return;
}
}
else if (getObjectFlags(source) & 4 && getObjectFlags(target) & 4 && source.target === target.target) {
@@ -28881,7 +30204,7 @@ var ts;
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)) {
+ if (getInferenceInfoForType(t)) {
typeVariable = t;
typeVariableCount++;
}
@@ -28890,9 +30213,10 @@ var ts;
}
}
if (typeVariableCount === 1) {
- inferiority++;
+ var savePriority = priority;
+ priority |= 1;
inferFromTypes(source, typeVariable);
- inferiority--;
+ priority = savePriority;
}
}
else if (source.flags & 196608) {
@@ -28905,40 +30229,51 @@ var ts;
else {
source = getApparentType(source);
if (source.flags & 32768) {
- if (isInProcess(source, target)) {
+ var key = source.id + "," + target.id;
+ if (visited && visited.get(key)) {
return;
}
- if (isDeeplyNestedType(source, sourceStack, depth) && isDeeplyNestedType(target, targetStack, depth)) {
- return;
+ (visited || (visited = ts.createMap())).set(key, true);
+ var isNonConstructorObject = target.flags & 32768 &&
+ !(getObjectFlags(target) & 16 && target.symbol && target.symbol.flags & 32);
+ var symbol = isNonConstructorObject ? target.symbol : undefined;
+ if (symbol) {
+ if (ts.contains(symbolStack, symbol)) {
+ return;
+ }
+ (symbolStack || (symbolStack = [])).push(symbol);
+ inferFromObjectTypes(source, target);
+ symbolStack.pop();
}
- var key = source.id + "," + target.id;
- if (visited.get(key)) {
- return;
+ else {
+ inferFromObjectTypes(source, target);
}
- visited.set(key, true);
- if (depth === 0) {
- sourceStack = [];
- targetStack = [];
+ }
+ }
+ }
+ function getInferenceInfoForType(type) {
+ if (type.flags & 540672) {
+ for (var _i = 0, inferences_1 = inferences; _i < inferences_1.length; _i++) {
+ var inference = inferences_1[_i];
+ if (type === inference.typeParameter) {
+ return inference;
}
- sourceStack[depth] = source;
- targetStack[depth] = target;
- depth++;
- inferFromObjectTypes(source, target);
- depth--;
}
}
+ return undefined;
}
function inferFromObjectTypes(source, target) {
if (getObjectFlags(target) & 32) {
var constraintType = getConstraintTypeFromMappedType(target);
if (constraintType.flags & 262144) {
- var index = ts.indexOf(typeVariables, constraintType.type);
- if (index >= 0 && !typeInferences[index].isFixed) {
+ var inference = getInferenceInfoForType(constraintType.type);
+ if (inference && !inference.isFixed) {
var inferredType = inferTypeForHomomorphicMappedType(source, target);
if (inferredType) {
- inferiority++;
- inferFromTypes(inferredType, typeVariables[index]);
- inferiority--;
+ var savePriority = priority;
+ priority |= 2;
+ inferFromTypes(inferredType, inference.typeParameter);
+ priority = savePriority;
}
}
return;
@@ -29007,8 +30342,8 @@ var ts;
}
}
function typeIdenticalToSomeType(type, types) {
- for (var _i = 0, types_13 = types; _i < types_13.length; _i++) {
- var t = types_13[_i];
+ for (var _i = 0, types_11 = types; _i < types_11.length; _i++) {
+ var t = types_11[_i];
if (isTypeIdenticalTo(t, type)) {
return true;
}
@@ -29025,65 +30360,58 @@ var ts;
}
return type.flags & 65536 ? getUnionType(reducedTypes) : getIntersectionType(reducedTypes);
}
- function getInferenceCandidates(context, index) {
- var inferences = context.inferences[index];
- return inferences.primary || inferences.secondary || emptyArray;
- }
function hasPrimitiveConstraint(type) {
var constraint = getConstraintOfTypeParameter(type);
return constraint && maybeTypeOfKind(constraint, 8190 | 262144);
}
function getInferredType(context, index) {
- var inferredType = context.inferredTypes[index];
- var inferenceSucceeded;
+ var inference = context.inferences[index];
+ var inferredType = inference.inferredType;
if (!inferredType) {
- var inferences = getInferenceCandidates(context, index);
- if (inferences.length) {
+ if (inference.candidates) {
var signature = context.signature;
- var widenLiteralTypes = context.inferences[index].topLevel &&
- !hasPrimitiveConstraint(signature.typeParameters[index]) &&
- (context.inferences[index].isFixed || !isTypeParameterAtTopLevel(getReturnTypeOfSignature(signature), signature.typeParameters[index]));
- var baseInferences = widenLiteralTypes ? ts.sameMap(inferences, getWidenedLiteralType) : inferences;
- var unionOrSuperType = context.inferUnionTypes ? getUnionType(baseInferences, true) : getCommonSupertype(baseInferences);
- inferredType = unionOrSuperType ? getWidenedType(unionOrSuperType) : unknownType;
- inferenceSucceeded = !!unionOrSuperType;
+ var widenLiteralTypes = inference.topLevel &&
+ !hasPrimitiveConstraint(inference.typeParameter) &&
+ (inference.isFixed || !isTypeParameterAtTopLevel(getReturnTypeOfSignature(signature), inference.typeParameter));
+ var baseCandidates = widenLiteralTypes ? ts.sameMap(inference.candidates, getWidenedLiteralType) : inference.candidates;
+ var unionOrSuperType = context.flags & 1 || inference.priority & 4 ?
+ getUnionType(baseCandidates, true) : getCommonSupertype(baseCandidates);
+ inferredType = getWidenedType(unionOrSuperType);
+ }
+ else if (context.flags & 2) {
+ inferredType = silentNeverType;
}
else {
- var defaultType = getDefaultFromTypeParameter(context.signature.typeParameters[index]);
+ var defaultType = getDefaultFromTypeParameter(inference.typeParameter);
if (defaultType) {
- inferredType = instantiateType(defaultType, combineTypeMappers(createBackreferenceMapper(context.signature.typeParameters, index), getInferenceMapper(context)));
+ inferredType = instantiateType(defaultType, combineTypeMappers(createBackreferenceMapper(context.signature.typeParameters, index), context));
}
else {
- inferredType = context.useAnyForNoInferences ? anyType : emptyObjectType;
+ inferredType = context.flags & 4 ? anyType : emptyObjectType;
}
- inferenceSucceeded = true;
}
- context.inferredTypes[index] = inferredType;
- if (inferenceSucceeded) {
- var constraint = getConstraintOfTypeParameter(context.signature.typeParameters[index]);
- if (constraint) {
- var instantiatedConstraint = instantiateType(constraint, getInferenceMapper(context));
- if (!isTypeAssignableTo(inferredType, getTypeWithThisArgument(instantiatedConstraint, inferredType))) {
- context.inferredTypes[index] = inferredType = instantiatedConstraint;
- }
+ inference.inferredType = inferredType;
+ var constraint = getConstraintOfTypeParameter(context.signature.typeParameters[index]);
+ if (constraint) {
+ var instantiatedConstraint = instantiateType(constraint, context);
+ if (!isTypeAssignableTo(inferredType, getTypeWithThisArgument(instantiatedConstraint, inferredType))) {
+ inference.inferredType = inferredType = instantiatedConstraint;
}
}
- else if (context.failedTypeParameterIndex === undefined || context.failedTypeParameterIndex > index) {
- context.failedTypeParameterIndex = index;
- }
}
return inferredType;
}
function getInferredTypes(context) {
- for (var i = 0; i < context.inferredTypes.length; i++) {
- getInferredType(context, i);
+ var result = [];
+ for (var i = 0; i < context.inferences.length; i++) {
+ result.push(getInferredType(context, i));
}
- return context.inferredTypes;
+ return result;
}
function getResolvedSymbol(node) {
var links = getNodeLinks(node);
if (!links.resolvedSymbol) {
- links.resolvedSymbol = !ts.nodeIsMissing(node) && resolveName(node, node.text, 107455 | 1048576, ts.Diagnostics.Cannot_find_name_0, node) || unknownSymbol;
+ links.resolvedSymbol = !ts.nodeIsMissing(node) && resolveName(node, node.text, 107455 | 1048576, ts.Diagnostics.Cannot_find_name_0, node, ts.Diagnostics.Cannot_find_name_0_Did_you_mean_1) || unknownSymbol;
}
return links.resolvedSymbol;
}
@@ -29093,7 +30421,7 @@ var ts;
function getFlowCacheKey(node) {
if (node.kind === 71) {
var symbol = getResolvedSymbol(node);
- return symbol !== unknownSymbol ? "" + getSymbolId(symbol) : undefined;
+ return symbol !== unknownSymbol ? (isApparentTypePosition(node) ? "@" : "") + getSymbolId(symbol) : undefined;
}
if (node.kind === 99) {
return "0";
@@ -29158,7 +30486,7 @@ var ts;
function isDiscriminantProperty(type, name) {
if (type && type.flags & 65536) {
var prop = getUnionOrIntersectionProperty(type, name);
- if (prop && getCheckFlags(prop) & 2) {
+ if (prop && ts.getCheckFlags(prop) & 2) {
if (prop.isDiscriminantProperty === undefined) {
prop.isDiscriminantProperty = prop.checkFlags & 32 && isLiteralType(getTypeOfSymbol(prop));
}
@@ -29218,8 +30546,8 @@ var ts;
}
function getTypeFactsOfTypes(types) {
var result = 0;
- for (var _i = 0, types_14 = types; _i < types_14.length; _i++) {
- var t = types_14[_i];
+ for (var _i = 0, types_12 = types; _i < types_12.length; _i++) {
+ var t = types_12[_i];
result |= getTypeFacts(t);
}
return result;
@@ -29235,15 +30563,16 @@ var ts;
return strictNullChecks ? 4079361 : 4194049;
}
if (flags & 32) {
+ var isEmpty = type.value === "";
return strictNullChecks ?
- type.text === "" ? 3030785 : 1982209 :
- type.text === "" ? 3145473 : 4194049;
+ isEmpty ? 3030785 : 1982209 :
+ isEmpty ? 3145473 : 4194049;
}
if (flags & (4 | 16)) {
return strictNullChecks ? 4079234 : 4193922;
}
- if (flags & (64 | 256)) {
- var isZero = type.text === "0";
+ if (flags & 64) {
+ var isZero = type.value === 0;
return strictNullChecks ?
isZero ? 3030658 : 1982082 :
isZero ? 3145346 : 4193922;
@@ -29445,7 +30774,7 @@ var ts;
}
return true;
}
- if (source.flags & 256 && target.flags & 16 && source.baseType === target) {
+ if (source.flags & 256 && getBaseTypeOfEnumLiteralType(source) === target) {
return true;
}
return containsType(target.types, source);
@@ -29468,8 +30797,8 @@ var ts;
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];
+ 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) {
@@ -29538,8 +30867,8 @@ var ts;
}
function isEvolvingArrayTypeList(types) {
var hasEvolvingArrayType = false;
- for (var _i = 0, types_16 = types; _i < types_16.length; _i++) {
- var t = types_16[_i];
+ for (var _i = 0, types_14 = types; _i < types_14.length; _i++) {
+ var t = types_14[_i];
if (!(t.flags & 8192)) {
if (!(getObjectFlags(t) & 256)) {
return false;
@@ -29565,7 +30894,7 @@ var ts;
parent.parent.operatorToken.kind === 58 &&
parent.parent.left === parent &&
!ts.isAssignmentTarget(parent.parent) &&
- isTypeAnyOrAllConstituentTypesHaveKind(getTypeOfExpression(parent.argumentExpression), 340 | 2048);
+ isTypeAnyOrAllConstituentTypesHaveKind(getTypeOfExpression(parent.argumentExpression), 84 | 2048);
return isLengthPushOrUnshift || isElementAssignment;
}
function maybeTypePredicateCall(node) {
@@ -29591,7 +30920,7 @@ var ts;
function getFlowTypeOfReference(reference, declaredType, initialType, flowContainer, couldBeUninitialized) {
if (initialType === void 0) { initialType = declaredType; }
var key;
- if (!reference.flowNode || !couldBeUninitialized && !(declaredType.flags & 17810431)) {
+ if (!reference.flowNode || !couldBeUninitialized && !(declaredType.flags & 17810175)) {
return declaredType;
}
var visitedFlowStart = visitedFlowCount;
@@ -29711,7 +31040,7 @@ var ts;
}
else {
var indexType = getTypeOfExpression(node.left.argumentExpression);
- if (isTypeAnyOrAllConstituentTypesHaveKind(indexType, 340 | 2048)) {
+ if (isTypeAnyOrAllConstituentTypesHaveKind(indexType, 84 | 2048)) {
evolvedType_1 = addEvolvingArrayElementType(evolvedType_1, node.right);
}
}
@@ -30144,6 +31473,22 @@ var ts;
!(getFalsyFlags(checkExpression(declaration.initializer)) & 2048);
return annotationIncludesUndefined ? getTypeWithFacts(declaredType, 131072) : declaredType;
}
+ function isApparentTypePosition(node) {
+ var parent = node.parent;
+ return parent.kind === 179 ||
+ parent.kind === 181 && parent.expression === node ||
+ parent.kind === 180 && parent.expression === node;
+ }
+ function typeHasNullableConstraint(type) {
+ return type.flags & 540672 && maybeTypeOfKind(getBaseConstraintOfType(type) || emptyObjectType, 6144);
+ }
+ function getDeclaredOrApparentType(symbol, node) {
+ var type = getTypeOfSymbol(symbol);
+ if (isApparentTypePosition(node) && forEachType(type, typeHasNullableConstraint)) {
+ return mapType(getWidenedType(type), getApparentType);
+ }
+ return type;
+ }
function checkIdentifier(node) {
var symbol = getResolvedSymbol(node);
if (symbol === unknownSymbol) {
@@ -30162,7 +31507,7 @@ var ts;
getNodeLinks(container).flags |= 8192;
return getTypeOfSymbol(symbol);
}
- if (symbol.flags & 8388608 && !isInTypeQuery(node) && !isConstEnumOrConstEnumOnlyModule(resolveAlias(symbol))) {
+ if (isNonLocalAlias(symbol, 107455) && !isInTypeQuery(node) && !isConstEnumOrConstEnumOnlyModule(resolveAlias(symbol))) {
markAliasSymbolAsReferenced(symbol);
}
var localOrExportSymbol = getExportSymbolOfValueSymbolIfExported(symbol);
@@ -30198,7 +31543,7 @@ var ts;
checkCollisionWithCapturedThisVariable(node, node);
checkCollisionWithCapturedNewTargetVariable(node, node);
checkNestedBlockScopedBinding(node, symbol);
- var type = getTypeOfSymbol(localOrExportSymbol);
+ var type = getDeclaredOrApparentType(localOrExportSymbol, node);
var declaration = localOrExportSymbol.valueDeclaration;
var assignmentKind = ts.getAssignmentTargetKind(node);
if (assignmentKind) {
@@ -30225,15 +31570,16 @@ var ts;
}
var assumeInitialized = isParameter || isOuterVariable ||
type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & 1) !== 0 || isInTypeQuery(node) || node.parent.kind === 246) ||
+ node.parent.kind === 203 ||
ts.isInAmbientContext(declaration);
var initialType = assumeInitialized ? (isParameter ? removeOptionalityFromDeclaredType(type, ts.getRootDeclaration(declaration)) : type) :
type === autoType || type === autoArrayType ? undefinedType :
- includeFalsyTypes(type, 2048);
+ getNullableType(type, 2048);
var flowType = getFlowTypeOfReference(node, type, initialType, flowContainer, !assumeInitialized);
if (type === autoType || type === autoArrayType) {
if (flowType === autoType || flowType === autoArrayType) {
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(ts.getNameOfDeclaration(declaration), 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));
}
return convertAutoToAny(flowType);
@@ -30624,8 +31970,15 @@ var ts;
function getContextualTypeForInitializerExpression(node) {
var declaration = node.parent;
if (node === declaration.initializer) {
- if (declaration.type) {
- return getTypeFromTypeNode(declaration.type);
+ var typeNode = ts.getEffectiveTypeAnnotationNode(declaration);
+ if (typeNode) {
+ return getTypeFromTypeNode(typeNode);
+ }
+ if (ts.isInJavaScriptFile(declaration)) {
+ var jsDocType = getTypeForDeclarationFromJSDocComment(declaration);
+ if (jsDocType) {
+ return jsDocType;
+ }
}
if (declaration.kind === 146) {
var type = getContextuallyTypedParameterType(declaration);
@@ -30639,12 +31992,13 @@ var ts;
if (ts.isBindingPattern(declaration.parent)) {
var parentDeclaration = declaration.parent.parent;
var name = declaration.propertyName || declaration.name;
- if (parentDeclaration.kind !== 176 &&
- parentDeclaration.type &&
- !ts.isBindingPattern(name)) {
- var text = ts.getTextOfPropertyName(name);
- if (text) {
- return getTypeOfPropertyOfType(getTypeFromTypeNode(parentDeclaration.type), text);
+ if (parentDeclaration.kind !== 176) {
+ var parentTypeNode = ts.getEffectiveTypeAnnotationNode(parentDeclaration);
+ if (parentTypeNode && !ts.isBindingPattern(name)) {
+ var text = ts.getTextOfPropertyName(name);
+ if (text) {
+ return getTypeOfPropertyOfType(getTypeFromTypeNode(parentTypeNode), text);
+ }
}
}
}
@@ -30688,9 +32042,9 @@ var ts;
return false;
}
function getContextualReturnType(functionDecl) {
- if (functionDecl.type ||
- functionDecl.kind === 152 ||
- functionDecl.kind === 153 && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(functionDecl.symbol, 154))) {
+ if (functionDecl.kind === 152 ||
+ ts.getEffectiveReturnTypeNode(functionDecl) ||
+ isGetAccessorWithAnnotatedSetAccessor(functionDecl)) {
return getReturnTypeOfSignature(getSignatureFromDeclaration(functionDecl));
}
var signature = getContextualSignatureForFunctionLikeDeclaration(functionDecl);
@@ -30717,7 +32071,7 @@ var ts;
function getContextualTypeForBinaryOperand(node) {
var binaryExpression = node.parent;
var operator = binaryExpression.operatorToken.kind;
- if (operator >= 58 && operator <= 70) {
+ if (ts.isAssignmentOperator(operator)) {
if (ts.getSpecialPropertyAssignmentKind(binaryExpression) !== 0) {
return undefined;
}
@@ -30855,6 +32209,8 @@ var ts;
case 261:
case 262:
return getContextualTypeForObjectLiteralElement(parent);
+ case 263:
+ return getApparentTypeOfContextualType(parent.parent);
case 177:
return getContextualTypeForElementExpression(node);
case 195:
@@ -30879,11 +32235,11 @@ var ts;
node = ts.findAncestor(node, function (n) { return !!n.contextualMapper; });
return node ? node.contextualMapper : identityMapper;
}
- function getNonGenericSignature(type, node) {
+ function getContextualCallSignature(type, node) {
var signatures = getSignaturesOfStructuredType(type, 0);
if (signatures.length === 1) {
var signature = signatures[0];
- if (!signature.typeParameters && !isAritySmaller(signature, node)) {
+ if (!isAritySmaller(signature, node)) {
return signature;
}
}
@@ -30922,13 +32278,13 @@ var ts;
return undefined;
}
if (!(type.flags & 65536)) {
- return getNonGenericSignature(type, node);
+ return getContextualCallSignature(type, node);
}
var signatureList;
var types = type.types;
- for (var _i = 0, types_17 = types; _i < types_17.length; _i++) {
- var current = types_17[_i];
- var signature = getNonGenericSignature(current, node);
+ for (var _i = 0, types_15 = types; _i < types_15.length; _i++) {
+ var current = types_15[_i];
+ var signature = getContextualCallSignature(current, node);
if (signature) {
if (!signatureList) {
signatureList = [signature];
@@ -31018,7 +32374,7 @@ var ts;
return name.kind === 144 ? isNumericComputedName(name) : isNumericLiteralName(name.text);
}
function isNumericComputedName(name) {
- return isTypeAnyOrAllConstituentTypesHaveKind(checkComputedPropertyName(name), 340);
+ return isTypeAnyOrAllConstituentTypesHaveKind(checkComputedPropertyName(name), 84);
}
function isTypeAnyOrAllConstituentTypesHaveKind(type, kind) {
return isTypeAny(type) || isTypeOfKind(type, kind);
@@ -31033,7 +32389,7 @@ var ts;
var links = getNodeLinks(node.expression);
if (!links.resolvedType) {
links.resolvedType = checkExpression(node.expression);
- if (!isTypeAnyOrAllConstituentTypesHaveKind(links.resolvedType, 340 | 262178 | 512)) {
+ if (!isTypeAnyOrAllConstituentTypesHaveKind(links.resolvedType, 84 | 262178 | 512)) {
error(node, ts.Diagnostics.A_computed_property_name_must_be_of_type_string_number_symbol_or_any);
}
else {
@@ -31171,6 +32527,8 @@ var ts;
}
if (spread.flags & 32768) {
spread.flags |= propagatedFlags;
+ spread.flags |= 1048576;
+ spread.objectFlags |= 128;
spread.symbol = node.symbol;
}
return spread;
@@ -31230,6 +32588,10 @@ var ts;
var attributesTable = ts.createMap();
var spread = emptyObjectType;
var attributesArray = [];
+ var hasSpreadAnyType = false;
+ var typeToIntersect;
+ var explicitlySpecifyChildrenAttribute = false;
+ var jsxChildrenPropertyName = getJsxElementChildrenPropertyname();
for (var _i = 0, _a = attributes.properties; _i < _a.length; _i++) {
var attributeDecl = _a[_i];
var member = attributeDecl.symbol;
@@ -31247,6 +32609,9 @@ var ts;
attributeSymbol.target = member;
attributesTable.set(attributeSymbol.name, attributeSymbol);
attributesArray.push(attributeSymbol);
+ if (attributeDecl.name.text === jsxChildrenPropertyName) {
+ explicitlySpecifyChildrenAttribute = true;
+ }
}
else {
ts.Debug.assert(attributeDecl.kind === 255);
@@ -31256,37 +32621,37 @@ var ts;
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;
+ hasSpreadAnyType = true;
+ }
+ if (isValidSpreadType(exprType)) {
+ spread = getSpreadType(spread, exprType);
+ }
+ else {
+ typeToIntersect = typeToIntersect ? getIntersectionType([typeToIntersect, exprType]) : exprType;
}
- spread = getSpreadType(spread, exprType);
}
}
- if (spread !== emptyObjectType) {
- if (attributesArray.length > 0) {
- spread = getSpreadType(spread, createJsxAttributesType(attributes.symbol, attributesTable));
- attributesArray = [];
- attributesTable = ts.createMap();
+ if (!hasSpreadAnyType) {
+ if (spread !== emptyObjectType) {
+ if (attributesArray.length > 0) {
+ spread = getSpreadType(spread, createJsxAttributesType(attributes.symbol, attributesTable));
+ }
+ attributesArray = getPropertiesOfType(spread);
}
- attributesArray = getPropertiesOfType(spread);
- }
- attributesTable = ts.createMap();
- if (attributesArray) {
- ts.forEach(attributesArray, function (attr) {
+ attributesTable = ts.createMap();
+ for (var _b = 0, attributesArray_1 = attributesArray; _b < attributesArray_1.length; _b++) {
+ var attr = attributesArray_1[_b];
if (!filter || filter(attr)) {
attributesTable.set(attr.name, attr);
}
- });
+ }
}
var parent = openingLikeElement.parent.kind === 249 ? openingLikeElement.parent : undefined;
if (parent && parent.openingElement === openingLikeElement && parent.children.length > 0) {
var childrenTypes = [];
- for (var _b = 0, _c = parent.children; _b < _c.length; _b++) {
- var child = _c[_b];
+ for (var _c = 0, _d = parent.children; _c < _d.length; _c++) {
+ var child = _d[_c];
if (child.kind === 10) {
if (!child.containsOnlyWhiteSpaces) {
childrenTypes.push(stringType);
@@ -31296,9 +32661,8 @@ var ts;
childrenTypes.push(checkExpression(child, checkMode));
}
}
- var jsxChildrenPropertyName = getJsxElementChildrenPropertyname();
- if (jsxChildrenPropertyName && jsxChildrenPropertyName !== "") {
- if (attributesTable.has(jsxChildrenPropertyName)) {
+ if (!hasSpreadAnyType && jsxChildrenPropertyName && jsxChildrenPropertyName !== "") {
+ if (explicitlySpecifyChildrenAttribute) {
error(attributes, ts.Diagnostics._0_are_specified_twice_The_attribute_named_0_will_be_overwritten, jsxChildrenPropertyName);
}
var childrenPropSymbol = createSymbol(4 | 134217728, jsxChildrenPropertyName);
@@ -31308,11 +32672,15 @@ var ts;
attributesTable.set(jsxChildrenPropertyName, childrenPropSymbol);
}
}
- return createJsxAttributesType(attributes.symbol, attributesTable);
+ if (hasSpreadAnyType) {
+ return anyType;
+ }
+ var attributeType = createJsxAttributesType(attributes.symbol, attributesTable);
+ return typeToIntersect && attributesTable.size ? getIntersectionType([typeToIntersect, attributeType]) :
+ typeToIntersect ? typeToIntersect : attributeType;
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.flags |= 33554432 | 4194304;
result.objectFlags |= 128;
return result;
}
@@ -31367,7 +32735,18 @@ var ts;
return unknownType;
}
}
- return getUnionType(ts.map(signatures, getReturnTypeOfSignature), true);
+ var instantiatedSignatures = [];
+ for (var _i = 0, signatures_3 = signatures; _i < signatures_3.length; _i++) {
+ var signature = signatures_3[_i];
+ if (signature.typeParameters) {
+ var typeArguments = fillMissingTypeArguments(undefined, signature.typeParameters, 0);
+ instantiatedSignatures.push(getSignatureInstantiation(signature, typeArguments));
+ }
+ else {
+ instantiatedSignatures.push(signature);
+ }
+ }
+ return getUnionType(ts.map(instantiatedSignatures, getReturnTypeOfSignature), true);
}
function getNameFromJsxElementAttributesContainer(nameOfAttribPropContainer) {
var jsxNamespace = getGlobalSymbol(JsxNames.JSX, 1920, undefined);
@@ -31401,6 +32780,20 @@ var ts;
}
return _jsxElementChildrenPropertyName;
}
+ function getApparentTypeOfJsxPropsType(propsType) {
+ if (!propsType) {
+ return undefined;
+ }
+ if (propsType.flags & 131072) {
+ var propsApparentType = [];
+ for (var _i = 0, _a = propsType.types; _i < _a.length; _i++) {
+ var t = _a[_i];
+ propsApparentType.push(getApparentType(t));
+ }
+ return getIntersectionType(propsApparentType);
+ }
+ return getApparentType(propsType);
+ }
function defaultTryGetJsxStatelessFunctionAttributesType(openingLikeElement, elementType, elemInstanceType, elementClassType) {
ts.Debug.assert(!(elementType.flags & 65536));
if (!elementClassType || !isTypeAssignableTo(elemInstanceType, elementClassType)) {
@@ -31410,6 +32803,7 @@ var ts;
if (callSignature !== unknownSignature) {
var callReturnType = callSignature && getReturnTypeOfSignature(callSignature);
var paramType = callReturnType && (callSignature.parameters.length === 0 ? emptyObjectType : getTypeOfSymbol(callSignature.parameters[0]));
+ paramType = getApparentTypeOfJsxPropsType(paramType);
if (callReturnType && isTypeAssignableTo(callReturnType, jsxStatelessElementType)) {
var intrinsicAttributes = getJsxType(JsxNames.IntrinsicAttributes);
if (intrinsicAttributes !== unknownType) {
@@ -31435,6 +32829,7 @@ var ts;
var candidate = candidatesOutArray_1[_i];
var callReturnType = getReturnTypeOfSignature(candidate);
var paramType = callReturnType && (candidate.parameters.length === 0 ? emptyObjectType : getTypeOfSymbol(candidate.parameters[0]));
+ paramType = getApparentTypeOfJsxPropsType(paramType);
if (callReturnType && isTypeAssignableTo(callReturnType, jsxStatelessElementType)) {
var shouldBeCandidate = true;
for (var _a = 0, _b = openingLikeElement.attributes.properties; _a < _b.length; _a++) {
@@ -31480,7 +32875,7 @@ var ts;
else if (elementType.flags & 32) {
var intrinsicElementsType = getJsxType(JsxNames.IntrinsicElements);
if (intrinsicElementsType !== unknownType) {
- var stringLiteralTypeName = elementType.text;
+ var stringLiteralTypeName = elementType.value;
var intrinsicProp = getPropertyOfType(intrinsicElementsType, stringLiteralTypeName);
if (intrinsicProp) {
return getTypeOfSymbol(intrinsicProp);
@@ -31627,7 +33022,7 @@ var ts;
function checkJsxOpeningLikeElement(node) {
checkGrammarJsxElement(node);
checkJsxPreconditions(node);
- var reactRefErr = compilerOptions.jsx === 2 ? ts.Diagnostics.Cannot_find_name_0 : undefined;
+ var reactRefErr = diagnostics && compilerOptions.jsx === 2 ? ts.Diagnostics.Cannot_find_name_0 : undefined;
var reactNamespace = getJsxNamespace();
var reactSym = resolveName(node.tagName, reactNamespace, 107455, reactRefErr, reactNamespace);
if (reactSym) {
@@ -31638,6 +33033,26 @@ var ts;
}
checkJsxAttributesAssignableToTagNameAttributes(node);
}
+ function isKnownProperty(targetType, name, isComparingJsxAttributes) {
+ if (targetType.flags & 32768) {
+ var resolved = resolveStructuredTypeMembers(targetType);
+ if (resolved.stringIndexInfo ||
+ resolved.numberIndexInfo && isNumericLiteralName(name) ||
+ getPropertyOfObjectType(targetType, name) ||
+ isComparingJsxAttributes && !isUnhyphenatedJsxName(name)) {
+ return true;
+ }
+ }
+ else if (targetType.flags & 196608) {
+ for (var _i = 0, _a = targetType.types; _i < _a.length; _i++) {
+ var t = _a[_i];
+ if (isKnownProperty(t, name, isComparingJsxAttributes)) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
function checkJsxAttributesAssignableToTagNameAttributes(openingLikeElement) {
var targetAttributesType = isJsxIntrinsicIdentifier(openingLikeElement.tagName) ?
getIntrinsicAttributesTypeFromJsxOpeningLikeElement(openingLikeElement) :
@@ -31649,7 +33064,16 @@ var ts;
error(openingLikeElement, ts.Diagnostics.JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property, getJsxElementPropertiesName());
}
else {
- checkTypeAssignableTo(sourceAttributesType, targetAttributesType, openingLikeElement.attributes.properties.length > 0 ? openingLikeElement.attributes : openingLikeElement);
+ var isSourceAttributeTypeAssignableToTarget = checkTypeAssignableTo(sourceAttributesType, targetAttributesType, openingLikeElement.attributes.properties.length > 0 ? openingLikeElement.attributes : openingLikeElement);
+ if (isSourceAttributeTypeAssignableToTarget && !isTypeAny(sourceAttributesType) && !isTypeAny(targetAttributesType)) {
+ for (var _i = 0, _a = openingLikeElement.attributes.properties; _i < _a.length; _i++) {
+ var attribute = _a[_i];
+ if (ts.isJsxAttribute(attribute) && !isKnownProperty(targetAttributesType, attribute.name.text, true)) {
+ error(attribute, ts.Diagnostics.Property_0_does_not_exist_on_type_1, attribute.name.text, typeToString(targetAttributesType));
+ break;
+ }
+ }
+ }
}
}
function checkJsxExpression(node, checkMode) {
@@ -31667,36 +33091,18 @@ var ts;
function getDeclarationKindFromSymbol(s) {
return s.valueDeclaration ? s.valueDeclaration.kind : 149;
}
- function getDeclarationModifierFlagsFromSymbol(s) {
- 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 isMethodLike(symbol) {
- return !!(symbol.flags & 8192 || getCheckFlags(symbol) & 4);
+ return !!(symbol.flags & 8192 || ts.getCheckFlags(symbol) & 4);
}
function checkPropertyAccessibility(node, left, type, prop) {
- var flags = getDeclarationModifierFlagsFromSymbol(prop);
+ var flags = ts.getDeclarationModifierFlagsFromSymbol(prop);
var errorNode = node.kind === 179 || node.kind === 226 ?
node.name :
node.right;
- if (getCheckFlags(prop) & 256) {
+ if (ts.getCheckFlags(prop) & 256) {
error(errorNode, ts.Diagnostics.Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1, symbolToString(prop), typeToString(type));
return false;
}
@@ -31771,42 +33177,6 @@ var ts;
function checkQualifiedName(node) {
return checkPropertyAccessExpressionOrQualifiedName(node, node.left, node.right);
}
- function reportNonexistentProperty(propNode, containingType) {
- var errorInfo;
- if (containingType.flags & 65536 && !(containingType.flags & 8190)) {
- for (var _i = 0, _a = containingType.types; _i < _a.length; _i++) {
- var subtype = _a[_i];
- if (!getPropertyOfType(subtype, propNode.text)) {
- errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.Property_0_does_not_exist_on_type_1, ts.declarationNameToString(propNode), typeToString(subtype));
- break;
- }
- }
- }
- errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.Property_0_does_not_exist_on_type_1, ts.declarationNameToString(propNode), typeToString(containingType));
- diagnostics.add(ts.createDiagnosticForNodeFromMessageChain(propNode, errorInfo));
- }
- function markPropertyAsReferenced(prop) {
- if (prop &&
- noUnusedIdentifiers &&
- (prop.flags & 106500) &&
- prop.valueDeclaration && (ts.getModifierFlags(prop.valueDeclaration) & 8)) {
- if (getCheckFlags(prop) & 1) {
- getSymbolLinks(prop).target.isReferenced = true;
- }
- else {
- prop.isReferenced = true;
- }
- }
- }
- function isInPropertyInitializer(node) {
- while (node) {
- if (node.parent && node.parent.kind === 149 && 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) {
@@ -31842,7 +33212,7 @@ var ts;
markPropertyAsReferenced(prop);
getNodeLinks(node).resolvedSymbol = prop;
checkPropertyAccessibility(node, left, apparentType, prop);
- var propType = getTypeOfSymbol(prop);
+ var propType = getDeclaredOrApparentType(prop, node);
var assignmentKind = ts.getAssignmentTargetKind(node);
if (assignmentKind) {
if (isReferenceToReadonlyEntity(node, prop) || isReferenceThroughNamespaceImport(node)) {
@@ -31858,16 +33228,133 @@ var ts;
var flowType = getFlowTypeOfReference(node, propType);
return assignmentKind ? getBaseTypeOfLiteralType(flowType) : flowType;
}
+ function reportNonexistentProperty(propNode, containingType) {
+ var errorInfo;
+ if (containingType.flags & 65536 && !(containingType.flags & 8190)) {
+ for (var _i = 0, _a = containingType.types; _i < _a.length; _i++) {
+ var subtype = _a[_i];
+ if (!getPropertyOfType(subtype, propNode.text)) {
+ errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.Property_0_does_not_exist_on_type_1, ts.declarationNameToString(propNode), typeToString(subtype));
+ break;
+ }
+ }
+ }
+ var suggestion = getSuggestionForNonexistentProperty(propNode, containingType);
+ if (suggestion) {
+ errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2, ts.declarationNameToString(propNode), typeToString(containingType), suggestion);
+ }
+ else {
+ errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.Property_0_does_not_exist_on_type_1, ts.declarationNameToString(propNode), typeToString(containingType));
+ }
+ diagnostics.add(ts.createDiagnosticForNodeFromMessageChain(propNode, errorInfo));
+ }
+ function getSuggestionForNonexistentProperty(node, containingType) {
+ var suggestion = getSpellingSuggestionForName(node.text, getPropertiesOfObjectType(containingType), 107455);
+ return suggestion && suggestion.name;
+ }
+ function getSuggestionForNonexistentSymbol(location, name, meaning) {
+ var result = resolveNameHelper(location, name, meaning, undefined, name, function (symbols, name, meaning) {
+ var symbol = getSymbol(symbols, name, meaning);
+ if (symbol) {
+ return symbol;
+ }
+ return getSpellingSuggestionForName(name, ts.arrayFrom(symbols.values()), meaning);
+ });
+ if (result) {
+ return result.name;
+ }
+ }
+ function getSpellingSuggestionForName(name, symbols, meaning) {
+ var worstDistance = name.length * 0.4;
+ var maximumLengthDifference = Math.min(3, name.length * 0.34);
+ var bestDistance = Number.MAX_VALUE;
+ var bestCandidate = undefined;
+ var justCheckExactMatches = false;
+ if (name.length > 30) {
+ return undefined;
+ }
+ name = name.toLowerCase();
+ for (var _i = 0, symbols_3 = symbols; _i < symbols_3.length; _i++) {
+ var candidate = symbols_3[_i];
+ if (candidate.flags & meaning &&
+ candidate.name &&
+ Math.abs(candidate.name.length - name.length) < maximumLengthDifference) {
+ var candidateName = candidate.name.toLowerCase();
+ if (candidateName === name) {
+ return candidate;
+ }
+ if (justCheckExactMatches) {
+ continue;
+ }
+ if (candidateName.length < 3 ||
+ name.length < 3 ||
+ candidateName === "eval" ||
+ candidateName === "intl" ||
+ candidateName === "undefined" ||
+ candidateName === "map" ||
+ candidateName === "nan" ||
+ candidateName === "set") {
+ continue;
+ }
+ var distance = ts.levenshtein(name, candidateName);
+ if (distance > worstDistance) {
+ continue;
+ }
+ if (distance < 3) {
+ justCheckExactMatches = true;
+ bestCandidate = candidate;
+ }
+ else if (distance < bestDistance) {
+ bestDistance = distance;
+ bestCandidate = candidate;
+ }
+ }
+ }
+ return bestCandidate;
+ }
+ function markPropertyAsReferenced(prop) {
+ if (prop &&
+ noUnusedIdentifiers &&
+ (prop.flags & 106500) &&
+ prop.valueDeclaration && (ts.getModifierFlags(prop.valueDeclaration) & 8)) {
+ if (ts.getCheckFlags(prop) & 1) {
+ getSymbolLinks(prop).target.isReferenced = true;
+ }
+ else {
+ prop.isReferenced = true;
+ }
+ }
+ }
+ function isInPropertyInitializer(node) {
+ while (node) {
+ if (node.parent && node.parent.kind === 149 && node.parent.initializer === node) {
+ return true;
+ }
+ node = node.parent;
+ }
+ return false;
+ }
function isValidPropertyAccess(node, propertyName) {
var left = node.kind === 179
? node.expression
: node.left;
- var type = checkExpression(left);
+ return isValidPropertyAccessWithType(node, left, propertyName, getWidenedType(checkExpression(left)));
+ }
+ function isValidPropertyAccessWithType(node, left, propertyName, type) {
if (type !== unknownType && !isTypeAny(type)) {
- var prop = getPropertyOfType(getWidenedType(type), propertyName);
+ var prop = getPropertyOfType(type, propertyName);
if (prop) {
return checkPropertyAccessibility(node, left, type, prop);
}
+ if (ts.isInJavaScriptFile(left) && (type.flags & 65536)) {
+ for (var _i = 0, _a = type.types; _i < _a.length; _i++) {
+ var elementType = _a[_i];
+ if (isValidPropertyAccessWithType(node, left, propertyName, elementType)) {
+ return true;
+ }
+ }
+ }
+ return false;
}
return true;
}
@@ -31965,7 +33452,13 @@ var ts;
}
return true;
}
+ function callLikeExpressionMayHaveTypeArguments(node) {
+ return ts.isCallOrNewExpression(node);
+ }
function resolveUntypedCall(node) {
+ if (callLikeExpressionMayHaveTypeArguments(node)) {
+ ts.forEach(node.typeArguments, checkSourceElement);
+ }
if (node.kind === 183) {
checkExpression(node.template);
}
@@ -31988,8 +33481,8 @@ var ts;
var specializedIndex = -1;
var spliceIndex;
ts.Debug.assert(!result.length);
- for (var _i = 0, signatures_3 = signatures; _i < signatures_3.length; _i++) {
- var signature = signatures_3[_i];
+ for (var _i = 0, signatures_4 = signatures; _i < signatures_4.length; _i++) {
+ var signature = signatures_4[_i];
var symbol = signature.declaration && getSymbolOfNode(signature.declaration);
var parent = signature.declaration && signature.declaration.parent;
if (!lastSymbol || symbol === lastSymbol) {
@@ -32076,7 +33569,7 @@ var ts;
return false;
}
if (spreadArgIndex >= 0) {
- return isRestParameterIndex(signature, spreadArgIndex);
+ return isRestParameterIndex(signature, spreadArgIndex) || spreadArgIndex >= signature.minArgumentCount;
}
if (!signature.hasRestParameter && argCount > signature.parameters.length) {
return false;
@@ -32095,28 +33588,39 @@ var ts;
return undefined;
}
function instantiateSignatureInContextOf(signature, contextualSignature, contextualMapper) {
- var context = createInferenceContext(signature, true, false);
+ var context = createInferenceContext(signature, 1);
forEachMatchingParameterType(contextualSignature, signature, function (source, target) {
- inferTypesWithContext(context, instantiateType(source, contextualMapper), target);
+ inferTypes(context.inferences, instantiateType(source, contextualMapper || identityMapper), target);
});
+ if (!contextualMapper) {
+ inferTypes(context.inferences, getReturnTypeOfSignature(contextualSignature), getReturnTypeOfSignature(signature), 4);
+ }
return getSignatureInstantiation(signature, getInferredTypes(context));
}
function inferTypeArguments(node, signature, args, excludeArgument, context) {
- var typeParameters = signature.typeParameters;
- var inferenceMapper = getInferenceMapper(context);
- for (var i = 0; i < typeParameters.length; i++) {
- if (!context.inferences[i].isFixed) {
- context.inferredTypes[i] = undefined;
+ var inferences = context.inferences;
+ for (var i = 0; i < inferences.length; i++) {
+ if (!inferences[i].isFixed) {
+ inferences[i].inferredType = undefined;
}
}
- if (context.failedTypeParameterIndex !== undefined && !context.inferences[context.failedTypeParameterIndex].isFixed) {
- context.failedTypeParameterIndex = undefined;
+ if (ts.isExpression(node)) {
+ var contextualType = getContextualType(node);
+ if (contextualType) {
+ var instantiatedType = instantiateType(contextualType, cloneTypeMapper(getContextualMapper(node)));
+ var contextualSignature = getSingleCallSignature(instantiatedType);
+ var inferenceSourceType = contextualSignature && contextualSignature.typeParameters ?
+ getOrCreateTypeFromSignature(getSignatureInstantiation(contextualSignature, contextualSignature.typeParameters)) :
+ instantiatedType;
+ var inferenceTargetType = getReturnTypeOfSignature(signature);
+ inferTypes(context.inferences, inferenceSourceType, inferenceTargetType, 4);
+ }
}
var thisType = getThisTypeOfSignature(signature);
if (thisType) {
var thisArgumentNode = getThisArgumentOfCall(node);
var thisArgumentType = thisArgumentNode ? checkExpression(thisArgumentNode) : voidType;
- inferTypesWithContext(context, thisArgumentType, thisType);
+ inferTypes(context.inferences, thisArgumentType, thisType);
}
var argCount = getEffectiveArgumentCount(node, args, signature);
for (var i = 0; i < argCount; i++) {
@@ -32125,10 +33629,10 @@ var ts;
var paramType = getTypeAtPosition(signature, i);
var argType = getEffectiveArgumentType(node, i);
if (argType === undefined) {
- var mapper = excludeArgument && excludeArgument[i] !== undefined ? identityMapper : inferenceMapper;
+ var mapper = excludeArgument && excludeArgument[i] !== undefined ? identityMapper : context;
argType = checkExpressionWithContextualType(arg, paramType, mapper);
}
- inferTypesWithContext(context, argType, paramType);
+ inferTypes(context.inferences, argType, paramType);
}
}
if (excludeArgument) {
@@ -32136,11 +33640,11 @@ var ts;
if (excludeArgument[i] === false) {
var arg = args[i];
var paramType = getTypeAtPosition(signature, i);
- inferTypesWithContext(context, checkExpressionWithContextualType(arg, paramType, inferenceMapper), paramType);
+ inferTypes(context.inferences, checkExpressionWithContextualType(arg, paramType, context), paramType);
}
}
}
- getInferredTypes(context);
+ return getInferredTypes(context);
}
function checkTypeArguments(signature, typeArgumentNodes, typeArgumentTypes, reportErrors, headMessage) {
var typeParameters = signature.typeParameters;
@@ -32312,7 +33816,7 @@ var ts;
case 71:
case 8:
case 9:
- return getLiteralTypeForText(32, element.name.text);
+ return getLiteralType(element.name.text);
case 144:
var nameType = checkComputedPropertyName(element.name);
if (isTypeOfKind(nameType, 512)) {
@@ -32390,7 +33894,7 @@ var ts;
return arg;
}
}
- function resolveCall(node, signatures, candidatesOutArray, headMessage) {
+ function resolveCall(node, signatures, candidatesOutArray, fallbackError) {
var isTaggedTemplate = node.kind === 183;
var isDecorator = node.kind === 147;
var isJsxOpeningOrSelfClosingElement = ts.isJsxOpeningLikeElement(node);
@@ -32401,24 +33905,10 @@ var ts;
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) {
- reportError(ts.Diagnostics.Supplied_parameters_do_not_match_any_signature_of_call_target);
+ diagnostics.add(ts.createDiagnosticForNode(node, ts.Diagnostics.Call_target_does_not_contain_any_signatures));
return resolveErrorCall(node);
}
var args = getEffectiveCallArguments(node);
@@ -32435,16 +33925,12 @@ var ts;
}
var candidateForArgumentError;
var candidateForTypeArgumentError;
- var resultOfFailedInference;
var result;
var signatureHelpTrailingComma = candidatesOutArray && node.kind === 181 && node.arguments.hasTrailingComma;
if (candidates.length > 1) {
result = chooseOverload(candidates, subtypeRelation, signatureHelpTrailingComma);
}
if (!result) {
- candidateForArgumentError = undefined;
- candidateForTypeArgumentError = undefined;
- resultOfFailedInference = undefined;
result = chooseOverload(candidates, assignableRelation, signatureHelpTrailingComma);
}
if (result) {
@@ -32457,27 +33943,46 @@ var ts;
checkApplicableSignature(node, args, candidateForArgumentError, assignableRelation, undefined, true);
}
else if (candidateForTypeArgumentError) {
- if (!isTaggedTemplate && !isDecorator && typeArguments) {
- var typeArguments_2 = node.typeArguments;
- checkTypeArguments(candidateForTypeArgumentError, typeArguments_2, ts.map(typeArguments_2, getTypeFromTypeNode), true, headMessage);
- }
- else {
- ts.Debug.assert(resultOfFailedInference.failedTypeParameterIndex >= 0);
- var failedTypeParameter = candidateForTypeArgumentError.typeParameters[resultOfFailedInference.failedTypeParameterIndex];
- var inferenceCandidates = getInferenceCandidates(resultOfFailedInference, resultOfFailedInference.failedTypeParameterIndex);
- var diagnosticChainHead = ts.chainDiagnosticMessages(undefined, ts.Diagnostics.The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_type_arguments_explicitly, typeToString(failedTypeParameter));
- if (headMessage) {
- diagnosticChainHead = ts.chainDiagnosticMessages(diagnosticChainHead, headMessage);
- }
- reportNoCommonSupertypeError(inferenceCandidates, node.tagName || node.expression || node.tag, diagnosticChainHead);
- }
- }
- else {
- reportError(ts.Diagnostics.Supplied_parameters_do_not_match_any_signature_of_call_target);
+ var typeArguments_1 = node.typeArguments;
+ checkTypeArguments(candidateForTypeArgumentError, typeArguments_1, ts.map(typeArguments_1, getTypeFromTypeNode), true, fallbackError);
+ }
+ else if (typeArguments && ts.every(signatures, function (sig) { return ts.length(sig.typeParameters) !== typeArguments.length; })) {
+ var min = Number.POSITIVE_INFINITY;
+ var max = Number.NEGATIVE_INFINITY;
+ for (var _i = 0, signatures_5 = signatures; _i < signatures_5.length; _i++) {
+ var sig = signatures_5[_i];
+ min = Math.min(min, getMinTypeArgumentCount(sig.typeParameters));
+ max = Math.max(max, ts.length(sig.typeParameters));
+ }
+ var paramCount = min < max ? min + "-" + max : min;
+ diagnostics.add(ts.createDiagnosticForNode(node, ts.Diagnostics.Expected_0_type_arguments_but_got_1, paramCount, typeArguments.length));
+ }
+ else if (args) {
+ var min = Number.POSITIVE_INFINITY;
+ var max = Number.NEGATIVE_INFINITY;
+ for (var _a = 0, signatures_6 = signatures; _a < signatures_6.length; _a++) {
+ var sig = signatures_6[_a];
+ min = Math.min(min, sig.minArgumentCount);
+ max = Math.max(max, sig.parameters.length);
+ }
+ var hasRestParameter_1 = ts.some(signatures, function (sig) { return sig.hasRestParameter; });
+ var hasSpreadArgument = getSpreadArgumentIndex(args) > -1;
+ var paramCount = hasRestParameter_1 ? min :
+ min < max ? min + "-" + max :
+ min;
+ var argCount = args.length - (hasSpreadArgument ? 1 : 0);
+ var error_1 = hasRestParameter_1 && hasSpreadArgument ? ts.Diagnostics.Expected_at_least_0_arguments_but_got_a_minimum_of_1 :
+ hasRestParameter_1 ? ts.Diagnostics.Expected_at_least_0_arguments_but_got_1 :
+ hasSpreadArgument ? ts.Diagnostics.Expected_0_arguments_but_got_a_minimum_of_1 :
+ ts.Diagnostics.Expected_0_arguments_but_got_1;
+ diagnostics.add(ts.createDiagnosticForNode(node, error_1, paramCount, argCount));
+ }
+ else if (fallbackError) {
+ diagnostics.add(ts.createDiagnosticForNode(node, fallbackError));
}
if (!produceDiagnostics) {
- for (var _i = 0, candidates_1 = candidates; _i < candidates_1.length; _i++) {
- var candidate = candidates_1[_i];
+ for (var _b = 0, candidates_1 = candidates; _b < candidates_1.length; _b++) {
+ var candidate = candidates_1[_b];
if (hasCorrectArity(node, args, candidate)) {
if (candidate.typeParameters && typeArguments) {
candidate = getSignatureInstantiation(candidate, ts.map(typeArguments, getTypeFromTypeNode));
@@ -32487,45 +33992,37 @@ var ts;
}
}
return resolveErrorCall(node);
- function reportError(message, arg0, arg1, arg2) {
- var errorInfo;
- errorInfo = ts.chainDiagnosticMessages(errorInfo, message, arg0, arg1, arg2);
- if (headMessage) {
- errorInfo = ts.chainDiagnosticMessages(errorInfo, headMessage);
- }
- diagnostics.add(ts.createDiagnosticForNodeFromMessageChain(node, errorInfo));
- }
function chooseOverload(candidates, relation, signatureHelpTrailingComma) {
if (signatureHelpTrailingComma === void 0) { signatureHelpTrailingComma = false; }
+ candidateForArgumentError = undefined;
+ candidateForTypeArgumentError = undefined;
for (var _i = 0, candidates_2 = candidates; _i < candidates_2.length; _i++) {
var originalCandidate = candidates_2[_i];
if (!hasCorrectArity(node, args, originalCandidate, signatureHelpTrailingComma)) {
continue;
}
var candidate = void 0;
- var typeArgumentsAreValid = void 0;
- var inferenceContext = originalCandidate.typeParameters
- ? createInferenceContext(originalCandidate, false, ts.isInJavaScriptFile(node))
- : undefined;
+ var inferenceContext = originalCandidate.typeParameters ?
+ createInferenceContext(originalCandidate, ts.isInJavaScriptFile(node) ? 4 : 0) :
+ undefined;
while (true) {
candidate = originalCandidate;
if (candidate.typeParameters) {
var typeArgumentTypes = void 0;
if (typeArguments) {
typeArgumentTypes = fillMissingTypeArguments(ts.map(typeArguments, getTypeFromTypeNode), candidate.typeParameters, getMinTypeArgumentCount(candidate.typeParameters));
- typeArgumentsAreValid = checkTypeArguments(candidate, typeArguments, typeArgumentTypes, false);
+ if (!checkTypeArguments(candidate, typeArguments, typeArgumentTypes, false)) {
+ candidateForTypeArgumentError = originalCandidate;
+ break;
+ }
}
else {
- inferTypeArguments(node, candidate, args, excludeArgument, inferenceContext);
- typeArgumentTypes = inferenceContext.inferredTypes;
- typeArgumentsAreValid = inferenceContext.failedTypeParameterIndex === undefined;
- }
- if (!typeArgumentsAreValid) {
- break;
+ typeArgumentTypes = inferTypeArguments(node, candidate, args, excludeArgument, inferenceContext);
}
candidate = getSignatureInstantiation(candidate, typeArgumentTypes);
}
if (!checkApplicableSignature(node, args, candidate, relation, excludeArgument, false)) {
+ candidateForArgumentError = candidate;
break;
}
var index = excludeArgument ? ts.indexOf(excludeArgument, true) : -1;
@@ -32534,22 +34031,6 @@ var ts;
}
excludeArgument[index] = false;
}
- if (originalCandidate.typeParameters) {
- var instantiatedCandidate = candidate;
- if (typeArgumentsAreValid) {
- candidateForArgumentError = instantiatedCandidate;
- }
- else {
- candidateForTypeArgumentError = originalCandidate;
- if (!typeArguments) {
- resultOfFailedInference = inferenceContext;
- }
- }
- }
- else {
- ts.Debug.assert(originalCandidate === candidate);
- candidateForArgumentError = originalCandidate;
- }
}
return undefined;
}
@@ -32625,7 +34106,7 @@ var ts;
}
var valueDecl = expressionType.symbol && getClassLikeDeclarationOfSymbol(expressionType.symbol);
if (valueDecl && ts.getModifierFlags(valueDecl) & 128) {
- error(node, ts.Diagnostics.Cannot_create_an_instance_of_the_abstract_class_0, ts.declarationNameToString(valueDecl.name));
+ error(node, ts.Diagnostics.Cannot_create_an_instance_of_the_abstract_class_0, ts.declarationNameToString(ts.getNameOfDeclaration(valueDecl)));
return resolveErrorCall(node);
}
if (isTypeAny(expressionType)) {
@@ -32644,7 +34125,7 @@ var ts;
var callSignatures = getSignaturesOfType(expressionType, 0);
if (callSignatures.length) {
var signature = resolveCall(node, callSignatures, candidatesOutArray);
- if (getReturnTypeOfSignature(signature) !== voidType) {
+ if (!isJavaScriptConstructor(signature.declaration) && getReturnTypeOfSignature(signature) !== voidType) {
error(node, ts.Diagnostics.Only_a_void_function_can_be_called_with_the_new_keyword);
}
if (getThisTypeOfSignature(signature) === voidType) {
@@ -32752,8 +34233,8 @@ var ts;
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];
+ for (var _i = 0, types_16 = types; _i < types_16.length; _i++) {
+ var type = types_16[_i];
result = result || resolveStatelessJsxOpeningLikeElement(openingLikeElement, type, candidatesOutArray);
}
return result;
@@ -32796,13 +34277,29 @@ var ts;
function getResolvedOrAnySignature(node) {
return getNodeLinks(node).resolvedSignature === resolvingSignature ? resolvingSignature : getResolvedSignature(node);
}
+ function isJavaScriptConstructor(node) {
+ if (ts.isInJavaScriptFile(node)) {
+ if (ts.getJSDocClassTag(node))
+ return true;
+ var symbol = ts.isFunctionDeclaration(node) || ts.isFunctionExpression(node) ? getSymbolOfNode(node) :
+ ts.isVariableDeclaration(node) && ts.isFunctionExpression(node.initializer) ? getSymbolOfNode(node.initializer) :
+ undefined;
+ return symbol && symbol.members !== undefined;
+ }
+ return false;
+ }
function getInferredClassType(symbol) {
var links = getSymbolLinks(symbol);
if (!links.inferredClassType) {
- links.inferredClassType = createAnonymousType(symbol, symbol.members, emptyArray, emptyArray, undefined, undefined);
+ links.inferredClassType = createAnonymousType(symbol, symbol.members || emptySymbols, emptyArray, emptyArray, undefined, undefined);
}
return links.inferredClassType;
}
+ function isInferredClassType(type) {
+ return type.symbol
+ && getObjectFlags(type) & 16
+ && getSymbolLinks(type.symbol).inferredClassType === type;
+ }
function checkCallExpression(node) {
checkGrammarTypeArguments(node, node.typeArguments) || checkGrammarArguments(node, node.arguments);
var signature = getResolvedSignature(node);
@@ -32822,7 +34319,7 @@ var ts;
if (funcSymbol && ts.isDeclarationOfFunctionOrClassExpression(funcSymbol)) {
funcSymbol = getSymbolOfNode(funcSymbol.valueDeclaration.initializer);
}
- if (funcSymbol && funcSymbol.members && funcSymbol.flags & 16) {
+ if (funcSymbol && funcSymbol.flags & 16 && (funcSymbol.members || ts.getJSDocClassTag(funcSymbol.valueDeclaration))) {
return getInferredClassType(funcSymbol);
}
else if (noImplicitAny) {
@@ -32836,6 +34333,28 @@ var ts;
}
return getReturnTypeOfSignature(signature);
}
+ function checkImportCallExpression(node) {
+ checkGrammarArguments(node, node.arguments) || checkGrammarImportCallExpression(node);
+ if (node.arguments.length === 0) {
+ return createPromiseReturnType(node, anyType);
+ }
+ var specifier = node.arguments[0];
+ var specifierType = checkExpressionCached(specifier);
+ for (var i = 1; i < node.arguments.length; ++i) {
+ checkExpressionCached(node.arguments[i]);
+ }
+ if (specifierType.flags & 2048 || specifierType.flags & 4096 || !isTypeAssignableTo(specifierType, stringType)) {
+ error(specifier, ts.Diagnostics.Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0, typeToString(specifierType));
+ }
+ var moduleSymbol = resolveExternalModuleName(node, specifier);
+ if (moduleSymbol) {
+ var esModuleSymbol = resolveESModuleSymbol(moduleSymbol, specifier, true);
+ if (esModuleSymbol) {
+ return createPromiseReturnType(node, getTypeOfSymbol(esModuleSymbol));
+ }
+ }
+ return createPromiseReturnType(node, anyType);
+ }
function isCommonJsRequire(node) {
if (!ts.isRequireCall(node, true)) {
return false;
@@ -32897,7 +34416,7 @@ var ts;
if (strictNullChecks) {
var declaration = symbol.valueDeclaration;
if (declaration && declaration.initializer) {
- return includeFalsyTypes(type, 2048);
+ return getNullableType(type, 2048);
}
}
return type;
@@ -32910,37 +34429,42 @@ var ts;
function getTypeOfFirstParameterOfSignature(signature) {
return signature.parameters.length > 0 ? getTypeAtPosition(signature, 0) : neverType;
}
- function assignContextualParameterTypes(signature, context, mapper, checkMode) {
+ function inferFromAnnotatedParameters(signature, context, mapper) {
var len = signature.parameters.length - (signature.hasRestParameter ? 1 : 0);
- if (checkMode === 2) {
- for (var i = 0; i < len; i++) {
- var declaration = signature.parameters[i].valueDeclaration;
- if (declaration.type) {
- inferTypesWithContext(mapper.context, getTypeFromTypeNode(declaration.type), getTypeAtPosition(context, i));
+ for (var i = 0; i < len; i++) {
+ var declaration = signature.parameters[i].valueDeclaration;
+ if (declaration.type) {
+ var typeNode = ts.getEffectiveTypeAnnotationNode(declaration);
+ if (typeNode) {
+ inferTypes(mapper.inferences, getTypeFromTypeNode(typeNode), getTypeAtPosition(context, i));
}
}
}
+ }
+ function assignContextualParameterTypes(signature, context) {
+ signature.typeParameters = context.typeParameters;
if (context.thisParameter) {
var parameter = signature.thisParameter;
if (!parameter || parameter.valueDeclaration && !parameter.valueDeclaration.type) {
if (!parameter) {
signature.thisParameter = createSymbolWithType(context.thisParameter, undefined);
}
- assignTypeToParameterAndFixTypeParameters(signature.thisParameter, getTypeOfSymbol(context.thisParameter), mapper, checkMode);
+ assignTypeToParameterAndFixTypeParameters(signature.thisParameter, getTypeOfSymbol(context.thisParameter));
}
}
+ var len = signature.parameters.length - (signature.hasRestParameter ? 1 : 0);
for (var i = 0; i < len; i++) {
var parameter = signature.parameters[i];
- if (!parameter.valueDeclaration.type) {
+ if (!ts.getEffectiveTypeAnnotationNode(parameter.valueDeclaration)) {
var contextualParameterType = getTypeAtPosition(context, i);
- assignTypeToParameterAndFixTypeParameters(parameter, contextualParameterType, mapper, checkMode);
+ assignTypeToParameterAndFixTypeParameters(parameter, contextualParameterType);
}
}
if (signature.hasRestParameter && isRestParameterIndex(context, signature.parameters.length - 1)) {
var parameter = ts.lastOrUndefined(signature.parameters);
- if (!parameter.valueDeclaration.type) {
+ if (!ts.getEffectiveTypeAnnotationNode(parameter.valueDeclaration)) {
var contextualParameterType = getTypeOfSymbol(ts.lastOrUndefined(context.parameters));
- assignTypeToParameterAndFixTypeParameters(parameter, contextualParameterType, mapper, checkMode);
+ assignTypeToParameterAndFixTypeParameters(parameter, contextualParameterType);
}
}
}
@@ -32957,27 +34481,17 @@ var ts;
}
}
}
- function assignTypeToParameterAndFixTypeParameters(parameter, contextualType, mapper, checkMode) {
+ function assignTypeToParameterAndFixTypeParameters(parameter, contextualType) {
var links = getSymbolLinks(parameter);
if (!links.type) {
- links.type = instantiateType(contextualType, mapper);
+ links.type = contextualType;
+ var name = ts.getNameOfDeclaration(parameter.valueDeclaration);
if (links.type === emptyObjectType &&
- (parameter.valueDeclaration.name.kind === 174 ||
- parameter.valueDeclaration.name.kind === 175)) {
- links.type = getTypeFromBindingPattern(parameter.valueDeclaration.name);
+ (name.kind === 174 || name.kind === 175)) {
+ links.type = getTypeFromBindingPattern(name);
}
assignBindingElementTypes(parameter.valueDeclaration);
}
- else if (checkMode === 2) {
- inferTypesWithContext(mapper.context, links.type, instantiateType(contextualType, mapper));
- }
- }
- function getReturnTypeFromJSDocComment(func) {
- var returnTag = ts.getJSDocReturnTag(func);
- if (returnTag && returnTag.typeExpression) {
- return getTypeFromTypeNode(returnTag.typeExpression.type);
- }
- return undefined;
}
function createPromiseType(promisedType) {
var globalPromiseType = getGlobalPromiseType(true);
@@ -32990,11 +34504,15 @@ var ts;
function createPromiseReturnType(func, promisedType) {
var promiseType = createPromiseType(promisedType);
if (promiseType === emptyObjectType) {
- 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);
+ error(func, ts.isImportCall(func) ?
+ ts.Diagnostics.A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option :
+ 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);
+ error(func, ts.isImportCall(func) ?
+ ts.Diagnostics.A_dynamic_import_call_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option :
+ 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;
}
@@ -33150,13 +34668,13 @@ var ts;
}
var hasExplicitReturn = func.flags & 256;
if (returnType && returnType.flags & 8192) {
- error(func.type, ts.Diagnostics.A_function_returning_never_cannot_have_a_reachable_end_point);
+ error(ts.getEffectiveReturnTypeNode(func), ts.Diagnostics.A_function_returning_never_cannot_have_a_reachable_end_point);
}
else if (returnType && !hasExplicitReturn) {
- error(func.type, ts.Diagnostics.A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value);
+ error(ts.getEffectiveReturnTypeNode(func), ts.Diagnostics.A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value);
}
else if (returnType && strictNullChecks && !isTypeAssignableTo(undefinedType, returnType)) {
- error(func.type, ts.Diagnostics.Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined);
+ error(ts.getEffectiveReturnTypeNode(func), ts.Diagnostics.Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined);
}
else if (compilerOptions.noImplicitReturns) {
if (!returnType) {
@@ -33168,7 +34686,7 @@ var ts;
return;
}
}
- error(func.type || func, ts.Diagnostics.Not_all_code_paths_return_a_value);
+ error(ts.getEffectiveReturnTypeNode(func) || func, ts.Diagnostics.Not_all_code_paths_return_a_value);
}
}
function checkFunctionExpressionOrObjectLiteralMethod(node, checkMode) {
@@ -33183,29 +34701,30 @@ var ts;
}
var links = getNodeLinks(node);
var type = getTypeOfSymbol(node.symbol);
- var contextSensitive = isContextSensitive(node);
- var mightFixTypeParameters = contextSensitive && checkMode === 2;
- if (mightFixTypeParameters || !(links.flags & 1024)) {
+ if (!(links.flags & 1024)) {
var contextualSignature = getContextualSignature(node);
- var contextChecked = !!(links.flags & 1024);
- if (mightFixTypeParameters || !contextChecked) {
+ if (!(links.flags & 1024)) {
links.flags |= 1024;
if (contextualSignature) {
var signature = getSignaturesOfType(type, 0)[0];
- if (contextSensitive) {
- assignContextualParameterTypes(signature, contextualSignature, getContextualMapper(node), checkMode);
+ if (isContextSensitive(node)) {
+ var contextualMapper = getContextualMapper(node);
+ if (checkMode === 2) {
+ inferFromAnnotatedParameters(signature, contextualSignature, contextualMapper);
+ }
+ var instantiatedContextualSignature = contextualMapper === identityMapper ?
+ contextualSignature : instantiateSignature(contextualSignature, contextualMapper);
+ assignContextualParameterTypes(signature, instantiatedContextualSignature);
}
- if (mightFixTypeParameters || !node.type && !signature.resolvedReturnType) {
+ if (!ts.getEffectiveReturnTypeNode(node) && !signature.resolvedReturnType) {
var returnType = getReturnTypeFromBody(node, checkMode);
if (!signature.resolvedReturnType) {
signature.resolvedReturnType = returnType;
}
}
}
- if (!contextChecked) {
- checkSignatureDeclaration(node);
- checkNodeDeferred(node);
- }
+ checkSignatureDeclaration(node);
+ checkNodeDeferred(node);
}
}
if (produceDiagnostics && node.kind !== 151) {
@@ -33218,15 +34737,16 @@ var ts;
function checkFunctionExpressionOrObjectLiteralMethodDeferred(node) {
ts.Debug.assert(node.kind !== 151 || ts.isObjectLiteralMethod(node));
var functionFlags = ts.getFunctionFlags(node);
- var returnOrPromisedType = node.type &&
+ var returnTypeNode = ts.getEffectiveReturnTypeNode(node);
+ var returnOrPromisedType = returnTypeNode &&
((functionFlags & 3) === 2 ?
checkAsyncFunctionReturnType(node) :
- getTypeFromTypeNode(node.type));
+ getTypeFromTypeNode(returnTypeNode));
if ((functionFlags & 1) === 0) {
checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnOrPromisedType);
}
if (node.body) {
- if (!node.type) {
+ if (!returnTypeNode) {
getReturnTypeOfSignature(getSignatureFromDeclaration(node));
}
if (node.body.kind === 207) {
@@ -33248,15 +34768,15 @@ var ts;
}
}
function checkArithmeticOperandType(operand, type, diagnostic) {
- if (!isTypeAnyOrAllConstituentTypesHaveKind(type, 340)) {
+ if (!isTypeAnyOrAllConstituentTypesHaveKind(type, 84)) {
error(operand, diagnostic);
return false;
}
return true;
}
function isReadonlySymbol(symbol) {
- return !!(getCheckFlags(symbol) & 8 ||
- symbol.flags & 4 && getDeclarationModifierFlagsFromSymbol(symbol) & 64 ||
+ return !!(ts.getCheckFlags(symbol) & 8 ||
+ symbol.flags & 4 && ts.getDeclarationModifierFlagsFromSymbol(symbol) & 64 ||
symbol.flags & 3 && getDeclarationNodeFlagsFromSymbol(symbol) & 2 ||
symbol.flags & 98304 && !(symbol.flags & 65536) ||
symbol.flags & 8);
@@ -33267,8 +34787,9 @@ var ts;
(expr.kind === 179 || expr.kind === 180) &&
expr.expression.kind === 99) {
var func = ts.getContainingFunction(expr);
- if (!(func && func.kind === 152))
+ if (!(func && func.kind === 152)) {
return true;
+ }
return !(func.parent === symbol.valueDeclaration.parent || func === symbol.valueDeclaration.parent);
}
return true;
@@ -33289,7 +34810,7 @@ var ts;
return false;
}
function checkReferenceExpression(expr, invalidReferenceMessage) {
- var node = ts.skipParentheses(expr);
+ var node = ts.skipOuterExpressions(expr, 2 | 1);
if (node.kind !== 71 && node.kind !== 179 && node.kind !== 180) {
error(expr, invalidReferenceMessage);
return false;
@@ -33336,7 +34857,7 @@ var ts;
return silentNeverType;
}
if (node.operator === 38 && node.operand.kind === 8) {
- return getFreshTypeOfLiteralType(getLiteralTypeForText(64, "" + -node.operand.text));
+ return getFreshTypeOfLiteralType(getLiteralType(-node.operand.text));
}
switch (node.operator) {
case 37:
@@ -33379,8 +34900,8 @@ var ts;
}
if (type.flags & 196608) {
var types = type.types;
- for (var _i = 0, types_19 = types; _i < types_19.length; _i++) {
- var t = types_19[_i];
+ for (var _i = 0, types_17 = types; _i < types_17.length; _i++) {
+ var t = types_17[_i];
if (maybeTypeOfKind(t, kind)) {
return true;
}
@@ -33394,8 +34915,8 @@ var ts;
}
if (type.flags & 65536) {
var types = type.types;
- for (var _i = 0, types_20 = types; _i < types_20.length; _i++) {
- var t = types_20[_i];
+ for (var _i = 0, types_18 = types; _i < types_18.length; _i++) {
+ var t = types_18[_i];
if (!isTypeOfKind(t, kind)) {
return false;
}
@@ -33404,8 +34925,8 @@ var ts;
}
if (type.flags & 131072) {
var types = type.types;
- for (var _a = 0, types_21 = types; _a < types_21.length; _a++) {
- var t = types_21[_a];
+ for (var _a = 0, types_19 = types; _a < types_19.length; _a++) {
+ var t = types_19[_a];
if (isTypeOfKind(t, kind)) {
return true;
}
@@ -33440,7 +34961,7 @@ var ts;
}
leftType = checkNonNullType(leftType, left);
rightType = checkNonNullType(rightType, right);
- if (!(isTypeComparableTo(leftType, stringType) || isTypeOfKind(leftType, 340 | 512))) {
+ if (!(isTypeComparableTo(leftType, stringType) || isTypeOfKind(leftType, 84 | 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 | 540672 | 16777216)) {
@@ -33712,7 +35233,7 @@ var ts;
rightType = checkNonNullType(rightType, right);
}
var resultType = void 0;
- if (isTypeOfKind(leftType, 340) && isTypeOfKind(rightType, 340)) {
+ if (isTypeOfKind(leftType, 84) && isTypeOfKind(rightType, 84)) {
resultType = numberType;
}
else {
@@ -33766,7 +35287,7 @@ var ts;
return checkInExpression(left, right, leftType, rightType);
case 53:
return getTypeFacts(leftType) & 1048576 ?
- includeFalsyTypes(rightType, getFalsyFlags(strictNullChecks ? leftType : getBaseTypeOfLiteralType(rightType))) :
+ getUnionType([extractDefinitelyFalsyTypes(strictNullChecks ? leftType : getBaseTypeOfLiteralType(rightType)), rightType]) :
leftType;
case 54:
return getTypeFacts(leftType) & 2097152 ?
@@ -33810,7 +35331,7 @@ var ts;
}
}
function checkAssignmentOperator(valueType) {
- if (produceDiagnostics && operator >= 58 && operator <= 70) {
+ if (produceDiagnostics && ts.isAssignmentOperator(operator)) {
if (checkReferenceExpression(left, ts.Diagnostics.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access)) {
checkTypeAssignableTo(valueType, leftType, left, undefined);
}
@@ -33848,12 +35369,12 @@ var ts;
var func = ts.getContainingFunction(node);
var functionFlags = func && ts.getFunctionFlags(func);
if (node.asteriskToken) {
- if (functionFlags & 2) {
- if (languageVersion < 4) {
- checkExternalEmitHelpers(node, 4096);
- }
+ if ((functionFlags & 3) === 3 &&
+ languageVersion < 5) {
+ checkExternalEmitHelpers(node, 26624);
}
- else if (languageVersion < 2 && compilerOptions.downlevelIteration) {
+ if ((functionFlags & 3) === 1 &&
+ languageVersion < 2 && compilerOptions.downlevelIteration) {
checkExternalEmitHelpers(node, 256);
}
}
@@ -33864,8 +35385,9 @@ var ts;
if (nodeIsYieldStar) {
expressionElementType = checkIteratedTypeOrElementType(expressionType, node.expression, false, (functionFlags & 2) !== 0);
}
- if (func.type) {
- var signatureElementType = getIteratedTypeOfGenerator(getTypeFromTypeNode(func.type), (functionFlags & 2) !== 0) || anyType;
+ var returnType = ts.getEffectiveReturnTypeNode(func);
+ if (returnType) {
+ var signatureElementType = getIteratedTypeOfGenerator(getTypeFromTypeNode(returnType), (functionFlags & 2) !== 0) || anyType;
if (nodeIsYieldStar) {
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)
@@ -33893,9 +35415,9 @@ var ts;
}
switch (node.kind) {
case 9:
- return getFreshTypeOfLiteralType(getLiteralTypeForText(32, node.text));
+ return getFreshTypeOfLiteralType(getLiteralType(node.text));
case 8:
- return getFreshTypeOfLiteralType(getLiteralTypeForText(64, node.text));
+ return getFreshTypeOfLiteralType(getLiteralType(+node.text));
case 101:
return trueType;
case 86:
@@ -33949,7 +35471,7 @@ var ts;
}
contextualType = constraint;
}
- return maybeTypeOfKind(contextualType, (480 | 262144));
+ return maybeTypeOfKind(contextualType, (224 | 262144));
}
return false;
}
@@ -33977,7 +35499,7 @@ var ts;
if (signature && signature.typeParameters) {
var contextualType = getApparentTypeOfContextualType(node);
if (contextualType) {
- var contextualSignature = getSingleCallSignature(contextualType);
+ var contextualSignature = getSingleCallSignature(getNonNullableType(contextualType));
if (contextualSignature && !contextualSignature.typeParameters) {
return getOrCreateTypeFromSignature(instantiateSignatureInContextOf(signature, contextualSignature, getContextualMapper(node)));
}
@@ -34052,6 +35574,9 @@ var ts;
case 180:
return checkIndexedAccess(node);
case 181:
+ if (node.expression.kind === 91) {
+ return checkImportCallExpression(node);
+ }
case 182:
return checkCallExpression(node);
case 183:
@@ -34246,17 +35771,14 @@ var ts;
checkGrammarFunctionLikeDeclaration(node);
}
var functionFlags = ts.getFunctionFlags(node);
- if ((functionFlags & 7) === 2 && languageVersion < 4) {
- checkExternalEmitHelpers(node, 64);
- if (languageVersion < 2) {
- checkExternalEmitHelpers(node, 128);
+ if (!(functionFlags & 4)) {
+ if ((functionFlags & 3) === 3 && languageVersion < 5) {
+ checkExternalEmitHelpers(node, 6144);
}
- }
- if ((functionFlags & 5) === 1) {
- if (functionFlags & 2 && languageVersion < 4) {
- checkExternalEmitHelpers(node, 2048);
+ if ((functionFlags & 3) === 2 && languageVersion < 4) {
+ checkExternalEmitHelpers(node, 64);
}
- else if (languageVersion < 2) {
+ if ((functionFlags & 3) !== 0 && languageVersion < 2) {
checkExternalEmitHelpers(node, 128);
}
}
@@ -34267,7 +35789,8 @@ var ts;
}
if (produceDiagnostics) {
checkCollisionWithArgumentsInGeneratedCode(node);
- if (noImplicitAny && !node.type) {
+ var returnTypeNode = ts.getEffectiveReturnTypeNode(node);
+ if (noImplicitAny && !returnTypeNode) {
switch (node.kind) {
case 156:
error(node, ts.Diagnostics.Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type);
@@ -34277,19 +35800,19 @@ var ts;
break;
}
}
- if (node.type) {
+ if (returnTypeNode) {
var functionFlags_1 = ts.getFunctionFlags(node);
- if ((functionFlags_1 & 5) === 1) {
- var returnType = getTypeFromTypeNode(node.type);
+ if ((functionFlags_1 & (4 | 1)) === 1) {
+ var returnType = getTypeFromTypeNode(returnTypeNode);
if (returnType === voidType) {
- error(node.type, ts.Diagnostics.A_generator_cannot_have_a_void_type_annotation);
+ error(returnTypeNode, ts.Diagnostics.A_generator_cannot_have_a_void_type_annotation);
}
else {
var generatorElementType = getIteratedTypeOfGenerator(returnType, (functionFlags_1 & 2) !== 0) || anyType;
var iterableIteratorInstantiation = functionFlags_1 & 2
? createAsyncIterableIteratorType(generatorElementType)
: createIterableIteratorType(generatorElementType);
- checkTypeAssignableTo(iterableIteratorInstantiation, returnType, node.type);
+ checkTypeAssignableTo(iterableIteratorInstantiation, returnType, returnTypeNode);
}
}
else if ((functionFlags_1 & 3) === 2) {
@@ -34393,7 +35916,7 @@ var ts;
continue;
}
if (names.get(memberName)) {
- error(member.symbol.valueDeclaration.name, ts.Diagnostics.Duplicate_identifier_0, memberName);
+ error(ts.getNameOfDeclaration(member.symbol.valueDeclaration), ts.Diagnostics.Duplicate_identifier_0, memberName);
error(member.name, ts.Diagnostics.Duplicate_identifier_0, memberName);
}
else {
@@ -34467,7 +35990,8 @@ var ts;
return;
}
function containsSuperCallAsComputedPropertyName(n) {
- return n.name && containsSuperCall(n.name);
+ var name = ts.getNameOfDeclaration(n);
+ return name && containsSuperCall(name);
}
function containsSuperCall(n) {
if (ts.isSuperCall(n)) {
@@ -34605,7 +36129,7 @@ var ts;
checkTypeArgumentConstraints(typeParameters, node.typeArguments);
}
}
- if (type.flags & 16 && !type.memberTypes && getNodeLinks(node).resolvedSymbol.flags & 8) {
+ if (type.flags & 16 && getNodeLinks(node).resolvedSymbol.flags & 8) {
error(node, ts.Diagnostics.Enum_type_0_has_members_with_initializers_that_are_not_literals, typeToString(type));
}
}
@@ -34644,7 +36168,7 @@ var ts;
if (isTypeAssignableTo(indexType, getIndexType(objectType))) {
return type;
}
- if (maybeTypeOfKind(objectType, 540672) && isTypeOfKind(indexType, 340)) {
+ if (maybeTypeOfKind(objectType, 540672) && isTypeOfKind(indexType, 84)) {
var constraint = getBaseConstraintOfType(objectType);
if (constraint && getIndexInfoOfType(constraint, 1)) {
return type;
@@ -34694,16 +36218,16 @@ var ts;
ts.forEach(overloads, function (o) {
var deviation = getEffectiveDeclarationFlags(o, flagsToCheck) ^ canonicalFlags_1;
if (deviation & 1) {
- error(o.name, ts.Diagnostics.Overload_signatures_must_all_be_exported_or_non_exported);
+ error(ts.getNameOfDeclaration(o), ts.Diagnostics.Overload_signatures_must_all_be_exported_or_non_exported);
}
else if (deviation & 2) {
- error(o.name, ts.Diagnostics.Overload_signatures_must_all_be_ambient_or_non_ambient);
+ error(ts.getNameOfDeclaration(o), ts.Diagnostics.Overload_signatures_must_all_be_ambient_or_non_ambient);
}
else if (deviation & (8 | 16)) {
- error(o.name || o, ts.Diagnostics.Overload_signatures_must_all_be_public_private_or_protected);
+ error(ts.getNameOfDeclaration(o) || o, ts.Diagnostics.Overload_signatures_must_all_be_public_private_or_protected);
}
else if (deviation & 128) {
- error(o.name, ts.Diagnostics.Overload_signatures_must_all_be_abstract_or_non_abstract);
+ error(ts.getNameOfDeclaration(o), ts.Diagnostics.Overload_signatures_must_all_be_abstract_or_non_abstract);
}
});
}
@@ -34714,7 +36238,7 @@ var ts;
ts.forEach(overloads, function (o) {
var deviation = ts.hasQuestionToken(o) !== canonicalHasQuestionToken_1;
if (deviation) {
- error(o.name, ts.Diagnostics.Overload_signatures_must_all_be_optional_or_required);
+ error(ts.getNameOfDeclaration(o), ts.Diagnostics.Overload_signatures_must_all_be_optional_or_required);
}
});
}
@@ -34822,7 +36346,7 @@ var ts;
}
if (duplicateFunctionDeclaration) {
ts.forEach(declarations, function (declaration) {
- error(declaration.name, ts.Diagnostics.Duplicate_function_implementation);
+ error(ts.getNameOfDeclaration(declaration), ts.Diagnostics.Duplicate_function_implementation);
});
}
if (lastSeenNonAmbientDeclaration && !lastSeenNonAmbientDeclaration.body &&
@@ -34835,8 +36359,8 @@ var ts;
if (bodyDeclaration) {
var signatures = getSignaturesOfSymbol(symbol);
var bodySignature = getSignatureFromDeclaration(bodyDeclaration);
- for (var _a = 0, signatures_4 = signatures; _a < signatures_4.length; _a++) {
- var signature = signatures_4[_a];
+ for (var _a = 0, signatures_7 = signatures; _a < signatures_7.length; _a++) {
+ var signature = signatures_7[_a];
if (!isImplementationCompatibleWithOverload(bodySignature, signature)) {
error(signature.declaration, ts.Diagnostics.Overload_signature_is_not_compatible_with_function_implementation);
break;
@@ -34885,11 +36409,12 @@ var ts;
for (var _b = 0, _c = symbol.declarations; _b < _c.length; _b++) {
var d = _c[_b];
var declarationSpaces = getDeclarationSpaces(d);
+ var name = ts.getNameOfDeclaration(d);
if (declarationSpaces & commonDeclarationSpacesForDefaultAndNonDefault) {
- error(d.name, ts.Diagnostics.Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead, ts.declarationNameToString(d.name));
+ error(name, ts.Diagnostics.Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead, ts.declarationNameToString(name));
}
else if (declarationSpaces & commonDeclarationSpacesForExportsAndLocals) {
- error(d.name, ts.Diagnostics.Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local, ts.declarationNameToString(d.name));
+ error(name, ts.Diagnostics.Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local, ts.declarationNameToString(name));
}
}
}
@@ -35002,44 +36527,45 @@ var ts;
return typeAsAwaitable.awaitedTypeOfType = type;
}
function checkAsyncFunctionReturnType(node) {
- var returnType = getTypeFromTypeNode(node.type);
+ var returnTypeNode = ts.getEffectiveReturnTypeNode(node);
+ var returnType = getTypeFromTypeNode(returnTypeNode);
if (languageVersion >= 2) {
if (returnType === unknownType) {
return unknownType;
}
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);
+ error(returnTypeNode, ts.Diagnostics.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type);
return unknownType;
}
}
else {
- markTypeNodeAsReferenced(node.type);
+ markTypeNodeAsReferenced(returnTypeNode);
if (returnType === unknownType) {
return unknownType;
}
- var promiseConstructorName = ts.getEntityNameFromTypeNode(node.type);
+ var promiseConstructorName = ts.getEntityNameFromTypeNode(returnTypeNode);
if (promiseConstructorName === undefined) {
- 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, typeToString(returnType));
+ error(returnTypeNode, 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, typeToString(returnType));
return unknownType;
}
var promiseConstructorSymbol = resolveEntityName(promiseConstructorName, 107455, true);
var promiseConstructorType = promiseConstructorSymbol ? getTypeOfSymbol(promiseConstructorSymbol) : unknownType;
if (promiseConstructorType === unknownType) {
if (promiseConstructorName.kind === 71 && 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);
+ error(returnTypeNode, 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));
+ error(returnTypeNode, 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(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));
+ error(returnTypeNode, 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;
}
- if (!checkTypeAssignableTo(promiseConstructorType, globalPromiseConstructorLikeType, 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)) {
+ if (!checkTypeAssignableTo(promiseConstructorType, globalPromiseConstructorLikeType, returnTypeNode, 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)) {
return unknownType;
}
var rootName = promiseConstructorName && getFirstIdentifier(promiseConstructorName);
@@ -35085,7 +36611,9 @@ var ts;
checkTypeAssignableTo(returnType, expectedReturnType, node, headMessage, errorInfo);
}
function markTypeNodeAsReferenced(node) {
- var typeName = node && ts.getEntityNameFromTypeNode(node);
+ markEntityNameOrEntityExpressionAsReference(node && ts.getEntityNameFromTypeNode(node));
+ }
+ function markEntityNameOrEntityExpressionAsReference(typeName) {
var rootName = typeName && getFirstIdentifier(typeName);
var rootSymbol = rootName && resolveName(rootName, rootName.text, (typeName.kind === 71 ? 793064 : 1920) | 8388608, undefined, undefined);
if (rootSymbol
@@ -35095,8 +36623,46 @@ var ts;
markAliasSymbolAsReferenced(rootSymbol);
}
}
+ function markDecoratorMedataDataTypeNodeAsReferenced(node) {
+ var entityName = getEntityNameForDecoratorMetadata(node);
+ if (entityName && ts.isEntityName(entityName)) {
+ markEntityNameOrEntityExpressionAsReference(entityName);
+ }
+ }
+ function getEntityNameForDecoratorMetadata(node) {
+ if (node) {
+ switch (node.kind) {
+ case 167:
+ case 166:
+ var commonEntityName = void 0;
+ for (var _i = 0, _a = node.types; _i < _a.length; _i++) {
+ var typeNode = _a[_i];
+ var individualEntityName = getEntityNameForDecoratorMetadata(typeNode);
+ if (!individualEntityName) {
+ return undefined;
+ }
+ if (commonEntityName) {
+ if (!ts.isIdentifier(commonEntityName) ||
+ !ts.isIdentifier(individualEntityName) ||
+ commonEntityName.text !== individualEntityName.text) {
+ return undefined;
+ }
+ }
+ else {
+ commonEntityName = individualEntityName;
+ }
+ }
+ return commonEntityName;
+ case 168:
+ return getEntityNameForDecoratorMetadata(node.type);
+ case 159:
+ return node.typeName;
+ }
+ }
+ }
function getParameterTypeNodeForDecoratorCheck(node) {
- return node.dotDotDotToken ? ts.getRestParameterElementType(node.type) : node.type;
+ var typeNode = ts.getEffectiveTypeAnnotationNode(node);
+ return ts.isRestParameter(node) ? ts.getRestParameterElementType(typeNode) : typeNode;
}
function checkDecorators(node) {
if (!node.decorators) {
@@ -35121,7 +36687,7 @@ var ts;
if (constructor) {
for (var _i = 0, _a = constructor.parameters; _i < _a.length; _i++) {
var parameter = _a[_i];
- markTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(parameter));
+ markDecoratorMedataDataTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(parameter));
}
}
break;
@@ -35130,15 +36696,15 @@ var ts;
case 154:
for (var _b = 0, _c = node.parameters; _b < _c.length; _b++) {
var parameter = _c[_b];
- markTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(parameter));
+ markDecoratorMedataDataTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(parameter));
}
- markTypeNodeAsReferenced(node.type);
+ markDecoratorMedataDataTypeNodeAsReferenced(ts.getEffectiveReturnTypeNode(node));
break;
case 149:
- markTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(node));
+ markDecoratorMedataDataTypeNodeAsReferenced(ts.getEffectiveTypeAnnotationNode(node));
break;
case 146:
- markTypeNodeAsReferenced(node.type);
+ markDecoratorMedataDataTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(node));
break;
}
}
@@ -35146,7 +36712,8 @@ var ts;
}
function checkFunctionDeclaration(node) {
if (produceDiagnostics) {
- checkFunctionOrMethodDeclaration(node) || checkGrammarForGenerator(node);
+ checkFunctionOrMethodDeclaration(node);
+ checkGrammarForGenerator(node);
checkCollisionWithCapturedSuperVariable(node, node.name);
checkCollisionWithCapturedThisVariable(node, node.name);
checkCollisionWithCapturedNewTargetVariable(node, node.name);
@@ -35176,13 +36743,14 @@ var ts;
}
}
checkSourceElement(node.body);
+ var returnTypeNode = ts.getEffectiveReturnTypeNode(node);
if ((functionFlags & 1) === 0) {
- var returnOrPromisedType = node.type && (functionFlags & 2
+ var returnOrPromisedType = returnTypeNode && (functionFlags & 2
? checkAsyncFunctionReturnType(node)
- : getTypeFromTypeNode(node.type));
+ : getTypeFromTypeNode(returnTypeNode));
checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnOrPromisedType);
}
- if (produceDiagnostics && !node.type) {
+ if (produceDiagnostics && !returnTypeNode) {
if (noImplicitAny && ts.nodeIsMissing(node.body) && !isPrivateWithinAmbient(node)) {
reportImplicitAnyError(node, anyType);
}
@@ -35251,15 +36819,16 @@ var ts;
if (!local.isReferenced) {
if (local.valueDeclaration && ts.getRootDeclaration(local.valueDeclaration).kind === 146) {
var parameter = ts.getRootDeclaration(local.valueDeclaration);
+ var name = ts.getNameOfDeclaration(local.valueDeclaration);
if (compilerOptions.noUnusedParameters &&
!ts.isParameterPropertyDeclaration(parameter) &&
!ts.parameterIsThisKeyword(parameter) &&
- !parameterNameStartsWithUnderscore(local.valueDeclaration.name)) {
- error(local.valueDeclaration.name, ts.Diagnostics._0_is_declared_but_never_used, local.name);
+ !parameterNameStartsWithUnderscore(name)) {
+ error(name, ts.Diagnostics._0_is_declared_but_never_used, local.name);
}
}
else if (compilerOptions.noUnusedLocals) {
- ts.forEach(local.declarations, function (d) { return errorUnusedLocal(d.name || d, local.name); });
+ ts.forEach(local.declarations, function (d) { return errorUnusedLocal(ts.getNameOfDeclaration(d) || d, local.name); });
}
}
});
@@ -35275,9 +36844,7 @@ var ts;
function errorUnusedLocal(node, name) {
if (isIdentifierThatStartsWithUnderScore(node)) {
var declaration = ts.getRootDeclaration(node.parent);
- if (declaration.kind === 226 &&
- (declaration.parent.parent.kind === 215 ||
- declaration.parent.parent.kind === 216)) {
+ if (declaration.kind === 226 && ts.isForInOrOfStatement(declaration.parent.parent)) {
return;
}
}
@@ -35337,7 +36904,7 @@ var ts;
for (var _i = 0, _a = local.declarations; _i < _a.length; _i++) {
var declaration = _a[_i];
if (!ts.isAmbientModule(declaration)) {
- errorUnusedLocal(declaration.name, local.name);
+ errorUnusedLocal(ts.getNameOfDeclaration(declaration), local.name);
}
}
}
@@ -35399,7 +36966,7 @@ var ts;
if (getNodeCheckFlags(current) & 4) {
var isDeclaration_1 = node.kind !== 71;
if (isDeclaration_1) {
- error(node.name, ts.Diagnostics.Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference);
+ error(ts.getNameOfDeclaration(node), ts.Diagnostics.Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference);
}
else {
error(node, ts.Diagnostics.Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference);
@@ -35413,7 +36980,7 @@ var ts;
if (getNodeCheckFlags(current) & 8) {
var isDeclaration_2 = node.kind !== 71;
if (isDeclaration_2) {
- error(node.name, ts.Diagnostics.Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference);
+ error(ts.getNameOfDeclaration(node), 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);
@@ -35609,7 +37176,7 @@ var ts;
checkTypeAssignableTo(checkExpressionCached(node.initializer), declarationType, node, undefined);
}
if (!areDeclarationFlagsIdentical(node, symbol.valueDeclaration)) {
- error(symbol.valueDeclaration.name, ts.Diagnostics.All_declarations_of_0_must_have_identical_modifiers, ts.declarationNameToString(node.name));
+ error(ts.getNameOfDeclaration(symbol.valueDeclaration), ts.Diagnostics.All_declarations_of_0_must_have_identical_modifiers, ts.declarationNameToString(node.name));
error(node.name, ts.Diagnostics.All_declarations_of_0_must_have_identical_modifiers, ts.declarationNameToString(node.name));
}
}
@@ -35715,11 +37282,12 @@ var ts;
checkGrammarForInOrForOfStatement(node);
if (node.kind === 216) {
if (node.awaitModifier) {
- if (languageVersion < 4) {
- checkExternalEmitHelpers(node, 8192);
+ var functionFlags = ts.getFunctionFlags(ts.getContainingFunction(node));
+ if ((functionFlags & (4 | 2)) === 2 && languageVersion < 5) {
+ checkExternalEmitHelpers(node, 16384);
}
}
- else if (languageVersion < 2 && compilerOptions.downlevelIteration) {
+ else if (compilerOptions.downlevelIteration && languageVersion < 2) {
checkExternalEmitHelpers(node, 256);
}
}
@@ -35787,17 +37355,17 @@ var ts;
var expressionType = checkNonNullExpression(rhsExpression);
return checkIteratedTypeOrElementType(expressionType, rhsExpression, true, awaitModifier !== undefined);
}
- function checkIteratedTypeOrElementType(inputType, errorNode, allowStringInput, allowAsyncIterable) {
+ function checkIteratedTypeOrElementType(inputType, errorNode, allowStringInput, allowAsyncIterables) {
if (isTypeAny(inputType)) {
return inputType;
}
- return getIteratedTypeOrElementType(inputType, errorNode, allowStringInput, allowAsyncIterable, true) || anyType;
+ return getIteratedTypeOrElementType(inputType, errorNode, allowStringInput, allowAsyncIterables, true) || anyType;
}
- function getIteratedTypeOrElementType(inputType, errorNode, allowStringInput, allowAsyncIterable, checkAssignability) {
+ function getIteratedTypeOrElementType(inputType, errorNode, allowStringInput, allowAsyncIterables, 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 (uplevelIteration || downlevelIteration || allowAsyncIterables) {
+ var iteratedType = getIteratedTypeOfIterable(inputType, uplevelIteration ? errorNode : undefined, allowAsyncIterables, true, checkAssignability);
if (iteratedType || uplevelIteration) {
return iteratedType;
}
@@ -35851,63 +37419,57 @@ var ts;
}
return arrayElementType;
}
- function getIteratedTypeOfIterable(type, errorNode, isAsyncIterable, allowNonAsyncIterables, checkAssignability) {
+ function getIteratedTypeOfIterable(type, errorNode, allowAsyncIterables, allowSyncIterables, checkAssignability) {
if (isTypeAny(type)) {
return undefined;
}
- var typeAsIterable = type;
- 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];
+ return mapType(type, getIteratedType);
+ function getIteratedType(type) {
+ var typeAsIterable = type;
+ if (allowAsyncIterables) {
+ if (typeAsIterable.iteratedTypeOfAsyncIterable) {
+ return typeAsIterable.iteratedTypeOfAsyncIterable;
+ }
+ if (isReferenceToType(type, getGlobalAsyncIterableType(false)) ||
+ isReferenceToType(type, getGlobalAsyncIterableIteratorType(false))) {
+ return typeAsIterable.iteratedTypeOfAsyncIterable = type.typeArguments[0];
+ }
}
- }
- if (!isAsyncIterable || allowNonAsyncIterables) {
- if (isReferenceToType(type, getGlobalIterableType(false)) ||
- isReferenceToType(type, getGlobalIterableIteratorType(false))) {
- return isAsyncIterable
- ? typeAsIterable.iteratedTypeOfAsyncIterable = type.typeArguments[0]
- : typeAsIterable.iteratedTypeOfIterable = type.typeArguments[0];
+ if (allowSyncIterables) {
+ if (typeAsIterable.iteratedTypeOfIterable) {
+ return typeAsIterable.iteratedTypeOfIterable;
+ }
+ if (isReferenceToType(type, getGlobalIterableType(false)) ||
+ isReferenceToType(type, getGlobalIterableIteratorType(false))) {
+ return typeAsIterable.iteratedTypeOfIterable = type.typeArguments[0];
+ }
}
- }
- var iteratorMethodSignatures;
- var isNonAsyncIterable = false;
- if (isAsyncIterable) {
- var iteratorMethod = getTypeOfPropertyOfType(type, ts.getPropertyNameForKnownSymbolName("asyncIterator"));
- if (isTypeAny(iteratorMethod)) {
+ var asyncMethodType = allowAsyncIterables && getTypeOfPropertyOfType(type, ts.getPropertyNameForKnownSymbolName("asyncIterator"));
+ var methodType = asyncMethodType || (allowSyncIterables && getTypeOfPropertyOfType(type, ts.getPropertyNameForKnownSymbolName("iterator")));
+ if (isTypeAny(methodType)) {
return undefined;
}
- iteratorMethodSignatures = iteratorMethod && getSignaturesOfType(iteratorMethod, 0);
- }
- if (!isAsyncIterable || (allowNonAsyncIterables && !ts.some(iteratorMethodSignatures))) {
- var iteratorMethod = getTypeOfPropertyOfType(type, ts.getPropertyNameForKnownSymbolName("iterator"));
- if (isTypeAny(iteratorMethod)) {
+ var signatures = methodType && getSignaturesOfType(methodType, 0);
+ if (!ts.some(signatures)) {
+ if (errorNode) {
+ error(errorNode, allowAsyncIterables
+ ? 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);
+ errorNode = undefined;
+ }
return undefined;
}
- iteratorMethodSignatures = iteratorMethod && getSignaturesOfType(iteratorMethod, 0);
- isNonAsyncIterable = true;
- }
- if (ts.some(iteratorMethodSignatures)) {
- var iteratorMethodReturnType = getUnionType(ts.map(iteratorMethodSignatures, getReturnTypeOfSignature), true);
- var iteratedType = getIteratedTypeOfIterator(iteratorMethodReturnType, errorNode, !isNonAsyncIterable);
+ var returnType = getUnionType(ts.map(signatures, getReturnTypeOfSignature), true);
+ var iteratedType = getIteratedTypeOfIterator(returnType, errorNode, !!asyncMethodType);
if (checkAssignability && errorNode && iteratedType) {
- checkTypeAssignableTo(type, isNonAsyncIterable
- ? createIterableType(iteratedType)
- : createAsyncIterableType(iteratedType), errorNode);
+ checkTypeAssignableTo(type, asyncMethodType
+ ? createAsyncIterableType(iteratedType)
+ : createIterableType(iteratedType), errorNode);
}
- return isAsyncIterable
+ return asyncMethodType
? 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 undefined;
}
function getIteratedTypeOfIterator(type, errorNode, isAsyncIterator) {
if (isTypeAny(type)) {
@@ -35963,14 +37525,15 @@ var ts;
if (isTypeAny(returnType)) {
return undefined;
}
- return getIteratedTypeOfIterable(returnType, undefined, isAsyncGenerator, false, false)
+ return getIteratedTypeOfIterable(returnType, undefined, isAsyncGenerator, !isAsyncGenerator, false)
|| getIteratedTypeOfIterator(returnType, undefined, isAsyncGenerator);
}
function checkBreakOrContinueStatement(node) {
checkGrammarStatementInAmbientContext(node) || checkGrammarBreakOrContinueStatement(node);
}
function isGetAccessorWithAnnotatedSetAccessor(node) {
- return !!(node.kind === 153 && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(node.symbol, 154)));
+ return node.kind === 153
+ && ts.getEffectiveSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(node.symbol, 154)) !== undefined;
}
function isUnwrappedReturnTypeVoidOrAny(func, returnType) {
var unwrappedReturnType = (ts.getFunctionFlags(func) & 3) === 2
@@ -36005,7 +37568,7 @@ var ts;
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)) {
+ else if (ts.getEffectiveReturnTypeNode(func) || isGetAccessorWithAnnotatedSetAccessor(func)) {
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);
@@ -36169,11 +37732,14 @@ var ts;
return;
}
var propDeclaration = prop.valueDeclaration;
- if (indexKind === 1 && !(propDeclaration ? isNumericName(propDeclaration.name) : isNumericLiteralName(prop.name))) {
+ if (indexKind === 1 && !(propDeclaration ? isNumericName(ts.getNameOfDeclaration(propDeclaration)) : isNumericLiteralName(prop.name))) {
return;
}
var errorNode;
- if (propDeclaration && (propDeclaration.name.kind === 144 || prop.parent === containingType.symbol)) {
+ if (propDeclaration &&
+ (propDeclaration.kind === 194 ||
+ ts.getNameOfDeclaration(propDeclaration).kind === 144 ||
+ prop.parent === containingType.symbol)) {
errorNode = propDeclaration;
}
else if (indexDeclaration) {
@@ -36326,7 +37892,7 @@ var ts;
var staticBaseType = getApparentType(baseConstructorType);
checkBaseTypeAccessibility(staticBaseType, baseTypeNode);
checkSourceElement(baseTypeNode.expression);
- if (baseTypeNode.typeArguments) {
+ if (ts.some(baseTypeNode.typeArguments)) {
ts.forEach(baseTypeNode.typeArguments, checkSourceElement);
for (var _i = 0, _a = getConstructorsForTypeArguments(staticBaseType, baseTypeNode.typeArguments, baseTypeNode); _i < _a.length; _i++) {
var constructor = _a[_i];
@@ -36388,7 +37954,7 @@ var ts;
}
}
function getTargetSymbol(s) {
- return getCheckFlags(s) & 1 ? s.target : s;
+ return ts.getCheckFlags(s) & 1 ? s.target : s;
}
function getClassLikeDeclarationOfSymbol(symbol) {
return ts.forEach(symbol.declarations, function (d) { return ts.isClassLike(d) ? d : undefined; });
@@ -36407,7 +37973,7 @@ var ts;
continue;
}
var derived = getTargetSymbol(getPropertyOfObjectType(type, base.name));
- var baseDeclarationFlags = getDeclarationModifierFlagsFromSymbol(base);
+ var baseDeclarationFlags = ts.getDeclarationModifierFlagsFromSymbol(base);
ts.Debug.assert(!!derived, "derived should point to something, even if it is the base class' declaration.");
if (derived) {
if (derived === base) {
@@ -36422,13 +37988,10 @@ var ts;
}
}
else {
- var derivedDeclarationFlags = getDeclarationModifierFlagsFromSymbol(derived);
+ var derivedDeclarationFlags = ts.getDeclarationModifierFlagsFromSymbol(derived);
if (baseDeclarationFlags & 8 || derivedDeclarationFlags & 8) {
continue;
}
- if ((baseDeclarationFlags & 32) !== (derivedDeclarationFlags & 32)) {
- continue;
- }
if (isMethodLike(base) && isMethodLike(derived) || base.flags & 98308 && derived.flags & 98308) {
continue;
}
@@ -36447,14 +38010,11 @@ var ts;
else {
errorMessage = ts.Diagnostics.Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function;
}
- error(derived.valueDeclaration.name || derived.valueDeclaration, errorMessage, typeToString(baseType), symbolToString(base), typeToString(type));
+ error(ts.getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage, typeToString(baseType), symbolToString(base), typeToString(type));
}
}
}
}
- function isAccessor(kind) {
- return kind === 153 || kind === 154;
- }
function checkInheritedPropertiesAreIdentical(type, typeNode) {
var baseTypes = getBaseTypes(type);
if (baseTypes.length < 2) {
@@ -36530,88 +38090,81 @@ var ts;
function computeEnumMemberValues(node) {
var nodeLinks = getNodeLinks(node);
if (!(nodeLinks.flags & 16384)) {
- var enumSymbol = getSymbolOfNode(node);
- var enumType = getDeclaredTypeOfSymbol(enumSymbol);
+ nodeLinks.flags |= 16384;
var autoValue = 0;
- var ambient = ts.isInAmbientContext(node);
- var enumIsConst = ts.isConst(node);
for (var _i = 0, _a = node.members; _i < _a.length; _i++) {
var member = _a[_i];
- if (isComputedNonLiteralName(member.name)) {
- error(member.name, ts.Diagnostics.Computed_property_names_are_not_allowed_in_enums);
- }
- else {
- var text = ts.getTextOfPropertyName(member.name);
- if (isNumericLiteralName(text) && !isInfinityOrNaNString(text)) {
- error(member.name, ts.Diagnostics.An_enum_member_cannot_have_a_numeric_name);
- }
- }
- var previousEnumMemberIsNonConstant = autoValue === undefined;
- var initializer = member.initializer;
- if (initializer) {
- autoValue = computeConstantValueForEnumMemberInitializer(initializer, enumType, enumIsConst, ambient);
- }
- else if (ambient && !enumIsConst) {
- autoValue = undefined;
- }
- else if (previousEnumMemberIsNonConstant) {
- error(member.name, ts.Diagnostics.Enum_member_must_have_initializer);
- }
- if (autoValue !== undefined) {
- getNodeLinks(member).enumMemberValue = autoValue;
- autoValue++;
- }
+ var value = computeMemberValue(member, autoValue);
+ getNodeLinks(member).enumMemberValue = value;
+ autoValue = typeof value === "number" ? value + 1 : undefined;
}
- nodeLinks.flags |= 16384;
}
- function computeConstantValueForEnumMemberInitializer(initializer, enumType, enumIsConst, ambient) {
- var reportError = true;
- var value = evalConstant(initializer);
- if (reportError) {
- if (value === undefined) {
- if (enumIsConst) {
- error(initializer, ts.Diagnostics.In_const_enum_declarations_member_initializer_must_be_constant_expression);
- }
- else if (ambient) {
- error(initializer, ts.Diagnostics.In_ambient_enum_declarations_member_initializer_must_be_constant_expression);
- }
- else {
- checkTypeAssignableTo(checkExpression(initializer), enumType, initializer, undefined);
- }
- }
- else if (enumIsConst) {
- if (isNaN(value)) {
- error(initializer, ts.Diagnostics.const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN);
- }
- else if (!isFinite(value)) {
- error(initializer, ts.Diagnostics.const_enum_member_initializer_was_evaluated_to_a_non_finite_value);
- }
- }
+ }
+ function computeMemberValue(member, autoValue) {
+ if (isComputedNonLiteralName(member.name)) {
+ error(member.name, ts.Diagnostics.Computed_property_names_are_not_allowed_in_enums);
+ }
+ else {
+ var text = ts.getTextOfPropertyName(member.name);
+ if (isNumericLiteralName(text) && !isInfinityOrNaNString(text)) {
+ error(member.name, ts.Diagnostics.An_enum_member_cannot_have_a_numeric_name);
}
- return value;
- function evalConstant(e) {
- switch (e.kind) {
- case 192:
- var value_1 = evalConstant(e.operand);
- if (value_1 === undefined) {
- return undefined;
- }
- switch (e.operator) {
+ }
+ if (member.initializer) {
+ return computeConstantValue(member);
+ }
+ if (ts.isInAmbientContext(member.parent) && !ts.isConst(member.parent)) {
+ return undefined;
+ }
+ if (autoValue !== undefined) {
+ return autoValue;
+ }
+ error(member.name, ts.Diagnostics.Enum_member_must_have_initializer);
+ return undefined;
+ }
+ function computeConstantValue(member) {
+ var enumKind = getEnumKind(getSymbolOfNode(member.parent));
+ var isConstEnum = ts.isConst(member.parent);
+ var initializer = member.initializer;
+ var value = enumKind === 1 && !isLiteralEnumMember(member) ? undefined : evaluate(initializer);
+ if (value !== undefined) {
+ if (isConstEnum && typeof value === "number" && !isFinite(value)) {
+ error(initializer, isNaN(value) ?
+ ts.Diagnostics.const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN :
+ ts.Diagnostics.const_enum_member_initializer_was_evaluated_to_a_non_finite_value);
+ }
+ }
+ else if (enumKind === 1) {
+ error(initializer, ts.Diagnostics.Computed_values_are_not_permitted_in_an_enum_with_string_valued_members);
+ return 0;
+ }
+ else if (isConstEnum) {
+ error(initializer, ts.Diagnostics.In_const_enum_declarations_member_initializer_must_be_constant_expression);
+ }
+ else if (ts.isInAmbientContext(member.parent)) {
+ error(initializer, ts.Diagnostics.In_ambient_enum_declarations_member_initializer_must_be_constant_expression);
+ }
+ else {
+ checkTypeAssignableTo(checkExpression(initializer), getDeclaredTypeOfSymbol(getSymbolOfNode(member.parent)), initializer, undefined);
+ }
+ return value;
+ function evaluate(expr) {
+ switch (expr.kind) {
+ case 192:
+ var value_1 = evaluate(expr.operand);
+ if (typeof value_1 === "number") {
+ switch (expr.operator) {
case 37: return value_1;
case 38: return -value_1;
case 52: return ~value_1;
}
- return undefined;
- case 194:
- var left = evalConstant(e.left);
- if (left === undefined) {
- return undefined;
- }
- var right = evalConstant(e.right);
- if (right === undefined) {
- return undefined;
- }
- switch (e.operatorToken.kind) {
+ }
+ break;
+ case 194:
+ var left = evaluate(expr.left);
+ var right = evaluate(expr.right);
+ if (typeof left === "number" && typeof right === "number") {
+ switch (expr.operatorToken.kind) {
case 49: return left | right;
case 48: return left & right;
case 46: return left >> right;
@@ -36624,75 +38177,53 @@ var ts;
case 38: return left - right;
case 42: return left % right;
}
- return undefined;
- case 8:
- checkGrammarNumericLiteral(e);
- return +e.text;
- case 185:
- return evalConstant(e.expression);
- case 71:
- case 180:
- case 179:
- var member = initializer.parent;
- var currentType = getTypeOfSymbol(getSymbolOfNode(member.parent));
- var enumType_1;
- var propertyName = void 0;
- if (e.kind === 71) {
- enumType_1 = currentType;
- propertyName = e.text;
- }
- else {
- var expression = void 0;
- if (e.kind === 180) {
- if (e.argumentExpression === undefined ||
- e.argumentExpression.kind !== 9) {
- return undefined;
- }
- expression = e.expression;
- propertyName = e.argumentExpression.text;
- }
- else {
- expression = e.expression;
- propertyName = e.name.text;
- }
- var current = expression;
- while (current) {
- if (current.kind === 71) {
- break;
- }
- else if (current.kind === 179) {
- current = current.expression;
- }
- else {
- return undefined;
- }
- }
- enumType_1 = getTypeOfExpression(expression);
- if (!(enumType_1.symbol && (enumType_1.symbol.flags & 384))) {
- return undefined;
- }
- }
- if (propertyName === undefined) {
- return undefined;
- }
- var property = getPropertyOfObjectType(enumType_1, propertyName);
- if (!property || !(property.flags & 8)) {
- return undefined;
- }
- var propertyDecl = property.valueDeclaration;
- if (member === propertyDecl) {
- return undefined;
- }
- if (!isBlockScopedNameDeclaredBeforeUse(propertyDecl, member)) {
- reportError = false;
- error(e, ts.Diagnostics.A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums);
- return undefined;
+ }
+ break;
+ case 9:
+ return expr.text;
+ case 8:
+ checkGrammarNumericLiteral(expr);
+ return +expr.text;
+ case 185:
+ return evaluate(expr.expression);
+ case 71:
+ return ts.nodeIsMissing(expr) ? 0 : evaluateEnumMember(expr, getSymbolOfNode(member.parent), expr.text);
+ case 180:
+ case 179:
+ if (isConstantMemberAccess(expr)) {
+ var type = getTypeOfExpression(expr.expression);
+ if (type.symbol && type.symbol.flags & 384) {
+ var name = expr.kind === 179 ?
+ expr.name.text :
+ expr.argumentExpression.text;
+ return evaluateEnumMember(expr, type.symbol, name);
}
- return getNodeLinks(propertyDecl).enumMemberValue;
+ }
+ break;
+ }
+ return undefined;
+ }
+ function evaluateEnumMember(expr, enumSymbol, name) {
+ var memberSymbol = enumSymbol.exports.get(name);
+ if (memberSymbol) {
+ var declaration = memberSymbol.valueDeclaration;
+ if (declaration !== member) {
+ if (isBlockScopedNameDeclaredBeforeUse(declaration, member)) {
+ return getNodeLinks(declaration).enumMemberValue;
+ }
+ error(expr, ts.Diagnostics.A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums);
+ return 0;
}
}
+ return undefined;
}
}
+ function isConstantMemberAccess(node) {
+ return node.kind === 71 ||
+ node.kind === 179 && isConstantMemberAccess(node.expression) ||
+ node.kind === 180 && isConstantMemberAccess(node.expression) &&
+ node.argumentExpression.kind === 9;
+ }
function checkEnumDeclaration(node) {
if (!produceDiagnostics) {
return;
@@ -36715,7 +38246,7 @@ var ts;
if (enumSymbol.declarations.length > 1) {
ts.forEach(enumSymbol.declarations, function (decl) {
if (ts.isConstEnumDeclaration(decl) !== enumIsConst) {
- error(decl.name, ts.Diagnostics.Enum_declarations_must_all_be_const_or_non_const);
+ error(ts.getNameOfDeclaration(decl), ts.Diagnostics.Enum_declarations_must_all_be_const_or_non_const);
}
});
}
@@ -36940,6 +38471,12 @@ var ts;
ts.Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0;
error(node, message, symbolToString(symbol));
}
+ if (compilerOptions.isolatedModules
+ && node.kind === 246
+ && !(target.flags & 107455)
+ && !ts.isInAmbientContext(node)) {
+ error(node, ts.Diagnostics.Cannot_re_export_a_type_when_the_isolatedModules_flag_is_provided);
+ }
}
}
function checkImportBinding(node) {
@@ -37025,6 +38562,9 @@ var ts;
if (moduleSymbol && hasExportAssignmentSymbol(moduleSymbol)) {
error(node.moduleSpecifier, ts.Diagnostics.Module_0_uses_export_and_cannot_be_used_with_export_Asterisk, symbolToString(moduleSymbol));
}
+ if (modulekind !== ts.ModuleKind.System && modulekind !== ts.ModuleKind.ES2015) {
+ checkExternalEmitHelpers(node, 32768);
+ }
}
}
}
@@ -37542,6 +39082,15 @@ var ts;
return entityNameSymbol;
}
}
+ if (entityName.parent.kind === 287) {
+ var parameter = ts.getParameterFromJSDoc(entityName.parent);
+ return parameter && parameter.symbol;
+ }
+ if (entityName.parent.kind === 145 && entityName.parent.parent.kind === 290) {
+ ts.Debug.assert(!ts.isInJavaScriptFile(entityName));
+ var typeParameter = ts.getTypeParameterFromJsDoc(entityName.parent);
+ return typeParameter && typeParameter.symbol;
+ }
if (ts.isPartOfExpression(entityName)) {
if (ts.nodeIsMissing(entityName)) {
return undefined;
@@ -37586,7 +39135,7 @@ var ts;
if (isInsideWithStatementBody(node)) {
return undefined;
}
- if (ts.isDeclarationName(node)) {
+ if (isDeclarationNameOrImportPropertyName(node)) {
return getSymbolOfNode(node.parent);
}
else if (ts.isLiteralComputedPropertyDeclarationName(node)) {
@@ -37631,13 +39180,9 @@ var ts;
}
return undefined;
case 9:
- if ((ts.isExternalModuleImportEqualsDeclaration(node.parent.parent) &&
- ts.getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node) ||
- ((node.parent.kind === 238 || node.parent.kind === 244) &&
- node.parent.moduleSpecifier === node)) {
- return resolveExternalModuleName(node, node);
- }
- if (ts.isInJavaScriptFile(node) && ts.isRequireCall(node.parent, false)) {
+ if ((ts.isExternalModuleImportEqualsDeclaration(node.parent.parent) && ts.getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node) ||
+ ((node.parent.kind === 238 || node.parent.kind === 244) && node.parent.moduleSpecifier === node) ||
+ ((ts.isInJavaScriptFile(node) && ts.isRequireCall(node.parent, false)) || ts.isImportCall(node.parent))) {
return resolveExternalModuleName(node, node);
}
case 8:
@@ -37699,7 +39244,7 @@ var ts;
var symbol = getSymbolOfNode(node);
return getTypeOfSymbol(symbol);
}
- if (ts.isDeclarationName(node)) {
+ if (isDeclarationNameOrImportPropertyName(node)) {
var symbol = getSymbolAtLocation(node);
return symbol && getTypeOfSymbol(symbol);
}
@@ -37761,24 +39306,24 @@ var ts;
return getNamedMembers(propsByName);
}
function getRootSymbols(symbol) {
- if (getCheckFlags(symbol) & 6) {
- var symbols_3 = [];
+ if (ts.getCheckFlags(symbol) & 6) {
+ var symbols_4 = [];
var name_2 = symbol.name;
ts.forEach(getSymbolLinks(symbol).containingType.types, function (t) {
var symbol = getPropertyOfType(t, name_2);
if (symbol) {
- symbols_3.push(symbol);
+ symbols_4.push(symbol);
}
});
- return symbols_3;
+ return symbols_4;
}
else if (symbol.flags & 134217728) {
- if (symbol.leftSpread) {
- var links = symbol;
- return getRootSymbols(links.leftSpread).concat(getRootSymbols(links.rightSpread));
+ var transient = symbol;
+ if (transient.leftSpread) {
+ return getRootSymbols(transient.leftSpread).concat(getRootSymbols(transient.rightSpread));
}
- if (symbol.syntheticOrigin) {
- return getRootSymbols(symbol.syntheticOrigin);
+ if (transient.syntheticOrigin) {
+ return getRootSymbols(transient.syntheticOrigin);
}
var target = void 0;
var next = symbol;
@@ -37853,7 +39398,7 @@ var ts;
node = ts.getParseTreeNode(node, ts.isIdentifier);
if (node) {
var symbol = getReferencedValueSymbol(node);
- if (symbol && symbol.flags & 8388608) {
+ if (isNonLocalAlias(symbol, 107455)) {
return getDeclarationOfAliasSymbol(symbol);
}
}
@@ -37971,6 +39516,12 @@ var ts;
parameter.initializer &&
!(ts.getModifierFlags(parameter) & 92);
}
+ function isOptionalUninitializedParameterProperty(parameter) {
+ return strictNullChecks &&
+ isOptionalParameter(parameter) &&
+ !parameter.initializer &&
+ !!(ts.getModifierFlags(parameter) & 92);
+ }
function getNodeCheckFlags(node) {
return getNodeLinks(node).flags;
}
@@ -38031,7 +39582,7 @@ var ts;
else if (isTypeOfKind(type, 136)) {
return ts.TypeReferenceSerializationKind.BooleanType;
}
- else if (isTypeOfKind(type, 340)) {
+ else if (isTypeOfKind(type, 84)) {
return ts.TypeReferenceSerializationKind.NumberLikeType;
}
else if (isTypeOfKind(type, 262178)) {
@@ -38058,8 +39609,8 @@ var ts;
var type = symbol && !(symbol.flags & (2048 | 131072))
? getWidenedLiteralType(getTypeOfSymbol(symbol))
: unknownType;
- if (flags & 4096) {
- type = includeFalsyTypes(type, 2048);
+ if (flags & 8192) {
+ type = getNullableType(type, 2048);
}
getSymbolDisplayBuilder().buildTypeDisplay(type, writer, enclosingDeclaration, flags);
}
@@ -38071,15 +39622,6 @@ var ts;
var type = getWidenedType(getRegularTypeOfExpression(expr));
getSymbolDisplayBuilder().buildTypeDisplay(type, writer, enclosingDeclaration, flags);
}
- function writeBaseConstructorTypeOfClass(node, enclosingDeclaration, flags, writer) {
- 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.has(name);
}
@@ -38155,10 +39697,10 @@ var ts;
isDeclarationVisible: isDeclarationVisible,
isImplementationOfOverload: isImplementationOfOverload,
isRequiredInitializedParameter: isRequiredInitializedParameter,
+ isOptionalUninitializedParameterProperty: isOptionalUninitializedParameterProperty,
writeTypeOfDeclaration: writeTypeOfDeclaration,
writeReturnTypeOfSignatureDeclaration: writeReturnTypeOfSignatureDeclaration,
writeTypeOfExpression: writeTypeOfExpression,
- writeBaseConstructorTypeOfClass: writeBaseConstructorTypeOfClass,
isSymbolAccessible: isSymbolAccessible,
isEntityNameVisible: isEntityNameVisible,
getConstantValue: function (node) {
@@ -38305,7 +39847,7 @@ var ts;
var helpersModule = resolveHelpersModule(sourceFile, location);
if (helpersModule !== unknownSymbol) {
var uncheckedHelpers = helpers & ~requestedExternalEmitHelpers;
- for (var helper = 1; helper <= 8192; helper <<= 1) {
+ for (var helper = 1; helper <= 32768; helper <<= 1) {
if (uncheckedHelpers & helper) {
var name = getHelperName(helper);
var symbol = getSymbol(helpersModule.exports, ts.escapeIdentifier(name), 107455);
@@ -38332,10 +39874,12 @@ var ts;
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.");
+ case 2048: return "__await";
+ case 4096: return "__asyncGenerator";
+ case 8192: return "__asyncDelegator";
+ case 16384: return "__asyncValues";
+ case 32768: return "__exportStar";
+ default: ts.Debug.fail("Unrecognized helper");
}
}
function resolveHelpersModule(node, errorNode) {
@@ -38759,6 +40303,10 @@ var ts;
var sourceFile = ts.getSourceFileOfNode(node);
return grammarErrorAtPos(sourceFile, types.pos, 0, ts.Diagnostics._0_list_cannot_be_empty, listType);
}
+ return ts.forEach(types, checkGrammarExpressionWithTypeArguments);
+ }
+ function checkGrammarExpressionWithTypeArguments(node) {
+ return checkGrammarTypeArguments(node, node.typeArguments);
}
function checkGrammarClassDeclarationHeritageClauses(node) {
var seenExtendsClause = false;
@@ -39308,7 +40856,7 @@ var ts;
}
function checkGrammarStatementInAmbientContext(node) {
if (ts.isInAmbientContext(node)) {
- if (isAccessor(node.parent.kind)) {
+ if (ts.isAccessor(node.parent)) {
return getNodeLinks(node).hasReportedStatementInAmbientContext = true;
}
var links = getNodeLinks(node);
@@ -39361,8 +40909,32 @@ var ts;
});
return result;
}
+ function checkGrammarImportCallExpression(node) {
+ if (modulekind === ts.ModuleKind.ES2015) {
+ return grammarErrorOnNode(node, ts.Diagnostics.Dynamic_import_cannot_be_used_when_targeting_ECMAScript_2015_modules);
+ }
+ if (node.typeArguments) {
+ return grammarErrorOnNode(node, ts.Diagnostics.Dynamic_import_cannot_have_type_arguments);
+ }
+ var nodeArguments = node.arguments;
+ if (nodeArguments.length !== 1) {
+ return grammarErrorOnNode(node, ts.Diagnostics.Dynamic_import_must_have_one_specifier_as_an_argument);
+ }
+ if (ts.isSpreadElement(nodeArguments[0])) {
+ return grammarErrorOnNode(nodeArguments[0], ts.Diagnostics.Specifier_of_dynamic_import_cannot_be_spread_element);
+ }
+ }
}
ts.createTypeChecker = createTypeChecker;
+ function isDeclarationNameOrImportPropertyName(name) {
+ switch (name.parent.kind) {
+ case 242:
+ case 246:
+ return true;
+ default:
+ return ts.isDeclarationName(name);
+ }
+ }
})(ts || (ts = {}));
var ts;
(function (ts) {
@@ -39473,73 +41045,69 @@ var ts;
if ((kind > 0 && kind <= 142) || kind === 169) {
return node;
}
- switch (node.kind) {
- case 206:
- case 209:
- case 200:
- case 225:
- case 298:
- case 247:
- return node;
+ switch (kind) {
+ case 71:
+ return ts.updateIdentifier(node, nodesVisitor(node.typeArguments, visitor, ts.isTypeNode));
case 143:
return ts.updateQualifiedName(node, visitNode(node.left, visitor, ts.isEntityName), visitNode(node.right, visitor, ts.isIdentifier));
case 144:
return ts.updateComputedPropertyName(node, visitNode(node.expression, visitor, ts.isExpression));
- case 160:
- return ts.updateFunctionTypeNode(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode));
- case 161:
- return ts.updateConstructorTypeNode(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode));
- case 155:
- return ts.updateCallSignatureDeclaration(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode));
- case 156:
- return ts.updateConstructSignatureDeclaration(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode));
- case 150:
- 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 157:
- 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.updateTypeParameterDeclaration(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.constraint, visitor, ts.isTypeNode), visitNode(node.default, visitor, ts.isTypeNode));
case 146:
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 147:
return ts.updateDecorator(node, visitNode(node.expression, visitor, ts.isExpression));
- case 159:
- return ts.updateTypeReferenceNode(node, visitNode(node.typeName, visitor, ts.isEntityName), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode));
+ case 148:
+ return ts.updatePropertySignature(node, nodesVisitor(node.modifiers, visitor, ts.isToken), 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 149:
+ 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.updateMethodSignature(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.questionToken, tokenVisitor, ts.isToken));
+ case 151:
+ 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.isTypeParameterDeclaration), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context));
+ case 152:
+ 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 153:
+ 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 154:
+ 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 155:
+ return ts.updateCallSignature(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), visitNode(node.type, visitor, ts.isTypeNode));
+ case 156:
+ return ts.updateConstructSignature(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), visitNode(node.type, visitor, ts.isTypeNode));
+ case 157:
+ return ts.updateIndexSignature(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), visitNode(node.type, visitor, ts.isTypeNode));
case 158:
return ts.updateTypePredicateNode(node, visitNode(node.parameterName, visitor), visitNode(node.type, visitor, ts.isTypeNode));
+ case 159:
+ return ts.updateTypeReferenceNode(node, visitNode(node.typeName, visitor, ts.isEntityName), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode));
+ case 160:
+ return ts.updateFunctionTypeNode(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), visitNode(node.type, visitor, ts.isTypeNode));
+ case 161:
+ return ts.updateConstructorTypeNode(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), visitNode(node.type, visitor, ts.isTypeNode));
case 162:
return ts.updateTypeQueryNode(node, visitNode(node.exprName, visitor, ts.isEntityName));
case 163:
- return ts.updateTypeLiteralNode(node, nodesVisitor(node.members, visitor));
+ return ts.updateTypeLiteralNode(node, nodesVisitor(node.members, visitor, ts.isTypeElement));
case 164:
return ts.updateArrayTypeNode(node, visitNode(node.elementType, visitor, ts.isTypeNode));
case 165:
return ts.updateTypleTypeNode(node, nodesVisitor(node.elementTypes, visitor, ts.isTypeNode));
case 166:
+ return ts.updateUnionTypeNode(node, nodesVisitor(node.types, visitor, ts.isTypeNode));
case 167:
- return ts.updateUnionOrIntersectionTypeNode(node, nodesVisitor(node.types, visitor, ts.isTypeNode));
+ return ts.updateIntersectionTypeNode(node, nodesVisitor(node.types, visitor, ts.isTypeNode));
case 168:
- throw ts.Debug.fail("not implemented.");
+ return ts.updateParenthesizedType(node, visitNode(node.type, visitor, ts.isTypeNode));
case 170:
return ts.updateTypeOperatorNode(node, visitNode(node.type, visitor, ts.isTypeNode));
case 171:
return ts.updateIndexedAccessTypeNode(node, visitNode(node.objectType, visitor, ts.isTypeNode), visitNode(node.indexType, visitor, ts.isTypeNode));
case 172:
- 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));
+ return ts.updateMappedTypeNode(node, visitNode(node.readonlyToken, tokenVisitor, ts.isToken), visitNode(node.typeParameter, visitor, ts.isTypeParameterDeclaration), visitNode(node.questionToken, tokenVisitor, ts.isToken), visitNode(node.type, visitor, ts.isTypeNode));
case 173:
return ts.updateLiteralTypeNode(node, visitNode(node.literal, visitor, ts.isExpression));
- case 145:
- return ts.updateTypeParameterDeclaration(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.constraint, visitor, ts.isTypeNode), visitNode(node.default, visitor, ts.isTypeNode));
- case 148:
- 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 149:
- 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 151:
- 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 152:
- 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 153:
- 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 154:
- 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 174:
return ts.updateObjectBindingPattern(node, nodesVisitor(node.elements, visitor, ts.isBindingElement));
case 175:
@@ -39565,9 +41133,9 @@ var ts;
case 185:
return ts.updateParen(node, visitNode(node.expression, visitor, ts.isExpression));
case 186:
- 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));
+ 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.isTypeParameterDeclaration), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context));
case 187:
- 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));
+ return ts.updateArrowFunction(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context));
case 188:
return ts.updateDelete(node, visitNode(node.expression, visitor, ts.isExpression));
case 189:
@@ -39576,12 +41144,12 @@ var ts;
return ts.updateVoid(node, visitNode(node.expression, visitor, ts.isExpression));
case 191:
return ts.updateAwait(node, visitNode(node.expression, visitor, ts.isExpression));
- case 194:
- return ts.updateBinary(node, visitNode(node.left, visitor, ts.isExpression), visitNode(node.right, visitor, ts.isExpression));
case 192:
return ts.updatePrefix(node, visitNode(node.operand, visitor, ts.isExpression));
case 193:
return ts.updatePostfix(node, visitNode(node.operand, visitor, ts.isExpression));
+ case 194:
+ return ts.updateBinary(node, visitNode(node.left, visitor, ts.isExpression), visitNode(node.right, visitor, ts.isExpression), visitNode(node.operatorToken, visitor, ts.isToken));
case 195:
return ts.updateConditional(node, visitNode(node.condition, visitor, ts.isExpression), visitNode(node.whenTrue, visitor, ts.isExpression), visitNode(node.whenFalse, visitor, ts.isExpression));
case 196:
@@ -39591,13 +41159,15 @@ var ts;
case 198:
return ts.updateSpread(node, visitNode(node.expression, visitor, ts.isExpression));
case 199:
- 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));
+ return ts.updateClassExpression(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.heritageClauses, visitor, ts.isHeritageClause), nodesVisitor(node.members, visitor, ts.isClassElement));
case 201:
return ts.updateExpressionWithTypeArguments(node, nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), visitNode(node.expression, visitor, ts.isExpression));
case 202:
return ts.updateAsExpression(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.type, visitor, ts.isTypeNode));
case 203:
return ts.updateNonNullExpression(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 204:
+ return ts.updateMetaProperty(node, visitNode(node.name, visitor, ts.isIdentifier));
case 205:
return ts.updateTemplateSpan(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.literal, visitor, ts.isTemplateMiddleOrTemplateTail));
case 207:
@@ -39639,9 +41209,13 @@ var ts;
case 227:
return ts.updateVariableDeclarationList(node, nodesVisitor(node.declarations, visitor, ts.isVariableDeclaration));
case 228:
- 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));
+ 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.isTypeParameterDeclaration), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context));
case 229:
- 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));
+ 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.isTypeParameterDeclaration), nodesVisitor(node.heritageClauses, visitor, ts.isHeritageClause), nodesVisitor(node.members, visitor, ts.isClassElement));
+ case 230:
+ return ts.updateInterfaceDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.heritageClauses, visitor, ts.isHeritageClause), nodesVisitor(node.members, visitor, ts.isTypeElement));
+ case 231:
+ return ts.updateTypeAliasDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), visitNode(node.type, visitor, ts.isTypeNode));
case 232:
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 233:
@@ -39650,6 +41224,8 @@ var ts;
return ts.updateModuleBlock(node, nodesVisitor(node.statements, visitor, ts.isStatement));
case 235:
return ts.updateCaseBlock(node, nodesVisitor(node.clauses, visitor, ts.isCaseOrDefaultClause));
+ case 236:
+ return ts.updateNamespaceExportDeclaration(node, visitNode(node.name, visitor, ts.isIdentifier));
case 237:
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 238:
@@ -39674,8 +41250,6 @@ var ts;
return ts.updateExternalModuleReference(node, visitNode(node.expression, visitor, ts.isExpression));
case 249:
return ts.updateJsxElement(node, visitNode(node.openingElement, visitor, ts.isJsxOpeningElement), nodesVisitor(node.children, visitor, ts.isJsxChild), visitNode(node.closingElement, visitor, ts.isJsxClosingElement));
- case 254:
- return ts.updateJsxAttributes(node, nodesVisitor(node.properties, visitor, ts.isJsxAttributeLike));
case 250:
return ts.updateJsxSelfClosingElement(node, visitNode(node.tagName, visitor, ts.isJsxTagNameExpression), visitNode(node.attributes, visitor, ts.isJsxAttributes));
case 251:
@@ -39684,6 +41258,8 @@ var ts;
return ts.updateJsxClosingElement(node, visitNode(node.tagName, visitor, ts.isJsxTagNameExpression));
case 253:
return ts.updateJsxAttribute(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.initializer, visitor, ts.isStringLiteralOrJsxExpression));
+ case 254:
+ return ts.updateJsxAttributes(node, nodesVisitor(node.properties, visitor, ts.isJsxAttributeLike));
case 255:
return ts.updateJsxSpreadAttribute(node, visitNode(node.expression, visitor, ts.isExpression));
case 256:
@@ -39706,8 +41282,10 @@ var ts;
return ts.updateEnumMember(node, visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.initializer, visitor, ts.isExpression));
case 265:
return ts.updateSourceFileNode(node, visitLexicalEnvironment(node.statements, visitor, context));
- case 296:
+ case 297:
return ts.updatePartiallyEmittedExpression(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 298:
+ return ts.updateCommaList(node, nodesVisitor(node.elements, visitor, ts.isExpression));
default:
return node;
}
@@ -39744,7 +41322,7 @@ var ts;
case 209:
case 200:
case 225:
- case 295:
+ case 296:
break;
case 143:
result = reduceNode(node.left, cbNode, result);
@@ -39763,6 +41341,13 @@ var ts;
case 147:
result = reduceNode(node.expression, cbNode, result);
break;
+ case 148:
+ result = reduceNodes(node.modifiers, cbNodes, result);
+ result = reduceNode(node.name, cbNode, result);
+ result = reduceNode(node.questionToken, cbNode, result);
+ result = reduceNode(node.type, cbNode, result);
+ result = reduceNode(node.initializer, cbNode, result);
+ break;
case 149:
result = reduceNodes(node.decorators, cbNodes, result);
result = reduceNodes(node.modifiers, cbNodes, result);
@@ -40098,9 +41683,12 @@ var ts;
case 265:
result = reduceNodes(node.statements, cbNodes, result);
break;
- case 296:
+ case 297:
result = reduceNode(node.expression, cbNode, result);
break;
+ case 298:
+ result = reduceNodes(node.elements, cbNodes, result);
+ break;
default:
break;
}
@@ -40164,37 +41752,65 @@ var ts;
}
var Debug;
(function (Debug) {
+ var isDebugInfoEnabled = false;
Debug.failBadSyntaxKind = Debug.shouldAssert(1)
- ? function (node, message) { return Debug.assert(false, message || "Unexpected node.", function () { return "Node " + ts.formatSyntaxKind(node.kind) + " was unexpected."; }); }
+ ? function (node, message) { return Debug.fail((message || "Unexpected node.") + "\r\nNode " + ts.formatSyntaxKind(node.kind) + " was unexpected.", Debug.failBadSyntaxKind); }
: ts.noop;
Debug.assertEachNode = Debug.shouldAssert(1)
- ? function (nodes, test, message) { return Debug.assert(test === undefined || ts.every(nodes, test), message || "Unexpected node.", function () { return "Node array did not pass test '" + getFunctionName(test) + "'."; }); }
+ ? function (nodes, test, message) { return Debug.assert(test === undefined || ts.every(nodes, test), message || "Unexpected node.", function () { return "Node array did not pass test '" + Debug.getFunctionName(test) + "'."; }, Debug.assertEachNode); }
: ts.noop;
Debug.assertNode = Debug.shouldAssert(1)
- ? function (node, test, message) { return Debug.assert(test === undefined || test(node), message || "Unexpected node.", function () { return "Node " + ts.formatSyntaxKind(node.kind) + " did not pass test '" + getFunctionName(test) + "'."; }); }
+ ? function (node, test, message) { return Debug.assert(test === undefined || test(node), message || "Unexpected node.", function () { return "Node " + ts.formatSyntaxKind(node.kind) + " did not pass test '" + Debug.getFunctionName(test) + "'."; }, Debug.assertNode); }
: ts.noop;
Debug.assertOptionalNode = Debug.shouldAssert(1)
- ? function (node, test, message) { return Debug.assert(test === undefined || node === undefined || test(node), message || "Unexpected node.", function () { return "Node " + ts.formatSyntaxKind(node.kind) + " did not pass test '" + getFunctionName(test) + "'."; }); }
+ ? function (node, test, message) { return Debug.assert(test === undefined || node === undefined || test(node), message || "Unexpected node.", function () { return "Node " + ts.formatSyntaxKind(node.kind) + " did not pass test '" + Debug.getFunctionName(test) + "'."; }, Debug.assertOptionalNode); }
: ts.noop;
Debug.assertOptionalToken = Debug.shouldAssert(1)
- ? function (node, kind, message) { return Debug.assert(kind === undefined || node === undefined || node.kind === kind, message || "Unexpected node.", function () { return "Node " + ts.formatSyntaxKind(node.kind) + " was not a '" + ts.formatSyntaxKind(kind) + "' token."; }); }
+ ? function (node, kind, message) { return Debug.assert(kind === undefined || node === undefined || node.kind === kind, message || "Unexpected node.", function () { return "Node " + ts.formatSyntaxKind(node.kind) + " was not a '" + ts.formatSyntaxKind(kind) + "' token."; }, Debug.assertOptionalToken); }
: ts.noop;
Debug.assertMissingNode = Debug.shouldAssert(1)
- ? function (node, message) { return Debug.assert(node === undefined, message || "Unexpected node.", function () { return "Node " + ts.formatSyntaxKind(node.kind) + " was unexpected'."; }); }
+ ? function (node, message) { return Debug.assert(node === undefined, message || "Unexpected node.", function () { return "Node " + ts.formatSyntaxKind(node.kind) + " was unexpected'."; }, Debug.assertMissingNode); }
: ts.noop;
- function getFunctionName(func) {
- if (typeof func !== "function") {
- return "";
- }
- else if (func.hasOwnProperty("name")) {
- return func.name;
- }
- else {
- var text = Function.prototype.toString.call(func);
- var match = /^function\s+([\w\$]+)\s*\(/.exec(text);
- return match ? match[1] : "";
+ function enableDebugInfo() {
+ if (isDebugInfoEnabled)
+ return;
+ Object.defineProperties(ts.objectAllocator.getSymbolConstructor().prototype, {
+ "__debugFlags": { get: function () { return ts.formatSymbolFlags(this.flags); } }
+ });
+ Object.defineProperties(ts.objectAllocator.getTypeConstructor().prototype, {
+ "__debugFlags": { get: function () { return ts.formatTypeFlags(this.flags); } },
+ "__debugObjectFlags": { get: function () { return this.flags & 32768 ? ts.formatObjectFlags(this.objectFlags) : ""; } },
+ "__debugTypeToString": { value: function () { return this.checker.typeToString(this); } },
+ });
+ var nodeConstructors = [
+ ts.objectAllocator.getNodeConstructor(),
+ ts.objectAllocator.getIdentifierConstructor(),
+ ts.objectAllocator.getTokenConstructor(),
+ ts.objectAllocator.getSourceFileConstructor()
+ ];
+ for (var _i = 0, nodeConstructors_1 = nodeConstructors; _i < nodeConstructors_1.length; _i++) {
+ var ctor = nodeConstructors_1[_i];
+ if (!ctor.prototype.hasOwnProperty("__debugKind")) {
+ Object.defineProperties(ctor.prototype, {
+ "__debugKind": { get: function () { return ts.formatSyntaxKind(this.kind); } },
+ "__debugModifierFlags": { get: function () { return ts.formatModifierFlags(ts.getModifierFlagsNoCache(this)); } },
+ "__debugTransformFlags": { get: function () { return ts.formatTransformFlags(this.transformFlags); } },
+ "__debugEmitFlags": { get: function () { return ts.formatEmitFlags(ts.getEmitFlags(this)); } },
+ "__debugGetText": {
+ value: function (includeTrivia) {
+ if (ts.nodeIsSynthesized(this))
+ return "";
+ var parseNode = ts.getParseTreeNode(this);
+ var sourceFile = parseNode && ts.getSourceFileOfNode(parseNode);
+ return sourceFile ? ts.getSourceTextOfNodeFromSourceFile(sourceFile, parseNode, includeTrivia) : "";
+ }
+ }
+ });
+ }
}
+ isDebugInfoEnabled = true;
}
+ Debug.enableDebugInfo = enableDebugInfo;
})(Debug = ts.Debug || (ts.Debug = {}));
})(ts || (ts = {}));
var ts;
@@ -40540,7 +42156,7 @@ var ts;
var applicableSubstitutions;
return transformSourceFile;
function transformSourceFile(node) {
- if (ts.isDeclarationFile(node)) {
+ if (node.isDeclarationFile) {
return node;
}
currentSourceFile = node;
@@ -40698,6 +42314,7 @@ var ts;
case 147:
case 231:
case 149:
+ case 236:
return undefined;
case 152:
return visitConstructor(node);
@@ -40769,45 +42386,87 @@ var ts;
function shouldEmitDecorateCallForParameter(parameter) {
return parameter.decorators !== undefined && parameter.decorators.length > 0;
}
+ function getClassFacts(node, staticProperties) {
+ var facts = 0;
+ if (ts.some(staticProperties))
+ facts |= 1;
+ if (ts.getClassExtendsHeritageClauseElement(node))
+ facts |= 64;
+ if (shouldEmitDecorateCallForClass(node))
+ facts |= 2;
+ if (ts.childIsDecorated(node))
+ facts |= 4;
+ if (isExportOfNamespace(node))
+ facts |= 8;
+ else if (isDefaultExternalModuleExport(node))
+ facts |= 32;
+ else if (isNamedExternalModuleExport(node))
+ facts |= 16;
+ if (languageVersion <= 1 && (facts & 7))
+ facts |= 128;
+ return facts;
+ }
function visitClassDeclaration(node) {
var staticProperties = getInitializedProperties(node, true);
- var hasExtendsClause = ts.getClassExtendsHeritageClauseElement(node) !== undefined;
- var isDecoratedClass = shouldEmitDecorateCallForClass(node);
- var name = node.name;
- if (!name && (staticProperties.length > 0 || ts.childIsDecorated(node))) {
- name = ts.getGeneratedNameForNode(node);
- }
- var classStatement = isDecoratedClass
- ? createClassDeclarationHeadWithDecorators(node, name, hasExtendsClause)
- : createClassDeclarationHeadWithoutDecorators(node, name, hasExtendsClause, staticProperties.length > 0);
+ var facts = getClassFacts(node, staticProperties);
+ if (facts & 128) {
+ context.startLexicalEnvironment();
+ }
+ var name = node.name || (facts & 5 ? ts.getGeneratedNameForNode(node) : undefined);
+ var classStatement = facts & 2
+ ? createClassDeclarationHeadWithDecorators(node, name, facts)
+ : createClassDeclarationHeadWithoutDecorators(node, name, facts);
var statements = [classStatement];
- if (staticProperties.length) {
- addInitializedPropertyStatements(statements, staticProperties, ts.getLocalName(node));
+ if (facts & 1) {
+ addInitializedPropertyStatements(statements, staticProperties, facts & 128 ? ts.getInternalName(node) : ts.getLocalName(node));
}
addClassElementDecorationStatements(statements, node, false);
addClassElementDecorationStatements(statements, node, true);
addConstructorDecorationStatement(statements, node);
- if (isNamespaceExport(node)) {
+ if (facts & 128) {
+ var closingBraceLocation = ts.createTokenRange(ts.skipTrivia(currentSourceFile.text, node.members.end), 18);
+ var localName = ts.getInternalName(node);
+ var outer = ts.createPartiallyEmittedExpression(localName);
+ outer.end = closingBraceLocation.end;
+ ts.setEmitFlags(outer, 1536);
+ var statement = ts.createReturn(outer);
+ statement.pos = closingBraceLocation.pos;
+ ts.setEmitFlags(statement, 1536 | 384);
+ statements.push(statement);
+ ts.addRange(statements, context.endLexicalEnvironment());
+ var varStatement = ts.createVariableStatement(undefined, ts.createVariableDeclarationList([
+ ts.createVariableDeclaration(ts.getLocalName(node, false, false), undefined, ts.createImmediatelyInvokedFunctionExpression(statements))
+ ]));
+ ts.setOriginalNode(varStatement, node);
+ ts.setCommentRange(varStatement, node);
+ ts.setSourceMapRange(varStatement, ts.moveRangePastDecorators(node));
+ ts.startOnNewLine(varStatement);
+ statements = [varStatement];
+ }
+ if (facts & 8) {
addExportMemberAssignment(statements, node);
}
- else if (isDecoratedClass) {
- if (isDefaultExternalModuleExport(node)) {
+ else if (facts & 128 || facts & 2) {
+ if (facts & 32) {
statements.push(ts.createExportDefault(ts.getLocalName(node, false, true)));
}
- else if (isNamedExternalModuleExport(node)) {
+ else if (facts & 16) {
statements.push(ts.createExternalModuleExport(ts.getLocalName(node, false, true)));
}
}
if (statements.length > 1) {
statements.push(ts.createEndOfDeclarationMarker(node));
- ts.setEmitFlags(classStatement, ts.getEmitFlags(classStatement) | 2097152);
+ ts.setEmitFlags(classStatement, ts.getEmitFlags(classStatement) | 4194304);
}
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));
+ function createClassDeclarationHeadWithoutDecorators(node, name, facts) {
+ var modifiers = !(facts & 128)
+ ? ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier)
+ : undefined;
+ var classDeclaration = ts.createClassDeclaration(undefined, modifiers, name, undefined, ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause), transformClassMembers(node, (facts & 64) !== 0));
var emitFlags = ts.getEmitFlags(node);
- if (hasStaticProperties) {
+ if (facts & 1) {
emitFlags |= 32;
}
ts.setTextRange(classDeclaration, node);
@@ -40815,12 +42474,12 @@ var ts;
ts.setEmitFlags(classDeclaration, emitFlags);
return classDeclaration;
}
- function createClassDeclarationHeadWithDecorators(node, name, hasExtendsClause) {
+ function createClassDeclarationHeadWithDecorators(node, name, facts) {
var location = ts.moveRangePastDecorators(node);
var classAlias = getClassAliasIfNeeded(node);
var declName = ts.getLocalName(node, false, true);
var heritageClauses = ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause);
- var members = transformClassMembers(node, hasExtendsClause);
+ var members = transformClassMembers(node, (facts & 64) !== 0);
var classExpression = ts.createClassExpression(undefined, name, undefined, heritageClauses, members);
ts.setOriginalNode(classExpression, node);
ts.setTextRange(classExpression, location);
@@ -40846,7 +42505,7 @@ var ts;
enableSubstitutionForClassAliases();
classAliases[ts.getOriginalNodeId(node)] = ts.getSynthesizedClone(temp);
}
- ts.setEmitFlags(classExpression, 32768 | ts.getEmitFlags(classExpression));
+ ts.setEmitFlags(classExpression, 65536 | ts.getEmitFlags(classExpression));
expressions.push(ts.startOnNewLine(ts.createAssignment(temp, classExpression)));
ts.addRange(expressions, generateInitializedPropertyExpressions(staticProperties, temp));
expressions.push(ts.startOnNewLine(temp));
@@ -41074,8 +42733,8 @@ var ts;
function generateClassElementDecorationExpressions(node, isStatic) {
var members = getDecoratedClassElements(node, isStatic);
var expressions;
- for (var _i = 0, members_2 = members; _i < members_2.length; _i++) {
- var member = members_2[_i];
+ for (var _i = 0, members_3 = members; _i < members_3.length; _i++) {
+ var member = members_3[_i];
var expression = generateClassElementDecorationExpression(node, member);
if (expression) {
if (!expressions) {
@@ -41329,15 +42988,10 @@ var ts;
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") {
+ if (ts.isIdentifier(serializedIndividual) && serializedIndividual.text === "Object") {
return serializedIndividual;
}
- else if (serializedUnion && !ts.isVoidExpression(serializedUnion)) {
+ else if (serializedUnion) {
if (!ts.isIdentifier(serializedUnion) ||
!ts.isIdentifier(serializedIndividual) ||
serializedUnion.text !== serializedIndividual.text) {
@@ -41502,7 +43156,7 @@ var ts;
return ts.createNotEmittedStatement(node);
}
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)) {
+ if (isExportOfNamespace(node)) {
var statements = [updated];
addExportMemberAssignment(statements, node);
return statements;
@@ -41533,7 +43187,7 @@ var ts;
return parameter;
}
function visitVariableStatement(node) {
- if (isNamespaceExport(node)) {
+ if (isExportOfNamespace(node)) {
var variables = ts.getInitializedVariables(node.declarationList);
if (variables.length === 0) {
return undefined;
@@ -41624,7 +43278,12 @@ var ts;
}
function transformEnumMember(member) {
var name = getExpressionForPropertyName(member, false);
- return ts.setTextRange(ts.createStatement(ts.setTextRange(ts.createAssignment(ts.createElementAccess(currentNamespaceContainerName, ts.createAssignment(ts.createElementAccess(currentNamespaceContainerName, name), transformEnumMemberDeclarationValue(member))), name), member)), member);
+ var valueExpression = transformEnumMemberDeclarationValue(member);
+ var innerAssignment = ts.createAssignment(ts.createElementAccess(currentNamespaceContainerName, name), valueExpression);
+ var outerAssignment = valueExpression.kind === 9 ?
+ innerAssignment :
+ ts.createAssignment(ts.createElementAccess(currentNamespaceContainerName, innerAssignment), name);
+ return ts.setTextRange(ts.createStatement(ts.setTextRange(outerAssignment, member)), member);
}
function transformEnumMemberDeclarationValue(member) {
var value = resolver.getConstantValue(member);
@@ -41645,7 +43304,7 @@ var ts;
return ts.isInstantiatedModule(node, compilerOptions.preserveConstEnums || compilerOptions.isolatedModules);
}
function hasNamespaceQualifiedExportName(node) {
- return isNamespaceExport(node)
+ return isExportOfNamespace(node)
|| (isExternalModuleExport(node)
&& moduleKind !== ts.ModuleKind.ES2015
&& moduleKind !== ts.ModuleKind.System);
@@ -41671,9 +43330,9 @@ var ts;
return false;
}
function addVarForEnumOrModuleDeclaration(statements, node) {
- var statement = ts.createVariableStatement(ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), [
+ var statement = ts.createVariableStatement(ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), ts.createVariableDeclarationList([
ts.createVariableDeclaration(ts.getLocalName(node, false, true))
- ]);
+ ], currentScope.kind === 265 ? 0 : 1));
ts.setOriginalNode(statement, node);
recordEmittedDeclarationInScope(node);
if (isFirstEmittedDeclarationInScope(node)) {
@@ -41684,13 +43343,13 @@ var ts;
ts.setSourceMapRange(statement, node);
}
ts.setCommentRange(statement, node);
- ts.setEmitFlags(statement, 1024 | 2097152);
+ ts.setEmitFlags(statement, 1024 | 4194304);
statements.push(statement);
return true;
}
else {
var mergeMarker = ts.createMergeDeclarationMarker(statement);
- ts.setEmitFlags(mergeMarker, 1536 | 2097152);
+ ts.setEmitFlags(mergeMarker, 1536 | 4194304);
statements.push(mergeMarker);
return false;
}
@@ -41806,7 +43465,7 @@ var ts;
}
function visitExportDeclaration(node) {
if (!node.exportClause) {
- return resolver.moduleExportsSomeValue(node.moduleSpecifier) ? node : undefined;
+ return compilerOptions.isolatedModules || resolver.moduleExportsSomeValue(node.moduleSpecifier) ? node : undefined;
}
if (!resolver.isValueAliasDeclaration(node)) {
return undefined;
@@ -41839,7 +43498,7 @@ var ts;
}
var moduleReference = ts.createExpressionFromEntityName(node.moduleReference);
ts.setEmitFlags(moduleReference, 1536 | 2048);
- if (isNamedExternalModuleExport(node) || !isNamespaceExport(node)) {
+ if (isNamedExternalModuleExport(node) || !isExportOfNamespace(node)) {
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);
@@ -41848,7 +43507,7 @@ var ts;
return ts.setOriginalNode(createNamespaceExport(node.name, moduleReference, node), node);
}
}
- function isNamespaceExport(node) {
+ function isExportOfNamespace(node) {
return currentNamespace !== undefined && ts.hasModifier(node, 1);
}
function isExternalModuleExport(node) {
@@ -41996,10 +43655,10 @@ var ts;
if (declaration) {
var classAlias = classAliases[declaration.id];
if (classAlias) {
- var clone_2 = ts.getSynthesizedClone(classAlias);
- ts.setSourceMapRange(clone_2, node);
- ts.setCommentRange(clone_2, node);
- return clone_2;
+ var clone_1 = ts.getSynthesizedClone(classAlias);
+ ts.setSourceMapRange(clone_1, node);
+ ts.setCommentRange(clone_1, node);
+ return clone_1;
}
}
}
@@ -42112,7 +43771,7 @@ var ts;
context.onSubstituteNode = onSubstituteNode;
return transformSourceFile;
function transformSourceFile(node) {
- if (ts.isDeclarationFile(node)) {
+ if (node.isDeclarationFile) {
return node;
}
currentSourceFile = node;
@@ -42318,7 +43977,7 @@ var ts;
function createAwaiterHelper(context, hasLexicalArguments, promiseConstructor, body) {
context.requestEmitHelper(awaiterHelper);
var generatorFunc = ts.createFunctionExpression(undefined, ts.createToken(39), undefined, undefined, [], undefined, body);
- (generatorFunc.emitNode || (generatorFunc.emitNode = {})).flags |= 131072;
+ (generatorFunc.emitNode || (generatorFunc.emitNode = {})).flags |= 262144;
return ts.createCall(ts.getHelperName("__awaiter"), undefined, [
ts.createThis(),
hasLexicalArguments ? ts.createIdentifier("arguments") : ts.createVoidZero(),
@@ -42353,7 +44012,7 @@ var ts;
var enclosingSuperContainerFlags = 0;
return transformSourceFile;
function transformSourceFile(node) {
- if (ts.isDeclarationFile(node)) {
+ if (node.isDeclarationFile) {
return node;
}
var visited = ts.visitEachChild(node, visitor, context);
@@ -42421,19 +44080,14 @@ var ts;
}
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.setOriginalNode(ts.setTextRange(ts.createYield(createAwaitHelper(context, ts.visitNode(node.expression, visitor, ts.isExpression))), node), node);
}
return ts.visitEachChild(node, visitor, context);
}
function visitYieldExpression(node) {
- if (enclosingFunctionFlags & 2 && enclosingFunctionFlags & 1) {
+ if (enclosingFunctionFlags & 2 && enclosingFunctionFlags & 1 && node.asteriskToken) {
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.setOriginalNode(ts.setTextRange(ts.createYield(createAwaitHelper(context, ts.updateYield(node, node.asteriskToken, createAsyncDelegatorHelper(context, createAsyncValuesHelper(context, expression, expression), expression)))), node), node);
}
return ts.visitEachChild(node, visitor, context);
}
@@ -42560,6 +44214,11 @@ var ts;
}
return ts.setEmitFlags(ts.setTextRange(ts.createBlock(ts.setTextRange(ts.createNodeArray(statements), statementsLocation), true), bodyLocation), 48 | 384);
}
+ function createDownlevelAwait(expression) {
+ return enclosingFunctionFlags & 1
+ ? ts.createYield(undefined, createAwaitHelper(context, expression))
+ : ts.createAwait(expression);
+ }
function transformForAwaitOfStatement(node, outermostLabeledStatement) {
var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
var iterator = ts.isIdentifier(expression) ? ts.getGeneratedNameForNode(expression) : ts.createTempVariable(undefined);
@@ -42567,19 +44226,17 @@ var ts;
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, []));
+ var callValues = createAsyncValuesHelper(context, expression, node.expression);
+ var callNext = ts.createCall(ts.createPropertyAccess(iterator, "next"), undefined, []);
+ var getDone = ts.createPropertyAccess(result, "done");
+ var getValue = ts.createPropertyAccess(result, "value");
+ var callReturn = ts.createFunctionCall(returnMethod, iterator, []);
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);
+ ts.setTextRange(ts.createVariableDeclaration(iterator, undefined, callValues), node.expression),
+ ts.createVariableDeclaration(result)
+ ]), node.expression), 2097152), ts.createComma(ts.createAssignment(result, createDownlevelAwait(callNext)), ts.createLogicalNot(getDone)), undefined, convertForOfStatementHead(node, createDownlevelAwait(getValue))), node), 256);
return ts.createTry(ts.createBlock([
ts.restoreEnclosingLabel(forStatement, outermostLabeledStatement)
]), ts.createCatchClause(ts.createVariableDeclaration(catchVariable), ts.setEmitFlags(ts.createBlock([
@@ -42588,12 +44245,7 @@ var ts;
])))
]), 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)
+ ts.setEmitFlags(ts.createIf(ts.createLogicalAnd(ts.createLogicalAnd(result, ts.createLogicalNot(getDone)), ts.createAssignment(returnMethod, ts.createPropertyAccess(iterator, "return"))), ts.createStatement(createDownlevelAwait(callReturn))), 1)
]), undefined, ts.setEmitFlags(ts.createBlock([
ts.setEmitFlags(ts.createIf(errorRecord, ts.createThrow(ts.createPropertyAccess(errorRecord, "error"))), 1)
]), 1))
@@ -42718,7 +44370,7 @@ var ts;
var declarations = ts.flattenDestructuringBinding(parameter, visitor, context, 1, temp, false, true);
if (ts.some(declarations)) {
var statement = ts.createVariableStatement(undefined, ts.createVariableDeclarationList(declarations));
- ts.setEmitFlags(statement, 524288);
+ ts.setEmitFlags(statement, 1048576);
statements = ts.append(statements, statement);
}
}
@@ -42825,14 +44477,24 @@ var ts;
return ts.createCall(ts.getHelperName("__assign"), undefined, attributesSegments);
}
ts.createAssignHelper = createAssignHelper;
+ var awaitHelper = {
+ name: "typescript:await",
+ scoped: false,
+ text: "\n var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); }\n "
+ };
+ function createAwaitHelper(context, expression) {
+ context.requestEmitHelper(awaitHelper);
+ return ts.createCall(ts.getHelperName("__await"), undefined, [expression]);
+ }
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\" ? send : fulfill, reject); }\n function send(value) { settle(c[2], { value: 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 "
+ 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 || []), i, q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n };\n "
};
function createAsyncGeneratorHelper(context, generatorFunc) {
+ context.requestEmitHelper(awaitHelper);
context.requestEmitHelper(asyncGeneratorHelper);
- (generatorFunc.emitNode || (generatorFunc.emitNode = {})).flags |= 131072;
+ (generatorFunc.emitNode || (generatorFunc.emitNode = {})).flags |= 262144;
return ts.createCall(ts.getHelperName("__asyncGenerator"), undefined, [
ts.createThis(),
ts.createIdentifier("arguments"),
@@ -42842,11 +44504,11 @@ var ts;
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 }; }) }, p;\n return o = __asyncValues(o), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { return function (v) { return v = p && n === \"throw\" ? f(v) : p && v.done ? v : { value: p ? [\"yield\", v.value] : [\"await\", (o[n] || f).call(o, v)], done: false }, p = !p, v; }; }\n };\n "
+ text: "\n var __asyncDelegator = (this && this.__asyncDelegator) || function (o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { if (o[n]) i[n] = function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; }; }\n };\n "
};
function createAsyncDelegatorHelper(context, expression, location) {
+ context.requestEmitHelper(awaitHelper);
context.requestEmitHelper(asyncDelegator);
- context.requestEmitHelper(asyncValues);
return ts.setTextRange(ts.createCall(ts.getHelperName("__asyncDelegator"), undefined, [expression]), location);
}
var asyncValues = {
@@ -42865,7 +44527,7 @@ var ts;
var compilerOptions = context.getCompilerOptions();
return transformSourceFile;
function transformSourceFile(node) {
- if (ts.isDeclarationFile(node)) {
+ if (node.isDeclarationFile) {
return node;
}
var visited = ts.visitEachChild(node, visitor, context);
@@ -43303,7 +44965,7 @@ var ts;
var hoistVariableDeclaration = context.hoistVariableDeclaration;
return transformSourceFile;
function transformSourceFile(node) {
- if (ts.isDeclarationFile(node)) {
+ if (node.isDeclarationFile) {
return node;
}
return ts.visitEachChild(node, visitor, context);
@@ -43376,7 +45038,7 @@ var ts;
var enabledSubstitutions;
return transformSourceFile;
function transformSourceFile(node) {
- if (ts.isDeclarationFile(node)) {
+ if (node.isDeclarationFile) {
return node;
}
currentSourceFile = node;
@@ -43401,11 +45063,58 @@ var ts;
&& node.kind === 219
&& !node.expression;
}
+ function isClassLikeVariableStatement(node) {
+ if (!ts.isVariableStatement(node))
+ return false;
+ var variable = ts.singleOrUndefined(node.declarationList.declarations);
+ return variable
+ && variable.initializer
+ && ts.isIdentifier(variable.name)
+ && (ts.isClassLike(variable.initializer)
+ || (ts.isAssignmentExpression(variable.initializer)
+ && ts.isIdentifier(variable.initializer.left)
+ && ts.isClassLike(variable.initializer.right)));
+ }
+ function isTypeScriptClassWrapper(node) {
+ var call = ts.tryCast(node, ts.isCallExpression);
+ if (!call || ts.isParseTreeNode(call) ||
+ ts.some(call.typeArguments) ||
+ ts.some(call.arguments)) {
+ return false;
+ }
+ var func = ts.tryCast(ts.skipOuterExpressions(call.expression), ts.isFunctionExpression);
+ if (!func || ts.isParseTreeNode(func) ||
+ ts.some(func.typeParameters) ||
+ ts.some(func.parameters) ||
+ func.type ||
+ !func.body) {
+ return false;
+ }
+ var statements = func.body.statements;
+ if (statements.length < 2) {
+ return false;
+ }
+ var firstStatement = statements[0];
+ if (ts.isParseTreeNode(firstStatement) ||
+ !ts.isClassLike(firstStatement) &&
+ !isClassLikeVariableStatement(firstStatement)) {
+ return false;
+ }
+ var lastStatement = ts.elementAt(statements, -1);
+ var returnStatement = ts.tryCast(ts.isVariableStatement(lastStatement) ? ts.elementAt(statements, -2) : lastStatement, ts.isReturnStatement);
+ if (!returnStatement ||
+ !returnStatement.expression ||
+ !ts.isIdentifier(ts.skipOuterExpressions(returnStatement.expression))) {
+ return false;
+ }
+ return true;
+ }
function shouldVisitNode(node) {
return (node.transformFlags & 128) !== 0
|| convertedLoopState !== undefined
|| (hierarchyFacts & 4096 && ts.isStatement(node))
- || (ts.isIterationStatement(node, false) && shouldConvertIterationStatementBody(node));
+ || (ts.isIterationStatement(node, false) && shouldConvertIterationStatementBody(node))
+ || isTypeScriptClassWrapper(node);
}
function visitor(node) {
if (shouldVisitNode(node)) {
@@ -43659,9 +45368,9 @@ var ts;
statements.push(exportStatement);
}
var emitFlags = ts.getEmitFlags(node);
- if ((emitFlags & 2097152) === 0) {
+ if ((emitFlags & 4194304) === 0) {
statements.push(ts.createEndOfDeclarationMarker(node));
- ts.setEmitFlags(statement, emitFlags | 2097152);
+ ts.setEmitFlags(statement, emitFlags | 4194304);
}
return ts.singleOrMany(statements);
}
@@ -43674,8 +45383,8 @@ var ts;
}
var extendsClauseElement = ts.getClassExtendsHeritageClauseElement(node);
var classFunction = ts.createFunctionExpression(undefined, undefined, undefined, undefined, extendsClauseElement ? [ts.createParameter(undefined, undefined, undefined, "_super")] : [], undefined, transformClassBody(node, extendsClauseElement));
- if (ts.getEmitFlags(node) & 32768) {
- ts.setEmitFlags(classFunction, 32768);
+ if (ts.getEmitFlags(node) & 65536) {
+ ts.setEmitFlags(classFunction, 65536);
}
var inner = ts.createPartiallyEmittedExpression(classFunction);
inner.end = node.end;
@@ -43694,7 +45403,7 @@ var ts;
addConstructor(statements, node, extendsClauseElement);
addClassMembers(statements, node);
var closingBraceLocation = ts.createTokenRange(ts.skipTrivia(currentText, node.members.end), 18);
- var localName = ts.getLocalName(node);
+ var localName = ts.getInternalName(node);
var outer = ts.createPartiallyEmittedExpression(localName);
outer.end = closingBraceLocation.end;
ts.setEmitFlags(outer, 1536);
@@ -43718,7 +45427,7 @@ var ts;
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));
+ var constructorFunction = ts.createFunctionDeclaration(undefined, undefined, undefined, ts.getInternalName(node), undefined, transformConstructorParameters(constructor, hasSynthesizedSuper), undefined, transformConstructorBody(constructor, node, extendsClauseElement, hasSynthesizedSuper));
ts.setTextRange(constructorFunction, constructor || node);
if (extendsClauseElement) {
ts.setEmitFlags(constructorFunction, 8);
@@ -43882,10 +45591,10 @@ var ts;
function addDefaultValueAssignmentForBindingPattern(statements, parameter, name, initializer) {
var temp = ts.getGeneratedNameForNode(parameter);
if (name.elements.length > 0) {
- statements.push(ts.setEmitFlags(ts.createVariableStatement(undefined, ts.createVariableDeclarationList(ts.flattenDestructuringBinding(parameter, visitor, context, 0, temp))), 524288));
+ statements.push(ts.setEmitFlags(ts.createVariableStatement(undefined, ts.createVariableDeclarationList(ts.flattenDestructuringBinding(parameter, visitor, context, 0, temp))), 1048576));
}
else if (initializer) {
- statements.push(ts.setEmitFlags(ts.createStatement(ts.createAssignment(temp, ts.visitNode(initializer, visitor, ts.isExpression))), 524288));
+ statements.push(ts.setEmitFlags(ts.createStatement(ts.createAssignment(temp, ts.visitNode(initializer, visitor, ts.isExpression))), 1048576));
}
}
function addDefaultValueAssignmentForInitializer(statements, parameter, name, initializer) {
@@ -43895,7 +45604,7 @@ var ts;
]), parameter), 1 | 32 | 384));
statement.startsOnNewLine = true;
ts.setTextRange(statement, parameter);
- ts.setEmitFlags(statement, 384 | 32 | 524288);
+ ts.setEmitFlags(statement, 384 | 32 | 1048576);
statements.push(statement);
}
function shouldAddRestParameter(node, inConstructorWithSynthesizedSuper) {
@@ -43913,7 +45622,7 @@ var ts;
var temp = ts.createLoopVariable();
statements.push(ts.setEmitFlags(ts.setTextRange(ts.createVariableStatement(undefined, ts.createVariableDeclarationList([
ts.createVariableDeclaration(declarationName, undefined, ts.createArrayLiteral([]))
- ])), parameter), 524288));
+ ])), parameter), 1048576));
var forStatement = ts.createFor(ts.setTextRange(ts.createVariableDeclarationList([
ts.createVariableDeclaration(temp, undefined, ts.createLiteral(restIndex))
]), parameter), ts.setTextRange(ts.createLessThan(temp, ts.createPropertyAccess(ts.createIdentifier("arguments"), "length")), parameter), ts.setTextRange(ts.createPostfixIncrement(temp), parameter), ts.createBlock([
@@ -43921,7 +45630,7 @@ var ts;
? temp
: ts.createSubtract(temp, ts.createLiteral(restIndex))), ts.createElementAccess(ts.createIdentifier("arguments"), temp))), parameter))
]));
- ts.setEmitFlags(forStatement, 524288);
+ ts.setEmitFlags(forStatement, 1048576);
ts.startOnNewLine(forStatement);
statements.push(forStatement);
}
@@ -43935,7 +45644,7 @@ var ts;
var captureThisStatement = ts.createVariableStatement(undefined, ts.createVariableDeclarationList([
ts.createVariableDeclaration("_this", undefined, initializer)
]));
- ts.setEmitFlags(captureThisStatement, 1536 | 524288);
+ ts.setEmitFlags(captureThisStatement, 1536 | 1048576);
ts.setTextRange(captureThisStatement, originalStatement);
ts.setSourceMapRange(captureThisStatement, node);
statements.push(captureThisStatement);
@@ -44075,7 +45784,7 @@ var ts;
return func;
}
function visitFunctionExpression(node) {
- var ancestorFacts = ts.getEmitFlags(node) & 131072
+ var ancestorFacts = ts.getEmitFlags(node) & 262144
? enterSubtree(16278, 69)
: enterSubtree(16286, 65);
var savedConvertedLoopState = convertedLoopState;
@@ -44239,12 +45948,13 @@ var ts;
}
else {
assignment = ts.createBinary(decl.name, 58, ts.visitNode(decl.initializer, visitor, ts.isExpression));
+ ts.setTextRange(assignment, decl);
}
assignments = ts.append(assignments, assignment);
}
}
if (assignments) {
- updated = ts.setTextRange(ts.createStatement(ts.reduceLeft(assignments, function (acc, v) { return ts.createBinary(v, 26, acc); })), node);
+ updated = ts.setTextRange(ts.createStatement(ts.inlineExpressions(assignments)), node);
}
else {
updated = undefined;
@@ -44261,9 +45971,9 @@ var ts;
if (node.flags & 3) {
enableSubstitutionsForBlockScopedBindings();
}
- var declarations = ts.flatten(ts.map(node.declarations, node.flags & 1
+ var declarations = ts.flatMap(node.declarations, node.flags & 1
? visitVariableDeclarationInLetDeclarationList
- : visitVariableDeclaration));
+ : visitVariableDeclaration);
var declarationList = ts.createVariableDeclarationList(declarations);
ts.setOriginalNode(declarationList, node);
ts.setTextRange(declarationList, node);
@@ -44301,9 +46011,9 @@ var ts;
return visitVariableDeclaration(node);
}
if (!node.initializer && shouldEmitExplicitInitializerForLetDeclaration(node)) {
- var clone_3 = ts.getMutableClone(node);
- clone_3.initializer = ts.createVoidZero();
- return clone_3;
+ var clone_2 = ts.getMutableClone(node);
+ clone_2.initializer = ts.createVoidZero();
+ return clone_2;
}
return ts.visitEachChild(node, visitor, context);
}
@@ -44424,7 +46134,7 @@ var ts;
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);
+ ]), node.expression), 2097152), 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);
ts.setTextRange(forStatement, node);
return ts.restoreEnclosingLabel(forStatement, outermostLabeledStatement, convertedLoopState && resetLabel);
@@ -44443,7 +46153,7 @@ var ts;
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);
+ ]), node.expression), 2097152), 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([
@@ -44480,7 +46190,7 @@ var ts;
}
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));
+ var assignment = ts.createAssignment(temp, ts.setEmitFlags(ts.createObjectLiteral(ts.visitNodes(properties, visitor, ts.isObjectLiteralElementLike, 0, numInitialProperties), node.multiLine), 65536));
if (node.multiLine) {
assignment.startsOnNewLine = true;
}
@@ -44587,11 +46297,11 @@ var ts;
loopBodyFlags |= 8;
}
if (isAsyncBlockContainingAwait) {
- loopBodyFlags |= 131072;
+ loopBodyFlags |= 262144;
}
var convertedLoopVariable = ts.createVariableStatement(undefined, ts.setEmitFlags(ts.createVariableDeclarationList([
ts.createVariableDeclaration(functionName, undefined, ts.setEmitFlags(ts.createFunctionExpression(undefined, containsYield ? ts.createToken(39) : undefined, undefined, undefined, loopParameters, undefined, loopBody), loopBodyFlags))
- ]), 1048576));
+ ]), 2097152));
var statements = [convertedLoopVariable];
var extraVariableDeclarations;
if (currentState.argumentsName) {
@@ -44642,13 +46352,13 @@ var ts;
loop = convert(node, outermostLabeledStatement, convertedLoopBodyStatements);
}
else {
- 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);
+ var clone_3 = ts.getMutableClone(node);
+ clone_3.statement = undefined;
+ clone_3 = ts.visitEachChild(clone_3, visitor, context);
+ clone_3.statement = ts.createBlock(convertedLoopBodyStatements, true);
+ clone_3.transformFlags = 0;
+ ts.aggregateTransformFlags(clone_3);
+ loop = ts.restoreEnclosingLabel(clone_3, outermostLabeledStatement, convertedLoopState && resetLabel);
}
statements.push(loop);
return statements;
@@ -44672,7 +46382,7 @@ var ts;
!state.labeledNonLocalContinues;
var call = ts.createCall(loopFunctionExpressionName, undefined, ts.map(parameters, function (p) { return p.name; }));
var callResult = isAsyncBlockContainingAwait
- ? ts.createYield(ts.createToken(39), ts.setEmitFlags(call, 4194304))
+ ? ts.createYield(ts.createToken(39), ts.setEmitFlags(call, 8388608))
: call;
if (isSimpleLoop) {
statements.push(ts.createStatement(callResult));
@@ -44843,7 +46553,20 @@ var ts;
var savedConvertedLoopState = convertedLoopState;
convertedLoopState = undefined;
var ancestorFacts = enterSubtree(16286, 65);
- var updated = ts.visitEachChild(node, visitor, context);
+ var updated;
+ if (node.transformFlags & 32768) {
+ var parameters = ts.visitParameterList(node.parameters, visitor, context);
+ var body = transformFunctionBody(node);
+ if (node.kind === 153) {
+ updated = ts.updateGetAccessor(node, node.decorators, node.modifiers, node.name, parameters, node.type, body);
+ }
+ else {
+ updated = ts.updateSetAccessor(node, node.decorators, node.modifiers, node.name, parameters, body);
+ }
+ }
+ else {
+ updated = ts.visitEachChild(node, visitor, context);
+ }
exitSubtree(ancestorFacts, 49152, 0);
convertedLoopState = savedConvertedLoopState;
return updated;
@@ -44867,11 +46590,49 @@ var ts;
return ts.visitEachChild(node, visitor, context);
}
function visitCallExpression(node) {
+ if (isTypeScriptClassWrapper(node)) {
+ return visitTypeScriptClassWrapper(node);
+ }
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 visitTypeScriptClassWrapper(node) {
+ var body = ts.cast(ts.skipOuterExpressions(node.expression), ts.isFunctionExpression).body;
+ var classStatements = ts.visitNodes(body.statements, visitor, ts.isStatement, 0, 1);
+ var remainingStatements = ts.visitNodes(body.statements, visitor, ts.isStatement, 1, body.statements.length - 1);
+ var varStatement = ts.cast(ts.firstOrUndefined(classStatements), ts.isVariableStatement);
+ var variable = varStatement.declarationList.declarations[0];
+ var initializer = ts.skipOuterExpressions(variable.initializer);
+ var aliasAssignment = ts.tryCast(initializer, ts.isAssignmentExpression);
+ var call = ts.cast(aliasAssignment ? ts.skipOuterExpressions(aliasAssignment.right) : initializer, ts.isCallExpression);
+ var func = ts.cast(ts.skipOuterExpressions(call.expression), ts.isFunctionExpression);
+ var funcStatements = func.body.statements;
+ var classBodyStart = 0;
+ var classBodyEnd = -1;
+ var statements = [];
+ if (aliasAssignment) {
+ var extendsCall = ts.tryCast(funcStatements[classBodyStart], ts.isExpressionStatement);
+ if (extendsCall) {
+ statements.push(extendsCall);
+ classBodyStart++;
+ }
+ statements.push(funcStatements[classBodyStart]);
+ classBodyStart++;
+ statements.push(ts.createStatement(ts.createAssignment(aliasAssignment.left, ts.cast(variable.name, ts.isIdentifier))));
+ }
+ while (!ts.isReturnStatement(ts.elementAt(funcStatements, classBodyEnd))) {
+ classBodyEnd--;
+ }
+ ts.addRange(statements, funcStatements, classBodyStart, classBodyEnd);
+ if (classBodyEnd < -1) {
+ ts.addRange(statements, funcStatements, classBodyEnd + 1);
+ }
+ ts.addRange(statements, remainingStatements);
+ ts.addRange(statements, classStatements, 1);
+ return ts.recreateOuterExpressions(node.expression, ts.recreateOuterExpressions(variable.initializer, ts.recreateOuterExpressions(aliasAssignment && aliasAssignment.right, ts.updateCall(call, ts.recreateOuterExpressions(call.expression, ts.updateFunctionExpression(func, undefined, undefined, undefined, undefined, func.parameters, undefined, ts.updateBlock(func.body, statements))), undefined, call.arguments))));
+ }
function visitImmediateSuperCallInBody(node) {
return visitCallExpressionWithPotentialCapturedThisAssignment(node, false);
}
@@ -44924,7 +46685,7 @@ var ts;
else {
if (segments.length === 1) {
var firstElement = elements[0];
- return needsUniqueCopy && ts.isSpreadExpression(firstElement) && firstElement.expression.kind !== 177
+ return needsUniqueCopy && ts.isSpreadElement(firstElement) && firstElement.expression.kind !== 177
? ts.createArraySlice(segments[0])
: segments[0];
}
@@ -44932,7 +46693,7 @@ var ts;
}
}
function partitionSpread(node) {
- return ts.isSpreadExpression(node)
+ return ts.isSpreadElement(node)
? visitSpanOfSpreads
: visitSpanOfNonSpreads;
}
@@ -45086,7 +46847,7 @@ var ts;
return node;
}
function substituteIdentifier(node) {
- if (enabledSubstitutions & 2) {
+ if (enabledSubstitutions & 2 && !ts.isInternalName(node)) {
var original = ts.getParseTreeNode(node, ts.isIdentifier);
if (original && isNameOfDeclarationWithCollidingName(original)) {
return ts.setTextRange(ts.getGeneratedNameForNode(original), node);
@@ -45116,14 +46877,31 @@ var ts;
return node;
}
function substituteExpressionIdentifier(node) {
- if (enabledSubstitutions & 2) {
+ if (enabledSubstitutions & 2 && !ts.isInternalName(node)) {
var declaration = resolver.getReferencedDeclarationWithCollidingName(node);
- if (declaration) {
- return ts.setTextRange(ts.getGeneratedNameForNode(declaration.name), node);
+ if (declaration && !(ts.isClassLike(declaration) && isPartOfClassBody(declaration, node))) {
+ return ts.setTextRange(ts.getGeneratedNameForNode(ts.getNameOfDeclaration(declaration)), node);
}
}
return node;
}
+ function isPartOfClassBody(declaration, node) {
+ var currentNode = ts.getParseTreeNode(node);
+ if (!currentNode || currentNode === declaration || currentNode.end <= declaration.pos || currentNode.pos >= declaration.end) {
+ return false;
+ }
+ var blockScope = ts.getEnclosingBlockScopeContainer(declaration);
+ while (currentNode) {
+ if (currentNode === blockScope || currentNode === declaration) {
+ return false;
+ }
+ if (ts.isClassElement(currentNode) && currentNode.parent === declaration) {
+ return true;
+ }
+ currentNode = currentNode.parent;
+ }
+ return false;
+ }
function substituteThisKeyword(node) {
if (enabledSubstitutions & 1
&& hierarchyFacts & 16) {
@@ -45132,8 +46910,9 @@ var ts;
return node;
}
function getClassMemberPrefix(node, member) {
- var expression = ts.getLocalName(node);
- return ts.hasModifier(member, 32) ? expression : ts.createPropertyAccess(expression, "prototype");
+ return ts.hasModifier(member, 32)
+ ? ts.getInternalName(node)
+ : ts.createPropertyAccess(ts.getInternalName(node), "prototype");
}
function hasSynthesizedDefaultSuperCall(constructor, hasExtendsClause) {
if (!constructor || !hasExtendsClause) {
@@ -45293,8 +47072,7 @@ var ts;
var withBlockStack;
return transformSourceFile;
function transformSourceFile(node) {
- if (ts.isDeclarationFile(node)
- || (node.transformFlags & 512) === 0) {
+ if (node.isDeclarationFile || (node.transformFlags & 512) === 0) {
return node;
}
currentSourceFile = node;
@@ -45502,7 +47280,7 @@ var ts;
return undefined;
}
else {
- if (ts.getEmitFlags(node) & 524288) {
+ if (ts.getEmitFlags(node) & 1048576) {
return node;
}
for (var _i = 0, _a = node.declarationList.declarations; _i < _a.length; _i++) {
@@ -45513,7 +47291,7 @@ var ts;
if (variables.length === 0) {
return undefined;
}
- return ts.createStatement(ts.inlineExpressions(ts.map(variables, transformInitializedVariable)));
+ return ts.setSourceMapRange(ts.createStatement(ts.inlineExpressions(ts.map(variables, transformInitializedVariable))), node);
}
}
function visitBinaryExpression(node) {
@@ -45579,10 +47357,10 @@ var ts;
else if (node.operatorToken.kind === 26) {
return visitCommaExpression(node);
}
- 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;
+ 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;
}
return ts.visitEachChild(node, visitor, context);
}
@@ -45638,7 +47416,7 @@ var ts;
var resumeLabel = defineLabel();
var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
if (node.asteriskToken) {
- var iterator = (ts.getEmitFlags(node.expression) & 4194304) === 0
+ var iterator = (ts.getEmitFlags(node.expression) & 8388608) === 0
? ts.createValuesHelper(context, expression, node)
: expression;
emitYieldStar(iterator, node);
@@ -45709,10 +47487,10 @@ var ts;
}
function visitElementAccessExpression(node) {
if (containsYield(node.argumentExpression)) {
- 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;
+ 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;
}
return ts.visitEachChild(node, visitor, context);
}
@@ -45828,7 +47606,7 @@ var ts;
return undefined;
}
function transformInitializedVariable(node) {
- return ts.createAssignment(ts.getSynthesizedClone(node.name), ts.visitNode(node.initializer, visitor, ts.isExpression));
+ return ts.setSourceMapRange(ts.createAssignment(ts.setSourceMapRange(ts.getSynthesizedClone(node.name), node.name), ts.visitNode(node.initializer, visitor, ts.isExpression)), node);
}
function transformAndEmitIfStatement(node) {
if (containsYield(node)) {
@@ -46202,10 +47980,10 @@ var ts;
if (declaration) {
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;
+ var clone_6 = ts.getMutableClone(name);
+ ts.setSourceMapRange(clone_6, node);
+ ts.setCommentRange(clone_6, node);
+ return clone_6;
}
}
}
@@ -46603,7 +48381,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, 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)), 524288));
}
function buildStatements() {
if (operations) {
@@ -46908,9 +48686,10 @@ var ts;
var currentSourceFile;
var currentModuleInfo;
var noSubstitution;
+ var needUMDDynamicImportHelper;
return transformSourceFile;
function transformSourceFile(node) {
- if (ts.isDeclarationFile(node) || !(ts.isExternalModule(node) || compilerOptions.isolatedModules)) {
+ if (node.isDeclarationFile || !(ts.isExternalModule(node) || compilerOptions.isolatedModules || node.transformFlags & 67108864)) {
return node;
}
currentSourceFile = node;
@@ -46920,6 +48699,7 @@ var ts;
var updated = transformModule(node);
currentSourceFile = undefined;
currentModuleInfo = undefined;
+ needUMDDynamicImportHelper = false;
return ts.aggregateTransformFlags(updated);
}
function shouldEmitUnderscoreUnderscoreESModule() {
@@ -46941,9 +48721,10 @@ var ts;
addExportEqualsIfNeeded(statements, false);
ts.addRange(statements, endLexicalEnvironment());
var updated = ts.updateSourceFileNode(node, ts.setTextRange(ts.createNodeArray(statements), node.statements));
- if (currentModuleInfo.hasExportStarsToExportValues) {
+ if (currentModuleInfo.hasExportStarsToExportValues && !compilerOptions.importHelpers) {
ts.addEmitHelper(updated, exportStarHelper);
}
+ ts.addEmitHelpers(updated, context.readEmitHelpers());
return updated;
}
function transformAMDModule(node) {
@@ -47036,9 +48817,12 @@ var ts;
addExportEqualsIfNeeded(statements, true);
ts.addRange(statements, endLexicalEnvironment());
var body = ts.createBlock(statements, true);
- if (currentModuleInfo.hasExportStarsToExportValues) {
+ if (currentModuleInfo.hasExportStarsToExportValues && !compilerOptions.importHelpers) {
ts.addEmitHelper(body, exportStarHelper);
}
+ if (needUMDDynamicImportHelper) {
+ ts.addEmitHelper(body, dynamicImportUMDHelper);
+ }
return body;
}
function addExportEqualsIfNeeded(statements, emitAsReturn) {
@@ -47073,14 +48857,49 @@ var ts;
return visitFunctionDeclaration(node);
case 229:
return visitClassDeclaration(node);
- case 297:
+ case 299:
return visitMergeDeclarationMarker(node);
- case 298:
+ case 300:
return visitEndOfDeclarationMarker(node);
default:
- return node;
+ return ts.visitEachChild(node, importCallExpressionVisitor, context);
+ }
+ }
+ function importCallExpressionVisitor(node) {
+ if (!(node.transformFlags & 67108864)) {
+ return node;
+ }
+ if (ts.isImportCall(node)) {
+ return visitImportCallExpression(node);
+ }
+ else {
+ return ts.visitEachChild(node, importCallExpressionVisitor, context);
}
}
+ function visitImportCallExpression(node) {
+ switch (compilerOptions.module) {
+ case ts.ModuleKind.AMD:
+ return transformImportCallExpressionAMD(node);
+ case ts.ModuleKind.UMD:
+ return transformImportCallExpressionUMD(node);
+ case ts.ModuleKind.CommonJS:
+ default:
+ return transformImportCallExpressionCommonJS(node);
+ }
+ }
+ function transformImportCallExpressionUMD(node) {
+ needUMDDynamicImportHelper = true;
+ return ts.createConditional(ts.createIdentifier("__syncRequire"), transformImportCallExpressionCommonJS(node), transformImportCallExpressionAMD(node));
+ }
+ function transformImportCallExpressionAMD(node) {
+ var resolve = ts.createUniqueName("resolve");
+ var reject = ts.createUniqueName("reject");
+ return ts.createNew(ts.createIdentifier("Promise"), undefined, [ts.createFunctionExpression(undefined, undefined, undefined, undefined, [ts.createParameter(undefined, undefined, undefined, resolve),
+ ts.createParameter(undefined, undefined, undefined, reject)], undefined, ts.createBlock([ts.createStatement(ts.createCall(ts.createIdentifier("require"), undefined, [ts.createArrayLiteral([ts.firstOrUndefined(node.arguments) || ts.createOmittedExpression()]), resolve, reject]))]))]);
+ }
+ function transformImportCallExpressionCommonJS(node) {
+ return ts.createCall(ts.createPropertyAccess(ts.createCall(ts.createPropertyAccess(ts.createIdentifier("Promise"), "resolve"), undefined, []), "then"), undefined, [ts.createFunctionExpression(undefined, undefined, undefined, undefined, undefined, undefined, ts.createBlock([ts.createReturn(ts.createCall(ts.createIdentifier("require"), undefined, node.arguments))]))]);
+ }
function visitImportDeclaration(node) {
var statements;
var namespaceDeclaration = ts.getNamespaceDeclarationNode(node);
@@ -47171,11 +48990,7 @@ var ts;
return ts.singleOrMany(statements);
}
else {
- return ts.setTextRange(ts.createStatement(ts.createCall(ts.createIdentifier("__export"), undefined, [
- moduleKind !== ts.ModuleKind.AMD
- ? createRequireCall(node)
- : generatedName
- ])), node);
+ return ts.setTextRange(ts.createStatement(createExportStarHelper(context, moduleKind !== ts.ModuleKind.AMD ? createRequireCall(node) : generatedName)), node);
}
}
function visitExportAssignment(node) {
@@ -47196,10 +49011,10 @@ var ts;
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));
+ 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, ts.visitNodes(node.parameters, importCallExpressionVisitor), undefined, ts.visitEachChild(node.body, importCallExpressionVisitor, context)), node), node));
}
else {
- statements = ts.append(statements, node);
+ statements = ts.append(statements, ts.visitEachChild(node, importCallExpressionVisitor, context));
}
if (hasAssociatedEndOfDeclarationMarker(node)) {
var id = ts.getOriginalNodeId(node);
@@ -47213,10 +49028,10 @@ var ts;
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));
+ statements = ts.append(statements, ts.setOriginalNode(ts.setTextRange(ts.createClassDeclaration(undefined, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), ts.getDeclarationName(node, true, true), undefined, ts.visitNodes(node.heritageClauses, importCallExpressionVisitor), node.members), node), node));
}
else {
- statements = ts.append(statements, node);
+ statements = ts.append(statements, ts.visitEachChild(node, importCallExpressionVisitor, context));
}
if (hasAssociatedEndOfDeclarationMarker(node)) {
var id = ts.getOriginalNodeId(node);
@@ -47253,7 +49068,7 @@ var ts;
}
}
else {
- statements = ts.append(statements, node);
+ statements = ts.append(statements, ts.visitEachChild(node, importCallExpressionVisitor, context));
}
if (hasAssociatedEndOfDeclarationMarker(node)) {
var id = ts.getOriginalNodeId(node);
@@ -47266,10 +49081,10 @@ var ts;
}
function transformInitializedVariable(node) {
if (ts.isBindingPattern(node.name)) {
- return ts.flattenDestructuringAssignment(node, undefined, context, 0, false, createExportExpression);
+ return ts.flattenDestructuringAssignment(ts.visitNode(node, importCallExpressionVisitor), undefined, context, 0, false, createExportExpression);
}
else {
- return ts.createAssignment(ts.setTextRange(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), ts.visitNode(node.initializer, importCallExpressionVisitor));
}
}
function visitMergeDeclarationMarker(node) {
@@ -47280,7 +49095,7 @@ var ts;
return node;
}
function hasAssociatedEndOfDeclarationMarker(node) {
- return (ts.getEmitFlags(node) & 2097152) !== 0;
+ return (ts.getEmitFlags(node) & 4194304) !== 0;
}
function visitEndOfDeclarationMarker(node) {
var id = ts.getOriginalNodeId(node);
@@ -47393,7 +49208,7 @@ var ts;
])
]));
}
- ts.setEmitFlags(statement, 524288);
+ ts.setEmitFlags(statement, 1048576);
return statement;
}
function createExportStatement(name, value, location, allowComments) {
@@ -47547,7 +49362,18 @@ var ts;
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 }"
+ text: "\n function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n }\n "
+ };
+ function createExportStarHelper(context, module) {
+ var compilerOptions = context.getCompilerOptions();
+ return compilerOptions.importHelpers
+ ? ts.createCall(ts.getHelperName("__exportStar"), undefined, [module, ts.createIdentifier("exports")])
+ : ts.createCall(ts.createIdentifier("__export"), undefined, [module]);
+ }
+ var dynamicImportUMDHelper = {
+ name: "typescript:dynamicimport-sync-require",
+ scoped: true,
+ text: "\n var __syncRequire = typeof module === \"object\" && typeof module.exports === \"object\";"
};
})(ts || (ts = {}));
var ts;
@@ -47579,9 +49405,7 @@ var ts;
var noSubstitution;
return transformSourceFile;
function transformSourceFile(node) {
- if (ts.isDeclarationFile(node)
- || !(ts.isExternalModule(node)
- || compilerOptions.isolatedModules)) {
+ if (node.isDeclarationFile || !(ts.isEffectiveExternalModule(node, compilerOptions) || node.transformFlags & 67108864)) {
return node;
}
var id = ts.getOriginalNodeId(node);
@@ -47819,7 +49643,7 @@ var ts;
if (node.isExportEquals) {
return undefined;
}
- var expression = ts.visitNode(node.expression, destructuringVisitor, ts.isExpression);
+ var expression = ts.visitNode(node.expression, destructuringAndImportCallVisitor, ts.isExpression);
var original = node.original;
if (original && hasAssociatedEndOfDeclarationMarker(original)) {
var id = ts.getOriginalNodeId(node);
@@ -47831,10 +49655,10 @@ 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), node.asteriskToken, 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, destructuringAndImportCallVisitor, ts.isParameterDeclaration), undefined, ts.visitNode(node.body, destructuringAndImportCallVisitor, ts.isBlock)));
}
else {
- hoistedStatements = ts.append(hoistedStatements, node);
+ hoistedStatements = ts.append(hoistedStatements, ts.visitEachChild(node, destructuringAndImportCallVisitor, context));
}
if (hasAssociatedEndOfDeclarationMarker(node)) {
var id = ts.getOriginalNodeId(node);
@@ -47849,7 +49673,7 @@ var ts;
var statements;
var name = ts.getLocalName(node);
hoistVariableDeclaration(name);
- 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));
+ statements = ts.append(statements, ts.setTextRange(ts.createStatement(ts.createAssignment(name, ts.setTextRange(ts.createClassExpression(undefined, node.name, undefined, ts.visitNodes(node.heritageClauses, destructuringAndImportCallVisitor, ts.isHeritageClause), ts.visitNodes(node.members, destructuringAndImportCallVisitor, ts.isClassElement)), node))), node));
if (hasAssociatedEndOfDeclarationMarker(node)) {
var id = ts.getOriginalNodeId(node);
deferredExports[id] = appendExportsOfHoistedDeclaration(deferredExports[id], node);
@@ -47861,7 +49685,7 @@ var ts;
}
function visitVariableStatement(node) {
if (!shouldHoistVariableDeclarationList(node.declarationList)) {
- return ts.visitNode(node, destructuringVisitor, ts.isStatement);
+ return ts.visitNode(node, destructuringAndImportCallVisitor, ts.isStatement);
}
var expressions;
var isExportedDeclaration = ts.hasModifier(node, 1);
@@ -47902,15 +49726,15 @@ var ts;
}
}
function shouldHoistVariableDeclarationList(node) {
- return (ts.getEmitFlags(node) & 1048576) === 0
+ return (ts.getEmitFlags(node) & 2097152) === 0
&& (enclosingBlockScopedContainer.kind === 265
|| (ts.getOriginalNode(node).flags & 3) === 0);
}
function transformInitializedVariable(node, isExportedDeclaration) {
var createAssignment = isExportedDeclaration ? createExportedVariableAssignment : createNonExportedVariableAssignment;
return ts.isBindingPattern(node.name)
- ? ts.flattenDestructuringAssignment(node, destructuringVisitor, context, 0, false, createAssignment)
- : createAssignment(node.name, ts.visitNode(node.initializer, destructuringVisitor, ts.isExpression));
+ ? ts.flattenDestructuringAssignment(node, destructuringAndImportCallVisitor, context, 0, false, createAssignment)
+ : createAssignment(node.name, ts.visitNode(node.initializer, destructuringAndImportCallVisitor, ts.isExpression));
}
function createExportedVariableAssignment(name, value, location) {
return createVariableAssignment(name, value, location, true);
@@ -47933,7 +49757,7 @@ var ts;
return node;
}
function hasAssociatedEndOfDeclarationMarker(node) {
- return (ts.getEmitFlags(node) & 2097152) !== 0;
+ return (ts.getEmitFlags(node) & 4194304) !== 0;
}
function visitEndOfDeclarationMarker(node) {
var id = ts.getOriginalNodeId(node);
@@ -48094,32 +49918,32 @@ var ts;
return visitCatchClause(node);
case 207:
return visitBlock(node);
- case 297:
+ case 299:
return visitMergeDeclarationMarker(node);
- case 298:
+ case 300:
return visitEndOfDeclarationMarker(node);
default:
- return destructuringVisitor(node);
+ return destructuringAndImportCallVisitor(node);
}
}
function visitForStatement(node) {
var savedEnclosingBlockScopedContainer = enclosingBlockScopedContainer;
enclosingBlockScopedContainer = node;
- 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));
+ node = ts.updateFor(node, visitForInitializer(node.initializer), ts.visitNode(node.condition, destructuringAndImportCallVisitor, ts.isExpression), ts.visitNode(node.incrementor, destructuringAndImportCallVisitor, 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, ts.liftToBlock));
+ node = ts.updateForIn(node, visitForInitializer(node.initializer), ts.visitNode(node.expression, destructuringAndImportCallVisitor, 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, node.awaitModifier, visitForInitializer(node.initializer), ts.visitNode(node.expression, destructuringVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, ts.liftToBlock));
+ node = ts.updateForOf(node, node.awaitModifier, visitForInitializer(node.initializer), ts.visitNode(node.expression, destructuringAndImportCallVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, ts.liftToBlock));
enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer;
return node;
}
@@ -48144,19 +49968,19 @@ var ts;
}
}
function visitDoStatement(node) {
- return ts.updateDo(node, ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, 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, destructuringAndImportCallVisitor, ts.isExpression));
}
function visitWhileStatement(node) {
- return ts.updateWhile(node, ts.visitNode(node.expression, destructuringVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, ts.liftToBlock));
+ return ts.updateWhile(node, ts.visitNode(node.expression, destructuringAndImportCallVisitor, 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, ts.liftToBlock));
}
function visitWithStatement(node) {
- return ts.updateWith(node, ts.visitNode(node.expression, destructuringVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, ts.liftToBlock));
+ return ts.updateWith(node, ts.visitNode(node.expression, destructuringAndImportCallVisitor, 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));
+ return ts.updateSwitch(node, ts.visitNode(node.expression, destructuringAndImportCallVisitor, ts.isExpression), ts.visitNode(node.caseBlock, nestedElementVisitor, ts.isCaseBlock));
}
function visitCaseBlock(node) {
var savedEnclosingBlockScopedContainer = enclosingBlockScopedContainer;
@@ -48166,7 +49990,7 @@ var ts;
return node;
}
function visitCaseClause(node) {
- return ts.updateCaseClause(node, ts.visitNode(node.expression, destructuringVisitor, ts.isExpression), ts.visitNodes(node.statements, nestedElementVisitor, ts.isStatement));
+ return ts.updateCaseClause(node, ts.visitNode(node.expression, destructuringAndImportCallVisitor, ts.isExpression), ts.visitNodes(node.statements, nestedElementVisitor, ts.isStatement));
}
function visitDefaultClause(node) {
return ts.visitEachChild(node, nestedElementVisitor, context);
@@ -48188,29 +50012,35 @@ var ts;
enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer;
return node;
}
- function destructuringVisitor(node) {
+ function destructuringAndImportCallVisitor(node) {
if (node.transformFlags & 1024
&& node.kind === 194) {
return visitDestructuringAssignment(node);
}
- else if (node.transformFlags & 2048) {
- return ts.visitEachChild(node, destructuringVisitor, context);
+ else if (ts.isImportCall(node)) {
+ return visitImportCallExpression(node);
+ }
+ else if ((node.transformFlags & 2048) || (node.transformFlags & 67108864)) {
+ return ts.visitEachChild(node, destructuringAndImportCallVisitor, context);
}
else {
return node;
}
}
+ function visitImportCallExpression(node) {
+ return ts.createCall(ts.createPropertyAccess(contextObject, ts.createIdentifier("import")), undefined, node.arguments);
+ }
function visitDestructuringAssignment(node) {
if (hasExportedReferenceInDestructuringTarget(node.left)) {
- return ts.flattenDestructuringAssignment(node, destructuringVisitor, context, 0, true);
+ return ts.flattenDestructuringAssignment(node, destructuringAndImportCallVisitor, context, 0, true);
}
- return ts.visitEachChild(node, destructuringVisitor, context);
+ return ts.visitEachChild(node, destructuringAndImportCallVisitor, context);
}
function hasExportedReferenceInDestructuringTarget(node) {
if (ts.isAssignmentExpression(node, true)) {
return hasExportedReferenceInDestructuringTarget(node.left);
}
- else if (ts.isSpreadExpression(node)) {
+ else if (ts.isSpreadElement(node)) {
return hasExportedReferenceInDestructuringTarget(node.expression);
}
else if (ts.isObjectLiteralExpression(node)) {
@@ -48387,7 +50217,7 @@ var ts;
var currentSourceFile;
return transformSourceFile;
function transformSourceFile(node) {
- if (ts.isDeclarationFile(node)) {
+ if (node.isDeclarationFile) {
return node;
}
if (ts.isExternalModule(node) || compilerOptions.isolatedModules) {
@@ -48450,6 +50280,7 @@ var ts;
(function (ts) {
function getModuleTransformer(moduleKind) {
switch (moduleKind) {
+ case ts.ModuleKind.ESNext:
case ts.ModuleKind.ES2015:
return ts.transformES2015Module;
case ts.ModuleKind.System:
@@ -48490,7 +50321,7 @@ var ts;
}
ts.getTransformers = getTransformers;
function transformNodes(resolver, host, options, nodes, transformers, allowDtsFiles) {
- var enabledSyntaxKindFeatures = new Array(299);
+ var enabledSyntaxKindFeatures = new Array(301);
var lexicalEnvironmentVariableDeclarations;
var lexicalEnvironmentFunctionDeclarations;
var lexicalEnvironmentVariableDeclarationsStack = [];
@@ -48548,7 +50379,7 @@ var ts;
dispose: dispose
};
function transformRoot(node) {
- return node && (!ts.isSourceFile(node) || !ts.isDeclarationFile(node)) ? transformation(node) : node;
+ return node && (!ts.isSourceFile(node) || !node.isDeclarationFile) ? transformation(node) : node;
}
function enableSubstitution(kind) {
ts.Debug.assert(state < 2, "Cannot modify the transformation context after transformation has completed.");
@@ -48584,7 +50415,7 @@ var ts;
function hoistVariableDeclaration(name) {
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);
+ var decl = ts.setEmitFlags(ts.createVariableDeclaration(name), 64);
if (!lexicalEnvironmentVariableDeclarations) {
lexicalEnvironmentVariableDeclarations = [decl];
}
@@ -48696,7 +50527,7 @@ var ts;
function createSourceMapWriter(host, writer) {
var compilerOptions = host.getCompilerOptions();
var extendedDiagnostics = compilerOptions.extendedDiagnostics;
- var currentSourceFile;
+ var currentSource;
var currentSourceText;
var sourceMapDir;
var sourceMapSourceIndex;
@@ -48716,6 +50547,9 @@ var ts;
getText: getText,
getSourceMappingURL: getSourceMappingURL,
};
+ function skipSourceTrivia(pos) {
+ return currentSource.skipTrivia ? currentSource.skipTrivia(pos) : ts.skipTrivia(currentSourceText, pos);
+ }
function initialize(filePath, sourceMapFilePath, sourceFileOrBundle) {
if (disabled) {
return;
@@ -48723,7 +50557,7 @@ var ts;
if (sourceMapData) {
reset();
}
- currentSourceFile = undefined;
+ currentSource = undefined;
currentSourceText = undefined;
sourceMapSourceIndex = -1;
lastRecordedSourceMapSpan = undefined;
@@ -48766,7 +50600,7 @@ var ts;
if (disabled) {
return;
}
- currentSourceFile = undefined;
+ currentSource = undefined;
sourceMapDir = undefined;
sourceMapSourceIndex = undefined;
lastRecordedSourceMapSpan = undefined;
@@ -48809,7 +50643,7 @@ var ts;
if (extendedDiagnostics) {
ts.performance.mark("beforeSourcemap");
}
- var sourceLinePos = ts.getLineAndCharacterOfPosition(currentSourceFile, pos);
+ var sourceLinePos = ts.getLineAndCharacterOfPosition(currentSource, pos);
sourceLinePos.line++;
sourceLinePos.character++;
var emittedLine = writer.getLine();
@@ -48846,12 +50680,21 @@ var ts;
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 !== 295
+ var range = emitNode && emitNode.sourceMapRange;
+ var _a = range || node, pos = _a.pos, end = _a.end;
+ var source = range && range.source;
+ var oldSource = currentSource;
+ if (source === oldSource)
+ source = undefined;
+ if (source)
+ setSourceFile(source);
+ if (node.kind !== 296
&& (emitFlags & 16) === 0
&& pos >= 0) {
- emitPos(ts.skipTrivia(currentSourceText, pos));
+ emitPos(skipSourceTrivia(pos));
}
+ if (source)
+ setSourceFile(oldSource);
if (emitFlags & 64) {
disabled = true;
emitCallback(hint, node);
@@ -48860,11 +50703,15 @@ var ts;
else {
emitCallback(hint, node);
}
- if (node.kind !== 295
+ if (source)
+ setSourceFile(source);
+ if (node.kind !== 296
&& (emitFlags & 32) === 0
&& end >= 0) {
emitPos(end);
}
+ if (source)
+ setSourceFile(oldSource);
}
}
function emitTokenWithSourceMap(node, token, tokenPos, emitCallback) {
@@ -48874,7 +50721,7 @@ var ts;
var emitNode = node && node.emitNode;
var emitFlags = emitNode && emitNode.flags;
var range = emitNode && emitNode.tokenSourceMapRanges && emitNode.tokenSourceMapRanges[token];
- tokenPos = ts.skipTrivia(currentSourceText, range ? range.pos : tokenPos);
+ tokenPos = skipSourceTrivia(range ? range.pos : tokenPos);
if ((emitFlags & 128) === 0 && tokenPos >= 0) {
emitPos(tokenPos);
}
@@ -48890,17 +50737,17 @@ var ts;
if (disabled) {
return;
}
- currentSourceFile = sourceFile;
- currentSourceText = currentSourceFile.text;
+ currentSource = sourceFile;
+ currentSourceText = currentSource.text;
var sourcesDirectoryPath = compilerOptions.sourceRoot ? host.getCommonSourceDirectory() : sourceMapDir;
- var source = ts.getRelativePathToDirectoryOrUrl(sourcesDirectoryPath, currentSourceFile.fileName, host.getCurrentDirectory(), host.getCanonicalFileName, true);
+ var source = ts.getRelativePathToDirectoryOrUrl(sourcesDirectoryPath, currentSource.fileName, host.getCurrentDirectory(), host.getCanonicalFileName, true);
sourceMapSourceIndex = ts.indexOf(sourceMapData.sourceMapSources, source);
if (sourceMapSourceIndex === -1) {
sourceMapSourceIndex = sourceMapData.sourceMapSources.length;
sourceMapData.sourceMapSources.push(source);
- sourceMapData.inputSourceFileNames.push(currentSourceFile.fileName);
+ sourceMapData.inputSourceFileNames.push(currentSource.fileName);
if (compilerOptions.inlineSources) {
- sourceMapData.sourceMapSourcesContent.push(currentSourceFile.text);
+ sourceMapData.sourceMapSourcesContent.push(currentSource.text);
}
}
}
@@ -49000,9 +50847,9 @@ var ts;
if (extendedDiagnostics) {
ts.performance.mark("preEmitNodeWithComment");
}
- var isEmittedNode = node.kind !== 295;
- var skipLeadingComments = pos < 0 || (emitFlags & 512) !== 0;
- var skipTrailingComments = end < 0 || (emitFlags & 1024) !== 0;
+ var isEmittedNode = node.kind !== 296;
+ var skipLeadingComments = pos < 0 || (emitFlags & 512) !== 0 || node.kind === 10;
+ var skipTrailingComments = end < 0 || (emitFlags & 1024) !== 0 || node.kind === 10;
if (!skipLeadingComments) {
emitLeadingComments(pos, isEmittedNode);
}
@@ -49323,7 +51170,7 @@ var ts;
var errorNameNode;
var emitJsDocComments = compilerOptions.removeComments ? ts.noop : writeJsDocComments;
var emit = compilerOptions.stripInternal ? stripInternal : emitNode;
- var noDeclare;
+ var needsDeclare = true;
var moduleElementDeclarationEmitInfo = [];
var asynchronousSubModuleDeclarationEmitInfo;
var referencesOutput = "";
@@ -49348,11 +51195,11 @@ var ts;
}
resultHasExternalModuleIndicator = false;
if (!isBundledEmit || !ts.isExternalModule(sourceFile)) {
- noDeclare = false;
+ needsDeclare = true;
emitSourceFile(sourceFile);
}
else if (ts.isExternalModule(sourceFile)) {
- noDeclare = true;
+ needsDeclare = false;
write("declare module \"" + ts.getResolvedExternalModuleName(host, sourceFile) + "\" {");
writeLine();
increaseIndent();
@@ -49415,7 +51262,7 @@ var ts;
var writer = ts.createTextWriter(newLine);
writer.trackSymbol = trackSymbol;
writer.reportInaccessibleThisError = reportInaccessibleThisError;
- writer.reportIllegalExtends = reportIllegalExtends;
+ writer.reportPrivateInBaseOfClassExpression = reportPrivateInBaseOfClassExpression;
writer.writeKeyword = writer.write;
writer.writeOperator = writer.write;
writer.writePunctuation = writer.write;
@@ -49512,10 +51359,10 @@ var ts;
handleSymbolAccessibilityError(resolver.isSymbolAccessible(symbol, enclosingDeclaration, meaning, true));
recordTypeReferenceDirectivesIfNecessary(resolver.getTypeReferenceDirectivesForSymbol(symbol, meaning));
}
- function reportIllegalExtends() {
+ function reportPrivateInBaseOfClassExpression(propertyName) {
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)));
+ emitterDiagnostics.add(ts.createDiagnosticForNode(errorNameNode, ts.Diagnostics.Property_0_of_exported_class_expression_may_not_be_private_or_protected, propertyName));
}
}
function reportInaccessibleThisError() {
@@ -49528,14 +51375,17 @@ var ts;
writer.getSymbolAccessibilityDiagnostic = getSymbolAccessibilityDiagnostic;
write(": ");
var shouldUseResolverType = declaration.kind === 146 &&
- resolver.isRequiredInitializedParameter(declaration);
+ (resolver.isRequiredInitializedParameter(declaration) ||
+ resolver.isOptionalUninitializedParameterProperty(declaration));
if (type && !shouldUseResolverType) {
emitType(type);
}
else {
errorNameNode = declaration.name;
- var format = 2 | 1024 |
- (shouldUseResolverType ? 4096 : 0);
+ var format = 4 |
+ 16384 |
+ 2048 |
+ (shouldUseResolverType ? 8192 : 0);
resolver.writeTypeOfDeclaration(declaration, enclosingDeclaration, format, writer);
errorNameNode = undefined;
}
@@ -49548,7 +51398,7 @@ var ts;
}
else {
errorNameNode = signature.name;
- resolver.writeReturnTypeOfSignatureDeclaration(signature, enclosingDeclaration, 2 | 1024, writer);
+ resolver.writeReturnTypeOfSignatureDeclaration(signature, enclosingDeclaration, 4 | 2048 | 16384, writer);
errorNameNode = undefined;
}
}
@@ -49756,8 +51606,7 @@ var ts;
ts.emitDetachedComments(currentText, currentLineMap, writer, ts.writeCommentRange, node, newLine, true);
emitLines(node.statements);
}
- function getExportDefaultTempVariableName() {
- var baseName = "_default";
+ function getExportTempVariableName(baseName) {
if (!currentIdentifiers.has(baseName)) {
return baseName;
}
@@ -49770,23 +51619,30 @@ var ts;
}
}
}
+ function emitTempVariableDeclaration(expr, baseName, diagnostic, needsDeclare) {
+ var tempVarName = getExportTempVariableName(baseName);
+ if (needsDeclare) {
+ write("declare ");
+ }
+ write("const ");
+ write(tempVarName);
+ write(": ");
+ writer.getSymbolAccessibilityDiagnostic = function () { return diagnostic; };
+ resolver.writeTypeOfExpression(expr, enclosingDeclaration, 4 | 2048 | 16384, writer);
+ write(";");
+ writeLine();
+ return tempVarName;
+ }
function emitExportAssignment(node) {
if (node.expression.kind === 71) {
write(node.isExportEquals ? "export = " : "export default ");
writeTextOfNode(currentText, node.expression);
}
else {
- var tempVarName = getExportDefaultTempVariableName();
- if (!noDeclare) {
- write("declare ");
- }
- write("var ");
- write(tempVarName);
- write(": ");
- writer.getSymbolAccessibilityDiagnostic = getDefaultExportAccessibilityDiagnostic;
- resolver.writeTypeOfExpression(node.expression, enclosingDeclaration, 2 | 1024, writer);
- write(";");
- writeLine();
+ var tempVarName = emitTempVariableDeclaration(node.expression, "_default", {
+ diagnosticMessage: ts.Diagnostics.Default_export_of_the_module_has_or_is_using_private_name_0,
+ errorNode: node
+ }, needsDeclare);
write(node.isExportEquals ? "export = " : "export default ");
write(tempVarName);
}
@@ -49796,12 +51652,6 @@ var ts;
var nodes = resolver.collectLinkedAliases(node.expression);
writeAsynchronousModuleElements(nodes);
}
- function getDefaultExportAccessibilityDiagnostic() {
- return {
- diagnosticMessage: ts.Diagnostics.Default_export_of_the_module_has_or_is_using_private_name_0,
- errorNode: node
- };
- }
}
function isModuleElementVisible(node) {
return resolver.isDeclarationVisible(node);
@@ -49871,7 +51721,7 @@ var ts;
if (modifiers & 512) {
write("default ");
}
- else if (node.kind !== 230 && !noDeclare) {
+ else if (node.kind !== 230 && needsDeclare) {
write("declare ");
}
}
@@ -50099,7 +51949,7 @@ var ts;
var enumMemberValue = resolver.getConstantValue(node);
if (enumMemberValue !== undefined) {
write(" = ");
- write(enumMemberValue.toString());
+ write(ts.getTextOfConstantValue(enumMemberValue));
}
write(",");
writeLine();
@@ -50196,7 +52046,7 @@ var ts;
write(">");
}
}
- function emitHeritageClause(className, typeReferences, isImplementsList) {
+ function emitHeritageClause(typeReferences, isImplementsList) {
if (typeReferences) {
write(isImplementsList ? " implements " : " extends ");
emitCommaList(typeReferences, emitTypeOfTypeReference);
@@ -50208,12 +52058,6 @@ var ts;
else if (!isImplementsList && node.expression.kind === 95) {
write("null");
}
- else {
- writer.getSymbolAccessibilityDiagnostic = getHeritageClauseVisibilityError;
- errorNameNode = className;
- resolver.writeBaseConstructorTypeOfClass(enclosingDeclaration, enclosingDeclaration, 2 | 1024, writer);
- errorNameNode = undefined;
- }
function getHeritageClauseVisibilityError() {
var diagnosticMessage;
if (node.parent.parent.kind === 229) {
@@ -50227,7 +52071,7 @@ var ts;
return {
diagnosticMessage: diagnosticMessage,
errorNode: node,
- typeName: node.parent.parent.name
+ typeName: ts.getNameOfDeclaration(node.parent.parent)
};
}
}
@@ -50242,6 +52086,19 @@ var ts;
});
}
}
+ var prevEnclosingDeclaration = enclosingDeclaration;
+ enclosingDeclaration = node;
+ var baseTypeNode = ts.getClassExtendsHeritageClauseElement(node);
+ var tempVarName;
+ if (baseTypeNode && !ts.isEntityNameExpression(baseTypeNode.expression)) {
+ tempVarName = baseTypeNode.expression.kind === 95 ?
+ "null" :
+ emitTempVariableDeclaration(baseTypeNode.expression, node.name.text + "_base", {
+ diagnosticMessage: ts.Diagnostics.extends_clause_of_exported_class_0_has_or_is_using_private_name_1,
+ errorNode: baseTypeNode,
+ typeName: node.name
+ }, !ts.findAncestor(node, function (n) { return n.kind === 233; }));
+ }
emitJsDocComments(node);
emitModuleElementDeclarationFlags(node);
if (ts.hasModifier(node, 128)) {
@@ -50249,15 +52106,22 @@ var ts;
}
write("class ");
writeTextOfNode(currentText, node.name);
- var prevEnclosingDeclaration = enclosingDeclaration;
- enclosingDeclaration = node;
emitTypeParameters(node.typeParameters);
- var baseTypeNode = ts.getClassExtendsHeritageClauseElement(node);
if (baseTypeNode) {
- node.name;
- emitHeritageClause(node.name, [baseTypeNode], false);
+ if (!ts.isEntityNameExpression(baseTypeNode.expression)) {
+ write(" extends ");
+ write(tempVarName);
+ if (baseTypeNode.typeArguments) {
+ write("<");
+ emitCommaList(baseTypeNode.typeArguments, emitType);
+ write(">");
+ }
+ }
+ else {
+ emitHeritageClause([baseTypeNode], false);
+ }
}
- emitHeritageClause(node.name, ts.getClassImplementsHeritageClauseElements(node), true);
+ emitHeritageClause(ts.getClassImplementsHeritageClauseElements(node), true);
write(" {");
writeLine();
increaseIndent();
@@ -50278,7 +52142,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(node.name, interfaceExtendsTypes, false);
+ emitHeritageClause(interfaceExtendsTypes, false);
}
write(" {");
writeLine();
@@ -50330,7 +52194,8 @@ var ts;
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 === 149 || node.kind === 148) {
+ else if (node.kind === 149 || node.kind === 148 ||
+ (node.kind === 146 && ts.hasModifier(node.parent, 8))) {
if (ts.hasModifier(node, 32)) {
return symbolAccessibilityResult.errorModuleName ?
symbolAccessibilityResult.accessibility === 2 ?
@@ -50338,7 +52203,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 === 229) {
+ else if (node.parent.kind === 229 || node.kind === 146) {
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 :
@@ -50533,6 +52398,11 @@ var ts;
write("[");
}
else {
+ if (node.kind === 152 && ts.hasModifier(node, 8)) {
+ write("();");
+ writeLine();
+ return;
+ }
if (node.kind === 156 || node.kind === 161) {
write("new ");
}
@@ -50791,7 +52661,7 @@ var ts;
function writeReferencePath(referencedFile, addBundledFileReference, emitOnlyDtsFiles) {
var declFileName;
var addedBundledEmitReference = false;
- if (ts.isDeclarationFile(referencedFile)) {
+ if (referencedFile.isDeclarationFile) {
declFileName = referencedFile.fileName;
}
else {
@@ -50949,7 +52819,7 @@ var ts;
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 shouldSkip = compilerOptions.noEmitHelpers || ts.getExternalHelpersModuleName(sourceFile) !== undefined;
var shouldBundle = ts.isSourceFile(currentNode) && !isOwnFileEmit;
var helpers = ts.getEmitHelpers(currentNode);
if (helpers) {
@@ -50980,7 +52850,7 @@ var ts;
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 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, onBeforeEmitToken = handlers.onBeforeEmitToken, onAfterEmitToken = handlers.onAfterEmitToken;
var newLine = ts.getNewLineCharacter(printerOptions);
var comments = ts.createCommentWriter(printerOptions, onEmitSourceMapOfPosition);
var emitNodeWithComments = comments.emitNodeWithComments, emitBodyWithDetachedComments = comments.emitBodyWithDetachedComments, emitTrailingCommentsOfPosition = comments.emitTrailingCommentsOfPosition, emitLeadingCommentsOfPosition = comments.emitLeadingCommentsOfPosition;
@@ -51066,7 +52936,9 @@ var ts;
return text;
}
function print(hint, node, sourceFile) {
- setSourceFile(sourceFile);
+ if (sourceFile) {
+ setSourceFile(sourceFile);
+ }
pipelineEmitWithNotification(hint, node);
}
function setSourceFile(sourceFile) {
@@ -51142,7 +53014,7 @@ var ts;
function pipelineEmitUnspecified(node) {
var kind = node.kind;
if (ts.isKeyword(kind)) {
- writeTokenText(kind);
+ writeTokenNode(node);
return;
}
switch (kind) {
@@ -51283,6 +53155,8 @@ var ts;
return emitModuleBlock(node);
case 235:
return emitCaseBlock(node);
+ case 236:
+ return emitNamespaceExportDeclaration(node);
case 237:
return emitImportEqualsDeclaration(node);
case 238:
@@ -51342,7 +53216,7 @@ var ts;
return pipelineEmitExpression(trySubstituteNode(1, node));
}
if (ts.isToken(node)) {
- writeTokenText(kind);
+ writeTokenNode(node);
return;
}
}
@@ -51362,7 +53236,8 @@ var ts;
case 97:
case 101:
case 99:
- writeTokenText(kind);
+ case 91:
+ writeTokenNode(node);
return;
case 177:
return emitArrayLiteralExpression(node);
@@ -51422,8 +53297,10 @@ var ts;
return emitJsxElement(node);
case 250:
return emitJsxSelfClosingElement(node);
- case 296:
+ case 297:
return emitPartiallyEmittedExpression(node);
+ case 298:
+ return emitCommaList(node);
}
}
function trySubstituteNode(hint, node) {
@@ -51449,6 +53326,7 @@ var ts;
}
function emitIdentifier(node) {
write(getTextOfNode(node, false));
+ emitTypeArguments(node, node.typeArguments);
}
function emitQualifiedName(node) {
emitEntityName(node.left);
@@ -51471,6 +53349,7 @@ var ts;
function emitTypeParameter(node) {
emit(node.name);
emitWithPrefix(" extends ", node.constraint);
+ emitWithPrefix(" = ", node.default);
}
function emitParameter(node) {
emitDecorators(node, node.decorators);
@@ -51497,6 +53376,7 @@ var ts;
emitDecorators(node, node.decorators);
emitModifiers(node, node.modifiers);
emit(node.name);
+ writeIfPresent(node.questionToken, "?");
emitWithPrefix(": ", node.type);
emitExpressionWithPrefix(" = ", node.initializer);
write(";");
@@ -51516,6 +53396,7 @@ var ts;
emitModifiers(node, node.modifiers);
writeIfPresent(node.asteriskToken, "*");
emit(node.name);
+ writeIfPresent(node.questionToken, "?");
emitSignatureAndBody(node, emitSignatureHead);
}
function emitConstructor(node) {
@@ -51575,7 +53456,7 @@ var ts;
function emitConstructorType(node) {
write("new ");
emitTypeParameters(node, node.typeParameters);
- emitParametersForArrow(node, node.parameters);
+ emitParameters(node, node.parameters);
write(" => ");
emit(node.type);
}
@@ -51585,7 +53466,9 @@ var ts;
}
function emitTypeLiteral(node) {
write("{");
- emitList(node, node.members, 65);
+ if (node.members.length > 0) {
+ emitList(node, node.members, ts.getEmitFlags(node) & 1 ? 448 : 65);
+ }
write("}");
}
function emitArrayType(node) {
@@ -51623,9 +53506,15 @@ var ts;
write("]");
}
function emitMappedType(node) {
+ var emitFlags = ts.getEmitFlags(node);
write("{");
- writeLine();
- increaseIndent();
+ if (emitFlags & 1) {
+ write(" ");
+ }
+ else {
+ writeLine();
+ increaseIndent();
+ }
writeIfPresent(node.readonlyToken, "readonly ");
write("[");
emit(node.typeParameter.name);
@@ -51636,8 +53525,13 @@ var ts;
write(": ");
emit(node.type);
write(";");
- writeLine();
- decreaseIndent();
+ if (emitFlags & 1) {
+ write(" ");
+ }
+ else {
+ writeLine();
+ decreaseIndent();
+ }
write("}");
}
function emitLiteralType(node) {
@@ -51687,7 +53581,7 @@ var ts;
write("{}");
}
else {
- var indentedFlag = ts.getEmitFlags(node) & 32768;
+ var indentedFlag = ts.getEmitFlags(node) & 65536;
if (indentedFlag) {
increaseIndent();
}
@@ -51702,7 +53596,7 @@ var ts;
function emitPropertyAccessExpression(node) {
var indentBeforeDot = false;
var indentAfterDot = false;
- if (!(ts.getEmitFlags(node) & 65536)) {
+ if (!(ts.getEmitFlags(node) & 131072)) {
var dotRangeStart = node.expression.end;
var dotRangeEnd = ts.skipTrivia(currentSourceFile.text, node.expression.end) + 1;
var dotToken = { kind: 23, pos: dotRangeStart, end: dotRangeEnd };
@@ -51726,7 +53620,7 @@ var ts;
}
else if (ts.isPropertyAccessExpression(expression) || ts.isElementAccessExpression(expression)) {
var constantValue = ts.getConstantValue(expression);
- return isFinite(constantValue)
+ return typeof constantValue === "number" && isFinite(constantValue)
&& Math.floor(constantValue) === constantValue
&& printerOptions.removeComments;
}
@@ -51817,7 +53711,7 @@ var ts;
var indentAfterOperator = needsIndentation(node, node.operatorToken, node.right);
emitExpression(node.left);
increaseIndentIf(indentBeforeOperator, isCommaOperator ? " " : undefined);
- writeTokenText(node.operatorToken.kind);
+ writeTokenNode(node.operatorToken);
increaseIndentIf(indentAfterOperator, " ");
emitExpression(node.right);
decreaseIndentIf(indentBeforeOperator, indentAfterOperator);
@@ -52077,11 +53971,11 @@ var ts;
var body = node.body;
if (body) {
if (ts.isBlock(body)) {
- var indentedFlag = ts.getEmitFlags(node) & 32768;
+ var indentedFlag = ts.getEmitFlags(node) & 65536;
if (indentedFlag) {
increaseIndent();
}
- if (ts.getEmitFlags(node) & 262144) {
+ if (ts.getEmitFlags(node) & 524288) {
emitSignatureHead(node);
if (onEmitNode) {
onEmitNode(3, body, emitBlockCallback);
@@ -52184,7 +54078,7 @@ var ts;
emitModifiers(node, node.modifiers);
write("class");
emitNodeWithPrefix(" ", node.name, emitIdentifierName);
- var indentedFlag = ts.getEmitFlags(node) & 32768;
+ var indentedFlag = ts.getEmitFlags(node) & 65536;
if (indentedFlag) {
increaseIndent();
}
@@ -52322,6 +54216,11 @@ var ts;
}
write(";");
}
+ function emitNamespaceExportDeclaration(node) {
+ write("export as namespace ");
+ emit(node.name);
+ write(";");
+ }
function emitNamedExports(node) {
emitNamedImportsOrExports(node);
}
@@ -52421,6 +54320,9 @@ var ts;
(ts.nodeIsSynthesized(parentNode) ||
ts.nodeIsSynthesized(statements[0]) ||
ts.rangeStartPositionsAreOnSameLine(parentNode, statements[0], currentSourceFile));
+ if (statements.length > 0) {
+ emitTrailingCommentsOfPosition(statements.pos);
+ }
if (emitAsSingleStatement) {
write(" ");
emit(statements[0]);
@@ -52496,6 +54398,9 @@ var ts;
function emitPartiallyEmittedExpression(node) {
emitExpression(node.expression);
}
+ function emitCommaList(node) {
+ emitExpressionList(node, node.elements, 272);
+ }
function emitPrologueDirectives(statements, startWithNewLine, seenPrologueDirectives) {
for (var i = 0; i < statements.length; i++) {
var statement = statements[i];
@@ -52551,7 +54456,7 @@ var ts;
}
function emitModifiers(node, modifiers) {
if (modifiers && modifiers.length) {
- emitList(node, modifiers, 256);
+ emitList(node, modifiers, 131328);
write(" ");
}
}
@@ -52597,11 +54502,24 @@ var ts;
function emitParameters(parentNode, parameters) {
emitList(parentNode, parameters, 1360);
}
+ function canEmitSimpleArrowHead(parentNode, parameters) {
+ var parameter = ts.singleOrUndefined(parameters);
+ return parameter
+ && parameter.pos === parentNode.pos
+ && !(ts.isArrowFunction(parentNode) && parentNode.type)
+ && !ts.some(parentNode.decorators)
+ && !ts.some(parentNode.modifiers)
+ && !ts.some(parentNode.typeParameters)
+ && !ts.some(parameter.decorators)
+ && !ts.some(parameter.modifiers)
+ && !parameter.dotDotDotToken
+ && !parameter.questionToken
+ && !parameter.type
+ && !parameter.initializer
+ && ts.isIdentifier(parameter.name);
+ }
function emitParametersForArrow(parentNode, parameters) {
- if (parameters &&
- parameters.length === 1 &&
- parameters[0].type === undefined &&
- parameters[0].pos === parentNode.pos) {
+ if (canEmitSimpleArrowHead(parentNode, parameters)) {
emit(parameters[0]);
}
else {
@@ -52744,6 +54662,15 @@ var ts;
? onEmitSourceMapOfToken(contextNode, token, pos, writeTokenText)
: writeTokenText(token, pos);
}
+ function writeTokenNode(node) {
+ if (onBeforeEmitToken) {
+ onBeforeEmitToken(node);
+ }
+ writeTokenText(node.kind);
+ if (onAfterEmitToken) {
+ onAfterEmitToken(node);
+ }
+ }
function writeTokenText(token, pos) {
var tokenString = ts.tokenToString(token);
write(tokenString);
@@ -52921,7 +54848,9 @@ var ts;
if (node.kind === 9 && node.textSourceNode) {
var textSourceNode = node.textSourceNode;
if (ts.isIdentifier(textSourceNode)) {
- return "\"" + ts.escapeNonAsciiCharacters(ts.escapeString(getTextOfNode(textSourceNode))) + "\"";
+ return ts.getEmitFlags(node) & 16777216 ?
+ "\"" + ts.escapeString(getTextOfNode(textSourceNode)) + "\"" :
+ "\"" + ts.escapeNonAsciiString(getTextOfNode(textSourceNode)) + "\"";
}
else {
return getLiteralTextOfNode(textSourceNode);
@@ -53288,6 +55217,83 @@ var ts;
return output;
}
ts.formatDiagnostics = formatDiagnostics;
+ var redForegroundEscapeSequence = "\u001b[91m";
+ var yellowForegroundEscapeSequence = "\u001b[93m";
+ var blueForegroundEscapeSequence = "\u001b[93m";
+ var gutterStyleSequence = "\u001b[100;30m";
+ var gutterSeparator = " ";
+ var resetEscapeSequence = "\u001b[0m";
+ var ellipsis = "...";
+ 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 padLeft(s, length) {
+ while (s.length < length) {
+ s = " " + s;
+ }
+ return s;
+ }
+ function formatDiagnosticsWithColorAndContext(diagnostics, host) {
+ var output = "";
+ for (var _i = 0, diagnostics_2 = diagnostics; _i < diagnostics_2.length; _i++) {
+ var diagnostic = diagnostics_2[_i];
+ if (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_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;
+ var gutterWidth = (lastLine + 1 + "").length;
+ if (hasMoreThanFiveLines) {
+ gutterWidth = Math.max(ellipsis.length, gutterWidth);
+ }
+ output += ts.sys.newLine;
+ for (var i = firstLine; i <= lastLine; i++) {
+ if (hasMoreThanFiveLines && firstLine + 1 < i && i < lastLine - 1) {
+ output += formatAndReset(padLeft(ellipsis, gutterWidth), gutterStyleSequence) + gutterSeparator + ts.sys.newLine;
+ i = lastLine - 1;
+ }
+ var lineStart = ts.getPositionOfLineAndCharacter(file, i, 0);
+ var lineEnd = i < lastLineInFile ? ts.getPositionOfLineAndCharacter(file, i + 1, 0) : file.text.length;
+ var lineContent = file.text.slice(lineStart, lineEnd);
+ lineContent = lineContent.replace(/\s+$/g, "");
+ lineContent = lineContent.replace("\t", " ");
+ output += formatAndReset(padLeft(i + 1 + "", gutterWidth), gutterStyleSequence) + gutterSeparator;
+ output += lineContent + ts.sys.newLine;
+ output += formatAndReset(padLeft("", gutterWidth), gutterStyleSequence) + gutterSeparator;
+ output += redForegroundEscapeSequence;
+ if (i === firstLine) {
+ var lastCharForLine = i === lastLine ? lastLineChar : undefined;
+ output += lineContent.slice(0, firstLineChar).replace(/\S/g, " ");
+ output += lineContent.slice(firstLineChar, lastCharForLine).replace(/./g, "~");
+ }
+ else if (i === lastLine) {
+ output += lineContent.slice(0, lastLineChar).replace(/./g, "~");
+ }
+ else {
+ output += lineContent.replace(/./g, "~");
+ }
+ output += resetEscapeSequence;
+ output += ts.sys.newLine;
+ }
+ output += ts.sys.newLine;
+ output += relativeFileName + "(" + (firstLine + 1) + "," + (firstLineChar + 1) + "): ";
+ }
+ var categoryColor = getCategoryFormat(diagnostic.category);
+ var category = ts.DiagnosticCategory[diagnostic.category].toLowerCase();
+ output += formatAndReset(category, categoryColor) + " TS" + diagnostic.code + ": " + flattenDiagnosticMessageText(diagnostic.messageText, ts.sys.newLine);
+ }
+ return output;
+ }
+ ts.formatDiagnosticsWithColorAndContext = formatDiagnosticsWithColorAndContext;
function flattenDiagnosticMessageText(messageText, newLine) {
if (typeof messageText === "string") {
return messageText;
@@ -53337,6 +55343,7 @@ var ts;
var diagnosticsProducingTypeChecker;
var noDiagnosticsTypeChecker;
var classifiableNames;
+ var modifiedFilePaths;
var cachedSemanticDiagnosticsForFile = {};
var cachedDeclarationDiagnosticsForFile = {};
var resolvedTypeReferenceDirectives = ts.createMap();
@@ -53379,7 +55386,8 @@ var ts;
}
var filesByName = ts.createFileMap();
var filesByNameIgnoreCase = host.useCaseSensitiveFileNames() ? ts.createFileMap(function (fileName) { return fileName.toLowerCase(); }) : undefined;
- if (!tryReuseStructureFromOldProgram()) {
+ var structuralIsReused = tryReuseStructureFromOldProgram();
+ if (structuralIsReused !== 2) {
ts.forEach(rootNames, function (name) { return processRootFile(name, false); });
var typeReferences = ts.getAutomaticTypeDirectiveNames(options, host);
if (typeReferences.length) {
@@ -53428,7 +55436,8 @@ var ts;
getFileProcessingDiagnostics: function () { return fileProcessingDiagnostics; },
getResolvedTypeReferenceDirectives: function () { return resolvedTypeReferenceDirectives; },
isSourceFileFromExternalLibrary: isSourceFileFromExternalLibrary,
- dropDiagnosticsProducingTypeChecker: dropDiagnosticsProducingTypeChecker
+ dropDiagnosticsProducingTypeChecker: dropDiagnosticsProducingTypeChecker,
+ getSourceFileFromReference: getSourceFileFromReference,
};
verifyCompilerOptions();
ts.performance.mark("afterProgram");
@@ -53461,45 +55470,64 @@ var ts;
return classifiableNames;
}
function resolveModuleNamesReusingOldState(moduleNames, containingFile, file, oldProgramState) {
- if (!oldProgramState && !file.ambientModuleNames.length) {
+ if (structuralIsReused === 0 && !file.ambientModuleNames.length) {
return resolveModuleNamesWorker(moduleNames, containingFile);
}
+ var oldSourceFile = oldProgramState.program && oldProgramState.program.getSourceFile(containingFile);
+ if (oldSourceFile !== file && file.resolvedModules) {
+ var result_4 = [];
+ for (var _i = 0, moduleNames_1 = moduleNames; _i < moduleNames_1.length; _i++) {
+ var moduleName = moduleNames_1[_i];
+ var resolvedModule = file.resolvedModules.get(moduleName);
+ result_4.push(resolvedModule);
+ }
+ return result_4;
+ }
var unknownModuleNames;
var result;
var predictedToResolveToAmbientModuleMarker = {};
for (var i = 0; i < moduleNames.length; i++) {
var moduleName = moduleNames[i];
- var isKnownToResolveToAmbientModule = false;
+ if (file === oldSourceFile) {
+ var oldResolvedModule = oldSourceFile && oldSourceFile.resolvedModules.get(moduleName);
+ if (oldResolvedModule) {
+ if (ts.isTraceEnabled(options, host)) {
+ ts.trace(host, ts.Diagnostics.Reusing_resolution_of_module_0_to_file_1_from_old_program, moduleName, containingFile);
+ }
+ (result || (result = new Array(moduleNames.length)))[i] = oldResolvedModule;
+ continue;
+ }
+ }
+ var resolvesToAmbientModuleInNonModifiedFile = false;
if (ts.contains(file.ambientModuleNames, moduleName)) {
- isKnownToResolveToAmbientModule = true;
+ resolvesToAmbientModuleInNonModifiedFile = true;
if (ts.isTraceEnabled(options, host)) {
ts.trace(host, ts.Diagnostics.Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1, moduleName, containingFile);
}
}
else {
- isKnownToResolveToAmbientModule = checkModuleNameResolvedToAmbientModuleInNonModifiedFile(moduleName, oldProgramState);
+ resolvesToAmbientModuleInNonModifiedFile = moduleNameResolvesToAmbientModuleInNonModifiedFile(moduleName, oldProgramState);
}
- if (isKnownToResolveToAmbientModule) {
- if (!unknownModuleNames) {
- result = new Array(moduleNames.length);
- unknownModuleNames = moduleNames.slice(0, i);
- }
- result[i] = predictedToResolveToAmbientModuleMarker;
+ if (resolvesToAmbientModuleInNonModifiedFile) {
+ (result || (result = new Array(moduleNames.length)))[i] = predictedToResolveToAmbientModuleMarker;
}
- else if (unknownModuleNames) {
- unknownModuleNames.push(moduleName);
+ else {
+ (unknownModuleNames || (unknownModuleNames = [])).push(moduleName);
}
}
- if (!unknownModuleNames) {
- return resolveModuleNamesWorker(moduleNames, containingFile);
- }
- var resolutions = unknownModuleNames.length
+ var resolutions = unknownModuleNames && unknownModuleNames.length
? resolveModuleNamesWorker(unknownModuleNames, containingFile)
: emptyArray;
+ if (!result) {
+ ts.Debug.assert(resolutions.length === moduleNames.length);
+ return resolutions;
+ }
var j = 0;
for (var i = 0; i < result.length; i++) {
- if (result[i] === predictedToResolveToAmbientModuleMarker) {
- result[i] = undefined;
+ if (result[i]) {
+ if (result[i] === predictedToResolveToAmbientModuleMarker) {
+ result[i] = undefined;
+ }
}
else {
result[i] = resolutions[j];
@@ -53508,15 +55536,12 @@ var ts;
}
ts.Debug.assert(j === resolutions.length);
return result;
- function checkModuleNameResolvedToAmbientModuleInNonModifiedFile(moduleName, oldProgramState) {
- if (!oldProgramState) {
- return false;
- }
+ function moduleNameResolvesToAmbientModuleInNonModifiedFile(moduleName, oldProgramState) {
var resolutionToFile = ts.getResolvedModule(oldProgramState.file, moduleName);
if (resolutionToFile) {
return false;
}
- var ambientModule = oldProgram.getTypeChecker().tryFindAmbientModuleWithoutAugmentations(moduleName);
+ var ambientModule = oldProgramState.program && oldProgramState.program.getTypeChecker().tryFindAmbientModuleWithoutAugmentations(moduleName);
if (!(ambientModule && ambientModule.declarations)) {
return false;
}
@@ -53535,67 +55560,76 @@ var ts;
}
function tryReuseStructureFromOldProgram() {
if (!oldProgram) {
- return false;
+ return 0;
}
var oldOptions = oldProgram.getCompilerOptions();
if (ts.changesAffectModuleResolution(oldOptions, options)) {
- return false;
+ return oldProgram.structureIsReused = 0;
}
- ts.Debug.assert(!oldProgram.structureIsReused);
+ ts.Debug.assert(!(oldProgram.structureIsReused & (2 | 1)));
var oldRootNames = oldProgram.getRootFileNames();
if (!ts.arrayIsEqualTo(oldRootNames, rootNames)) {
- return false;
+ return oldProgram.structureIsReused = 0;
}
if (!ts.arrayIsEqualTo(options.types, oldOptions.types)) {
- return false;
+ return oldProgram.structureIsReused = 0;
}
var newSourceFiles = [];
var filePaths = [];
var modifiedSourceFiles = [];
+ oldProgram.structureIsReused = 2;
for (var _i = 0, _a = oldProgram.getSourceFiles(); _i < _a.length; _i++) {
var oldSourceFile = _a[_i];
var newSourceFile = host.getSourceFileByPath
? host.getSourceFileByPath(oldSourceFile.fileName, oldSourceFile.path, options.target)
: host.getSourceFile(oldSourceFile.fileName, options.target);
if (!newSourceFile) {
- return false;
+ return oldProgram.structureIsReused = 0;
}
newSourceFile.path = oldSourceFile.path;
filePaths.push(newSourceFile.path);
if (oldSourceFile !== newSourceFile) {
if (oldSourceFile.hasNoDefaultLib !== newSourceFile.hasNoDefaultLib) {
- return false;
+ oldProgram.structureIsReused = 1;
}
if (!ts.arrayIsEqualTo(oldSourceFile.referencedFiles, newSourceFile.referencedFiles, fileReferenceIsEqualTo)) {
- return false;
+ oldProgram.structureIsReused = 1;
}
collectExternalModuleReferences(newSourceFile);
if (!ts.arrayIsEqualTo(oldSourceFile.imports, newSourceFile.imports, moduleNameIsEqualTo)) {
- return false;
+ oldProgram.structureIsReused = 1;
}
if (!ts.arrayIsEqualTo(oldSourceFile.moduleAugmentations, newSourceFile.moduleAugmentations, moduleNameIsEqualTo)) {
- return false;
+ oldProgram.structureIsReused = 1;
+ }
+ if ((oldSourceFile.flags & 524288) !== (newSourceFile.flags & 524288)) {
+ oldProgram.structureIsReused = 1;
}
if (!ts.arrayIsEqualTo(oldSourceFile.typeReferenceDirectives, newSourceFile.typeReferenceDirectives, fileReferenceIsEqualTo)) {
- return false;
+ oldProgram.structureIsReused = 1;
}
modifiedSourceFiles.push({ oldFile: oldSourceFile, newFile: newSourceFile });
}
- else {
- newSourceFile = oldSourceFile;
- }
newSourceFiles.push(newSourceFile);
}
- var modifiedFilePaths = modifiedSourceFiles.map(function (f) { return f.newFile.path; });
+ if (oldProgram.structureIsReused !== 2) {
+ return oldProgram.structureIsReused;
+ }
+ modifiedFilePaths = modifiedSourceFiles.map(function (f) { return f.newFile.path; });
for (var _b = 0, modifiedSourceFiles_1 = modifiedSourceFiles; _b < modifiedSourceFiles_1.length; _b++) {
var _c = modifiedSourceFiles_1[_b], oldSourceFile = _c.oldFile, newSourceFile = _c.newFile;
var newSourceFilePath = ts.getNormalizedAbsolutePath(newSourceFile.fileName, currentDirectory);
if (resolveModuleNamesWorker) {
var moduleNames = ts.map(ts.concatenate(newSourceFile.imports, newSourceFile.moduleAugmentations), getTextOfLiteral);
- var resolutions = resolveModuleNamesReusingOldState(moduleNames, newSourceFilePath, newSourceFile, { file: oldSourceFile, program: oldProgram, modifiedFilePaths: modifiedFilePaths });
+ var oldProgramState = { program: oldProgram, file: oldSourceFile, modifiedFilePaths: modifiedFilePaths };
+ var resolutions = resolveModuleNamesReusingOldState(moduleNames, newSourceFilePath, newSourceFile, oldProgramState);
var resolutionsChanged = ts.hasChangesInResolutions(moduleNames, resolutions, oldSourceFile.resolvedModules, ts.moduleResolutionIsEqualTo);
if (resolutionsChanged) {
- return false;
+ oldProgram.structureIsReused = 1;
+ newSourceFile.resolvedModules = ts.zipToMap(moduleNames, resolutions);
+ }
+ else {
+ newSourceFile.resolvedModules = oldSourceFile.resolvedModules;
}
}
if (resolveTypeReferenceDirectiveNamesWorker) {
@@ -53603,11 +55637,16 @@ var ts;
var resolutions = resolveTypeReferenceDirectiveNamesWorker(typesReferenceDirectives, newSourceFilePath);
var resolutionsChanged = ts.hasChangesInResolutions(typesReferenceDirectives, resolutions, oldSourceFile.resolvedTypeReferenceDirectiveNames, ts.typeDirectiveIsEqualTo);
if (resolutionsChanged) {
- return false;
+ oldProgram.structureIsReused = 1;
+ newSourceFile.resolvedTypeReferenceDirectiveNames = ts.zipToMap(typesReferenceDirectives, resolutions);
+ }
+ else {
+ newSourceFile.resolvedTypeReferenceDirectiveNames = oldSourceFile.resolvedTypeReferenceDirectiveNames;
}
}
- newSourceFile.resolvedModules = oldSourceFile.resolvedModules;
- newSourceFile.resolvedTypeReferenceDirectiveNames = oldSourceFile.resolvedTypeReferenceDirectiveNames;
+ }
+ if (oldProgram.structureIsReused !== 2) {
+ return oldProgram.structureIsReused;
}
for (var i = 0; i < newSourceFiles.length; i++) {
filesByName.set(filePaths[i], newSourceFiles[i]);
@@ -53619,8 +55658,7 @@ var ts;
fileProcessingDiagnostics.reattachFileDiagnostics(modifiedFile.newFile);
}
resolvedTypeReferenceDirectives = oldProgram.getResolvedTypeReferenceDirectives();
- oldProgram.structureIsReused = true;
- return true;
+ return oldProgram.structureIsReused = 2;
}
function getEmitHost(writeFileCallback) {
return {
@@ -53692,14 +55730,12 @@ var ts;
if (sourceFile) {
return getDiagnostics(sourceFile, cancellationToken);
}
- var allDiagnostics = [];
- ts.forEach(program.getSourceFiles(), function (sourceFile) {
+ return ts.sortAndDeduplicateDiagnostics(ts.flatMap(program.getSourceFiles(), function (sourceFile) {
if (cancellationToken) {
cancellationToken.throwIfCancellationRequested();
}
- ts.addRange(allDiagnostics, getDiagnostics(sourceFile, cancellationToken));
- });
- return ts.sortAndDeduplicateDiagnostics(allDiagnostics);
+ return getDiagnostics(sourceFile, cancellationToken);
+ }));
}
function getSyntacticDiagnostics(sourceFile, cancellationToken) {
return getDiagnosticsHelper(sourceFile, getSyntacticDiagnosticsForFile, cancellationToken);
@@ -53720,6 +55756,9 @@ var ts;
if (ts.isSourceFileJavaScript(sourceFile)) {
if (!sourceFile.additionalSyntacticDiagnostics) {
sourceFile.additionalSyntacticDiagnostics = getJavaScriptSyntacticDiagnosticsForFile(sourceFile);
+ if (ts.isCheckJsEnabledForFile(sourceFile, options)) {
+ sourceFile.additionalSyntacticDiagnostics = ts.concatenate(sourceFile.additionalSyntacticDiagnostics, sourceFile.jsDocDiagnostics);
+ }
}
return ts.concatenate(sourceFile.additionalSyntacticDiagnostics, sourceFile.parseDiagnostics);
}
@@ -53747,9 +55786,9 @@ var ts;
}
var typeChecker = getDiagnosticsProducingTypeChecker();
ts.Debug.assert(!!sourceFile.bindDiagnostics);
- var bindDiagnostics = sourceFile.bindDiagnostics;
- var includeCheckDiagnostics = !ts.isSourceFileJavaScript(sourceFile) || ts.isCheckJsEnabledForFile(sourceFile, options);
- var checkDiagnostics = includeCheckDiagnostics ? typeChecker.getDiagnostics(sourceFile, cancellationToken) : [];
+ var includeBindAndCheckDiagnostics = !ts.isSourceFileJavaScript(sourceFile) || ts.isCheckJsEnabledForFile(sourceFile, options);
+ var bindDiagnostics = includeBindAndCheckDiagnostics ? sourceFile.bindDiagnostics : emptyArray;
+ var checkDiagnostics = includeBindAndCheckDiagnostics ? typeChecker.getDiagnostics(sourceFile, cancellationToken) : emptyArray;
var fileProcessingDiagnosticsInFile = fileProcessingDiagnostics.getDiagnostics(sourceFile.fileName);
var programDiagnosticsInFile = programDiagnostics.getDiagnostics(sourceFile.fileName);
var diagnostics = bindDiagnostics.concat(checkDiagnostics, fileProcessingDiagnosticsInFile, programDiagnosticsInFile);
@@ -53960,18 +55999,13 @@ var ts;
return result;
}
function getDeclarationDiagnosticsForFile(sourceFile, cancellationToken) {
- return ts.isDeclarationFile(sourceFile) ? [] : getDeclarationDiagnosticsWorker(sourceFile, cancellationToken);
+ return sourceFile.isDeclarationFile ? [] : getDeclarationDiagnosticsWorker(sourceFile, cancellationToken);
}
function getOptionsDiagnostics() {
- var allDiagnostics = [];
- ts.addRange(allDiagnostics, fileProcessingDiagnostics.getGlobalDiagnostics());
- ts.addRange(allDiagnostics, programDiagnostics.getGlobalDiagnostics());
- return ts.sortAndDeduplicateDiagnostics(allDiagnostics);
+ return ts.sortAndDeduplicateDiagnostics(ts.concatenate(fileProcessingDiagnostics.getGlobalDiagnostics(), programDiagnostics.getGlobalDiagnostics()));
}
function getGlobalDiagnostics() {
- var allDiagnostics = [];
- ts.addRange(allDiagnostics, getDiagnosticsProducingTypeChecker().getGlobalDiagnostics());
- return ts.sortAndDeduplicateDiagnostics(allDiagnostics);
+ return ts.sortAndDeduplicateDiagnostics(getDiagnosticsProducingTypeChecker().getGlobalDiagnostics().slice());
}
function processRootFile(fileName, isDefaultLib) {
processSourceFile(ts.normalizePath(fileName), isDefaultLib);
@@ -53991,7 +56025,6 @@ var ts;
}
var isJavaScriptFile = ts.isSourceFileJavaScript(file);
var isExternalModuleFile = ts.isExternalModule(file);
- var isDtsFile = ts.isDeclarationFile(file);
var imports;
var moduleAugmentations;
var ambientModules;
@@ -54007,8 +56040,8 @@ var ts;
for (var _i = 0, _a = file.statements; _i < _a.length; _i++) {
var node = _a[_i];
collectModuleReferences(node, false);
- if (isJavaScriptFile) {
- collectRequireCalls(node);
+ if ((file.flags & 524288) || isJavaScriptFile) {
+ collectDynamicImportOrRequireCalls(node);
}
}
file.imports = imports || emptyArray;
@@ -54032,13 +56065,13 @@ var ts;
}
break;
case 233:
- if (ts.isAmbientModule(node) && (inAmbientModule || ts.hasModifier(node, 2) || ts.isDeclarationFile(file))) {
+ if (ts.isAmbientModule(node) && (inAmbientModule || ts.hasModifier(node, 2) || file.isDeclarationFile)) {
var moduleName = node.name;
if (isExternalModuleFile || (inAmbientModule && !ts.isExternalModuleNameRelative(moduleName.text))) {
(moduleAugmentations || (moduleAugmentations = [])).push(moduleName);
}
else if (!inAmbientModule) {
- if (isDtsFile) {
+ if (file.isDeclarationFile) {
(ambientModules || (ambientModules = [])).push(moduleName.text);
}
var body = node.body;
@@ -54052,55 +56085,63 @@ var ts;
}
}
}
- function collectRequireCalls(node) {
+ function collectDynamicImportOrRequireCalls(node) {
if (ts.isRequireCall(node, true)) {
(imports || (imports = [])).push(node.arguments[0]);
}
+ else if (ts.isImportCall(node) && node.arguments.length === 1 && node.arguments[0].kind === 9) {
+ (imports || (imports = [])).push(node.arguments[0]);
+ }
else {
- ts.forEachChild(node, collectRequireCalls);
+ ts.forEachChild(node, collectDynamicImportOrRequireCalls);
}
}
}
- function processSourceFile(fileName, isDefaultLib, refFile, refPos, refEnd) {
- var diagnosticArgument;
- var diagnostic;
+ function getSourceFileFromReference(referencingFile, ref) {
+ return getSourceFileFromReferenceWorker(resolveTripleslashReference(ref.fileName, referencingFile.fileName), function (fileName) { return filesByName.get(ts.toPath(fileName, currentDirectory, getCanonicalFileName)); });
+ }
+ function getSourceFileFromReferenceWorker(fileName, getSourceFile, fail, refFile) {
if (ts.hasExtension(fileName)) {
if (!options.allowNonTsExtensions && !ts.forEach(supportedExtensions, function (extension) { return ts.fileExtensionIs(host.getCanonicalFileName(fileName), extension); })) {
- diagnostic = ts.Diagnostics.File_0_has_unsupported_extension_The_only_supported_extensions_are_1;
- diagnosticArgument = [fileName, "'" + supportedExtensions.join("', '") + "'"];
- }
- else if (!findSourceFile(fileName, ts.toPath(fileName, currentDirectory, getCanonicalFileName), isDefaultLib, refFile, refPos, refEnd)) {
- diagnostic = ts.Diagnostics.File_0_not_found;
- diagnosticArgument = [fileName];
- }
- else if (refFile && host.getCanonicalFileName(fileName) === host.getCanonicalFileName(refFile.fileName)) {
- diagnostic = ts.Diagnostics.A_file_cannot_have_a_reference_to_itself;
- diagnosticArgument = [fileName];
+ if (fail)
+ fail(ts.Diagnostics.File_0_has_unsupported_extension_The_only_supported_extensions_are_1, fileName, "'" + supportedExtensions.join("', '") + "'");
+ return undefined;
}
- }
- else {
- var nonTsFile = options.allowNonTsExtensions && findSourceFile(fileName, ts.toPath(fileName, currentDirectory, getCanonicalFileName), isDefaultLib, refFile, refPos, refEnd);
- if (!nonTsFile) {
- if (options.allowNonTsExtensions) {
- diagnostic = ts.Diagnostics.File_0_not_found;
- diagnosticArgument = [fileName];
+ var sourceFile = getSourceFile(fileName);
+ if (fail) {
+ if (!sourceFile) {
+ fail(ts.Diagnostics.File_0_not_found, fileName);
}
- else if (!ts.forEach(supportedExtensions, function (extension) { return findSourceFile(fileName + extension, ts.toPath(fileName + extension, currentDirectory, getCanonicalFileName), isDefaultLib, refFile, refPos, refEnd); })) {
- diagnostic = ts.Diagnostics.File_0_not_found;
- fileName += ".ts";
- diagnosticArgument = [fileName];
+ else if (refFile && host.getCanonicalFileName(fileName) === host.getCanonicalFileName(refFile.fileName)) {
+ fail(ts.Diagnostics.A_file_cannot_have_a_reference_to_itself, fileName);
}
}
+ return sourceFile;
}
- if (diagnostic) {
- if (refFile !== undefined && refEnd !== undefined && refPos !== undefined) {
- fileProcessingDiagnostics.add(ts.createFileDiagnostic.apply(void 0, [refFile, refPos, refEnd - refPos, diagnostic].concat(diagnosticArgument)));
- }
- else {
- fileProcessingDiagnostics.add(ts.createCompilerDiagnostic.apply(void 0, [diagnostic].concat(diagnosticArgument)));
+ else {
+ var sourceFileNoExtension = options.allowNonTsExtensions && getSourceFile(fileName);
+ if (sourceFileNoExtension)
+ return sourceFileNoExtension;
+ if (fail && options.allowNonTsExtensions) {
+ fail(ts.Diagnostics.File_0_not_found, fileName);
+ return undefined;
}
+ var sourceFileWithAddedExtension = ts.forEach(supportedExtensions, function (extension) { return getSourceFile(fileName + extension); });
+ if (fail && !sourceFileWithAddedExtension)
+ fail(ts.Diagnostics.File_0_not_found, fileName + ".ts");
+ return sourceFileWithAddedExtension;
}
}
+ function processSourceFile(fileName, isDefaultLib, refFile, refPos, refEnd) {
+ getSourceFileFromReferenceWorker(fileName, function (fileName) { return findSourceFile(fileName, ts.toPath(fileName, currentDirectory, getCanonicalFileName), isDefaultLib, refFile, refPos, refEnd); }, function (diagnostic) {
+ var args = [];
+ for (var _i = 1; _i < arguments.length; _i++) {
+ args[_i - 1] = arguments[_i];
+ }
+ fileProcessingDiagnostics.add(refFile !== undefined && refEnd !== undefined && refPos !== undefined
+ ? ts.createFileDiagnostic.apply(void 0, [refFile, refPos, refEnd - refPos, diagnostic].concat(args)) : ts.createCompilerDiagnostic.apply(void 0, [diagnostic].concat(args)));
+ }, refFile);
+ }
function reportFileNamesDifferOnlyInCasingError(fileName, existingFileName, refFile, refPos, refEnd) {
if (refFile !== undefined && refPos !== undefined && refEnd !== undefined) {
fileProcessingDiagnostics.add(ts.createFileDiagnostic(refFile, refPos, refEnd - refPos, ts.Diagnostics.File_name_0_differs_from_already_included_file_name_1_only_in_casing, fileName, existingFileName));
@@ -54235,10 +56276,10 @@ var ts;
function processImportedModules(file) {
collectExternalModuleReferences(file);
if (file.imports.length || file.moduleAugmentations.length) {
- file.resolvedModules = ts.createMap();
var nonGlobalAugmentation = ts.filter(file.moduleAugmentations, function (moduleAugmentation) { return moduleAugmentation.kind === 9; });
var moduleNames = ts.map(ts.concatenate(file.imports, nonGlobalAugmentation), getTextOfLiteral);
- var resolutions = resolveModuleNamesReusingOldState(moduleNames, ts.getNormalizedAbsolutePath(file.fileName, currentDirectory), file);
+ var oldProgramState = { program: oldProgram, file: file, modifiedFilePaths: modifiedFilePaths };
+ var resolutions = resolveModuleNamesReusingOldState(moduleNames, ts.getNormalizedAbsolutePath(file.fileName, currentDirectory), file, oldProgramState);
ts.Debug.assert(resolutions.length === moduleNames.length);
for (var i = 0; i < moduleNames.length; i++) {
var resolution = resolutions[i];
@@ -54287,7 +56328,7 @@ var ts;
var absoluteRootDirectoryPath = host.getCanonicalFileName(ts.getNormalizedAbsolutePath(rootDirectory, currentDirectory));
for (var _i = 0, sourceFiles_3 = sourceFiles; _i < sourceFiles_3.length; _i++) {
var sourceFile = sourceFiles_3[_i];
- if (!ts.isDeclarationFile(sourceFile)) {
+ if (!sourceFile.isDeclarationFile) {
var absoluteSourceFilePath = host.getCanonicalFileName(ts.getNormalizedAbsolutePath(sourceFile.fileName, currentDirectory));
if (absoluteSourceFilePath.indexOf(absoluteRootDirectoryPath) !== 0) {
programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files, sourceFile.fileName, options.rootDir));
@@ -54384,12 +56425,12 @@ var ts;
}
var languageVersion = options.target || 0;
var outFile = options.outFile || options.out;
- var firstNonAmbientExternalModuleSourceFile = ts.forEach(files, function (f) { return ts.isExternalModule(f) && !ts.isDeclarationFile(f) ? f : undefined; });
+ var firstNonAmbientExternalModuleSourceFile = ts.forEach(files, function (f) { return ts.isExternalModule(f) && !f.isDeclarationFile ? f : undefined; });
if (options.isolatedModules) {
if (options.module === ts.ModuleKind.None && languageVersion < 2) {
programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES2015_or_higher));
}
- var firstNonExternalModuleSourceFile = ts.forEach(files, function (f) { return !ts.isExternalModule(f) && !ts.isDeclarationFile(f) ? f : undefined; });
+ var firstNonExternalModuleSourceFile = ts.forEach(files, function (f) { return !ts.isExternalModule(f) && !f.isDeclarationFile ? f : undefined; });
if (firstNonExternalModuleSourceFile) {
var span_7 = ts.getErrorSpanForNode(firstNonExternalModuleSourceFile, firstNonExternalModuleSourceFile);
programDiagnostics.add(ts.createFileDiagnostic(firstNonExternalModuleSourceFile, span_7.start, span_7.length, ts.Diagnostics.Cannot_compile_namespaces_when_the_isolatedModules_flag_is_provided));
@@ -54585,11 +56626,12 @@ var ts;
"umd": ts.ModuleKind.UMD,
"es6": ts.ModuleKind.ES2015,
"es2015": ts.ModuleKind.ES2015,
+ "esnext": ts.ModuleKind.ESNext
}),
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,
+ description: ts.Diagnostics.Specify_module_code_generation_Colon_commonjs_amd_system_umd_es2015_or_ESNext,
},
{
name: "lib",
@@ -54621,6 +56663,7 @@ var ts;
"es2017.object": "lib.es2017.object.d.ts",
"es2017.sharedmemory": "lib.es2017.sharedmemory.d.ts",
"es2017.string": "lib.es2017.string.d.ts",
+ "es2017.intl": "lib.es2017.intl.d.ts",
"esnext.asynciterable": "lib.esnext.asynciterable.d.ts",
}),
},
@@ -55082,6 +57125,12 @@ var ts;
description: ts.Diagnostics.The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files
},
{
+ name: "noStrictGenericChecks",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Disable_strict_checking_of_generic_signatures_in_function_types,
+ },
+ {
name: "plugins",
type: "list",
isTSConfigOnly: true,
@@ -55151,7 +57200,6 @@ var ts;
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);
@@ -55185,7 +57233,6 @@ var ts;
var options = {};
var fileNames = [];
var errors = [];
- var _a = getOptionNameMap(), optionNameMap = _a.optionNameMap, shortOptionNames = _a.shortOptionNames;
parseStrings(commandLine);
return {
options: options,
@@ -55201,12 +57248,7 @@ var ts;
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);
+ var opt = getOptionFromName(s.slice(s.charCodeAt(1) === 45 ? 2 : 1), true);
if (opt) {
if (opt.isTSConfigOnly) {
errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_can_only_be_specified_in_tsconfig_json_file, opt.name));
@@ -55290,6 +57332,18 @@ var ts;
}
}
ts.parseCommandLine = parseCommandLine;
+ function getOptionFromName(optionName, allowShort) {
+ if (allowShort === void 0) { allowShort = false; }
+ optionName = optionName.toLowerCase();
+ var _a = getOptionNameMap(), optionNameMap = _a.optionNameMap, shortOptionNames = _a.shortOptionNames;
+ if (allowShort) {
+ var short = shortOptionNames.get(optionName);
+ if (short !== undefined) {
+ optionName = short;
+ }
+ }
+ return optionNameMap.get(optionName);
+ }
function readConfigFile(fileName, readFile) {
var text = "";
try {
@@ -55432,7 +57486,7 @@ var ts;
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);
+ result.push(optionName && "" + tab + tab + optionName + (description && (makePadding(marginLength - optionName.length + 2) + description)));
}
if (configurations.files && configurations.files.length) {
result.push(tab + "},");
@@ -55472,49 +57526,28 @@ var ts;
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);
- var baseCompileOnSave;
- 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, baseCompileOnSave, baseOptions]), include = _b[0], exclude = _b[1], files = _b[2], baseCompileOnSave = _b[3], baseOptions = _b[4];
+ var options = (function () {
+ var _a = parseConfig(json, host, basePath, configFileName, resolutionStack, errors), include = _a.include, exclude = _a.exclude, files = _a.files, options = _a.options, compileOnSave = _a.compileOnSave;
+ if (include) {
+ json.include = include;
}
- else {
- errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Compiler_option_0_requires_a_value_of_type_1, "extends", "string"));
+ if (exclude) {
+ json.exclude = exclude;
}
- if (include && !json["include"]) {
- json["include"] = include;
+ if (files) {
+ json.files = files;
}
- if (exclude && !json["exclude"]) {
- json["exclude"] = exclude;
+ if (compileOnSave !== undefined) {
+ json.compileOnSave = compileOnSave;
}
- if (files && !json["files"]) {
- json["files"] = files;
- }
- options = ts.assign({}, baseOptions, options);
- }
+ return options;
+ })();
options = ts.extend(existingOptions, options);
options.configFilePath = configFileName;
- var _c = getFileNames(errors), fileNames = _c.fileNames, wildcardDirectories = _c.wildcardDirectories;
+ var jsonOptions = json["typeAcquisition"] || json["typingOptions"];
+ var typeAcquisition = convertTypeAcquisitionFromJsonWorker(jsonOptions, basePath, errors, configFileName);
+ var _a = getFileNames(), fileNames = _a.fileNames, wildcardDirectories = _a.wildcardDirectories;
var compileOnSave = convertCompileOnSaveOptionFromJson(json, basePath, errors);
- if (baseCompileOnSave && json[ts.compileOnSaveCommandLineOption.name] === undefined) {
- compileOnSave = baseCompileOnSave;
- }
return {
options: options,
fileNames: fileNames,
@@ -55524,37 +57557,7 @@ var ts;
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.compileOnSave, result.options];
- }
- function getFileNames(errors) {
+ function getFileNames() {
var fileNames;
if (ts.hasProperty(json, "files")) {
if (ts.isArray(json["files"])) {
@@ -55585,9 +57588,6 @@ var ts;
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"];
@@ -55604,9 +57604,66 @@ var ts;
}
return result;
}
- var _b;
}
ts.parseJsonConfigFileContent = parseJsonConfigFileContent;
+ function parseConfig(json, host, basePath, configFileName, resolutionStack, errors) {
+ basePath = ts.normalizeSlashes(basePath);
+ var getCanonicalFileName = ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames);
+ var resolvedPath = ts.toPath(configFileName || "", basePath, getCanonicalFileName);
+ if (resolutionStack.indexOf(resolvedPath) >= 0) {
+ errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Circularity_detected_while_resolving_configuration_Colon_0, resolutionStack.concat([resolvedPath]).join(" -> ")));
+ return { include: undefined, exclude: undefined, files: undefined, options: {}, compileOnSave: undefined };
+ }
+ if (ts.hasProperty(json, "excludes")) {
+ errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Unknown_option_excludes_Did_you_mean_exclude));
+ }
+ var options = convertCompilerOptionsFromJsonWorker(json.compilerOptions, basePath, errors, configFileName);
+ var include = json.include, exclude = json.exclude, files = json.files;
+ var compileOnSave = json.compileOnSave;
+ if (json.extends) {
+ resolutionStack = resolutionStack.concat([resolvedPath]);
+ var base = getExtendedConfig(json.extends, host, basePath, getCanonicalFileName, resolutionStack, errors);
+ if (base) {
+ include = include || base.include;
+ exclude = exclude || base.exclude;
+ files = files || base.files;
+ if (compileOnSave === undefined) {
+ compileOnSave = base.compileOnSave;
+ }
+ options = ts.assign({}, base.options, options);
+ }
+ }
+ return { include: include, exclude: exclude, files: files, options: options, compileOnSave: compileOnSave };
+ }
+ function getExtendedConfig(extended, host, basePath, getCanonicalFileName, resolutionStack, errors) {
+ if (typeof extended !== "string") {
+ errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Compiler_option_0_requires_a_value_of_type_1, "extends", "string"));
+ return undefined;
+ }
+ extended = ts.normalizeSlashes(extended);
+ if (!(ts.isRootedDiskPath(extended) || ts.startsWith(extended, "./") || ts.startsWith(extended, "../"))) {
+ errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.A_path_in_an_extends_option_must_be_relative_or_rooted_but_0_is_not, extended));
+ return undefined;
+ }
+ var extendedConfigPath = ts.toPath(extended, 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, extended));
+ return undefined;
+ }
+ }
+ var extendedResult = readConfigFile(extendedConfigPath, function (path) { return host.readFile(path); });
+ if (extendedResult.error) {
+ errors.push(extendedResult.error);
+ return undefined;
+ }
+ 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 _a = parseConfig(extendedResult.config, host, extendedDirname, ts.getBaseFileName(extendedConfigPath), resolutionStack, errors), include = _a.include, exclude = _a.exclude, files = _a.files, options = _a.options, compileOnSave = _a.compileOnSave;
+ return { include: ts.map(include, updatePath), exclude: ts.map(exclude, updatePath), files: ts.map(files, updatePath), compileOnSave: compileOnSave, options: options };
+ }
function convertCompileOnSaveOptionFromJson(jsonOption, basePath, errors) {
if (!ts.hasProperty(jsonOption, ts.compileOnSaveCommandLineOption.name)) {
return false;
@@ -55786,7 +57843,7 @@ var ts;
}
}
}
- for (var key in wildcardDirectories)
+ 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];
@@ -55795,6 +57852,7 @@ var ts;
}
}
}
+ }
}
return wildcardDirectories;
}
@@ -55838,6 +57896,40 @@ var ts;
function caseInsensitiveKeyMapper(key) {
return key.toLowerCase();
}
+ function convertCompilerOptionsForTelemetry(opts) {
+ var out = {};
+ for (var key in opts) {
+ if (opts.hasOwnProperty(key)) {
+ var type = getOptionFromName(key);
+ if (type !== undefined) {
+ out[key] = getOptionValueWithEmptyStrings(opts[key], type);
+ }
+ }
+ }
+ return out;
+ }
+ ts.convertCompilerOptionsForTelemetry = convertCompilerOptionsForTelemetry;
+ function getOptionValueWithEmptyStrings(value, option) {
+ switch (option.type) {
+ case "object":
+ return "";
+ case "string":
+ return "";
+ case "number":
+ return typeof value === "number" ? value : "";
+ case "boolean":
+ return typeof value === "boolean" ? value : "";
+ case "list":
+ var elementType_1 = option.element;
+ return ts.isArray(value) ? value.map(function (v) { return getOptionValueWithEmptyStrings(v, elementType_1); }) : "";
+ default:
+ return ts.forEachEntry(option.type, function (optionEnumValue, optionStringValue) {
+ if (optionEnumValue === value) {
+ return optionStringValue;
+ }
+ });
+ }
+ }
})(ts || (ts = {}));
var ts;
(function (ts) {
@@ -55851,8 +57943,8 @@ var ts;
reportDiagnosticWorker(diagnostic, host || defaultFormatDiagnosticsHost);
}
function reportDiagnostics(diagnostics, host) {
- for (var _i = 0, diagnostics_2 = diagnostics; _i < diagnostics_2.length; _i++) {
- var diagnostic = diagnostics_2[_i];
+ for (var _i = 0, diagnostics_3 = diagnostics; _i < diagnostics_3.length; _i++) {
+ var diagnostic = diagnostics_3[_i];
reportDiagnostic(diagnostic, host);
}
}
@@ -55885,73 +57977,8 @@ var ts;
function reportDiagnosticSimply(diagnostic, host) {
ts.sys.write(ts.formatDiagnostics([diagnostic], host));
}
- var redForegroundEscapeSequence = "\u001b[91m";
- var yellowForegroundEscapeSequence = "\u001b[93m";
- var blueForegroundEscapeSequence = "\u001b[93m";
- var gutterStyleSequence = "\u001b[100;30m";
- var gutterSeparator = " ";
- var resetEscapeSequence = "\u001b[0m";
- var ellipsis = "...";
- 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_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_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;
- var gutterWidth = (lastLine + 1 + "").length;
- if (hasMoreThanFiveLines) {
- gutterWidth = Math.max(ellipsis.length, gutterWidth);
- }
- output += ts.sys.newLine;
- for (var i = firstLine; i <= lastLine; i++) {
- if (hasMoreThanFiveLines && firstLine + 1 < i && i < lastLine - 1) {
- output += formatAndReset(padLeft(ellipsis, gutterWidth), gutterStyleSequence) + gutterSeparator + ts.sys.newLine;
- i = lastLine - 1;
- }
- var lineStart = ts.getPositionOfLineAndCharacter(file, i, 0);
- var lineEnd = i < lastLineInFile ? ts.getPositionOfLineAndCharacter(file, i + 1, 0) : file.text.length;
- var lineContent = file.text.slice(lineStart, lineEnd);
- lineContent = lineContent.replace(/\s+$/g, "");
- lineContent = lineContent.replace("\t", " ");
- output += formatAndReset(padLeft(i + 1 + "", gutterWidth), gutterStyleSequence) + gutterSeparator;
- output += lineContent + ts.sys.newLine;
- output += formatAndReset(padLeft("", gutterWidth), gutterStyleSequence) + gutterSeparator;
- output += redForegroundEscapeSequence;
- if (i === firstLine) {
- var lastCharForLine = i === lastLine ? lastLineChar : undefined;
- output += lineContent.slice(0, firstLineChar).replace(/\S/g, " ");
- output += lineContent.slice(firstLineChar, lastCharForLine).replace(/./g, "~");
- }
- else if (i === lastLine) {
- output += lineContent.slice(0, lastLineChar).replace(/./g, "~");
- }
- else {
- output += lineContent.replace(/./g, "~");
- }
- output += resetEscapeSequence;
- output += ts.sys.newLine;
- }
- output += ts.sys.newLine;
- output += relativeFileName + "(" + (firstLine + 1) + "," + (firstLineChar + 1) + "): ";
- }
- 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;
- ts.sys.write(output);
+ ts.sys.write(ts.formatDiagnosticsWithColorAndContext([diagnostic], host) + ts.sys.newLine + ts.sys.newLine);
}
function reportWatchDiagnostic(diagnostic) {
var output = new Date().toLocaleTimeString() + " - ";
@@ -56414,6 +58441,9 @@ var ts;
return;
}
})(ts || (ts = {}));
+if (ts.Debug.isDebugging) {
+ ts.Debug.enableDebugInfo();
+}
if (ts.sys.tryEnableSourceMapsForHost && /^development$/i.test(ts.sys.getEnvironmentVariable("NODE_ENV"))) {
ts.sys.tryEnableSourceMapsForHost();
}
diff --git a/node_modules/typedoc/node_modules/typescript/lib/tsserver.js b/node_modules/typedoc/node_modules/typescript/lib/tsserver.js
index fe15ad294..55142c7aa 100644
--- a/node_modules/typedoc/node_modules/typescript/lib/tsserver.js
+++ b/node_modules/typedoc/node_modules/typescript/lib/tsserver.js
@@ -1,18 +1,18 @@
-/*! *****************************************************************************
-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.
+***************************************************************************** */
+
var __assign = (this && this.__assign) || Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
@@ -321,20 +321,22 @@ var ts;
SyntaxKind[SyntaxKind["JSDocComment"] = 283] = "JSDocComment";
SyntaxKind[SyntaxKind["JSDocTag"] = 284] = "JSDocTag";
SyntaxKind[SyntaxKind["JSDocAugmentsTag"] = 285] = "JSDocAugmentsTag";
- SyntaxKind[SyntaxKind["JSDocParameterTag"] = 286] = "JSDocParameterTag";
- SyntaxKind[SyntaxKind["JSDocReturnTag"] = 287] = "JSDocReturnTag";
- SyntaxKind[SyntaxKind["JSDocTypeTag"] = 288] = "JSDocTypeTag";
- SyntaxKind[SyntaxKind["JSDocTemplateTag"] = 289] = "JSDocTemplateTag";
- SyntaxKind[SyntaxKind["JSDocTypedefTag"] = 290] = "JSDocTypedefTag";
- SyntaxKind[SyntaxKind["JSDocPropertyTag"] = 291] = "JSDocPropertyTag";
- SyntaxKind[SyntaxKind["JSDocTypeLiteral"] = 292] = "JSDocTypeLiteral";
- SyntaxKind[SyntaxKind["JSDocLiteralType"] = 293] = "JSDocLiteralType";
- SyntaxKind[SyntaxKind["SyntaxList"] = 294] = "SyntaxList";
- SyntaxKind[SyntaxKind["NotEmittedStatement"] = 295] = "NotEmittedStatement";
- SyntaxKind[SyntaxKind["PartiallyEmittedExpression"] = 296] = "PartiallyEmittedExpression";
- SyntaxKind[SyntaxKind["MergeDeclarationMarker"] = 297] = "MergeDeclarationMarker";
- SyntaxKind[SyntaxKind["EndOfDeclarationMarker"] = 298] = "EndOfDeclarationMarker";
- SyntaxKind[SyntaxKind["Count"] = 299] = "Count";
+ SyntaxKind[SyntaxKind["JSDocClassTag"] = 286] = "JSDocClassTag";
+ SyntaxKind[SyntaxKind["JSDocParameterTag"] = 287] = "JSDocParameterTag";
+ SyntaxKind[SyntaxKind["JSDocReturnTag"] = 288] = "JSDocReturnTag";
+ SyntaxKind[SyntaxKind["JSDocTypeTag"] = 289] = "JSDocTypeTag";
+ SyntaxKind[SyntaxKind["JSDocTemplateTag"] = 290] = "JSDocTemplateTag";
+ SyntaxKind[SyntaxKind["JSDocTypedefTag"] = 291] = "JSDocTypedefTag";
+ SyntaxKind[SyntaxKind["JSDocPropertyTag"] = 292] = "JSDocPropertyTag";
+ SyntaxKind[SyntaxKind["JSDocTypeLiteral"] = 293] = "JSDocTypeLiteral";
+ SyntaxKind[SyntaxKind["JSDocLiteralType"] = 294] = "JSDocLiteralType";
+ SyntaxKind[SyntaxKind["SyntaxList"] = 295] = "SyntaxList";
+ SyntaxKind[SyntaxKind["NotEmittedStatement"] = 296] = "NotEmittedStatement";
+ SyntaxKind[SyntaxKind["PartiallyEmittedExpression"] = 297] = "PartiallyEmittedExpression";
+ SyntaxKind[SyntaxKind["CommaListExpression"] = 298] = "CommaListExpression";
+ SyntaxKind[SyntaxKind["MergeDeclarationMarker"] = 299] = "MergeDeclarationMarker";
+ SyntaxKind[SyntaxKind["EndOfDeclarationMarker"] = 300] = "EndOfDeclarationMarker";
+ SyntaxKind[SyntaxKind["Count"] = 301] = "Count";
SyntaxKind[SyntaxKind["FirstAssignment"] = 58] = "FirstAssignment";
SyntaxKind[SyntaxKind["LastAssignment"] = 70] = "LastAssignment";
SyntaxKind[SyntaxKind["FirstCompoundAssignment"] = 59] = "FirstCompoundAssignment";
@@ -361,9 +363,9 @@ var ts;
SyntaxKind[SyntaxKind["LastBinaryOperator"] = 70] = "LastBinaryOperator";
SyntaxKind[SyntaxKind["FirstNode"] = 143] = "FirstNode";
SyntaxKind[SyntaxKind["FirstJSDocNode"] = 267] = "FirstJSDocNode";
- SyntaxKind[SyntaxKind["LastJSDocNode"] = 293] = "LastJSDocNode";
- SyntaxKind[SyntaxKind["FirstJSDocTagNode"] = 283] = "FirstJSDocTagNode";
- SyntaxKind[SyntaxKind["LastJSDocTagNode"] = 293] = "LastJSDocTagNode";
+ SyntaxKind[SyntaxKind["LastJSDocNode"] = 294] = "LastJSDocNode";
+ SyntaxKind[SyntaxKind["FirstJSDocTagNode"] = 284] = "FirstJSDocTagNode";
+ SyntaxKind[SyntaxKind["LastJSDocTagNode"] = 294] = "LastJSDocTagNode";
})(SyntaxKind = ts.SyntaxKind || (ts.SyntaxKind = {}));
var NodeFlags;
(function (NodeFlags) {
@@ -387,6 +389,7 @@ var ts;
NodeFlags[NodeFlags["JavaScriptFile"] = 65536] = "JavaScriptFile";
NodeFlags[NodeFlags["ThisNodeOrAnySubNodesHasError"] = 131072] = "ThisNodeOrAnySubNodesHasError";
NodeFlags[NodeFlags["HasAggregatedChildData"] = 262144] = "HasAggregatedChildData";
+ NodeFlags[NodeFlags["PossiblyContainsDynamicImport"] = 524288] = "PossiblyContainsDynamicImport";
NodeFlags[NodeFlags["BlockScoped"] = 3] = "BlockScoped";
NodeFlags[NodeFlags["ReachabilityCheckFlags"] = 384] = "ReachabilityCheckFlags";
NodeFlags[NodeFlags["ReachabilityAndEmitFlags"] = 1408] = "ReachabilityAndEmitFlags";
@@ -469,6 +472,12 @@ var ts;
return OperationCanceledException;
}());
ts.OperationCanceledException = OperationCanceledException;
+ var StructureIsReused;
+ (function (StructureIsReused) {
+ StructureIsReused[StructureIsReused["Not"] = 0] = "Not";
+ StructureIsReused[StructureIsReused["SafeModules"] = 1] = "SafeModules";
+ StructureIsReused[StructureIsReused["Completely"] = 2] = "Completely";
+ })(StructureIsReused = ts.StructureIsReused || (ts.StructureIsReused = {}));
var ExitStatus;
(function (ExitStatus) {
ExitStatus[ExitStatus["Success"] = 0] = "Success";
@@ -478,29 +487,38 @@ var ts;
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[NodeBuilderFlags["NoTruncation"] = 1] = "NoTruncation";
+ NodeBuilderFlags[NodeBuilderFlags["WriteArrayAsGenericType"] = 2] = "WriteArrayAsGenericType";
+ NodeBuilderFlags[NodeBuilderFlags["WriteTypeArgumentsOfSignature"] = 32] = "WriteTypeArgumentsOfSignature";
+ NodeBuilderFlags[NodeBuilderFlags["UseFullyQualifiedType"] = 64] = "UseFullyQualifiedType";
+ NodeBuilderFlags[NodeBuilderFlags["SuppressAnyReturnType"] = 256] = "SuppressAnyReturnType";
+ NodeBuilderFlags[NodeBuilderFlags["WriteTypeParametersInQualifiedName"] = 512] = "WriteTypeParametersInQualifiedName";
+ NodeBuilderFlags[NodeBuilderFlags["AllowThisInObjectLiteral"] = 1024] = "AllowThisInObjectLiteral";
+ NodeBuilderFlags[NodeBuilderFlags["AllowQualifedNameInPlaceOfIdentifier"] = 2048] = "AllowQualifedNameInPlaceOfIdentifier";
+ NodeBuilderFlags[NodeBuilderFlags["AllowAnonymousIdentifier"] = 8192] = "AllowAnonymousIdentifier";
+ NodeBuilderFlags[NodeBuilderFlags["AllowEmptyUnionOrIntersection"] = 16384] = "AllowEmptyUnionOrIntersection";
+ NodeBuilderFlags[NodeBuilderFlags["AllowEmptyTuple"] = 32768] = "AllowEmptyTuple";
+ NodeBuilderFlags[NodeBuilderFlags["IgnoreErrors"] = 60416] = "IgnoreErrors";
+ NodeBuilderFlags[NodeBuilderFlags["InObjectTypeLiteral"] = 1048576] = "InObjectTypeLiteral";
+ NodeBuilderFlags[NodeBuilderFlags["InTypeAlias"] = 8388608] = "InTypeAlias";
})(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[TypeFormatFlags["UseTypeOfFunction"] = 4] = "UseTypeOfFunction";
+ TypeFormatFlags[TypeFormatFlags["NoTruncation"] = 8] = "NoTruncation";
+ TypeFormatFlags[TypeFormatFlags["WriteArrowStyleSignature"] = 16] = "WriteArrowStyleSignature";
+ TypeFormatFlags[TypeFormatFlags["WriteOwnNameForAnyLike"] = 32] = "WriteOwnNameForAnyLike";
+ TypeFormatFlags[TypeFormatFlags["WriteTypeArgumentsOfSignature"] = 64] = "WriteTypeArgumentsOfSignature";
+ TypeFormatFlags[TypeFormatFlags["InElementType"] = 128] = "InElementType";
+ TypeFormatFlags[TypeFormatFlags["UseFullyQualifiedType"] = 256] = "UseFullyQualifiedType";
+ TypeFormatFlags[TypeFormatFlags["InFirstTypeArgument"] = 512] = "InFirstTypeArgument";
+ TypeFormatFlags[TypeFormatFlags["InTypeAlias"] = 1024] = "InTypeAlias";
+ TypeFormatFlags[TypeFormatFlags["UseTypeAliasValue"] = 2048] = "UseTypeAliasValue";
+ TypeFormatFlags[TypeFormatFlags["SuppressAnyReturnType"] = 4096] = "SuppressAnyReturnType";
+ TypeFormatFlags[TypeFormatFlags["AddUndefined"] = 8192] = "AddUndefined";
+ TypeFormatFlags[TypeFormatFlags["WriteClassExpressionAsTypeLiteral"] = 16384] = "WriteClassExpressionAsTypeLiteral";
})(TypeFormatFlags = ts.TypeFormatFlags || (ts.TypeFormatFlags = {}));
var SymbolFormatFlags;
(function (SymbolFormatFlags) {
@@ -604,6 +622,11 @@ var ts;
SymbolFlags[SymbolFlags["ClassMember"] = 106500] = "ClassMember";
SymbolFlags[SymbolFlags["Classifiable"] = 788448] = "Classifiable";
})(SymbolFlags = ts.SymbolFlags || (ts.SymbolFlags = {}));
+ var EnumKind;
+ (function (EnumKind) {
+ EnumKind[EnumKind["Numeric"] = 0] = "Numeric";
+ EnumKind[EnumKind["Literal"] = 1] = "Literal";
+ })(EnumKind = ts.EnumKind || (ts.EnumKind = {}));
var CheckFlags;
(function (CheckFlags) {
CheckFlags[CheckFlags["Instantiated"] = 1] = "Instantiated";
@@ -671,21 +694,21 @@ var ts;
TypeFlags[TypeFlags["NonPrimitive"] = 16777216] = "NonPrimitive";
TypeFlags[TypeFlags["JsxAttributes"] = 33554432] = "JsxAttributes";
TypeFlags[TypeFlags["Nullable"] = 6144] = "Nullable";
- TypeFlags[TypeFlags["Literal"] = 480] = "Literal";
+ TypeFlags[TypeFlags["Literal"] = 224] = "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["NumberLike"] = 84] = "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["Narrowable"] = 17810175] = "Narrowable";
TypeFlags[TypeFlags["NotUnionOrUnit"] = 16810497] = "NotUnionOrUnit";
TypeFlags[TypeFlags["RequiresWidening"] = 6291456] = "RequiresWidening";
TypeFlags[TypeFlags["PropagatingFlags"] = 14680064] = "PropagatingFlags";
@@ -714,6 +737,18 @@ var ts;
IndexKind[IndexKind["String"] = 0] = "String";
IndexKind[IndexKind["Number"] = 1] = "Number";
})(IndexKind = ts.IndexKind || (ts.IndexKind = {}));
+ var InferencePriority;
+ (function (InferencePriority) {
+ InferencePriority[InferencePriority["NakedTypeVariable"] = 1] = "NakedTypeVariable";
+ InferencePriority[InferencePriority["MappedType"] = 2] = "MappedType";
+ InferencePriority[InferencePriority["ReturnType"] = 4] = "ReturnType";
+ })(InferencePriority = ts.InferencePriority || (ts.InferencePriority = {}));
+ var InferenceFlags;
+ (function (InferenceFlags) {
+ InferenceFlags[InferenceFlags["InferUnionTypes"] = 1] = "InferUnionTypes";
+ InferenceFlags[InferenceFlags["NoDefault"] = 2] = "NoDefault";
+ InferenceFlags[InferenceFlags["AnyDefault"] = 4] = "AnyDefault";
+ })(InferenceFlags = ts.InferenceFlags || (ts.InferenceFlags = {}));
var SpecialPropertyAssignmentKind;
(function (SpecialPropertyAssignmentKind) {
SpecialPropertyAssignmentKind[SpecialPropertyAssignmentKind["None"] = 0] = "None";
@@ -742,6 +777,7 @@ var ts;
ModuleKind[ModuleKind["UMD"] = 3] = "UMD";
ModuleKind[ModuleKind["System"] = 4] = "System";
ModuleKind[ModuleKind["ES2015"] = 5] = "ES2015";
+ ModuleKind[ModuleKind["ESNext"] = 6] = "ESNext";
})(ModuleKind = ts.ModuleKind || (ts.ModuleKind = {}));
var JsxEmit;
(function (JsxEmit) {
@@ -956,6 +992,7 @@ var ts;
TransformFlags[TransformFlags["ContainsBindingPattern"] = 8388608] = "ContainsBindingPattern";
TransformFlags[TransformFlags["ContainsYield"] = 16777216] = "ContainsYield";
TransformFlags[TransformFlags["ContainsHoistedDeclarationOrCompletion"] = 33554432] = "ContainsHoistedDeclarationOrCompletion";
+ TransformFlags[TransformFlags["ContainsDynamicImport"] = 67108864] = "ContainsDynamicImport";
TransformFlags[TransformFlags["HasComputedFlags"] = 536870912] = "HasComputedFlags";
TransformFlags[TransformFlags["AssertTypeScript"] = 3] = "AssertTypeScript";
TransformFlags[TransformFlags["AssertJsx"] = 4] = "AssertJsx";
@@ -1002,14 +1039,16 @@ var ts;
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[EmitFlags["InternalName"] = 32768] = "InternalName";
+ EmitFlags[EmitFlags["Indented"] = 65536] = "Indented";
+ EmitFlags[EmitFlags["NoIndentation"] = 131072] = "NoIndentation";
+ EmitFlags[EmitFlags["AsyncFunctionBody"] = 262144] = "AsyncFunctionBody";
+ EmitFlags[EmitFlags["ReuseTempVariableScope"] = 524288] = "ReuseTempVariableScope";
+ EmitFlags[EmitFlags["CustomPrologue"] = 1048576] = "CustomPrologue";
+ EmitFlags[EmitFlags["NoHoisting"] = 2097152] = "NoHoisting";
+ EmitFlags[EmitFlags["HasEndOfDeclarationMarker"] = 4194304] = "HasEndOfDeclarationMarker";
+ EmitFlags[EmitFlags["Iterator"] = 8388608] = "Iterator";
+ EmitFlags[EmitFlags["NoAsciiEscaping"] = 16777216] = "NoAsciiEscaping";
})(EmitFlags = ts.EmitFlags || (ts.EmitFlags = {}));
var ExternalEmitHelpers;
(function (ExternalEmitHelpers) {
@@ -1024,14 +1063,18 @@ var ts;
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["Await"] = 2048] = "Await";
+ ExternalEmitHelpers[ExternalEmitHelpers["AsyncGenerator"] = 4096] = "AsyncGenerator";
+ ExternalEmitHelpers[ExternalEmitHelpers["AsyncDelegator"] = 8192] = "AsyncDelegator";
+ ExternalEmitHelpers[ExternalEmitHelpers["AsyncValues"] = 16384] = "AsyncValues";
+ ExternalEmitHelpers[ExternalEmitHelpers["ExportStar"] = 32768] = "ExportStar";
ExternalEmitHelpers[ExternalEmitHelpers["ForOfIncludes"] = 256] = "ForOfIncludes";
- ExternalEmitHelpers[ExternalEmitHelpers["ForAwaitOfIncludes"] = 8192] = "ForAwaitOfIncludes";
+ ExternalEmitHelpers[ExternalEmitHelpers["ForAwaitOfIncludes"] = 16384] = "ForAwaitOfIncludes";
+ ExternalEmitHelpers[ExternalEmitHelpers["AsyncGeneratorIncludes"] = 6144] = "AsyncGeneratorIncludes";
+ ExternalEmitHelpers[ExternalEmitHelpers["AsyncDelegatorIncludes"] = 26624] = "AsyncDelegatorIncludes";
ExternalEmitHelpers[ExternalEmitHelpers["SpreadIncludes"] = 1536] = "SpreadIncludes";
ExternalEmitHelpers[ExternalEmitHelpers["FirstEmitHelper"] = 1] = "FirstEmitHelper";
- ExternalEmitHelpers[ExternalEmitHelpers["LastEmitHelper"] = 8192] = "LastEmitHelper";
+ ExternalEmitHelpers[ExternalEmitHelpers["LastEmitHelper"] = 32768] = "LastEmitHelper";
})(ExternalEmitHelpers = ts.ExternalEmitHelpers || (ts.ExternalEmitHelpers = {}));
var EmitHint;
(function (EmitHint) {
@@ -1102,7 +1145,7 @@ var ts;
})(ts || (ts = {}));
var ts;
(function (ts) {
- ts.version = "2.3.2";
+ ts.version = "2.4.1";
})(ts || (ts = {}));
(function (ts) {
var Ternary;
@@ -1125,10 +1168,11 @@ var ts;
ts.createMap = createMap;
function createMapFromTemplate(template) {
var map = new MapCtr();
- for (var key in template)
+ for (var key in template) {
if (hasOwnProperty.call(template, key)) {
map.set(key, template[key]);
}
+ }
return map;
}
ts.createMapFromTemplate = createMapFromTemplate;
@@ -1287,6 +1331,15 @@ var ts;
}
}
ts.zipWith = zipWith;
+ function zipToMap(keys, values) {
+ Debug.assert(keys.length === values.length);
+ var map = createMap();
+ for (var i = 0; i < keys.length; ++i) {
+ map.set(keys[i], values[i]);
+ }
+ return map;
+ }
+ ts.zipToMap = zipToMap;
function every(array, callback) {
if (array) {
for (var i = 0; i < array.length; i++) {
@@ -1491,6 +1544,40 @@ var ts;
return result;
}
ts.flatMap = flatMap;
+ function sameFlatMap(array, mapfn) {
+ var result;
+ if (array) {
+ for (var i = 0; i < array.length; i++) {
+ var item = array[i];
+ var mapped = mapfn(item, i);
+ if (result || item !== mapped || isArray(mapped)) {
+ if (!result) {
+ result = array.slice(0, i);
+ }
+ if (isArray(mapped)) {
+ addRange(result, mapped);
+ }
+ else {
+ result.push(mapped);
+ }
+ }
+ }
+ }
+ return result || array;
+ }
+ ts.sameFlatMap = sameFlatMap;
+ function mapDefined(array, mapFn) {
+ var result = [];
+ for (var i = 0; i < array.length; i++) {
+ var item = array[i];
+ var mapped = mapFn(item, i);
+ if (mapped !== undefined) {
+ result.push(mapped);
+ }
+ }
+ return result;
+ }
+ ts.mapDefined = mapDefined;
function span(array, f) {
if (array) {
for (var i = 0; i < array.length; i++) {
@@ -1684,12 +1771,21 @@ var ts;
return to;
}
ts.append = append;
- function addRange(to, from) {
+ function toOffset(array, offset) {
+ return offset < 0 ? array.length + offset : offset;
+ }
+ function addRange(to, from, start, end) {
if (from === undefined)
return to;
- for (var _i = 0, from_1 = from; _i < from_1.length; _i++) {
- var v = from_1[_i];
- to = append(to, v);
+ if (to === undefined)
+ return from.slice(start, end);
+ start = start === undefined ? 0 : toOffset(from, start);
+ end = end === undefined ? from.length : toOffset(from, end);
+ for (var i = start; i < end && i < from.length; i++) {
+ var v = from[i];
+ if (v !== undefined) {
+ to.push(from[i]);
+ }
}
return to;
}
@@ -1712,16 +1808,22 @@ var ts;
return true;
}
ts.rangeEquals = rangeEquals;
+ function elementAt(array, offset) {
+ if (array) {
+ offset = toOffset(array, offset);
+ if (offset < array.length) {
+ return array[offset];
+ }
+ }
+ return undefined;
+ }
+ ts.elementAt = elementAt;
function firstOrUndefined(array) {
- return array && array.length > 0
- ? array[0]
- : undefined;
+ return elementAt(array, 0);
}
ts.firstOrUndefined = firstOrUndefined;
function lastOrUndefined(array) {
- return array && array.length > 0
- ? array[array.length - 1]
- : undefined;
+ return elementAt(array, -1);
}
ts.lastOrUndefined = lastOrUndefined;
function singleOrUndefined(array) {
@@ -1826,10 +1928,11 @@ var ts;
ts.getProperty = getProperty;
function getOwnKeys(map) {
var keys = [];
- for (var key in map)
+ for (var key in map) {
if (hasOwnProperty.call(map, key)) {
keys.push(key);
}
+ }
return keys;
}
ts.getOwnKeys = getOwnKeys;
@@ -1889,10 +1992,11 @@ var ts;
}
for (var _a = 0, args_1 = args; _a < args_1.length; _a++) {
var arg = args_1[_a];
- for (var p in arg)
+ for (var p in arg) {
if (hasProperty(arg, p)) {
t[p] = arg[p];
}
+ }
}
return t;
}
@@ -1902,18 +2006,20 @@ var ts;
return true;
if (!left || !right)
return false;
- for (var key in left)
+ for (var key in left) {
if (hasOwnProperty.call(left, key)) {
if (!hasOwnProperty.call(right, key) === undefined)
return false;
if (equalityComparer ? !equalityComparer(left[key], right[key]) : left[key] !== right[key])
return false;
}
- for (var key in right)
+ }
+ for (var key in right) {
if (hasOwnProperty.call(right, key)) {
if (!hasOwnProperty.call(left, key))
return false;
}
+ }
return true;
}
ts.equalOwnProperties = equalOwnProperties;
@@ -1944,14 +2050,16 @@ var ts;
ts.clone = clone;
function extend(first, second) {
var result = {};
- for (var id in second)
+ for (var id in second) {
if (hasOwnProperty.call(second, id)) {
result[id] = second[id];
}
- for (var id in first)
+ }
+ for (var id in first) {
if (hasOwnProperty.call(first, id)) {
result[id] = first[id];
}
+ }
return result;
}
ts.extend = extend;
@@ -1985,6 +2093,16 @@ var ts;
return Array.isArray ? Array.isArray(value) : value instanceof Array;
}
ts.isArray = isArray;
+ function tryCast(value, test) {
+ return value !== undefined && test(value) ? value : undefined;
+ }
+ ts.tryCast = tryCast;
+ function cast(value, test) {
+ if (value !== undefined && test(value))
+ return value;
+ Debug.fail("Invalid cast. The supplied value did not pass the test '" + Debug.getFunctionName(test) + "'.");
+ }
+ ts.cast = cast;
function noop() { }
ts.noop = noop;
function notImplemented() {
@@ -2515,6 +2633,10 @@ var ts;
return str.lastIndexOf(prefix, 0) === 0;
}
ts.startsWith = startsWith;
+ function removePrefix(str, prefix) {
+ return startsWith(str, prefix) ? str.substr(prefix.length) : str;
+ }
+ ts.removePrefix = removePrefix;
function endsWith(str, suffix) {
var expectedPos = str.length - suffix.length;
return expectedPos >= 0 && str.indexOf(suffix, expectedPos) === expectedPos;
@@ -2528,7 +2650,7 @@ var ts;
return path.length > extension.length && endsWith(path, extension);
}
ts.fileExtensionIs = fileExtensionIs;
- function fileExtensionIsAny(path, extensions) {
+ function fileExtensionIsOneOf(path, extensions) {
for (var _i = 0, extensions_1 = extensions; _i < extensions_1.length; _i++) {
var extension = extensions_1[_i];
if (fileExtensionIs(path, extension)) {
@@ -2537,7 +2659,7 @@ var ts;
}
return false;
}
- ts.fileExtensionIsAny = fileExtensionIsAny;
+ ts.fileExtensionIsOneOf = fileExtensionIsOneOf;
var reservedCharacterPattern = /[^\w\s\/]/g;
var wildcardCharCodes = [42, 63];
var singleAsteriskRegexFragmentFiles = "([^./]|(\\.(?!min\\.js$))?)*";
@@ -2662,7 +2784,7 @@ var ts;
var _loop_1 = function (current) {
var name = combinePaths(path, current);
var absoluteName = combinePaths(absolutePath, current);
- if (extensions && !fileExtensionIsAny(name, extensions))
+ if (extensions && !fileExtensionIsOneOf(name, extensions))
return "continue";
if (excludeRegex && excludeRegex.test(absoluteName))
return "continue";
@@ -2849,8 +2971,11 @@ var ts;
this.name = name;
this.declarations = undefined;
}
- function Type(_checker, flags) {
+ function Type(checker, flags) {
this.flags = flags;
+ if (Debug.isDebugging) {
+ this.checker = checker;
+ }
}
function Signature() {
}
@@ -2865,6 +2990,11 @@ var ts;
this.parent = undefined;
this.original = undefined;
}
+ function SourceMapSource(fileName, text, skipTrivia) {
+ this.fileName = fileName;
+ this.text = text;
+ this.skipTrivia = skipTrivia || (function (pos) { return pos; });
+ }
ts.objectAllocator = {
getNodeConstructor: function () { return Node; },
getTokenConstructor: function () { return Node; },
@@ -2872,7 +3002,8 @@ var ts;
getSourceFileConstructor: function () { return Node; },
getSymbolConstructor: function () { return Symbol; },
getTypeConstructor: function () { return Type; },
- getSignatureConstructor: function () { return Signature; }
+ getSignatureConstructor: function () { return Signature; },
+ getSourceMapSourceConstructor: function () { return SourceMapSource; },
};
var AssertionLevel;
(function (AssertionLevel) {
@@ -2884,25 +3015,43 @@ var ts;
var Debug;
(function (Debug) {
Debug.currentAssertionLevel = 0;
+ Debug.isDebugging = false;
function shouldAssert(level) {
return Debug.currentAssertionLevel >= level;
}
Debug.shouldAssert = shouldAssert;
- function assert(expression, message, verboseDebugInfo) {
+ function assert(expression, message, verboseDebugInfo, stackCrawlMark) {
if (!expression) {
- var verboseDebugString = "";
if (verboseDebugInfo) {
- verboseDebugString = "\r\nVerbose Debug Information: " + verboseDebugInfo();
+ message += "\r\nVerbose Debug Information: " + verboseDebugInfo();
}
- debugger;
- throw new Error("Debug Failure. False expression: " + (message || "") + verboseDebugString);
+ fail(message ? "False expression: " + message : "False expression.", stackCrawlMark || assert);
}
}
Debug.assert = assert;
- function fail(message) {
- Debug.assert(false, message);
+ function fail(message, stackCrawlMark) {
+ debugger;
+ var e = new Error(message ? "Debug Failure. " : "Debug Failure.");
+ if (Error.captureStackTrace) {
+ Error.captureStackTrace(e, stackCrawlMark || fail);
+ }
+ throw e;
}
Debug.fail = fail;
+ function getFunctionName(func) {
+ if (typeof func !== "function") {
+ return "";
+ }
+ else if (func.hasOwnProperty("name")) {
+ return func.name;
+ }
+ else {
+ var text = Function.prototype.toString.call(func);
+ var match = /^function\s+([\w\$]+)\s*\(/.exec(text);
+ return match ? match[1] : "";
+ }
+ }
+ Debug.getFunctionName = getFunctionName;
})(Debug = ts.Debug || (ts.Debug = {}));
function orderedRemoveItem(array, item) {
for (var i = 0; i < array.length; i++) {
@@ -3329,6 +3478,7 @@ var ts;
realpath: function (path) {
return _fs.realpathSync(path);
},
+ debugMode: ts.some(process.execArgv, function (arg) { return /^--(inspect|debug)(-brk)?(=\d+)?$/i.test(arg); }),
tryEnableSourceMapsForHost: function () {
try {
require("source-map-support").install();
@@ -3407,6 +3557,9 @@ var ts;
? 1
: 0;
}
+ if (ts.sys && ts.sys.debugMode) {
+ ts.Debug.isDebugging = true;
+ }
})(ts || (ts = {}));
var ts;
(function (ts) {
@@ -3570,6 +3723,7 @@ var ts;
Line_terminator_not_permitted_before_arrow: { code: 1200, category: ts.DiagnosticCategory.Error, key: "Line_terminator_not_permitted_before_arrow_1200", message: "Line terminator not permitted before arrow." },
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: 1202, category: ts.DiagnosticCategory.Error, key: "Import_assignment_cannot_be_used_when_targeting_ECMAScript_2015_modules_Consider_using_import_Asteri_1202", message: "Import assignment cannot be used when targeting ECMAScript 2015 modules. Consider using 'import * as ns from \"mod\"', 'import {a} from \"mod\"', 'import d from \"mod\"', or another module format instead." },
Export_assignment_cannot_be_used_when_targeting_ECMAScript_2015_modules_Consider_using_export_default_or_another_module_format_instead: { code: 1203, category: ts.DiagnosticCategory.Error, key: "Export_assignment_cannot_be_used_when_targeting_ECMAScript_2015_modules_Consider_using_export_defaul_1203", message: "Export assignment cannot be used when targeting ECMAScript 2015 modules. Consider using 'export default' or another module format instead." },
+ Cannot_re_export_a_type_when_the_isolatedModules_flag_is_provided: { code: 1205, category: ts.DiagnosticCategory.Error, key: "Cannot_re_export_a_type_when_the_isolatedModules_flag_is_provided_1205", message: "Cannot re-export a type when the '--isolatedModules' flag is provided." },
Decorators_are_not_valid_here: { code: 1206, category: ts.DiagnosticCategory.Error, key: "Decorators_are_not_valid_here_1206", message: "Decorators are not valid here." },
Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name: { code: 1207, category: ts.DiagnosticCategory.Error, key: "Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name_1207", message: "Decorators cannot be applied to multiple get/set accessors of the same name." },
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." },
@@ -3631,6 +3785,10 @@ var ts;
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." },
+ Dynamic_import_cannot_be_used_when_targeting_ECMAScript_2015_modules: { code: 1323, category: ts.DiagnosticCategory.Error, key: "Dynamic_import_cannot_be_used_when_targeting_ECMAScript_2015_modules_1323", message: "Dynamic import cannot be used when targeting ECMAScript 2015 modules." },
+ Dynamic_import_must_have_one_specifier_as_an_argument: { code: 1324, category: ts.DiagnosticCategory.Error, key: "Dynamic_import_must_have_one_specifier_as_an_argument_1324", message: "Dynamic import must have one specifier as an argument." },
+ Specifier_of_dynamic_import_cannot_be_spread_element: { code: 1325, category: ts.DiagnosticCategory.Error, key: "Specifier_of_dynamic_import_cannot_be_spread_element_1325", message: "Specifier of dynamic import cannot be spread element." },
+ Dynamic_import_cannot_have_type_arguments: { code: 1326, category: ts.DiagnosticCategory.Error, key: "Dynamic_import_cannot_have_type_arguments_1326", message: "Dynamic import cannot have type arguments" },
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." },
@@ -3677,7 +3835,7 @@ var ts;
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." },
+ Call_target_does_not_contain_any_signatures: { code: 2346, category: ts.DiagnosticCategory.Error, key: "Call_target_does_not_contain_any_signatures_2346", message: "Call target does not contain any signatures." },
Untyped_function_calls_may_not_accept_type_arguments: { code: 2347, category: ts.DiagnosticCategory.Error, key: "Untyped_function_calls_may_not_accept_type_arguments_2347", message: "Untyped function calls may not accept type arguments." },
Value_of_type_0_is_not_callable_Did_you_mean_to_include_new: { code: 2348, category: ts.DiagnosticCategory.Error, key: "Value_of_type_0_is_not_callable_Did_you_mean_to_include_new_2348", message: "Value of type '{0}' is not callable. Did you mean to include 'new'?" },
Cannot_invoke_an_expression_whose_type_lacks_a_call_signature_Type_0_has_no_compatible_call_signatures: { code: 2349, category: ts.DiagnosticCategory.Error, key: "Cannot_invoke_an_expression_whose_type_lacks_a_call_signature_Type_0_has_no_compatible_call_signatur_2349", message: "Cannot invoke an expression whose type lacks a call signature. Type '{0}' has no compatible call signatures." },
@@ -3872,6 +4030,15 @@ var ts;
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." },
+ Property_0_does_not_exist_on_type_1_Did_you_mean_2: { code: 2551, category: ts.DiagnosticCategory.Error, key: "Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551", message: "Property '{0}' does not exist on type '{1}'. Did you mean '{2}'?" },
+ Cannot_find_name_0_Did_you_mean_1: { code: 2552, category: ts.DiagnosticCategory.Error, key: "Cannot_find_name_0_Did_you_mean_1_2552", message: "Cannot find name '{0}'. Did you mean '{1}'?" },
+ Computed_values_are_not_permitted_in_an_enum_with_string_valued_members: { code: 2553, category: ts.DiagnosticCategory.Error, key: "Computed_values_are_not_permitted_in_an_enum_with_string_valued_members_2553", message: "Computed values are not permitted in an enum with string valued members." },
+ Expected_0_arguments_but_got_1: { code: 2554, category: ts.DiagnosticCategory.Error, key: "Expected_0_arguments_but_got_1_2554", message: "Expected {0} arguments, but got {1}." },
+ Expected_at_least_0_arguments_but_got_1: { code: 2555, category: ts.DiagnosticCategory.Error, key: "Expected_at_least_0_arguments_but_got_1_2555", message: "Expected at least {0} arguments, but got {1}." },
+ Expected_0_arguments_but_got_a_minimum_of_1: { code: 2556, category: ts.DiagnosticCategory.Error, key: "Expected_0_arguments_but_got_a_minimum_of_1_2556", message: "Expected {0} arguments, but got a minimum of {1}." },
+ Expected_at_least_0_arguments_but_got_a_minimum_of_1: { code: 2557, category: ts.DiagnosticCategory.Error, key: "Expected_at_least_0_arguments_but_got_a_minimum_of_1_2557", message: "Expected at least {0} arguments, but got a minimum of {1}." },
+ Expected_0_type_arguments_but_got_1: { code: 2558, category: ts.DiagnosticCategory.Error, key: "Expected_0_type_arguments_but_got_1_2558", message: "Expected {0} type arguments, but got {1}." },
+ Type_0_has_no_properties_in_common_with_type_1: { code: 2559, category: ts.DiagnosticCategory.Error, key: "Type_0_has_no_properties_in_common_with_type_1_2559", message: "Type '{0}' has no properties in common with type '{1}'." },
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." },
@@ -3883,7 +4050,6 @@ var ts;
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}'." },
@@ -3942,6 +4108,8 @@ var ts;
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." },
_0_are_specified_twice_The_attribute_named_0_will_be_overwritten: { code: 2710, category: ts.DiagnosticCategory.Error, key: "_0_are_specified_twice_The_attribute_named_0_will_be_overwritten_2710", message: "'{0}' are specified twice. The attribute named '{0}' will be overwritten." },
+ A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option: { code: 2711, category: ts.DiagnosticCategory.Error, key: "A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES20_2711", message: "A dynamic import call returns a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your `--lib` option." },
+ A_dynamic_import_call_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: 2712, category: ts.DiagnosticCategory.Error, key: "A_dynamic_import_call_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declarat_2712", message: "A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option." },
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}'." },
@@ -4016,7 +4184,7 @@ var ts;
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." },
+ Property_0_of_exported_class_expression_may_not_be_private_or_protected: { code: 4094, category: ts.DiagnosticCategory.Error, key: "Property_0_of_exported_class_expression_may_not_be_private_or_protected_4094", message: "Property '{0}' of exported class expression may not be private or protected." },
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}'." },
@@ -4058,7 +4226,7 @@ var ts;
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_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'." },
+ Specify_module_code_generation_Colon_commonjs_amd_system_umd_es2015_or_ESNext: { code: 6016, category: ts.DiagnosticCategory.Message, key: "Specify_module_code_generation_Colon_commonjs_amd_system_umd_es2015_or_ESNext_6016", message: "Specify module code generation: 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'." },
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_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'." },
@@ -4167,6 +4335,7 @@ var ts;
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." },
+ Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1: { code: 6137, category: ts.DiagnosticCategory.Error, key: "Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1_6137", message: "Cannot import type declaration files. Consider importing '{0}' instead of '{1}'." },
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}'." },
@@ -4212,6 +4381,9 @@ var ts;
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}'" },
+ Reusing_resolution_of_module_0_to_file_1_from_old_program: { code: 6183, category: ts.DiagnosticCategory.Message, key: "Reusing_resolution_of_module_0_to_file_1_from_old_program_6183", message: "Reusing resolution of module '{0}' to file '{1}' from old program." },
+ Reusing_module_resolutions_originating_in_0_since_resolutions_are_unchanged_from_old_program: { code: 6184, category: ts.DiagnosticCategory.Message, key: "Reusing_module_resolutions_originating_in_0_since_resolutions_are_unchanged_from_old_program_6184", message: "Reusing module resolutions originating in '{0}' since resolutions are unchanged from old program." },
+ Disable_strict_checking_of_generic_signatures_in_function_types: { code: 6185, category: ts.DiagnosticCategory.Message, key: "Disable_strict_checking_of_generic_signatures_in_function_types_6185", message: "Disable strict checking of generic signatures in function types." },
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." },
@@ -4238,6 +4410,8 @@ var ts;
Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation: { code: 7032, category: ts.DiagnosticCategory.Error, key: "Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation_7032", message: "Property '{0}' implicitly has type 'any', because its set accessor lacks a parameter type annotation." },
Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation: { code: 7033, category: ts.DiagnosticCategory.Error, key: "Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation_7033", message: "Property '{0}' implicitly has type 'any', because its get accessor lacks a return type annotation." },
Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined: { code: 7034, category: ts.DiagnosticCategory.Error, key: "Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined_7034", message: "Variable '{0}' implicitly has type '{1}' in some locations where its type cannot be determined." },
+ Try_npm_install_types_Slash_0_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0: { code: 7035, category: ts.DiagnosticCategory.Error, key: "Try_npm_install_types_Slash_0_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_mod_7035", message: "Try `npm install @types/{0}` if it exists or add a new declaration (.d.ts) file containing `declare module '{0}';`" },
+ Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0: { code: 7036, category: ts.DiagnosticCategory.Error, key: "Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0_7036", message: "Dynamic import's specifier must be of type 'string', but here has type '{0}'." },
You_cannot_rename_this_element: { code: 8000, category: ts.DiagnosticCategory.Error, key: "You_cannot_rename_this_element_8000", message: "You cannot rename this element." },
You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library: { code: 8001, category: ts.DiagnosticCategory.Error, key: "You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library_8001", message: "You cannot rename elements that are defined in the standard TypeScript library." },
import_can_only_be_used_in_a_ts_file: { code: 8002, category: ts.DiagnosticCategory.Error, key: "import_can_only_be_used_in_a_ts_file_8002", message: "'import ... =' can only be used in a .ts file." },
@@ -4286,12 +4460,18 @@ var ts;
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}'." },
+ Declare_property_0: { code: 90016, category: ts.DiagnosticCategory.Message, key: "Declare_property_0_90016", message: "Declare property '{0}'." },
+ Add_index_signature_for_property_0: { code: 90017, category: ts.DiagnosticCategory.Message, key: "Add_index_signature_for_property_0_90017", message: "Add index signature for 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}'." },
+ Change_spelling_to_0: { code: 90022, category: ts.DiagnosticCategory.Message, key: "Change_spelling_to_0_90022", message: "Change spelling to '{0}'." },
+ Declare_method_0: { code: 90023, category: ts.DiagnosticCategory.Message, key: "Declare_method_0_90023", message: "Declare method '{0}'." },
+ Declare_static_method_0: { code: 90024, category: ts.DiagnosticCategory.Message, key: "Declare_static_method_0_90024", message: "Declare static method '{0}'." },
+ Prefix_0_with_an_underscore: { code: 90025, category: ts.DiagnosticCategory.Message, key: "Prefix_0_with_an_underscore_90025", message: "Prefix '{0}' with an underscore." },
+ Convert_function_to_an_ES2015_class: { code: 95001, category: ts.DiagnosticCategory.Message, key: "Convert_function_to_an_ES2015_class_95001", message: "Convert function to an ES2015 class" },
+ Convert_function_0_to_class: { code: 95002, category: ts.DiagnosticCategory.Message, key: "Convert_function_0_to_class_95002", message: "Convert function '{0}' to class" },
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." },
@@ -4320,12 +4500,11 @@ var ts;
ts.Debug.assert(ts.extensionIsTypeScript(resolved.extension));
return resolved.path;
}
- function resolvedModuleFromResolved(_a, isExternalLibraryImport) {
- var path = _a.path, extension = _a.extension;
- return { resolvedFileName: path, extension: extension, isExternalLibraryImport: isExternalLibraryImport };
- }
function createResolvedModuleWithFailedLookupLocations(resolved, isExternalLibraryImport, failedLookupLocations) {
- return { resolvedModule: resolved && resolvedModuleFromResolved(resolved, isExternalLibraryImport), failedLookupLocations: failedLookupLocations };
+ return {
+ resolvedModule: resolved && { resolvedFileName: resolved.path, extension: resolved.extension, isExternalLibraryImport: isExternalLibraryImport },
+ failedLookupLocations: failedLookupLocations
+ };
}
function moduleHasNonRelativeName(moduleName) {
return !(ts.isRootedDiskPath(moduleName) || ts.isExternalModuleNameRelative(moduleName));
@@ -4609,6 +4788,8 @@ var ts;
case ts.ModuleResolutionKind.Classic:
result = classicNameResolver(moduleName, containingFile, compilerOptions, host, cache);
break;
+ default:
+ ts.Debug.fail("Unexpected moduleResolution: " + moduleResolution);
}
if (perFolderCache) {
perFolderCache.set(moduleName, result);
@@ -4725,10 +4906,12 @@ var ts;
if (state.traceEnabled) {
trace(state.host, ts.Diagnostics.Trying_substitution_0_candidate_module_location_Colon_1, subst, path);
}
- var tsExtension = ts.tryGetExtensionFromPath(candidate);
- if (tsExtension !== undefined) {
+ var extension = ts.tryGetExtensionFromPath(candidate);
+ if (extension !== undefined) {
var path_1 = tryFile(candidate, failedLookupLocations, false, state);
- return path_1 && { path: path_1, extension: tsExtension };
+ if (path_1 !== undefined) {
+ return { path: path_1, extension: extension };
+ }
}
return loader(extensions, candidate, failedLookupLocations, !directoryProbablyExists(ts.getDirectoryPath(candidate), state.host), state);
});
@@ -4742,12 +4925,18 @@ var ts;
}
}
function nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache) {
- return nodeModuleNameResolverWorker(moduleName, containingFile, compilerOptions, host, cache, false);
+ return nodeModuleNameResolverWorker(moduleName, ts.getDirectoryPath(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);
+ function resolveJavaScriptModule(moduleName, initialDir, host) {
+ var _a = nodeModuleNameResolverWorker(moduleName, initialDir, { moduleResolution: ts.ModuleResolutionKind.NodeJs, allowJs: true }, host, undefined, true), resolvedModule = _a.resolvedModule, failedLookupLocations = _a.failedLookupLocations;
+ if (!resolvedModule) {
+ throw new Error("Could not resolve JS module " + moduleName + " starting at " + initialDir + ". Looked in: " + failedLookupLocations.join(", "));
+ }
+ return resolvedModule.resolvedFileName;
+ }
+ ts.resolveJavaScriptModule = resolveJavaScriptModule;
+ function nodeModuleNameResolverWorker(moduleName, containingDirectory, compilerOptions, host, cache, jsOnly) {
var traceEnabled = isTraceEnabled(compilerOptions, host);
var failedLookupLocations = [];
var state = { compilerOptions: compilerOptions, host: host, traceEnabled: traceEnabled };
@@ -4777,7 +4966,6 @@ var ts;
}
}
}
- ts.nodeModuleNameResolverWorker = nodeModuleNameResolverWorker;
function realpath(path, host, traceEnabled) {
if (!host.realpath) {
return path;
@@ -4978,9 +5166,10 @@ var ts;
return loadModuleFromNodeModulesFolder(Extensions.DtsOnly, mangleScopedPackage(moduleName, state), nodeModulesAtTypes_1, nodeModulesAtTypesExists, failedLookupLocations, state);
}
}
+ var mangledScopedPackageSeparator = "__";
function mangleScopedPackage(moduleName, state) {
if (ts.startsWith(moduleName, "@")) {
- var replaceSlash = moduleName.replace(ts.directorySeparator, "__");
+ var replaceSlash = moduleName.replace(ts.directorySeparator, mangledScopedPackageSeparator);
if (replaceSlash !== moduleName) {
var mangled = replaceSlash.slice(1);
if (state.traceEnabled) {
@@ -4991,6 +5180,16 @@ var ts;
}
return moduleName;
}
+ function getPackageNameFromAtTypesDirectory(mangledName) {
+ var withoutAtTypePrefix = ts.removePrefix(mangledName, "@types/");
+ if (withoutAtTypePrefix !== mangledName) {
+ return withoutAtTypePrefix.indexOf("__") !== -1 ?
+ "@" + withoutAtTypePrefix.replace(mangledScopedPackageSeparator, ts.directorySeparator) :
+ withoutAtTypePrefix;
+ }
+ return mangledName;
+ }
+ ts.getPackageNameFromAtTypesDirectory = getPackageNameFromAtTypesDirectory;
function tryFindNonRelativeModuleNameInCache(cache, moduleName, containingDirectory, traceEnabled, host) {
var result = cache && cache.get(containingDirectory);
if (result) {
@@ -5114,7 +5313,7 @@ var ts;
clear: function () { return str_1 = ""; },
trackSymbol: ts.noop,
reportInaccessibleThisError: ts.noop,
- reportIllegalExtends: ts.noop
+ reportPrivateInBaseOfClassExpression: ts.noop,
};
}
return stringWriters.pop();
@@ -5162,9 +5361,7 @@ var ts;
}
ts.typeDirectiveIsEqualTo = typeDirectiveIsEqualTo;
function hasChangesInResolutions(names, newResolutions, oldResolutions, comparer) {
- if (names.length !== newResolutions.length) {
- return false;
- }
+ ts.Debug.assert(names.length === newResolutions.length);
for (var i = 0; i < names.length; i++) {
var newResolution = newResolutions[i];
var oldResolution = oldResolutions && oldResolutions.get(names[i]);
@@ -5261,34 +5458,22 @@ var ts;
return !nodeIsMissing(node);
}
ts.nodeIsPresent = nodeIsPresent;
- function isToken(n) {
- return n.kind >= 0 && n.kind <= 142;
- }
- ts.isToken = isToken;
function getTokenPosOfNode(node, sourceFile, includeJsDoc) {
if (nodeIsMissing(node)) {
return node.pos;
}
- if (isJSDocNode(node)) {
+ if (ts.isJSDocNode(node)) {
return ts.skipTrivia((sourceFile || getSourceFileOfNode(node)).text, node.pos, false, true);
}
if (includeJsDoc && node.jsDoc && node.jsDoc.length > 0) {
return getTokenPosOfNode(node.jsDoc[0]);
}
- if (node.kind === 294 && node._children.length > 0) {
+ if (node.kind === 295 && 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 >= 267 && node.kind <= 293;
- }
- ts.isJSDocNode = isJSDocNode;
- function isJSDocTag(node) {
- return node.kind >= 283 && node.kind <= 293;
- }
- ts.isJSDocTag = isJSDocTag;
function getNonDecoratorTokenPosOfNode(node, sourceFile) {
if (nodeIsMissing(node) || !node.decorators) {
return getTokenPosOfNode(node, sourceFile);
@@ -5321,26 +5506,28 @@ var ts;
if (!nodeIsSynthesized(node) && node.parent) {
return getSourceTextOfNodeFromSourceFile(sourceFile, node);
}
+ var escapeText = ts.getEmitFlags(node) & 16777216 ? escapeString : escapeNonAsciiString;
switch (node.kind) {
case 9:
- return getQuotedEscapedLiteralText('"', node.text, '"');
+ return '"' + escapeText(node.text) + '"';
case 13:
- return getQuotedEscapedLiteralText("`", node.text, "`");
+ return "`" + escapeText(node.text) + "`";
case 14:
- return getQuotedEscapedLiteralText("`", node.text, "${");
+ return "`" + escapeText(node.text) + "${";
case 15:
- return getQuotedEscapedLiteralText("}", node.text, "${");
+ return "}" + escapeText(node.text) + "${";
case 16:
- return getQuotedEscapedLiteralText("}", node.text, "`");
+ return "}" + escapeText(node.text) + "`";
case 8:
return node.text;
}
ts.Debug.fail("Literal kind '" + node.kind + "' not accounted for.");
}
ts.getLiteralText = getLiteralText;
- function getQuotedEscapedLiteralText(leftQuote, text, rightQuote) {
- return leftQuote + escapeNonAsciiCharacters(escapeString(text)) + rightQuote;
+ function getTextOfConstantValue(value) {
+ return typeof value === "string" ? '"' + escapeNonAsciiString(value) + '"' : "" + value;
}
+ ts.getTextOfConstantValue = getTextOfConstantValue;
function escapeIdentifier(identifier) {
return identifier.length >= 2 && identifier.charCodeAt(0) === 95 && identifier.charCodeAt(1) === 95 ? "_" + identifier : identifier;
}
@@ -5374,7 +5561,7 @@ var ts;
function isBlockScopedContainerTopLevel(node) {
return node.kind === 265 ||
node.kind === 233 ||
- isFunctionLike(node);
+ ts.isFunctionLike(node);
}
ts.isBlockScopedContainerTopLevel = isBlockScopedContainerTopLevel;
function isGlobalScopeAugmentation(module) {
@@ -5416,7 +5603,7 @@ var ts;
case 187:
return true;
case 207:
- return parentNode && !isFunctionLike(parentNode);
+ return parentNode && !ts.isFunctionLike(parentNode);
}
return false;
}
@@ -5547,10 +5734,6 @@ var ts;
return (file.externalModuleIndicator || file.commonJsModuleIndicator) !== undefined;
}
ts.isExternalOrCommonJsModule = isExternalOrCommonJsModule;
- function isDeclarationFile(file) {
- return file.isDeclarationFile;
- }
- ts.isDeclarationFile = isDeclarationFile;
function isConstEnumDeclaration(node) {
return node.kind === 232 && isConst(node);
}
@@ -5568,6 +5751,10 @@ var ts;
return n.kind === 181 && n.expression.kind === 97;
}
ts.isSuperCall = isSuperCall;
+ function isImportCall(n) {
+ return n.kind === 181 && n.expression.kind === 91;
+ }
+ ts.isImportCall = isImportCall;
function isPrologueDirective(node) {
return node.kind === 210
&& node.expression.kind === 9;
@@ -5678,10 +5865,6 @@ var ts;
return false;
}
ts.isChildOfNodeWithKind = isChildOfNodeWithKind;
- function isPrefixUnaryExpression(node) {
- return node.kind === 192;
- }
- ts.isPrefixUnaryExpression = isPrefixUnaryExpression;
function forEachReturnStatement(body, visitor) {
return traverse(body);
function traverse(node) {
@@ -5727,7 +5910,7 @@ var ts;
case 199:
return;
default:
- if (isFunctionLike(node)) {
+ if (ts.isFunctionLike(node)) {
var name = node.name;
if (name && name.kind === 144) {
traverse(name.expression);
@@ -5770,38 +5953,6 @@ var ts;
return false;
}
ts.isVariableLike = isVariableLike;
- function isAccessor(node) {
- return node && (node.kind === 153 || node.kind === 154);
- }
- ts.isAccessor = isAccessor;
- function isClassLike(node) {
- return node && (node.kind === 229 || node.kind === 199);
- }
- ts.isClassLike = isClassLike;
- function isFunctionLike(node) {
- return node && isFunctionLikeKind(node.kind);
- }
- ts.isFunctionLike = isFunctionLike;
- function isFunctionLikeKind(kind) {
- switch (kind) {
- case 152:
- case 186:
- case 228:
- case 187:
- case 151:
- case 150:
- case 153:
- case 154:
- case 155:
- case 156:
- case 157:
- case 160:
- case 161:
- return true;
- }
- return false;
- }
- ts.isFunctionLikeKind = isFunctionLikeKind;
function introducesArgumentsExoticObject(node) {
switch (node.kind) {
case 151:
@@ -5816,20 +5967,6 @@ var ts;
return false;
}
ts.introducesArgumentsExoticObject = introducesArgumentsExoticObject;
- function isIterationStatement(node, lookInLabeledStatements) {
- switch (node.kind) {
- case 214:
- case 215:
- case 216:
- case 212:
- case 213:
- return true;
- case 222:
- return lookInLabeledStatements && isIterationStatement(node.statement, lookInLabeledStatements);
- }
- return false;
- }
- ts.isIterationStatement = isIterationStatement;
function unwrapInnermostStatementOfLabel(node, beforeUnwrapLabelCallback) {
while (true) {
if (beforeUnwrapLabelCallback) {
@@ -5843,7 +5980,7 @@ var ts;
}
ts.unwrapInnermostStatementOfLabel = unwrapInnermostStatementOfLabel;
function isFunctionBlock(node) {
- return node && node.kind === 207 && isFunctionLike(node.parent);
+ return node && node.kind === 207 && ts.isFunctionLike(node.parent);
}
ts.isFunctionBlock = isFunctionBlock;
function isObjectLiteralMethod(node) {
@@ -5867,7 +6004,7 @@ var ts;
function getContainingFunction(node) {
while (true) {
node = node.parent;
- if (!node || isFunctionLike(node)) {
+ if (!node || ts.isFunctionLike(node)) {
return node;
}
}
@@ -5876,7 +6013,7 @@ var ts;
function getContainingClass(node) {
while (true) {
node = node.parent;
- if (!node || isClassLike(node)) {
+ if (!node || ts.isClassLike(node)) {
return node;
}
}
@@ -5890,16 +6027,16 @@ var ts;
}
switch (node.kind) {
case 144:
- if (isClassLike(node.parent.parent)) {
+ if (ts.isClassLike(node.parent.parent)) {
return node;
}
node = node.parent;
break;
case 147:
- if (node.parent.kind === 146 && isClassElement(node.parent.parent)) {
+ if (node.parent.kind === 146 && ts.isClassElement(node.parent.parent)) {
node = node.parent.parent;
}
- else if (isClassElement(node.parent)) {
+ else if (ts.isClassElement(node.parent)) {
node = node.parent;
}
break;
@@ -5965,10 +6102,10 @@ var ts;
case 154:
return node;
case 147:
- if (node.parent.kind === 146 && isClassElement(node.parent.parent)) {
+ if (node.parent.kind === 146 && ts.isClassElement(node.parent.parent)) {
node = node.parent.parent;
}
- else if (isClassElement(node.parent)) {
+ else if (ts.isClassElement(node.parent)) {
node = node.parent;
}
break;
@@ -6012,25 +6149,11 @@ var ts;
return undefined;
}
ts.getEntityNameFromTypeNode = getEntityNameFromTypeNode;
- function isCallLikeExpression(node) {
- switch (node.kind) {
- case 251:
- case 250:
- case 181:
- case 182:
- case 183:
- case 147:
- return true;
- default:
- return false;
- }
- }
- ts.isCallLikeExpression = isCallLikeExpression;
function getInvokedExpression(node) {
if (node.kind === 183) {
return node.tag;
}
- else if (isJsxOpeningLikeElement(node)) {
+ else if (ts.isJsxOpeningLikeElement(node)) {
return node.tagName;
}
return node.expression;
@@ -6253,11 +6376,11 @@ var ts;
}
ts.getRightMostAssignedExpression = getRightMostAssignedExpression;
function isExportsIdentifier(node) {
- return isIdentifier(node) && node.text === "exports";
+ return ts.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";
+ return ts.isPropertyAccessExpression(node) && ts.isIdentifier(node.expression) && node.expression.text === "module" && node.name.text === "exports";
}
ts.isModuleExportsPropertyAccessExpression = isModuleExportsPropertyAccessExpression;
function getSpecialPropertyAssignmentKind(expression) {
@@ -6360,35 +6483,24 @@ var ts;
}
ts.getCommentsFromJSDoc = getCommentsFromJSDoc;
function hasJSDocParameterTags(node) {
- var parameterTags = getJSDocTags(node, 286);
+ var parameterTags = getJSDocTags(node, 287);
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 === 286) {
- if (doc.kind === kind) {
- result.push(doc);
- }
- }
- else {
- var tags = doc.tags;
- if (tags) {
- result.push.apply(result, ts.filter(tags, function (tag) { return tag.kind === kind; }));
- }
- }
- }
- return result;
- }
+ return ts.flatMap(getJSDocs(node), function (doc) {
+ return doc.kind === 283
+ ? ts.filter(doc.tags, function (tag) { return tag.kind === kind; })
+ : doc.kind === kind && doc;
+ });
}
function getFirstJSDocTag(node, kind) {
return node && ts.firstOrUndefined(getJSDocTags(node, kind));
}
function getJSDocs(node) {
+ if (ts.isJSDocTypedefTag(node)) {
+ return [node.parent];
+ }
var cache = node.jsDocCache;
if (!cache) {
getJSDocsWorker(node);
@@ -6432,29 +6544,44 @@ var ts;
}
ts.getJSDocs = getJSDocs;
function getJSDocParameterTags(param) {
- if (!isParameter(param)) {
- return undefined;
- }
var func = param.parent;
- var tags = getJSDocTags(func, 286);
+ var tags = getJSDocTags(func, 287);
if (!param.name) {
var i = func.parameters.indexOf(param);
- var paramTags = ts.filter(tags, function (tag) { return tag.kind === 286; });
+ var paramTags = ts.filter(tags, function (tag) { return tag.kind === 287; });
if (paramTags && 0 <= i && i < paramTags.length) {
return [paramTags[i]];
}
}
else if (param.name.kind === 71) {
var name_1 = param.name.text;
- return ts.filter(tags, function (tag) { return tag.kind === 286 && tag.parameterName.text === name_1; });
+ return ts.filter(tags, function (tag) { return tag.kind === 287 && tag.name.text === name_1; });
}
else {
return undefined;
}
}
ts.getJSDocParameterTags = getJSDocParameterTags;
+ function getParameterFromJSDoc(node) {
+ var name = node.name.text;
+ var grandParent = node.parent.parent;
+ ts.Debug.assert(node.parent.kind === 283);
+ if (!ts.isFunctionLike(grandParent)) {
+ return undefined;
+ }
+ return ts.find(grandParent.parameters, function (p) {
+ return p.name.kind === 71 && p.name.text === name;
+ });
+ }
+ ts.getParameterFromJSDoc = getParameterFromJSDoc;
+ function getTypeParameterFromJsDoc(node) {
+ var name = node.name.text;
+ var typeParameters = node.parent.parent.parent.typeParameters;
+ return ts.find(typeParameters, function (p) { return p.name.text === name; });
+ }
+ ts.getTypeParameterFromJsDoc = getTypeParameterFromJsDoc;
function getJSDocType(node) {
- var tag = getFirstJSDocTag(node, 288);
+ var tag = getFirstJSDocTag(node, 289);
if (!tag && node.kind === 146) {
var paramTags = getJSDocParameterTags(node);
if (paramTags) {
@@ -6468,12 +6595,21 @@ var ts;
return getFirstJSDocTag(node, 285);
}
ts.getJSDocAugmentsTag = getJSDocAugmentsTag;
+ function getJSDocClassTag(node) {
+ return getFirstJSDocTag(node, 286);
+ }
+ ts.getJSDocClassTag = getJSDocClassTag;
function getJSDocReturnTag(node) {
- return getFirstJSDocTag(node, 287);
+ return getFirstJSDocTag(node, 288);
}
ts.getJSDocReturnTag = getJSDocReturnTag;
+ function getJSDocReturnType(node) {
+ var returnTag = getJSDocReturnTag(node);
+ return returnTag && returnTag.typeExpression && returnTag.typeExpression.type;
+ }
+ ts.getJSDocReturnType = getJSDocReturnType;
function getJSDocTemplateTag(node) {
- return getFirstJSDocTag(node, 289);
+ return getFirstJSDocTag(node, 290);
}
ts.getJSDocTemplateTag = getJSDocTemplateTag;
function hasRestParameter(s) {
@@ -6579,25 +6715,35 @@ var ts;
}
ts.isInAmbientContext = isInAmbientContext;
function isDeclarationName(name) {
- if (name.kind !== 71 && name.kind !== 9 && name.kind !== 8) {
- return false;
- }
- var parent = name.parent;
- if (parent.kind === 242 || parent.kind === 246) {
- if (parent.propertyName) {
- return true;
- }
- }
- if (isDeclaration(parent)) {
- return parent.name === name;
+ switch (name.kind) {
+ case 71:
+ case 9:
+ case 8:
+ return ts.isDeclaration(name.parent) && name.parent.name === name;
+ default:
+ return false;
}
- return false;
}
ts.isDeclarationName = isDeclarationName;
+ function isAnyDeclarationName(name) {
+ switch (name.kind) {
+ case 71:
+ case 9:
+ case 8:
+ if (ts.isDeclaration(name.parent)) {
+ return name.parent.name === name;
+ }
+ var binExp = name.parent.parent;
+ return ts.isBinaryExpression(binExp) && getSpecialPropertyAssignmentKind(binExp) !== 0 && ts.getNameOfDeclaration(binExp) === name;
+ default:
+ return false;
+ }
+ }
+ ts.isAnyDeclarationName = isAnyDeclarationName;
function isLiteralComputedPropertyDeclarationName(node) {
return (node.kind === 9 || node.kind === 8) &&
node.parent.kind === 144 &&
- isDeclaration(node.parent.parent);
+ ts.isDeclaration(node.parent.parent);
}
ts.isLiteralComputedPropertyDeclarationName = isLiteralComputedPropertyDeclarationName;
function isIdentifierName(node) {
@@ -6693,21 +6839,19 @@ var ts;
var isNoDefaultLibRegEx = /^(\/\/\/\s*<reference\s+no-default-lib\s*=\s*)('|")(.+?)\2\s*\/>/gim;
if (simpleReferenceRegEx.test(comment)) {
if (isNoDefaultLibRegEx.test(comment)) {
- return {
- isNoDefaultLib: true
- };
+ return { isNoDefaultLib: true };
}
else {
var refMatchResult = ts.fullTripleSlashReferencePathRegEx.exec(comment);
var refLibResult = !refMatchResult && ts.fullTripleSlashReferenceTypeReferenceDirectiveRegEx.exec(comment);
- if (refMatchResult || refLibResult) {
- var start = commentRange.pos;
- var end = commentRange.end;
+ var match = refMatchResult || refLibResult;
+ if (match) {
+ var pos = commentRange.pos + match[1].length + match[2].length;
return {
fileReference: {
- pos: start,
- end: end,
- fileName: (refMatchResult || refLibResult)[3]
+ pos: pos,
+ end: pos + match[3].length,
+ fileName: match[3]
},
isNoDefaultLib: false,
isTypeReferenceDirective: !!refLibResult
@@ -6735,12 +6879,13 @@ var ts;
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[FunctionFlags["AsyncGenerator"] = 3] = "AsyncGenerator";
})(FunctionFlags = ts.FunctionFlags || (ts.FunctionFlags = {}));
function getFunctionFlags(node) {
+ if (!node) {
+ return 4;
+ }
var flags = 0;
switch (node.kind) {
case 228:
@@ -6774,10 +6919,6 @@ var ts;
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
@@ -6785,7 +6926,8 @@ var ts;
}
ts.isStringOrNumericLiteral = isStringOrNumericLiteral;
function hasDynamicName(declaration) {
- return declaration.name && isDynamicName(declaration.name);
+ var name = ts.getNameOfDeclaration(declaration);
+ return name && isDynamicName(name);
}
ts.hasDynamicName = hasDynamicName;
function isDynamicName(name) {
@@ -6795,7 +6937,7 @@ var ts;
}
ts.isDynamicName = isDynamicName;
function isWellKnownSymbolSyntactically(node) {
- return isPropertyAccessExpression(node) && isESSymbolIdentifier(node.expression);
+ return ts.isPropertyAccessExpression(node) && isESSymbolIdentifier(node.expression);
}
ts.isWellKnownSymbolSyntactically = isWellKnownSymbolSyntactically;
function getPropertyNameForPropertyNameNode(name) {
@@ -6827,24 +6969,6 @@ var ts;
return node.text === "push" || node.text === "unshift";
}
ts.isPushOrUnshiftIdentifier = isPushOrUnshiftIdentifier;
- function isModifierKind(token) {
- switch (token) {
- case 117:
- case 120:
- case 76:
- case 124:
- case 79:
- case 84:
- case 114:
- case 112:
- case 113:
- case 131:
- case 115:
- return true;
- }
- return false;
- }
- ts.isModifierKind = isModifierKind;
function isParameterDeclaration(node) {
var root = getRootDeclaration(node);
return root.kind === 146;
@@ -6883,7 +7007,7 @@ var ts;
}
ts.getOriginalSourceFileOrBundle = getOriginalSourceFileOrBundle;
function getOriginalSourceFile(sourceFile) {
- return ts.getParseTreeNode(sourceFile, isSourceFile) || sourceFile;
+ return ts.getParseTreeNode(sourceFile, ts.isSourceFile) || sourceFile;
}
function getOriginalSourceFiles(sourceFiles) {
return ts.sameMap(sourceFiles, getOriginalSourceFile);
@@ -7060,6 +7184,8 @@ var ts;
return 2;
case 198:
return 1;
+ case 298:
+ return 0;
default:
return -1;
}
@@ -7163,12 +7289,13 @@ var ts;
return "\\u" + paddedHexCode;
}
var nonAsciiCharacters = /[^\u0000-\u007F]/g;
- function escapeNonAsciiCharacters(s) {
+ function escapeNonAsciiString(s) {
+ s = escapeString(s);
return nonAsciiCharacters.test(s) ?
s.replace(nonAsciiCharacters, function (c) { return get16BitUnicodeEscapeSequence(c.charCodeAt(0)); }) :
s;
}
- ts.escapeNonAsciiCharacters = escapeNonAsciiCharacters;
+ ts.escapeNonAsciiString = escapeNonAsciiString;
var indentStrings = ["", " "];
function getIndentString(level) {
if (indentStrings[level] === undefined) {
@@ -7257,7 +7384,7 @@ var ts;
ts.getResolvedExternalModuleName = getResolvedExternalModuleName;
function getExternalModuleNameFromDeclaration(host, resolver, declaration) {
var file = resolver.getExternalModuleFileFromDeclaration(declaration);
- if (!file || isDeclarationFile(file)) {
+ if (!file || file.isDeclarationFile) {
return undefined;
}
return getResolvedExternalModuleName(host, file);
@@ -7309,7 +7436,7 @@ var ts;
}
ts.getSourceFilesToEmit = getSourceFilesToEmit;
function sourceFileMayBeEmitted(sourceFile, options, isSourceFileFromExternalLibrary) {
- return !(options.noEmitForJsFiles && isSourceFileJavaScript(sourceFile)) && !isDeclarationFile(sourceFile) && !isSourceFileFromExternalLibrary(sourceFile);
+ return !(options.noEmitForJsFiles && isSourceFileJavaScript(sourceFile)) && !sourceFile.isDeclarationFile && !isSourceFileFromExternalLibrary(sourceFile);
}
ts.sourceFileMayBeEmitted = sourceFileMayBeEmitted;
function forEachEmittedFile(host, action, sourceFilesOrTargetSourceFile, emitOnlyDtsFiles) {
@@ -7380,12 +7507,16 @@ var ts;
});
}
ts.getFirstConstructorWithBody = getFirstConstructorWithBody;
- function getSetAccessorTypeAnnotationNode(accessor) {
+ function getSetAccessorValueParameter(accessor) {
if (accessor && accessor.parameters.length > 0) {
var hasThis = accessor.parameters.length === 2 && parameterIsThisKeyword(accessor.parameters[0]);
- return accessor.parameters[hasThis ? 1 : 0].type;
+ return accessor.parameters[hasThis ? 1 : 0];
}
}
+ function getSetAccessorTypeAnnotationNode(accessor) {
+ var parameter = getSetAccessorValueParameter(accessor);
+ return parameter && parameter.type;
+ }
ts.getSetAccessorTypeAnnotationNode = getSetAccessorTypeAnnotationNode;
function getThisParameter(signature) {
if (signature.parameters.length) {
@@ -7456,6 +7587,39 @@ var ts;
};
}
ts.getAllAccessorDeclarations = getAllAccessorDeclarations;
+ function getEffectiveTypeAnnotationNode(node) {
+ if (node.type) {
+ return node.type;
+ }
+ if (node.flags & 65536) {
+ return getJSDocType(node);
+ }
+ }
+ ts.getEffectiveTypeAnnotationNode = getEffectiveTypeAnnotationNode;
+ function getEffectiveReturnTypeNode(node) {
+ if (node.type) {
+ return node.type;
+ }
+ if (node.flags & 65536) {
+ return getJSDocReturnType(node);
+ }
+ }
+ ts.getEffectiveReturnTypeNode = getEffectiveReturnTypeNode;
+ function getEffectiveTypeParameterDeclarations(node) {
+ if (node.typeParameters) {
+ return node.typeParameters;
+ }
+ if (node.flags & 65536) {
+ var templateTag = getJSDocTemplateTag(node);
+ return templateTag && templateTag.typeParameters;
+ }
+ }
+ ts.getEffectiveTypeParameterDeclarations = getEffectiveTypeParameterDeclarations;
+ function getEffectiveSetAccessorTypeAnnotationNode(node) {
+ var parameter = getSetAccessorValueParameter(node);
+ return parameter && getEffectiveTypeAnnotationNode(parameter);
+ }
+ ts.getEffectiveSetAccessorTypeAnnotationNode = getEffectiveSetAccessorTypeAnnotationNode;
function emitNewLineBeforeLeadingComments(lineMap, writer, node, leadingComments) {
emitNewLineBeforeLeadingCommentsOfPosition(lineMap, writer, node.pos, leadingComments);
}
@@ -7617,6 +7781,12 @@ var ts;
if (node.modifierFlagsCache & 536870912) {
return node.modifierFlagsCache & ~536870912;
}
+ var flags = getModifierFlagsNoCache(node);
+ node.modifierFlagsCache = flags | 536870912;
+ return flags;
+ }
+ ts.getModifierFlags = getModifierFlags;
+ function getModifierFlagsNoCache(node) {
var flags = 0;
if (node.modifiers) {
for (var _i = 0, _a = node.modifiers; _i < _a.length; _i++) {
@@ -7627,10 +7797,9 @@ var ts;
if (node.flags & 4 || (node.kind === 71 && node.isInJSDocNamespace)) {
flags |= 1;
}
- node.modifierFlagsCache = flags | 536870912;
return flags;
}
- ts.getModifierFlags = getModifierFlags;
+ ts.getModifierFlagsNoCache = getModifierFlagsNoCache;
function modifierToFlag(token) {
switch (token) {
case 115: return 32;
@@ -7661,17 +7830,17 @@ var ts;
function tryGetClassExtendingExpressionWithTypeArguments(node) {
if (node.kind === 201 &&
node.parent.token === 85 &&
- isClassLike(node.parent.parent)) {
+ ts.isClassLike(node.parent.parent)) {
return node.parent.parent;
}
}
ts.tryGetClassExtendingExpressionWithTypeArguments = tryGetClassExtendingExpressionWithTypeArguments;
function isAssignmentExpression(node, excludeCompoundAssignment) {
- return isBinaryExpression(node)
+ return ts.isBinaryExpression(node)
&& (excludeCompoundAssignment
? node.operatorToken.kind === 58
: isAssignmentOperator(node.operatorToken.kind))
- && isLeftHandSideExpression(node.left);
+ && ts.isLeftHandSideExpression(node.left);
}
ts.isAssignmentExpression = isAssignmentExpression;
function isDestructuringAssignment(node) {
@@ -7691,7 +7860,7 @@ var ts;
if (node.kind === 71) {
return true;
}
- else if (isPropertyAccessExpression(node)) {
+ else if (ts.isPropertyAccessExpression(node)) {
return isSupportedExpressionWithTypeArgumentsRest(node.expression);
}
else {
@@ -7708,7 +7877,7 @@ var ts;
&& node.parent
&& node.parent.token === 108
&& node.parent.parent
- && isClassLike(node.parent.parent);
+ && ts.isClassLike(node.parent.parent);
}
ts.isExpressionWithTypeArgumentsInClassImplementsClause = isExpressionWithTypeArgumentsInClassImplementsClause;
function isEntityNameExpression(node) {
@@ -7732,11 +7901,11 @@ var ts;
}
ts.isEmptyArrayLiteral = isEmptyArrayLiteral;
function getLocalSymbolForExportDefault(symbol) {
- return isExportDefaultSymbol(symbol) ? symbol.valueDeclaration.localSymbol : undefined;
+ return isExportDefaultSymbol(symbol) ? symbol.declarations[0].localSymbol : undefined;
}
ts.getLocalSymbolForExportDefault = getLocalSymbolForExportDefault;
function isExportDefaultSymbol(symbol) {
- return symbol && symbol.valueDeclaration && hasModifier(symbol.valueDeclaration, 512);
+ return symbol && ts.length(symbol.declarations) > 0 && hasModifier(symbol.declarations[0], 512);
}
function tryExtractTypeScriptExtension(fileName) {
return ts.find(ts.supportedTypescriptExtensionsForExtractExtension, function (extension) { return ts.fileExtensionIs(fileName, extension); });
@@ -7798,13 +7967,13 @@ var ts;
var carriageReturnLineFeed = "\r\n";
var lineFeed = "\n";
function getNewLineCharacter(options) {
- if (options.newLine === 0) {
- return carriageReturnLineFeed;
- }
- else if (options.newLine === 1) {
- return lineFeed;
+ switch (options.newLine) {
+ case 0:
+ return carriageReturnLineFeed;
+ case 1:
+ return lineFeed;
}
- else if (ts.sys) {
+ if (ts.sys) {
return ts.sys.newLine;
}
return carriageReturnLineFeed;
@@ -7876,27 +8045,74 @@ var ts;
}
return false;
}
- var syntaxKindCache = [];
- function formatSyntaxKind(kind) {
- var syntaxKindEnum = ts.SyntaxKind;
- if (syntaxKindEnum) {
- var cached = syntaxKindCache[kind];
- if (cached !== undefined) {
- return cached;
- }
- for (var name in syntaxKindEnum) {
- if (syntaxKindEnum[name] === kind) {
- var result = kind + " (" + name + ")";
- syntaxKindCache[kind] = result;
- return result;
+ function formatEnum(value, enumObject, isFlags) {
+ if (value === void 0) { value = 0; }
+ var members = getEnumMembers(enumObject);
+ if (value === 0) {
+ return members.length > 0 && members[0][0] === 0 ? members[0][1] : "0";
+ }
+ if (isFlags) {
+ var result = "";
+ var remainingFlags = value;
+ for (var i = members.length - 1; i >= 0 && remainingFlags !== 0; i--) {
+ var _a = members[i], enumValue = _a[0], enumName = _a[1];
+ if (enumValue !== 0 && (remainingFlags & enumValue) === enumValue) {
+ remainingFlags &= ~enumValue;
+ result = "" + enumName + (result ? ", " : "") + result;
}
}
+ if (remainingFlags === 0) {
+ return result;
+ }
}
else {
- return kind.toString();
+ for (var _i = 0, members_1 = members; _i < members_1.length; _i++) {
+ var _b = members_1[_i], enumValue = _b[0], enumName = _b[1];
+ if (enumValue === value) {
+ return enumName;
+ }
+ }
+ }
+ return value.toString();
+ }
+ function getEnumMembers(enumObject) {
+ var result = [];
+ for (var name in enumObject) {
+ var value = enumObject[name];
+ if (typeof value === "number") {
+ result.push([value, name]);
+ }
}
+ return ts.stableSort(result, function (x, y) { return ts.compareValues(x[0], y[0]); });
+ }
+ function formatSyntaxKind(kind) {
+ return formatEnum(kind, ts.SyntaxKind, false);
}
ts.formatSyntaxKind = formatSyntaxKind;
+ function formatModifierFlags(flags) {
+ return formatEnum(flags, ts.ModifierFlags, true);
+ }
+ ts.formatModifierFlags = formatModifierFlags;
+ function formatTransformFlags(flags) {
+ return formatEnum(flags, ts.TransformFlags, true);
+ }
+ ts.formatTransformFlags = formatTransformFlags;
+ function formatEmitFlags(flags) {
+ return formatEnum(flags, ts.EmitFlags, true);
+ }
+ ts.formatEmitFlags = formatEmitFlags;
+ function formatSymbolFlags(flags) {
+ return formatEnum(flags, ts.SymbolFlags, true);
+ }
+ ts.formatSymbolFlags = formatSymbolFlags;
+ function formatTypeFlags(flags) {
+ return formatEnum(flags, ts.TypeFlags, true);
+ }
+ ts.formatTypeFlags = formatTypeFlags;
+ function formatObjectFlags(flags) {
+ return formatEnum(flags, ts.ObjectFlags, true);
+ }
+ ts.formatObjectFlags = formatObjectFlags;
function getRangePos(range) {
return range ? range.pos : -1;
}
@@ -8013,23 +8229,993 @@ var ts;
return node.symbol && getDeclarationOfKind(node.symbol, kind) === node;
}
ts.isFirstDeclarationOfKind = isFirstDeclarationOfKind;
- function isNodeArray(array) {
- return array.hasOwnProperty("pos")
- && array.hasOwnProperty("end");
+ function isWatchSet(options) {
+ return options.watch && options.hasOwnProperty("watch");
}
- ts.isNodeArray = isNodeArray;
+ ts.isWatchSet = isWatchSet;
+ function getCheckFlags(symbol) {
+ return symbol.flags & 134217728 ? symbol.checkFlags : 0;
+ }
+ ts.getCheckFlags = getCheckFlags;
+ function getDeclarationModifierFlagsFromSymbol(s) {
+ 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;
+ }
+ ts.getDeclarationModifierFlagsFromSymbol = getDeclarationModifierFlagsFromSymbol;
+ function levenshtein(s1, s2) {
+ var previous = new Array(s2.length + 1);
+ var current = new Array(s2.length + 1);
+ for (var i = 0; i < s2.length + 1; i++) {
+ previous[i] = i;
+ current[i] = -1;
+ }
+ for (var i = 1; i < s1.length + 1; i++) {
+ current[0] = i;
+ for (var j = 1; j < s2.length + 1; j++) {
+ current[j] = Math.min(previous[j] + 1, current[j - 1] + 1, previous[j - 1] + (s1[i - 1] === s2[j - 1] ? 0 : 2));
+ }
+ var tmp = previous;
+ previous = current;
+ current = tmp;
+ }
+ return previous[previous.length - 1];
+ }
+ ts.levenshtein = levenshtein;
+})(ts || (ts = {}));
+(function (ts) {
+ function getDefaultLibFileName(options) {
+ switch (options.target) {
+ case 5:
+ return "lib.esnext.full.d.ts";
+ case 4:
+ return "lib.es2017.full.d.ts";
+ case 3:
+ return "lib.es2016.full.d.ts";
+ case 2:
+ return "lib.es6.d.ts";
+ default:
+ return "lib.d.ts";
+ }
+ }
+ ts.getDefaultLibFileName = getDefaultLibFileName;
+ function textSpanEnd(span) {
+ return span.start + span.length;
+ }
+ ts.textSpanEnd = textSpanEnd;
+ function textSpanIsEmpty(span) {
+ return span.length === 0;
+ }
+ ts.textSpanIsEmpty = textSpanIsEmpty;
+ function textSpanContainsPosition(span, position) {
+ return position >= span.start && position < textSpanEnd(span);
+ }
+ ts.textSpanContainsPosition = textSpanContainsPosition;
+ function textSpanContainsTextSpan(span, other) {
+ return other.start >= span.start && textSpanEnd(other) <= textSpanEnd(span);
+ }
+ ts.textSpanContainsTextSpan = textSpanContainsTextSpan;
+ function textSpanOverlapsWith(span, other) {
+ var overlapStart = Math.max(span.start, other.start);
+ var overlapEnd = Math.min(textSpanEnd(span), textSpanEnd(other));
+ return overlapStart < overlapEnd;
+ }
+ ts.textSpanOverlapsWith = textSpanOverlapsWith;
+ function textSpanOverlap(span1, span2) {
+ var overlapStart = Math.max(span1.start, span2.start);
+ var overlapEnd = Math.min(textSpanEnd(span1), textSpanEnd(span2));
+ if (overlapStart < overlapEnd) {
+ return createTextSpanFromBounds(overlapStart, overlapEnd);
+ }
+ return undefined;
+ }
+ ts.textSpanOverlap = textSpanOverlap;
+ function textSpanIntersectsWithTextSpan(span, other) {
+ return other.start <= textSpanEnd(span) && textSpanEnd(other) >= span.start;
+ }
+ ts.textSpanIntersectsWithTextSpan = textSpanIntersectsWithTextSpan;
+ function textSpanIntersectsWith(span, start, length) {
+ var end = start + length;
+ return start <= textSpanEnd(span) && end >= span.start;
+ }
+ ts.textSpanIntersectsWith = textSpanIntersectsWith;
+ function decodedTextSpanIntersectsWith(start1, length1, start2, length2) {
+ var end1 = start1 + length1;
+ var end2 = start2 + length2;
+ return start2 <= end1 && end2 >= start1;
+ }
+ ts.decodedTextSpanIntersectsWith = decodedTextSpanIntersectsWith;
+ function textSpanIntersectsWithPosition(span, position) {
+ return position <= textSpanEnd(span) && position >= span.start;
+ }
+ ts.textSpanIntersectsWithPosition = textSpanIntersectsWithPosition;
+ function textSpanIntersection(span1, span2) {
+ var intersectStart = Math.max(span1.start, span2.start);
+ var intersectEnd = Math.min(textSpanEnd(span1), textSpanEnd(span2));
+ if (intersectStart <= intersectEnd) {
+ return createTextSpanFromBounds(intersectStart, intersectEnd);
+ }
+ return undefined;
+ }
+ ts.textSpanIntersection = textSpanIntersection;
+ function createTextSpan(start, length) {
+ if (start < 0) {
+ throw new Error("start < 0");
+ }
+ if (length < 0) {
+ throw new Error("length < 0");
+ }
+ return { start: start, length: length };
+ }
+ ts.createTextSpan = createTextSpan;
+ function createTextSpanFromBounds(start, end) {
+ return createTextSpan(start, end - start);
+ }
+ ts.createTextSpanFromBounds = createTextSpanFromBounds;
+ function textChangeRangeNewSpan(range) {
+ return createTextSpan(range.span.start, range.newLength);
+ }
+ ts.textChangeRangeNewSpan = textChangeRangeNewSpan;
+ function textChangeRangeIsUnchanged(range) {
+ return textSpanIsEmpty(range.span) && range.newLength === 0;
+ }
+ ts.textChangeRangeIsUnchanged = textChangeRangeIsUnchanged;
+ function createTextChangeRange(span, newLength) {
+ if (newLength < 0) {
+ throw new Error("newLength < 0");
+ }
+ return { span: span, newLength: newLength };
+ }
+ ts.createTextChangeRange = createTextChangeRange;
+ ts.unchangedTextChangeRange = createTextChangeRange(createTextSpan(0, 0), 0);
+ function collapseTextChangeRangesAcrossMultipleVersions(changes) {
+ if (changes.length === 0) {
+ return ts.unchangedTextChangeRange;
+ }
+ if (changes.length === 1) {
+ return changes[0];
+ }
+ var change0 = changes[0];
+ var oldStartN = change0.span.start;
+ var oldEndN = textSpanEnd(change0.span);
+ var newEndN = oldStartN + change0.newLength;
+ for (var i = 1; i < changes.length; i++) {
+ var nextChange = changes[i];
+ var oldStart1 = oldStartN;
+ var oldEnd1 = oldEndN;
+ var newEnd1 = newEndN;
+ var oldStart2 = nextChange.span.start;
+ var oldEnd2 = textSpanEnd(nextChange.span);
+ var newEnd2 = oldStart2 + nextChange.newLength;
+ oldStartN = Math.min(oldStart1, oldStart2);
+ oldEndN = Math.max(oldEnd1, oldEnd1 + (oldEnd2 - newEnd1));
+ newEndN = Math.max(newEnd2, newEnd2 + (newEnd1 - oldEnd2));
+ }
+ return createTextChangeRange(createTextSpanFromBounds(oldStartN, oldEndN), newEndN - oldStartN);
+ }
+ ts.collapseTextChangeRangesAcrossMultipleVersions = collapseTextChangeRangesAcrossMultipleVersions;
+ function getTypeParameterOwner(d) {
+ if (d && d.kind === 145) {
+ for (var current = d; current; current = current.parent) {
+ if (ts.isFunctionLike(current) || ts.isClassLike(current) || current.kind === 230) {
+ return current;
+ }
+ }
+ }
+ }
+ ts.getTypeParameterOwner = getTypeParameterOwner;
+ function isParameterPropertyDeclaration(node) {
+ return ts.hasModifier(node, 92) && node.parent.kind === 152 && ts.isClassLike(node.parent.parent);
+ }
+ ts.isParameterPropertyDeclaration = isParameterPropertyDeclaration;
+ function walkUpBindingElementsAndPatterns(node) {
+ while (node && (node.kind === 176 || ts.isBindingPattern(node))) {
+ node = node.parent;
+ }
+ return node;
+ }
+ function getCombinedModifierFlags(node) {
+ node = walkUpBindingElementsAndPatterns(node);
+ var flags = ts.getModifierFlags(node);
+ if (node.kind === 226) {
+ node = node.parent;
+ }
+ if (node && node.kind === 227) {
+ flags |= ts.getModifierFlags(node);
+ node = node.parent;
+ }
+ if (node && node.kind === 208) {
+ flags |= ts.getModifierFlags(node);
+ }
+ return flags;
+ }
+ ts.getCombinedModifierFlags = getCombinedModifierFlags;
+ function getCombinedNodeFlags(node) {
+ node = walkUpBindingElementsAndPatterns(node);
+ var flags = node.flags;
+ if (node.kind === 226) {
+ node = node.parent;
+ }
+ if (node && node.kind === 227) {
+ flags |= node.flags;
+ node = node.parent;
+ }
+ if (node && node.kind === 208) {
+ flags |= node.flags;
+ }
+ return flags;
+ }
+ ts.getCombinedNodeFlags = getCombinedNodeFlags;
+ function validateLocaleAndSetLanguage(locale, sys, errors) {
+ var matchResult = /^([a-z]+)([_\-]([a-z]+))?$/.exec(locale.toLowerCase());
+ if (!matchResult) {
+ if (errors) {
+ errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1, "en", "ja-jp"));
+ }
+ return;
+ }
+ var language = matchResult[1];
+ var territory = matchResult[3];
+ if (!trySetLanguageAndTerritory(language, territory, errors)) {
+ trySetLanguageAndTerritory(language, undefined, errors);
+ }
+ function trySetLanguageAndTerritory(language, territory, errors) {
+ var compilerFilePath = ts.normalizePath(sys.getExecutingFilePath());
+ var containingDirectoryPath = ts.getDirectoryPath(compilerFilePath);
+ var filePath = ts.combinePaths(containingDirectoryPath, language);
+ if (territory) {
+ filePath = filePath + "-" + territory;
+ }
+ filePath = sys.resolvePath(ts.combinePaths(filePath, "diagnosticMessages.generated.json"));
+ if (!sys.fileExists(filePath)) {
+ return false;
+ }
+ var fileContents = "";
+ try {
+ fileContents = sys.readFile(filePath);
+ }
+ catch (e) {
+ if (errors) {
+ errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Unable_to_open_file_0, filePath));
+ }
+ return false;
+ }
+ try {
+ ts.localizedDiagnosticMessages = JSON.parse(fileContents);
+ }
+ catch (e) {
+ if (errors) {
+ errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Corrupted_locale_file_0, filePath));
+ }
+ return false;
+ }
+ return true;
+ }
+ }
+ 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;
+ function getNameOfDeclaration(declaration) {
+ if (!declaration) {
+ return undefined;
+ }
+ if (declaration.kind === 194) {
+ var expr = declaration;
+ switch (ts.getSpecialPropertyAssignmentKind(expr)) {
+ case 1:
+ case 4:
+ case 5:
+ case 3:
+ return expr.left.name;
+ default:
+ return undefined;
+ }
+ }
+ else {
+ return declaration.name;
+ }
+ }
+ ts.getNameOfDeclaration = getNameOfDeclaration;
+})(ts || (ts = {}));
+(function (ts) {
+ function isNumericLiteral(node) {
+ return node.kind === 8;
+ }
+ ts.isNumericLiteral = isNumericLiteral;
+ function isStringLiteral(node) {
+ return node.kind === 9;
+ }
+ ts.isStringLiteral = isStringLiteral;
+ function isJsxText(node) {
+ return node.kind === 10;
+ }
+ ts.isJsxText = isJsxText;
+ function isRegularExpressionLiteral(node) {
+ return node.kind === 12;
+ }
+ ts.isRegularExpressionLiteral = isRegularExpressionLiteral;
function isNoSubstitutionTemplateLiteral(node) {
return node.kind === 13;
}
ts.isNoSubstitutionTemplateLiteral = isNoSubstitutionTemplateLiteral;
+ function isTemplateHead(node) {
+ return node.kind === 14;
+ }
+ ts.isTemplateHead = isTemplateHead;
+ function isTemplateMiddle(node) {
+ return node.kind === 15;
+ }
+ ts.isTemplateMiddle = isTemplateMiddle;
+ function isTemplateTail(node) {
+ return node.kind === 16;
+ }
+ ts.isTemplateTail = isTemplateTail;
+ function isIdentifier(node) {
+ return node.kind === 71;
+ }
+ ts.isIdentifier = isIdentifier;
+ function isQualifiedName(node) {
+ return node.kind === 143;
+ }
+ ts.isQualifiedName = isQualifiedName;
+ function isComputedPropertyName(node) {
+ return node.kind === 144;
+ }
+ ts.isComputedPropertyName = isComputedPropertyName;
+ function isTypeParameterDeclaration(node) {
+ return node.kind === 145;
+ }
+ ts.isTypeParameterDeclaration = isTypeParameterDeclaration;
+ function isParameter(node) {
+ return node.kind === 146;
+ }
+ ts.isParameter = isParameter;
+ function isDecorator(node) {
+ return node.kind === 147;
+ }
+ ts.isDecorator = isDecorator;
+ function isPropertySignature(node) {
+ return node.kind === 148;
+ }
+ ts.isPropertySignature = isPropertySignature;
+ function isPropertyDeclaration(node) {
+ return node.kind === 149;
+ }
+ ts.isPropertyDeclaration = isPropertyDeclaration;
+ function isMethodSignature(node) {
+ return node.kind === 150;
+ }
+ ts.isMethodSignature = isMethodSignature;
+ function isMethodDeclaration(node) {
+ return node.kind === 151;
+ }
+ ts.isMethodDeclaration = isMethodDeclaration;
+ function isConstructorDeclaration(node) {
+ return node.kind === 152;
+ }
+ ts.isConstructorDeclaration = isConstructorDeclaration;
+ function isGetAccessorDeclaration(node) {
+ return node.kind === 153;
+ }
+ ts.isGetAccessorDeclaration = isGetAccessorDeclaration;
+ function isSetAccessorDeclaration(node) {
+ return node.kind === 154;
+ }
+ ts.isSetAccessorDeclaration = isSetAccessorDeclaration;
+ function isCallSignatureDeclaration(node) {
+ return node.kind === 155;
+ }
+ ts.isCallSignatureDeclaration = isCallSignatureDeclaration;
+ function isConstructSignatureDeclaration(node) {
+ return node.kind === 156;
+ }
+ ts.isConstructSignatureDeclaration = isConstructSignatureDeclaration;
+ function isIndexSignatureDeclaration(node) {
+ return node.kind === 157;
+ }
+ ts.isIndexSignatureDeclaration = isIndexSignatureDeclaration;
+ function isTypePredicateNode(node) {
+ return node.kind === 158;
+ }
+ ts.isTypePredicateNode = isTypePredicateNode;
+ function isTypeReferenceNode(node) {
+ return node.kind === 159;
+ }
+ ts.isTypeReferenceNode = isTypeReferenceNode;
+ function isFunctionTypeNode(node) {
+ return node.kind === 160;
+ }
+ ts.isFunctionTypeNode = isFunctionTypeNode;
+ function isConstructorTypeNode(node) {
+ return node.kind === 161;
+ }
+ ts.isConstructorTypeNode = isConstructorTypeNode;
+ function isTypeQueryNode(node) {
+ return node.kind === 162;
+ }
+ ts.isTypeQueryNode = isTypeQueryNode;
+ function isTypeLiteralNode(node) {
+ return node.kind === 163;
+ }
+ ts.isTypeLiteralNode = isTypeLiteralNode;
+ function isArrayTypeNode(node) {
+ return node.kind === 164;
+ }
+ ts.isArrayTypeNode = isArrayTypeNode;
+ function isTupleTypeNode(node) {
+ return node.kind === 165;
+ }
+ ts.isTupleTypeNode = isTupleTypeNode;
+ function isUnionTypeNode(node) {
+ return node.kind === 166;
+ }
+ ts.isUnionTypeNode = isUnionTypeNode;
+ function isIntersectionTypeNode(node) {
+ return node.kind === 167;
+ }
+ ts.isIntersectionTypeNode = isIntersectionTypeNode;
+ function isParenthesizedTypeNode(node) {
+ return node.kind === 168;
+ }
+ ts.isParenthesizedTypeNode = isParenthesizedTypeNode;
+ function isThisTypeNode(node) {
+ return node.kind === 169;
+ }
+ ts.isThisTypeNode = isThisTypeNode;
+ function isTypeOperatorNode(node) {
+ return node.kind === 170;
+ }
+ ts.isTypeOperatorNode = isTypeOperatorNode;
+ function isIndexedAccessTypeNode(node) {
+ return node.kind === 171;
+ }
+ ts.isIndexedAccessTypeNode = isIndexedAccessTypeNode;
+ function isMappedTypeNode(node) {
+ return node.kind === 172;
+ }
+ ts.isMappedTypeNode = isMappedTypeNode;
+ function isLiteralTypeNode(node) {
+ return node.kind === 173;
+ }
+ ts.isLiteralTypeNode = isLiteralTypeNode;
+ function isObjectBindingPattern(node) {
+ return node.kind === 174;
+ }
+ ts.isObjectBindingPattern = isObjectBindingPattern;
+ function isArrayBindingPattern(node) {
+ return node.kind === 175;
+ }
+ ts.isArrayBindingPattern = isArrayBindingPattern;
+ function isBindingElement(node) {
+ return node.kind === 176;
+ }
+ ts.isBindingElement = isBindingElement;
+ function isArrayLiteralExpression(node) {
+ return node.kind === 177;
+ }
+ ts.isArrayLiteralExpression = isArrayLiteralExpression;
+ function isObjectLiteralExpression(node) {
+ return node.kind === 178;
+ }
+ ts.isObjectLiteralExpression = isObjectLiteralExpression;
+ function isPropertyAccessExpression(node) {
+ return node.kind === 179;
+ }
+ ts.isPropertyAccessExpression = isPropertyAccessExpression;
+ function isElementAccessExpression(node) {
+ return node.kind === 180;
+ }
+ ts.isElementAccessExpression = isElementAccessExpression;
+ function isCallExpression(node) {
+ return node.kind === 181;
+ }
+ ts.isCallExpression = isCallExpression;
+ function isNewExpression(node) {
+ return node.kind === 182;
+ }
+ ts.isNewExpression = isNewExpression;
+ function isTaggedTemplateExpression(node) {
+ return node.kind === 183;
+ }
+ ts.isTaggedTemplateExpression = isTaggedTemplateExpression;
+ function isTypeAssertion(node) {
+ return node.kind === 184;
+ }
+ ts.isTypeAssertion = isTypeAssertion;
+ function isParenthesizedExpression(node) {
+ return node.kind === 185;
+ }
+ ts.isParenthesizedExpression = isParenthesizedExpression;
+ function isFunctionExpression(node) {
+ return node.kind === 186;
+ }
+ ts.isFunctionExpression = isFunctionExpression;
+ function isArrowFunction(node) {
+ return node.kind === 187;
+ }
+ ts.isArrowFunction = isArrowFunction;
+ function isDeleteExpression(node) {
+ return node.kind === 188;
+ }
+ ts.isDeleteExpression = isDeleteExpression;
+ function isTypeOfExpression(node) {
+ return node.kind === 191;
+ }
+ ts.isTypeOfExpression = isTypeOfExpression;
+ function isVoidExpression(node) {
+ return node.kind === 190;
+ }
+ ts.isVoidExpression = isVoidExpression;
+ function isAwaitExpression(node) {
+ return node.kind === 191;
+ }
+ ts.isAwaitExpression = isAwaitExpression;
+ function isPrefixUnaryExpression(node) {
+ return node.kind === 192;
+ }
+ ts.isPrefixUnaryExpression = isPrefixUnaryExpression;
+ function isPostfixUnaryExpression(node) {
+ return node.kind === 193;
+ }
+ ts.isPostfixUnaryExpression = isPostfixUnaryExpression;
+ function isBinaryExpression(node) {
+ return node.kind === 194;
+ }
+ ts.isBinaryExpression = isBinaryExpression;
+ function isConditionalExpression(node) {
+ return node.kind === 195;
+ }
+ ts.isConditionalExpression = isConditionalExpression;
+ function isTemplateExpression(node) {
+ return node.kind === 196;
+ }
+ ts.isTemplateExpression = isTemplateExpression;
+ function isYieldExpression(node) {
+ return node.kind === 197;
+ }
+ ts.isYieldExpression = isYieldExpression;
+ function isSpreadElement(node) {
+ return node.kind === 198;
+ }
+ ts.isSpreadElement = isSpreadElement;
+ function isClassExpression(node) {
+ return node.kind === 199;
+ }
+ ts.isClassExpression = isClassExpression;
+ function isOmittedExpression(node) {
+ return node.kind === 200;
+ }
+ ts.isOmittedExpression = isOmittedExpression;
+ function isExpressionWithTypeArguments(node) {
+ return node.kind === 201;
+ }
+ ts.isExpressionWithTypeArguments = isExpressionWithTypeArguments;
+ function isAsExpression(node) {
+ return node.kind === 202;
+ }
+ ts.isAsExpression = isAsExpression;
+ function isNonNullExpression(node) {
+ return node.kind === 203;
+ }
+ ts.isNonNullExpression = isNonNullExpression;
+ function isMetaProperty(node) {
+ return node.kind === 204;
+ }
+ ts.isMetaProperty = isMetaProperty;
+ function isTemplateSpan(node) {
+ return node.kind === 205;
+ }
+ ts.isTemplateSpan = isTemplateSpan;
+ function isSemicolonClassElement(node) {
+ return node.kind === 206;
+ }
+ ts.isSemicolonClassElement = isSemicolonClassElement;
+ function isBlock(node) {
+ return node.kind === 207;
+ }
+ ts.isBlock = isBlock;
+ function isVariableStatement(node) {
+ return node.kind === 208;
+ }
+ ts.isVariableStatement = isVariableStatement;
+ function isEmptyStatement(node) {
+ return node.kind === 209;
+ }
+ ts.isEmptyStatement = isEmptyStatement;
+ function isExpressionStatement(node) {
+ return node.kind === 210;
+ }
+ ts.isExpressionStatement = isExpressionStatement;
+ function isIfStatement(node) {
+ return node.kind === 211;
+ }
+ ts.isIfStatement = isIfStatement;
+ function isDoStatement(node) {
+ return node.kind === 212;
+ }
+ ts.isDoStatement = isDoStatement;
+ function isWhileStatement(node) {
+ return node.kind === 213;
+ }
+ ts.isWhileStatement = isWhileStatement;
+ function isForStatement(node) {
+ return node.kind === 214;
+ }
+ ts.isForStatement = isForStatement;
+ function isForInStatement(node) {
+ return node.kind === 215;
+ }
+ ts.isForInStatement = isForInStatement;
+ function isForOfStatement(node) {
+ return node.kind === 216;
+ }
+ ts.isForOfStatement = isForOfStatement;
+ function isContinueStatement(node) {
+ return node.kind === 217;
+ }
+ ts.isContinueStatement = isContinueStatement;
+ function isBreakStatement(node) {
+ return node.kind === 218;
+ }
+ ts.isBreakStatement = isBreakStatement;
+ function isReturnStatement(node) {
+ return node.kind === 219;
+ }
+ ts.isReturnStatement = isReturnStatement;
+ function isWithStatement(node) {
+ return node.kind === 220;
+ }
+ ts.isWithStatement = isWithStatement;
+ function isSwitchStatement(node) {
+ return node.kind === 221;
+ }
+ ts.isSwitchStatement = isSwitchStatement;
+ function isLabeledStatement(node) {
+ return node.kind === 222;
+ }
+ ts.isLabeledStatement = isLabeledStatement;
+ function isThrowStatement(node) {
+ return node.kind === 223;
+ }
+ ts.isThrowStatement = isThrowStatement;
+ function isTryStatement(node) {
+ return node.kind === 224;
+ }
+ ts.isTryStatement = isTryStatement;
+ function isDebuggerStatement(node) {
+ return node.kind === 225;
+ }
+ ts.isDebuggerStatement = isDebuggerStatement;
+ function isVariableDeclaration(node) {
+ return node.kind === 226;
+ }
+ ts.isVariableDeclaration = isVariableDeclaration;
+ function isVariableDeclarationList(node) {
+ return node.kind === 227;
+ }
+ ts.isVariableDeclarationList = isVariableDeclarationList;
+ function isFunctionDeclaration(node) {
+ return node.kind === 228;
+ }
+ ts.isFunctionDeclaration = isFunctionDeclaration;
+ function isClassDeclaration(node) {
+ return node.kind === 229;
+ }
+ ts.isClassDeclaration = isClassDeclaration;
+ function isInterfaceDeclaration(node) {
+ return node.kind === 230;
+ }
+ ts.isInterfaceDeclaration = isInterfaceDeclaration;
+ function isTypeAliasDeclaration(node) {
+ return node.kind === 231;
+ }
+ ts.isTypeAliasDeclaration = isTypeAliasDeclaration;
+ function isEnumDeclaration(node) {
+ return node.kind === 232;
+ }
+ ts.isEnumDeclaration = isEnumDeclaration;
+ function isModuleDeclaration(node) {
+ return node.kind === 233;
+ }
+ ts.isModuleDeclaration = isModuleDeclaration;
+ function isModuleBlock(node) {
+ return node.kind === 234;
+ }
+ ts.isModuleBlock = isModuleBlock;
+ function isCaseBlock(node) {
+ return node.kind === 235;
+ }
+ ts.isCaseBlock = isCaseBlock;
+ function isNamespaceExportDeclaration(node) {
+ return node.kind === 236;
+ }
+ ts.isNamespaceExportDeclaration = isNamespaceExportDeclaration;
+ function isImportEqualsDeclaration(node) {
+ return node.kind === 237;
+ }
+ ts.isImportEqualsDeclaration = isImportEqualsDeclaration;
+ function isImportDeclaration(node) {
+ return node.kind === 238;
+ }
+ ts.isImportDeclaration = isImportDeclaration;
+ function isImportClause(node) {
+ return node.kind === 239;
+ }
+ ts.isImportClause = isImportClause;
+ function isNamespaceImport(node) {
+ return node.kind === 240;
+ }
+ ts.isNamespaceImport = isNamespaceImport;
+ function isNamedImports(node) {
+ return node.kind === 241;
+ }
+ ts.isNamedImports = isNamedImports;
+ function isImportSpecifier(node) {
+ return node.kind === 242;
+ }
+ ts.isImportSpecifier = isImportSpecifier;
+ function isExportAssignment(node) {
+ return node.kind === 243;
+ }
+ ts.isExportAssignment = isExportAssignment;
+ function isExportDeclaration(node) {
+ return node.kind === 244;
+ }
+ ts.isExportDeclaration = isExportDeclaration;
+ function isNamedExports(node) {
+ return node.kind === 245;
+ }
+ ts.isNamedExports = isNamedExports;
+ function isExportSpecifier(node) {
+ return node.kind === 246;
+ }
+ ts.isExportSpecifier = isExportSpecifier;
+ function isMissingDeclaration(node) {
+ return node.kind === 247;
+ }
+ ts.isMissingDeclaration = isMissingDeclaration;
+ function isExternalModuleReference(node) {
+ return node.kind === 248;
+ }
+ ts.isExternalModuleReference = isExternalModuleReference;
+ function isJsxElement(node) {
+ return node.kind === 249;
+ }
+ ts.isJsxElement = isJsxElement;
+ function isJsxSelfClosingElement(node) {
+ return node.kind === 250;
+ }
+ ts.isJsxSelfClosingElement = isJsxSelfClosingElement;
+ function isJsxOpeningElement(node) {
+ return node.kind === 251;
+ }
+ ts.isJsxOpeningElement = isJsxOpeningElement;
+ function isJsxClosingElement(node) {
+ return node.kind === 252;
+ }
+ ts.isJsxClosingElement = isJsxClosingElement;
+ function isJsxAttribute(node) {
+ return node.kind === 253;
+ }
+ ts.isJsxAttribute = isJsxAttribute;
+ function isJsxAttributes(node) {
+ return node.kind === 254;
+ }
+ ts.isJsxAttributes = isJsxAttributes;
+ function isJsxSpreadAttribute(node) {
+ return node.kind === 255;
+ }
+ ts.isJsxSpreadAttribute = isJsxSpreadAttribute;
+ function isJsxExpression(node) {
+ return node.kind === 256;
+ }
+ ts.isJsxExpression = isJsxExpression;
+ function isCaseClause(node) {
+ return node.kind === 257;
+ }
+ ts.isCaseClause = isCaseClause;
+ function isDefaultClause(node) {
+ return node.kind === 258;
+ }
+ ts.isDefaultClause = isDefaultClause;
+ function isHeritageClause(node) {
+ return node.kind === 259;
+ }
+ ts.isHeritageClause = isHeritageClause;
+ function isCatchClause(node) {
+ return node.kind === 260;
+ }
+ ts.isCatchClause = isCatchClause;
+ function isPropertyAssignment(node) {
+ return node.kind === 261;
+ }
+ ts.isPropertyAssignment = isPropertyAssignment;
+ function isShorthandPropertyAssignment(node) {
+ return node.kind === 262;
+ }
+ ts.isShorthandPropertyAssignment = isShorthandPropertyAssignment;
+ function isSpreadAssignment(node) {
+ return node.kind === 263;
+ }
+ ts.isSpreadAssignment = isSpreadAssignment;
+ function isEnumMember(node) {
+ return node.kind === 264;
+ }
+ ts.isEnumMember = isEnumMember;
+ function isSourceFile(node) {
+ return node.kind === 265;
+ }
+ ts.isSourceFile = isSourceFile;
+ function isBundle(node) {
+ return node.kind === 266;
+ }
+ ts.isBundle = isBundle;
+ function isJSDocTypeExpression(node) {
+ return node.kind === 267;
+ }
+ ts.isJSDocTypeExpression = isJSDocTypeExpression;
+ function isJSDocAllType(node) {
+ return node.kind === 268;
+ }
+ ts.isJSDocAllType = isJSDocAllType;
+ function isJSDocUnknownType(node) {
+ return node.kind === 269;
+ }
+ ts.isJSDocUnknownType = isJSDocUnknownType;
+ function isJSDocArrayType(node) {
+ return node.kind === 270;
+ }
+ ts.isJSDocArrayType = isJSDocArrayType;
+ function isJSDocUnionType(node) {
+ return node.kind === 271;
+ }
+ ts.isJSDocUnionType = isJSDocUnionType;
+ function isJSDocTupleType(node) {
+ return node.kind === 272;
+ }
+ ts.isJSDocTupleType = isJSDocTupleType;
+ function isJSDocNullableType(node) {
+ return node.kind === 273;
+ }
+ ts.isJSDocNullableType = isJSDocNullableType;
+ function isJSDocNonNullableType(node) {
+ return node.kind === 274;
+ }
+ ts.isJSDocNonNullableType = isJSDocNonNullableType;
+ function isJSDocRecordType(node) {
+ return node.kind === 275;
+ }
+ ts.isJSDocRecordType = isJSDocRecordType;
+ function isJSDocRecordMember(node) {
+ return node.kind === 276;
+ }
+ ts.isJSDocRecordMember = isJSDocRecordMember;
+ function isJSDocTypeReference(node) {
+ return node.kind === 277;
+ }
+ ts.isJSDocTypeReference = isJSDocTypeReference;
+ function isJSDocOptionalType(node) {
+ return node.kind === 278;
+ }
+ ts.isJSDocOptionalType = isJSDocOptionalType;
+ function isJSDocFunctionType(node) {
+ return node.kind === 279;
+ }
+ ts.isJSDocFunctionType = isJSDocFunctionType;
+ function isJSDocVariadicType(node) {
+ return node.kind === 280;
+ }
+ ts.isJSDocVariadicType = isJSDocVariadicType;
+ function isJSDocConstructorType(node) {
+ return node.kind === 281;
+ }
+ ts.isJSDocConstructorType = isJSDocConstructorType;
+ function isJSDocThisType(node) {
+ return node.kind === 282;
+ }
+ ts.isJSDocThisType = isJSDocThisType;
+ function isJSDoc(node) {
+ return node.kind === 283;
+ }
+ ts.isJSDoc = isJSDoc;
+ function isJSDocAugmentsTag(node) {
+ return node.kind === 285;
+ }
+ ts.isJSDocAugmentsTag = isJSDocAugmentsTag;
+ function isJSDocParameterTag(node) {
+ return node.kind === 287;
+ }
+ ts.isJSDocParameterTag = isJSDocParameterTag;
+ function isJSDocReturnTag(node) {
+ return node.kind === 288;
+ }
+ ts.isJSDocReturnTag = isJSDocReturnTag;
+ function isJSDocTypeTag(node) {
+ return node.kind === 289;
+ }
+ ts.isJSDocTypeTag = isJSDocTypeTag;
+ function isJSDocTemplateTag(node) {
+ return node.kind === 290;
+ }
+ ts.isJSDocTemplateTag = isJSDocTemplateTag;
+ function isJSDocTypedefTag(node) {
+ return node.kind === 291;
+ }
+ ts.isJSDocTypedefTag = isJSDocTypedefTag;
+ function isJSDocPropertyTag(node) {
+ return node.kind === 292;
+ }
+ ts.isJSDocPropertyTag = isJSDocPropertyTag;
+ function isJSDocTypeLiteral(node) {
+ return node.kind === 293;
+ }
+ ts.isJSDocTypeLiteral = isJSDocTypeLiteral;
+ function isJSDocLiteralType(node) {
+ return node.kind === 294;
+ }
+ ts.isJSDocLiteralType = isJSDocLiteralType;
+})(ts || (ts = {}));
+(function (ts) {
+ function isNode(node) {
+ return isNodeKind(node.kind);
+ }
+ ts.isNode = isNode;
+ function isNodeKind(kind) {
+ return kind >= 143;
+ }
+ ts.isNodeKind = isNodeKind;
+ function isToken(n) {
+ return n.kind >= 0 && n.kind <= 142;
+ }
+ ts.isToken = isToken;
+ function isNodeArray(array) {
+ return array.hasOwnProperty("pos")
+ && array.hasOwnProperty("end");
+ }
+ ts.isNodeArray = isNodeArray;
function isLiteralKind(kind) {
return 8 <= kind && kind <= 13;
}
ts.isLiteralKind = isLiteralKind;
- function isTextualLiteralKind(kind) {
- return kind === 9 || kind === 13;
- }
- ts.isTextualLiteralKind = isTextualLiteralKind;
function isLiteralExpression(node) {
return isLiteralKind(node.kind);
}
@@ -8038,40 +9224,38 @@ var ts;
return 13 <= kind && kind <= 16;
}
ts.isTemplateLiteralKind = isTemplateLiteralKind;
- function isTemplateHead(node) {
- return node.kind === 14;
- }
- ts.isTemplateHead = isTemplateHead;
function isTemplateMiddleOrTemplateTail(node) {
var kind = node.kind;
return kind === 15
|| kind === 16;
}
ts.isTemplateMiddleOrTemplateTail = isTemplateMiddleOrTemplateTail;
- function isIdentifier(node) {
- return node.kind === 71;
- }
- ts.isIdentifier = isIdentifier;
- function isVoidExpression(node) {
- return node.kind === 190;
- }
- ts.isVoidExpression = isVoidExpression;
function isGeneratedIdentifier(node) {
- return isIdentifier(node) && node.autoGenerateKind > 0;
+ return ts.isIdentifier(node) && node.autoGenerateKind > 0;
}
ts.isGeneratedIdentifier = isGeneratedIdentifier;
+ function isModifierKind(token) {
+ switch (token) {
+ case 117:
+ case 120:
+ case 76:
+ case 124:
+ case 79:
+ case 84:
+ case 114:
+ case 112:
+ case 113:
+ case 131:
+ case 115:
+ return true;
+ }
+ return false;
+ }
+ ts.isModifierKind = isModifierKind;
function isModifier(node) {
return isModifierKind(node.kind);
}
ts.isModifier = isModifier;
- function isQualifiedName(node) {
- return node.kind === 143;
- }
- ts.isQualifiedName = isQualifiedName;
- function isComputedPropertyName(node) {
- return node.kind === 144;
- }
- ts.isComputedPropertyName = isComputedPropertyName;
function isEntityName(node) {
var kind = node.kind;
return kind === 143
@@ -8086,12 +9270,6 @@ var ts;
|| kind === 144;
}
ts.isPropertyName = isPropertyName;
- function isModuleName(node) {
- var kind = node.kind;
- return kind === 71
- || kind === 9;
- }
- ts.isModuleName = isModuleName;
function isBindingName(node) {
var kind = node.kind;
return kind === 71
@@ -8099,22 +9277,30 @@ var ts;
|| kind === 175;
}
ts.isBindingName = isBindingName;
- function isTypeParameter(node) {
- return node.kind === 145;
- }
- ts.isTypeParameter = isTypeParameter;
- function isParameter(node) {
- return node.kind === 146;
- }
- ts.isParameter = isParameter;
- function isDecorator(node) {
- return node.kind === 147;
+ function isFunctionLike(node) {
+ return node && isFunctionLikeKind(node.kind);
}
- ts.isDecorator = isDecorator;
- function isMethodDeclaration(node) {
- return node.kind === 151;
+ ts.isFunctionLike = isFunctionLike;
+ function isFunctionLikeKind(kind) {
+ switch (kind) {
+ case 152:
+ case 186:
+ case 228:
+ case 187:
+ case 151:
+ case 150:
+ case 153:
+ case 154:
+ case 155:
+ case 156:
+ case 157:
+ case 160:
+ case 161:
+ return true;
+ }
+ return false;
}
- ts.isMethodDeclaration = isMethodDeclaration;
+ ts.isFunctionLikeKind = isFunctionLikeKind;
function isClassElement(node) {
var kind = node.kind;
return kind === 152
@@ -8123,9 +9309,28 @@ var ts;
|| kind === 153
|| kind === 154
|| kind === 157
- || kind === 206;
+ || kind === 206
+ || kind === 247;
}
ts.isClassElement = isClassElement;
+ function isClassLike(node) {
+ return node && (node.kind === 229 || node.kind === 199);
+ }
+ ts.isClassLike = isClassLike;
+ function isAccessor(node) {
+ return node && (node.kind === 153 || node.kind === 154);
+ }
+ ts.isAccessor = isAccessor;
+ function isTypeElement(node) {
+ var kind = node.kind;
+ return kind === 156
+ || kind === 155
+ || kind === 148
+ || kind === 150
+ || kind === 157
+ || kind === 247;
+ }
+ ts.isTypeElement = isTypeElement;
function isObjectLiteralElementLike(node) {
var kind = node.kind;
return kind === 261
@@ -8156,14 +9361,15 @@ var ts;
return isTypeNodeKind(node.kind);
}
ts.isTypeNode = isTypeNode;
- function isArrayBindingPattern(node) {
- return node.kind === 175;
- }
- ts.isArrayBindingPattern = isArrayBindingPattern;
- function isObjectBindingPattern(node) {
- return node.kind === 174;
+ function isFunctionOrConstructorTypeNode(node) {
+ switch (node.kind) {
+ case 160:
+ case 161:
+ return true;
+ }
+ return false;
}
- ts.isObjectBindingPattern = isObjectBindingPattern;
+ ts.isFunctionOrConstructorTypeNode = isFunctionOrConstructorTypeNode;
function isBindingPattern(node) {
if (node) {
var kind = node.kind;
@@ -8179,10 +9385,6 @@ var ts;
|| kind === 178;
}
ts.isAssignmentPattern = isAssignmentPattern;
- function isBindingElement(node) {
- return node.kind === 176;
- }
- ts.isBindingElement = isBindingElement;
function isArrayBindingElement(node) {
var kind = node.kind;
return kind === 176
@@ -8222,54 +9424,36 @@ var ts;
return false;
}
ts.isArrayBindingOrAssignmentPattern = isArrayBindingOrAssignmentPattern;
- function isArrayLiteralExpression(node) {
- return node.kind === 177;
- }
- ts.isArrayLiteralExpression = isArrayLiteralExpression;
- function isObjectLiteralExpression(node) {
- return node.kind === 178;
- }
- ts.isObjectLiteralExpression = isObjectLiteralExpression;
- function isPropertyAccessExpression(node) {
- return node.kind === 179;
- }
- ts.isPropertyAccessExpression = isPropertyAccessExpression;
function isPropertyAccessOrQualifiedName(node) {
var kind = node.kind;
return kind === 179
|| kind === 143;
}
ts.isPropertyAccessOrQualifiedName = isPropertyAccessOrQualifiedName;
- function isElementAccessExpression(node) {
- return node.kind === 180;
- }
- ts.isElementAccessExpression = isElementAccessExpression;
- function isBinaryExpression(node) {
- return node.kind === 194;
- }
- ts.isBinaryExpression = isBinaryExpression;
- function isConditionalExpression(node) {
- return node.kind === 195;
+ function isCallLikeExpression(node) {
+ switch (node.kind) {
+ case 251:
+ case 250:
+ case 181:
+ case 182:
+ case 183:
+ case 147:
+ return true;
+ default:
+ return false;
+ }
}
- ts.isConditionalExpression = isConditionalExpression;
- function isCallExpression(node) {
- return node.kind === 181;
+ ts.isCallLikeExpression = isCallLikeExpression;
+ function isCallOrNewExpression(node) {
+ return node.kind === 181 || node.kind === 182;
}
- ts.isCallExpression = isCallExpression;
+ ts.isCallOrNewExpression = isCallOrNewExpression;
function isTemplateLiteral(node) {
var kind = node.kind;
return kind === 196
|| kind === 13;
}
ts.isTemplateLiteral = isTemplateLiteral;
- function isSpreadExpression(node) {
- return node.kind === 198;
- }
- ts.isSpreadExpression = isSpreadExpression;
- function isExpressionWithTypeArguments(node) {
- return node.kind === 201;
- }
- ts.isExpressionWithTypeArguments = isExpressionWithTypeArguments;
function isLeftHandSideExpressionKind(kind) {
return kind === 179
|| kind === 180
@@ -8323,6 +9507,7 @@ var ts;
|| kind === 198
|| kind === 202
|| kind === 200
+ || kind === 298
|| isUnaryExpressionKind(kind);
}
function isExpression(node) {
@@ -8336,11 +9521,11 @@ var ts;
}
ts.isAssertionExpression = isAssertionExpression;
function isPartiallyEmittedExpression(node) {
- return node.kind === 296;
+ return node.kind === 297;
}
ts.isPartiallyEmittedExpression = isPartiallyEmittedExpression;
function isNotEmittedStatement(node) {
- return node.kind === 295;
+ return node.kind === 296;
}
ts.isNotEmittedStatement = isNotEmittedStatement;
function isNotEmittedOrPartiallyEmittedNode(node) {
@@ -8348,44 +9533,38 @@ var ts;
|| isPartiallyEmittedExpression(node);
}
ts.isNotEmittedOrPartiallyEmittedNode = isNotEmittedOrPartiallyEmittedNode;
- function isOmittedExpression(node) {
- return node.kind === 200;
- }
- ts.isOmittedExpression = isOmittedExpression;
- function isTemplateSpan(node) {
- return node.kind === 205;
+ function isIterationStatement(node, lookInLabeledStatements) {
+ switch (node.kind) {
+ case 214:
+ case 215:
+ case 216:
+ case 212:
+ case 213:
+ return true;
+ case 222:
+ return lookInLabeledStatements && isIterationStatement(node.statement, lookInLabeledStatements);
+ }
+ return false;
}
- ts.isTemplateSpan = isTemplateSpan;
- function isBlock(node) {
- return node.kind === 207;
+ ts.isIterationStatement = isIterationStatement;
+ function isForInOrOfStatement(node) {
+ return node.kind === 215 || node.kind === 216;
}
- ts.isBlock = isBlock;
+ ts.isForInOrOfStatement = isForInOrOfStatement;
function isConciseBody(node) {
- return isBlock(node)
+ return ts.isBlock(node)
|| isExpression(node);
}
ts.isConciseBody = isConciseBody;
function isFunctionBody(node) {
- return isBlock(node);
+ return ts.isBlock(node);
}
ts.isFunctionBody = isFunctionBody;
function isForInitializer(node) {
- return isVariableDeclarationList(node)
+ return ts.isVariableDeclarationList(node)
|| isExpression(node);
}
ts.isForInitializer = isForInitializer;
- function isVariableDeclaration(node) {
- return node.kind === 226;
- }
- ts.isVariableDeclaration = isVariableDeclaration;
- function isVariableDeclarationList(node) {
- return node.kind === 227;
- }
- ts.isVariableDeclarationList = isVariableDeclarationList;
- function isCaseBlock(node) {
- return node.kind === 235;
- }
- ts.isCaseBlock = isCaseBlock;
function isModuleBody(node) {
var kind = node.kind;
return kind === 234
@@ -8405,32 +9584,12 @@ var ts;
|| kind === 233;
}
ts.isJSDocNamespaceBody = isJSDocNamespaceBody;
- function isImportEqualsDeclaration(node) {
- return node.kind === 237;
- }
- ts.isImportEqualsDeclaration = isImportEqualsDeclaration;
- function isImportClause(node) {
- return node.kind === 239;
- }
- ts.isImportClause = isImportClause;
function isNamedImportBindings(node) {
var kind = node.kind;
return kind === 241
|| kind === 240;
}
ts.isNamedImportBindings = isNamedImportBindings;
- function isImportSpecifier(node) {
- return node.kind === 242;
- }
- ts.isImportSpecifier = isImportSpecifier;
- function isNamedExports(node) {
- return node.kind === 245;
- }
- ts.isNamedExports = isNamedExports;
- function isExportSpecifier(node) {
- return node.kind === 246;
- }
- ts.isExportSpecifier = isExportSpecifier;
function isModuleOrEnumDeclaration(node) {
return node.kind === 233 || node.kind === 232;
}
@@ -8466,7 +9625,7 @@ var ts;
|| kind === 231
|| kind === 145
|| kind === 226
- || kind === 290;
+ || kind === 291;
}
function isDeclarationStatementKind(kind) {
return kind === 228
@@ -8501,11 +9660,14 @@ var ts;
|| kind === 208
|| kind === 213
|| kind === 220
- || kind === 295
- || kind === 298
- || kind === 297;
+ || kind === 296
+ || kind === 300
+ || kind === 299;
}
function isDeclaration(node) {
+ if (node.kind === 145) {
+ return node.parent.kind !== 290 || ts.isInJavaScriptFile(node);
+ }
return isDeclarationKind(node.kind);
}
ts.isDeclaration = isDeclaration;
@@ -8531,14 +9693,6 @@ var ts;
|| kind === 71;
}
ts.isModuleReference = isModuleReference;
- function isJsxOpeningElement(node) {
- return node.kind === 251;
- }
- ts.isJsxOpeningElement = isJsxOpeningElement;
- function isJsxClosingElement(node) {
- return node.kind === 252;
- }
- ts.isJsxClosingElement = isJsxClosingElement;
function isJsxTagNameExpression(node) {
var kind = node.kind;
return kind === 99
@@ -8554,25 +9708,12 @@ var ts;
|| kind === 10;
}
ts.isJsxChild = isJsxChild;
- function isJsxAttributes(node) {
- var kind = node.kind;
- return kind === 254;
- }
- ts.isJsxAttributes = isJsxAttributes;
function isJsxAttributeLike(node) {
var kind = node.kind;
return kind === 253
|| kind === 255;
}
ts.isJsxAttributeLike = isJsxAttributeLike;
- function isJsxSpreadAttribute(node) {
- return node.kind === 255;
- }
- ts.isJsxSpreadAttribute = isJsxSpreadAttribute;
- function isJsxAttribute(node) {
- return node.kind === 253;
- }
- ts.isJsxAttribute = isJsxAttribute;
function isStringLiteralOrJsxExpression(node) {
var kind = node.kind;
return kind === 9
@@ -8591,293 +9732,18 @@ var ts;
|| kind === 258;
}
ts.isCaseOrDefaultClause = isCaseOrDefaultClause;
- function isHeritageClause(node) {
- return node.kind === 259;
- }
- ts.isHeritageClause = isHeritageClause;
- function isCatchClause(node) {
- return node.kind === 260;
- }
- ts.isCatchClause = isCatchClause;
- function isPropertyAssignment(node) {
- return node.kind === 261;
- }
- ts.isPropertyAssignment = isPropertyAssignment;
- function isShorthandPropertyAssignment(node) {
- return node.kind === 262;
- }
- ts.isShorthandPropertyAssignment = isShorthandPropertyAssignment;
- function isEnumMember(node) {
- return node.kind === 264;
- }
- ts.isEnumMember = isEnumMember;
- function isSourceFile(node) {
- return node.kind === 265;
- }
- ts.isSourceFile = isSourceFile;
- function isWatchSet(options) {
- return options.watch && options.hasOwnProperty("watch");
- }
- ts.isWatchSet = isWatchSet;
-})(ts || (ts = {}));
-(function (ts) {
- function getDefaultLibFileName(options) {
- switch (options.target) {
- case 5:
- return "lib.esnext.full.d.ts";
- case 4:
- return "lib.es2017.full.d.ts";
- case 3:
- return "lib.es2016.full.d.ts";
- case 2:
- return "lib.es6.d.ts";
- default:
- return "lib.d.ts";
- }
- }
- ts.getDefaultLibFileName = getDefaultLibFileName;
- function textSpanEnd(span) {
- return span.start + span.length;
- }
- ts.textSpanEnd = textSpanEnd;
- function textSpanIsEmpty(span) {
- return span.length === 0;
- }
- ts.textSpanIsEmpty = textSpanIsEmpty;
- function textSpanContainsPosition(span, position) {
- return position >= span.start && position < textSpanEnd(span);
- }
- ts.textSpanContainsPosition = textSpanContainsPosition;
- function textSpanContainsTextSpan(span, other) {
- return other.start >= span.start && textSpanEnd(other) <= textSpanEnd(span);
- }
- ts.textSpanContainsTextSpan = textSpanContainsTextSpan;
- function textSpanOverlapsWith(span, other) {
- var overlapStart = Math.max(span.start, other.start);
- var overlapEnd = Math.min(textSpanEnd(span), textSpanEnd(other));
- return overlapStart < overlapEnd;
- }
- ts.textSpanOverlapsWith = textSpanOverlapsWith;
- function textSpanOverlap(span1, span2) {
- var overlapStart = Math.max(span1.start, span2.start);
- var overlapEnd = Math.min(textSpanEnd(span1), textSpanEnd(span2));
- if (overlapStart < overlapEnd) {
- return createTextSpanFromBounds(overlapStart, overlapEnd);
- }
- return undefined;
- }
- ts.textSpanOverlap = textSpanOverlap;
- function textSpanIntersectsWithTextSpan(span, other) {
- return other.start <= textSpanEnd(span) && textSpanEnd(other) >= span.start;
- }
- ts.textSpanIntersectsWithTextSpan = textSpanIntersectsWithTextSpan;
- function textSpanIntersectsWith(span, start, length) {
- var end = start + length;
- return start <= textSpanEnd(span) && end >= span.start;
- }
- ts.textSpanIntersectsWith = textSpanIntersectsWith;
- function decodedTextSpanIntersectsWith(start1, length1, start2, length2) {
- var end1 = start1 + length1;
- var end2 = start2 + length2;
- return start2 <= end1 && end2 >= start1;
- }
- ts.decodedTextSpanIntersectsWith = decodedTextSpanIntersectsWith;
- function textSpanIntersectsWithPosition(span, position) {
- return position <= textSpanEnd(span) && position >= span.start;
- }
- ts.textSpanIntersectsWithPosition = textSpanIntersectsWithPosition;
- function textSpanIntersection(span1, span2) {
- var intersectStart = Math.max(span1.start, span2.start);
- var intersectEnd = Math.min(textSpanEnd(span1), textSpanEnd(span2));
- if (intersectStart <= intersectEnd) {
- return createTextSpanFromBounds(intersectStart, intersectEnd);
- }
- return undefined;
- }
- ts.textSpanIntersection = textSpanIntersection;
- function createTextSpan(start, length) {
- if (start < 0) {
- throw new Error("start < 0");
- }
- if (length < 0) {
- throw new Error("length < 0");
- }
- return { start: start, length: length };
- }
- ts.createTextSpan = createTextSpan;
- function createTextSpanFromBounds(start, end) {
- return createTextSpan(start, end - start);
- }
- ts.createTextSpanFromBounds = createTextSpanFromBounds;
- function textChangeRangeNewSpan(range) {
- return createTextSpan(range.span.start, range.newLength);
- }
- ts.textChangeRangeNewSpan = textChangeRangeNewSpan;
- function textChangeRangeIsUnchanged(range) {
- return textSpanIsEmpty(range.span) && range.newLength === 0;
- }
- ts.textChangeRangeIsUnchanged = textChangeRangeIsUnchanged;
- function createTextChangeRange(span, newLength) {
- if (newLength < 0) {
- throw new Error("newLength < 0");
- }
- return { span: span, newLength: newLength };
- }
- ts.createTextChangeRange = createTextChangeRange;
- ts.unchangedTextChangeRange = createTextChangeRange(createTextSpan(0, 0), 0);
- function collapseTextChangeRangesAcrossMultipleVersions(changes) {
- if (changes.length === 0) {
- return ts.unchangedTextChangeRange;
- }
- if (changes.length === 1) {
- return changes[0];
- }
- var change0 = changes[0];
- var oldStartN = change0.span.start;
- var oldEndN = textSpanEnd(change0.span);
- var newEndN = oldStartN + change0.newLength;
- for (var i = 1; i < changes.length; i++) {
- var nextChange = changes[i];
- var oldStart1 = oldStartN;
- var oldEnd1 = oldEndN;
- var newEnd1 = newEndN;
- var oldStart2 = nextChange.span.start;
- var oldEnd2 = textSpanEnd(nextChange.span);
- var newEnd2 = oldStart2 + nextChange.newLength;
- oldStartN = Math.min(oldStart1, oldStart2);
- oldEndN = Math.max(oldEnd1, oldEnd1 + (oldEnd2 - newEnd1));
- newEndN = Math.max(newEnd2, newEnd2 + (newEnd1 - oldEnd2));
- }
- return createTextChangeRange(createTextSpanFromBounds(oldStartN, oldEndN), newEndN - oldStartN);
- }
- ts.collapseTextChangeRangesAcrossMultipleVersions = collapseTextChangeRangesAcrossMultipleVersions;
- function getTypeParameterOwner(d) {
- if (d && d.kind === 145) {
- for (var current = d; current; current = current.parent) {
- if (ts.isFunctionLike(current) || ts.isClassLike(current) || current.kind === 230) {
- return current;
- }
- }
- }
- }
- ts.getTypeParameterOwner = getTypeParameterOwner;
- function isParameterPropertyDeclaration(node) {
- return ts.hasModifier(node, 92) && node.parent.kind === 152 && ts.isClassLike(node.parent.parent);
- }
- ts.isParameterPropertyDeclaration = isParameterPropertyDeclaration;
- function walkUpBindingElementsAndPatterns(node) {
- while (node && (node.kind === 176 || ts.isBindingPattern(node))) {
- node = node.parent;
- }
- return node;
- }
- function getCombinedModifierFlags(node) {
- node = walkUpBindingElementsAndPatterns(node);
- var flags = ts.getModifierFlags(node);
- if (node.kind === 226) {
- node = node.parent;
- }
- if (node && node.kind === 227) {
- flags |= ts.getModifierFlags(node);
- node = node.parent;
- }
- if (node && node.kind === 208) {
- flags |= ts.getModifierFlags(node);
- }
- return flags;
- }
- ts.getCombinedModifierFlags = getCombinedModifierFlags;
- function getCombinedNodeFlags(node) {
- node = walkUpBindingElementsAndPatterns(node);
- var flags = node.flags;
- if (node.kind === 226) {
- node = node.parent;
- }
- if (node && node.kind === 227) {
- flags |= node.flags;
- node = node.parent;
- }
- if (node && node.kind === 208) {
- flags |= node.flags;
- }
- return flags;
- }
- ts.getCombinedNodeFlags = getCombinedNodeFlags;
- function validateLocaleAndSetLanguage(locale, sys, errors) {
- var matchResult = /^([a-z]+)([_\-]([a-z]+))?$/.exec(locale.toLowerCase());
- if (!matchResult) {
- if (errors) {
- errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1, "en", "ja-jp"));
- }
- return;
- }
- var language = matchResult[1];
- var territory = matchResult[3];
- if (!trySetLanguageAndTerritory(language, territory, errors)) {
- trySetLanguageAndTerritory(language, undefined, errors);
- }
- function trySetLanguageAndTerritory(language, territory, errors) {
- var compilerFilePath = ts.normalizePath(sys.getExecutingFilePath());
- var containingDirectoryPath = ts.getDirectoryPath(compilerFilePath);
- var filePath = ts.combinePaths(containingDirectoryPath, language);
- if (territory) {
- filePath = filePath + "-" + territory;
- }
- filePath = sys.resolvePath(ts.combinePaths(filePath, "diagnosticMessages.generated.json"));
- if (!sys.fileExists(filePath)) {
- return false;
- }
- var fileContents = "";
- try {
- fileContents = sys.readFile(filePath);
- }
- catch (e) {
- if (errors) {
- errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Unable_to_open_file_0, filePath));
- }
- return false;
- }
- try {
- ts.localizedDiagnosticMessages = JSON.parse(fileContents);
- }
- catch (e) {
- if (errors) {
- errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Corrupted_locale_file_0, filePath));
- }
- return false;
- }
- return true;
- }
- }
- 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;
+ function isJSDocNode(node) {
+ return node.kind >= 267 && node.kind <= 294;
}
- 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.isJSDocNode = isJSDocNode;
+ function isJSDocCommentContainingNode(node) {
+ return node.kind === 283 || isJSDocTag(node);
}
- 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.isJSDocCommentContainingNode = isJSDocCommentContainingNode;
+ function isJSDocTag(node) {
+ return node.kind >= 284 && node.kind <= 294;
}
- ts.unescapeIdentifier = unescapeIdentifier;
+ ts.isJSDocTag = isJSDocTag;
})(ts || (ts = {}));
var ts;
(function (ts) {
@@ -9166,6 +10032,7 @@ var ts;
case 32:
case 47:
case 60:
+ case 124:
case 61:
case 62:
return true;
@@ -9227,6 +10094,7 @@ var ts;
}
break;
case 60:
+ case 124:
case 61:
case 62:
if (isConflictMarkerTrivia(text, pos)) {
@@ -9280,10 +10148,10 @@ var ts;
}
}
else {
- ts.Debug.assert(ch === 61);
+ ts.Debug.assert(ch === 124 || ch === 61);
while (pos < len) {
- var ch_1 = text.charCodeAt(pos);
- if (ch_1 === 62 && isConflictMarkerTrivia(text, pos)) {
+ var currentChar = text.charCodeAt(pos);
+ if ((currentChar === 61 || currentChar === 62) && currentChar !== ch && isConflictMarkerTrivia(text, pos)) {
break;
}
pos++;
@@ -9422,9 +10290,10 @@ var ts;
}
ts.getTrailingCommentRanges = getTrailingCommentRanges;
function getShebang(text) {
- return shebangTriviaRegex.test(text)
- ? shebangTriviaRegex.exec(text)[0]
- : undefined;
+ var match = shebangTriviaRegex.exec(text);
+ if (match) {
+ return match[0];
+ }
}
ts.getShebang = getShebang;
function isIdentifierStart(ch, languageVersion) {
@@ -9962,13 +10831,13 @@ var ts;
pos += 2;
var commentClosed = false;
while (pos < end) {
- var ch_2 = text.charCodeAt(pos);
- if (ch_2 === 42 && text.charCodeAt(pos + 1) === 47) {
+ var ch_1 = text.charCodeAt(pos);
+ if (ch_1 === 42 && text.charCodeAt(pos + 1) === 47) {
pos += 2;
commentClosed = true;
break;
}
- if (isLineBreak(ch_2)) {
+ if (isLineBreak(ch_1)) {
precedingLineBreak = true;
}
pos++;
@@ -10123,6 +10992,15 @@ var ts;
pos++;
return token = 17;
case 124:
+ if (isConflictMarkerTrivia(text, pos)) {
+ pos = scanConflictMarkerTrivia(text, pos, error);
+ if (skipTrivia) {
+ continue;
+ }
+ else {
+ return token = 7;
+ }
+ }
if (text.charCodeAt(pos + 1) === 124) {
return pos += 2, token = 54;
}
@@ -10534,15 +11412,24 @@ var ts;
node.textSourceNode = sourceNode;
return node;
}
- function createIdentifier(text) {
+ function createIdentifier(text, typeArguments) {
var node = createSynthesizedNode(71);
node.text = ts.escapeIdentifier(text);
node.originalKeywordKind = text ? ts.stringToToken(text) : 0;
node.autoGenerateKind = 0;
node.autoGenerateId = 0;
+ if (typeArguments) {
+ node.typeArguments = createNodeArray(typeArguments);
+ }
return node;
}
ts.createIdentifier = createIdentifier;
+ function updateIdentifier(node, typeArguments) {
+ return node.typeArguments !== typeArguments
+ ? updateNode(createIdentifier(node.text, typeArguments), node)
+ : node;
+ }
+ ts.updateIdentifier = updateIdentifier;
var nextAutoGenerateId = 0;
function createTempVariable(recordTempVariable) {
var name = createIdentifier("");
@@ -10630,225 +11517,12 @@ var ts;
: node;
}
ts.updateComputedPropertyName = updateComputedPropertyName;
- 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(160, 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(161, 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(155, 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(156, 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(150, 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(169);
- }
- ts.createThisTypeNode = createThisTypeNode;
- function createLiteralTypeNode(literal) {
- var literalTypeNode = createSynthesizedNode(173);
- 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(159);
- 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(158);
- 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(162);
- 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(164);
- 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(163);
- 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(165);
- 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(172);
- 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(170);
- typeOperatorNode.operator = 127;
- 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(171);
- 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(145);
- typeParameter.name = asName(name);
- typeParameter.constraint = constraint;
- typeParameter.default = defaultType;
- return typeParameter;
+ var node = createSynthesizedNode(145);
+ node.name = asName(name);
+ node.constraint = constraint;
+ node.default = defaultType;
+ return node;
}
ts.createTypeParameterDeclaration = createTypeParameterDeclaration;
function updateTypeParameterDeclaration(node, name, constraint, defaultType) {
@@ -10859,42 +11533,6 @@ var ts;
: node;
}
ts.updateTypeParameterDeclaration = updateTypeParameterDeclaration;
- function createPropertySignature(name, questionToken, type, initializer) {
- var propertySignature = createSynthesizedNode(148);
- 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(157);
- 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(146);
node.decorators = asNodeArray(decorators);
@@ -10931,6 +11569,26 @@ var ts;
: node;
}
ts.updateDecorator = updateDecorator;
+ function createPropertySignature(modifiers, name, questionToken, type, initializer) {
+ var node = createSynthesizedNode(148);
+ node.modifiers = asNodeArray(modifiers);
+ node.name = asName(name);
+ node.questionToken = questionToken;
+ node.type = type;
+ node.initializer = initializer;
+ return node;
+ }
+ ts.createPropertySignature = createPropertySignature;
+ function updatePropertySignature(node, modifiers, name, questionToken, type, initializer) {
+ return node.modifiers !== modifiers
+ || node.name !== name
+ || node.questionToken !== questionToken
+ || node.type !== type
+ || node.initializer !== initializer
+ ? updateNode(createPropertySignature(modifiers, name, questionToken, type, initializer), node)
+ : node;
+ }
+ ts.updatePropertySignature = updatePropertySignature;
function createProperty(decorators, modifiers, name, questionToken, type, initializer) {
var node = createSynthesizedNode(149);
node.decorators = asNodeArray(decorators);
@@ -10952,7 +11610,24 @@ var ts;
: node;
}
ts.updateProperty = updateProperty;
- function createMethodDeclaration(decorators, modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body) {
+ function createMethodSignature(typeParameters, parameters, type, name, questionToken) {
+ var node = createSignatureDeclaration(150, typeParameters, parameters, type);
+ node.name = asName(name);
+ node.questionToken = questionToken;
+ return node;
+ }
+ 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 createMethod(decorators, modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body) {
var node = createSynthesizedNode(151);
node.decorators = asNodeArray(decorators);
node.modifiers = asNodeArray(modifiers);
@@ -10965,7 +11640,7 @@ var ts;
node.body = body;
return node;
}
- ts.createMethodDeclaration = createMethodDeclaration;
+ ts.createMethod = createMethod;
function updateMethod(node, decorators, modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body) {
return node.decorators !== decorators
|| node.modifiers !== modifiers
@@ -10975,7 +11650,7 @@ var ts;
|| node.parameters !== parameters
|| node.type !== type
|| node.body !== body
- ? updateNode(createMethodDeclaration(decorators, modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body), node)
+ ? updateNode(createMethod(decorators, modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body), node)
: node;
}
ts.updateMethod = updateMethod;
@@ -11043,6 +11718,249 @@ var ts;
: node;
}
ts.updateSetAccessor = updateSetAccessor;
+ function createCallSignature(typeParameters, parameters, type) {
+ return createSignatureDeclaration(155, typeParameters, parameters, type);
+ }
+ ts.createCallSignature = createCallSignature;
+ function updateCallSignature(node, typeParameters, parameters, type) {
+ return updateSignatureDeclaration(node, typeParameters, parameters, type);
+ }
+ ts.updateCallSignature = updateCallSignature;
+ function createConstructSignature(typeParameters, parameters, type) {
+ return createSignatureDeclaration(156, typeParameters, parameters, type);
+ }
+ ts.createConstructSignature = createConstructSignature;
+ function updateConstructSignature(node, typeParameters, parameters, type) {
+ return updateSignatureDeclaration(node, typeParameters, parameters, type);
+ }
+ ts.updateConstructSignature = updateConstructSignature;
+ function createIndexSignature(decorators, modifiers, parameters, type) {
+ var node = createSynthesizedNode(157);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
+ node.parameters = createNodeArray(parameters);
+ node.type = type;
+ return node;
+ }
+ ts.createIndexSignature = createIndexSignature;
+ function updateIndexSignature(node, decorators, modifiers, parameters, type) {
+ return node.parameters !== parameters
+ || node.type !== type
+ || node.decorators !== decorators
+ || node.modifiers !== modifiers
+ ? updateNode(createIndexSignature(decorators, modifiers, parameters, type), node)
+ : node;
+ }
+ ts.updateIndexSignature = updateIndexSignature;
+ function createSignatureDeclaration(kind, typeParameters, parameters, type) {
+ var node = createSynthesizedNode(kind);
+ node.typeParameters = asNodeArray(typeParameters);
+ node.parameters = asNodeArray(parameters);
+ node.type = type;
+ return node;
+ }
+ 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 createKeywordTypeNode(kind) {
+ return createSynthesizedNode(kind);
+ }
+ ts.createKeywordTypeNode = createKeywordTypeNode;
+ function createTypePredicateNode(parameterName, type) {
+ var node = createSynthesizedNode(158);
+ node.parameterName = asName(parameterName);
+ node.type = type;
+ return node;
+ }
+ 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 createTypeReferenceNode(typeName, typeArguments) {
+ var node = createSynthesizedNode(159);
+ node.typeName = asName(typeName);
+ node.typeArguments = typeArguments && ts.parenthesizeTypeParameters(typeArguments);
+ return node;
+ }
+ 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 createFunctionTypeNode(typeParameters, parameters, type) {
+ return createSignatureDeclaration(160, 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(161, typeParameters, parameters, type);
+ }
+ ts.createConstructorTypeNode = createConstructorTypeNode;
+ function updateConstructorTypeNode(node, typeParameters, parameters, type) {
+ return updateSignatureDeclaration(node, typeParameters, parameters, type);
+ }
+ ts.updateConstructorTypeNode = updateConstructorTypeNode;
+ function createTypeQueryNode(exprName) {
+ var node = createSynthesizedNode(162);
+ node.exprName = exprName;
+ return node;
+ }
+ ts.createTypeQueryNode = createTypeQueryNode;
+ function updateTypeQueryNode(node, exprName) {
+ return node.exprName !== exprName
+ ? updateNode(createTypeQueryNode(exprName), node)
+ : node;
+ }
+ ts.updateTypeQueryNode = updateTypeQueryNode;
+ function createTypeLiteralNode(members) {
+ var node = createSynthesizedNode(163);
+ node.members = createNodeArray(members);
+ return node;
+ }
+ ts.createTypeLiteralNode = createTypeLiteralNode;
+ function updateTypeLiteralNode(node, members) {
+ return node.members !== members
+ ? updateNode(createTypeLiteralNode(members), node)
+ : node;
+ }
+ ts.updateTypeLiteralNode = updateTypeLiteralNode;
+ function createArrayTypeNode(elementType) {
+ var node = createSynthesizedNode(164);
+ node.elementType = ts.parenthesizeElementTypeMember(elementType);
+ return node;
+ }
+ ts.createArrayTypeNode = createArrayTypeNode;
+ function updateArrayTypeNode(node, elementType) {
+ return node.elementType !== elementType
+ ? updateNode(createArrayTypeNode(elementType), node)
+ : node;
+ }
+ ts.updateArrayTypeNode = updateArrayTypeNode;
+ function createTupleTypeNode(elementTypes) {
+ var node = createSynthesizedNode(165);
+ node.elementTypes = createNodeArray(elementTypes);
+ return node;
+ }
+ ts.createTupleTypeNode = createTupleTypeNode;
+ function updateTypleTypeNode(node, elementTypes) {
+ return node.elementTypes !== elementTypes
+ ? updateNode(createTupleTypeNode(elementTypes), node)
+ : node;
+ }
+ ts.updateTypleTypeNode = updateTypleTypeNode;
+ function createUnionTypeNode(types) {
+ return createUnionOrIntersectionTypeNode(166, types);
+ }
+ ts.createUnionTypeNode = createUnionTypeNode;
+ function updateUnionTypeNode(node, types) {
+ return updateUnionOrIntersectionTypeNode(node, types);
+ }
+ ts.updateUnionTypeNode = updateUnionTypeNode;
+ function createIntersectionTypeNode(types) {
+ return createUnionOrIntersectionTypeNode(167, types);
+ }
+ ts.createIntersectionTypeNode = createIntersectionTypeNode;
+ function updateIntersectionTypeNode(node, types) {
+ return updateUnionOrIntersectionTypeNode(node, types);
+ }
+ ts.updateIntersectionTypeNode = updateIntersectionTypeNode;
+ function createUnionOrIntersectionTypeNode(kind, types) {
+ var node = createSynthesizedNode(kind);
+ node.types = ts.parenthesizeElementTypeMembers(types);
+ return node;
+ }
+ ts.createUnionOrIntersectionTypeNode = createUnionOrIntersectionTypeNode;
+ function updateUnionOrIntersectionTypeNode(node, types) {
+ return node.types !== types
+ ? updateNode(createUnionOrIntersectionTypeNode(node.kind, types), node)
+ : node;
+ }
+ function createParenthesizedType(type) {
+ var node = createSynthesizedNode(168);
+ node.type = type;
+ return node;
+ }
+ ts.createParenthesizedType = createParenthesizedType;
+ function updateParenthesizedType(node, type) {
+ return node.type !== type
+ ? updateNode(createParenthesizedType(type), node)
+ : node;
+ }
+ ts.updateParenthesizedType = updateParenthesizedType;
+ function createThisTypeNode() {
+ return createSynthesizedNode(169);
+ }
+ ts.createThisTypeNode = createThisTypeNode;
+ function createTypeOperatorNode(type) {
+ var node = createSynthesizedNode(170);
+ node.operator = 127;
+ node.type = ts.parenthesizeElementTypeMember(type);
+ return node;
+ }
+ ts.createTypeOperatorNode = createTypeOperatorNode;
+ function updateTypeOperatorNode(node, type) {
+ return node.type !== type ? updateNode(createTypeOperatorNode(type), node) : node;
+ }
+ ts.updateTypeOperatorNode = updateTypeOperatorNode;
+ function createIndexedAccessTypeNode(objectType, indexType) {
+ var node = createSynthesizedNode(171);
+ node.objectType = ts.parenthesizeElementTypeMember(objectType);
+ node.indexType = indexType;
+ return node;
+ }
+ 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 createMappedTypeNode(readonlyToken, typeParameter, questionToken, type) {
+ var node = createSynthesizedNode(172);
+ node.readonlyToken = readonlyToken;
+ node.typeParameter = typeParameter;
+ node.questionToken = questionToken;
+ node.type = type;
+ return node;
+ }
+ 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 createLiteralTypeNode(literal) {
+ var node = createSynthesizedNode(173);
+ node.literal = literal;
+ return node;
+ }
+ ts.createLiteralTypeNode = createLiteralTypeNode;
+ function updateLiteralTypeNode(node, literal) {
+ return node.literal !== literal
+ ? updateNode(createLiteralTypeNode(literal), node)
+ : node;
+ }
+ ts.updateLiteralTypeNode = updateLiteralTypeNode;
function createObjectBindingPattern(elements) {
var node = createSynthesizedNode(174);
node.elements = createNodeArray(elements);
@@ -11088,9 +12006,8 @@ var ts;
function createArrayLiteral(elements, multiLine) {
var node = createSynthesizedNode(177);
node.elements = ts.parenthesizeListElements(createNodeArray(elements));
- if (multiLine) {
+ if (multiLine)
node.multiLine = true;
- }
return node;
}
ts.createArrayLiteral = createArrayLiteral;
@@ -11103,9 +12020,8 @@ var ts;
function createObjectLiteral(properties, multiLine) {
var node = createSynthesizedNode(178);
node.properties = createNodeArray(properties);
- if (multiLine) {
+ if (multiLine)
node.multiLine = true;
- }
return node;
}
ts.createObjectLiteral = createObjectLiteral;
@@ -11119,7 +12035,7 @@ var ts;
var node = createSynthesizedNode(179);
node.expression = ts.parenthesizeForAccess(expression);
node.name = asName(name);
- setEmitFlags(node, 65536);
+ setEmitFlags(node, 131072);
return node;
}
ts.createPropertyAccess = createPropertyAccess;
@@ -11153,9 +12069,9 @@ var ts;
}
ts.createCall = createCall;
function updateCall(node, expression, typeArguments, argumentsArray) {
- return expression !== node.expression
- || typeArguments !== node.typeArguments
- || argumentsArray !== node.arguments
+ return node.expression !== expression
+ || node.typeArguments !== typeArguments
+ || node.arguments !== argumentsArray
? updateNode(createCall(expression, typeArguments, argumentsArray), node)
: node;
}
@@ -11345,10 +12261,10 @@ var ts;
return node;
}
ts.createBinary = createBinary;
- function updateBinary(node, left, right) {
+ function updateBinary(node, left, right, operator) {
return node.left !== left
|| node.right !== right
- ? updateNode(createBinary(left, node.operatorToken, right), node)
+ ? updateNode(createBinary(left, operator || node.operatorToken, right), node)
: node;
}
ts.updateBinary = updateBinary;
@@ -11475,6 +12391,19 @@ var ts;
: node;
}
ts.updateNonNullExpression = updateNonNullExpression;
+ function createMetaProperty(keywordToken, name) {
+ var node = createSynthesizedNode(204);
+ node.keywordToken = keywordToken;
+ node.name = name;
+ return node;
+ }
+ ts.createMetaProperty = createMetaProperty;
+ function updateMetaProperty(node, name) {
+ return node.name !== name
+ ? updateNode(createMetaProperty(node.keywordToken, name), node)
+ : node;
+ }
+ ts.updateMetaProperty = updateMetaProperty;
function createTemplateSpan(expression, literal) {
var node = createSynthesizedNode(205);
node.expression = expression;
@@ -11489,6 +12418,10 @@ var ts;
: node;
}
ts.updateTemplateSpan = updateTemplateSpan;
+ function createSemicolonClassElement() {
+ return createSynthesizedNode(206);
+ }
+ ts.createSemicolonClassElement = createSemicolonClassElement;
function createBlock(statements, multiLine) {
var block = createSynthesizedNode(207);
block.statements = createNodeArray(statements);
@@ -11498,7 +12431,7 @@ var ts;
}
ts.createBlock = createBlock;
function updateBlock(node, statements) {
- return statements !== node.statements
+ return node.statements !== statements
? updateNode(createBlock(statements, node.multiLine), node)
: node;
}
@@ -11518,35 +12451,6 @@ var ts;
: node;
}
ts.updateVariableStatement = updateVariableStatement;
- function createVariableDeclarationList(declarations, flags) {
- var node = createSynthesizedNode(227);
- node.flags |= flags;
- node.declarations = createNodeArray(declarations);
- return node;
- }
- ts.createVariableDeclarationList = createVariableDeclarationList;
- function updateVariableDeclarationList(node, declarations) {
- return node.declarations !== declarations
- ? updateNode(createVariableDeclarationList(declarations, node.flags), node)
- : node;
- }
- ts.updateVariableDeclarationList = updateVariableDeclarationList;
- function createVariableDeclaration(name, type, initializer) {
- var node = createSynthesizedNode(226);
- node.name = asName(name);
- node.type = type;
- node.initializer = initializer !== undefined ? ts.parenthesizeExpressionForList(initializer) : undefined;
- return node;
- }
- ts.createVariableDeclaration = createVariableDeclaration;
- function updateVariableDeclaration(node, name, type, initializer) {
- return node.name !== name
- || node.type !== type
- || node.initializer !== initializer
- ? updateNode(createVariableDeclaration(name, type, initializer), node)
- : node;
- }
- ts.updateVariableDeclaration = updateVariableDeclaration;
function createEmptyStatement() {
return createSynthesizedNode(209);
}
@@ -11765,6 +12669,39 @@ var ts;
: node;
}
ts.updateTry = updateTry;
+ function createDebuggerStatement() {
+ return createSynthesizedNode(225);
+ }
+ ts.createDebuggerStatement = createDebuggerStatement;
+ function createVariableDeclaration(name, type, initializer) {
+ var node = createSynthesizedNode(226);
+ node.name = asName(name);
+ node.type = type;
+ node.initializer = initializer !== undefined ? ts.parenthesizeExpressionForList(initializer) : undefined;
+ return node;
+ }
+ ts.createVariableDeclaration = createVariableDeclaration;
+ function updateVariableDeclaration(node, name, type, initializer) {
+ return node.name !== name
+ || node.type !== type
+ || node.initializer !== initializer
+ ? updateNode(createVariableDeclaration(name, type, initializer), node)
+ : node;
+ }
+ ts.updateVariableDeclaration = updateVariableDeclaration;
+ function createVariableDeclarationList(declarations, flags) {
+ var node = createSynthesizedNode(227);
+ node.flags |= flags & 3;
+ node.declarations = createNodeArray(declarations);
+ return node;
+ }
+ ts.createVariableDeclarationList = createVariableDeclarationList;
+ function updateVariableDeclarationList(node, declarations) {
+ return node.declarations !== declarations
+ ? updateNode(createVariableDeclarationList(declarations, node.flags), node)
+ : node;
+ }
+ ts.updateVariableDeclarationList = updateVariableDeclarationList;
function createFunctionDeclaration(decorators, modifiers, asteriskToken, name, typeParameters, parameters, type, body) {
var node = createSynthesizedNode(228);
node.decorators = asNodeArray(decorators);
@@ -11813,6 +12750,48 @@ var ts;
: node;
}
ts.updateClassDeclaration = updateClassDeclaration;
+ function createInterfaceDeclaration(decorators, modifiers, name, typeParameters, heritageClauses, members) {
+ var node = createSynthesizedNode(230);
+ 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.createInterfaceDeclaration = createInterfaceDeclaration;
+ function updateInterfaceDeclaration(node, decorators, modifiers, name, typeParameters, heritageClauses, members) {
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.name !== name
+ || node.typeParameters !== typeParameters
+ || node.heritageClauses !== heritageClauses
+ || node.members !== members
+ ? updateNode(createInterfaceDeclaration(decorators, modifiers, name, typeParameters, heritageClauses, members), node)
+ : node;
+ }
+ ts.updateInterfaceDeclaration = updateInterfaceDeclaration;
+ function createTypeAliasDeclaration(decorators, modifiers, name, typeParameters, type) {
+ var node = createSynthesizedNode(231);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
+ node.name = asName(name);
+ node.typeParameters = asNodeArray(typeParameters);
+ node.type = type;
+ return node;
+ }
+ ts.createTypeAliasDeclaration = createTypeAliasDeclaration;
+ function updateTypeAliasDeclaration(node, decorators, modifiers, name, typeParameters, type) {
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.name !== name
+ || node.typeParameters !== typeParameters
+ || node.type !== type
+ ? updateNode(createTypeAliasDeclaration(decorators, modifiers, name, typeParameters, type), node)
+ : node;
+ }
+ ts.updateTypeAliasDeclaration = updateTypeAliasDeclaration;
function createEnumDeclaration(decorators, modifiers, name, members) {
var node = createSynthesizedNode(232);
node.decorators = asNodeArray(decorators);
@@ -11833,7 +12812,7 @@ var ts;
ts.updateEnumDeclaration = updateEnumDeclaration;
function createModuleDeclaration(decorators, modifiers, name, body, flags) {
var node = createSynthesizedNode(233);
- node.flags |= flags;
+ node.flags |= flags & (16 | 4 | 512);
node.decorators = asNodeArray(decorators);
node.modifiers = asNodeArray(modifiers);
node.name = name;
@@ -11874,6 +12853,18 @@ var ts;
: node;
}
ts.updateCaseBlock = updateCaseBlock;
+ function createNamespaceExportDeclaration(name) {
+ var node = createSynthesizedNode(236);
+ node.name = asName(name);
+ return node;
+ }
+ ts.createNamespaceExportDeclaration = createNamespaceExportDeclaration;
+ function updateNamespaceExportDeclaration(node, name) {
+ return node.name !== name
+ ? updateNode(createNamespaceExportDeclaration(name), node)
+ : node;
+ }
+ ts.updateNamespaceExportDeclaration = updateNamespaceExportDeclaration;
function createImportEqualsDeclaration(decorators, modifiers, name, moduleReference) {
var node = createSynthesizedNode(237);
node.decorators = asNodeArray(decorators);
@@ -11904,7 +12895,8 @@ var ts;
function updateImportDeclaration(node, decorators, modifiers, importClause, moduleSpecifier) {
return node.decorators !== decorators
|| node.modifiers !== modifiers
- || node.importClause !== importClause || node.moduleSpecifier !== moduleSpecifier
+ || node.importClause !== importClause
+ || node.moduleSpecifier !== moduleSpecifier
? updateNode(createImportDeclaration(decorators, modifiers, importClause, moduleSpecifier), node)
: node;
}
@@ -12090,19 +13082,6 @@ var ts;
: node;
}
ts.updateJsxClosingElement = updateJsxClosingElement;
- function createJsxAttributes(properties) {
- var jsxAttributes = createSynthesizedNode(254);
- 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(253);
node.name = name;
@@ -12117,6 +13096,18 @@ var ts;
: node;
}
ts.updateJsxAttribute = updateJsxAttribute;
+ function createJsxAttributes(properties) {
+ var node = createSynthesizedNode(254);
+ node.properties = createNodeArray(properties);
+ return node;
+ }
+ ts.createJsxAttributes = createJsxAttributes;
+ function updateJsxAttributes(node, properties) {
+ return node.properties !== properties
+ ? updateNode(createJsxAttributes(properties), node)
+ : node;
+ }
+ ts.updateJsxAttributes = updateJsxAttributes;
function createJsxSpreadAttribute(expression) {
var node = createSynthesizedNode(255);
node.expression = expression;
@@ -12142,20 +13133,6 @@ var ts;
: node;
}
ts.updateJsxExpression = updateJsxExpression;
- function createHeritageClause(token, types) {
- var node = createSynthesizedNode(259);
- node.token = token;
- node.types = createNodeArray(types);
- return node;
- }
- ts.createHeritageClause = createHeritageClause;
- function updateHeritageClause(node, types) {
- if (node.types !== types) {
- return updateNode(createHeritageClause(node.token, types), node);
- }
- return node;
- }
- ts.updateHeritageClause = updateHeritageClause;
function createCaseClause(expression, statements) {
var node = createSynthesizedNode(257);
node.expression = ts.parenthesizeExpressionForList(expression);
@@ -12164,10 +13141,10 @@ var ts;
}
ts.createCaseClause = createCaseClause;
function updateCaseClause(node, expression, statements) {
- if (node.expression !== expression || node.statements !== statements) {
- return updateNode(createCaseClause(expression, statements), node);
- }
- return node;
+ return node.expression !== expression
+ || node.statements !== statements
+ ? updateNode(createCaseClause(expression, statements), node)
+ : node;
}
ts.updateCaseClause = updateCaseClause;
function createDefaultClause(statements) {
@@ -12177,12 +13154,24 @@ var ts;
}
ts.createDefaultClause = createDefaultClause;
function updateDefaultClause(node, statements) {
- if (node.statements !== statements) {
- return updateNode(createDefaultClause(statements), node);
- }
- return node;
+ return node.statements !== statements
+ ? updateNode(createDefaultClause(statements), node)
+ : node;
}
ts.updateDefaultClause = updateDefaultClause;
+ function createHeritageClause(token, types) {
+ var node = createSynthesizedNode(259);
+ node.token = token;
+ node.types = createNodeArray(types);
+ return node;
+ }
+ ts.createHeritageClause = createHeritageClause;
+ function updateHeritageClause(node, types) {
+ return node.types !== types
+ ? updateNode(createHeritageClause(node.token, types), node)
+ : node;
+ }
+ ts.updateHeritageClause = updateHeritageClause;
function createCatchClause(variableDeclaration, block) {
var node = createSynthesizedNode(260);
node.variableDeclaration = typeof variableDeclaration === "string" ? createVariableDeclaration(variableDeclaration) : variableDeclaration;
@@ -12191,10 +13180,10 @@ var ts;
}
ts.createCatchClause = createCatchClause;
function updateCatchClause(node, variableDeclaration, block) {
- if (node.variableDeclaration !== variableDeclaration || node.block !== block) {
- return updateNode(createCatchClause(variableDeclaration, block), node);
- }
- return node;
+ return node.variableDeclaration !== variableDeclaration
+ || node.block !== block
+ ? updateNode(createCatchClause(variableDeclaration, block), node)
+ : node;
}
ts.updateCatchClause = updateCatchClause;
function createPropertyAssignment(name, initializer) {
@@ -12206,10 +13195,10 @@ var ts;
}
ts.createPropertyAssignment = createPropertyAssignment;
function updatePropertyAssignment(node, name, initializer) {
- if (node.name !== name || node.initializer !== initializer) {
- return updateNode(createPropertyAssignment(name, initializer), node);
- }
- return node;
+ return node.name !== name
+ || node.initializer !== initializer
+ ? updateNode(createPropertyAssignment(name, initializer), node)
+ : node;
}
ts.updatePropertyAssignment = updatePropertyAssignment;
function createShorthandPropertyAssignment(name, objectAssignmentInitializer) {
@@ -12220,10 +13209,10 @@ var ts;
}
ts.createShorthandPropertyAssignment = createShorthandPropertyAssignment;
function updateShorthandPropertyAssignment(node, name, objectAssignmentInitializer) {
- if (node.name !== name || node.objectAssignmentInitializer !== objectAssignmentInitializer) {
- return updateNode(createShorthandPropertyAssignment(name, objectAssignmentInitializer), node);
- }
- return node;
+ return node.name !== name
+ || node.objectAssignmentInitializer !== objectAssignmentInitializer
+ ? updateNode(createShorthandPropertyAssignment(name, objectAssignmentInitializer), node)
+ : node;
}
ts.updateShorthandPropertyAssignment = updateShorthandPropertyAssignment;
function createSpreadAssignment(expression) {
@@ -12233,10 +13222,9 @@ var ts;
}
ts.createSpreadAssignment = createSpreadAssignment;
function updateSpreadAssignment(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createSpreadAssignment(expression), node);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createSpreadAssignment(expression), node)
+ : node;
}
ts.updateSpreadAssignment = updateSpreadAssignment;
function createEnumMember(name, initializer) {
@@ -12324,28 +13312,28 @@ var ts;
}
ts.getMutableClone = getMutableClone;
function createNotEmittedStatement(original) {
- var node = createSynthesizedNode(295);
+ var node = createSynthesizedNode(296);
node.original = original;
setTextRange(node, original);
return node;
}
ts.createNotEmittedStatement = createNotEmittedStatement;
function createEndOfDeclarationMarker(original) {
- var node = createSynthesizedNode(298);
+ var node = createSynthesizedNode(300);
node.emitNode = {};
node.original = original;
return node;
}
ts.createEndOfDeclarationMarker = createEndOfDeclarationMarker;
function createMergeDeclarationMarker(original) {
- var node = createSynthesizedNode(297);
+ var node = createSynthesizedNode(299);
node.emitNode = {};
node.original = original;
return node;
}
ts.createMergeDeclarationMarker = createMergeDeclarationMarker;
function createPartiallyEmittedExpression(expression, original) {
- var node = createSynthesizedNode(296);
+ var node = createSynthesizedNode(297);
node.expression = expression;
node.original = original;
setTextRange(node, original);
@@ -12359,6 +13347,29 @@ var ts;
return node;
}
ts.updatePartiallyEmittedExpression = updatePartiallyEmittedExpression;
+ function flattenCommaElements(node) {
+ if (ts.nodeIsSynthesized(node) && !ts.isParseTreeNode(node) && !node.original && !node.emitNode && !node.id) {
+ if (node.kind === 298) {
+ return node.elements;
+ }
+ if (ts.isBinaryExpression(node) && node.operatorToken.kind === 26) {
+ return [node.left, node.right];
+ }
+ }
+ return node;
+ }
+ function createCommaList(elements) {
+ var node = createSynthesizedNode(298);
+ node.elements = createNodeArray(ts.sameFlatMap(elements, flattenCommaElements));
+ return node;
+ }
+ ts.createCommaList = createCommaList;
+ function updateCommaList(node, elements) {
+ return node.elements !== elements
+ ? updateNode(createCommaList(elements), node)
+ : node;
+ }
+ ts.updateCommaList = updateCommaList;
function createBundle(sourceFiles) {
var node = ts.createNode(266);
node.sourceFiles = sourceFiles;
@@ -12372,6 +13383,10 @@ var ts;
return node;
}
ts.updateBundle = updateBundle;
+ function createImmediatelyInvokedFunctionExpression(statements, param, paramValue) {
+ return createCall(createFunctionExpression(undefined, undefined, undefined, undefined, param ? [param] : [], undefined, createBlock(statements, true)), undefined, paramValue ? [paramValue] : []);
+ }
+ ts.createImmediatelyInvokedFunctionExpression = createImmediatelyInvokedFunctionExpression;
function createComma(left, right) {
return createBinary(left, 26, right);
}
@@ -12494,6 +13509,11 @@ var ts;
return node;
}
ts.setSourceMapRange = setSourceMapRange;
+ var SourceMapSource;
+ function createSourceMapSource(fileName, text, skipTrivia) {
+ return new (SourceMapSource || (SourceMapSource = ts.objectAllocator.getSourceMapSourceConstructor()))(fileName, text, skipTrivia);
+ }
+ ts.createSourceMapSource = createSourceMapSource;
function getTokenSourceMapRange(node, token) {
var emitNode = node.emitNode;
var tokenSourceMapRanges = emitNode && emitNode.tokenSourceMapRanges;
@@ -12669,6 +13689,25 @@ var ts;
}
})(ts || (ts = {}));
(function (ts) {
+ ts.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 createTypeCheck(value, tag) {
return tag === "undefined"
? ts.createStrictEquality(value, ts.createVoidZero())
@@ -12909,7 +13948,9 @@ var ts;
}
ts.createCallBinding = createCallBinding;
function inlineExpressions(expressions) {
- return ts.reduceLeft(expressions, ts.createComma);
+ return expressions.length > 10
+ ? ts.createCommaList(expressions)
+ : ts.reduceLeft(expressions, ts.createComma);
}
ts.inlineExpressions = inlineExpressions;
function createExpressionFromEntityName(node) {
@@ -12987,6 +14028,14 @@ var ts;
function createExpressionForMethodDeclaration(method, receiver) {
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 getInternalName(node, allowComments, allowSourceMaps) {
+ return getName(node, allowComments, allowSourceMaps, 16384 | 32768);
+ }
+ ts.getInternalName = getInternalName;
+ function isInternalName(node) {
+ return (ts.getEmitFlags(node) & 32768) !== 0;
+ }
+ ts.isInternalName = isInternalName;
function getLocalName(node, allowComments, allowSourceMaps) {
return getName(node, allowComments, allowSourceMaps, 16384);
}
@@ -13008,9 +14057,10 @@ var ts;
}
ts.getDeclarationName = getDeclarationName;
function getName(node, allowComments, allowSourceMaps, emitFlags) {
- if (node.name && ts.isIdentifier(node.name) && !ts.isGeneratedIdentifier(node.name)) {
- var name = ts.getMutableClone(node.name);
- emitFlags |= ts.getEmitFlags(node.name);
+ var nodeName = ts.getNameOfDeclaration(node);
+ if (nodeName && ts.isIdentifier(nodeName) && !ts.isGeneratedIdentifier(nodeName)) {
+ var name = ts.getMutableClone(nodeName);
+ emitFlags |= ts.getEmitFlags(nodeName);
if (!allowSourceMaps)
emitFlags |= 48;
if (!allowComments)
@@ -13045,6 +14095,18 @@ var ts;
return ts.isBlock(node) ? node : ts.setTextRange(ts.createBlock([ts.setTextRange(ts.createReturn(node), node)], multiLine), node);
}
ts.convertToFunctionBody = convertToFunctionBody;
+ function convertFunctionDeclarationToExpression(node) {
+ ts.Debug.assert(!!node.body);
+ var updated = ts.createFunctionExpression(node.modifiers, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body);
+ ts.setOriginalNode(updated, node);
+ ts.setTextRange(updated, node);
+ if (node.startsOnNewLine) {
+ updated.startsOnNewLine = true;
+ }
+ ts.aggregateTransformFlags(updated);
+ return updated;
+ }
+ ts.convertFunctionDeclarationToExpression = convertFunctionDeclarationToExpression;
function isUseStrictPrologue(node) {
return node.expression.text === "use strict";
}
@@ -13081,7 +14143,7 @@ var ts;
var numStatements = source.length;
while (statementOffset < numStatements) {
var statement = source[statementOffset];
- if (ts.getEmitFlags(statement) & 524288) {
+ if (ts.getEmitFlags(statement) & 1048576) {
target.push(visitor ? ts.visitNode(statement, visitor, ts.isStatement) : statement);
}
else {
@@ -13121,16 +14183,6 @@ var ts;
return statements;
}
ts.ensureUseStrict = ensureUseStrict;
- function parenthesizeConditionalHead(condition) {
- var conditionalPrecedence = ts.getOperatorPrecedence(195, 55);
- 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 === 185) {
@@ -13287,7 +14339,7 @@ var ts;
if (kind === 186 || kind === 187) {
var mutableCall = ts.getMutableClone(emittedExpression);
mutableCall.expression = ts.setTextRange(ts.createParen(callee), callee);
- return recreatePartiallyEmittedExpressions(expression, mutableCall);
+ return recreateOuterExpressions(expression, mutableCall, 4);
}
}
else {
@@ -13299,14 +14351,34 @@ var ts;
return expression;
}
ts.parenthesizeExpressionForExpressionStatement = parenthesizeExpressionForExpressionStatement;
- function recreatePartiallyEmittedExpressions(originalOuterExpression, newInnerExpression) {
- if (ts.isPartiallyEmittedExpression(originalOuterExpression)) {
- var clone_1 = ts.getMutableClone(originalOuterExpression);
- clone_1.expression = recreatePartiallyEmittedExpressions(clone_1.expression, newInnerExpression);
- return clone_1;
+ function parenthesizeElementTypeMember(member) {
+ switch (member.kind) {
+ case 166:
+ case 167:
+ case 160:
+ case 161:
+ return ts.createParenthesizedType(member);
}
- return newInnerExpression;
+ return member;
+ }
+ ts.parenthesizeElementTypeMember = parenthesizeElementTypeMember;
+ function parenthesizeElementTypeMembers(members) {
+ return ts.createNodeArray(ts.sameMap(members, parenthesizeElementTypeMember));
}
+ ts.parenthesizeElementTypeMembers = parenthesizeElementTypeMembers;
+ function parenthesizeTypeParameters(typeParameters) {
+ if (ts.some(typeParameters)) {
+ var nodeArray = ts.createNodeArray();
+ for (var i = 0; i < typeParameters.length; ++i) {
+ var entry = typeParameters[i];
+ nodeArray.push(i === 0 && ts.isFunctionOrConstructorTypeNode(entry) && entry.typeParameters ?
+ ts.createParenthesizedType(entry) :
+ entry);
+ }
+ return nodeArray;
+ }
+ }
+ ts.parenthesizeTypeParameters = parenthesizeTypeParameters;
function getLeftmostExpression(node) {
while (true) {
switch (node.kind) {
@@ -13324,7 +14396,7 @@ var ts;
case 179:
node = node.expression;
continue;
- case 296:
+ case 297:
node = node.expression;
continue;
}
@@ -13345,6 +14417,21 @@ var ts;
OuterExpressionKinds[OuterExpressionKinds["PartiallyEmittedExpressions"] = 4] = "PartiallyEmittedExpressions";
OuterExpressionKinds[OuterExpressionKinds["All"] = 7] = "All";
})(OuterExpressionKinds = ts.OuterExpressionKinds || (ts.OuterExpressionKinds = {}));
+ function isOuterExpression(node, kinds) {
+ if (kinds === void 0) { kinds = 7; }
+ switch (node.kind) {
+ case 185:
+ return (kinds & 1) !== 0;
+ case 184:
+ case 202:
+ case 203:
+ return (kinds & 2) !== 0;
+ case 297:
+ return (kinds & 4) !== 0;
+ }
+ return false;
+ }
+ ts.isOuterExpression = isOuterExpression;
function skipOuterExpressions(node, kinds) {
if (kinds === void 0) { kinds = 7; }
var previousNode;
@@ -13371,19 +14458,36 @@ var ts;
}
ts.skipParentheses = skipParentheses;
function skipAssertions(node) {
- while (ts.isAssertionExpression(node)) {
+ while (ts.isAssertionExpression(node) || node.kind === 203) {
node = node.expression;
}
return node;
}
ts.skipAssertions = skipAssertions;
function skipPartiallyEmittedExpressions(node) {
- while (node.kind === 296) {
+ while (node.kind === 297) {
node = node.expression;
}
return node;
}
ts.skipPartiallyEmittedExpressions = skipPartiallyEmittedExpressions;
+ function updateOuterExpression(outerExpression, expression) {
+ switch (outerExpression.kind) {
+ case 185: return ts.updateParen(outerExpression, expression);
+ case 184: return ts.updateTypeAssertion(outerExpression, outerExpression.type, expression);
+ case 202: return ts.updateAsExpression(outerExpression, expression, outerExpression.type);
+ case 203: return ts.updateNonNullExpression(outerExpression, expression);
+ case 297: return ts.updatePartiallyEmittedExpression(outerExpression, expression);
+ }
+ }
+ function recreateOuterExpressions(outerExpression, innerExpression, kinds) {
+ if (kinds === void 0) { kinds = 7; }
+ if (outerExpression && isOuterExpression(outerExpression, kinds)) {
+ return updateOuterExpression(outerExpression, recreateOuterExpressions(outerExpression.expression, innerExpression));
+ }
+ return innerExpression;
+ }
+ ts.recreateOuterExpressions = recreateOuterExpressions;
function startOnNewLine(node) {
node.startsOnNewLine = true;
return node;
@@ -13395,23 +14499,33 @@ var ts;
return emitNode && emitNode.externalHelpersModuleName;
}
ts.getExternalHelpersModuleName = getExternalHelpersModuleName;
- function getOrCreateExternalHelpersModuleNameIfNeeded(node, compilerOptions) {
- if (compilerOptions.importHelpers && (ts.isExternalModule(node) || compilerOptions.isolatedModules)) {
+ function getOrCreateExternalHelpersModuleNameIfNeeded(node, compilerOptions, hasExportStarsToExportValues) {
+ if (compilerOptions.importHelpers && ts.isEffectiveExternalModule(node, compilerOptions)) {
var externalHelpersModuleName = getExternalHelpersModuleName(node);
if (externalHelpersModuleName) {
return externalHelpersModuleName;
}
- var helpers = ts.getEmitHelpers(node);
- if (helpers) {
- 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 = ts.getOrCreateEmitNode(parseNode);
- return emitNode.externalHelpersModuleName || (emitNode.externalHelpersModuleName = ts.createUniqueName(ts.externalHelpersModuleNameText));
+ var moduleKind = ts.getEmitModuleKind(compilerOptions);
+ var create = hasExportStarsToExportValues
+ && moduleKind !== ts.ModuleKind.System
+ && moduleKind !== ts.ModuleKind.ES2015;
+ if (!create) {
+ var helpers = ts.getEmitHelpers(node);
+ if (helpers) {
+ for (var _i = 0, helpers_2 = helpers; _i < helpers_2.length; _i++) {
+ var helper = helpers_2[_i];
+ if (!helper.scoped) {
+ create = true;
+ break;
+ }
}
}
}
+ if (create) {
+ var parseNode = ts.getOriginalNode(node, ts.isSourceFile);
+ var emitNode = ts.getOrCreateEmitNode(parseNode);
+ return emitNode.externalHelpersModuleName || (emitNode.externalHelpersModuleName = ts.createUniqueName(ts.externalHelpersModuleNameText));
+ }
}
}
ts.getOrCreateExternalHelpersModuleNameIfNeeded = getOrCreateExternalHelpersModuleNameIfNeeded;
@@ -13451,7 +14565,7 @@ var ts;
if (file.moduleName) {
return ts.createLiteral(file.moduleName);
}
- if (!ts.isDeclarationFile(file) && (options.out || options.outFile)) {
+ if (!file.isDeclarationFile && (options.out || options.outFile)) {
return ts.createLiteral(ts.getExternalModuleNameFromPath(host, file.fileName));
}
return undefined;
@@ -13475,7 +14589,7 @@ var ts;
if (ts.isAssignmentExpression(bindingElement, true)) {
return bindingElement.right;
}
- if (ts.isSpreadExpression(bindingElement)) {
+ if (ts.isSpreadElement(bindingElement)) {
return getInitializerOfBindingOrAssignmentElement(bindingElement.expression);
}
}
@@ -13498,7 +14612,7 @@ var ts;
if (ts.isAssignmentExpression(bindingElement, true)) {
return getTargetOfBindingOrAssignmentElement(bindingElement.left);
}
- if (ts.isSpreadExpression(bindingElement)) {
+ if (ts.isSpreadElement(bindingElement)) {
return getTargetOfBindingOrAssignmentElement(bindingElement.expression);
}
return bindingElement;
@@ -13633,11 +14747,6 @@ var ts;
var hasExportDefault = false;
var exportEquals = undefined;
var hasExportStarsToExportValues = false;
- var externalHelpersModuleName = getOrCreateExternalHelpersModuleNameIfNeeded(sourceFile, compilerOptions);
- 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) {
@@ -13727,6 +14836,11 @@ var ts;
break;
}
}
+ var externalHelpersModuleName = getOrCreateExternalHelpersModuleNameIfNeeded(sourceFile, compilerOptions, hasExportStarsToExportValues);
+ var externalHelpersImportDeclaration = externalHelpersModuleName && ts.createImportDeclaration(undefined, undefined, ts.createImportClause(undefined, ts.createNamespaceImport(externalHelpersModuleName)), ts.createLiteral(ts.externalHelpersModuleNameText));
+ if (externalHelpersImportDeclaration) {
+ externalImports.unshift(externalHelpersImportDeclaration);
+ }
return { externalImports: externalImports, exportSpecifiers: exportSpecifiers, exportEquals: exportEquals, hasExportStarsToExportValues: hasExportStarsToExportValues, exportedBindings: exportedBindings, exportedNames: exportedNames, externalHelpersImportDeclaration: externalHelpersImportDeclaration };
}
ts.collectExternalModuleInfo = collectExternalModuleInfo;
@@ -13771,7 +14885,7 @@ var ts;
else if (kind === 71) {
return new (IdentifierConstructor || (IdentifierConstructor = ts.objectAllocator.getIdentifierConstructor()))(kind, pos, end);
}
- else if (kind < 143) {
+ else if (!ts.isNodeKind(kind)) {
return new (TokenConstructor || (TokenConstructor = ts.objectAllocator.getTokenConstructor()))(kind, pos, end);
}
else {
@@ -14108,6 +15222,8 @@ var ts;
return visitNode(cbNode, node.expression);
case 247:
return visitNodes(cbNodes, node.decorators);
+ case 298:
+ return visitNodes(cbNodes, node.elements);
case 249:
return visitNode(cbNode, node.openingElement) ||
visitNodes(cbNodes, node.children) ||
@@ -14161,31 +15277,31 @@ var ts;
visitNode(cbNode, node.type);
case 283:
return visitNodes(cbNodes, node.tags);
- case 286:
+ case 287:
return visitNode(cbNode, node.preParameterName) ||
visitNode(cbNode, node.typeExpression) ||
visitNode(cbNode, node.postParameterName);
- case 287:
- return visitNode(cbNode, node.typeExpression);
case 288:
return visitNode(cbNode, node.typeExpression);
+ case 289:
+ return visitNode(cbNode, node.typeExpression);
case 285:
return visitNode(cbNode, node.typeExpression);
- case 289:
- return visitNodes(cbNodes, node.typeParameters);
case 290:
+ return visitNodes(cbNodes, node.typeParameters);
+ case 291:
return visitNode(cbNode, node.typeExpression) ||
visitNode(cbNode, node.fullName) ||
visitNode(cbNode, node.name) ||
visitNode(cbNode, node.jsDocTypeLiteral);
- case 292:
+ case 293:
return visitNodes(cbNodes, node.jsDocPropertyTags);
- case 291:
+ case 292:
return visitNode(cbNode, node.typeExpression) ||
visitNode(cbNode, node.name);
- case 296:
+ case 297:
return visitNode(cbNode, node.expression);
- case 293:
+ case 294:
return visitNode(cbNode, node.literal);
}
}
@@ -14208,7 +15324,9 @@ var ts;
}
ts.isExternalModule = isExternalModule;
function updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks) {
- return IncrementalParser.updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks);
+ var newSourceFile = IncrementalParser.updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks);
+ newSourceFile.flags |= (sourceFile.flags & 524288);
+ return newSourceFile;
}
ts.updateSourceFile = updateSourceFile;
function parseIsolatedJSDocComment(content, start, length) {
@@ -14297,7 +15415,7 @@ var ts;
processReferenceComments(sourceFile);
sourceFile.statements = parseList(0, parseStatement);
ts.Debug.assert(token() === 1);
- sourceFile.endOfFileToken = parseTokenNode();
+ sourceFile.endOfFileToken = addJSDocComment(parseTokenNode());
setExternalModuleIndicator(sourceFile);
sourceFile.nodeCount = nodeCount;
sourceFile.identifierCount = identifierCount;
@@ -14576,7 +15694,7 @@ var ts;
if (!(pos >= 0)) {
pos = scanner.getStartPos();
}
- return kind >= 143 ? new NodeConstructor(kind, pos, pos) :
+ return ts.isNodeKind(kind) ? new NodeConstructor(kind, pos, pos) :
kind === 71 ? new IdentifierConstructor(kind, pos, pos) :
new TokenConstructor(kind, pos, pos);
}
@@ -14685,12 +15803,12 @@ var ts;
if (token() === 84) {
nextToken();
if (token() === 79) {
- return lookAhead(nextTokenIsClassOrFunctionOrAsync);
+ return lookAhead(nextTokenCanFollowDefaultKeyword);
}
return token() !== 39 && token() !== 118 && token() !== 17 && canFollowModifier();
}
if (token() === 79) {
- return nextTokenIsClassOrFunctionOrAsync();
+ return nextTokenCanFollowDefaultKeyword();
}
if (token() === 115) {
nextToken();
@@ -14708,9 +15826,10 @@ var ts;
|| token() === 24
|| isLiteralPropertyName();
}
- function nextTokenIsClassOrFunctionOrAsync() {
+ function nextTokenCanFollowDefaultKeyword() {
nextToken();
return token() === 75 || token() === 89 ||
+ token() === 109 ||
(token() === 117 && lookAhead(nextTokenIsClassKeywordOnSameLine)) ||
(token() === 120 && lookAhead(nextTokenIsFunctionKeywordOnSameLine));
}
@@ -15442,7 +16561,7 @@ var ts;
if (token() === 19 || token() === 27) {
return parseSignatureMember(155);
}
- if (token() === 94 && lookAhead(isStartOfConstructSignature)) {
+ if (token() === 94 && lookAhead(nextTokenIsOpenParenOrLessThan)) {
return parseSignatureMember(156);
}
var fullStart = getNodePos();
@@ -15452,7 +16571,7 @@ var ts;
}
return parsePropertyOrMethodSignature(fullStart, modifiers);
}
- function isStartOfConstructSignature() {
+ function nextTokenIsOpenParenOrLessThan() {
nextToken();
return token() === 19 || token() === 27;
}
@@ -15762,6 +16881,8 @@ var ts;
case 63:
case 71:
return true;
+ case 91:
+ return lookAhead(nextTokenIsOpenParenOrLessThan);
default:
return isIdentifier();
}
@@ -16186,10 +17307,10 @@ var ts;
}
function parseUnaryExpressionOrHigher() {
if (isUpdateExpression()) {
- var incrementExpression = parseIncrementExpression();
+ var updateExpression = parseUpdateExpression();
return token() === 40 ?
- parseBinaryExpressionRest(getBinaryOperatorPrecedence(), incrementExpression) :
- incrementExpression;
+ parseBinaryExpressionRest(getBinaryOperatorPrecedence(), updateExpression) :
+ updateExpression;
}
var unaryOperator = token();
var simpleUnaryExpression = parseSimpleUnaryExpression();
@@ -16224,7 +17345,7 @@ var ts;
return parseAwaitExpression();
}
default:
- return parseIncrementExpression();
+ return parseUpdateExpression();
}
}
function isUpdateExpression() {
@@ -16246,7 +17367,7 @@ var ts;
return true;
}
}
- function parseIncrementExpression() {
+ function parseUpdateExpression() {
if (token() === 43 || token() === 44) {
var node = createNode(192);
node.operator = token();
@@ -16269,9 +17390,14 @@ var ts;
return expression;
}
function parseLeftHandSideExpressionOrHigher() {
- var expression = token() === 97
- ? parseSuperExpression()
- : parseMemberExpressionOrHigher();
+ var expression;
+ if (token() === 91 && lookAhead(nextTokenIsOpenParenOrLessThan)) {
+ sourceFile.flags |= 524288;
+ expression = parseTokenNode();
+ }
+ else {
+ expression = token() === 97 ? parseSuperExpression() : parseMemberExpressionOrHigher();
+ }
return parseCallExpressionRest(expression);
}
function parseMemberExpressionOrHigher() {
@@ -17088,9 +18214,10 @@ var ts;
case 74:
case 87:
return true;
+ case 91:
+ return isStartOfDeclaration() || lookAhead(nextTokenIsOpenParenOrLessThan);
case 76:
case 84:
- case 91:
return isStartOfDeclaration();
case 120:
case 124:
@@ -18103,7 +19230,10 @@ var ts;
case 17:
return parseJSDocRecordType();
case 89:
- return parseJSDocFunctionType();
+ if (lookAhead(nextTokenIsOpenParen)) {
+ return parseJSDocFunctionType();
+ }
+ break;
case 24:
return parseJSDocVariadicType();
case 94:
@@ -18119,7 +19249,6 @@ var ts;
case 95:
case 139:
case 130:
- case 134:
return parseTokenNode();
case 9:
case 8:
@@ -18257,7 +19386,7 @@ var ts;
return finishNode(result);
}
function parseJSDocLiteralType() {
- var result = createNode(293);
+ var result = createNode(294);
result.literal = parseLiteralTypeNode();
return finishNode(result);
}
@@ -18296,10 +19425,17 @@ var ts;
if (comment) {
comment.parent = parent;
}
+ if (ts.isInJavaScriptFile(parent)) {
+ if (!sourceFile.jsDocDiagnostics) {
+ sourceFile.jsDocDiagnostics = [];
+ }
+ (_a = sourceFile.jsDocDiagnostics).push.apply(_a, parseDiagnostics);
+ }
currentToken = saveToken;
parseDiagnostics.length = saveParseDiagnosticsLength;
parseErrorBeforeNextFinishedNode = saveParseErrorBeforeNextFinishedNode;
return comment;
+ var _a;
}
JSDocParser.parseJSDocComment = parseJSDocComment;
var JSDocState;
@@ -18450,8 +19586,14 @@ var ts;
case "augments":
tag = parseAugmentsTag(atToken, tagName);
break;
+ case "class":
+ case "constructor":
+ tag = parseClassTag(atToken, tagName);
+ break;
+ case "arg":
+ case "argument":
case "param":
- tag = parseParamTag(atToken, tagName);
+ tag = parseParameterOrPropertyTag(atToken, tagName, true);
break;
case "return":
case "returns":
@@ -18558,27 +19700,23 @@ var ts;
return parseJSDocTypeExpression();
});
}
- function parseParamTag(atToken, tagName) {
- var typeExpression = tryParseTypeExpression();
- skipWhitespace();
- var name;
- var isBracketed;
- if (parseOptionalToken(21)) {
- name = parseJSDocIdentifierName();
+ function parseBracketNameInPropertyAndParamTag() {
+ var isBracketed = parseOptional(21);
+ var name = parseJSDocIdentifierName(true);
+ if (isBracketed) {
skipWhitespace();
- isBracketed = true;
if (parseOptionalToken(58)) {
parseExpression();
}
parseExpected(22);
}
- else if (ts.tokenIsIdentifierOrKeyword(token())) {
- name = parseJSDocIdentifierName();
- }
- if (!name) {
- parseErrorAtPosition(scanner.getStartPos(), 0, ts.Diagnostics.Identifier_expected);
- return undefined;
- }
+ return { name: name, isBracketed: isBracketed };
+ }
+ function parseParameterOrPropertyTag(atToken, tagName, shouldParseParamTag) {
+ var typeExpression = tryParseTypeExpression();
+ skipWhitespace();
+ var _a = parseBracketNameInPropertyAndParamTag(), name = _a.name, isBracketed = _a.isBracketed;
+ skipWhitespace();
var preName, postName;
if (typeExpression) {
postName = name;
@@ -18589,52 +19727,38 @@ var ts;
if (!typeExpression) {
typeExpression = tryParseTypeExpression();
}
- var result = createNode(286, atToken.pos);
+ var result = shouldParseParamTag ?
+ createNode(287, atToken.pos) :
+ createNode(292, atToken.pos);
result.atToken = atToken;
result.tagName = tagName;
result.preParameterName = preName;
result.typeExpression = typeExpression;
result.postParameterName = postName;
- result.parameterName = postName || preName;
+ result.name = postName || preName;
result.isBracketed = isBracketed;
return finishNode(result);
}
function parseReturnTag(atToken, tagName) {
- if (ts.forEach(tags, function (t) { return t.kind === 287; })) {
+ 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 result = createNode(287, atToken.pos);
+ var result = createNode(288, 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 === 288; })) {
+ if (ts.forEach(tags, function (t) { return t.kind === 289; })) {
parseErrorAtPosition(tagName.pos, scanner.getTokenPos() - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text);
}
- var result = createNode(288, atToken.pos);
+ var result = createNode(289, atToken.pos);
result.atToken = atToken;
result.tagName = tagName;
result.typeExpression = tryParseTypeExpression();
return finishNode(result);
}
- function parsePropertyTag(atToken, tagName) {
- var typeExpression = tryParseTypeExpression();
- skipWhitespace();
- var name = parseJSDocIdentifierName();
- skipWhitespace();
- if (!name) {
- parseErrorAtPosition(scanner.getStartPos(), 0, ts.Diagnostics.Identifier_expected);
- return undefined;
- }
- var result = createNode(291, atToken.pos);
- result.atToken = atToken;
- result.tagName = tagName;
- result.name = name;
- result.typeExpression = typeExpression;
- return finishNode(result);
- }
function parseAugmentsTag(atToken, tagName) {
var typeExpression = tryParseTypeExpression();
var result = createNode(285, atToken.pos);
@@ -18643,10 +19767,16 @@ var ts;
result.typeExpression = typeExpression;
return finishNode(result);
}
+ function parseClassTag(atToken, tagName) {
+ var tag = createNode(286, atToken.pos);
+ tag.atToken = atToken;
+ tag.tagName = tagName;
+ return finishNode(tag);
+ }
function parseTypedefTag(atToken, tagName) {
var typeExpression = tryParseTypeExpression();
skipWhitespace();
- var typedefTag = createNode(290, atToken.pos);
+ var typedefTag = createNode(291, atToken.pos);
typedefTag.atToken = atToken;
typedefTag.tagName = tagName;
typedefTag.fullName = parseJSDocTypeNameWithNamespace(0);
@@ -18667,7 +19797,7 @@ var ts;
var jsDocTypeReference = typeExpression.type;
if (jsDocTypeReference.name.kind === 71) {
var name = jsDocTypeReference.name;
- if (name.text === "Object") {
+ if (name.text === "Object" || name.text === "object") {
typedefTag.jsDocTypeLiteral = scanChildTags();
}
}
@@ -18681,7 +19811,7 @@ var ts;
}
return finishNode(typedefTag);
function scanChildTags() {
- var jsDocTypeLiteral = createNode(292, scanner.getStartPos());
+ var jsDocTypeLiteral = createNode(293, scanner.getStartPos());
var resumePos = scanner.getStartPos();
var canParseTag = true;
var seenAsterisk = false;
@@ -18727,7 +19857,7 @@ var ts;
jsDocNamespaceNode.flags |= flags;
jsDocNamespaceNode.name = typeNameOrNamespaceName;
jsDocNamespaceNode.body = parseJSDocTypeNameWithNamespace(4);
- return jsDocNamespaceNode;
+ return finishNode(jsDocNamespaceNode);
}
if (typeNameOrNamespaceName && flags & 4) {
typeNameOrNamespaceName.isInJSDocNamespace = true;
@@ -18754,7 +19884,7 @@ var ts;
return true;
case "prop":
case "property":
- var propertyTag = parsePropertyTag(atToken, tagName);
+ var propertyTag = parseParameterOrPropertyTag(atToken, tagName, false);
if (propertyTag) {
if (!parentTag.jsDocPropertyTags) {
parentTag.jsDocPropertyTags = [];
@@ -18767,7 +19897,7 @@ var ts;
return false;
}
function parseTemplateTag(atToken, tagName) {
- if (ts.forEach(tags, function (t) { return t.kind === 289; })) {
+ if (ts.forEach(tags, function (t) { return t.kind === 290; })) {
parseErrorAtPosition(tagName.pos, scanner.getTokenPos() - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text);
}
var typeParameters = createNodeArray();
@@ -18790,7 +19920,7 @@ var ts;
break;
}
}
- var result = createNode(289, atToken.pos);
+ var result = createNode(290, atToken.pos);
result.atToken = atToken;
result.tagName = tagName;
result.typeParameters = typeParameters;
@@ -18801,13 +19931,19 @@ var ts;
function nextJSDocToken() {
return currentToken = scanner.scanJSDocToken();
}
- function parseJSDocIdentifierName() {
- return createJSDocIdentifier(ts.tokenIsIdentifierOrKeyword(token()));
+ function parseJSDocIdentifierName(createIfMissing) {
+ if (createIfMissing === void 0) { createIfMissing = false; }
+ return createJSDocIdentifier(ts.tokenIsIdentifierOrKeyword(token()), createIfMissing);
}
- function createJSDocIdentifier(isIdentifier) {
+ function createJSDocIdentifier(isIdentifier, createIfMissing) {
if (!isIdentifier) {
- parseErrorAtCurrentToken(ts.Diagnostics.Identifier_expected);
- return undefined;
+ if (createIfMissing) {
+ return createMissingNode(71, true, ts.Diagnostics.Identifier_expected);
+ }
+ else {
+ parseErrorAtCurrentToken(ts.Diagnostics.Identifier_expected);
+ return undefined;
+ }
}
var pos = scanner.getTokenPos();
var end = scanner.getTextPos();
@@ -19210,7 +20346,7 @@ var ts;
inStrictMode = bindInStrictMode(file, opts);
classifiableNames = ts.createMap();
symbolCount = 0;
- skipTransformFlagAggregation = ts.isDeclarationFile(file);
+ skipTransformFlagAggregation = file.isDeclarationFile;
Symbol = ts.objectAllocator.getSymbolConstructor();
if (!file.locals) {
bind(file);
@@ -19238,7 +20374,7 @@ var ts;
}
return bindSourceFile;
function bindInStrictMode(file, opts) {
- if ((opts.alwaysStrict === undefined ? opts.strict : opts.alwaysStrict) && !ts.isDeclarationFile(file)) {
+ if ((opts.alwaysStrict === undefined ? opts.strict : opts.alwaysStrict) && !file.isDeclarationFile) {
return true;
}
else {
@@ -19271,19 +20407,20 @@ var ts;
}
}
function getDeclarationName(node) {
- if (node.name) {
+ var name = ts.getNameOfDeclaration(node);
+ if (name) {
if (ts.isAmbientModule(node)) {
- return ts.isGlobalScopeAugmentation(node) ? "__global" : "\"" + node.name.text + "\"";
+ return ts.isGlobalScopeAugmentation(node) ? "__global" : "\"" + name.text + "\"";
}
- if (node.name.kind === 144) {
- var nameExpression = node.name.expression;
+ if (name.kind === 144) {
+ var nameExpression = name.expression;
if (ts.isStringOrNumericLiteral(nameExpression)) {
return nameExpression.text;
}
ts.Debug.assert(ts.isWellKnownSymbolSyntactically(nameExpression));
return ts.getPropertyNameForKnownSymbolName(nameExpression.name.text);
}
- return node.name.text;
+ return name.text;
}
switch (node.kind) {
case 152:
@@ -19301,15 +20438,8 @@ var ts;
case 243:
return node.isExportEquals ? "export=" : "default";
case 194:
- 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;
+ if (ts.getSpecialPropertyAssignmentKind(node) === 2) {
+ return "export=";
}
ts.Debug.fail("Unknown binary declaration kind");
break;
@@ -19323,7 +20453,7 @@ var ts;
var functionType = node.parent;
var index = ts.indexOf(functionType.parameters, node);
return "arg" + index;
- case 290:
+ case 291:
var parentNode = node.parent && node.parent.parent;
var nameFromParentNode = void 0;
if (parentNode && parentNode.kind === 208) {
@@ -19379,9 +20509,9 @@ var ts;
}
}
ts.forEach(symbol.declarations, function (declaration) {
- file.bindDiagnostics.push(ts.createDiagnosticForNode(declaration.name || declaration, message_1, getDisplayName(declaration)));
+ file.bindDiagnostics.push(ts.createDiagnosticForNode(ts.getNameOfDeclaration(declaration) || declaration, message_1, getDisplayName(declaration)));
});
- file.bindDiagnostics.push(ts.createDiagnosticForNode(node.name || node, message_1, getDisplayName(node)));
+ file.bindDiagnostics.push(ts.createDiagnosticForNode(ts.getNameOfDeclaration(node) || node, message_1, getDisplayName(node)));
symbol = createSymbol(0, name);
}
}
@@ -19401,7 +20531,9 @@ var ts;
}
}
else {
- var isJSDocTypedefInJSDocNamespace = node.kind === 290 &&
+ if (node.kind === 291)
+ ts.Debug.assert(ts.isInJavaScriptFile(node));
+ var isJSDocTypedefInJSDocNamespace = node.kind === 291 &&
node.name &&
node.name.kind === 71 &&
node.name.isInJSDocNamespace;
@@ -19530,8 +20662,19 @@ var ts;
ts.forEachChild(node, bind, bindEach);
}
function bindChildrenWorker(node) {
- if (ts.isInJavaScriptFile(node) && node.jsDoc) {
- ts.forEach(node.jsDoc, bind);
+ if (node.jsDoc) {
+ if (ts.isInJavaScriptFile(node)) {
+ for (var _i = 0, _a = node.jsDoc; _i < _a.length; _i++) {
+ var j = _a[_i];
+ bind(j);
+ }
+ }
+ else {
+ for (var _b = 0, _c = node.jsDoc; _b < _c.length; _b++) {
+ var j = _c[_b];
+ setParentPointers(node, j);
+ }
+ }
}
if (checkUnreachable(node)) {
bindEachChild(node);
@@ -19601,7 +20744,7 @@ var ts;
case 283:
bindJSDocComment(node);
break;
- case 290:
+ case 291:
bindJSDocTypedefTag(node);
break;
default:
@@ -20178,13 +21321,13 @@ var ts;
}
function bindVariableDeclarationFlow(node) {
bindEachChild(node);
- if (node.initializer || node.parent.parent.kind === 215 || node.parent.parent.kind === 216) {
+ if (node.initializer || ts.isForInOrOfStatement(node.parent.parent)) {
bindInitializedVariableFlow(node);
}
}
function bindJSDocComment(node) {
ts.forEachChild(node, function (n) {
- if (n.kind !== 290) {
+ if (n.kind !== 291) {
bind(n);
}
});
@@ -20224,7 +21367,7 @@ var ts;
case 232:
case 178:
case 163:
- case 292:
+ case 293:
case 275:
case 254:
return 1;
@@ -20294,7 +21437,7 @@ var ts;
case 178:
case 230:
case 275:
- case 292:
+ case 293:
case 254:
return declareSymbol(container.symbol.members, container.symbol, node, symbolFlags, symbolExcludes);
case 160:
@@ -20582,9 +21725,8 @@ var ts;
}
node.parent = parent;
var saveInStrictMode = inStrictMode;
- if (ts.isInJavaScriptFile(node)) {
+ if (ts.isInJavaScriptFile(node))
bindJSDocTypedefTagIfAny(node);
- }
bindWorker(node);
if (node.kind > 142) {
var saveParent = parent;
@@ -20614,7 +21756,7 @@ var ts;
}
for (var _b = 0, _c = jsDoc.tags; _b < _c.length; _b++) {
var tag = _c[_b];
- if (tag.kind === 290) {
+ if (tag.kind === 291) {
var savedParent = parent;
parent = jsDoc;
bind(tag);
@@ -20646,7 +21788,7 @@ var ts;
case 71:
if (node.isInJSDocNamespace) {
var parentNode = node.parent;
- while (parentNode && parentNode.kind !== 290) {
+ while (parentNode && parentNode.kind !== 291) {
parentNode = parentNode.parent;
}
bindBlockScopedDeclaration(parentNode, 524288, 793064);
@@ -20712,10 +21854,7 @@ var ts;
return bindVariableDeclarationOrBindingElement(node);
case 149:
case 148:
- case 276:
- return bindPropertyOrMethodOrAccessor(node, 4 | (node.questionToken ? 67108864 : 0), 0);
- case 291:
- return bindJSDocProperty(node);
+ return bindPropertyWorker(node);
case 261:
case 262:
return bindPropertyOrMethodOrAccessor(node, 4, 0);
@@ -20753,13 +21892,10 @@ var ts;
return bindPropertyOrMethodOrAccessor(node, 65536, 74687);
case 160:
case 161:
- case 279:
return bindFunctionOrConstructorType(node);
case 163:
case 172:
- case 292:
- case 275:
- return bindAnonymousDeclaration(node, 2048, "__type");
+ return bindAnonymousTypeWorker(node);
case 178:
return bindObjectLiteralExpression(node);
case 186:
@@ -20776,11 +21912,6 @@ var ts;
return bindClassLikeDeclaration(node);
case 230:
return bindBlockScopedDeclaration(node, 64, 792968);
- case 290:
- if (!node.fullName || node.fullName.kind === 71) {
- return bindBlockScopedDeclaration(node, 524288, 793064);
- }
- break;
case 231:
return bindBlockScopedDeclaration(node, 524288, 793064);
case 232:
@@ -20813,8 +21944,31 @@ var ts;
}
case 234:
return updateStrictModeStatementList(node.statements);
+ case 276:
+ return bindPropertyWorker(node);
+ case 292:
+ return declareSymbolAndAddToSymbolTable(node, node.isBracketed || (node.typeExpression && node.typeExpression.type.kind === 278) ?
+ 4 | 67108864 : 4, 0);
+ case 279:
+ return bindFunctionOrConstructorType(node);
+ case 293:
+ case 275:
+ return bindAnonymousTypeWorker(node);
+ case 291: {
+ var fullName = node.fullName;
+ if (!fullName || fullName.kind === 71) {
+ return bindBlockScopedDeclaration(node, 524288, 793064);
+ }
+ break;
+ }
}
}
+ function bindPropertyWorker(node) {
+ return bindPropertyOrMethodOrAccessor(node, 4 | (node.questionToken ? 67108864 : 0), 0);
+ }
+ function bindAnonymousTypeWorker(node) {
+ return bindAnonymousDeclaration(node, 2048, "__type");
+ }
function checkTypePredicate(node) {
var parameterName = node.parameterName, type = node.type;
if (parameterName && parameterName.kind === 71) {
@@ -21031,7 +22185,7 @@ var ts;
}
}
function bindParameter(node) {
- if (inStrictMode) {
+ if (inStrictMode && !ts.isInAmbientContext(node)) {
checkStrictModeEvalOrArguments(node, node.name);
}
if (ts.isBindingPattern(node.name)) {
@@ -21046,7 +22200,7 @@ var ts;
}
}
function bindFunctionDeclaration(node) {
- if (!ts.isDeclarationFile(file) && !ts.isInAmbientContext(node)) {
+ if (!file.isDeclarationFile && !ts.isInAmbientContext(node)) {
if (ts.isAsyncFunction(node)) {
emitFlags |= 1024;
}
@@ -21061,7 +22215,7 @@ var ts;
}
}
function bindFunctionExpression(node) {
- if (!ts.isDeclarationFile(file) && !ts.isInAmbientContext(node)) {
+ if (!file.isDeclarationFile && !ts.isInAmbientContext(node)) {
if (ts.isAsyncFunction(node)) {
emitFlags |= 1024;
}
@@ -21074,10 +22228,8 @@ var ts;
return bindAnonymousDeclaration(node, 16, bindingName);
}
function bindPropertyOrMethodOrAccessor(node, symbolFlags, symbolExcludes) {
- if (!ts.isDeclarationFile(file) && !ts.isInAmbientContext(node)) {
- if (ts.isAsyncFunction(node)) {
- emitFlags |= 1024;
- }
+ if (!file.isDeclarationFile && !ts.isInAmbientContext(node) && ts.isAsyncFunction(node)) {
+ emitFlags |= 1024;
}
if (currentFlow && ts.isObjectLiteralOrClassExpressionMethod(node)) {
node.flowNode = currentFlow;
@@ -21086,9 +22238,6 @@ var ts;
? bindAnonymousDeclaration(node, symbolFlags, "__computed")
: declareSymbolAndAddToSymbolTable(node, symbolFlags, symbolExcludes);
}
- function bindJSDocProperty(node) {
- return declareSymbolAndAddToSymbolTable(node, 4, 0);
- }
function shouldReportErrorOnModuleDeclaration(node) {
var instanceState = getModuleInstanceState(node);
return instanceState === 1 || (instanceState === 2 && options.preserveConstEnums);
@@ -21187,6 +22336,9 @@ var ts;
|| isSuperOrSuperProperty(expression, expressionKind)) {
transformFlags |= 192;
}
+ if (expression.kind === 91) {
+ transformFlags |= 67108864;
+ }
node.transformFlags = transformFlags | 536870912;
return transformFlags & ~537396545;
}
@@ -21636,6 +22788,7 @@ var ts;
case 171:
case 172:
case 173:
+ case 236:
transformFlags = 3;
excludeFlags = -3;
break;
@@ -21776,6 +22929,10 @@ var ts;
}
}
ts.getTransformFlagsSubtreeExclusions = getTransformFlagsSubtreeExclusions;
+ function setParentPointers(parent, child) {
+ child.parent = parent;
+ ts.forEachChild(child, function (childsChild) { return setParentPointers(child, childsChild); });
+ }
})(ts || (ts = {}));
var ts;
(function (ts) {
@@ -21809,6 +22966,7 @@ var ts;
var Signature = ts.objectAllocator.getSignatureConstructor();
var typeCount = 0;
var symbolCount = 0;
+ var enumCount = 0;
var symbolInstantiationDepth = 0;
var emptyArray = [];
var emptySymbols = ts.createMap();
@@ -21953,13 +23111,21 @@ var ts;
tryFindAmbientModuleWithoutAugmentations: function (moduleName) {
return tryFindAmbientModule(moduleName, false);
},
- getApparentType: getApparentType
+ getApparentType: getApparentType,
+ getAllPossiblePropertiesOfType: getAllPossiblePropertiesOfType,
+ getSuggestionForNonexistentProperty: getSuggestionForNonexistentProperty,
+ getSuggestionForNonexistentSymbol: getSuggestionForNonexistentSymbol,
+ getBaseConstraintOfType: getBaseConstraintOfType,
+ getJsxNamespace: getJsxNamespace,
+ resolveNameAtLocation: function (location, name, meaning) {
+ location = ts.getParseTreeNode(location);
+ return resolveName(location, name, meaning, undefined, name);
+ },
};
var tupleTypes = [];
var unionTypes = ts.createMap();
var intersectionTypes = ts.createMap();
- var stringLiteralTypes = ts.createMap();
- var numericLiteralTypes = ts.createMap();
+ var literalTypes = ts.createMap();
var indexedAccessTypes = ts.createMap();
var evolvingArrayTypes = [];
var unknownSymbol = createSymbol(4, "unknown");
@@ -22032,11 +23198,13 @@ var ts;
var flowLoopStart = 0;
var flowLoopCount = 0;
var visitedFlowCount = 0;
- var emptyStringType = getLiteralTypeForText(32, "");
- var zeroType = getLiteralTypeForText(64, "0");
+ var emptyStringType = getLiteralType("");
+ var zeroType = getLiteralType(0);
var resolutionTargets = [];
var resolutionResults = [];
var resolutionPropertyNames = [];
+ var suggestionCount = 0;
+ var maximumSuggestionCount = 10;
var mergedSymbols = [];
var symbolLinks = [];
var nodeLinks = [];
@@ -22293,16 +23461,16 @@ var ts;
recordMergedSymbol(target, source);
}
else if (target.flags & 1024) {
- error(source.declarations[0].name, ts.Diagnostics.Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity, symbolToString(target));
+ error(ts.getNameOfDeclaration(source.declarations[0]), 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;
ts.forEach(source.declarations, function (node) {
- error(node.name ? node.name : node, message_2, symbolToString(source));
+ error(ts.getNameOfDeclaration(node) || node, message_2, symbolToString(source));
});
ts.forEach(target.declarations, function (node) {
- error(node.name ? node.name : node, message_2, symbolToString(source));
+ error(ts.getNameOfDeclaration(node) || node, message_2, symbolToString(source));
});
}
}
@@ -22375,9 +23543,6 @@ 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 === 265 && !ts.isExternalOrCommonJsModule(node);
}
@@ -22385,7 +23550,7 @@ var ts;
if (meaning) {
var symbol = symbols.get(name);
if (symbol) {
- ts.Debug.assert((getCheckFlags(symbol) & 1) === 0, "Should never get an instantiated symbol here.");
+ ts.Debug.assert((ts.getCheckFlags(symbol) & 1) === 0, "Should never get an instantiated symbol here.");
if (symbol.flags & meaning) {
return symbol;
}
@@ -22413,7 +23578,9 @@ var ts;
var useFile = ts.getSourceFileOfNode(usage);
if (declarationFile !== useFile) {
if ((modulekind && (declarationFile.externalModuleIndicator || useFile.externalModuleIndicator)) ||
- (!compilerOptions.outFile && !compilerOptions.out)) {
+ (!compilerOptions.outFile && !compilerOptions.out) ||
+ isInTypeQuery(usage) ||
+ ts.isInAmbientContext(declaration)) {
return true;
}
if (isUsedInFunctionOrInstanceProperty(usage, declaration)) {
@@ -22452,14 +23619,7 @@ var ts;
}
break;
}
- switch (declaration.parent.parent.kind) {
- case 215:
- case 216:
- if (isSameScopeDescendentOf(usage, declaration.parent.parent.expression, container)) {
- return true;
- }
- }
- return false;
+ return ts.isForInOrOfStatement(declaration.parent.parent) && isSameScopeDescendentOf(usage, declaration.parent.parent.expression, container);
}
function isUsedInFunctionOrInstanceProperty(usage, declaration, container) {
return !!ts.findAncestor(usage, function (current) {
@@ -22488,7 +23648,11 @@ var ts;
});
}
}
- function resolveName(location, name, meaning, nameNotFoundMessage, nameArg) {
+ function resolveName(location, name, meaning, nameNotFoundMessage, nameArg, suggestedNameNotFoundMessage) {
+ return resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, getSymbol, suggestedNameNotFoundMessage);
+ }
+ function resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, lookup, suggestedNameNotFoundMessage) {
+ var originalLocation = location;
var result;
var lastLocation;
var propertyWithInvalidInitializer;
@@ -22497,7 +23661,7 @@ var ts;
var isInExternalModule = false;
loop: while (location) {
if (location.locals && !isGlobalSourceFile(location)) {
- if (result = getSymbol(location.locals, name, meaning)) {
+ if (result = lookup(location.locals, name, meaning)) {
var useResult = true;
if (ts.isFunctionLike(location) && lastLocation && lastLocation !== location.body) {
if (meaning & result.flags & 793064 && lastLocation.kind !== 283) {
@@ -22544,12 +23708,12 @@ var ts;
break;
}
}
- if (result = getSymbol(moduleExports, name, meaning & 8914931)) {
+ if (result = lookup(moduleExports, name, meaning & 8914931)) {
break loop;
}
break;
case 232:
- if (result = getSymbol(getSymbolOfNode(location).exports, name, meaning & 8)) {
+ if (result = lookup(getSymbolOfNode(location).exports, name, meaning & 8)) {
break loop;
}
break;
@@ -22558,7 +23722,7 @@ var ts;
if (ts.isClassLike(location.parent) && !(ts.getModifierFlags(location) & 32)) {
var ctor = findConstructorDeclaration(location.parent);
if (ctor && ctor.locals) {
- if (getSymbol(ctor.locals, name, meaning & 107455)) {
+ if (lookup(ctor.locals, name, meaning & 107455)) {
propertyWithInvalidInitializer = location;
}
}
@@ -22567,7 +23731,7 @@ var ts;
case 229:
case 199:
case 230:
- if (result = getSymbol(getSymbolOfNode(location).members, name, meaning & 793064)) {
+ if (result = lookup(getSymbolOfNode(location).members, name, meaning & 793064)) {
if (!isTypeParameterSymbolDeclaredInContainer(result, location)) {
result = undefined;
break;
@@ -22589,7 +23753,7 @@ var ts;
case 144:
grandparent = location.parent.parent;
if (ts.isClassLike(grandparent) || grandparent.kind === 230) {
- if (result = getSymbol(getSymbolOfNode(grandparent).members, name, meaning & 793064)) {
+ if (result = lookup(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;
}
@@ -22636,7 +23800,7 @@ var ts;
result.isReferenced = true;
}
if (!result) {
- result = getSymbol(globals, name, meaning);
+ result = lookup(globals, name, meaning);
}
if (!result) {
if (nameNotFoundMessage) {
@@ -22646,7 +23810,17 @@ var ts;
!checkAndReportErrorForUsingTypeAsNamespace(errorLocation, name, meaning) &&
!checkAndReportErrorForUsingTypeAsValue(errorLocation, name, meaning) &&
!checkAndReportErrorForUsingNamespaceModuleAsValue(errorLocation, name, meaning)) {
- error(errorLocation, nameNotFoundMessage, typeof nameArg === "string" ? nameArg : ts.declarationNameToString(nameArg));
+ var suggestion = void 0;
+ if (suggestedNameNotFoundMessage && suggestionCount < maximumSuggestionCount) {
+ suggestion = getSuggestionForNonexistentSymbol(originalLocation, name, meaning);
+ if (suggestion) {
+ error(errorLocation, suggestedNameNotFoundMessage, typeof nameArg === "string" ? nameArg : ts.declarationNameToString(nameArg), suggestion);
+ }
+ }
+ if (!suggestion) {
+ error(errorLocation, nameNotFoundMessage, typeof nameArg === "string" ? nameArg : ts.declarationNameToString(nameArg));
+ }
+ suggestionCount++;
}
}
return undefined;
@@ -22657,8 +23831,9 @@ 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 ||
- ((meaning & 32 || meaning & 384) && (meaning & 107455) === 107455)) {
+ if (errorLocation &&
+ (meaning & 2 ||
+ ((meaning & 32 || meaning & 384) && (meaning & 107455) === 107455))) {
var exportOrLocalSymbol = getExportSymbolOfValueSymbolIfExported(result);
if (exportOrLocalSymbol.flags & 2 || exportOrLocalSymbol.flags & 32 || exportOrLocalSymbol.flags & 384) {
checkResolvedBlockScopedVariable(exportOrLocalSymbol, errorLocation);
@@ -22743,6 +23918,10 @@ var ts;
}
function checkAndReportErrorForUsingTypeAsValue(errorLocation, name, meaning) {
if (meaning & (107455 & ~1024)) {
+ if (name === "any" || name === "string" || name === "number" || name === "boolean" || name === "never") {
+ error(errorLocation, ts.Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here, name);
+ return true;
+ }
var symbol = resolveSymbol(resolveName(errorLocation, name, 793064 & ~107455, undefined, undefined));
if (symbol && !(symbol.flags & 1024)) {
error(errorLocation, ts.Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here, name);
@@ -22774,13 +23953,13 @@ var ts;
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));
+ error(errorLocation, ts.Diagnostics.Block_scoped_variable_0_used_before_its_declaration, ts.declarationNameToString(ts.getNameOfDeclaration(declaration)));
}
else if (result.flags & 32) {
- error(errorLocation, ts.Diagnostics.Class_0_used_before_its_declaration, ts.declarationNameToString(declaration.name));
+ error(errorLocation, ts.Diagnostics.Class_0_used_before_its_declaration, ts.declarationNameToString(ts.getNameOfDeclaration(declaration)));
}
- else if (result.flags & 384) {
- error(errorLocation, ts.Diagnostics.Enum_0_used_before_its_declaration, ts.declarationNameToString(declaration.name));
+ else if (result.flags & 256) {
+ error(errorLocation, ts.Diagnostics.Enum_0_used_before_its_declaration, ts.declarationNameToString(ts.getNameOfDeclaration(declaration)));
}
}
}
@@ -22792,7 +23971,7 @@ var ts;
if (node.kind === 237) {
return node;
}
- return ts.findAncestor(node, function (n) { return n.kind === 238; });
+ return ts.findAncestor(node, ts.isImportDeclaration);
}
}
function getDeclarationOfAliasSymbol(symbol) {
@@ -22831,6 +24010,9 @@ var ts;
return resolveESModuleSymbol(resolveExternalModuleName(node, moduleSpecifier), moduleSpecifier, dontResolveAlias);
}
function combineValueAndTypeSymbols(valueSymbol, typeSymbol) {
+ if (valueSymbol === unknownSymbol && typeSymbol === unknownSymbol) {
+ return unknownSymbol;
+ }
if (valueSymbol.flags & (793064 | 1920)) {
return valueSymbol;
}
@@ -22895,10 +24077,10 @@ var ts;
function getTargetOfNamespaceExportDeclaration(node, dontResolveAlias) {
return resolveExternalModuleSymbol(node.parent.symbol, dontResolveAlias);
}
- function getTargetOfExportSpecifier(node, dontResolveAlias) {
+ function getTargetOfExportSpecifier(node, meaning, dontResolveAlias) {
return node.parent.parent.moduleSpecifier ?
getExternalModuleMember(node.parent.parent, node, dontResolveAlias) :
- resolveEntityName(node.propertyName || node.name, 107455 | 793064 | 1920, false, dontResolveAlias);
+ resolveEntityName(node.propertyName || node.name, meaning, false, dontResolveAlias);
}
function getTargetOfExportAssignment(node, dontResolveAlias) {
return resolveEntityName(node.expression, 107455 | 793064 | 1920, false, dontResolveAlias);
@@ -22914,15 +24096,19 @@ var ts;
case 242:
return getTargetOfImportSpecifier(node, dontRecursivelyResolve);
case 246:
- return getTargetOfExportSpecifier(node, dontRecursivelyResolve);
+ return getTargetOfExportSpecifier(node, 107455 | 793064 | 1920, dontRecursivelyResolve);
case 243:
return getTargetOfExportAssignment(node, dontRecursivelyResolve);
case 236:
return getTargetOfNamespaceExportDeclaration(node, dontRecursivelyResolve);
}
}
+ function isNonLocalAlias(symbol, excludes) {
+ if (excludes === void 0) { excludes = 107455 | 793064 | 1920; }
+ return symbol && (symbol.flags & (8388608 | excludes)) === 8388608;
+ }
function resolveSymbol(symbol, dontResolveAlias) {
- var shouldResolve = !dontResolveAlias && symbol && symbol.flags & 8388608 && !(symbol.flags & (107455 | 793064 | 1920));
+ var shouldResolve = !dontResolveAlias && isNonLocalAlias(symbol);
return shouldResolve ? resolveAlias(symbol) : symbol;
}
function resolveAlias(symbol) {
@@ -23036,7 +24222,7 @@ var ts;
else {
ts.Debug.fail("Unknown entity name kind.");
}
- ts.Debug.assert((getCheckFlags(symbol) & 1) === 0, "Should never get an instantiated symbol here.");
+ ts.Debug.assert((ts.getCheckFlags(symbol) & 1) === 0, "Should never get an instantiated symbol here.");
return (symbol.flags & meaning) || dontResolveAlias ? symbol : resolveAlias(symbol);
}
function resolveExternalModuleName(location, moduleReferenceExpression) {
@@ -23056,6 +24242,11 @@ var ts;
if (moduleName === undefined) {
return;
}
+ if (ts.startsWith(moduleReference, "@types/")) {
+ var diag = ts.Diagnostics.Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1;
+ var withoutAtTypePrefix = ts.removePrefix(moduleReference, "@types/");
+ error(errorNode, diag, withoutAtTypePrefix, moduleReference);
+ }
var ambientModule = tryFindAmbientModule(moduleName, true);
if (ambientModule) {
return ambientModule;
@@ -23085,7 +24276,9 @@ var ts;
error(errorNode, diag, moduleReference, resolvedModule.resolvedFileName);
}
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);
+ var errorInfo = ts.chainDiagnosticMessages(undefined, ts.Diagnostics.Try_npm_install_types_Slash_0_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0, moduleReference);
+ errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type, moduleReference, resolvedModule.resolvedFileName);
+ diagnostics.add(ts.createDiagnosticForNodeFromMessageChain(errorNode, errorInfo));
}
return undefined;
}
@@ -23113,7 +24306,6 @@ var ts;
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;
}
@@ -23223,8 +24415,8 @@ var ts;
}
function findConstructorDeclaration(node) {
var members = node.members;
- for (var _i = 0, members_1 = members; _i < members_1.length; _i++) {
- var member = members_1[_i];
+ for (var _i = 0, members_2 = members; _i < members_2.length; _i++) {
+ var member = members_2[_i];
if (member.kind === 152 && ts.nodeIsPresent(member.body)) {
return member;
}
@@ -23254,7 +24446,7 @@ var ts;
return type;
}
function createTypeofType() {
- return getUnionType(ts.convertToArray(typeofEQFacts.keys(), function (s) { return getLiteralTypeForText(32, s); }));
+ return getUnionType(ts.convertToArray(typeofEQFacts.keys(), getLiteralType));
}
function isReservedMemberName(name) {
return name.charCodeAt(0) === 95 &&
@@ -23350,7 +24542,7 @@ var ts;
if (!useOnlyExternalAliasing ||
ts.forEach(symbolFromSymbolTable.declarations, ts.isExternalModuleImportEqualsDeclaration)) {
var resolvedImportedSymbol = resolveAlias(symbolFromSymbolTable);
- if (isAccessible(symbolFromSymbolTable, resolveAlias(symbolFromSymbolTable))) {
+ if (isAccessible(symbolFromSymbolTable, resolvedImportedSymbol)) {
return [symbolFromSymbolTable];
}
var accessibleSymbolsFromExports = resolvedImportedSymbol.exports ? getAccessibleSymbolChainFromSymbolTableWorker(resolvedImportedSymbol.exports, visitedSymbolTables) : undefined;
@@ -23524,34 +24716,59 @@ var ts;
return result;
}
function typeToString(type, enclosingDeclaration, flags) {
- var writer = ts.getSingleLineStringWriter();
- getSymbolDisplayBuilder().buildTypeDisplay(type, writer, enclosingDeclaration, flags);
- var result = writer.string();
- ts.releaseStringWriter(writer);
- var maxLength = compilerOptions.noErrorTruncation || flags & 4 ? undefined : 100;
+ var typeNode = nodeBuilder.typeToTypeNode(type, enclosingDeclaration, toNodeBuilderFlags(flags) | ts.NodeBuilderFlags.IgnoreErrors | ts.NodeBuilderFlags.WriteTypeParametersInQualifiedName);
+ ts.Debug.assert(typeNode !== undefined, "should always get typenode");
+ var options = { removeComments: true };
+ var writer = ts.createTextWriter("");
+ var printer = ts.createPrinter(options);
+ var sourceFile = enclosingDeclaration && ts.getSourceFileOfNode(enclosingDeclaration);
+ printer.writeNode(3, typeNode, sourceFile, writer);
+ var result = writer.getText();
+ var maxLength = compilerOptions.noErrorTruncation || flags & 8 ? undefined : 100;
if (maxLength && result.length >= maxLength) {
- result = result.substr(0, maxLength - "...".length) + "...";
+ return result.substr(0, maxLength - "...".length) + "...";
}
return result;
+ function toNodeBuilderFlags(flags) {
+ var result = ts.NodeBuilderFlags.None;
+ if (!flags) {
+ return result;
+ }
+ if (flags & 8) {
+ result |= ts.NodeBuilderFlags.NoTruncation;
+ }
+ if (flags & 256) {
+ result |= ts.NodeBuilderFlags.UseFullyQualifiedType;
+ }
+ if (flags & 4096) {
+ result |= ts.NodeBuilderFlags.SuppressAnyReturnType;
+ }
+ if (flags & 1) {
+ result |= ts.NodeBuilderFlags.WriteArrayAsGenericType;
+ }
+ if (flags & 64) {
+ result |= ts.NodeBuilderFlags.WriteTypeArgumentsOfSignature;
+ }
+ return result;
+ }
}
function createNodeBuilder() {
- var context;
return {
typeToTypeNode: function (type, enclosingDeclaration, flags) {
- context = createNodeBuilderContext(enclosingDeclaration, flags);
- var resultingNode = typeToTypeNodeHelper(type);
+ var context = createNodeBuilderContext(enclosingDeclaration, flags);
+ var resultingNode = typeToTypeNodeHelper(type, context);
var result = context.encounteredError ? undefined : resultingNode;
return result;
},
indexInfoToIndexSignatureDeclaration: function (indexInfo, kind, enclosingDeclaration, flags) {
- context = createNodeBuilderContext(enclosingDeclaration, flags);
- var resultingNode = indexInfoToIndexSignatureDeclarationHelper(indexInfo, kind);
+ var context = createNodeBuilderContext(enclosingDeclaration, flags);
+ var resultingNode = indexInfoToIndexSignatureDeclarationHelper(indexInfo, kind, context);
var result = context.encounteredError ? undefined : resultingNode;
return result;
},
signatureToSignatureDeclaration: function (signature, kind, enclosingDeclaration, flags) {
- context = createNodeBuilderContext(enclosingDeclaration, flags);
- var resultingNode = signatureToSignatureDeclarationHelper(signature, kind);
+ var context = createNodeBuilderContext(enclosingDeclaration, flags);
+ var resultingNode = signatureToSignatureDeclarationHelper(signature, kind, context);
var result = context.encounteredError ? undefined : resultingNode;
return result;
}
@@ -23561,12 +24778,12 @@ var ts;
enclosingDeclaration: enclosingDeclaration,
flags: flags,
encounteredError: false,
- inObjectTypeLiteral: false,
- checkAlias: true,
symbolStack: undefined
};
}
- function typeToTypeNodeHelper(type) {
+ function typeToTypeNodeHelper(type, context) {
+ var inTypeAlias = context.flags & ts.NodeBuilderFlags.InTypeAlias;
+ context.flags &= ~ts.NodeBuilderFlags.InTypeAlias;
if (!type) {
context.encounteredError = true;
return undefined;
@@ -23583,23 +24800,25 @@ var ts;
if (type.flags & 8) {
return ts.createKeywordTypeNode(122);
}
- if (type.flags & 16) {
- var name = symbolToName(type.symbol, false);
+ if (type.flags & 256 && !(type.flags & 65536)) {
+ var parentSymbol = getParentOfSymbol(type.symbol);
+ var parentName = symbolToName(parentSymbol, context, 793064, false);
+ var enumLiteralName = getDeclaredTypeOfSymbol(parentSymbol) === type ? parentName : ts.createQualifiedName(parentName, getNameOfSymbol(type.symbol, context));
+ return ts.createTypeReferenceNode(enumLiteralName, undefined);
+ }
+ if (type.flags & 272) {
+ var name = symbolToName(type.symbol, context, 793064, false);
return ts.createTypeReferenceNode(name, undefined);
}
if (type.flags & (32)) {
- return ts.createLiteralTypeNode((ts.createLiteral(type.text)));
+ return ts.createLiteralTypeNode(ts.setEmitFlags(ts.createLiteral(type.value), 16777216));
}
if (type.flags & (64)) {
- return ts.createLiteralTypeNode((ts.createNumericLiteral(type.text)));
+ return ts.createLiteralTypeNode((ts.createLiteral(type.value)));
}
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(105);
}
@@ -23619,8 +24838,8 @@ var ts;
return ts.createKeywordTypeNode(134);
}
if (type.flags & 16384 && type.isThisType) {
- if (context.inObjectTypeLiteral) {
- if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.allowThisInObjectLiteral)) {
+ if (context.flags & ts.NodeBuilderFlags.InObjectTypeLiteral) {
+ if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.AllowThisInObjectLiteral)) {
context.encounteredError = true;
}
}
@@ -23631,72 +24850,53 @@ var ts;
ts.Debug.assert(!!(type.flags & 32768));
return typeReferenceToTypeNode(type);
}
- if (objectFlags & 3) {
- ts.Debug.assert(!!(type.flags & 32768));
- var name = symbolToName(type.symbol, false);
+ if (type.flags & 16384 || objectFlags & 3) {
+ var name = symbolToName(type.symbol, context, 793064, 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);
+ if (!inTypeAlias && type.aliasSymbol &&
+ isSymbolAccessible(type.aliasSymbol, context.enclosingDeclaration, 793064, false).accessibility === 0) {
+ var name = symbolToTypeReferenceName(type.aliasSymbol);
+ var typeArgumentNodes = mapToTypeNodes(type.aliasTypeArguments, context);
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(166, unionTypeNodes);
+ if (type.flags & (65536 | 131072)) {
+ var types = type.flags & 65536 ? formatUnionTypes(type.types) : type.types;
+ var typeNodes = mapToTypeNodes(types, context);
+ if (typeNodes && typeNodes.length > 0) {
+ var unionOrIntersectionTypeNode = ts.createUnionOrIntersectionTypeNode(type.flags & 65536 ? 166 : 167, typeNodes);
+ return unionOrIntersectionTypeNode;
}
else {
- if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.allowEmptyUnionOrIntersection)) {
+ if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.AllowEmptyUnionOrIntersection)) {
context.encounteredError = true;
}
return undefined;
}
}
- if (type.flags & 131072) {
- return ts.createUnionOrIntersectionTypeNode(167, 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);
+ var indexTypeNode = typeToTypeNodeHelper(indexedType, context);
return ts.createTypeOperatorNode(indexTypeNode);
}
if (type.flags & 524288) {
- var objectTypeNode = typeToTypeNodeHelper(type.objectType);
- var indexTypeNode = typeToTypeNodeHelper(type.indexType);
+ var objectTypeNode = typeToTypeNodeHelper(type.objectType, context);
+ var indexTypeNode = typeToTypeNodeHelper(type.indexType, context);
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(131) : undefined;
var questionToken = type.declaration && type.declaration.questionToken ? ts.createToken(55) : undefined;
- return ts.createMappedTypeNode(readonlyToken, typeParameterNode, questionToken, templateTypeNode);
+ var typeParameterNode = typeParameterToDeclaration(getTypeParameterFromMappedType(type), context);
+ var templateTypeNode = typeToTypeNodeHelper(getTemplateTypeFromMappedType(type), context);
+ var mappedTypeNode = ts.createMappedTypeNode(readonlyToken, typeParameterNode, questionToken, templateTypeNode);
+ return ts.setEmitFlags(mappedTypeNode, 1);
}
function createAnonymousTypeNode(type) {
var symbol = type.symbol;
@@ -23704,12 +24904,12 @@ var ts;
if (symbol.flags & 32 && !getBaseTypeVariableOfClass(symbol) ||
symbol.flags & (384 | 512) ||
shouldWriteTypeOfFunctionSymbol()) {
- return createTypeQueryNodeFromSymbol(symbol);
+ return createTypeQueryNodeFromSymbol(symbol, 107455);
}
else if (ts.contains(context.symbolStack, symbol)) {
var typeAlias = getTypeAliasForTypeLiteral(type);
if (typeAlias) {
- var entityName = symbolToName(typeAlias, false);
+ var entityName = symbolToName(typeAlias, context, 793064, false);
return ts.createTypeReferenceNode(entityName, undefined);
}
else {
@@ -23751,41 +24951,52 @@ var ts;
var resolved = resolveStructuredTypeMembers(type);
if (!resolved.properties.length && !resolved.stringIndexInfo && !resolved.numberIndexInfo) {
if (!resolved.callSignatures.length && !resolved.constructSignatures.length) {
- return ts.createTypeLiteralNode(undefined);
+ return ts.setEmitFlags(ts.createTypeLiteralNode(undefined), 1);
}
if (resolved.callSignatures.length === 1 && !resolved.constructSignatures.length) {
var signature = resolved.callSignatures[0];
- return signatureToSignatureDeclarationHelper(signature, 160);
+ var signatureNode = signatureToSignatureDeclarationHelper(signature, 160, context);
+ return signatureNode;
}
if (resolved.constructSignatures.length === 1 && !resolved.callSignatures.length) {
var signature = resolved.constructSignatures[0];
- return signatureToSignatureDeclarationHelper(signature, 161);
+ var signatureNode = signatureToSignatureDeclarationHelper(signature, 161, context);
+ return signatureNode;
}
}
- var saveInObjectTypeLiteral = context.inObjectTypeLiteral;
- context.inObjectTypeLiteral = true;
+ var savedFlags = context.flags;
+ context.flags |= ts.NodeBuilderFlags.InObjectTypeLiteral;
var members = createTypeNodesFromResolvedType(resolved);
- context.inObjectTypeLiteral = saveInObjectTypeLiteral;
- return ts.createTypeLiteralNode(members);
+ context.flags = savedFlags;
+ var typeLiteralNode = ts.createTypeLiteralNode(members);
+ return ts.setEmitFlags(typeLiteralNode, 1);
}
- function createTypeQueryNodeFromSymbol(symbol) {
- var entityName = symbolToName(symbol, false);
+ function createTypeQueryNodeFromSymbol(symbol, symbolFlags) {
+ var entityName = symbolToName(symbol, context, symbolFlags, false);
return ts.createTypeQueryNode(entityName);
}
+ function symbolToTypeReferenceName(symbol) {
+ var entityName = symbol.flags & 32 || !isReservedMemberName(symbol.name) ? symbolToName(symbol, context, 793064, false) : ts.createIdentifier("");
+ return entityName;
+ }
function typeReferenceToTypeNode(type) {
var typeArguments = type.typeArguments || emptyArray;
if (type.target === globalArrayType) {
- var elementType = typeToTypeNodeHelper(typeArguments[0]);
+ if (context.flags & ts.NodeBuilderFlags.WriteArrayAsGenericType) {
+ var typeArgumentNode = typeToTypeNodeHelper(typeArguments[0], context);
+ return ts.createTypeReferenceNode("Array", [typeArgumentNode]);
+ }
+ var elementType = typeToTypeNodeHelper(typeArguments[0], context);
return ts.createArrayTypeNode(elementType);
}
else if (type.target.objectFlags & 8) {
if (typeArguments.length > 0) {
- var tupleConstituentNodes = mapToTypeNodeArray(typeArguments.slice(0, getTypeReferenceArity(type)));
+ var tupleConstituentNodes = mapToTypeNodes(typeArguments.slice(0, getTypeReferenceArity(type)), context);
if (tupleConstituentNodes && tupleConstituentNodes.length > 0) {
return ts.createTupleTypeNode(tupleConstituentNodes);
}
}
- if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.allowEmptyTuple)) {
+ if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.AllowEmptyTuple)) {
context.encounteredError = true;
}
return undefined;
@@ -23793,7 +25004,7 @@ var ts;
else {
var outerTypeParameters = type.target.outerTypeParameters;
var i = 0;
- var qualifiedName = undefined;
+ var qualifiedName = void 0;
if (outerTypeParameters) {
var length_1 = outerTypeParameters.length;
while (i < length_1) {
@@ -23803,48 +25014,72 @@ var ts;
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 {
+ var typeArgumentSlice = mapToTypeNodes(typeArguments.slice(start, i), context);
+ var typeArgumentNodes_1 = typeArgumentSlice && ts.createNodeArray(typeArgumentSlice);
+ var namePart = symbolToTypeReferenceName(parent);
+ (namePart.kind === 71 ? namePart : namePart.right).typeArguments = typeArgumentNodes_1;
+ if (qualifiedName) {
ts.Debug.assert(!qualifiedName.right);
- qualifiedName.right = qualifiedNamePart;
+ qualifiedName = addToQualifiedNameMissingRightIdentifier(qualifiedName, namePart);
qualifiedName = ts.createQualifiedName(qualifiedName, undefined);
}
+ else {
+ qualifiedName = ts.createQualifiedName(namePart, undefined);
+ }
}
}
}
var entityName = undefined;
- var nameIdentifier = symbolToName(type.symbol, true);
+ var nameIdentifier = symbolToTypeReferenceName(type.symbol);
if (qualifiedName) {
ts.Debug.assert(!qualifiedName.right);
- qualifiedName.right = nameIdentifier;
+ qualifiedName = addToQualifiedNameMissingRightIdentifier(qualifiedName, 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;
+ var typeArgumentNodes = void 0;
+ if (typeArguments.length > 0) {
+ var typeParameterCount = (type.target.typeParameters || emptyArray).length;
+ typeArgumentNodes = mapToTypeNodes(typeArguments.slice(i, typeParameterCount), context);
+ }
+ if (typeArgumentNodes) {
+ var lastIdentifier = entityName.kind === 71 ? entityName : entityName.right;
+ lastIdentifier.typeArguments = undefined;
+ }
return ts.createTypeReferenceNode(entityName, typeArgumentNodes);
}
}
+ function addToQualifiedNameMissingRightIdentifier(left, right) {
+ ts.Debug.assert(left.right === undefined);
+ if (right.kind === 71) {
+ left.right = right;
+ return left;
+ }
+ var rightPart = right;
+ while (rightPart.left.kind !== 71) {
+ rightPart = rightPart.left;
+ }
+ left.right = rightPart.left;
+ rightPart.left = left;
+ return right;
+ }
function createTypeNodesFromResolvedType(resolvedType) {
var typeElements = [];
for (var _i = 0, _a = resolvedType.callSignatures; _i < _a.length; _i++) {
var signature = _a[_i];
- typeElements.push(signatureToSignatureDeclarationHelper(signature, 155));
+ typeElements.push(signatureToSignatureDeclarationHelper(signature, 155, context));
}
for (var _b = 0, _c = resolvedType.constructSignatures; _b < _c.length; _b++) {
var signature = _c[_b];
- typeElements.push(signatureToSignatureDeclarationHelper(signature, 156));
+ typeElements.push(signatureToSignatureDeclarationHelper(signature, 156, context));
}
if (resolvedType.stringIndexInfo) {
- typeElements.push(indexInfoToIndexSignatureDeclarationHelper(resolvedType.stringIndexInfo, 0));
+ typeElements.push(indexInfoToIndexSignatureDeclarationHelper(resolvedType.stringIndexInfo, 0, context));
}
if (resolvedType.numberIndexInfo) {
- typeElements.push(indexInfoToIndexSignatureDeclarationHelper(resolvedType.numberIndexInfo, 1));
+ typeElements.push(indexInfoToIndexSignatureDeclarationHelper(resolvedType.numberIndexInfo, 1, context));
}
var properties = resolvedType.properties;
if (!properties) {
@@ -23853,74 +25088,126 @@ var ts;
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 saveEnclosingDeclaration = context.enclosingDeclaration;
+ context.enclosingDeclaration = undefined;
+ var propertyName = symbolToName(propertySymbol, context, 107455, true);
+ context.enclosingDeclaration = saveEnclosingDeclaration;
var optionalToken = propertySymbol.flags & 67108864 ? ts.createToken(55) : 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, 150);
+ var methodDeclaration = signatureToSignatureDeclarationHelper(signature, 150, context);
methodDeclaration.name = propertyName;
methodDeclaration.questionToken = optionalToken;
typeElements.push(methodDeclaration);
}
}
else {
- var propertyTypeNode = propertyType ? typeToTypeNodeHelper(propertyType) : ts.createKeywordTypeNode(119);
- typeElements.push(ts.createPropertySignature(propertyName, optionalToken, propertyTypeNode, undefined));
+ var propertyTypeNode = propertyType ? typeToTypeNodeHelper(propertyType, context) : ts.createKeywordTypeNode(119);
+ var modifiers = isReadonlySymbol(propertySymbol) ? [ts.createToken(131)] : undefined;
+ var propertySignature = ts.createPropertySignature(modifiers, propertyName, optionalToken, propertyTypeNode, undefined);
+ typeElements.push(propertySignature);
}
}
return typeElements.length ? typeElements : undefined;
}
}
- function indexInfoToIndexSignatureDeclarationHelper(indexInfo, kind) {
+ function mapToTypeNodes(types, context) {
+ if (ts.some(types)) {
+ var result = [];
+ for (var i = 0; i < types.length; ++i) {
+ var type = types[i];
+ var typeNode = typeToTypeNodeHelper(type, context);
+ if (typeNode) {
+ result.push(typeNode);
+ }
+ }
+ return result;
+ }
+ }
+ function indexInfoToIndexSignatureDeclarationHelper(indexInfo, kind, context) {
+ var name = ts.getNameFromIndexInfo(indexInfo) || "x";
var indexerTypeNode = ts.createKeywordTypeNode(kind === 0 ? 136 : 133);
- 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(131)] : undefined, [indexingParameter], typeNode);
+ var typeNode = typeToTypeNodeHelper(indexInfo.type, context);
+ return ts.createIndexSignature(undefined, indexInfo.isReadonly ? [ts.createToken(131)] : 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); });
+ function signatureToSignatureDeclarationHelper(signature, kind, context) {
+ var typeParameters = signature.typeParameters && signature.typeParameters.map(function (parameter) { return typeParameterToDeclaration(parameter, context); });
+ var parameters = signature.parameters.map(function (parameter) { return symbolToParameterDeclaration(parameter, context); });
+ if (signature.thisParameter) {
+ var thisParameter = symbolToParameterDeclaration(signature.thisParameter, context);
+ parameters.unshift(thisParameter);
+ }
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);
+ var parameterName = typePredicate.kind === 1 ?
+ ts.setEmitFlags(ts.createIdentifier(typePredicate.parameterName), 16777216) :
+ ts.createThisTypeNode();
+ var typeNode = typeToTypeNodeHelper(typePredicate.type, context);
returnTypeNode = ts.createTypePredicateNode(parameterName, typeNode);
}
else {
var returnType = getReturnTypeOfSignature(signature);
- returnTypeNode = returnType && typeToTypeNodeHelper(returnType);
+ returnTypeNode = returnType && typeToTypeNodeHelper(returnType, context);
+ }
+ if (context.flags & ts.NodeBuilderFlags.SuppressAnyReturnType) {
+ if (returnTypeNode && returnTypeNode.kind === 119) {
+ returnTypeNode = undefined;
+ }
+ }
+ else if (!returnTypeNode) {
+ returnTypeNode = ts.createKeywordTypeNode(119);
}
- var returnTypeNodeExceptAny = returnTypeNode && returnTypeNode.kind !== 119 ? returnTypeNode : undefined;
- return ts.createSignatureDeclaration(kind, typeParameters, parameters, returnTypeNodeExceptAny);
+ return ts.createSignatureDeclaration(kind, typeParameters, parameters, returnTypeNode);
}
- function typeParameterToDeclaration(type) {
+ function typeParameterToDeclaration(type, context) {
+ var name = symbolToName(type.symbol, context, 793064, true);
var constraint = getConstraintFromTypeParameter(type);
- var constraintNode = constraint && typeToTypeNodeHelper(constraint);
+ var constraintNode = constraint && typeToTypeNodeHelper(constraint, context);
var defaultParameter = getDefaultFromTypeParameter(type);
- var defaultParameterNode = defaultParameter && typeToTypeNodeHelper(defaultParameter);
- var name = symbolToName(type.symbol, true);
+ var defaultParameterNode = defaultParameter && typeToTypeNodeHelper(defaultParameter, context);
return ts.createTypeParameterDeclaration(name, constraintNode, defaultParameterNode);
}
- function symbolToParameterDeclaration(parameterSymbol) {
+ function symbolToParameterDeclaration(parameterSymbol, context) {
var parameterDeclaration = ts.getDeclarationOfKind(parameterSymbol, 146);
+ if (isTransientSymbol(parameterSymbol) && parameterSymbol.isRestParameter) {
+ return ts.createParameter(undefined, undefined, parameterSymbol.isRestParameter ? ts.createToken(24) : undefined, "args", undefined, typeToTypeNodeHelper(anyArrayType, context), undefined);
+ }
+ var modifiers = parameterDeclaration.modifiers && parameterDeclaration.modifiers.map(ts.getSynthesizedClone);
+ var dotDotDotToken = ts.isRestParameter(parameterDeclaration) ? ts.createToken(24) : undefined;
+ var name = parameterDeclaration.name ?
+ parameterDeclaration.name.kind === 71 ?
+ ts.setEmitFlags(ts.getSynthesizedClone(parameterDeclaration.name), 16777216) :
+ cloneBindingName(parameterDeclaration.name) :
+ parameterSymbol.name;
+ var questionToken = isOptionalParameter(parameterDeclaration) ? ts.createToken(55) : undefined;
var parameterType = getTypeOfSymbol(parameterSymbol);
- var parameterTypeNode = typeToTypeNodeHelper(parameterType);
- var parameterNode = ts.createParameter(parameterDeclaration.decorators, parameterDeclaration.modifiers, parameterDeclaration.dotDotDotToken && ts.createToken(24), ts.getSynthesizedClone(parameterDeclaration.name), parameterDeclaration.questionToken && ts.createToken(55), parameterTypeNode, parameterDeclaration.initializer);
+ if (isRequiredInitializedParameter(parameterDeclaration)) {
+ parameterType = getNullableType(parameterType, 2048);
+ }
+ var parameterTypeNode = typeToTypeNodeHelper(parameterType, context);
+ var parameterNode = ts.createParameter(undefined, modifiers, dotDotDotToken, name, questionToken, parameterTypeNode, undefined);
return parameterNode;
+ function cloneBindingName(node) {
+ return elideInitializerAndSetEmitFlags(node);
+ function elideInitializerAndSetEmitFlags(node) {
+ var visited = ts.visitEachChild(node, elideInitializerAndSetEmitFlags, ts.nullTransformationContext, undefined, elideInitializerAndSetEmitFlags);
+ var clone = ts.nodeIsSynthesized(visited) ? visited : ts.getSynthesizedClone(visited);
+ if (clone.kind === 176) {
+ clone.initializer = undefined;
+ }
+ return ts.setEmitFlags(clone, 1 | 16777216);
+ }
+ }
}
- function symbolToName(symbol, expectsIdentifier) {
+ function symbolToName(symbol, context, meaning, expectsIdentifier) {
var chain;
var isTypeParameter = symbol.flags & 262144;
- if (!isTypeParameter && context.enclosingDeclaration) {
- chain = getSymbolChain(symbol, 0, true);
+ if (!isTypeParameter && (context.enclosingDeclaration || context.flags & ts.NodeBuilderFlags.UseFullyQualifiedType)) {
+ chain = getSymbolChain(symbol, meaning, true);
ts.Debug.assert(chain && chain.length > 0);
}
else {
@@ -23928,18 +25215,18 @@ var ts;
}
if (expectsIdentifier && chain.length !== 1
&& !context.encounteredError
- && !(context.flags & ts.NodeBuilderFlags.allowQualifedNameInPlaceOfIdentifier)) {
+ && !(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 typeParameterNodes;
+ if (context.flags & ts.NodeBuilderFlags.WriteTypeParametersInQualifiedName && index > 0) {
var parentSymbol = chain[index - 1];
var typeParameters = void 0;
- if (getCheckFlags(symbol) & 1) {
+ if (ts.getCheckFlags(symbol) & 1) {
typeParameters = getTypeParametersOfClassOrInterface(parentSymbol);
}
else {
@@ -23948,20 +25235,10 @@ var ts;
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);
- }
+ typeParameterNodes = mapToTypeNodes(typeParameters, context);
}
- var symbolName = getNameOfSymbol(symbol);
- var symbolNameWithTypeParameters = typeParameterString.length > 0 ? symbolName + "<" + typeParameterString + ">" : symbolName;
- var identifier = ts.createIdentifier(symbolNameWithTypeParameters);
+ var symbolName = getNameOfSymbol(symbol, context);
+ var identifier = ts.setEmitFlags(ts.createIdentifier(symbolName, typeParameterNodes), 16777216);
return index > 0 ? ts.createQualifiedName(createEntityNameFromSymbolChain(chain, index - 1), identifier) : identifier;
}
function getSymbolChain(symbol, meaning, endOfChain) {
@@ -23987,28 +25264,29 @@ var ts;
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 === 226) {
- return ts.declarationNameToString(declaration.parent.name);
- }
- if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.allowAnonymousIdentifier)) {
- context.encounteredError = true;
- }
- switch (declaration.kind) {
- case 199:
- return "(Anonymous class)";
- case 186:
- case 187:
- return "(Anonymous function)";
- }
+ }
+ function getNameOfSymbol(symbol, context) {
+ var declaration = ts.firstOrUndefined(symbol.declarations);
+ if (declaration) {
+ var name = ts.getNameOfDeclaration(declaration);
+ if (name) {
+ return ts.declarationNameToString(name);
+ }
+ if (declaration.parent && declaration.parent.kind === 226) {
+ return ts.declarationNameToString(declaration.parent.name);
+ }
+ if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.AllowAnonymousIdentifier)) {
+ context.encounteredError = true;
+ }
+ switch (declaration.kind) {
+ case 199:
+ return "(Anonymous class)";
+ case 186:
+ case 187:
+ return "(Anonymous function)";
}
- return symbol.name;
}
+ return symbol.name;
}
}
function typePredicateToString(typePredicate, enclosingDeclaration, flags) {
@@ -24026,12 +25304,14 @@ var ts;
flags |= t.flags;
if (!(t.flags & 6144)) {
if (t.flags & (128 | 256)) {
- var baseType = t.flags & 128 ? booleanType : t.baseType;
- var count = baseType.types.length;
- if (i + count <= types.length && types[i + count - 1] === baseType.types[count - 1]) {
- result.push(baseType);
- i += count - 1;
- continue;
+ var baseType = t.flags & 128 ? booleanType : getBaseTypeOfEnumLiteralType(t);
+ if (baseType.flags & 65536) {
+ var count = baseType.types.length;
+ if (i + count <= types.length && types[i + count - 1] === baseType.types[count - 1]) {
+ result.push(baseType);
+ i += count - 1;
+ continue;
+ }
}
}
result.push(t);
@@ -24067,13 +25347,14 @@ var ts;
ts.isExternalModuleAugmentation(node.parent.parent);
}
function literalTypeToString(type) {
- return type.flags & 32 ? "\"" + ts.escapeString(type.text) + "\"" : type.text;
+ return type.flags & 32 ? "\"" + ts.escapeString(type.value) + "\"" : "" + type.value;
}
function getNameOfSymbol(symbol) {
if (symbol.declarations && symbol.declarations.length) {
var declaration = symbol.declarations[0];
- if (declaration.name) {
- return ts.declarationNameToString(declaration.name);
+ var name = ts.getNameOfDeclaration(declaration);
+ if (name) {
+ return ts.declarationNameToString(name);
}
if (declaration.parent && declaration.parent.kind === 226) {
return ts.declarationNameToString(declaration.parent.name);
@@ -24116,8 +25397,9 @@ var ts;
function appendParentTypeArgumentsAndSymbolName(symbol) {
if (parentSymbol) {
if (flags & 1) {
- if (getCheckFlags(symbol) & 1) {
- buildDisplayForTypeArgumentsAndDelimiters(getTypeParametersOfClassOrInterface(parentSymbol), symbol.mapper, writer, enclosingDeclaration);
+ if (ts.getCheckFlags(symbol) & 1) {
+ var params = getTypeParametersOfClassOrInterface(parentSymbol.flags & 8388608 ? resolveAlias(parentSymbol) : parentSymbol);
+ buildDisplayForTypeArgumentsAndDelimiters(params, symbol.mapper, writer, enclosingDeclaration);
}
else {
buildTypeParameterDisplayFromSymbol(parentSymbol, writer, enclosingDeclaration);
@@ -24153,7 +25435,7 @@ var ts;
}
}
var isTypeParameter = symbol.flags & 262144;
- var typeFormatFlag = 128 & typeFlags;
+ var typeFormatFlag = 256 & typeFlags;
if (!isTypeParameter && (enclosingDeclaration || typeFormatFlag)) {
walkSymbol(symbol, meaning, true);
}
@@ -24162,13 +25444,13 @@ var ts;
}
}
function buildTypeDisplay(type, writer, enclosingDeclaration, globalFlags, symbolStack) {
- var globalFlagsToPass = globalFlags & 16;
+ var globalFlagsToPass = globalFlags & (32 | 16384);
var inObjectTypeLiteral = false;
return writeType(type, globalFlags);
function writeType(type, flags) {
- var nextFlags = flags & ~512;
+ var nextFlags = flags & ~1024;
if (type.flags & 16793231) {
- writer.writeKeyword(!(globalFlags & 16) && isTypeAny(type)
+ writer.writeKeyword(!(globalFlags & 32) && isTypeAny(type)
? "any"
: type.intrinsicName);
}
@@ -24181,15 +25463,18 @@ var ts;
else if (getObjectFlags(type) & 4) {
writeTypeReference(type, nextFlags);
}
- else if (type.flags & 256) {
- buildSymbolDisplay(getParentOfSymbol(type.symbol), writer, enclosingDeclaration, 793064, 0, nextFlags);
- writePunctuation(writer, 23);
- appendSymbolNameOnly(type.symbol, writer);
+ else if (type.flags & 256 && !(type.flags & 65536)) {
+ var parent = getParentOfSymbol(type.symbol);
+ buildSymbolDisplay(parent, writer, enclosingDeclaration, 793064, 0, nextFlags);
+ if (getDeclaredTypeOfSymbol(parent) !== type) {
+ writePunctuation(writer, 23);
+ appendSymbolNameOnly(type.symbol, writer);
+ }
}
- else if (getObjectFlags(type) & 3 || type.flags & (16 | 16384)) {
+ else if (getObjectFlags(type) & 3 || type.flags & (272 | 16384)) {
buildSymbolDisplay(type.symbol, writer, enclosingDeclaration, 793064, 0, nextFlags);
}
- else if (!(flags & 512) && type.aliasSymbol &&
+ else if (!(flags & 1024) && type.aliasSymbol &&
isSymbolAccessible(type.aliasSymbol, enclosingDeclaration, 793064, false).accessibility === 0) {
var typeArguments = type.aliasTypeArguments;
writeSymbolTypeReference(type.aliasSymbol, typeArguments, 0, ts.length(typeArguments), nextFlags);
@@ -24204,12 +25489,18 @@ var ts;
writer.writeStringLiteral(literalTypeToString(type));
}
else if (type.flags & 262144) {
+ if (flags & 128) {
+ writePunctuation(writer, 19);
+ }
writer.writeKeyword("keyof");
writeSpace(writer);
- writeType(type.type, 64);
+ writeType(type.type, 128);
+ if (flags & 128) {
+ writePunctuation(writer, 20);
+ }
}
else if (type.flags & 524288) {
- writeType(type.objectType, 64);
+ writeType(type.objectType, 128);
writePunctuation(writer, 21);
writeType(type.indexType, 0);
writePunctuation(writer, 22);
@@ -24231,7 +25522,7 @@ var ts;
writePunctuation(writer, delimiter);
writeSpace(writer);
}
- writeType(types[i], delimiter === 26 ? 0 : 64);
+ writeType(types[i], delimiter === 26 ? 0 : 128);
}
}
function writeSymbolTypeReference(symbol, typeArguments, pos, end, flags) {
@@ -24240,7 +25531,7 @@ var ts;
}
if (pos < end) {
writePunctuation(writer, 27);
- writeType(typeArguments[pos], 256);
+ writeType(typeArguments[pos], 512);
pos++;
while (pos < end) {
writePunctuation(writer, 26);
@@ -24254,7 +25545,7 @@ var ts;
function writeTypeReference(type, flags) {
var typeArguments = type.typeArguments || emptyArray;
if (type.target === globalArrayType && !(flags & 1)) {
- writeType(typeArguments[0], 64);
+ writeType(typeArguments[0], 128);
writePunctuation(writer, 21);
writePunctuation(writer, 22);
}
@@ -24263,6 +25554,11 @@ var ts;
writeTypeList(type.typeArguments.slice(0, getTypeReferenceArity(type)), 26);
writePunctuation(writer, 22);
}
+ else if (flags & 16384 &&
+ type.symbol.valueDeclaration &&
+ type.symbol.valueDeclaration.kind === 199) {
+ writeAnonymousType(getDeclaredTypeOfClassOrInterface(type.symbol), flags);
+ }
else {
var outerTypeParameters = type.target.outerTypeParameters;
var i = 0;
@@ -24285,7 +25581,7 @@ var ts;
}
}
function writeUnionOrIntersectionType(type, flags) {
- if (flags & 64) {
+ if (flags & 128) {
writePunctuation(writer, 19);
}
if (type.flags & 65536) {
@@ -24294,14 +25590,16 @@ var ts;
else {
writeTypeList(type.types, 48);
}
- if (flags & 64) {
+ if (flags & 128) {
writePunctuation(writer, 20);
}
}
function writeAnonymousType(type, flags) {
var symbol = type.symbol;
if (symbol) {
- if (symbol.flags & 32 && !getBaseTypeVariableOfClass(symbol) ||
+ if (symbol.flags & 32 &&
+ !getBaseTypeVariableOfClass(symbol) &&
+ !(symbol.valueDeclaration.kind === 199 && flags & 16384) ||
symbol.flags & (384 | 512)) {
writeTypeOfSymbol(type, flags);
}
@@ -24321,9 +25619,17 @@ var ts;
if (!symbolStack) {
symbolStack = [];
}
- symbolStack.push(symbol);
- writeLiteralType(type, flags);
- symbolStack.pop();
+ var isConstructorObject = type.flags & 32768 &&
+ getObjectFlags(type) & 16 &&
+ type.symbol && type.symbol.flags & 32;
+ if (isConstructorObject) {
+ writeLiteralType(type, flags);
+ }
+ else {
+ symbolStack.push(symbol);
+ writeLiteralType(type, flags);
+ symbolStack.pop();
+ }
}
}
else {
@@ -24338,7 +25644,7 @@ var ts;
return declaration.parent.kind === 265 || declaration.parent.kind === 234;
}));
if (isStaticMethodSymbol || isNonLocalFunctionSymbol) {
- return !!(flags & 2) ||
+ return !!(flags & 4) ||
(ts.contains(symbolStack, symbol));
}
}
@@ -24359,11 +25665,11 @@ var ts;
}
}
function shouldAddParenthesisAroundFunctionType(callSignature, flags) {
- if (flags & 64) {
+ if (flags & 128) {
return true;
}
- else if (flags & 256) {
- var typeParameters = callSignature.target && (flags & 32) ?
+ else if (flags & 512) {
+ var typeParameters = callSignature.target && (flags & 64) ?
callSignature.target.typeParameters : callSignature.typeParameters;
return typeParameters && typeParameters.length !== 0;
}
@@ -24388,20 +25694,20 @@ var ts;
if (parenthesizeSignature) {
writePunctuation(writer, 19);
}
- buildSignatureDisplay(resolved.callSignatures[0], writer, enclosingDeclaration, globalFlagsToPass | 8, undefined, symbolStack);
+ buildSignatureDisplay(resolved.callSignatures[0], writer, enclosingDeclaration, globalFlagsToPass | 16, undefined, symbolStack);
if (parenthesizeSignature) {
writePunctuation(writer, 20);
}
return;
}
if (resolved.constructSignatures.length === 1 && !resolved.callSignatures.length) {
- if (flags & 64) {
+ if (flags & 128) {
writePunctuation(writer, 19);
}
writeKeyword(writer, 94);
writeSpace(writer);
- buildSignatureDisplay(resolved.constructSignatures[0], writer, enclosingDeclaration, globalFlagsToPass | 8, undefined, symbolStack);
- if (flags & 64) {
+ buildSignatureDisplay(resolved.constructSignatures[0], writer, enclosingDeclaration, globalFlagsToPass | 16, undefined, symbolStack);
+ if (flags & 128) {
writePunctuation(writer, 20);
}
return;
@@ -24434,6 +25740,14 @@ var ts;
buildIndexSignatureDisplay(resolved.numberIndexInfo, writer, 1, enclosingDeclaration, globalFlags, symbolStack);
for (var _d = 0, _e = resolved.properties; _d < _e.length; _d++) {
var p = _e[_d];
+ if (globalFlags & 16384) {
+ if (p.flags & 16777216) {
+ continue;
+ }
+ if (ts.getDeclarationModifierFlagsFromSymbol(p) & (8 | 16)) {
+ writer.reportPrivateInBaseOfClassExpression(p.name);
+ }
+ }
var t = getTypeOfSymbol(p);
if (p.flags & (16 | 8192) && !getPropertiesOfObjectType(t).length) {
var signatures = getSignaturesOfType(t, 0);
@@ -24449,7 +25763,7 @@ var ts;
writePropertyWithModifiers(p);
writePunctuation(writer, 56);
writeSpace(writer);
- writeType(t, 0);
+ writeType(t, globalFlags & 16384);
writePunctuation(writer, 25);
writer.writeLine();
}
@@ -24523,7 +25837,7 @@ var ts;
writeSpace(writer);
var type = getTypeOfSymbol(p);
if (parameterNode && isRequiredInitializedParameter(parameterNode)) {
- type = includeFalsyTypes(type, 2048);
+ type = getNullableType(type, 2048);
}
buildTypeDisplay(type, writer, enclosingDeclaration, flags, symbolStack);
}
@@ -24582,7 +25896,7 @@ var ts;
function buildDisplayForTypeArgumentsAndDelimiters(typeParameters, mapper, writer, enclosingDeclaration) {
if (typeParameters && typeParameters.length) {
writePunctuation(writer, 27);
- var flags = 256;
+ var flags = 512;
for (var i = 0; i < typeParameters.length; i++) {
if (i > 0) {
writePunctuation(writer, 26);
@@ -24622,10 +25936,10 @@ var ts;
}
function buildReturnTypeDisplay(signature, writer, enclosingDeclaration, flags, symbolStack) {
var returnType = getReturnTypeOfSignature(signature);
- if (flags & 2048 && isTypeAny(returnType)) {
+ if (flags & 4096 && isTypeAny(returnType)) {
return;
}
- if (flags & 8) {
+ if (flags & 16) {
writeSpace(writer);
writePunctuation(writer, 36);
}
@@ -24645,7 +25959,7 @@ var ts;
writeKeyword(writer, 94);
writeSpace(writer);
}
- if (signature.target && (flags & 32)) {
+ if (signature.target && (flags & 64)) {
buildDisplayForTypeArgumentsAndDelimiters(signature.target.typeParameters, signature.mapper, writer, enclosingDeclaration);
}
else {
@@ -24774,10 +26088,7 @@ var ts;
exportSymbol = resolveName(node.parent, node.text, 107455 | 793064 | 1920 | 8388608, ts.Diagnostics.Cannot_find_name_0, node);
}
else if (node.parent.kind === 246) {
- var exportSpecifier = node.parent;
- exportSymbol = exportSpecifier.parent.parent.moduleSpecifier ?
- getExternalModuleMember(exportSpecifier.parent.parent, exportSpecifier) :
- resolveEntityName(exportSpecifier.propertyName || exportSpecifier.name, 107455 | 793064 | 1920 | 8388608);
+ exportSymbol = getTargetOfExportSpecifier(node.parent, 107455 | 793064 | 1920 | 8388608);
}
var result = [];
if (exportSymbol) {
@@ -24898,7 +26209,7 @@ var ts;
for (var _a = 0, _b = getPropertiesOfType(source); _a < _b.length; _a++) {
var prop = _b[_a];
var inNamesToRemove = names.has(prop.name);
- var isPrivate = getDeclarationModifierFlagsFromSymbol(prop) & (8 | 16);
+ var isPrivate = ts.getDeclarationModifierFlagsFromSymbol(prop) & (8 | 16);
var isSetOnlyAccessor = prop.flags & 65536 && !(prop.flags & 32768);
if (!inNamesToRemove && !isPrivate && !isClassMethod(prop) && !isSetOnlyAccessor) {
members.set(prop.name, prop);
@@ -24998,15 +26309,9 @@ var ts;
return expr.kind === 177 && expr.elements.length === 0;
}
function addOptionality(type, optional) {
- return strictNullChecks && optional ? includeFalsyTypes(type, 2048) : type;
+ return strictNullChecks && optional ? getNullableType(type, 2048) : type;
}
function getTypeForVariableLikeDeclaration(declaration, includeOptionality) {
- if (declaration.flags & 65536) {
- var type = getTypeForDeclarationFromJSDocComment(declaration);
- if (type && type !== unknownType) {
- return type;
- }
- }
if (declaration.parent.parent.kind === 215) {
var indexType = getIndexType(checkNonNullExpression(declaration.parent.parent.expression));
return indexType.flags & (16384 | 262144) ? indexType : stringType;
@@ -25018,8 +26323,9 @@ var ts;
if (ts.isBindingPattern(declaration.parent)) {
return getTypeForBindingElement(declaration);
}
- if (declaration.type) {
- var declaredType = getTypeFromTypeNode(declaration.type);
+ var typeNode = ts.getEffectiveTypeAnnotationNode(declaration);
+ if (typeNode) {
+ var declaredType = getTypeFromTypeNode(typeNode);
return addOptionality(declaredType, declaration.questionToken && includeOptionality);
}
if ((noImplicitAny || declaration.flags & 65536) &&
@@ -25076,6 +26382,7 @@ var ts;
var types = [];
var definedInConstructor = false;
var definedInMethod = false;
+ var jsDocType;
for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
var declaration = _a[_i];
var expression = declaration.kind === 194 ? declaration :
@@ -25092,16 +26399,23 @@ var ts;
definedInMethod = true;
}
}
- if (expression.flags & 65536) {
- var type = getTypeForDeclarationFromJSDocComment(expression.parent);
- if (type && type !== unknownType) {
- types.push(getWidenedType(type));
- continue;
+ var type_1 = getTypeForDeclarationFromJSDocComment(expression.parent);
+ if (type_1) {
+ var declarationType = getWidenedType(type_1);
+ if (!jsDocType) {
+ jsDocType = declarationType;
}
+ else if (jsDocType !== unknownType && declarationType !== unknownType && !isTypeIdenticalTo(jsDocType, declarationType)) {
+ var name = ts.getNameOfDeclaration(declaration);
+ error(name, ts.Diagnostics.Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2, ts.declarationNameToString(name), typeToString(jsDocType), typeToString(declarationType));
+ }
+ }
+ else if (!jsDocType) {
+ types.push(getWidenedLiteralType(checkExpressionCached(expression.right)));
}
- types.push(getWidenedLiteralType(checkExpressionCached(expression.right)));
}
- return getWidenedType(addOptionality(getUnionType(types, true), definedInMethod && !definedInConstructor));
+ var type = jsDocType || getUnionType(types, true);
+ return getWidenedType(addOptionality(type, definedInMethod && !definedInConstructor));
}
function getTypeFromBindingElement(element, includePatternInType, reportErrors) {
if (element.initializer) {
@@ -25201,7 +26515,7 @@ var ts;
if (declaration.kind === 243) {
return links.type = checkExpression(declaration.expression);
}
- if (declaration.flags & 65536 && declaration.kind === 291 && declaration.typeExpression) {
+ if (declaration.flags & 65536 && declaration.kind === 292 && declaration.typeExpression) {
return links.type = getTypeFromTypeNode(declaration.typeExpression.type);
}
if (!pushTypeResolution(symbol, 0)) {
@@ -25225,10 +26539,11 @@ var ts;
function getAnnotatedAccessorType(accessor) {
if (accessor) {
if (accessor.kind === 153) {
- return accessor.type && getTypeFromTypeNode(accessor.type);
+ var getterTypeAnnotation = ts.getEffectiveReturnTypeNode(accessor);
+ return getterTypeAnnotation && getTypeFromTypeNode(getterTypeAnnotation);
}
else {
- var setterTypeAnnotation = ts.getSetAccessorTypeAnnotationNode(accessor);
+ var setterTypeAnnotation = ts.getEffectiveSetAccessorTypeAnnotationNode(accessor);
return setterTypeAnnotation && getTypeFromTypeNode(setterTypeAnnotation);
}
}
@@ -25311,7 +26626,7 @@ var ts;
links.type = baseTypeVariable ? getIntersectionType([type, baseTypeVariable]) : type;
}
else {
- links.type = strictNullChecks && symbol.flags & 67108864 ? includeFalsyTypes(type, 2048) : type;
+ links.type = strictNullChecks && symbol.flags & 67108864 ? getNullableType(type, 2048) : type;
}
}
}
@@ -25357,7 +26672,7 @@ var ts;
return links.type;
}
function reportCircularityError(symbol) {
- if (symbol.valueDeclaration.type) {
+ if (ts.getEffectiveTypeAnnotationNode(symbol.valueDeclaration)) {
error(symbol.valueDeclaration, ts.Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol));
return unknownType;
}
@@ -25367,7 +26682,7 @@ var ts;
return anyType;
}
function getTypeOfSymbol(symbol) {
- if (getCheckFlags(symbol) & 1) {
+ if (ts.getCheckFlags(symbol) & 1) {
return getTypeOfInstantiatedSymbol(symbol);
}
if (symbol.flags & (3 | 4)) {
@@ -25486,11 +26801,8 @@ var ts;
}
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;
+ var typeArguments = ts.map(typeArgumentNodes, getTypeFromTypeNode);
+ return ts.sameMap(signatures, function (sig) { return ts.some(sig.typeParameters) ? getSignatureInstantiation(sig, typeArguments) : sig; });
}
function getBaseConstructorTypeOfClass(type) {
if (!type.resolvedBaseConstructorType) {
@@ -25543,11 +26855,12 @@ var ts;
return;
}
var baseTypeNode = getBaseTypeNodeOfClass(type);
+ var typeArgs = typeArgumentsFromTypeReferenceNode(baseTypeNode);
var baseType;
var originalBaseType = baseConstructorType && baseConstructorType.symbol ? getDeclaredTypeOfSymbol(baseConstructorType.symbol) : undefined;
if (baseConstructorType.symbol && baseConstructorType.symbol.flags & 32 &&
areAllOuterTypeParametersApplied(originalBaseType)) {
- baseType = getTypeFromClassOrInterfaceReference(baseTypeNode, baseConstructorType.symbol);
+ baseType = getTypeFromClassOrInterfaceReference(baseTypeNode, baseConstructorType.symbol, typeArgs);
}
else if (baseConstructorType.flags & 1) {
baseType = baseConstructorType;
@@ -25681,7 +26994,7 @@ var ts;
if (!pushTypeResolution(symbol, 2)) {
return unknownType;
}
- var declaration = ts.getDeclarationOfKind(symbol, 290);
+ var declaration = ts.getDeclarationOfKind(symbol, 291);
var type = void 0;
if (declaration) {
if (declaration.jsDocTypeLiteral) {
@@ -25711,77 +27024,80 @@ var ts;
}
return links.declaredType;
}
- function isLiteralEnumMember(symbol, member) {
+ function isLiteralEnumMember(member) {
var expr = member.initializer;
if (!expr) {
return !ts.isInAmbientContext(member);
}
- return expr.kind === 8 ||
+ return expr.kind === 9 || expr.kind === 8 ||
expr.kind === 192 && expr.operator === 38 &&
expr.operand.kind === 8 ||
- expr.kind === 71 && !!symbol.exports.get(expr.text);
+ expr.kind === 71 && (ts.nodeIsMissing(expr) || !!getSymbolOfNode(member.parent).exports.get(expr.text));
}
- function enumHasLiteralMembers(symbol) {
+ function getEnumKind(symbol) {
+ var links = getSymbolLinks(symbol);
+ if (links.enumKind !== undefined) {
+ return links.enumKind;
+ }
+ var hasNonLiteralMember = false;
for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
var declaration = _a[_i];
if (declaration.kind === 232) {
for (var _b = 0, _c = declaration.members; _b < _c.length; _b++) {
var member = _c[_b];
- if (!isLiteralEnumMember(symbol, member)) {
- return false;
+ if (member.initializer && member.initializer.kind === 9) {
+ return links.enumKind = 1;
+ }
+ if (!isLiteralEnumMember(member)) {
+ hasNonLiteralMember = true;
}
}
}
}
- return true;
+ return links.enumKind = hasNonLiteralMember ? 0 : 1;
}
- function createEnumLiteralType(symbol, baseType, text) {
- var type = createType(256);
- type.symbol = symbol;
- type.baseType = baseType;
- type.text = text;
- return type;
+ function getBaseTypeOfEnumLiteralType(type) {
+ return type.flags & 256 && !(type.flags & 65536) ? getDeclaredTypeOfSymbol(getParentOfSymbol(type.symbol)) : type;
}
function getDeclaredTypeOfEnum(symbol) {
var links = getSymbolLinks(symbol);
- if (!links.declaredType) {
- var enumType = links.declaredType = createType(16);
- enumType.symbol = symbol;
- if (enumHasLiteralMembers(symbol)) {
- var memberTypeList = [];
- var memberTypes = [];
- for (var _i = 0, _a = enumType.symbol.declarations; _i < _a.length; _i++) {
- var declaration = _a[_i];
- if (declaration.kind === 232) {
- computeEnumMemberValues(declaration);
- for (var _b = 0, _c = declaration.members; _b < _c.length; _b++) {
- var member = _c[_b];
- var memberSymbol = getSymbolOfNode(member);
- var value = getEnumMemberValue(member);
- if (!memberTypes[value]) {
- var memberType = memberTypes[value] = createEnumLiteralType(memberSymbol, enumType, "" + value);
- memberTypeList.push(memberType);
- }
- }
+ if (links.declaredType) {
+ return links.declaredType;
+ }
+ if (getEnumKind(symbol) === 1) {
+ enumCount++;
+ var memberTypeList = [];
+ for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
+ var declaration = _a[_i];
+ if (declaration.kind === 232) {
+ for (var _b = 0, _c = declaration.members; _b < _c.length; _b++) {
+ var member = _c[_b];
+ var memberType = getLiteralType(getEnumMemberValue(member), enumCount, getSymbolOfNode(member));
+ getSymbolLinks(getSymbolOfNode(member)).declaredType = memberType;
+ memberTypeList.push(memberType);
}
}
- enumType.memberTypes = memberTypes;
- if (memberTypeList.length > 1) {
- enumType.flags |= 65536;
- enumType.types = memberTypeList;
- unionTypes.set(getTypeListId(memberTypeList), enumType);
+ }
+ if (memberTypeList.length) {
+ var enumType_1 = getUnionType(memberTypeList, false, symbol, undefined);
+ if (enumType_1.flags & 65536) {
+ enumType_1.flags |= 256;
+ enumType_1.symbol = symbol;
}
+ return links.declaredType = enumType_1;
}
}
- return links.declaredType;
+ var enumType = createType(16);
+ enumType.symbol = symbol;
+ return links.declaredType = enumType;
}
function getDeclaredTypeOfEnumMember(symbol) {
var links = getSymbolLinks(symbol);
if (!links.declaredType) {
var enumType = getDeclaredTypeOfEnum(getParentOfSymbol(symbol));
- links.declaredType = enumType.flags & 65536 ?
- enumType.memberTypes[getEnumMemberValue(symbol.valueDeclaration)] :
- enumType;
+ if (!links.declaredType) {
+ links.declaredType = enumType;
+ }
}
return links.declaredType;
}
@@ -25855,11 +27171,15 @@ var ts;
return false;
}
function isIndependentVariableLikeDeclaration(node) {
- return node.type && isIndependentType(node.type) || !node.type && !node.initializer;
+ var typeNode = ts.getEffectiveTypeAnnotationNode(node);
+ return typeNode ? isIndependentType(typeNode) : !node.initializer;
}
function isIndependentFunctionLikeDeclaration(node) {
- if (node.kind !== 152 && (!node.type || !isIndependentType(node.type))) {
- return false;
+ if (node.kind !== 152) {
+ var typeNode = ts.getEffectiveReturnTypeNode(node);
+ if (!typeNode || !isIndependentType(typeNode)) {
+ return false;
+ }
}
for (var _i = 0, _a = node.parameters; _i < _a.length; _i++) {
var parameter = _a[_i];
@@ -26013,7 +27333,7 @@ var ts;
}
var baseTypeNode = getBaseTypeNodeOfClass(classType);
var isJavaScript = ts.isInJavaScriptFile(baseTypeNode);
- var typeArguments = ts.map(baseTypeNode.typeArguments, getTypeFromTypeNode);
+ var typeArguments = typeArgumentsFromTypeReferenceNode(baseTypeNode);
var typeArgCount = ts.length(typeArguments);
var result = [];
for (var _i = 0, baseSignatures_1 = baseSignatures; _i < baseSignatures_1.length; _i++) {
@@ -26090,8 +27410,8 @@ var ts;
function getUnionIndexInfo(types, kind) {
var indexTypes = [];
var isAnyReadonly = false;
- for (var _i = 0, types_2 = types; _i < types_2.length; _i++) {
- var type = types_2[_i];
+ for (var _i = 0, types_1 = types; _i < types_1.length; _i++) {
+ var type = types_1[_i];
var indexInfo = getIndexInfoOfType(type, kind);
if (!indexInfo) {
return undefined;
@@ -26235,7 +27555,7 @@ var ts;
var templateMapper = type.mapper ? combineTypeMappers(type.mapper, iterationMapper) : iterationMapper;
var propType = instantiateType(templateType, templateMapper);
if (t.flags & 32) {
- var propName = t.text;
+ var propName = t.value;
var modifiersProp = getPropertyOfType(modifiersType, propName);
var isOptional = templateOptional || !!(modifiersProp && modifiersProp.flags & 67108864);
var prop = createSymbol(4 | (isOptional ? 67108864 : 0), propName);
@@ -26243,6 +27563,7 @@ var ts;
prop.type = propType;
if (propertySymbol) {
prop.syntheticOrigin = propertySymbol;
+ prop.declarations = propertySymbol.declarations;
}
members.set(propName, prop);
}
@@ -26355,6 +27676,27 @@ var ts;
getPropertiesOfUnionOrIntersectionType(type) :
getPropertiesOfObjectType(type);
}
+ function getAllPossiblePropertiesOfType(type) {
+ if (type.flags & 65536) {
+ var props = ts.createMap();
+ for (var _i = 0, _a = type.types; _i < _a.length; _i++) {
+ var memberType = _a[_i];
+ if (memberType.flags & 8190) {
+ continue;
+ }
+ for (var _b = 0, _c = getPropertiesOfType(memberType); _b < _c.length; _b++) {
+ var name = _c[_b].name;
+ if (!props.has(name)) {
+ props.set(name, createUnionOrIntersectionProperty(type, name));
+ }
+ }
+ }
+ return ts.arrayFrom(props.values());
+ }
+ else {
+ return getPropertiesOfType(type);
+ }
+ }
function getConstraintOfType(type) {
return type.flags & 16384 ? getConstraintOfTypeParameter(type) :
type.flags & 524288 ? getConstraintOfIndexedAccess(type) :
@@ -26411,8 +27753,8 @@ var ts;
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];
+ for (var _i = 0, types_2 = types; _i < types_2.length; _i++) {
+ var type_2 = types_2[_i];
var baseType = getBaseConstraint(type_2);
if (baseType) {
baseTypes.push(baseType);
@@ -26444,7 +27786,7 @@ var ts;
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; });
+ var defaultDeclaration = typeParameter.symbol && ts.forEach(typeParameter.symbol.declarations, function (decl) { return ts.isTypeParameterDeclaration(decl) && decl.default; });
typeParameter.default = defaultDeclaration ? getTypeFromTypeNode(defaultDeclaration) : noConstraintType;
}
}
@@ -26454,7 +27796,7 @@ var ts;
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 & 84 ? globalNumberType :
t.flags & 136 ? globalBooleanType :
t.flags & 512 ? getGlobalESSymbolType(languageVersion >= 2) :
t.flags & 16777216 ? emptyObjectType :
@@ -26468,12 +27810,12 @@ var ts;
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];
+ for (var _i = 0, types_3 = types; _i < types_3.length; _i++) {
+ var current = types_3[_i];
var type = getApparentType(current);
if (type !== unknownType) {
var prop = getPropertyOfType(type, name);
- var modifiers = prop ? getDeclarationModifierFlagsFromSymbol(prop) : 0;
+ var modifiers = prop ? ts.getDeclarationModifierFlagsFromSymbol(prop) : 0;
if (prop && !(modifiers & excludeModifiers)) {
commonFlags &= prop.flags;
if (!props) {
@@ -26539,7 +27881,7 @@ var ts;
}
function getPropertyOfUnionOrIntersectionType(type, name) {
var property = getUnionOrIntersectionProperty(type, name);
- return property && !(getCheckFlags(property) & 16) ? property : undefined;
+ return property && !(ts.getCheckFlags(property) & 16) ? property : undefined;
}
function getPropertyOfType(type, name) {
type = getApparentType(type);
@@ -26603,20 +27945,14 @@ var ts;
}
return undefined;
}
- function getTypeParametersFromJSDocTemplate(declaration) {
- if (declaration.flags & 65536) {
- var templateTag = ts.getJSDocTemplateTag(declaration);
- if (templateTag) {
- return getTypeParametersFromDeclaration(templateTag.typeParameters);
- }
- }
- return undefined;
- }
- function getTypeParametersFromDeclaration(typeParameterDeclarations) {
- var result = [];
- ts.forEach(typeParameterDeclarations, function (node) {
+ function getTypeParametersFromDeclaration(declaration) {
+ var result;
+ ts.forEach(ts.getEffectiveTypeParameterDeclarations(declaration), function (node) {
var tp = getDeclaredTypeOfTypeParameter(node.symbol);
if (!ts.contains(result, tp)) {
+ if (!result) {
+ result = [];
+ }
result.push(tp);
}
});
@@ -26773,14 +28109,20 @@ var ts;
var classType = declaration.kind === 152 ?
getDeclaredTypeOfClassOrInterface(getMergedSymbol(declaration.parent.symbol))
: undefined;
- var typeParameters = classType ? classType.localTypeParameters :
- declaration.typeParameters ? getTypeParametersFromDeclaration(declaration.typeParameters) :
- getTypeParametersFromJSDocTemplate(declaration);
+ var typeParameters = classType ? classType.localTypeParameters : getTypeParametersFromDeclaration(declaration);
var returnType = getSignatureReturnTypeFromDeclaration(declaration, isJSConstructSignature, classType);
var typePredicate = declaration.type && declaration.type.kind === 158 ?
createTypePredicateFromTypePredicateNode(declaration.type) :
undefined;
- links.resolvedSignature = createSignature(declaration, typeParameters, thisParameter, parameters, returnType, typePredicate, minArgumentCount, ts.hasRestParameter(declaration), hasLiteralTypes);
+ var hasRestLikeParameter = ts.hasRestParameter(declaration);
+ if (!hasRestLikeParameter && ts.isInJavaScriptFile(declaration) && !ts.hasJSDocParameterTags(declaration) && containsArgumentsReference(declaration)) {
+ hasRestLikeParameter = true;
+ var syntheticArgsSymbol = createSymbol(3, "args");
+ syntheticArgsSymbol.type = anyArrayType;
+ syntheticArgsSymbol.isRestParameter = true;
+ parameters.push(syntheticArgsSymbol);
+ }
+ links.resolvedSignature = createSignature(declaration, typeParameters, thisParameter, parameters, returnType, typePredicate, minArgumentCount, hasRestLikeParameter, hasLiteralTypes);
}
return links.resolvedSignature;
}
@@ -26791,14 +28133,9 @@ var ts;
else if (classType) {
return classType;
}
- else if (declaration.type) {
- return getTypeFromTypeNode(declaration.type);
- }
- if (declaration.flags & 65536) {
- var type = getReturnTypeFromJSDocComment(declaration);
- if (type && type !== unknownType) {
- return type;
- }
+ var typeNode = ts.getEffectiveReturnTypeNode(declaration);
+ if (typeNode) {
+ return getTypeFromTypeNode(typeNode);
}
if (declaration.kind === 153 && !ts.hasDynamicName(declaration)) {
var setter = ts.getDeclarationOfKind(declaration.symbol, 154);
@@ -26902,8 +28239,9 @@ var ts;
type = anyType;
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));
+ var name = ts.getNameOfDeclaration(declaration);
+ if (name) {
+ error(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(name));
}
else {
error(declaration, ts.Diagnostics.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);
@@ -27030,8 +28368,8 @@ var ts;
}
function getPropagatingFlagsOfTypes(types, excludeKinds) {
var result = 0;
- for (var _i = 0, types_5 = types; _i < types_5.length; _i++) {
- var type = types_5[_i];
+ for (var _i = 0, types_4 = types; _i < types_4.length; _i++) {
+ var type = types_4[_i];
if (!(type.flags & excludeKinds)) {
result |= type.flags;
}
@@ -27061,7 +28399,7 @@ var ts;
function getTypeReferenceArity(type) {
return ts.length(type.target.typeParameters);
}
- function getTypeFromClassOrInterfaceReference(node, symbol) {
+ function getTypeFromClassOrInterfaceReference(node, symbol, typeArgs) {
var type = getDeclaredTypeOfSymbol(getMergedSymbol(symbol));
var typeParameters = type.localTypeParameters;
if (typeParameters) {
@@ -27073,7 +28411,7 @@ var ts;
: ts.Diagnostics.Generic_type_0_requires_between_1_and_2_type_arguments, typeToString(type, undefined, 1), minTypeArgumentCount, typeParameters.length);
return unknownType;
}
- var typeArguments = ts.concatenate(type.outerTypeParameters, fillMissingTypeArguments(ts.map(node.typeArguments, getTypeFromTypeNode), typeParameters, minTypeArgumentCount, node));
+ var typeArguments = ts.concatenate(type.outerTypeParameters, fillMissingTypeArguments(typeArgs, typeParameters, minTypeArgumentCount, node));
return createTypeReference(type, typeArguments);
}
if (node.typeArguments) {
@@ -27093,7 +28431,7 @@ var ts;
}
return instantiation;
}
- function getTypeFromTypeAliasReference(node, symbol) {
+ function getTypeFromTypeAliasReference(node, symbol, typeArguments) {
var type = getDeclaredTypeOfSymbol(symbol);
var typeParameters = getSymbolLinks(symbol).typeParameters;
if (typeParameters) {
@@ -27105,7 +28443,6 @@ var ts;
: 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);
return getTypeAliasInstantiation(symbol, typeArguments);
}
if (node.typeArguments) {
@@ -27135,26 +28472,44 @@ var ts;
}
return undefined;
}
- function resolveTypeReferenceName(typeReferenceName) {
+ function resolveTypeReferenceName(typeReferenceName, meaning) {
if (!typeReferenceName) {
return unknownSymbol;
}
- return resolveEntityName(typeReferenceName, 793064) || unknownSymbol;
+ return resolveEntityName(typeReferenceName, meaning) || unknownSymbol;
}
function getTypeReferenceType(node, symbol) {
+ var typeArguments = typeArgumentsFromTypeReferenceNode(node);
if (symbol === unknownSymbol) {
return unknownType;
}
+ var type = getTypeReferenceTypeWorker(node, symbol, typeArguments);
+ if (type) {
+ return type;
+ }
+ if (symbol.flags & 107455 && node.kind === 277) {
+ var valueType = getTypeOfSymbol(symbol);
+ if (valueType.symbol && !isInferredClassType(valueType)) {
+ var referenceType = getTypeReferenceTypeWorker(node, valueType.symbol, typeArguments);
+ if (referenceType) {
+ return referenceType;
+ }
+ }
+ resolveTypeReferenceName(getTypeReferenceName(node), 793064);
+ return valueType;
+ }
+ return getTypeFromNonGenericTypeReference(node, symbol);
+ }
+ function getTypeReferenceTypeWorker(node, symbol, typeArguments) {
if (symbol.flags & (32 | 64)) {
- return getTypeFromClassOrInterfaceReference(node, symbol);
+ return getTypeFromClassOrInterfaceReference(node, symbol, typeArguments);
}
if (symbol.flags & 524288) {
- return getTypeFromTypeAliasReference(node, symbol);
+ return getTypeFromTypeAliasReference(node, symbol, typeArguments);
}
- if (symbol.flags & 107455 && node.kind === 277) {
- return getTypeOfSymbol(symbol);
+ if (symbol.flags & 16 && node.kind === 277 && (symbol.members || ts.getJSDocClassTag(symbol.valueDeclaration))) {
+ return getInferredClassType(symbol);
}
- return getTypeFromNonGenericTypeReference(node, symbol);
}
function getPrimitiveTypeFromJSDocTypeReference(node) {
if (ts.isIdentifier(node.name)) {
@@ -27174,7 +28529,8 @@ var ts;
case "Object":
return anyType;
case "Function":
- return anyFunctionType;
+ case "function":
+ return globalFunctionType;
case "Array":
case "array":
return !node.typeArguments || !node.typeArguments.length ? createArrayType(anyType) : undefined;
@@ -27193,31 +28549,23 @@ var ts;
if (!links.resolvedType) {
var symbol = void 0;
var type = void 0;
+ var meaning = 793064;
if (node.kind === 277) {
type = getPrimitiveTypeFromJSDocTypeReference(node);
- if (!type) {
- var typeReferenceName = getTypeReferenceName(node);
- symbol = resolveTypeReferenceName(typeReferenceName);
- type = getTypeReferenceType(node, symbol);
- }
+ meaning |= 107455;
}
- else {
- var typeNameOrExpression = node.kind === 159
- ? node.typeName
- : ts.isEntityNameExpression(node.expression)
- ? node.expression
- : undefined;
- symbol = typeNameOrExpression && resolveEntityName(typeNameOrExpression, 793064) || unknownSymbol;
- type = symbol === unknownSymbol ? unknownType :
- symbol.flags & (32 | 64) ? getTypeFromClassOrInterfaceReference(node, symbol) :
- symbol.flags & 524288 ? getTypeFromTypeAliasReference(node, symbol) :
- getTypeFromNonGenericTypeReference(node, symbol);
+ if (!type) {
+ symbol = resolveTypeReferenceName(getTypeReferenceName(node), meaning);
+ type = getTypeReferenceType(node, symbol);
}
links.resolvedSymbol = symbol;
links.resolvedType = type;
}
return links.resolvedType;
}
+ function typeArgumentsFromTypeReferenceNode(node) {
+ return ts.map(node.typeArguments, getTypeFromTypeNode);
+ }
function getTypeFromTypeQueryNode(node) {
var links = getNodeLinks(node);
if (!links.resolvedType) {
@@ -27439,14 +28787,14 @@ var ts;
}
}
function addTypesToUnion(typeSet, types) {
- for (var _i = 0, types_6 = types; _i < types_6.length; _i++) {
- var type = types_6[_i];
+ for (var _i = 0, types_5 = types; _i < types_5.length; _i++) {
+ var type = types_5[_i];
addTypeToUnion(typeSet, type);
}
}
function containsIdenticalType(types, type) {
- for (var _i = 0, types_7 = types; _i < types_7.length; _i++) {
- var t = types_7[_i];
+ for (var _i = 0, types_6 = types; _i < types_6.length; _i++) {
+ var t = types_6[_i];
if (isTypeIdenticalTo(t, type)) {
return true;
}
@@ -27454,8 +28802,8 @@ var ts;
return false;
}
function isSubtypeOfAny(candidate, types) {
- for (var _i = 0, types_8 = types; _i < types_8.length; _i++) {
- var type = types_8[_i];
+ for (var _i = 0, types_7 = types; _i < types_7.length; _i++) {
+ var type = types_7[_i];
if (candidate !== type && isTypeSubtypeOf(candidate, type)) {
return true;
}
@@ -27559,10 +28907,13 @@ var ts;
else if (type.flags & 1) {
typeSet.containsAny = true;
}
+ else if (type.flags & 8192) {
+ typeSet.containsNever = true;
+ }
else if (getObjectFlags(type) & 16 && isEmptyObjectType(type)) {
typeSet.containsEmptyObject = true;
}
- else if (!(type.flags & 8192) && (strictNullChecks || !(type.flags & 6144)) && !ts.contains(typeSet, type)) {
+ else if ((strictNullChecks || !(type.flags & 6144)) && !ts.contains(typeSet, type)) {
if (type.flags & 32768) {
typeSet.containsObjectType = true;
}
@@ -27576,8 +28927,8 @@ var ts;
}
}
function addTypesToIntersection(typeSet, types) {
- for (var _i = 0, types_9 = types; _i < types_9.length; _i++) {
- var type = types_9[_i];
+ for (var _i = 0, types_8 = types; _i < types_8.length; _i++) {
+ var type = types_8[_i];
addTypeToIntersection(typeSet, type);
}
}
@@ -27587,6 +28938,9 @@ var ts;
}
var typeSet = [];
addTypesToIntersection(typeSet, types);
+ if (typeSet.containsNever) {
+ return neverType;
+ }
if (typeSet.containsAny) {
return anyType;
}
@@ -27628,9 +28982,9 @@ var ts;
return type.resolvedIndexType;
}
function getLiteralTypeFromPropertyName(prop) {
- return getDeclarationModifierFlagsFromSymbol(prop) & 24 || ts.startsWith(prop.name, "__@") ?
+ return ts.getDeclarationModifierFlagsFromSymbol(prop) & 24 || ts.startsWith(prop.name, "__@") ?
neverType :
- getLiteralTypeForText(32, ts.unescapeIdentifier(prop.name));
+ getLiteralType(ts.unescapeIdentifier(prop.name));
}
function getLiteralTypeFromPropertyNames(type) {
return getUnionType(ts.map(getPropertiesOfType(type), getLiteralTypeFromPropertyName));
@@ -27660,12 +29014,12 @@ var ts;
}
function getPropertyTypeForIndexType(objectType, indexType, accessNode, cacheSymbol) {
var accessExpression = accessNode && accessNode.kind === 180 ? accessNode : undefined;
- var propName = indexType.flags & (32 | 64 | 256) ?
- indexType.text :
+ var propName = indexType.flags & 96 ?
+ "" + indexType.value :
accessExpression && checkThatExpressionIsProperSymbolReference(accessExpression.argumentExpression, indexType, false) ?
ts.getPropertyNameForKnownSymbolName(accessExpression.argumentExpression.name.text) :
undefined;
- if (propName) {
+ if (propName !== undefined) {
var prop = getPropertyOfType(objectType, propName);
if (prop) {
if (accessExpression) {
@@ -27680,11 +29034,11 @@ var ts;
return getTypeOfSymbol(prop);
}
}
- if (isTypeAnyOrAllConstituentTypesHaveKind(indexType, 262178 | 340 | 512)) {
+ if (isTypeAnyOrAllConstituentTypesHaveKind(indexType, 262178 | 84 | 512)) {
if (isTypeAny(objectType)) {
return anyType;
}
- var indexInfo = isTypeAnyOrAllConstituentTypesHaveKind(indexType, 340) && getIndexInfoOfType(objectType, 1) ||
+ var indexInfo = isTypeAnyOrAllConstituentTypesHaveKind(indexType, 84) && getIndexInfoOfType(objectType, 1) ||
getIndexInfoOfType(objectType, 0) ||
undefined;
if (indexInfo) {
@@ -27709,7 +29063,7 @@ var ts;
if (accessNode) {
var indexNode = accessNode.kind === 180 ? 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));
+ error(indexNode, ts.Diagnostics.Property_0_does_not_exist_on_type_1, "" + indexType.value, typeToString(objectType));
}
else if (indexType.flags & (2 | 4)) {
error(indexNode, ts.Diagnostics.Type_0_has_no_matching_index_signature_for_type_1, typeToString(objectType), typeToString(indexType));
@@ -27809,11 +29163,9 @@ var ts;
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;
}
@@ -27841,7 +29193,7 @@ var ts;
for (var _i = 0, _a = getPropertiesOfType(right); _i < _a.length; _i++) {
var rightProp = _a[_i];
var isSetterWithoutGetter = rightProp.flags & 65536 && !(rightProp.flags & 32768);
- if (getDeclarationModifierFlagsFromSymbol(rightProp) & (8 | 16)) {
+ if (ts.getDeclarationModifierFlagsFromSymbol(rightProp) & (8 | 16)) {
skippedPrivateMembers.set(rightProp.name, true);
}
else if (!isClassMethod(rightProp) && !isSetterWithoutGetter) {
@@ -27858,7 +29210,7 @@ var ts;
if (members.has(leftProp.name)) {
var rightProp = members.get(leftProp.name);
var rightType = getTypeOfSymbol(rightProp);
- if (maybeTypeOfKind(rightType, 2048) || rightProp.flags & 67108864) {
+ if (rightProp.flags & 67108864) {
var declarations = ts.concatenate(leftProp.declarations, rightProp.declarations);
var flags = 4 | (leftProp.flags & 67108864);
var result = createSymbol(flags, leftProp.name);
@@ -27889,15 +29241,16 @@ var ts;
function isClassMethod(prop) {
return prop.flags & 8192 && ts.find(prop.declarations, function (decl) { return ts.isClassLike(decl.parent); });
}
- function createLiteralType(flags, text) {
+ function createLiteralType(flags, value, symbol) {
var type = createType(flags);
- type.text = text;
+ type.symbol = symbol;
+ type.value = value;
return type;
}
function getFreshTypeOfLiteralType(type) {
if (type.flags & 96 && !(type.flags & 1048576)) {
if (!type.freshType) {
- var freshType = createLiteralType(type.flags | 1048576, type.text);
+ var freshType = createLiteralType(type.flags | 1048576, type.value, type.symbol);
freshType.regularType = type;
type.freshType = freshType;
}
@@ -27908,11 +29261,13 @@ var ts;
function getRegularTypeOfLiteralType(type) {
return type.flags & 96 && type.flags & 1048576 ? type.regularType : type;
}
- function getLiteralTypeForText(flags, text) {
- var map = flags & 32 ? stringLiteralTypes : numericLiteralTypes;
- var type = map.get(text);
+ function getLiteralType(value, enumId, symbol) {
+ var qualifier = typeof value === "number" ? "#" : "@";
+ var key = enumId ? enumId + qualifier + value : qualifier + value;
+ var type = literalTypes.get(key);
if (!type) {
- map.set(text, type = createLiteralType(flags, text));
+ var flags = (typeof value === "number" ? 64 : 32) | (enumId ? 256 : 0);
+ literalTypes.set(key, type = createLiteralType(flags, value, symbol));
}
return type;
}
@@ -27987,7 +29342,7 @@ var ts;
return getTypeFromThisTypeNode(node);
case 173:
return getTypeFromLiteralTypeNode(node);
- case 293:
+ case 294:
return getTypeFromLiteralTypeNode(node.literal);
case 159:
case 277:
@@ -28021,7 +29376,7 @@ var ts;
case 160:
case 161:
case 163:
- case 292:
+ case 293:
case 279:
return getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node);
case 170:
@@ -28094,23 +29449,13 @@ var ts;
mapper.mappedTypes = typeParameters;
return mapper;
}
- function getInferenceMapper(context) {
- if (!context.mapper) {
- var mapper = function (t) {
- var typeParameters = context.signature.typeParameters;
- for (var i = 0; i < typeParameters.length; i++) {
- if (t === typeParameters[i]) {
- context.inferences[i].isFixed = true;
- return getInferredType(context, i);
- }
- }
- return t;
- };
- mapper.mappedTypes = context.signature.typeParameters;
- mapper.context = context;
- context.mapper = mapper;
- }
- return context.mapper;
+ function isInferenceContext(mapper) {
+ return !!mapper.signature;
+ }
+ function cloneTypeMapper(mapper) {
+ return mapper && isInferenceContext(mapper) ?
+ createInferenceContext(mapper.signature, mapper.flags | 2, mapper.inferences) :
+ mapper;
}
function identityMapper(type) {
return type;
@@ -28161,13 +29506,13 @@ var ts;
if (signature.typePredicate) {
freshTypePredicate = cloneTypePredicate(signature.typePredicate, mapper);
}
- var result = createSignature(signature.declaration, freshTypeParameters, signature.thisParameter && instantiateSymbol(signature.thisParameter, mapper), instantiateList(signature.parameters, mapper, instantiateSymbol), instantiateType(signature.resolvedReturnType, mapper), freshTypePredicate, signature.minArgumentCount, signature.hasRestParameter, signature.hasLiteralTypes);
+ var result = createSignature(signature.declaration, freshTypeParameters, signature.thisParameter && instantiateSymbol(signature.thisParameter, mapper), instantiateList(signature.parameters, mapper, instantiateSymbol), undefined, freshTypePredicate, signature.minArgumentCount, signature.hasRestParameter, signature.hasLiteralTypes);
result.target = signature;
result.mapper = mapper;
return result;
}
function instantiateSymbol(symbol, mapper) {
- if (getCheckFlags(symbol) & 1) {
+ if (ts.getCheckFlags(symbol) & 1) {
var links = getSymbolLinks(symbol);
symbol = links.target;
mapper = combineTypeMappers(links.mapper, mapper);
@@ -28247,10 +29592,10 @@ var ts;
case 199:
case 230:
case 231:
- var declaration = node;
- if (declaration.typeParameters) {
- for (var _i = 0, _a = declaration.typeParameters; _i < _a.length; _i++) {
- var d = _a[_i];
+ var typeParameters = ts.getEffectiveTypeParameterDeclarations(node);
+ if (typeParameters) {
+ for (var _i = 0, typeParameters_1 = typeParameters; _i < typeParameters_1.length; _i++) {
+ var d = typeParameters_1[_i];
if (ts.contains(mappedTypes, getDeclaredTypeOfTypeParameter(getSymbolOfNode(d)))) {
return true;
}
@@ -28270,8 +29615,8 @@ var ts;
break;
case 279:
var func = node;
- for (var _b = 0, _c = func.parameters; _b < _c.length; _b++) {
- var p = _c[_b];
+ for (var _a = 0, _b = func.parameters; _a < _b.length; _a++) {
+ var p = _b[_a];
if (ts.contains(mappedTypes, getTypeOfNode(p))) {
return true;
}
@@ -28370,7 +29715,7 @@ var ts;
if (node.typeParameters) {
return false;
}
- if (ts.forEach(node.parameters, function (p) { return !p.type; })) {
+ if (ts.forEach(node.parameters, function (p) { return !ts.getEffectiveTypeAnnotationNode(p); })) {
return true;
}
if (node.kind === 187) {
@@ -28423,9 +29768,6 @@ var ts;
function areTypesComparable(type1, type2) {
return isTypeComparableTo(type1, type2) || isTypeComparableTo(type2, type1);
}
- function checkTypeSubtypeOf(source, target, errorNode, headMessage, containingMessageChain) {
- return checkTypeRelatedTo(source, target, subtypeRelation, errorNode, headMessage, containingMessageChain);
- }
function checkTypeAssignableTo(source, target, errorNode, headMessage, containingMessageChain) {
return checkTypeRelatedTo(source, target, assignableRelation, errorNode, headMessage, containingMessageChain);
}
@@ -28433,17 +29775,18 @@ 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;
}
if (!target.hasRestParameter && source.minArgumentCount > target.parameters.length) {
return 0;
}
- source = getErasedSignature(source);
- target = getErasedSignature(target);
+ if (source.typeParameters) {
+ source = instantiateSignatureInContextOf(source, target);
+ }
var result = -1;
var sourceThisType = getThisTypeOfSignature(source);
if (sourceThisType && sourceThisType !== voidType) {
@@ -28466,9 +29809,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);
@@ -28495,7 +29844,8 @@ var ts;
}
}
else {
- result &= compareTypes(sourceReturnType, targetReturnType, reportErrors);
+ result &= checkAsCallback && compareTypes(targetReturnType, sourceReturnType, false) ||
+ compareTypes(sourceReturnType, targetReturnType, reportErrors);
}
}
return result;
@@ -28567,33 +29917,32 @@ var ts;
}
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;
+ type.flags & 16777216 ? true :
+ 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) {
+ function isEnumTypeRelatedTo(sourceSymbol, targetSymbol, errorReporter) {
+ if (sourceSymbol === targetSymbol) {
return true;
}
- var id = source.id + "," + target.id;
+ var id = getSymbolId(sourceSymbol) + "," + getSymbolId(targetSymbol);
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)) {
+ if (sourceSymbol.name !== targetSymbol.name || !(sourceSymbol.flags & 256) || !(targetSymbol.flags & 256)) {
enumRelation.set(id, false);
return false;
}
- var targetEnumType = getTypeOfSymbol(target.symbol);
- for (var _i = 0, _a = getPropertiesOfType(getTypeOfSymbol(source.symbol)); _i < _a.length; _i++) {
+ var targetEnumType = getTypeOfSymbol(targetSymbol);
+ for (var _i = 0, _a = getPropertiesOfType(getTypeOfSymbol(sourceSymbol)); _i < _a.length; _i++) {
var property = _a[_i];
if (property.flags & 8) {
var targetProperty = getPropertyOfType(targetEnumType, property.name);
if (!targetProperty || !(targetProperty.flags & 8)) {
if (errorReporter) {
- errorReporter(ts.Diagnostics.Property_0_is_missing_in_type_1, property.name, typeToString(target, undefined, 128));
+ errorReporter(ts.Diagnostics.Property_0_is_missing_in_type_1, property.name, typeToString(getDeclaredTypeOfSymbol(targetSymbol), undefined, 256));
}
enumRelation.set(id, false);
return false;
@@ -28604,42 +29953,47 @@ var ts;
return true;
}
function isSimpleTypeRelatedTo(source, target, relation, errorReporter) {
- if (target.flags & 8192)
+ var s = source.flags;
+ var t = target.flags;
+ if (t & 8192)
return false;
- if (target.flags & 1 || source.flags & 8192)
+ if (t & 1 || s & 8192)
return true;
- if (source.flags & 262178 && target.flags & 2)
+ if (s & 262178 && t & 2)
return true;
- if (source.flags & 340 && target.flags & 4)
+ if (s & 32 && s & 256 &&
+ t & 32 && !(t & 256) &&
+ source.value === target.value)
return true;
- if (source.flags & 136 && target.flags & 8)
+ if (s & 84 && t & 4)
return true;
- if (source.flags & 256 && target.flags & 16 && source.baseType === target)
+ if (s & 64 && s & 256 &&
+ t & 64 && !(t & 256) &&
+ source.value === target.value)
return true;
- if (source.flags & 16 && target.flags & 16 && isEnumTypeRelatedTo(source, target, errorReporter))
+ if (s & 136 && t & 8)
return true;
- if (source.flags & 2048 && (!strictNullChecks || target.flags & (2048 | 1024)))
+ if (s & 16 && t & 16 && isEnumTypeRelatedTo(source.symbol, target.symbol, errorReporter))
return true;
- if (source.flags & 4096 && (!strictNullChecks || target.flags & 4096))
+ if (s & 256 && t & 256) {
+ if (s & 65536 && t & 65536 && isEnumTypeRelatedTo(source.symbol, target.symbol, errorReporter))
+ return true;
+ if (s & 224 && t & 224 &&
+ source.value === target.value &&
+ isEnumTypeRelatedTo(getParentOfSymbol(source.symbol), getParentOfSymbol(target.symbol), errorReporter))
+ return true;
+ }
+ if (s & 2048 && (!strictNullChecks || t & (2048 | 1024)))
+ return true;
+ if (s & 4096 && (!strictNullChecks || t & 4096))
return true;
- if (source.flags & 32768 && target.flags & 16777216)
+ if (s & 32768 && t & 16777216)
return true;
if (relation === assignableRelation || relation === comparableRelation) {
- if (source.flags & 1)
+ if (s & 1)
return true;
- if ((source.flags & 4 | source.flags & 64) && target.flags & 272)
+ if (s & (4 | 64) && !(s & 256) && (t & 16 || t & 64 && t & 256))
return true;
- if (source.flags & 256 &&
- target.flags & 256 &&
- source.text === target.text &&
- isEnumTypeRelatedTo(source.baseType, target.baseType, errorReporter)) {
- return true;
- }
- if (source.flags & 256 &&
- target.flags & 16 &&
- isEnumTypeRelatedTo(target, source.baseType, errorReporter)) {
- return true;
- }
}
return false;
}
@@ -28673,6 +30027,7 @@ var ts;
var expandingFlags;
var depth = 0;
var overflow = false;
+ var isIntersectionConstituent = false;
ts.Debug.assert(relation !== identityRelation || !errorNode, "no error reporting in identity checking");
var result = isRelatedTo(source, target, !!errorNode, headMessage);
if (overflow) {
@@ -28693,8 +30048,8 @@ var ts;
var sourceType = typeToString(source);
var targetType = typeToString(target);
if (sourceType === targetType) {
- sourceType = typeToString(source, undefined, 128);
- targetType = typeToString(target, undefined, 128);
+ sourceType = typeToString(source, undefined, 256);
+ targetType = typeToString(target, undefined, 256);
}
if (!message) {
if (relation === comparableRelation) {
@@ -28737,7 +30092,6 @@ var ts;
return false;
}
function isRelatedTo(source, target, reportErrors, headMessage) {
- var result;
if (source.flags & 96 && source.flags & 1048576) {
source = source.regularType;
}
@@ -28762,42 +30116,47 @@ var ts;
source = getRegularTypeOfObjectLiteral(source);
}
}
+ if (relation !== comparableRelation &&
+ !(source.flags & 196608) &&
+ !(target.flags & 65536) &&
+ !isIntersectionConstituent &&
+ source !== globalObjectType &&
+ getPropertiesOfType(source).length > 0 &&
+ isWeakType(target) &&
+ !hasCommonProperties(source, target)) {
+ if (reportErrors) {
+ reportError(ts.Diagnostics.Type_0_has_no_properties_in_common_with_type_1, typeToString(source), typeToString(target));
+ }
+ return 0;
+ }
+ var result = 0;
var saveErrorInfo = errorInfo;
+ var saveIsIntersectionConstituent = isIntersectionConstituent;
+ isIntersectionConstituent = false;
if (source.flags & 65536) {
- if (relation === comparableRelation) {
- result = someTypeRelatedToType(source, target, reportErrors && !(source.flags & 8190));
- }
- else {
- result = eachTypeRelatedToType(source, target, reportErrors && !(source.flags & 8190));
- }
- if (result) {
- return result;
- }
+ result = relation === comparableRelation ?
+ someTypeRelatedToType(source, target, reportErrors && !(source.flags & 8190)) :
+ eachTypeRelatedToType(source, target, reportErrors && !(source.flags & 8190));
}
else {
if (target.flags & 65536) {
- if (result = typeRelatedToSomeType(source, target, reportErrors && !(source.flags & 8190) && !(target.flags & 8190))) {
- return result;
- }
+ result = typeRelatedToSomeType(source, target, reportErrors && !(source.flags & 8190) && !(target.flags & 8190));
}
else if (target.flags & 131072) {
- if (result = typeRelatedToEachType(source, target, reportErrors)) {
- return result;
- }
+ isIntersectionConstituent = true;
+ result = typeRelatedToEachType(source, target, reportErrors);
}
else if (source.flags & 131072) {
- if (result = someTypeRelatedToType(source, target, false)) {
- return result;
- }
+ result = someTypeRelatedToType(source, target, false);
}
- if (source.flags & 1032192 || target.flags & 1032192) {
+ if (!result && (source.flags & 1032192 || target.flags & 1032192)) {
if (result = recursiveTypeRelatedTo(source, target, reportErrors)) {
errorInfo = saveErrorInfo;
- return result;
}
}
}
- if (reportErrors) {
+ isIntersectionConstituent = saveIsIntersectionConstituent;
+ if (!result && reportErrors) {
if (source.flags & 32768 && target.flags & 8190) {
tryElaborateErrorsForPrimitivesAndObjects(source, target);
}
@@ -28806,7 +30165,7 @@ var ts;
}
reportRelationError(headMessage, source, target);
}
- return 0;
+ return result;
}
function isIdenticalTo(source, target) {
var result;
@@ -28823,24 +30182,6 @@ var ts;
}
return 0;
}
- function isKnownProperty(type, name, isComparingJsxAttributes) {
- if (type.flags & 32768) {
- var resolved = resolveStructuredTypeMembers(type);
- 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, isComparingJsxAttributes)) {
- return true;
- }
- }
- }
- return false;
- }
function hasExcessProperties(source, target, reportErrors) {
if (maybeTypeOfKind(target, 32768) && !(getObjectFlags(target) & 512)) {
var isComparingJsxAttributes = !!(source.flags & 33554432);
@@ -28848,8 +30189,7 @@ var ts;
(isTypeSubsetOf(globalObjectType, target) || (!isComparingJsxAttributes && isEmptyObjectType(target)))) {
return false;
}
- for (var _i = 0, _a = getPropertiesOfObjectType(source); _i < _a.length; _i++) {
- var prop = _a[_i];
+ var _loop_4 = function (prop) {
if (!isKnownProperty(target, prop.name, isComparingJsxAttributes)) {
if (reportErrors) {
ts.Debug.assert(!!errorNode);
@@ -28857,12 +30197,21 @@ var ts;
reportError(ts.Diagnostics.Property_0_does_not_exist_on_type_1, symbolToString(prop), typeToString(target));
}
else {
- errorNode = prop.valueDeclaration;
+ var objectLiteralDeclaration_1 = source.symbol && ts.firstOrUndefined(source.symbol.declarations);
+ if (prop.valueDeclaration && ts.findAncestor(prop.valueDeclaration, function (d) { return d === objectLiteralDeclaration_1; })) {
+ 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;
+ return { value: true };
}
+ };
+ for (var _i = 0, _a = getPropertiesOfObjectType(source); _i < _a.length; _i++) {
+ var prop = _a[_i];
+ var state_2 = _loop_4(prop);
+ if (typeof state_2 === "object")
+ return state_2.value;
}
}
return false;
@@ -29189,10 +30538,10 @@ var ts;
}
}
else if (!(targetProp.flags & 16777216)) {
- var sourcePropFlags = getDeclarationModifierFlagsFromSymbol(sourceProp);
- var targetPropFlags = getDeclarationModifierFlagsFromSymbol(targetProp);
+ var sourcePropFlags = ts.getDeclarationModifierFlagsFromSymbol(sourceProp);
+ var targetPropFlags = ts.getDeclarationModifierFlagsFromSymbol(targetProp);
if (sourcePropFlags & 8 || targetPropFlags & 8) {
- if (getCheckFlags(sourceProp) & 256) {
+ if (ts.getCheckFlags(sourceProp) & 256) {
if (reportErrors) {
reportError(ts.Diagnostics.Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1, symbolToString(sourceProp), typeToString(source));
}
@@ -29243,6 +30592,29 @@ var ts;
}
return result;
}
+ function isWeakType(type) {
+ if (type.flags & 32768) {
+ var resolved = resolveStructuredTypeMembers(type);
+ return resolved.callSignatures.length === 0 && resolved.constructSignatures.length === 0 &&
+ !resolved.stringIndexInfo && !resolved.numberIndexInfo &&
+ resolved.properties.length > 0 &&
+ ts.every(resolved.properties, function (p) { return !!(p.flags & 67108864); });
+ }
+ if (type.flags & 131072) {
+ return ts.every(type.types, isWeakType);
+ }
+ return false;
+ }
+ function hasCommonProperties(source, target) {
+ var isComparingJsxAttributes = !!(source.flags & 33554432);
+ for (var _i = 0, _a = getPropertiesOfType(source); _i < _a.length; _i++) {
+ var prop = _a[_i];
+ if (isKnownProperty(target, prop.name, isComparingJsxAttributes)) {
+ return true;
+ }
+ }
+ return false;
+ }
function propertiesIdenticalTo(source, target) {
if (!(source.flags & 32768 && target.flags & 32768)) {
return 0;
@@ -29289,28 +30661,43 @@ var ts;
}
var result = -1;
var saveErrorInfo = errorInfo;
- outer: for (var _i = 0, targetSignatures_1 = targetSignatures; _i < targetSignatures_1.length; _i++) {
- var t = targetSignatures_1[_i];
- var shouldElaborateErrors = reportErrors;
- for (var _a = 0, sourceSignatures_1 = sourceSignatures; _a < sourceSignatures_1.length; _a++) {
- var s = sourceSignatures_1[_a];
- var related = signatureRelatedTo(s, t, shouldElaborateErrors);
- if (related) {
- result &= related;
- errorInfo = saveErrorInfo;
- continue outer;
+ if (getObjectFlags(source) & 64 && getObjectFlags(target) & 64 && source.symbol === target.symbol) {
+ for (var i = 0; i < targetSignatures.length; i++) {
+ var related = signatureRelatedTo(sourceSignatures[i], targetSignatures[i], true, reportErrors);
+ if (!related) {
+ return 0;
}
- shouldElaborateErrors = false;
+ result &= related;
}
- if (shouldElaborateErrors) {
- reportError(ts.Diagnostics.Type_0_provides_no_match_for_the_signature_1, typeToString(source), signatureToString(t, undefined, undefined, kind));
+ }
+ else if (sourceSignatures.length === 1 && targetSignatures.length === 1) {
+ var eraseGenerics = relation === comparableRelation || compilerOptions.noStrictGenericChecks;
+ result = signatureRelatedTo(sourceSignatures[0], targetSignatures[0], eraseGenerics, reportErrors);
+ }
+ else {
+ outer: for (var _i = 0, targetSignatures_1 = targetSignatures; _i < targetSignatures_1.length; _i++) {
+ var t = targetSignatures_1[_i];
+ var shouldElaborateErrors = reportErrors;
+ for (var _a = 0, sourceSignatures_1 = sourceSignatures; _a < sourceSignatures_1.length; _a++) {
+ var s = sourceSignatures_1[_a];
+ var related = signatureRelatedTo(s, t, true, shouldElaborateErrors);
+ if (related) {
+ result &= related;
+ errorInfo = saveErrorInfo;
+ continue outer;
+ }
+ shouldElaborateErrors = false;
+ }
+ if (shouldElaborateErrors) {
+ reportError(ts.Diagnostics.Type_0_provides_no_match_for_the_signature_1, typeToString(source), signatureToString(t, undefined, undefined, kind));
+ }
+ return 0;
}
- return 0;
}
return result;
}
- function signatureRelatedTo(source, target, reportErrors) {
- return compareSignaturesRelated(source, target, false, reportErrors, reportError, isRelatedTo);
+ function signatureRelatedTo(source, target, erase, reportErrors) {
+ return compareSignaturesRelated(erase ? getErasedSignature(source) : source, erase ? getErasedSignature(target) : target, false, false, reportErrors, reportError, isRelatedTo);
}
function signaturesIdenticalTo(source, target, kind) {
var sourceSignatures = getSignaturesOfType(source, kind);
@@ -29416,7 +30803,7 @@ var ts;
}
}
function forEachProperty(prop, callback) {
- if (getCheckFlags(prop) & 6) {
+ if (ts.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);
@@ -29439,11 +30826,11 @@ var ts;
});
}
function isValidOverrideOf(sourceProp, targetProp) {
- return !forEachProperty(targetProp, function (tp) { return getDeclarationModifierFlagsFromSymbol(tp) & 16 ?
+ return !forEachProperty(targetProp, function (tp) { return ts.getDeclarationModifierFlagsFromSymbol(tp) & 16 ?
!isPropertyInClassDerivedFrom(sourceProp, getDeclaringClass(tp)) : false; });
}
function isClassDerivedFromDeclaringClasses(checkClass, prop) {
- return forEachProperty(prop, function (p) { return getDeclarationModifierFlagsFromSymbol(p) & 16 ?
+ return forEachProperty(prop, function (p) { return ts.getDeclarationModifierFlagsFromSymbol(p) & 16 ?
!hasBaseType(checkClass, getDeclaringClass(p)) : false; }) ? undefined : checkClass;
}
function isAbstractConstructorType(type) {
@@ -29482,8 +30869,8 @@ var ts;
if (sourceProp === targetProp) {
return -1;
}
- var sourcePropAccessibility = getDeclarationModifierFlagsFromSymbol(sourceProp) & 24;
- var targetPropAccessibility = getDeclarationModifierFlagsFromSymbol(targetProp) & 24;
+ var sourcePropAccessibility = ts.getDeclarationModifierFlagsFromSymbol(sourceProp) & 24;
+ var targetPropAccessibility = ts.getDeclarationModifierFlagsFromSymbol(targetProp) & 24;
if (sourcePropAccessibility !== targetPropAccessibility) {
return 0;
}
@@ -29560,18 +30947,10 @@ var ts;
function isRestParameterIndex(signature, parameterIndex) {
return signature.hasRestParameter && parameterIndex >= signature.parameters.length - 1;
}
- function isSupertypeOfEach(candidate, types) {
- 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;
- }
- return true;
- }
function literalTypesWithSameBaseType(types) {
var commonBaseType;
- for (var _i = 0, types_11 = types; _i < types_11.length; _i++) {
- var t = types_11[_i];
+ for (var _i = 0, types_9 = types; _i < types_9.length; _i++) {
+ var t = types_9[_i];
var baseType = getBaseTypeOfLiteralType(t);
if (!commonBaseType) {
commonBaseType = baseType;
@@ -29583,45 +30962,18 @@ var ts;
return true;
}
function getSupertypeOrUnion(types) {
- return literalTypesWithSameBaseType(types) ? getUnionType(types) : ts.forEach(types, function (t) { return isSupertypeOfEach(t, types) ? t : undefined; });
+ return literalTypesWithSameBaseType(types) ?
+ getUnionType(types) :
+ ts.reduceLeft(types, function (s, t) { return isTypeSubtypeOf(s, t) ? t : s; });
}
function getCommonSupertype(types) {
if (!strictNullChecks) {
return getSupertypeOrUnion(types);
}
var primaryTypes = ts.filter(types, function (t) { return !(t.flags & 6144); });
- if (!primaryTypes.length) {
- return getUnionType(types, true);
- }
- var supertype = getSupertypeOrUnion(primaryTypes);
- return supertype && includeFalsyTypes(supertype, getFalsyFlagsOfTypes(types) & 6144);
- }
- function reportNoCommonSupertypeError(types, errorLocation, errorMessageChainHead) {
- var bestSupertype;
- var bestSupertypeDownfallType;
- var bestSupertypeScore = 0;
- for (var i = 0; i < types.length; i++) {
- var score = 0;
- var downfallType = undefined;
- for (var j = 0; j < types.length; j++) {
- if (isTypeSubtypeOf(types[j], types[i])) {
- score++;
- }
- else if (!downfallType) {
- downfallType = types[j];
- }
- }
- ts.Debug.assert(!!downfallType, "If there is no common supertype, each type should have a downfallType");
- if (score > bestSupertypeScore) {
- bestSupertype = types[i];
- bestSupertypeDownfallType = downfallType;
- bestSupertypeScore = score;
- }
- if (bestSupertypeScore === types.length - 1) {
- break;
- }
- }
- checkTypeSubtypeOf(bestSupertypeDownfallType, bestSupertype, errorLocation, ts.Diagnostics.Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0, errorMessageChainHead);
+ return primaryTypes.length ?
+ getNullableType(getSupertypeOrUnion(primaryTypes), getFalsyFlagsOfTypes(types) & 6144) :
+ getUnionType(types, true);
}
function isArrayType(type) {
return getObjectFlags(type) & 4 && type.target === globalArrayType;
@@ -29634,27 +30986,27 @@ var ts;
return !!getPropertyOfType(type, "0");
}
function isUnitType(type) {
- return (type.flags & (480 | 2048 | 4096)) !== 0;
+ return (type.flags & (224 | 2048 | 4096)) !== 0;
}
function isLiteralType(type) {
return type.flags & 8 ? true :
- type.flags & 65536 ? type.flags & 16 ? true : !ts.forEach(type.types, function (t) { return !isUnitType(t); }) :
+ type.flags & 65536 ? type.flags & 256 ? true : !ts.forEach(type.types, function (t) { return !isUnitType(t); }) :
isUnitType(type);
}
function getBaseTypeOfLiteralType(type) {
- return type.flags & 32 ? stringType :
- type.flags & 64 ? numberType :
- type.flags & 128 ? booleanType :
- type.flags & 256 ? type.baseType :
- type.flags & 65536 && !(type.flags & 16) ? getUnionType(ts.sameMap(type.types, getBaseTypeOfLiteralType)) :
+ return type.flags & 256 ? getBaseTypeOfEnumLiteralType(type) :
+ type.flags & 32 ? stringType :
+ type.flags & 64 ? numberType :
+ type.flags & 128 ? booleanType :
+ type.flags & 65536 ? getUnionType(ts.sameMap(type.types, getBaseTypeOfLiteralType)) :
type;
}
function getWidenedLiteralType(type) {
- return type.flags & 32 && type.flags & 1048576 ? stringType :
- type.flags & 64 && type.flags & 1048576 ? numberType :
- type.flags & 128 ? booleanType :
- type.flags & 256 ? type.baseType :
- type.flags & 65536 && !(type.flags & 16) ? getUnionType(ts.sameMap(type.types, getWidenedLiteralType)) :
+ return type.flags & 256 ? getBaseTypeOfEnumLiteralType(type) :
+ type.flags & 32 && type.flags & 1048576 ? stringType :
+ type.flags & 64 && type.flags & 1048576 ? numberType :
+ type.flags & 128 ? booleanType :
+ type.flags & 65536 ? getUnionType(ts.sameMap(type.types, getWidenedLiteralType)) :
type;
}
function isTupleType(type) {
@@ -29662,43 +31014,43 @@ var ts;
}
function getFalsyFlagsOfTypes(types) {
var result = 0;
- for (var _i = 0, types_12 = types; _i < types_12.length; _i++) {
- var t = types_12[_i];
+ for (var _i = 0, types_10 = types; _i < types_10.length; _i++) {
+ var t = types_10[_i];
result |= getFalsyFlags(t);
}
return result;
}
function getFalsyFlags(type) {
return type.flags & 65536 ? getFalsyFlagsOfTypes(type.types) :
- type.flags & 32 ? type.text === "" ? 32 : 0 :
- type.flags & 64 ? type.text === "0" ? 64 : 0 :
+ type.flags & 32 ? type.value === "" ? 32 : 0 :
+ type.flags & 64 ? type.value === 0 ? 64 : 0 :
type.flags & 128 ? type === falseType ? 128 : 0 :
type.flags & 7406;
}
- function includeFalsyTypes(type, flags) {
- if ((getFalsyFlags(type) & flags) === flags) {
- return type;
- }
- var types = [type];
- if (flags & 262178)
- types.push(emptyStringType);
- if (flags & 340)
- types.push(zeroType);
- if (flags & 136)
- types.push(falseType);
- if (flags & 1024)
- types.push(voidType);
- if (flags & 2048)
- types.push(undefinedType);
- if (flags & 4096)
- types.push(nullType);
- return getUnionType(types);
- }
function removeDefinitelyFalsyTypes(type) {
return getFalsyFlags(type) & 7392 ?
filterType(type, function (t) { return !(getFalsyFlags(t) & 7392); }) :
type;
}
+ function extractDefinitelyFalsyTypes(type) {
+ return mapType(type, getDefinitelyFalsyPartOfType);
+ }
+ function getDefinitelyFalsyPartOfType(type) {
+ return type.flags & 2 ? emptyStringType :
+ type.flags & 4 ? zeroType :
+ type.flags & 8 || type === falseType ? falseType :
+ type.flags & (1024 | 2048 | 4096) ||
+ type.flags & 32 && type.value === "" ||
+ type.flags & 64 && type.value === 0 ? type :
+ neverType;
+ }
+ function getNullableType(type, flags) {
+ var missing = (flags & ~type.flags) & (2048 | 4096);
+ return missing === 0 ? type :
+ missing === 2048 ? getUnionType([type, undefinedType]) :
+ missing === 4096 ? getUnionType([type, nullType]) :
+ getUnionType([type, undefinedType, nullType]);
+ }
function getNonNullableType(type) {
return strictNullChecks ? getTypeWithFacts(type, 524288) : type;
}
@@ -29843,7 +31195,7 @@ var ts;
default:
diagnostic = ts.Diagnostics.Variable_0_implicitly_has_an_1_type;
}
- error(declaration, diagnostic, ts.declarationNameToString(declaration.name), typeAsString);
+ error(declaration, diagnostic, ts.declarationNameToString(ts.getNameOfDeclaration(declaration)), typeAsString);
}
function reportErrorsFromWidening(declaration, type) {
if (produceDiagnostics && noImplicitAny && type.flags & 2097152) {
@@ -29872,29 +31224,49 @@ var ts;
callback(getTypeAtPosition(source, i), getTypeAtPosition(target, i));
}
}
- function createInferenceContext(signature, inferUnionTypes, useAnyForNoInferences) {
- var inferences = ts.map(signature.typeParameters, createTypeInferencesObject);
+ function createInferenceContext(signature, flags, baseInferences) {
+ var inferences = baseInferences ? ts.map(baseInferences, cloneInferenceInfo) : ts.map(signature.typeParameters, createInferenceInfo);
+ var context = mapper;
+ context.mappedTypes = signature.typeParameters;
+ context.signature = signature;
+ context.inferences = inferences;
+ context.flags = flags;
+ return context;
+ function mapper(t) {
+ for (var i = 0; i < inferences.length; i++) {
+ if (t === inferences[i].typeParameter) {
+ inferences[i].isFixed = true;
+ return getInferredType(context, i);
+ }
+ }
+ return t;
+ }
+ }
+ function createInferenceInfo(typeParameter) {
return {
- signature: signature,
- inferUnionTypes: inferUnionTypes,
- inferences: inferences,
- inferredTypes: new Array(signature.typeParameters.length),
- useAnyForNoInferences: useAnyForNoInferences
+ typeParameter: typeParameter,
+ candidates: undefined,
+ inferredType: undefined,
+ priority: undefined,
+ topLevel: true,
+ isFixed: false
};
}
- function createTypeInferencesObject() {
+ function cloneInferenceInfo(inference) {
return {
- primary: undefined,
- secondary: undefined,
- topLevel: true,
- isFixed: false,
+ typeParameter: inference.typeParameter,
+ candidates: inference.candidates && inference.candidates.slice(),
+ inferredType: inference.inferredType,
+ priority: inference.priority,
+ topLevel: inference.topLevel,
+ isFixed: inference.isFixed
};
}
function couldContainTypeVariables(type) {
var objectFlags = getObjectFlags(type);
return !!(type.flags & 540672 ||
objectFlags & 4 && ts.forEach(type.typeArguments, couldContainTypeVariables) ||
- objectFlags & 16 && type.symbol && type.symbol.flags & (8192 | 2048 | 32) ||
+ objectFlags & 16 && type.symbol && type.symbol.flags & (16 | 8192 | 2048 | 32) ||
objectFlags & 32 ||
type.flags & 196608 && couldUnionOrIntersectionContainTypeVariables(type));
}
@@ -29913,14 +31285,13 @@ var ts;
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 typeParameter = getIndexedAccessType(getConstraintTypeFromMappedType(target).type, getTypeParameterFromMappedType(target));
+ var inference = createInferenceInfo(typeParameter);
+ var inferences = [inference];
var templateType = getTemplateTypeFromMappedType(target);
var readonlyMask = target.declaration.readonlyToken ? false : true;
var optionalMask = target.declaration.questionToken ? 0 : 67108864;
- var members = createSymbolTable(properties);
+ var members = ts.createMap();
for (var _i = 0, properties_5 = properties; _i < properties_5.length; _i++) {
var prop = properties_5[_i];
var inferredPropType = inferTargetType(getTypeOfSymbol(prop));
@@ -29942,31 +31313,16 @@ var ts;
}
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);
+ inference.candidates = undefined;
+ inferTypes(inferences, sourceType, templateType);
+ return inference.candidates && getUnionType(inference.candidates, 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;
- var inferiority = 0;
- var visited = ts.createMap();
+ function inferTypes(inferences, originalSource, originalTarget, priority) {
+ if (priority === void 0) { priority = 0; }
+ var symbolStack;
+ var visited;
inferFromTypes(originalSource, originalTarget);
- function isInProcess(source, target) {
- for (var i = 0; i < depth; i++) {
- if (source === sourceStack[i] && target === targetStack[i]) {
- return true;
- }
- }
- return false;
- }
function inferFromTypes(source, target) {
if (!couldContainTypeVariables(target)) {
return;
@@ -29979,7 +31335,7 @@ var ts;
}
return;
}
- if (source.flags & 65536 && target.flags & 65536 && !(source.flags & 16 && target.flags & 16) ||
+ if (source.flags & 65536 && target.flags & 65536 && !(source.flags & 256 && target.flags & 256) ||
source.flags & 131072 && target.flags & 131072) {
if (source === target) {
for (var _i = 0, _a = source.types; _i < _a.length; _i++) {
@@ -30008,25 +31364,24 @@ var ts;
}
}
if (target.flags & 540672) {
- if (source.flags & 8388608) {
+ if (source.flags & 8388608 || source === silentNeverType) {
return;
}
- 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 = []) :
- inferences.primary || (inferences.primary = []);
- if (!ts.contains(candidates, source)) {
- candidates.push(source);
- }
- if (target.flags & 16384 && !isTypeParameterAtTopLevel(originalTarget, target)) {
- inferences.topLevel = false;
- }
+ var inference = getInferenceInfoForType(target);
+ if (inference) {
+ if (!inference.isFixed) {
+ if (!inference.candidates || priority < inference.priority) {
+ inference.candidates = [source];
+ inference.priority = priority;
+ }
+ else if (priority === inference.priority) {
+ inference.candidates.push(source);
+ }
+ if (!(priority & 4) && target.flags & 16384 && !isTypeParameterAtTopLevel(originalTarget, target)) {
+ inference.topLevel = false;
}
- return;
}
+ return;
}
}
else if (getObjectFlags(source) & 4 && getObjectFlags(target) & 4 && source.target === target.target) {
@@ -30043,7 +31398,7 @@ var ts;
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)) {
+ if (getInferenceInfoForType(t)) {
typeVariable = t;
typeVariableCount++;
}
@@ -30052,9 +31407,10 @@ var ts;
}
}
if (typeVariableCount === 1) {
- inferiority++;
+ var savePriority = priority;
+ priority |= 1;
inferFromTypes(source, typeVariable);
- inferiority--;
+ priority = savePriority;
}
}
else if (source.flags & 196608) {
@@ -30067,40 +31423,51 @@ var ts;
else {
source = getApparentType(source);
if (source.flags & 32768) {
- if (isInProcess(source, target)) {
+ var key = source.id + "," + target.id;
+ if (visited && visited.get(key)) {
return;
}
- if (isDeeplyNestedType(source, sourceStack, depth) && isDeeplyNestedType(target, targetStack, depth)) {
- return;
+ (visited || (visited = ts.createMap())).set(key, true);
+ var isNonConstructorObject = target.flags & 32768 &&
+ !(getObjectFlags(target) & 16 && target.symbol && target.symbol.flags & 32);
+ var symbol = isNonConstructorObject ? target.symbol : undefined;
+ if (symbol) {
+ if (ts.contains(symbolStack, symbol)) {
+ return;
+ }
+ (symbolStack || (symbolStack = [])).push(symbol);
+ inferFromObjectTypes(source, target);
+ symbolStack.pop();
}
- var key = source.id + "," + target.id;
- if (visited.get(key)) {
- return;
+ else {
+ inferFromObjectTypes(source, target);
}
- visited.set(key, true);
- if (depth === 0) {
- sourceStack = [];
- targetStack = [];
+ }
+ }
+ }
+ function getInferenceInfoForType(type) {
+ if (type.flags & 540672) {
+ for (var _i = 0, inferences_1 = inferences; _i < inferences_1.length; _i++) {
+ var inference = inferences_1[_i];
+ if (type === inference.typeParameter) {
+ return inference;
}
- sourceStack[depth] = source;
- targetStack[depth] = target;
- depth++;
- inferFromObjectTypes(source, target);
- depth--;
}
}
+ return undefined;
}
function inferFromObjectTypes(source, target) {
if (getObjectFlags(target) & 32) {
var constraintType = getConstraintTypeFromMappedType(target);
if (constraintType.flags & 262144) {
- var index = ts.indexOf(typeVariables, constraintType.type);
- if (index >= 0 && !typeInferences[index].isFixed) {
+ var inference = getInferenceInfoForType(constraintType.type);
+ if (inference && !inference.isFixed) {
var inferredType = inferTypeForHomomorphicMappedType(source, target);
if (inferredType) {
- inferiority++;
- inferFromTypes(inferredType, typeVariables[index]);
- inferiority--;
+ var savePriority = priority;
+ priority |= 2;
+ inferFromTypes(inferredType, inference.typeParameter);
+ priority = savePriority;
}
}
return;
@@ -30169,8 +31536,8 @@ var ts;
}
}
function typeIdenticalToSomeType(type, types) {
- for (var _i = 0, types_13 = types; _i < types_13.length; _i++) {
- var t = types_13[_i];
+ for (var _i = 0, types_11 = types; _i < types_11.length; _i++) {
+ var t = types_11[_i];
if (isTypeIdenticalTo(t, type)) {
return true;
}
@@ -30187,65 +31554,58 @@ var ts;
}
return type.flags & 65536 ? getUnionType(reducedTypes) : getIntersectionType(reducedTypes);
}
- function getInferenceCandidates(context, index) {
- var inferences = context.inferences[index];
- return inferences.primary || inferences.secondary || emptyArray;
- }
function hasPrimitiveConstraint(type) {
var constraint = getConstraintOfTypeParameter(type);
return constraint && maybeTypeOfKind(constraint, 8190 | 262144);
}
function getInferredType(context, index) {
- var inferredType = context.inferredTypes[index];
- var inferenceSucceeded;
+ var inference = context.inferences[index];
+ var inferredType = inference.inferredType;
if (!inferredType) {
- var inferences = getInferenceCandidates(context, index);
- if (inferences.length) {
+ if (inference.candidates) {
var signature = context.signature;
- var widenLiteralTypes = context.inferences[index].topLevel &&
- !hasPrimitiveConstraint(signature.typeParameters[index]) &&
- (context.inferences[index].isFixed || !isTypeParameterAtTopLevel(getReturnTypeOfSignature(signature), signature.typeParameters[index]));
- var baseInferences = widenLiteralTypes ? ts.sameMap(inferences, getWidenedLiteralType) : inferences;
- var unionOrSuperType = context.inferUnionTypes ? getUnionType(baseInferences, true) : getCommonSupertype(baseInferences);
- inferredType = unionOrSuperType ? getWidenedType(unionOrSuperType) : unknownType;
- inferenceSucceeded = !!unionOrSuperType;
+ var widenLiteralTypes = inference.topLevel &&
+ !hasPrimitiveConstraint(inference.typeParameter) &&
+ (inference.isFixed || !isTypeParameterAtTopLevel(getReturnTypeOfSignature(signature), inference.typeParameter));
+ var baseCandidates = widenLiteralTypes ? ts.sameMap(inference.candidates, getWidenedLiteralType) : inference.candidates;
+ var unionOrSuperType = context.flags & 1 || inference.priority & 4 ?
+ getUnionType(baseCandidates, true) : getCommonSupertype(baseCandidates);
+ inferredType = getWidenedType(unionOrSuperType);
+ }
+ else if (context.flags & 2) {
+ inferredType = silentNeverType;
}
else {
- var defaultType = getDefaultFromTypeParameter(context.signature.typeParameters[index]);
+ var defaultType = getDefaultFromTypeParameter(inference.typeParameter);
if (defaultType) {
- inferredType = instantiateType(defaultType, combineTypeMappers(createBackreferenceMapper(context.signature.typeParameters, index), getInferenceMapper(context)));
+ inferredType = instantiateType(defaultType, combineTypeMappers(createBackreferenceMapper(context.signature.typeParameters, index), context));
}
else {
- inferredType = context.useAnyForNoInferences ? anyType : emptyObjectType;
+ inferredType = context.flags & 4 ? anyType : emptyObjectType;
}
- inferenceSucceeded = true;
}
- context.inferredTypes[index] = inferredType;
- if (inferenceSucceeded) {
- var constraint = getConstraintOfTypeParameter(context.signature.typeParameters[index]);
- if (constraint) {
- var instantiatedConstraint = instantiateType(constraint, getInferenceMapper(context));
- if (!isTypeAssignableTo(inferredType, getTypeWithThisArgument(instantiatedConstraint, inferredType))) {
- context.inferredTypes[index] = inferredType = instantiatedConstraint;
- }
+ inference.inferredType = inferredType;
+ var constraint = getConstraintOfTypeParameter(context.signature.typeParameters[index]);
+ if (constraint) {
+ var instantiatedConstraint = instantiateType(constraint, context);
+ if (!isTypeAssignableTo(inferredType, getTypeWithThisArgument(instantiatedConstraint, inferredType))) {
+ inference.inferredType = inferredType = instantiatedConstraint;
}
}
- else if (context.failedTypeParameterIndex === undefined || context.failedTypeParameterIndex > index) {
- context.failedTypeParameterIndex = index;
- }
}
return inferredType;
}
function getInferredTypes(context) {
- for (var i = 0; i < context.inferredTypes.length; i++) {
- getInferredType(context, i);
+ var result = [];
+ for (var i = 0; i < context.inferences.length; i++) {
+ result.push(getInferredType(context, i));
}
- return context.inferredTypes;
+ return result;
}
function getResolvedSymbol(node) {
var links = getNodeLinks(node);
if (!links.resolvedSymbol) {
- links.resolvedSymbol = !ts.nodeIsMissing(node) && resolveName(node, node.text, 107455 | 1048576, ts.Diagnostics.Cannot_find_name_0, node) || unknownSymbol;
+ links.resolvedSymbol = !ts.nodeIsMissing(node) && resolveName(node, node.text, 107455 | 1048576, ts.Diagnostics.Cannot_find_name_0, node, ts.Diagnostics.Cannot_find_name_0_Did_you_mean_1) || unknownSymbol;
}
return links.resolvedSymbol;
}
@@ -30255,7 +31615,7 @@ var ts;
function getFlowCacheKey(node) {
if (node.kind === 71) {
var symbol = getResolvedSymbol(node);
- return symbol !== unknownSymbol ? "" + getSymbolId(symbol) : undefined;
+ return symbol !== unknownSymbol ? (isApparentTypePosition(node) ? "@" : "") + getSymbolId(symbol) : undefined;
}
if (node.kind === 99) {
return "0";
@@ -30320,7 +31680,7 @@ var ts;
function isDiscriminantProperty(type, name) {
if (type && type.flags & 65536) {
var prop = getUnionOrIntersectionProperty(type, name);
- if (prop && getCheckFlags(prop) & 2) {
+ if (prop && ts.getCheckFlags(prop) & 2) {
if (prop.isDiscriminantProperty === undefined) {
prop.isDiscriminantProperty = prop.checkFlags & 32 && isLiteralType(getTypeOfSymbol(prop));
}
@@ -30380,8 +31740,8 @@ var ts;
}
function getTypeFactsOfTypes(types) {
var result = 0;
- for (var _i = 0, types_14 = types; _i < types_14.length; _i++) {
- var t = types_14[_i];
+ for (var _i = 0, types_12 = types; _i < types_12.length; _i++) {
+ var t = types_12[_i];
result |= getTypeFacts(t);
}
return result;
@@ -30397,15 +31757,16 @@ var ts;
return strictNullChecks ? 4079361 : 4194049;
}
if (flags & 32) {
+ var isEmpty = type.value === "";
return strictNullChecks ?
- type.text === "" ? 3030785 : 1982209 :
- type.text === "" ? 3145473 : 4194049;
+ isEmpty ? 3030785 : 1982209 :
+ isEmpty ? 3145473 : 4194049;
}
if (flags & (4 | 16)) {
return strictNullChecks ? 4079234 : 4193922;
}
- if (flags & (64 | 256)) {
- var isZero = type.text === "0";
+ if (flags & 64) {
+ var isZero = type.value === 0;
return strictNullChecks ?
isZero ? 3030658 : 1982082 :
isZero ? 3145346 : 4193922;
@@ -30607,7 +31968,7 @@ var ts;
}
return true;
}
- if (source.flags & 256 && target.flags & 16 && source.baseType === target) {
+ if (source.flags & 256 && getBaseTypeOfEnumLiteralType(source) === target) {
return true;
}
return containsType(target.types, source);
@@ -30630,8 +31991,8 @@ var ts;
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];
+ 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) {
@@ -30700,8 +32061,8 @@ var ts;
}
function isEvolvingArrayTypeList(types) {
var hasEvolvingArrayType = false;
- for (var _i = 0, types_16 = types; _i < types_16.length; _i++) {
- var t = types_16[_i];
+ for (var _i = 0, types_14 = types; _i < types_14.length; _i++) {
+ var t = types_14[_i];
if (!(t.flags & 8192)) {
if (!(getObjectFlags(t) & 256)) {
return false;
@@ -30727,7 +32088,7 @@ var ts;
parent.parent.operatorToken.kind === 58 &&
parent.parent.left === parent &&
!ts.isAssignmentTarget(parent.parent) &&
- isTypeAnyOrAllConstituentTypesHaveKind(getTypeOfExpression(parent.argumentExpression), 340 | 2048);
+ isTypeAnyOrAllConstituentTypesHaveKind(getTypeOfExpression(parent.argumentExpression), 84 | 2048);
return isLengthPushOrUnshift || isElementAssignment;
}
function maybeTypePredicateCall(node) {
@@ -30753,7 +32114,7 @@ var ts;
function getFlowTypeOfReference(reference, declaredType, initialType, flowContainer, couldBeUninitialized) {
if (initialType === void 0) { initialType = declaredType; }
var key;
- if (!reference.flowNode || !couldBeUninitialized && !(declaredType.flags & 17810431)) {
+ if (!reference.flowNode || !couldBeUninitialized && !(declaredType.flags & 17810175)) {
return declaredType;
}
var visitedFlowStart = visitedFlowCount;
@@ -30873,7 +32234,7 @@ var ts;
}
else {
var indexType = getTypeOfExpression(node.left.argumentExpression);
- if (isTypeAnyOrAllConstituentTypesHaveKind(indexType, 340 | 2048)) {
+ if (isTypeAnyOrAllConstituentTypesHaveKind(indexType, 84 | 2048)) {
evolvedType_1 = addEvolvingArrayElementType(evolvedType_1, node.right);
}
}
@@ -31306,6 +32667,22 @@ var ts;
!(getFalsyFlags(checkExpression(declaration.initializer)) & 2048);
return annotationIncludesUndefined ? getTypeWithFacts(declaredType, 131072) : declaredType;
}
+ function isApparentTypePosition(node) {
+ var parent = node.parent;
+ return parent.kind === 179 ||
+ parent.kind === 181 && parent.expression === node ||
+ parent.kind === 180 && parent.expression === node;
+ }
+ function typeHasNullableConstraint(type) {
+ return type.flags & 540672 && maybeTypeOfKind(getBaseConstraintOfType(type) || emptyObjectType, 6144);
+ }
+ function getDeclaredOrApparentType(symbol, node) {
+ var type = getTypeOfSymbol(symbol);
+ if (isApparentTypePosition(node) && forEachType(type, typeHasNullableConstraint)) {
+ return mapType(getWidenedType(type), getApparentType);
+ }
+ return type;
+ }
function checkIdentifier(node) {
var symbol = getResolvedSymbol(node);
if (symbol === unknownSymbol) {
@@ -31324,7 +32701,7 @@ var ts;
getNodeLinks(container).flags |= 8192;
return getTypeOfSymbol(symbol);
}
- if (symbol.flags & 8388608 && !isInTypeQuery(node) && !isConstEnumOrConstEnumOnlyModule(resolveAlias(symbol))) {
+ if (isNonLocalAlias(symbol, 107455) && !isInTypeQuery(node) && !isConstEnumOrConstEnumOnlyModule(resolveAlias(symbol))) {
markAliasSymbolAsReferenced(symbol);
}
var localOrExportSymbol = getExportSymbolOfValueSymbolIfExported(symbol);
@@ -31360,7 +32737,7 @@ var ts;
checkCollisionWithCapturedThisVariable(node, node);
checkCollisionWithCapturedNewTargetVariable(node, node);
checkNestedBlockScopedBinding(node, symbol);
- var type = getTypeOfSymbol(localOrExportSymbol);
+ var type = getDeclaredOrApparentType(localOrExportSymbol, node);
var declaration = localOrExportSymbol.valueDeclaration;
var assignmentKind = ts.getAssignmentTargetKind(node);
if (assignmentKind) {
@@ -31387,15 +32764,16 @@ var ts;
}
var assumeInitialized = isParameter || isOuterVariable ||
type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & 1) !== 0 || isInTypeQuery(node) || node.parent.kind === 246) ||
+ node.parent.kind === 203 ||
ts.isInAmbientContext(declaration);
var initialType = assumeInitialized ? (isParameter ? removeOptionalityFromDeclaredType(type, ts.getRootDeclaration(declaration)) : type) :
type === autoType || type === autoArrayType ? undefinedType :
- includeFalsyTypes(type, 2048);
+ getNullableType(type, 2048);
var flowType = getFlowTypeOfReference(node, type, initialType, flowContainer, !assumeInitialized);
if (type === autoType || type === autoArrayType) {
if (flowType === autoType || flowType === autoArrayType) {
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(ts.getNameOfDeclaration(declaration), 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));
}
return convertAutoToAny(flowType);
@@ -31786,8 +33164,15 @@ var ts;
function getContextualTypeForInitializerExpression(node) {
var declaration = node.parent;
if (node === declaration.initializer) {
- if (declaration.type) {
- return getTypeFromTypeNode(declaration.type);
+ var typeNode = ts.getEffectiveTypeAnnotationNode(declaration);
+ if (typeNode) {
+ return getTypeFromTypeNode(typeNode);
+ }
+ if (ts.isInJavaScriptFile(declaration)) {
+ var jsDocType = getTypeForDeclarationFromJSDocComment(declaration);
+ if (jsDocType) {
+ return jsDocType;
+ }
}
if (declaration.kind === 146) {
var type = getContextuallyTypedParameterType(declaration);
@@ -31801,12 +33186,13 @@ var ts;
if (ts.isBindingPattern(declaration.parent)) {
var parentDeclaration = declaration.parent.parent;
var name = declaration.propertyName || declaration.name;
- if (parentDeclaration.kind !== 176 &&
- parentDeclaration.type &&
- !ts.isBindingPattern(name)) {
- var text = ts.getTextOfPropertyName(name);
- if (text) {
- return getTypeOfPropertyOfType(getTypeFromTypeNode(parentDeclaration.type), text);
+ if (parentDeclaration.kind !== 176) {
+ var parentTypeNode = ts.getEffectiveTypeAnnotationNode(parentDeclaration);
+ if (parentTypeNode && !ts.isBindingPattern(name)) {
+ var text = ts.getTextOfPropertyName(name);
+ if (text) {
+ return getTypeOfPropertyOfType(getTypeFromTypeNode(parentTypeNode), text);
+ }
}
}
}
@@ -31850,9 +33236,9 @@ var ts;
return false;
}
function getContextualReturnType(functionDecl) {
- if (functionDecl.type ||
- functionDecl.kind === 152 ||
- functionDecl.kind === 153 && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(functionDecl.symbol, 154))) {
+ if (functionDecl.kind === 152 ||
+ ts.getEffectiveReturnTypeNode(functionDecl) ||
+ isGetAccessorWithAnnotatedSetAccessor(functionDecl)) {
return getReturnTypeOfSignature(getSignatureFromDeclaration(functionDecl));
}
var signature = getContextualSignatureForFunctionLikeDeclaration(functionDecl);
@@ -31879,7 +33265,7 @@ var ts;
function getContextualTypeForBinaryOperand(node) {
var binaryExpression = node.parent;
var operator = binaryExpression.operatorToken.kind;
- if (operator >= 58 && operator <= 70) {
+ if (ts.isAssignmentOperator(operator)) {
if (ts.getSpecialPropertyAssignmentKind(binaryExpression) !== 0) {
return undefined;
}
@@ -32017,6 +33403,8 @@ var ts;
case 261:
case 262:
return getContextualTypeForObjectLiteralElement(parent);
+ case 263:
+ return getApparentTypeOfContextualType(parent.parent);
case 177:
return getContextualTypeForElementExpression(node);
case 195:
@@ -32041,11 +33429,11 @@ var ts;
node = ts.findAncestor(node, function (n) { return !!n.contextualMapper; });
return node ? node.contextualMapper : identityMapper;
}
- function getNonGenericSignature(type, node) {
+ function getContextualCallSignature(type, node) {
var signatures = getSignaturesOfStructuredType(type, 0);
if (signatures.length === 1) {
var signature = signatures[0];
- if (!signature.typeParameters && !isAritySmaller(signature, node)) {
+ if (!isAritySmaller(signature, node)) {
return signature;
}
}
@@ -32084,13 +33472,13 @@ var ts;
return undefined;
}
if (!(type.flags & 65536)) {
- return getNonGenericSignature(type, node);
+ return getContextualCallSignature(type, node);
}
var signatureList;
var types = type.types;
- for (var _i = 0, types_17 = types; _i < types_17.length; _i++) {
- var current = types_17[_i];
- var signature = getNonGenericSignature(current, node);
+ for (var _i = 0, types_15 = types; _i < types_15.length; _i++) {
+ var current = types_15[_i];
+ var signature = getContextualCallSignature(current, node);
if (signature) {
if (!signatureList) {
signatureList = [signature];
@@ -32180,7 +33568,7 @@ var ts;
return name.kind === 144 ? isNumericComputedName(name) : isNumericLiteralName(name.text);
}
function isNumericComputedName(name) {
- return isTypeAnyOrAllConstituentTypesHaveKind(checkComputedPropertyName(name), 340);
+ return isTypeAnyOrAllConstituentTypesHaveKind(checkComputedPropertyName(name), 84);
}
function isTypeAnyOrAllConstituentTypesHaveKind(type, kind) {
return isTypeAny(type) || isTypeOfKind(type, kind);
@@ -32195,7 +33583,7 @@ var ts;
var links = getNodeLinks(node.expression);
if (!links.resolvedType) {
links.resolvedType = checkExpression(node.expression);
- if (!isTypeAnyOrAllConstituentTypesHaveKind(links.resolvedType, 340 | 262178 | 512)) {
+ if (!isTypeAnyOrAllConstituentTypesHaveKind(links.resolvedType, 84 | 262178 | 512)) {
error(node, ts.Diagnostics.A_computed_property_name_must_be_of_type_string_number_symbol_or_any);
}
else {
@@ -32333,6 +33721,8 @@ var ts;
}
if (spread.flags & 32768) {
spread.flags |= propagatedFlags;
+ spread.flags |= 1048576;
+ spread.objectFlags |= 128;
spread.symbol = node.symbol;
}
return spread;
@@ -32392,6 +33782,10 @@ var ts;
var attributesTable = ts.createMap();
var spread = emptyObjectType;
var attributesArray = [];
+ var hasSpreadAnyType = false;
+ var typeToIntersect;
+ var explicitlySpecifyChildrenAttribute = false;
+ var jsxChildrenPropertyName = getJsxElementChildrenPropertyname();
for (var _i = 0, _a = attributes.properties; _i < _a.length; _i++) {
var attributeDecl = _a[_i];
var member = attributeDecl.symbol;
@@ -32409,6 +33803,9 @@ var ts;
attributeSymbol.target = member;
attributesTable.set(attributeSymbol.name, attributeSymbol);
attributesArray.push(attributeSymbol);
+ if (attributeDecl.name.text === jsxChildrenPropertyName) {
+ explicitlySpecifyChildrenAttribute = true;
+ }
}
else {
ts.Debug.assert(attributeDecl.kind === 255);
@@ -32418,37 +33815,37 @@ var ts;
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;
+ hasSpreadAnyType = true;
+ }
+ if (isValidSpreadType(exprType)) {
+ spread = getSpreadType(spread, exprType);
+ }
+ else {
+ typeToIntersect = typeToIntersect ? getIntersectionType([typeToIntersect, exprType]) : exprType;
}
- spread = getSpreadType(spread, exprType);
}
}
- if (spread !== emptyObjectType) {
- if (attributesArray.length > 0) {
- spread = getSpreadType(spread, createJsxAttributesType(attributes.symbol, attributesTable));
- attributesArray = [];
- attributesTable = ts.createMap();
+ if (!hasSpreadAnyType) {
+ if (spread !== emptyObjectType) {
+ if (attributesArray.length > 0) {
+ spread = getSpreadType(spread, createJsxAttributesType(attributes.symbol, attributesTable));
+ }
+ attributesArray = getPropertiesOfType(spread);
}
- attributesArray = getPropertiesOfType(spread);
- }
- attributesTable = ts.createMap();
- if (attributesArray) {
- ts.forEach(attributesArray, function (attr) {
+ attributesTable = ts.createMap();
+ for (var _b = 0, attributesArray_1 = attributesArray; _b < attributesArray_1.length; _b++) {
+ var attr = attributesArray_1[_b];
if (!filter || filter(attr)) {
attributesTable.set(attr.name, attr);
}
- });
+ }
}
var parent = openingLikeElement.parent.kind === 249 ? openingLikeElement.parent : undefined;
if (parent && parent.openingElement === openingLikeElement && parent.children.length > 0) {
var childrenTypes = [];
- for (var _b = 0, _c = parent.children; _b < _c.length; _b++) {
- var child = _c[_b];
+ for (var _c = 0, _d = parent.children; _c < _d.length; _c++) {
+ var child = _d[_c];
if (child.kind === 10) {
if (!child.containsOnlyWhiteSpaces) {
childrenTypes.push(stringType);
@@ -32458,9 +33855,8 @@ var ts;
childrenTypes.push(checkExpression(child, checkMode));
}
}
- var jsxChildrenPropertyName = getJsxElementChildrenPropertyname();
- if (jsxChildrenPropertyName && jsxChildrenPropertyName !== "") {
- if (attributesTable.has(jsxChildrenPropertyName)) {
+ if (!hasSpreadAnyType && jsxChildrenPropertyName && jsxChildrenPropertyName !== "") {
+ if (explicitlySpecifyChildrenAttribute) {
error(attributes, ts.Diagnostics._0_are_specified_twice_The_attribute_named_0_will_be_overwritten, jsxChildrenPropertyName);
}
var childrenPropSymbol = createSymbol(4 | 134217728, jsxChildrenPropertyName);
@@ -32470,11 +33866,15 @@ var ts;
attributesTable.set(jsxChildrenPropertyName, childrenPropSymbol);
}
}
- return createJsxAttributesType(attributes.symbol, attributesTable);
+ if (hasSpreadAnyType) {
+ return anyType;
+ }
+ var attributeType = createJsxAttributesType(attributes.symbol, attributesTable);
+ return typeToIntersect && attributesTable.size ? getIntersectionType([typeToIntersect, attributeType]) :
+ typeToIntersect ? typeToIntersect : attributeType;
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.flags |= 33554432 | 4194304;
result.objectFlags |= 128;
return result;
}
@@ -32529,7 +33929,18 @@ var ts;
return unknownType;
}
}
- return getUnionType(ts.map(signatures, getReturnTypeOfSignature), true);
+ var instantiatedSignatures = [];
+ for (var _i = 0, signatures_3 = signatures; _i < signatures_3.length; _i++) {
+ var signature = signatures_3[_i];
+ if (signature.typeParameters) {
+ var typeArguments = fillMissingTypeArguments(undefined, signature.typeParameters, 0);
+ instantiatedSignatures.push(getSignatureInstantiation(signature, typeArguments));
+ }
+ else {
+ instantiatedSignatures.push(signature);
+ }
+ }
+ return getUnionType(ts.map(instantiatedSignatures, getReturnTypeOfSignature), true);
}
function getNameFromJsxElementAttributesContainer(nameOfAttribPropContainer) {
var jsxNamespace = getGlobalSymbol(JsxNames.JSX, 1920, undefined);
@@ -32563,6 +33974,20 @@ var ts;
}
return _jsxElementChildrenPropertyName;
}
+ function getApparentTypeOfJsxPropsType(propsType) {
+ if (!propsType) {
+ return undefined;
+ }
+ if (propsType.flags & 131072) {
+ var propsApparentType = [];
+ for (var _i = 0, _a = propsType.types; _i < _a.length; _i++) {
+ var t = _a[_i];
+ propsApparentType.push(getApparentType(t));
+ }
+ return getIntersectionType(propsApparentType);
+ }
+ return getApparentType(propsType);
+ }
function defaultTryGetJsxStatelessFunctionAttributesType(openingLikeElement, elementType, elemInstanceType, elementClassType) {
ts.Debug.assert(!(elementType.flags & 65536));
if (!elementClassType || !isTypeAssignableTo(elemInstanceType, elementClassType)) {
@@ -32572,6 +33997,7 @@ var ts;
if (callSignature !== unknownSignature) {
var callReturnType = callSignature && getReturnTypeOfSignature(callSignature);
var paramType = callReturnType && (callSignature.parameters.length === 0 ? emptyObjectType : getTypeOfSymbol(callSignature.parameters[0]));
+ paramType = getApparentTypeOfJsxPropsType(paramType);
if (callReturnType && isTypeAssignableTo(callReturnType, jsxStatelessElementType)) {
var intrinsicAttributes = getJsxType(JsxNames.IntrinsicAttributes);
if (intrinsicAttributes !== unknownType) {
@@ -32597,6 +34023,7 @@ var ts;
var candidate = candidatesOutArray_1[_i];
var callReturnType = getReturnTypeOfSignature(candidate);
var paramType = callReturnType && (candidate.parameters.length === 0 ? emptyObjectType : getTypeOfSymbol(candidate.parameters[0]));
+ paramType = getApparentTypeOfJsxPropsType(paramType);
if (callReturnType && isTypeAssignableTo(callReturnType, jsxStatelessElementType)) {
var shouldBeCandidate = true;
for (var _a = 0, _b = openingLikeElement.attributes.properties; _a < _b.length; _a++) {
@@ -32642,7 +34069,7 @@ var ts;
else if (elementType.flags & 32) {
var intrinsicElementsType = getJsxType(JsxNames.IntrinsicElements);
if (intrinsicElementsType !== unknownType) {
- var stringLiteralTypeName = elementType.text;
+ var stringLiteralTypeName = elementType.value;
var intrinsicProp = getPropertyOfType(intrinsicElementsType, stringLiteralTypeName);
if (intrinsicProp) {
return getTypeOfSymbol(intrinsicProp);
@@ -32789,7 +34216,7 @@ var ts;
function checkJsxOpeningLikeElement(node) {
checkGrammarJsxElement(node);
checkJsxPreconditions(node);
- var reactRefErr = compilerOptions.jsx === 2 ? ts.Diagnostics.Cannot_find_name_0 : undefined;
+ var reactRefErr = diagnostics && compilerOptions.jsx === 2 ? ts.Diagnostics.Cannot_find_name_0 : undefined;
var reactNamespace = getJsxNamespace();
var reactSym = resolveName(node.tagName, reactNamespace, 107455, reactRefErr, reactNamespace);
if (reactSym) {
@@ -32800,6 +34227,26 @@ var ts;
}
checkJsxAttributesAssignableToTagNameAttributes(node);
}
+ function isKnownProperty(targetType, name, isComparingJsxAttributes) {
+ if (targetType.flags & 32768) {
+ var resolved = resolveStructuredTypeMembers(targetType);
+ if (resolved.stringIndexInfo ||
+ resolved.numberIndexInfo && isNumericLiteralName(name) ||
+ getPropertyOfObjectType(targetType, name) ||
+ isComparingJsxAttributes && !isUnhyphenatedJsxName(name)) {
+ return true;
+ }
+ }
+ else if (targetType.flags & 196608) {
+ for (var _i = 0, _a = targetType.types; _i < _a.length; _i++) {
+ var t = _a[_i];
+ if (isKnownProperty(t, name, isComparingJsxAttributes)) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
function checkJsxAttributesAssignableToTagNameAttributes(openingLikeElement) {
var targetAttributesType = isJsxIntrinsicIdentifier(openingLikeElement.tagName) ?
getIntrinsicAttributesTypeFromJsxOpeningLikeElement(openingLikeElement) :
@@ -32811,7 +34258,16 @@ var ts;
error(openingLikeElement, ts.Diagnostics.JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property, getJsxElementPropertiesName());
}
else {
- checkTypeAssignableTo(sourceAttributesType, targetAttributesType, openingLikeElement.attributes.properties.length > 0 ? openingLikeElement.attributes : openingLikeElement);
+ var isSourceAttributeTypeAssignableToTarget = checkTypeAssignableTo(sourceAttributesType, targetAttributesType, openingLikeElement.attributes.properties.length > 0 ? openingLikeElement.attributes : openingLikeElement);
+ if (isSourceAttributeTypeAssignableToTarget && !isTypeAny(sourceAttributesType) && !isTypeAny(targetAttributesType)) {
+ for (var _i = 0, _a = openingLikeElement.attributes.properties; _i < _a.length; _i++) {
+ var attribute = _a[_i];
+ if (ts.isJsxAttribute(attribute) && !isKnownProperty(targetAttributesType, attribute.name.text, true)) {
+ error(attribute, ts.Diagnostics.Property_0_does_not_exist_on_type_1, attribute.name.text, typeToString(targetAttributesType));
+ break;
+ }
+ }
+ }
}
}
function checkJsxExpression(node, checkMode) {
@@ -32829,36 +34285,18 @@ var ts;
function getDeclarationKindFromSymbol(s) {
return s.valueDeclaration ? s.valueDeclaration.kind : 149;
}
- function getDeclarationModifierFlagsFromSymbol(s) {
- 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 isMethodLike(symbol) {
- return !!(symbol.flags & 8192 || getCheckFlags(symbol) & 4);
+ return !!(symbol.flags & 8192 || ts.getCheckFlags(symbol) & 4);
}
function checkPropertyAccessibility(node, left, type, prop) {
- var flags = getDeclarationModifierFlagsFromSymbol(prop);
+ var flags = ts.getDeclarationModifierFlagsFromSymbol(prop);
var errorNode = node.kind === 179 || node.kind === 226 ?
node.name :
node.right;
- if (getCheckFlags(prop) & 256) {
+ if (ts.getCheckFlags(prop) & 256) {
error(errorNode, ts.Diagnostics.Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1, symbolToString(prop), typeToString(type));
return false;
}
@@ -32933,42 +34371,6 @@ var ts;
function checkQualifiedName(node) {
return checkPropertyAccessExpressionOrQualifiedName(node, node.left, node.right);
}
- function reportNonexistentProperty(propNode, containingType) {
- var errorInfo;
- if (containingType.flags & 65536 && !(containingType.flags & 8190)) {
- for (var _i = 0, _a = containingType.types; _i < _a.length; _i++) {
- var subtype = _a[_i];
- if (!getPropertyOfType(subtype, propNode.text)) {
- errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.Property_0_does_not_exist_on_type_1, ts.declarationNameToString(propNode), typeToString(subtype));
- break;
- }
- }
- }
- errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.Property_0_does_not_exist_on_type_1, ts.declarationNameToString(propNode), typeToString(containingType));
- diagnostics.add(ts.createDiagnosticForNodeFromMessageChain(propNode, errorInfo));
- }
- function markPropertyAsReferenced(prop) {
- if (prop &&
- noUnusedIdentifiers &&
- (prop.flags & 106500) &&
- prop.valueDeclaration && (ts.getModifierFlags(prop.valueDeclaration) & 8)) {
- if (getCheckFlags(prop) & 1) {
- getSymbolLinks(prop).target.isReferenced = true;
- }
- else {
- prop.isReferenced = true;
- }
- }
- }
- function isInPropertyInitializer(node) {
- while (node) {
- if (node.parent && node.parent.kind === 149 && 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) {
@@ -33004,7 +34406,7 @@ var ts;
markPropertyAsReferenced(prop);
getNodeLinks(node).resolvedSymbol = prop;
checkPropertyAccessibility(node, left, apparentType, prop);
- var propType = getTypeOfSymbol(prop);
+ var propType = getDeclaredOrApparentType(prop, node);
var assignmentKind = ts.getAssignmentTargetKind(node);
if (assignmentKind) {
if (isReferenceToReadonlyEntity(node, prop) || isReferenceThroughNamespaceImport(node)) {
@@ -33020,16 +34422,133 @@ var ts;
var flowType = getFlowTypeOfReference(node, propType);
return assignmentKind ? getBaseTypeOfLiteralType(flowType) : flowType;
}
+ function reportNonexistentProperty(propNode, containingType) {
+ var errorInfo;
+ if (containingType.flags & 65536 && !(containingType.flags & 8190)) {
+ for (var _i = 0, _a = containingType.types; _i < _a.length; _i++) {
+ var subtype = _a[_i];
+ if (!getPropertyOfType(subtype, propNode.text)) {
+ errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.Property_0_does_not_exist_on_type_1, ts.declarationNameToString(propNode), typeToString(subtype));
+ break;
+ }
+ }
+ }
+ var suggestion = getSuggestionForNonexistentProperty(propNode, containingType);
+ if (suggestion) {
+ errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2, ts.declarationNameToString(propNode), typeToString(containingType), suggestion);
+ }
+ else {
+ errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.Property_0_does_not_exist_on_type_1, ts.declarationNameToString(propNode), typeToString(containingType));
+ }
+ diagnostics.add(ts.createDiagnosticForNodeFromMessageChain(propNode, errorInfo));
+ }
+ function getSuggestionForNonexistentProperty(node, containingType) {
+ var suggestion = getSpellingSuggestionForName(node.text, getPropertiesOfObjectType(containingType), 107455);
+ return suggestion && suggestion.name;
+ }
+ function getSuggestionForNonexistentSymbol(location, name, meaning) {
+ var result = resolveNameHelper(location, name, meaning, undefined, name, function (symbols, name, meaning) {
+ var symbol = getSymbol(symbols, name, meaning);
+ if (symbol) {
+ return symbol;
+ }
+ return getSpellingSuggestionForName(name, ts.arrayFrom(symbols.values()), meaning);
+ });
+ if (result) {
+ return result.name;
+ }
+ }
+ function getSpellingSuggestionForName(name, symbols, meaning) {
+ var worstDistance = name.length * 0.4;
+ var maximumLengthDifference = Math.min(3, name.length * 0.34);
+ var bestDistance = Number.MAX_VALUE;
+ var bestCandidate = undefined;
+ var justCheckExactMatches = false;
+ if (name.length > 30) {
+ return undefined;
+ }
+ name = name.toLowerCase();
+ for (var _i = 0, symbols_3 = symbols; _i < symbols_3.length; _i++) {
+ var candidate = symbols_3[_i];
+ if (candidate.flags & meaning &&
+ candidate.name &&
+ Math.abs(candidate.name.length - name.length) < maximumLengthDifference) {
+ var candidateName = candidate.name.toLowerCase();
+ if (candidateName === name) {
+ return candidate;
+ }
+ if (justCheckExactMatches) {
+ continue;
+ }
+ if (candidateName.length < 3 ||
+ name.length < 3 ||
+ candidateName === "eval" ||
+ candidateName === "intl" ||
+ candidateName === "undefined" ||
+ candidateName === "map" ||
+ candidateName === "nan" ||
+ candidateName === "set") {
+ continue;
+ }
+ var distance = ts.levenshtein(name, candidateName);
+ if (distance > worstDistance) {
+ continue;
+ }
+ if (distance < 3) {
+ justCheckExactMatches = true;
+ bestCandidate = candidate;
+ }
+ else if (distance < bestDistance) {
+ bestDistance = distance;
+ bestCandidate = candidate;
+ }
+ }
+ }
+ return bestCandidate;
+ }
+ function markPropertyAsReferenced(prop) {
+ if (prop &&
+ noUnusedIdentifiers &&
+ (prop.flags & 106500) &&
+ prop.valueDeclaration && (ts.getModifierFlags(prop.valueDeclaration) & 8)) {
+ if (ts.getCheckFlags(prop) & 1) {
+ getSymbolLinks(prop).target.isReferenced = true;
+ }
+ else {
+ prop.isReferenced = true;
+ }
+ }
+ }
+ function isInPropertyInitializer(node) {
+ while (node) {
+ if (node.parent && node.parent.kind === 149 && node.parent.initializer === node) {
+ return true;
+ }
+ node = node.parent;
+ }
+ return false;
+ }
function isValidPropertyAccess(node, propertyName) {
var left = node.kind === 179
? node.expression
: node.left;
- var type = checkExpression(left);
+ return isValidPropertyAccessWithType(node, left, propertyName, getWidenedType(checkExpression(left)));
+ }
+ function isValidPropertyAccessWithType(node, left, propertyName, type) {
if (type !== unknownType && !isTypeAny(type)) {
- var prop = getPropertyOfType(getWidenedType(type), propertyName);
+ var prop = getPropertyOfType(type, propertyName);
if (prop) {
return checkPropertyAccessibility(node, left, type, prop);
}
+ if (ts.isInJavaScriptFile(left) && (type.flags & 65536)) {
+ for (var _i = 0, _a = type.types; _i < _a.length; _i++) {
+ var elementType = _a[_i];
+ if (isValidPropertyAccessWithType(node, left, propertyName, elementType)) {
+ return true;
+ }
+ }
+ }
+ return false;
}
return true;
}
@@ -33127,7 +34646,13 @@ var ts;
}
return true;
}
+ function callLikeExpressionMayHaveTypeArguments(node) {
+ return ts.isCallOrNewExpression(node);
+ }
function resolveUntypedCall(node) {
+ if (callLikeExpressionMayHaveTypeArguments(node)) {
+ ts.forEach(node.typeArguments, checkSourceElement);
+ }
if (node.kind === 183) {
checkExpression(node.template);
}
@@ -33150,8 +34675,8 @@ var ts;
var specializedIndex = -1;
var spliceIndex;
ts.Debug.assert(!result.length);
- for (var _i = 0, signatures_3 = signatures; _i < signatures_3.length; _i++) {
- var signature = signatures_3[_i];
+ for (var _i = 0, signatures_4 = signatures; _i < signatures_4.length; _i++) {
+ var signature = signatures_4[_i];
var symbol = signature.declaration && getSymbolOfNode(signature.declaration);
var parent = signature.declaration && signature.declaration.parent;
if (!lastSymbol || symbol === lastSymbol) {
@@ -33238,7 +34763,7 @@ var ts;
return false;
}
if (spreadArgIndex >= 0) {
- return isRestParameterIndex(signature, spreadArgIndex);
+ return isRestParameterIndex(signature, spreadArgIndex) || spreadArgIndex >= signature.minArgumentCount;
}
if (!signature.hasRestParameter && argCount > signature.parameters.length) {
return false;
@@ -33257,28 +34782,39 @@ var ts;
return undefined;
}
function instantiateSignatureInContextOf(signature, contextualSignature, contextualMapper) {
- var context = createInferenceContext(signature, true, false);
+ var context = createInferenceContext(signature, 1);
forEachMatchingParameterType(contextualSignature, signature, function (source, target) {
- inferTypesWithContext(context, instantiateType(source, contextualMapper), target);
+ inferTypes(context.inferences, instantiateType(source, contextualMapper || identityMapper), target);
});
+ if (!contextualMapper) {
+ inferTypes(context.inferences, getReturnTypeOfSignature(contextualSignature), getReturnTypeOfSignature(signature), 4);
+ }
return getSignatureInstantiation(signature, getInferredTypes(context));
}
function inferTypeArguments(node, signature, args, excludeArgument, context) {
- var typeParameters = signature.typeParameters;
- var inferenceMapper = getInferenceMapper(context);
- for (var i = 0; i < typeParameters.length; i++) {
- if (!context.inferences[i].isFixed) {
- context.inferredTypes[i] = undefined;
+ var inferences = context.inferences;
+ for (var i = 0; i < inferences.length; i++) {
+ if (!inferences[i].isFixed) {
+ inferences[i].inferredType = undefined;
}
}
- if (context.failedTypeParameterIndex !== undefined && !context.inferences[context.failedTypeParameterIndex].isFixed) {
- context.failedTypeParameterIndex = undefined;
+ if (ts.isExpression(node)) {
+ var contextualType = getContextualType(node);
+ if (contextualType) {
+ var instantiatedType = instantiateType(contextualType, cloneTypeMapper(getContextualMapper(node)));
+ var contextualSignature = getSingleCallSignature(instantiatedType);
+ var inferenceSourceType = contextualSignature && contextualSignature.typeParameters ?
+ getOrCreateTypeFromSignature(getSignatureInstantiation(contextualSignature, contextualSignature.typeParameters)) :
+ instantiatedType;
+ var inferenceTargetType = getReturnTypeOfSignature(signature);
+ inferTypes(context.inferences, inferenceSourceType, inferenceTargetType, 4);
+ }
}
var thisType = getThisTypeOfSignature(signature);
if (thisType) {
var thisArgumentNode = getThisArgumentOfCall(node);
var thisArgumentType = thisArgumentNode ? checkExpression(thisArgumentNode) : voidType;
- inferTypesWithContext(context, thisArgumentType, thisType);
+ inferTypes(context.inferences, thisArgumentType, thisType);
}
var argCount = getEffectiveArgumentCount(node, args, signature);
for (var i = 0; i < argCount; i++) {
@@ -33287,10 +34823,10 @@ var ts;
var paramType = getTypeAtPosition(signature, i);
var argType = getEffectiveArgumentType(node, i);
if (argType === undefined) {
- var mapper = excludeArgument && excludeArgument[i] !== undefined ? identityMapper : inferenceMapper;
+ var mapper = excludeArgument && excludeArgument[i] !== undefined ? identityMapper : context;
argType = checkExpressionWithContextualType(arg, paramType, mapper);
}
- inferTypesWithContext(context, argType, paramType);
+ inferTypes(context.inferences, argType, paramType);
}
}
if (excludeArgument) {
@@ -33298,11 +34834,11 @@ var ts;
if (excludeArgument[i] === false) {
var arg = args[i];
var paramType = getTypeAtPosition(signature, i);
- inferTypesWithContext(context, checkExpressionWithContextualType(arg, paramType, inferenceMapper), paramType);
+ inferTypes(context.inferences, checkExpressionWithContextualType(arg, paramType, context), paramType);
}
}
}
- getInferredTypes(context);
+ return getInferredTypes(context);
}
function checkTypeArguments(signature, typeArgumentNodes, typeArgumentTypes, reportErrors, headMessage) {
var typeParameters = signature.typeParameters;
@@ -33474,7 +35010,7 @@ var ts;
case 71:
case 8:
case 9:
- return getLiteralTypeForText(32, element.name.text);
+ return getLiteralType(element.name.text);
case 144:
var nameType = checkComputedPropertyName(element.name);
if (isTypeOfKind(nameType, 512)) {
@@ -33552,7 +35088,7 @@ var ts;
return arg;
}
}
- function resolveCall(node, signatures, candidatesOutArray, headMessage) {
+ function resolveCall(node, signatures, candidatesOutArray, fallbackError) {
var isTaggedTemplate = node.kind === 183;
var isDecorator = node.kind === 147;
var isJsxOpeningOrSelfClosingElement = ts.isJsxOpeningLikeElement(node);
@@ -33563,24 +35099,10 @@ var ts;
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) {
- reportError(ts.Diagnostics.Supplied_parameters_do_not_match_any_signature_of_call_target);
+ diagnostics.add(ts.createDiagnosticForNode(node, ts.Diagnostics.Call_target_does_not_contain_any_signatures));
return resolveErrorCall(node);
}
var args = getEffectiveCallArguments(node);
@@ -33597,16 +35119,12 @@ var ts;
}
var candidateForArgumentError;
var candidateForTypeArgumentError;
- var resultOfFailedInference;
var result;
var signatureHelpTrailingComma = candidatesOutArray && node.kind === 181 && node.arguments.hasTrailingComma;
if (candidates.length > 1) {
result = chooseOverload(candidates, subtypeRelation, signatureHelpTrailingComma);
}
if (!result) {
- candidateForArgumentError = undefined;
- candidateForTypeArgumentError = undefined;
- resultOfFailedInference = undefined;
result = chooseOverload(candidates, assignableRelation, signatureHelpTrailingComma);
}
if (result) {
@@ -33619,27 +35137,46 @@ var ts;
checkApplicableSignature(node, args, candidateForArgumentError, assignableRelation, undefined, true);
}
else if (candidateForTypeArgumentError) {
- if (!isTaggedTemplate && !isDecorator && typeArguments) {
- var typeArguments_2 = node.typeArguments;
- checkTypeArguments(candidateForTypeArgumentError, typeArguments_2, ts.map(typeArguments_2, getTypeFromTypeNode), true, headMessage);
- }
- else {
- ts.Debug.assert(resultOfFailedInference.failedTypeParameterIndex >= 0);
- var failedTypeParameter = candidateForTypeArgumentError.typeParameters[resultOfFailedInference.failedTypeParameterIndex];
- var inferenceCandidates = getInferenceCandidates(resultOfFailedInference, resultOfFailedInference.failedTypeParameterIndex);
- var diagnosticChainHead = ts.chainDiagnosticMessages(undefined, ts.Diagnostics.The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_type_arguments_explicitly, typeToString(failedTypeParameter));
- if (headMessage) {
- diagnosticChainHead = ts.chainDiagnosticMessages(diagnosticChainHead, headMessage);
- }
- reportNoCommonSupertypeError(inferenceCandidates, node.tagName || node.expression || node.tag, diagnosticChainHead);
- }
- }
- else {
- reportError(ts.Diagnostics.Supplied_parameters_do_not_match_any_signature_of_call_target);
+ var typeArguments_1 = node.typeArguments;
+ checkTypeArguments(candidateForTypeArgumentError, typeArguments_1, ts.map(typeArguments_1, getTypeFromTypeNode), true, fallbackError);
+ }
+ else if (typeArguments && ts.every(signatures, function (sig) { return ts.length(sig.typeParameters) !== typeArguments.length; })) {
+ var min = Number.POSITIVE_INFINITY;
+ var max = Number.NEGATIVE_INFINITY;
+ for (var _i = 0, signatures_5 = signatures; _i < signatures_5.length; _i++) {
+ var sig = signatures_5[_i];
+ min = Math.min(min, getMinTypeArgumentCount(sig.typeParameters));
+ max = Math.max(max, ts.length(sig.typeParameters));
+ }
+ var paramCount = min < max ? min + "-" + max : min;
+ diagnostics.add(ts.createDiagnosticForNode(node, ts.Diagnostics.Expected_0_type_arguments_but_got_1, paramCount, typeArguments.length));
+ }
+ else if (args) {
+ var min = Number.POSITIVE_INFINITY;
+ var max = Number.NEGATIVE_INFINITY;
+ for (var _a = 0, signatures_6 = signatures; _a < signatures_6.length; _a++) {
+ var sig = signatures_6[_a];
+ min = Math.min(min, sig.minArgumentCount);
+ max = Math.max(max, sig.parameters.length);
+ }
+ var hasRestParameter_1 = ts.some(signatures, function (sig) { return sig.hasRestParameter; });
+ var hasSpreadArgument = getSpreadArgumentIndex(args) > -1;
+ var paramCount = hasRestParameter_1 ? min :
+ min < max ? min + "-" + max :
+ min;
+ var argCount = args.length - (hasSpreadArgument ? 1 : 0);
+ var error_1 = hasRestParameter_1 && hasSpreadArgument ? ts.Diagnostics.Expected_at_least_0_arguments_but_got_a_minimum_of_1 :
+ hasRestParameter_1 ? ts.Diagnostics.Expected_at_least_0_arguments_but_got_1 :
+ hasSpreadArgument ? ts.Diagnostics.Expected_0_arguments_but_got_a_minimum_of_1 :
+ ts.Diagnostics.Expected_0_arguments_but_got_1;
+ diagnostics.add(ts.createDiagnosticForNode(node, error_1, paramCount, argCount));
+ }
+ else if (fallbackError) {
+ diagnostics.add(ts.createDiagnosticForNode(node, fallbackError));
}
if (!produceDiagnostics) {
- for (var _i = 0, candidates_1 = candidates; _i < candidates_1.length; _i++) {
- var candidate = candidates_1[_i];
+ for (var _b = 0, candidates_1 = candidates; _b < candidates_1.length; _b++) {
+ var candidate = candidates_1[_b];
if (hasCorrectArity(node, args, candidate)) {
if (candidate.typeParameters && typeArguments) {
candidate = getSignatureInstantiation(candidate, ts.map(typeArguments, getTypeFromTypeNode));
@@ -33649,45 +35186,37 @@ var ts;
}
}
return resolveErrorCall(node);
- function reportError(message, arg0, arg1, arg2) {
- var errorInfo;
- errorInfo = ts.chainDiagnosticMessages(errorInfo, message, arg0, arg1, arg2);
- if (headMessage) {
- errorInfo = ts.chainDiagnosticMessages(errorInfo, headMessage);
- }
- diagnostics.add(ts.createDiagnosticForNodeFromMessageChain(node, errorInfo));
- }
function chooseOverload(candidates, relation, signatureHelpTrailingComma) {
if (signatureHelpTrailingComma === void 0) { signatureHelpTrailingComma = false; }
+ candidateForArgumentError = undefined;
+ candidateForTypeArgumentError = undefined;
for (var _i = 0, candidates_2 = candidates; _i < candidates_2.length; _i++) {
var originalCandidate = candidates_2[_i];
if (!hasCorrectArity(node, args, originalCandidate, signatureHelpTrailingComma)) {
continue;
}
var candidate = void 0;
- var typeArgumentsAreValid = void 0;
- var inferenceContext = originalCandidate.typeParameters
- ? createInferenceContext(originalCandidate, false, ts.isInJavaScriptFile(node))
- : undefined;
+ var inferenceContext = originalCandidate.typeParameters ?
+ createInferenceContext(originalCandidate, ts.isInJavaScriptFile(node) ? 4 : 0) :
+ undefined;
while (true) {
candidate = originalCandidate;
if (candidate.typeParameters) {
var typeArgumentTypes = void 0;
if (typeArguments) {
typeArgumentTypes = fillMissingTypeArguments(ts.map(typeArguments, getTypeFromTypeNode), candidate.typeParameters, getMinTypeArgumentCount(candidate.typeParameters));
- typeArgumentsAreValid = checkTypeArguments(candidate, typeArguments, typeArgumentTypes, false);
+ if (!checkTypeArguments(candidate, typeArguments, typeArgumentTypes, false)) {
+ candidateForTypeArgumentError = originalCandidate;
+ break;
+ }
}
else {
- inferTypeArguments(node, candidate, args, excludeArgument, inferenceContext);
- typeArgumentTypes = inferenceContext.inferredTypes;
- typeArgumentsAreValid = inferenceContext.failedTypeParameterIndex === undefined;
- }
- if (!typeArgumentsAreValid) {
- break;
+ typeArgumentTypes = inferTypeArguments(node, candidate, args, excludeArgument, inferenceContext);
}
candidate = getSignatureInstantiation(candidate, typeArgumentTypes);
}
if (!checkApplicableSignature(node, args, candidate, relation, excludeArgument, false)) {
+ candidateForArgumentError = candidate;
break;
}
var index = excludeArgument ? ts.indexOf(excludeArgument, true) : -1;
@@ -33696,22 +35225,6 @@ var ts;
}
excludeArgument[index] = false;
}
- if (originalCandidate.typeParameters) {
- var instantiatedCandidate = candidate;
- if (typeArgumentsAreValid) {
- candidateForArgumentError = instantiatedCandidate;
- }
- else {
- candidateForTypeArgumentError = originalCandidate;
- if (!typeArguments) {
- resultOfFailedInference = inferenceContext;
- }
- }
- }
- else {
- ts.Debug.assert(originalCandidate === candidate);
- candidateForArgumentError = originalCandidate;
- }
}
return undefined;
}
@@ -33787,7 +35300,7 @@ var ts;
}
var valueDecl = expressionType.symbol && getClassLikeDeclarationOfSymbol(expressionType.symbol);
if (valueDecl && ts.getModifierFlags(valueDecl) & 128) {
- error(node, ts.Diagnostics.Cannot_create_an_instance_of_the_abstract_class_0, ts.declarationNameToString(valueDecl.name));
+ error(node, ts.Diagnostics.Cannot_create_an_instance_of_the_abstract_class_0, ts.declarationNameToString(ts.getNameOfDeclaration(valueDecl)));
return resolveErrorCall(node);
}
if (isTypeAny(expressionType)) {
@@ -33806,7 +35319,7 @@ var ts;
var callSignatures = getSignaturesOfType(expressionType, 0);
if (callSignatures.length) {
var signature = resolveCall(node, callSignatures, candidatesOutArray);
- if (getReturnTypeOfSignature(signature) !== voidType) {
+ if (!isJavaScriptConstructor(signature.declaration) && getReturnTypeOfSignature(signature) !== voidType) {
error(node, ts.Diagnostics.Only_a_void_function_can_be_called_with_the_new_keyword);
}
if (getThisTypeOfSignature(signature) === voidType) {
@@ -33914,8 +35427,8 @@ var ts;
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];
+ for (var _i = 0, types_16 = types; _i < types_16.length; _i++) {
+ var type = types_16[_i];
result = result || resolveStatelessJsxOpeningLikeElement(openingLikeElement, type, candidatesOutArray);
}
return result;
@@ -33958,13 +35471,29 @@ var ts;
function getResolvedOrAnySignature(node) {
return getNodeLinks(node).resolvedSignature === resolvingSignature ? resolvingSignature : getResolvedSignature(node);
}
+ function isJavaScriptConstructor(node) {
+ if (ts.isInJavaScriptFile(node)) {
+ if (ts.getJSDocClassTag(node))
+ return true;
+ var symbol = ts.isFunctionDeclaration(node) || ts.isFunctionExpression(node) ? getSymbolOfNode(node) :
+ ts.isVariableDeclaration(node) && ts.isFunctionExpression(node.initializer) ? getSymbolOfNode(node.initializer) :
+ undefined;
+ return symbol && symbol.members !== undefined;
+ }
+ return false;
+ }
function getInferredClassType(symbol) {
var links = getSymbolLinks(symbol);
if (!links.inferredClassType) {
- links.inferredClassType = createAnonymousType(symbol, symbol.members, emptyArray, emptyArray, undefined, undefined);
+ links.inferredClassType = createAnonymousType(symbol, symbol.members || emptySymbols, emptyArray, emptyArray, undefined, undefined);
}
return links.inferredClassType;
}
+ function isInferredClassType(type) {
+ return type.symbol
+ && getObjectFlags(type) & 16
+ && getSymbolLinks(type.symbol).inferredClassType === type;
+ }
function checkCallExpression(node) {
checkGrammarTypeArguments(node, node.typeArguments) || checkGrammarArguments(node, node.arguments);
var signature = getResolvedSignature(node);
@@ -33984,7 +35513,7 @@ var ts;
if (funcSymbol && ts.isDeclarationOfFunctionOrClassExpression(funcSymbol)) {
funcSymbol = getSymbolOfNode(funcSymbol.valueDeclaration.initializer);
}
- if (funcSymbol && funcSymbol.members && funcSymbol.flags & 16) {
+ if (funcSymbol && funcSymbol.flags & 16 && (funcSymbol.members || ts.getJSDocClassTag(funcSymbol.valueDeclaration))) {
return getInferredClassType(funcSymbol);
}
else if (noImplicitAny) {
@@ -33998,6 +35527,28 @@ var ts;
}
return getReturnTypeOfSignature(signature);
}
+ function checkImportCallExpression(node) {
+ checkGrammarArguments(node, node.arguments) || checkGrammarImportCallExpression(node);
+ if (node.arguments.length === 0) {
+ return createPromiseReturnType(node, anyType);
+ }
+ var specifier = node.arguments[0];
+ var specifierType = checkExpressionCached(specifier);
+ for (var i = 1; i < node.arguments.length; ++i) {
+ checkExpressionCached(node.arguments[i]);
+ }
+ if (specifierType.flags & 2048 || specifierType.flags & 4096 || !isTypeAssignableTo(specifierType, stringType)) {
+ error(specifier, ts.Diagnostics.Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0, typeToString(specifierType));
+ }
+ var moduleSymbol = resolveExternalModuleName(node, specifier);
+ if (moduleSymbol) {
+ var esModuleSymbol = resolveESModuleSymbol(moduleSymbol, specifier, true);
+ if (esModuleSymbol) {
+ return createPromiseReturnType(node, getTypeOfSymbol(esModuleSymbol));
+ }
+ }
+ return createPromiseReturnType(node, anyType);
+ }
function isCommonJsRequire(node) {
if (!ts.isRequireCall(node, true)) {
return false;
@@ -34059,7 +35610,7 @@ var ts;
if (strictNullChecks) {
var declaration = symbol.valueDeclaration;
if (declaration && declaration.initializer) {
- return includeFalsyTypes(type, 2048);
+ return getNullableType(type, 2048);
}
}
return type;
@@ -34072,37 +35623,42 @@ var ts;
function getTypeOfFirstParameterOfSignature(signature) {
return signature.parameters.length > 0 ? getTypeAtPosition(signature, 0) : neverType;
}
- function assignContextualParameterTypes(signature, context, mapper, checkMode) {
+ function inferFromAnnotatedParameters(signature, context, mapper) {
var len = signature.parameters.length - (signature.hasRestParameter ? 1 : 0);
- if (checkMode === 2) {
- for (var i = 0; i < len; i++) {
- var declaration = signature.parameters[i].valueDeclaration;
- if (declaration.type) {
- inferTypesWithContext(mapper.context, getTypeFromTypeNode(declaration.type), getTypeAtPosition(context, i));
+ for (var i = 0; i < len; i++) {
+ var declaration = signature.parameters[i].valueDeclaration;
+ if (declaration.type) {
+ var typeNode = ts.getEffectiveTypeAnnotationNode(declaration);
+ if (typeNode) {
+ inferTypes(mapper.inferences, getTypeFromTypeNode(typeNode), getTypeAtPosition(context, i));
}
}
}
+ }
+ function assignContextualParameterTypes(signature, context) {
+ signature.typeParameters = context.typeParameters;
if (context.thisParameter) {
var parameter = signature.thisParameter;
if (!parameter || parameter.valueDeclaration && !parameter.valueDeclaration.type) {
if (!parameter) {
signature.thisParameter = createSymbolWithType(context.thisParameter, undefined);
}
- assignTypeToParameterAndFixTypeParameters(signature.thisParameter, getTypeOfSymbol(context.thisParameter), mapper, checkMode);
+ assignTypeToParameterAndFixTypeParameters(signature.thisParameter, getTypeOfSymbol(context.thisParameter));
}
}
+ var len = signature.parameters.length - (signature.hasRestParameter ? 1 : 0);
for (var i = 0; i < len; i++) {
var parameter = signature.parameters[i];
- if (!parameter.valueDeclaration.type) {
+ if (!ts.getEffectiveTypeAnnotationNode(parameter.valueDeclaration)) {
var contextualParameterType = getTypeAtPosition(context, i);
- assignTypeToParameterAndFixTypeParameters(parameter, contextualParameterType, mapper, checkMode);
+ assignTypeToParameterAndFixTypeParameters(parameter, contextualParameterType);
}
}
if (signature.hasRestParameter && isRestParameterIndex(context, signature.parameters.length - 1)) {
var parameter = ts.lastOrUndefined(signature.parameters);
- if (!parameter.valueDeclaration.type) {
+ if (!ts.getEffectiveTypeAnnotationNode(parameter.valueDeclaration)) {
var contextualParameterType = getTypeOfSymbol(ts.lastOrUndefined(context.parameters));
- assignTypeToParameterAndFixTypeParameters(parameter, contextualParameterType, mapper, checkMode);
+ assignTypeToParameterAndFixTypeParameters(parameter, contextualParameterType);
}
}
}
@@ -34119,27 +35675,17 @@ var ts;
}
}
}
- function assignTypeToParameterAndFixTypeParameters(parameter, contextualType, mapper, checkMode) {
+ function assignTypeToParameterAndFixTypeParameters(parameter, contextualType) {
var links = getSymbolLinks(parameter);
if (!links.type) {
- links.type = instantiateType(contextualType, mapper);
+ links.type = contextualType;
+ var name = ts.getNameOfDeclaration(parameter.valueDeclaration);
if (links.type === emptyObjectType &&
- (parameter.valueDeclaration.name.kind === 174 ||
- parameter.valueDeclaration.name.kind === 175)) {
- links.type = getTypeFromBindingPattern(parameter.valueDeclaration.name);
+ (name.kind === 174 || name.kind === 175)) {
+ links.type = getTypeFromBindingPattern(name);
}
assignBindingElementTypes(parameter.valueDeclaration);
}
- else if (checkMode === 2) {
- inferTypesWithContext(mapper.context, links.type, instantiateType(contextualType, mapper));
- }
- }
- function getReturnTypeFromJSDocComment(func) {
- var returnTag = ts.getJSDocReturnTag(func);
- if (returnTag && returnTag.typeExpression) {
- return getTypeFromTypeNode(returnTag.typeExpression.type);
- }
- return undefined;
}
function createPromiseType(promisedType) {
var globalPromiseType = getGlobalPromiseType(true);
@@ -34152,11 +35698,15 @@ var ts;
function createPromiseReturnType(func, promisedType) {
var promiseType = createPromiseType(promisedType);
if (promiseType === emptyObjectType) {
- 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);
+ error(func, ts.isImportCall(func) ?
+ ts.Diagnostics.A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option :
+ 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);
+ error(func, ts.isImportCall(func) ?
+ ts.Diagnostics.A_dynamic_import_call_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option :
+ 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;
}
@@ -34312,13 +35862,13 @@ var ts;
}
var hasExplicitReturn = func.flags & 256;
if (returnType && returnType.flags & 8192) {
- error(func.type, ts.Diagnostics.A_function_returning_never_cannot_have_a_reachable_end_point);
+ error(ts.getEffectiveReturnTypeNode(func), ts.Diagnostics.A_function_returning_never_cannot_have_a_reachable_end_point);
}
else if (returnType && !hasExplicitReturn) {
- error(func.type, ts.Diagnostics.A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value);
+ error(ts.getEffectiveReturnTypeNode(func), ts.Diagnostics.A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value);
}
else if (returnType && strictNullChecks && !isTypeAssignableTo(undefinedType, returnType)) {
- error(func.type, ts.Diagnostics.Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined);
+ error(ts.getEffectiveReturnTypeNode(func), ts.Diagnostics.Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined);
}
else if (compilerOptions.noImplicitReturns) {
if (!returnType) {
@@ -34330,7 +35880,7 @@ var ts;
return;
}
}
- error(func.type || func, ts.Diagnostics.Not_all_code_paths_return_a_value);
+ error(ts.getEffectiveReturnTypeNode(func) || func, ts.Diagnostics.Not_all_code_paths_return_a_value);
}
}
function checkFunctionExpressionOrObjectLiteralMethod(node, checkMode) {
@@ -34345,29 +35895,30 @@ var ts;
}
var links = getNodeLinks(node);
var type = getTypeOfSymbol(node.symbol);
- var contextSensitive = isContextSensitive(node);
- var mightFixTypeParameters = contextSensitive && checkMode === 2;
- if (mightFixTypeParameters || !(links.flags & 1024)) {
+ if (!(links.flags & 1024)) {
var contextualSignature = getContextualSignature(node);
- var contextChecked = !!(links.flags & 1024);
- if (mightFixTypeParameters || !contextChecked) {
+ if (!(links.flags & 1024)) {
links.flags |= 1024;
if (contextualSignature) {
var signature = getSignaturesOfType(type, 0)[0];
- if (contextSensitive) {
- assignContextualParameterTypes(signature, contextualSignature, getContextualMapper(node), checkMode);
+ if (isContextSensitive(node)) {
+ var contextualMapper = getContextualMapper(node);
+ if (checkMode === 2) {
+ inferFromAnnotatedParameters(signature, contextualSignature, contextualMapper);
+ }
+ var instantiatedContextualSignature = contextualMapper === identityMapper ?
+ contextualSignature : instantiateSignature(contextualSignature, contextualMapper);
+ assignContextualParameterTypes(signature, instantiatedContextualSignature);
}
- if (mightFixTypeParameters || !node.type && !signature.resolvedReturnType) {
+ if (!ts.getEffectiveReturnTypeNode(node) && !signature.resolvedReturnType) {
var returnType = getReturnTypeFromBody(node, checkMode);
if (!signature.resolvedReturnType) {
signature.resolvedReturnType = returnType;
}
}
}
- if (!contextChecked) {
- checkSignatureDeclaration(node);
- checkNodeDeferred(node);
- }
+ checkSignatureDeclaration(node);
+ checkNodeDeferred(node);
}
}
if (produceDiagnostics && node.kind !== 151) {
@@ -34380,15 +35931,16 @@ var ts;
function checkFunctionExpressionOrObjectLiteralMethodDeferred(node) {
ts.Debug.assert(node.kind !== 151 || ts.isObjectLiteralMethod(node));
var functionFlags = ts.getFunctionFlags(node);
- var returnOrPromisedType = node.type &&
+ var returnTypeNode = ts.getEffectiveReturnTypeNode(node);
+ var returnOrPromisedType = returnTypeNode &&
((functionFlags & 3) === 2 ?
checkAsyncFunctionReturnType(node) :
- getTypeFromTypeNode(node.type));
+ getTypeFromTypeNode(returnTypeNode));
if ((functionFlags & 1) === 0) {
checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnOrPromisedType);
}
if (node.body) {
- if (!node.type) {
+ if (!returnTypeNode) {
getReturnTypeOfSignature(getSignatureFromDeclaration(node));
}
if (node.body.kind === 207) {
@@ -34410,15 +35962,15 @@ var ts;
}
}
function checkArithmeticOperandType(operand, type, diagnostic) {
- if (!isTypeAnyOrAllConstituentTypesHaveKind(type, 340)) {
+ if (!isTypeAnyOrAllConstituentTypesHaveKind(type, 84)) {
error(operand, diagnostic);
return false;
}
return true;
}
function isReadonlySymbol(symbol) {
- return !!(getCheckFlags(symbol) & 8 ||
- symbol.flags & 4 && getDeclarationModifierFlagsFromSymbol(symbol) & 64 ||
+ return !!(ts.getCheckFlags(symbol) & 8 ||
+ symbol.flags & 4 && ts.getDeclarationModifierFlagsFromSymbol(symbol) & 64 ||
symbol.flags & 3 && getDeclarationNodeFlagsFromSymbol(symbol) & 2 ||
symbol.flags & 98304 && !(symbol.flags & 65536) ||
symbol.flags & 8);
@@ -34429,8 +35981,9 @@ var ts;
(expr.kind === 179 || expr.kind === 180) &&
expr.expression.kind === 99) {
var func = ts.getContainingFunction(expr);
- if (!(func && func.kind === 152))
+ if (!(func && func.kind === 152)) {
return true;
+ }
return !(func.parent === symbol.valueDeclaration.parent || func === symbol.valueDeclaration.parent);
}
return true;
@@ -34451,7 +36004,7 @@ var ts;
return false;
}
function checkReferenceExpression(expr, invalidReferenceMessage) {
- var node = ts.skipParentheses(expr);
+ var node = ts.skipOuterExpressions(expr, 2 | 1);
if (node.kind !== 71 && node.kind !== 179 && node.kind !== 180) {
error(expr, invalidReferenceMessage);
return false;
@@ -34498,7 +36051,7 @@ var ts;
return silentNeverType;
}
if (node.operator === 38 && node.operand.kind === 8) {
- return getFreshTypeOfLiteralType(getLiteralTypeForText(64, "" + -node.operand.text));
+ return getFreshTypeOfLiteralType(getLiteralType(-node.operand.text));
}
switch (node.operator) {
case 37:
@@ -34541,8 +36094,8 @@ var ts;
}
if (type.flags & 196608) {
var types = type.types;
- for (var _i = 0, types_19 = types; _i < types_19.length; _i++) {
- var t = types_19[_i];
+ for (var _i = 0, types_17 = types; _i < types_17.length; _i++) {
+ var t = types_17[_i];
if (maybeTypeOfKind(t, kind)) {
return true;
}
@@ -34556,8 +36109,8 @@ var ts;
}
if (type.flags & 65536) {
var types = type.types;
- for (var _i = 0, types_20 = types; _i < types_20.length; _i++) {
- var t = types_20[_i];
+ for (var _i = 0, types_18 = types; _i < types_18.length; _i++) {
+ var t = types_18[_i];
if (!isTypeOfKind(t, kind)) {
return false;
}
@@ -34566,8 +36119,8 @@ var ts;
}
if (type.flags & 131072) {
var types = type.types;
- for (var _a = 0, types_21 = types; _a < types_21.length; _a++) {
- var t = types_21[_a];
+ for (var _a = 0, types_19 = types; _a < types_19.length; _a++) {
+ var t = types_19[_a];
if (isTypeOfKind(t, kind)) {
return true;
}
@@ -34602,7 +36155,7 @@ var ts;
}
leftType = checkNonNullType(leftType, left);
rightType = checkNonNullType(rightType, right);
- if (!(isTypeComparableTo(leftType, stringType) || isTypeOfKind(leftType, 340 | 512))) {
+ if (!(isTypeComparableTo(leftType, stringType) || isTypeOfKind(leftType, 84 | 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 | 540672 | 16777216)) {
@@ -34874,7 +36427,7 @@ var ts;
rightType = checkNonNullType(rightType, right);
}
var resultType = void 0;
- if (isTypeOfKind(leftType, 340) && isTypeOfKind(rightType, 340)) {
+ if (isTypeOfKind(leftType, 84) && isTypeOfKind(rightType, 84)) {
resultType = numberType;
}
else {
@@ -34928,7 +36481,7 @@ var ts;
return checkInExpression(left, right, leftType, rightType);
case 53:
return getTypeFacts(leftType) & 1048576 ?
- includeFalsyTypes(rightType, getFalsyFlags(strictNullChecks ? leftType : getBaseTypeOfLiteralType(rightType))) :
+ getUnionType([extractDefinitelyFalsyTypes(strictNullChecks ? leftType : getBaseTypeOfLiteralType(rightType)), rightType]) :
leftType;
case 54:
return getTypeFacts(leftType) & 2097152 ?
@@ -34972,7 +36525,7 @@ var ts;
}
}
function checkAssignmentOperator(valueType) {
- if (produceDiagnostics && operator >= 58 && operator <= 70) {
+ if (produceDiagnostics && ts.isAssignmentOperator(operator)) {
if (checkReferenceExpression(left, ts.Diagnostics.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access)) {
checkTypeAssignableTo(valueType, leftType, left, undefined);
}
@@ -35010,12 +36563,12 @@ var ts;
var func = ts.getContainingFunction(node);
var functionFlags = func && ts.getFunctionFlags(func);
if (node.asteriskToken) {
- if (functionFlags & 2) {
- if (languageVersion < 4) {
- checkExternalEmitHelpers(node, 4096);
- }
+ if ((functionFlags & 3) === 3 &&
+ languageVersion < 5) {
+ checkExternalEmitHelpers(node, 26624);
}
- else if (languageVersion < 2 && compilerOptions.downlevelIteration) {
+ if ((functionFlags & 3) === 1 &&
+ languageVersion < 2 && compilerOptions.downlevelIteration) {
checkExternalEmitHelpers(node, 256);
}
}
@@ -35026,8 +36579,9 @@ var ts;
if (nodeIsYieldStar) {
expressionElementType = checkIteratedTypeOrElementType(expressionType, node.expression, false, (functionFlags & 2) !== 0);
}
- if (func.type) {
- var signatureElementType = getIteratedTypeOfGenerator(getTypeFromTypeNode(func.type), (functionFlags & 2) !== 0) || anyType;
+ var returnType = ts.getEffectiveReturnTypeNode(func);
+ if (returnType) {
+ var signatureElementType = getIteratedTypeOfGenerator(getTypeFromTypeNode(returnType), (functionFlags & 2) !== 0) || anyType;
if (nodeIsYieldStar) {
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)
@@ -35055,9 +36609,9 @@ var ts;
}
switch (node.kind) {
case 9:
- return getFreshTypeOfLiteralType(getLiteralTypeForText(32, node.text));
+ return getFreshTypeOfLiteralType(getLiteralType(node.text));
case 8:
- return getFreshTypeOfLiteralType(getLiteralTypeForText(64, node.text));
+ return getFreshTypeOfLiteralType(getLiteralType(+node.text));
case 101:
return trueType;
case 86:
@@ -35111,7 +36665,7 @@ var ts;
}
contextualType = constraint;
}
- return maybeTypeOfKind(contextualType, (480 | 262144));
+ return maybeTypeOfKind(contextualType, (224 | 262144));
}
return false;
}
@@ -35139,7 +36693,7 @@ var ts;
if (signature && signature.typeParameters) {
var contextualType = getApparentTypeOfContextualType(node);
if (contextualType) {
- var contextualSignature = getSingleCallSignature(contextualType);
+ var contextualSignature = getSingleCallSignature(getNonNullableType(contextualType));
if (contextualSignature && !contextualSignature.typeParameters) {
return getOrCreateTypeFromSignature(instantiateSignatureInContextOf(signature, contextualSignature, getContextualMapper(node)));
}
@@ -35214,6 +36768,9 @@ var ts;
case 180:
return checkIndexedAccess(node);
case 181:
+ if (node.expression.kind === 91) {
+ return checkImportCallExpression(node);
+ }
case 182:
return checkCallExpression(node);
case 183:
@@ -35408,17 +36965,14 @@ var ts;
checkGrammarFunctionLikeDeclaration(node);
}
var functionFlags = ts.getFunctionFlags(node);
- if ((functionFlags & 7) === 2 && languageVersion < 4) {
- checkExternalEmitHelpers(node, 64);
- if (languageVersion < 2) {
- checkExternalEmitHelpers(node, 128);
+ if (!(functionFlags & 4)) {
+ if ((functionFlags & 3) === 3 && languageVersion < 5) {
+ checkExternalEmitHelpers(node, 6144);
}
- }
- if ((functionFlags & 5) === 1) {
- if (functionFlags & 2 && languageVersion < 4) {
- checkExternalEmitHelpers(node, 2048);
+ if ((functionFlags & 3) === 2 && languageVersion < 4) {
+ checkExternalEmitHelpers(node, 64);
}
- else if (languageVersion < 2) {
+ if ((functionFlags & 3) !== 0 && languageVersion < 2) {
checkExternalEmitHelpers(node, 128);
}
}
@@ -35429,7 +36983,8 @@ var ts;
}
if (produceDiagnostics) {
checkCollisionWithArgumentsInGeneratedCode(node);
- if (noImplicitAny && !node.type) {
+ var returnTypeNode = ts.getEffectiveReturnTypeNode(node);
+ if (noImplicitAny && !returnTypeNode) {
switch (node.kind) {
case 156:
error(node, ts.Diagnostics.Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type);
@@ -35439,19 +36994,19 @@ var ts;
break;
}
}
- if (node.type) {
+ if (returnTypeNode) {
var functionFlags_1 = ts.getFunctionFlags(node);
- if ((functionFlags_1 & 5) === 1) {
- var returnType = getTypeFromTypeNode(node.type);
+ if ((functionFlags_1 & (4 | 1)) === 1) {
+ var returnType = getTypeFromTypeNode(returnTypeNode);
if (returnType === voidType) {
- error(node.type, ts.Diagnostics.A_generator_cannot_have_a_void_type_annotation);
+ error(returnTypeNode, ts.Diagnostics.A_generator_cannot_have_a_void_type_annotation);
}
else {
var generatorElementType = getIteratedTypeOfGenerator(returnType, (functionFlags_1 & 2) !== 0) || anyType;
var iterableIteratorInstantiation = functionFlags_1 & 2
? createAsyncIterableIteratorType(generatorElementType)
: createIterableIteratorType(generatorElementType);
- checkTypeAssignableTo(iterableIteratorInstantiation, returnType, node.type);
+ checkTypeAssignableTo(iterableIteratorInstantiation, returnType, returnTypeNode);
}
}
else if ((functionFlags_1 & 3) === 2) {
@@ -35562,7 +37117,7 @@ var ts;
continue;
}
if (names.get(memberName)) {
- error(member.symbol.valueDeclaration.name, ts.Diagnostics.Duplicate_identifier_0, memberName);
+ error(ts.getNameOfDeclaration(member.symbol.valueDeclaration), ts.Diagnostics.Duplicate_identifier_0, memberName);
error(member.name, ts.Diagnostics.Duplicate_identifier_0, memberName);
}
else {
@@ -35636,7 +37191,8 @@ var ts;
return;
}
function containsSuperCallAsComputedPropertyName(n) {
- return n.name && containsSuperCall(n.name);
+ var name = ts.getNameOfDeclaration(n);
+ return name && containsSuperCall(name);
}
function containsSuperCall(n) {
if (ts.isSuperCall(n)) {
@@ -35774,7 +37330,7 @@ var ts;
checkTypeArgumentConstraints(typeParameters, node.typeArguments);
}
}
- if (type.flags & 16 && !type.memberTypes && getNodeLinks(node).resolvedSymbol.flags & 8) {
+ if (type.flags & 16 && getNodeLinks(node).resolvedSymbol.flags & 8) {
error(node, ts.Diagnostics.Enum_type_0_has_members_with_initializers_that_are_not_literals, typeToString(type));
}
}
@@ -35813,7 +37369,7 @@ var ts;
if (isTypeAssignableTo(indexType, getIndexType(objectType))) {
return type;
}
- if (maybeTypeOfKind(objectType, 540672) && isTypeOfKind(indexType, 340)) {
+ if (maybeTypeOfKind(objectType, 540672) && isTypeOfKind(indexType, 84)) {
var constraint = getBaseConstraintOfType(objectType);
if (constraint && getIndexInfoOfType(constraint, 1)) {
return type;
@@ -35863,16 +37419,16 @@ var ts;
ts.forEach(overloads, function (o) {
var deviation = getEffectiveDeclarationFlags(o, flagsToCheck) ^ canonicalFlags_1;
if (deviation & 1) {
- error(o.name, ts.Diagnostics.Overload_signatures_must_all_be_exported_or_non_exported);
+ error(ts.getNameOfDeclaration(o), ts.Diagnostics.Overload_signatures_must_all_be_exported_or_non_exported);
}
else if (deviation & 2) {
- error(o.name, ts.Diagnostics.Overload_signatures_must_all_be_ambient_or_non_ambient);
+ error(ts.getNameOfDeclaration(o), ts.Diagnostics.Overload_signatures_must_all_be_ambient_or_non_ambient);
}
else if (deviation & (8 | 16)) {
- error(o.name || o, ts.Diagnostics.Overload_signatures_must_all_be_public_private_or_protected);
+ error(ts.getNameOfDeclaration(o) || o, ts.Diagnostics.Overload_signatures_must_all_be_public_private_or_protected);
}
else if (deviation & 128) {
- error(o.name, ts.Diagnostics.Overload_signatures_must_all_be_abstract_or_non_abstract);
+ error(ts.getNameOfDeclaration(o), ts.Diagnostics.Overload_signatures_must_all_be_abstract_or_non_abstract);
}
});
}
@@ -35883,7 +37439,7 @@ var ts;
ts.forEach(overloads, function (o) {
var deviation = ts.hasQuestionToken(o) !== canonicalHasQuestionToken_1;
if (deviation) {
- error(o.name, ts.Diagnostics.Overload_signatures_must_all_be_optional_or_required);
+ error(ts.getNameOfDeclaration(o), ts.Diagnostics.Overload_signatures_must_all_be_optional_or_required);
}
});
}
@@ -35991,7 +37547,7 @@ var ts;
}
if (duplicateFunctionDeclaration) {
ts.forEach(declarations, function (declaration) {
- error(declaration.name, ts.Diagnostics.Duplicate_function_implementation);
+ error(ts.getNameOfDeclaration(declaration), ts.Diagnostics.Duplicate_function_implementation);
});
}
if (lastSeenNonAmbientDeclaration && !lastSeenNonAmbientDeclaration.body &&
@@ -36004,8 +37560,8 @@ var ts;
if (bodyDeclaration) {
var signatures = getSignaturesOfSymbol(symbol);
var bodySignature = getSignatureFromDeclaration(bodyDeclaration);
- for (var _a = 0, signatures_4 = signatures; _a < signatures_4.length; _a++) {
- var signature = signatures_4[_a];
+ for (var _a = 0, signatures_7 = signatures; _a < signatures_7.length; _a++) {
+ var signature = signatures_7[_a];
if (!isImplementationCompatibleWithOverload(bodySignature, signature)) {
error(signature.declaration, ts.Diagnostics.Overload_signature_is_not_compatible_with_function_implementation);
break;
@@ -36054,11 +37610,12 @@ var ts;
for (var _b = 0, _c = symbol.declarations; _b < _c.length; _b++) {
var d = _c[_b];
var declarationSpaces = getDeclarationSpaces(d);
+ var name = ts.getNameOfDeclaration(d);
if (declarationSpaces & commonDeclarationSpacesForDefaultAndNonDefault) {
- error(d.name, ts.Diagnostics.Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead, ts.declarationNameToString(d.name));
+ error(name, ts.Diagnostics.Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead, ts.declarationNameToString(name));
}
else if (declarationSpaces & commonDeclarationSpacesForExportsAndLocals) {
- error(d.name, ts.Diagnostics.Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local, ts.declarationNameToString(d.name));
+ error(name, ts.Diagnostics.Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local, ts.declarationNameToString(name));
}
}
}
@@ -36171,44 +37728,45 @@ var ts;
return typeAsAwaitable.awaitedTypeOfType = type;
}
function checkAsyncFunctionReturnType(node) {
- var returnType = getTypeFromTypeNode(node.type);
+ var returnTypeNode = ts.getEffectiveReturnTypeNode(node);
+ var returnType = getTypeFromTypeNode(returnTypeNode);
if (languageVersion >= 2) {
if (returnType === unknownType) {
return unknownType;
}
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);
+ error(returnTypeNode, ts.Diagnostics.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type);
return unknownType;
}
}
else {
- markTypeNodeAsReferenced(node.type);
+ markTypeNodeAsReferenced(returnTypeNode);
if (returnType === unknownType) {
return unknownType;
}
- var promiseConstructorName = ts.getEntityNameFromTypeNode(node.type);
+ var promiseConstructorName = ts.getEntityNameFromTypeNode(returnTypeNode);
if (promiseConstructorName === undefined) {
- 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, typeToString(returnType));
+ error(returnTypeNode, 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, typeToString(returnType));
return unknownType;
}
var promiseConstructorSymbol = resolveEntityName(promiseConstructorName, 107455, true);
var promiseConstructorType = promiseConstructorSymbol ? getTypeOfSymbol(promiseConstructorSymbol) : unknownType;
if (promiseConstructorType === unknownType) {
if (promiseConstructorName.kind === 71 && 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);
+ error(returnTypeNode, 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));
+ error(returnTypeNode, 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(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));
+ error(returnTypeNode, 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;
}
- if (!checkTypeAssignableTo(promiseConstructorType, globalPromiseConstructorLikeType, 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)) {
+ if (!checkTypeAssignableTo(promiseConstructorType, globalPromiseConstructorLikeType, returnTypeNode, 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)) {
return unknownType;
}
var rootName = promiseConstructorName && getFirstIdentifier(promiseConstructorName);
@@ -36254,7 +37812,9 @@ var ts;
checkTypeAssignableTo(returnType, expectedReturnType, node, headMessage, errorInfo);
}
function markTypeNodeAsReferenced(node) {
- var typeName = node && ts.getEntityNameFromTypeNode(node);
+ markEntityNameOrEntityExpressionAsReference(node && ts.getEntityNameFromTypeNode(node));
+ }
+ function markEntityNameOrEntityExpressionAsReference(typeName) {
var rootName = typeName && getFirstIdentifier(typeName);
var rootSymbol = rootName && resolveName(rootName, rootName.text, (typeName.kind === 71 ? 793064 : 1920) | 8388608, undefined, undefined);
if (rootSymbol
@@ -36264,8 +37824,46 @@ var ts;
markAliasSymbolAsReferenced(rootSymbol);
}
}
+ function markDecoratorMedataDataTypeNodeAsReferenced(node) {
+ var entityName = getEntityNameForDecoratorMetadata(node);
+ if (entityName && ts.isEntityName(entityName)) {
+ markEntityNameOrEntityExpressionAsReference(entityName);
+ }
+ }
+ function getEntityNameForDecoratorMetadata(node) {
+ if (node) {
+ switch (node.kind) {
+ case 167:
+ case 166:
+ var commonEntityName = void 0;
+ for (var _i = 0, _a = node.types; _i < _a.length; _i++) {
+ var typeNode = _a[_i];
+ var individualEntityName = getEntityNameForDecoratorMetadata(typeNode);
+ if (!individualEntityName) {
+ return undefined;
+ }
+ if (commonEntityName) {
+ if (!ts.isIdentifier(commonEntityName) ||
+ !ts.isIdentifier(individualEntityName) ||
+ commonEntityName.text !== individualEntityName.text) {
+ return undefined;
+ }
+ }
+ else {
+ commonEntityName = individualEntityName;
+ }
+ }
+ return commonEntityName;
+ case 168:
+ return getEntityNameForDecoratorMetadata(node.type);
+ case 159:
+ return node.typeName;
+ }
+ }
+ }
function getParameterTypeNodeForDecoratorCheck(node) {
- return node.dotDotDotToken ? ts.getRestParameterElementType(node.type) : node.type;
+ var typeNode = ts.getEffectiveTypeAnnotationNode(node);
+ return ts.isRestParameter(node) ? ts.getRestParameterElementType(typeNode) : typeNode;
}
function checkDecorators(node) {
if (!node.decorators) {
@@ -36290,7 +37888,7 @@ var ts;
if (constructor) {
for (var _i = 0, _a = constructor.parameters; _i < _a.length; _i++) {
var parameter = _a[_i];
- markTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(parameter));
+ markDecoratorMedataDataTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(parameter));
}
}
break;
@@ -36299,15 +37897,15 @@ var ts;
case 154:
for (var _b = 0, _c = node.parameters; _b < _c.length; _b++) {
var parameter = _c[_b];
- markTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(parameter));
+ markDecoratorMedataDataTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(parameter));
}
- markTypeNodeAsReferenced(node.type);
+ markDecoratorMedataDataTypeNodeAsReferenced(ts.getEffectiveReturnTypeNode(node));
break;
case 149:
- markTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(node));
+ markDecoratorMedataDataTypeNodeAsReferenced(ts.getEffectiveTypeAnnotationNode(node));
break;
case 146:
- markTypeNodeAsReferenced(node.type);
+ markDecoratorMedataDataTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(node));
break;
}
}
@@ -36315,7 +37913,8 @@ var ts;
}
function checkFunctionDeclaration(node) {
if (produceDiagnostics) {
- checkFunctionOrMethodDeclaration(node) || checkGrammarForGenerator(node);
+ checkFunctionOrMethodDeclaration(node);
+ checkGrammarForGenerator(node);
checkCollisionWithCapturedSuperVariable(node, node.name);
checkCollisionWithCapturedThisVariable(node, node.name);
checkCollisionWithCapturedNewTargetVariable(node, node.name);
@@ -36345,13 +37944,14 @@ var ts;
}
}
checkSourceElement(node.body);
+ var returnTypeNode = ts.getEffectiveReturnTypeNode(node);
if ((functionFlags & 1) === 0) {
- var returnOrPromisedType = node.type && (functionFlags & 2
+ var returnOrPromisedType = returnTypeNode && (functionFlags & 2
? checkAsyncFunctionReturnType(node)
- : getTypeFromTypeNode(node.type));
+ : getTypeFromTypeNode(returnTypeNode));
checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnOrPromisedType);
}
- if (produceDiagnostics && !node.type) {
+ if (produceDiagnostics && !returnTypeNode) {
if (noImplicitAny && ts.nodeIsMissing(node.body) && !isPrivateWithinAmbient(node)) {
reportImplicitAnyError(node, anyType);
}
@@ -36420,15 +38020,16 @@ var ts;
if (!local.isReferenced) {
if (local.valueDeclaration && ts.getRootDeclaration(local.valueDeclaration).kind === 146) {
var parameter = ts.getRootDeclaration(local.valueDeclaration);
+ var name = ts.getNameOfDeclaration(local.valueDeclaration);
if (compilerOptions.noUnusedParameters &&
!ts.isParameterPropertyDeclaration(parameter) &&
!ts.parameterIsThisKeyword(parameter) &&
- !parameterNameStartsWithUnderscore(local.valueDeclaration.name)) {
- error(local.valueDeclaration.name, ts.Diagnostics._0_is_declared_but_never_used, local.name);
+ !parameterNameStartsWithUnderscore(name)) {
+ error(name, ts.Diagnostics._0_is_declared_but_never_used, local.name);
}
}
else if (compilerOptions.noUnusedLocals) {
- ts.forEach(local.declarations, function (d) { return errorUnusedLocal(d.name || d, local.name); });
+ ts.forEach(local.declarations, function (d) { return errorUnusedLocal(ts.getNameOfDeclaration(d) || d, local.name); });
}
}
});
@@ -36444,9 +38045,7 @@ var ts;
function errorUnusedLocal(node, name) {
if (isIdentifierThatStartsWithUnderScore(node)) {
var declaration = ts.getRootDeclaration(node.parent);
- if (declaration.kind === 226 &&
- (declaration.parent.parent.kind === 215 ||
- declaration.parent.parent.kind === 216)) {
+ if (declaration.kind === 226 && ts.isForInOrOfStatement(declaration.parent.parent)) {
return;
}
}
@@ -36506,7 +38105,7 @@ var ts;
for (var _i = 0, _a = local.declarations; _i < _a.length; _i++) {
var declaration = _a[_i];
if (!ts.isAmbientModule(declaration)) {
- errorUnusedLocal(declaration.name, local.name);
+ errorUnusedLocal(ts.getNameOfDeclaration(declaration), local.name);
}
}
}
@@ -36568,7 +38167,7 @@ var ts;
if (getNodeCheckFlags(current) & 4) {
var isDeclaration_1 = node.kind !== 71;
if (isDeclaration_1) {
- error(node.name, ts.Diagnostics.Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference);
+ error(ts.getNameOfDeclaration(node), ts.Diagnostics.Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference);
}
else {
error(node, ts.Diagnostics.Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference);
@@ -36582,7 +38181,7 @@ var ts;
if (getNodeCheckFlags(current) & 8) {
var isDeclaration_2 = node.kind !== 71;
if (isDeclaration_2) {
- error(node.name, ts.Diagnostics.Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference);
+ error(ts.getNameOfDeclaration(node), 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);
@@ -36778,7 +38377,7 @@ var ts;
checkTypeAssignableTo(checkExpressionCached(node.initializer), declarationType, node, undefined);
}
if (!areDeclarationFlagsIdentical(node, symbol.valueDeclaration)) {
- error(symbol.valueDeclaration.name, ts.Diagnostics.All_declarations_of_0_must_have_identical_modifiers, ts.declarationNameToString(node.name));
+ error(ts.getNameOfDeclaration(symbol.valueDeclaration), ts.Diagnostics.All_declarations_of_0_must_have_identical_modifiers, ts.declarationNameToString(node.name));
error(node.name, ts.Diagnostics.All_declarations_of_0_must_have_identical_modifiers, ts.declarationNameToString(node.name));
}
}
@@ -36884,11 +38483,12 @@ var ts;
checkGrammarForInOrForOfStatement(node);
if (node.kind === 216) {
if (node.awaitModifier) {
- if (languageVersion < 4) {
- checkExternalEmitHelpers(node, 8192);
+ var functionFlags = ts.getFunctionFlags(ts.getContainingFunction(node));
+ if ((functionFlags & (4 | 2)) === 2 && languageVersion < 5) {
+ checkExternalEmitHelpers(node, 16384);
}
}
- else if (languageVersion < 2 && compilerOptions.downlevelIteration) {
+ else if (compilerOptions.downlevelIteration && languageVersion < 2) {
checkExternalEmitHelpers(node, 256);
}
}
@@ -36956,17 +38556,17 @@ var ts;
var expressionType = checkNonNullExpression(rhsExpression);
return checkIteratedTypeOrElementType(expressionType, rhsExpression, true, awaitModifier !== undefined);
}
- function checkIteratedTypeOrElementType(inputType, errorNode, allowStringInput, allowAsyncIterable) {
+ function checkIteratedTypeOrElementType(inputType, errorNode, allowStringInput, allowAsyncIterables) {
if (isTypeAny(inputType)) {
return inputType;
}
- return getIteratedTypeOrElementType(inputType, errorNode, allowStringInput, allowAsyncIterable, true) || anyType;
+ return getIteratedTypeOrElementType(inputType, errorNode, allowStringInput, allowAsyncIterables, true) || anyType;
}
- function getIteratedTypeOrElementType(inputType, errorNode, allowStringInput, allowAsyncIterable, checkAssignability) {
+ function getIteratedTypeOrElementType(inputType, errorNode, allowStringInput, allowAsyncIterables, 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 (uplevelIteration || downlevelIteration || allowAsyncIterables) {
+ var iteratedType = getIteratedTypeOfIterable(inputType, uplevelIteration ? errorNode : undefined, allowAsyncIterables, true, checkAssignability);
if (iteratedType || uplevelIteration) {
return iteratedType;
}
@@ -37020,63 +38620,57 @@ var ts;
}
return arrayElementType;
}
- function getIteratedTypeOfIterable(type, errorNode, isAsyncIterable, allowNonAsyncIterables, checkAssignability) {
+ function getIteratedTypeOfIterable(type, errorNode, allowAsyncIterables, allowSyncIterables, checkAssignability) {
if (isTypeAny(type)) {
return undefined;
}
- var typeAsIterable = type;
- 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];
+ return mapType(type, getIteratedType);
+ function getIteratedType(type) {
+ var typeAsIterable = type;
+ if (allowAsyncIterables) {
+ if (typeAsIterable.iteratedTypeOfAsyncIterable) {
+ return typeAsIterable.iteratedTypeOfAsyncIterable;
+ }
+ if (isReferenceToType(type, getGlobalAsyncIterableType(false)) ||
+ isReferenceToType(type, getGlobalAsyncIterableIteratorType(false))) {
+ return typeAsIterable.iteratedTypeOfAsyncIterable = type.typeArguments[0];
+ }
}
- }
- if (!isAsyncIterable || allowNonAsyncIterables) {
- if (isReferenceToType(type, getGlobalIterableType(false)) ||
- isReferenceToType(type, getGlobalIterableIteratorType(false))) {
- return isAsyncIterable
- ? typeAsIterable.iteratedTypeOfAsyncIterable = type.typeArguments[0]
- : typeAsIterable.iteratedTypeOfIterable = type.typeArguments[0];
+ if (allowSyncIterables) {
+ if (typeAsIterable.iteratedTypeOfIterable) {
+ return typeAsIterable.iteratedTypeOfIterable;
+ }
+ if (isReferenceToType(type, getGlobalIterableType(false)) ||
+ isReferenceToType(type, getGlobalIterableIteratorType(false))) {
+ return typeAsIterable.iteratedTypeOfIterable = type.typeArguments[0];
+ }
}
- }
- var iteratorMethodSignatures;
- var isNonAsyncIterable = false;
- if (isAsyncIterable) {
- var iteratorMethod = getTypeOfPropertyOfType(type, ts.getPropertyNameForKnownSymbolName("asyncIterator"));
- if (isTypeAny(iteratorMethod)) {
+ var asyncMethodType = allowAsyncIterables && getTypeOfPropertyOfType(type, ts.getPropertyNameForKnownSymbolName("asyncIterator"));
+ var methodType = asyncMethodType || (allowSyncIterables && getTypeOfPropertyOfType(type, ts.getPropertyNameForKnownSymbolName("iterator")));
+ if (isTypeAny(methodType)) {
return undefined;
}
- iteratorMethodSignatures = iteratorMethod && getSignaturesOfType(iteratorMethod, 0);
- }
- if (!isAsyncIterable || (allowNonAsyncIterables && !ts.some(iteratorMethodSignatures))) {
- var iteratorMethod = getTypeOfPropertyOfType(type, ts.getPropertyNameForKnownSymbolName("iterator"));
- if (isTypeAny(iteratorMethod)) {
+ var signatures = methodType && getSignaturesOfType(methodType, 0);
+ if (!ts.some(signatures)) {
+ if (errorNode) {
+ error(errorNode, allowAsyncIterables
+ ? 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);
+ errorNode = undefined;
+ }
return undefined;
}
- iteratorMethodSignatures = iteratorMethod && getSignaturesOfType(iteratorMethod, 0);
- isNonAsyncIterable = true;
- }
- if (ts.some(iteratorMethodSignatures)) {
- var iteratorMethodReturnType = getUnionType(ts.map(iteratorMethodSignatures, getReturnTypeOfSignature), true);
- var iteratedType = getIteratedTypeOfIterator(iteratorMethodReturnType, errorNode, !isNonAsyncIterable);
+ var returnType = getUnionType(ts.map(signatures, getReturnTypeOfSignature), true);
+ var iteratedType = getIteratedTypeOfIterator(returnType, errorNode, !!asyncMethodType);
if (checkAssignability && errorNode && iteratedType) {
- checkTypeAssignableTo(type, isNonAsyncIterable
- ? createIterableType(iteratedType)
- : createAsyncIterableType(iteratedType), errorNode);
+ checkTypeAssignableTo(type, asyncMethodType
+ ? createAsyncIterableType(iteratedType)
+ : createIterableType(iteratedType), errorNode);
}
- return isAsyncIterable
+ return asyncMethodType
? 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 undefined;
}
function getIteratedTypeOfIterator(type, errorNode, isAsyncIterator) {
if (isTypeAny(type)) {
@@ -37132,14 +38726,15 @@ var ts;
if (isTypeAny(returnType)) {
return undefined;
}
- return getIteratedTypeOfIterable(returnType, undefined, isAsyncGenerator, false, false)
+ return getIteratedTypeOfIterable(returnType, undefined, isAsyncGenerator, !isAsyncGenerator, false)
|| getIteratedTypeOfIterator(returnType, undefined, isAsyncGenerator);
}
function checkBreakOrContinueStatement(node) {
checkGrammarStatementInAmbientContext(node) || checkGrammarBreakOrContinueStatement(node);
}
function isGetAccessorWithAnnotatedSetAccessor(node) {
- return !!(node.kind === 153 && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(node.symbol, 154)));
+ return node.kind === 153
+ && ts.getEffectiveSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(node.symbol, 154)) !== undefined;
}
function isUnwrappedReturnTypeVoidOrAny(func, returnType) {
var unwrappedReturnType = (ts.getFunctionFlags(func) & 3) === 2
@@ -37174,7 +38769,7 @@ var ts;
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)) {
+ else if (ts.getEffectiveReturnTypeNode(func) || isGetAccessorWithAnnotatedSetAccessor(func)) {
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);
@@ -37338,11 +38933,14 @@ var ts;
return;
}
var propDeclaration = prop.valueDeclaration;
- if (indexKind === 1 && !(propDeclaration ? isNumericName(propDeclaration.name) : isNumericLiteralName(prop.name))) {
+ if (indexKind === 1 && !(propDeclaration ? isNumericName(ts.getNameOfDeclaration(propDeclaration)) : isNumericLiteralName(prop.name))) {
return;
}
var errorNode;
- if (propDeclaration && (propDeclaration.name.kind === 144 || prop.parent === containingType.symbol)) {
+ if (propDeclaration &&
+ (propDeclaration.kind === 194 ||
+ ts.getNameOfDeclaration(propDeclaration).kind === 144 ||
+ prop.parent === containingType.symbol)) {
errorNode = propDeclaration;
}
else if (indexDeclaration) {
@@ -37495,7 +39093,7 @@ var ts;
var staticBaseType = getApparentType(baseConstructorType);
checkBaseTypeAccessibility(staticBaseType, baseTypeNode);
checkSourceElement(baseTypeNode.expression);
- if (baseTypeNode.typeArguments) {
+ if (ts.some(baseTypeNode.typeArguments)) {
ts.forEach(baseTypeNode.typeArguments, checkSourceElement);
for (var _i = 0, _a = getConstructorsForTypeArguments(staticBaseType, baseTypeNode.typeArguments, baseTypeNode); _i < _a.length; _i++) {
var constructor = _a[_i];
@@ -37557,7 +39155,7 @@ var ts;
}
}
function getTargetSymbol(s) {
- return getCheckFlags(s) & 1 ? s.target : s;
+ return ts.getCheckFlags(s) & 1 ? s.target : s;
}
function getClassLikeDeclarationOfSymbol(symbol) {
return ts.forEach(symbol.declarations, function (d) { return ts.isClassLike(d) ? d : undefined; });
@@ -37576,7 +39174,7 @@ var ts;
continue;
}
var derived = getTargetSymbol(getPropertyOfObjectType(type, base.name));
- var baseDeclarationFlags = getDeclarationModifierFlagsFromSymbol(base);
+ var baseDeclarationFlags = ts.getDeclarationModifierFlagsFromSymbol(base);
ts.Debug.assert(!!derived, "derived should point to something, even if it is the base class' declaration.");
if (derived) {
if (derived === base) {
@@ -37591,13 +39189,10 @@ var ts;
}
}
else {
- var derivedDeclarationFlags = getDeclarationModifierFlagsFromSymbol(derived);
+ var derivedDeclarationFlags = ts.getDeclarationModifierFlagsFromSymbol(derived);
if (baseDeclarationFlags & 8 || derivedDeclarationFlags & 8) {
continue;
}
- if ((baseDeclarationFlags & 32) !== (derivedDeclarationFlags & 32)) {
- continue;
- }
if (isMethodLike(base) && isMethodLike(derived) || base.flags & 98308 && derived.flags & 98308) {
continue;
}
@@ -37616,14 +39211,11 @@ var ts;
else {
errorMessage = ts.Diagnostics.Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function;
}
- error(derived.valueDeclaration.name || derived.valueDeclaration, errorMessage, typeToString(baseType), symbolToString(base), typeToString(type));
+ error(ts.getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage, typeToString(baseType), symbolToString(base), typeToString(type));
}
}
}
}
- function isAccessor(kind) {
- return kind === 153 || kind === 154;
- }
function checkInheritedPropertiesAreIdentical(type, typeNode) {
var baseTypes = getBaseTypes(type);
if (baseTypes.length < 2) {
@@ -37699,88 +39291,81 @@ var ts;
function computeEnumMemberValues(node) {
var nodeLinks = getNodeLinks(node);
if (!(nodeLinks.flags & 16384)) {
- var enumSymbol = getSymbolOfNode(node);
- var enumType = getDeclaredTypeOfSymbol(enumSymbol);
+ nodeLinks.flags |= 16384;
var autoValue = 0;
- var ambient = ts.isInAmbientContext(node);
- var enumIsConst = ts.isConst(node);
for (var _i = 0, _a = node.members; _i < _a.length; _i++) {
var member = _a[_i];
- if (isComputedNonLiteralName(member.name)) {
- error(member.name, ts.Diagnostics.Computed_property_names_are_not_allowed_in_enums);
- }
- else {
- var text = ts.getTextOfPropertyName(member.name);
- if (isNumericLiteralName(text) && !isInfinityOrNaNString(text)) {
- error(member.name, ts.Diagnostics.An_enum_member_cannot_have_a_numeric_name);
- }
- }
- var previousEnumMemberIsNonConstant = autoValue === undefined;
- var initializer = member.initializer;
- if (initializer) {
- autoValue = computeConstantValueForEnumMemberInitializer(initializer, enumType, enumIsConst, ambient);
- }
- else if (ambient && !enumIsConst) {
- autoValue = undefined;
- }
- else if (previousEnumMemberIsNonConstant) {
- error(member.name, ts.Diagnostics.Enum_member_must_have_initializer);
- }
- if (autoValue !== undefined) {
- getNodeLinks(member).enumMemberValue = autoValue;
- autoValue++;
- }
+ var value = computeMemberValue(member, autoValue);
+ getNodeLinks(member).enumMemberValue = value;
+ autoValue = typeof value === "number" ? value + 1 : undefined;
}
- nodeLinks.flags |= 16384;
}
- function computeConstantValueForEnumMemberInitializer(initializer, enumType, enumIsConst, ambient) {
- var reportError = true;
- var value = evalConstant(initializer);
- if (reportError) {
- if (value === undefined) {
- if (enumIsConst) {
- error(initializer, ts.Diagnostics.In_const_enum_declarations_member_initializer_must_be_constant_expression);
- }
- else if (ambient) {
- error(initializer, ts.Diagnostics.In_ambient_enum_declarations_member_initializer_must_be_constant_expression);
- }
- else {
- checkTypeAssignableTo(checkExpression(initializer), enumType, initializer, undefined);
- }
- }
- else if (enumIsConst) {
- if (isNaN(value)) {
- error(initializer, ts.Diagnostics.const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN);
- }
- else if (!isFinite(value)) {
- error(initializer, ts.Diagnostics.const_enum_member_initializer_was_evaluated_to_a_non_finite_value);
- }
- }
+ }
+ function computeMemberValue(member, autoValue) {
+ if (isComputedNonLiteralName(member.name)) {
+ error(member.name, ts.Diagnostics.Computed_property_names_are_not_allowed_in_enums);
+ }
+ else {
+ var text = ts.getTextOfPropertyName(member.name);
+ if (isNumericLiteralName(text) && !isInfinityOrNaNString(text)) {
+ error(member.name, ts.Diagnostics.An_enum_member_cannot_have_a_numeric_name);
}
- return value;
- function evalConstant(e) {
- switch (e.kind) {
- case 192:
- var value_1 = evalConstant(e.operand);
- if (value_1 === undefined) {
- return undefined;
- }
- switch (e.operator) {
+ }
+ if (member.initializer) {
+ return computeConstantValue(member);
+ }
+ if (ts.isInAmbientContext(member.parent) && !ts.isConst(member.parent)) {
+ return undefined;
+ }
+ if (autoValue !== undefined) {
+ return autoValue;
+ }
+ error(member.name, ts.Diagnostics.Enum_member_must_have_initializer);
+ return undefined;
+ }
+ function computeConstantValue(member) {
+ var enumKind = getEnumKind(getSymbolOfNode(member.parent));
+ var isConstEnum = ts.isConst(member.parent);
+ var initializer = member.initializer;
+ var value = enumKind === 1 && !isLiteralEnumMember(member) ? undefined : evaluate(initializer);
+ if (value !== undefined) {
+ if (isConstEnum && typeof value === "number" && !isFinite(value)) {
+ error(initializer, isNaN(value) ?
+ ts.Diagnostics.const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN :
+ ts.Diagnostics.const_enum_member_initializer_was_evaluated_to_a_non_finite_value);
+ }
+ }
+ else if (enumKind === 1) {
+ error(initializer, ts.Diagnostics.Computed_values_are_not_permitted_in_an_enum_with_string_valued_members);
+ return 0;
+ }
+ else if (isConstEnum) {
+ error(initializer, ts.Diagnostics.In_const_enum_declarations_member_initializer_must_be_constant_expression);
+ }
+ else if (ts.isInAmbientContext(member.parent)) {
+ error(initializer, ts.Diagnostics.In_ambient_enum_declarations_member_initializer_must_be_constant_expression);
+ }
+ else {
+ checkTypeAssignableTo(checkExpression(initializer), getDeclaredTypeOfSymbol(getSymbolOfNode(member.parent)), initializer, undefined);
+ }
+ return value;
+ function evaluate(expr) {
+ switch (expr.kind) {
+ case 192:
+ var value_1 = evaluate(expr.operand);
+ if (typeof value_1 === "number") {
+ switch (expr.operator) {
case 37: return value_1;
case 38: return -value_1;
case 52: return ~value_1;
}
- return undefined;
- case 194:
- var left = evalConstant(e.left);
- if (left === undefined) {
- return undefined;
- }
- var right = evalConstant(e.right);
- if (right === undefined) {
- return undefined;
- }
- switch (e.operatorToken.kind) {
+ }
+ break;
+ case 194:
+ var left = evaluate(expr.left);
+ var right = evaluate(expr.right);
+ if (typeof left === "number" && typeof right === "number") {
+ switch (expr.operatorToken.kind) {
case 49: return left | right;
case 48: return left & right;
case 46: return left >> right;
@@ -37793,75 +39378,53 @@ var ts;
case 38: return left - right;
case 42: return left % right;
}
- return undefined;
- case 8:
- checkGrammarNumericLiteral(e);
- return +e.text;
- case 185:
- return evalConstant(e.expression);
- case 71:
- case 180:
- case 179:
- var member = initializer.parent;
- var currentType = getTypeOfSymbol(getSymbolOfNode(member.parent));
- var enumType_1;
- var propertyName = void 0;
- if (e.kind === 71) {
- enumType_1 = currentType;
- propertyName = e.text;
- }
- else {
- var expression = void 0;
- if (e.kind === 180) {
- if (e.argumentExpression === undefined ||
- e.argumentExpression.kind !== 9) {
- return undefined;
- }
- expression = e.expression;
- propertyName = e.argumentExpression.text;
- }
- else {
- expression = e.expression;
- propertyName = e.name.text;
- }
- var current = expression;
- while (current) {
- if (current.kind === 71) {
- break;
- }
- else if (current.kind === 179) {
- current = current.expression;
- }
- else {
- return undefined;
- }
- }
- enumType_1 = getTypeOfExpression(expression);
- if (!(enumType_1.symbol && (enumType_1.symbol.flags & 384))) {
- return undefined;
- }
- }
- if (propertyName === undefined) {
- return undefined;
- }
- var property = getPropertyOfObjectType(enumType_1, propertyName);
- if (!property || !(property.flags & 8)) {
- return undefined;
- }
- var propertyDecl = property.valueDeclaration;
- if (member === propertyDecl) {
- return undefined;
- }
- if (!isBlockScopedNameDeclaredBeforeUse(propertyDecl, member)) {
- reportError = false;
- error(e, ts.Diagnostics.A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums);
- return undefined;
+ }
+ break;
+ case 9:
+ return expr.text;
+ case 8:
+ checkGrammarNumericLiteral(expr);
+ return +expr.text;
+ case 185:
+ return evaluate(expr.expression);
+ case 71:
+ return ts.nodeIsMissing(expr) ? 0 : evaluateEnumMember(expr, getSymbolOfNode(member.parent), expr.text);
+ case 180:
+ case 179:
+ if (isConstantMemberAccess(expr)) {
+ var type = getTypeOfExpression(expr.expression);
+ if (type.symbol && type.symbol.flags & 384) {
+ var name = expr.kind === 179 ?
+ expr.name.text :
+ expr.argumentExpression.text;
+ return evaluateEnumMember(expr, type.symbol, name);
}
- return getNodeLinks(propertyDecl).enumMemberValue;
+ }
+ break;
+ }
+ return undefined;
+ }
+ function evaluateEnumMember(expr, enumSymbol, name) {
+ var memberSymbol = enumSymbol.exports.get(name);
+ if (memberSymbol) {
+ var declaration = memberSymbol.valueDeclaration;
+ if (declaration !== member) {
+ if (isBlockScopedNameDeclaredBeforeUse(declaration, member)) {
+ return getNodeLinks(declaration).enumMemberValue;
+ }
+ error(expr, ts.Diagnostics.A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums);
+ return 0;
}
}
+ return undefined;
}
}
+ function isConstantMemberAccess(node) {
+ return node.kind === 71 ||
+ node.kind === 179 && isConstantMemberAccess(node.expression) ||
+ node.kind === 180 && isConstantMemberAccess(node.expression) &&
+ node.argumentExpression.kind === 9;
+ }
function checkEnumDeclaration(node) {
if (!produceDiagnostics) {
return;
@@ -37884,7 +39447,7 @@ var ts;
if (enumSymbol.declarations.length > 1) {
ts.forEach(enumSymbol.declarations, function (decl) {
if (ts.isConstEnumDeclaration(decl) !== enumIsConst) {
- error(decl.name, ts.Diagnostics.Enum_declarations_must_all_be_const_or_non_const);
+ error(ts.getNameOfDeclaration(decl), ts.Diagnostics.Enum_declarations_must_all_be_const_or_non_const);
}
});
}
@@ -38109,6 +39672,12 @@ var ts;
ts.Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0;
error(node, message, symbolToString(symbol));
}
+ if (compilerOptions.isolatedModules
+ && node.kind === 246
+ && !(target.flags & 107455)
+ && !ts.isInAmbientContext(node)) {
+ error(node, ts.Diagnostics.Cannot_re_export_a_type_when_the_isolatedModules_flag_is_provided);
+ }
}
}
function checkImportBinding(node) {
@@ -38194,6 +39763,9 @@ var ts;
if (moduleSymbol && hasExportAssignmentSymbol(moduleSymbol)) {
error(node.moduleSpecifier, ts.Diagnostics.Module_0_uses_export_and_cannot_be_used_with_export_Asterisk, symbolToString(moduleSymbol));
}
+ if (modulekind !== ts.ModuleKind.System && modulekind !== ts.ModuleKind.ES2015) {
+ checkExternalEmitHelpers(node, 32768);
+ }
}
}
}
@@ -38711,6 +40283,15 @@ var ts;
return entityNameSymbol;
}
}
+ if (entityName.parent.kind === 287) {
+ var parameter = ts.getParameterFromJSDoc(entityName.parent);
+ return parameter && parameter.symbol;
+ }
+ if (entityName.parent.kind === 145 && entityName.parent.parent.kind === 290) {
+ ts.Debug.assert(!ts.isInJavaScriptFile(entityName));
+ var typeParameter = ts.getTypeParameterFromJsDoc(entityName.parent);
+ return typeParameter && typeParameter.symbol;
+ }
if (ts.isPartOfExpression(entityName)) {
if (ts.nodeIsMissing(entityName)) {
return undefined;
@@ -38755,7 +40336,7 @@ var ts;
if (isInsideWithStatementBody(node)) {
return undefined;
}
- if (ts.isDeclarationName(node)) {
+ if (isDeclarationNameOrImportPropertyName(node)) {
return getSymbolOfNode(node.parent);
}
else if (ts.isLiteralComputedPropertyDeclarationName(node)) {
@@ -38800,13 +40381,9 @@ var ts;
}
return undefined;
case 9:
- if ((ts.isExternalModuleImportEqualsDeclaration(node.parent.parent) &&
- ts.getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node) ||
- ((node.parent.kind === 238 || node.parent.kind === 244) &&
- node.parent.moduleSpecifier === node)) {
- return resolveExternalModuleName(node, node);
- }
- if (ts.isInJavaScriptFile(node) && ts.isRequireCall(node.parent, false)) {
+ if ((ts.isExternalModuleImportEqualsDeclaration(node.parent.parent) && ts.getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node) ||
+ ((node.parent.kind === 238 || node.parent.kind === 244) && node.parent.moduleSpecifier === node) ||
+ ((ts.isInJavaScriptFile(node) && ts.isRequireCall(node.parent, false)) || ts.isImportCall(node.parent))) {
return resolveExternalModuleName(node, node);
}
case 8:
@@ -38868,7 +40445,7 @@ var ts;
var symbol = getSymbolOfNode(node);
return getTypeOfSymbol(symbol);
}
- if (ts.isDeclarationName(node)) {
+ if (isDeclarationNameOrImportPropertyName(node)) {
var symbol = getSymbolAtLocation(node);
return symbol && getTypeOfSymbol(symbol);
}
@@ -38930,24 +40507,24 @@ var ts;
return getNamedMembers(propsByName);
}
function getRootSymbols(symbol) {
- if (getCheckFlags(symbol) & 6) {
- var symbols_3 = [];
+ if (ts.getCheckFlags(symbol) & 6) {
+ var symbols_4 = [];
var name_2 = symbol.name;
ts.forEach(getSymbolLinks(symbol).containingType.types, function (t) {
var symbol = getPropertyOfType(t, name_2);
if (symbol) {
- symbols_3.push(symbol);
+ symbols_4.push(symbol);
}
});
- return symbols_3;
+ return symbols_4;
}
else if (symbol.flags & 134217728) {
- if (symbol.leftSpread) {
- var links = symbol;
- return getRootSymbols(links.leftSpread).concat(getRootSymbols(links.rightSpread));
+ var transient = symbol;
+ if (transient.leftSpread) {
+ return getRootSymbols(transient.leftSpread).concat(getRootSymbols(transient.rightSpread));
}
- if (symbol.syntheticOrigin) {
- return getRootSymbols(symbol.syntheticOrigin);
+ if (transient.syntheticOrigin) {
+ return getRootSymbols(transient.syntheticOrigin);
}
var target = void 0;
var next = symbol;
@@ -39022,7 +40599,7 @@ var ts;
node = ts.getParseTreeNode(node, ts.isIdentifier);
if (node) {
var symbol = getReferencedValueSymbol(node);
- if (symbol && symbol.flags & 8388608) {
+ if (isNonLocalAlias(symbol, 107455)) {
return getDeclarationOfAliasSymbol(symbol);
}
}
@@ -39140,6 +40717,12 @@ var ts;
parameter.initializer &&
!(ts.getModifierFlags(parameter) & 92);
}
+ function isOptionalUninitializedParameterProperty(parameter) {
+ return strictNullChecks &&
+ isOptionalParameter(parameter) &&
+ !parameter.initializer &&
+ !!(ts.getModifierFlags(parameter) & 92);
+ }
function getNodeCheckFlags(node) {
return getNodeLinks(node).flags;
}
@@ -39200,7 +40783,7 @@ var ts;
else if (isTypeOfKind(type, 136)) {
return ts.TypeReferenceSerializationKind.BooleanType;
}
- else if (isTypeOfKind(type, 340)) {
+ else if (isTypeOfKind(type, 84)) {
return ts.TypeReferenceSerializationKind.NumberLikeType;
}
else if (isTypeOfKind(type, 262178)) {
@@ -39227,8 +40810,8 @@ var ts;
var type = symbol && !(symbol.flags & (2048 | 131072))
? getWidenedLiteralType(getTypeOfSymbol(symbol))
: unknownType;
- if (flags & 4096) {
- type = includeFalsyTypes(type, 2048);
+ if (flags & 8192) {
+ type = getNullableType(type, 2048);
}
getSymbolDisplayBuilder().buildTypeDisplay(type, writer, enclosingDeclaration, flags);
}
@@ -39240,15 +40823,6 @@ var ts;
var type = getWidenedType(getRegularTypeOfExpression(expr));
getSymbolDisplayBuilder().buildTypeDisplay(type, writer, enclosingDeclaration, flags);
}
- function writeBaseConstructorTypeOfClass(node, enclosingDeclaration, flags, writer) {
- 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.has(name);
}
@@ -39324,10 +40898,10 @@ var ts;
isDeclarationVisible: isDeclarationVisible,
isImplementationOfOverload: isImplementationOfOverload,
isRequiredInitializedParameter: isRequiredInitializedParameter,
+ isOptionalUninitializedParameterProperty: isOptionalUninitializedParameterProperty,
writeTypeOfDeclaration: writeTypeOfDeclaration,
writeReturnTypeOfSignatureDeclaration: writeReturnTypeOfSignatureDeclaration,
writeTypeOfExpression: writeTypeOfExpression,
- writeBaseConstructorTypeOfClass: writeBaseConstructorTypeOfClass,
isSymbolAccessible: isSymbolAccessible,
isEntityNameVisible: isEntityNameVisible,
getConstantValue: function (node) {
@@ -39474,7 +41048,7 @@ var ts;
var helpersModule = resolveHelpersModule(sourceFile, location);
if (helpersModule !== unknownSymbol) {
var uncheckedHelpers = helpers & ~requestedExternalEmitHelpers;
- for (var helper = 1; helper <= 8192; helper <<= 1) {
+ for (var helper = 1; helper <= 32768; helper <<= 1) {
if (uncheckedHelpers & helper) {
var name = getHelperName(helper);
var symbol = getSymbol(helpersModule.exports, ts.escapeIdentifier(name), 107455);
@@ -39501,10 +41075,12 @@ var ts;
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.");
+ case 2048: return "__await";
+ case 4096: return "__asyncGenerator";
+ case 8192: return "__asyncDelegator";
+ case 16384: return "__asyncValues";
+ case 32768: return "__exportStar";
+ default: ts.Debug.fail("Unrecognized helper");
}
}
function resolveHelpersModule(node, errorNode) {
@@ -39928,6 +41504,10 @@ var ts;
var sourceFile = ts.getSourceFileOfNode(node);
return grammarErrorAtPos(sourceFile, types.pos, 0, ts.Diagnostics._0_list_cannot_be_empty, listType);
}
+ return ts.forEach(types, checkGrammarExpressionWithTypeArguments);
+ }
+ function checkGrammarExpressionWithTypeArguments(node) {
+ return checkGrammarTypeArguments(node, node.typeArguments);
}
function checkGrammarClassDeclarationHeritageClauses(node) {
var seenExtendsClause = false;
@@ -40477,7 +42057,7 @@ var ts;
}
function checkGrammarStatementInAmbientContext(node) {
if (ts.isInAmbientContext(node)) {
- if (isAccessor(node.parent.kind)) {
+ if (ts.isAccessor(node.parent)) {
return getNodeLinks(node).hasReportedStatementInAmbientContext = true;
}
var links = getNodeLinks(node);
@@ -40530,8 +42110,32 @@ var ts;
});
return result;
}
+ function checkGrammarImportCallExpression(node) {
+ if (modulekind === ts.ModuleKind.ES2015) {
+ return grammarErrorOnNode(node, ts.Diagnostics.Dynamic_import_cannot_be_used_when_targeting_ECMAScript_2015_modules);
+ }
+ if (node.typeArguments) {
+ return grammarErrorOnNode(node, ts.Diagnostics.Dynamic_import_cannot_have_type_arguments);
+ }
+ var nodeArguments = node.arguments;
+ if (nodeArguments.length !== 1) {
+ return grammarErrorOnNode(node, ts.Diagnostics.Dynamic_import_must_have_one_specifier_as_an_argument);
+ }
+ if (ts.isSpreadElement(nodeArguments[0])) {
+ return grammarErrorOnNode(nodeArguments[0], ts.Diagnostics.Specifier_of_dynamic_import_cannot_be_spread_element);
+ }
+ }
}
ts.createTypeChecker = createTypeChecker;
+ function isDeclarationNameOrImportPropertyName(name) {
+ switch (name.parent.kind) {
+ case 242:
+ case 246:
+ return true;
+ default:
+ return ts.isDeclarationName(name);
+ }
+ }
})(ts || (ts = {}));
var ts;
(function (ts) {
@@ -40642,73 +42246,69 @@ var ts;
if ((kind > 0 && kind <= 142) || kind === 169) {
return node;
}
- switch (node.kind) {
- case 206:
- case 209:
- case 200:
- case 225:
- case 298:
- case 247:
- return node;
+ switch (kind) {
+ case 71:
+ return ts.updateIdentifier(node, nodesVisitor(node.typeArguments, visitor, ts.isTypeNode));
case 143:
return ts.updateQualifiedName(node, visitNode(node.left, visitor, ts.isEntityName), visitNode(node.right, visitor, ts.isIdentifier));
case 144:
return ts.updateComputedPropertyName(node, visitNode(node.expression, visitor, ts.isExpression));
- case 160:
- return ts.updateFunctionTypeNode(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode));
- case 161:
- return ts.updateConstructorTypeNode(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode));
- case 155:
- return ts.updateCallSignatureDeclaration(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode));
- case 156:
- return ts.updateConstructSignatureDeclaration(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode));
- case 150:
- 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 157:
- 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.updateTypeParameterDeclaration(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.constraint, visitor, ts.isTypeNode), visitNode(node.default, visitor, ts.isTypeNode));
case 146:
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 147:
return ts.updateDecorator(node, visitNode(node.expression, visitor, ts.isExpression));
- case 159:
- return ts.updateTypeReferenceNode(node, visitNode(node.typeName, visitor, ts.isEntityName), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode));
+ case 148:
+ return ts.updatePropertySignature(node, nodesVisitor(node.modifiers, visitor, ts.isToken), 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 149:
+ 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.updateMethodSignature(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.questionToken, tokenVisitor, ts.isToken));
+ case 151:
+ 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.isTypeParameterDeclaration), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context));
+ case 152:
+ 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 153:
+ 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 154:
+ 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 155:
+ return ts.updateCallSignature(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), visitNode(node.type, visitor, ts.isTypeNode));
+ case 156:
+ return ts.updateConstructSignature(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), visitNode(node.type, visitor, ts.isTypeNode));
+ case 157:
+ return ts.updateIndexSignature(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), visitNode(node.type, visitor, ts.isTypeNode));
case 158:
return ts.updateTypePredicateNode(node, visitNode(node.parameterName, visitor), visitNode(node.type, visitor, ts.isTypeNode));
+ case 159:
+ return ts.updateTypeReferenceNode(node, visitNode(node.typeName, visitor, ts.isEntityName), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode));
+ case 160:
+ return ts.updateFunctionTypeNode(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), visitNode(node.type, visitor, ts.isTypeNode));
+ case 161:
+ return ts.updateConstructorTypeNode(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), visitNode(node.type, visitor, ts.isTypeNode));
case 162:
return ts.updateTypeQueryNode(node, visitNode(node.exprName, visitor, ts.isEntityName));
case 163:
- return ts.updateTypeLiteralNode(node, nodesVisitor(node.members, visitor));
+ return ts.updateTypeLiteralNode(node, nodesVisitor(node.members, visitor, ts.isTypeElement));
case 164:
return ts.updateArrayTypeNode(node, visitNode(node.elementType, visitor, ts.isTypeNode));
case 165:
return ts.updateTypleTypeNode(node, nodesVisitor(node.elementTypes, visitor, ts.isTypeNode));
case 166:
+ return ts.updateUnionTypeNode(node, nodesVisitor(node.types, visitor, ts.isTypeNode));
case 167:
- return ts.updateUnionOrIntersectionTypeNode(node, nodesVisitor(node.types, visitor, ts.isTypeNode));
+ return ts.updateIntersectionTypeNode(node, nodesVisitor(node.types, visitor, ts.isTypeNode));
case 168:
- throw ts.Debug.fail("not implemented.");
+ return ts.updateParenthesizedType(node, visitNode(node.type, visitor, ts.isTypeNode));
case 170:
return ts.updateTypeOperatorNode(node, visitNode(node.type, visitor, ts.isTypeNode));
case 171:
return ts.updateIndexedAccessTypeNode(node, visitNode(node.objectType, visitor, ts.isTypeNode), visitNode(node.indexType, visitor, ts.isTypeNode));
case 172:
- 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));
+ return ts.updateMappedTypeNode(node, visitNode(node.readonlyToken, tokenVisitor, ts.isToken), visitNode(node.typeParameter, visitor, ts.isTypeParameterDeclaration), visitNode(node.questionToken, tokenVisitor, ts.isToken), visitNode(node.type, visitor, ts.isTypeNode));
case 173:
return ts.updateLiteralTypeNode(node, visitNode(node.literal, visitor, ts.isExpression));
- case 145:
- return ts.updateTypeParameterDeclaration(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.constraint, visitor, ts.isTypeNode), visitNode(node.default, visitor, ts.isTypeNode));
- case 148:
- 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 149:
- 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 151:
- 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 152:
- 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 153:
- 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 154:
- 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 174:
return ts.updateObjectBindingPattern(node, nodesVisitor(node.elements, visitor, ts.isBindingElement));
case 175:
@@ -40734,9 +42334,9 @@ var ts;
case 185:
return ts.updateParen(node, visitNode(node.expression, visitor, ts.isExpression));
case 186:
- 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));
+ 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.isTypeParameterDeclaration), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context));
case 187:
- 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));
+ return ts.updateArrowFunction(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context));
case 188:
return ts.updateDelete(node, visitNode(node.expression, visitor, ts.isExpression));
case 189:
@@ -40745,12 +42345,12 @@ var ts;
return ts.updateVoid(node, visitNode(node.expression, visitor, ts.isExpression));
case 191:
return ts.updateAwait(node, visitNode(node.expression, visitor, ts.isExpression));
- case 194:
- return ts.updateBinary(node, visitNode(node.left, visitor, ts.isExpression), visitNode(node.right, visitor, ts.isExpression));
case 192:
return ts.updatePrefix(node, visitNode(node.operand, visitor, ts.isExpression));
case 193:
return ts.updatePostfix(node, visitNode(node.operand, visitor, ts.isExpression));
+ case 194:
+ return ts.updateBinary(node, visitNode(node.left, visitor, ts.isExpression), visitNode(node.right, visitor, ts.isExpression), visitNode(node.operatorToken, visitor, ts.isToken));
case 195:
return ts.updateConditional(node, visitNode(node.condition, visitor, ts.isExpression), visitNode(node.whenTrue, visitor, ts.isExpression), visitNode(node.whenFalse, visitor, ts.isExpression));
case 196:
@@ -40760,13 +42360,15 @@ var ts;
case 198:
return ts.updateSpread(node, visitNode(node.expression, visitor, ts.isExpression));
case 199:
- 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));
+ return ts.updateClassExpression(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.heritageClauses, visitor, ts.isHeritageClause), nodesVisitor(node.members, visitor, ts.isClassElement));
case 201:
return ts.updateExpressionWithTypeArguments(node, nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), visitNode(node.expression, visitor, ts.isExpression));
case 202:
return ts.updateAsExpression(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.type, visitor, ts.isTypeNode));
case 203:
return ts.updateNonNullExpression(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 204:
+ return ts.updateMetaProperty(node, visitNode(node.name, visitor, ts.isIdentifier));
case 205:
return ts.updateTemplateSpan(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.literal, visitor, ts.isTemplateMiddleOrTemplateTail));
case 207:
@@ -40808,9 +42410,13 @@ var ts;
case 227:
return ts.updateVariableDeclarationList(node, nodesVisitor(node.declarations, visitor, ts.isVariableDeclaration));
case 228:
- 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));
+ 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.isTypeParameterDeclaration), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context));
case 229:
- 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));
+ 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.isTypeParameterDeclaration), nodesVisitor(node.heritageClauses, visitor, ts.isHeritageClause), nodesVisitor(node.members, visitor, ts.isClassElement));
+ case 230:
+ return ts.updateInterfaceDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.heritageClauses, visitor, ts.isHeritageClause), nodesVisitor(node.members, visitor, ts.isTypeElement));
+ case 231:
+ return ts.updateTypeAliasDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), visitNode(node.type, visitor, ts.isTypeNode));
case 232:
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 233:
@@ -40819,6 +42425,8 @@ var ts;
return ts.updateModuleBlock(node, nodesVisitor(node.statements, visitor, ts.isStatement));
case 235:
return ts.updateCaseBlock(node, nodesVisitor(node.clauses, visitor, ts.isCaseOrDefaultClause));
+ case 236:
+ return ts.updateNamespaceExportDeclaration(node, visitNode(node.name, visitor, ts.isIdentifier));
case 237:
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 238:
@@ -40843,8 +42451,6 @@ var ts;
return ts.updateExternalModuleReference(node, visitNode(node.expression, visitor, ts.isExpression));
case 249:
return ts.updateJsxElement(node, visitNode(node.openingElement, visitor, ts.isJsxOpeningElement), nodesVisitor(node.children, visitor, ts.isJsxChild), visitNode(node.closingElement, visitor, ts.isJsxClosingElement));
- case 254:
- return ts.updateJsxAttributes(node, nodesVisitor(node.properties, visitor, ts.isJsxAttributeLike));
case 250:
return ts.updateJsxSelfClosingElement(node, visitNode(node.tagName, visitor, ts.isJsxTagNameExpression), visitNode(node.attributes, visitor, ts.isJsxAttributes));
case 251:
@@ -40853,6 +42459,8 @@ var ts;
return ts.updateJsxClosingElement(node, visitNode(node.tagName, visitor, ts.isJsxTagNameExpression));
case 253:
return ts.updateJsxAttribute(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.initializer, visitor, ts.isStringLiteralOrJsxExpression));
+ case 254:
+ return ts.updateJsxAttributes(node, nodesVisitor(node.properties, visitor, ts.isJsxAttributeLike));
case 255:
return ts.updateJsxSpreadAttribute(node, visitNode(node.expression, visitor, ts.isExpression));
case 256:
@@ -40875,8 +42483,10 @@ var ts;
return ts.updateEnumMember(node, visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.initializer, visitor, ts.isExpression));
case 265:
return ts.updateSourceFileNode(node, visitLexicalEnvironment(node.statements, visitor, context));
- case 296:
+ case 297:
return ts.updatePartiallyEmittedExpression(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 298:
+ return ts.updateCommaList(node, nodesVisitor(node.elements, visitor, ts.isExpression));
default:
return node;
}
@@ -40913,7 +42523,7 @@ var ts;
case 209:
case 200:
case 225:
- case 295:
+ case 296:
break;
case 143:
result = reduceNode(node.left, cbNode, result);
@@ -40932,6 +42542,13 @@ var ts;
case 147:
result = reduceNode(node.expression, cbNode, result);
break;
+ case 148:
+ result = reduceNodes(node.modifiers, cbNodes, result);
+ result = reduceNode(node.name, cbNode, result);
+ result = reduceNode(node.questionToken, cbNode, result);
+ result = reduceNode(node.type, cbNode, result);
+ result = reduceNode(node.initializer, cbNode, result);
+ break;
case 149:
result = reduceNodes(node.decorators, cbNodes, result);
result = reduceNodes(node.modifiers, cbNodes, result);
@@ -41267,9 +42884,12 @@ var ts;
case 265:
result = reduceNodes(node.statements, cbNodes, result);
break;
- case 296:
+ case 297:
result = reduceNode(node.expression, cbNode, result);
break;
+ case 298:
+ result = reduceNodes(node.elements, cbNodes, result);
+ break;
default:
break;
}
@@ -41333,37 +42953,65 @@ var ts;
}
var Debug;
(function (Debug) {
+ var isDebugInfoEnabled = false;
Debug.failBadSyntaxKind = Debug.shouldAssert(1)
- ? function (node, message) { return Debug.assert(false, message || "Unexpected node.", function () { return "Node " + ts.formatSyntaxKind(node.kind) + " was unexpected."; }); }
+ ? function (node, message) { return Debug.fail((message || "Unexpected node.") + "\r\nNode " + ts.formatSyntaxKind(node.kind) + " was unexpected.", Debug.failBadSyntaxKind); }
: ts.noop;
Debug.assertEachNode = Debug.shouldAssert(1)
- ? function (nodes, test, message) { return Debug.assert(test === undefined || ts.every(nodes, test), message || "Unexpected node.", function () { return "Node array did not pass test '" + getFunctionName(test) + "'."; }); }
+ ? function (nodes, test, message) { return Debug.assert(test === undefined || ts.every(nodes, test), message || "Unexpected node.", function () { return "Node array did not pass test '" + Debug.getFunctionName(test) + "'."; }, Debug.assertEachNode); }
: ts.noop;
Debug.assertNode = Debug.shouldAssert(1)
- ? function (node, test, message) { return Debug.assert(test === undefined || test(node), message || "Unexpected node.", function () { return "Node " + ts.formatSyntaxKind(node.kind) + " did not pass test '" + getFunctionName(test) + "'."; }); }
+ ? function (node, test, message) { return Debug.assert(test === undefined || test(node), message || "Unexpected node.", function () { return "Node " + ts.formatSyntaxKind(node.kind) + " did not pass test '" + Debug.getFunctionName(test) + "'."; }, Debug.assertNode); }
: ts.noop;
Debug.assertOptionalNode = Debug.shouldAssert(1)
- ? function (node, test, message) { return Debug.assert(test === undefined || node === undefined || test(node), message || "Unexpected node.", function () { return "Node " + ts.formatSyntaxKind(node.kind) + " did not pass test '" + getFunctionName(test) + "'."; }); }
+ ? function (node, test, message) { return Debug.assert(test === undefined || node === undefined || test(node), message || "Unexpected node.", function () { return "Node " + ts.formatSyntaxKind(node.kind) + " did not pass test '" + Debug.getFunctionName(test) + "'."; }, Debug.assertOptionalNode); }
: ts.noop;
Debug.assertOptionalToken = Debug.shouldAssert(1)
- ? function (node, kind, message) { return Debug.assert(kind === undefined || node === undefined || node.kind === kind, message || "Unexpected node.", function () { return "Node " + ts.formatSyntaxKind(node.kind) + " was not a '" + ts.formatSyntaxKind(kind) + "' token."; }); }
+ ? function (node, kind, message) { return Debug.assert(kind === undefined || node === undefined || node.kind === kind, message || "Unexpected node.", function () { return "Node " + ts.formatSyntaxKind(node.kind) + " was not a '" + ts.formatSyntaxKind(kind) + "' token."; }, Debug.assertOptionalToken); }
: ts.noop;
Debug.assertMissingNode = Debug.shouldAssert(1)
- ? function (node, message) { return Debug.assert(node === undefined, message || "Unexpected node.", function () { return "Node " + ts.formatSyntaxKind(node.kind) + " was unexpected'."; }); }
+ ? function (node, message) { return Debug.assert(node === undefined, message || "Unexpected node.", function () { return "Node " + ts.formatSyntaxKind(node.kind) + " was unexpected'."; }, Debug.assertMissingNode); }
: ts.noop;
- function getFunctionName(func) {
- if (typeof func !== "function") {
- return "";
- }
- else if (func.hasOwnProperty("name")) {
- return func.name;
- }
- else {
- var text = Function.prototype.toString.call(func);
- var match = /^function\s+([\w\$]+)\s*\(/.exec(text);
- return match ? match[1] : "";
+ function enableDebugInfo() {
+ if (isDebugInfoEnabled)
+ return;
+ Object.defineProperties(ts.objectAllocator.getSymbolConstructor().prototype, {
+ "__debugFlags": { get: function () { return ts.formatSymbolFlags(this.flags); } }
+ });
+ Object.defineProperties(ts.objectAllocator.getTypeConstructor().prototype, {
+ "__debugFlags": { get: function () { return ts.formatTypeFlags(this.flags); } },
+ "__debugObjectFlags": { get: function () { return this.flags & 32768 ? ts.formatObjectFlags(this.objectFlags) : ""; } },
+ "__debugTypeToString": { value: function () { return this.checker.typeToString(this); } },
+ });
+ var nodeConstructors = [
+ ts.objectAllocator.getNodeConstructor(),
+ ts.objectAllocator.getIdentifierConstructor(),
+ ts.objectAllocator.getTokenConstructor(),
+ ts.objectAllocator.getSourceFileConstructor()
+ ];
+ for (var _i = 0, nodeConstructors_1 = nodeConstructors; _i < nodeConstructors_1.length; _i++) {
+ var ctor = nodeConstructors_1[_i];
+ if (!ctor.prototype.hasOwnProperty("__debugKind")) {
+ Object.defineProperties(ctor.prototype, {
+ "__debugKind": { get: function () { return ts.formatSyntaxKind(this.kind); } },
+ "__debugModifierFlags": { get: function () { return ts.formatModifierFlags(ts.getModifierFlagsNoCache(this)); } },
+ "__debugTransformFlags": { get: function () { return ts.formatTransformFlags(this.transformFlags); } },
+ "__debugEmitFlags": { get: function () { return ts.formatEmitFlags(ts.getEmitFlags(this)); } },
+ "__debugGetText": {
+ value: function (includeTrivia) {
+ if (ts.nodeIsSynthesized(this))
+ return "";
+ var parseNode = ts.getParseTreeNode(this);
+ var sourceFile = parseNode && ts.getSourceFileOfNode(parseNode);
+ return sourceFile ? ts.getSourceTextOfNodeFromSourceFile(sourceFile, parseNode, includeTrivia) : "";
+ }
+ }
+ });
+ }
}
+ isDebugInfoEnabled = true;
}
+ Debug.enableDebugInfo = enableDebugInfo;
})(Debug = ts.Debug || (ts.Debug = {}));
})(ts || (ts = {}));
var ts;
@@ -41698,6 +43346,22 @@ var ts;
TypeScriptSubstitutionFlags[TypeScriptSubstitutionFlags["NamespaceExports"] = 2] = "NamespaceExports";
TypeScriptSubstitutionFlags[TypeScriptSubstitutionFlags["NonQualifiedEnumMembers"] = 8] = "NonQualifiedEnumMembers";
})(TypeScriptSubstitutionFlags || (TypeScriptSubstitutionFlags = {}));
+ var ClassFacts;
+ (function (ClassFacts) {
+ ClassFacts[ClassFacts["None"] = 0] = "None";
+ ClassFacts[ClassFacts["HasStaticInitializedProperties"] = 1] = "HasStaticInitializedProperties";
+ ClassFacts[ClassFacts["HasConstructorDecorators"] = 2] = "HasConstructorDecorators";
+ ClassFacts[ClassFacts["HasMemberDecorators"] = 4] = "HasMemberDecorators";
+ ClassFacts[ClassFacts["IsExportOfNamespace"] = 8] = "IsExportOfNamespace";
+ ClassFacts[ClassFacts["IsNamedExternalExport"] = 16] = "IsNamedExternalExport";
+ ClassFacts[ClassFacts["IsDefaultExternalExport"] = 32] = "IsDefaultExternalExport";
+ ClassFacts[ClassFacts["HasExtendsClause"] = 64] = "HasExtendsClause";
+ ClassFacts[ClassFacts["UseImmediatelyInvokedFunctionExpression"] = 128] = "UseImmediatelyInvokedFunctionExpression";
+ ClassFacts[ClassFacts["HasAnyDecorators"] = 6] = "HasAnyDecorators";
+ ClassFacts[ClassFacts["NeedsName"] = 5] = "NeedsName";
+ ClassFacts[ClassFacts["MayNeedImmediatelyInvokedFunctionExpression"] = 7] = "MayNeedImmediatelyInvokedFunctionExpression";
+ ClassFacts[ClassFacts["IsExported"] = 56] = "IsExported";
+ })(ClassFacts || (ClassFacts = {}));
function transformTypeScript(context) {
var startLexicalEnvironment = context.startLexicalEnvironment, resumeLexicalEnvironment = context.resumeLexicalEnvironment, endLexicalEnvironment = context.endLexicalEnvironment, hoistVariableDeclaration = context.hoistVariableDeclaration;
var resolver = context.getEmitResolver();
@@ -41720,7 +43384,7 @@ var ts;
var applicableSubstitutions;
return transformSourceFile;
function transformSourceFile(node) {
- if (ts.isDeclarationFile(node)) {
+ if (node.isDeclarationFile) {
return node;
}
currentSourceFile = node;
@@ -41878,6 +43542,7 @@ var ts;
case 147:
case 231:
case 149:
+ case 236:
return undefined;
case 152:
return visitConstructor(node);
@@ -41949,45 +43614,87 @@ var ts;
function shouldEmitDecorateCallForParameter(parameter) {
return parameter.decorators !== undefined && parameter.decorators.length > 0;
}
+ function getClassFacts(node, staticProperties) {
+ var facts = 0;
+ if (ts.some(staticProperties))
+ facts |= 1;
+ if (ts.getClassExtendsHeritageClauseElement(node))
+ facts |= 64;
+ if (shouldEmitDecorateCallForClass(node))
+ facts |= 2;
+ if (ts.childIsDecorated(node))
+ facts |= 4;
+ if (isExportOfNamespace(node))
+ facts |= 8;
+ else if (isDefaultExternalModuleExport(node))
+ facts |= 32;
+ else if (isNamedExternalModuleExport(node))
+ facts |= 16;
+ if (languageVersion <= 1 && (facts & 7))
+ facts |= 128;
+ return facts;
+ }
function visitClassDeclaration(node) {
var staticProperties = getInitializedProperties(node, true);
- var hasExtendsClause = ts.getClassExtendsHeritageClauseElement(node) !== undefined;
- var isDecoratedClass = shouldEmitDecorateCallForClass(node);
- var name = node.name;
- if (!name && (staticProperties.length > 0 || ts.childIsDecorated(node))) {
- name = ts.getGeneratedNameForNode(node);
- }
- var classStatement = isDecoratedClass
- ? createClassDeclarationHeadWithDecorators(node, name, hasExtendsClause)
- : createClassDeclarationHeadWithoutDecorators(node, name, hasExtendsClause, staticProperties.length > 0);
+ var facts = getClassFacts(node, staticProperties);
+ if (facts & 128) {
+ context.startLexicalEnvironment();
+ }
+ var name = node.name || (facts & 5 ? ts.getGeneratedNameForNode(node) : undefined);
+ var classStatement = facts & 2
+ ? createClassDeclarationHeadWithDecorators(node, name, facts)
+ : createClassDeclarationHeadWithoutDecorators(node, name, facts);
var statements = [classStatement];
- if (staticProperties.length) {
- addInitializedPropertyStatements(statements, staticProperties, ts.getLocalName(node));
+ if (facts & 1) {
+ addInitializedPropertyStatements(statements, staticProperties, facts & 128 ? ts.getInternalName(node) : ts.getLocalName(node));
}
addClassElementDecorationStatements(statements, node, false);
addClassElementDecorationStatements(statements, node, true);
addConstructorDecorationStatement(statements, node);
- if (isNamespaceExport(node)) {
+ if (facts & 128) {
+ var closingBraceLocation = ts.createTokenRange(ts.skipTrivia(currentSourceFile.text, node.members.end), 18);
+ var localName = ts.getInternalName(node);
+ var outer = ts.createPartiallyEmittedExpression(localName);
+ outer.end = closingBraceLocation.end;
+ ts.setEmitFlags(outer, 1536);
+ var statement = ts.createReturn(outer);
+ statement.pos = closingBraceLocation.pos;
+ ts.setEmitFlags(statement, 1536 | 384);
+ statements.push(statement);
+ ts.addRange(statements, context.endLexicalEnvironment());
+ var varStatement = ts.createVariableStatement(undefined, ts.createVariableDeclarationList([
+ ts.createVariableDeclaration(ts.getLocalName(node, false, false), undefined, ts.createImmediatelyInvokedFunctionExpression(statements))
+ ]));
+ ts.setOriginalNode(varStatement, node);
+ ts.setCommentRange(varStatement, node);
+ ts.setSourceMapRange(varStatement, ts.moveRangePastDecorators(node));
+ ts.startOnNewLine(varStatement);
+ statements = [varStatement];
+ }
+ if (facts & 8) {
addExportMemberAssignment(statements, node);
}
- else if (isDecoratedClass) {
- if (isDefaultExternalModuleExport(node)) {
+ else if (facts & 128 || facts & 2) {
+ if (facts & 32) {
statements.push(ts.createExportDefault(ts.getLocalName(node, false, true)));
}
- else if (isNamedExternalModuleExport(node)) {
+ else if (facts & 16) {
statements.push(ts.createExternalModuleExport(ts.getLocalName(node, false, true)));
}
}
if (statements.length > 1) {
statements.push(ts.createEndOfDeclarationMarker(node));
- ts.setEmitFlags(classStatement, ts.getEmitFlags(classStatement) | 2097152);
+ ts.setEmitFlags(classStatement, ts.getEmitFlags(classStatement) | 4194304);
}
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));
+ function createClassDeclarationHeadWithoutDecorators(node, name, facts) {
+ var modifiers = !(facts & 128)
+ ? ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier)
+ : undefined;
+ var classDeclaration = ts.createClassDeclaration(undefined, modifiers, name, undefined, ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause), transformClassMembers(node, (facts & 64) !== 0));
var emitFlags = ts.getEmitFlags(node);
- if (hasStaticProperties) {
+ if (facts & 1) {
emitFlags |= 32;
}
ts.setTextRange(classDeclaration, node);
@@ -41995,12 +43702,12 @@ var ts;
ts.setEmitFlags(classDeclaration, emitFlags);
return classDeclaration;
}
- function createClassDeclarationHeadWithDecorators(node, name, hasExtendsClause) {
+ function createClassDeclarationHeadWithDecorators(node, name, facts) {
var location = ts.moveRangePastDecorators(node);
var classAlias = getClassAliasIfNeeded(node);
var declName = ts.getLocalName(node, false, true);
var heritageClauses = ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause);
- var members = transformClassMembers(node, hasExtendsClause);
+ var members = transformClassMembers(node, (facts & 64) !== 0);
var classExpression = ts.createClassExpression(undefined, name, undefined, heritageClauses, members);
ts.setOriginalNode(classExpression, node);
ts.setTextRange(classExpression, location);
@@ -42026,7 +43733,7 @@ var ts;
enableSubstitutionForClassAliases();
classAliases[ts.getOriginalNodeId(node)] = ts.getSynthesizedClone(temp);
}
- ts.setEmitFlags(classExpression, 32768 | ts.getEmitFlags(classExpression));
+ ts.setEmitFlags(classExpression, 65536 | ts.getEmitFlags(classExpression));
expressions.push(ts.startOnNewLine(ts.createAssignment(temp, classExpression)));
ts.addRange(expressions, generateInitializedPropertyExpressions(staticProperties, temp));
expressions.push(ts.startOnNewLine(temp));
@@ -42254,8 +43961,8 @@ var ts;
function generateClassElementDecorationExpressions(node, isStatic) {
var members = getDecoratedClassElements(node, isStatic);
var expressions;
- for (var _i = 0, members_2 = members; _i < members_2.length; _i++) {
- var member = members_2[_i];
+ for (var _i = 0, members_3 = members; _i < members_3.length; _i++) {
+ var member = members_3[_i];
var expression = generateClassElementDecorationExpression(node, member);
if (expression) {
if (!expressions) {
@@ -42509,15 +44216,10 @@ var ts;
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") {
+ if (ts.isIdentifier(serializedIndividual) && serializedIndividual.text === "Object") {
return serializedIndividual;
}
- else if (serializedUnion && !ts.isVoidExpression(serializedUnion)) {
+ else if (serializedUnion) {
if (!ts.isIdentifier(serializedUnion) ||
!ts.isIdentifier(serializedIndividual) ||
serializedUnion.text !== serializedIndividual.text) {
@@ -42682,7 +44384,7 @@ var ts;
return ts.createNotEmittedStatement(node);
}
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)) {
+ if (isExportOfNamespace(node)) {
var statements = [updated];
addExportMemberAssignment(statements, node);
return statements;
@@ -42713,7 +44415,7 @@ var ts;
return parameter;
}
function visitVariableStatement(node) {
- if (isNamespaceExport(node)) {
+ if (isExportOfNamespace(node)) {
var variables = ts.getInitializedVariables(node.declarationList);
if (variables.length === 0) {
return undefined;
@@ -42804,7 +44506,12 @@ var ts;
}
function transformEnumMember(member) {
var name = getExpressionForPropertyName(member, false);
- return ts.setTextRange(ts.createStatement(ts.setTextRange(ts.createAssignment(ts.createElementAccess(currentNamespaceContainerName, ts.createAssignment(ts.createElementAccess(currentNamespaceContainerName, name), transformEnumMemberDeclarationValue(member))), name), member)), member);
+ var valueExpression = transformEnumMemberDeclarationValue(member);
+ var innerAssignment = ts.createAssignment(ts.createElementAccess(currentNamespaceContainerName, name), valueExpression);
+ var outerAssignment = valueExpression.kind === 9 ?
+ innerAssignment :
+ ts.createAssignment(ts.createElementAccess(currentNamespaceContainerName, innerAssignment), name);
+ return ts.setTextRange(ts.createStatement(ts.setTextRange(outerAssignment, member)), member);
}
function transformEnumMemberDeclarationValue(member) {
var value = resolver.getConstantValue(member);
@@ -42825,7 +44532,7 @@ var ts;
return ts.isInstantiatedModule(node, compilerOptions.preserveConstEnums || compilerOptions.isolatedModules);
}
function hasNamespaceQualifiedExportName(node) {
- return isNamespaceExport(node)
+ return isExportOfNamespace(node)
|| (isExternalModuleExport(node)
&& moduleKind !== ts.ModuleKind.ES2015
&& moduleKind !== ts.ModuleKind.System);
@@ -42851,9 +44558,9 @@ var ts;
return false;
}
function addVarForEnumOrModuleDeclaration(statements, node) {
- var statement = ts.createVariableStatement(ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), [
+ var statement = ts.createVariableStatement(ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), ts.createVariableDeclarationList([
ts.createVariableDeclaration(ts.getLocalName(node, false, true))
- ]);
+ ], currentScope.kind === 265 ? 0 : 1));
ts.setOriginalNode(statement, node);
recordEmittedDeclarationInScope(node);
if (isFirstEmittedDeclarationInScope(node)) {
@@ -42864,13 +44571,13 @@ var ts;
ts.setSourceMapRange(statement, node);
}
ts.setCommentRange(statement, node);
- ts.setEmitFlags(statement, 1024 | 2097152);
+ ts.setEmitFlags(statement, 1024 | 4194304);
statements.push(statement);
return true;
}
else {
var mergeMarker = ts.createMergeDeclarationMarker(statement);
- ts.setEmitFlags(mergeMarker, 1536 | 2097152);
+ ts.setEmitFlags(mergeMarker, 1536 | 4194304);
statements.push(mergeMarker);
return false;
}
@@ -42986,7 +44693,7 @@ var ts;
}
function visitExportDeclaration(node) {
if (!node.exportClause) {
- return resolver.moduleExportsSomeValue(node.moduleSpecifier) ? node : undefined;
+ return compilerOptions.isolatedModules || resolver.moduleExportsSomeValue(node.moduleSpecifier) ? node : undefined;
}
if (!resolver.isValueAliasDeclaration(node)) {
return undefined;
@@ -43019,7 +44726,7 @@ var ts;
}
var moduleReference = ts.createExpressionFromEntityName(node.moduleReference);
ts.setEmitFlags(moduleReference, 1536 | 2048);
- if (isNamedExternalModuleExport(node) || !isNamespaceExport(node)) {
+ if (isNamedExternalModuleExport(node) || !isExportOfNamespace(node)) {
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);
@@ -43028,7 +44735,7 @@ var ts;
return ts.setOriginalNode(createNamespaceExport(node.name, moduleReference, node), node);
}
}
- function isNamespaceExport(node) {
+ function isExportOfNamespace(node) {
return currentNamespace !== undefined && ts.hasModifier(node, 1);
}
function isExternalModuleExport(node) {
@@ -43176,10 +44883,10 @@ var ts;
if (declaration) {
var classAlias = classAliases[declaration.id];
if (classAlias) {
- var clone_2 = ts.getSynthesizedClone(classAlias);
- ts.setSourceMapRange(clone_2, node);
- ts.setCommentRange(clone_2, node);
- return clone_2;
+ var clone_1 = ts.getSynthesizedClone(classAlias);
+ ts.setSourceMapRange(clone_1, node);
+ ts.setCommentRange(clone_1, node);
+ return clone_1;
}
}
}
@@ -43296,7 +45003,7 @@ var ts;
context.onSubstituteNode = onSubstituteNode;
return transformSourceFile;
function transformSourceFile(node) {
- if (ts.isDeclarationFile(node)) {
+ if (node.isDeclarationFile) {
return node;
}
currentSourceFile = node;
@@ -43502,7 +45209,7 @@ var ts;
function createAwaiterHelper(context, hasLexicalArguments, promiseConstructor, body) {
context.requestEmitHelper(awaiterHelper);
var generatorFunc = ts.createFunctionExpression(undefined, ts.createToken(39), undefined, undefined, [], undefined, body);
- (generatorFunc.emitNode || (generatorFunc.emitNode = {})).flags |= 131072;
+ (generatorFunc.emitNode || (generatorFunc.emitNode = {})).flags |= 262144;
return ts.createCall(ts.getHelperName("__awaiter"), undefined, [
ts.createThis(),
hasLexicalArguments ? ts.createIdentifier("arguments") : ts.createVoidZero(),
@@ -43541,7 +45248,7 @@ var ts;
var enclosingSuperContainerFlags = 0;
return transformSourceFile;
function transformSourceFile(node) {
- if (ts.isDeclarationFile(node)) {
+ if (node.isDeclarationFile) {
return node;
}
var visited = ts.visitEachChild(node, visitor, context);
@@ -43609,19 +45316,14 @@ var ts;
}
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.setOriginalNode(ts.setTextRange(ts.createYield(createAwaitHelper(context, ts.visitNode(node.expression, visitor, ts.isExpression))), node), node);
}
return ts.visitEachChild(node, visitor, context);
}
function visitYieldExpression(node) {
- if (enclosingFunctionFlags & 2 && enclosingFunctionFlags & 1) {
+ if (enclosingFunctionFlags & 2 && enclosingFunctionFlags & 1 && node.asteriskToken) {
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.setOriginalNode(ts.setTextRange(ts.createYield(createAwaitHelper(context, ts.updateYield(node, node.asteriskToken, createAsyncDelegatorHelper(context, createAsyncValuesHelper(context, expression, expression), expression)))), node), node);
}
return ts.visitEachChild(node, visitor, context);
}
@@ -43748,6 +45450,11 @@ var ts;
}
return ts.setEmitFlags(ts.setTextRange(ts.createBlock(ts.setTextRange(ts.createNodeArray(statements), statementsLocation), true), bodyLocation), 48 | 384);
}
+ function createDownlevelAwait(expression) {
+ return enclosingFunctionFlags & 1
+ ? ts.createYield(undefined, createAwaitHelper(context, expression))
+ : ts.createAwait(expression);
+ }
function transformForAwaitOfStatement(node, outermostLabeledStatement) {
var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
var iterator = ts.isIdentifier(expression) ? ts.getGeneratedNameForNode(expression) : ts.createTempVariable(undefined);
@@ -43755,19 +45462,17 @@ var ts;
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, []));
+ var callValues = createAsyncValuesHelper(context, expression, node.expression);
+ var callNext = ts.createCall(ts.createPropertyAccess(iterator, "next"), undefined, []);
+ var getDone = ts.createPropertyAccess(result, "done");
+ var getValue = ts.createPropertyAccess(result, "value");
+ var callReturn = ts.createFunctionCall(returnMethod, iterator, []);
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);
+ ts.setTextRange(ts.createVariableDeclaration(iterator, undefined, callValues), node.expression),
+ ts.createVariableDeclaration(result)
+ ]), node.expression), 2097152), ts.createComma(ts.createAssignment(result, createDownlevelAwait(callNext)), ts.createLogicalNot(getDone)), undefined, convertForOfStatementHead(node, createDownlevelAwait(getValue))), node), 256);
return ts.createTry(ts.createBlock([
ts.restoreEnclosingLabel(forStatement, outermostLabeledStatement)
]), ts.createCatchClause(ts.createVariableDeclaration(catchVariable), ts.setEmitFlags(ts.createBlock([
@@ -43776,12 +45481,7 @@ var ts;
])))
]), 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)
+ ts.setEmitFlags(ts.createIf(ts.createLogicalAnd(ts.createLogicalAnd(result, ts.createLogicalNot(getDone)), ts.createAssignment(returnMethod, ts.createPropertyAccess(iterator, "return"))), ts.createStatement(createDownlevelAwait(callReturn))), 1)
]), undefined, ts.setEmitFlags(ts.createBlock([
ts.setEmitFlags(ts.createIf(errorRecord, ts.createThrow(ts.createPropertyAccess(errorRecord, "error"))), 1)
]), 1))
@@ -43906,7 +45606,7 @@ var ts;
var declarations = ts.flattenDestructuringBinding(parameter, visitor, context, 1, temp, false, true);
if (ts.some(declarations)) {
var statement = ts.createVariableStatement(undefined, ts.createVariableDeclarationList(declarations));
- ts.setEmitFlags(statement, 524288);
+ ts.setEmitFlags(statement, 1048576);
statements = ts.append(statements, statement);
}
}
@@ -44013,14 +45713,24 @@ var ts;
return ts.createCall(ts.getHelperName("__assign"), undefined, attributesSegments);
}
ts.createAssignHelper = createAssignHelper;
+ var awaitHelper = {
+ name: "typescript:await",
+ scoped: false,
+ text: "\n var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); }\n "
+ };
+ function createAwaitHelper(context, expression) {
+ context.requestEmitHelper(awaitHelper);
+ return ts.createCall(ts.getHelperName("__await"), undefined, [expression]);
+ }
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\" ? send : fulfill, reject); }\n function send(value) { settle(c[2], { value: 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 "
+ 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 || []), i, q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n };\n "
};
function createAsyncGeneratorHelper(context, generatorFunc) {
+ context.requestEmitHelper(awaitHelper);
context.requestEmitHelper(asyncGeneratorHelper);
- (generatorFunc.emitNode || (generatorFunc.emitNode = {})).flags |= 131072;
+ (generatorFunc.emitNode || (generatorFunc.emitNode = {})).flags |= 262144;
return ts.createCall(ts.getHelperName("__asyncGenerator"), undefined, [
ts.createThis(),
ts.createIdentifier("arguments"),
@@ -44030,11 +45740,11 @@ var ts;
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 }; }) }, p;\n return o = __asyncValues(o), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { return function (v) { return v = p && n === \"throw\" ? f(v) : p && v.done ? v : { value: p ? [\"yield\", v.value] : [\"await\", (o[n] || f).call(o, v)], done: false }, p = !p, v; }; }\n };\n "
+ text: "\n var __asyncDelegator = (this && this.__asyncDelegator) || function (o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { if (o[n]) i[n] = function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; }; }\n };\n "
};
function createAsyncDelegatorHelper(context, expression, location) {
+ context.requestEmitHelper(awaitHelper);
context.requestEmitHelper(asyncDelegator);
- context.requestEmitHelper(asyncValues);
return ts.setTextRange(ts.createCall(ts.getHelperName("__asyncDelegator"), undefined, [expression]), location);
}
var asyncValues = {
@@ -44053,7 +45763,7 @@ var ts;
var compilerOptions = context.getCompilerOptions();
return transformSourceFile;
function transformSourceFile(node) {
- if (ts.isDeclarationFile(node)) {
+ if (node.isDeclarationFile) {
return node;
}
var visited = ts.visitEachChild(node, visitor, context);
@@ -44491,7 +46201,7 @@ var ts;
var hoistVariableDeclaration = context.hoistVariableDeclaration;
return transformSourceFile;
function transformSourceFile(node) {
- if (ts.isDeclarationFile(node)) {
+ if (node.isDeclarationFile) {
return node;
}
return ts.visitEachChild(node, visitor, context);
@@ -44633,7 +46343,7 @@ var ts;
var enabledSubstitutions;
return transformSourceFile;
function transformSourceFile(node) {
- if (ts.isDeclarationFile(node)) {
+ if (node.isDeclarationFile) {
return node;
}
currentSourceFile = node;
@@ -44658,11 +46368,58 @@ var ts;
&& node.kind === 219
&& !node.expression;
}
+ function isClassLikeVariableStatement(node) {
+ if (!ts.isVariableStatement(node))
+ return false;
+ var variable = ts.singleOrUndefined(node.declarationList.declarations);
+ return variable
+ && variable.initializer
+ && ts.isIdentifier(variable.name)
+ && (ts.isClassLike(variable.initializer)
+ || (ts.isAssignmentExpression(variable.initializer)
+ && ts.isIdentifier(variable.initializer.left)
+ && ts.isClassLike(variable.initializer.right)));
+ }
+ function isTypeScriptClassWrapper(node) {
+ var call = ts.tryCast(node, ts.isCallExpression);
+ if (!call || ts.isParseTreeNode(call) ||
+ ts.some(call.typeArguments) ||
+ ts.some(call.arguments)) {
+ return false;
+ }
+ var func = ts.tryCast(ts.skipOuterExpressions(call.expression), ts.isFunctionExpression);
+ if (!func || ts.isParseTreeNode(func) ||
+ ts.some(func.typeParameters) ||
+ ts.some(func.parameters) ||
+ func.type ||
+ !func.body) {
+ return false;
+ }
+ var statements = func.body.statements;
+ if (statements.length < 2) {
+ return false;
+ }
+ var firstStatement = statements[0];
+ if (ts.isParseTreeNode(firstStatement) ||
+ !ts.isClassLike(firstStatement) &&
+ !isClassLikeVariableStatement(firstStatement)) {
+ return false;
+ }
+ var lastStatement = ts.elementAt(statements, -1);
+ var returnStatement = ts.tryCast(ts.isVariableStatement(lastStatement) ? ts.elementAt(statements, -2) : lastStatement, ts.isReturnStatement);
+ if (!returnStatement ||
+ !returnStatement.expression ||
+ !ts.isIdentifier(ts.skipOuterExpressions(returnStatement.expression))) {
+ return false;
+ }
+ return true;
+ }
function shouldVisitNode(node) {
return (node.transformFlags & 128) !== 0
|| convertedLoopState !== undefined
|| (hierarchyFacts & 4096 && ts.isStatement(node))
- || (ts.isIterationStatement(node, false) && shouldConvertIterationStatementBody(node));
+ || (ts.isIterationStatement(node, false) && shouldConvertIterationStatementBody(node))
+ || isTypeScriptClassWrapper(node);
}
function visitor(node) {
if (shouldVisitNode(node)) {
@@ -44916,9 +46673,9 @@ var ts;
statements.push(exportStatement);
}
var emitFlags = ts.getEmitFlags(node);
- if ((emitFlags & 2097152) === 0) {
+ if ((emitFlags & 4194304) === 0) {
statements.push(ts.createEndOfDeclarationMarker(node));
- ts.setEmitFlags(statement, emitFlags | 2097152);
+ ts.setEmitFlags(statement, emitFlags | 4194304);
}
return ts.singleOrMany(statements);
}
@@ -44931,8 +46688,8 @@ var ts;
}
var extendsClauseElement = ts.getClassExtendsHeritageClauseElement(node);
var classFunction = ts.createFunctionExpression(undefined, undefined, undefined, undefined, extendsClauseElement ? [ts.createParameter(undefined, undefined, undefined, "_super")] : [], undefined, transformClassBody(node, extendsClauseElement));
- if (ts.getEmitFlags(node) & 32768) {
- ts.setEmitFlags(classFunction, 32768);
+ if (ts.getEmitFlags(node) & 65536) {
+ ts.setEmitFlags(classFunction, 65536);
}
var inner = ts.createPartiallyEmittedExpression(classFunction);
inner.end = node.end;
@@ -44951,7 +46708,7 @@ var ts;
addConstructor(statements, node, extendsClauseElement);
addClassMembers(statements, node);
var closingBraceLocation = ts.createTokenRange(ts.skipTrivia(currentText, node.members.end), 18);
- var localName = ts.getLocalName(node);
+ var localName = ts.getInternalName(node);
var outer = ts.createPartiallyEmittedExpression(localName);
outer.end = closingBraceLocation.end;
ts.setEmitFlags(outer, 1536);
@@ -44975,7 +46732,7 @@ var ts;
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));
+ var constructorFunction = ts.createFunctionDeclaration(undefined, undefined, undefined, ts.getInternalName(node), undefined, transformConstructorParameters(constructor, hasSynthesizedSuper), undefined, transformConstructorBody(constructor, node, extendsClauseElement, hasSynthesizedSuper));
ts.setTextRange(constructorFunction, constructor || node);
if (extendsClauseElement) {
ts.setEmitFlags(constructorFunction, 8);
@@ -45139,10 +46896,10 @@ var ts;
function addDefaultValueAssignmentForBindingPattern(statements, parameter, name, initializer) {
var temp = ts.getGeneratedNameForNode(parameter);
if (name.elements.length > 0) {
- statements.push(ts.setEmitFlags(ts.createVariableStatement(undefined, ts.createVariableDeclarationList(ts.flattenDestructuringBinding(parameter, visitor, context, 0, temp))), 524288));
+ statements.push(ts.setEmitFlags(ts.createVariableStatement(undefined, ts.createVariableDeclarationList(ts.flattenDestructuringBinding(parameter, visitor, context, 0, temp))), 1048576));
}
else if (initializer) {
- statements.push(ts.setEmitFlags(ts.createStatement(ts.createAssignment(temp, ts.visitNode(initializer, visitor, ts.isExpression))), 524288));
+ statements.push(ts.setEmitFlags(ts.createStatement(ts.createAssignment(temp, ts.visitNode(initializer, visitor, ts.isExpression))), 1048576));
}
}
function addDefaultValueAssignmentForInitializer(statements, parameter, name, initializer) {
@@ -45152,7 +46909,7 @@ var ts;
]), parameter), 1 | 32 | 384));
statement.startsOnNewLine = true;
ts.setTextRange(statement, parameter);
- ts.setEmitFlags(statement, 384 | 32 | 524288);
+ ts.setEmitFlags(statement, 384 | 32 | 1048576);
statements.push(statement);
}
function shouldAddRestParameter(node, inConstructorWithSynthesizedSuper) {
@@ -45170,7 +46927,7 @@ var ts;
var temp = ts.createLoopVariable();
statements.push(ts.setEmitFlags(ts.setTextRange(ts.createVariableStatement(undefined, ts.createVariableDeclarationList([
ts.createVariableDeclaration(declarationName, undefined, ts.createArrayLiteral([]))
- ])), parameter), 524288));
+ ])), parameter), 1048576));
var forStatement = ts.createFor(ts.setTextRange(ts.createVariableDeclarationList([
ts.createVariableDeclaration(temp, undefined, ts.createLiteral(restIndex))
]), parameter), ts.setTextRange(ts.createLessThan(temp, ts.createPropertyAccess(ts.createIdentifier("arguments"), "length")), parameter), ts.setTextRange(ts.createPostfixIncrement(temp), parameter), ts.createBlock([
@@ -45178,7 +46935,7 @@ var ts;
? temp
: ts.createSubtract(temp, ts.createLiteral(restIndex))), ts.createElementAccess(ts.createIdentifier("arguments"), temp))), parameter))
]));
- ts.setEmitFlags(forStatement, 524288);
+ ts.setEmitFlags(forStatement, 1048576);
ts.startOnNewLine(forStatement);
statements.push(forStatement);
}
@@ -45192,7 +46949,7 @@ var ts;
var captureThisStatement = ts.createVariableStatement(undefined, ts.createVariableDeclarationList([
ts.createVariableDeclaration("_this", undefined, initializer)
]));
- ts.setEmitFlags(captureThisStatement, 1536 | 524288);
+ ts.setEmitFlags(captureThisStatement, 1536 | 1048576);
ts.setTextRange(captureThisStatement, originalStatement);
ts.setSourceMapRange(captureThisStatement, node);
statements.push(captureThisStatement);
@@ -45332,7 +47089,7 @@ var ts;
return func;
}
function visitFunctionExpression(node) {
- var ancestorFacts = ts.getEmitFlags(node) & 131072
+ var ancestorFacts = ts.getEmitFlags(node) & 262144
? enterSubtree(16278, 69)
: enterSubtree(16286, 65);
var savedConvertedLoopState = convertedLoopState;
@@ -45496,12 +47253,13 @@ var ts;
}
else {
assignment = ts.createBinary(decl.name, 58, ts.visitNode(decl.initializer, visitor, ts.isExpression));
+ ts.setTextRange(assignment, decl);
}
assignments = ts.append(assignments, assignment);
}
}
if (assignments) {
- updated = ts.setTextRange(ts.createStatement(ts.reduceLeft(assignments, function (acc, v) { return ts.createBinary(v, 26, acc); })), node);
+ updated = ts.setTextRange(ts.createStatement(ts.inlineExpressions(assignments)), node);
}
else {
updated = undefined;
@@ -45518,9 +47276,9 @@ var ts;
if (node.flags & 3) {
enableSubstitutionsForBlockScopedBindings();
}
- var declarations = ts.flatten(ts.map(node.declarations, node.flags & 1
+ var declarations = ts.flatMap(node.declarations, node.flags & 1
? visitVariableDeclarationInLetDeclarationList
- : visitVariableDeclaration));
+ : visitVariableDeclaration);
var declarationList = ts.createVariableDeclarationList(declarations);
ts.setOriginalNode(declarationList, node);
ts.setTextRange(declarationList, node);
@@ -45558,9 +47316,9 @@ var ts;
return visitVariableDeclaration(node);
}
if (!node.initializer && shouldEmitExplicitInitializerForLetDeclaration(node)) {
- var clone_3 = ts.getMutableClone(node);
- clone_3.initializer = ts.createVoidZero();
- return clone_3;
+ var clone_2 = ts.getMutableClone(node);
+ clone_2.initializer = ts.createVoidZero();
+ return clone_2;
}
return ts.visitEachChild(node, visitor, context);
}
@@ -45681,7 +47439,7 @@ var ts;
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);
+ ]), node.expression), 2097152), 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);
ts.setTextRange(forStatement, node);
return ts.restoreEnclosingLabel(forStatement, outermostLabeledStatement, convertedLoopState && resetLabel);
@@ -45700,7 +47458,7 @@ var ts;
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);
+ ]), node.expression), 2097152), 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([
@@ -45737,7 +47495,7 @@ var ts;
}
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));
+ var assignment = ts.createAssignment(temp, ts.setEmitFlags(ts.createObjectLiteral(ts.visitNodes(properties, visitor, ts.isObjectLiteralElementLike, 0, numInitialProperties), node.multiLine), 65536));
if (node.multiLine) {
assignment.startsOnNewLine = true;
}
@@ -45844,11 +47602,11 @@ var ts;
loopBodyFlags |= 8;
}
if (isAsyncBlockContainingAwait) {
- loopBodyFlags |= 131072;
+ loopBodyFlags |= 262144;
}
var convertedLoopVariable = ts.createVariableStatement(undefined, ts.setEmitFlags(ts.createVariableDeclarationList([
ts.createVariableDeclaration(functionName, undefined, ts.setEmitFlags(ts.createFunctionExpression(undefined, containsYield ? ts.createToken(39) : undefined, undefined, undefined, loopParameters, undefined, loopBody), loopBodyFlags))
- ]), 1048576));
+ ]), 2097152));
var statements = [convertedLoopVariable];
var extraVariableDeclarations;
if (currentState.argumentsName) {
@@ -45899,13 +47657,13 @@ var ts;
loop = convert(node, outermostLabeledStatement, convertedLoopBodyStatements);
}
else {
- 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);
+ var clone_3 = ts.getMutableClone(node);
+ clone_3.statement = undefined;
+ clone_3 = ts.visitEachChild(clone_3, visitor, context);
+ clone_3.statement = ts.createBlock(convertedLoopBodyStatements, true);
+ clone_3.transformFlags = 0;
+ ts.aggregateTransformFlags(clone_3);
+ loop = ts.restoreEnclosingLabel(clone_3, outermostLabeledStatement, convertedLoopState && resetLabel);
}
statements.push(loop);
return statements;
@@ -45929,7 +47687,7 @@ var ts;
!state.labeledNonLocalContinues;
var call = ts.createCall(loopFunctionExpressionName, undefined, ts.map(parameters, function (p) { return p.name; }));
var callResult = isAsyncBlockContainingAwait
- ? ts.createYield(ts.createToken(39), ts.setEmitFlags(call, 4194304))
+ ? ts.createYield(ts.createToken(39), ts.setEmitFlags(call, 8388608))
: call;
if (isSimpleLoop) {
statements.push(ts.createStatement(callResult));
@@ -46100,7 +47858,20 @@ var ts;
var savedConvertedLoopState = convertedLoopState;
convertedLoopState = undefined;
var ancestorFacts = enterSubtree(16286, 65);
- var updated = ts.visitEachChild(node, visitor, context);
+ var updated;
+ if (node.transformFlags & 32768) {
+ var parameters = ts.visitParameterList(node.parameters, visitor, context);
+ var body = transformFunctionBody(node);
+ if (node.kind === 153) {
+ updated = ts.updateGetAccessor(node, node.decorators, node.modifiers, node.name, parameters, node.type, body);
+ }
+ else {
+ updated = ts.updateSetAccessor(node, node.decorators, node.modifiers, node.name, parameters, body);
+ }
+ }
+ else {
+ updated = ts.visitEachChild(node, visitor, context);
+ }
exitSubtree(ancestorFacts, 49152, 0);
convertedLoopState = savedConvertedLoopState;
return updated;
@@ -46124,11 +47895,49 @@ var ts;
return ts.visitEachChild(node, visitor, context);
}
function visitCallExpression(node) {
+ if (isTypeScriptClassWrapper(node)) {
+ return visitTypeScriptClassWrapper(node);
+ }
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 visitTypeScriptClassWrapper(node) {
+ var body = ts.cast(ts.skipOuterExpressions(node.expression), ts.isFunctionExpression).body;
+ var classStatements = ts.visitNodes(body.statements, visitor, ts.isStatement, 0, 1);
+ var remainingStatements = ts.visitNodes(body.statements, visitor, ts.isStatement, 1, body.statements.length - 1);
+ var varStatement = ts.cast(ts.firstOrUndefined(classStatements), ts.isVariableStatement);
+ var variable = varStatement.declarationList.declarations[0];
+ var initializer = ts.skipOuterExpressions(variable.initializer);
+ var aliasAssignment = ts.tryCast(initializer, ts.isAssignmentExpression);
+ var call = ts.cast(aliasAssignment ? ts.skipOuterExpressions(aliasAssignment.right) : initializer, ts.isCallExpression);
+ var func = ts.cast(ts.skipOuterExpressions(call.expression), ts.isFunctionExpression);
+ var funcStatements = func.body.statements;
+ var classBodyStart = 0;
+ var classBodyEnd = -1;
+ var statements = [];
+ if (aliasAssignment) {
+ var extendsCall = ts.tryCast(funcStatements[classBodyStart], ts.isExpressionStatement);
+ if (extendsCall) {
+ statements.push(extendsCall);
+ classBodyStart++;
+ }
+ statements.push(funcStatements[classBodyStart]);
+ classBodyStart++;
+ statements.push(ts.createStatement(ts.createAssignment(aliasAssignment.left, ts.cast(variable.name, ts.isIdentifier))));
+ }
+ while (!ts.isReturnStatement(ts.elementAt(funcStatements, classBodyEnd))) {
+ classBodyEnd--;
+ }
+ ts.addRange(statements, funcStatements, classBodyStart, classBodyEnd);
+ if (classBodyEnd < -1) {
+ ts.addRange(statements, funcStatements, classBodyEnd + 1);
+ }
+ ts.addRange(statements, remainingStatements);
+ ts.addRange(statements, classStatements, 1);
+ return ts.recreateOuterExpressions(node.expression, ts.recreateOuterExpressions(variable.initializer, ts.recreateOuterExpressions(aliasAssignment && aliasAssignment.right, ts.updateCall(call, ts.recreateOuterExpressions(call.expression, ts.updateFunctionExpression(func, undefined, undefined, undefined, undefined, func.parameters, undefined, ts.updateBlock(func.body, statements))), undefined, call.arguments))));
+ }
function visitImmediateSuperCallInBody(node) {
return visitCallExpressionWithPotentialCapturedThisAssignment(node, false);
}
@@ -46181,7 +47990,7 @@ var ts;
else {
if (segments.length === 1) {
var firstElement = elements[0];
- return needsUniqueCopy && ts.isSpreadExpression(firstElement) && firstElement.expression.kind !== 177
+ return needsUniqueCopy && ts.isSpreadElement(firstElement) && firstElement.expression.kind !== 177
? ts.createArraySlice(segments[0])
: segments[0];
}
@@ -46189,7 +47998,7 @@ var ts;
}
}
function partitionSpread(node) {
- return ts.isSpreadExpression(node)
+ return ts.isSpreadElement(node)
? visitSpanOfSpreads
: visitSpanOfNonSpreads;
}
@@ -46343,7 +48152,7 @@ var ts;
return node;
}
function substituteIdentifier(node) {
- if (enabledSubstitutions & 2) {
+ if (enabledSubstitutions & 2 && !ts.isInternalName(node)) {
var original = ts.getParseTreeNode(node, ts.isIdentifier);
if (original && isNameOfDeclarationWithCollidingName(original)) {
return ts.setTextRange(ts.getGeneratedNameForNode(original), node);
@@ -46373,14 +48182,31 @@ var ts;
return node;
}
function substituteExpressionIdentifier(node) {
- if (enabledSubstitutions & 2) {
+ if (enabledSubstitutions & 2 && !ts.isInternalName(node)) {
var declaration = resolver.getReferencedDeclarationWithCollidingName(node);
- if (declaration) {
- return ts.setTextRange(ts.getGeneratedNameForNode(declaration.name), node);
+ if (declaration && !(ts.isClassLike(declaration) && isPartOfClassBody(declaration, node))) {
+ return ts.setTextRange(ts.getGeneratedNameForNode(ts.getNameOfDeclaration(declaration)), node);
}
}
return node;
}
+ function isPartOfClassBody(declaration, node) {
+ var currentNode = ts.getParseTreeNode(node);
+ if (!currentNode || currentNode === declaration || currentNode.end <= declaration.pos || currentNode.pos >= declaration.end) {
+ return false;
+ }
+ var blockScope = ts.getEnclosingBlockScopeContainer(declaration);
+ while (currentNode) {
+ if (currentNode === blockScope || currentNode === declaration) {
+ return false;
+ }
+ if (ts.isClassElement(currentNode) && currentNode.parent === declaration) {
+ return true;
+ }
+ currentNode = currentNode.parent;
+ }
+ return false;
+ }
function substituteThisKeyword(node) {
if (enabledSubstitutions & 1
&& hierarchyFacts & 16) {
@@ -46389,8 +48215,9 @@ var ts;
return node;
}
function getClassMemberPrefix(node, member) {
- var expression = ts.getLocalName(node);
- return ts.hasModifier(member, 32) ? expression : ts.createPropertyAccess(expression, "prototype");
+ return ts.hasModifier(member, 32)
+ ? ts.getInternalName(node)
+ : ts.createPropertyAccess(ts.getInternalName(node), "prototype");
}
function hasSynthesizedDefaultSuperCall(constructor, hasExtendsClause) {
if (!constructor || !hasExtendsClause) {
@@ -46525,8 +48352,7 @@ var ts;
var withBlockStack;
return transformSourceFile;
function transformSourceFile(node) {
- if (ts.isDeclarationFile(node)
- || (node.transformFlags & 512) === 0) {
+ if (node.isDeclarationFile || (node.transformFlags & 512) === 0) {
return node;
}
currentSourceFile = node;
@@ -46734,7 +48560,7 @@ var ts;
return undefined;
}
else {
- if (ts.getEmitFlags(node) & 524288) {
+ if (ts.getEmitFlags(node) & 1048576) {
return node;
}
for (var _i = 0, _a = node.declarationList.declarations; _i < _a.length; _i++) {
@@ -46745,7 +48571,7 @@ var ts;
if (variables.length === 0) {
return undefined;
}
- return ts.createStatement(ts.inlineExpressions(ts.map(variables, transformInitializedVariable)));
+ return ts.setSourceMapRange(ts.createStatement(ts.inlineExpressions(ts.map(variables, transformInitializedVariable))), node);
}
}
function visitBinaryExpression(node) {
@@ -46811,10 +48637,10 @@ var ts;
else if (node.operatorToken.kind === 26) {
return visitCommaExpression(node);
}
- 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;
+ 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;
}
return ts.visitEachChild(node, visitor, context);
}
@@ -46870,7 +48696,7 @@ var ts;
var resumeLabel = defineLabel();
var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
if (node.asteriskToken) {
- var iterator = (ts.getEmitFlags(node.expression) & 4194304) === 0
+ var iterator = (ts.getEmitFlags(node.expression) & 8388608) === 0
? ts.createValuesHelper(context, expression, node)
: expression;
emitYieldStar(iterator, node);
@@ -46941,10 +48767,10 @@ var ts;
}
function visitElementAccessExpression(node) {
if (containsYield(node.argumentExpression)) {
- 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;
+ 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;
}
return ts.visitEachChild(node, visitor, context);
}
@@ -47060,7 +48886,7 @@ var ts;
return undefined;
}
function transformInitializedVariable(node) {
- return ts.createAssignment(ts.getSynthesizedClone(node.name), ts.visitNode(node.initializer, visitor, ts.isExpression));
+ return ts.setSourceMapRange(ts.createAssignment(ts.setSourceMapRange(ts.getSynthesizedClone(node.name), node.name), ts.visitNode(node.initializer, visitor, ts.isExpression)), node);
}
function transformAndEmitIfStatement(node) {
if (containsYield(node)) {
@@ -47434,10 +49260,10 @@ var ts;
if (declaration) {
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;
+ var clone_6 = ts.getMutableClone(name);
+ ts.setSourceMapRange(clone_6, node);
+ ts.setCommentRange(clone_6, node);
+ return clone_6;
}
}
}
@@ -47835,7 +49661,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, 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)), 524288));
}
function buildStatements() {
if (operations) {
@@ -48210,9 +50036,10 @@ var ts;
var currentSourceFile;
var currentModuleInfo;
var noSubstitution;
+ var needUMDDynamicImportHelper;
return transformSourceFile;
function transformSourceFile(node) {
- if (ts.isDeclarationFile(node) || !(ts.isExternalModule(node) || compilerOptions.isolatedModules)) {
+ if (node.isDeclarationFile || !(ts.isExternalModule(node) || compilerOptions.isolatedModules || node.transformFlags & 67108864)) {
return node;
}
currentSourceFile = node;
@@ -48222,6 +50049,7 @@ var ts;
var updated = transformModule(node);
currentSourceFile = undefined;
currentModuleInfo = undefined;
+ needUMDDynamicImportHelper = false;
return ts.aggregateTransformFlags(updated);
}
function shouldEmitUnderscoreUnderscoreESModule() {
@@ -48243,9 +50071,10 @@ var ts;
addExportEqualsIfNeeded(statements, false);
ts.addRange(statements, endLexicalEnvironment());
var updated = ts.updateSourceFileNode(node, ts.setTextRange(ts.createNodeArray(statements), node.statements));
- if (currentModuleInfo.hasExportStarsToExportValues) {
+ if (currentModuleInfo.hasExportStarsToExportValues && !compilerOptions.importHelpers) {
ts.addEmitHelper(updated, exportStarHelper);
}
+ ts.addEmitHelpers(updated, context.readEmitHelpers());
return updated;
}
function transformAMDModule(node) {
@@ -48338,9 +50167,12 @@ var ts;
addExportEqualsIfNeeded(statements, true);
ts.addRange(statements, endLexicalEnvironment());
var body = ts.createBlock(statements, true);
- if (currentModuleInfo.hasExportStarsToExportValues) {
+ if (currentModuleInfo.hasExportStarsToExportValues && !compilerOptions.importHelpers) {
ts.addEmitHelper(body, exportStarHelper);
}
+ if (needUMDDynamicImportHelper) {
+ ts.addEmitHelper(body, dynamicImportUMDHelper);
+ }
return body;
}
function addExportEqualsIfNeeded(statements, emitAsReturn) {
@@ -48375,14 +50207,49 @@ var ts;
return visitFunctionDeclaration(node);
case 229:
return visitClassDeclaration(node);
- case 297:
+ case 299:
return visitMergeDeclarationMarker(node);
- case 298:
+ case 300:
return visitEndOfDeclarationMarker(node);
default:
- return node;
+ return ts.visitEachChild(node, importCallExpressionVisitor, context);
+ }
+ }
+ function importCallExpressionVisitor(node) {
+ if (!(node.transformFlags & 67108864)) {
+ return node;
+ }
+ if (ts.isImportCall(node)) {
+ return visitImportCallExpression(node);
+ }
+ else {
+ return ts.visitEachChild(node, importCallExpressionVisitor, context);
}
}
+ function visitImportCallExpression(node) {
+ switch (compilerOptions.module) {
+ case ts.ModuleKind.AMD:
+ return transformImportCallExpressionAMD(node);
+ case ts.ModuleKind.UMD:
+ return transformImportCallExpressionUMD(node);
+ case ts.ModuleKind.CommonJS:
+ default:
+ return transformImportCallExpressionCommonJS(node);
+ }
+ }
+ function transformImportCallExpressionUMD(node) {
+ needUMDDynamicImportHelper = true;
+ return ts.createConditional(ts.createIdentifier("__syncRequire"), transformImportCallExpressionCommonJS(node), transformImportCallExpressionAMD(node));
+ }
+ function transformImportCallExpressionAMD(node) {
+ var resolve = ts.createUniqueName("resolve");
+ var reject = ts.createUniqueName("reject");
+ return ts.createNew(ts.createIdentifier("Promise"), undefined, [ts.createFunctionExpression(undefined, undefined, undefined, undefined, [ts.createParameter(undefined, undefined, undefined, resolve),
+ ts.createParameter(undefined, undefined, undefined, reject)], undefined, ts.createBlock([ts.createStatement(ts.createCall(ts.createIdentifier("require"), undefined, [ts.createArrayLiteral([ts.firstOrUndefined(node.arguments) || ts.createOmittedExpression()]), resolve, reject]))]))]);
+ }
+ function transformImportCallExpressionCommonJS(node) {
+ return ts.createCall(ts.createPropertyAccess(ts.createCall(ts.createPropertyAccess(ts.createIdentifier("Promise"), "resolve"), undefined, []), "then"), undefined, [ts.createFunctionExpression(undefined, undefined, undefined, undefined, undefined, undefined, ts.createBlock([ts.createReturn(ts.createCall(ts.createIdentifier("require"), undefined, node.arguments))]))]);
+ }
function visitImportDeclaration(node) {
var statements;
var namespaceDeclaration = ts.getNamespaceDeclarationNode(node);
@@ -48473,11 +50340,7 @@ var ts;
return ts.singleOrMany(statements);
}
else {
- return ts.setTextRange(ts.createStatement(ts.createCall(ts.createIdentifier("__export"), undefined, [
- moduleKind !== ts.ModuleKind.AMD
- ? createRequireCall(node)
- : generatedName
- ])), node);
+ return ts.setTextRange(ts.createStatement(createExportStarHelper(context, moduleKind !== ts.ModuleKind.AMD ? createRequireCall(node) : generatedName)), node);
}
}
function visitExportAssignment(node) {
@@ -48498,10 +50361,10 @@ var ts;
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));
+ 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, ts.visitNodes(node.parameters, importCallExpressionVisitor), undefined, ts.visitEachChild(node.body, importCallExpressionVisitor, context)), node), node));
}
else {
- statements = ts.append(statements, node);
+ statements = ts.append(statements, ts.visitEachChild(node, importCallExpressionVisitor, context));
}
if (hasAssociatedEndOfDeclarationMarker(node)) {
var id = ts.getOriginalNodeId(node);
@@ -48515,10 +50378,10 @@ var ts;
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));
+ statements = ts.append(statements, ts.setOriginalNode(ts.setTextRange(ts.createClassDeclaration(undefined, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), ts.getDeclarationName(node, true, true), undefined, ts.visitNodes(node.heritageClauses, importCallExpressionVisitor), node.members), node), node));
}
else {
- statements = ts.append(statements, node);
+ statements = ts.append(statements, ts.visitEachChild(node, importCallExpressionVisitor, context));
}
if (hasAssociatedEndOfDeclarationMarker(node)) {
var id = ts.getOriginalNodeId(node);
@@ -48555,7 +50418,7 @@ var ts;
}
}
else {
- statements = ts.append(statements, node);
+ statements = ts.append(statements, ts.visitEachChild(node, importCallExpressionVisitor, context));
}
if (hasAssociatedEndOfDeclarationMarker(node)) {
var id = ts.getOriginalNodeId(node);
@@ -48568,10 +50431,10 @@ var ts;
}
function transformInitializedVariable(node) {
if (ts.isBindingPattern(node.name)) {
- return ts.flattenDestructuringAssignment(node, undefined, context, 0, false, createExportExpression);
+ return ts.flattenDestructuringAssignment(ts.visitNode(node, importCallExpressionVisitor), undefined, context, 0, false, createExportExpression);
}
else {
- return ts.createAssignment(ts.setTextRange(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), ts.visitNode(node.initializer, importCallExpressionVisitor));
}
}
function visitMergeDeclarationMarker(node) {
@@ -48582,7 +50445,7 @@ var ts;
return node;
}
function hasAssociatedEndOfDeclarationMarker(node) {
- return (ts.getEmitFlags(node) & 2097152) !== 0;
+ return (ts.getEmitFlags(node) & 4194304) !== 0;
}
function visitEndOfDeclarationMarker(node) {
var id = ts.getOriginalNodeId(node);
@@ -48695,7 +50558,7 @@ var ts;
])
]));
}
- ts.setEmitFlags(statement, 524288);
+ ts.setEmitFlags(statement, 1048576);
return statement;
}
function createExportStatement(name, value, location, allowComments) {
@@ -48849,7 +50712,18 @@ var ts;
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 }"
+ text: "\n function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n }\n "
+ };
+ function createExportStarHelper(context, module) {
+ var compilerOptions = context.getCompilerOptions();
+ return compilerOptions.importHelpers
+ ? ts.createCall(ts.getHelperName("__exportStar"), undefined, [module, ts.createIdentifier("exports")])
+ : ts.createCall(ts.createIdentifier("__export"), undefined, [module]);
+ }
+ var dynamicImportUMDHelper = {
+ name: "typescript:dynamicimport-sync-require",
+ scoped: true,
+ text: "\n var __syncRequire = typeof module === \"object\" && typeof module.exports === \"object\";"
};
})(ts || (ts = {}));
var ts;
@@ -48881,9 +50755,7 @@ var ts;
var noSubstitution;
return transformSourceFile;
function transformSourceFile(node) {
- if (ts.isDeclarationFile(node)
- || !(ts.isExternalModule(node)
- || compilerOptions.isolatedModules)) {
+ if (node.isDeclarationFile || !(ts.isEffectiveExternalModule(node, compilerOptions) || node.transformFlags & 67108864)) {
return node;
}
var id = ts.getOriginalNodeId(node);
@@ -49121,7 +50993,7 @@ var ts;
if (node.isExportEquals) {
return undefined;
}
- var expression = ts.visitNode(node.expression, destructuringVisitor, ts.isExpression);
+ var expression = ts.visitNode(node.expression, destructuringAndImportCallVisitor, ts.isExpression);
var original = node.original;
if (original && hasAssociatedEndOfDeclarationMarker(original)) {
var id = ts.getOriginalNodeId(node);
@@ -49133,10 +51005,10 @@ 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), node.asteriskToken, 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, destructuringAndImportCallVisitor, ts.isParameterDeclaration), undefined, ts.visitNode(node.body, destructuringAndImportCallVisitor, ts.isBlock)));
}
else {
- hoistedStatements = ts.append(hoistedStatements, node);
+ hoistedStatements = ts.append(hoistedStatements, ts.visitEachChild(node, destructuringAndImportCallVisitor, context));
}
if (hasAssociatedEndOfDeclarationMarker(node)) {
var id = ts.getOriginalNodeId(node);
@@ -49151,7 +51023,7 @@ var ts;
var statements;
var name = ts.getLocalName(node);
hoistVariableDeclaration(name);
- 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));
+ statements = ts.append(statements, ts.setTextRange(ts.createStatement(ts.createAssignment(name, ts.setTextRange(ts.createClassExpression(undefined, node.name, undefined, ts.visitNodes(node.heritageClauses, destructuringAndImportCallVisitor, ts.isHeritageClause), ts.visitNodes(node.members, destructuringAndImportCallVisitor, ts.isClassElement)), node))), node));
if (hasAssociatedEndOfDeclarationMarker(node)) {
var id = ts.getOriginalNodeId(node);
deferredExports[id] = appendExportsOfHoistedDeclaration(deferredExports[id], node);
@@ -49163,7 +51035,7 @@ var ts;
}
function visitVariableStatement(node) {
if (!shouldHoistVariableDeclarationList(node.declarationList)) {
- return ts.visitNode(node, destructuringVisitor, ts.isStatement);
+ return ts.visitNode(node, destructuringAndImportCallVisitor, ts.isStatement);
}
var expressions;
var isExportedDeclaration = ts.hasModifier(node, 1);
@@ -49204,15 +51076,15 @@ var ts;
}
}
function shouldHoistVariableDeclarationList(node) {
- return (ts.getEmitFlags(node) & 1048576) === 0
+ return (ts.getEmitFlags(node) & 2097152) === 0
&& (enclosingBlockScopedContainer.kind === 265
|| (ts.getOriginalNode(node).flags & 3) === 0);
}
function transformInitializedVariable(node, isExportedDeclaration) {
var createAssignment = isExportedDeclaration ? createExportedVariableAssignment : createNonExportedVariableAssignment;
return ts.isBindingPattern(node.name)
- ? ts.flattenDestructuringAssignment(node, destructuringVisitor, context, 0, false, createAssignment)
- : createAssignment(node.name, ts.visitNode(node.initializer, destructuringVisitor, ts.isExpression));
+ ? ts.flattenDestructuringAssignment(node, destructuringAndImportCallVisitor, context, 0, false, createAssignment)
+ : createAssignment(node.name, ts.visitNode(node.initializer, destructuringAndImportCallVisitor, ts.isExpression));
}
function createExportedVariableAssignment(name, value, location) {
return createVariableAssignment(name, value, location, true);
@@ -49235,7 +51107,7 @@ var ts;
return node;
}
function hasAssociatedEndOfDeclarationMarker(node) {
- return (ts.getEmitFlags(node) & 2097152) !== 0;
+ return (ts.getEmitFlags(node) & 4194304) !== 0;
}
function visitEndOfDeclarationMarker(node) {
var id = ts.getOriginalNodeId(node);
@@ -49396,32 +51268,32 @@ var ts;
return visitCatchClause(node);
case 207:
return visitBlock(node);
- case 297:
+ case 299:
return visitMergeDeclarationMarker(node);
- case 298:
+ case 300:
return visitEndOfDeclarationMarker(node);
default:
- return destructuringVisitor(node);
+ return destructuringAndImportCallVisitor(node);
}
}
function visitForStatement(node) {
var savedEnclosingBlockScopedContainer = enclosingBlockScopedContainer;
enclosingBlockScopedContainer = node;
- 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));
+ node = ts.updateFor(node, visitForInitializer(node.initializer), ts.visitNode(node.condition, destructuringAndImportCallVisitor, ts.isExpression), ts.visitNode(node.incrementor, destructuringAndImportCallVisitor, 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, ts.liftToBlock));
+ node = ts.updateForIn(node, visitForInitializer(node.initializer), ts.visitNode(node.expression, destructuringAndImportCallVisitor, 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, node.awaitModifier, visitForInitializer(node.initializer), ts.visitNode(node.expression, destructuringVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, ts.liftToBlock));
+ node = ts.updateForOf(node, node.awaitModifier, visitForInitializer(node.initializer), ts.visitNode(node.expression, destructuringAndImportCallVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, ts.liftToBlock));
enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer;
return node;
}
@@ -49446,19 +51318,19 @@ var ts;
}
}
function visitDoStatement(node) {
- return ts.updateDo(node, ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, 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, destructuringAndImportCallVisitor, ts.isExpression));
}
function visitWhileStatement(node) {
- return ts.updateWhile(node, ts.visitNode(node.expression, destructuringVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, ts.liftToBlock));
+ return ts.updateWhile(node, ts.visitNode(node.expression, destructuringAndImportCallVisitor, 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, ts.liftToBlock));
}
function visitWithStatement(node) {
- return ts.updateWith(node, ts.visitNode(node.expression, destructuringVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, ts.liftToBlock));
+ return ts.updateWith(node, ts.visitNode(node.expression, destructuringAndImportCallVisitor, 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));
+ return ts.updateSwitch(node, ts.visitNode(node.expression, destructuringAndImportCallVisitor, ts.isExpression), ts.visitNode(node.caseBlock, nestedElementVisitor, ts.isCaseBlock));
}
function visitCaseBlock(node) {
var savedEnclosingBlockScopedContainer = enclosingBlockScopedContainer;
@@ -49468,7 +51340,7 @@ var ts;
return node;
}
function visitCaseClause(node) {
- return ts.updateCaseClause(node, ts.visitNode(node.expression, destructuringVisitor, ts.isExpression), ts.visitNodes(node.statements, nestedElementVisitor, ts.isStatement));
+ return ts.updateCaseClause(node, ts.visitNode(node.expression, destructuringAndImportCallVisitor, ts.isExpression), ts.visitNodes(node.statements, nestedElementVisitor, ts.isStatement));
}
function visitDefaultClause(node) {
return ts.visitEachChild(node, nestedElementVisitor, context);
@@ -49490,29 +51362,35 @@ var ts;
enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer;
return node;
}
- function destructuringVisitor(node) {
+ function destructuringAndImportCallVisitor(node) {
if (node.transformFlags & 1024
&& node.kind === 194) {
return visitDestructuringAssignment(node);
}
- else if (node.transformFlags & 2048) {
- return ts.visitEachChild(node, destructuringVisitor, context);
+ else if (ts.isImportCall(node)) {
+ return visitImportCallExpression(node);
+ }
+ else if ((node.transformFlags & 2048) || (node.transformFlags & 67108864)) {
+ return ts.visitEachChild(node, destructuringAndImportCallVisitor, context);
}
else {
return node;
}
}
+ function visitImportCallExpression(node) {
+ return ts.createCall(ts.createPropertyAccess(contextObject, ts.createIdentifier("import")), undefined, node.arguments);
+ }
function visitDestructuringAssignment(node) {
if (hasExportedReferenceInDestructuringTarget(node.left)) {
- return ts.flattenDestructuringAssignment(node, destructuringVisitor, context, 0, true);
+ return ts.flattenDestructuringAssignment(node, destructuringAndImportCallVisitor, context, 0, true);
}
- return ts.visitEachChild(node, destructuringVisitor, context);
+ return ts.visitEachChild(node, destructuringAndImportCallVisitor, context);
}
function hasExportedReferenceInDestructuringTarget(node) {
if (ts.isAssignmentExpression(node, true)) {
return hasExportedReferenceInDestructuringTarget(node.left);
}
- else if (ts.isSpreadExpression(node)) {
+ else if (ts.isSpreadElement(node)) {
return hasExportedReferenceInDestructuringTarget(node.expression);
}
else if (ts.isObjectLiteralExpression(node)) {
@@ -49689,7 +51567,7 @@ var ts;
var currentSourceFile;
return transformSourceFile;
function transformSourceFile(node) {
- if (ts.isDeclarationFile(node)) {
+ if (node.isDeclarationFile) {
return node;
}
if (ts.isExternalModule(node) || compilerOptions.isolatedModules) {
@@ -49752,6 +51630,7 @@ var ts;
(function (ts) {
function getModuleTransformer(moduleKind) {
switch (moduleKind) {
+ case ts.ModuleKind.ESNext:
case ts.ModuleKind.ES2015:
return ts.transformES2015Module;
case ts.ModuleKind.System:
@@ -49804,7 +51683,7 @@ var ts;
}
ts.getTransformers = getTransformers;
function transformNodes(resolver, host, options, nodes, transformers, allowDtsFiles) {
- var enabledSyntaxKindFeatures = new Array(299);
+ var enabledSyntaxKindFeatures = new Array(301);
var lexicalEnvironmentVariableDeclarations;
var lexicalEnvironmentFunctionDeclarations;
var lexicalEnvironmentVariableDeclarationsStack = [];
@@ -49862,7 +51741,7 @@ var ts;
dispose: dispose
};
function transformRoot(node) {
- return node && (!ts.isSourceFile(node) || !ts.isDeclarationFile(node)) ? transformation(node) : node;
+ return node && (!ts.isSourceFile(node) || !node.isDeclarationFile) ? transformation(node) : node;
}
function enableSubstitution(kind) {
ts.Debug.assert(state < 2, "Cannot modify the transformation context after transformation has completed.");
@@ -49898,7 +51777,7 @@ var ts;
function hoistVariableDeclaration(name) {
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);
+ var decl = ts.setEmitFlags(ts.createVariableDeclaration(name), 64);
if (!lexicalEnvironmentVariableDeclarations) {
lexicalEnvironmentVariableDeclarations = [decl];
}
@@ -50032,7 +51911,7 @@ var ts;
var errorNameNode;
var emitJsDocComments = compilerOptions.removeComments ? ts.noop : writeJsDocComments;
var emit = compilerOptions.stripInternal ? stripInternal : emitNode;
- var noDeclare;
+ var needsDeclare = true;
var moduleElementDeclarationEmitInfo = [];
var asynchronousSubModuleDeclarationEmitInfo;
var referencesOutput = "";
@@ -50057,11 +51936,11 @@ var ts;
}
resultHasExternalModuleIndicator = false;
if (!isBundledEmit || !ts.isExternalModule(sourceFile)) {
- noDeclare = false;
+ needsDeclare = true;
emitSourceFile(sourceFile);
}
else if (ts.isExternalModule(sourceFile)) {
- noDeclare = true;
+ needsDeclare = false;
write("declare module \"" + ts.getResolvedExternalModuleName(host, sourceFile) + "\" {");
writeLine();
increaseIndent();
@@ -50124,7 +52003,7 @@ var ts;
var writer = ts.createTextWriter(newLine);
writer.trackSymbol = trackSymbol;
writer.reportInaccessibleThisError = reportInaccessibleThisError;
- writer.reportIllegalExtends = reportIllegalExtends;
+ writer.reportPrivateInBaseOfClassExpression = reportPrivateInBaseOfClassExpression;
writer.writeKeyword = writer.write;
writer.writeOperator = writer.write;
writer.writePunctuation = writer.write;
@@ -50221,10 +52100,10 @@ var ts;
handleSymbolAccessibilityError(resolver.isSymbolAccessible(symbol, enclosingDeclaration, meaning, true));
recordTypeReferenceDirectivesIfNecessary(resolver.getTypeReferenceDirectivesForSymbol(symbol, meaning));
}
- function reportIllegalExtends() {
+ function reportPrivateInBaseOfClassExpression(propertyName) {
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)));
+ emitterDiagnostics.add(ts.createDiagnosticForNode(errorNameNode, ts.Diagnostics.Property_0_of_exported_class_expression_may_not_be_private_or_protected, propertyName));
}
}
function reportInaccessibleThisError() {
@@ -50237,14 +52116,17 @@ var ts;
writer.getSymbolAccessibilityDiagnostic = getSymbolAccessibilityDiagnostic;
write(": ");
var shouldUseResolverType = declaration.kind === 146 &&
- resolver.isRequiredInitializedParameter(declaration);
+ (resolver.isRequiredInitializedParameter(declaration) ||
+ resolver.isOptionalUninitializedParameterProperty(declaration));
if (type && !shouldUseResolverType) {
emitType(type);
}
else {
errorNameNode = declaration.name;
- var format = 2 | 1024 |
- (shouldUseResolverType ? 4096 : 0);
+ var format = 4 |
+ 16384 |
+ 2048 |
+ (shouldUseResolverType ? 8192 : 0);
resolver.writeTypeOfDeclaration(declaration, enclosingDeclaration, format, writer);
errorNameNode = undefined;
}
@@ -50257,7 +52139,7 @@ var ts;
}
else {
errorNameNode = signature.name;
- resolver.writeReturnTypeOfSignatureDeclaration(signature, enclosingDeclaration, 2 | 1024, writer);
+ resolver.writeReturnTypeOfSignatureDeclaration(signature, enclosingDeclaration, 4 | 2048 | 16384, writer);
errorNameNode = undefined;
}
}
@@ -50465,8 +52347,7 @@ var ts;
ts.emitDetachedComments(currentText, currentLineMap, writer, ts.writeCommentRange, node, newLine, true);
emitLines(node.statements);
}
- function getExportDefaultTempVariableName() {
- var baseName = "_default";
+ function getExportTempVariableName(baseName) {
if (!currentIdentifiers.has(baseName)) {
return baseName;
}
@@ -50479,23 +52360,30 @@ var ts;
}
}
}
+ function emitTempVariableDeclaration(expr, baseName, diagnostic, needsDeclare) {
+ var tempVarName = getExportTempVariableName(baseName);
+ if (needsDeclare) {
+ write("declare ");
+ }
+ write("const ");
+ write(tempVarName);
+ write(": ");
+ writer.getSymbolAccessibilityDiagnostic = function () { return diagnostic; };
+ resolver.writeTypeOfExpression(expr, enclosingDeclaration, 4 | 2048 | 16384, writer);
+ write(";");
+ writeLine();
+ return tempVarName;
+ }
function emitExportAssignment(node) {
if (node.expression.kind === 71) {
write(node.isExportEquals ? "export = " : "export default ");
writeTextOfNode(currentText, node.expression);
}
else {
- var tempVarName = getExportDefaultTempVariableName();
- if (!noDeclare) {
- write("declare ");
- }
- write("var ");
- write(tempVarName);
- write(": ");
- writer.getSymbolAccessibilityDiagnostic = getDefaultExportAccessibilityDiagnostic;
- resolver.writeTypeOfExpression(node.expression, enclosingDeclaration, 2 | 1024, writer);
- write(";");
- writeLine();
+ var tempVarName = emitTempVariableDeclaration(node.expression, "_default", {
+ diagnosticMessage: ts.Diagnostics.Default_export_of_the_module_has_or_is_using_private_name_0,
+ errorNode: node
+ }, needsDeclare);
write(node.isExportEquals ? "export = " : "export default ");
write(tempVarName);
}
@@ -50505,12 +52393,6 @@ var ts;
var nodes = resolver.collectLinkedAliases(node.expression);
writeAsynchronousModuleElements(nodes);
}
- function getDefaultExportAccessibilityDiagnostic() {
- return {
- diagnosticMessage: ts.Diagnostics.Default_export_of_the_module_has_or_is_using_private_name_0,
- errorNode: node
- };
- }
}
function isModuleElementVisible(node) {
return resolver.isDeclarationVisible(node);
@@ -50580,7 +52462,7 @@ var ts;
if (modifiers & 512) {
write("default ");
}
- else if (node.kind !== 230 && !noDeclare) {
+ else if (node.kind !== 230 && needsDeclare) {
write("declare ");
}
}
@@ -50808,7 +52690,7 @@ var ts;
var enumMemberValue = resolver.getConstantValue(node);
if (enumMemberValue !== undefined) {
write(" = ");
- write(enumMemberValue.toString());
+ write(ts.getTextOfConstantValue(enumMemberValue));
}
write(",");
writeLine();
@@ -50905,7 +52787,7 @@ var ts;
write(">");
}
}
- function emitHeritageClause(className, typeReferences, isImplementsList) {
+ function emitHeritageClause(typeReferences, isImplementsList) {
if (typeReferences) {
write(isImplementsList ? " implements " : " extends ");
emitCommaList(typeReferences, emitTypeOfTypeReference);
@@ -50917,12 +52799,6 @@ var ts;
else if (!isImplementsList && node.expression.kind === 95) {
write("null");
}
- else {
- writer.getSymbolAccessibilityDiagnostic = getHeritageClauseVisibilityError;
- errorNameNode = className;
- resolver.writeBaseConstructorTypeOfClass(enclosingDeclaration, enclosingDeclaration, 2 | 1024, writer);
- errorNameNode = undefined;
- }
function getHeritageClauseVisibilityError() {
var diagnosticMessage;
if (node.parent.parent.kind === 229) {
@@ -50936,7 +52812,7 @@ var ts;
return {
diagnosticMessage: diagnosticMessage,
errorNode: node,
- typeName: node.parent.parent.name
+ typeName: ts.getNameOfDeclaration(node.parent.parent)
};
}
}
@@ -50951,6 +52827,19 @@ var ts;
});
}
}
+ var prevEnclosingDeclaration = enclosingDeclaration;
+ enclosingDeclaration = node;
+ var baseTypeNode = ts.getClassExtendsHeritageClauseElement(node);
+ var tempVarName;
+ if (baseTypeNode && !ts.isEntityNameExpression(baseTypeNode.expression)) {
+ tempVarName = baseTypeNode.expression.kind === 95 ?
+ "null" :
+ emitTempVariableDeclaration(baseTypeNode.expression, node.name.text + "_base", {
+ diagnosticMessage: ts.Diagnostics.extends_clause_of_exported_class_0_has_or_is_using_private_name_1,
+ errorNode: baseTypeNode,
+ typeName: node.name
+ }, !ts.findAncestor(node, function (n) { return n.kind === 233; }));
+ }
emitJsDocComments(node);
emitModuleElementDeclarationFlags(node);
if (ts.hasModifier(node, 128)) {
@@ -50958,15 +52847,22 @@ var ts;
}
write("class ");
writeTextOfNode(currentText, node.name);
- var prevEnclosingDeclaration = enclosingDeclaration;
- enclosingDeclaration = node;
emitTypeParameters(node.typeParameters);
- var baseTypeNode = ts.getClassExtendsHeritageClauseElement(node);
if (baseTypeNode) {
- node.name;
- emitHeritageClause(node.name, [baseTypeNode], false);
+ if (!ts.isEntityNameExpression(baseTypeNode.expression)) {
+ write(" extends ");
+ write(tempVarName);
+ if (baseTypeNode.typeArguments) {
+ write("<");
+ emitCommaList(baseTypeNode.typeArguments, emitType);
+ write(">");
+ }
+ }
+ else {
+ emitHeritageClause([baseTypeNode], false);
+ }
}
- emitHeritageClause(node.name, ts.getClassImplementsHeritageClauseElements(node), true);
+ emitHeritageClause(ts.getClassImplementsHeritageClauseElements(node), true);
write(" {");
writeLine();
increaseIndent();
@@ -50987,7 +52883,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(node.name, interfaceExtendsTypes, false);
+ emitHeritageClause(interfaceExtendsTypes, false);
}
write(" {");
writeLine();
@@ -51039,7 +52935,8 @@ var ts;
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 === 149 || node.kind === 148) {
+ else if (node.kind === 149 || node.kind === 148 ||
+ (node.kind === 146 && ts.hasModifier(node.parent, 8))) {
if (ts.hasModifier(node, 32)) {
return symbolAccessibilityResult.errorModuleName ?
symbolAccessibilityResult.accessibility === 2 ?
@@ -51047,7 +52944,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 === 229) {
+ else if (node.parent.kind === 229 || node.kind === 146) {
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 :
@@ -51242,6 +53139,11 @@ var ts;
write("[");
}
else {
+ if (node.kind === 152 && ts.hasModifier(node, 8)) {
+ write("();");
+ writeLine();
+ return;
+ }
if (node.kind === 156 || node.kind === 161) {
write("new ");
}
@@ -51500,7 +53402,7 @@ var ts;
function writeReferencePath(referencedFile, addBundledFileReference, emitOnlyDtsFiles) {
var declFileName;
var addedBundledEmitReference = false;
- if (ts.isDeclarationFile(referencedFile)) {
+ if (referencedFile.isDeclarationFile) {
declFileName = referencedFile.fileName;
}
else {
@@ -51560,7 +53462,7 @@ var ts;
function createSourceMapWriter(host, writer) {
var compilerOptions = host.getCompilerOptions();
var extendedDiagnostics = compilerOptions.extendedDiagnostics;
- var currentSourceFile;
+ var currentSource;
var currentSourceText;
var sourceMapDir;
var sourceMapSourceIndex;
@@ -51580,6 +53482,9 @@ var ts;
getText: getText,
getSourceMappingURL: getSourceMappingURL,
};
+ function skipSourceTrivia(pos) {
+ return currentSource.skipTrivia ? currentSource.skipTrivia(pos) : ts.skipTrivia(currentSourceText, pos);
+ }
function initialize(filePath, sourceMapFilePath, sourceFileOrBundle) {
if (disabled) {
return;
@@ -51587,7 +53492,7 @@ var ts;
if (sourceMapData) {
reset();
}
- currentSourceFile = undefined;
+ currentSource = undefined;
currentSourceText = undefined;
sourceMapSourceIndex = -1;
lastRecordedSourceMapSpan = undefined;
@@ -51630,7 +53535,7 @@ var ts;
if (disabled) {
return;
}
- currentSourceFile = undefined;
+ currentSource = undefined;
sourceMapDir = undefined;
sourceMapSourceIndex = undefined;
lastRecordedSourceMapSpan = undefined;
@@ -51673,7 +53578,7 @@ var ts;
if (extendedDiagnostics) {
ts.performance.mark("beforeSourcemap");
}
- var sourceLinePos = ts.getLineAndCharacterOfPosition(currentSourceFile, pos);
+ var sourceLinePos = ts.getLineAndCharacterOfPosition(currentSource, pos);
sourceLinePos.line++;
sourceLinePos.character++;
var emittedLine = writer.getLine();
@@ -51710,12 +53615,21 @@ var ts;
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 !== 295
+ var range = emitNode && emitNode.sourceMapRange;
+ var _a = range || node, pos = _a.pos, end = _a.end;
+ var source = range && range.source;
+ var oldSource = currentSource;
+ if (source === oldSource)
+ source = undefined;
+ if (source)
+ setSourceFile(source);
+ if (node.kind !== 296
&& (emitFlags & 16) === 0
&& pos >= 0) {
- emitPos(ts.skipTrivia(currentSourceText, pos));
+ emitPos(skipSourceTrivia(pos));
}
+ if (source)
+ setSourceFile(oldSource);
if (emitFlags & 64) {
disabled = true;
emitCallback(hint, node);
@@ -51724,11 +53638,15 @@ var ts;
else {
emitCallback(hint, node);
}
- if (node.kind !== 295
+ if (source)
+ setSourceFile(source);
+ if (node.kind !== 296
&& (emitFlags & 32) === 0
&& end >= 0) {
emitPos(end);
}
+ if (source)
+ setSourceFile(oldSource);
}
}
function emitTokenWithSourceMap(node, token, tokenPos, emitCallback) {
@@ -51738,7 +53656,7 @@ var ts;
var emitNode = node && node.emitNode;
var emitFlags = emitNode && emitNode.flags;
var range = emitNode && emitNode.tokenSourceMapRanges && emitNode.tokenSourceMapRanges[token];
- tokenPos = ts.skipTrivia(currentSourceText, range ? range.pos : tokenPos);
+ tokenPos = skipSourceTrivia(range ? range.pos : tokenPos);
if ((emitFlags & 128) === 0 && tokenPos >= 0) {
emitPos(tokenPos);
}
@@ -51754,17 +53672,17 @@ var ts;
if (disabled) {
return;
}
- currentSourceFile = sourceFile;
- currentSourceText = currentSourceFile.text;
+ currentSource = sourceFile;
+ currentSourceText = currentSource.text;
var sourcesDirectoryPath = compilerOptions.sourceRoot ? host.getCommonSourceDirectory() : sourceMapDir;
- var source = ts.getRelativePathToDirectoryOrUrl(sourcesDirectoryPath, currentSourceFile.fileName, host.getCurrentDirectory(), host.getCanonicalFileName, true);
+ var source = ts.getRelativePathToDirectoryOrUrl(sourcesDirectoryPath, currentSource.fileName, host.getCurrentDirectory(), host.getCanonicalFileName, true);
sourceMapSourceIndex = ts.indexOf(sourceMapData.sourceMapSources, source);
if (sourceMapSourceIndex === -1) {
sourceMapSourceIndex = sourceMapData.sourceMapSources.length;
sourceMapData.sourceMapSources.push(source);
- sourceMapData.inputSourceFileNames.push(currentSourceFile.fileName);
+ sourceMapData.inputSourceFileNames.push(currentSource.fileName);
if (compilerOptions.inlineSources) {
- sourceMapData.sourceMapSourcesContent.push(currentSourceFile.text);
+ sourceMapData.sourceMapSourcesContent.push(currentSource.text);
}
}
}
@@ -51864,9 +53782,9 @@ var ts;
if (extendedDiagnostics) {
ts.performance.mark("preEmitNodeWithComment");
}
- var isEmittedNode = node.kind !== 295;
- var skipLeadingComments = pos < 0 || (emitFlags & 512) !== 0;
- var skipTrailingComments = end < 0 || (emitFlags & 1024) !== 0;
+ var isEmittedNode = node.kind !== 296;
+ var skipLeadingComments = pos < 0 || (emitFlags & 512) !== 0 || node.kind === 10;
+ var skipTrailingComments = end < 0 || (emitFlags & 1024) !== 0 || node.kind === 10;
if (!skipLeadingComments) {
emitLeadingComments(pos, isEmittedNode);
}
@@ -52263,7 +54181,7 @@ var ts;
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 shouldSkip = compilerOptions.noEmitHelpers || ts.getExternalHelpersModuleName(sourceFile) !== undefined;
var shouldBundle = ts.isSourceFile(currentNode) && !isOwnFileEmit;
var helpers = ts.getEmitHelpers(currentNode);
if (helpers) {
@@ -52294,7 +54212,7 @@ var ts;
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 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, onBeforeEmitToken = handlers.onBeforeEmitToken, onAfterEmitToken = handlers.onAfterEmitToken;
var newLine = ts.getNewLineCharacter(printerOptions);
var comments = ts.createCommentWriter(printerOptions, onEmitSourceMapOfPosition);
var emitNodeWithComments = comments.emitNodeWithComments, emitBodyWithDetachedComments = comments.emitBodyWithDetachedComments, emitTrailingCommentsOfPosition = comments.emitTrailingCommentsOfPosition, emitLeadingCommentsOfPosition = comments.emitLeadingCommentsOfPosition;
@@ -52380,7 +54298,9 @@ var ts;
return text;
}
function print(hint, node, sourceFile) {
- setSourceFile(sourceFile);
+ if (sourceFile) {
+ setSourceFile(sourceFile);
+ }
pipelineEmitWithNotification(hint, node);
}
function setSourceFile(sourceFile) {
@@ -52456,7 +54376,7 @@ var ts;
function pipelineEmitUnspecified(node) {
var kind = node.kind;
if (ts.isKeyword(kind)) {
- writeTokenText(kind);
+ writeTokenNode(node);
return;
}
switch (kind) {
@@ -52597,6 +54517,8 @@ var ts;
return emitModuleBlock(node);
case 235:
return emitCaseBlock(node);
+ case 236:
+ return emitNamespaceExportDeclaration(node);
case 237:
return emitImportEqualsDeclaration(node);
case 238:
@@ -52656,7 +54578,7 @@ var ts;
return pipelineEmitExpression(trySubstituteNode(1, node));
}
if (ts.isToken(node)) {
- writeTokenText(kind);
+ writeTokenNode(node);
return;
}
}
@@ -52676,7 +54598,8 @@ var ts;
case 97:
case 101:
case 99:
- writeTokenText(kind);
+ case 91:
+ writeTokenNode(node);
return;
case 177:
return emitArrayLiteralExpression(node);
@@ -52736,8 +54659,10 @@ var ts;
return emitJsxElement(node);
case 250:
return emitJsxSelfClosingElement(node);
- case 296:
+ case 297:
return emitPartiallyEmittedExpression(node);
+ case 298:
+ return emitCommaList(node);
}
}
function trySubstituteNode(hint, node) {
@@ -52763,6 +54688,7 @@ var ts;
}
function emitIdentifier(node) {
write(getTextOfNode(node, false));
+ emitTypeArguments(node, node.typeArguments);
}
function emitQualifiedName(node) {
emitEntityName(node.left);
@@ -52785,6 +54711,7 @@ var ts;
function emitTypeParameter(node) {
emit(node.name);
emitWithPrefix(" extends ", node.constraint);
+ emitWithPrefix(" = ", node.default);
}
function emitParameter(node) {
emitDecorators(node, node.decorators);
@@ -52811,6 +54738,7 @@ var ts;
emitDecorators(node, node.decorators);
emitModifiers(node, node.modifiers);
emit(node.name);
+ writeIfPresent(node.questionToken, "?");
emitWithPrefix(": ", node.type);
emitExpressionWithPrefix(" = ", node.initializer);
write(";");
@@ -52830,6 +54758,7 @@ var ts;
emitModifiers(node, node.modifiers);
writeIfPresent(node.asteriskToken, "*");
emit(node.name);
+ writeIfPresent(node.questionToken, "?");
emitSignatureAndBody(node, emitSignatureHead);
}
function emitConstructor(node) {
@@ -52889,7 +54818,7 @@ var ts;
function emitConstructorType(node) {
write("new ");
emitTypeParameters(node, node.typeParameters);
- emitParametersForArrow(node, node.parameters);
+ emitParameters(node, node.parameters);
write(" => ");
emit(node.type);
}
@@ -52899,7 +54828,9 @@ var ts;
}
function emitTypeLiteral(node) {
write("{");
- emitList(node, node.members, 65);
+ if (node.members.length > 0) {
+ emitList(node, node.members, ts.getEmitFlags(node) & 1 ? 448 : 65);
+ }
write("}");
}
function emitArrayType(node) {
@@ -52937,9 +54868,15 @@ var ts;
write("]");
}
function emitMappedType(node) {
+ var emitFlags = ts.getEmitFlags(node);
write("{");
- writeLine();
- increaseIndent();
+ if (emitFlags & 1) {
+ write(" ");
+ }
+ else {
+ writeLine();
+ increaseIndent();
+ }
writeIfPresent(node.readonlyToken, "readonly ");
write("[");
emit(node.typeParameter.name);
@@ -52950,8 +54887,13 @@ var ts;
write(": ");
emit(node.type);
write(";");
- writeLine();
- decreaseIndent();
+ if (emitFlags & 1) {
+ write(" ");
+ }
+ else {
+ writeLine();
+ decreaseIndent();
+ }
write("}");
}
function emitLiteralType(node) {
@@ -53001,7 +54943,7 @@ var ts;
write("{}");
}
else {
- var indentedFlag = ts.getEmitFlags(node) & 32768;
+ var indentedFlag = ts.getEmitFlags(node) & 65536;
if (indentedFlag) {
increaseIndent();
}
@@ -53016,7 +54958,7 @@ var ts;
function emitPropertyAccessExpression(node) {
var indentBeforeDot = false;
var indentAfterDot = false;
- if (!(ts.getEmitFlags(node) & 65536)) {
+ if (!(ts.getEmitFlags(node) & 131072)) {
var dotRangeStart = node.expression.end;
var dotRangeEnd = ts.skipTrivia(currentSourceFile.text, node.expression.end) + 1;
var dotToken = { kind: 23, pos: dotRangeStart, end: dotRangeEnd };
@@ -53040,7 +54982,7 @@ var ts;
}
else if (ts.isPropertyAccessExpression(expression) || ts.isElementAccessExpression(expression)) {
var constantValue = ts.getConstantValue(expression);
- return isFinite(constantValue)
+ return typeof constantValue === "number" && isFinite(constantValue)
&& Math.floor(constantValue) === constantValue
&& printerOptions.removeComments;
}
@@ -53131,7 +55073,7 @@ var ts;
var indentAfterOperator = needsIndentation(node, node.operatorToken, node.right);
emitExpression(node.left);
increaseIndentIf(indentBeforeOperator, isCommaOperator ? " " : undefined);
- writeTokenText(node.operatorToken.kind);
+ writeTokenNode(node.operatorToken);
increaseIndentIf(indentAfterOperator, " ");
emitExpression(node.right);
decreaseIndentIf(indentBeforeOperator, indentAfterOperator);
@@ -53391,11 +55333,11 @@ var ts;
var body = node.body;
if (body) {
if (ts.isBlock(body)) {
- var indentedFlag = ts.getEmitFlags(node) & 32768;
+ var indentedFlag = ts.getEmitFlags(node) & 65536;
if (indentedFlag) {
increaseIndent();
}
- if (ts.getEmitFlags(node) & 262144) {
+ if (ts.getEmitFlags(node) & 524288) {
emitSignatureHead(node);
if (onEmitNode) {
onEmitNode(3, body, emitBlockCallback);
@@ -53498,7 +55440,7 @@ var ts;
emitModifiers(node, node.modifiers);
write("class");
emitNodeWithPrefix(" ", node.name, emitIdentifierName);
- var indentedFlag = ts.getEmitFlags(node) & 32768;
+ var indentedFlag = ts.getEmitFlags(node) & 65536;
if (indentedFlag) {
increaseIndent();
}
@@ -53636,6 +55578,11 @@ var ts;
}
write(";");
}
+ function emitNamespaceExportDeclaration(node) {
+ write("export as namespace ");
+ emit(node.name);
+ write(";");
+ }
function emitNamedExports(node) {
emitNamedImportsOrExports(node);
}
@@ -53735,6 +55682,9 @@ var ts;
(ts.nodeIsSynthesized(parentNode) ||
ts.nodeIsSynthesized(statements[0]) ||
ts.rangeStartPositionsAreOnSameLine(parentNode, statements[0], currentSourceFile));
+ if (statements.length > 0) {
+ emitTrailingCommentsOfPosition(statements.pos);
+ }
if (emitAsSingleStatement) {
write(" ");
emit(statements[0]);
@@ -53810,6 +55760,9 @@ var ts;
function emitPartiallyEmittedExpression(node) {
emitExpression(node.expression);
}
+ function emitCommaList(node) {
+ emitExpressionList(node, node.elements, 272);
+ }
function emitPrologueDirectives(statements, startWithNewLine, seenPrologueDirectives) {
for (var i = 0; i < statements.length; i++) {
var statement = statements[i];
@@ -53865,7 +55818,7 @@ var ts;
}
function emitModifiers(node, modifiers) {
if (modifiers && modifiers.length) {
- emitList(node, modifiers, 256);
+ emitList(node, modifiers, 131328);
write(" ");
}
}
@@ -53911,11 +55864,24 @@ var ts;
function emitParameters(parentNode, parameters) {
emitList(parentNode, parameters, 1360);
}
+ function canEmitSimpleArrowHead(parentNode, parameters) {
+ var parameter = ts.singleOrUndefined(parameters);
+ return parameter
+ && parameter.pos === parentNode.pos
+ && !(ts.isArrowFunction(parentNode) && parentNode.type)
+ && !ts.some(parentNode.decorators)
+ && !ts.some(parentNode.modifiers)
+ && !ts.some(parentNode.typeParameters)
+ && !ts.some(parameter.decorators)
+ && !ts.some(parameter.modifiers)
+ && !parameter.dotDotDotToken
+ && !parameter.questionToken
+ && !parameter.type
+ && !parameter.initializer
+ && ts.isIdentifier(parameter.name);
+ }
function emitParametersForArrow(parentNode, parameters) {
- if (parameters &&
- parameters.length === 1 &&
- parameters[0].type === undefined &&
- parameters[0].pos === parentNode.pos) {
+ if (canEmitSimpleArrowHead(parentNode, parameters)) {
emit(parameters[0]);
}
else {
@@ -54058,6 +56024,15 @@ var ts;
? onEmitSourceMapOfToken(contextNode, token, pos, writeTokenText)
: writeTokenText(token, pos);
}
+ function writeTokenNode(node) {
+ if (onBeforeEmitToken) {
+ onBeforeEmitToken(node);
+ }
+ writeTokenText(node.kind);
+ if (onAfterEmitToken) {
+ onAfterEmitToken(node);
+ }
+ }
function writeTokenText(token, pos) {
var tokenString = ts.tokenToString(token);
write(tokenString);
@@ -54235,7 +56210,9 @@ var ts;
if (node.kind === 9 && node.textSourceNode) {
var textSourceNode = node.textSourceNode;
if (ts.isIdentifier(textSourceNode)) {
- return "\"" + ts.escapeNonAsciiCharacters(ts.escapeString(getTextOfNode(textSourceNode))) + "\"";
+ return ts.getEmitFlags(node) & 16777216 ?
+ "\"" + ts.escapeString(getTextOfNode(textSourceNode)) + "\"" :
+ "\"" + ts.escapeNonAsciiString(getTextOfNode(textSourceNode)) + "\"";
}
else {
return getLiteralTextOfNode(textSourceNode);
@@ -54447,9 +56424,10 @@ var ts;
ListFormat[ListFormat["PreferNewLine"] = 32768] = "PreferNewLine";
ListFormat[ListFormat["NoTrailingNewLine"] = 65536] = "NoTrailingNewLine";
ListFormat[ListFormat["NoInterveningComments"] = 131072] = "NoInterveningComments";
- ListFormat[ListFormat["Modifiers"] = 256] = "Modifiers";
+ ListFormat[ListFormat["Modifiers"] = 131328] = "Modifiers";
ListFormat[ListFormat["HeritageClauses"] = 256] = "HeritageClauses";
- ListFormat[ListFormat["TypeLiteralMembers"] = 65] = "TypeLiteralMembers";
+ ListFormat[ListFormat["SingleLineTypeLiteralMembers"] = 448] = "SingleLineTypeLiteralMembers";
+ ListFormat[ListFormat["MultiLineTypeLiteralMembers"] = 65] = "MultiLineTypeLiteralMembers";
ListFormat[ListFormat["TupleTypeElements"] = 336] = "TupleTypeElements";
ListFormat[ListFormat["UnionTypeConstituents"] = 260] = "UnionTypeConstituents";
ListFormat[ListFormat["IntersectionTypeConstituents"] = 264] = "IntersectionTypeConstituents";
@@ -54457,6 +56435,7 @@ var ts;
ListFormat[ListFormat["ArrayBindingPatternElements"] = 304] = "ArrayBindingPatternElements";
ListFormat[ListFormat["ObjectLiteralExpressionProperties"] = 978] = "ObjectLiteralExpressionProperties";
ListFormat[ListFormat["ArrayLiteralExpressionElements"] = 4466] = "ArrayLiteralExpressionElements";
+ ListFormat[ListFormat["CommaListElements"] = 272] = "CommaListElements";
ListFormat[ListFormat["CallExpressionArguments"] = 1296] = "CallExpressionArguments";
ListFormat[ListFormat["NewExpressionArguments"] = 9488] = "NewExpressionArguments";
ListFormat[ListFormat["TemplateExpressionSpans"] = 131072] = "TemplateExpressionSpans";
@@ -54670,6 +56649,83 @@ var ts;
return output;
}
ts.formatDiagnostics = formatDiagnostics;
+ var redForegroundEscapeSequence = "\u001b[91m";
+ var yellowForegroundEscapeSequence = "\u001b[93m";
+ var blueForegroundEscapeSequence = "\u001b[93m";
+ var gutterStyleSequence = "\u001b[100;30m";
+ var gutterSeparator = " ";
+ var resetEscapeSequence = "\u001b[0m";
+ var ellipsis = "...";
+ 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 padLeft(s, length) {
+ while (s.length < length) {
+ s = " " + s;
+ }
+ return s;
+ }
+ function formatDiagnosticsWithColorAndContext(diagnostics, host) {
+ var output = "";
+ for (var _i = 0, diagnostics_2 = diagnostics; _i < diagnostics_2.length; _i++) {
+ var diagnostic = diagnostics_2[_i];
+ if (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_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;
+ var gutterWidth = (lastLine + 1 + "").length;
+ if (hasMoreThanFiveLines) {
+ gutterWidth = Math.max(ellipsis.length, gutterWidth);
+ }
+ output += ts.sys.newLine;
+ for (var i = firstLine; i <= lastLine; i++) {
+ if (hasMoreThanFiveLines && firstLine + 1 < i && i < lastLine - 1) {
+ output += formatAndReset(padLeft(ellipsis, gutterWidth), gutterStyleSequence) + gutterSeparator + ts.sys.newLine;
+ i = lastLine - 1;
+ }
+ var lineStart = ts.getPositionOfLineAndCharacter(file, i, 0);
+ var lineEnd = i < lastLineInFile ? ts.getPositionOfLineAndCharacter(file, i + 1, 0) : file.text.length;
+ var lineContent = file.text.slice(lineStart, lineEnd);
+ lineContent = lineContent.replace(/\s+$/g, "");
+ lineContent = lineContent.replace("\t", " ");
+ output += formatAndReset(padLeft(i + 1 + "", gutterWidth), gutterStyleSequence) + gutterSeparator;
+ output += lineContent + ts.sys.newLine;
+ output += formatAndReset(padLeft("", gutterWidth), gutterStyleSequence) + gutterSeparator;
+ output += redForegroundEscapeSequence;
+ if (i === firstLine) {
+ var lastCharForLine = i === lastLine ? lastLineChar : undefined;
+ output += lineContent.slice(0, firstLineChar).replace(/\S/g, " ");
+ output += lineContent.slice(firstLineChar, lastCharForLine).replace(/./g, "~");
+ }
+ else if (i === lastLine) {
+ output += lineContent.slice(0, lastLineChar).replace(/./g, "~");
+ }
+ else {
+ output += lineContent.replace(/./g, "~");
+ }
+ output += resetEscapeSequence;
+ output += ts.sys.newLine;
+ }
+ output += ts.sys.newLine;
+ output += relativeFileName + "(" + (firstLine + 1) + "," + (firstLineChar + 1) + "): ";
+ }
+ var categoryColor = getCategoryFormat(diagnostic.category);
+ var category = ts.DiagnosticCategory[diagnostic.category].toLowerCase();
+ output += formatAndReset(category, categoryColor) + " TS" + diagnostic.code + ": " + flattenDiagnosticMessageText(diagnostic.messageText, ts.sys.newLine);
+ }
+ return output;
+ }
+ ts.formatDiagnosticsWithColorAndContext = formatDiagnosticsWithColorAndContext;
function flattenDiagnosticMessageText(messageText, newLine) {
if (typeof messageText === "string") {
return messageText;
@@ -54719,6 +56775,7 @@ var ts;
var diagnosticsProducingTypeChecker;
var noDiagnosticsTypeChecker;
var classifiableNames;
+ var modifiedFilePaths;
var cachedSemanticDiagnosticsForFile = {};
var cachedDeclarationDiagnosticsForFile = {};
var resolvedTypeReferenceDirectives = ts.createMap();
@@ -54761,7 +56818,8 @@ var ts;
}
var filesByName = ts.createFileMap();
var filesByNameIgnoreCase = host.useCaseSensitiveFileNames() ? ts.createFileMap(function (fileName) { return fileName.toLowerCase(); }) : undefined;
- if (!tryReuseStructureFromOldProgram()) {
+ var structuralIsReused = tryReuseStructureFromOldProgram();
+ if (structuralIsReused !== 2) {
ts.forEach(rootNames, function (name) { return processRootFile(name, false); });
var typeReferences = ts.getAutomaticTypeDirectiveNames(options, host);
if (typeReferences.length) {
@@ -54810,7 +56868,8 @@ var ts;
getFileProcessingDiagnostics: function () { return fileProcessingDiagnostics; },
getResolvedTypeReferenceDirectives: function () { return resolvedTypeReferenceDirectives; },
isSourceFileFromExternalLibrary: isSourceFileFromExternalLibrary,
- dropDiagnosticsProducingTypeChecker: dropDiagnosticsProducingTypeChecker
+ dropDiagnosticsProducingTypeChecker: dropDiagnosticsProducingTypeChecker,
+ getSourceFileFromReference: getSourceFileFromReference,
};
verifyCompilerOptions();
ts.performance.mark("afterProgram");
@@ -54843,45 +56902,64 @@ var ts;
return classifiableNames;
}
function resolveModuleNamesReusingOldState(moduleNames, containingFile, file, oldProgramState) {
- if (!oldProgramState && !file.ambientModuleNames.length) {
+ if (structuralIsReused === 0 && !file.ambientModuleNames.length) {
return resolveModuleNamesWorker(moduleNames, containingFile);
}
+ var oldSourceFile = oldProgramState.program && oldProgramState.program.getSourceFile(containingFile);
+ if (oldSourceFile !== file && file.resolvedModules) {
+ var result_4 = [];
+ for (var _i = 0, moduleNames_1 = moduleNames; _i < moduleNames_1.length; _i++) {
+ var moduleName = moduleNames_1[_i];
+ var resolvedModule = file.resolvedModules.get(moduleName);
+ result_4.push(resolvedModule);
+ }
+ return result_4;
+ }
var unknownModuleNames;
var result;
var predictedToResolveToAmbientModuleMarker = {};
for (var i = 0; i < moduleNames.length; i++) {
var moduleName = moduleNames[i];
- var isKnownToResolveToAmbientModule = false;
+ if (file === oldSourceFile) {
+ var oldResolvedModule = oldSourceFile && oldSourceFile.resolvedModules.get(moduleName);
+ if (oldResolvedModule) {
+ if (ts.isTraceEnabled(options, host)) {
+ ts.trace(host, ts.Diagnostics.Reusing_resolution_of_module_0_to_file_1_from_old_program, moduleName, containingFile);
+ }
+ (result || (result = new Array(moduleNames.length)))[i] = oldResolvedModule;
+ continue;
+ }
+ }
+ var resolvesToAmbientModuleInNonModifiedFile = false;
if (ts.contains(file.ambientModuleNames, moduleName)) {
- isKnownToResolveToAmbientModule = true;
+ resolvesToAmbientModuleInNonModifiedFile = true;
if (ts.isTraceEnabled(options, host)) {
ts.trace(host, ts.Diagnostics.Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1, moduleName, containingFile);
}
}
else {
- isKnownToResolveToAmbientModule = checkModuleNameResolvedToAmbientModuleInNonModifiedFile(moduleName, oldProgramState);
+ resolvesToAmbientModuleInNonModifiedFile = moduleNameResolvesToAmbientModuleInNonModifiedFile(moduleName, oldProgramState);
}
- if (isKnownToResolveToAmbientModule) {
- if (!unknownModuleNames) {
- result = new Array(moduleNames.length);
- unknownModuleNames = moduleNames.slice(0, i);
- }
- result[i] = predictedToResolveToAmbientModuleMarker;
+ if (resolvesToAmbientModuleInNonModifiedFile) {
+ (result || (result = new Array(moduleNames.length)))[i] = predictedToResolveToAmbientModuleMarker;
}
- else if (unknownModuleNames) {
- unknownModuleNames.push(moduleName);
+ else {
+ (unknownModuleNames || (unknownModuleNames = [])).push(moduleName);
}
}
- if (!unknownModuleNames) {
- return resolveModuleNamesWorker(moduleNames, containingFile);
- }
- var resolutions = unknownModuleNames.length
+ var resolutions = unknownModuleNames && unknownModuleNames.length
? resolveModuleNamesWorker(unknownModuleNames, containingFile)
: emptyArray;
+ if (!result) {
+ ts.Debug.assert(resolutions.length === moduleNames.length);
+ return resolutions;
+ }
var j = 0;
for (var i = 0; i < result.length; i++) {
- if (result[i] === predictedToResolveToAmbientModuleMarker) {
- result[i] = undefined;
+ if (result[i]) {
+ if (result[i] === predictedToResolveToAmbientModuleMarker) {
+ result[i] = undefined;
+ }
}
else {
result[i] = resolutions[j];
@@ -54890,15 +56968,12 @@ var ts;
}
ts.Debug.assert(j === resolutions.length);
return result;
- function checkModuleNameResolvedToAmbientModuleInNonModifiedFile(moduleName, oldProgramState) {
- if (!oldProgramState) {
- return false;
- }
+ function moduleNameResolvesToAmbientModuleInNonModifiedFile(moduleName, oldProgramState) {
var resolutionToFile = ts.getResolvedModule(oldProgramState.file, moduleName);
if (resolutionToFile) {
return false;
}
- var ambientModule = oldProgram.getTypeChecker().tryFindAmbientModuleWithoutAugmentations(moduleName);
+ var ambientModule = oldProgramState.program && oldProgramState.program.getTypeChecker().tryFindAmbientModuleWithoutAugmentations(moduleName);
if (!(ambientModule && ambientModule.declarations)) {
return false;
}
@@ -54917,67 +56992,76 @@ var ts;
}
function tryReuseStructureFromOldProgram() {
if (!oldProgram) {
- return false;
+ return 0;
}
var oldOptions = oldProgram.getCompilerOptions();
if (ts.changesAffectModuleResolution(oldOptions, options)) {
- return false;
+ return oldProgram.structureIsReused = 0;
}
- ts.Debug.assert(!oldProgram.structureIsReused);
+ ts.Debug.assert(!(oldProgram.structureIsReused & (2 | 1)));
var oldRootNames = oldProgram.getRootFileNames();
if (!ts.arrayIsEqualTo(oldRootNames, rootNames)) {
- return false;
+ return oldProgram.structureIsReused = 0;
}
if (!ts.arrayIsEqualTo(options.types, oldOptions.types)) {
- return false;
+ return oldProgram.structureIsReused = 0;
}
var newSourceFiles = [];
var filePaths = [];
var modifiedSourceFiles = [];
+ oldProgram.structureIsReused = 2;
for (var _i = 0, _a = oldProgram.getSourceFiles(); _i < _a.length; _i++) {
var oldSourceFile = _a[_i];
var newSourceFile = host.getSourceFileByPath
? host.getSourceFileByPath(oldSourceFile.fileName, oldSourceFile.path, options.target)
: host.getSourceFile(oldSourceFile.fileName, options.target);
if (!newSourceFile) {
- return false;
+ return oldProgram.structureIsReused = 0;
}
newSourceFile.path = oldSourceFile.path;
filePaths.push(newSourceFile.path);
if (oldSourceFile !== newSourceFile) {
if (oldSourceFile.hasNoDefaultLib !== newSourceFile.hasNoDefaultLib) {
- return false;
+ oldProgram.structureIsReused = 1;
}
if (!ts.arrayIsEqualTo(oldSourceFile.referencedFiles, newSourceFile.referencedFiles, fileReferenceIsEqualTo)) {
- return false;
+ oldProgram.structureIsReused = 1;
}
collectExternalModuleReferences(newSourceFile);
if (!ts.arrayIsEqualTo(oldSourceFile.imports, newSourceFile.imports, moduleNameIsEqualTo)) {
- return false;
+ oldProgram.structureIsReused = 1;
}
if (!ts.arrayIsEqualTo(oldSourceFile.moduleAugmentations, newSourceFile.moduleAugmentations, moduleNameIsEqualTo)) {
- return false;
+ oldProgram.structureIsReused = 1;
+ }
+ if ((oldSourceFile.flags & 524288) !== (newSourceFile.flags & 524288)) {
+ oldProgram.structureIsReused = 1;
}
if (!ts.arrayIsEqualTo(oldSourceFile.typeReferenceDirectives, newSourceFile.typeReferenceDirectives, fileReferenceIsEqualTo)) {
- return false;
+ oldProgram.structureIsReused = 1;
}
modifiedSourceFiles.push({ oldFile: oldSourceFile, newFile: newSourceFile });
}
- else {
- newSourceFile = oldSourceFile;
- }
newSourceFiles.push(newSourceFile);
}
- var modifiedFilePaths = modifiedSourceFiles.map(function (f) { return f.newFile.path; });
+ if (oldProgram.structureIsReused !== 2) {
+ return oldProgram.structureIsReused;
+ }
+ modifiedFilePaths = modifiedSourceFiles.map(function (f) { return f.newFile.path; });
for (var _b = 0, modifiedSourceFiles_1 = modifiedSourceFiles; _b < modifiedSourceFiles_1.length; _b++) {
var _c = modifiedSourceFiles_1[_b], oldSourceFile = _c.oldFile, newSourceFile = _c.newFile;
var newSourceFilePath = ts.getNormalizedAbsolutePath(newSourceFile.fileName, currentDirectory);
if (resolveModuleNamesWorker) {
var moduleNames = ts.map(ts.concatenate(newSourceFile.imports, newSourceFile.moduleAugmentations), getTextOfLiteral);
- var resolutions = resolveModuleNamesReusingOldState(moduleNames, newSourceFilePath, newSourceFile, { file: oldSourceFile, program: oldProgram, modifiedFilePaths: modifiedFilePaths });
+ var oldProgramState = { program: oldProgram, file: oldSourceFile, modifiedFilePaths: modifiedFilePaths };
+ var resolutions = resolveModuleNamesReusingOldState(moduleNames, newSourceFilePath, newSourceFile, oldProgramState);
var resolutionsChanged = ts.hasChangesInResolutions(moduleNames, resolutions, oldSourceFile.resolvedModules, ts.moduleResolutionIsEqualTo);
if (resolutionsChanged) {
- return false;
+ oldProgram.structureIsReused = 1;
+ newSourceFile.resolvedModules = ts.zipToMap(moduleNames, resolutions);
+ }
+ else {
+ newSourceFile.resolvedModules = oldSourceFile.resolvedModules;
}
}
if (resolveTypeReferenceDirectiveNamesWorker) {
@@ -54985,11 +57069,16 @@ var ts;
var resolutions = resolveTypeReferenceDirectiveNamesWorker(typesReferenceDirectives, newSourceFilePath);
var resolutionsChanged = ts.hasChangesInResolutions(typesReferenceDirectives, resolutions, oldSourceFile.resolvedTypeReferenceDirectiveNames, ts.typeDirectiveIsEqualTo);
if (resolutionsChanged) {
- return false;
+ oldProgram.structureIsReused = 1;
+ newSourceFile.resolvedTypeReferenceDirectiveNames = ts.zipToMap(typesReferenceDirectives, resolutions);
+ }
+ else {
+ newSourceFile.resolvedTypeReferenceDirectiveNames = oldSourceFile.resolvedTypeReferenceDirectiveNames;
}
}
- newSourceFile.resolvedModules = oldSourceFile.resolvedModules;
- newSourceFile.resolvedTypeReferenceDirectiveNames = oldSourceFile.resolvedTypeReferenceDirectiveNames;
+ }
+ if (oldProgram.structureIsReused !== 2) {
+ return oldProgram.structureIsReused;
}
for (var i = 0; i < newSourceFiles.length; i++) {
filesByName.set(filePaths[i], newSourceFiles[i]);
@@ -55001,8 +57090,7 @@ var ts;
fileProcessingDiagnostics.reattachFileDiagnostics(modifiedFile.newFile);
}
resolvedTypeReferenceDirectives = oldProgram.getResolvedTypeReferenceDirectives();
- oldProgram.structureIsReused = true;
- return true;
+ return oldProgram.structureIsReused = 2;
}
function getEmitHost(writeFileCallback) {
return {
@@ -55074,14 +57162,12 @@ var ts;
if (sourceFile) {
return getDiagnostics(sourceFile, cancellationToken);
}
- var allDiagnostics = [];
- ts.forEach(program.getSourceFiles(), function (sourceFile) {
+ return ts.sortAndDeduplicateDiagnostics(ts.flatMap(program.getSourceFiles(), function (sourceFile) {
if (cancellationToken) {
cancellationToken.throwIfCancellationRequested();
}
- ts.addRange(allDiagnostics, getDiagnostics(sourceFile, cancellationToken));
- });
- return ts.sortAndDeduplicateDiagnostics(allDiagnostics);
+ return getDiagnostics(sourceFile, cancellationToken);
+ }));
}
function getSyntacticDiagnostics(sourceFile, cancellationToken) {
return getDiagnosticsHelper(sourceFile, getSyntacticDiagnosticsForFile, cancellationToken);
@@ -55102,6 +57188,9 @@ var ts;
if (ts.isSourceFileJavaScript(sourceFile)) {
if (!sourceFile.additionalSyntacticDiagnostics) {
sourceFile.additionalSyntacticDiagnostics = getJavaScriptSyntacticDiagnosticsForFile(sourceFile);
+ if (ts.isCheckJsEnabledForFile(sourceFile, options)) {
+ sourceFile.additionalSyntacticDiagnostics = ts.concatenate(sourceFile.additionalSyntacticDiagnostics, sourceFile.jsDocDiagnostics);
+ }
}
return ts.concatenate(sourceFile.additionalSyntacticDiagnostics, sourceFile.parseDiagnostics);
}
@@ -55129,9 +57218,9 @@ var ts;
}
var typeChecker = getDiagnosticsProducingTypeChecker();
ts.Debug.assert(!!sourceFile.bindDiagnostics);
- var bindDiagnostics = sourceFile.bindDiagnostics;
- var includeCheckDiagnostics = !ts.isSourceFileJavaScript(sourceFile) || ts.isCheckJsEnabledForFile(sourceFile, options);
- var checkDiagnostics = includeCheckDiagnostics ? typeChecker.getDiagnostics(sourceFile, cancellationToken) : [];
+ var includeBindAndCheckDiagnostics = !ts.isSourceFileJavaScript(sourceFile) || ts.isCheckJsEnabledForFile(sourceFile, options);
+ var bindDiagnostics = includeBindAndCheckDiagnostics ? sourceFile.bindDiagnostics : emptyArray;
+ var checkDiagnostics = includeBindAndCheckDiagnostics ? typeChecker.getDiagnostics(sourceFile, cancellationToken) : emptyArray;
var fileProcessingDiagnosticsInFile = fileProcessingDiagnostics.getDiagnostics(sourceFile.fileName);
var programDiagnosticsInFile = programDiagnostics.getDiagnostics(sourceFile.fileName);
var diagnostics = bindDiagnostics.concat(checkDiagnostics, fileProcessingDiagnosticsInFile, programDiagnosticsInFile);
@@ -55342,18 +57431,13 @@ var ts;
return result;
}
function getDeclarationDiagnosticsForFile(sourceFile, cancellationToken) {
- return ts.isDeclarationFile(sourceFile) ? [] : getDeclarationDiagnosticsWorker(sourceFile, cancellationToken);
+ return sourceFile.isDeclarationFile ? [] : getDeclarationDiagnosticsWorker(sourceFile, cancellationToken);
}
function getOptionsDiagnostics() {
- var allDiagnostics = [];
- ts.addRange(allDiagnostics, fileProcessingDiagnostics.getGlobalDiagnostics());
- ts.addRange(allDiagnostics, programDiagnostics.getGlobalDiagnostics());
- return ts.sortAndDeduplicateDiagnostics(allDiagnostics);
+ return ts.sortAndDeduplicateDiagnostics(ts.concatenate(fileProcessingDiagnostics.getGlobalDiagnostics(), programDiagnostics.getGlobalDiagnostics()));
}
function getGlobalDiagnostics() {
- var allDiagnostics = [];
- ts.addRange(allDiagnostics, getDiagnosticsProducingTypeChecker().getGlobalDiagnostics());
- return ts.sortAndDeduplicateDiagnostics(allDiagnostics);
+ return ts.sortAndDeduplicateDiagnostics(getDiagnosticsProducingTypeChecker().getGlobalDiagnostics().slice());
}
function processRootFile(fileName, isDefaultLib) {
processSourceFile(ts.normalizePath(fileName), isDefaultLib);
@@ -55373,7 +57457,6 @@ var ts;
}
var isJavaScriptFile = ts.isSourceFileJavaScript(file);
var isExternalModuleFile = ts.isExternalModule(file);
- var isDtsFile = ts.isDeclarationFile(file);
var imports;
var moduleAugmentations;
var ambientModules;
@@ -55389,8 +57472,8 @@ var ts;
for (var _i = 0, _a = file.statements; _i < _a.length; _i++) {
var node = _a[_i];
collectModuleReferences(node, false);
- if (isJavaScriptFile) {
- collectRequireCalls(node);
+ if ((file.flags & 524288) || isJavaScriptFile) {
+ collectDynamicImportOrRequireCalls(node);
}
}
file.imports = imports || emptyArray;
@@ -55414,13 +57497,13 @@ var ts;
}
break;
case 233:
- if (ts.isAmbientModule(node) && (inAmbientModule || ts.hasModifier(node, 2) || ts.isDeclarationFile(file))) {
+ if (ts.isAmbientModule(node) && (inAmbientModule || ts.hasModifier(node, 2) || file.isDeclarationFile)) {
var moduleName = node.name;
if (isExternalModuleFile || (inAmbientModule && !ts.isExternalModuleNameRelative(moduleName.text))) {
(moduleAugmentations || (moduleAugmentations = [])).push(moduleName);
}
else if (!inAmbientModule) {
- if (isDtsFile) {
+ if (file.isDeclarationFile) {
(ambientModules || (ambientModules = [])).push(moduleName.text);
}
var body = node.body;
@@ -55434,55 +57517,63 @@ var ts;
}
}
}
- function collectRequireCalls(node) {
+ function collectDynamicImportOrRequireCalls(node) {
if (ts.isRequireCall(node, true)) {
(imports || (imports = [])).push(node.arguments[0]);
}
+ else if (ts.isImportCall(node) && node.arguments.length === 1 && node.arguments[0].kind === 9) {
+ (imports || (imports = [])).push(node.arguments[0]);
+ }
else {
- ts.forEachChild(node, collectRequireCalls);
+ ts.forEachChild(node, collectDynamicImportOrRequireCalls);
}
}
}
- function processSourceFile(fileName, isDefaultLib, refFile, refPos, refEnd) {
- var diagnosticArgument;
- var diagnostic;
+ function getSourceFileFromReference(referencingFile, ref) {
+ return getSourceFileFromReferenceWorker(resolveTripleslashReference(ref.fileName, referencingFile.fileName), function (fileName) { return filesByName.get(ts.toPath(fileName, currentDirectory, getCanonicalFileName)); });
+ }
+ function getSourceFileFromReferenceWorker(fileName, getSourceFile, fail, refFile) {
if (ts.hasExtension(fileName)) {
if (!options.allowNonTsExtensions && !ts.forEach(supportedExtensions, function (extension) { return ts.fileExtensionIs(host.getCanonicalFileName(fileName), extension); })) {
- diagnostic = ts.Diagnostics.File_0_has_unsupported_extension_The_only_supported_extensions_are_1;
- diagnosticArgument = [fileName, "'" + supportedExtensions.join("', '") + "'"];
- }
- else if (!findSourceFile(fileName, ts.toPath(fileName, currentDirectory, getCanonicalFileName), isDefaultLib, refFile, refPos, refEnd)) {
- diagnostic = ts.Diagnostics.File_0_not_found;
- diagnosticArgument = [fileName];
- }
- else if (refFile && host.getCanonicalFileName(fileName) === host.getCanonicalFileName(refFile.fileName)) {
- diagnostic = ts.Diagnostics.A_file_cannot_have_a_reference_to_itself;
- diagnosticArgument = [fileName];
+ if (fail)
+ fail(ts.Diagnostics.File_0_has_unsupported_extension_The_only_supported_extensions_are_1, fileName, "'" + supportedExtensions.join("', '") + "'");
+ return undefined;
}
- }
- else {
- var nonTsFile = options.allowNonTsExtensions && findSourceFile(fileName, ts.toPath(fileName, currentDirectory, getCanonicalFileName), isDefaultLib, refFile, refPos, refEnd);
- if (!nonTsFile) {
- if (options.allowNonTsExtensions) {
- diagnostic = ts.Diagnostics.File_0_not_found;
- diagnosticArgument = [fileName];
+ var sourceFile = getSourceFile(fileName);
+ if (fail) {
+ if (!sourceFile) {
+ fail(ts.Diagnostics.File_0_not_found, fileName);
}
- else if (!ts.forEach(supportedExtensions, function (extension) { return findSourceFile(fileName + extension, ts.toPath(fileName + extension, currentDirectory, getCanonicalFileName), isDefaultLib, refFile, refPos, refEnd); })) {
- diagnostic = ts.Diagnostics.File_0_not_found;
- fileName += ".ts";
- diagnosticArgument = [fileName];
+ else if (refFile && host.getCanonicalFileName(fileName) === host.getCanonicalFileName(refFile.fileName)) {
+ fail(ts.Diagnostics.A_file_cannot_have_a_reference_to_itself, fileName);
}
}
+ return sourceFile;
}
- if (diagnostic) {
- if (refFile !== undefined && refEnd !== undefined && refPos !== undefined) {
- fileProcessingDiagnostics.add(ts.createFileDiagnostic.apply(void 0, [refFile, refPos, refEnd - refPos, diagnostic].concat(diagnosticArgument)));
- }
- else {
- fileProcessingDiagnostics.add(ts.createCompilerDiagnostic.apply(void 0, [diagnostic].concat(diagnosticArgument)));
+ else {
+ var sourceFileNoExtension = options.allowNonTsExtensions && getSourceFile(fileName);
+ if (sourceFileNoExtension)
+ return sourceFileNoExtension;
+ if (fail && options.allowNonTsExtensions) {
+ fail(ts.Diagnostics.File_0_not_found, fileName);
+ return undefined;
}
+ var sourceFileWithAddedExtension = ts.forEach(supportedExtensions, function (extension) { return getSourceFile(fileName + extension); });
+ if (fail && !sourceFileWithAddedExtension)
+ fail(ts.Diagnostics.File_0_not_found, fileName + ".ts");
+ return sourceFileWithAddedExtension;
}
}
+ function processSourceFile(fileName, isDefaultLib, refFile, refPos, refEnd) {
+ getSourceFileFromReferenceWorker(fileName, function (fileName) { return findSourceFile(fileName, ts.toPath(fileName, currentDirectory, getCanonicalFileName), isDefaultLib, refFile, refPos, refEnd); }, function (diagnostic) {
+ var args = [];
+ for (var _i = 1; _i < arguments.length; _i++) {
+ args[_i - 1] = arguments[_i];
+ }
+ fileProcessingDiagnostics.add(refFile !== undefined && refEnd !== undefined && refPos !== undefined
+ ? ts.createFileDiagnostic.apply(void 0, [refFile, refPos, refEnd - refPos, diagnostic].concat(args)) : ts.createCompilerDiagnostic.apply(void 0, [diagnostic].concat(args)));
+ }, refFile);
+ }
function reportFileNamesDifferOnlyInCasingError(fileName, existingFileName, refFile, refPos, refEnd) {
if (refFile !== undefined && refPos !== undefined && refEnd !== undefined) {
fileProcessingDiagnostics.add(ts.createFileDiagnostic(refFile, refPos, refEnd - refPos, ts.Diagnostics.File_name_0_differs_from_already_included_file_name_1_only_in_casing, fileName, existingFileName));
@@ -55617,10 +57708,10 @@ var ts;
function processImportedModules(file) {
collectExternalModuleReferences(file);
if (file.imports.length || file.moduleAugmentations.length) {
- file.resolvedModules = ts.createMap();
var nonGlobalAugmentation = ts.filter(file.moduleAugmentations, function (moduleAugmentation) { return moduleAugmentation.kind === 9; });
var moduleNames = ts.map(ts.concatenate(file.imports, nonGlobalAugmentation), getTextOfLiteral);
- var resolutions = resolveModuleNamesReusingOldState(moduleNames, ts.getNormalizedAbsolutePath(file.fileName, currentDirectory), file);
+ var oldProgramState = { program: oldProgram, file: file, modifiedFilePaths: modifiedFilePaths };
+ var resolutions = resolveModuleNamesReusingOldState(moduleNames, ts.getNormalizedAbsolutePath(file.fileName, currentDirectory), file, oldProgramState);
ts.Debug.assert(resolutions.length === moduleNames.length);
for (var i = 0; i < moduleNames.length; i++) {
var resolution = resolutions[i];
@@ -55669,7 +57760,7 @@ var ts;
var absoluteRootDirectoryPath = host.getCanonicalFileName(ts.getNormalizedAbsolutePath(rootDirectory, currentDirectory));
for (var _i = 0, sourceFiles_3 = sourceFiles; _i < sourceFiles_3.length; _i++) {
var sourceFile = sourceFiles_3[_i];
- if (!ts.isDeclarationFile(sourceFile)) {
+ if (!sourceFile.isDeclarationFile) {
var absoluteSourceFilePath = host.getCanonicalFileName(ts.getNormalizedAbsolutePath(sourceFile.fileName, currentDirectory));
if (absoluteSourceFilePath.indexOf(absoluteRootDirectoryPath) !== 0) {
programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files, sourceFile.fileName, options.rootDir));
@@ -55766,12 +57857,12 @@ var ts;
}
var languageVersion = options.target || 0;
var outFile = options.outFile || options.out;
- var firstNonAmbientExternalModuleSourceFile = ts.forEach(files, function (f) { return ts.isExternalModule(f) && !ts.isDeclarationFile(f) ? f : undefined; });
+ var firstNonAmbientExternalModuleSourceFile = ts.forEach(files, function (f) { return ts.isExternalModule(f) && !f.isDeclarationFile ? f : undefined; });
if (options.isolatedModules) {
if (options.module === ts.ModuleKind.None && languageVersion < 2) {
programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES2015_or_higher));
}
- var firstNonExternalModuleSourceFile = ts.forEach(files, function (f) { return !ts.isExternalModule(f) && !ts.isDeclarationFile(f) ? f : undefined; });
+ var firstNonExternalModuleSourceFile = ts.forEach(files, function (f) { return !ts.isExternalModule(f) && !f.isDeclarationFile ? f : undefined; });
if (firstNonExternalModuleSourceFile) {
var span_7 = ts.getErrorSpanForNode(firstNonExternalModuleSourceFile, firstNonExternalModuleSourceFile);
programDiagnostics.add(ts.createFileDiagnostic(firstNonExternalModuleSourceFile, span_7.start, span_7.length, ts.Diagnostics.Cannot_compile_namespaces_when_the_isolatedModules_flag_is_provided));
@@ -55967,11 +58058,12 @@ var ts;
"umd": ts.ModuleKind.UMD,
"es6": ts.ModuleKind.ES2015,
"es2015": ts.ModuleKind.ES2015,
+ "esnext": ts.ModuleKind.ESNext
}),
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,
+ description: ts.Diagnostics.Specify_module_code_generation_Colon_commonjs_amd_system_umd_es2015_or_ESNext,
},
{
name: "lib",
@@ -56003,6 +58095,7 @@ var ts;
"es2017.object": "lib.es2017.object.d.ts",
"es2017.sharedmemory": "lib.es2017.sharedmemory.d.ts",
"es2017.string": "lib.es2017.string.d.ts",
+ "es2017.intl": "lib.es2017.intl.d.ts",
"esnext.asynciterable": "lib.esnext.asynciterable.d.ts",
}),
},
@@ -56464,6 +58557,12 @@ var ts;
description: ts.Diagnostics.The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files
},
{
+ name: "noStrictGenericChecks",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Disable_strict_checking_of_generic_signatures_in_function_types,
+ },
+ {
name: "plugins",
type: "list",
isTSConfigOnly: true,
@@ -56533,7 +58632,6 @@ var ts;
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);
@@ -56567,7 +58665,6 @@ var ts;
var options = {};
var fileNames = [];
var errors = [];
- var _a = getOptionNameMap(), optionNameMap = _a.optionNameMap, shortOptionNames = _a.shortOptionNames;
parseStrings(commandLine);
return {
options: options,
@@ -56583,12 +58680,7 @@ var ts;
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);
+ var opt = getOptionFromName(s.slice(s.charCodeAt(1) === 45 ? 2 : 1), true);
if (opt) {
if (opt.isTSConfigOnly) {
errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_can_only_be_specified_in_tsconfig_json_file, opt.name));
@@ -56672,6 +58764,18 @@ var ts;
}
}
ts.parseCommandLine = parseCommandLine;
+ function getOptionFromName(optionName, allowShort) {
+ if (allowShort === void 0) { allowShort = false; }
+ optionName = optionName.toLowerCase();
+ var _a = getOptionNameMap(), optionNameMap = _a.optionNameMap, shortOptionNames = _a.shortOptionNames;
+ if (allowShort) {
+ var short = shortOptionNames.get(optionName);
+ if (short !== undefined) {
+ optionName = short;
+ }
+ }
+ return optionNameMap.get(optionName);
+ }
function readConfigFile(fileName, readFile) {
var text = "";
try {
@@ -56814,7 +58918,7 @@ var ts;
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);
+ result.push(optionName && "" + tab + tab + optionName + (description && (makePadding(marginLength - optionName.length + 2) + description)));
}
if (configurations.files && configurations.files.length) {
result.push(tab + "},");
@@ -56854,49 +58958,28 @@ var ts;
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);
- var baseCompileOnSave;
- 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, baseCompileOnSave, baseOptions]), include = _b[0], exclude = _b[1], files = _b[2], baseCompileOnSave = _b[3], baseOptions = _b[4];
- }
- else {
- errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Compiler_option_0_requires_a_value_of_type_1, "extends", "string"));
+ var options = (function () {
+ var _a = parseConfig(json, host, basePath, configFileName, resolutionStack, errors), include = _a.include, exclude = _a.exclude, files = _a.files, options = _a.options, compileOnSave = _a.compileOnSave;
+ if (include) {
+ json.include = include;
}
- if (include && !json["include"]) {
- json["include"] = include;
+ if (exclude) {
+ json.exclude = exclude;
}
- if (exclude && !json["exclude"]) {
- json["exclude"] = exclude;
+ if (files) {
+ json.files = files;
}
- if (files && !json["files"]) {
- json["files"] = files;
+ if (compileOnSave !== undefined) {
+ json.compileOnSave = compileOnSave;
}
- options = ts.assign({}, baseOptions, options);
- }
+ return options;
+ })();
options = ts.extend(existingOptions, options);
options.configFilePath = configFileName;
- var _c = getFileNames(errors), fileNames = _c.fileNames, wildcardDirectories = _c.wildcardDirectories;
+ var jsonOptions = json["typeAcquisition"] || json["typingOptions"];
+ var typeAcquisition = convertTypeAcquisitionFromJsonWorker(jsonOptions, basePath, errors, configFileName);
+ var _a = getFileNames(), fileNames = _a.fileNames, wildcardDirectories = _a.wildcardDirectories;
var compileOnSave = convertCompileOnSaveOptionFromJson(json, basePath, errors);
- if (baseCompileOnSave && json[ts.compileOnSaveCommandLineOption.name] === undefined) {
- compileOnSave = baseCompileOnSave;
- }
return {
options: options,
fileNames: fileNames,
@@ -56906,37 +58989,7 @@ var ts;
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.compileOnSave, result.options];
- }
- function getFileNames(errors) {
+ function getFileNames() {
var fileNames;
if (ts.hasProperty(json, "files")) {
if (ts.isArray(json["files"])) {
@@ -56967,9 +59020,6 @@ var ts;
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"];
@@ -56986,9 +59036,66 @@ var ts;
}
return result;
}
- var _b;
}
ts.parseJsonConfigFileContent = parseJsonConfigFileContent;
+ function parseConfig(json, host, basePath, configFileName, resolutionStack, errors) {
+ basePath = ts.normalizeSlashes(basePath);
+ var getCanonicalFileName = ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames);
+ var resolvedPath = ts.toPath(configFileName || "", basePath, getCanonicalFileName);
+ if (resolutionStack.indexOf(resolvedPath) >= 0) {
+ errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Circularity_detected_while_resolving_configuration_Colon_0, resolutionStack.concat([resolvedPath]).join(" -> ")));
+ return { include: undefined, exclude: undefined, files: undefined, options: {}, compileOnSave: undefined };
+ }
+ if (ts.hasProperty(json, "excludes")) {
+ errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Unknown_option_excludes_Did_you_mean_exclude));
+ }
+ var options = convertCompilerOptionsFromJsonWorker(json.compilerOptions, basePath, errors, configFileName);
+ var include = json.include, exclude = json.exclude, files = json.files;
+ var compileOnSave = json.compileOnSave;
+ if (json.extends) {
+ resolutionStack = resolutionStack.concat([resolvedPath]);
+ var base = getExtendedConfig(json.extends, host, basePath, getCanonicalFileName, resolutionStack, errors);
+ if (base) {
+ include = include || base.include;
+ exclude = exclude || base.exclude;
+ files = files || base.files;
+ if (compileOnSave === undefined) {
+ compileOnSave = base.compileOnSave;
+ }
+ options = ts.assign({}, base.options, options);
+ }
+ }
+ return { include: include, exclude: exclude, files: files, options: options, compileOnSave: compileOnSave };
+ }
+ function getExtendedConfig(extended, host, basePath, getCanonicalFileName, resolutionStack, errors) {
+ if (typeof extended !== "string") {
+ errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Compiler_option_0_requires_a_value_of_type_1, "extends", "string"));
+ return undefined;
+ }
+ extended = ts.normalizeSlashes(extended);
+ if (!(ts.isRootedDiskPath(extended) || ts.startsWith(extended, "./") || ts.startsWith(extended, "../"))) {
+ errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.A_path_in_an_extends_option_must_be_relative_or_rooted_but_0_is_not, extended));
+ return undefined;
+ }
+ var extendedConfigPath = ts.toPath(extended, 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, extended));
+ return undefined;
+ }
+ }
+ var extendedResult = readConfigFile(extendedConfigPath, function (path) { return host.readFile(path); });
+ if (extendedResult.error) {
+ errors.push(extendedResult.error);
+ return undefined;
+ }
+ 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 _a = parseConfig(extendedResult.config, host, extendedDirname, ts.getBaseFileName(extendedConfigPath), resolutionStack, errors), include = _a.include, exclude = _a.exclude, files = _a.files, options = _a.options, compileOnSave = _a.compileOnSave;
+ return { include: ts.map(include, updatePath), exclude: ts.map(exclude, updatePath), files: ts.map(files, updatePath), compileOnSave: compileOnSave, options: options };
+ }
function convertCompileOnSaveOptionFromJson(jsonOption, basePath, errors) {
if (!ts.hasProperty(jsonOption, ts.compileOnSaveCommandLineOption.name)) {
return false;
@@ -57168,7 +59275,7 @@ var ts;
}
}
}
- for (var key in wildcardDirectories)
+ 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];
@@ -57177,6 +59284,7 @@ var ts;
}
}
}
+ }
}
return wildcardDirectories;
}
@@ -57220,6 +59328,40 @@ var ts;
function caseInsensitiveKeyMapper(key) {
return key.toLowerCase();
}
+ function convertCompilerOptionsForTelemetry(opts) {
+ var out = {};
+ for (var key in opts) {
+ if (opts.hasOwnProperty(key)) {
+ var type = getOptionFromName(key);
+ if (type !== undefined) {
+ out[key] = getOptionValueWithEmptyStrings(opts[key], type);
+ }
+ }
+ }
+ return out;
+ }
+ ts.convertCompilerOptionsForTelemetry = convertCompilerOptionsForTelemetry;
+ function getOptionValueWithEmptyStrings(value, option) {
+ switch (option.type) {
+ case "object":
+ return "";
+ case "string":
+ return "";
+ case "number":
+ return typeof value === "number" ? value : "";
+ case "boolean":
+ return typeof value === "boolean" ? value : "";
+ case "list":
+ var elementType_1 = option.element;
+ return ts.isArray(value) ? value.map(function (v) { return getOptionValueWithEmptyStrings(v, elementType_1); }) : "";
+ default:
+ return ts.forEachEntry(option.type, function (optionEnumValue, optionStringValue) {
+ if (optionEnumValue === value) {
+ return optionStringValue;
+ }
+ });
+ }
+ }
})(ts || (ts = {}));
var ts;
(function (ts) {
@@ -57369,31 +59511,31 @@ var ts;
var ClassificationTypeNames = (function () {
function ClassificationTypeNames() {
}
+ ClassificationTypeNames.comment = "comment";
+ ClassificationTypeNames.identifier = "identifier";
+ ClassificationTypeNames.keyword = "keyword";
+ ClassificationTypeNames.numericLiteral = "number";
+ ClassificationTypeNames.operator = "operator";
+ ClassificationTypeNames.stringLiteral = "string";
+ ClassificationTypeNames.whiteSpace = "whitespace";
+ ClassificationTypeNames.text = "text";
+ ClassificationTypeNames.punctuation = "punctuation";
+ ClassificationTypeNames.className = "class name";
+ ClassificationTypeNames.enumName = "enum name";
+ ClassificationTypeNames.interfaceName = "interface name";
+ ClassificationTypeNames.moduleName = "module name";
+ ClassificationTypeNames.typeParameterName = "type parameter name";
+ ClassificationTypeNames.typeAliasName = "type alias name";
+ ClassificationTypeNames.parameterName = "parameter name";
+ ClassificationTypeNames.docCommentTagName = "doc comment tag name";
+ ClassificationTypeNames.jsxOpenTagName = "jsx open tag name";
+ ClassificationTypeNames.jsxCloseTagName = "jsx close tag name";
+ ClassificationTypeNames.jsxSelfClosingTagName = "jsx self closing tag name";
+ ClassificationTypeNames.jsxAttribute = "jsx attribute";
+ ClassificationTypeNames.jsxText = "jsx text";
+ ClassificationTypeNames.jsxAttributeStringLiteralValue = "jsx attribute string literal value";
return ClassificationTypeNames;
}());
- ClassificationTypeNames.comment = "comment";
- ClassificationTypeNames.identifier = "identifier";
- ClassificationTypeNames.keyword = "keyword";
- ClassificationTypeNames.numericLiteral = "number";
- ClassificationTypeNames.operator = "operator";
- ClassificationTypeNames.stringLiteral = "string";
- ClassificationTypeNames.whiteSpace = "whitespace";
- ClassificationTypeNames.text = "text";
- ClassificationTypeNames.punctuation = "punctuation";
- ClassificationTypeNames.className = "class name";
- ClassificationTypeNames.enumName = "enum name";
- ClassificationTypeNames.interfaceName = "interface name";
- ClassificationTypeNames.moduleName = "module name";
- ClassificationTypeNames.typeParameterName = "type parameter name";
- ClassificationTypeNames.typeAliasName = "type alias name";
- ClassificationTypeNames.parameterName = "parameter name";
- ClassificationTypeNames.docCommentTagName = "doc comment tag name";
- ClassificationTypeNames.jsxOpenTagName = "jsx open tag name";
- ClassificationTypeNames.jsxCloseTagName = "jsx close tag name";
- ClassificationTypeNames.jsxSelfClosingTagName = "jsx self closing tag name";
- ClassificationTypeNames.jsxAttribute = "jsx attribute";
- ClassificationTypeNames.jsxText = "jsx text";
- ClassificationTypeNames.jsxAttributeStringLiteralValue = "jsx attribute string literal value";
ts.ClassificationTypeNames = ClassificationTypeNames;
var ClassificationType;
(function (ClassificationType) {
@@ -57444,7 +59586,6 @@ var ts;
case 148:
case 261:
case 262:
- case 264:
case 151:
case 150:
case 152:
@@ -57461,8 +59602,10 @@ var ts;
case 231:
case 163:
return 2;
+ case 291:
+ return node.name === undefined ? 1 | 2 : 2;
+ case 264:
case 229:
- case 232:
return 1 | 2;
case 233:
if (ts.isAmbientModule(node)) {
@@ -57474,17 +59617,18 @@ var ts;
else {
return 4;
}
+ case 232:
case 241:
case 242:
case 237:
case 238:
case 243:
case 244:
- return 1 | 2 | 4;
+ return 7;
case 265:
return 4 | 1;
}
- return 1 | 2 | 4;
+ return 7;
}
ts.getMeaningFromDeclaration = getMeaningFromDeclaration;
function getMeaningFromLocation(node) {
@@ -57492,9 +59636,9 @@ var ts;
return 1;
}
else if (node.parent.kind === 243) {
- return 1 | 2 | 4;
+ return 7;
}
- else if (isInRightSideOfImport(node)) {
+ else if (isInRightSideOfInternalImportEqualsDeclaration(node)) {
return getMeaningFromRightHandSideOfImportEquals(node);
}
else if (ts.isDeclarationName(node)) {
@@ -57506,6 +59650,10 @@ var ts;
else if (isNamespaceReference(node)) {
return 4;
}
+ else if (ts.isTypeParameterDeclaration(node.parent)) {
+ ts.Debug.assert(ts.isJSDocTemplateTag(node.parent.parent));
+ return 2;
+ }
else {
return 1;
}
@@ -57520,12 +59668,13 @@ var ts;
}
return 4;
}
- function isInRightSideOfImport(node) {
+ function isInRightSideOfInternalImportEqualsDeclaration(node) {
while (node.parent.kind === 143) {
node = node.parent;
}
return ts.isInternalModuleImportEqualsDeclaration(node.parent) && node.parent.moduleReference === node;
}
+ ts.isInRightSideOfInternalImportEqualsDeclaration = isInRightSideOfInternalImportEqualsDeclaration;
function isNamespaceReference(node) {
return isQualifiedNameNamespaceReference(node) || isPropertyAccessNamespaceReference(node);
}
@@ -57560,10 +59709,20 @@ var ts;
if (ts.isRightSideOfQualifiedNameOrPropertyAccess(node)) {
node = node.parent;
}
- return node.parent.kind === 159 ||
- (node.parent.kind === 201 && !ts.isExpressionWithTypeArgumentsInClassExtendsClause(node.parent)) ||
- (node.kind === 99 && !ts.isPartOfExpression(node)) ||
- node.kind === 169;
+ switch (node.kind) {
+ case 99:
+ return !ts.isPartOfExpression(node);
+ case 169:
+ return true;
+ }
+ switch (node.parent.kind) {
+ case 159:
+ case 277:
+ return true;
+ case 201:
+ return !ts.isExpressionWithTypeArgumentsInClassExtendsClause(node.parent);
+ }
+ return false;
}
function isCallExpressionTarget(node) {
return isCallOrNewExpressionTarget(node, 181);
@@ -57635,7 +59794,7 @@ var ts;
case 153:
case 154:
case 233:
- return node.parent.name === node;
+ return ts.getNameOfDeclaration(node.parent) === node;
case 180:
return node.parent.argumentExpression === node;
case 144:
@@ -57650,31 +59809,6 @@ var ts;
ts.getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node;
}
ts.isExpressionOfExternalModuleImportEqualsDeclaration = isExpressionOfExternalModuleImportEqualsDeclaration;
- function isInsideComment(sourceFile, token, position) {
- return position <= token.getStart(sourceFile) &&
- (isInsideCommentRange(ts.getTrailingCommentRanges(sourceFile.text, token.getFullStart())) ||
- isInsideCommentRange(ts.getLeadingCommentRanges(sourceFile.text, token.getFullStart())));
- function isInsideCommentRange(comments) {
- return ts.forEach(comments, function (comment) {
- if (comment.pos < position && position < comment.end) {
- return true;
- }
- else if (position === comment.end) {
- var text = sourceFile.text;
- var width = comment.end - comment.pos;
- if (width <= 2 || text.charCodeAt(comment.pos + 1) === 47) {
- return true;
- }
- else {
- return !(text.charCodeAt(comment.end - 1) === 47 &&
- text.charCodeAt(comment.end - 2) === 42);
- }
- }
- return false;
- });
- }
- }
- ts.isInsideComment = isInsideComment;
function getContainerNode(node) {
while (true) {
node = node.parent;
@@ -57739,7 +59873,7 @@ var ts;
case 246:
case 240:
return ts.ScriptElementKind.alias;
- case 290:
+ case 291:
return ts.ScriptElementKind.typeElement;
default:
return ts.ScriptElementKind.unknown;
@@ -57945,7 +60079,7 @@ var ts;
ts.findChildOfKind = findChildOfKind;
function findContainingList(node) {
var syntaxList = ts.forEach(node.parent.getChildren(), function (c) {
- if (c.kind === 294 && c.pos <= node.pos && c.end >= node.end) {
+ if (c.kind === 295 && c.pos <= node.pos && c.end >= node.end) {
return c;
}
});
@@ -57954,69 +60088,45 @@ var ts;
}
ts.findContainingList = findContainingList;
function getTouchingWord(sourceFile, position, includeJsDocComment) {
- if (includeJsDocComment === void 0) { includeJsDocComment = false; }
- return getTouchingToken(sourceFile, position, function (n) { return isWord(n.kind); }, includeJsDocComment);
+ return getTouchingToken(sourceFile, position, includeJsDocComment, function (n) { return isWord(n.kind); });
}
ts.getTouchingWord = getTouchingWord;
function getTouchingPropertyName(sourceFile, position, includeJsDocComment) {
- if (includeJsDocComment === void 0) { includeJsDocComment = false; }
- return getTouchingToken(sourceFile, position, function (n) { return isPropertyName(n.kind); }, includeJsDocComment);
+ return getTouchingToken(sourceFile, position, includeJsDocComment, function (n) { return isPropertyName(n.kind); });
}
ts.getTouchingPropertyName = getTouchingPropertyName;
- function getTouchingToken(sourceFile, position, includeItemAtEndPosition, includeJsDocComment) {
- if (includeJsDocComment === void 0) { includeJsDocComment = false; }
- return getTokenAtPositionWorker(sourceFile, position, false, includeItemAtEndPosition, includeJsDocComment);
+ function getTouchingToken(sourceFile, position, includeJsDocComment, includePrecedingTokenAtEndPosition) {
+ return getTokenAtPositionWorker(sourceFile, position, false, includePrecedingTokenAtEndPosition, false, includeJsDocComment);
}
ts.getTouchingToken = getTouchingToken;
- function getTokenAtPosition(sourceFile, position, includeJsDocComment) {
- if (includeJsDocComment === void 0) { includeJsDocComment = false; }
- return getTokenAtPositionWorker(sourceFile, position, true, undefined, includeJsDocComment);
+ function getTokenAtPosition(sourceFile, position, includeJsDocComment, includeEndPosition) {
+ return getTokenAtPositionWorker(sourceFile, position, true, undefined, includeEndPosition, includeJsDocComment);
}
ts.getTokenAtPosition = getTokenAtPosition;
- function getTokenAtPositionWorker(sourceFile, position, allowPositionInLeadingTrivia, includeItemAtEndPosition, includeJsDocComment) {
- if (includeJsDocComment === void 0) { includeJsDocComment = false; }
+ function getTokenAtPositionWorker(sourceFile, position, allowPositionInLeadingTrivia, includePrecedingTokenAtEndPosition, includeEndPosition, includeJsDocComment) {
var current = sourceFile;
outer: while (true) {
if (ts.isToken(current)) {
return current;
}
- if (includeJsDocComment) {
- var jsDocChildren = ts.filter(current.getChildren(), ts.isJSDocNode);
- for (var _i = 0, jsDocChildren_1 = jsDocChildren; _i < jsDocChildren_1.length; _i++) {
- var jsDocChild = jsDocChildren_1[_i];
- var start = allowPositionInLeadingTrivia ? jsDocChild.getFullStart() : jsDocChild.getStart(sourceFile, includeJsDocComment);
- if (start <= position) {
- var end = jsDocChild.getEnd();
- if (position < end || (position === end && jsDocChild.kind === 1)) {
- current = jsDocChild;
- continue outer;
- }
- else if (includeItemAtEndPosition && end === position) {
- var previousToken = findPrecedingToken(position, sourceFile, jsDocChild);
- if (previousToken && includeItemAtEndPosition(previousToken)) {
- return previousToken;
- }
- }
- }
- }
- }
- for (var _a = 0, _b = current.getChildren(); _a < _b.length; _a++) {
- var child = _b[_a];
- if (ts.isJSDocNode(child)) {
+ for (var _i = 0, _a = current.getChildren(); _i < _a.length; _i++) {
+ var child = _a[_i];
+ if (!includeJsDocComment && ts.isJSDocNode(child)) {
continue;
}
var start = allowPositionInLeadingTrivia ? child.getFullStart() : child.getStart(sourceFile, includeJsDocComment);
- if (start <= position) {
- var end = child.getEnd();
- if (position < end || (position === end && child.kind === 1)) {
- current = child;
- continue outer;
- }
- else if (includeItemAtEndPosition && end === position) {
- var previousToken = findPrecedingToken(position, sourceFile, child);
- if (previousToken && includeItemAtEndPosition(previousToken)) {
- return previousToken;
- }
+ if (start > position) {
+ continue;
+ }
+ var end = child.getEnd();
+ if (position < end || (position === end && (child.kind === 1 || includeEndPosition))) {
+ current = child;
+ continue outer;
+ }
+ else if (includePrecedingTokenAtEndPosition && end === position) {
+ var previousToken = findPrecedingToken(position, sourceFile, child);
+ if (previousToken && includePrecedingTokenAtEndPosition(previousToken)) {
+ return previousToken;
}
}
}
@@ -58024,7 +60134,7 @@ var ts;
}
}
function findTokenOnLeftOfPosition(file, position) {
- var tokenAtPosition = getTokenAtPosition(file, position);
+ var tokenAtPosition = getTokenAtPosition(file, position, false);
if (ts.isToken(tokenAtPosition) && position > tokenAtPosition.getStart(file) && position < tokenAtPosition.getEnd()) {
return tokenAtPosition;
}
@@ -58050,7 +60160,7 @@ var ts;
}
}
ts.findNextToken = findNextToken;
- function findPrecedingToken(position, sourceFile, startNode) {
+ function findPrecedingToken(position, sourceFile, startNode, includeJsDoc) {
return find(startNode || sourceFile);
function findRightmostToken(n) {
if (ts.isToken(n)) {
@@ -58068,7 +60178,7 @@ var ts;
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);
+ var start = child.getStart(sourceFile, includeJsDoc);
var lookInPreviousChild = (start >= position) ||
(child.kind === 10 && start === child.end);
if (lookInPreviousChild) {
@@ -58080,7 +60190,7 @@ var ts;
}
}
}
- ts.Debug.assert(startNode !== undefined || n.kind === 265);
+ ts.Debug.assert(startNode !== undefined || n.kind === 265 || ts.isJSDocCommentContainingNode(n));
if (children.length) {
var candidate = findRightmostChildNodeWithTokens(children, children.length);
return candidate && findRightmostToken(candidate);
@@ -58110,12 +60220,8 @@ var ts;
return false;
}
ts.isInString = isInString;
- function isInComment(sourceFile, position) {
- return isInCommentHelper(sourceFile, position, undefined);
- }
- ts.isInComment = isInComment;
function isInsideJsxElementOrAttribute(sourceFile, position) {
- var token = getTokenAtPosition(sourceFile, position);
+ var token = getTokenAtPosition(sourceFile, position, false);
if (!token) {
return false;
}
@@ -58138,26 +60244,35 @@ var ts;
}
ts.isInsideJsxElementOrAttribute = isInsideJsxElementOrAttribute;
function isInTemplateString(sourceFile, position) {
- var token = getTokenAtPosition(sourceFile, position);
+ var token = getTokenAtPosition(sourceFile, position, false);
return ts.isTemplateLiteralKind(token.kind) && position > token.getStart(sourceFile);
}
ts.isInTemplateString = isInTemplateString;
- function isInCommentHelper(sourceFile, position, predicate) {
- var token = getTokenAtPosition(sourceFile, position);
- if (token && position <= token.getStart(sourceFile)) {
- 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) &&
- predicate(c); }) :
- ts.forEach(commentRanges, function (c) { return c.pos < position &&
- (c.kind === 2 ? position <= c.end : position < c.end); });
+ function isInComment(sourceFile, position, tokenAtPosition, predicate) {
+ if (tokenAtPosition === void 0) { tokenAtPosition = getTokenAtPosition(sourceFile, position, false); }
+ return position <= tokenAtPosition.getStart(sourceFile) &&
+ (isInCommentRange(ts.getLeadingCommentRanges(sourceFile.text, tokenAtPosition.pos)) ||
+ isInCommentRange(ts.getTrailingCommentRanges(sourceFile.text, tokenAtPosition.pos)));
+ function isInCommentRange(commentRanges) {
+ return ts.forEach(commentRanges, function (c) { return isPositionInCommentRange(c, position, sourceFile.text) && (!predicate || predicate(c)); });
+ }
+ }
+ ts.isInComment = isInComment;
+ function isPositionInCommentRange(_a, position, text) {
+ var pos = _a.pos, end = _a.end, kind = _a.kind;
+ if (pos < position && position < end) {
+ return true;
+ }
+ else if (position === end) {
+ return kind === 2 ||
+ !(text.charCodeAt(end - 1) === 47 && text.charCodeAt(end - 2) === 42);
+ }
+ else {
+ return false;
}
- return false;
}
- ts.isInCommentHelper = isInCommentHelper;
function hasDocComment(sourceFile, position) {
- var token = getTokenAtPosition(sourceFile, position);
+ var token = getTokenAtPosition(sourceFile, position, false);
var commentRanges = ts.getLeadingCommentRanges(sourceFile.text, token.pos);
return ts.forEach(commentRanges, jsDocPrefix);
function jsDocPrefix(c) {
@@ -58166,38 +60281,6 @@ var ts;
}
}
ts.hasDocComment = hasDocComment;
- function getJsDocTagAtPosition(sourceFile, position) {
- var node = ts.getTokenAtPosition(sourceFile, position);
- if (ts.isToken(node)) {
- switch (node.kind) {
- case 104:
- case 110:
- case 76:
- node = node.parent === undefined ? undefined : node.parent.parent;
- break;
- default:
- node = node.parent;
- break;
- }
- }
- if (node) {
- if (node.jsDoc) {
- for (var _i = 0, _a = node.jsDoc; _i < _a.length; _i++) {
- var jsDoc = _a[_i];
- if (jsDoc.tags) {
- for (var _b = 0, _c = jsDoc.tags; _b < _c.length; _b++) {
- var tag = _c[_b];
- if (tag.pos <= position && position <= tag.end) {
- return tag;
- }
- }
- }
- }
- }
- }
- return undefined;
- }
- ts.getJsDocTagAtPosition = getJsDocTagAtPosition;
function nodeHasTokens(n) {
return n.getWidth() !== 0;
}
@@ -58271,6 +60354,9 @@ var ts;
}
ts.isAccessibilityModifier = isAccessibilityModifier;
function compareDataObjects(dst, src) {
+ if (!dst || !src || Object.keys(dst).length !== Object.keys(src).length) {
+ return false;
+ }
for (var e in dst) {
if (typeof dst[e] === "object") {
if (!compareDataObjects(dst[e], src[e])) {
@@ -58311,25 +60397,27 @@ var ts;
}
ts.hasTrailingDirectorySeparator = hasTrailingDirectorySeparator;
function isInReferenceComment(sourceFile, position) {
- return isInCommentHelper(sourceFile, position, isReferenceComment);
- function isReferenceComment(c) {
+ return isInComment(sourceFile, position, undefined, function (c) {
var commentText = sourceFile.text.substring(c.pos, c.end);
return tripleSlashDirectivePrefixRegex.test(commentText);
- }
+ });
}
ts.isInReferenceComment = isInReferenceComment;
function isInNonReferenceComment(sourceFile, position) {
- return isInCommentHelper(sourceFile, position, isNonReferenceComment);
- function isNonReferenceComment(c) {
+ return isInComment(sourceFile, position, undefined, function (c) {
var commentText = sourceFile.text.substring(c.pos, c.end);
return !tripleSlashDirectivePrefixRegex.test(commentText);
- }
+ });
}
ts.isInNonReferenceComment = isInNonReferenceComment;
function createTextSpanFromNode(node, sourceFile) {
return ts.createTextSpanFromBounds(node.getStart(sourceFile), node.getEnd());
}
ts.createTextSpanFromNode = createTextSpanFromNode;
+ function createTextSpanFromRange(range) {
+ return ts.createTextSpanFromBounds(range.pos, range.end);
+ }
+ ts.createTextSpanFromRange = createTextSpanFromRange;
function isTypeKeyword(kind) {
switch (kind) {
case 119:
@@ -58387,7 +60475,7 @@ var ts;
clear: resetWriter,
trackSymbol: ts.noop,
reportInaccessibleThisError: ts.noop,
- reportIllegalExtends: ts.noop
+ reportPrivateInBaseOfClassExpression: ts.noop,
};
function writeIndent() {
if (lineStart) {
@@ -58589,8 +60677,8 @@ var ts;
};
var _a = ts.transpileModule("(" + content + ")", options), outputText = _a.outputText, diagnostics = _a.diagnostics;
var trimmedOutput = outputText.trim();
- for (var _i = 0, diagnostics_2 = diagnostics; _i < diagnostics_2.length; _i++) {
- var diagnostic = diagnostics_2[_i];
+ for (var _i = 0, diagnostics_3 = diagnostics; _i < diagnostics_3.length; _i++) {
+ var diagnostic = diagnostics_3[_i];
diagnostic.start = diagnostic.start - 1;
}
var _b = ts.parseConfigFileTextToJson(configFileName, trimmedOutput.substring(1, trimmedOutput.length - 2), false), config = _b.config, error = _b.error;
@@ -58612,7 +60700,7 @@ var ts;
}
ts.getOpenBrace = getOpenBrace;
function getOpenBraceOfClassLike(declaration, sourceFile) {
- return ts.getTokenAtPosition(sourceFile, declaration.members.pos - 1);
+ return ts.getTokenAtPosition(sourceFile, declaration.members.pos - 1, false);
}
ts.getOpenBraceOfClassLike = getOpenBraceOfClassLike;
})(ts || (ts = {}));
@@ -58624,7 +60712,7 @@ var ts;
if (sourceFile.isDeclarationFile) {
return undefined;
}
- var tokenAtLocation = ts.getTokenAtPosition(sourceFile, position);
+ var tokenAtLocation = ts.getTokenAtPosition(sourceFile, position, false);
var lineOfPosition = sourceFile.getLineAndCharacterOfPosition(position).line;
if (sourceFile.getLineAndCharacterOfPosition(tokenAtLocation.getStart(sourceFile)).line > lineOfPosition) {
tokenAtLocation = ts.findPrecedingToken(tokenAtLocation.pos, sourceFile);
@@ -59137,7 +61225,7 @@ var ts;
var lastEnd = 0;
for (var i = 0; i < dense.length; i += 3) {
var start = dense[i];
- var length_5 = dense[i + 1];
+ var length_6 = dense[i + 1];
var type = dense[i + 2];
if (lastEnd >= 0) {
var whitespaceLength_1 = start - lastEnd;
@@ -59145,8 +61233,8 @@ var ts;
entries.push({ length: whitespaceLength_1, classification: ts.TokenClass.Whitespace });
}
}
- entries.push({ length: length_5, classification: convertClassification(type) });
- lastEnd = start + length_5;
+ entries.push({ length: length_6, classification: convertClassification(type) });
+ lastEnd = start + length_6;
}
var whitespaceLength = text.length - lastEnd;
if (whitespaceLength > 0) {
@@ -59599,7 +61687,7 @@ var ts;
pushClassification(start, width, 1);
continue;
}
- ts.Debug.assert(ch === 61);
+ ts.Debug.assert(ch === 124 || ch === 61);
classifyDisabledMergeCode(text, start, end);
}
}
@@ -59630,16 +61718,16 @@ var ts;
pushClassification(tag.tagName.pos, tag.tagName.end - tag.tagName.pos, 18);
pos = tag.tagName.end;
switch (tag.kind) {
- case 286:
+ case 287:
processJSDocParameterTag(tag);
break;
- case 289:
+ case 290:
processJSDocTemplateTag(tag);
break;
- case 288:
+ case 289:
processElement(tag.typeExpression);
break;
- case 287:
+ case 288:
processElement(tag.typeExpression);
break;
}
@@ -59697,7 +61785,7 @@ var ts;
}
}
function tryClassifyNode(node) {
- if (ts.isJSDocTag(node)) {
+ if (ts.isJSDoc(node)) {
return true;
}
if (ts.nodeIsMissing(node)) {
@@ -60005,8 +62093,8 @@ var ts;
continue;
}
var start = completePrefix.length;
- var length_6 = normalizedMatch.length - start - normalizedSuffix.length;
- result.push(ts.removeFileExtension(normalizedMatch.substr(start, length_6)));
+ var length_7 = normalizedMatch.length - start - normalizedSuffix.length;
+ result.push(ts.removeFileExtension(normalizedMatch.substr(start, length_7)));
}
return result;
}
@@ -60018,21 +62106,18 @@ var ts;
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); });
- var nonRelativeModules = ts.filter(ambientModules, function (moduleName) { return ts.startsWith(moduleName, fragment); });
+ var nonRelativeModuleNames = ts.filter(ambientModules, function (moduleName) { return ts.startsWith(moduleName, fragment); });
if (isNestedModule) {
var moduleNameWithSeperator_1 = ts.ensureTrailingDirectorySeparator(moduleNameFragment);
- nonRelativeModules = ts.map(nonRelativeModules, function (moduleName) {
- if (ts.startsWith(fragment, moduleNameWithSeperator_1)) {
- return moduleName.substr(moduleNameWithSeperator_1.length);
- }
- return moduleName;
+ nonRelativeModuleNames = ts.map(nonRelativeModuleNames, function (nonRelativeModuleName) {
+ return ts.removePrefix(nonRelativeModuleName, moduleNameWithSeperator_1);
});
}
if (!options.moduleResolution || options.moduleResolution === ts.ModuleResolutionKind.NodeJs) {
for (var _i = 0, _a = enumerateNodeModulesVisibleToScript(host, scriptPath); _i < _a.length; _i++) {
var visibleModule = _a[_i];
if (!isNestedModule) {
- nonRelativeModules.push(visibleModule.moduleName);
+ nonRelativeModuleNames.push(visibleModule.moduleName);
}
else if (ts.startsWith(visibleModule.moduleName, moduleNameFragment)) {
var nestedFiles = tryReadDirectory(host, visibleModule.moduleDir, ts.supportedTypeScriptExtensions, undefined, ["./*"]);
@@ -60041,16 +62126,16 @@ var ts;
var f = nestedFiles_1[_b];
f = ts.normalizePath(f);
var nestedModule = ts.removeFileExtension(ts.getBaseFileName(f));
- nonRelativeModules.push(nestedModule);
+ nonRelativeModuleNames.push(nestedModule);
}
}
}
}
}
- return ts.deduplicate(nonRelativeModules);
+ return ts.deduplicate(nonRelativeModuleNames);
}
function getTripleSlashReferenceCompletion(sourceFile, position, compilerOptions, host) {
- var token = ts.getTokenAtPosition(sourceFile, position);
+ var token = ts.getTokenAtPosition(sourceFile, position, false);
if (!token) {
return undefined;
}
@@ -60263,12 +62348,25 @@ var ts;
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() };
+ var symbols = completionData.symbols, isGlobalCompletion = completionData.isGlobalCompletion, isMemberCompletion = completionData.isMemberCompletion, isNewIdentifierLocation = completionData.isNewIdentifierLocation, location = completionData.location, request = completionData.request, hasFilteredClassMemberKeywords = completionData.hasFilteredClassMemberKeywords;
+ if (sourceFile.languageVariant === 1 &&
+ location && location.parent && location.parent.kind === 252) {
+ var tagName = location.parent.parent.openingElement.tagName;
+ return { isGlobalCompletion: false, isMemberCompletion: true, isNewIdentifierLocation: false,
+ entries: [{
+ name: tagName.getFullText(),
+ kind: ts.ScriptElementKind.classElement,
+ kindModifiers: undefined,
+ sortText: "0",
+ }] };
}
- if (requestJsDocTag) {
- return { isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: false, entries: ts.JsDoc.getJSDocTagCompletions() };
+ if (request) {
+ var entries_2 = request.kind === "JsDocTagName"
+ ? ts.JsDoc.getJSDocTagNameCompletions()
+ : request.kind === "JsDocTag"
+ ? ts.JsDoc.getJSDocTagCompletions()
+ : ts.JsDoc.getJSDocParameterNameCompletions(request.tag);
+ return { isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: false, entries: entries_2 };
}
var entries = [];
if (ts.isSourceFileJavaScript(sourceFile)) {
@@ -60277,23 +62375,16 @@ var ts;
}
else {
if (!symbols || symbols.length === 0) {
- if (sourceFile.languageVariant === 1 &&
- location.parent && location.parent.kind === 252) {
- var tagName = location.parent.parent.openingElement.tagName;
- entries.push({
- name: tagName.text,
- kind: undefined,
- kindModifiers: undefined,
- sortText: "0",
- });
- }
- else {
+ if (!hasFilteredClassMemberKeywords) {
return undefined;
}
}
getCompletionEntriesFromSymbols(symbols, entries, location, true, typeChecker, compilerOptions.target, log);
}
- if (!isMemberCompletion && !requestJsDocTag && !requestJsDocTagName) {
+ if (hasFilteredClassMemberKeywords) {
+ ts.addRange(entries, classMemberKeywordCompletions);
+ }
+ else if (!isMemberCompletion) {
ts.addRange(entries, keywordCompletions);
}
return { isGlobalCompletion: isGlobalCompletion, isMemberCompletion: isMemberCompletion, isNewIdentifierLocation: isNewIdentifierLocation, entries: entries };
@@ -60338,8 +62429,8 @@ var ts;
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];
+ for (var _i = 0, symbols_5 = symbols; _i < symbols_5.length; _i++) {
+ var symbol = symbols_5[_i];
var entry = createCompletionEntry(symbol, location, performCharacterChecks, typeChecker, target);
if (entry) {
var id = ts.escapeIdentifier(entry.name);
@@ -60396,10 +62487,11 @@ var ts;
function getStringLiteralCompletionEntriesFromCallExpression(argumentInfo, typeChecker) {
var candidates = [];
var entries = [];
+ var uniques = ts.createMap();
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);
+ addStringLiteralCompletionsFromType(typeChecker.getParameterType(candidate, argumentInfo.argumentIndex), entries, typeChecker, uniques);
}
if (entries.length) {
return { isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: true, entries: entries };
@@ -60427,9 +62519,10 @@ var ts;
}
return undefined;
}
- function addStringLiteralCompletionsFromType(type, result, typeChecker) {
+ function addStringLiteralCompletionsFromType(type, result, typeChecker, uniques) {
+ if (uniques === void 0) { uniques = ts.createMap(); }
if (type && type.flags & 16384) {
- type = typeChecker.getApparentType(type);
+ type = typeChecker.getBaseConstraintOfType(type);
}
if (!type) {
return;
@@ -60437,16 +62530,20 @@ var ts;
if (type.flags & 65536) {
for (var _i = 0, _a = type.types; _i < _a.length; _i++) {
var t = _a[_i];
- addStringLiteralCompletionsFromType(t, result, typeChecker);
+ addStringLiteralCompletionsFromType(t, result, typeChecker, uniques);
}
}
else if (type.flags & 32) {
- result.push({
- name: type.text,
- kindModifiers: ts.ScriptElementKindModifier.none,
- kind: ts.ScriptElementKind.variableElement,
- sortText: "0"
- });
+ var name = type.value;
+ if (!uniques.has(name)) {
+ uniques.set(name, true);
+ result.push({
+ name: name,
+ kindModifiers: ts.ScriptElementKindModifier.none,
+ kind: ts.ScriptElementKind.variableElement,
+ sortText: "0"
+ });
+ }
}
}
function getCompletionEntryDetails(typeChecker, log, compilerOptions, sourceFile, position, entryName) {
@@ -60491,63 +62588,66 @@ var ts;
Completions.getCompletionEntrySymbol = getCompletionEntrySymbol;
function getCompletionData(typeChecker, log, sourceFile, position) {
var isJavaScriptFile = ts.isSourceFileJavaScript(sourceFile);
- var requestJsDocTagName = false;
- var requestJsDocTag = false;
+ var request;
var start = ts.timestamp();
- var currentToken = ts.getTokenAtPosition(sourceFile, position);
+ var currentToken = ts.getTokenAtPosition(sourceFile, position, false);
log("getCompletionData: Get current token: " + (ts.timestamp() - start));
start = ts.timestamp();
- var insideComment = ts.isInsideComment(sourceFile, currentToken, position);
+ var insideComment = ts.isInComment(sourceFile, position, currentToken);
log("getCompletionData: Is inside comment: " + (ts.timestamp() - start));
+ var insideJsDocTagTypeExpression = false;
if (insideComment) {
if (ts.hasDocComment(sourceFile, position)) {
if (sourceFile.text.charCodeAt(position - 1) === 64) {
- requestJsDocTagName = true;
+ request = { kind: "JsDocTagName" };
}
else {
var lineStart = ts.getLineStartPositionForPosition(position, sourceFile);
- requestJsDocTag = !(sourceFile.text.substring(lineStart, position).match(/[^\*|\s|(/\*\*)]/));
+ if (!(sourceFile.text.substring(lineStart, position).match(/[^\*|\s|(/\*\*)]/))) {
+ request = { kind: "JsDocTag" };
+ }
}
}
- var insideJsDocTagExpression = false;
- var tag = ts.getJsDocTagAtPosition(sourceFile, position);
+ var tag = getJsDocTagAtPosition(currentToken, position);
if (tag) {
if (tag.tagName.pos <= position && position <= tag.tagName.end) {
- requestJsDocTagName = true;
+ request = { kind: "JsDocTagName" };
}
- switch (tag.kind) {
- case 288:
- case 286:
- case 287:
- var tagWithExpression = tag;
- if (tagWithExpression.typeExpression) {
- insideJsDocTagExpression = tagWithExpression.typeExpression.pos < position && position < tagWithExpression.typeExpression.end;
- }
- break;
+ if (isTagWithTypeExpression(tag) && tag.typeExpression) {
+ currentToken = ts.getTokenAtPosition(sourceFile, position, true);
+ if (!currentToken ||
+ (!ts.isDeclarationName(currentToken) &&
+ (currentToken.parent.kind !== 292 ||
+ currentToken.parent.name !== currentToken))) {
+ insideJsDocTagTypeExpression = isCurrentlyEditingNode(tag.typeExpression);
+ }
+ }
+ if (ts.isJSDocParameterTag(tag) && (ts.nodeIsMissing(tag.name) || tag.name.pos <= position && position <= tag.name.end)) {
+ request = { kind: "JsDocParameterName", tag: tag };
}
}
- if (requestJsDocTagName || requestJsDocTag) {
- return { symbols: undefined, isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: false, location: undefined, isRightOfDot: false, requestJsDocTagName: requestJsDocTagName, requestJsDocTag: requestJsDocTag };
+ if (request) {
+ return { symbols: undefined, isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: false, location: undefined, isRightOfDot: false, request: request, hasFilteredClassMemberKeywords: false };
}
- if (!insideJsDocTagExpression) {
+ if (!insideJsDocTagTypeExpression) {
log("Returning an empty list because completion was inside a regular comment or plain text part of a JsDoc comment.");
return undefined;
}
}
start = ts.timestamp();
- var previousToken = ts.findPrecedingToken(position, sourceFile);
+ var previousToken = ts.findPrecedingToken(position, sourceFile, undefined, insideJsDocTagTypeExpression);
log("getCompletionData: Get previous token 1: " + (ts.timestamp() - start));
var contextToken = previousToken;
if (contextToken && position <= contextToken.end && ts.isWord(contextToken.kind)) {
var start_2 = ts.timestamp();
- contextToken = ts.findPrecedingToken(contextToken.getFullStart(), sourceFile);
+ contextToken = ts.findPrecedingToken(contextToken.getFullStart(), sourceFile, undefined, insideJsDocTagTypeExpression);
log("getCompletionData: Get previous token 2: " + (ts.timestamp() - start_2));
}
var node = currentToken;
var isRightOfDot = false;
var isRightOfOpenTag = false;
var isStartingCloseTag = false;
- var location = ts.getTouchingPropertyName(sourceFile, position);
+ var location = ts.getTouchingPropertyName(sourceFile, position, insideJsDocTagTypeExpression);
if (contextToken) {
if (isCompletionListBlocker(contextToken)) {
log("Returning an empty list because completion was requested in an invalid position.");
@@ -60598,6 +62698,7 @@ var ts;
var isGlobalCompletion = false;
var isMemberCompletion;
var isNewIdentifierLocation;
+ var hasFilteredClassMemberKeywords = false;
var symbols = [];
if (isRightOfDot) {
getTypeScriptMemberSymbols();
@@ -60628,11 +62729,24 @@ var ts;
}
}
log("getCompletionData: Semantic work: " + (ts.timestamp() - semanticStart));
- return { symbols: symbols, isGlobalCompletion: isGlobalCompletion, isMemberCompletion: isMemberCompletion, isNewIdentifierLocation: isNewIdentifierLocation, location: location, isRightOfDot: (isRightOfDot || isRightOfOpenTag), requestJsDocTagName: requestJsDocTagName, requestJsDocTag: requestJsDocTag };
+ return { symbols: symbols, isGlobalCompletion: isGlobalCompletion, isMemberCompletion: isMemberCompletion, isNewIdentifierLocation: isNewIdentifierLocation, location: location, isRightOfDot: (isRightOfDot || isRightOfOpenTag), request: request, hasFilteredClassMemberKeywords: hasFilteredClassMemberKeywords };
+ function isTagWithTypeExpression(tag) {
+ switch (tag.kind) {
+ case 285:
+ case 287:
+ case 292:
+ case 288:
+ case 289:
+ case 291:
+ return true;
+ }
+ }
function getTypeScriptMemberSymbols() {
isGlobalCompletion = false;
isMemberCompletion = true;
isNewIdentifierLocation = false;
+ var isTypeLocation = ts.isPartOfTypeNode(node.parent) || insideJsDocTagTypeExpression;
+ var isRhsOfImportDeclaration = ts.isInRightSideOfInternalImportEqualsDeclaration(node);
if (node.kind === 71 || node.kind === 143 || node.kind === 179) {
var symbol = typeChecker.getSymbolAtLocation(node);
if (symbol && symbol.flags & 8388608) {
@@ -60640,15 +62754,22 @@ var ts;
}
if (symbol && symbol.flags & 1952) {
var exportedSymbols = typeChecker.getExportsOfModule(symbol);
+ var isValidValueAccess_1 = function (symbol) { return typeChecker.isValidPropertyAccess((node.parent), symbol.name); };
+ var isValidTypeAccess_1 = function (symbol) { return symbolCanbeReferencedAtTypeLocation(symbol); };
+ var isValidAccess_1 = isRhsOfImportDeclaration ?
+ function (symbol) { return isValidTypeAccess_1(symbol) || isValidValueAccess_1(symbol); } :
+ isTypeLocation ? isValidTypeAccess_1 : isValidValueAccess_1;
ts.forEach(exportedSymbols, function (symbol) {
- if (typeChecker.isValidPropertyAccess((node.parent), symbol.name)) {
+ if (isValidAccess_1(symbol)) {
symbols.push(symbol);
}
});
}
}
- var type = typeChecker.getTypeAtLocation(node);
- addTypeProperties(type);
+ if (!isTypeLocation) {
+ var type = typeChecker.getTypeAtLocation(node);
+ addTypeProperties(type);
+ }
}
function addTypeProperties(type) {
if (type) {
@@ -60670,6 +62791,7 @@ var ts;
function tryGetGlobalSymbols() {
var objectLikeContainer;
var namedImportsOrExports;
+ var classLikeContainer;
var jsxContainer;
if (objectLikeContainer = tryGetObjectLikeCompletionContainer(contextToken)) {
return tryGetObjectLikeCompletionSymbols(objectLikeContainer);
@@ -60677,6 +62799,10 @@ var ts;
if (namedImportsOrExports = tryGetNamedImportsOrExportsForCompletion(contextToken)) {
return tryGetImportOrExportClauseCompletionSymbols(namedImportsOrExports);
}
+ if (classLikeContainer = tryGetClassLikeCompletionContainer(contextToken)) {
+ getGetClassLikeCompletionSymbols(classLikeContainer);
+ return true;
+ }
if (jsxContainer = tryGetContainingJsxElement(contextToken)) {
var attrsType = void 0;
if ((jsxContainer.kind === 250) || (jsxContainer.kind === 251)) {
@@ -60706,9 +62832,64 @@ var ts;
ts.isStatement(scopeNode);
}
var symbolMeanings = 793064 | 107455 | 1920 | 8388608;
- symbols = typeChecker.getSymbolsInScope(scopeNode, symbolMeanings);
+ symbols = filterGlobalCompletion(typeChecker.getSymbolsInScope(scopeNode, symbolMeanings));
return true;
}
+ function filterGlobalCompletion(symbols) {
+ return ts.filter(symbols, function (symbol) {
+ if (!ts.isSourceFile(location)) {
+ if (ts.isExportAssignment(location.parent)) {
+ return true;
+ }
+ if (symbol && symbol.flags & 8388608) {
+ symbol = typeChecker.getAliasedSymbol(symbol);
+ }
+ if (ts.isInRightSideOfInternalImportEqualsDeclaration(location)) {
+ return !!(symbol.flags & 1920);
+ }
+ if (insideJsDocTagTypeExpression ||
+ (!isContextTokenValueLocation(contextToken) &&
+ (ts.isPartOfTypeNode(location) || isContextTokenTypeLocation(contextToken)))) {
+ return symbolCanbeReferencedAtTypeLocation(symbol);
+ }
+ }
+ return !!(symbol.flags & 107455);
+ });
+ }
+ function isContextTokenValueLocation(contextToken) {
+ return contextToken &&
+ contextToken.kind === 103 &&
+ contextToken.parent.kind === 162;
+ }
+ function isContextTokenTypeLocation(contextToken) {
+ if (contextToken) {
+ var parentKind = contextToken.parent.kind;
+ switch (contextToken.kind) {
+ case 56:
+ return parentKind === 149 ||
+ parentKind === 148 ||
+ parentKind === 146 ||
+ parentKind === 226 ||
+ ts.isFunctionLikeKind(parentKind);
+ case 58:
+ return parentKind === 231;
+ case 118:
+ return parentKind === 202;
+ }
+ }
+ }
+ function symbolCanbeReferencedAtTypeLocation(symbol) {
+ if (symbol && symbol.flags & 8388608) {
+ symbol = typeChecker.getAliasedSymbol(symbol);
+ }
+ if (symbol.flags & 793064) {
+ return true;
+ }
+ if (symbol.flags & (512 | 1024)) {
+ var exportedSymbols = typeChecker.getExportsOfModule(symbol);
+ return ts.forEach(exportedSymbols, symbolCanbeReferencedAtTypeLocation);
+ }
+ }
function getScopeNode(initialToken, position, sourceFile) {
var scope = initialToken;
while (scope && !ts.positionBelongsToNode(scope, position, sourceFile)) {
@@ -60806,43 +62987,39 @@ var ts;
}
function tryGetObjectLikeCompletionSymbols(objectLikeContainer) {
isMemberCompletion = true;
- var typeForObject;
+ var typeMembers;
var existingMembers;
if (objectLikeContainer.kind === 178) {
isNewIdentifierLocation = true;
- typeForObject = typeChecker.getContextualType(objectLikeContainer);
- typeForObject = typeForObject && typeForObject.getNonNullableType();
+ var typeForObject = typeChecker.getContextualType(objectLikeContainer);
+ if (!typeForObject)
+ return false;
+ typeMembers = typeChecker.getAllPossiblePropertiesOfType(typeForObject);
existingMembers = objectLikeContainer.properties;
}
- else if (objectLikeContainer.kind === 174) {
+ else {
+ ts.Debug.assert(objectLikeContainer.kind === 174);
isNewIdentifierLocation = false;
var rootDeclaration = ts.getRootDeclaration(objectLikeContainer.parent);
- if (ts.isVariableLike(rootDeclaration)) {
- var canGetType = !!(rootDeclaration.initializer || rootDeclaration.type);
- if (!canGetType && rootDeclaration.kind === 146) {
- if (ts.isExpression(rootDeclaration.parent)) {
- canGetType = !!typeChecker.getContextualType(rootDeclaration.parent);
- }
- else if (rootDeclaration.parent.kind === 151 || rootDeclaration.parent.kind === 154) {
- canGetType = ts.isExpression(rootDeclaration.parent.parent) && !!typeChecker.getContextualType(rootDeclaration.parent.parent);
- }
+ if (!ts.isVariableLike(rootDeclaration))
+ throw ts.Debug.fail("Root declaration is not variable-like.");
+ var canGetType = rootDeclaration.initializer || rootDeclaration.type || rootDeclaration.parent.parent.kind === 216;
+ if (!canGetType && rootDeclaration.kind === 146) {
+ if (ts.isExpression(rootDeclaration.parent)) {
+ canGetType = !!typeChecker.getContextualType(rootDeclaration.parent);
}
- if (canGetType) {
- typeForObject = typeChecker.getTypeAtLocation(objectLikeContainer);
- existingMembers = objectLikeContainer.elements;
+ else if (rootDeclaration.parent.kind === 151 || rootDeclaration.parent.kind === 154) {
+ canGetType = ts.isExpression(rootDeclaration.parent.parent) && !!typeChecker.getContextualType(rootDeclaration.parent.parent);
}
}
- else {
- ts.Debug.fail("Root declaration is not variable-like.");
+ if (canGetType) {
+ var typeForObject = typeChecker.getTypeAtLocation(objectLikeContainer);
+ if (!typeForObject)
+ return false;
+ typeMembers = typeChecker.getPropertiesOfType(typeForObject);
+ existingMembers = objectLikeContainer.elements;
}
}
- else {
- ts.Debug.fail("Expected object literal or binding pattern, got " + objectLikeContainer.kind);
- }
- if (!typeForObject) {
- return false;
- }
- var typeMembers = typeChecker.getPropertiesOfType(typeForObject);
if (typeMembers && typeMembers.length > 0) {
symbols = filterObjectMembersList(typeMembers, existingMembers);
}
@@ -60868,13 +63045,49 @@ var ts;
symbols = filterNamedImportOrExportCompletionItems(exports, namedImportsOrExports.elements);
return true;
}
+ function getGetClassLikeCompletionSymbols(classLikeDeclaration) {
+ isMemberCompletion = true;
+ isNewIdentifierLocation = true;
+ hasFilteredClassMemberKeywords = true;
+ var baseTypeNode = ts.getClassExtendsHeritageClauseElement(classLikeDeclaration);
+ var implementsTypeNodes = ts.getClassImplementsHeritageClauseElements(classLikeDeclaration);
+ if (baseTypeNode || implementsTypeNodes) {
+ var classElement = contextToken.parent;
+ var classElementModifierFlags = ts.isClassElement(classElement) && ts.getModifierFlags(classElement);
+ if (contextToken.kind === 71 && !isCurrentlyEditingNode(contextToken)) {
+ switch (contextToken.getText()) {
+ case "private":
+ classElementModifierFlags = classElementModifierFlags | 8;
+ break;
+ case "static":
+ classElementModifierFlags = classElementModifierFlags | 32;
+ break;
+ }
+ }
+ if (!(classElementModifierFlags & 8)) {
+ var baseClassTypeToGetPropertiesFrom = void 0;
+ if (baseTypeNode) {
+ baseClassTypeToGetPropertiesFrom = typeChecker.getTypeAtLocation(baseTypeNode);
+ if (classElementModifierFlags & 32) {
+ baseClassTypeToGetPropertiesFrom = typeChecker.getTypeOfSymbolAtLocation(baseClassTypeToGetPropertiesFrom.symbol, classLikeDeclaration);
+ }
+ }
+ var implementedInterfaceTypePropertySymbols = (classElementModifierFlags & 32) ?
+ undefined :
+ ts.flatMap(implementsTypeNodes, function (typeNode) { return typeChecker.getPropertiesOfType(typeChecker.getTypeAtLocation(typeNode)); });
+ symbols = filterClassMembersList(baseClassTypeToGetPropertiesFrom ?
+ typeChecker.getPropertiesOfType(baseClassTypeToGetPropertiesFrom) :
+ undefined, implementedInterfaceTypePropertySymbols, classLikeDeclaration.members, classElementModifierFlags);
+ }
+ }
+ }
function tryGetObjectLikeCompletionContainer(contextToken) {
if (contextToken) {
switch (contextToken.kind) {
case 17:
case 26:
var parent = contextToken.parent;
- if (parent && (parent.kind === 178 || parent.kind === 174)) {
+ if (ts.isObjectLiteralExpression(parent) || ts.isObjectBindingPattern(parent)) {
return parent;
}
break;
@@ -60896,6 +63109,37 @@ var ts;
}
return undefined;
}
+ function isFromClassElementDeclaration(node) {
+ return ts.isClassElement(node.parent) && ts.isClassLike(node.parent.parent);
+ }
+ function tryGetClassLikeCompletionContainer(contextToken) {
+ if (contextToken) {
+ switch (contextToken.kind) {
+ case 17:
+ if (ts.isClassLike(contextToken.parent)) {
+ return contextToken.parent;
+ }
+ break;
+ case 26:
+ case 25:
+ case 18:
+ if (ts.isClassLike(location)) {
+ return location;
+ }
+ break;
+ default:
+ if (isFromClassElementDeclaration(contextToken) &&
+ (isClassMemberCompletionKeyword(contextToken.kind) ||
+ isClassMemberCompletionKeywordText(contextToken.getText()))) {
+ return contextToken.parent.parent;
+ }
+ }
+ }
+ if (location && location.kind === 295 && ts.isClassLike(location.parent)) {
+ return location.parent;
+ }
+ return undefined;
+ }
function tryGetContainingJsxElement(contextToken) {
if (contextToken) {
var parent = contextToken.parent;
@@ -60933,19 +63177,6 @@ var ts;
}
return undefined;
}
- function isFunction(kind) {
- if (!ts.isFunctionLikeKind(kind)) {
- return false;
- }
- switch (kind) {
- case 152:
- case 161:
- case 160:
- return false;
- default:
- return true;
- }
- }
function isSolelyIdentifierDefinitionLocation(contextToken) {
var containingNodeKind = contextToken.parent.kind;
switch (contextToken.kind) {
@@ -60954,7 +63185,7 @@ var ts;
containingNodeKind === 227 ||
containingNodeKind === 208 ||
containingNodeKind === 232 ||
- isFunction(containingNodeKind) ||
+ isFunctionLikeButNotConstructor(containingNodeKind) ||
containingNodeKind === 229 ||
containingNodeKind === 199 ||
containingNodeKind === 230 ||
@@ -60968,7 +63199,7 @@ var ts;
return containingNodeKind === 175;
case 19:
return containingNodeKind === 260 ||
- isFunction(containingNodeKind);
+ isFunctionLikeButNotConstructor(containingNodeKind);
case 17:
return containingNodeKind === 232 ||
containingNodeKind === 230 ||
@@ -60983,9 +63214,9 @@ var ts;
containingNodeKind === 199 ||
containingNodeKind === 230 ||
containingNodeKind === 231 ||
- isFunction(containingNodeKind);
+ ts.isFunctionLikeKind(containingNodeKind);
case 115:
- return containingNodeKind === 149;
+ return containingNodeKind === 149 && !ts.isClassLike(contextToken.parent.parent);
case 24:
return containingNodeKind === 146 ||
(contextToken.parent && contextToken.parent.parent &&
@@ -60998,13 +63229,16 @@ var ts;
return containingNodeKind === 242 ||
containingNodeKind === 246 ||
containingNodeKind === 240;
+ case 125:
+ case 135:
+ if (isFromClassElementDeclaration(contextToken)) {
+ return false;
+ }
case 75:
case 83:
case 109:
case 89:
case 104:
- case 125:
- case 135:
case 91:
case 110:
case 76:
@@ -61012,6 +63246,10 @@ var ts;
case 138:
return true;
}
+ if (isClassMemberCompletionKeywordText(contextToken.getText()) &&
+ isFromClassElementDeclaration(contextToken)) {
+ return false;
+ }
switch (contextToken.getText()) {
case "abstract":
case "async":
@@ -61032,6 +63270,9 @@ var ts;
}
return false;
}
+ function isFunctionLikeButNotConstructor(kind) {
+ return ts.isFunctionLikeKind(kind) && kind !== 152;
+ }
function isDotOfNumericLiteral(contextToken) {
if (contextToken.kind === 8) {
var text = contextToken.getFullText();
@@ -61043,7 +63284,7 @@ var ts;
var existingImportsOrExports = ts.createMap();
for (var _i = 0, namedImportsOrExports_1 = namedImportsOrExports; _i < namedImportsOrExports_1.length; _i++) {
var element = namedImportsOrExports_1[_i];
- if (element.getStart() <= position && position <= element.getEnd()) {
+ if (isCurrentlyEditingNode(element)) {
continue;
}
var name = element.propertyName || element.name;
@@ -61069,7 +63310,7 @@ var ts;
m.kind !== 154) {
continue;
}
- if (m.getStart() <= position && position <= m.getEnd()) {
+ if (isCurrentlyEditingNode(m)) {
continue;
}
var existingName = void 0;
@@ -61079,17 +63320,51 @@ var ts;
}
}
else {
- existingName = m.name.text;
+ existingName = ts.getNameOfDeclaration(m).text;
}
existingMemberNames.set(existingName, true);
}
return ts.filter(contextualMemberSymbols, function (m) { return !existingMemberNames.get(m.name); });
}
+ function filterClassMembersList(baseSymbols, implementingTypeSymbols, existingMembers, currentClassElementModifierFlags) {
+ var existingMemberNames = ts.createMap();
+ for (var _i = 0, existingMembers_2 = existingMembers; _i < existingMembers_2.length; _i++) {
+ var m = existingMembers_2[_i];
+ if (m.kind !== 149 &&
+ m.kind !== 151 &&
+ m.kind !== 153 &&
+ m.kind !== 154) {
+ continue;
+ }
+ if (isCurrentlyEditingNode(m)) {
+ continue;
+ }
+ if (ts.hasModifier(m, 8)) {
+ continue;
+ }
+ var mIsStatic = ts.hasModifier(m, 32);
+ var currentElementIsStatic = !!(currentClassElementModifierFlags & 32);
+ if ((mIsStatic && !currentElementIsStatic) ||
+ (!mIsStatic && currentElementIsStatic)) {
+ continue;
+ }
+ var existingName = ts.getPropertyNameForPropertyNameNode(m.name);
+ if (existingName) {
+ existingMemberNames.set(existingName, true);
+ }
+ }
+ return ts.concatenate(ts.filter(baseSymbols, function (baseProperty) { return isValidProperty(baseProperty, 8); }), ts.filter(implementingTypeSymbols, function (implementingProperty) { return isValidProperty(implementingProperty, 24); }));
+ function isValidProperty(propertySymbol, inValidModifierFlags) {
+ return !existingMemberNames.get(propertySymbol.name) &&
+ propertySymbol.getDeclarations() &&
+ !(ts.getDeclarationModifierFlagsFromSymbol(propertySymbol) & inValidModifierFlags);
+ }
+ }
function filterJsxAttributes(symbols, attributes) {
var seenNames = ts.createMap();
for (var _i = 0, attributes_1 = attributes; _i < attributes_1.length; _i++) {
var attr = attributes_1[_i];
- if (attr.getStart() <= position && position <= attr.getEnd()) {
+ if (isCurrentlyEditingNode(attr)) {
continue;
}
if (attr.kind === 253) {
@@ -61098,6 +63373,9 @@ var ts;
}
return ts.filter(symbols, function (a) { return !seenNames.get(a.name); });
}
+ function isCurrentlyEditingNode(node) {
+ return node.getStart() <= position && position <= node.getEnd();
+ }
}
function getCompletionEntryDisplayNameForSymbol(typeChecker, symbol, target, performCharacterChecks, location) {
var displayName = ts.getDeclaredName(typeChecker, symbol, location);
@@ -61133,6 +63411,27 @@ var ts;
sortText: "0"
});
}
+ function isClassMemberCompletionKeyword(kind) {
+ switch (kind) {
+ case 114:
+ case 113:
+ case 112:
+ case 117:
+ case 115:
+ case 123:
+ case 131:
+ case 125:
+ case 135:
+ case 120:
+ return true;
+ }
+ }
+ function isClassMemberCompletionKeywordText(text) {
+ return isClassMemberCompletionKeyword(ts.stringToToken(text));
+ }
+ var classMemberKeywordCompletions = ts.filter(keywordCompletions, function (entry) {
+ return isClassMemberCompletionKeywordText(entry.name);
+ });
function isEqualityExpression(node) {
return ts.isBinaryExpression(node) && isEqualityOperatorKind(node.operatorToken.kind);
}
@@ -61142,28 +63441,64 @@ var ts;
kind === 34 ||
kind === 35;
}
+ function getJsDocTagAtPosition(node, position) {
+ var jsDoc = getJsDocHavingNode(node).jsDoc;
+ if (!jsDoc)
+ return undefined;
+ for (var _i = 0, jsDoc_1 = jsDoc; _i < jsDoc_1.length; _i++) {
+ var _a = jsDoc_1[_i], pos = _a.pos, end = _a.end, tags = _a.tags;
+ if (!tags || position < pos || position > end)
+ continue;
+ for (var i = tags.length - 1; i >= 0; i--) {
+ var tag = tags[i];
+ if (position >= tag.pos) {
+ return tag;
+ }
+ }
+ }
+ }
+ function getJsDocHavingNode(node) {
+ if (!ts.isToken(node))
+ return node;
+ switch (node.kind) {
+ case 104:
+ case 110:
+ case 76:
+ return node.parent.parent;
+ default:
+ return node.parent;
+ }
+ }
})(Completions = ts.Completions || (ts.Completions = {}));
})(ts || (ts = {}));
var ts;
(function (ts) {
var DocumentHighlights;
(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));
+ function getDocumentHighlights(program, cancellationToken, sourceFile, position, sourceFilesToSearch) {
+ var node = ts.getTouchingWord(sourceFile, position, true);
+ if (!node)
+ return undefined;
+ if (ts.isJsxOpeningElement(node.parent) && node.parent.tagName === node || ts.isJsxClosingElement(node.parent)) {
+ var _a = node.parent.parent, openingElement = _a.openingElement, closingElement = _a.closingElement;
+ var highlightSpans = [openingElement, closingElement].map(function (_a) {
+ var tagName = _a.tagName;
+ return getHighlightSpanForNode(tagName, sourceFile);
+ });
+ return [{ fileName: sourceFile.fileName, highlightSpans: highlightSpans }];
+ }
+ return getSemanticDocumentHighlights(node, program, 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),
+ textSpan: ts.createTextSpanFromNode(node, sourceFile),
kind: ts.HighlightSpanKind.none
};
}
- function getSemanticDocumentHighlights(node, typeChecker, cancellationToken, sourceFilesToSearch) {
- var referenceEntries = ts.FindAllReferences.getReferenceEntriesForNode(node, sourceFilesToSearch, typeChecker, cancellationToken);
+ function getSemanticDocumentHighlights(node, program, cancellationToken, sourceFilesToSearch) {
+ var referenceEntries = ts.FindAllReferences.getReferenceEntriesForNode(node, program, sourceFilesToSearch, cancellationToken);
return referenceEntries && convertReferencedSymbols(referenceEntries);
}
function convertReferencedSymbols(referenceEntries) {
@@ -61774,7 +64109,7 @@ var ts;
}
function handleDirectImports(exportingModuleSymbol) {
var theseDirectImports = getDirectImports(exportingModuleSymbol);
- if (theseDirectImports)
+ if (theseDirectImports) {
for (var _i = 0, theseDirectImports_1 = theseDirectImports; _i < theseDirectImports_1.length; _i++) {
var direct = theseDirectImports_1[_i];
if (!markSeenDirectImport(direct)) {
@@ -61817,6 +64152,7 @@ var ts;
break;
}
}
+ }
}
function handleNamespaceImport(importDeclaration, name, isReExport) {
if (exportKind === 2) {
@@ -61848,11 +64184,12 @@ var ts;
var moduleSymbol = checker.getMergedSymbol(sourceFileLike.symbol);
ts.Debug.assert(!!(moduleSymbol.flags & 1536));
var directImports = getDirectImports(moduleSymbol);
- if (directImports)
+ 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());
@@ -61865,11 +64202,12 @@ var ts;
function addSearch(location, symbol) {
importSearches.push([location, symbol]);
}
- if (directImports)
+ 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 === 237) {
@@ -61889,6 +64227,9 @@ var ts;
searchForNamedImport(decl.exportClause);
return;
}
+ if (!decl.importClause) {
+ return;
+ }
var importClause = decl.importClause;
var namedBindings = importClause.namedBindings;
if (namedBindings && namedBindings.kind === 240) {
@@ -61916,7 +64257,7 @@ var ts;
}
}
function searchForNamedImport(namedBindings) {
- if (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;
@@ -61936,6 +64277,7 @@ var ts;
addSearch(name, localSymbol);
}
}
+ }
}
}
function findNamespaceReExports(sourceFileLike, name, checker) {
@@ -61954,10 +64296,41 @@ var ts;
}
});
}
+ function findModuleReferences(program, sourceFiles, searchModuleSymbol) {
+ var refs = [];
+ var checker = program.getTypeChecker();
+ for (var _i = 0, sourceFiles_4 = sourceFiles; _i < sourceFiles_4.length; _i++) {
+ var referencingFile = sourceFiles_4[_i];
+ var searchSourceFile = searchModuleSymbol.valueDeclaration;
+ if (searchSourceFile.kind === 265) {
+ for (var _a = 0, _b = referencingFile.referencedFiles; _a < _b.length; _a++) {
+ var ref = _b[_a];
+ if (program.getSourceFileFromReference(referencingFile, ref) === searchSourceFile) {
+ refs.push({ kind: "reference", referencingFile: referencingFile, ref: ref });
+ }
+ }
+ for (var _c = 0, _d = referencingFile.typeReferenceDirectives; _c < _d.length; _c++) {
+ var ref = _d[_c];
+ var referenced = program.getResolvedTypeReferenceDirectives().get(ref.fileName);
+ if (referenced !== undefined && referenced.resolvedFileName === searchSourceFile.fileName) {
+ refs.push({ kind: "reference", referencingFile: referencingFile, ref: ref });
+ }
+ }
+ }
+ forEachImport(referencingFile, function (_importDecl, moduleSpecifier) {
+ var moduleSymbol = checker.getSymbolAtLocation(moduleSpecifier);
+ if (moduleSymbol === searchModuleSymbol) {
+ refs.push({ kind: "import", literal: moduleSpecifier });
+ }
+ });
+ }
+ return refs;
+ }
+ FindAllReferences.findModuleReferences = findModuleReferences;
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];
+ for (var _i = 0, sourceFiles_5 = sourceFiles; _i < sourceFiles_5.length; _i++) {
+ var sourceFile = sourceFiles_5[_i];
cancellationToken.throwIfCancellationRequested();
forEachImport(sourceFile, function (importDecl, moduleSpecifier) {
var moduleSymbol = checker.getSymbolAtLocation(moduleSpecifier);
@@ -61979,7 +64352,7 @@ var ts;
});
}
function forEachImport(sourceFile, action) {
- if (sourceFile.externalModuleIndicator) {
+ if (sourceFile.externalModuleIndicator || sourceFile.imports !== undefined) {
for (var _i = 0, _a = sourceFile.imports; _i < _a.length; _i++) {
var moduleSpecifier = _a[_i];
action(importerFromModuleSpecifier(moduleSpecifier), moduleSpecifier);
@@ -62007,25 +64380,20 @@ var ts;
}
}
});
- 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 === 238 || decl.kind === 244) {
- return decl;
+ switch (decl.kind) {
+ case 181:
+ case 238:
+ case 244:
+ return decl;
+ case 248:
+ return decl.parent;
+ default:
+ ts.Debug.fail("Unexpected module specifier parent: " + decl.kind);
}
- ts.Debug.assert(decl.kind === 248);
- return decl.parent;
}
function getImportOrExportSymbol(node, symbol, checker, comingFromExport) {
return comingFromExport ? getExport() : getExport() || getImport();
@@ -62033,7 +64401,7 @@ var ts;
var parent = node.parent;
if (symbol.flags & 7340032) {
if (parent.kind === 179) {
- return symbol.declarations.some(function (d) { return d === parent; }) && parent.parent.kind === 194
+ return symbol.declarations.some(function (d) { return d === parent; }) && ts.isBinaryExpression(parent.parent)
? getSpecialPropertyExport(parent.parent, false)
: undefined;
}
@@ -62046,7 +64414,7 @@ var ts;
else {
var exportNode = getExportNode(parent);
if (exportNode && ts.hasModifier(exportNode, 1)) {
- if (exportNode.kind === 237 && exportNode.moduleReference === node) {
+ if (ts.isImportEqualsDeclaration(exportNode) && exportNode.moduleReference === node) {
if (comingFromExport) {
return undefined;
}
@@ -62057,18 +64425,24 @@ var ts;
return exportInfo(symbol, getExportKindForDeclaration(exportNode));
}
}
- else if (parent.kind === 243) {
- var exportingModuleSymbol = parent.symbol.parent;
- ts.Debug.assert(!!exportingModuleSymbol);
- return { kind: 1, symbol: symbol, exportInfo: { exportingModuleSymbol: exportingModuleSymbol, exportKind: 2 } };
+ else if (ts.isExportAssignment(parent)) {
+ return getExportAssignmentExport(parent);
+ }
+ else if (ts.isExportAssignment(parent.parent)) {
+ return getExportAssignmentExport(parent.parent);
}
- else if (parent.kind === 194) {
+ else if (ts.isBinaryExpression(parent)) {
return getSpecialPropertyExport(parent, true);
}
- else if (parent.parent.kind === 194) {
+ else if (ts.isBinaryExpression(parent.parent)) {
return getSpecialPropertyExport(parent.parent, true);
}
}
+ function getExportAssignmentExport(ex) {
+ var exportingModuleSymbol = ex.symbol.parent;
+ ts.Debug.assert(!!exportingModuleSymbol);
+ return { kind: 1, symbol: symbol, exportInfo: { exportingModuleSymbol: exportingModuleSymbol, exportKind: 2 } };
+ }
function getSpecialPropertyExport(node, useLhsSymbol) {
var kind;
switch (ts.getSpecialPropertyAssignmentKind(node)) {
@@ -62088,16 +64462,16 @@ var ts;
function getImport() {
var isImport = isNodeImport(node);
if (!isImport)
- return;
+ return undefined;
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);
- }
+ if (!importedSymbol)
+ return undefined;
+ importedSymbol = skipExportSpecifierSymbol(importedSymbol, checker);
+ if (importedSymbol.name === "export=") {
+ importedSymbol = getExportEqualsLocalSymbol(importedSymbol, checker);
+ }
+ if (symbolName(importedSymbol) === symbol.name) {
+ return __assign({ kind: 0, symbol: importedSymbol }, isImport);
}
}
function exportInfo(symbol, kind) {
@@ -62109,6 +64483,19 @@ var ts;
}
}
FindAllReferences.getImportOrExportSymbol = getImportOrExportSymbol;
+ function getExportEqualsLocalSymbol(importedSymbol, checker) {
+ if (importedSymbol.flags & 8388608) {
+ return checker.getImmediateAliasedSymbol(importedSymbol);
+ }
+ var decl = importedSymbol.valueDeclaration;
+ if (ts.isExportAssignment(decl)) {
+ return decl.expression.symbol;
+ }
+ else if (ts.isBinaryExpression(decl)) {
+ return decl.right.symbol;
+ }
+ ts.Debug.fail();
+ }
function getExportNode(parent) {
if (parent.kind === 226) {
var p = parent;
@@ -62144,21 +64531,23 @@ var ts;
if (symbol.name !== "default") {
return symbol.name;
}
- var name = ts.forEach(symbol.declarations, function (_a) {
- var name = _a.name;
+ return ts.forEach(symbol.declarations, function (decl) {
+ if (ts.isExportAssignment(decl)) {
+ return ts.isIdentifier(decl.expression) ? decl.expression.text : undefined;
+ }
+ var name = ts.getNameOfDeclaration(decl);
return name && name.kind === 71 && name.text;
});
- ts.Debug.assert(!!name);
- return name;
}
function skipExportSpecifierSymbol(symbol, checker) {
- if (symbol.declarations)
+ 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) {
@@ -62192,12 +64581,13 @@ var ts;
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);
+ function findReferencedSymbols(program, cancellationToken, sourceFiles, sourceFile, position) {
+ var referencedSymbols = findAllReferencedSymbols(program, cancellationToken, sourceFiles, sourceFile, position);
if (!referencedSymbols || !referencedSymbols.length) {
return undefined;
}
var out = [];
+ var checker = program.getTypeChecker();
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) {
@@ -62207,39 +64597,44 @@ var ts;
return out;
}
FindAllReferences.findReferencedSymbols = findReferencedSymbols;
- function getImplementationsAtPosition(checker, cancellationToken, sourceFiles, sourceFile, position) {
- var node = ts.getTouchingPropertyName(sourceFile, position);
- var referenceEntries = getImplementationReferenceEntries(checker, cancellationToken, sourceFiles, node);
+ function getImplementationsAtPosition(program, cancellationToken, sourceFiles, sourceFile, position) {
+ var node = ts.getTouchingPropertyName(sourceFile, position, false);
+ var referenceEntries = getImplementationReferenceEntries(program, cancellationToken, sourceFiles, node);
+ var checker = program.getTypeChecker();
return ts.map(referenceEntries, function (entry) { return toImplementationLocation(entry, checker); });
}
FindAllReferences.getImplementationsAtPosition = getImplementationsAtPosition;
- function getImplementationReferenceEntries(typeChecker, cancellationToken, sourceFiles, node) {
+ function getImplementationReferenceEntries(program, cancellationToken, sourceFiles, node) {
+ if (node.kind === 265) {
+ return undefined;
+ }
+ var checker = program.getTypeChecker();
if (node.parent.kind === 262) {
- var result_4 = [];
- FindAllReferences.Core.getReferenceEntriesForShorthandPropertyAssignment(node, typeChecker, function (node) { return result_4.push(nodeEntry(node)); });
- return result_4;
+ var result_5 = [];
+ FindAllReferences.Core.getReferenceEntriesForShorthandPropertyAssignment(node, checker, function (node) { return result_5.push(nodeEntry(node)); });
+ return result_5;
}
else if (node.kind === 97 || ts.isSuperProperty(node.parent)) {
- var symbol = typeChecker.getSymbolAtLocation(node);
+ var symbol = checker.getSymbolAtLocation(node);
return symbol.valueDeclaration && [nodeEntry(symbol.valueDeclaration)];
}
else {
- return getReferenceEntriesForNode(node, sourceFiles, typeChecker, cancellationToken, { implementations: true });
+ return getReferenceEntriesForNode(node, program, sourceFiles, cancellationToken, { implementations: true });
}
}
- function findReferencedEntries(checker, cancellationToken, sourceFiles, sourceFile, position, options) {
- var x = flattenEntries(findAllReferencedSymbols(checker, cancellationToken, sourceFiles, sourceFile, position, options));
+ function findReferencedEntries(program, cancellationToken, sourceFiles, sourceFile, position, options) {
+ var x = flattenEntries(findAllReferencedSymbols(program, cancellationToken, sourceFiles, sourceFile, position, options));
return ts.map(x, toReferenceEntry);
}
FindAllReferences.findReferencedEntries = findReferencedEntries;
- function getReferenceEntriesForNode(node, sourceFiles, checker, cancellationToken, options) {
+ function getReferenceEntriesForNode(node, program, sourceFiles, cancellationToken, options) {
if (options === void 0) { options = {}; }
- return flattenEntries(FindAllReferences.Core.getReferencedSymbolsForNode(node, sourceFiles, checker, cancellationToken, options));
+ return flattenEntries(FindAllReferences.Core.getReferencedSymbolsForNode(node, program, sourceFiles, cancellationToken, options));
}
FindAllReferences.getReferenceEntriesForNode = getReferenceEntriesForNode;
- function findAllReferencedSymbols(checker, cancellationToken, sourceFiles, sourceFile, position, options) {
+ function findAllReferencedSymbols(program, cancellationToken, sourceFiles, sourceFile, position, options) {
var node = ts.getTouchingPropertyName(sourceFile, position, true);
- return FindAllReferences.Core.getReferencedSymbolsForNode(node, sourceFiles, checker, cancellationToken, options);
+ return FindAllReferences.Core.getReferencedSymbolsForNode(node, program, sourceFiles, cancellationToken, options);
}
function flattenEntries(referenceSymbols) {
return referenceSymbols && ts.flatMap(referenceSymbols, function (r) { return r.references; });
@@ -62249,10 +64644,6 @@ var ts;
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 };
@@ -62306,7 +64697,7 @@ var ts;
fileName: node.getSourceFile().fileName,
textSpan: getTextSpan(node),
isWriteAccess: isWriteAccess(node),
- isDefinition: ts.isDeclarationName(node) || ts.isLiteralComputedPropertyDeclarationName(node),
+ isDefinition: ts.isAnyDeclarationName(node) || ts.isLiteralComputedPropertyDeclarationName(node),
isInString: isInString
};
}
@@ -62367,20 +64758,19 @@ var ts;
return ts.createTextSpanFromBounds(start, end);
}
function isWriteAccess(node) {
- if (node.kind === 71 && ts.isDeclarationName(node)) {
+ if (ts.isAnyDeclarationName(node)) {
return true;
}
var parent = node.parent;
- if (parent) {
- if (parent.kind === 193 || parent.kind === 192) {
+ switch (parent && parent.kind) {
+ case 193:
+ case 192:
return true;
- }
- else if (parent.kind === 194 && parent.left === node) {
- var operator = parent.operatorToken.kind;
- return 58 <= operator && operator <= 70;
- }
+ case 194:
+ return parent.left === node && ts.isAssignmentOperator(parent.operatorToken.kind);
+ default:
+ return false;
}
- return false;
}
})(FindAllReferences = ts.FindAllReferences || (ts.FindAllReferences = {}));
})(ts || (ts = {}));
@@ -62389,7 +64779,7 @@ var ts;
(function (FindAllReferences) {
var Core;
(function (Core) {
- function getReferencedSymbolsForNode(node, sourceFiles, checker, cancellationToken, options) {
+ function getReferencedSymbolsForNode(node, program, sourceFiles, cancellationToken, options) {
if (options === void 0) { options = {}; }
if (node.kind === 265) {
return undefined;
@@ -62400,6 +64790,7 @@ var ts;
return special;
}
}
+ var checker = program.getTypeChecker();
var symbol = checker.getSymbolAtLocation(node);
if (!symbol) {
if (!options.implementations && node.kind === 9) {
@@ -62407,12 +64798,59 @@ var ts;
}
return undefined;
}
- if (!symbol.declarations || !symbol.declarations.length) {
- return undefined;
+ if (symbol.flags & 1536 && isModuleReferenceLocation(node)) {
+ return getReferencedSymbolsForModule(program, symbol, sourceFiles);
}
return getReferencedSymbolsForSymbol(symbol, node, sourceFiles, checker, cancellationToken, options);
}
Core.getReferencedSymbolsForNode = getReferencedSymbolsForNode;
+ function isModuleReferenceLocation(node) {
+ if (node.kind !== 9) {
+ return false;
+ }
+ switch (node.parent.kind) {
+ case 233:
+ case 248:
+ case 238:
+ case 244:
+ return true;
+ case 181:
+ return ts.isRequireCall(node.parent, false) || ts.isImportCall(node.parent);
+ default:
+ return false;
+ }
+ }
+ function getReferencedSymbolsForModule(program, symbol, sourceFiles) {
+ ts.Debug.assert(!!symbol.valueDeclaration);
+ var references = FindAllReferences.findModuleReferences(program, sourceFiles, symbol).map(function (reference) {
+ if (reference.kind === "import") {
+ return { type: "node", node: reference.literal };
+ }
+ else {
+ return {
+ type: "span",
+ fileName: reference.referencingFile.fileName,
+ textSpan: ts.createTextSpanFromRange(reference.ref),
+ };
+ }
+ });
+ for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
+ var decl = _a[_i];
+ switch (decl.kind) {
+ case 265:
+ break;
+ case 233:
+ references.push({ type: "node", node: decl.name });
+ break;
+ default:
+ ts.Debug.fail("Expected a module symbol to be declared by a SourceFile or ModuleDeclaration.");
+ }
+ }
+ return [{
+ definition: { type: "symbol", symbol: symbol, node: symbol.valueDeclaration },
+ references: references
+ }];
+ }
function getReferencedSymbolsSpecial(node, sourceFiles, cancellationToken) {
if (ts.isTypeKeyword(node.kind)) {
return getAllReferencesForKeyword(sourceFiles, node.kind, cancellationToken);
@@ -62438,7 +64876,7 @@ var ts;
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 state = new State(sourceFiles, node.kind === 123, 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) {
@@ -62463,51 +64901,59 @@ var ts;
}
return symbol;
}
- function createState(sourceFiles, originalLocation, checker, cancellationToken, searchMeaning, options, result) {
- var symbolIdToReferences = [];
- var inheritsFromCache = ts.createMap();
- var sourceFileToSeenSymbols = [];
- var isForConstructor = originalLocation.kind === 123;
- 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) {
+ var State = (function () {
+ function State(sourceFiles, isForConstructor, checker, cancellationToken, searchMeaning, options, result) {
+ this.sourceFiles = sourceFiles;
+ this.isForConstructor = isForConstructor;
+ this.checker = checker;
+ this.cancellationToken = cancellationToken;
+ this.searchMeaning = searchMeaning;
+ this.options = options;
+ this.result = result;
+ this.inheritsFromCache = ts.createMap();
+ this.markSeenContainingTypeReference = ts.nodeSeenTracker();
+ this.markSeenReExportRHS = ts.nodeSeenTracker();
+ this.symbolIdToReferences = [];
+ this.sourceFileToSeenSymbols = [];
+ }
+ State.prototype.getImportSearches = function (exportSymbol, exportInfo) {
+ if (!this.importTracker)
+ this.importTracker = FindAllReferences.createImportTracker(this.sourceFiles, this.checker, this.cancellationToken);
+ return this.importTracker(exportSymbol, exportInfo, this.options.isForRename);
+ };
+ State.prototype.createSearch = function (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 _a = searchOptions.text, text = _a === void 0 ? ts.stripQuotes(ts.getDeclaredName(this.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];
+ var parents = this.options.implementations && getParentSymbolsOfPropertyAccess(location, symbol, this.checker);
+ return {
+ location: location, symbol: symbol, comingFrom: comingFrom, text: text, escapedText: escapedText, parents: parents,
+ includes: function (referenceSymbol) { return allSearchSymbols ? ts.contains(allSearchSymbols, referenceSymbol) : referenceSymbol === symbol; },
+ };
+ };
+ State.prototype.referenceAdder = function (searchSymbol, searchLocation) {
+ var symbolId = ts.getSymbolId(searchSymbol);
+ var references = this.symbolIdToReferences[symbolId];
if (!references) {
- references = symbolIdToReferences[symbolId] = [];
- result.push({ definition: { type: "symbol", symbol: referenceSymbol, node: searchLocation }, references: references });
+ references = this.symbolIdToReferences[symbolId] = [];
+ this.result.push({ definition: { type: "symbol", symbol: searchSymbol, node: searchLocation }, references: references });
}
return function (node) { return references.push(FindAllReferences.nodeEntry(node)); };
- }
- function addStringOrCommentReference(fileName, textSpan) {
- result.push({
+ };
+ State.prototype.addStringOrCommentReference = function (fileName, textSpan) {
+ this.result.push({
definition: undefined,
references: [{ type: "span", fileName: fileName, textSpan: textSpan }]
});
- }
- function markSearchedSymbol(sourceFile, symbol) {
+ };
+ State.prototype.markSearchedSymbol = function (sourceFile, symbol) {
var sourceId = ts.getNodeId(sourceFile);
var symbolId = ts.getSymbolId(symbol);
- var seenSymbols = sourceFileToSeenSymbols[sourceId] || (sourceFileToSeenSymbols[sourceId] = []);
+ var seenSymbols = this.sourceFileToSeenSymbols[sourceId] || (this.sourceFileToSeenSymbols[sourceId] = []);
return !seenSymbols[symbolId] && (seenSymbols[symbolId] = true);
- }
- }
+ };
+ return State;
+ }());
function searchForImportsOfExport(exportLocation, exportSymbol, exportInfo, state) {
var _a = state.getImportSearches(exportSymbol, exportInfo), importSearches = _a.importSearches, singleReferences = _a.singleReferences, indirectUsers = _a.indirectUsers;
if (singleReferences.length) {
@@ -62528,7 +64974,7 @@ var ts;
indirectSearch = state.createSearch(exportLocation, exportSymbol, 1);
break;
case 1:
- indirectSearch = state.isForRename ? undefined : state.createSearch(exportLocation, exportSymbol, 1, { text: "default" });
+ indirectSearch = state.options.isForRename ? undefined : state.createSearch(exportLocation, exportSymbol, 1, { text: "default" });
break;
case 2:
break;
@@ -62579,10 +65025,11 @@ var ts;
return undefined;
}
if (flags & (4 | 8192)) {
- var privateDeclaration = ts.find(declarations, function (d) { return !!(ts.getModifierFlags(d) & 8); });
+ var privateDeclaration = ts.find(declarations, function (d) { return ts.hasModifier(d, 8); });
if (privateDeclaration) {
return ts.getAncestor(privateDeclaration, 229);
}
+ return undefined;
}
if (isObjectBindingPatternElementWithoutPropertyName(symbol)) {
return undefined;
@@ -62590,9 +65037,6 @@ var ts;
if (parent && !((parent.flags & 1536) && ts.isExternalModuleSymbol(parent) && !parent.globalExports)) {
return undefined;
}
- if ((flags & 134217728 && symbol.checkFlags & 6)) {
- return undefined;
- }
var scope;
for (var _i = 0, declarations_10 = declarations; _i < declarations_10.length; _i++) {
var declaration = declarations_10[_i];
@@ -62607,7 +65051,8 @@ var ts;
}
return parent ? scope.getSourceFile() : scope;
}
- function getPossibleSymbolReferencePositions(sourceFile, symbolName, start, end) {
+ function getPossibleSymbolReferencePositions(sourceFile, symbolName, container) {
+ if (container === void 0) { container = sourceFile; }
var positions = [];
if (!symbolName || !symbolName.length) {
return positions;
@@ -62615,9 +65060,9 @@ var ts;
var text = sourceFile.text;
var sourceLength = text.length;
var symbolNameLength = symbolName.length;
- var position = text.indexOf(symbolName, start);
+ var position = text.indexOf(symbolName, container.pos);
while (position >= 0) {
- if (position > end)
+ if (position > container.end)
break;
var endPosition = position + symbolNameLength;
if ((position === 0 || !ts.isIdentifierPart(text.charCodeAt(position - 1), 5)) &&
@@ -62632,15 +65077,11 @@ var ts;
var references = [];
var sourceFile = container.getSourceFile();
var labelName = targetLabel.text;
- var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, labelName, container.getStart(), container.getEnd());
+ var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, labelName, container);
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) {
- continue;
- }
- if (node === targetLabel ||
- (ts.isJumpStatementTarget(node) && ts.getTargetLabel(node, labelName) === targetLabel)) {
+ var node = ts.getTouchingWord(sourceFile, position, false);
+ if (node && (node === targetLabel || (ts.isJumpStatementTarget(node) && ts.getTargetLabel(node, labelName) === targetLabel))) {
references.push(FindAllReferences.nodeEntry(node));
}
}
@@ -62649,30 +65090,30 @@ var ts;
function isValidReferencePosition(node, searchSymbolName) {
switch (node && node.kind) {
case 71:
- return node.getWidth() === searchSymbolName.length;
+ return ts.unescapeIdentifier(node.text).length === searchSymbolName.length;
case 9:
return (ts.isLiteralNameOfPropertyDeclarationOrIndexAccess(node) || isNameOfExternalModuleImportOrDeclaration(node)) &&
- node.getWidth() === searchSymbolName.length + 2;
+ node.text.length === searchSymbolName.length;
case 8:
- return ts.isLiteralNameOfPropertyDeclarationOrIndexAccess(node) && node.getWidth() === searchSymbolName.length;
+ return ts.isLiteralNameOfPropertyDeclarationOrIndexAccess(node) && node.text.length === 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];
+ for (var _i = 0, sourceFiles_6 = sourceFiles; _i < sourceFiles_6.length; _i++) {
+ var sourceFile = sourceFiles_6[_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());
+ var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, searchText, sourceFile);
for (var _i = 0, possiblePositions_2 = possiblePositions; _i < possiblePositions_2.length; _i++) {
var position = possiblePositions_2[_i];
- var referenceLocation = ts.getTouchingPropertyName(sourceFile, position);
+ var referenceLocation = ts.getTouchingPropertyName(sourceFile, position, true);
if (referenceLocation.kind === kind) {
references.push(FindAllReferences.nodeEntry(referenceLocation));
}
@@ -62686,17 +65127,15 @@ var ts;
if (!state.markSearchedSymbol(sourceFile, search.symbol)) {
return;
}
- 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];
+ for (var _i = 0, _a = getPossibleSymbolReferencePositions(sourceFile, search.text, container); _i < _a.length; _i++) {
+ var position = _a[_i];
getReferencesAtLocation(sourceFile, position, search, state);
}
}
function getReferencesAtLocation(sourceFile, position, search, state) {
- var referenceLocation = ts.getTouchingPropertyName(sourceFile, position);
+ var referenceLocation = ts.getTouchingPropertyName(sourceFile, position, true);
if (!isValidReferencePosition(referenceLocation, search.text)) {
- if (!state.implementations && (state.findInStrings && ts.isInString(sourceFile, position) || state.findInComments && ts.isInNonReferenceComment(sourceFile, position))) {
+ if (!state.options.implementations && (state.options.findInStrings && ts.isInString(sourceFile, position) || state.options.findInComments && ts.isInNonReferenceComment(sourceFile, position))) {
state.addStringOrCommentReference(sourceFile.fileName, ts.createTextSpan(position, search.text.length));
}
return;
@@ -62744,7 +65183,7 @@ var ts;
if (!exportDeclaration.moduleSpecifier) {
addRef();
}
- if (!state.isForRename && state.markSeenReExportRHS(name)) {
+ if (!state.options.isForRename && state.markSeenReExportRHS(name)) {
addReference(name, referenceSymbol, name, state);
}
}
@@ -62753,7 +65192,7 @@ var ts;
addRef();
}
}
- if (!(referenceLocation === propertyName && state.isForRename)) {
+ if (!(referenceLocation === propertyName && state.options.isForRename)) {
var exportKind = referenceLocation.originalKeywordKind === 79 ? 1 : 0;
var exportInfo = FindAllReferences.getExportInfo(referenceSymbol, exportKind, state.checker);
ts.Debug.assert(!!exportInfo);
@@ -62785,7 +65224,7 @@ var ts;
return;
var symbol = importOrExport.symbol;
if (importOrExport.kind === 0) {
- if (!state.isForRename || importOrExport.isNamedImport) {
+ if (!state.options.isForRename || importOrExport.isNamedImport) {
searchForImportedSymbol(symbol, state);
}
}
@@ -62797,12 +65236,12 @@ var ts;
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);
+ addReference(ts.getNameOfDeclaration(valueDeclaration), shorthandValueSymbol, search.location, state);
}
}
function addReference(referenceLocation, relatedSymbol, searchLocation, state) {
var addRef = state.referenceAdder(relatedSymbol, searchLocation);
- if (state.implementations) {
+ if (state.options.implementations) {
addImplementationReferences(referenceLocation, addRef, state);
}
else {
@@ -63027,10 +65466,10 @@ var ts;
}
var references = [];
var sourceFile = searchSpaceNode.getSourceFile();
- var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "super", searchSpaceNode.getStart(), searchSpaceNode.getEnd());
- for (var _i = 0, possiblePositions_4 = possiblePositions; _i < possiblePositions_4.length; _i++) {
- var position = possiblePositions_4[_i];
- var node = ts.getTouchingWord(sourceFile, position);
+ var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "super", searchSpaceNode);
+ for (var _i = 0, possiblePositions_3 = possiblePositions; _i < possiblePositions_3.length; _i++) {
+ var position = possiblePositions_3[_i];
+ var node = ts.getTouchingWord(sourceFile, position, false);
if (!node || node.kind !== 97) {
continue;
}
@@ -63073,13 +65512,13 @@ var ts;
if (searchSpaceNode.kind === 265) {
ts.forEach(sourceFiles, function (sourceFile) {
cancellationToken.throwIfCancellationRequested();
- possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "this", sourceFile.getStart(), sourceFile.getEnd());
+ possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "this");
getThisReferencesInFile(sourceFile, sourceFile, possiblePositions, references);
});
}
else {
var sourceFile = searchSpaceNode.getSourceFile();
- possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "this", searchSpaceNode.getStart(), searchSpaceNode.getEnd());
+ possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "this", searchSpaceNode);
getThisReferencesInFile(sourceFile, searchSpaceNode, possiblePositions, references);
}
return [{
@@ -63088,7 +65527,7 @@ var ts;
}];
function getThisReferencesInFile(sourceFile, searchSpaceNode, possiblePositions, result) {
ts.forEach(possiblePositions, function (position) {
- var node = ts.getTouchingWord(sourceFile, position);
+ var node = ts.getTouchingWord(sourceFile, position, false);
if (!node || !ts.isThis(node)) {
return;
}
@@ -63123,10 +65562,10 @@ var ts;
}
function getReferencesForStringLiteral(node, sourceFiles, cancellationToken) {
var references = [];
- for (var _i = 0, sourceFiles_6 = sourceFiles; _i < sourceFiles_6.length; _i++) {
- var sourceFile = sourceFiles_6[_i];
+ for (var _i = 0, sourceFiles_7 = sourceFiles; _i < sourceFiles_7.length; _i++) {
+ var sourceFile = sourceFiles_7[_i];
cancellationToken.throwIfCancellationRequested();
- var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, node.text, sourceFile.getStart(), sourceFile.getEnd());
+ var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, node.text);
getReferencesForStringLiteralInFile(sourceFile, node.text, possiblePositions, references);
}
return [{
@@ -63134,9 +65573,9 @@ var ts;
references: references
}];
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);
+ for (var _i = 0, possiblePositions_4 = possiblePositions; _i < possiblePositions_4.length; _i++) {
+ var position = possiblePositions_4[_i];
+ var node_7 = ts.getTouchingWord(sourceFile, position, false);
if (node_7 && node_7.kind === 9 && node_7.text === searchText) {
references.push(FindAllReferences.nodeEntry(node_7, true));
}
@@ -63264,20 +65703,20 @@ var ts;
var contextualType = checker.getContextualType(objectLiteral);
var name = getNameFromObjectLiteralElement(node);
if (name && contextualType) {
- var result_5 = [];
+ var result_6 = [];
var symbol = contextualType.getProperty(name);
if (symbol) {
- result_5.push(symbol);
+ result_6.push(symbol);
}
if (contextualType.flags & 65536) {
ts.forEach(contextualType.types, function (t) {
var symbol = t.getProperty(name);
if (symbol) {
- result_5.push(symbol);
+ result_6.push(symbol);
}
});
}
- return result_5;
+ return result_6;
}
return undefined;
}
@@ -63390,7 +65829,6 @@ var ts;
if (referenceFile) {
return [getDefinitionInfoForFileReference(comment.fileName, referenceFile.fileName)];
}
- return undefined;
}
var typeReferenceDirective = findReferenceInPosition(sourceFile.typeReferenceDirectives, position);
if (typeReferenceDirective) {
@@ -63398,7 +65836,7 @@ var ts;
return referenceFile && referenceFile.resolvedFileName &&
[getDefinitionInfoForFileReference(typeReferenceDirective.fileName, referenceFile.resolvedFileName)];
}
- var node = ts.getTouchingPropertyName(sourceFile, position);
+ var node = ts.getTouchingPropertyName(sourceFile, position, true);
if (node === sourceFile) {
return undefined;
}
@@ -63416,12 +65854,10 @@ var ts;
if (!symbol) {
return undefined;
}
- if (symbol.flags & 8388608) {
- var declaration = symbol.declarations[0];
- if (node.kind === 71 &&
- (node.parent === declaration ||
- (declaration.kind === 242 && declaration.parent && declaration.parent.kind === 241))) {
- symbol = typeChecker.getAliasedSymbol(symbol);
+ if (symbol.flags & 8388608 && shouldSkipAlias(node, symbol.declarations[0])) {
+ var aliased = typeChecker.getAliasedSymbol(symbol);
+ if (aliased.declarations) {
+ symbol = aliased;
}
}
if (node.parent.kind === 262) {
@@ -63435,27 +65871,17 @@ 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;
- }
+ if (element && typeChecker.getContextualType(element.parent)) {
+ return ts.flatMap(ts.getPropertySymbolsFromContextualType(typeChecker, element), function (propertySymbol) {
+ return getDefinitionFromSymbol(typeChecker, propertySymbol, node);
+ });
}
return getDefinitionFromSymbol(typeChecker, symbol, node);
}
GoToDefinition.getDefinitionAtPosition = getDefinitionAtPosition;
function getTypeDefinitionAtPosition(typeChecker, sourceFile, position) {
- var node = ts.getTouchingPropertyName(sourceFile, position);
+ var node = ts.getTouchingPropertyName(sourceFile, position, true);
if (node === sourceFile) {
return undefined;
}
@@ -63468,13 +65894,13 @@ var ts;
return undefined;
}
if (type.flags & 65536 && !(type.flags & 16)) {
- var result_6 = [];
+ var result_7 = [];
ts.forEach(type.types, function (t) {
if (t.symbol) {
- ts.addRange(result_6, getDefinitionFromSymbol(typeChecker, t.symbol, node));
+ ts.addRange(result_7, getDefinitionFromSymbol(typeChecker, t.symbol, node));
}
});
- return result_6;
+ return result_7;
}
if (!type.symbol) {
return undefined;
@@ -63482,6 +65908,23 @@ var ts;
return getDefinitionFromSymbol(typeChecker, type.symbol, node);
}
GoToDefinition.getTypeDefinitionAtPosition = getTypeDefinitionAtPosition;
+ function shouldSkipAlias(node, declaration) {
+ if (node.kind !== 71) {
+ return false;
+ }
+ if (node.parent === declaration) {
+ return true;
+ }
+ switch (declaration.kind) {
+ case 239:
+ case 237:
+ return true;
+ case 242:
+ return declaration.parent.kind === 241;
+ default:
+ return false;
+ }
+ }
function getDefinitionFromSymbol(typeChecker, symbol, node) {
var result = [];
var declarations = symbol.getDeclarations();
@@ -63546,7 +65989,7 @@ var ts;
}
}
function createDefinitionInfo(node, symbolKind, symbolName, containerName) {
- return createDefinitionInfoFromName(node.name || node, symbolKind, symbolName, containerName);
+ return createDefinitionInfoFromName(ts.getNameOfDeclaration(node) || node, symbolKind, symbolName, containerName);
}
function createDefinitionInfoFromName(name, symbolKind, symbolName, containerName) {
var sourceFile = name.getSourceFile();
@@ -63573,7 +66016,7 @@ var ts;
function findReferenceInPosition(refs, pos) {
for (var _i = 0, refs_1 = refs; _i < refs_1.length; _i++) {
var ref = refs_1[_i];
- if (ref.pos <= pos && pos < ref.end) {
+ if (ref.pos <= pos && pos <= ref.end) {
return ref;
}
}
@@ -63642,6 +66085,7 @@ var ts;
"namespace",
"param",
"private",
+ "prop",
"property",
"public",
"requires",
@@ -63652,8 +66096,6 @@ var ts;
"throws",
"type",
"typedef",
- "property",
- "prop",
"version"
];
var jsDocTagNameCompletionEntries;
@@ -63736,11 +66178,29 @@ var ts;
}));
}
JsDoc.getJSDocTagCompletions = getJSDocTagCompletions;
+ function getJSDocParameterNameCompletions(tag) {
+ var nameThusFar = tag.name.text;
+ var jsdoc = tag.parent;
+ var fn = jsdoc.parent;
+ if (!ts.isFunctionLike(fn))
+ return [];
+ return ts.mapDefined(fn.parameters, function (param) {
+ if (!ts.isIdentifier(param.name))
+ return undefined;
+ var name = param.name.text;
+ if (jsdoc.tags.some(function (t) { return t !== tag && ts.isJSDocParameterTag(t) && t.name.text === name; })
+ || nameThusFar !== undefined && !ts.startsWith(name, nameThusFar)) {
+ return undefined;
+ }
+ return { name: name, kind: ts.ScriptElementKind.parameterElement, kindModifiers: "", sortText: "0" };
+ });
+ }
+ JsDoc.getJSDocParameterNameCompletions = getJSDocParameterNameCompletions;
function getDocCommentTemplateAtPosition(newLine, sourceFile, position) {
if (ts.isInString(sourceFile, position) || ts.isInComment(sourceFile, position) || ts.hasDocComment(sourceFile, position)) {
return undefined;
}
- var tokenAtPos = ts.getTokenAtPosition(sourceFile, position);
+ var tokenAtPos = ts.getTokenAtPosition(sourceFile, position, false);
var tokenStart = tokenAtPos.getStart();
if (!tokenAtPos || tokenStart < position) {
return undefined;
@@ -63943,7 +66403,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 safeList.has(f); }));
+ mergeTypings(ts.mapDefined(cleanedTypingNames, function (f) { return safeList.get(f); }));
}
var hasJsxFile = ts.forEach(fileNames, function (f) { return ts.ensureScriptKind(f, ts.getScriptKindFromFileName(f)) === 2; });
if (hasJsxFile) {
@@ -63997,7 +66457,7 @@ var ts;
function getNavigateToItems(sourceFiles, checker, cancellationToken, searchValue, maxResultCount, excludeDtsFiles) {
var patternMatcher = ts.createPatternMatcher(searchValue);
var rawItems = [];
- var _loop_4 = function (sourceFile) {
+ var _loop_5 = function (sourceFile) {
cancellationToken.throwIfCancellationRequested();
if (excludeDtsFiles && ts.fileExtensionIs(sourceFile.fileName, ".d.ts")) {
return "continue";
@@ -64027,9 +66487,9 @@ var ts;
}
});
};
- for (var _i = 0, sourceFiles_7 = sourceFiles; _i < sourceFiles_7.length; _i++) {
- var sourceFile = sourceFiles_7[_i];
- _loop_4(sourceFile);
+ for (var _i = 0, sourceFiles_8 = sourceFiles; _i < sourceFiles_8.length; _i++) {
+ var sourceFile = sourceFiles_8[_i];
+ _loop_5(sourceFile);
}
rawItems = ts.filter(rawItems, function (item) {
var decl = item.declaration;
@@ -64069,16 +66529,19 @@ var ts;
return undefined;
}
function tryAddSingleDeclarationName(declaration, containers) {
- if (declaration && declaration.name) {
- var text = getTextOfIdentifierOrLiteral(declaration.name);
- if (text !== undefined) {
- containers.unshift(text);
- }
- else if (declaration.name.kind === 144) {
- return tryAddComputedPropertyName(declaration.name.expression, containers, true);
- }
- else {
- return false;
+ if (declaration) {
+ var name = ts.getNameOfDeclaration(declaration);
+ if (name) {
+ var text = getTextOfIdentifierOrLiteral(name);
+ if (text !== undefined) {
+ containers.unshift(text);
+ }
+ else if (name.kind === 144) {
+ return tryAddComputedPropertyName(name.expression, containers, true);
+ }
+ else {
+ return false;
+ }
}
}
return true;
@@ -64102,8 +66565,9 @@ var ts;
}
function getContainers(declaration) {
var containers = [];
- if (declaration.name.kind === 144) {
- if (!tryAddComputedPropertyName(declaration.name.expression, containers, false)) {
+ var name = ts.getNameOfDeclaration(declaration);
+ if (name.kind === 144) {
+ if (!tryAddComputedPropertyName(name.expression, containers, false)) {
return undefined;
}
}
@@ -64136,6 +66600,7 @@ var ts;
function createNavigateToItem(rawItem) {
var declaration = rawItem.declaration;
var container = ts.getContainerNode(declaration);
+ var containerName = container && ts.getNameOfDeclaration(container);
return {
name: rawItem.name,
kind: ts.getNodeKind(declaration),
@@ -64144,8 +66609,8 @@ var ts;
isCaseSensitive: rawItem.isCaseSensitive,
fileName: rawItem.fileName,
textSpan: ts.createTextSpanFromNode(declaration),
- containerName: container && container.name ? container.name.text : "",
- containerKind: container && container.name ? ts.getNodeKind(container) : ""
+ containerName: containerName ? containerName.text : "",
+ containerKind: containerName ? ts.getNodeKind(container) : ""
};
}
}
@@ -64348,7 +66813,7 @@ var ts;
default:
ts.forEach(node.jsDoc, function (jsDoc) {
ts.forEach(jsDoc.tags, function (tag) {
- if (tag.kind === 290) {
+ if (tag.kind === 291) {
addLeafNode(tag);
}
});
@@ -64359,8 +66824,8 @@ var ts;
function mergeChildren(children) {
var nameToItems = ts.createMap();
ts.filterMutate(children, function (child) {
- var decl = child.node;
- var name = decl.name && nodeText(decl.name);
+ var declName = ts.getNameOfDeclaration(child.node);
+ var name = declName && nodeText(declName);
if (!name) {
return true;
}
@@ -64438,16 +66903,16 @@ var ts;
if (node.kind === 233) {
return getModuleName(node);
}
- var decl = node;
- if (decl.name) {
- return ts.getPropertyNameForPropertyNameNode(decl.name);
+ var declName = ts.getNameOfDeclaration(node);
+ if (declName) {
+ return ts.getPropertyNameForPropertyNameNode(declName);
}
switch (node.kind) {
case 186:
case 187:
case 199:
return getFunctionOrClassName(node);
- case 290:
+ case 291:
return getJSDocTypedefTagName(node);
default:
return undefined;
@@ -64457,7 +66922,7 @@ var ts;
if (node.kind === 233) {
return getModuleName(node);
}
- var name = node.name;
+ var name = ts.getNameOfDeclaration(node);
if (name) {
var text = nodeText(name);
if (text.length > 0) {
@@ -64487,7 +66952,7 @@ var ts;
return "()";
case 157:
return "[]";
- case 290:
+ case 291:
return getJSDocTypedefTagName(node);
default:
return "<unknown>";
@@ -64534,7 +66999,7 @@ var ts;
case 233:
case 265:
case 231:
- case 290:
+ case 291:
return true;
case 152:
case 151:
@@ -65313,7 +67778,14 @@ var ts;
var token = ts.scanner.getToken();
if (token === 91) {
token = nextToken();
- if (token === 9) {
+ if (token === 19) {
+ token = nextToken();
+ if (token === 9) {
+ recordModuleName();
+ return true;
+ }
+ }
+ else if (token === 9) {
recordModuleName();
return true;
}
@@ -65677,7 +68149,7 @@ var ts;
}
}
function getImmediatelyContainingArgumentInfo(node, position, sourceFile) {
- if (node.parent.kind === 181 || node.parent.kind === 182) {
+ if (ts.isCallOrNewExpression(node.parent)) {
var callExpression = node.parent;
if (node.kind === 27 ||
node.kind === 19) {
@@ -65942,9 +68414,10 @@ var ts;
(function (SymbolDisplay) {
function getSymbolKind(typeChecker, symbol, location) {
var flags = symbol.flags;
- if (flags & 32)
+ if (flags & 32) {
return ts.getDeclarationOfKind(symbol, 199) ?
ts.ScriptElementKind.localClassElement : ts.ScriptElementKind.classElement;
+ }
if (flags & 384)
return ts.ScriptElementKind.enumElement;
if (flags & 524288)
@@ -66055,7 +68528,7 @@ var ts;
}
}
var callExpressionLike = void 0;
- if (location.kind === 181 || location.kind === 182) {
+ if (ts.isCallOrNewExpression(location)) {
callExpressionLike = location;
}
else if (ts.isCallExpressionTarget(location) || ts.isNewExpressionTarget(location)) {
@@ -66110,7 +68583,7 @@ var ts;
if (!(type.flags & 32768 && type.objectFlags & 16) && type.symbol) {
ts.addRange(displayParts, ts.symbolToDisplayParts(typeChecker, type.symbol, enclosingDeclaration, undefined, 1));
}
- addSignatureDisplayParts(signature, allSignatures, 8);
+ addSignatureDisplayParts(signature, allSignatures, 16);
break;
default:
addSignatureDisplayParts(signature, allSignatures);
@@ -66120,24 +68593,29 @@ var ts;
}
else if ((ts.isNameOfFunctionDeclaration(location) && !(symbol.flags & 98304)) ||
(location.kind === 123 && location.parent.kind === 152)) {
- var functionDeclaration = location.parent;
- var allSignatures = functionDeclaration.kind === 152 ? type.getNonNullableType().getConstructSignatures() : type.getNonNullableType().getCallSignatures();
- if (!typeChecker.isImplementationOfOverload(functionDeclaration)) {
- signature = typeChecker.getSignatureFromDeclaration(functionDeclaration);
- }
- else {
- signature = allSignatures[0];
- }
- if (functionDeclaration.kind === 152) {
- symbolKind = ts.ScriptElementKind.constructorImplementationElement;
- addPrefixForAnyFunctionOrVar(type.symbol, symbolKind);
- }
- else {
- addPrefixForAnyFunctionOrVar(functionDeclaration.kind === 155 &&
- !(type.symbol.flags & 2048 || type.symbol.flags & 4096) ? type.symbol : symbol, symbolKind);
+ var functionDeclaration_1 = location.parent;
+ var locationIsSymbolDeclaration = ts.findDeclaration(symbol, function (declaration) {
+ return declaration === (location.kind === 123 ? functionDeclaration_1.parent : functionDeclaration_1);
+ });
+ if (locationIsSymbolDeclaration) {
+ var allSignatures = functionDeclaration_1.kind === 152 ? type.getNonNullableType().getConstructSignatures() : type.getNonNullableType().getCallSignatures();
+ if (!typeChecker.isImplementationOfOverload(functionDeclaration_1)) {
+ signature = typeChecker.getSignatureFromDeclaration(functionDeclaration_1);
+ }
+ else {
+ signature = allSignatures[0];
+ }
+ if (functionDeclaration_1.kind === 152) {
+ symbolKind = ts.ScriptElementKind.constructorImplementationElement;
+ addPrefixForAnyFunctionOrVar(type.symbol, symbolKind);
+ }
+ else {
+ addPrefixForAnyFunctionOrVar(functionDeclaration_1.kind === 155 &&
+ !(type.symbol.flags & 2048 || type.symbol.flags & 4096) ? type.symbol : symbol, symbolKind);
+ }
+ addSignatureDisplayParts(signature, allSignatures);
+ hasAddedSymbolInfo = true;
}
- addSignatureDisplayParts(signature, allSignatures);
- hasAddedSymbolInfo = true;
}
}
}
@@ -66168,7 +68646,7 @@ var ts;
displayParts.push(ts.spacePart());
displayParts.push(ts.operatorPart(58));
displayParts.push(ts.spacePart());
- ts.addRange(displayParts, ts.typeToDisplayParts(typeChecker, typeChecker.getDeclaredTypeOfSymbol(symbol), enclosingDeclaration, 512));
+ ts.addRange(displayParts, ts.typeToDisplayParts(typeChecker, typeChecker.getDeclaredTypeOfSymbol(symbol), enclosingDeclaration, 1024));
}
if (symbolFlags & 384) {
addNewLineIfDisplayPartsExist();
@@ -66201,9 +68679,9 @@ var ts;
writeTypeParametersOfSymbol(symbol.parent, enclosingDeclaration);
}
else {
- var declaration = ts.getDeclarationOfKind(symbol, 145);
- ts.Debug.assert(declaration !== undefined);
- declaration = declaration.parent;
+ var decl = ts.getDeclarationOfKind(symbol, 145);
+ ts.Debug.assert(decl !== undefined);
+ var declaration = decl.parent;
if (declaration) {
if (ts.isFunctionLikeKind(declaration.kind)) {
addInPrefix();
@@ -66215,7 +68693,7 @@ var ts;
else if (declaration.kind !== 155 && declaration.name) {
addFullSymbolName(declaration.symbol);
}
- ts.addRange(displayParts, ts.signatureToDisplayParts(typeChecker, signature, sourceFile, 32));
+ ts.addRange(displayParts, ts.signatureToDisplayParts(typeChecker, signature, sourceFile, 64));
}
else if (declaration.kind === 231) {
addInPrefix();
@@ -66237,7 +68715,7 @@ var ts;
displayParts.push(ts.spacePart());
displayParts.push(ts.operatorPart(58));
displayParts.push(ts.spacePart());
- displayParts.push(ts.displayPart(constantValue.toString(), ts.SymbolDisplayPartKind.numericLiteral));
+ displayParts.push(ts.displayPart(ts.getTextOfConstantValue(constantValue), typeof constantValue === "number" ? ts.SymbolDisplayPartKind.numericLiteral : ts.SymbolDisplayPartKind.stringLiteral));
}
}
}
@@ -66383,7 +68861,7 @@ var ts;
}
}
function addSignatureDisplayParts(signature, allSignatures, flags) {
- ts.addRange(displayParts, ts.signatureToDisplayParts(typeChecker, signature, enclosingDeclaration, flags | 32));
+ ts.addRange(displayParts, ts.signatureToDisplayParts(typeChecker, signature, enclosingDeclaration, flags | 64));
if (allSignatures.length > 1) {
displayParts.push(ts.spacePart());
displayParts.push(ts.punctuationPart(19));
@@ -66483,7 +68961,7 @@ var ts;
ts.addRange(diagnostics, program.getSyntacticDiagnostics(sourceFile));
ts.addRange(diagnostics, program.getOptionsDiagnostics());
}
- program.emit();
+ program.emit(undefined, undefined, undefined, undefined, transpileOptions.transformers);
ts.Debug.assert(outputText !== undefined, "Output generation failed");
return { outputText: outputText, diagnostics: diagnostics, sourceMapText: sourceMapText };
}
@@ -66500,7 +68978,7 @@ var ts;
return typeof o.type === "object" && !ts.forEachEntry(o.type, function (v) { return typeof v !== "number"; });
});
options = ts.clone(options);
- var _loop_5 = function (opt) {
+ var _loop_6 = function (opt) {
if (!ts.hasProperty(options, opt.name)) {
return "continue";
}
@@ -66516,7 +68994,7 @@ var ts;
};
for (var _i = 0, commandLineOptionsStringToEnum_1 = commandLineOptionsStringToEnum; _i < commandLineOptionsStringToEnum_1.length; _i++) {
var opt = commandLineOptionsStringToEnum_1[_i];
- _loop_5(opt);
+ _loop_6(opt);
}
return options;
}
@@ -66757,9 +69235,10 @@ var ts;
var formatting;
(function (formatting) {
var FormattingContext = (function () {
- function FormattingContext(sourceFile, formattingRequestKind) {
+ function FormattingContext(sourceFile, formattingRequestKind, options) {
this.sourceFile = sourceFile;
this.formattingRequestKind = formattingRequestKind;
+ this.options = options;
}
FormattingContext.prototype.updateContext = function (currentRange, currentTokenParent, nextRange, nextTokenParent, commonParent) {
ts.Debug.assert(currentRange !== undefined, "currentTokenSpan is null");
@@ -66970,9 +69449,9 @@ var ts;
}
return true;
};
+ RuleOperationContext.Any = new RuleOperationContext();
return RuleOperationContext;
}());
- RuleOperationContext.Any = new RuleOperationContext();
formatting.RuleOperationContext = RuleOperationContext;
})(formatting = ts.formatting || (ts.formatting = {}));
})(ts || (ts = {}));
@@ -66997,7 +69476,7 @@ var ts;
this.NoSpaceAfterCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create3(18, formatting.Shared.TokenRange.FromTokens([22, 26, 25])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8));
this.NoSpaceBeforeDot = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 23), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8));
this.NoSpaceAfterDot = new formatting.Rule(formatting.RuleDescriptor.create3(23, 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, 21), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8));
+ this.NoSpaceBeforeOpenBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.AnyExcept(120), 21), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8));
this.NoSpaceAfterCloseBracket = new formatting.Rule(formatting.RuleDescriptor.create3(22, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNotBeforeBlockInFunctionDeclarationContext), 8));
this.FunctionOpenBraceLeftTokenRange = formatting.Shared.TokenRange.AnyIncludingMultilineComments;
this.SpaceBeforeOpenBraceInFunction = new formatting.Rule(formatting.RuleDescriptor.create2(this.FunctionOpenBraceLeftTokenRange, 17), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext, Rules.IsBeforeBlockContext, Rules.IsNotFormatOnEnter, Rules.IsSameLineTokenOrBeforeMultilineBlockContext), 2), 1);
@@ -67005,10 +69484,10 @@ var ts;
this.SpaceBeforeOpenBraceInTypeScriptDeclWithBlock = new formatting.Rule(formatting.RuleDescriptor.create2(this.TypeScriptOpenBraceLeftTokenRange, 17), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsTypeScriptDeclWithBlockContext, Rules.IsNotFormatOnEnter, Rules.IsSameLineTokenOrBeforeMultilineBlockContext), 2), 1);
this.ControlOpenBraceLeftTokenRange = formatting.Shared.TokenRange.FromTokens([20, 3, 81, 102, 87, 82]);
this.SpaceBeforeOpenBraceInControl = new formatting.Rule(formatting.RuleDescriptor.create2(this.ControlOpenBraceLeftTokenRange, 17), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext, Rules.IsNotFormatOnEnter, Rules.IsSameLineTokenOrBeforeMultilineBlockContext), 2), 1);
- this.SpaceAfterOpenBrace = new formatting.Rule(formatting.RuleDescriptor.create3(17, 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, 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsBraceWrappedContext), 2));
- this.NoSpaceAfterOpenBrace = new formatting.Rule(formatting.RuleDescriptor.create3(17, 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, 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8));
+ this.SpaceAfterOpenBrace = new formatting.Rule(formatting.RuleDescriptor.create3(17, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabledOrUndefined("insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces"), Rules.IsBraceWrappedContext), 2));
+ this.SpaceBeforeCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabledOrUndefined("insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces"), Rules.IsBraceWrappedContext), 2));
+ this.NoSpaceAfterOpenBrace = new formatting.Rule(formatting.RuleDescriptor.create3(17, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabled("insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces"), Rules.IsNonJsxSameLineTokenContext), 8));
+ this.NoSpaceBeforeCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabled("insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces"), Rules.IsNonJsxSameLineTokenContext), 8));
this.NoSpaceBetweenEmptyBraceBrackets = new formatting.Rule(formatting.RuleDescriptor.create1(17, 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsObjectContext), 8));
this.NewLineAfterOpenBraceInBlockContext = new formatting.Rule(formatting.RuleDescriptor.create3(17, 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, 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsMultilineBlockContext), 4));
@@ -67025,11 +69504,12 @@ var ts;
this.SpaceAfterSubtractWhenFollowedByPredecrement = new formatting.Rule(formatting.RuleDescriptor.create1(38, 44), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2));
this.NoSpaceBeforeComma = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 26), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8));
this.SpaceAfterCertainKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([104, 100, 94, 80, 96, 103, 121]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2));
+ this.NoSpaceAfterNewKeywordOnConstructorSignature = new formatting.Rule(formatting.RuleDescriptor.create1(94, 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsConstructorSignatureContext), 8));
this.SpaceAfterLetConstInVariableDeclaration = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([110, 76]), 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, 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsFunctionCallOrNewContext, Rules.IsPreviousTokenNotComma), 8));
this.SpaceAfterFunctionInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create3(89, 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, 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsFunctionDeclContext), 2));
- this.NoSpaceBeforeOpenParenInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsFunctionDeclContext), 8));
+ this.SpaceBeforeOpenParenInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceBeforeFunctionParenthesis"), Rules.IsNonJsxSameLineTokenContext, Rules.IsFunctionDeclContext), 2));
+ this.NoSpaceBeforeOpenParenInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceBeforeFunctionParenthesis"), Rules.IsNonJsxSameLineTokenContext, Rules.IsFunctionDeclContext), 8));
this.SpaceAfterVoidOperator = new formatting.Rule(formatting.RuleDescriptor.create3(105, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsVoidOpContext), 2));
this.NoSpaceBetweenReturnAndSemicolon = new formatting.Rule(formatting.RuleDescriptor.create1(96, 25), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8));
this.SpaceBetweenStatements = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([20, 81, 82, 73]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNonJsxElementContext, Rules.IsNotForContext), 2));
@@ -67037,8 +69517,8 @@ var ts;
this.SpaceAfterGetSetInMember = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([125, 135]), 71), 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(123, 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2));
- this.NoSpaceAfterConstructor = new formatting.Rule(formatting.RuleDescriptor.create1(123, 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8));
+ this.SpaceAfterConstructor = new formatting.Rule(formatting.RuleDescriptor.create1(123, 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceAfterConstructor"), Rules.IsNonJsxSameLineTokenContext), 2));
+ this.NoSpaceAfterConstructor = new formatting.Rule(formatting.RuleDescriptor.create1(123, 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceAfterConstructor"), Rules.IsNonJsxSameLineTokenContext), 8));
this.NoSpaceAfterModuleImport = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([128, 132]), 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8));
this.SpaceAfterCertainTypeScriptKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([117, 75, 124, 79, 83, 84, 85, 125, 108, 91, 109, 128, 129, 112, 114, 113, 131, 135, 115, 138, 140, 127]), 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([85, 108, 140])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2));
@@ -67069,6 +69549,41 @@ var ts;
this.NoSpaceBeforeEqualInJsxAttribute = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 58), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsJsxAttributeContext, Rules.IsNonJsxSameLineTokenContext), 8));
this.NoSpaceAfterEqualInJsxAttribute = new formatting.Rule(formatting.RuleDescriptor.create3(58, 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, 51), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNonNullAssertionContext), 8));
+ this.SpaceAfterComma = new formatting.Rule(formatting.RuleDescriptor.create3(26, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceAfterCommaDelimiter"), Rules.IsNonJsxSameLineTokenContext, Rules.IsNonJsxElementContext, Rules.IsNextTokenNotCloseBracket), 2));
+ this.NoSpaceAfterComma = new formatting.Rule(formatting.RuleDescriptor.create3(26, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceAfterCommaDelimiter"), Rules.IsNonJsxSameLineTokenContext, Rules.IsNonJsxElementContext), 8));
+ this.SpaceBeforeBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.BinaryOperators), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceBeforeAndAfterBinaryOperators"), Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2));
+ this.SpaceAfterBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.BinaryOperators, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceBeforeAndAfterBinaryOperators"), Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2));
+ this.NoSpaceBeforeBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.BinaryOperators), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceBeforeAndAfterBinaryOperators"), Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 8));
+ this.NoSpaceAfterBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.BinaryOperators, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceBeforeAndAfterBinaryOperators"), Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 8));
+ this.SpaceAfterKeywordInControl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Keywords, 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceAfterKeywordsInControlFlowStatements"), Rules.IsControlDeclContext), 2));
+ this.NoSpaceAfterKeywordInControl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Keywords, 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceAfterKeywordsInControlFlowStatements"), Rules.IsControlDeclContext), 8));
+ this.NewLineBeforeOpenBraceInFunction = new formatting.Rule(formatting.RuleDescriptor.create2(this.FunctionOpenBraceLeftTokenRange, 17), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("placeOpenBraceOnNewLineForFunctions"), Rules.IsFunctionDeclContext, Rules.IsBeforeMultilineBlockContext), 4), 1);
+ this.NewLineBeforeOpenBraceInTypeScriptDeclWithBlock = new formatting.Rule(formatting.RuleDescriptor.create2(this.TypeScriptOpenBraceLeftTokenRange, 17), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("placeOpenBraceOnNewLineForFunctions"), Rules.IsTypeScriptDeclWithBlockContext, Rules.IsBeforeMultilineBlockContext), 4), 1);
+ this.NewLineBeforeOpenBraceInControl = new formatting.Rule(formatting.RuleDescriptor.create2(this.ControlOpenBraceLeftTokenRange, 17), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("placeOpenBraceOnNewLineForControlBlocks"), Rules.IsControlDeclContext, Rules.IsBeforeMultilineBlockContext), 4), 1);
+ this.SpaceAfterSemicolonInFor = new formatting.Rule(formatting.RuleDescriptor.create3(25, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceAfterSemicolonInForStatements"), Rules.IsNonJsxSameLineTokenContext, Rules.IsForContext), 2));
+ this.NoSpaceAfterSemicolonInFor = new formatting.Rule(formatting.RuleDescriptor.create3(25, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceAfterSemicolonInForStatements"), Rules.IsNonJsxSameLineTokenContext, Rules.IsForContext), 8));
+ this.SpaceAfterOpenParen = new formatting.Rule(formatting.RuleDescriptor.create3(19, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"), Rules.IsNonJsxSameLineTokenContext), 2));
+ this.SpaceBeforeCloseParen = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 20), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"), Rules.IsNonJsxSameLineTokenContext), 2));
+ this.NoSpaceBetweenParens = new formatting.Rule(formatting.RuleDescriptor.create1(19, 20), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8));
+ this.NoSpaceAfterOpenParen = new formatting.Rule(formatting.RuleDescriptor.create3(19, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"), Rules.IsNonJsxSameLineTokenContext), 8));
+ this.NoSpaceBeforeCloseParen = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 20), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"), Rules.IsNonJsxSameLineTokenContext), 8));
+ this.SpaceAfterOpenBracket = new formatting.Rule(formatting.RuleDescriptor.create3(21, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets"), Rules.IsNonJsxSameLineTokenContext), 2));
+ this.SpaceBeforeCloseBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 22), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets"), Rules.IsNonJsxSameLineTokenContext), 2));
+ this.NoSpaceBetweenBrackets = new formatting.Rule(formatting.RuleDescriptor.create1(21, 22), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8));
+ this.NoSpaceAfterOpenBracket = new formatting.Rule(formatting.RuleDescriptor.create3(21, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets"), Rules.IsNonJsxSameLineTokenContext), 8));
+ this.NoSpaceBeforeCloseBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 22), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets"), Rules.IsNonJsxSameLineTokenContext), 8));
+ this.NoSpaceAfterTemplateHeadAndMiddle = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([14, 15]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces"), Rules.IsNonJsxSameLineTokenContext), 8));
+ this.SpaceAfterTemplateHeadAndMiddle = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([14, 15]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces"), Rules.IsNonJsxSameLineTokenContext), 2));
+ this.NoSpaceBeforeTemplateMiddleAndTail = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([15, 16])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces"), Rules.IsNonJsxSameLineTokenContext), 8));
+ this.SpaceBeforeTemplateMiddleAndTail = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([15, 16])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces"), Rules.IsNonJsxSameLineTokenContext), 2));
+ this.NoSpaceAfterOpenBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create3(17, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces"), Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 8));
+ this.SpaceAfterOpenBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create3(17, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces"), Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 2));
+ this.NoSpaceBeforeCloseBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces"), Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 8));
+ this.SpaceBeforeCloseBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces"), Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 2));
+ this.SpaceAfterAnonymousFunctionKeyword = new formatting.Rule(formatting.RuleDescriptor.create1(89, 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceAfterFunctionKeywordForAnonymousFunctions"), Rules.IsFunctionDeclContext), 2));
+ this.NoSpaceAfterAnonymousFunctionKeyword = new formatting.Rule(formatting.RuleDescriptor.create1(89, 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceAfterFunctionKeywordForAnonymousFunctions"), Rules.IsFunctionDeclContext), 8));
+ this.NoSpaceAfterTypeAssertion = new formatting.Rule(formatting.RuleDescriptor.create3(29, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceAfterTypeAssertion"), Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeAssertionContext), 8));
+ this.SpaceAfterTypeAssertion = new formatting.Rule(formatting.RuleDescriptor.create3(29, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceAfterTypeAssertion"), Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeAssertionContext), 2));
this.HighPriorityCommonRules = [
this.IgnoreBeforeComment, this.IgnoreAfterLineComment,
this.NoSpaceBeforeColon, this.SpaceAfterColon, this.NoSpaceBeforeQuestionMark, this.SpaceAfterQuestionMarkInConditionalOperator,
@@ -67112,7 +69627,25 @@ var ts;
this.SpaceBeforeAt,
this.NoSpaceAfterAt,
this.SpaceAfterDecorator,
- this.NoSpaceBeforeNonNullAssertionOperator
+ this.NoSpaceBeforeNonNullAssertionOperator,
+ this.NoSpaceAfterNewKeywordOnConstructorSignature
+ ];
+ this.UserConfigurableRules = [
+ this.SpaceAfterConstructor, this.NoSpaceAfterConstructor,
+ this.SpaceAfterComma, this.NoSpaceAfterComma,
+ this.SpaceAfterAnonymousFunctionKeyword, this.NoSpaceAfterAnonymousFunctionKeyword,
+ this.SpaceAfterKeywordInControl, this.NoSpaceAfterKeywordInControl,
+ this.SpaceAfterOpenParen, this.SpaceBeforeCloseParen, this.NoSpaceBetweenParens, this.NoSpaceAfterOpenParen, this.NoSpaceBeforeCloseParen,
+ this.SpaceAfterOpenBracket, this.SpaceBeforeCloseBracket, this.NoSpaceBetweenBrackets, this.NoSpaceAfterOpenBracket, this.NoSpaceBeforeCloseBracket,
+ this.SpaceAfterOpenBrace, this.SpaceBeforeCloseBrace, this.NoSpaceBetweenEmptyBraceBrackets, this.NoSpaceAfterOpenBrace, this.NoSpaceBeforeCloseBrace,
+ this.SpaceAfterTemplateHeadAndMiddle, this.SpaceBeforeTemplateMiddleAndTail, this.NoSpaceAfterTemplateHeadAndMiddle, this.NoSpaceBeforeTemplateMiddleAndTail,
+ this.SpaceAfterOpenBraceInJsxExpression, this.SpaceBeforeCloseBraceInJsxExpression, this.NoSpaceAfterOpenBraceInJsxExpression, this.NoSpaceBeforeCloseBraceInJsxExpression,
+ this.SpaceAfterSemicolonInFor, this.NoSpaceAfterSemicolonInFor,
+ this.SpaceBeforeBinaryOperator, this.SpaceAfterBinaryOperator, this.NoSpaceBeforeBinaryOperator, this.NoSpaceAfterBinaryOperator,
+ this.SpaceBeforeOpenParenInFuncDecl, this.NoSpaceBeforeOpenParenInFuncDecl,
+ this.NewLineBeforeOpenBraceInControl,
+ this.NewLineBeforeOpenBraceInFunction, this.NewLineBeforeOpenBraceInTypeScriptDeclWithBlock,
+ this.SpaceAfterTypeAssertion, this.NoSpaceAfterTypeAssertion
];
this.LowPriorityCommonRules = [
this.NoSpaceBeforeSemicolon,
@@ -67123,41 +69656,6 @@ var ts;
this.SpaceAfterSemicolon,
this.SpaceBetweenStatements, this.SpaceAfterTryFinally
];
- this.SpaceAfterComma = new formatting.Rule(formatting.RuleDescriptor.create3(26, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNonJsxElementContext, Rules.IsNextTokenNotCloseBracket), 2));
- this.NoSpaceAfterComma = new formatting.Rule(formatting.RuleDescriptor.create3(26, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNonJsxElementContext), 8));
- this.SpaceBeforeBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.BinaryOperators), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2));
- this.SpaceAfterBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.BinaryOperators, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2));
- this.NoSpaceBeforeBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.BinaryOperators), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 8));
- this.NoSpaceAfterBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.BinaryOperators, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 8));
- this.SpaceAfterKeywordInControl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Keywords, 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext), 2));
- this.NoSpaceAfterKeywordInControl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Keywords, 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext), 8));
- this.NewLineBeforeOpenBraceInFunction = new formatting.Rule(formatting.RuleDescriptor.create2(this.FunctionOpenBraceLeftTokenRange, 17), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext, Rules.IsBeforeMultilineBlockContext), 4), 1);
- this.NewLineBeforeOpenBraceInTypeScriptDeclWithBlock = new formatting.Rule(formatting.RuleDescriptor.create2(this.TypeScriptOpenBraceLeftTokenRange, 17), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsTypeScriptDeclWithBlockContext, Rules.IsBeforeMultilineBlockContext), 4), 1);
- this.NewLineBeforeOpenBraceInControl = new formatting.Rule(formatting.RuleDescriptor.create2(this.ControlOpenBraceLeftTokenRange, 17), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext, Rules.IsBeforeMultilineBlockContext), 4), 1);
- this.SpaceAfterSemicolonInFor = new formatting.Rule(formatting.RuleDescriptor.create3(25, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsForContext), 2));
- this.NoSpaceAfterSemicolonInFor = new formatting.Rule(formatting.RuleDescriptor.create3(25, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsForContext), 8));
- this.SpaceAfterOpenParen = new formatting.Rule(formatting.RuleDescriptor.create3(19, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2));
- this.SpaceBeforeCloseParen = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 20), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2));
- this.NoSpaceBetweenParens = new formatting.Rule(formatting.RuleDescriptor.create1(19, 20), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8));
- this.NoSpaceAfterOpenParen = new formatting.Rule(formatting.RuleDescriptor.create3(19, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8));
- this.NoSpaceBeforeCloseParen = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 20), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8));
- this.SpaceAfterOpenBracket = new formatting.Rule(formatting.RuleDescriptor.create3(21, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2));
- this.SpaceBeforeCloseBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 22), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2));
- this.NoSpaceBetweenBrackets = new formatting.Rule(formatting.RuleDescriptor.create1(21, 22), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8));
- this.NoSpaceAfterOpenBracket = new formatting.Rule(formatting.RuleDescriptor.create3(21, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8));
- this.NoSpaceBeforeCloseBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 22), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8));
- this.NoSpaceAfterTemplateHeadAndMiddle = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([14, 15]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8));
- this.SpaceAfterTemplateHeadAndMiddle = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([14, 15]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2));
- this.NoSpaceBeforeTemplateMiddleAndTail = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([15, 16])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8));
- this.SpaceBeforeTemplateMiddleAndTail = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([15, 16])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2));
- this.NoSpaceAfterOpenBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create3(17, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 8));
- this.SpaceAfterOpenBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create3(17, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 2));
- this.NoSpaceBeforeCloseBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 8));
- this.SpaceBeforeCloseBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 2));
- this.SpaceAfterAnonymousFunctionKeyword = new formatting.Rule(formatting.RuleDescriptor.create1(89, 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 2));
- this.NoSpaceAfterAnonymousFunctionKeyword = new formatting.Rule(formatting.RuleDescriptor.create1(89, 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 8));
- this.NoSpaceAfterTypeAssertion = new formatting.Rule(formatting.RuleDescriptor.create3(29, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeAssertionContext), 8));
- this.SpaceAfterTypeAssertion = new formatting.Rule(formatting.RuleDescriptor.create3(29, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeAssertionContext), 2));
}
Rules.prototype.getRuleName = function (rule) {
var o = this;
@@ -67168,6 +69666,18 @@ var ts;
}
throw new Error("Unknown rule");
};
+ Rules.IsOptionEnabled = function (optionName) {
+ return function (context) { return context.options && context.options.hasOwnProperty(optionName) && !!context.options[optionName]; };
+ };
+ Rules.IsOptionDisabled = function (optionName) {
+ return function (context) { return context.options && context.options.hasOwnProperty(optionName) && !context.options[optionName]; };
+ };
+ Rules.IsOptionDisabledOrUndefined = function (optionName) {
+ return function (context) { return !context.options || !context.options.hasOwnProperty(optionName) || !context.options[optionName]; };
+ };
+ Rules.IsOptionEnabledOrUndefined = function (optionName) {
+ return function (context) { return !context.options || !context.options.hasOwnProperty(optionName) || !!context.options[optionName]; };
+ };
Rules.IsForContext = function (context) {
return context.contextNode.kind === 214;
};
@@ -67383,6 +69893,9 @@ var ts;
Rules.IsObjectTypeContext = function (context) {
return context.contextNode.kind === 163;
};
+ Rules.IsConstructorSignatureContext = function (context) {
+ return context.contextNode.kind === 156;
+ };
Rules.IsTypeArgumentOrParameterOrAssertion = function (token, parent) {
if (token.kind !== 27 && token.kind !== 29) {
return false;
@@ -67464,8 +69977,7 @@ var ts;
};
RulesMap.prototype.FillRule = function (rule, rulesBucketConstructionStateList) {
var _this = this;
- var specificRule = rule.Descriptor.LeftTokenRange !== formatting.Shared.TokenRange.Any &&
- rule.Descriptor.RightTokenRange !== formatting.Shared.TokenRange.Any;
+ var specificRule = rule.Descriptor.LeftTokenRange.isSpecific() && rule.Descriptor.RightTokenRange.isSpecific();
rule.Descriptor.LeftTokenRange.GetTokens().forEach(function (left) {
rule.Descriptor.RightTokenRange.GetTokens().forEach(function (right) {
var rulesBucketIndex = _this.GetRuleBucketIndex(left, right);
@@ -67573,27 +70085,14 @@ var ts;
(function (formatting) {
var Shared;
(function (Shared) {
- var TokenRangeAccess = (function () {
- function TokenRangeAccess(from, to, except) {
- this.tokens = [];
- for (var token = from; token <= to; token++) {
- if (ts.indexOf(except, token) < 0) {
- this.tokens.push(token);
- }
- }
- }
- TokenRangeAccess.prototype.GetTokens = function () {
- return this.tokens;
- };
- TokenRangeAccess.prototype.Contains = function (token) {
- return this.tokens.indexOf(token) >= 0;
- };
- return TokenRangeAccess;
- }());
- Shared.TokenRangeAccess = TokenRangeAccess;
+ var allTokens = [];
+ for (var token = 0; token <= 142; token++) {
+ allTokens.push(token);
+ }
var TokenValuesAccess = (function () {
- function TokenValuesAccess(tks) {
- this.tokens = tks && tks.length ? tks : [];
+ function TokenValuesAccess(tokens) {
+ if (tokens === void 0) { tokens = []; }
+ this.tokens = tokens;
}
TokenValuesAccess.prototype.GetTokens = function () {
return this.tokens;
@@ -67601,9 +70100,9 @@ var ts;
TokenValuesAccess.prototype.Contains = function (token) {
return this.tokens.indexOf(token) >= 0;
};
+ TokenValuesAccess.prototype.isSpecific = function () { return true; };
return TokenValuesAccess;
}());
- Shared.TokenValuesAccess = TokenValuesAccess;
var TokenSingleValueAccess = (function () {
function TokenSingleValueAccess(token) {
this.token = token;
@@ -67614,18 +70113,14 @@ var ts;
TokenSingleValueAccess.prototype.Contains = function (tokenValue) {
return tokenValue === this.token;
};
+ TokenSingleValueAccess.prototype.isSpecific = function () { return true; };
return TokenSingleValueAccess;
}());
- Shared.TokenSingleValueAccess = TokenSingleValueAccess;
var TokenAllAccess = (function () {
function TokenAllAccess() {
}
TokenAllAccess.prototype.GetTokens = function () {
- var result = [];
- for (var token = 0; token <= 142; token++) {
- result.push(token);
- }
- return result;
+ return allTokens;
};
TokenAllAccess.prototype.Contains = function () {
return true;
@@ -67633,51 +70128,80 @@ var ts;
TokenAllAccess.prototype.toString = function () {
return "[allTokens]";
};
+ TokenAllAccess.prototype.isSpecific = function () { return false; };
return TokenAllAccess;
}());
- Shared.TokenAllAccess = TokenAllAccess;
- var TokenRange = (function () {
- function TokenRange(tokenAccess) {
- this.tokenAccess = tokenAccess;
+ var TokenAllExceptAccess = (function () {
+ function TokenAllExceptAccess(except) {
+ this.except = except;
}
- TokenRange.FromToken = function (token) {
- return new TokenRange(new TokenSingleValueAccess(token));
- };
- TokenRange.FromTokens = function (tokens) {
- return new TokenRange(new TokenValuesAccess(tokens));
- };
- TokenRange.FromRange = function (f, to, except) {
- if (except === void 0) { except = []; }
- return new TokenRange(new TokenRangeAccess(f, to, except));
- };
- TokenRange.AllTokens = function () {
- return new TokenRange(new TokenAllAccess());
+ TokenAllExceptAccess.prototype.GetTokens = function () {
+ var _this = this;
+ return allTokens.filter(function (t) { return t !== _this.except; });
};
- TokenRange.prototype.GetTokens = function () {
- return this.tokenAccess.GetTokens();
+ TokenAllExceptAccess.prototype.Contains = function (token) {
+ return token !== this.except;
};
- TokenRange.prototype.Contains = function (token) {
- return this.tokenAccess.Contains(token);
- };
- TokenRange.prototype.toString = function () {
- return this.tokenAccess.toString();
- };
- return TokenRange;
+ TokenAllExceptAccess.prototype.isSpecific = function () { return false; };
+ return TokenAllExceptAccess;
}());
- TokenRange.Any = TokenRange.AllTokens();
- TokenRange.AnyIncludingMultilineComments = TokenRange.FromTokens(TokenRange.Any.GetTokens().concat([3]));
- TokenRange.Keywords = TokenRange.FromRange(72, 142);
- TokenRange.BinaryOperators = TokenRange.FromRange(27, 70);
- TokenRange.BinaryKeywordOperators = TokenRange.FromTokens([92, 93, 142, 118, 126]);
- TokenRange.UnaryPrefixOperators = TokenRange.FromTokens([43, 44, 52, 51]);
- TokenRange.UnaryPrefixExpressions = TokenRange.FromTokens([8, 71, 19, 21, 17, 99, 94]);
- TokenRange.UnaryPreincrementExpressions = TokenRange.FromTokens([71, 19, 99, 94]);
- TokenRange.UnaryPostincrementExpressions = TokenRange.FromTokens([71, 20, 22, 94]);
- TokenRange.UnaryPredecrementExpressions = TokenRange.FromTokens([71, 19, 99, 94]);
- TokenRange.UnaryPostdecrementExpressions = TokenRange.FromTokens([71, 20, 22, 94]);
- TokenRange.Comments = TokenRange.FromTokens([2, 3]);
- TokenRange.TypeNames = TokenRange.FromTokens([71, 133, 136, 122, 137, 105, 119]);
- Shared.TokenRange = TokenRange;
+ var TokenRange;
+ (function (TokenRange) {
+ function FromToken(token) {
+ return new TokenSingleValueAccess(token);
+ }
+ TokenRange.FromToken = FromToken;
+ function FromTokens(tokens) {
+ return new TokenValuesAccess(tokens);
+ }
+ TokenRange.FromTokens = FromTokens;
+ function FromRange(from, to, except) {
+ if (except === void 0) { except = []; }
+ var tokens = [];
+ for (var token = from; token <= to; token++) {
+ if (ts.indexOf(except, token) < 0) {
+ tokens.push(token);
+ }
+ }
+ return new TokenValuesAccess(tokens);
+ }
+ TokenRange.FromRange = FromRange;
+ function AnyExcept(token) {
+ return new TokenAllExceptAccess(token);
+ }
+ TokenRange.AnyExcept = AnyExcept;
+ TokenRange.Any = new TokenAllAccess();
+ TokenRange.AnyIncludingMultilineComments = TokenRange.FromTokens(allTokens.concat([3]));
+ TokenRange.Keywords = TokenRange.FromRange(72, 142);
+ TokenRange.BinaryOperators = TokenRange.FromRange(27, 70);
+ TokenRange.BinaryKeywordOperators = TokenRange.FromTokens([
+ 92, 93, 142, 118, 126
+ ]);
+ TokenRange.UnaryPrefixOperators = TokenRange.FromTokens([
+ 43, 44, 52, 51
+ ]);
+ TokenRange.UnaryPrefixExpressions = TokenRange.FromTokens([
+ 8, 71, 19, 21,
+ 17, 99, 94
+ ]);
+ TokenRange.UnaryPreincrementExpressions = TokenRange.FromTokens([
+ 71, 19, 99, 94
+ ]);
+ TokenRange.UnaryPostincrementExpressions = TokenRange.FromTokens([
+ 71, 20, 22, 94
+ ]);
+ TokenRange.UnaryPredecrementExpressions = TokenRange.FromTokens([
+ 71, 19, 99, 94
+ ]);
+ TokenRange.UnaryPostdecrementExpressions = TokenRange.FromTokens([
+ 71, 20, 22, 94
+ ]);
+ TokenRange.Comments = TokenRange.FromTokens([2, 3]);
+ TokenRange.TypeNames = TokenRange.FromTokens([
+ 71, 133, 136, 122,
+ 137, 105, 119
+ ]);
+ })(TokenRange = Shared.TokenRange || (Shared.TokenRange = {}));
})(Shared = formatting.Shared || (formatting.Shared = {}));
})(formatting = ts.formatting || (ts.formatting = {}));
})(ts || (ts = {}));
@@ -67688,6 +70212,8 @@ var ts;
var RulesProvider = (function () {
function RulesProvider() {
this.globalRules = new formatting.Rules();
+ var activeRules = this.globalRules.HighPriorityCommonRules.slice(0).concat(this.globalRules.UserConfigurableRules).concat(this.globalRules.LowPriorityCommonRules);
+ this.rulesMap = formatting.RulesMap.create(activeRules);
}
RulesProvider.prototype.getRuleName = function (rule) {
return this.globalRules.getRuleName(rule);
@@ -67703,121 +70229,9 @@ var ts;
};
RulesProvider.prototype.ensureUpToDate = function (options) {
if (!this.options || !ts.compareDataObjects(this.options, options)) {
- var activeRules = this.createActiveRules(options);
- var rulesMap = formatting.RulesMap.create(activeRules);
- this.activeRules = activeRules;
- this.rulesMap = rulesMap;
this.options = ts.clone(options);
}
};
- 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);
- }
- else {
- rules.push(this.globalRules.NoSpaceAfterComma);
- }
- if (options.insertSpaceAfterFunctionKeywordForAnonymousFunctions) {
- rules.push(this.globalRules.SpaceAfterAnonymousFunctionKeyword);
- }
- else {
- rules.push(this.globalRules.NoSpaceAfterAnonymousFunctionKeyword);
- }
- if (options.insertSpaceAfterKeywordsInControlFlowStatements) {
- rules.push(this.globalRules.SpaceAfterKeywordInControl);
- }
- else {
- rules.push(this.globalRules.NoSpaceAfterKeywordInControl);
- }
- if (options.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis) {
- rules.push(this.globalRules.SpaceAfterOpenParen);
- rules.push(this.globalRules.SpaceBeforeCloseParen);
- rules.push(this.globalRules.NoSpaceBetweenParens);
- }
- else {
- rules.push(this.globalRules.NoSpaceAfterOpenParen);
- rules.push(this.globalRules.NoSpaceBeforeCloseParen);
- rules.push(this.globalRules.NoSpaceBetweenParens);
- }
- if (options.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets) {
- rules.push(this.globalRules.SpaceAfterOpenBracket);
- rules.push(this.globalRules.SpaceBeforeCloseBracket);
- rules.push(this.globalRules.NoSpaceBetweenBrackets);
- }
- else {
- rules.push(this.globalRules.NoSpaceAfterOpenBracket);
- rules.push(this.globalRules.NoSpaceBeforeCloseBracket);
- rules.push(this.globalRules.NoSpaceBetweenBrackets);
- }
- if (options.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces !== false) {
- rules.push(this.globalRules.SpaceAfterOpenBrace);
- rules.push(this.globalRules.SpaceBeforeCloseBrace);
- rules.push(this.globalRules.NoSpaceBetweenEmptyBraceBrackets);
- }
- else {
- rules.push(this.globalRules.NoSpaceAfterOpenBrace);
- rules.push(this.globalRules.NoSpaceBeforeCloseBrace);
- rules.push(this.globalRules.NoSpaceBetweenEmptyBraceBrackets);
- }
- if (options.insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces) {
- rules.push(this.globalRules.SpaceAfterTemplateHeadAndMiddle);
- rules.push(this.globalRules.SpaceBeforeTemplateMiddleAndTail);
- }
- else {
- rules.push(this.globalRules.NoSpaceAfterTemplateHeadAndMiddle);
- rules.push(this.globalRules.NoSpaceBeforeTemplateMiddleAndTail);
- }
- if (options.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces) {
- rules.push(this.globalRules.SpaceAfterOpenBraceInJsxExpression);
- rules.push(this.globalRules.SpaceBeforeCloseBraceInJsxExpression);
- }
- else {
- rules.push(this.globalRules.NoSpaceAfterOpenBraceInJsxExpression);
- rules.push(this.globalRules.NoSpaceBeforeCloseBraceInJsxExpression);
- }
- if (options.insertSpaceAfterSemicolonInForStatements) {
- rules.push(this.globalRules.SpaceAfterSemicolonInFor);
- }
- else {
- rules.push(this.globalRules.NoSpaceAfterSemicolonInFor);
- }
- if (options.insertSpaceBeforeAndAfterBinaryOperators) {
- rules.push(this.globalRules.SpaceBeforeBinaryOperator);
- rules.push(this.globalRules.SpaceAfterBinaryOperator);
- }
- else {
- 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);
- }
- if (options.placeOpenBraceOnNewLineForFunctions) {
- rules.push(this.globalRules.NewLineBeforeOpenBraceInFunction);
- rules.push(this.globalRules.NewLineBeforeOpenBraceInTypeScriptDeclWithBlock);
- }
- if (options.insertSpaceAfterTypeAssertion) {
- rules.push(this.globalRules.SpaceAfterTypeAssertion);
- }
- else {
- rules.push(this.globalRules.NoSpaceAfterTypeAssertion);
- }
- rules = rules.concat(this.globalRules.LowPriorityCommonRules);
- return rules;
- };
return RulesProvider;
}());
formatting.RulesProvider = RulesProvider;
@@ -68002,7 +70416,7 @@ var ts;
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 formattingContext = new formatting.FormattingContext(sourceFile, requestKind, options);
var previousRangeHasError;
var previousRange;
var previousParent;
@@ -68085,7 +70499,7 @@ var ts;
}
case 149:
case 146:
- return node.name.kind;
+ return ts.getNameOfDeclaration(node).kind;
}
}
function getDynamicIndentation(node, nodeStartLine, indentation, delta) {
@@ -68858,9 +71272,7 @@ var ts;
if (node.kind === 20) {
return -1;
}
- if (node.parent && (node.parent.kind === 181 ||
- node.parent.kind === 182) &&
- node.parent.expression !== node) {
+ if (node.parent && ts.isCallOrNewExpression(node.parent) && node.parent.expression !== node) {
var fullCallOrNewExpression = node.parent.expression;
var startingExpression = getStartingExpression(fullCallOrNewExpression);
if (fullCallOrNewExpression === startingExpression) {
@@ -69140,7 +71552,7 @@ var ts;
return this;
}
if (index !== containingList.length - 1) {
- var nextToken = ts.getTokenAtPosition(sourceFile, node.end);
+ var nextToken = ts.getTokenAtPosition(sourceFile, node.end, false);
if (nextToken && isSeparator(node, nextToken)) {
var startPosition = ts.skipTrivia(sourceFile.text, getAdjustedStartPosition(sourceFile, node, {}, Position.FullStart), false, true);
var nextElement = containingList[index + 1];
@@ -69149,7 +71561,7 @@ var ts;
}
}
else {
- var previousToken = ts.getTokenAtPosition(sourceFile, containingList[index - 1].end);
+ var previousToken = ts.getTokenAtPosition(sourceFile, containingList[index - 1].end, false);
if (previousToken && isSeparator(node, previousToken)) {
this.deleteNodeRange(sourceFile, previousToken, node);
}
@@ -69217,7 +71629,7 @@ var ts;
}
var end = after.getEnd();
if (index !== containingList.length - 1) {
- var nextToken = ts.getTokenAtPosition(sourceFile, after.end);
+ var nextToken = ts.getTokenAtPosition(sourceFile, after.end, false);
if (nextToken && isSeparator(after, nextToken)) {
var lineAndCharOfNextElement = ts.getLineAndCharacterOfPosition(sourceFile, skipWhitespacesAndLineBreaks(sourceFile.text, containingList[index + 1].getFullStart()));
var lineAndCharOfNextToken = ts.getLineAndCharacterOfPosition(sourceFile, nextToken.end);
@@ -69356,7 +71768,7 @@ var ts;
}());
textChanges.ChangeTracker = ChangeTracker;
function getNonformattedText(node, sourceFile, newLine) {
- var options = { newLine: newLine, target: sourceFile.languageVersion };
+ var options = { newLine: newLine, target: sourceFile && sourceFile.languageVersion };
var writer = new Writer(ts.getNewLineCharacter(options));
var printer = ts.createPrinter(options, writer);
printer.writeNode(3, node, sourceFile, writer);
@@ -69385,27 +71797,8 @@ var ts;
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 visited = ts.visitEachChild(node, assignPositionsToNode, ts.nullTransformationContext, assignPositionsToNodeArray, assignPositionsToNode);
var newNode = ts.nodeIsSynthesized(visited)
? visited
: (Proxy.prototype = visited, new Proxy());
@@ -69448,6 +71841,16 @@ var ts;
setEnd(nodes, _this.lastNonTriviaPosition);
}
};
+ this.onBeforeEmitToken = function (node) {
+ if (node) {
+ setPos(node, _this.lastNonTriviaPosition);
+ }
+ };
+ this.onAfterEmitToken = function (node) {
+ if (node) {
+ setEnd(node, _this.lastNonTriviaPosition);
+ }
+ };
}
Writer.prototype.setLastNonTriviaPosition = function (s, force) {
if (force || !isTrivia(s)) {
@@ -69514,14 +71917,14 @@ var ts;
var codefix;
(function (codefix) {
var codeFixes = [];
- function registerCodeFix(action) {
- ts.forEach(action.errorCodes, function (error) {
+ function registerCodeFix(codeFix) {
+ ts.forEach(codeFix.errorCodes, function (error) {
var fixes = codeFixes[error];
if (!fixes) {
fixes = [];
codeFixes[error] = fixes;
}
- fixes.push(action);
+ fixes.push(codeFix);
});
}
codefix.registerCodeFix = registerCodeFix;
@@ -69545,6 +71948,42 @@ var ts;
})(ts || (ts = {}));
var ts;
(function (ts) {
+ var refactor;
+ (function (refactor_1) {
+ var refactors = ts.createMap();
+ function registerRefactor(refactor) {
+ refactors.set(refactor.name, refactor);
+ }
+ refactor_1.registerRefactor = registerRefactor;
+ function getApplicableRefactors(context) {
+ var results;
+ var refactorList = [];
+ refactors.forEach(function (refactor) {
+ refactorList.push(refactor);
+ });
+ for (var _i = 0, refactorList_1 = refactorList; _i < refactorList_1.length; _i++) {
+ var refactor_2 = refactorList_1[_i];
+ if (context.cancellationToken && context.cancellationToken.isCancellationRequested()) {
+ return results;
+ }
+ var infos = refactor_2.getAvailableActions(context);
+ if (infos && infos.length) {
+ (_a = (results || (results = []))).push.apply(_a, infos);
+ }
+ }
+ return results;
+ var _a;
+ }
+ refactor_1.getApplicableRefactors = getApplicableRefactors;
+ function getEditsForRefactor(context, refactorName, actionName) {
+ var refactor = refactors.get(refactorName);
+ return refactor && refactor.getEditsForAction(context, actionName);
+ }
+ refactor_1.getEditsForRefactor = getEditsForRefactor;
+ })(refactor = ts.refactor || (ts.refactor = {}));
+})(ts || (ts = {}));
+var ts;
+(function (ts) {
var codefix;
(function (codefix) {
codefix.registerCodeFix({
@@ -69554,7 +71993,7 @@ var ts;
function getActionForClassLikeIncorrectImplementsInterface(context) {
var sourceFile = context.sourceFile;
var start = context.span.start;
- var token = ts.getTokenAtPosition(sourceFile, start);
+ var token = ts.getTokenAtPosition(sourceFile, start, false);
var checker = context.program.getTypeChecker();
var classDeclaration = ts.getContainingClass(token);
if (!classDeclaration) {
@@ -69607,94 +72046,189 @@ var ts;
var codefix;
(function (codefix) {
codefix.registerCodeFix({
- errorCodes: [ts.Diagnostics.Property_0_does_not_exist_on_type_1.code],
+ errorCodes: [ts.Diagnostics.Property_0_does_not_exist_on_type_1.code,
+ ts.Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2.code],
getCodeActions: getActionsForAddMissingMember
});
function getActionsForAddMissingMember(context) {
- var sourceFile = context.sourceFile;
+ var tokenSourceFile = context.sourceFile;
var start = context.span.start;
- var token = ts.getTokenAtPosition(sourceFile, start);
+ var token = ts.getTokenAtPosition(tokenSourceFile, start, false);
if (token.kind !== 71) {
return undefined;
}
- if (!ts.isPropertyAccessExpression(token.parent) || token.parent.expression.kind !== 99) {
+ if (!ts.isPropertyAccessExpression(token.parent)) {
return undefined;
}
- var classMemberDeclaration = ts.getThisContainer(token, false);
- if (!ts.isClassElement(classMemberDeclaration)) {
- return undefined;
+ var tokenName = token.getText(tokenSourceFile);
+ var makeStatic = false;
+ var classDeclaration;
+ if (token.parent.expression.kind === 99) {
+ var containingClassMemberDeclaration = ts.getThisContainer(token, false);
+ if (!ts.isClassElement(containingClassMemberDeclaration)) {
+ return undefined;
+ }
+ classDeclaration = containingClassMemberDeclaration.parent;
+ makeStatic = classDeclaration && ts.hasModifier(containingClassMemberDeclaration, 32);
+ }
+ else {
+ var checker = context.program.getTypeChecker();
+ var leftExpression = token.parent.expression;
+ var leftExpressionType = checker.getTypeAtLocation(leftExpression);
+ if (leftExpressionType.flags & 32768) {
+ var symbol = leftExpressionType.symbol;
+ if (symbol.flags & 32) {
+ classDeclaration = symbol.declarations && symbol.declarations[0];
+ if (leftExpressionType !== checker.getDeclaredTypeOfSymbol(symbol)) {
+ makeStatic = true;
+ }
+ }
+ }
}
- 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) {
+ var classDeclarationSourceFile = ts.getSourceFileOfNode(classDeclaration);
+ var classOpenBrace = ts.getOpenBraceOfClassLike(classDeclaration, classDeclarationSourceFile);
+ return ts.isInJavaScriptFile(classDeclarationSourceFile) ?
+ getActionsForAddMissingMemberInJavaScriptFile(classDeclaration, makeStatic) :
+ getActionsForAddMissingMemberInTypeScriptFile(classDeclaration, makeStatic);
+ function getActionsForAddMissingMemberInJavaScriptFile(classDeclaration, makeStatic) {
+ var actions;
+ var methodCodeAction = getActionForMethodDeclaration(false);
+ if (methodCodeAction) {
+ actions = [methodCodeAction];
+ }
+ if (makeStatic) {
if (classDeclaration.kind === 199) {
- return undefined;
+ return actions;
}
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 staticInitialization = ts.createStatement(ts.createAssignment(ts.createPropertyAccess(ts.createIdentifier(className), tokenName), ts.createIdentifier("undefined")));
+ var staticInitializationChangeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context);
+ staticInitializationChangeTracker.insertNodeAfter(classDeclarationSourceFile, classDeclaration, staticInitialization, { suffix: context.newLineCharacter });
+ var initializeStaticAction = {
+ description: ts.formatStringFromArgs(ts.getLocaleSpecificMessage(ts.Diagnostics.Initialize_static_property_0), [tokenName]),
+ changes: staticInitializationChangeTracker.getChanges()
+ };
+ (actions || (actions = [])).push(initializeStaticAction);
+ return actions;
}
else {
var classConstructor = ts.getFirstConstructorWithBody(classDeclaration);
if (!classConstructor) {
- return undefined;
+ return actions;
}
- 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
- }]
- }]
- }];
+ var propertyInitialization = ts.createStatement(ts.createAssignment(ts.createPropertyAccess(ts.createThis(), tokenName), ts.createIdentifier("undefined")));
+ var propertyInitializationChangeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context);
+ propertyInitializationChangeTracker.insertNodeAt(classDeclarationSourceFile, classConstructor.body.getEnd() - 1, propertyInitialization, { prefix: context.newLineCharacter, suffix: context.newLineCharacter });
+ var initializeAction = {
+ description: ts.formatStringFromArgs(ts.getLocaleSpecificMessage(ts.Diagnostics.Initialize_property_0_in_the_constructor), [tokenName]),
+ changes: propertyInitializationChangeTracker.getChanges()
+ };
+ (actions || (actions = [])).push(initializeAction);
+ return actions;
}
}
- function getActionsForAddMissingMemberInTypeScriptFile() {
+ function getActionsForAddMissingMemberInTypeScriptFile(classDeclaration, makeStatic) {
+ var actions;
+ var methodCodeAction = getActionForMethodDeclaration(true);
+ if (methodCodeAction) {
+ actions = [methodCodeAction];
+ }
var typeNode;
if (token.parent.parent.kind === 194) {
var binaryExpression = token.parent.parent;
+ var otherExpression = token.parent === binaryExpression.left ? binaryExpression.right : binaryExpression.left;
var checker = context.program.getTypeChecker();
- var widenedType = checker.getWidenedType(checker.getBaseTypeOfLiteralType(checker.getTypeAtLocation(binaryExpression.right)));
+ var widenedType = checker.getWidenedType(checker.getBaseTypeOfLiteralType(checker.getTypeAtLocation(otherExpression)));
typeNode = checker.typeToTypeNode(widenedType, classDeclaration);
}
typeNode = typeNode || ts.createKeywordTypeNode(119);
- var openBrace = ts.getOpenBraceOfClassLike(classDeclaration, sourceFile);
- var property = ts.createProperty(undefined, isStatic ? [ts.createToken(115)] : undefined, token.getText(sourceFile), undefined, typeNode, undefined);
+ var property = ts.createProperty(undefined, makeStatic ? [ts.createToken(115)] : undefined, tokenName, 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) {
+ propertyChangeTracker.insertNodeAfter(classDeclarationSourceFile, classOpenBrace, property, { suffix: context.newLineCharacter });
+ (actions || (actions = [])).push({
+ description: ts.formatStringFromArgs(ts.getLocaleSpecificMessage(ts.Diagnostics.Declare_property_0), [tokenName]),
+ changes: propertyChangeTracker.getChanges()
+ });
+ if (!makeStatic) {
var stringTypeNode = ts.createKeywordTypeNode(136);
var indexingParameter = ts.createParameter(undefined, undefined, undefined, "x", undefined, stringTypeNode, undefined);
- var indexSignature = ts.createIndexSignatureDeclaration(undefined, undefined, [indexingParameter], typeNode);
+ var indexSignature = ts.createIndexSignature(undefined, undefined, [indexingParameter], typeNode);
var indexSignatureChangeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context);
- indexSignatureChangeTracker.insertNodeAfter(sourceFile, openBrace, indexSignature, { suffix: context.newLineCharacter });
+ indexSignatureChangeTracker.insertNodeAfter(classDeclarationSourceFile, classOpenBrace, indexSignature, { suffix: context.newLineCharacter });
actions.push({
- description: ts.formatStringFromArgs(ts.getLocaleSpecificMessage(ts.Diagnostics.Add_index_signature_for_missing_property_0), [token.getText()]),
+ description: ts.formatStringFromArgs(ts.getLocaleSpecificMessage(ts.Diagnostics.Add_index_signature_for_property_0), [tokenName]),
changes: indexSignatureChangeTracker.getChanges()
});
}
return actions;
}
+ function getActionForMethodDeclaration(includeTypeScriptSyntax) {
+ if (token.parent.parent.kind === 181) {
+ var callExpression = token.parent.parent;
+ var methodDeclaration = codefix.createMethodFromCallExpression(callExpression, tokenName, includeTypeScriptSyntax, makeStatic);
+ var methodDeclarationChangeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context);
+ methodDeclarationChangeTracker.insertNodeAfter(classDeclarationSourceFile, classOpenBrace, methodDeclaration, { suffix: context.newLineCharacter });
+ return {
+ description: ts.formatStringFromArgs(ts.getLocaleSpecificMessage(makeStatic ?
+ ts.Diagnostics.Declare_method_0 :
+ ts.Diagnostics.Declare_static_method_0), [tokenName]),
+ changes: methodDeclarationChangeTracker.getChanges()
+ };
+ }
+ }
+ }
+ })(codefix = ts.codefix || (ts.codefix = {}));
+})(ts || (ts = {}));
+var ts;
+(function (ts) {
+ var codefix;
+ (function (codefix) {
+ codefix.registerCodeFix({
+ errorCodes: [ts.Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2.code,
+ ts.Diagnostics.Cannot_find_name_0_Did_you_mean_1.code],
+ getCodeActions: getActionsForCorrectSpelling
+ });
+ function getActionsForCorrectSpelling(context) {
+ var sourceFile = context.sourceFile;
+ var node = ts.getTokenAtPosition(sourceFile, context.span.start, false);
+ var checker = context.program.getTypeChecker();
+ var suggestion;
+ if (node.kind === 71 && ts.isPropertyAccessExpression(node.parent)) {
+ var containingType = checker.getTypeAtLocation(node.parent.expression);
+ suggestion = checker.getSuggestionForNonexistentProperty(node, containingType);
+ }
+ else {
+ var meaning = ts.getMeaningFromLocation(node);
+ suggestion = checker.getSuggestionForNonexistentSymbol(node, ts.getTextOfNode(node), convertSemanticMeaningToSymbolFlags(meaning));
+ }
+ if (suggestion) {
+ return [{
+ description: ts.formatStringFromArgs(ts.getLocaleSpecificMessage(ts.Diagnostics.Change_spelling_to_0), [suggestion]),
+ changes: [{
+ fileName: sourceFile.fileName,
+ textChanges: [{
+ span: { start: node.getStart(), length: node.getWidth() },
+ newText: suggestion
+ }],
+ }],
+ }];
+ }
+ }
+ function convertSemanticMeaningToSymbolFlags(meaning) {
+ var flags = 0;
+ if (meaning & 4) {
+ flags |= 1920;
+ }
+ if (meaning & 2) {
+ flags |= 793064;
+ }
+ if (meaning & 1) {
+ flags |= 107455;
+ }
+ return flags;
}
})(codefix = ts.codefix || (ts.codefix = {}));
})(ts || (ts = {}));
@@ -69713,7 +72247,7 @@ var ts;
function getActionForClassLikeMissingAbstractMember(context) {
var sourceFile = context.sourceFile;
var start = context.span.start;
- var token = ts.getTokenAtPosition(sourceFile, start);
+ var token = ts.getTokenAtPosition(sourceFile, start, false);
var checker = context.program.getTypeChecker();
if (ts.isClassLike(token.parent)) {
var classDeclaration = token.parent;
@@ -69748,7 +72282,7 @@ var ts;
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;
- var token = ts.getTokenAtPosition(sourceFile, context.span.start);
+ var token = ts.getTokenAtPosition(sourceFile, context.span.start, false);
if (token.kind !== 99) {
return undefined;
}
@@ -69793,7 +72327,7 @@ var ts;
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);
+ var token = ts.getTokenAtPosition(sourceFile, context.span.start, false);
if (token.kind !== 123) {
return undefined;
}
@@ -69817,7 +72351,7 @@ var ts;
getCodeActions: function (context) {
var sourceFile = context.sourceFile;
var start = context.span.start;
- var token = ts.getTokenAtPosition(sourceFile, start);
+ var token = ts.getTokenAtPosition(sourceFile, start, false);
var classDeclNode = ts.getContainingClass(token);
if (!(token.kind === 71 && ts.isClassLike(classDeclNode))) {
return undefined;
@@ -69855,7 +72389,7 @@ var ts;
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);
+ var token = ts.getTokenAtPosition(sourceFile, context.span.start, false);
if (token.kind !== 71) {
return undefined;
}
@@ -69881,126 +72415,135 @@ var ts;
getCodeActions: function (context) {
var sourceFile = context.sourceFile;
var start = context.span.start;
- var token = ts.getTokenAtPosition(sourceFile, start);
+ var token = ts.getTokenAtPosition(sourceFile, start, false);
if (token.kind === 21) {
- token = ts.getTokenAtPosition(sourceFile, start + 1);
+ token = ts.getTokenAtPosition(sourceFile, start + 1, false);
}
switch (token.kind) {
case 71:
- switch (token.parent.kind) {
- case 226:
- switch (token.parent.parent.parent.kind) {
- case 214:
- var forStatement = token.parent.parent.parent;
- var forInitializer = forStatement.initializer;
- if (forInitializer.declarations.length === 1) {
- return deleteNode(forInitializer);
- }
- else {
- return deleteNodeInList(token.parent);
- }
- case 216:
- var forOfStatement = token.parent.parent.parent;
- if (forOfStatement.initializer.kind === 227) {
- var forOfInitializer = forOfStatement.initializer;
- return replaceNode(forOfInitializer.declarations[0], ts.createObjectLiteral());
- }
- break;
- case 215:
- return undefined;
- case 260:
- 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 145:
- var typeParameters = token.parent.parent.typeParameters;
- if (typeParameters.length === 1) {
- var previousToken = ts.getTokenAtPosition(sourceFile, typeParameters.pos - 1);
- if (!previousToken || previousToken.kind !== 27) {
- return deleteRange(typeParameters);
- }
- var nextToken = ts.getTokenAtPosition(sourceFile, typeParameters.end);
- if (!nextToken || nextToken.kind !== 29) {
- return deleteRange(typeParameters);
- }
- return deleteNodeRange(previousToken, nextToken);
- }
- else {
- return deleteNodeInList(token.parent);
- }
- case 146:
- var functionDeclaration = token.parent.parent;
- if (functionDeclaration.parameters.length === 1) {
- return deleteNode(token.parent);
- }
- else {
- return deleteNodeInList(token.parent);
- }
- case 237:
- var importEquals = ts.getAncestor(token, 237);
- return deleteNode(importEquals);
- case 242:
- var namedImports = token.parent.parent;
- if (namedImports.elements.length === 1) {
- var importSpec = ts.getAncestor(token, 238);
- return deleteNode(importSpec);
- }
- else {
- return deleteNodeInList(token.parent);
- }
- case 239:
- var importClause = token.parent;
- if (!importClause.namedBindings) {
- var importDecl = ts.getAncestor(importClause, 238);
- return deleteNode(importDecl);
- }
- else {
- var start_4 = importClause.name.getStart(sourceFile);
- var nextToken = ts.getTokenAtPosition(sourceFile, importClause.name.end);
- if (nextToken && nextToken.kind === 26) {
- return deleteRange({ pos: start_4, end: ts.skipTrivia(sourceFile.text, nextToken.end, false, true) });
- }
- else {
- return deleteNode(importClause.name);
- }
- }
- case 240:
- var namespaceImport = token.parent;
- if (namespaceImport.name === token && !namespaceImport.parent.name) {
- var importDecl = ts.getAncestor(namespaceImport, 238);
- return deleteNode(importDecl);
- }
- else {
- var previousToken = ts.getTokenAtPosition(sourceFile, namespaceImport.pos - 1);
- if (previousToken && previousToken.kind === 26) {
- var startPosition = ts.textChanges.getAdjustedStartPosition(sourceFile, previousToken, {}, ts.textChanges.Position.FullStart);
- return deleteRange({ pos: startPosition, end: namespaceImport.end });
- }
- return deleteRange(namespaceImport);
- }
- }
- break;
+ return deleteIdentifierOrPrefixWithUnderscore(token);
case 149:
case 240:
+ return [deleteNode(token.parent)];
+ default:
+ return [deleteDefault()];
+ }
+ function deleteDefault() {
+ if (ts.isDeclarationName(token)) {
return deleteNode(token.parent);
+ }
+ else if (ts.isLiteralComputedPropertyDeclarationName(token)) {
+ return deleteNode(token.parent.parent);
+ }
+ else {
+ return undefined;
+ }
}
- if (ts.isDeclarationName(token)) {
- return deleteNode(token.parent);
+ function prefixIdentifierWithUnderscore(identifier) {
+ var startPosition = identifier.getStart(sourceFile, false);
+ return {
+ description: ts.formatStringFromArgs(ts.getLocaleSpecificMessage(ts.Diagnostics.Prefix_0_with_an_underscore), { 0: token.getText() }),
+ changes: [{
+ fileName: sourceFile.path,
+ textChanges: [{
+ span: { start: startPosition, length: 0 },
+ newText: "_"
+ }]
+ }]
+ };
}
- else if (ts.isLiteralComputedPropertyDeclarationName(token)) {
- return deleteNode(token.parent.parent);
+ function deleteIdentifierOrPrefixWithUnderscore(identifier) {
+ var parent = identifier.parent;
+ switch (parent.kind) {
+ case 226:
+ return deleteVariableDeclarationOrPrefixWithUnderscore(identifier, parent);
+ case 145:
+ var typeParameters = parent.parent.typeParameters;
+ if (typeParameters.length === 1) {
+ var previousToken = ts.getTokenAtPosition(sourceFile, typeParameters.pos - 1, false);
+ var nextToken = ts.getTokenAtPosition(sourceFile, typeParameters.end, false);
+ ts.Debug.assert(previousToken.kind === 27);
+ ts.Debug.assert(nextToken.kind === 29);
+ return [deleteNodeRange(previousToken, nextToken)];
+ }
+ else {
+ return [deleteNodeInList(parent)];
+ }
+ case 146:
+ var functionDeclaration = parent.parent;
+ return [functionDeclaration.parameters.length === 1 ? deleteNode(parent) : deleteNodeInList(parent),
+ prefixIdentifierWithUnderscore(identifier)];
+ case 237:
+ var importEquals = ts.getAncestor(identifier, 237);
+ return [deleteNode(importEquals)];
+ case 242:
+ var namedImports = parent.parent;
+ if (namedImports.elements.length === 1) {
+ var importSpec = ts.getAncestor(identifier, 238);
+ return [deleteNode(importSpec)];
+ }
+ else {
+ return [deleteNodeInList(parent)];
+ }
+ case 239:
+ var importClause = parent;
+ if (!importClause.namedBindings) {
+ var importDecl = ts.getAncestor(importClause, 238);
+ return [deleteNode(importDecl)];
+ }
+ else {
+ var start_4 = importClause.name.getStart(sourceFile);
+ var nextToken = ts.getTokenAtPosition(sourceFile, importClause.name.end, false);
+ if (nextToken && nextToken.kind === 26) {
+ return [deleteRange({ pos: start_4, end: ts.skipTrivia(sourceFile.text, nextToken.end, false, true) })];
+ }
+ else {
+ return [deleteNode(importClause.name)];
+ }
+ }
+ case 240:
+ var namespaceImport = parent;
+ if (namespaceImport.name === identifier && !namespaceImport.parent.name) {
+ var importDecl = ts.getAncestor(namespaceImport, 238);
+ return [deleteNode(importDecl)];
+ }
+ else {
+ var previousToken = ts.getTokenAtPosition(sourceFile, namespaceImport.pos - 1, false);
+ if (previousToken && previousToken.kind === 26) {
+ var startPosition = ts.textChanges.getAdjustedStartPosition(sourceFile, previousToken, {}, ts.textChanges.Position.FullStart);
+ return [deleteRange({ pos: startPosition, end: namespaceImport.end })];
+ }
+ return [deleteRange(namespaceImport)];
+ }
+ default:
+ return [deleteDefault()];
+ }
}
- else {
- return undefined;
+ function deleteVariableDeclarationOrPrefixWithUnderscore(identifier, varDecl) {
+ switch (varDecl.parent.parent.kind) {
+ case 214:
+ var forStatement = varDecl.parent.parent;
+ var forInitializer = forStatement.initializer;
+ return [forInitializer.declarations.length === 1 ? deleteNode(forInitializer) : deleteNodeInList(varDecl)];
+ case 216:
+ var forOfStatement = varDecl.parent.parent;
+ ts.Debug.assert(forOfStatement.initializer.kind === 227);
+ var forOfInitializer = forOfStatement.initializer;
+ return [
+ replaceNode(forOfInitializer.declarations[0], ts.createObjectLiteral()),
+ prefixIdentifierWithUnderscore(identifier)
+ ];
+ case 215:
+ return [prefixIdentifierWithUnderscore(identifier)];
+ default:
+ var variableStatement = varDecl.parent.parent;
+ if (variableStatement.declarationList.declarations.length === 1) {
+ return [deleteNode(variableStatement)];
+ }
+ else {
+ return [deleteNodeInList(varDecl)];
+ }
+ }
}
function deleteNode(n) {
return makeChange(ts.textChanges.ChangeTracker.fromCodeFixContext(context).deleteNode(sourceFile, n));
@@ -70018,10 +72561,10 @@ var ts;
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()
- }];
+ return {
+ description: ts.formatStringFromArgs(ts.getLocaleSpecificMessage(ts.Diagnostics.Remove_declaration_for_Colon_0), { 0: token.getText() }),
+ changes: changeTracker.getChanges()
+ };
}
}
});
@@ -70031,6 +72574,15 @@ var ts;
(function (ts) {
var codefix;
(function (codefix) {
+ codefix.registerCodeFix({
+ errorCodes: [
+ ts.Diagnostics.Cannot_find_name_0.code,
+ ts.Diagnostics.Cannot_find_name_0_Did_you_mean_1.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: getImportCodeActions
+ });
var ModuleSpecifierComparison;
(function (ModuleSpecifierComparison) {
ModuleSpecifierComparison[ModuleSpecifierComparison["Better"] = 0] = "Better";
@@ -70113,342 +72665,349 @@ var ts;
};
return ImportCodeActionMap;
}());
- codefix.registerCodeFix({
- 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();
- var allSourceFiles = context.program.getSourceFiles();
- var useCaseSensitiveFileNames = context.host.useCaseSensitiveFileNames ? context.host.useCaseSensitiveFileNames() : false;
- var token = ts.getTokenAtPosition(sourceFile, context.span.start);
- var name = token.getText();
- var symbolIdActionMap = new ImportCodeActionMap();
- 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)) {
- candidateModules.push(otherSourceFile.symbol);
- }
- }
- 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) {
- var localSymbol = ts.getLocalSymbolForExportDefault(defaultExport);
- if (localSymbol && localSymbol.name === name && checkSymbolHasMeaning(localSymbol, currentTokenMeaning)) {
- var symbolId = getUniqueSymbolId(localSymbol);
- symbolIdActionMap.addActions(symbolId, getCodeActionForImport(moduleSymbol, true));
- }
- }
- var exportSymbolWithIdenticalName = checker.tryGetMemberInModuleExports(name, moduleSymbol);
- if (exportSymbolWithIdenticalName && checkSymbolHasMeaning(exportSymbolWithIdenticalName, currentTokenMeaning)) {
- var symbolId = getUniqueSymbolId(exportSymbolWithIdenticalName);
- symbolIdActionMap.addActions(symbolId, getCodeActionForImport(moduleSymbol));
- }
- }
- return symbolIdActionMap.getAllActions();
- function getImportDeclarations(moduleSymbol) {
- var moduleSymbolId = getUniqueSymbolId(moduleSymbol);
- var cached = cachedImportDeclarations[moduleSymbolId];
- if (cached) {
- return cached;
+ function getImportCodeActions(context) {
+ var sourceFile = context.sourceFile;
+ var checker = context.program.getTypeChecker();
+ var allSourceFiles = context.program.getSourceFiles();
+ var useCaseSensitiveFileNames = context.host.useCaseSensitiveFileNames ? context.host.useCaseSensitiveFileNames() : false;
+ var token = ts.getTokenAtPosition(sourceFile, context.span.start, false);
+ var name = token.getText();
+ var symbolIdActionMap = new ImportCodeActionMap();
+ 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 umdSymbol = checker.getSymbolAtLocation(token);
+ var symbol = void 0;
+ var symbolName = void 0;
+ if (umdSymbol.flags & 8388608) {
+ symbol = checker.getAliasedSymbol(umdSymbol);
+ symbolName = name;
+ }
+ else if (ts.isJsxOpeningLikeElement(token.parent) && token.parent.tagName === token) {
+ symbol = checker.getAliasedSymbol(checker.resolveNameAtLocation(token, checker.getJsxNamespace(), 107455));
+ symbolName = symbol.name;
+ }
+ else {
+ ts.Debug.fail("Either the symbol or the JSX namespace should be a UMD global if we got here");
+ }
+ return getCodeActionForImport(symbol, symbolName, 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)) {
+ candidateModules.push(otherSourceFile.symbol);
+ }
+ }
+ 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) {
+ var localSymbol = ts.getLocalSymbolForExportDefault(defaultExport);
+ if (localSymbol && localSymbol.name === name && checkSymbolHasMeaning(localSymbol, currentTokenMeaning)) {
+ var symbolId = getUniqueSymbolId(localSymbol);
+ symbolIdActionMap.addActions(symbolId, getCodeActionForImport(moduleSymbol, name, true));
}
- var existingDeclarations = [];
- for (var _i = 0, _a = sourceFile.imports; _i < _a.length; _i++) {
- var importModuleSpecifier = _a[_i];
- var importSymbol = checker.getSymbolAtLocation(importModuleSpecifier);
- if (importSymbol === moduleSymbol) {
- existingDeclarations.push(getImportDeclaration(importModuleSpecifier));
- }
- }
- cachedImportDeclarations[moduleSymbolId] = existingDeclarations;
- return existingDeclarations;
- function getImportDeclaration(moduleSpecifier) {
- var node = moduleSpecifier;
- while (node) {
- if (node.kind === 238) {
- return node;
- }
- if (node.kind === 237) {
- return node;
- }
- node = node.parent;
- }
- return undefined;
+ }
+ var exportSymbolWithIdenticalName = checker.tryGetMemberInModuleExports(name, moduleSymbol);
+ if (exportSymbolWithIdenticalName && checkSymbolHasMeaning(exportSymbolWithIdenticalName, currentTokenMeaning)) {
+ var symbolId = getUniqueSymbolId(exportSymbolWithIdenticalName);
+ symbolIdActionMap.addActions(symbolId, getCodeActionForImport(moduleSymbol, name));
+ }
+ }
+ return symbolIdActionMap.getAllActions();
+ function getImportDeclarations(moduleSymbol) {
+ var moduleSymbolId = getUniqueSymbolId(moduleSymbol);
+ var cached = cachedImportDeclarations[moduleSymbolId];
+ if (cached) {
+ return cached;
+ }
+ var existingDeclarations = [];
+ for (var _i = 0, _a = sourceFile.imports; _i < _a.length; _i++) {
+ var importModuleSpecifier = _a[_i];
+ var importSymbol = checker.getSymbolAtLocation(importModuleSpecifier);
+ if (importSymbol === moduleSymbol) {
+ existingDeclarations.push(getImportDeclaration(importModuleSpecifier));
}
}
- function getUniqueSymbolId(symbol) {
- if (symbol.flags & 8388608) {
- return ts.getSymbolId(checker.getAliasedSymbol(symbol));
+ cachedImportDeclarations[moduleSymbolId] = existingDeclarations;
+ return existingDeclarations;
+ function getImportDeclaration(moduleSpecifier) {
+ var node = moduleSpecifier;
+ while (node) {
+ if (node.kind === 238) {
+ return node;
+ }
+ if (node.kind === 237) {
+ return node;
+ }
+ node = node.parent;
}
- return ts.getSymbolId(symbol);
+ return undefined;
}
- function checkSymbolHasMeaning(symbol, meaning) {
- var declarations = symbol.getDeclarations();
- return declarations ? ts.some(symbol.declarations, function (decl) { return !!(ts.getMeaningFromDeclaration(decl) & meaning); }) : false;
+ }
+ function getUniqueSymbolId(symbol) {
+ if (symbol.flags & 8388608) {
+ return ts.getSymbolId(checker.getAliasedSymbol(symbol));
}
- function getCodeActionForImport(moduleSymbol, isDefault, isNamespaceImport) {
- var existingDeclarations = getImportDeclarations(moduleSymbol);
- if (existingDeclarations.length > 0) {
- return getCodeActionsForExistingImport(existingDeclarations);
- }
- else {
- return [getCodeActionForNewImport()];
- }
- function getCodeActionsForExistingImport(declarations) {
- var actions = [];
- var namespaceImportDeclaration;
- var namedImportDeclaration;
- var existingModuleSpecifier;
- for (var _i = 0, declarations_14 = declarations; _i < declarations_14.length; _i++) {
- var declaration = declarations_14[_i];
- if (declaration.kind === 238) {
- var namedBindings = declaration.importClause && declaration.importClause.namedBindings;
- if (namedBindings && namedBindings.kind === 240) {
- namespaceImportDeclaration = declaration;
- }
- else {
- namedImportDeclaration = declaration;
- }
- existingModuleSpecifier = declaration.moduleSpecifier.getText();
+ return ts.getSymbolId(symbol);
+ }
+ function checkSymbolHasMeaning(symbol, meaning) {
+ var declarations = symbol.getDeclarations();
+ return declarations ? ts.some(symbol.declarations, function (decl) { return !!(ts.getMeaningFromDeclaration(decl) & meaning); }) : false;
+ }
+ function getCodeActionForImport(moduleSymbol, symbolName, isDefault, isNamespaceImport) {
+ var existingDeclarations = getImportDeclarations(moduleSymbol);
+ if (existingDeclarations.length > 0) {
+ return getCodeActionsForExistingImport(existingDeclarations);
+ }
+ else {
+ return [getCodeActionForNewImport()];
+ }
+ function getCodeActionsForExistingImport(declarations) {
+ var actions = [];
+ var namespaceImportDeclaration;
+ var namedImportDeclaration;
+ var existingModuleSpecifier;
+ for (var _i = 0, declarations_14 = declarations; _i < declarations_14.length; _i++) {
+ var declaration = declarations_14[_i];
+ if (declaration.kind === 238) {
+ var namedBindings = declaration.importClause && declaration.importClause.namedBindings;
+ if (namedBindings && namedBindings.kind === 240) {
+ namespaceImportDeclaration = declaration;
}
else {
- namespaceImportDeclaration = declaration;
- existingModuleSpecifier = getModuleSpecifierFromImportEqualsDeclaration(declaration);
+ namedImportDeclaration = declaration;
}
+ existingModuleSpecifier = declaration.moduleSpecifier.getText();
}
- if (namespaceImportDeclaration) {
- actions.push(getCodeActionForNamespaceImport(namespaceImportDeclaration));
+ else {
+ namespaceImportDeclaration = declaration;
+ existingModuleSpecifier = getModuleSpecifierFromImportEqualsDeclaration(declaration);
}
- if (!isNamespaceImport && namedImportDeclaration && namedImportDeclaration.importClause &&
- (namedImportDeclaration.importClause.name || namedImportDeclaration.importClause.namedBindings)) {
- 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], fileTextChanges, "InsertingIntoExistingImport", moduleSpecifierWithoutQuotes));
+ }
+ if (namespaceImportDeclaration) {
+ actions.push(getCodeActionForNamespaceImport(namespaceImportDeclaration));
+ }
+ if (!isNamespaceImport && namedImportDeclaration && namedImportDeclaration.importClause &&
+ (namedImportDeclaration.importClause.name || namedImportDeclaration.importClause.namedBindings)) {
+ 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], fileTextChanges, "InsertingIntoExistingImport", moduleSpecifierWithoutQuotes));
+ }
+ else {
+ actions.push(getCodeActionForNewImport(existingModuleSpecifier));
+ }
+ return actions;
+ function getModuleSpecifierFromImportEqualsDeclaration(declaration) {
+ if (declaration.moduleReference && declaration.moduleReference.kind === 248) {
+ return declaration.moduleReference.expression.getText();
}
- else {
- actions.push(getCodeActionForNewImport(existingModuleSpecifier));
+ return declaration.moduleReference.getText();
+ }
+ function getTextChangeForImportClause(importClause) {
+ var importList = importClause.namedBindings;
+ 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();
}
- return actions;
- function getModuleSpecifierFromImportEqualsDeclaration(declaration) {
- if (declaration.moduleReference && declaration.moduleReference.kind === 248) {
- return declaration.moduleReference.expression.getText();
- }
- return declaration.moduleReference.getText();
- }
- function getTextChangeForImportClause(importClause) {
- var importList = importClause.namedBindings;
- 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();
- }
- return createChangeTracker().insertNodeInListAfter(sourceFile, importList.elements[importList.elements.length - 1], newImportSpecifier).getChanges();
+ return createChangeTracker().insertNodeInListAfter(sourceFile, importList.elements[importList.elements.length - 1], newImportSpecifier).getChanges();
+ }
+ function getCodeActionForNamespaceImport(declaration) {
+ var namespacePrefix;
+ if (declaration.kind === 238) {
+ namespacePrefix = declaration.importClause.namedBindings.name.getText();
}
- function getCodeActionForNamespaceImport(declaration) {
- var namespacePrefix;
- if (declaration.kind === 238) {
- 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], createChangeTracker().replaceNode(sourceFile, token, ts.createPropertyAccess(ts.createIdentifier(namespacePrefix), name)).getChanges(), "CodeChange");
+ else {
+ namespacePrefix = declaration.name.getText();
}
+ namespacePrefix = ts.stripQuotes(namespacePrefix);
+ 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 (!lastImportDeclaration) {
- for (var i = sourceFile.statements.length - 1; i >= 0; i--) {
- var statement = sourceFile.statements[i];
- if (statement.kind === 237 || statement.kind === 238) {
- lastImportDeclaration = statement;
- break;
- }
+ }
+ function getCodeActionForNewImport(moduleSpecifier) {
+ if (!lastImportDeclaration) {
+ for (var i = sourceFile.statements.length - 1; i >= 0; i--) {
+ var statement = sourceFile.statements[i];
+ if (statement.kind === 237 || statement.kind === 238) {
+ lastImportDeclaration = statement;
+ break;
}
}
- var getCanonicalFileName = ts.createGetCanonicalFileName(useCaseSensitiveFileNames);
- var moduleSpecifierWithoutQuotes = ts.stripQuotes(moduleSpecifier || getModuleSpecifierForNewImport());
- 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 });
+ }
+ var getCanonicalFileName = ts.createGetCanonicalFileName(useCaseSensitiveFileNames);
+ var moduleSpecifierWithoutQuotes = ts.stripQuotes(moduleSpecifier || getModuleSpecifierForNewImport());
+ var changeTracker = createChangeTracker();
+ var importClause = isDefault
+ ? ts.createImportClause(ts.createIdentifier(symbolName), undefined)
+ : isNamespaceImport
+ ? ts.createImportClause(undefined, ts.createNamespaceImport(ts.createIdentifier(symbolName)))
+ : ts.createImportClause(undefined, ts.createNamedImports([ts.createImportSpecifier(undefined, ts.createIdentifier(symbolName))]));
+ 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, [symbolName, "\"" + moduleSpecifierWithoutQuotes + "\""], changeTracker.getChanges(), "NewImport", moduleSpecifierWithoutQuotes);
+ function getModuleSpecifierForNewImport() {
+ var fileName = sourceFile.fileName;
+ var moduleFileName = moduleSymbol.valueDeclaration.getSourceFile().fileName;
+ var sourceDirectory = ts.getDirectoryPath(fileName);
+ var options = context.program.getCompilerOptions();
+ return tryGetModuleNameFromAmbientModule() ||
+ tryGetModuleNameFromTypeRoots() ||
+ tryGetModuleNameAsNodeModule() ||
+ tryGetModuleNameFromBaseUrl() ||
+ tryGetModuleNameFromRootDirs() ||
+ ts.removeFileExtension(getRelativePath(moduleFileName, sourceDirectory));
+ function tryGetModuleNameFromAmbientModule() {
+ var decl = moduleSymbol.valueDeclaration;
+ if (ts.isModuleDeclaration(decl) && ts.isStringLiteral(decl.name)) {
+ return decl.name.text;
+ }
}
- return createCodeAction(ts.Diagnostics.Import_0_from_1, [name, "\"" + moduleSpecifierWithoutQuotes + "\""], changeTracker.getChanges(), "NewImport", moduleSpecifierWithoutQuotes);
- function getModuleSpecifierForNewImport() {
- var fileName = sourceFile.fileName;
- var moduleFileName = moduleSymbol.valueDeclaration.getSourceFile().fileName;
- var sourceDirectory = ts.getDirectoryPath(fileName);
- var options = context.program.getCompilerOptions();
- return tryGetModuleNameFromAmbientModule() ||
- tryGetModuleNameFromTypeRoots() ||
- tryGetModuleNameAsNodeModule() ||
- tryGetModuleNameFromBaseUrl() ||
- tryGetModuleNameFromRootDirs() ||
- ts.removeFileExtension(getRelativePath(moduleFileName, sourceDirectory));
- function tryGetModuleNameFromAmbientModule() {
- if (moduleSymbol.valueDeclaration.kind !== 265) {
- return moduleSymbol.name;
- }
+ function tryGetModuleNameFromBaseUrl() {
+ if (!options.baseUrl) {
+ return undefined;
}
- function tryGetModuleNameFromBaseUrl() {
- if (!options.baseUrl) {
- return undefined;
- }
- 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) {
- for (var _i = 0, _a = options.paths[key]; _i < _a.length; _i++) {
- var pattern = _a[_i];
- var indexOfStar = pattern.indexOf("*");
- if (indexOfStar === 0 && pattern.length === 1) {
- continue;
- }
- else if (indexOfStar !== -1) {
- var prefix = pattern.substr(0, indexOfStar);
- var suffix = pattern.substr(indexOfStar + 1);
- if (relativeName.length >= prefix.length + suffix.length &&
- ts.startsWith(relativeName, prefix) &&
- ts.endsWith(relativeName, suffix)) {
- var matchedStar = relativeName.substr(prefix.length, relativeName.length - suffix.length);
- return key.replace("\*", matchedStar);
- }
- }
- else if (pattern === relativeName || pattern === relativeNameWithIndex) {
- return key;
+ 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) {
+ for (var _i = 0, _a = options.paths[key]; _i < _a.length; _i++) {
+ var pattern = _a[_i];
+ var indexOfStar = pattern.indexOf("*");
+ if (indexOfStar === 0 && pattern.length === 1) {
+ continue;
+ }
+ else if (indexOfStar !== -1) {
+ var prefix = pattern.substr(0, indexOfStar);
+ var suffix = pattern.substr(indexOfStar + 1);
+ if (relativeName.length >= prefix.length + suffix.length &&
+ ts.startsWith(relativeName, prefix) &&
+ ts.endsWith(relativeName, suffix)) {
+ var matchedStar = relativeName.substr(prefix.length, relativeName.length - suffix.length);
+ return key.replace("\*", matchedStar);
}
}
+ else if (pattern === relativeName || pattern === relativeNameWithIndex) {
+ return key;
+ }
}
}
- return relativeName;
}
- function tryGetModuleNameFromRootDirs() {
- if (options.rootDirs) {
- 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);
- }
+ return relativeName;
+ }
+ function tryGetModuleNameFromRootDirs() {
+ if (options.rootDirs) {
+ 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);
}
- return undefined;
}
- function tryGetModuleNameFromTypeRoots() {
- var typeRoots = ts.getEffectiveTypeRoots(options, context.host);
- if (typeRoots) {
- var normalizedTypeRoots = ts.map(typeRoots, function (typeRoot) { return ts.toPath(typeRoot, undefined, getCanonicalFileName); });
- for (var _i = 0, normalizedTypeRoots_1 = normalizedTypeRoots; _i < normalizedTypeRoots_1.length; _i++) {
- var typeRoot = normalizedTypeRoots_1[_i];
- if (ts.startsWith(moduleFileName, typeRoot)) {
- var relativeFileName = moduleFileName.substring(typeRoot.length + 1);
- return removeExtensionAndIndexPostFix(relativeFileName);
- }
+ return undefined;
+ }
+ function tryGetModuleNameFromTypeRoots() {
+ var typeRoots = ts.getEffectiveTypeRoots(options, context.host);
+ if (typeRoots) {
+ var normalizedTypeRoots = ts.map(typeRoots, function (typeRoot) { return ts.toPath(typeRoot, undefined, getCanonicalFileName); });
+ for (var _i = 0, normalizedTypeRoots_1 = normalizedTypeRoots; _i < normalizedTypeRoots_1.length; _i++) {
+ var typeRoot = normalizedTypeRoots_1[_i];
+ if (ts.startsWith(moduleFileName, typeRoot)) {
+ var relativeFileName = moduleFileName.substring(typeRoot.length + 1);
+ return removeExtensionAndIndexPostFix(relativeFileName);
}
}
}
- function tryGetModuleNameAsNodeModule() {
- if (ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.NodeJs) {
- return undefined;
- }
- var indexOfNodeModules = moduleFileName.indexOf("node_modules");
- if (indexOfNodeModules < 0) {
- return undefined;
- }
- var relativeFileName;
- if (sourceDirectory.indexOf(moduleFileName.substring(0, indexOfNodeModules - 1)) === 0) {
- relativeFileName = moduleFileName.substring(indexOfNodeModules + 13);
- }
- else {
- relativeFileName = getRelativePath(moduleFileName, sourceDirectory);
- }
- relativeFileName = ts.removeFileExtension(relativeFileName);
- if (ts.endsWith(relativeFileName, "/index")) {
- relativeFileName = ts.getDirectoryPath(relativeFileName);
- }
- else {
- try {
- var moduleDirectory = ts.getDirectoryPath(moduleFileName);
- var packageJsonContent = JSON.parse(context.host.readFile(ts.combinePaths(moduleDirectory, "package.json")));
- if (packageJsonContent) {
- var mainFile = packageJsonContent.main || packageJsonContent.typings;
- if (mainFile) {
- var mainExportFile = ts.toPath(mainFile, moduleDirectory, getCanonicalFileName);
- if (ts.removeFileExtension(mainExportFile) === ts.removeFileExtension(moduleFileName)) {
- relativeFileName = ts.getDirectoryPath(relativeFileName);
- }
+ }
+ function tryGetModuleNameAsNodeModule() {
+ if (ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.NodeJs) {
+ return undefined;
+ }
+ var indexOfNodeModules = moduleFileName.indexOf("node_modules");
+ if (indexOfNodeModules < 0) {
+ return undefined;
+ }
+ var relativeFileName;
+ if (sourceDirectory.indexOf(moduleFileName.substring(0, indexOfNodeModules - 1)) === 0) {
+ relativeFileName = moduleFileName.substring(indexOfNodeModules + 13);
+ }
+ else {
+ relativeFileName = getRelativePath(moduleFileName, sourceDirectory);
+ }
+ relativeFileName = ts.removeFileExtension(relativeFileName);
+ if (ts.endsWith(relativeFileName, "/index")) {
+ relativeFileName = ts.getDirectoryPath(relativeFileName);
+ }
+ else {
+ try {
+ var moduleDirectory = ts.getDirectoryPath(moduleFileName);
+ var packageJsonContent = JSON.parse(context.host.readFile(ts.combinePaths(moduleDirectory, "package.json")));
+ if (packageJsonContent) {
+ var mainFile = packageJsonContent.main || packageJsonContent.typings;
+ if (mainFile) {
+ var mainExportFile = ts.toPath(mainFile, moduleDirectory, getCanonicalFileName);
+ if (ts.removeFileExtension(mainExportFile) === ts.removeFileExtension(moduleFileName)) {
+ relativeFileName = ts.getDirectoryPath(relativeFileName);
}
}
}
- catch (e) { }
- }
- return relativeFileName;
- }
- }
- function getPathRelativeToRootDirs(path, rootDirs) {
- for (var _i = 0, rootDirs_2 = rootDirs; _i < rootDirs_2.length; _i++) {
- var rootDir = rootDirs_2[_i];
- var relativeName = getRelativePathIfInDirectory(path, rootDir);
- if (relativeName !== undefined) {
- return relativeName;
}
+ catch (e) { }
}
- return undefined;
+ return ts.getPackageNameFromAtTypesDirectory(relativeFileName);
}
- function removeExtensionAndIndexPostFix(fileName) {
- fileName = ts.removeFileExtension(fileName);
- if (ts.endsWith(fileName, "/index")) {
- fileName = fileName.substr(0, fileName.length - 6);
+ }
+ function getPathRelativeToRootDirs(path, rootDirs) {
+ for (var _i = 0, rootDirs_2 = rootDirs; _i < rootDirs_2.length; _i++) {
+ var rootDir = rootDirs_2[_i];
+ var relativeName = getRelativePathIfInDirectory(path, rootDir);
+ if (relativeName !== undefined) {
+ return relativeName;
}
- 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;
+ return undefined;
+ }
+ function removeExtensionAndIndexPostFix(fileName) {
+ fileName = ts.removeFileExtension(fileName);
+ if (ts.endsWith(fileName, "/index")) {
+ fileName = fileName.substr(0, fileName.length - 6);
}
+ 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 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: changes,
- kind: kind,
- moduleSpecifier: 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: changes,
+ kind: kind,
+ moduleSpecifier: moduleSpecifier
+ };
+ }
+ }
})(codefix = ts.codefix || (ts.codefix = {}));
})(ts || (ts = {}));
var ts;
@@ -70470,7 +73029,7 @@ var ts;
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 token = ts.getTouchingToken(sourceFile, startPosition, false);
var tokenLeadingCommnets = ts.getLeadingCommentRangesOfNode(token, sourceFile);
if (!tokenLeadingCommnets || !tokenLeadingCommnets.length || tokenLeadingCommnets[0].pos >= startPosition) {
return {
@@ -70563,7 +73122,7 @@ var ts;
return undefined;
}
var declaration = declarations[0];
- var name = ts.getSynthesizedClone(declaration.name);
+ var name = ts.getSynthesizedClone(ts.getNameOfDeclaration(declaration));
var visibilityModifier = createVisibilityModifier(ts.getModifierFlags(declaration));
var modifiers = visibilityModifier ? ts.createNodeArray([visibilityModifier]) : undefined;
var type = checker.getWidenedType(checker.getTypeOfSymbolAtLocation(symbol, enclosingDeclaration));
@@ -70612,7 +73171,7 @@ var ts;
return undefined;
}
function signatureToMethodDeclaration(signature, enclosingDeclaration, body) {
- var signatureDeclaration = checker.signatureToSignatureDeclaration(signature, 151, enclosingDeclaration);
+ var signatureDeclaration = checker.signatureToSignatureDeclaration(signature, 151, enclosingDeclaration, ts.NodeBuilderFlags.SuppressAnyReturnType);
if (signatureDeclaration) {
signatureDeclaration.decorators = undefined;
signatureDeclaration.modifiers = modifiers;
@@ -70623,6 +73182,29 @@ var ts;
return signatureDeclaration;
}
}
+ function createMethodFromCallExpression(callExpression, methodName, includeTypeScriptSyntax, makeStatic) {
+ var parameters = createDummyParameters(callExpression.arguments.length, undefined, undefined, includeTypeScriptSyntax);
+ var typeParameters;
+ if (includeTypeScriptSyntax) {
+ var typeArgCount = ts.length(callExpression.typeArguments);
+ for (var i = 0; i < typeArgCount; i++) {
+ var name = typeArgCount < 8 ? String.fromCharCode(84 + i) : "T" + i;
+ var typeParameter = ts.createTypeParameterDeclaration(name, undefined, undefined);
+ (typeParameters ? typeParameters : typeParameters = []).push(typeParameter);
+ }
+ }
+ var newMethod = ts.createMethod(undefined, makeStatic ? [ts.createToken(115)] : undefined, undefined, methodName, undefined, typeParameters, parameters, includeTypeScriptSyntax ? ts.createKeywordTypeNode(119) : undefined, createStubbedMethodBody());
+ return newMethod;
+ }
+ codefix.createMethodFromCallExpression = createMethodFromCallExpression;
+ function createDummyParameters(argCount, names, minArgumentCount, addAnyType) {
+ var parameters = [];
+ for (var i = 0; i < argCount; i++) {
+ var newParameter = ts.createParameter(undefined, undefined, undefined, names && names[i] || "arg" + i, minArgumentCount !== undefined && i >= minArgumentCount ? ts.createToken(55) : undefined, addAnyType ? ts.createKeywordTypeNode(119) : undefined, undefined);
+ parameters.push(newParameter);
+ }
+ return parameters;
+ }
function createMethodImplementingSignatures(signatures, name, optional, modifiers) {
var maxArgsSignature = signatures[0];
var minArgumentCount = signatures[0].minArgumentCount;
@@ -70639,12 +73221,7 @@ var ts;
}
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(119);
- var newParameter = ts.createParameter(undefined, undefined, undefined, maxArgsParameterSymbolNames[i], i >= minArgumentCount ? ts.createToken(55) : undefined, anyType, undefined);
- parameters.push(newParameter);
- }
+ var parameters = createDummyParameters(maxNonRestArgs, maxArgsParameterSymbolNames, minArgumentCount, true);
if (someSigHasRestParameter) {
var anyArrayType = ts.createArrayTypeNode(ts.createKeywordTypeNode(119));
var restParameter = ts.createParameter(undefined, undefined, ts.createToken(24), maxArgsParameterSymbolNames[maxNonRestArgs] || "rest", maxNonRestArgs >= minArgumentCount ? ts.createToken(55) : undefined, anyArrayType, undefined);
@@ -70653,7 +73230,7 @@ var ts;
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(55) : undefined, typeParameters, parameters, returnType, createStubbedMethodBody());
+ return ts.createMethod(undefined, modifiers, undefined, name, optional ? ts.createToken(55) : undefined, typeParameters, parameters, returnType, createStubbedMethodBody());
}
codefix.createStubbedMethod = createStubbedMethod;
function createStubbedMethodBody() {
@@ -70672,9 +73249,190 @@ var ts;
})(ts || (ts = {}));
var ts;
(function (ts) {
+ var refactor;
+ (function (refactor) {
+ var actionName = "convert";
+ var convertFunctionToES6Class = {
+ name: "Convert to ES2015 class",
+ description: ts.Diagnostics.Convert_function_to_an_ES2015_class.message,
+ getEditsForAction: getEditsForAction,
+ getAvailableActions: getAvailableActions
+ };
+ refactor.registerRefactor(convertFunctionToES6Class);
+ function getAvailableActions(context) {
+ var start = context.startPosition;
+ var node = ts.getTokenAtPosition(context.file, start, false);
+ var checker = context.program.getTypeChecker();
+ var symbol = checker.getSymbolAtLocation(node);
+ if (symbol && ts.isDeclarationOfFunctionOrClassExpression(symbol)) {
+ symbol = symbol.valueDeclaration.initializer.symbol;
+ }
+ if (symbol && (symbol.flags & 16) && symbol.members && (symbol.members.size > 0)) {
+ return [
+ {
+ name: convertFunctionToES6Class.name,
+ description: convertFunctionToES6Class.description,
+ actions: [
+ {
+ description: convertFunctionToES6Class.description,
+ name: actionName
+ }
+ ]
+ }
+ ];
+ }
+ }
+ function getEditsForAction(context, action) {
+ if (actionName !== action) {
+ return undefined;
+ }
+ var start = context.startPosition;
+ var sourceFile = context.file;
+ var checker = context.program.getTypeChecker();
+ var token = ts.getTokenAtPosition(sourceFile, start, false);
+ var ctorSymbol = checker.getSymbolAtLocation(token);
+ var newLine = context.rulesProvider.getFormatOptions().newLineCharacter;
+ var deletedNodes = [];
+ var deletes = [];
+ if (!(ctorSymbol.flags & (16 | 3))) {
+ return undefined;
+ }
+ var ctorDeclaration = ctorSymbol.valueDeclaration;
+ var changeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context);
+ var precedingNode;
+ var newClassDeclaration;
+ switch (ctorDeclaration.kind) {
+ case 228:
+ precedingNode = ctorDeclaration;
+ deleteNode(ctorDeclaration);
+ newClassDeclaration = createClassFromFunctionDeclaration(ctorDeclaration);
+ break;
+ case 226:
+ precedingNode = ctorDeclaration.parent.parent;
+ if (ctorDeclaration.parent.declarations.length === 1) {
+ deleteNode(precedingNode);
+ }
+ else {
+ deleteNode(ctorDeclaration, true);
+ }
+ newClassDeclaration = createClassFromVariableDeclaration(ctorDeclaration);
+ break;
+ }
+ if (!newClassDeclaration) {
+ return undefined;
+ }
+ changeTracker.insertNodeAfter(sourceFile, precedingNode, newClassDeclaration, { suffix: newLine });
+ for (var _i = 0, deletes_1 = deletes; _i < deletes_1.length; _i++) {
+ var deleteCallback = deletes_1[_i];
+ deleteCallback();
+ }
+ return {
+ edits: changeTracker.getChanges()
+ };
+ function deleteNode(node, inList) {
+ if (inList === void 0) { inList = false; }
+ if (deletedNodes.some(function (n) { return ts.isNodeDescendantOf(node, n); })) {
+ return;
+ }
+ deletedNodes.push(node);
+ if (inList) {
+ deletes.push(function () { return changeTracker.deleteNodeInList(sourceFile, node); });
+ }
+ else {
+ deletes.push(function () { return changeTracker.deleteNode(sourceFile, node); });
+ }
+ }
+ function createClassElementsFromSymbol(symbol) {
+ var memberElements = [];
+ if (symbol.members) {
+ symbol.members.forEach(function (member) {
+ var memberElement = createClassElement(member, undefined);
+ if (memberElement) {
+ memberElements.push(memberElement);
+ }
+ });
+ }
+ if (symbol.exports) {
+ symbol.exports.forEach(function (member) {
+ var memberElement = createClassElement(member, [ts.createToken(115)]);
+ if (memberElement) {
+ memberElements.push(memberElement);
+ }
+ });
+ }
+ return memberElements;
+ function shouldConvertDeclaration(_target, source) {
+ return ts.isFunctionLike(source);
+ }
+ function createClassElement(symbol, modifiers) {
+ if (!(symbol.flags & 4)) {
+ return;
+ }
+ var memberDeclaration = symbol.valueDeclaration;
+ var assignmentBinaryExpression = memberDeclaration.parent;
+ if (!shouldConvertDeclaration(memberDeclaration, assignmentBinaryExpression.right)) {
+ return;
+ }
+ var nodeToDelete = assignmentBinaryExpression.parent && assignmentBinaryExpression.parent.kind === 210
+ ? assignmentBinaryExpression.parent : assignmentBinaryExpression;
+ deleteNode(nodeToDelete);
+ if (!assignmentBinaryExpression.right) {
+ return ts.createProperty([], modifiers, symbol.name, undefined, undefined, undefined);
+ }
+ switch (assignmentBinaryExpression.right.kind) {
+ case 186:
+ var functionExpression = assignmentBinaryExpression.right;
+ return ts.createMethod(undefined, modifiers, undefined, memberDeclaration.name, undefined, undefined, functionExpression.parameters, undefined, functionExpression.body);
+ case 187:
+ var arrowFunction = assignmentBinaryExpression.right;
+ var arrowFunctionBody = arrowFunction.body;
+ var bodyBlock = void 0;
+ if (arrowFunctionBody.kind === 207) {
+ bodyBlock = arrowFunctionBody;
+ }
+ else {
+ var expression = arrowFunctionBody;
+ bodyBlock = ts.createBlock([ts.createReturn(expression)]);
+ }
+ return ts.createMethod(undefined, modifiers, undefined, memberDeclaration.name, undefined, undefined, arrowFunction.parameters, undefined, bodyBlock);
+ default:
+ if (ts.isSourceFileJavaScript(sourceFile)) {
+ return;
+ }
+ return ts.createProperty(undefined, modifiers, memberDeclaration.name, undefined, undefined, assignmentBinaryExpression.right);
+ }
+ }
+ }
+ function createClassFromVariableDeclaration(node) {
+ var initializer = node.initializer;
+ if (!initializer || initializer.kind !== 186) {
+ return undefined;
+ }
+ if (node.name.kind !== 71) {
+ return undefined;
+ }
+ var memberElements = createClassElementsFromSymbol(initializer.symbol);
+ if (initializer.body) {
+ memberElements.unshift(ts.createConstructor(undefined, undefined, initializer.parameters, initializer.body));
+ }
+ return ts.createClassDeclaration(undefined, undefined, node.name, undefined, undefined, memberElements);
+ }
+ function createClassFromFunctionDeclaration(node) {
+ var memberElements = createClassElementsFromSymbol(ctorSymbol);
+ if (node.body) {
+ memberElements.unshift(ts.createConstructor(undefined, undefined, node.parameters, node.body));
+ }
+ return ts.createClassDeclaration(undefined, undefined, node.name, undefined, undefined, memberElements);
+ }
+ }
+ })(refactor = ts.refactor || (ts.refactor = {}));
+})(ts || (ts = {}));
+var ts;
+(function (ts) {
ts.servicesVersion = "0.5";
+ var ruleProvider;
function createNode(kind, pos, end, parent) {
- var node = kind >= 143 ? new NodeObject(kind, pos, end) :
+ var node = ts.isNodeKind(kind) ? new NodeObject(kind, pos, end) :
kind === 71 ? new IdentifierObject(71, pos, end) :
new TokenObject(kind, pos, end);
node.parent = parent;
@@ -70719,10 +73477,11 @@ var ts;
}
return sourceFile.text.substring(this.getStart(sourceFile), this.getEnd());
};
- NodeObject.prototype.addSyntheticNodes = function (nodes, pos, end, useJSDocScanner) {
+ NodeObject.prototype.addSyntheticNodes = function (nodes, pos, end) {
ts.scanner.setTextPos(pos);
while (pos < end) {
- var token = useJSDocScanner ? ts.scanner.scanJSDocToken() : ts.scanner.scan();
+ var token = ts.scanner.scan();
+ ts.Debug.assert(token !== 1);
var textPos = ts.scanner.getTextPos();
if (textPos <= end) {
nodes.push(createNode(token, pos, textPos, this));
@@ -70732,7 +73491,7 @@ var ts;
return pos;
};
NodeObject.prototype.createSyntaxList = function (nodes) {
- var list = createNode(294, nodes.pos, nodes.end, this);
+ var list = createNode(295, nodes.pos, nodes.end, this);
list._children = [];
var pos = nodes.pos;
for (var _i = 0, nodes_9 = nodes; _i < nodes_9.length; _i++) {
@@ -70750,43 +73509,44 @@ var ts;
};
NodeObject.prototype.createChildren = function (sourceFile) {
var _this = this;
- var children;
- if (this.kind >= 143) {
- ts.scanner.setText((sourceFile || this.getSourceFile()).text);
- children = [];
- var pos_3 = this.pos;
- var useJSDocScanner_1 = this.kind >= 283 && this.kind <= 293;
- var processNode = function (node) {
- var isJSDocTagNode = ts.isJSDocTag(node);
- if (!isJSDocTagNode && pos_3 < node.pos) {
- pos_3 = _this.addSyntheticNodes(children, pos_3, node.pos, useJSDocScanner_1);
- }
- children.push(node);
- if (!isJSDocTagNode) {
- pos_3 = node.end;
- }
- };
- var processNodes = function (nodes) {
- if (pos_3 < nodes.pos) {
- pos_3 = _this.addSyntheticNodes(children, pos_3, nodes.pos, useJSDocScanner_1);
- }
- children.push(_this.createSyntaxList(nodes));
- pos_3 = nodes.end;
- };
- if (this.jsDoc) {
- for (var _i = 0, _a = this.jsDoc; _i < _a.length; _i++) {
- var jsDocComment = _a[_i];
- processNode(jsDocComment);
- }
+ if (!ts.isNodeKind(this.kind)) {
+ this._children = ts.emptyArray;
+ return;
+ }
+ if (ts.isJSDocCommentContainingNode(this)) {
+ var children_3 = [];
+ this.forEachChild(function (child) { children_3.push(child); });
+ this._children = children_3;
+ return;
+ }
+ var children = [];
+ ts.scanner.setText((sourceFile || this.getSourceFile()).text);
+ var pos = this.pos;
+ var processNode = function (node) {
+ pos = _this.addSyntheticNodes(children, pos, node.pos);
+ children.push(node);
+ pos = node.end;
+ };
+ var processNodes = function (nodes) {
+ if (pos < nodes.pos) {
+ pos = _this.addSyntheticNodes(children, pos, nodes.pos);
}
- pos_3 = this.pos;
- ts.forEachChild(this, processNode, processNodes);
- if (pos_3 < this.end) {
- this.addSyntheticNodes(children, pos_3, this.end);
+ children.push(_this.createSyntaxList(nodes));
+ pos = nodes.end;
+ };
+ if (this.jsDoc) {
+ for (var _i = 0, _a = this.jsDoc; _i < _a.length; _i++) {
+ var jsDocComment = _a[_i];
+ processNode(jsDocComment);
}
- ts.scanner.setText(undefined);
}
- this._children = children || ts.emptyArray;
+ pos = this.pos;
+ ts.forEachChild(this, processNode, processNodes);
+ if (pos < this.end) {
+ this.addSyntheticNodes(children, pos, this.end);
+ }
+ ts.scanner.setText(undefined);
+ this._children = children;
};
NodeObject.prototype.getChildCount = function (sourceFile) {
if (!this._children)
@@ -70808,7 +73568,7 @@ var ts;
if (!children.length) {
return undefined;
}
- var child = ts.find(children, function (kid) { return kid.kind < 267 || kid.kind > 293; });
+ var child = ts.find(children, function (kid) { return kid.kind < 267 || kid.kind > 294; });
return child.kind < 143 ?
child :
child.getFirstToken(sourceFile);
@@ -71051,13 +73811,14 @@ var ts;
return declarations;
}
function getDeclarationName(declaration) {
- if (declaration.name) {
- var result_7 = getTextOfIdentifierOrLiteral(declaration.name);
- if (result_7 !== undefined) {
- return result_7;
+ var name = ts.getNameOfDeclaration(declaration);
+ if (name) {
+ var result_8 = getTextOfIdentifierOrLiteral(name);
+ if (result_8 !== undefined) {
+ return result_8;
}
- if (declaration.name.kind === 144) {
- var expr = declaration.name.expression;
+ if (name.kind === 144) {
+ var expr = name.expression;
if (expr.kind === 179) {
return expr.name.text;
}
@@ -71127,8 +73888,9 @@ var ts;
ts.forEachChild(decl.name, visit);
break;
}
- if (decl.initializer)
+ if (decl.initializer) {
visit(decl.initializer);
+ }
}
case 264:
case 149:
@@ -71163,6 +73925,17 @@ var ts;
};
return SourceFileObject;
}(NodeObject));
+ var SourceMapSourceObject = (function () {
+ function SourceMapSourceObject(fileName, text, skipTrivia) {
+ this.fileName = fileName;
+ this.text = text;
+ this.skipTrivia = skipTrivia;
+ }
+ SourceMapSourceObject.prototype.getLineAndCharacterOfPosition = function (pos) {
+ return ts.getLineAndCharacterOfPosition(this, pos);
+ };
+ return SourceMapSourceObject;
+ }());
function getServicesObjectAllocator() {
return {
getNodeConstructor: function () { return NodeObject; },
@@ -71172,6 +73945,7 @@ var ts;
getSymbolConstructor: function () { return SymbolObject; },
getTypeConstructor: function () { return TypeObject; },
getSignatureConstructor: function () { return SignatureObject; },
+ getSourceMapSourceConstructor: function () { return SourceMapSourceObject; },
};
}
function toEditorSettings(optionsAsMap) {
@@ -71219,7 +73993,6 @@ var ts;
var HostCache = (function () {
function HostCache(host, getCanonicalFileName) {
this.host = host;
- this.getCanonicalFileName = getCanonicalFileName;
this.currentDirectory = host.getCurrentDirectory();
this.fileNameToEntry = ts.createFileMap();
var rootFileNames = host.getScriptFileNames();
@@ -71246,19 +74019,15 @@ var ts;
this.fileNameToEntry.set(path, entry);
return entry;
};
- HostCache.prototype.getEntry = function (path) {
+ HostCache.prototype.getEntryByPath = function (path) {
return this.fileNameToEntry.get(path);
};
- HostCache.prototype.contains = function (path) {
+ HostCache.prototype.containsEntryByPath = function (path) {
return this.fileNameToEntry.contains(path);
};
- HostCache.prototype.getOrCreateEntry = function (fileName) {
- var path = ts.toPath(fileName, this.currentDirectory, this.getCanonicalFileName);
- return this.getOrCreateEntryByPath(fileName, path);
- };
HostCache.prototype.getOrCreateEntryByPath = function (fileName, path) {
- return this.contains(path)
- ? this.getEntry(path)
+ return this.containsEntryByPath(path)
+ ? this.getEntryByPath(path)
: this.createEntry(fileName, path);
};
HostCache.prototype.getRootFileNames = function () {
@@ -71271,11 +74040,11 @@ var ts;
return fileNames;
};
HostCache.prototype.getVersion = function (path) {
- var file = this.getEntry(path);
+ var file = this.getEntryByPath(path);
return file && file.version;
};
HostCache.prototype.getScriptSnapshot = function (path) {
- var file = this.getEntry(path);
+ var file = this.getEntryByPath(path);
return file && file.scriptSnapshot;
};
return HostCache;
@@ -71400,7 +74169,7 @@ var ts;
function createLanguageService(host, documentRegistry) {
if (documentRegistry === void 0) { documentRegistry = ts.createDocumentRegistry(host.useCaseSensitiveFileNames && host.useCaseSensitiveFileNames(), host.getCurrentDirectory()); }
var syntaxTreeCache = new SyntaxTreeCache(host);
- var ruleProvider;
+ ruleProvider = ruleProvider || new ts.formatting.RulesProvider();
var program;
var lastProjectVersion;
var lastTypesRootVersion = 0;
@@ -71424,9 +74193,6 @@ var ts;
return sourceFile;
}
function getRuleProvider(options) {
- if (!ruleProvider) {
- ruleProvider = new ts.formatting.RulesProvider();
- }
ruleProvider.ensureUpToDate(options);
return ruleProvider;
}
@@ -71473,11 +74239,18 @@ var ts;
writeFile: ts.noop,
getCurrentDirectory: function () { return currentDirectory; },
fileExists: function (fileName) {
- return hostCache.getOrCreateEntry(fileName) !== undefined;
+ var path = ts.toPath(fileName, currentDirectory, getCanonicalFileName);
+ return hostCache.containsEntryByPath(path) ?
+ !!hostCache.getEntryByPath(path) :
+ (host.fileExists && host.fileExists(fileName));
},
readFile: function (fileName) {
- var entry = hostCache.getOrCreateEntry(fileName);
- return entry && entry.scriptSnapshot.getText(0, entry.scriptSnapshot.getLength());
+ var path = ts.toPath(fileName, currentDirectory, getCanonicalFileName);
+ if (hostCache.containsEntryByPath(path)) {
+ var entry = hostCache.getEntryByPath(path);
+ return entry && entry.scriptSnapshot.getText(0, entry.scriptSnapshot.getLength());
+ }
+ return host.readFile && host.readFile(fileName);
},
directoryExists: function (directoryName) {
return ts.directoryProbablyExists(directoryName, host);
@@ -71567,7 +74340,9 @@ var ts;
ts.forEach(program.getSourceFiles(), function (f) {
return documentRegistry.releaseDocument(f.fileName, program.getCompilerOptions());
});
+ program = undefined;
}
+ host = undefined;
}
function getSyntacticDiagnostics(fileName) {
synchronizeHostData();
@@ -71602,7 +74377,7 @@ var ts;
function getQuickInfoAtPosition(fileName, position) {
synchronizeHostData();
var sourceFile = getValidSourceFile(fileName);
- var node = ts.getTouchingPropertyName(sourceFile, position);
+ var node = ts.getTouchingPropertyName(sourceFile, position, true);
if (node === sourceFile) {
return undefined;
}
@@ -71653,7 +74428,7 @@ var ts;
}
function getImplementationAtPosition(fileName, position) {
synchronizeHostData();
- return ts.FindAllReferences.getImplementationsAtPosition(program.getTypeChecker(), cancellationToken, program.getSourceFiles(), getValidSourceFile(fileName), position);
+ return ts.FindAllReferences.getImplementationsAtPosition(program, cancellationToken, program.getSourceFiles(), getValidSourceFile(fileName), position);
}
function getOccurrencesAtPosition(fileName, position) {
var results = getOccurrencesAtPositionCore(fileName, position);
@@ -71667,7 +74442,7 @@ var ts;
synchronizeHostData();
var sourceFilesToSearch = ts.map(filesToSearch, function (f) { return program.getSourceFile(f); });
var sourceFile = getValidSourceFile(fileName);
- return ts.DocumentHighlights.getDocumentHighlights(program.getTypeChecker(), cancellationToken, sourceFile, position, sourceFilesToSearch);
+ return ts.DocumentHighlights.getDocumentHighlights(program, cancellationToken, sourceFile, position, sourceFilesToSearch);
}
function getOccurrencesAtPositionCore(fileName, position) {
return convertDocumentHighlights(getDocumentHighlights(fileName, position, [fileName]));
@@ -71700,11 +74475,11 @@ var ts;
}
function getReferences(fileName, position, options) {
synchronizeHostData();
- return ts.FindAllReferences.findReferencedEntries(program.getTypeChecker(), cancellationToken, program.getSourceFiles(), getValidSourceFile(fileName), position, options);
+ return ts.FindAllReferences.findReferencedEntries(program, cancellationToken, program.getSourceFiles(), getValidSourceFile(fileName), position, options);
}
function findReferences(fileName, position) {
synchronizeHostData();
- return ts.FindAllReferences.findReferencedSymbols(program.getTypeChecker(), cancellationToken, program.getSourceFiles(), getValidSourceFile(fileName), position);
+ return ts.FindAllReferences.findReferencedSymbols(program, cancellationToken, program.getSourceFiles(), getValidSourceFile(fileName), position);
}
function getNavigateToItems(searchValue, maxResultCount, fileName, excludeDtsFiles) {
synchronizeHostData();
@@ -71742,7 +74517,7 @@ var ts;
}
function getNameOrDottedNameSpan(fileName, startPos, _endPos) {
var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName);
- var node = ts.getTouchingPropertyName(sourceFile, startPos);
+ var node = ts.getTouchingPropertyName(sourceFile, startPos, false);
if (node === sourceFile) {
return;
}
@@ -71822,7 +74597,7 @@ var ts;
function getBraceMatchingAtPosition(fileName, position) {
var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName);
var result = [];
- var token = ts.getTouchingToken(sourceFile, position);
+ var token = ts.getTouchingToken(sourceFile, position, false);
if (token.getStart(sourceFile) === position) {
var matchKind = getMatchingTokenKind(token);
if (matchKind) {
@@ -71952,8 +74727,7 @@ var ts;
ts.Debug.assert(matchArray.length === descriptors.length + firstDescriptorCaptureIndex);
var preamble = matchArray[1];
var matchPosition = matchArray.index + preamble.length;
- var token = ts.getTokenAtPosition(sourceFile, matchPosition);
- if (!ts.isInsideComment(sourceFile, token, matchPosition)) {
+ if (!ts.isInComment(sourceFile, matchPosition)) {
continue;
}
var descriptor = undefined;
@@ -72001,6 +74775,28 @@ var ts;
var defaultLibFileName = host.getDefaultLibFileName(host.getCompilationSettings());
return ts.Rename.getRenameInfo(program.getTypeChecker(), defaultLibFileName, getCanonicalFileName, getValidSourceFile(fileName), position);
}
+ function getRefactorContext(file, positionOrRange, formatOptions) {
+ var _a = typeof positionOrRange === "number" ? [positionOrRange, undefined] : [positionOrRange.pos, positionOrRange.end], startPosition = _a[0], endPosition = _a[1];
+ return {
+ file: file,
+ startPosition: startPosition,
+ endPosition: endPosition,
+ program: getProgram(),
+ newLineCharacter: host.getNewLine(),
+ rulesProvider: getRuleProvider(formatOptions),
+ cancellationToken: cancellationToken
+ };
+ }
+ function getApplicableRefactors(fileName, positionOrRange) {
+ synchronizeHostData();
+ var file = getValidSourceFile(fileName);
+ return ts.refactor.getApplicableRefactors(getRefactorContext(file, positionOrRange));
+ }
+ function getEditsForRefactor(fileName, formatOptions, positionOrRange, refactorName, actionName) {
+ synchronizeHostData();
+ var file = getValidSourceFile(fileName);
+ return ts.refactor.getEditsForRefactor(getRefactorContext(file, positionOrRange, formatOptions), refactorName, actionName);
+ }
return {
dispose: dispose,
cleanupSemanticCache: cleanupSemanticCache,
@@ -72043,7 +74839,9 @@ var ts;
getEmitOutput: getEmitOutput,
getNonBoundSourceFile: getNonBoundSourceFile,
getSourceFile: getSourceFile,
- getProgram: getProgram
+ getProgram: getProgram,
+ getApplicableRefactors: getApplicableRefactors,
+ getEditsForRefactor: getEditsForRefactor,
};
}
ts.createLanguageService = createLanguageService;
@@ -72119,20 +74917,20 @@ var ts;
var contextualType = typeChecker.getContextualType(objectLiteral);
var name = ts.getTextOfPropertyName(node.name);
if (name && contextualType) {
- var result_8 = [];
+ var result_9 = [];
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);
+ result_9.push(symbol);
}
});
- return result_8;
+ return result_9;
}
if (symbol) {
- result_8.push(symbol);
- return result_8;
+ result_9.push(symbol);
+ return result_9;
}
}
return undefined;
@@ -72669,6 +75467,9 @@ 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 (result.resolvedModule && result.resolvedModule.extension !== ts.Extension.Ts && result.resolvedModule.extension !== ts.Extension.Tsx && result.resolvedModule.extension !== ts.Extension.Dts) {
+ resolvedFileName = undefined;
+ }
return {
resolvedFileName: resolvedFileName,
failedLookupLocations: result.failedLookupLocations
@@ -72830,7 +75631,7 @@ var TypeScript;
Services.TypeScriptServicesFactory = ts.TypeScriptServicesFactory;
})(Services = TypeScript.Services || (TypeScript.Services = {}));
})(TypeScript || (TypeScript = {}));
-var toolsVersion = "2.3";
+var toolsVersion = "2.4";
var ts;
(function (ts) {
var server;
@@ -72846,6 +75647,7 @@ var ts;
Arguments.LogFile = "--logFile";
Arguments.EnableTelemetry = "--enableTelemetry";
Arguments.TypingSafeListLocation = "--typingSafeListLocation";
+ Arguments.NpmLocation = "--npmLocation";
})(Arguments = server.Arguments || (server.Arguments = {}));
function hasArgument(argumentName) {
return ts.sys.args.indexOf(argumentName) >= 0;
@@ -73009,6 +75811,37 @@ var ts;
return arr;
}
server.toSortedReadonlyArray = toSortedReadonlyArray;
+ function enumerateInsertsAndDeletes(a, b, inserted, deleted, compare) {
+ compare = compare || ts.compareValues;
+ var aIndex = 0;
+ var bIndex = 0;
+ var aLen = a.length;
+ var bLen = b.length;
+ while (aIndex < aLen && bIndex < bLen) {
+ var aItem = a[aIndex];
+ var bItem = b[bIndex];
+ var compareResult = compare(aItem, bItem);
+ if (compareResult === -1) {
+ inserted(aItem);
+ aIndex++;
+ }
+ else if (compareResult === 1) {
+ deleted(bItem);
+ bIndex++;
+ }
+ else {
+ aIndex++;
+ bIndex++;
+ }
+ }
+ while (aIndex < aLen) {
+ inserted(a[aIndex++]);
+ }
+ while (bIndex < bLen) {
+ deleted(b[bIndex++]);
+ }
+ }
+ server.enumerateInsertsAndDeletes = enumerateInsertsAndDeletes;
var ThrottledOperations = (function () {
function ThrottledOperations(host) {
this.host = host;
@@ -73388,6 +76221,10 @@ var ts;
this.realpath = function (path) { return _this.host.realpath(path); };
}
}
+ LSHost.prototype.dispose = function () {
+ this.project = undefined;
+ this.resolveModuleName = undefined;
+ };
LSHost.prototype.startRecordingFilesWithChangedResolutions = function () {
this.filesWithChangedSetOfUnresolvedImports = [];
};
@@ -73959,12 +76796,6 @@ var ts;
ProjectKind[ProjectKind["Configured"] = 1] = "Configured";
ProjectKind[ProjectKind["External"] = 2] = "External";
})(ProjectKind = server.ProjectKind || (server.ProjectKind = {}));
- function remove(items, item) {
- var index = items.indexOf(item);
- if (index >= 0) {
- items.splice(index, 1);
- }
- }
function countEachFileTypes(infos) {
var result = { js: 0, jsx: 0, ts: 0, tsx: 0, dts: 0 };
for (var _i = 0, infos_1 = infos; _i < infos_1.length; _i++) {
@@ -73988,6 +76819,7 @@ var ts;
}
return result;
}
+ server.countEachFileTypes = countEachFileTypes;
function hasOneOrMoreJsAndNoTsFiles(project) {
var counts = countEachFileTypes(project.getScriptInfos());
return counts.js > 0 && counts.ts === 0 && counts.tsx === 0;
@@ -74127,7 +76959,7 @@ var ts;
return this.projectName;
};
Project.prototype.getExternalFiles = function () {
- return [];
+ return server.emptyArray;
};
Project.prototype.getSourceFile = function (path) {
if (!this.program) {
@@ -74157,7 +76989,13 @@ var ts;
this.rootFiles = undefined;
this.rootFilesMap = undefined;
this.program = undefined;
+ this.builder = undefined;
+ this.cachedUnresolvedImportsPerFile = undefined;
+ this.projectErrors = undefined;
+ this.lsHost.dispose();
+ this.lsHost = undefined;
this.languageService.dispose();
+ this.languageService = undefined;
};
Project.prototype.getCompilerOptions = function () {
return this.compilerOptions;
@@ -74355,10 +77193,11 @@ var ts;
return true;
};
Project.prototype.updateGraphWorker = function () {
+ var _this = this;
var oldProgram = this.program;
this.program = this.languageService.getProgram();
var hasChanges = false;
- if (!oldProgram || (this.program !== oldProgram && !oldProgram.structureIsReused)) {
+ if (!oldProgram || (this.program !== oldProgram && !(oldProgram.structureIsReused & 2))) {
hasChanges = true;
if (oldProgram) {
for (var _i = 0, _a = oldProgram.getSourceFiles(); _i < _a.length; _i++) {
@@ -74373,6 +77212,17 @@ var ts;
}
}
}
+ var oldExternalFiles = this.externalFiles || server.emptyArray;
+ this.externalFiles = this.getExternalFiles();
+ server.enumerateInsertsAndDeletes(this.externalFiles, oldExternalFiles, function (inserted) {
+ var scriptInfo = _this.projectService.getOrCreateScriptInfo(inserted, false);
+ scriptInfo.attachToProject(_this);
+ }, function (removed) {
+ var scriptInfoToDetach = _this.projectService.getScriptInfo(removed);
+ if (scriptInfoToDetach) {
+ scriptInfoToDetach.detachFromProject(_this);
+ }
+ });
return hasChanges;
};
Project.prototype.getScriptInfoLSHost = function (fileName) {
@@ -74444,7 +77294,7 @@ var ts;
var currentFiles_1 = ts.arrayToMap(this.getFileNames(), function (x) { return x; });
var added_1 = [];
var removed_1 = [];
- var updated = ts.arrayFrom(updatedFileNames.keys());
+ var updated = updatedFileNames ? ts.arrayFrom(updatedFileNames.keys()) : [];
ts.forEachKey(currentFiles_1, function (id) {
if (!lastReportedFileNames_1.has(id)) {
added_1.push(id);
@@ -74512,7 +77362,7 @@ var ts;
return ts.filter(allFileNames, function (file) { return _this.projectService.host.fileExists(file); });
};
Project.prototype.removeRoot = function (info) {
- remove(this.rootFiles, info);
+ ts.orderedRemoveItem(this.rootFiles, info);
this.rootFilesMap.remove(info.path);
};
return Project;
@@ -74581,16 +77431,16 @@ var ts;
exclude: []
};
};
+ InferredProject.newName = (function () {
+ var nextId = 1;
+ return function () {
+ var id = nextId;
+ nextId++;
+ return server.makeInferredProjectName(id);
+ };
+ })();
return InferredProject;
}(Project));
- InferredProject.newName = (function () {
- var nextId = 1;
- return function () {
- var id = nextId;
- nextId++;
- return server.makeInferredProjectName(id);
- };
- })();
server.InferredProject = InferredProject;
var ConfiguredProject = (function (_super) {
__extends(ConfiguredProject, _super);
@@ -74615,6 +77465,11 @@ var ts;
return;
}
var searchPaths = [ts.combinePaths(host.getExecutingFilePath(), "../../..")].concat(this.projectService.pluginProbeLocations);
+ if (this.projectService.allowLocalPluginLoads) {
+ var local = ts.getDirectoryPath(this.canonicalConfigFilePath);
+ this.projectService.logger.info("Local plugin loading enabled; adding " + local + " to search paths");
+ searchPaths.unshift(local);
+ }
if (options.plugins) {
for (var _i = 0, _a = options.plugins; _i < _a.length; _i++) {
var pluginConfigEntry = _a[_i];
@@ -74622,7 +77477,7 @@ var ts;
}
}
if (this.projectService.globalPlugins) {
- var _loop_6 = function (globalPluginName) {
+ var _loop_7 = function (globalPluginName) {
if (options.plugins && options.plugins.some(function (p) { return p.name === globalPluginName; }))
return "continue";
this_1.enablePlugin({ name: globalPluginName, global: true }, searchPaths);
@@ -74630,7 +77485,7 @@ var ts;
var this_1 = this;
for (var _b = 0, _c = this.projectService.globalPlugins; _b < _c.length; _b++) {
var globalPluginName = _c[_b];
- _loop_6(globalPluginName);
+ _loop_7(globalPluginName);
}
}
};
@@ -74683,19 +77538,17 @@ var ts;
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);
- }
+ var _this = this;
+ return server.toSortedReadonlyArray(ts.flatMap(this.plugins, function (plugin) {
+ if (typeof plugin.getExternalFiles !== "function")
+ return;
+ try {
+ return plugin.getExternalFiles(_this);
}
- }
- return items;
+ catch (e) {
+ _this.projectService.logger.info("A plugin threw an exception in getExternalFiles: " + e);
+ }
+ }));
};
ConfiguredProject.prototype.watchConfigFile = function (callback) {
var _this = this;
@@ -74746,6 +77599,7 @@ var ts;
_super.prototype.close.call(this);
if (this.projectFileWatcher) {
this.projectFileWatcher.close();
+ this.projectFileWatcher = undefined;
}
if (this.typeRootsWatchers) {
for (var _i = 0, _a = this.typeRootsWatchers; _i < _a.length; _i++) {
@@ -74828,6 +77682,7 @@ var ts;
server.ContextEvent = "context";
server.ConfigFileDiagEvent = "configFileDiag";
server.ProjectLanguageServiceStateEvent = "projectLanguageServiceState";
+ server.ProjectInfoTelemetryEvent = "projectInfo";
function prepareConvertersForEnumLikeCompilerOptions(commandLineOptions) {
var map = ts.createMap();
for (var _i = 0, commandLineOptions_1 = commandLineOptions; _i < commandLineOptions_1.length; _i++) {
@@ -74990,6 +77845,7 @@ var ts;
this.configuredProjects = [];
this.openFiles = [];
this.projectToSizeMap = ts.createMap();
+ this.seenProjects = ts.createMap();
this.host = opts.host;
this.logger = opts.logger;
this.cancellationToken = opts.cancellationToken;
@@ -74999,6 +77855,7 @@ var ts;
this.eventHandler = opts.eventHandler;
this.globalPlugins = opts.globalPlugins || server.emptyArray;
this.pluginProbeLocations = opts.pluginProbeLocations || server.emptyArray;
+ this.allowLocalPluginLoads = !!opts.allowLocalPluginLoads;
ts.Debug.assert(!!this.host.createHash, "'ServerHost.createHash' is required for ProjectService");
this.toCanonicalFileName = ts.createGetCanonicalFileName(this.host.useCaseSensitiveFileNames);
this.directoryWatchers = new DirectoryWatchers(this);
@@ -75135,8 +77992,14 @@ var ts;
}
else {
if (info && (!info.isScriptOpen())) {
- info.reloadFromFile();
- this.updateProjectGraphs(info.containingProjects);
+ if (info.containingProjects.length === 0) {
+ info.stopWatcher();
+ this.filenameToScriptInfo.remove(info.path);
+ }
+ else {
+ info.reloadFromFile();
+ this.updateProjectGraphs(info.containingProjects);
+ }
}
}
};
@@ -75318,8 +78181,21 @@ var ts;
}
}
}
- if (info.containingProjects.length === 0) {
- this.filenameToScriptInfo.remove(info.path);
+ if (this.host.fileExists(info.fileName)) {
+ this.watchClosedScriptInfo(info);
+ }
+ else {
+ this.handleDeletedFile(info);
+ }
+ };
+ ProjectService.prototype.deleteOrphanScriptInfoNotInAnyProject = function () {
+ for (var _i = 0, _a = this.filenameToScriptInfo.getKeys(); _i < _a.length; _i++) {
+ var path = _a[_i];
+ var info = this.filenameToScriptInfo.get(path);
+ if (!info.isScriptOpen() && info.containingProjects.length === 0) {
+ info.stopWatcher();
+ this.filenameToScriptInfo.remove(info.path);
+ }
}
};
ProjectService.prototype.openOrUpdateConfiguredProjectForFile = function (fileName, projectRootPath) {
@@ -75427,7 +78303,10 @@ var ts;
var projectOptions = {
files: parsedCommandLine.fileNames,
compilerOptions: parsedCommandLine.options,
- configHasFilesProperty: config["files"] !== undefined,
+ configHasExtendsProperty: config.extends !== undefined,
+ configHasFilesProperty: config.files !== undefined,
+ configHasIncludeProperty: config.include !== undefined,
+ configHasExcludeProperty: config.exclude !== undefined,
wildcardDirectories: ts.createMapFromTemplate(parsedCommandLine.wildcardDirectories),
typeAcquisition: parsedCommandLine.typeAcquisition,
compileOnSave: parsedCommandLine.compileOnSave
@@ -75464,8 +78343,49 @@ var ts;
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);
+ this.sendProjectTelemetry(project.externalProjectName, project);
return project;
};
+ ProjectService.prototype.sendProjectTelemetry = function (projectKey, project, projectOptions) {
+ if (this.seenProjects.has(projectKey)) {
+ return;
+ }
+ this.seenProjects.set(projectKey, true);
+ if (!this.eventHandler)
+ return;
+ var data = {
+ projectId: this.host.createHash(projectKey),
+ fileStats: server.countEachFileTypes(project.getScriptInfos()),
+ compilerOptions: ts.convertCompilerOptionsForTelemetry(project.getCompilerOptions()),
+ typeAcquisition: convertTypeAcquisition(project.getTypeAcquisition()),
+ extends: projectOptions && projectOptions.configHasExtendsProperty,
+ files: projectOptions && projectOptions.configHasFilesProperty,
+ include: projectOptions && projectOptions.configHasIncludeProperty,
+ exclude: projectOptions && projectOptions.configHasExcludeProperty,
+ compileOnSave: project.compileOnSaveEnabled,
+ configFileName: configFileName(),
+ projectType: project instanceof server.ExternalProject ? "external" : "configured",
+ languageServiceEnabled: project.languageServiceEnabled,
+ version: ts.version,
+ };
+ this.eventHandler({ eventName: server.ProjectInfoTelemetryEvent, data: data });
+ function configFileName() {
+ if (!(project instanceof server.ConfiguredProject)) {
+ return "other";
+ }
+ var configFilePath = project instanceof server.ConfiguredProject && project.getConfigFilePath();
+ var base = ts.getBaseFileName(configFilePath);
+ return base === "tsconfig.json" || base === "jsconfig.json" ? base : "other";
+ }
+ function convertTypeAcquisition(_a) {
+ var enable = _a.enable, include = _a.include, exclude = _a.exclude;
+ return {
+ enable: enable,
+ include: include !== undefined && include.length !== 0,
+ exclude: exclude !== undefined && exclude.length !== 0,
+ };
+ }
+ };
ProjectService.prototype.reportConfigFileDiagnostics = function (configFileName, diagnostics, triggerFile) {
if (!this.eventHandler) {
return;
@@ -75487,6 +78407,7 @@ var ts;
project.watchWildcards(function (project, path) { return _this.onSourceFileInDirectoryChangedForConfiguredProject(project, path); });
project.watchTypeRoots(function (project, path) { return _this.onTypeRootFileChanged(project, path); });
this.configuredProjects.push(project);
+ this.sendProjectTelemetry(project.getConfigFilePath(), project, projectOptions);
return project;
};
ProjectService.prototype.watchConfigDirectoryForProject = function (project, options) {
@@ -75518,7 +78439,7 @@ var ts;
var conversionResult = this.convertConfigFileContentToProjectOptions(configFileName);
var projectOptions = conversionResult.success
? conversionResult.projectOptions
- : { files: [], compilerOptions: {}, typeAcquisition: { enable: false } };
+ : { files: [], compilerOptions: {}, configHasExtendsProperty: false, configHasFilesProperty: false, configHasIncludeProperty: false, configHasExcludeProperty: false, typeAcquisition: { enable: false } };
var project = this.createAndAddConfiguredProject(configFileName, projectOptions, conversionResult.configFileErrors, clientFileName);
return {
success: conversionResult.success,
@@ -75641,8 +78562,14 @@ var ts;
ProjectService.prototype.getScriptInfo = function (uncheckedFileName) {
return this.getScriptInfoForNormalizedPath(server.toNormalizedPath(uncheckedFileName));
};
- ProjectService.prototype.getOrCreateScriptInfoForNormalizedPath = function (fileName, openedByClient, fileContent, scriptKind, hasMixedContent) {
+ ProjectService.prototype.watchClosedScriptInfo = function (info) {
var _this = this;
+ if (!info.hasMixedContent) {
+ var fileName_2 = info.fileName;
+ info.setWatcher(this.host.watchFile(fileName_2, function (_) { return _this.onSourceFileChanged(fileName_2); }));
+ }
+ };
+ ProjectService.prototype.getOrCreateScriptInfoForNormalizedPath = function (fileName, openedByClient, fileContent, scriptKind, hasMixedContent) {
var info = this.getScriptInfoForNormalizedPath(fileName);
if (!info) {
if (openedByClient || this.host.fileExists(fileName)) {
@@ -75654,14 +78581,13 @@ var ts;
}
}
else {
- if (!hasMixedContent) {
- info.setWatcher(this.host.watchFile(fileName, function (_) { return _this.onSourceFileChanged(fileName); }));
- }
+ this.watchClosedScriptInfo(info);
}
}
}
if (info) {
if (openedByClient && !info.isScriptOpen()) {
+ info.stopWatcher();
info.open(fileContent);
if (hasMixedContent) {
info.registerFileUpdate();
@@ -75761,6 +78687,7 @@ var ts;
}
var info = this.getOrCreateScriptInfoForNormalizedPath(fileName, true, fileContent, scriptKind, hasMixedContent);
this.assignScriptInfoToInferredProjectIfNecessary(info, true);
+ this.deleteOrphanScriptInfoNotInAnyProject();
this.printProjects();
return { configFileName: configFileName, configFileErrors: configFileErrors };
var _a;
@@ -75773,13 +78700,13 @@ var ts;
this.printProjects();
};
ProjectService.prototype.collectChanges = function (lastKnownProjectVersions, currentProjects, result) {
- var _loop_7 = function (proj) {
+ var _loop_8 = 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_7(proj);
+ _loop_8(proj);
}
};
ProjectService.prototype.synchronizeProjectList = function (knownProjects) {
@@ -75898,7 +78825,7 @@ var ts;
var types = (typeAcquisition && typeAcquisition.include) || [];
var excludeRules = [];
var normalizedNames = rootFiles.map(function (f) { return ts.normalizeSlashes(f.fileName); });
- var _loop_8 = function (name) {
+ var _loop_9 = function (name) {
var rule = ProjectService.safelist[name];
for (var _i = 0, normalizedNames_1 = normalizedNames; _i < normalizedNames_1.length; _i++) {
var root = normalizedNames_1[_i];
@@ -75913,7 +78840,7 @@ var ts;
}
}
if (rule.exclude) {
- var _loop_9 = function (exclude) {
+ var _loop_10 = function (exclude) {
var processedRule = root.replace(rule.match, function () {
var groups = [];
for (var _i = 0; _i < arguments.length; _i++) {
@@ -75936,7 +78863,7 @@ var ts;
};
for (var _c = 0, _d = rule.exclude; _c < _d.length; _c++) {
var exclude = _d[_c];
- _loop_9(exclude);
+ _loop_10(exclude);
}
}
else {
@@ -75955,7 +78882,7 @@ var ts;
var this_2 = this;
for (var _i = 0, _a = Object.keys(ProjectService.safelist); _i < _a.length; _i++) {
var name = _a[_i];
- _loop_8(name);
+ _loop_9(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]); }); });
@@ -76051,10 +78978,10 @@ var ts;
this.refreshInferredProjects();
}
};
+ ProjectService.safelist = defaultTypeSafeList;
+ ProjectService.filenameEscapeRegexp = /[-\/\\^$*+?.()|[\]{}]/g;
return ProjectService;
}());
- ProjectService.safelist = defaultTypeSafeList;
- ProjectService.filenameEscapeRegexp = /[-\/\\^$*+?.()|[\]{}]/g;
server.ProjectService = ProjectService;
})(server = ts.server || (ts.server = {}));
})(ts || (ts = {}));
@@ -76198,6 +79125,11 @@ var ts;
CommandNames.GetCodeFixes = "getCodeFixes";
CommandNames.GetCodeFixesFull = "getCodeFixes-full";
CommandNames.GetSupportedCodeFixes = "getSupportedCodeFixes";
+ CommandNames.GetApplicableRefactors = "getApplicableRefactors";
+ CommandNames.GetRefactorCodeActions = "getRefactorCodeActions";
+ CommandNames.GetRefactorCodeActionsFull = "getRefactorCodeActions-full";
+ CommandNames.GetEditsForRefactor = "getEditsForRefactor";
+ CommandNames.GetEditsForRefactorFull = "getEditsForRefactor-full";
})(CommandNames = server.CommandNames || (server.CommandNames = {}));
function formatMessage(msg, logger, byteLength, newLine) {
var verboseLogging = logger.hasLevel(server.LogLevel.verbose);
@@ -76291,7 +79223,7 @@ var ts;
return MultistepOperation;
}());
var Session = (function () {
- function Session(optsOrArg) {
+ function Session(opts) {
var _this = this;
this.changeSeq = 0;
this.handlers = ts.createMapFromTemplate((_a = {},
@@ -76531,25 +79463,16 @@ var ts;
_a[CommandNames.GetSupportedCodeFixes] = function () {
return _this.requiredResponse(_this.getSupportedCodeFixes());
},
+ _a[CommandNames.GetApplicableRefactors] = function (request) {
+ return _this.requiredResponse(_this.getApplicableRefactors(request.arguments));
+ },
+ _a[CommandNames.GetEditsForRefactor] = function (request) {
+ return _this.requiredResponse(_this.getEditsForRefactor(request.arguments, true));
+ },
+ _a[CommandNames.GetEditsForRefactorFull] = function (request) {
+ return _this.requiredResponse(_this.getEditsForRefactor(request.arguments, false));
+ },
_a));
- var opts;
- if (arguments.length === 1) {
- opts = optsOrArg;
- }
- else {
- opts = {
- host: arguments[0],
- cancellationToken: arguments[1],
- useSingleInferredProject: arguments[2],
- typingsInstaller: arguments[3],
- byteLength: arguments[4],
- hrtime: arguments[5],
- logger: arguments[6],
- canUseEvents: arguments[7],
- eventHandler: arguments[8],
- throttleWaitMilliseconds: arguments[9]
- };
- }
this.host = opts.host;
this.cancellationToken = opts.cancellationToken;
this.typingsInstaller = opts.typingsInstaller;
@@ -76579,7 +79502,8 @@ var ts;
throttleWaitMilliseconds: throttleWaitMilliseconds,
eventHandler: this.eventHandler,
globalPlugins: opts.globalPlugins,
- pluginProbeLocations: opts.pluginProbeLocations
+ pluginProbeLocations: opts.pluginProbeLocations,
+ allowLocalPluginLoads: opts.allowLocalPluginLoads
};
this.projectService = new server.ProjectService(settings);
this.gcTimer = new server.GcTimer(this.host, 7000, this.logger);
@@ -76598,21 +79522,30 @@ var ts;
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); });
+ var _a = event.data, project_1 = _a.project, fileName_3 = _a.fileName;
+ this.projectService.logger.info("got context event, updating diagnostics for " + fileName_3);
+ this.errorCheck.startNew(function (next) { return _this.updateErrorCheck(next, [{ fileName: fileName_3, 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:
+ case server.ProjectLanguageServiceStateEvent: {
var eventName = "projectLanguageServiceState";
this.event({
projectName: event.data.project.getProjectName(),
languageServiceEnabled: event.data.languageServiceEnabled
}, eventName);
break;
+ }
+ case server.ProjectInfoTelemetryEvent: {
+ var eventName = "telemetry";
+ this.event({
+ telemetryEventName: event.eventName,
+ payload: event.data,
+ }, eventName);
+ break;
+ }
}
};
Session.prototype.logError = function (err, cmd) {
@@ -77515,6 +80448,58 @@ var ts;
Session.prototype.getSupportedCodeFixes = function () {
return ts.getSupportedCodeFixes();
};
+ Session.prototype.isLocation = function (locationOrSpan) {
+ return locationOrSpan.line !== undefined;
+ };
+ Session.prototype.extractPositionAndRange = function (args, scriptInfo) {
+ var position = undefined;
+ var textRange;
+ if (this.isLocation(args)) {
+ position = getPosition(args);
+ }
+ else {
+ var _a = this.getStartAndEndPosition(args, scriptInfo), startPosition = _a.startPosition, endPosition = _a.endPosition;
+ textRange = { pos: startPosition, end: endPosition };
+ }
+ return { position: position, textRange: textRange };
+ function getPosition(loc) {
+ return loc.position !== undefined ? loc.position : scriptInfo.lineOffsetToPosition(loc.line, loc.offset);
+ }
+ };
+ Session.prototype.getApplicableRefactors = function (args) {
+ var _a = this.getFileAndProjectWithoutRefreshingInferredProjects(args), file = _a.file, project = _a.project;
+ var scriptInfo = project.getScriptInfoForNormalizedPath(file);
+ var _b = this.extractPositionAndRange(args, scriptInfo), position = _b.position, textRange = _b.textRange;
+ return project.getLanguageService().getApplicableRefactors(file, position || textRange);
+ };
+ Session.prototype.getEditsForRefactor = function (args, simplifiedResult) {
+ var _this = this;
+ var _a = this.getFileAndProjectWithoutRefreshingInferredProjects(args), file = _a.file, project = _a.project;
+ var scriptInfo = project.getScriptInfoForNormalizedPath(file);
+ var _b = this.extractPositionAndRange(args, scriptInfo), position = _b.position, textRange = _b.textRange;
+ var result = project.getLanguageService().getEditsForRefactor(file, this.projectService.getFormatCodeOptions(), position || textRange, args.refactor, args.action);
+ if (result === undefined) {
+ return {
+ edits: []
+ };
+ }
+ if (simplifiedResult) {
+ var file_2 = result.renameFilename;
+ var location = undefined;
+ if (file_2 !== undefined && result.renameLocation !== undefined) {
+ var renameScriptInfo = project.getScriptInfoForNormalizedPath(server.toNormalizedPath(file_2));
+ location = renameScriptInfo.positionToLineOffset(result.renameLocation);
+ }
+ return {
+ renameLocation: location,
+ renameFilename: file_2,
+ edits: result.edits.map(function (change) { return _this.mapTextChangesToCodeEdits(project, change); })
+ };
+ }
+ else {
+ return result;
+ }
+ };
Session.prototype.getCodeFixes = function (args, simplifiedResult) {
var _this = this;
if (args.errorCodes.length === 0) {
@@ -77522,8 +80507,7 @@ var ts;
}
var _a = this.getFileAndProjectWithoutRefreshingInferredProjects(args), file = _a.file, project = _a.project;
var scriptInfo = project.getScriptInfoForNormalizedPath(file);
- var startPosition = getStartPosition();
- var endPosition = getEndPosition();
+ var _b = this.getStartAndEndPosition(args, scriptInfo), startPosition = _b.startPosition, endPosition = _b.endPosition;
var formatOptions = this.projectService.getFormatCodeOptions(file);
var codeActions = project.getLanguageService().getCodeFixesAtPosition(file, startPosition, endPosition, args.errorCodes, formatOptions);
if (!codeActions) {
@@ -77535,12 +80519,24 @@ var ts;
else {
return codeActions;
}
- function getStartPosition() {
- return args.startPosition !== undefined ? args.startPosition : scriptInfo.lineOffsetToPosition(args.startLine, args.startOffset);
+ };
+ Session.prototype.getStartAndEndPosition = function (args, scriptInfo) {
+ var startPosition = undefined, endPosition = undefined;
+ if (args.startPosition !== undefined) {
+ startPosition = args.startPosition;
+ }
+ else {
+ startPosition = scriptInfo.lineOffsetToPosition(args.startLine, args.startOffset);
+ args.startPosition = startPosition;
+ }
+ if (args.endPosition !== undefined) {
+ endPosition = args.endPosition;
}
- function getEndPosition() {
- return args.endPosition !== undefined ? args.endPosition : scriptInfo.lineOffsetToPosition(args.endLine, args.endOffset);
+ else {
+ endPosition = scriptInfo.lineOffsetToPosition(args.endLine, args.endOffset);
+ args.endPosition = endPosition;
}
+ return { startPosition: startPosition, endPosition: endPosition };
};
Session.prototype.mapCodeAction = function (codeAction, scriptInfo) {
var _this = this;
@@ -77552,6 +80548,14 @@ var ts;
}); })
};
};
+ Session.prototype.mapTextChangesToCodeEdits = function (project, textChanges) {
+ var _this = this;
+ var scriptInfo = project.getScriptInfoForNormalizedPath(server.toNormalizedPath(textChanges.fileName));
+ return {
+ fileName: textChanges.fileName,
+ textChanges: textChanges.textChanges.map(function (textChange) { return _this.convertTextChangeToCodeEdit(textChange, scriptInfo); })
+ };
+ };
Session.prototype.convertTextChangeToCodeEdit = function (change, scriptInfo) {
return {
start: scriptInfo.positionToLineOffset(change.span.start),
@@ -77586,18 +80590,22 @@ 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.isScriptOpen()) {
- if (fileNameInProject.indexOf(".d.ts") > 0)
+ if (fileNameInProject.indexOf(".d.ts") > 0) {
veryLowPriorityFiles.push(fileNameInProject);
- else
+ }
+ else {
lowPriorityFiles.push(fileNameInProject);
+ }
}
- else
+ else {
mediumPriorityFiles.push(fileNameInProject);
+ }
}
}
fileNamesInProject = highPriorityFiles.concat(mediumPriorityFiles).concat(lowPriorityFiles).concat(veryLowPriorityFiles);
@@ -78021,11 +81029,11 @@ var ts;
snap.index.load(lm.lines);
return svc;
};
+ ScriptVersionCache.changeNumberThreshold = 8;
+ ScriptVersionCache.changeLengthThreshold = 256;
+ ScriptVersionCache.maxVersions = 8;
return ScriptVersionCache;
}());
- ScriptVersionCache.changeNumberThreshold = 8;
- ScriptVersionCache.changeLengthThreshold = 256;
- ScriptVersionCache.maxVersions = 8;
server.ScriptVersionCache = ScriptVersionCache;
var LineIndexSnapshot = (function () {
function LineIndexSnapshot(version, cache) {
@@ -78552,6 +81560,7 @@ var ts;
var childProcess = require("child_process");
var os = require("os");
function getGlobalTypingsCacheLocation() {
+ var versionMajorMinor = ts.version.match(/\d+\.\d+/)[0];
switch (process.platform) {
case "win32": {
var basePath = process.env.LOCALAPPDATA ||
@@ -78560,13 +81569,15 @@ var ts;
process.env.USERPROFILE ||
(process.env.HOMEDRIVE && process.env.HOMEPATH && ts.normalizeSlashes(process.env.HOMEDRIVE + process.env.HOMEPATH)) ||
os.tmpdir();
- return ts.combinePaths(ts.normalizeSlashes(basePath), "Microsoft/TypeScript");
+ return ts.combinePaths(ts.combinePaths(ts.normalizeSlashes(basePath), "Microsoft/TypeScript"), versionMajorMinor);
}
+ case "openbsd":
+ case "freebsd":
case "darwin":
case "linux":
case "android": {
var cacheLocation = getNonWindowsCacheLocation(process.platform === "darwin");
- return ts.combinePaths(cacheLocation, "typescript");
+ return ts.combinePaths(ts.combinePaths(cacheLocation, "typescript"), versionMajorMinor);
}
default:
ts.Debug.fail("unsupported platform '" + process.platform + "'");
@@ -78668,12 +81679,13 @@ var ts;
return Logger;
}());
var NodeTypingsInstaller = (function () {
- function NodeTypingsInstaller(telemetryEnabled, logger, host, eventPort, globalTypingsCacheLocation, typingSafeListLocation, newLine) {
+ function NodeTypingsInstaller(telemetryEnabled, logger, host, eventPort, globalTypingsCacheLocation, typingSafeListLocation, npmLocation, newLine) {
var _this = this;
this.telemetryEnabled = telemetryEnabled;
this.logger = logger;
this.globalTypingsCacheLocation = globalTypingsCacheLocation;
this.typingSafeListLocation = typingSafeListLocation;
+ this.npmLocation = npmLocation;
this.newLine = newLine;
this.installerPidReported = false;
this.throttledOperations = new server.ThrottledOperations(host);
@@ -78715,18 +81727,19 @@ var ts;
if (this.typingSafeListLocation) {
args.push(server.Arguments.TypingSafeListLocation, this.typingSafeListLocation);
}
+ if (this.npmLocation) {
+ args.push(server.Arguments.NpmLocation, this.npmLocation);
+ }
var execArgv = [];
- {
- for (var _i = 0, _a = process.execArgv; _i < _a.length; _i++) {
- var arg = _a[_i];
- var match = /^--(debug|inspect)(=(\d+))?$/.exec(arg);
- if (match) {
- var currentPort = match[3] !== undefined
- ? +match[3]
- : match[1] === "debug" ? 5858 : 9229;
- execArgv.push("--" + match[1] + "=" + (currentPort + 1));
- break;
- }
+ for (var _i = 0, _a = process.execArgv; _i < _a.length; _i++) {
+ var arg = _a[_i];
+ var match = /^--(debug|inspect)(=(\d+))?$/.exec(arg);
+ if (match) {
+ var currentPort = match[3] !== undefined
+ ? +match[3]
+ : match[1] === "debug" ? 5858 : 9229;
+ execArgv.push("--" + match[1] + "=" + (currentPort + 1));
+ break;
}
}
this.installer = childProcess.fork(ts.combinePaths(__dirname, "typingsInstaller.js"), args, { execArgv: execArgv });
@@ -78817,10 +81830,10 @@ var ts;
__extends(IOSession, _super);
function IOSession(options) {
var _this = this;
- var host = options.host, installerEventPort = options.installerEventPort, globalTypingsCacheLocation = options.globalTypingsCacheLocation, typingSafeListLocation = options.typingSafeListLocation, canUseEvents = options.canUseEvents;
+ var host = options.host, installerEventPort = options.installerEventPort, globalTypingsCacheLocation = options.globalTypingsCacheLocation, typingSafeListLocation = options.typingSafeListLocation, npmLocation = options.npmLocation, canUseEvents = options.canUseEvents;
var typingsInstaller = disableAutomaticTypingAcquisition
? undefined
- : new NodeTypingsInstaller(telemetryEnabled, logger, host, installerEventPort, globalTypingsCacheLocation, typingSafeListLocation, host.newLine);
+ : new NodeTypingsInstaller(telemetryEnabled, logger, host, installerEventPort, globalTypingsCacheLocation, typingSafeListLocation, npmLocation, host.newLine);
_this = _super.call(this, {
host: host,
cancellationToken: cancellationToken,
@@ -78831,7 +81844,8 @@ var ts;
logger: logger,
canUseEvents: canUseEvents,
globalPlugins: options.globalPlugins,
- pluginProbeLocations: options.pluginProbeLocations
+ pluginProbeLocations: options.pluginProbeLocations,
+ allowLocalPluginLoads: options.allowLocalPluginLoads
}) || this;
if (telemetryEnabled && typingsInstaller) {
typingsInstaller.setTelemetrySender(_this);
@@ -78927,7 +81941,7 @@ var ts;
watchedFile.callback(watchedFile.fileName);
}
else if (watchedFile.mtime.getTime() !== stats.mtime.getTime()) {
- watchedFile.mtime = getModifiedTime(watchedFile.fileName);
+ watchedFile.mtime = stats.mtime;
watchedFile.callback(watchedFile.fileName, watchedFile.mtime.getTime() === 0);
}
});
@@ -79074,12 +82088,11 @@ var ts;
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 };
+ return { module: require(ts.resolveJavaScriptModule(moduleName, initialDir, sys)), error: undefined };
}
- catch (e) {
- return { module: undefined, error: e };
+ catch (error) {
+ return { module: undefined, error: error };
}
};
var cancellationToken;
@@ -79102,9 +82115,11 @@ var ts;
if (localeStr) {
ts.validateLocaleAndSetLanguage(localeStr, sys);
}
- var typingSafeListLocation = server.findArgument("--typingSafeListLocation");
+ var typingSafeListLocation = server.findArgument(server.Arguments.TypingSafeListLocation);
+ var npmLocation = server.findArgument(server.Arguments.NpmLocation);
var globalPlugins = (server.findArgument("--globalPlugins") || "").split(",");
var pluginProbeLocations = (server.findArgument("--pluginProbeLocations") || "").split(",");
+ var allowLocalPluginLoads = server.hasArgument("--allowLocalPluginLoads");
var useSingleInferredProject = server.hasArgument("--useSingleInferredProject");
var disableAutomaticTypingAcquisition = server.hasArgument("--disableAutomaticTypingAcquisition");
var telemetryEnabled = server.hasArgument(server.Arguments.EnableTelemetry);
@@ -79117,10 +82132,12 @@ var ts;
disableAutomaticTypingAcquisition: disableAutomaticTypingAcquisition,
globalTypingsCacheLocation: getGlobalTypingsCacheLocation(),
typingSafeListLocation: typingSafeListLocation,
+ npmLocation: npmLocation,
telemetryEnabled: telemetryEnabled,
logger: logger,
globalPlugins: globalPlugins,
- pluginProbeLocations: pluginProbeLocations
+ pluginProbeLocations: pluginProbeLocations,
+ allowLocalPluginLoads: allowLocalPluginLoads
};
var ioSession = new IOSession(options);
process.on("uncaughtException", function (err) {
diff --git a/node_modules/typedoc/node_modules/typescript/lib/tsserverlibrary.d.ts b/node_modules/typedoc/node_modules/typescript/lib/tsserverlibrary.d.ts
index 3685e342f..ad579615f 100644
--- a/node_modules/typedoc/node_modules/typescript/lib/tsserverlibrary.d.ts
+++ b/node_modules/typedoc/node_modules/typescript/lib/tsserverlibrary.d.ts
@@ -1,18 +1,18 @@
-/*! *****************************************************************************
-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.
+***************************************************************************** */
+
declare namespace ts {
interface MapLike<T> {
[index: string]: T;
@@ -54,7 +54,7 @@ declare namespace ts {
pos: number;
end: number;
}
- const enum SyntaxKind {
+ enum SyntaxKind {
Unknown = 0,
EndOfFileToken = 1,
SingleLineCommentTrivia = 2,
@@ -341,20 +341,22 @@ declare namespace ts {
JSDocComment = 283,
JSDocTag = 284,
JSDocAugmentsTag = 285,
- JSDocParameterTag = 286,
- JSDocReturnTag = 287,
- JSDocTypeTag = 288,
- JSDocTemplateTag = 289,
- JSDocTypedefTag = 290,
- JSDocPropertyTag = 291,
- JSDocTypeLiteral = 292,
- JSDocLiteralType = 293,
- SyntaxList = 294,
- NotEmittedStatement = 295,
- PartiallyEmittedExpression = 296,
- MergeDeclarationMarker = 297,
- EndOfDeclarationMarker = 298,
- Count = 299,
+ JSDocClassTag = 286,
+ JSDocParameterTag = 287,
+ JSDocReturnTag = 288,
+ JSDocTypeTag = 289,
+ JSDocTemplateTag = 290,
+ JSDocTypedefTag = 291,
+ JSDocPropertyTag = 292,
+ JSDocTypeLiteral = 293,
+ JSDocLiteralType = 294,
+ SyntaxList = 295,
+ NotEmittedStatement = 296,
+ PartiallyEmittedExpression = 297,
+ CommaListExpression = 298,
+ MergeDeclarationMarker = 299,
+ EndOfDeclarationMarker = 300,
+ Count = 301,
FirstAssignment = 58,
LastAssignment = 70,
FirstCompoundAssignment = 59,
@@ -381,11 +383,11 @@ declare namespace ts {
LastBinaryOperator = 70,
FirstNode = 143,
FirstJSDocNode = 267,
- LastJSDocNode = 293,
- FirstJSDocTagNode = 283,
- LastJSDocTagNode = 293,
+ LastJSDocNode = 294,
+ FirstJSDocTagNode = 284,
+ LastJSDocTagNode = 294,
}
- const enum NodeFlags {
+ enum NodeFlags {
None = 0,
Let = 1,
Const = 2,
@@ -412,7 +414,7 @@ declare namespace ts {
ContextFlags = 96256,
TypeExcludesFlags = 20480,
}
- const enum ModifierFlags {
+ enum ModifierFlags {
None = 0,
Export = 1,
Ambient = 2,
@@ -432,7 +434,7 @@ declare namespace ts {
TypeScriptModifier = 2270,
ExportDefault = 513,
}
- const enum JsxFlags {
+ enum JsxFlags {
None = 0,
IntrinsicNamedElement = 1,
IntrinsicIndexedElement = 2,
@@ -482,9 +484,11 @@ declare namespace ts {
type DeclarationName = Identifier | StringLiteral | NumericLiteral | ComputedPropertyName | BindingPattern;
interface Declaration extends Node {
_declarationBrand: any;
+ }
+ interface NamedDeclaration extends Declaration {
name?: DeclarationName;
}
- interface DeclarationStatement extends Declaration, Statement {
+ interface DeclarationStatement extends NamedDeclaration, Statement {
name?: Identifier | StringLiteral | NumericLiteral;
}
interface ComputedPropertyName extends Node {
@@ -495,7 +499,7 @@ declare namespace ts {
kind: SyntaxKind.Decorator;
expression: LeftHandSideExpression;
}
- interface TypeParameterDeclaration extends Declaration {
+ interface TypeParameterDeclaration extends NamedDeclaration {
kind: SyntaxKind.TypeParameter;
parent?: DeclarationWithTypeParameters;
name: Identifier;
@@ -503,7 +507,7 @@ declare namespace ts {
default?: TypeNode;
expression?: Expression;
}
- interface SignatureDeclaration extends Declaration {
+ interface SignatureDeclaration extends NamedDeclaration {
name?: PropertyName;
typeParameters?: NodeArray<TypeParameterDeclaration>;
parameters: NodeArray<ParameterDeclaration>;
@@ -516,7 +520,7 @@ declare namespace ts {
kind: SyntaxKind.ConstructSignature;
}
type BindingName = Identifier | BindingPattern;
- interface VariableDeclaration extends Declaration {
+ interface VariableDeclaration extends NamedDeclaration {
kind: SyntaxKind.VariableDeclaration;
parent?: VariableDeclarationList | CatchClause;
name: BindingName;
@@ -528,7 +532,7 @@ declare namespace ts {
parent?: VariableStatement | ForStatement | ForOfStatement | ForInStatement;
declarations: NodeArray<VariableDeclaration>;
}
- interface ParameterDeclaration extends Declaration {
+ interface ParameterDeclaration extends NamedDeclaration {
kind: SyntaxKind.Parameter;
parent?: SignatureDeclaration;
dotDotDotToken?: DotDotDotToken;
@@ -537,7 +541,7 @@ declare namespace ts {
type?: TypeNode;
initializer?: Expression;
}
- interface BindingElement extends Declaration {
+ interface BindingElement extends NamedDeclaration {
kind: SyntaxKind.BindingElement;
parent?: BindingPattern;
propertyName?: PropertyName;
@@ -559,7 +563,7 @@ declare namespace ts {
type?: TypeNode;
initializer?: Expression;
}
- interface ObjectLiteralElement extends Declaration {
+ interface ObjectLiteralElement extends NamedDeclaration {
_objectLiteralBrandBrand: any;
name?: PropertyName;
}
@@ -581,7 +585,7 @@ declare namespace ts {
kind: SyntaxKind.SpreadAssignment;
expression: Expression;
}
- interface VariableLikeDeclaration extends Declaration {
+ interface VariableLikeDeclaration extends NamedDeclaration {
propertyName?: PropertyName;
dotDotDotToken?: DotDotDotToken;
name: DeclarationName;
@@ -589,7 +593,7 @@ declare namespace ts {
type?: TypeNode;
initializer?: Expression;
}
- interface PropertyLikeDeclaration extends Declaration {
+ interface PropertyLikeDeclaration extends NamedDeclaration {
name: PropertyName;
}
interface ObjectBindingPattern extends Node {
@@ -666,6 +670,7 @@ declare namespace ts {
interface ConstructorTypeNode extends TypeNode, SignatureDeclaration {
kind: SyntaxKind.ConstructorType;
}
+ type TypeReferenceType = TypeReferenceNode | ExpressionWithTypeArguments | JSDocTypeReference;
interface TypeReferenceNode extends TypeNode {
kind: SyntaxKind.TypeReference;
typeName: EntityName;
@@ -743,22 +748,23 @@ declare namespace ts {
interface UnaryExpression extends Expression {
_unaryExpressionBrand: any;
}
- interface IncrementExpression extends UnaryExpression {
- _incrementExpressionBrand: any;
+ type IncrementExpression = UpdateExpression;
+ interface UpdateExpression extends UnaryExpression {
+ _updateExpressionBrand: any;
}
type PrefixUnaryOperator = SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken | SyntaxKind.PlusToken | SyntaxKind.MinusToken | SyntaxKind.TildeToken | SyntaxKind.ExclamationToken;
- interface PrefixUnaryExpression extends IncrementExpression {
+ interface PrefixUnaryExpression extends UpdateExpression {
kind: SyntaxKind.PrefixUnaryExpression;
operator: PrefixUnaryOperator;
operand: UnaryExpression;
}
type PostfixUnaryOperator = SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken;
- interface PostfixUnaryExpression extends IncrementExpression {
+ interface PostfixUnaryExpression extends UpdateExpression {
kind: SyntaxKind.PostfixUnaryExpression;
operand: LeftHandSideExpression;
operator: PostfixUnaryOperator;
}
- interface LeftHandSideExpression extends IncrementExpression {
+ interface LeftHandSideExpression extends UpdateExpression {
_leftHandSideExpressionBrand: any;
}
interface MemberExpression extends LeftHandSideExpression {
@@ -779,6 +785,9 @@ declare namespace ts {
interface SuperExpression extends PrimaryExpression {
kind: SyntaxKind.SuperKeyword;
}
+ interface ImportExpression extends PrimaryExpression {
+ kind: SyntaxKind.ImportKeyword;
+ }
interface DeleteExpression extends UnaryExpression {
kind: SyntaxKind.DeleteExpression;
expression: UnaryExpression;
@@ -926,7 +935,7 @@ declare namespace ts {
}
type EntityNameExpression = Identifier | PropertyAccessEntityNameExpression | ParenthesizedExpression;
type EntityNameOrEntityNameExpression = EntityName | EntityNameExpression;
- interface PropertyAccessExpression extends MemberExpression, Declaration {
+ interface PropertyAccessExpression extends MemberExpression, NamedDeclaration {
kind: SyntaxKind.PropertyAccessExpression;
expression: LeftHandSideExpression;
name: Identifier;
@@ -956,6 +965,9 @@ declare namespace ts {
interface SuperCall extends CallExpression {
expression: SuperExpression;
}
+ interface ImportCall extends CallExpression {
+ expression: ImportExpression;
+ }
interface ExpressionWithTypeArguments extends TypeNode {
kind: SyntaxKind.ExpressionWithTypeArguments;
parent?: HeritageClause;
@@ -991,7 +1003,7 @@ declare namespace ts {
}
interface MetaProperty extends PrimaryExpression {
kind: SyntaxKind.MetaProperty;
- keywordToken: SyntaxKind;
+ keywordToken: SyntaxKind.NewKeyword;
name: Identifier;
}
interface JsxElement extends PrimaryExpression {
@@ -1051,6 +1063,10 @@ declare namespace ts {
interface NotEmittedStatement extends Statement {
kind: SyntaxKind.NotEmittedStatement;
}
+ interface CommaListExpression extends Expression {
+ kind: SyntaxKind.CommaListExpression;
+ elements: NodeArray<Expression>;
+ }
interface EmptyStatement extends Statement {
kind: SyntaxKind.EmptyStatement;
}
@@ -1098,6 +1114,7 @@ declare namespace ts {
condition?: Expression;
incrementor?: Expression;
}
+ type ForInOrOfStatement = ForInStatement | ForOfStatement;
interface ForInStatement extends IterationStatement {
kind: SyntaxKind.ForInStatement;
initializer: ForInitializer;
@@ -1171,8 +1188,8 @@ declare namespace ts {
variableDeclaration: VariableDeclaration;
block: Block;
}
- type DeclarationWithTypeParameters = SignatureDeclaration | ClassLikeDeclaration | InterfaceDeclaration | TypeAliasDeclaration;
- interface ClassLikeDeclaration extends Declaration {
+ type DeclarationWithTypeParameters = SignatureDeclaration | ClassLikeDeclaration | InterfaceDeclaration | TypeAliasDeclaration | JSDocTemplateTag;
+ interface ClassLikeDeclaration extends NamedDeclaration {
name?: Identifier;
typeParameters?: NodeArray<TypeParameterDeclaration>;
heritageClauses?: NodeArray<HeritageClause>;
@@ -1185,11 +1202,11 @@ declare namespace ts {
interface ClassExpression extends ClassLikeDeclaration, PrimaryExpression {
kind: SyntaxKind.ClassExpression;
}
- interface ClassElement extends Declaration {
+ interface ClassElement extends NamedDeclaration {
_classElementBrand: any;
name?: PropertyName;
}
- interface TypeElement extends Declaration {
+ interface TypeElement extends NamedDeclaration {
_typeElementBrand: any;
name?: PropertyName;
questionToken?: QuestionToken;
@@ -1213,7 +1230,7 @@ declare namespace ts {
typeParameters?: NodeArray<TypeParameterDeclaration>;
type: TypeNode;
}
- interface EnumMember extends Declaration {
+ interface EnumMember extends NamedDeclaration {
kind: SyntaxKind.EnumMember;
parent?: EnumDeclaration;
name: PropertyName;
@@ -1266,13 +1283,13 @@ declare namespace ts {
moduleSpecifier: Expression;
}
type NamedImportBindings = NamespaceImport | NamedImports;
- interface ImportClause extends Declaration {
+ interface ImportClause extends NamedDeclaration {
kind: SyntaxKind.ImportClause;
parent?: ImportDeclaration;
name?: Identifier;
namedBindings?: NamedImportBindings;
}
- interface NamespaceImport extends Declaration {
+ interface NamespaceImport extends NamedDeclaration {
kind: SyntaxKind.NamespaceImport;
parent?: ImportClause;
name: Identifier;
@@ -1298,13 +1315,13 @@ declare namespace ts {
elements: NodeArray<ExportSpecifier>;
}
type NamedImportsOrExports = NamedImports | NamedExports;
- interface ImportSpecifier extends Declaration {
+ interface ImportSpecifier extends NamedDeclaration {
kind: SyntaxKind.ImportSpecifier;
parent?: NamedImports;
propertyName?: Identifier;
name: Identifier;
}
- interface ExportSpecifier extends Declaration {
+ interface ExportSpecifier extends NamedDeclaration {
kind: SyntaxKind.ExportSpecifier;
parent?: NamedExports;
propertyName?: Identifier;
@@ -1412,6 +1429,7 @@ declare namespace ts {
comment: string | undefined;
}
interface JSDocTag extends Node {
+ parent: JSDoc;
atToken: AtToken;
tagName: Identifier;
comment: string | undefined;
@@ -1423,6 +1441,9 @@ declare namespace ts {
kind: SyntaxKind.JSDocAugmentsTag;
typeExpression: JSDocTypeExpression;
}
+ interface JSDocClassTag extends JSDocTag {
+ kind: SyntaxKind.JSDocClassTag;
+ }
interface JSDocTemplateTag extends JSDocTag {
kind: SyntaxKind.JSDocTemplateTag;
typeParameters: NodeArray<TypeParameterDeclaration>;
@@ -1435,7 +1456,8 @@ declare namespace ts {
kind: SyntaxKind.JSDocTypeTag;
typeExpression: JSDocTypeExpression;
}
- interface JSDocTypedefTag extends JSDocTag, Declaration {
+ interface JSDocTypedefTag extends JSDocTag, NamedDeclaration {
+ parent: JSDoc;
kind: SyntaxKind.JSDocTypedefTag;
fullName?: JSDocNamespaceDeclaration | Identifier;
name?: Identifier;
@@ -1443,9 +1465,13 @@ declare namespace ts {
jsDocTypeLiteral?: JSDocTypeLiteral;
}
interface JSDocPropertyTag extends JSDocTag, TypeElement {
+ parent: JSDoc;
kind: SyntaxKind.JSDocPropertyTag;
name: Identifier;
+ preParameterName?: Identifier;
+ postParameterName?: Identifier;
typeExpression: JSDocTypeExpression;
+ isBracketed: boolean;
}
interface JSDocTypeLiteral extends JSDocType {
kind: SyntaxKind.JSDocTypeLiteral;
@@ -1457,10 +1483,10 @@ declare namespace ts {
preParameterName?: Identifier;
typeExpression?: JSDocTypeExpression;
postParameterName?: Identifier;
- parameterName: Identifier;
+ name: Identifier;
isBracketed: boolean;
}
- const enum FlowFlags {
+ enum FlowFlags {
Unreachable = 1,
Start = 2,
BranchLabel = 4,
@@ -1613,10 +1639,10 @@ declare namespace ts {
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;
+ getPropertyOfType(type: Type, propertyName: string): Symbol | undefined;
+ getIndexInfoOfType(type: Type, kind: IndexKind): IndexInfo | undefined;
getSignaturesOfType(type: Type, kind: SignatureKind): Signature[];
- getIndexTypeOfType(type: Type, kind: IndexKind): Type;
+ getIndexTypeOfType(type: Type, kind: IndexKind): Type | undefined;
getBaseTypes(type: InterfaceType): BaseType[];
getBaseTypeOfLiteralType(type: Type): Type;
getWidenedType(type: Type): Type;
@@ -1626,11 +1652,11 @@ declare namespace ts {
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;
+ getSymbolAtLocation(node: Node): Symbol | undefined;
getSymbolsOfParameterPropertyDeclaration(parameter: ParameterDeclaration, parameterName: string): Symbol[];
- getShorthandAssignmentValueSymbol(location: Node): Symbol;
- getExportSpecifierLocalTargetSymbol(location: ExportSpecifier): Symbol;
- getPropertySymbolOfDestructuringAssignment(location: Identifier): Symbol;
+ getShorthandAssignmentValueSymbol(location: Node): Symbol | undefined;
+ getExportSpecifierLocalTargetSymbol(location: ExportSpecifier): Symbol | undefined;
+ getPropertySymbolOfDestructuringAssignment(location: Identifier): Symbol | undefined;
getTypeAtLocation(node: Node): Type;
getTypeFromTypeNode(node: TypeNode): Type;
signatureToString(signature: Signature, enclosingDeclaration?: Node, flags?: TypeFormatFlags, kind?: SignatureKind): string;
@@ -1640,37 +1666,47 @@ declare namespace ts {
getFullyQualifiedName(symbol: Symbol): string;
getAugmentedPropertiesOfType(type: Type): Symbol[];
getRootSymbols(symbol: Symbol): Symbol[];
- getContextualType(node: Expression): Type;
- getResolvedSignature(node: CallLikeExpression, candidatesOutArray?: Signature[]): Signature;
- getSignatureFromDeclaration(declaration: SignatureDeclaration): Signature;
- isImplementationOfOverload(node: FunctionLikeDeclaration): boolean;
+ getContextualType(node: Expression): Type | undefined;
+ getResolvedSignature(node: CallLikeExpression, candidatesOutArray?: Signature[]): Signature | undefined;
+ getSignatureFromDeclaration(declaration: SignatureDeclaration): Signature | undefined;
+ isImplementationOfOverload(node: FunctionLikeDeclaration): boolean | undefined;
isUndefinedSymbol(symbol: Symbol): boolean;
isArgumentsSymbol(symbol: Symbol): boolean;
isUnknownSymbol(symbol: Symbol): boolean;
- getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): number;
+ getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): string | number | undefined;
isValidPropertyAccess(node: PropertyAccessExpression | QualifiedName, propertyName: string): boolean;
getAliasedSymbol(symbol: Symbol): Symbol;
getExportsOfModule(moduleSymbol: Symbol): Symbol[];
- getAllAttributesTypeFromJsxOpeningLikeElement(elementNode: JsxOpeningLikeElement): Type;
+ getAllAttributesTypeFromJsxOpeningLikeElement(elementNode: JsxOpeningLikeElement): Type | undefined;
getJsxIntrinsicTagNames(): Symbol[];
isOptionalParameter(node: ParameterDeclaration): boolean;
getAmbientModules(): Symbol[];
tryGetMemberInModuleExports(memberName: string, moduleSymbol: Symbol): Symbol | undefined;
getApparentType(type: Type): Type;
+ getSuggestionForNonexistentProperty(node: Identifier, containingType: Type): string | undefined;
+ getSuggestionForNonexistentSymbol(location: Node, name: string, meaning: SymbolFlags): string | undefined;
}
enum NodeBuilderFlags {
None = 0,
- allowThisInObjectLiteral = 1,
- allowQualifedNameInPlaceOfIdentifier = 2,
- allowTypeParameterInQualifiedName = 4,
- allowAnonymousIdentifier = 8,
- allowEmptyUnionOrIntersection = 16,
- allowEmptyTuple = 32,
+ NoTruncation = 1,
+ WriteArrayAsGenericType = 2,
+ WriteTypeArgumentsOfSignature = 32,
+ UseFullyQualifiedType = 64,
+ SuppressAnyReturnType = 256,
+ WriteTypeParametersInQualifiedName = 512,
+ AllowThisInObjectLiteral = 1024,
+ AllowQualifedNameInPlaceOfIdentifier = 2048,
+ AllowAnonymousIdentifier = 8192,
+ AllowEmptyUnionOrIntersection = 16384,
+ AllowEmptyTuple = 32768,
+ IgnoreErrors = 60416,
+ InObjectTypeLiteral = 1048576,
+ InTypeAlias = 8388608,
}
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;
+ buildSignatureDisplay(signature: 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;
@@ -1695,30 +1731,31 @@ declare namespace ts {
clear(): void;
trackSymbol(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): void;
reportInaccessibleThisError(): void;
- reportIllegalExtends(): void;
+ reportPrivateInBaseOfClassExpression(propertyName: string): void;
}
- const enum TypeFormatFlags {
+ enum TypeFormatFlags {
None = 0,
WriteArrayAsGenericType = 1,
- UseTypeOfFunction = 2,
- NoTruncation = 4,
- WriteArrowStyleSignature = 8,
- WriteOwnNameForAnyLike = 16,
- WriteTypeArgumentsOfSignature = 32,
- InElementType = 64,
- UseFullyQualifiedType = 128,
- InFirstTypeArgument = 256,
- InTypeAlias = 512,
- UseTypeAliasValue = 1024,
- SuppressAnyReturnType = 2048,
- AddUndefined = 4096,
- }
- const enum SymbolFormatFlags {
+ UseTypeOfFunction = 4,
+ NoTruncation = 8,
+ WriteArrowStyleSignature = 16,
+ WriteOwnNameForAnyLike = 32,
+ WriteTypeArgumentsOfSignature = 64,
+ InElementType = 128,
+ UseFullyQualifiedType = 256,
+ InFirstTypeArgument = 512,
+ InTypeAlias = 1024,
+ UseTypeAliasValue = 2048,
+ SuppressAnyReturnType = 4096,
+ AddUndefined = 8192,
+ WriteClassExpressionAsTypeLiteral = 16384,
+ }
+ enum SymbolFormatFlags {
None = 0,
WriteTypeParametersOrArguments = 1,
UseOnlyExternalAliasing = 2,
}
- const enum TypePredicateKind {
+ enum TypePredicateKind {
This = 0,
Identifier = 1,
}
@@ -1735,7 +1772,7 @@ declare namespace ts {
parameterIndex: number;
}
type TypePredicate = IdentifierTypePredicate | ThisTypePredicate;
- const enum SymbolFlags {
+ enum SymbolFlags {
None = 0,
FunctionScopedVariable = 1,
BlockScopedVariable = 2,
@@ -1809,7 +1846,7 @@ declare namespace ts {
globalExports?: SymbolTable;
}
type SymbolTable = Map<Symbol>;
- const enum TypeFlags {
+ enum TypeFlags {
Any = 1,
String = 2,
Number = 4,
@@ -1831,18 +1868,18 @@ declare namespace ts {
Index = 262144,
IndexedAccess = 524288,
NonPrimitive = 16777216,
- Literal = 480,
+ Literal = 224,
StringOrNumberLiteral = 96,
PossiblyFalsy = 7406,
StringLike = 262178,
- NumberLike = 340,
+ NumberLike = 84,
BooleanLike = 136,
EnumLike = 272,
UnionOrIntersection = 196608,
StructuredType = 229376,
StructuredOrTypeVariable = 1032192,
TypeVariable = 540672,
- Narrowable = 17810431,
+ Narrowable = 17810175,
NotUnionOrUnit = 16810497,
}
type DestructuringPattern = BindingPattern | ObjectLiteralExpression | ArrayLiteralExpression;
@@ -1854,17 +1891,19 @@ declare namespace ts {
aliasTypeArguments?: Type[];
}
interface LiteralType extends Type {
- text: string;
+ value: string | number;
freshType?: LiteralType;
regularType?: LiteralType;
}
- interface EnumType extends Type {
- memberTypes: EnumLiteralType[];
+ interface StringLiteralType extends LiteralType {
+ value: string;
}
- interface EnumLiteralType extends LiteralType {
- baseType: EnumType & UnionType;
+ interface NumberLiteralType extends LiteralType {
+ value: number;
+ }
+ interface EnumType extends Type {
}
- const enum ObjectFlags {
+ enum ObjectFlags {
Class = 1,
Interface = 2,
Reference = 4,
@@ -1896,7 +1935,7 @@ declare namespace ts {
}
interface TypeReference extends ObjectType {
target: GenericType;
- typeArguments: Type[];
+ typeArguments?: Type[];
}
interface GenericType extends InterfaceType, TypeReference {
}
@@ -1926,16 +1965,16 @@ declare namespace ts {
interface IndexType extends Type {
type: TypeVariable | UnionOrIntersectionType;
}
- const enum SignatureKind {
+ enum SignatureKind {
Call = 0,
Construct = 1,
}
interface Signature {
declaration: SignatureDeclaration;
- typeParameters: TypeParameter[];
+ typeParameters?: TypeParameter[];
parameters: Symbol[];
}
- const enum IndexKind {
+ enum IndexKind {
String = 0,
Number = 1,
}
@@ -1944,6 +1983,24 @@ declare namespace ts {
isReadonly: boolean;
declaration?: SignatureDeclaration;
}
+ enum InferencePriority {
+ NakedTypeVariable = 1,
+ MappedType = 2,
+ ReturnType = 4,
+ }
+ interface InferenceInfo {
+ typeParameter: TypeParameter;
+ candidates: Type[];
+ inferredType: Type;
+ priority: InferencePriority;
+ topLevel: boolean;
+ isFixed: boolean;
+ }
+ enum InferenceFlags {
+ InferUnionTypes = 1,
+ NoDefault = 2,
+ AnyDefault = 4,
+ }
interface JsFileExtensionInfo {
extension: string;
isMixedContent: boolean;
@@ -1961,9 +2018,9 @@ declare namespace ts {
next?: DiagnosticMessageChain;
}
interface Diagnostic {
- file: SourceFile;
- start: number;
- length: number;
+ file: SourceFile | undefined;
+ start: number | undefined;
+ length: number | undefined;
messageText: string | DiagnosticMessageChain;
category: DiagnosticCategory;
code: number;
@@ -2019,6 +2076,7 @@ declare namespace ts {
noImplicitAny?: boolean;
noImplicitReturns?: boolean;
noImplicitThis?: boolean;
+ noStrictGenericChecks?: boolean;
noUnusedLocals?: boolean;
noUnusedParameters?: boolean;
noImplicitUseStrict?: boolean;
@@ -2072,14 +2130,15 @@ declare namespace ts {
UMD = 3,
System = 4,
ES2015 = 5,
+ ESNext = 6,
}
- const enum JsxEmit {
+ enum JsxEmit {
None = 0,
Preserve = 1,
React = 2,
ReactNative = 3,
}
- const enum NewLineKind {
+ enum NewLineKind {
CarriageReturnLineFeed = 0,
LineFeed = 1,
}
@@ -2087,7 +2146,7 @@ declare namespace ts {
line: number;
character: number;
}
- const enum ScriptKind {
+ enum ScriptKind {
Unknown = 0,
JS = 1,
JSX = 2,
@@ -2095,7 +2154,7 @@ declare namespace ts {
TSX = 4,
External = 5,
}
- const enum ScriptTarget {
+ enum ScriptTarget {
ES3 = 0,
ES5 = 1,
ES2015 = 2,
@@ -2104,7 +2163,7 @@ declare namespace ts {
ESNext = 5,
Latest = 5,
}
- const enum LanguageVariant {
+ enum LanguageVariant {
Standard = 0,
JSX = 1,
}
@@ -2117,7 +2176,7 @@ declare namespace ts {
wildcardDirectories?: MapLike<WatchDirectoryFlags>;
compileOnSave?: boolean;
}
- const enum WatchDirectoryFlags {
+ enum WatchDirectoryFlags {
None = 0,
Recursive = 1,
}
@@ -2176,7 +2235,15 @@ declare namespace ts {
resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[], containingFile: string): ResolvedTypeReferenceDirective[];
getEnvironmentVariable?(name: string): string;
}
- const enum EmitFlags {
+ interface SourceMapRange extends TextRange {
+ source?: SourceMapSource;
+ }
+ interface SourceMapSource {
+ fileName: string;
+ text: string;
+ skipTrivia?: (pos: number) => number;
+ }
+ enum EmitFlags {
SingleLine = 1,
AdviseOnEmitNode = 2,
NoSubstitution = 4,
@@ -2195,14 +2262,16 @@ declare namespace ts {
HelperName = 4096,
ExportName = 8192,
LocalName = 16384,
- Indented = 32768,
- NoIndentation = 65536,
- AsyncFunctionBody = 131072,
- ReuseTempVariableScope = 262144,
- CustomPrologue = 524288,
- NoHoisting = 1048576,
- HasEndOfDeclarationMarker = 2097152,
- Iterator = 4194304,
+ InternalName = 32768,
+ Indented = 65536,
+ NoIndentation = 131072,
+ AsyncFunctionBody = 262144,
+ ReuseTempVariableScope = 524288,
+ CustomPrologue = 1048576,
+ NoHoisting = 2097152,
+ HasEndOfDeclarationMarker = 4194304,
+ Iterator = 8388608,
+ NoAsciiEscaping = 16777216,
}
interface EmitHelper {
readonly name: string;
@@ -2210,7 +2279,7 @@ declare namespace ts {
readonly text: string;
readonly priority?: number;
}
- const enum EmitHint {
+ enum EmitHint {
SourceFile = 0,
Expression = 1,
IdentifierName = 2,
@@ -2271,7 +2340,7 @@ declare namespace ts {
}
}
declare namespace ts {
- const version = "2.3.2";
+ const version = "2.4.1";
}
declare function setTimeout(handler: (...args: any[]) => void, timeout: number): any;
declare function clearTimeout(handle: any): void;
@@ -2354,20 +2423,20 @@ declare namespace ts {
scanRange<T>(start: number, length: number, callback: () => T): T;
tryScan<T>(callback: () => T): T;
}
- function tokenToString(t: SyntaxKind): string;
+ function tokenToString(t: SyntaxKind): string | undefined;
function getPositionOfLineAndCharacter(sourceFile: SourceFile, line: number, character: number): number;
- function getLineAndCharacterOfPosition(sourceFile: SourceFile, position: number): LineAndCharacter;
+ function getLineAndCharacterOfPosition(sourceFile: SourceFileLike, position: number): LineAndCharacter;
function isWhiteSpaceLike(ch: number): boolean;
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: 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 forEachLeadingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T) => U, state?: T): U | undefined;
+ function forEachTrailingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T) => U, state?: T): U | undefined;
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 getShebang(text: string): string | undefined;
function isIdentifierStart(ch: number, languageVersion: ScriptTarget): boolean;
function isIdentifierPart(ch: number, languageVersion: ScriptTarget): boolean;
function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, languageVariant?: LanguageVariant, text?: string, onError?: ErrorCallback, start?: number, length?: number): Scanner;
@@ -2383,7 +2452,7 @@ declare namespace ts {
error?: Diagnostic;
};
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 | undefined;
+ function convertCompileOnSaveOptionFromJson(jsonOption: any, basePath: string, errors: Diagnostic[]): boolean;
function convertCompilerOptionsFromJson(jsonOptions: any, basePath: string, configFileName?: string): {
options: CompilerOptions;
errors: Diagnostic[];
@@ -2394,9 +2463,6 @@ declare namespace ts {
};
}
declare namespace ts {
- interface Push<T> {
- push(value: T): void;
- }
function moduleHasNonRelativeName(moduleName: string): boolean;
function getEffectiveTypeRoots(options: CompilerOptions, host: {
directoryExists?: (directoryName: string) => boolean;
@@ -2455,6 +2521,194 @@ declare namespace ts {
function getParseTreeNode(node: Node): Node;
function getParseTreeNode<T extends Node>(node: Node, nodeTest?: (node: Node) => node is T): T;
function unescapeIdentifier(identifier: string): string;
+ function getNameOfDeclaration(declaration: Declaration): DeclarationName | undefined;
+}
+declare namespace ts {
+ function isNumericLiteral(node: Node): node is NumericLiteral;
+ function isStringLiteral(node: Node): node is StringLiteral;
+ function isJsxText(node: Node): node is JsxText;
+ function isRegularExpressionLiteral(node: Node): node is RegularExpressionLiteral;
+ function isNoSubstitutionTemplateLiteral(node: Node): node is LiteralExpression;
+ function isTemplateHead(node: Node): node is TemplateHead;
+ function isTemplateMiddle(node: Node): node is TemplateMiddle;
+ function isTemplateTail(node: Node): node is TemplateTail;
+ function isIdentifier(node: Node): node is Identifier;
+ function isQualifiedName(node: Node): node is QualifiedName;
+ function isComputedPropertyName(node: Node): node is ComputedPropertyName;
+ function isTypeParameterDeclaration(node: Node): node is TypeParameterDeclaration;
+ function isParameter(node: Node): node is ParameterDeclaration;
+ function isDecorator(node: Node): node is Decorator;
+ function isPropertySignature(node: Node): node is PropertySignature;
+ function isPropertyDeclaration(node: Node): node is PropertyDeclaration;
+ function isMethodSignature(node: Node): node is MethodSignature;
+ function isMethodDeclaration(node: Node): node is MethodDeclaration;
+ function isConstructorDeclaration(node: Node): node is ConstructorDeclaration;
+ function isGetAccessorDeclaration(node: Node): node is GetAccessorDeclaration;
+ function isSetAccessorDeclaration(node: Node): node is SetAccessorDeclaration;
+ function isCallSignatureDeclaration(node: Node): node is CallSignatureDeclaration;
+ function isConstructSignatureDeclaration(node: Node): node is ConstructSignatureDeclaration;
+ function isIndexSignatureDeclaration(node: Node): node is IndexSignatureDeclaration;
+ function isTypePredicateNode(node: Node): node is TypePredicateNode;
+ function isTypeReferenceNode(node: Node): node is TypeReferenceNode;
+ function isFunctionTypeNode(node: Node): node is FunctionTypeNode;
+ function isConstructorTypeNode(node: Node): node is ConstructorTypeNode;
+ function isTypeQueryNode(node: Node): node is TypeQueryNode;
+ function isTypeLiteralNode(node: Node): node is TypeLiteralNode;
+ function isArrayTypeNode(node: Node): node is ArrayTypeNode;
+ function isTupleTypeNode(node: Node): node is TupleTypeNode;
+ function isUnionTypeNode(node: Node): node is UnionTypeNode;
+ function isIntersectionTypeNode(node: Node): node is IntersectionTypeNode;
+ function isParenthesizedTypeNode(node: Node): node is ParenthesizedTypeNode;
+ function isThisTypeNode(node: Node): node is ThisTypeNode;
+ function isTypeOperatorNode(node: Node): node is TypeOperatorNode;
+ function isIndexedAccessTypeNode(node: Node): node is IndexedAccessTypeNode;
+ function isMappedTypeNode(node: Node): node is MappedTypeNode;
+ function isLiteralTypeNode(node: Node): node is LiteralTypeNode;
+ function isObjectBindingPattern(node: Node): node is ObjectBindingPattern;
+ function isArrayBindingPattern(node: Node): node is ArrayBindingPattern;
+ function isBindingElement(node: Node): node is BindingElement;
+ 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 isCallExpression(node: Node): node is CallExpression;
+ function isNewExpression(node: Node): node is NewExpression;
+ function isTaggedTemplateExpression(node: Node): node is TaggedTemplateExpression;
+ function isTypeAssertion(node: Node): node is TypeAssertion;
+ function isParenthesizedExpression(node: Node): node is ParenthesizedExpression;
+ function isFunctionExpression(node: Node): node is FunctionExpression;
+ function isArrowFunction(node: Node): node is ArrowFunction;
+ function isDeleteExpression(node: Node): node is DeleteExpression;
+ function isTypeOfExpression(node: Node): node is TypeOfExpression;
+ function isVoidExpression(node: Node): node is VoidExpression;
+ function isAwaitExpression(node: Node): node is AwaitExpression;
+ function isPrefixUnaryExpression(node: Node): node is PrefixUnaryExpression;
+ function isPostfixUnaryExpression(node: Node): node is PostfixUnaryExpression;
+ function isBinaryExpression(node: Node): node is BinaryExpression;
+ function isConditionalExpression(node: Node): node is ConditionalExpression;
+ function isTemplateExpression(node: Node): node is TemplateExpression;
+ function isYieldExpression(node: Node): node is YieldExpression;
+ function isSpreadElement(node: Node): node is SpreadElement;
+ function isClassExpression(node: Node): node is ClassExpression;
+ function isOmittedExpression(node: Node): node is OmittedExpression;
+ function isExpressionWithTypeArguments(node: Node): node is ExpressionWithTypeArguments;
+ function isAsExpression(node: Node): node is AsExpression;
+ function isNonNullExpression(node: Node): node is NonNullExpression;
+ function isMetaProperty(node: Node): node is MetaProperty;
+ function isTemplateSpan(node: Node): node is TemplateSpan;
+ function isSemicolonClassElement(node: Node): node is SemicolonClassElement;
+ function isBlock(node: Node): node is Block;
+ function isVariableStatement(node: Node): node is VariableStatement;
+ function isEmptyStatement(node: Node): node is EmptyStatement;
+ function isExpressionStatement(node: Node): node is ExpressionStatement;
+ function isIfStatement(node: Node): node is IfStatement;
+ function isDoStatement(node: Node): node is DoStatement;
+ function isWhileStatement(node: Node): node is WhileStatement;
+ function isForStatement(node: Node): node is ForStatement;
+ function isForInStatement(node: Node): node is ForInStatement;
+ function isForOfStatement(node: Node): node is ForOfStatement;
+ function isContinueStatement(node: Node): node is ContinueStatement;
+ function isBreakStatement(node: Node): node is BreakStatement;
+ function isReturnStatement(node: Node): node is ReturnStatement;
+ function isWithStatement(node: Node): node is WithStatement;
+ function isSwitchStatement(node: Node): node is SwitchStatement;
+ function isLabeledStatement(node: Node): node is LabeledStatement;
+ function isThrowStatement(node: Node): node is ThrowStatement;
+ function isTryStatement(node: Node): node is TryStatement;
+ function isDebuggerStatement(node: Node): node is DebuggerStatement;
+ function isVariableDeclaration(node: Node): node is VariableDeclaration;
+ function isVariableDeclarationList(node: Node): node is VariableDeclarationList;
+ function isFunctionDeclaration(node: Node): node is FunctionDeclaration;
+ function isClassDeclaration(node: Node): node is ClassDeclaration;
+ function isInterfaceDeclaration(node: Node): node is InterfaceDeclaration;
+ function isTypeAliasDeclaration(node: Node): node is TypeAliasDeclaration;
+ function isEnumDeclaration(node: Node): node is EnumDeclaration;
+ function isModuleDeclaration(node: Node): node is ModuleDeclaration;
+ function isModuleBlock(node: Node): node is ModuleBlock;
+ function isCaseBlock(node: Node): node is CaseBlock;
+ function isNamespaceExportDeclaration(node: Node): node is NamespaceExportDeclaration;
+ function isImportEqualsDeclaration(node: Node): node is ImportEqualsDeclaration;
+ function isImportDeclaration(node: Node): node is ImportDeclaration;
+ function isImportClause(node: Node): node is ImportClause;
+ function isNamespaceImport(node: Node): node is NamespaceImport;
+ function isNamedImports(node: Node): node is NamedImports;
+ function isImportSpecifier(node: Node): node is ImportSpecifier;
+ function isExportAssignment(node: Node): node is ExportAssignment;
+ function isExportDeclaration(node: Node): node is ExportDeclaration;
+ function isNamedExports(node: Node): node is NamedExports;
+ function isExportSpecifier(node: Node): node is ExportSpecifier;
+ function isMissingDeclaration(node: Node): node is MissingDeclaration;
+ function isExternalModuleReference(node: Node): node is ExternalModuleReference;
+ function isJsxElement(node: Node): node is JsxElement;
+ function isJsxSelfClosingElement(node: Node): node is JsxSelfClosingElement;
+ function isJsxOpeningElement(node: Node): node is JsxOpeningElement;
+ function isJsxClosingElement(node: Node): node is JsxClosingElement;
+ function isJsxAttribute(node: Node): node is JsxAttribute;
+ function isJsxAttributes(node: Node): node is JsxAttributes;
+ function isJsxSpreadAttribute(node: Node): node is JsxSpreadAttribute;
+ function isJsxExpression(node: Node): node is JsxExpression;
+ function isCaseClause(node: Node): node is CaseClause;
+ function isDefaultClause(node: Node): node is DefaultClause;
+ 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 isSpreadAssignment(node: Node): node is SpreadAssignment;
+ function isEnumMember(node: Node): node is EnumMember;
+ function isSourceFile(node: Node): node is SourceFile;
+ function isBundle(node: Node): node is Bundle;
+ function isJSDocTypeExpression(node: Node): node is JSDocTypeExpression;
+ function isJSDocAllType(node: JSDocAllType): node is JSDocAllType;
+ function isJSDocUnknownType(node: Node): node is JSDocUnknownType;
+ function isJSDocArrayType(node: Node): node is JSDocArrayType;
+ function isJSDocUnionType(node: Node): node is JSDocUnionType;
+ function isJSDocTupleType(node: Node): node is JSDocTupleType;
+ function isJSDocNullableType(node: Node): node is JSDocNullableType;
+ function isJSDocNonNullableType(node: Node): node is JSDocNonNullableType;
+ function isJSDocRecordType(node: Node): node is JSDocRecordType;
+ function isJSDocRecordMember(node: Node): node is JSDocRecordMember;
+ function isJSDocTypeReference(node: Node): node is JSDocTypeReference;
+ function isJSDocOptionalType(node: Node): node is JSDocOptionalType;
+ function isJSDocFunctionType(node: Node): node is JSDocFunctionType;
+ function isJSDocVariadicType(node: Node): node is JSDocVariadicType;
+ function isJSDocConstructorType(node: Node): node is JSDocConstructorType;
+ function isJSDocThisType(node: Node): node is JSDocThisType;
+ function isJSDoc(node: Node): node is JSDoc;
+ function isJSDocAugmentsTag(node: Node): node is JSDocAugmentsTag;
+ function isJSDocParameterTag(node: Node): node is JSDocParameterTag;
+ function isJSDocReturnTag(node: Node): node is JSDocReturnTag;
+ function isJSDocTypeTag(node: Node): node is JSDocTypeTag;
+ function isJSDocTemplateTag(node: Node): node is JSDocTemplateTag;
+ function isJSDocTypedefTag(node: Node): node is JSDocTypedefTag;
+ function isJSDocPropertyTag(node: Node): node is JSDocPropertyTag;
+ function isJSDocTypeLiteral(node: Node): node is JSDocTypeLiteral;
+ function isJSDocLiteralType(node: Node): node is JSDocLiteralType;
+}
+declare namespace ts {
+ function isToken(n: Node): boolean;
+ function isLiteralExpression(node: Node): node is LiteralExpression;
+ function isTemplateMiddleOrTemplateTail(node: Node): node is TemplateMiddle | TemplateTail;
+ function isModifier(node: Node): node is Modifier;
+ function isEntityName(node: Node): node is EntityName;
+ function isPropertyName(node: Node): node is PropertyName;
+ function isBindingName(node: Node): node is BindingName;
+ function isFunctionLike(node: Node): node is FunctionLikeDeclaration;
+ function isClassElement(node: Node): node is ClassElement;
+ function isClassLike(node: Node): node is ClassLikeDeclaration;
+ function isAccessor(node: Node): node is AccessorDeclaration;
+ function isTypeElement(node: Node): node is TypeElement;
+ function isObjectLiteralElementLike(node: Node): node is ObjectLiteralElementLike;
+ function isTypeNode(node: Node): node is TypeNode;
+ function isFunctionOrConstructorTypeNode(node: Node): node is FunctionTypeNode | ConstructorTypeNode;
+ function isPropertyAccessOrQualifiedName(node: Node): node is PropertyAccessExpression | QualifiedName;
+ function isCallLikeExpression(node: Node): node is CallLikeExpression;
+ function isCallOrNewExpression(node: Node): node is CallExpression | NewExpression;
+ function isTemplateLiteral(node: Node): node is TemplateLiteral;
+ function isAssertionExpression(node: Node): node is AssertionExpression;
+ function isIterationStatement(node: Node, lookInLabeledStatements: boolean): node is IterationStatement;
+ function isJsxOpeningLikeElement(node: Node): node is JsxOpeningLikeElement;
+ function isCaseOrDefaultClause(node: Node): node is CaseOrDefaultClause;
+ function isJSDocCommentContainingNode(node: Node): boolean;
}
declare namespace ts {
function createNodeArray<T extends Node>(elements?: T[], hasTrailingComma?: boolean): NodeArray<T>;
@@ -2465,6 +2719,7 @@ declare namespace ts {
function createLiteral(value: string | number | boolean): PrimaryExpression;
function createNumericLiteral(value: string): NumericLiteral;
function createIdentifier(text: string): Identifier;
+ function updateIdentifier(node: Identifier, typeArguments: NodeArray<TypeNode> | undefined): Identifier;
function createTempVariable(recordTempVariable: ((node: Identifier) => void) | undefined): Identifier;
function createLoopVariable(): Identifier;
function createUniqueName(text: string): Identifier;
@@ -2479,63 +2734,65 @@ declare namespace ts {
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 createTypeParameterDeclaration(name: string | Identifier, constraint?: TypeNode, defaultType?: TypeNode): TypeParameterDeclaration;
+ function updateTypeParameterDeclaration(node: TypeParameterDeclaration, name: Identifier, constraint: TypeNode | undefined, defaultType: TypeNode | undefined): TypeParameterDeclaration;
+ 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 createPropertySignature(modifiers: Modifier[] | undefined, name: PropertyName | string, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertySignature;
+ function updatePropertySignature(node: PropertySignature, modifiers: Modifier[] | undefined, name: PropertyName, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertySignature;
+ function createProperty(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertyDeclaration;
+ function updateProperty(node: PropertyDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: PropertyName, type: TypeNode | undefined, initializer: Expression | undefined): PropertyDeclaration;
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 createMethod(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 createCallSignature(typeParameters: TypeParameterDeclaration[] | undefined, parameters: ParameterDeclaration[], type: TypeNode | undefined): CallSignatureDeclaration;
+ function updateCallSignature(node: CallSignatureDeclaration, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined): CallSignatureDeclaration;
+ function createConstructSignature(typeParameters: TypeParameterDeclaration[] | undefined, parameters: ParameterDeclaration[], type: TypeNode | undefined): ConstructSignatureDeclaration;
+ function updateConstructSignature(node: ConstructSignatureDeclaration, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined): ConstructSignatureDeclaration;
+ function createIndexSignature(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, parameters: ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration;
+ function updateIndexSignature(node: IndexSignatureDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, parameters: ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration;
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 createTypeReferenceNode(typeName: string | EntityName, typeArguments: TypeNode[] | undefined): TypeReferenceNode;
+ function updateTypeReferenceNode(node: TypeReferenceNode, typeName: EntityName, typeArguments: NodeArray<TypeNode> | undefined): TypeReferenceNode;
+ 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 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 createArrayTypeNode(elementType: TypeNode): ArrayTypeNode;
+ function updateArrayTypeNode(node: ArrayTypeNode, elementType: TypeNode): ArrayTypeNode;
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 createUnionTypeNode(types: TypeNode[]): UnionTypeNode;
+ function updateUnionTypeNode(node: UnionTypeNode, types: NodeArray<TypeNode>): UnionTypeNode;
+ function createIntersectionTypeNode(types: TypeNode[]): IntersectionTypeNode;
+ function updateIntersectionTypeNode(node: IntersectionTypeNode, types: NodeArray<TypeNode>): IntersectionTypeNode;
+ function createUnionOrIntersectionTypeNode(kind: SyntaxKind.UnionType | SyntaxKind.IntersectionType, types: TypeNode[]): UnionTypeNode | IntersectionTypeNode;
+ function createParenthesizedType(type: TypeNode): ParenthesizedTypeNode;
+ function updateParenthesizedType(node: ParenthesizedTypeNode, type: TypeNode): ParenthesizedTypeNode;
+ function createThisTypeNode(): ThisTypeNode;
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 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 createLiteralTypeNode(literal: Expression): LiteralTypeNode;
+ function updateLiteralTypeNode(node: LiteralTypeNode, literal: Expression): LiteralTypeNode;
function createObjectBindingPattern(elements: BindingElement[]): ObjectBindingPattern;
function updateObjectBindingPattern(node: ObjectBindingPattern, elements: BindingElement[]): ObjectBindingPattern;
function createArrayBindingPattern(elements: ArrayBindingElement[]): ArrayBindingPattern;
@@ -2577,7 +2834,7 @@ declare namespace ts {
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 updateBinary(node: BinaryExpression, left: Expression, right: Expression, operator?: BinaryOperator | BinaryOperatorToken): 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;
@@ -2597,16 +2854,15 @@ declare namespace ts {
function updateAsExpression(node: AsExpression, expression: Expression, type: TypeNode): AsExpression;
function createNonNullExpression(expression: Expression): NonNullExpression;
function updateNonNullExpression(node: NonNullExpression, expression: Expression): NonNullExpression;
+ function createMetaProperty(keywordToken: MetaProperty["keywordToken"], name: Identifier): MetaProperty;
+ function updateMetaProperty(node: MetaProperty, name: Identifier): MetaProperty;
function createTemplateSpan(expression: Expression, literal: TemplateMiddle | TemplateTail): TemplateSpan;
function updateTemplateSpan(node: TemplateSpan, expression: Expression, literal: TemplateMiddle | TemplateTail): TemplateSpan;
+ function createSemicolonClassElement(): SemicolonClassElement;
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;
@@ -2638,10 +2894,19 @@ declare namespace ts {
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 createDebuggerStatement(): DebuggerStatement;
+ function createVariableDeclaration(name: string | BindingName, type?: TypeNode, initializer?: Expression): VariableDeclaration;
+ function updateVariableDeclaration(node: VariableDeclaration, name: BindingName, type: TypeNode | undefined, initializer: Expression | undefined): VariableDeclaration;
+ function createVariableDeclarationList(declarations: VariableDeclaration[], flags?: NodeFlags): VariableDeclarationList;
+ function updateVariableDeclarationList(node: VariableDeclarationList, declarations: VariableDeclaration[]): VariableDeclarationList;
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 createInterfaceDeclaration(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: string | Identifier, typeParameters: TypeParameterDeclaration[] | undefined, heritageClauses: HeritageClause[] | undefined, members: TypeElement[]): InterfaceDeclaration;
+ function updateInterfaceDeclaration(node: InterfaceDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: Identifier, typeParameters: TypeParameterDeclaration[] | undefined, heritageClauses: HeritageClause[] | undefined, members: TypeElement[]): InterfaceDeclaration;
+ function createTypeAliasDeclaration(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: string | Identifier, typeParameters: TypeParameterDeclaration[] | undefined, type: TypeNode): TypeAliasDeclaration;
+ function updateTypeAliasDeclaration(node: TypeAliasDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: Identifier, typeParameters: TypeParameterDeclaration[] | undefined, type: TypeNode): TypeAliasDeclaration;
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;
@@ -2650,12 +2915,14 @@ declare namespace ts {
function updateModuleBlock(node: ModuleBlock, statements: Statement[]): ModuleBlock;
function createCaseBlock(clauses: CaseOrDefaultClause[]): CaseBlock;
function updateCaseBlock(node: CaseBlock, clauses: CaseOrDefaultClause[]): CaseBlock;
+ function createNamespaceExportDeclaration(name: string | Identifier): NamespaceExportDeclaration;
+ function updateNamespaceExportDeclaration(node: NamespaceExportDeclaration, name: Identifier): NamespaceExportDeclaration;
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 createImportClause(name: Identifier | undefined, namedBindings: NamedImportBindings | undefined): ImportClause;
+ function updateImportClause(node: ImportClause, name: Identifier | undefined, namedBindings: NamedImportBindings | undefined): ImportClause;
function createNamespaceImport(name: Identifier): NamespaceImport;
function updateNamespaceImport(node: NamespaceImport, name: Identifier): NamespaceImport;
function createNamedImports(elements: ImportSpecifier[]): NamedImports;
@@ -2680,20 +2947,20 @@ declare namespace ts {
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 createJsxAttributes(properties: JsxAttributeLike[]): JsxAttributes;
+ function updateJsxAttributes(node: JsxAttributes, properties: JsxAttributeLike[]): JsxAttributes;
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 createHeritageClause(token: HeritageClause["token"], types: ExpressionWithTypeArguments[]): HeritageClause;
+ function updateHeritageClause(node: HeritageClause, types: ExpressionWithTypeArguments[]): HeritageClause;
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;
@@ -2709,8 +2976,12 @@ declare namespace ts {
function createNotEmittedStatement(original: Node): NotEmittedStatement;
function createPartiallyEmittedExpression(expression: Expression, original?: Node): PartiallyEmittedExpression;
function updatePartiallyEmittedExpression(node: PartiallyEmittedExpression, expression: Expression): PartiallyEmittedExpression;
+ function createCommaList(elements: Expression[]): CommaListExpression;
+ function updateCommaList(node: CommaListExpression, elements: Expression[]): CommaListExpression;
function createBundle(sourceFiles: SourceFile[]): Bundle;
function updateBundle(node: Bundle, sourceFiles: SourceFile[]): Bundle;
+ function createImmediatelyInvokedFunctionExpression(statements: Statement[]): CallExpression;
+ function createImmediatelyInvokedFunctionExpression(statements: Statement[], param: ParameterDeclaration, paramValue: Expression): CallExpression;
function createComma(left: Expression, right: Expression): Expression;
function createLessThan(left: Expression, right: Expression): Expression;
function createAssignment(left: ObjectLiteralExpression | ArrayLiteralExpression, right: Expression): DestructuringAssignment;
@@ -2730,10 +3001,11 @@ declare namespace ts {
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 | undefined): T;
- function getTokenSourceMapRange(node: Node, token: SyntaxKind): TextRange | undefined;
- function setTokenSourceMapRange<T extends Node>(node: T, token: SyntaxKind, range: TextRange | undefined): T;
+ function getSourceMapRange(node: Node): SourceMapRange;
+ function setSourceMapRange<T extends Node>(node: T, range: SourceMapRange | undefined): T;
+ function createSourceMapSource(fileName: string, text: string, skipTrivia?: (pos: number) => number): SourceMapSource;
+ function getTokenSourceMapRange(node: Node, token: SyntaxKind): SourceMapRange | undefined;
+ function setTokenSourceMapRange<T extends Node>(node: T, token: SyntaxKind, range: SourceMapRange | undefined): T;
function getCommentRange(node: Node): TextRange;
function setCommentRange<T extends Node>(node: T, range: TextRange): T;
function getSyntheticLeadingComments(node: Node): SynthesizedComment[] | undefined;
@@ -2742,8 +3014,8 @@ declare namespace ts {
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 getConstantValue(node: PropertyAccessExpression | ElementAccessExpression): string | number;
+ function setConstantValue(node: PropertyAccessExpression | ElementAccessExpression, value: string | number): PropertyAccessExpression | ElementAccessExpression;
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;
@@ -2753,7 +3025,7 @@ declare namespace ts {
}
declare namespace ts {
function createNode(kind: SyntaxKind, pos?: number, end?: number): Node;
- function forEachChild<T>(node: Node, cbNode: (node: Node) => T, cbNodeArray?: (nodes: Node[]) => T): T;
+ function forEachChild<T>(node: Node, cbNode: (node: Node) => T | undefined, cbNodeArray?: (nodes: NodeArray<Node>) => T | undefined): T | undefined;
function createSourceFile(fileName: string, sourceText: string, languageVersion: ScriptTarget, setParentNodes?: boolean, scriptKind?: ScriptKind): SourceFile;
function parseIsolatedEntityName(text: string, languageVersion: ScriptTarget): EntityName;
function isExternalModule(file: SourceFile): boolean;
@@ -2786,6 +3058,7 @@ declare namespace ts {
getNewLine(): string;
}
function formatDiagnostics(diagnostics: Diagnostic[], host: FormatDiagnosticsHost): string;
+ function formatDiagnosticsWithColorAndContext(diagnostics: Diagnostic[], host: FormatDiagnosticsHost): string;
function flattenDiagnosticMessageText(messageText: string | DiagnosticMessageChain, newLine: string): string;
function createProgram(rootNames: string[], options: CompilerOptions, host?: CompilerHost, oldProgram?: Program): Program;
}
@@ -2805,31 +3078,31 @@ 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;
+ forEachChild<T>(cbNode: (node: Node) => T | undefined, cbNodeArray?: (nodes: NodeArray<Node>) => T | undefined): T | undefined;
}
interface Symbol {
getFlags(): SymbolFlags;
getName(): string;
- getDeclarations(): Declaration[];
+ getDeclarations(): Declaration[] | undefined;
getDocumentationComment(): SymbolDisplayPart[];
getJsDocTags(): JSDocTagInfo[];
}
interface Type {
getFlags(): TypeFlags;
- getSymbol(): Symbol;
+ getSymbol(): Symbol | undefined;
getProperties(): Symbol[];
- getProperty(propertyName: string): Symbol;
+ getProperty(propertyName: string): Symbol | undefined;
getApparentProperties(): Symbol[];
getCallSignatures(): Signature[];
getConstructSignatures(): Signature[];
- getStringIndexType(): Type;
- getNumberIndexType(): Type;
- getBaseTypes(): BaseType[];
+ getStringIndexType(): Type | undefined;
+ getNumberIndexType(): Type | undefined;
+ getBaseTypes(): BaseType[] | undefined;
getNonNullableType(): Type;
}
interface Signature {
getDeclaration(): SignatureDeclaration;
- getTypeParameters(): TypeParameter[];
+ getTypeParameters(): TypeParameter[] | undefined;
getParameters(): Symbol[];
getReturnType(): Type;
getDocumentationComment(): SymbolDisplayPart[];
@@ -2845,6 +3118,9 @@ declare namespace ts {
interface SourceFileLike {
getLineAndCharacterOfPosition(pos: number): LineAndCharacter;
}
+ interface SourceMapSource {
+ getLineAndCharacterOfPosition(pos: number): LineAndCharacter;
+ }
interface IScriptSnapshot {
getText(start: number, end: number): string;
getLength(): number;
@@ -2928,6 +3204,8 @@ declare namespace ts {
getDocCommentTemplateAtPosition(fileName: string, position: number): TextInsertion;
isValidBraceCompletionAtPosition(fileName: string, position: number, openingBrace: number): boolean;
getCodeFixesAtPosition(fileName: string, start: number, end: number, errorCodes: number[], formatOptions: FormatCodeSettings): CodeAction[];
+ getApplicableRefactors(fileName: string, positionOrRaneg: number | TextRange): ApplicableRefactorInfo[];
+ getEditsForRefactor(fileName: string, formatOptions: FormatCodeSettings, positionOrRange: number | TextRange, refactorName: string, actionName: string): RefactorEditInfo | undefined;
getEmitOutput(fileName: string, emitOnlyDtsFiles?: boolean): EmitOutput;
getProgram(): Program;
dispose(): void;
@@ -2978,6 +3256,21 @@ declare namespace ts {
description: string;
changes: FileTextChanges[];
}
+ interface ApplicableRefactorInfo {
+ name: string;
+ description: string;
+ inlineable?: boolean;
+ actions: RefactorActionInfo[];
+ }
+ type RefactorActionInfo = {
+ name: string;
+ description: string;
+ };
+ type RefactorEditInfo = {
+ edits: FileTextChanges[];
+ renameFilename?: string;
+ renameLocation?: number;
+ };
interface TextInsertion {
newText: string;
caretOffset: number;
@@ -3196,7 +3489,7 @@ declare namespace ts {
outputFiles: OutputFile[];
emitSkipped: boolean;
}
- const enum OutputFileType {
+ enum OutputFileType {
JavaScript = 0,
SourceMap = 1,
Declaration = 2,
@@ -3206,7 +3499,7 @@ declare namespace ts {
writeByteOrderMark: boolean;
text: string;
}
- const enum EndOfLineState {
+ enum EndOfLineState {
None = 0,
InMultiLineCommentTrivia = 1,
InSingleQuoteStringLiteral = 2,
@@ -3308,7 +3601,7 @@ declare namespace ts {
static jsxText: string;
static jsxAttributeStringLiteralValue: string;
}
- const enum ClassificationType {
+ enum ClassificationType {
comment = 1,
identifier = 2,
keyword = 3,
@@ -3364,6 +3657,7 @@ declare namespace ts {
reportDiagnostics?: boolean;
moduleName?: string;
renamedDependencies?: MapLike<string>;
+ transformers?: CustomTransformers;
}
interface TranspileOutput {
outputText: string;
@@ -3479,9 +3773,10 @@ declare namespace ts.server {
const LogFile = "--logFile";
const EnableTelemetry = "--enableTelemetry";
const TypingSafeListLocation = "--typingSafeListLocation";
+ const NpmLocation = "--npmLocation";
}
function hasArgument(argumentName: string): boolean;
- function findArgument(argumentName: string): string;
+ function findArgument(argumentName: string): string | undefined;
}
declare namespace ts.server {
enum LogLevel {
@@ -3534,7 +3829,10 @@ declare namespace ts.server {
}
function createNormalizedPathMap<T>(): NormalizedPathMap<T>;
interface ProjectOptions {
- configHasFilesProperty?: boolean;
+ configHasExtendsProperty: boolean;
+ configHasFilesProperty: boolean;
+ configHasIncludeProperty: boolean;
+ configHasExcludeProperty: boolean;
files?: string[];
wildcardDirectories?: Map<WatchDirectoryFlags>;
compilerOptions?: CompilerOptions;
@@ -3544,6 +3842,7 @@ declare namespace ts.server {
function isInferredProjectName(name: string): boolean;
function makeInferredProjectName(counter: number): string;
function toSortedReadonlyArray(arr: string[]): SortedReadonlyArray<string>;
+ function enumerateInsertsAndDeletes<T>(a: SortedReadonlyArray<T>, b: SortedReadonlyArray<T>, inserted: (item: T) => void, deleted: (item: T) => void, compare?: (a: T, b: T) => Comparison): void;
class ThrottledOperations {
private readonly host;
private pendingTimeouts;
@@ -3607,6 +3906,9 @@ declare namespace ts.server.protocol {
type CompilerOptionsForInferredProjects = "compilerOptionsForInferredProjects";
type GetCodeFixes = "getCodeFixes";
type GetSupportedCodeFixes = "getSupportedCodeFixes";
+ type GetApplicableRefactors = "getApplicableRefactors";
+ type GetRefactorCodeActions = "getRefactorCodeActions";
+ type GetEditsForRefactor = "getEditsForRefactor";
}
interface Message {
seq: number;
@@ -3701,15 +4003,52 @@ declare namespace ts.server.protocol {
line: number;
offset: number;
}
+ type FileLocationOrRangeRequestArgs = FileLocationRequestArgs | FileRangeRequestArgs;
+ interface GetApplicableRefactorsRequest extends Request {
+ command: CommandTypes.GetApplicableRefactors;
+ arguments: GetApplicableRefactorsRequestArgs;
+ }
+ type GetApplicableRefactorsRequestArgs = FileLocationOrRangeRequestArgs;
+ interface GetApplicableRefactorsResponse extends Response {
+ body?: ApplicableRefactorInfo[];
+ }
+ interface ApplicableRefactorInfo {
+ name: string;
+ description: string;
+ inlineable?: boolean;
+ actions: RefactorActionInfo[];
+ }
+ type RefactorActionInfo = {
+ name: string;
+ description: string;
+ };
+ interface GetEditsForRefactorRequest extends Request {
+ command: CommandTypes.GetEditsForRefactor;
+ arguments: GetEditsForRefactorRequestArgs;
+ }
+ type GetEditsForRefactorRequestArgs = FileLocationOrRangeRequestArgs & {
+ refactor: string;
+ action: string;
+ };
+ interface GetEditsForRefactorResponse extends Response {
+ body?: RefactorEditInfo;
+ }
+ type RefactorEditInfo = {
+ edits: FileCodeEdits[];
+ renameLocation?: Location;
+ renameFilename?: string;
+ };
interface CodeFixRequest extends Request {
command: CommandTypes.GetCodeFixes;
arguments: CodeFixRequestArgs;
}
- interface CodeFixRequestArgs extends FileRequestArgs {
+ interface FileRangeRequestArgs extends FileRequestArgs {
startLine: number;
startOffset: number;
endLine: number;
endOffset: number;
+ }
+ interface CodeFixRequestArgs extends FileRangeRequestArgs {
errorCodes?: number[];
}
interface GetCodeFixesResponse extends Response {
@@ -4288,6 +4627,7 @@ declare namespace ts.server.protocol {
insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces?: boolean;
insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces?: boolean;
insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces?: boolean;
+ insertSpaceAfterTypeAssertion?: boolean;
insertSpaceBeforeFunctionParenthesis?: boolean;
placeOpenBraceOnNewLineForFunctions?: boolean;
placeOpenBraceOnNewLineForControlBlocks?: boolean;
@@ -4405,7 +4745,7 @@ declare namespace ts.server {
project: Project;
}
interface EventSender {
- event(payload: any, eventName: string): void;
+ event<T>(payload: T, eventName: string): void;
}
namespace CommandNames {
const Brace: protocol.CommandTypes.Brace;
@@ -4452,6 +4792,9 @@ declare namespace ts.server {
const CompilerOptionsForInferredProjects: protocol.CommandTypes.CompilerOptionsForInferredProjects;
const GetCodeFixes: protocol.CommandTypes.GetCodeFixes;
const GetSupportedCodeFixes: protocol.CommandTypes.GetSupportedCodeFixes;
+ const GetApplicableRefactors: protocol.CommandTypes.GetApplicableRefactors;
+ const GetRefactorCodeActions: protocol.CommandTypes.GetRefactorCodeActions;
+ const GetEditsForRefactor: protocol.CommandTypes.GetEditsForRefactor;
}
function formatMessage<T extends protocol.Message>(msg: T, logger: server.Logger, byteLength: (s: string, encoding: string) => number, newLine: string): string;
interface SessionOptions {
@@ -4467,6 +4810,7 @@ declare namespace ts.server {
throttleWaitMilliseconds?: number;
globalPlugins?: string[];
pluginProbeLocations?: string[];
+ allowLocalPluginLoads?: boolean;
}
class Session implements EventSender {
private readonly gcTimer;
@@ -4483,13 +4827,12 @@ declare namespace ts.server {
protected logger: Logger;
private canUseEvents;
constructor(opts: SessionOptions);
- constructor(host: ServerHost, cancellationToken: ServerCancellationToken, useSingleInferredProject: boolean, typingsInstaller: ITypingsInstaller, byteLength: (buf: string, encoding?: string) => number, hrtime: (start?: number[]) => number[], logger: server.Logger, canUseEvents: boolean, eventHandler?: ProjectServiceEventHandler, throttleWaitMilliseconds?: number);
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;
+ event<T>(info: T, eventName: string): void;
output(info: any, cmdName: string, reqSeq?: number, errorMsg?: string): void;
private semanticCheck(file, project);
private syntacticCheck(file, project);
@@ -4552,8 +4895,14 @@ declare namespace ts.server {
private getNavigationTree(args, simplifiedResult);
private getNavigateToItems(args, simplifiedResult);
private getSupportedCodeFixes();
+ private isLocation(locationOrSpan);
+ private extractPositionAndRange(args, scriptInfo);
+ private getApplicableRefactors(args);
+ private getEditsForRefactor(args, simplifiedResult);
private getCodeFixes(args, simplifiedResult);
+ private getStartAndEndPosition(args, scriptInfo);
private mapCodeAction(codeAction, scriptInfo);
+ private mapTextChangesToCodeEdits(project, textChanges);
private convertTextChangeToCodeEdit(change, scriptInfo);
private getBraceMatching(args, simplifiedResult);
private getDiagnosticsForProject(next, delay, fileName);
@@ -4744,17 +5093,18 @@ declare namespace ts.server {
declare namespace ts.server {
class LSHost implements ts.LanguageServiceHost, ModuleResolutionHost {
private readonly host;
- private readonly project;
+ private project;
private readonly cancellationToken;
private compilationSettings;
private readonly resolvedModuleNames;
private readonly resolvedTypeReferenceDirectives;
private readonly getCanonicalFileName;
private filesWithChangedSetOfUnresolvedImports;
- private readonly resolveModuleName;
+ private resolveModuleName;
readonly trace: (s: string) => void;
readonly realpath?: (path: string) => string;
constructor(host: ServerHost, project: Project, cancellationToken: HostCancellationToken);
+ dispose(): void;
startRecordingFilesWithChangedResolutions(): void;
finishRecordingFilesWithChangedResolutions(): Path[];
private resolveNamesWithLocalCache<T, R>(names, containingFile, cache, loader, getResult, getResultFileName, logChanges);
@@ -4865,11 +5215,12 @@ declare namespace ts.server {
private rootFiles;
private rootFilesMap;
private program;
+ private externalFiles;
private cachedUnresolvedImportsPerFile;
private lastCachedUnresolvedImportsList;
protected languageService: LanguageService;
languageServiceEnabled: boolean;
- protected readonly lsHost: LSHost;
+ protected lsHost: LSHost;
builder: Builder;
private updatedFileNames;
private lastReportedFileNames;
@@ -4894,7 +5245,7 @@ declare namespace ts.server {
getProjectName(): string;
abstract getProjectRootPath(): string | undefined;
abstract getTypeAcquisition(): TypeAcquisition;
- getExternalFiles(): string[];
+ getExternalFiles(): SortedReadonlyArray<string>;
getSourceFile(path: Path): SourceFile;
updateTypes(): void;
close(): void;
@@ -4960,7 +5311,7 @@ declare namespace ts.server {
setProjectErrors(projectErrors: Diagnostic[]): void;
setTypeAcquisition(newTypeAcquisition: TypeAcquisition): void;
getTypeAcquisition(): TypeAcquisition;
- getExternalFiles(): string[];
+ getExternalFiles(): SortedReadonlyArray<string>;
watchConfigFile(callback: (project: ConfiguredProject) => void): void;
watchTypeRoots(callback: (project: ConfiguredProject, path: string) => void): void;
watchConfigDirectory(callback: (project: ConfiguredProject, path: string) => void): void;
@@ -4988,6 +5339,7 @@ declare namespace ts.server {
const ContextEvent = "context";
const ConfigFileDiagEvent = "configFileDiag";
const ProjectLanguageServiceStateEvent = "projectLanguageServiceState";
+ const ProjectInfoTelemetryEvent = "projectInfo";
interface ContextEvent {
eventName: typeof ContextEvent;
data: {
@@ -5010,7 +5362,38 @@ declare namespace ts.server {
languageServiceEnabled: boolean;
};
}
- type ProjectServiceEvent = ContextEvent | ConfigFileDiagEvent | ProjectLanguageServiceStateEvent;
+ interface ProjectInfoTelemetryEvent {
+ readonly eventName: typeof ProjectInfoTelemetryEvent;
+ readonly data: ProjectInfoTelemetryEventData;
+ }
+ interface ProjectInfoTelemetryEventData {
+ readonly projectId: string;
+ readonly fileStats: FileStats;
+ readonly compilerOptions: ts.CompilerOptions;
+ readonly extends: boolean | undefined;
+ readonly files: boolean | undefined;
+ readonly include: boolean | undefined;
+ readonly exclude: boolean | undefined;
+ readonly compileOnSave: boolean;
+ readonly typeAcquisition: ProjectInfoTypeAcquisitionData;
+ readonly configFileName: "tsconfig.json" | "jsconfig.json" | "other";
+ readonly projectType: "external" | "configured";
+ readonly languageServiceEnabled: boolean;
+ readonly version: string;
+ }
+ interface ProjectInfoTypeAcquisitionData {
+ readonly enable: boolean;
+ readonly include: boolean;
+ readonly exclude: boolean;
+ }
+ interface FileStats {
+ readonly js: number;
+ readonly jsx: number;
+ readonly ts: number;
+ readonly tsx: number;
+ readonly dts: number;
+ }
+ type ProjectServiceEvent = ContextEvent | ConfigFileDiagEvent | ProjectLanguageServiceStateEvent | ProjectInfoTelemetryEvent;
interface ProjectServiceEventHandler {
(event: ProjectServiceEvent): void;
}
@@ -5045,6 +5428,7 @@ declare namespace ts.server {
throttleWaitMilliseconds?: number;
globalPlugins?: string[];
pluginProbeLocations?: string[];
+ allowLocalPluginLoads?: boolean;
}
class ProjectService {
readonly typingsCache: TypingsCache;
@@ -5074,6 +5458,8 @@ declare namespace ts.server {
private readonly eventHandler?;
readonly globalPlugins: ReadonlyArray<string>;
readonly pluginProbeLocations: ReadonlyArray<string>;
+ readonly allowLocalPluginLoads: boolean;
+ private readonly seenProjects;
constructor(opts: ProjectServiceOptions);
ensureInferredProjectsUpToDate_TestOnly(): void;
getCompilerOptionsForInferredProjects(): CompilerOptions;
@@ -5098,6 +5484,7 @@ declare namespace ts.server {
private removeProject(project);
private assignScriptInfoToInferredProjectIfNecessary(info, addToListOfOpenFiles);
private closeOpenFile(info);
+ private deleteOrphanScriptInfoNotInAnyProject();
private openOrUpdateConfiguredProjectForFile(fileName, projectRootPath?);
private findConfigFile(searchPath, projectRootPath?);
private printProjects();
@@ -5106,6 +5493,7 @@ declare namespace ts.server {
private convertConfigFileContentToProjectOptions(configFilename);
private exceededTotalSizeLimitForNonTsFiles<T>(name, options, fileNames, propertyReader);
private createAndAddExternalProject(projectFileName, files, options, typeAcquisition);
+ private sendProjectTelemetry(projectKey, project, projectOptions?);
private reportConfigFileDiagnostics(configFileName, diagnostics, triggerFile);
private createAndAddConfiguredProject(configFileName, projectOptions, configFileErrors, clientFileName?);
private watchConfigDirectoryForProject(project, options);
@@ -5116,6 +5504,7 @@ declare namespace ts.server {
createInferredProjectWithRootFileIfNecessary(root: ScriptInfo): InferredProject;
getOrCreateScriptInfo(uncheckedFileName: string, openedByClient: boolean, fileContent?: string, scriptKind?: ScriptKind): ScriptInfo;
getScriptInfo(uncheckedFileName: string): ScriptInfo;
+ watchClosedScriptInfo(info: ScriptInfo): void;
getOrCreateScriptInfoForNormalizedPath(fileName: NormalizedPath, openedByClient: boolean, fileContent?: string, scriptKind?: ScriptKind, hasMixedContent?: boolean): ScriptInfo;
getScriptInfoForNormalizedPath(fileName: NormalizedPath): ScriptInfo;
getScriptInfoForPath(fileName: Path): ScriptInfo;
@@ -5138,6 +5527,6 @@ declare namespace ts.server {
openExternalProject(proj: protocol.ExternalProject, suppressRefreshOfInferredProjects?: boolean): void;
}
}
-
-export = ts;
+
+export = ts;
export as namespace ts; \ No newline at end of file
diff --git a/node_modules/typedoc/node_modules/typescript/lib/tsserverlibrary.js b/node_modules/typedoc/node_modules/typescript/lib/tsserverlibrary.js
index 0a520ebb6..df9ef1658 100644
--- a/node_modules/typedoc/node_modules/typescript/lib/tsserverlibrary.js
+++ b/node_modules/typedoc/node_modules/typescript/lib/tsserverlibrary.js
@@ -1,18 +1,18 @@
-/*! *****************************************************************************
-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.
+***************************************************************************** */
+
var __assign = (this && this.__assign) || Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
@@ -321,20 +321,22 @@ var ts;
SyntaxKind[SyntaxKind["JSDocComment"] = 283] = "JSDocComment";
SyntaxKind[SyntaxKind["JSDocTag"] = 284] = "JSDocTag";
SyntaxKind[SyntaxKind["JSDocAugmentsTag"] = 285] = "JSDocAugmentsTag";
- SyntaxKind[SyntaxKind["JSDocParameterTag"] = 286] = "JSDocParameterTag";
- SyntaxKind[SyntaxKind["JSDocReturnTag"] = 287] = "JSDocReturnTag";
- SyntaxKind[SyntaxKind["JSDocTypeTag"] = 288] = "JSDocTypeTag";
- SyntaxKind[SyntaxKind["JSDocTemplateTag"] = 289] = "JSDocTemplateTag";
- SyntaxKind[SyntaxKind["JSDocTypedefTag"] = 290] = "JSDocTypedefTag";
- SyntaxKind[SyntaxKind["JSDocPropertyTag"] = 291] = "JSDocPropertyTag";
- SyntaxKind[SyntaxKind["JSDocTypeLiteral"] = 292] = "JSDocTypeLiteral";
- SyntaxKind[SyntaxKind["JSDocLiteralType"] = 293] = "JSDocLiteralType";
- SyntaxKind[SyntaxKind["SyntaxList"] = 294] = "SyntaxList";
- SyntaxKind[SyntaxKind["NotEmittedStatement"] = 295] = "NotEmittedStatement";
- SyntaxKind[SyntaxKind["PartiallyEmittedExpression"] = 296] = "PartiallyEmittedExpression";
- SyntaxKind[SyntaxKind["MergeDeclarationMarker"] = 297] = "MergeDeclarationMarker";
- SyntaxKind[SyntaxKind["EndOfDeclarationMarker"] = 298] = "EndOfDeclarationMarker";
- SyntaxKind[SyntaxKind["Count"] = 299] = "Count";
+ SyntaxKind[SyntaxKind["JSDocClassTag"] = 286] = "JSDocClassTag";
+ SyntaxKind[SyntaxKind["JSDocParameterTag"] = 287] = "JSDocParameterTag";
+ SyntaxKind[SyntaxKind["JSDocReturnTag"] = 288] = "JSDocReturnTag";
+ SyntaxKind[SyntaxKind["JSDocTypeTag"] = 289] = "JSDocTypeTag";
+ SyntaxKind[SyntaxKind["JSDocTemplateTag"] = 290] = "JSDocTemplateTag";
+ SyntaxKind[SyntaxKind["JSDocTypedefTag"] = 291] = "JSDocTypedefTag";
+ SyntaxKind[SyntaxKind["JSDocPropertyTag"] = 292] = "JSDocPropertyTag";
+ SyntaxKind[SyntaxKind["JSDocTypeLiteral"] = 293] = "JSDocTypeLiteral";
+ SyntaxKind[SyntaxKind["JSDocLiteralType"] = 294] = "JSDocLiteralType";
+ SyntaxKind[SyntaxKind["SyntaxList"] = 295] = "SyntaxList";
+ SyntaxKind[SyntaxKind["NotEmittedStatement"] = 296] = "NotEmittedStatement";
+ SyntaxKind[SyntaxKind["PartiallyEmittedExpression"] = 297] = "PartiallyEmittedExpression";
+ SyntaxKind[SyntaxKind["CommaListExpression"] = 298] = "CommaListExpression";
+ SyntaxKind[SyntaxKind["MergeDeclarationMarker"] = 299] = "MergeDeclarationMarker";
+ SyntaxKind[SyntaxKind["EndOfDeclarationMarker"] = 300] = "EndOfDeclarationMarker";
+ SyntaxKind[SyntaxKind["Count"] = 301] = "Count";
SyntaxKind[SyntaxKind["FirstAssignment"] = 58] = "FirstAssignment";
SyntaxKind[SyntaxKind["LastAssignment"] = 70] = "LastAssignment";
SyntaxKind[SyntaxKind["FirstCompoundAssignment"] = 59] = "FirstCompoundAssignment";
@@ -361,9 +363,9 @@ var ts;
SyntaxKind[SyntaxKind["LastBinaryOperator"] = 70] = "LastBinaryOperator";
SyntaxKind[SyntaxKind["FirstNode"] = 143] = "FirstNode";
SyntaxKind[SyntaxKind["FirstJSDocNode"] = 267] = "FirstJSDocNode";
- SyntaxKind[SyntaxKind["LastJSDocNode"] = 293] = "LastJSDocNode";
- SyntaxKind[SyntaxKind["FirstJSDocTagNode"] = 283] = "FirstJSDocTagNode";
- SyntaxKind[SyntaxKind["LastJSDocTagNode"] = 293] = "LastJSDocTagNode";
+ SyntaxKind[SyntaxKind["LastJSDocNode"] = 294] = "LastJSDocNode";
+ SyntaxKind[SyntaxKind["FirstJSDocTagNode"] = 284] = "FirstJSDocTagNode";
+ SyntaxKind[SyntaxKind["LastJSDocTagNode"] = 294] = "LastJSDocTagNode";
})(SyntaxKind = ts.SyntaxKind || (ts.SyntaxKind = {}));
var NodeFlags;
(function (NodeFlags) {
@@ -387,6 +389,7 @@ var ts;
NodeFlags[NodeFlags["JavaScriptFile"] = 65536] = "JavaScriptFile";
NodeFlags[NodeFlags["ThisNodeOrAnySubNodesHasError"] = 131072] = "ThisNodeOrAnySubNodesHasError";
NodeFlags[NodeFlags["HasAggregatedChildData"] = 262144] = "HasAggregatedChildData";
+ NodeFlags[NodeFlags["PossiblyContainsDynamicImport"] = 524288] = "PossiblyContainsDynamicImport";
NodeFlags[NodeFlags["BlockScoped"] = 3] = "BlockScoped";
NodeFlags[NodeFlags["ReachabilityCheckFlags"] = 384] = "ReachabilityCheckFlags";
NodeFlags[NodeFlags["ReachabilityAndEmitFlags"] = 1408] = "ReachabilityAndEmitFlags";
@@ -469,6 +472,12 @@ var ts;
return OperationCanceledException;
}());
ts.OperationCanceledException = OperationCanceledException;
+ var StructureIsReused;
+ (function (StructureIsReused) {
+ StructureIsReused[StructureIsReused["Not"] = 0] = "Not";
+ StructureIsReused[StructureIsReused["SafeModules"] = 1] = "SafeModules";
+ StructureIsReused[StructureIsReused["Completely"] = 2] = "Completely";
+ })(StructureIsReused = ts.StructureIsReused || (ts.StructureIsReused = {}));
var ExitStatus;
(function (ExitStatus) {
ExitStatus[ExitStatus["Success"] = 0] = "Success";
@@ -478,29 +487,38 @@ var ts;
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[NodeBuilderFlags["NoTruncation"] = 1] = "NoTruncation";
+ NodeBuilderFlags[NodeBuilderFlags["WriteArrayAsGenericType"] = 2] = "WriteArrayAsGenericType";
+ NodeBuilderFlags[NodeBuilderFlags["WriteTypeArgumentsOfSignature"] = 32] = "WriteTypeArgumentsOfSignature";
+ NodeBuilderFlags[NodeBuilderFlags["UseFullyQualifiedType"] = 64] = "UseFullyQualifiedType";
+ NodeBuilderFlags[NodeBuilderFlags["SuppressAnyReturnType"] = 256] = "SuppressAnyReturnType";
+ NodeBuilderFlags[NodeBuilderFlags["WriteTypeParametersInQualifiedName"] = 512] = "WriteTypeParametersInQualifiedName";
+ NodeBuilderFlags[NodeBuilderFlags["AllowThisInObjectLiteral"] = 1024] = "AllowThisInObjectLiteral";
+ NodeBuilderFlags[NodeBuilderFlags["AllowQualifedNameInPlaceOfIdentifier"] = 2048] = "AllowQualifedNameInPlaceOfIdentifier";
+ NodeBuilderFlags[NodeBuilderFlags["AllowAnonymousIdentifier"] = 8192] = "AllowAnonymousIdentifier";
+ NodeBuilderFlags[NodeBuilderFlags["AllowEmptyUnionOrIntersection"] = 16384] = "AllowEmptyUnionOrIntersection";
+ NodeBuilderFlags[NodeBuilderFlags["AllowEmptyTuple"] = 32768] = "AllowEmptyTuple";
+ NodeBuilderFlags[NodeBuilderFlags["IgnoreErrors"] = 60416] = "IgnoreErrors";
+ NodeBuilderFlags[NodeBuilderFlags["InObjectTypeLiteral"] = 1048576] = "InObjectTypeLiteral";
+ NodeBuilderFlags[NodeBuilderFlags["InTypeAlias"] = 8388608] = "InTypeAlias";
})(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[TypeFormatFlags["UseTypeOfFunction"] = 4] = "UseTypeOfFunction";
+ TypeFormatFlags[TypeFormatFlags["NoTruncation"] = 8] = "NoTruncation";
+ TypeFormatFlags[TypeFormatFlags["WriteArrowStyleSignature"] = 16] = "WriteArrowStyleSignature";
+ TypeFormatFlags[TypeFormatFlags["WriteOwnNameForAnyLike"] = 32] = "WriteOwnNameForAnyLike";
+ TypeFormatFlags[TypeFormatFlags["WriteTypeArgumentsOfSignature"] = 64] = "WriteTypeArgumentsOfSignature";
+ TypeFormatFlags[TypeFormatFlags["InElementType"] = 128] = "InElementType";
+ TypeFormatFlags[TypeFormatFlags["UseFullyQualifiedType"] = 256] = "UseFullyQualifiedType";
+ TypeFormatFlags[TypeFormatFlags["InFirstTypeArgument"] = 512] = "InFirstTypeArgument";
+ TypeFormatFlags[TypeFormatFlags["InTypeAlias"] = 1024] = "InTypeAlias";
+ TypeFormatFlags[TypeFormatFlags["UseTypeAliasValue"] = 2048] = "UseTypeAliasValue";
+ TypeFormatFlags[TypeFormatFlags["SuppressAnyReturnType"] = 4096] = "SuppressAnyReturnType";
+ TypeFormatFlags[TypeFormatFlags["AddUndefined"] = 8192] = "AddUndefined";
+ TypeFormatFlags[TypeFormatFlags["WriteClassExpressionAsTypeLiteral"] = 16384] = "WriteClassExpressionAsTypeLiteral";
})(TypeFormatFlags = ts.TypeFormatFlags || (ts.TypeFormatFlags = {}));
var SymbolFormatFlags;
(function (SymbolFormatFlags) {
@@ -604,6 +622,11 @@ var ts;
SymbolFlags[SymbolFlags["ClassMember"] = 106500] = "ClassMember";
SymbolFlags[SymbolFlags["Classifiable"] = 788448] = "Classifiable";
})(SymbolFlags = ts.SymbolFlags || (ts.SymbolFlags = {}));
+ var EnumKind;
+ (function (EnumKind) {
+ EnumKind[EnumKind["Numeric"] = 0] = "Numeric";
+ EnumKind[EnumKind["Literal"] = 1] = "Literal";
+ })(EnumKind = ts.EnumKind || (ts.EnumKind = {}));
var CheckFlags;
(function (CheckFlags) {
CheckFlags[CheckFlags["Instantiated"] = 1] = "Instantiated";
@@ -671,21 +694,21 @@ var ts;
TypeFlags[TypeFlags["NonPrimitive"] = 16777216] = "NonPrimitive";
TypeFlags[TypeFlags["JsxAttributes"] = 33554432] = "JsxAttributes";
TypeFlags[TypeFlags["Nullable"] = 6144] = "Nullable";
- TypeFlags[TypeFlags["Literal"] = 480] = "Literal";
+ TypeFlags[TypeFlags["Literal"] = 224] = "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["NumberLike"] = 84] = "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["Narrowable"] = 17810175] = "Narrowable";
TypeFlags[TypeFlags["NotUnionOrUnit"] = 16810497] = "NotUnionOrUnit";
TypeFlags[TypeFlags["RequiresWidening"] = 6291456] = "RequiresWidening";
TypeFlags[TypeFlags["PropagatingFlags"] = 14680064] = "PropagatingFlags";
@@ -714,6 +737,18 @@ var ts;
IndexKind[IndexKind["String"] = 0] = "String";
IndexKind[IndexKind["Number"] = 1] = "Number";
})(IndexKind = ts.IndexKind || (ts.IndexKind = {}));
+ var InferencePriority;
+ (function (InferencePriority) {
+ InferencePriority[InferencePriority["NakedTypeVariable"] = 1] = "NakedTypeVariable";
+ InferencePriority[InferencePriority["MappedType"] = 2] = "MappedType";
+ InferencePriority[InferencePriority["ReturnType"] = 4] = "ReturnType";
+ })(InferencePriority = ts.InferencePriority || (ts.InferencePriority = {}));
+ var InferenceFlags;
+ (function (InferenceFlags) {
+ InferenceFlags[InferenceFlags["InferUnionTypes"] = 1] = "InferUnionTypes";
+ InferenceFlags[InferenceFlags["NoDefault"] = 2] = "NoDefault";
+ InferenceFlags[InferenceFlags["AnyDefault"] = 4] = "AnyDefault";
+ })(InferenceFlags = ts.InferenceFlags || (ts.InferenceFlags = {}));
var SpecialPropertyAssignmentKind;
(function (SpecialPropertyAssignmentKind) {
SpecialPropertyAssignmentKind[SpecialPropertyAssignmentKind["None"] = 0] = "None";
@@ -742,6 +777,7 @@ var ts;
ModuleKind[ModuleKind["UMD"] = 3] = "UMD";
ModuleKind[ModuleKind["System"] = 4] = "System";
ModuleKind[ModuleKind["ES2015"] = 5] = "ES2015";
+ ModuleKind[ModuleKind["ESNext"] = 6] = "ESNext";
})(ModuleKind = ts.ModuleKind || (ts.ModuleKind = {}));
var JsxEmit;
(function (JsxEmit) {
@@ -956,6 +992,7 @@ var ts;
TransformFlags[TransformFlags["ContainsBindingPattern"] = 8388608] = "ContainsBindingPattern";
TransformFlags[TransformFlags["ContainsYield"] = 16777216] = "ContainsYield";
TransformFlags[TransformFlags["ContainsHoistedDeclarationOrCompletion"] = 33554432] = "ContainsHoistedDeclarationOrCompletion";
+ TransformFlags[TransformFlags["ContainsDynamicImport"] = 67108864] = "ContainsDynamicImport";
TransformFlags[TransformFlags["HasComputedFlags"] = 536870912] = "HasComputedFlags";
TransformFlags[TransformFlags["AssertTypeScript"] = 3] = "AssertTypeScript";
TransformFlags[TransformFlags["AssertJsx"] = 4] = "AssertJsx";
@@ -1002,14 +1039,16 @@ var ts;
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[EmitFlags["InternalName"] = 32768] = "InternalName";
+ EmitFlags[EmitFlags["Indented"] = 65536] = "Indented";
+ EmitFlags[EmitFlags["NoIndentation"] = 131072] = "NoIndentation";
+ EmitFlags[EmitFlags["AsyncFunctionBody"] = 262144] = "AsyncFunctionBody";
+ EmitFlags[EmitFlags["ReuseTempVariableScope"] = 524288] = "ReuseTempVariableScope";
+ EmitFlags[EmitFlags["CustomPrologue"] = 1048576] = "CustomPrologue";
+ EmitFlags[EmitFlags["NoHoisting"] = 2097152] = "NoHoisting";
+ EmitFlags[EmitFlags["HasEndOfDeclarationMarker"] = 4194304] = "HasEndOfDeclarationMarker";
+ EmitFlags[EmitFlags["Iterator"] = 8388608] = "Iterator";
+ EmitFlags[EmitFlags["NoAsciiEscaping"] = 16777216] = "NoAsciiEscaping";
})(EmitFlags = ts.EmitFlags || (ts.EmitFlags = {}));
var ExternalEmitHelpers;
(function (ExternalEmitHelpers) {
@@ -1024,14 +1063,18 @@ var ts;
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["Await"] = 2048] = "Await";
+ ExternalEmitHelpers[ExternalEmitHelpers["AsyncGenerator"] = 4096] = "AsyncGenerator";
+ ExternalEmitHelpers[ExternalEmitHelpers["AsyncDelegator"] = 8192] = "AsyncDelegator";
+ ExternalEmitHelpers[ExternalEmitHelpers["AsyncValues"] = 16384] = "AsyncValues";
+ ExternalEmitHelpers[ExternalEmitHelpers["ExportStar"] = 32768] = "ExportStar";
ExternalEmitHelpers[ExternalEmitHelpers["ForOfIncludes"] = 256] = "ForOfIncludes";
- ExternalEmitHelpers[ExternalEmitHelpers["ForAwaitOfIncludes"] = 8192] = "ForAwaitOfIncludes";
+ ExternalEmitHelpers[ExternalEmitHelpers["ForAwaitOfIncludes"] = 16384] = "ForAwaitOfIncludes";
+ ExternalEmitHelpers[ExternalEmitHelpers["AsyncGeneratorIncludes"] = 6144] = "AsyncGeneratorIncludes";
+ ExternalEmitHelpers[ExternalEmitHelpers["AsyncDelegatorIncludes"] = 26624] = "AsyncDelegatorIncludes";
ExternalEmitHelpers[ExternalEmitHelpers["SpreadIncludes"] = 1536] = "SpreadIncludes";
ExternalEmitHelpers[ExternalEmitHelpers["FirstEmitHelper"] = 1] = "FirstEmitHelper";
- ExternalEmitHelpers[ExternalEmitHelpers["LastEmitHelper"] = 8192] = "LastEmitHelper";
+ ExternalEmitHelpers[ExternalEmitHelpers["LastEmitHelper"] = 32768] = "LastEmitHelper";
})(ExternalEmitHelpers = ts.ExternalEmitHelpers || (ts.ExternalEmitHelpers = {}));
var EmitHint;
(function (EmitHint) {
@@ -1102,7 +1145,7 @@ var ts;
})(ts || (ts = {}));
var ts;
(function (ts) {
- ts.version = "2.3.2";
+ ts.version = "2.4.1";
})(ts || (ts = {}));
(function (ts) {
var Ternary;
@@ -1125,10 +1168,11 @@ var ts;
ts.createMap = createMap;
function createMapFromTemplate(template) {
var map = new MapCtr();
- for (var key in template)
+ for (var key in template) {
if (hasOwnProperty.call(template, key)) {
map.set(key, template[key]);
}
+ }
return map;
}
ts.createMapFromTemplate = createMapFromTemplate;
@@ -1287,6 +1331,15 @@ var ts;
}
}
ts.zipWith = zipWith;
+ function zipToMap(keys, values) {
+ Debug.assert(keys.length === values.length);
+ var map = createMap();
+ for (var i = 0; i < keys.length; ++i) {
+ map.set(keys[i], values[i]);
+ }
+ return map;
+ }
+ ts.zipToMap = zipToMap;
function every(array, callback) {
if (array) {
for (var i = 0; i < array.length; i++) {
@@ -1491,6 +1544,40 @@ var ts;
return result;
}
ts.flatMap = flatMap;
+ function sameFlatMap(array, mapfn) {
+ var result;
+ if (array) {
+ for (var i = 0; i < array.length; i++) {
+ var item = array[i];
+ var mapped = mapfn(item, i);
+ if (result || item !== mapped || isArray(mapped)) {
+ if (!result) {
+ result = array.slice(0, i);
+ }
+ if (isArray(mapped)) {
+ addRange(result, mapped);
+ }
+ else {
+ result.push(mapped);
+ }
+ }
+ }
+ }
+ return result || array;
+ }
+ ts.sameFlatMap = sameFlatMap;
+ function mapDefined(array, mapFn) {
+ var result = [];
+ for (var i = 0; i < array.length; i++) {
+ var item = array[i];
+ var mapped = mapFn(item, i);
+ if (mapped !== undefined) {
+ result.push(mapped);
+ }
+ }
+ return result;
+ }
+ ts.mapDefined = mapDefined;
function span(array, f) {
if (array) {
for (var i = 0; i < array.length; i++) {
@@ -1684,12 +1771,21 @@ var ts;
return to;
}
ts.append = append;
- function addRange(to, from) {
+ function toOffset(array, offset) {
+ return offset < 0 ? array.length + offset : offset;
+ }
+ function addRange(to, from, start, end) {
if (from === undefined)
return to;
- for (var _i = 0, from_1 = from; _i < from_1.length; _i++) {
- var v = from_1[_i];
- to = append(to, v);
+ if (to === undefined)
+ return from.slice(start, end);
+ start = start === undefined ? 0 : toOffset(from, start);
+ end = end === undefined ? from.length : toOffset(from, end);
+ for (var i = start; i < end && i < from.length; i++) {
+ var v = from[i];
+ if (v !== undefined) {
+ to.push(from[i]);
+ }
}
return to;
}
@@ -1712,16 +1808,22 @@ var ts;
return true;
}
ts.rangeEquals = rangeEquals;
+ function elementAt(array, offset) {
+ if (array) {
+ offset = toOffset(array, offset);
+ if (offset < array.length) {
+ return array[offset];
+ }
+ }
+ return undefined;
+ }
+ ts.elementAt = elementAt;
function firstOrUndefined(array) {
- return array && array.length > 0
- ? array[0]
- : undefined;
+ return elementAt(array, 0);
}
ts.firstOrUndefined = firstOrUndefined;
function lastOrUndefined(array) {
- return array && array.length > 0
- ? array[array.length - 1]
- : undefined;
+ return elementAt(array, -1);
}
ts.lastOrUndefined = lastOrUndefined;
function singleOrUndefined(array) {
@@ -1826,10 +1928,11 @@ var ts;
ts.getProperty = getProperty;
function getOwnKeys(map) {
var keys = [];
- for (var key in map)
+ for (var key in map) {
if (hasOwnProperty.call(map, key)) {
keys.push(key);
}
+ }
return keys;
}
ts.getOwnKeys = getOwnKeys;
@@ -1889,10 +1992,11 @@ var ts;
}
for (var _a = 0, args_1 = args; _a < args_1.length; _a++) {
var arg = args_1[_a];
- for (var p in arg)
+ for (var p in arg) {
if (hasProperty(arg, p)) {
t[p] = arg[p];
}
+ }
}
return t;
}
@@ -1902,18 +2006,20 @@ var ts;
return true;
if (!left || !right)
return false;
- for (var key in left)
+ for (var key in left) {
if (hasOwnProperty.call(left, key)) {
if (!hasOwnProperty.call(right, key) === undefined)
return false;
if (equalityComparer ? !equalityComparer(left[key], right[key]) : left[key] !== right[key])
return false;
}
- for (var key in right)
+ }
+ for (var key in right) {
if (hasOwnProperty.call(right, key)) {
if (!hasOwnProperty.call(left, key))
return false;
}
+ }
return true;
}
ts.equalOwnProperties = equalOwnProperties;
@@ -1944,14 +2050,16 @@ var ts;
ts.clone = clone;
function extend(first, second) {
var result = {};
- for (var id in second)
+ for (var id in second) {
if (hasOwnProperty.call(second, id)) {
result[id] = second[id];
}
- for (var id in first)
+ }
+ for (var id in first) {
if (hasOwnProperty.call(first, id)) {
result[id] = first[id];
}
+ }
return result;
}
ts.extend = extend;
@@ -1985,6 +2093,16 @@ var ts;
return Array.isArray ? Array.isArray(value) : value instanceof Array;
}
ts.isArray = isArray;
+ function tryCast(value, test) {
+ return value !== undefined && test(value) ? value : undefined;
+ }
+ ts.tryCast = tryCast;
+ function cast(value, test) {
+ if (value !== undefined && test(value))
+ return value;
+ Debug.fail("Invalid cast. The supplied value did not pass the test '" + Debug.getFunctionName(test) + "'.");
+ }
+ ts.cast = cast;
function noop() { }
ts.noop = noop;
function notImplemented() {
@@ -2515,6 +2633,10 @@ var ts;
return str.lastIndexOf(prefix, 0) === 0;
}
ts.startsWith = startsWith;
+ function removePrefix(str, prefix) {
+ return startsWith(str, prefix) ? str.substr(prefix.length) : str;
+ }
+ ts.removePrefix = removePrefix;
function endsWith(str, suffix) {
var expectedPos = str.length - suffix.length;
return expectedPos >= 0 && str.indexOf(suffix, expectedPos) === expectedPos;
@@ -2528,7 +2650,7 @@ var ts;
return path.length > extension.length && endsWith(path, extension);
}
ts.fileExtensionIs = fileExtensionIs;
- function fileExtensionIsAny(path, extensions) {
+ function fileExtensionIsOneOf(path, extensions) {
for (var _i = 0, extensions_1 = extensions; _i < extensions_1.length; _i++) {
var extension = extensions_1[_i];
if (fileExtensionIs(path, extension)) {
@@ -2537,7 +2659,7 @@ var ts;
}
return false;
}
- ts.fileExtensionIsAny = fileExtensionIsAny;
+ ts.fileExtensionIsOneOf = fileExtensionIsOneOf;
var reservedCharacterPattern = /[^\w\s\/]/g;
var wildcardCharCodes = [42, 63];
var singleAsteriskRegexFragmentFiles = "([^./]|(\\.(?!min\\.js$))?)*";
@@ -2662,7 +2784,7 @@ var ts;
var _loop_1 = function (current) {
var name = combinePaths(path, current);
var absoluteName = combinePaths(absolutePath, current);
- if (extensions && !fileExtensionIsAny(name, extensions))
+ if (extensions && !fileExtensionIsOneOf(name, extensions))
return "continue";
if (excludeRegex && excludeRegex.test(absoluteName))
return "continue";
@@ -2849,8 +2971,11 @@ var ts;
this.name = name;
this.declarations = undefined;
}
- function Type(_checker, flags) {
+ function Type(checker, flags) {
this.flags = flags;
+ if (Debug.isDebugging) {
+ this.checker = checker;
+ }
}
function Signature() {
}
@@ -2865,6 +2990,11 @@ var ts;
this.parent = undefined;
this.original = undefined;
}
+ function SourceMapSource(fileName, text, skipTrivia) {
+ this.fileName = fileName;
+ this.text = text;
+ this.skipTrivia = skipTrivia || (function (pos) { return pos; });
+ }
ts.objectAllocator = {
getNodeConstructor: function () { return Node; },
getTokenConstructor: function () { return Node; },
@@ -2872,7 +3002,8 @@ var ts;
getSourceFileConstructor: function () { return Node; },
getSymbolConstructor: function () { return Symbol; },
getTypeConstructor: function () { return Type; },
- getSignatureConstructor: function () { return Signature; }
+ getSignatureConstructor: function () { return Signature; },
+ getSourceMapSourceConstructor: function () { return SourceMapSource; },
};
var AssertionLevel;
(function (AssertionLevel) {
@@ -2884,25 +3015,43 @@ var ts;
var Debug;
(function (Debug) {
Debug.currentAssertionLevel = 0;
+ Debug.isDebugging = false;
function shouldAssert(level) {
return Debug.currentAssertionLevel >= level;
}
Debug.shouldAssert = shouldAssert;
- function assert(expression, message, verboseDebugInfo) {
+ function assert(expression, message, verboseDebugInfo, stackCrawlMark) {
if (!expression) {
- var verboseDebugString = "";
if (verboseDebugInfo) {
- verboseDebugString = "\r\nVerbose Debug Information: " + verboseDebugInfo();
+ message += "\r\nVerbose Debug Information: " + verboseDebugInfo();
}
- debugger;
- throw new Error("Debug Failure. False expression: " + (message || "") + verboseDebugString);
+ fail(message ? "False expression: " + message : "False expression.", stackCrawlMark || assert);
}
}
Debug.assert = assert;
- function fail(message) {
- Debug.assert(false, message);
+ function fail(message, stackCrawlMark) {
+ debugger;
+ var e = new Error(message ? "Debug Failure. " : "Debug Failure.");
+ if (Error.captureStackTrace) {
+ Error.captureStackTrace(e, stackCrawlMark || fail);
+ }
+ throw e;
}
Debug.fail = fail;
+ function getFunctionName(func) {
+ if (typeof func !== "function") {
+ return "";
+ }
+ else if (func.hasOwnProperty("name")) {
+ return func.name;
+ }
+ else {
+ var text = Function.prototype.toString.call(func);
+ var match = /^function\s+([\w\$]+)\s*\(/.exec(text);
+ return match ? match[1] : "";
+ }
+ }
+ Debug.getFunctionName = getFunctionName;
})(Debug = ts.Debug || (ts.Debug = {}));
function orderedRemoveItem(array, item) {
for (var i = 0; i < array.length; i++) {
@@ -3329,6 +3478,7 @@ var ts;
realpath: function (path) {
return _fs.realpathSync(path);
},
+ debugMode: ts.some(process.execArgv, function (arg) { return /^--(inspect|debug)(-brk)?(=\d+)?$/i.test(arg); }),
tryEnableSourceMapsForHost: function () {
try {
require("source-map-support").install();
@@ -3407,6 +3557,9 @@ var ts;
? 1
: 0;
}
+ if (ts.sys && ts.sys.debugMode) {
+ ts.Debug.isDebugging = true;
+ }
})(ts || (ts = {}));
var ts;
(function (ts) {
@@ -3570,6 +3723,7 @@ var ts;
Line_terminator_not_permitted_before_arrow: { code: 1200, category: ts.DiagnosticCategory.Error, key: "Line_terminator_not_permitted_before_arrow_1200", message: "Line terminator not permitted before arrow." },
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: 1202, category: ts.DiagnosticCategory.Error, key: "Import_assignment_cannot_be_used_when_targeting_ECMAScript_2015_modules_Consider_using_import_Asteri_1202", message: "Import assignment cannot be used when targeting ECMAScript 2015 modules. Consider using 'import * as ns from \"mod\"', 'import {a} from \"mod\"', 'import d from \"mod\"', or another module format instead." },
Export_assignment_cannot_be_used_when_targeting_ECMAScript_2015_modules_Consider_using_export_default_or_another_module_format_instead: { code: 1203, category: ts.DiagnosticCategory.Error, key: "Export_assignment_cannot_be_used_when_targeting_ECMAScript_2015_modules_Consider_using_export_defaul_1203", message: "Export assignment cannot be used when targeting ECMAScript 2015 modules. Consider using 'export default' or another module format instead." },
+ Cannot_re_export_a_type_when_the_isolatedModules_flag_is_provided: { code: 1205, category: ts.DiagnosticCategory.Error, key: "Cannot_re_export_a_type_when_the_isolatedModules_flag_is_provided_1205", message: "Cannot re-export a type when the '--isolatedModules' flag is provided." },
Decorators_are_not_valid_here: { code: 1206, category: ts.DiagnosticCategory.Error, key: "Decorators_are_not_valid_here_1206", message: "Decorators are not valid here." },
Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name: { code: 1207, category: ts.DiagnosticCategory.Error, key: "Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name_1207", message: "Decorators cannot be applied to multiple get/set accessors of the same name." },
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." },
@@ -3631,6 +3785,10 @@ var ts;
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." },
+ Dynamic_import_cannot_be_used_when_targeting_ECMAScript_2015_modules: { code: 1323, category: ts.DiagnosticCategory.Error, key: "Dynamic_import_cannot_be_used_when_targeting_ECMAScript_2015_modules_1323", message: "Dynamic import cannot be used when targeting ECMAScript 2015 modules." },
+ Dynamic_import_must_have_one_specifier_as_an_argument: { code: 1324, category: ts.DiagnosticCategory.Error, key: "Dynamic_import_must_have_one_specifier_as_an_argument_1324", message: "Dynamic import must have one specifier as an argument." },
+ Specifier_of_dynamic_import_cannot_be_spread_element: { code: 1325, category: ts.DiagnosticCategory.Error, key: "Specifier_of_dynamic_import_cannot_be_spread_element_1325", message: "Specifier of dynamic import cannot be spread element." },
+ Dynamic_import_cannot_have_type_arguments: { code: 1326, category: ts.DiagnosticCategory.Error, key: "Dynamic_import_cannot_have_type_arguments_1326", message: "Dynamic import cannot have type arguments" },
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." },
@@ -3677,7 +3835,7 @@ var ts;
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." },
+ Call_target_does_not_contain_any_signatures: { code: 2346, category: ts.DiagnosticCategory.Error, key: "Call_target_does_not_contain_any_signatures_2346", message: "Call target does not contain any signatures." },
Untyped_function_calls_may_not_accept_type_arguments: { code: 2347, category: ts.DiagnosticCategory.Error, key: "Untyped_function_calls_may_not_accept_type_arguments_2347", message: "Untyped function calls may not accept type arguments." },
Value_of_type_0_is_not_callable_Did_you_mean_to_include_new: { code: 2348, category: ts.DiagnosticCategory.Error, key: "Value_of_type_0_is_not_callable_Did_you_mean_to_include_new_2348", message: "Value of type '{0}' is not callable. Did you mean to include 'new'?" },
Cannot_invoke_an_expression_whose_type_lacks_a_call_signature_Type_0_has_no_compatible_call_signatures: { code: 2349, category: ts.DiagnosticCategory.Error, key: "Cannot_invoke_an_expression_whose_type_lacks_a_call_signature_Type_0_has_no_compatible_call_signatur_2349", message: "Cannot invoke an expression whose type lacks a call signature. Type '{0}' has no compatible call signatures." },
@@ -3872,6 +4030,15 @@ var ts;
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." },
+ Property_0_does_not_exist_on_type_1_Did_you_mean_2: { code: 2551, category: ts.DiagnosticCategory.Error, key: "Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551", message: "Property '{0}' does not exist on type '{1}'. Did you mean '{2}'?" },
+ Cannot_find_name_0_Did_you_mean_1: { code: 2552, category: ts.DiagnosticCategory.Error, key: "Cannot_find_name_0_Did_you_mean_1_2552", message: "Cannot find name '{0}'. Did you mean '{1}'?" },
+ Computed_values_are_not_permitted_in_an_enum_with_string_valued_members: { code: 2553, category: ts.DiagnosticCategory.Error, key: "Computed_values_are_not_permitted_in_an_enum_with_string_valued_members_2553", message: "Computed values are not permitted in an enum with string valued members." },
+ Expected_0_arguments_but_got_1: { code: 2554, category: ts.DiagnosticCategory.Error, key: "Expected_0_arguments_but_got_1_2554", message: "Expected {0} arguments, but got {1}." },
+ Expected_at_least_0_arguments_but_got_1: { code: 2555, category: ts.DiagnosticCategory.Error, key: "Expected_at_least_0_arguments_but_got_1_2555", message: "Expected at least {0} arguments, but got {1}." },
+ Expected_0_arguments_but_got_a_minimum_of_1: { code: 2556, category: ts.DiagnosticCategory.Error, key: "Expected_0_arguments_but_got_a_minimum_of_1_2556", message: "Expected {0} arguments, but got a minimum of {1}." },
+ Expected_at_least_0_arguments_but_got_a_minimum_of_1: { code: 2557, category: ts.DiagnosticCategory.Error, key: "Expected_at_least_0_arguments_but_got_a_minimum_of_1_2557", message: "Expected at least {0} arguments, but got a minimum of {1}." },
+ Expected_0_type_arguments_but_got_1: { code: 2558, category: ts.DiagnosticCategory.Error, key: "Expected_0_type_arguments_but_got_1_2558", message: "Expected {0} type arguments, but got {1}." },
+ Type_0_has_no_properties_in_common_with_type_1: { code: 2559, category: ts.DiagnosticCategory.Error, key: "Type_0_has_no_properties_in_common_with_type_1_2559", message: "Type '{0}' has no properties in common with type '{1}'." },
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." },
@@ -3883,7 +4050,6 @@ var ts;
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}'." },
@@ -3942,6 +4108,8 @@ var ts;
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." },
_0_are_specified_twice_The_attribute_named_0_will_be_overwritten: { code: 2710, category: ts.DiagnosticCategory.Error, key: "_0_are_specified_twice_The_attribute_named_0_will_be_overwritten_2710", message: "'{0}' are specified twice. The attribute named '{0}' will be overwritten." },
+ A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option: { code: 2711, category: ts.DiagnosticCategory.Error, key: "A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES20_2711", message: "A dynamic import call returns a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your `--lib` option." },
+ A_dynamic_import_call_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: 2712, category: ts.DiagnosticCategory.Error, key: "A_dynamic_import_call_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declarat_2712", message: "A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option." },
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}'." },
@@ -4016,7 +4184,7 @@ var ts;
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." },
+ Property_0_of_exported_class_expression_may_not_be_private_or_protected: { code: 4094, category: ts.DiagnosticCategory.Error, key: "Property_0_of_exported_class_expression_may_not_be_private_or_protected_4094", message: "Property '{0}' of exported class expression may not be private or protected." },
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}'." },
@@ -4058,7 +4226,7 @@ var ts;
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_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'." },
+ Specify_module_code_generation_Colon_commonjs_amd_system_umd_es2015_or_ESNext: { code: 6016, category: ts.DiagnosticCategory.Message, key: "Specify_module_code_generation_Colon_commonjs_amd_system_umd_es2015_or_ESNext_6016", message: "Specify module code generation: 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'." },
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_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'." },
@@ -4167,6 +4335,7 @@ var ts;
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." },
+ Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1: { code: 6137, category: ts.DiagnosticCategory.Error, key: "Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1_6137", message: "Cannot import type declaration files. Consider importing '{0}' instead of '{1}'." },
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}'." },
@@ -4212,6 +4381,9 @@ var ts;
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}'" },
+ Reusing_resolution_of_module_0_to_file_1_from_old_program: { code: 6183, category: ts.DiagnosticCategory.Message, key: "Reusing_resolution_of_module_0_to_file_1_from_old_program_6183", message: "Reusing resolution of module '{0}' to file '{1}' from old program." },
+ Reusing_module_resolutions_originating_in_0_since_resolutions_are_unchanged_from_old_program: { code: 6184, category: ts.DiagnosticCategory.Message, key: "Reusing_module_resolutions_originating_in_0_since_resolutions_are_unchanged_from_old_program_6184", message: "Reusing module resolutions originating in '{0}' since resolutions are unchanged from old program." },
+ Disable_strict_checking_of_generic_signatures_in_function_types: { code: 6185, category: ts.DiagnosticCategory.Message, key: "Disable_strict_checking_of_generic_signatures_in_function_types_6185", message: "Disable strict checking of generic signatures in function types." },
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." },
@@ -4238,6 +4410,8 @@ var ts;
Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation: { code: 7032, category: ts.DiagnosticCategory.Error, key: "Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation_7032", message: "Property '{0}' implicitly has type 'any', because its set accessor lacks a parameter type annotation." },
Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation: { code: 7033, category: ts.DiagnosticCategory.Error, key: "Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation_7033", message: "Property '{0}' implicitly has type 'any', because its get accessor lacks a return type annotation." },
Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined: { code: 7034, category: ts.DiagnosticCategory.Error, key: "Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined_7034", message: "Variable '{0}' implicitly has type '{1}' in some locations where its type cannot be determined." },
+ Try_npm_install_types_Slash_0_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0: { code: 7035, category: ts.DiagnosticCategory.Error, key: "Try_npm_install_types_Slash_0_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_mod_7035", message: "Try `npm install @types/{0}` if it exists or add a new declaration (.d.ts) file containing `declare module '{0}';`" },
+ Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0: { code: 7036, category: ts.DiagnosticCategory.Error, key: "Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0_7036", message: "Dynamic import's specifier must be of type 'string', but here has type '{0}'." },
You_cannot_rename_this_element: { code: 8000, category: ts.DiagnosticCategory.Error, key: "You_cannot_rename_this_element_8000", message: "You cannot rename this element." },
You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library: { code: 8001, category: ts.DiagnosticCategory.Error, key: "You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library_8001", message: "You cannot rename elements that are defined in the standard TypeScript library." },
import_can_only_be_used_in_a_ts_file: { code: 8002, category: ts.DiagnosticCategory.Error, key: "import_can_only_be_used_in_a_ts_file_8002", message: "'import ... =' can only be used in a .ts file." },
@@ -4286,12 +4460,18 @@ var ts;
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}'." },
+ Declare_property_0: { code: 90016, category: ts.DiagnosticCategory.Message, key: "Declare_property_0_90016", message: "Declare property '{0}'." },
+ Add_index_signature_for_property_0: { code: 90017, category: ts.DiagnosticCategory.Message, key: "Add_index_signature_for_property_0_90017", message: "Add index signature for 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}'." },
+ Change_spelling_to_0: { code: 90022, category: ts.DiagnosticCategory.Message, key: "Change_spelling_to_0_90022", message: "Change spelling to '{0}'." },
+ Declare_method_0: { code: 90023, category: ts.DiagnosticCategory.Message, key: "Declare_method_0_90023", message: "Declare method '{0}'." },
+ Declare_static_method_0: { code: 90024, category: ts.DiagnosticCategory.Message, key: "Declare_static_method_0_90024", message: "Declare static method '{0}'." },
+ Prefix_0_with_an_underscore: { code: 90025, category: ts.DiagnosticCategory.Message, key: "Prefix_0_with_an_underscore_90025", message: "Prefix '{0}' with an underscore." },
+ Convert_function_to_an_ES2015_class: { code: 95001, category: ts.DiagnosticCategory.Message, key: "Convert_function_to_an_ES2015_class_95001", message: "Convert function to an ES2015 class" },
+ Convert_function_0_to_class: { code: 95002, category: ts.DiagnosticCategory.Message, key: "Convert_function_0_to_class_95002", message: "Convert function '{0}' to class" },
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." },
@@ -4584,6 +4764,7 @@ var ts;
case 32:
case 47:
case 60:
+ case 124:
case 61:
case 62:
return true;
@@ -4645,6 +4826,7 @@ var ts;
}
break;
case 60:
+ case 124:
case 61:
case 62:
if (isConflictMarkerTrivia(text, pos)) {
@@ -4698,10 +4880,10 @@ var ts;
}
}
else {
- ts.Debug.assert(ch === 61);
+ ts.Debug.assert(ch === 124 || ch === 61);
while (pos < len) {
- var ch_1 = text.charCodeAt(pos);
- if (ch_1 === 62 && isConflictMarkerTrivia(text, pos)) {
+ var currentChar = text.charCodeAt(pos);
+ if ((currentChar === 61 || currentChar === 62) && currentChar !== ch && isConflictMarkerTrivia(text, pos)) {
break;
}
pos++;
@@ -4840,9 +5022,10 @@ var ts;
}
ts.getTrailingCommentRanges = getTrailingCommentRanges;
function getShebang(text) {
- return shebangTriviaRegex.test(text)
- ? shebangTriviaRegex.exec(text)[0]
- : undefined;
+ var match = shebangTriviaRegex.exec(text);
+ if (match) {
+ return match[0];
+ }
}
ts.getShebang = getShebang;
function isIdentifierStart(ch, languageVersion) {
@@ -5380,13 +5563,13 @@ var ts;
pos += 2;
var commentClosed = false;
while (pos < end) {
- var ch_2 = text.charCodeAt(pos);
- if (ch_2 === 42 && text.charCodeAt(pos + 1) === 47) {
+ var ch_1 = text.charCodeAt(pos);
+ if (ch_1 === 42 && text.charCodeAt(pos + 1) === 47) {
pos += 2;
commentClosed = true;
break;
}
- if (isLineBreak(ch_2)) {
+ if (isLineBreak(ch_1)) {
precedingLineBreak = true;
}
pos++;
@@ -5541,6 +5724,15 @@ var ts;
pos++;
return token = 17;
case 124:
+ if (isConflictMarkerTrivia(text, pos)) {
+ pos = scanConflictMarkerTrivia(text, pos, error);
+ if (skipTrivia) {
+ continue;
+ }
+ else {
+ return token = 7;
+ }
+ }
if (text.charCodeAt(pos + 1) === 124) {
return pos += 2, token = 54;
}
@@ -5966,11 +6158,12 @@ var ts;
"umd": ts.ModuleKind.UMD,
"es6": ts.ModuleKind.ES2015,
"es2015": ts.ModuleKind.ES2015,
+ "esnext": ts.ModuleKind.ESNext
}),
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,
+ description: ts.Diagnostics.Specify_module_code_generation_Colon_commonjs_amd_system_umd_es2015_or_ESNext,
},
{
name: "lib",
@@ -6002,6 +6195,7 @@ var ts;
"es2017.object": "lib.es2017.object.d.ts",
"es2017.sharedmemory": "lib.es2017.sharedmemory.d.ts",
"es2017.string": "lib.es2017.string.d.ts",
+ "es2017.intl": "lib.es2017.intl.d.ts",
"esnext.asynciterable": "lib.esnext.asynciterable.d.ts",
}),
},
@@ -6463,6 +6657,12 @@ var ts;
description: ts.Diagnostics.The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files
},
{
+ name: "noStrictGenericChecks",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Disable_strict_checking_of_generic_signatures_in_function_types,
+ },
+ {
name: "plugins",
type: "list",
isTSConfigOnly: true,
@@ -6532,7 +6732,6 @@ var ts;
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);
@@ -6566,7 +6765,6 @@ var ts;
var options = {};
var fileNames = [];
var errors = [];
- var _a = getOptionNameMap(), optionNameMap = _a.optionNameMap, shortOptionNames = _a.shortOptionNames;
parseStrings(commandLine);
return {
options: options,
@@ -6582,12 +6780,7 @@ var ts;
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);
+ var opt = getOptionFromName(s.slice(s.charCodeAt(1) === 45 ? 2 : 1), true);
if (opt) {
if (opt.isTSConfigOnly) {
errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_can_only_be_specified_in_tsconfig_json_file, opt.name));
@@ -6671,6 +6864,18 @@ var ts;
}
}
ts.parseCommandLine = parseCommandLine;
+ function getOptionFromName(optionName, allowShort) {
+ if (allowShort === void 0) { allowShort = false; }
+ optionName = optionName.toLowerCase();
+ var _a = getOptionNameMap(), optionNameMap = _a.optionNameMap, shortOptionNames = _a.shortOptionNames;
+ if (allowShort) {
+ var short = shortOptionNames.get(optionName);
+ if (short !== undefined) {
+ optionName = short;
+ }
+ }
+ return optionNameMap.get(optionName);
+ }
function readConfigFile(fileName, readFile) {
var text = "";
try {
@@ -6813,7 +7018,7 @@ var ts;
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);
+ result.push(optionName && "" + tab + tab + optionName + (description && (makePadding(marginLength - optionName.length + 2) + description)));
}
if (configurations.files && configurations.files.length) {
result.push(tab + "},");
@@ -6853,49 +7058,28 @@ var ts;
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);
- var baseCompileOnSave;
- 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, baseCompileOnSave, baseOptions]), include = _b[0], exclude = _b[1], files = _b[2], baseCompileOnSave = _b[3], baseOptions = _b[4];
- }
- else {
- errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Compiler_option_0_requires_a_value_of_type_1, "extends", "string"));
+ var options = (function () {
+ var _a = parseConfig(json, host, basePath, configFileName, resolutionStack, errors), include = _a.include, exclude = _a.exclude, files = _a.files, options = _a.options, compileOnSave = _a.compileOnSave;
+ if (include) {
+ json.include = include;
}
- if (include && !json["include"]) {
- json["include"] = include;
+ if (exclude) {
+ json.exclude = exclude;
}
- if (exclude && !json["exclude"]) {
- json["exclude"] = exclude;
+ if (files) {
+ json.files = files;
}
- if (files && !json["files"]) {
- json["files"] = files;
+ if (compileOnSave !== undefined) {
+ json.compileOnSave = compileOnSave;
}
- options = ts.assign({}, baseOptions, options);
- }
+ return options;
+ })();
options = ts.extend(existingOptions, options);
options.configFilePath = configFileName;
- var _c = getFileNames(errors), fileNames = _c.fileNames, wildcardDirectories = _c.wildcardDirectories;
+ var jsonOptions = json["typeAcquisition"] || json["typingOptions"];
+ var typeAcquisition = convertTypeAcquisitionFromJsonWorker(jsonOptions, basePath, errors, configFileName);
+ var _a = getFileNames(), fileNames = _a.fileNames, wildcardDirectories = _a.wildcardDirectories;
var compileOnSave = convertCompileOnSaveOptionFromJson(json, basePath, errors);
- if (baseCompileOnSave && json[ts.compileOnSaveCommandLineOption.name] === undefined) {
- compileOnSave = baseCompileOnSave;
- }
return {
options: options,
fileNames: fileNames,
@@ -6905,37 +7089,7 @@ var ts;
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.compileOnSave, result.options];
- }
- function getFileNames(errors) {
+ function getFileNames() {
var fileNames;
if (ts.hasProperty(json, "files")) {
if (ts.isArray(json["files"])) {
@@ -6966,9 +7120,6 @@ var ts;
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"];
@@ -6985,9 +7136,66 @@ var ts;
}
return result;
}
- var _b;
}
ts.parseJsonConfigFileContent = parseJsonConfigFileContent;
+ function parseConfig(json, host, basePath, configFileName, resolutionStack, errors) {
+ basePath = ts.normalizeSlashes(basePath);
+ var getCanonicalFileName = ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames);
+ var resolvedPath = ts.toPath(configFileName || "", basePath, getCanonicalFileName);
+ if (resolutionStack.indexOf(resolvedPath) >= 0) {
+ errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Circularity_detected_while_resolving_configuration_Colon_0, resolutionStack.concat([resolvedPath]).join(" -> ")));
+ return { include: undefined, exclude: undefined, files: undefined, options: {}, compileOnSave: undefined };
+ }
+ if (ts.hasProperty(json, "excludes")) {
+ errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Unknown_option_excludes_Did_you_mean_exclude));
+ }
+ var options = convertCompilerOptionsFromJsonWorker(json.compilerOptions, basePath, errors, configFileName);
+ var include = json.include, exclude = json.exclude, files = json.files;
+ var compileOnSave = json.compileOnSave;
+ if (json.extends) {
+ resolutionStack = resolutionStack.concat([resolvedPath]);
+ var base = getExtendedConfig(json.extends, host, basePath, getCanonicalFileName, resolutionStack, errors);
+ if (base) {
+ include = include || base.include;
+ exclude = exclude || base.exclude;
+ files = files || base.files;
+ if (compileOnSave === undefined) {
+ compileOnSave = base.compileOnSave;
+ }
+ options = ts.assign({}, base.options, options);
+ }
+ }
+ return { include: include, exclude: exclude, files: files, options: options, compileOnSave: compileOnSave };
+ }
+ function getExtendedConfig(extended, host, basePath, getCanonicalFileName, resolutionStack, errors) {
+ if (typeof extended !== "string") {
+ errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Compiler_option_0_requires_a_value_of_type_1, "extends", "string"));
+ return undefined;
+ }
+ extended = ts.normalizeSlashes(extended);
+ if (!(ts.isRootedDiskPath(extended) || ts.startsWith(extended, "./") || ts.startsWith(extended, "../"))) {
+ errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.A_path_in_an_extends_option_must_be_relative_or_rooted_but_0_is_not, extended));
+ return undefined;
+ }
+ var extendedConfigPath = ts.toPath(extended, 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, extended));
+ return undefined;
+ }
+ }
+ var extendedResult = readConfigFile(extendedConfigPath, function (path) { return host.readFile(path); });
+ if (extendedResult.error) {
+ errors.push(extendedResult.error);
+ return undefined;
+ }
+ 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 _a = parseConfig(extendedResult.config, host, extendedDirname, ts.getBaseFileName(extendedConfigPath), resolutionStack, errors), include = _a.include, exclude = _a.exclude, files = _a.files, options = _a.options, compileOnSave = _a.compileOnSave;
+ return { include: ts.map(include, updatePath), exclude: ts.map(exclude, updatePath), files: ts.map(files, updatePath), compileOnSave: compileOnSave, options: options };
+ }
function convertCompileOnSaveOptionFromJson(jsonOption, basePath, errors) {
if (!ts.hasProperty(jsonOption, ts.compileOnSaveCommandLineOption.name)) {
return false;
@@ -7167,7 +7375,7 @@ var ts;
}
}
}
- for (var key in wildcardDirectories)
+ 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];
@@ -7176,6 +7384,7 @@ var ts;
}
}
}
+ }
}
return wildcardDirectories;
}
@@ -7219,6 +7428,40 @@ var ts;
function caseInsensitiveKeyMapper(key) {
return key.toLowerCase();
}
+ function convertCompilerOptionsForTelemetry(opts) {
+ var out = {};
+ for (var key in opts) {
+ if (opts.hasOwnProperty(key)) {
+ var type = getOptionFromName(key);
+ if (type !== undefined) {
+ out[key] = getOptionValueWithEmptyStrings(opts[key], type);
+ }
+ }
+ }
+ return out;
+ }
+ ts.convertCompilerOptionsForTelemetry = convertCompilerOptionsForTelemetry;
+ function getOptionValueWithEmptyStrings(value, option) {
+ switch (option.type) {
+ case "object":
+ return "";
+ case "string":
+ return "";
+ case "number":
+ return typeof value === "number" ? value : "";
+ case "boolean":
+ return typeof value === "boolean" ? value : "";
+ case "list":
+ var elementType_1 = option.element;
+ return ts.isArray(value) ? value.map(function (v) { return getOptionValueWithEmptyStrings(v, elementType_1); }) : "";
+ default:
+ return ts.forEachEntry(option.type, function (optionEnumValue, optionStringValue) {
+ if (optionEnumValue === value) {
+ return optionStringValue;
+ }
+ });
+ }
+ }
})(ts || (ts = {}));
var ts;
(function (ts) {
@@ -7243,12 +7486,11 @@ var ts;
ts.Debug.assert(ts.extensionIsTypeScript(resolved.extension));
return resolved.path;
}
- function resolvedModuleFromResolved(_a, isExternalLibraryImport) {
- var path = _a.path, extension = _a.extension;
- return { resolvedFileName: path, extension: extension, isExternalLibraryImport: isExternalLibraryImport };
- }
function createResolvedModuleWithFailedLookupLocations(resolved, isExternalLibraryImport, failedLookupLocations) {
- return { resolvedModule: resolved && resolvedModuleFromResolved(resolved, isExternalLibraryImport), failedLookupLocations: failedLookupLocations };
+ return {
+ resolvedModule: resolved && { resolvedFileName: resolved.path, extension: resolved.extension, isExternalLibraryImport: isExternalLibraryImport },
+ failedLookupLocations: failedLookupLocations
+ };
}
function moduleHasNonRelativeName(moduleName) {
return !(ts.isRootedDiskPath(moduleName) || ts.isExternalModuleNameRelative(moduleName));
@@ -7532,6 +7774,8 @@ var ts;
case ts.ModuleResolutionKind.Classic:
result = classicNameResolver(moduleName, containingFile, compilerOptions, host, cache);
break;
+ default:
+ ts.Debug.fail("Unexpected moduleResolution: " + moduleResolution);
}
if (perFolderCache) {
perFolderCache.set(moduleName, result);
@@ -7648,10 +7892,12 @@ var ts;
if (state.traceEnabled) {
trace(state.host, ts.Diagnostics.Trying_substitution_0_candidate_module_location_Colon_1, subst, path);
}
- var tsExtension = ts.tryGetExtensionFromPath(candidate);
- if (tsExtension !== undefined) {
+ var extension = ts.tryGetExtensionFromPath(candidate);
+ if (extension !== undefined) {
var path_1 = tryFile(candidate, failedLookupLocations, false, state);
- return path_1 && { path: path_1, extension: tsExtension };
+ if (path_1 !== undefined) {
+ return { path: path_1, extension: extension };
+ }
}
return loader(extensions, candidate, failedLookupLocations, !directoryProbablyExists(ts.getDirectoryPath(candidate), state.host), state);
});
@@ -7665,12 +7911,18 @@ var ts;
}
}
function nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache) {
- return nodeModuleNameResolverWorker(moduleName, containingFile, compilerOptions, host, cache, false);
+ return nodeModuleNameResolverWorker(moduleName, ts.getDirectoryPath(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);
+ function resolveJavaScriptModule(moduleName, initialDir, host) {
+ var _a = nodeModuleNameResolverWorker(moduleName, initialDir, { moduleResolution: ts.ModuleResolutionKind.NodeJs, allowJs: true }, host, undefined, true), resolvedModule = _a.resolvedModule, failedLookupLocations = _a.failedLookupLocations;
+ if (!resolvedModule) {
+ throw new Error("Could not resolve JS module " + moduleName + " starting at " + initialDir + ". Looked in: " + failedLookupLocations.join(", "));
+ }
+ return resolvedModule.resolvedFileName;
+ }
+ ts.resolveJavaScriptModule = resolveJavaScriptModule;
+ function nodeModuleNameResolverWorker(moduleName, containingDirectory, compilerOptions, host, cache, jsOnly) {
var traceEnabled = isTraceEnabled(compilerOptions, host);
var failedLookupLocations = [];
var state = { compilerOptions: compilerOptions, host: host, traceEnabled: traceEnabled };
@@ -7700,7 +7952,6 @@ var ts;
}
}
}
- ts.nodeModuleNameResolverWorker = nodeModuleNameResolverWorker;
function realpath(path, host, traceEnabled) {
if (!host.realpath) {
return path;
@@ -7901,9 +8152,10 @@ var ts;
return loadModuleFromNodeModulesFolder(Extensions.DtsOnly, mangleScopedPackage(moduleName, state), nodeModulesAtTypes_1, nodeModulesAtTypesExists, failedLookupLocations, state);
}
}
+ var mangledScopedPackageSeparator = "__";
function mangleScopedPackage(moduleName, state) {
if (ts.startsWith(moduleName, "@")) {
- var replaceSlash = moduleName.replace(ts.directorySeparator, "__");
+ var replaceSlash = moduleName.replace(ts.directorySeparator, mangledScopedPackageSeparator);
if (replaceSlash !== moduleName) {
var mangled = replaceSlash.slice(1);
if (state.traceEnabled) {
@@ -7914,6 +8166,16 @@ var ts;
}
return moduleName;
}
+ function getPackageNameFromAtTypesDirectory(mangledName) {
+ var withoutAtTypePrefix = ts.removePrefix(mangledName, "@types/");
+ if (withoutAtTypePrefix !== mangledName) {
+ return withoutAtTypePrefix.indexOf("__") !== -1 ?
+ "@" + withoutAtTypePrefix.replace(mangledScopedPackageSeparator, ts.directorySeparator) :
+ withoutAtTypePrefix;
+ }
+ return mangledName;
+ }
+ ts.getPackageNameFromAtTypesDirectory = getPackageNameFromAtTypesDirectory;
function tryFindNonRelativeModuleNameInCache(cache, moduleName, containingDirectory, traceEnabled, host) {
var result = cache && cache.get(containingDirectory);
if (result) {
@@ -8037,7 +8299,7 @@ var ts;
clear: function () { return str_1 = ""; },
trackSymbol: ts.noop,
reportInaccessibleThisError: ts.noop,
- reportIllegalExtends: ts.noop
+ reportPrivateInBaseOfClassExpression: ts.noop,
};
}
return stringWriters.pop();
@@ -8085,9 +8347,7 @@ var ts;
}
ts.typeDirectiveIsEqualTo = typeDirectiveIsEqualTo;
function hasChangesInResolutions(names, newResolutions, oldResolutions, comparer) {
- if (names.length !== newResolutions.length) {
- return false;
- }
+ ts.Debug.assert(names.length === newResolutions.length);
for (var i = 0; i < names.length; i++) {
var newResolution = newResolutions[i];
var oldResolution = oldResolutions && oldResolutions.get(names[i]);
@@ -8184,34 +8444,22 @@ var ts;
return !nodeIsMissing(node);
}
ts.nodeIsPresent = nodeIsPresent;
- function isToken(n) {
- return n.kind >= 0 && n.kind <= 142;
- }
- ts.isToken = isToken;
function getTokenPosOfNode(node, sourceFile, includeJsDoc) {
if (nodeIsMissing(node)) {
return node.pos;
}
- if (isJSDocNode(node)) {
+ if (ts.isJSDocNode(node)) {
return ts.skipTrivia((sourceFile || getSourceFileOfNode(node)).text, node.pos, false, true);
}
if (includeJsDoc && node.jsDoc && node.jsDoc.length > 0) {
return getTokenPosOfNode(node.jsDoc[0]);
}
- if (node.kind === 294 && node._children.length > 0) {
+ if (node.kind === 295 && 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 >= 267 && node.kind <= 293;
- }
- ts.isJSDocNode = isJSDocNode;
- function isJSDocTag(node) {
- return node.kind >= 283 && node.kind <= 293;
- }
- ts.isJSDocTag = isJSDocTag;
function getNonDecoratorTokenPosOfNode(node, sourceFile) {
if (nodeIsMissing(node) || !node.decorators) {
return getTokenPosOfNode(node, sourceFile);
@@ -8244,26 +8492,28 @@ var ts;
if (!nodeIsSynthesized(node) && node.parent) {
return getSourceTextOfNodeFromSourceFile(sourceFile, node);
}
+ var escapeText = ts.getEmitFlags(node) & 16777216 ? escapeString : escapeNonAsciiString;
switch (node.kind) {
case 9:
- return getQuotedEscapedLiteralText('"', node.text, '"');
+ return '"' + escapeText(node.text) + '"';
case 13:
- return getQuotedEscapedLiteralText("`", node.text, "`");
+ return "`" + escapeText(node.text) + "`";
case 14:
- return getQuotedEscapedLiteralText("`", node.text, "${");
+ return "`" + escapeText(node.text) + "${";
case 15:
- return getQuotedEscapedLiteralText("}", node.text, "${");
+ return "}" + escapeText(node.text) + "${";
case 16:
- return getQuotedEscapedLiteralText("}", node.text, "`");
+ return "}" + escapeText(node.text) + "`";
case 8:
return node.text;
}
ts.Debug.fail("Literal kind '" + node.kind + "' not accounted for.");
}
ts.getLiteralText = getLiteralText;
- function getQuotedEscapedLiteralText(leftQuote, text, rightQuote) {
- return leftQuote + escapeNonAsciiCharacters(escapeString(text)) + rightQuote;
+ function getTextOfConstantValue(value) {
+ return typeof value === "string" ? '"' + escapeNonAsciiString(value) + '"' : "" + value;
}
+ ts.getTextOfConstantValue = getTextOfConstantValue;
function escapeIdentifier(identifier) {
return identifier.length >= 2 && identifier.charCodeAt(0) === 95 && identifier.charCodeAt(1) === 95 ? "_" + identifier : identifier;
}
@@ -8297,7 +8547,7 @@ var ts;
function isBlockScopedContainerTopLevel(node) {
return node.kind === 265 ||
node.kind === 233 ||
- isFunctionLike(node);
+ ts.isFunctionLike(node);
}
ts.isBlockScopedContainerTopLevel = isBlockScopedContainerTopLevel;
function isGlobalScopeAugmentation(module) {
@@ -8339,7 +8589,7 @@ var ts;
case 187:
return true;
case 207:
- return parentNode && !isFunctionLike(parentNode);
+ return parentNode && !ts.isFunctionLike(parentNode);
}
return false;
}
@@ -8470,10 +8720,6 @@ var ts;
return (file.externalModuleIndicator || file.commonJsModuleIndicator) !== undefined;
}
ts.isExternalOrCommonJsModule = isExternalOrCommonJsModule;
- function isDeclarationFile(file) {
- return file.isDeclarationFile;
- }
- ts.isDeclarationFile = isDeclarationFile;
function isConstEnumDeclaration(node) {
return node.kind === 232 && isConst(node);
}
@@ -8491,6 +8737,10 @@ var ts;
return n.kind === 181 && n.expression.kind === 97;
}
ts.isSuperCall = isSuperCall;
+ function isImportCall(n) {
+ return n.kind === 181 && n.expression.kind === 91;
+ }
+ ts.isImportCall = isImportCall;
function isPrologueDirective(node) {
return node.kind === 210
&& node.expression.kind === 9;
@@ -8601,10 +8851,6 @@ var ts;
return false;
}
ts.isChildOfNodeWithKind = isChildOfNodeWithKind;
- function isPrefixUnaryExpression(node) {
- return node.kind === 192;
- }
- ts.isPrefixUnaryExpression = isPrefixUnaryExpression;
function forEachReturnStatement(body, visitor) {
return traverse(body);
function traverse(node) {
@@ -8650,7 +8896,7 @@ var ts;
case 199:
return;
default:
- if (isFunctionLike(node)) {
+ if (ts.isFunctionLike(node)) {
var name = node.name;
if (name && name.kind === 144) {
traverse(name.expression);
@@ -8693,38 +8939,6 @@ var ts;
return false;
}
ts.isVariableLike = isVariableLike;
- function isAccessor(node) {
- return node && (node.kind === 153 || node.kind === 154);
- }
- ts.isAccessor = isAccessor;
- function isClassLike(node) {
- return node && (node.kind === 229 || node.kind === 199);
- }
- ts.isClassLike = isClassLike;
- function isFunctionLike(node) {
- return node && isFunctionLikeKind(node.kind);
- }
- ts.isFunctionLike = isFunctionLike;
- function isFunctionLikeKind(kind) {
- switch (kind) {
- case 152:
- case 186:
- case 228:
- case 187:
- case 151:
- case 150:
- case 153:
- case 154:
- case 155:
- case 156:
- case 157:
- case 160:
- case 161:
- return true;
- }
- return false;
- }
- ts.isFunctionLikeKind = isFunctionLikeKind;
function introducesArgumentsExoticObject(node) {
switch (node.kind) {
case 151:
@@ -8739,20 +8953,6 @@ var ts;
return false;
}
ts.introducesArgumentsExoticObject = introducesArgumentsExoticObject;
- function isIterationStatement(node, lookInLabeledStatements) {
- switch (node.kind) {
- case 214:
- case 215:
- case 216:
- case 212:
- case 213:
- return true;
- case 222:
- return lookInLabeledStatements && isIterationStatement(node.statement, lookInLabeledStatements);
- }
- return false;
- }
- ts.isIterationStatement = isIterationStatement;
function unwrapInnermostStatementOfLabel(node, beforeUnwrapLabelCallback) {
while (true) {
if (beforeUnwrapLabelCallback) {
@@ -8766,7 +8966,7 @@ var ts;
}
ts.unwrapInnermostStatementOfLabel = unwrapInnermostStatementOfLabel;
function isFunctionBlock(node) {
- return node && node.kind === 207 && isFunctionLike(node.parent);
+ return node && node.kind === 207 && ts.isFunctionLike(node.parent);
}
ts.isFunctionBlock = isFunctionBlock;
function isObjectLiteralMethod(node) {
@@ -8790,7 +8990,7 @@ var ts;
function getContainingFunction(node) {
while (true) {
node = node.parent;
- if (!node || isFunctionLike(node)) {
+ if (!node || ts.isFunctionLike(node)) {
return node;
}
}
@@ -8799,7 +8999,7 @@ var ts;
function getContainingClass(node) {
while (true) {
node = node.parent;
- if (!node || isClassLike(node)) {
+ if (!node || ts.isClassLike(node)) {
return node;
}
}
@@ -8813,16 +9013,16 @@ var ts;
}
switch (node.kind) {
case 144:
- if (isClassLike(node.parent.parent)) {
+ if (ts.isClassLike(node.parent.parent)) {
return node;
}
node = node.parent;
break;
case 147:
- if (node.parent.kind === 146 && isClassElement(node.parent.parent)) {
+ if (node.parent.kind === 146 && ts.isClassElement(node.parent.parent)) {
node = node.parent.parent;
}
- else if (isClassElement(node.parent)) {
+ else if (ts.isClassElement(node.parent)) {
node = node.parent;
}
break;
@@ -8888,10 +9088,10 @@ var ts;
case 154:
return node;
case 147:
- if (node.parent.kind === 146 && isClassElement(node.parent.parent)) {
+ if (node.parent.kind === 146 && ts.isClassElement(node.parent.parent)) {
node = node.parent.parent;
}
- else if (isClassElement(node.parent)) {
+ else if (ts.isClassElement(node.parent)) {
node = node.parent;
}
break;
@@ -8935,25 +9135,11 @@ var ts;
return undefined;
}
ts.getEntityNameFromTypeNode = getEntityNameFromTypeNode;
- function isCallLikeExpression(node) {
- switch (node.kind) {
- case 251:
- case 250:
- case 181:
- case 182:
- case 183:
- case 147:
- return true;
- default:
- return false;
- }
- }
- ts.isCallLikeExpression = isCallLikeExpression;
function getInvokedExpression(node) {
if (node.kind === 183) {
return node.tag;
}
- else if (isJsxOpeningLikeElement(node)) {
+ else if (ts.isJsxOpeningLikeElement(node)) {
return node.tagName;
}
return node.expression;
@@ -9176,11 +9362,11 @@ var ts;
}
ts.getRightMostAssignedExpression = getRightMostAssignedExpression;
function isExportsIdentifier(node) {
- return isIdentifier(node) && node.text === "exports";
+ return ts.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";
+ return ts.isPropertyAccessExpression(node) && ts.isIdentifier(node.expression) && node.expression.text === "module" && node.name.text === "exports";
}
ts.isModuleExportsPropertyAccessExpression = isModuleExportsPropertyAccessExpression;
function getSpecialPropertyAssignmentKind(expression) {
@@ -9283,35 +9469,24 @@ var ts;
}
ts.getCommentsFromJSDoc = getCommentsFromJSDoc;
function hasJSDocParameterTags(node) {
- var parameterTags = getJSDocTags(node, 286);
+ var parameterTags = getJSDocTags(node, 287);
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 === 286) {
- if (doc.kind === kind) {
- result.push(doc);
- }
- }
- else {
- var tags = doc.tags;
- if (tags) {
- result.push.apply(result, ts.filter(tags, function (tag) { return tag.kind === kind; }));
- }
- }
- }
- return result;
- }
+ return ts.flatMap(getJSDocs(node), function (doc) {
+ return doc.kind === 283
+ ? ts.filter(doc.tags, function (tag) { return tag.kind === kind; })
+ : doc.kind === kind && doc;
+ });
}
function getFirstJSDocTag(node, kind) {
return node && ts.firstOrUndefined(getJSDocTags(node, kind));
}
function getJSDocs(node) {
+ if (ts.isJSDocTypedefTag(node)) {
+ return [node.parent];
+ }
var cache = node.jsDocCache;
if (!cache) {
getJSDocsWorker(node);
@@ -9355,29 +9530,44 @@ var ts;
}
ts.getJSDocs = getJSDocs;
function getJSDocParameterTags(param) {
- if (!isParameter(param)) {
- return undefined;
- }
var func = param.parent;
- var tags = getJSDocTags(func, 286);
+ var tags = getJSDocTags(func, 287);
if (!param.name) {
var i = func.parameters.indexOf(param);
- var paramTags = ts.filter(tags, function (tag) { return tag.kind === 286; });
+ var paramTags = ts.filter(tags, function (tag) { return tag.kind === 287; });
if (paramTags && 0 <= i && i < paramTags.length) {
return [paramTags[i]];
}
}
else if (param.name.kind === 71) {
var name_1 = param.name.text;
- return ts.filter(tags, function (tag) { return tag.kind === 286 && tag.parameterName.text === name_1; });
+ return ts.filter(tags, function (tag) { return tag.kind === 287 && tag.name.text === name_1; });
}
else {
return undefined;
}
}
ts.getJSDocParameterTags = getJSDocParameterTags;
+ function getParameterFromJSDoc(node) {
+ var name = node.name.text;
+ var grandParent = node.parent.parent;
+ ts.Debug.assert(node.parent.kind === 283);
+ if (!ts.isFunctionLike(grandParent)) {
+ return undefined;
+ }
+ return ts.find(grandParent.parameters, function (p) {
+ return p.name.kind === 71 && p.name.text === name;
+ });
+ }
+ ts.getParameterFromJSDoc = getParameterFromJSDoc;
+ function getTypeParameterFromJsDoc(node) {
+ var name = node.name.text;
+ var typeParameters = node.parent.parent.parent.typeParameters;
+ return ts.find(typeParameters, function (p) { return p.name.text === name; });
+ }
+ ts.getTypeParameterFromJsDoc = getTypeParameterFromJsDoc;
function getJSDocType(node) {
- var tag = getFirstJSDocTag(node, 288);
+ var tag = getFirstJSDocTag(node, 289);
if (!tag && node.kind === 146) {
var paramTags = getJSDocParameterTags(node);
if (paramTags) {
@@ -9391,12 +9581,21 @@ var ts;
return getFirstJSDocTag(node, 285);
}
ts.getJSDocAugmentsTag = getJSDocAugmentsTag;
+ function getJSDocClassTag(node) {
+ return getFirstJSDocTag(node, 286);
+ }
+ ts.getJSDocClassTag = getJSDocClassTag;
function getJSDocReturnTag(node) {
- return getFirstJSDocTag(node, 287);
+ return getFirstJSDocTag(node, 288);
}
ts.getJSDocReturnTag = getJSDocReturnTag;
+ function getJSDocReturnType(node) {
+ var returnTag = getJSDocReturnTag(node);
+ return returnTag && returnTag.typeExpression && returnTag.typeExpression.type;
+ }
+ ts.getJSDocReturnType = getJSDocReturnType;
function getJSDocTemplateTag(node) {
- return getFirstJSDocTag(node, 289);
+ return getFirstJSDocTag(node, 290);
}
ts.getJSDocTemplateTag = getJSDocTemplateTag;
function hasRestParameter(s) {
@@ -9502,25 +9701,35 @@ var ts;
}
ts.isInAmbientContext = isInAmbientContext;
function isDeclarationName(name) {
- if (name.kind !== 71 && name.kind !== 9 && name.kind !== 8) {
- return false;
- }
- var parent = name.parent;
- if (parent.kind === 242 || parent.kind === 246) {
- if (parent.propertyName) {
- return true;
- }
- }
- if (isDeclaration(parent)) {
- return parent.name === name;
+ switch (name.kind) {
+ case 71:
+ case 9:
+ case 8:
+ return ts.isDeclaration(name.parent) && name.parent.name === name;
+ default:
+ return false;
}
- return false;
}
ts.isDeclarationName = isDeclarationName;
+ function isAnyDeclarationName(name) {
+ switch (name.kind) {
+ case 71:
+ case 9:
+ case 8:
+ if (ts.isDeclaration(name.parent)) {
+ return name.parent.name === name;
+ }
+ var binExp = name.parent.parent;
+ return ts.isBinaryExpression(binExp) && getSpecialPropertyAssignmentKind(binExp) !== 0 && ts.getNameOfDeclaration(binExp) === name;
+ default:
+ return false;
+ }
+ }
+ ts.isAnyDeclarationName = isAnyDeclarationName;
function isLiteralComputedPropertyDeclarationName(node) {
return (node.kind === 9 || node.kind === 8) &&
node.parent.kind === 144 &&
- isDeclaration(node.parent.parent);
+ ts.isDeclaration(node.parent.parent);
}
ts.isLiteralComputedPropertyDeclarationName = isLiteralComputedPropertyDeclarationName;
function isIdentifierName(node) {
@@ -9616,21 +9825,19 @@ var ts;
var isNoDefaultLibRegEx = /^(\/\/\/\s*<reference\s+no-default-lib\s*=\s*)('|")(.+?)\2\s*\/>/gim;
if (simpleReferenceRegEx.test(comment)) {
if (isNoDefaultLibRegEx.test(comment)) {
- return {
- isNoDefaultLib: true
- };
+ return { isNoDefaultLib: true };
}
else {
var refMatchResult = ts.fullTripleSlashReferencePathRegEx.exec(comment);
var refLibResult = !refMatchResult && ts.fullTripleSlashReferenceTypeReferenceDirectiveRegEx.exec(comment);
- if (refMatchResult || refLibResult) {
- var start = commentRange.pos;
- var end = commentRange.end;
+ var match = refMatchResult || refLibResult;
+ if (match) {
+ var pos = commentRange.pos + match[1].length + match[2].length;
return {
fileReference: {
- pos: start,
- end: end,
- fileName: (refMatchResult || refLibResult)[3]
+ pos: pos,
+ end: pos + match[3].length,
+ fileName: match[3]
},
isNoDefaultLib: false,
isTypeReferenceDirective: !!refLibResult
@@ -9658,12 +9865,13 @@ var ts;
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[FunctionFlags["AsyncGenerator"] = 3] = "AsyncGenerator";
})(FunctionFlags = ts.FunctionFlags || (ts.FunctionFlags = {}));
function getFunctionFlags(node) {
+ if (!node) {
+ return 4;
+ }
var flags = 0;
switch (node.kind) {
case 228:
@@ -9697,10 +9905,6 @@ var ts;
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
@@ -9708,7 +9912,8 @@ var ts;
}
ts.isStringOrNumericLiteral = isStringOrNumericLiteral;
function hasDynamicName(declaration) {
- return declaration.name && isDynamicName(declaration.name);
+ var name = ts.getNameOfDeclaration(declaration);
+ return name && isDynamicName(name);
}
ts.hasDynamicName = hasDynamicName;
function isDynamicName(name) {
@@ -9718,7 +9923,7 @@ var ts;
}
ts.isDynamicName = isDynamicName;
function isWellKnownSymbolSyntactically(node) {
- return isPropertyAccessExpression(node) && isESSymbolIdentifier(node.expression);
+ return ts.isPropertyAccessExpression(node) && isESSymbolIdentifier(node.expression);
}
ts.isWellKnownSymbolSyntactically = isWellKnownSymbolSyntactically;
function getPropertyNameForPropertyNameNode(name) {
@@ -9750,24 +9955,6 @@ var ts;
return node.text === "push" || node.text === "unshift";
}
ts.isPushOrUnshiftIdentifier = isPushOrUnshiftIdentifier;
- function isModifierKind(token) {
- switch (token) {
- case 117:
- case 120:
- case 76:
- case 124:
- case 79:
- case 84:
- case 114:
- case 112:
- case 113:
- case 131:
- case 115:
- return true;
- }
- return false;
- }
- ts.isModifierKind = isModifierKind;
function isParameterDeclaration(node) {
var root = getRootDeclaration(node);
return root.kind === 146;
@@ -9806,7 +9993,7 @@ var ts;
}
ts.getOriginalSourceFileOrBundle = getOriginalSourceFileOrBundle;
function getOriginalSourceFile(sourceFile) {
- return ts.getParseTreeNode(sourceFile, isSourceFile) || sourceFile;
+ return ts.getParseTreeNode(sourceFile, ts.isSourceFile) || sourceFile;
}
function getOriginalSourceFiles(sourceFiles) {
return ts.sameMap(sourceFiles, getOriginalSourceFile);
@@ -9983,6 +10170,8 @@ var ts;
return 2;
case 198:
return 1;
+ case 298:
+ return 0;
default:
return -1;
}
@@ -10086,12 +10275,13 @@ var ts;
return "\\u" + paddedHexCode;
}
var nonAsciiCharacters = /[^\u0000-\u007F]/g;
- function escapeNonAsciiCharacters(s) {
+ function escapeNonAsciiString(s) {
+ s = escapeString(s);
return nonAsciiCharacters.test(s) ?
s.replace(nonAsciiCharacters, function (c) { return get16BitUnicodeEscapeSequence(c.charCodeAt(0)); }) :
s;
}
- ts.escapeNonAsciiCharacters = escapeNonAsciiCharacters;
+ ts.escapeNonAsciiString = escapeNonAsciiString;
var indentStrings = ["", " "];
function getIndentString(level) {
if (indentStrings[level] === undefined) {
@@ -10180,7 +10370,7 @@ var ts;
ts.getResolvedExternalModuleName = getResolvedExternalModuleName;
function getExternalModuleNameFromDeclaration(host, resolver, declaration) {
var file = resolver.getExternalModuleFileFromDeclaration(declaration);
- if (!file || isDeclarationFile(file)) {
+ if (!file || file.isDeclarationFile) {
return undefined;
}
return getResolvedExternalModuleName(host, file);
@@ -10232,7 +10422,7 @@ var ts;
}
ts.getSourceFilesToEmit = getSourceFilesToEmit;
function sourceFileMayBeEmitted(sourceFile, options, isSourceFileFromExternalLibrary) {
- return !(options.noEmitForJsFiles && isSourceFileJavaScript(sourceFile)) && !isDeclarationFile(sourceFile) && !isSourceFileFromExternalLibrary(sourceFile);
+ return !(options.noEmitForJsFiles && isSourceFileJavaScript(sourceFile)) && !sourceFile.isDeclarationFile && !isSourceFileFromExternalLibrary(sourceFile);
}
ts.sourceFileMayBeEmitted = sourceFileMayBeEmitted;
function forEachEmittedFile(host, action, sourceFilesOrTargetSourceFile, emitOnlyDtsFiles) {
@@ -10303,12 +10493,16 @@ var ts;
});
}
ts.getFirstConstructorWithBody = getFirstConstructorWithBody;
- function getSetAccessorTypeAnnotationNode(accessor) {
+ function getSetAccessorValueParameter(accessor) {
if (accessor && accessor.parameters.length > 0) {
var hasThis = accessor.parameters.length === 2 && parameterIsThisKeyword(accessor.parameters[0]);
- return accessor.parameters[hasThis ? 1 : 0].type;
+ return accessor.parameters[hasThis ? 1 : 0];
}
}
+ function getSetAccessorTypeAnnotationNode(accessor) {
+ var parameter = getSetAccessorValueParameter(accessor);
+ return parameter && parameter.type;
+ }
ts.getSetAccessorTypeAnnotationNode = getSetAccessorTypeAnnotationNode;
function getThisParameter(signature) {
if (signature.parameters.length) {
@@ -10379,6 +10573,39 @@ var ts;
};
}
ts.getAllAccessorDeclarations = getAllAccessorDeclarations;
+ function getEffectiveTypeAnnotationNode(node) {
+ if (node.type) {
+ return node.type;
+ }
+ if (node.flags & 65536) {
+ return getJSDocType(node);
+ }
+ }
+ ts.getEffectiveTypeAnnotationNode = getEffectiveTypeAnnotationNode;
+ function getEffectiveReturnTypeNode(node) {
+ if (node.type) {
+ return node.type;
+ }
+ if (node.flags & 65536) {
+ return getJSDocReturnType(node);
+ }
+ }
+ ts.getEffectiveReturnTypeNode = getEffectiveReturnTypeNode;
+ function getEffectiveTypeParameterDeclarations(node) {
+ if (node.typeParameters) {
+ return node.typeParameters;
+ }
+ if (node.flags & 65536) {
+ var templateTag = getJSDocTemplateTag(node);
+ return templateTag && templateTag.typeParameters;
+ }
+ }
+ ts.getEffectiveTypeParameterDeclarations = getEffectiveTypeParameterDeclarations;
+ function getEffectiveSetAccessorTypeAnnotationNode(node) {
+ var parameter = getSetAccessorValueParameter(node);
+ return parameter && getEffectiveTypeAnnotationNode(parameter);
+ }
+ ts.getEffectiveSetAccessorTypeAnnotationNode = getEffectiveSetAccessorTypeAnnotationNode;
function emitNewLineBeforeLeadingComments(lineMap, writer, node, leadingComments) {
emitNewLineBeforeLeadingCommentsOfPosition(lineMap, writer, node.pos, leadingComments);
}
@@ -10540,6 +10767,12 @@ var ts;
if (node.modifierFlagsCache & 536870912) {
return node.modifierFlagsCache & ~536870912;
}
+ var flags = getModifierFlagsNoCache(node);
+ node.modifierFlagsCache = flags | 536870912;
+ return flags;
+ }
+ ts.getModifierFlags = getModifierFlags;
+ function getModifierFlagsNoCache(node) {
var flags = 0;
if (node.modifiers) {
for (var _i = 0, _a = node.modifiers; _i < _a.length; _i++) {
@@ -10550,10 +10783,9 @@ var ts;
if (node.flags & 4 || (node.kind === 71 && node.isInJSDocNamespace)) {
flags |= 1;
}
- node.modifierFlagsCache = flags | 536870912;
return flags;
}
- ts.getModifierFlags = getModifierFlags;
+ ts.getModifierFlagsNoCache = getModifierFlagsNoCache;
function modifierToFlag(token) {
switch (token) {
case 115: return 32;
@@ -10584,17 +10816,17 @@ var ts;
function tryGetClassExtendingExpressionWithTypeArguments(node) {
if (node.kind === 201 &&
node.parent.token === 85 &&
- isClassLike(node.parent.parent)) {
+ ts.isClassLike(node.parent.parent)) {
return node.parent.parent;
}
}
ts.tryGetClassExtendingExpressionWithTypeArguments = tryGetClassExtendingExpressionWithTypeArguments;
function isAssignmentExpression(node, excludeCompoundAssignment) {
- return isBinaryExpression(node)
+ return ts.isBinaryExpression(node)
&& (excludeCompoundAssignment
? node.operatorToken.kind === 58
: isAssignmentOperator(node.operatorToken.kind))
- && isLeftHandSideExpression(node.left);
+ && ts.isLeftHandSideExpression(node.left);
}
ts.isAssignmentExpression = isAssignmentExpression;
function isDestructuringAssignment(node) {
@@ -10614,7 +10846,7 @@ var ts;
if (node.kind === 71) {
return true;
}
- else if (isPropertyAccessExpression(node)) {
+ else if (ts.isPropertyAccessExpression(node)) {
return isSupportedExpressionWithTypeArgumentsRest(node.expression);
}
else {
@@ -10631,7 +10863,7 @@ var ts;
&& node.parent
&& node.parent.token === 108
&& node.parent.parent
- && isClassLike(node.parent.parent);
+ && ts.isClassLike(node.parent.parent);
}
ts.isExpressionWithTypeArgumentsInClassImplementsClause = isExpressionWithTypeArgumentsInClassImplementsClause;
function isEntityNameExpression(node) {
@@ -10655,11 +10887,11 @@ var ts;
}
ts.isEmptyArrayLiteral = isEmptyArrayLiteral;
function getLocalSymbolForExportDefault(symbol) {
- return isExportDefaultSymbol(symbol) ? symbol.valueDeclaration.localSymbol : undefined;
+ return isExportDefaultSymbol(symbol) ? symbol.declarations[0].localSymbol : undefined;
}
ts.getLocalSymbolForExportDefault = getLocalSymbolForExportDefault;
function isExportDefaultSymbol(symbol) {
- return symbol && symbol.valueDeclaration && hasModifier(symbol.valueDeclaration, 512);
+ return symbol && ts.length(symbol.declarations) > 0 && hasModifier(symbol.declarations[0], 512);
}
function tryExtractTypeScriptExtension(fileName) {
return ts.find(ts.supportedTypescriptExtensionsForExtractExtension, function (extension) { return ts.fileExtensionIs(fileName, extension); });
@@ -10721,13 +10953,13 @@ var ts;
var carriageReturnLineFeed = "\r\n";
var lineFeed = "\n";
function getNewLineCharacter(options) {
- if (options.newLine === 0) {
- return carriageReturnLineFeed;
- }
- else if (options.newLine === 1) {
- return lineFeed;
+ switch (options.newLine) {
+ case 0:
+ return carriageReturnLineFeed;
+ case 1:
+ return lineFeed;
}
- else if (ts.sys) {
+ if (ts.sys) {
return ts.sys.newLine;
}
return carriageReturnLineFeed;
@@ -10799,27 +11031,74 @@ var ts;
}
return false;
}
- var syntaxKindCache = [];
- function formatSyntaxKind(kind) {
- var syntaxKindEnum = ts.SyntaxKind;
- if (syntaxKindEnum) {
- var cached = syntaxKindCache[kind];
- if (cached !== undefined) {
- return cached;
- }
- for (var name in syntaxKindEnum) {
- if (syntaxKindEnum[name] === kind) {
- var result = kind + " (" + name + ")";
- syntaxKindCache[kind] = result;
- return result;
+ function formatEnum(value, enumObject, isFlags) {
+ if (value === void 0) { value = 0; }
+ var members = getEnumMembers(enumObject);
+ if (value === 0) {
+ return members.length > 0 && members[0][0] === 0 ? members[0][1] : "0";
+ }
+ if (isFlags) {
+ var result = "";
+ var remainingFlags = value;
+ for (var i = members.length - 1; i >= 0 && remainingFlags !== 0; i--) {
+ var _a = members[i], enumValue = _a[0], enumName = _a[1];
+ if (enumValue !== 0 && (remainingFlags & enumValue) === enumValue) {
+ remainingFlags &= ~enumValue;
+ result = "" + enumName + (result ? ", " : "") + result;
}
}
+ if (remainingFlags === 0) {
+ return result;
+ }
}
else {
- return kind.toString();
+ for (var _i = 0, members_1 = members; _i < members_1.length; _i++) {
+ var _b = members_1[_i], enumValue = _b[0], enumName = _b[1];
+ if (enumValue === value) {
+ return enumName;
+ }
+ }
}
+ return value.toString();
+ }
+ function getEnumMembers(enumObject) {
+ var result = [];
+ for (var name in enumObject) {
+ var value = enumObject[name];
+ if (typeof value === "number") {
+ result.push([value, name]);
+ }
+ }
+ return ts.stableSort(result, function (x, y) { return ts.compareValues(x[0], y[0]); });
+ }
+ function formatSyntaxKind(kind) {
+ return formatEnum(kind, ts.SyntaxKind, false);
}
ts.formatSyntaxKind = formatSyntaxKind;
+ function formatModifierFlags(flags) {
+ return formatEnum(flags, ts.ModifierFlags, true);
+ }
+ ts.formatModifierFlags = formatModifierFlags;
+ function formatTransformFlags(flags) {
+ return formatEnum(flags, ts.TransformFlags, true);
+ }
+ ts.formatTransformFlags = formatTransformFlags;
+ function formatEmitFlags(flags) {
+ return formatEnum(flags, ts.EmitFlags, true);
+ }
+ ts.formatEmitFlags = formatEmitFlags;
+ function formatSymbolFlags(flags) {
+ return formatEnum(flags, ts.SymbolFlags, true);
+ }
+ ts.formatSymbolFlags = formatSymbolFlags;
+ function formatTypeFlags(flags) {
+ return formatEnum(flags, ts.TypeFlags, true);
+ }
+ ts.formatTypeFlags = formatTypeFlags;
+ function formatObjectFlags(flags) {
+ return formatEnum(flags, ts.ObjectFlags, true);
+ }
+ ts.formatObjectFlags = formatObjectFlags;
function getRangePos(range) {
return range ? range.pos : -1;
}
@@ -10936,23 +11215,993 @@ var ts;
return node.symbol && getDeclarationOfKind(node.symbol, kind) === node;
}
ts.isFirstDeclarationOfKind = isFirstDeclarationOfKind;
- function isNodeArray(array) {
- return array.hasOwnProperty("pos")
- && array.hasOwnProperty("end");
+ function isWatchSet(options) {
+ return options.watch && options.hasOwnProperty("watch");
}
- ts.isNodeArray = isNodeArray;
+ ts.isWatchSet = isWatchSet;
+ function getCheckFlags(symbol) {
+ return symbol.flags & 134217728 ? symbol.checkFlags : 0;
+ }
+ ts.getCheckFlags = getCheckFlags;
+ function getDeclarationModifierFlagsFromSymbol(s) {
+ 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;
+ }
+ ts.getDeclarationModifierFlagsFromSymbol = getDeclarationModifierFlagsFromSymbol;
+ function levenshtein(s1, s2) {
+ var previous = new Array(s2.length + 1);
+ var current = new Array(s2.length + 1);
+ for (var i = 0; i < s2.length + 1; i++) {
+ previous[i] = i;
+ current[i] = -1;
+ }
+ for (var i = 1; i < s1.length + 1; i++) {
+ current[0] = i;
+ for (var j = 1; j < s2.length + 1; j++) {
+ current[j] = Math.min(previous[j] + 1, current[j - 1] + 1, previous[j - 1] + (s1[i - 1] === s2[j - 1] ? 0 : 2));
+ }
+ var tmp = previous;
+ previous = current;
+ current = tmp;
+ }
+ return previous[previous.length - 1];
+ }
+ ts.levenshtein = levenshtein;
+})(ts || (ts = {}));
+(function (ts) {
+ function getDefaultLibFileName(options) {
+ switch (options.target) {
+ case 5:
+ return "lib.esnext.full.d.ts";
+ case 4:
+ return "lib.es2017.full.d.ts";
+ case 3:
+ return "lib.es2016.full.d.ts";
+ case 2:
+ return "lib.es6.d.ts";
+ default:
+ return "lib.d.ts";
+ }
+ }
+ ts.getDefaultLibFileName = getDefaultLibFileName;
+ function textSpanEnd(span) {
+ return span.start + span.length;
+ }
+ ts.textSpanEnd = textSpanEnd;
+ function textSpanIsEmpty(span) {
+ return span.length === 0;
+ }
+ ts.textSpanIsEmpty = textSpanIsEmpty;
+ function textSpanContainsPosition(span, position) {
+ return position >= span.start && position < textSpanEnd(span);
+ }
+ ts.textSpanContainsPosition = textSpanContainsPosition;
+ function textSpanContainsTextSpan(span, other) {
+ return other.start >= span.start && textSpanEnd(other) <= textSpanEnd(span);
+ }
+ ts.textSpanContainsTextSpan = textSpanContainsTextSpan;
+ function textSpanOverlapsWith(span, other) {
+ var overlapStart = Math.max(span.start, other.start);
+ var overlapEnd = Math.min(textSpanEnd(span), textSpanEnd(other));
+ return overlapStart < overlapEnd;
+ }
+ ts.textSpanOverlapsWith = textSpanOverlapsWith;
+ function textSpanOverlap(span1, span2) {
+ var overlapStart = Math.max(span1.start, span2.start);
+ var overlapEnd = Math.min(textSpanEnd(span1), textSpanEnd(span2));
+ if (overlapStart < overlapEnd) {
+ return createTextSpanFromBounds(overlapStart, overlapEnd);
+ }
+ return undefined;
+ }
+ ts.textSpanOverlap = textSpanOverlap;
+ function textSpanIntersectsWithTextSpan(span, other) {
+ return other.start <= textSpanEnd(span) && textSpanEnd(other) >= span.start;
+ }
+ ts.textSpanIntersectsWithTextSpan = textSpanIntersectsWithTextSpan;
+ function textSpanIntersectsWith(span, start, length) {
+ var end = start + length;
+ return start <= textSpanEnd(span) && end >= span.start;
+ }
+ ts.textSpanIntersectsWith = textSpanIntersectsWith;
+ function decodedTextSpanIntersectsWith(start1, length1, start2, length2) {
+ var end1 = start1 + length1;
+ var end2 = start2 + length2;
+ return start2 <= end1 && end2 >= start1;
+ }
+ ts.decodedTextSpanIntersectsWith = decodedTextSpanIntersectsWith;
+ function textSpanIntersectsWithPosition(span, position) {
+ return position <= textSpanEnd(span) && position >= span.start;
+ }
+ ts.textSpanIntersectsWithPosition = textSpanIntersectsWithPosition;
+ function textSpanIntersection(span1, span2) {
+ var intersectStart = Math.max(span1.start, span2.start);
+ var intersectEnd = Math.min(textSpanEnd(span1), textSpanEnd(span2));
+ if (intersectStart <= intersectEnd) {
+ return createTextSpanFromBounds(intersectStart, intersectEnd);
+ }
+ return undefined;
+ }
+ ts.textSpanIntersection = textSpanIntersection;
+ function createTextSpan(start, length) {
+ if (start < 0) {
+ throw new Error("start < 0");
+ }
+ if (length < 0) {
+ throw new Error("length < 0");
+ }
+ return { start: start, length: length };
+ }
+ ts.createTextSpan = createTextSpan;
+ function createTextSpanFromBounds(start, end) {
+ return createTextSpan(start, end - start);
+ }
+ ts.createTextSpanFromBounds = createTextSpanFromBounds;
+ function textChangeRangeNewSpan(range) {
+ return createTextSpan(range.span.start, range.newLength);
+ }
+ ts.textChangeRangeNewSpan = textChangeRangeNewSpan;
+ function textChangeRangeIsUnchanged(range) {
+ return textSpanIsEmpty(range.span) && range.newLength === 0;
+ }
+ ts.textChangeRangeIsUnchanged = textChangeRangeIsUnchanged;
+ function createTextChangeRange(span, newLength) {
+ if (newLength < 0) {
+ throw new Error("newLength < 0");
+ }
+ return { span: span, newLength: newLength };
+ }
+ ts.createTextChangeRange = createTextChangeRange;
+ ts.unchangedTextChangeRange = createTextChangeRange(createTextSpan(0, 0), 0);
+ function collapseTextChangeRangesAcrossMultipleVersions(changes) {
+ if (changes.length === 0) {
+ return ts.unchangedTextChangeRange;
+ }
+ if (changes.length === 1) {
+ return changes[0];
+ }
+ var change0 = changes[0];
+ var oldStartN = change0.span.start;
+ var oldEndN = textSpanEnd(change0.span);
+ var newEndN = oldStartN + change0.newLength;
+ for (var i = 1; i < changes.length; i++) {
+ var nextChange = changes[i];
+ var oldStart1 = oldStartN;
+ var oldEnd1 = oldEndN;
+ var newEnd1 = newEndN;
+ var oldStart2 = nextChange.span.start;
+ var oldEnd2 = textSpanEnd(nextChange.span);
+ var newEnd2 = oldStart2 + nextChange.newLength;
+ oldStartN = Math.min(oldStart1, oldStart2);
+ oldEndN = Math.max(oldEnd1, oldEnd1 + (oldEnd2 - newEnd1));
+ newEndN = Math.max(newEnd2, newEnd2 + (newEnd1 - oldEnd2));
+ }
+ return createTextChangeRange(createTextSpanFromBounds(oldStartN, oldEndN), newEndN - oldStartN);
+ }
+ ts.collapseTextChangeRangesAcrossMultipleVersions = collapseTextChangeRangesAcrossMultipleVersions;
+ function getTypeParameterOwner(d) {
+ if (d && d.kind === 145) {
+ for (var current = d; current; current = current.parent) {
+ if (ts.isFunctionLike(current) || ts.isClassLike(current) || current.kind === 230) {
+ return current;
+ }
+ }
+ }
+ }
+ ts.getTypeParameterOwner = getTypeParameterOwner;
+ function isParameterPropertyDeclaration(node) {
+ return ts.hasModifier(node, 92) && node.parent.kind === 152 && ts.isClassLike(node.parent.parent);
+ }
+ ts.isParameterPropertyDeclaration = isParameterPropertyDeclaration;
+ function walkUpBindingElementsAndPatterns(node) {
+ while (node && (node.kind === 176 || ts.isBindingPattern(node))) {
+ node = node.parent;
+ }
+ return node;
+ }
+ function getCombinedModifierFlags(node) {
+ node = walkUpBindingElementsAndPatterns(node);
+ var flags = ts.getModifierFlags(node);
+ if (node.kind === 226) {
+ node = node.parent;
+ }
+ if (node && node.kind === 227) {
+ flags |= ts.getModifierFlags(node);
+ node = node.parent;
+ }
+ if (node && node.kind === 208) {
+ flags |= ts.getModifierFlags(node);
+ }
+ return flags;
+ }
+ ts.getCombinedModifierFlags = getCombinedModifierFlags;
+ function getCombinedNodeFlags(node) {
+ node = walkUpBindingElementsAndPatterns(node);
+ var flags = node.flags;
+ if (node.kind === 226) {
+ node = node.parent;
+ }
+ if (node && node.kind === 227) {
+ flags |= node.flags;
+ node = node.parent;
+ }
+ if (node && node.kind === 208) {
+ flags |= node.flags;
+ }
+ return flags;
+ }
+ ts.getCombinedNodeFlags = getCombinedNodeFlags;
+ function validateLocaleAndSetLanguage(locale, sys, errors) {
+ var matchResult = /^([a-z]+)([_\-]([a-z]+))?$/.exec(locale.toLowerCase());
+ if (!matchResult) {
+ if (errors) {
+ errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1, "en", "ja-jp"));
+ }
+ return;
+ }
+ var language = matchResult[1];
+ var territory = matchResult[3];
+ if (!trySetLanguageAndTerritory(language, territory, errors)) {
+ trySetLanguageAndTerritory(language, undefined, errors);
+ }
+ function trySetLanguageAndTerritory(language, territory, errors) {
+ var compilerFilePath = ts.normalizePath(sys.getExecutingFilePath());
+ var containingDirectoryPath = ts.getDirectoryPath(compilerFilePath);
+ var filePath = ts.combinePaths(containingDirectoryPath, language);
+ if (territory) {
+ filePath = filePath + "-" + territory;
+ }
+ filePath = sys.resolvePath(ts.combinePaths(filePath, "diagnosticMessages.generated.json"));
+ if (!sys.fileExists(filePath)) {
+ return false;
+ }
+ var fileContents = "";
+ try {
+ fileContents = sys.readFile(filePath);
+ }
+ catch (e) {
+ if (errors) {
+ errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Unable_to_open_file_0, filePath));
+ }
+ return false;
+ }
+ try {
+ ts.localizedDiagnosticMessages = JSON.parse(fileContents);
+ }
+ catch (e) {
+ if (errors) {
+ errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Corrupted_locale_file_0, filePath));
+ }
+ return false;
+ }
+ return true;
+ }
+ }
+ 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;
+ function getNameOfDeclaration(declaration) {
+ if (!declaration) {
+ return undefined;
+ }
+ if (declaration.kind === 194) {
+ var expr = declaration;
+ switch (ts.getSpecialPropertyAssignmentKind(expr)) {
+ case 1:
+ case 4:
+ case 5:
+ case 3:
+ return expr.left.name;
+ default:
+ return undefined;
+ }
+ }
+ else {
+ return declaration.name;
+ }
+ }
+ ts.getNameOfDeclaration = getNameOfDeclaration;
+})(ts || (ts = {}));
+(function (ts) {
+ function isNumericLiteral(node) {
+ return node.kind === 8;
+ }
+ ts.isNumericLiteral = isNumericLiteral;
+ function isStringLiteral(node) {
+ return node.kind === 9;
+ }
+ ts.isStringLiteral = isStringLiteral;
+ function isJsxText(node) {
+ return node.kind === 10;
+ }
+ ts.isJsxText = isJsxText;
+ function isRegularExpressionLiteral(node) {
+ return node.kind === 12;
+ }
+ ts.isRegularExpressionLiteral = isRegularExpressionLiteral;
function isNoSubstitutionTemplateLiteral(node) {
return node.kind === 13;
}
ts.isNoSubstitutionTemplateLiteral = isNoSubstitutionTemplateLiteral;
+ function isTemplateHead(node) {
+ return node.kind === 14;
+ }
+ ts.isTemplateHead = isTemplateHead;
+ function isTemplateMiddle(node) {
+ return node.kind === 15;
+ }
+ ts.isTemplateMiddle = isTemplateMiddle;
+ function isTemplateTail(node) {
+ return node.kind === 16;
+ }
+ ts.isTemplateTail = isTemplateTail;
+ function isIdentifier(node) {
+ return node.kind === 71;
+ }
+ ts.isIdentifier = isIdentifier;
+ function isQualifiedName(node) {
+ return node.kind === 143;
+ }
+ ts.isQualifiedName = isQualifiedName;
+ function isComputedPropertyName(node) {
+ return node.kind === 144;
+ }
+ ts.isComputedPropertyName = isComputedPropertyName;
+ function isTypeParameterDeclaration(node) {
+ return node.kind === 145;
+ }
+ ts.isTypeParameterDeclaration = isTypeParameterDeclaration;
+ function isParameter(node) {
+ return node.kind === 146;
+ }
+ ts.isParameter = isParameter;
+ function isDecorator(node) {
+ return node.kind === 147;
+ }
+ ts.isDecorator = isDecorator;
+ function isPropertySignature(node) {
+ return node.kind === 148;
+ }
+ ts.isPropertySignature = isPropertySignature;
+ function isPropertyDeclaration(node) {
+ return node.kind === 149;
+ }
+ ts.isPropertyDeclaration = isPropertyDeclaration;
+ function isMethodSignature(node) {
+ return node.kind === 150;
+ }
+ ts.isMethodSignature = isMethodSignature;
+ function isMethodDeclaration(node) {
+ return node.kind === 151;
+ }
+ ts.isMethodDeclaration = isMethodDeclaration;
+ function isConstructorDeclaration(node) {
+ return node.kind === 152;
+ }
+ ts.isConstructorDeclaration = isConstructorDeclaration;
+ function isGetAccessorDeclaration(node) {
+ return node.kind === 153;
+ }
+ ts.isGetAccessorDeclaration = isGetAccessorDeclaration;
+ function isSetAccessorDeclaration(node) {
+ return node.kind === 154;
+ }
+ ts.isSetAccessorDeclaration = isSetAccessorDeclaration;
+ function isCallSignatureDeclaration(node) {
+ return node.kind === 155;
+ }
+ ts.isCallSignatureDeclaration = isCallSignatureDeclaration;
+ function isConstructSignatureDeclaration(node) {
+ return node.kind === 156;
+ }
+ ts.isConstructSignatureDeclaration = isConstructSignatureDeclaration;
+ function isIndexSignatureDeclaration(node) {
+ return node.kind === 157;
+ }
+ ts.isIndexSignatureDeclaration = isIndexSignatureDeclaration;
+ function isTypePredicateNode(node) {
+ return node.kind === 158;
+ }
+ ts.isTypePredicateNode = isTypePredicateNode;
+ function isTypeReferenceNode(node) {
+ return node.kind === 159;
+ }
+ ts.isTypeReferenceNode = isTypeReferenceNode;
+ function isFunctionTypeNode(node) {
+ return node.kind === 160;
+ }
+ ts.isFunctionTypeNode = isFunctionTypeNode;
+ function isConstructorTypeNode(node) {
+ return node.kind === 161;
+ }
+ ts.isConstructorTypeNode = isConstructorTypeNode;
+ function isTypeQueryNode(node) {
+ return node.kind === 162;
+ }
+ ts.isTypeQueryNode = isTypeQueryNode;
+ function isTypeLiteralNode(node) {
+ return node.kind === 163;
+ }
+ ts.isTypeLiteralNode = isTypeLiteralNode;
+ function isArrayTypeNode(node) {
+ return node.kind === 164;
+ }
+ ts.isArrayTypeNode = isArrayTypeNode;
+ function isTupleTypeNode(node) {
+ return node.kind === 165;
+ }
+ ts.isTupleTypeNode = isTupleTypeNode;
+ function isUnionTypeNode(node) {
+ return node.kind === 166;
+ }
+ ts.isUnionTypeNode = isUnionTypeNode;
+ function isIntersectionTypeNode(node) {
+ return node.kind === 167;
+ }
+ ts.isIntersectionTypeNode = isIntersectionTypeNode;
+ function isParenthesizedTypeNode(node) {
+ return node.kind === 168;
+ }
+ ts.isParenthesizedTypeNode = isParenthesizedTypeNode;
+ function isThisTypeNode(node) {
+ return node.kind === 169;
+ }
+ ts.isThisTypeNode = isThisTypeNode;
+ function isTypeOperatorNode(node) {
+ return node.kind === 170;
+ }
+ ts.isTypeOperatorNode = isTypeOperatorNode;
+ function isIndexedAccessTypeNode(node) {
+ return node.kind === 171;
+ }
+ ts.isIndexedAccessTypeNode = isIndexedAccessTypeNode;
+ function isMappedTypeNode(node) {
+ return node.kind === 172;
+ }
+ ts.isMappedTypeNode = isMappedTypeNode;
+ function isLiteralTypeNode(node) {
+ return node.kind === 173;
+ }
+ ts.isLiteralTypeNode = isLiteralTypeNode;
+ function isObjectBindingPattern(node) {
+ return node.kind === 174;
+ }
+ ts.isObjectBindingPattern = isObjectBindingPattern;
+ function isArrayBindingPattern(node) {
+ return node.kind === 175;
+ }
+ ts.isArrayBindingPattern = isArrayBindingPattern;
+ function isBindingElement(node) {
+ return node.kind === 176;
+ }
+ ts.isBindingElement = isBindingElement;
+ function isArrayLiteralExpression(node) {
+ return node.kind === 177;
+ }
+ ts.isArrayLiteralExpression = isArrayLiteralExpression;
+ function isObjectLiteralExpression(node) {
+ return node.kind === 178;
+ }
+ ts.isObjectLiteralExpression = isObjectLiteralExpression;
+ function isPropertyAccessExpression(node) {
+ return node.kind === 179;
+ }
+ ts.isPropertyAccessExpression = isPropertyAccessExpression;
+ function isElementAccessExpression(node) {
+ return node.kind === 180;
+ }
+ ts.isElementAccessExpression = isElementAccessExpression;
+ function isCallExpression(node) {
+ return node.kind === 181;
+ }
+ ts.isCallExpression = isCallExpression;
+ function isNewExpression(node) {
+ return node.kind === 182;
+ }
+ ts.isNewExpression = isNewExpression;
+ function isTaggedTemplateExpression(node) {
+ return node.kind === 183;
+ }
+ ts.isTaggedTemplateExpression = isTaggedTemplateExpression;
+ function isTypeAssertion(node) {
+ return node.kind === 184;
+ }
+ ts.isTypeAssertion = isTypeAssertion;
+ function isParenthesizedExpression(node) {
+ return node.kind === 185;
+ }
+ ts.isParenthesizedExpression = isParenthesizedExpression;
+ function isFunctionExpression(node) {
+ return node.kind === 186;
+ }
+ ts.isFunctionExpression = isFunctionExpression;
+ function isArrowFunction(node) {
+ return node.kind === 187;
+ }
+ ts.isArrowFunction = isArrowFunction;
+ function isDeleteExpression(node) {
+ return node.kind === 188;
+ }
+ ts.isDeleteExpression = isDeleteExpression;
+ function isTypeOfExpression(node) {
+ return node.kind === 191;
+ }
+ ts.isTypeOfExpression = isTypeOfExpression;
+ function isVoidExpression(node) {
+ return node.kind === 190;
+ }
+ ts.isVoidExpression = isVoidExpression;
+ function isAwaitExpression(node) {
+ return node.kind === 191;
+ }
+ ts.isAwaitExpression = isAwaitExpression;
+ function isPrefixUnaryExpression(node) {
+ return node.kind === 192;
+ }
+ ts.isPrefixUnaryExpression = isPrefixUnaryExpression;
+ function isPostfixUnaryExpression(node) {
+ return node.kind === 193;
+ }
+ ts.isPostfixUnaryExpression = isPostfixUnaryExpression;
+ function isBinaryExpression(node) {
+ return node.kind === 194;
+ }
+ ts.isBinaryExpression = isBinaryExpression;
+ function isConditionalExpression(node) {
+ return node.kind === 195;
+ }
+ ts.isConditionalExpression = isConditionalExpression;
+ function isTemplateExpression(node) {
+ return node.kind === 196;
+ }
+ ts.isTemplateExpression = isTemplateExpression;
+ function isYieldExpression(node) {
+ return node.kind === 197;
+ }
+ ts.isYieldExpression = isYieldExpression;
+ function isSpreadElement(node) {
+ return node.kind === 198;
+ }
+ ts.isSpreadElement = isSpreadElement;
+ function isClassExpression(node) {
+ return node.kind === 199;
+ }
+ ts.isClassExpression = isClassExpression;
+ function isOmittedExpression(node) {
+ return node.kind === 200;
+ }
+ ts.isOmittedExpression = isOmittedExpression;
+ function isExpressionWithTypeArguments(node) {
+ return node.kind === 201;
+ }
+ ts.isExpressionWithTypeArguments = isExpressionWithTypeArguments;
+ function isAsExpression(node) {
+ return node.kind === 202;
+ }
+ ts.isAsExpression = isAsExpression;
+ function isNonNullExpression(node) {
+ return node.kind === 203;
+ }
+ ts.isNonNullExpression = isNonNullExpression;
+ function isMetaProperty(node) {
+ return node.kind === 204;
+ }
+ ts.isMetaProperty = isMetaProperty;
+ function isTemplateSpan(node) {
+ return node.kind === 205;
+ }
+ ts.isTemplateSpan = isTemplateSpan;
+ function isSemicolonClassElement(node) {
+ return node.kind === 206;
+ }
+ ts.isSemicolonClassElement = isSemicolonClassElement;
+ function isBlock(node) {
+ return node.kind === 207;
+ }
+ ts.isBlock = isBlock;
+ function isVariableStatement(node) {
+ return node.kind === 208;
+ }
+ ts.isVariableStatement = isVariableStatement;
+ function isEmptyStatement(node) {
+ return node.kind === 209;
+ }
+ ts.isEmptyStatement = isEmptyStatement;
+ function isExpressionStatement(node) {
+ return node.kind === 210;
+ }
+ ts.isExpressionStatement = isExpressionStatement;
+ function isIfStatement(node) {
+ return node.kind === 211;
+ }
+ ts.isIfStatement = isIfStatement;
+ function isDoStatement(node) {
+ return node.kind === 212;
+ }
+ ts.isDoStatement = isDoStatement;
+ function isWhileStatement(node) {
+ return node.kind === 213;
+ }
+ ts.isWhileStatement = isWhileStatement;
+ function isForStatement(node) {
+ return node.kind === 214;
+ }
+ ts.isForStatement = isForStatement;
+ function isForInStatement(node) {
+ return node.kind === 215;
+ }
+ ts.isForInStatement = isForInStatement;
+ function isForOfStatement(node) {
+ return node.kind === 216;
+ }
+ ts.isForOfStatement = isForOfStatement;
+ function isContinueStatement(node) {
+ return node.kind === 217;
+ }
+ ts.isContinueStatement = isContinueStatement;
+ function isBreakStatement(node) {
+ return node.kind === 218;
+ }
+ ts.isBreakStatement = isBreakStatement;
+ function isReturnStatement(node) {
+ return node.kind === 219;
+ }
+ ts.isReturnStatement = isReturnStatement;
+ function isWithStatement(node) {
+ return node.kind === 220;
+ }
+ ts.isWithStatement = isWithStatement;
+ function isSwitchStatement(node) {
+ return node.kind === 221;
+ }
+ ts.isSwitchStatement = isSwitchStatement;
+ function isLabeledStatement(node) {
+ return node.kind === 222;
+ }
+ ts.isLabeledStatement = isLabeledStatement;
+ function isThrowStatement(node) {
+ return node.kind === 223;
+ }
+ ts.isThrowStatement = isThrowStatement;
+ function isTryStatement(node) {
+ return node.kind === 224;
+ }
+ ts.isTryStatement = isTryStatement;
+ function isDebuggerStatement(node) {
+ return node.kind === 225;
+ }
+ ts.isDebuggerStatement = isDebuggerStatement;
+ function isVariableDeclaration(node) {
+ return node.kind === 226;
+ }
+ ts.isVariableDeclaration = isVariableDeclaration;
+ function isVariableDeclarationList(node) {
+ return node.kind === 227;
+ }
+ ts.isVariableDeclarationList = isVariableDeclarationList;
+ function isFunctionDeclaration(node) {
+ return node.kind === 228;
+ }
+ ts.isFunctionDeclaration = isFunctionDeclaration;
+ function isClassDeclaration(node) {
+ return node.kind === 229;
+ }
+ ts.isClassDeclaration = isClassDeclaration;
+ function isInterfaceDeclaration(node) {
+ return node.kind === 230;
+ }
+ ts.isInterfaceDeclaration = isInterfaceDeclaration;
+ function isTypeAliasDeclaration(node) {
+ return node.kind === 231;
+ }
+ ts.isTypeAliasDeclaration = isTypeAliasDeclaration;
+ function isEnumDeclaration(node) {
+ return node.kind === 232;
+ }
+ ts.isEnumDeclaration = isEnumDeclaration;
+ function isModuleDeclaration(node) {
+ return node.kind === 233;
+ }
+ ts.isModuleDeclaration = isModuleDeclaration;
+ function isModuleBlock(node) {
+ return node.kind === 234;
+ }
+ ts.isModuleBlock = isModuleBlock;
+ function isCaseBlock(node) {
+ return node.kind === 235;
+ }
+ ts.isCaseBlock = isCaseBlock;
+ function isNamespaceExportDeclaration(node) {
+ return node.kind === 236;
+ }
+ ts.isNamespaceExportDeclaration = isNamespaceExportDeclaration;
+ function isImportEqualsDeclaration(node) {
+ return node.kind === 237;
+ }
+ ts.isImportEqualsDeclaration = isImportEqualsDeclaration;
+ function isImportDeclaration(node) {
+ return node.kind === 238;
+ }
+ ts.isImportDeclaration = isImportDeclaration;
+ function isImportClause(node) {
+ return node.kind === 239;
+ }
+ ts.isImportClause = isImportClause;
+ function isNamespaceImport(node) {
+ return node.kind === 240;
+ }
+ ts.isNamespaceImport = isNamespaceImport;
+ function isNamedImports(node) {
+ return node.kind === 241;
+ }
+ ts.isNamedImports = isNamedImports;
+ function isImportSpecifier(node) {
+ return node.kind === 242;
+ }
+ ts.isImportSpecifier = isImportSpecifier;
+ function isExportAssignment(node) {
+ return node.kind === 243;
+ }
+ ts.isExportAssignment = isExportAssignment;
+ function isExportDeclaration(node) {
+ return node.kind === 244;
+ }
+ ts.isExportDeclaration = isExportDeclaration;
+ function isNamedExports(node) {
+ return node.kind === 245;
+ }
+ ts.isNamedExports = isNamedExports;
+ function isExportSpecifier(node) {
+ return node.kind === 246;
+ }
+ ts.isExportSpecifier = isExportSpecifier;
+ function isMissingDeclaration(node) {
+ return node.kind === 247;
+ }
+ ts.isMissingDeclaration = isMissingDeclaration;
+ function isExternalModuleReference(node) {
+ return node.kind === 248;
+ }
+ ts.isExternalModuleReference = isExternalModuleReference;
+ function isJsxElement(node) {
+ return node.kind === 249;
+ }
+ ts.isJsxElement = isJsxElement;
+ function isJsxSelfClosingElement(node) {
+ return node.kind === 250;
+ }
+ ts.isJsxSelfClosingElement = isJsxSelfClosingElement;
+ function isJsxOpeningElement(node) {
+ return node.kind === 251;
+ }
+ ts.isJsxOpeningElement = isJsxOpeningElement;
+ function isJsxClosingElement(node) {
+ return node.kind === 252;
+ }
+ ts.isJsxClosingElement = isJsxClosingElement;
+ function isJsxAttribute(node) {
+ return node.kind === 253;
+ }
+ ts.isJsxAttribute = isJsxAttribute;
+ function isJsxAttributes(node) {
+ return node.kind === 254;
+ }
+ ts.isJsxAttributes = isJsxAttributes;
+ function isJsxSpreadAttribute(node) {
+ return node.kind === 255;
+ }
+ ts.isJsxSpreadAttribute = isJsxSpreadAttribute;
+ function isJsxExpression(node) {
+ return node.kind === 256;
+ }
+ ts.isJsxExpression = isJsxExpression;
+ function isCaseClause(node) {
+ return node.kind === 257;
+ }
+ ts.isCaseClause = isCaseClause;
+ function isDefaultClause(node) {
+ return node.kind === 258;
+ }
+ ts.isDefaultClause = isDefaultClause;
+ function isHeritageClause(node) {
+ return node.kind === 259;
+ }
+ ts.isHeritageClause = isHeritageClause;
+ function isCatchClause(node) {
+ return node.kind === 260;
+ }
+ ts.isCatchClause = isCatchClause;
+ function isPropertyAssignment(node) {
+ return node.kind === 261;
+ }
+ ts.isPropertyAssignment = isPropertyAssignment;
+ function isShorthandPropertyAssignment(node) {
+ return node.kind === 262;
+ }
+ ts.isShorthandPropertyAssignment = isShorthandPropertyAssignment;
+ function isSpreadAssignment(node) {
+ return node.kind === 263;
+ }
+ ts.isSpreadAssignment = isSpreadAssignment;
+ function isEnumMember(node) {
+ return node.kind === 264;
+ }
+ ts.isEnumMember = isEnumMember;
+ function isSourceFile(node) {
+ return node.kind === 265;
+ }
+ ts.isSourceFile = isSourceFile;
+ function isBundle(node) {
+ return node.kind === 266;
+ }
+ ts.isBundle = isBundle;
+ function isJSDocTypeExpression(node) {
+ return node.kind === 267;
+ }
+ ts.isJSDocTypeExpression = isJSDocTypeExpression;
+ function isJSDocAllType(node) {
+ return node.kind === 268;
+ }
+ ts.isJSDocAllType = isJSDocAllType;
+ function isJSDocUnknownType(node) {
+ return node.kind === 269;
+ }
+ ts.isJSDocUnknownType = isJSDocUnknownType;
+ function isJSDocArrayType(node) {
+ return node.kind === 270;
+ }
+ ts.isJSDocArrayType = isJSDocArrayType;
+ function isJSDocUnionType(node) {
+ return node.kind === 271;
+ }
+ ts.isJSDocUnionType = isJSDocUnionType;
+ function isJSDocTupleType(node) {
+ return node.kind === 272;
+ }
+ ts.isJSDocTupleType = isJSDocTupleType;
+ function isJSDocNullableType(node) {
+ return node.kind === 273;
+ }
+ ts.isJSDocNullableType = isJSDocNullableType;
+ function isJSDocNonNullableType(node) {
+ return node.kind === 274;
+ }
+ ts.isJSDocNonNullableType = isJSDocNonNullableType;
+ function isJSDocRecordType(node) {
+ return node.kind === 275;
+ }
+ ts.isJSDocRecordType = isJSDocRecordType;
+ function isJSDocRecordMember(node) {
+ return node.kind === 276;
+ }
+ ts.isJSDocRecordMember = isJSDocRecordMember;
+ function isJSDocTypeReference(node) {
+ return node.kind === 277;
+ }
+ ts.isJSDocTypeReference = isJSDocTypeReference;
+ function isJSDocOptionalType(node) {
+ return node.kind === 278;
+ }
+ ts.isJSDocOptionalType = isJSDocOptionalType;
+ function isJSDocFunctionType(node) {
+ return node.kind === 279;
+ }
+ ts.isJSDocFunctionType = isJSDocFunctionType;
+ function isJSDocVariadicType(node) {
+ return node.kind === 280;
+ }
+ ts.isJSDocVariadicType = isJSDocVariadicType;
+ function isJSDocConstructorType(node) {
+ return node.kind === 281;
+ }
+ ts.isJSDocConstructorType = isJSDocConstructorType;
+ function isJSDocThisType(node) {
+ return node.kind === 282;
+ }
+ ts.isJSDocThisType = isJSDocThisType;
+ function isJSDoc(node) {
+ return node.kind === 283;
+ }
+ ts.isJSDoc = isJSDoc;
+ function isJSDocAugmentsTag(node) {
+ return node.kind === 285;
+ }
+ ts.isJSDocAugmentsTag = isJSDocAugmentsTag;
+ function isJSDocParameterTag(node) {
+ return node.kind === 287;
+ }
+ ts.isJSDocParameterTag = isJSDocParameterTag;
+ function isJSDocReturnTag(node) {
+ return node.kind === 288;
+ }
+ ts.isJSDocReturnTag = isJSDocReturnTag;
+ function isJSDocTypeTag(node) {
+ return node.kind === 289;
+ }
+ ts.isJSDocTypeTag = isJSDocTypeTag;
+ function isJSDocTemplateTag(node) {
+ return node.kind === 290;
+ }
+ ts.isJSDocTemplateTag = isJSDocTemplateTag;
+ function isJSDocTypedefTag(node) {
+ return node.kind === 291;
+ }
+ ts.isJSDocTypedefTag = isJSDocTypedefTag;
+ function isJSDocPropertyTag(node) {
+ return node.kind === 292;
+ }
+ ts.isJSDocPropertyTag = isJSDocPropertyTag;
+ function isJSDocTypeLiteral(node) {
+ return node.kind === 293;
+ }
+ ts.isJSDocTypeLiteral = isJSDocTypeLiteral;
+ function isJSDocLiteralType(node) {
+ return node.kind === 294;
+ }
+ ts.isJSDocLiteralType = isJSDocLiteralType;
+})(ts || (ts = {}));
+(function (ts) {
+ function isNode(node) {
+ return isNodeKind(node.kind);
+ }
+ ts.isNode = isNode;
+ function isNodeKind(kind) {
+ return kind >= 143;
+ }
+ ts.isNodeKind = isNodeKind;
+ function isToken(n) {
+ return n.kind >= 0 && n.kind <= 142;
+ }
+ ts.isToken = isToken;
+ function isNodeArray(array) {
+ return array.hasOwnProperty("pos")
+ && array.hasOwnProperty("end");
+ }
+ ts.isNodeArray = isNodeArray;
function isLiteralKind(kind) {
return 8 <= kind && kind <= 13;
}
ts.isLiteralKind = isLiteralKind;
- function isTextualLiteralKind(kind) {
- return kind === 9 || kind === 13;
- }
- ts.isTextualLiteralKind = isTextualLiteralKind;
function isLiteralExpression(node) {
return isLiteralKind(node.kind);
}
@@ -10961,40 +12210,38 @@ var ts;
return 13 <= kind && kind <= 16;
}
ts.isTemplateLiteralKind = isTemplateLiteralKind;
- function isTemplateHead(node) {
- return node.kind === 14;
- }
- ts.isTemplateHead = isTemplateHead;
function isTemplateMiddleOrTemplateTail(node) {
var kind = node.kind;
return kind === 15
|| kind === 16;
}
ts.isTemplateMiddleOrTemplateTail = isTemplateMiddleOrTemplateTail;
- function isIdentifier(node) {
- return node.kind === 71;
- }
- ts.isIdentifier = isIdentifier;
- function isVoidExpression(node) {
- return node.kind === 190;
- }
- ts.isVoidExpression = isVoidExpression;
function isGeneratedIdentifier(node) {
- return isIdentifier(node) && node.autoGenerateKind > 0;
+ return ts.isIdentifier(node) && node.autoGenerateKind > 0;
}
ts.isGeneratedIdentifier = isGeneratedIdentifier;
+ function isModifierKind(token) {
+ switch (token) {
+ case 117:
+ case 120:
+ case 76:
+ case 124:
+ case 79:
+ case 84:
+ case 114:
+ case 112:
+ case 113:
+ case 131:
+ case 115:
+ return true;
+ }
+ return false;
+ }
+ ts.isModifierKind = isModifierKind;
function isModifier(node) {
return isModifierKind(node.kind);
}
ts.isModifier = isModifier;
- function isQualifiedName(node) {
- return node.kind === 143;
- }
- ts.isQualifiedName = isQualifiedName;
- function isComputedPropertyName(node) {
- return node.kind === 144;
- }
- ts.isComputedPropertyName = isComputedPropertyName;
function isEntityName(node) {
var kind = node.kind;
return kind === 143
@@ -11009,12 +12256,6 @@ var ts;
|| kind === 144;
}
ts.isPropertyName = isPropertyName;
- function isModuleName(node) {
- var kind = node.kind;
- return kind === 71
- || kind === 9;
- }
- ts.isModuleName = isModuleName;
function isBindingName(node) {
var kind = node.kind;
return kind === 71
@@ -11022,22 +12263,30 @@ var ts;
|| kind === 175;
}
ts.isBindingName = isBindingName;
- function isTypeParameter(node) {
- return node.kind === 145;
- }
- ts.isTypeParameter = isTypeParameter;
- function isParameter(node) {
- return node.kind === 146;
- }
- ts.isParameter = isParameter;
- function isDecorator(node) {
- return node.kind === 147;
+ function isFunctionLike(node) {
+ return node && isFunctionLikeKind(node.kind);
}
- ts.isDecorator = isDecorator;
- function isMethodDeclaration(node) {
- return node.kind === 151;
+ ts.isFunctionLike = isFunctionLike;
+ function isFunctionLikeKind(kind) {
+ switch (kind) {
+ case 152:
+ case 186:
+ case 228:
+ case 187:
+ case 151:
+ case 150:
+ case 153:
+ case 154:
+ case 155:
+ case 156:
+ case 157:
+ case 160:
+ case 161:
+ return true;
+ }
+ return false;
}
- ts.isMethodDeclaration = isMethodDeclaration;
+ ts.isFunctionLikeKind = isFunctionLikeKind;
function isClassElement(node) {
var kind = node.kind;
return kind === 152
@@ -11046,9 +12295,28 @@ var ts;
|| kind === 153
|| kind === 154
|| kind === 157
- || kind === 206;
+ || kind === 206
+ || kind === 247;
}
ts.isClassElement = isClassElement;
+ function isClassLike(node) {
+ return node && (node.kind === 229 || node.kind === 199);
+ }
+ ts.isClassLike = isClassLike;
+ function isAccessor(node) {
+ return node && (node.kind === 153 || node.kind === 154);
+ }
+ ts.isAccessor = isAccessor;
+ function isTypeElement(node) {
+ var kind = node.kind;
+ return kind === 156
+ || kind === 155
+ || kind === 148
+ || kind === 150
+ || kind === 157
+ || kind === 247;
+ }
+ ts.isTypeElement = isTypeElement;
function isObjectLiteralElementLike(node) {
var kind = node.kind;
return kind === 261
@@ -11079,14 +12347,15 @@ var ts;
return isTypeNodeKind(node.kind);
}
ts.isTypeNode = isTypeNode;
- function isArrayBindingPattern(node) {
- return node.kind === 175;
- }
- ts.isArrayBindingPattern = isArrayBindingPattern;
- function isObjectBindingPattern(node) {
- return node.kind === 174;
+ function isFunctionOrConstructorTypeNode(node) {
+ switch (node.kind) {
+ case 160:
+ case 161:
+ return true;
+ }
+ return false;
}
- ts.isObjectBindingPattern = isObjectBindingPattern;
+ ts.isFunctionOrConstructorTypeNode = isFunctionOrConstructorTypeNode;
function isBindingPattern(node) {
if (node) {
var kind = node.kind;
@@ -11102,10 +12371,6 @@ var ts;
|| kind === 178;
}
ts.isAssignmentPattern = isAssignmentPattern;
- function isBindingElement(node) {
- return node.kind === 176;
- }
- ts.isBindingElement = isBindingElement;
function isArrayBindingElement(node) {
var kind = node.kind;
return kind === 176
@@ -11145,54 +12410,36 @@ var ts;
return false;
}
ts.isArrayBindingOrAssignmentPattern = isArrayBindingOrAssignmentPattern;
- function isArrayLiteralExpression(node) {
- return node.kind === 177;
- }
- ts.isArrayLiteralExpression = isArrayLiteralExpression;
- function isObjectLiteralExpression(node) {
- return node.kind === 178;
- }
- ts.isObjectLiteralExpression = isObjectLiteralExpression;
- function isPropertyAccessExpression(node) {
- return node.kind === 179;
- }
- ts.isPropertyAccessExpression = isPropertyAccessExpression;
function isPropertyAccessOrQualifiedName(node) {
var kind = node.kind;
return kind === 179
|| kind === 143;
}
ts.isPropertyAccessOrQualifiedName = isPropertyAccessOrQualifiedName;
- function isElementAccessExpression(node) {
- return node.kind === 180;
- }
- ts.isElementAccessExpression = isElementAccessExpression;
- function isBinaryExpression(node) {
- return node.kind === 194;
- }
- ts.isBinaryExpression = isBinaryExpression;
- function isConditionalExpression(node) {
- return node.kind === 195;
+ function isCallLikeExpression(node) {
+ switch (node.kind) {
+ case 251:
+ case 250:
+ case 181:
+ case 182:
+ case 183:
+ case 147:
+ return true;
+ default:
+ return false;
+ }
}
- ts.isConditionalExpression = isConditionalExpression;
- function isCallExpression(node) {
- return node.kind === 181;
+ ts.isCallLikeExpression = isCallLikeExpression;
+ function isCallOrNewExpression(node) {
+ return node.kind === 181 || node.kind === 182;
}
- ts.isCallExpression = isCallExpression;
+ ts.isCallOrNewExpression = isCallOrNewExpression;
function isTemplateLiteral(node) {
var kind = node.kind;
return kind === 196
|| kind === 13;
}
ts.isTemplateLiteral = isTemplateLiteral;
- function isSpreadExpression(node) {
- return node.kind === 198;
- }
- ts.isSpreadExpression = isSpreadExpression;
- function isExpressionWithTypeArguments(node) {
- return node.kind === 201;
- }
- ts.isExpressionWithTypeArguments = isExpressionWithTypeArguments;
function isLeftHandSideExpressionKind(kind) {
return kind === 179
|| kind === 180
@@ -11246,6 +12493,7 @@ var ts;
|| kind === 198
|| kind === 202
|| kind === 200
+ || kind === 298
|| isUnaryExpressionKind(kind);
}
function isExpression(node) {
@@ -11259,11 +12507,11 @@ var ts;
}
ts.isAssertionExpression = isAssertionExpression;
function isPartiallyEmittedExpression(node) {
- return node.kind === 296;
+ return node.kind === 297;
}
ts.isPartiallyEmittedExpression = isPartiallyEmittedExpression;
function isNotEmittedStatement(node) {
- return node.kind === 295;
+ return node.kind === 296;
}
ts.isNotEmittedStatement = isNotEmittedStatement;
function isNotEmittedOrPartiallyEmittedNode(node) {
@@ -11271,44 +12519,38 @@ var ts;
|| isPartiallyEmittedExpression(node);
}
ts.isNotEmittedOrPartiallyEmittedNode = isNotEmittedOrPartiallyEmittedNode;
- function isOmittedExpression(node) {
- return node.kind === 200;
- }
- ts.isOmittedExpression = isOmittedExpression;
- function isTemplateSpan(node) {
- return node.kind === 205;
+ function isIterationStatement(node, lookInLabeledStatements) {
+ switch (node.kind) {
+ case 214:
+ case 215:
+ case 216:
+ case 212:
+ case 213:
+ return true;
+ case 222:
+ return lookInLabeledStatements && isIterationStatement(node.statement, lookInLabeledStatements);
+ }
+ return false;
}
- ts.isTemplateSpan = isTemplateSpan;
- function isBlock(node) {
- return node.kind === 207;
+ ts.isIterationStatement = isIterationStatement;
+ function isForInOrOfStatement(node) {
+ return node.kind === 215 || node.kind === 216;
}
- ts.isBlock = isBlock;
+ ts.isForInOrOfStatement = isForInOrOfStatement;
function isConciseBody(node) {
- return isBlock(node)
+ return ts.isBlock(node)
|| isExpression(node);
}
ts.isConciseBody = isConciseBody;
function isFunctionBody(node) {
- return isBlock(node);
+ return ts.isBlock(node);
}
ts.isFunctionBody = isFunctionBody;
function isForInitializer(node) {
- return isVariableDeclarationList(node)
+ return ts.isVariableDeclarationList(node)
|| isExpression(node);
}
ts.isForInitializer = isForInitializer;
- function isVariableDeclaration(node) {
- return node.kind === 226;
- }
- ts.isVariableDeclaration = isVariableDeclaration;
- function isVariableDeclarationList(node) {
- return node.kind === 227;
- }
- ts.isVariableDeclarationList = isVariableDeclarationList;
- function isCaseBlock(node) {
- return node.kind === 235;
- }
- ts.isCaseBlock = isCaseBlock;
function isModuleBody(node) {
var kind = node.kind;
return kind === 234
@@ -11328,32 +12570,12 @@ var ts;
|| kind === 233;
}
ts.isJSDocNamespaceBody = isJSDocNamespaceBody;
- function isImportEqualsDeclaration(node) {
- return node.kind === 237;
- }
- ts.isImportEqualsDeclaration = isImportEqualsDeclaration;
- function isImportClause(node) {
- return node.kind === 239;
- }
- ts.isImportClause = isImportClause;
function isNamedImportBindings(node) {
var kind = node.kind;
return kind === 241
|| kind === 240;
}
ts.isNamedImportBindings = isNamedImportBindings;
- function isImportSpecifier(node) {
- return node.kind === 242;
- }
- ts.isImportSpecifier = isImportSpecifier;
- function isNamedExports(node) {
- return node.kind === 245;
- }
- ts.isNamedExports = isNamedExports;
- function isExportSpecifier(node) {
- return node.kind === 246;
- }
- ts.isExportSpecifier = isExportSpecifier;
function isModuleOrEnumDeclaration(node) {
return node.kind === 233 || node.kind === 232;
}
@@ -11389,7 +12611,7 @@ var ts;
|| kind === 231
|| kind === 145
|| kind === 226
- || kind === 290;
+ || kind === 291;
}
function isDeclarationStatementKind(kind) {
return kind === 228
@@ -11424,11 +12646,14 @@ var ts;
|| kind === 208
|| kind === 213
|| kind === 220
- || kind === 295
- || kind === 298
- || kind === 297;
+ || kind === 296
+ || kind === 300
+ || kind === 299;
}
function isDeclaration(node) {
+ if (node.kind === 145) {
+ return node.parent.kind !== 290 || ts.isInJavaScriptFile(node);
+ }
return isDeclarationKind(node.kind);
}
ts.isDeclaration = isDeclaration;
@@ -11454,14 +12679,6 @@ var ts;
|| kind === 71;
}
ts.isModuleReference = isModuleReference;
- function isJsxOpeningElement(node) {
- return node.kind === 251;
- }
- ts.isJsxOpeningElement = isJsxOpeningElement;
- function isJsxClosingElement(node) {
- return node.kind === 252;
- }
- ts.isJsxClosingElement = isJsxClosingElement;
function isJsxTagNameExpression(node) {
var kind = node.kind;
return kind === 99
@@ -11477,25 +12694,12 @@ var ts;
|| kind === 10;
}
ts.isJsxChild = isJsxChild;
- function isJsxAttributes(node) {
- var kind = node.kind;
- return kind === 254;
- }
- ts.isJsxAttributes = isJsxAttributes;
function isJsxAttributeLike(node) {
var kind = node.kind;
return kind === 253
|| kind === 255;
}
ts.isJsxAttributeLike = isJsxAttributeLike;
- function isJsxSpreadAttribute(node) {
- return node.kind === 255;
- }
- ts.isJsxSpreadAttribute = isJsxSpreadAttribute;
- function isJsxAttribute(node) {
- return node.kind === 253;
- }
- ts.isJsxAttribute = isJsxAttribute;
function isStringLiteralOrJsxExpression(node) {
var kind = node.kind;
return kind === 9
@@ -11514,293 +12718,18 @@ var ts;
|| kind === 258;
}
ts.isCaseOrDefaultClause = isCaseOrDefaultClause;
- function isHeritageClause(node) {
- return node.kind === 259;
- }
- ts.isHeritageClause = isHeritageClause;
- function isCatchClause(node) {
- return node.kind === 260;
- }
- ts.isCatchClause = isCatchClause;
- function isPropertyAssignment(node) {
- return node.kind === 261;
- }
- ts.isPropertyAssignment = isPropertyAssignment;
- function isShorthandPropertyAssignment(node) {
- return node.kind === 262;
- }
- ts.isShorthandPropertyAssignment = isShorthandPropertyAssignment;
- function isEnumMember(node) {
- return node.kind === 264;
- }
- ts.isEnumMember = isEnumMember;
- function isSourceFile(node) {
- return node.kind === 265;
- }
- ts.isSourceFile = isSourceFile;
- function isWatchSet(options) {
- return options.watch && options.hasOwnProperty("watch");
- }
- ts.isWatchSet = isWatchSet;
-})(ts || (ts = {}));
-(function (ts) {
- function getDefaultLibFileName(options) {
- switch (options.target) {
- case 5:
- return "lib.esnext.full.d.ts";
- case 4:
- return "lib.es2017.full.d.ts";
- case 3:
- return "lib.es2016.full.d.ts";
- case 2:
- return "lib.es6.d.ts";
- default:
- return "lib.d.ts";
- }
- }
- ts.getDefaultLibFileName = getDefaultLibFileName;
- function textSpanEnd(span) {
- return span.start + span.length;
- }
- ts.textSpanEnd = textSpanEnd;
- function textSpanIsEmpty(span) {
- return span.length === 0;
- }
- ts.textSpanIsEmpty = textSpanIsEmpty;
- function textSpanContainsPosition(span, position) {
- return position >= span.start && position < textSpanEnd(span);
- }
- ts.textSpanContainsPosition = textSpanContainsPosition;
- function textSpanContainsTextSpan(span, other) {
- return other.start >= span.start && textSpanEnd(other) <= textSpanEnd(span);
- }
- ts.textSpanContainsTextSpan = textSpanContainsTextSpan;
- function textSpanOverlapsWith(span, other) {
- var overlapStart = Math.max(span.start, other.start);
- var overlapEnd = Math.min(textSpanEnd(span), textSpanEnd(other));
- return overlapStart < overlapEnd;
- }
- ts.textSpanOverlapsWith = textSpanOverlapsWith;
- function textSpanOverlap(span1, span2) {
- var overlapStart = Math.max(span1.start, span2.start);
- var overlapEnd = Math.min(textSpanEnd(span1), textSpanEnd(span2));
- if (overlapStart < overlapEnd) {
- return createTextSpanFromBounds(overlapStart, overlapEnd);
- }
- return undefined;
- }
- ts.textSpanOverlap = textSpanOverlap;
- function textSpanIntersectsWithTextSpan(span, other) {
- return other.start <= textSpanEnd(span) && textSpanEnd(other) >= span.start;
- }
- ts.textSpanIntersectsWithTextSpan = textSpanIntersectsWithTextSpan;
- function textSpanIntersectsWith(span, start, length) {
- var end = start + length;
- return start <= textSpanEnd(span) && end >= span.start;
- }
- ts.textSpanIntersectsWith = textSpanIntersectsWith;
- function decodedTextSpanIntersectsWith(start1, length1, start2, length2) {
- var end1 = start1 + length1;
- var end2 = start2 + length2;
- return start2 <= end1 && end2 >= start1;
- }
- ts.decodedTextSpanIntersectsWith = decodedTextSpanIntersectsWith;
- function textSpanIntersectsWithPosition(span, position) {
- return position <= textSpanEnd(span) && position >= span.start;
- }
- ts.textSpanIntersectsWithPosition = textSpanIntersectsWithPosition;
- function textSpanIntersection(span1, span2) {
- var intersectStart = Math.max(span1.start, span2.start);
- var intersectEnd = Math.min(textSpanEnd(span1), textSpanEnd(span2));
- if (intersectStart <= intersectEnd) {
- return createTextSpanFromBounds(intersectStart, intersectEnd);
- }
- return undefined;
- }
- ts.textSpanIntersection = textSpanIntersection;
- function createTextSpan(start, length) {
- if (start < 0) {
- throw new Error("start < 0");
- }
- if (length < 0) {
- throw new Error("length < 0");
- }
- return { start: start, length: length };
- }
- ts.createTextSpan = createTextSpan;
- function createTextSpanFromBounds(start, end) {
- return createTextSpan(start, end - start);
- }
- ts.createTextSpanFromBounds = createTextSpanFromBounds;
- function textChangeRangeNewSpan(range) {
- return createTextSpan(range.span.start, range.newLength);
- }
- ts.textChangeRangeNewSpan = textChangeRangeNewSpan;
- function textChangeRangeIsUnchanged(range) {
- return textSpanIsEmpty(range.span) && range.newLength === 0;
- }
- ts.textChangeRangeIsUnchanged = textChangeRangeIsUnchanged;
- function createTextChangeRange(span, newLength) {
- if (newLength < 0) {
- throw new Error("newLength < 0");
- }
- return { span: span, newLength: newLength };
- }
- ts.createTextChangeRange = createTextChangeRange;
- ts.unchangedTextChangeRange = createTextChangeRange(createTextSpan(0, 0), 0);
- function collapseTextChangeRangesAcrossMultipleVersions(changes) {
- if (changes.length === 0) {
- return ts.unchangedTextChangeRange;
- }
- if (changes.length === 1) {
- return changes[0];
- }
- var change0 = changes[0];
- var oldStartN = change0.span.start;
- var oldEndN = textSpanEnd(change0.span);
- var newEndN = oldStartN + change0.newLength;
- for (var i = 1; i < changes.length; i++) {
- var nextChange = changes[i];
- var oldStart1 = oldStartN;
- var oldEnd1 = oldEndN;
- var newEnd1 = newEndN;
- var oldStart2 = nextChange.span.start;
- var oldEnd2 = textSpanEnd(nextChange.span);
- var newEnd2 = oldStart2 + nextChange.newLength;
- oldStartN = Math.min(oldStart1, oldStart2);
- oldEndN = Math.max(oldEnd1, oldEnd1 + (oldEnd2 - newEnd1));
- newEndN = Math.max(newEnd2, newEnd2 + (newEnd1 - oldEnd2));
- }
- return createTextChangeRange(createTextSpanFromBounds(oldStartN, oldEndN), newEndN - oldStartN);
- }
- ts.collapseTextChangeRangesAcrossMultipleVersions = collapseTextChangeRangesAcrossMultipleVersions;
- function getTypeParameterOwner(d) {
- if (d && d.kind === 145) {
- for (var current = d; current; current = current.parent) {
- if (ts.isFunctionLike(current) || ts.isClassLike(current) || current.kind === 230) {
- return current;
- }
- }
- }
- }
- ts.getTypeParameterOwner = getTypeParameterOwner;
- function isParameterPropertyDeclaration(node) {
- return ts.hasModifier(node, 92) && node.parent.kind === 152 && ts.isClassLike(node.parent.parent);
- }
- ts.isParameterPropertyDeclaration = isParameterPropertyDeclaration;
- function walkUpBindingElementsAndPatterns(node) {
- while (node && (node.kind === 176 || ts.isBindingPattern(node))) {
- node = node.parent;
- }
- return node;
- }
- function getCombinedModifierFlags(node) {
- node = walkUpBindingElementsAndPatterns(node);
- var flags = ts.getModifierFlags(node);
- if (node.kind === 226) {
- node = node.parent;
- }
- if (node && node.kind === 227) {
- flags |= ts.getModifierFlags(node);
- node = node.parent;
- }
- if (node && node.kind === 208) {
- flags |= ts.getModifierFlags(node);
- }
- return flags;
- }
- ts.getCombinedModifierFlags = getCombinedModifierFlags;
- function getCombinedNodeFlags(node) {
- node = walkUpBindingElementsAndPatterns(node);
- var flags = node.flags;
- if (node.kind === 226) {
- node = node.parent;
- }
- if (node && node.kind === 227) {
- flags |= node.flags;
- node = node.parent;
- }
- if (node && node.kind === 208) {
- flags |= node.flags;
- }
- return flags;
- }
- ts.getCombinedNodeFlags = getCombinedNodeFlags;
- function validateLocaleAndSetLanguage(locale, sys, errors) {
- var matchResult = /^([a-z]+)([_\-]([a-z]+))?$/.exec(locale.toLowerCase());
- if (!matchResult) {
- if (errors) {
- errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1, "en", "ja-jp"));
- }
- return;
- }
- var language = matchResult[1];
- var territory = matchResult[3];
- if (!trySetLanguageAndTerritory(language, territory, errors)) {
- trySetLanguageAndTerritory(language, undefined, errors);
- }
- function trySetLanguageAndTerritory(language, territory, errors) {
- var compilerFilePath = ts.normalizePath(sys.getExecutingFilePath());
- var containingDirectoryPath = ts.getDirectoryPath(compilerFilePath);
- var filePath = ts.combinePaths(containingDirectoryPath, language);
- if (territory) {
- filePath = filePath + "-" + territory;
- }
- filePath = sys.resolvePath(ts.combinePaths(filePath, "diagnosticMessages.generated.json"));
- if (!sys.fileExists(filePath)) {
- return false;
- }
- var fileContents = "";
- try {
- fileContents = sys.readFile(filePath);
- }
- catch (e) {
- if (errors) {
- errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Unable_to_open_file_0, filePath));
- }
- return false;
- }
- try {
- ts.localizedDiagnosticMessages = JSON.parse(fileContents);
- }
- catch (e) {
- if (errors) {
- errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Corrupted_locale_file_0, filePath));
- }
- return false;
- }
- return true;
- }
- }
- 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;
+ function isJSDocNode(node) {
+ return node.kind >= 267 && node.kind <= 294;
}
- 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.isJSDocNode = isJSDocNode;
+ function isJSDocCommentContainingNode(node) {
+ return node.kind === 283 || isJSDocTag(node);
}
- 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.isJSDocCommentContainingNode = isJSDocCommentContainingNode;
+ function isJSDocTag(node) {
+ return node.kind >= 284 && node.kind <= 294;
}
- ts.unescapeIdentifier = unescapeIdentifier;
+ ts.isJSDocTag = isJSDocTag;
})(ts || (ts = {}));
var ts;
(function (ts) {
@@ -11880,15 +12809,24 @@ var ts;
node.textSourceNode = sourceNode;
return node;
}
- function createIdentifier(text) {
+ function createIdentifier(text, typeArguments) {
var node = createSynthesizedNode(71);
node.text = ts.escapeIdentifier(text);
node.originalKeywordKind = text ? ts.stringToToken(text) : 0;
node.autoGenerateKind = 0;
node.autoGenerateId = 0;
+ if (typeArguments) {
+ node.typeArguments = createNodeArray(typeArguments);
+ }
return node;
}
ts.createIdentifier = createIdentifier;
+ function updateIdentifier(node, typeArguments) {
+ return node.typeArguments !== typeArguments
+ ? updateNode(createIdentifier(node.text, typeArguments), node)
+ : node;
+ }
+ ts.updateIdentifier = updateIdentifier;
var nextAutoGenerateId = 0;
function createTempVariable(recordTempVariable) {
var name = createIdentifier("");
@@ -11976,225 +12914,12 @@ var ts;
: node;
}
ts.updateComputedPropertyName = updateComputedPropertyName;
- 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(160, 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(161, 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(155, 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(156, 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(150, 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(169);
- }
- ts.createThisTypeNode = createThisTypeNode;
- function createLiteralTypeNode(literal) {
- var literalTypeNode = createSynthesizedNode(173);
- 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(159);
- 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(158);
- 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(162);
- 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(164);
- 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(163);
- 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(165);
- 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(172);
- 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(170);
- typeOperatorNode.operator = 127;
- 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(171);
- 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(145);
- typeParameter.name = asName(name);
- typeParameter.constraint = constraint;
- typeParameter.default = defaultType;
- return typeParameter;
+ var node = createSynthesizedNode(145);
+ node.name = asName(name);
+ node.constraint = constraint;
+ node.default = defaultType;
+ return node;
}
ts.createTypeParameterDeclaration = createTypeParameterDeclaration;
function updateTypeParameterDeclaration(node, name, constraint, defaultType) {
@@ -12205,42 +12930,6 @@ var ts;
: node;
}
ts.updateTypeParameterDeclaration = updateTypeParameterDeclaration;
- function createPropertySignature(name, questionToken, type, initializer) {
- var propertySignature = createSynthesizedNode(148);
- 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(157);
- 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(146);
node.decorators = asNodeArray(decorators);
@@ -12277,6 +12966,26 @@ var ts;
: node;
}
ts.updateDecorator = updateDecorator;
+ function createPropertySignature(modifiers, name, questionToken, type, initializer) {
+ var node = createSynthesizedNode(148);
+ node.modifiers = asNodeArray(modifiers);
+ node.name = asName(name);
+ node.questionToken = questionToken;
+ node.type = type;
+ node.initializer = initializer;
+ return node;
+ }
+ ts.createPropertySignature = createPropertySignature;
+ function updatePropertySignature(node, modifiers, name, questionToken, type, initializer) {
+ return node.modifiers !== modifiers
+ || node.name !== name
+ || node.questionToken !== questionToken
+ || node.type !== type
+ || node.initializer !== initializer
+ ? updateNode(createPropertySignature(modifiers, name, questionToken, type, initializer), node)
+ : node;
+ }
+ ts.updatePropertySignature = updatePropertySignature;
function createProperty(decorators, modifiers, name, questionToken, type, initializer) {
var node = createSynthesizedNode(149);
node.decorators = asNodeArray(decorators);
@@ -12298,7 +13007,24 @@ var ts;
: node;
}
ts.updateProperty = updateProperty;
- function createMethodDeclaration(decorators, modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body) {
+ function createMethodSignature(typeParameters, parameters, type, name, questionToken) {
+ var node = createSignatureDeclaration(150, typeParameters, parameters, type);
+ node.name = asName(name);
+ node.questionToken = questionToken;
+ return node;
+ }
+ 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 createMethod(decorators, modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body) {
var node = createSynthesizedNode(151);
node.decorators = asNodeArray(decorators);
node.modifiers = asNodeArray(modifiers);
@@ -12311,7 +13037,7 @@ var ts;
node.body = body;
return node;
}
- ts.createMethodDeclaration = createMethodDeclaration;
+ ts.createMethod = createMethod;
function updateMethod(node, decorators, modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body) {
return node.decorators !== decorators
|| node.modifiers !== modifiers
@@ -12321,7 +13047,7 @@ var ts;
|| node.parameters !== parameters
|| node.type !== type
|| node.body !== body
- ? updateNode(createMethodDeclaration(decorators, modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body), node)
+ ? updateNode(createMethod(decorators, modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body), node)
: node;
}
ts.updateMethod = updateMethod;
@@ -12389,6 +13115,249 @@ var ts;
: node;
}
ts.updateSetAccessor = updateSetAccessor;
+ function createCallSignature(typeParameters, parameters, type) {
+ return createSignatureDeclaration(155, typeParameters, parameters, type);
+ }
+ ts.createCallSignature = createCallSignature;
+ function updateCallSignature(node, typeParameters, parameters, type) {
+ return updateSignatureDeclaration(node, typeParameters, parameters, type);
+ }
+ ts.updateCallSignature = updateCallSignature;
+ function createConstructSignature(typeParameters, parameters, type) {
+ return createSignatureDeclaration(156, typeParameters, parameters, type);
+ }
+ ts.createConstructSignature = createConstructSignature;
+ function updateConstructSignature(node, typeParameters, parameters, type) {
+ return updateSignatureDeclaration(node, typeParameters, parameters, type);
+ }
+ ts.updateConstructSignature = updateConstructSignature;
+ function createIndexSignature(decorators, modifiers, parameters, type) {
+ var node = createSynthesizedNode(157);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
+ node.parameters = createNodeArray(parameters);
+ node.type = type;
+ return node;
+ }
+ ts.createIndexSignature = createIndexSignature;
+ function updateIndexSignature(node, decorators, modifiers, parameters, type) {
+ return node.parameters !== parameters
+ || node.type !== type
+ || node.decorators !== decorators
+ || node.modifiers !== modifiers
+ ? updateNode(createIndexSignature(decorators, modifiers, parameters, type), node)
+ : node;
+ }
+ ts.updateIndexSignature = updateIndexSignature;
+ function createSignatureDeclaration(kind, typeParameters, parameters, type) {
+ var node = createSynthesizedNode(kind);
+ node.typeParameters = asNodeArray(typeParameters);
+ node.parameters = asNodeArray(parameters);
+ node.type = type;
+ return node;
+ }
+ 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 createKeywordTypeNode(kind) {
+ return createSynthesizedNode(kind);
+ }
+ ts.createKeywordTypeNode = createKeywordTypeNode;
+ function createTypePredicateNode(parameterName, type) {
+ var node = createSynthesizedNode(158);
+ node.parameterName = asName(parameterName);
+ node.type = type;
+ return node;
+ }
+ 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 createTypeReferenceNode(typeName, typeArguments) {
+ var node = createSynthesizedNode(159);
+ node.typeName = asName(typeName);
+ node.typeArguments = typeArguments && ts.parenthesizeTypeParameters(typeArguments);
+ return node;
+ }
+ 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 createFunctionTypeNode(typeParameters, parameters, type) {
+ return createSignatureDeclaration(160, 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(161, typeParameters, parameters, type);
+ }
+ ts.createConstructorTypeNode = createConstructorTypeNode;
+ function updateConstructorTypeNode(node, typeParameters, parameters, type) {
+ return updateSignatureDeclaration(node, typeParameters, parameters, type);
+ }
+ ts.updateConstructorTypeNode = updateConstructorTypeNode;
+ function createTypeQueryNode(exprName) {
+ var node = createSynthesizedNode(162);
+ node.exprName = exprName;
+ return node;
+ }
+ ts.createTypeQueryNode = createTypeQueryNode;
+ function updateTypeQueryNode(node, exprName) {
+ return node.exprName !== exprName
+ ? updateNode(createTypeQueryNode(exprName), node)
+ : node;
+ }
+ ts.updateTypeQueryNode = updateTypeQueryNode;
+ function createTypeLiteralNode(members) {
+ var node = createSynthesizedNode(163);
+ node.members = createNodeArray(members);
+ return node;
+ }
+ ts.createTypeLiteralNode = createTypeLiteralNode;
+ function updateTypeLiteralNode(node, members) {
+ return node.members !== members
+ ? updateNode(createTypeLiteralNode(members), node)
+ : node;
+ }
+ ts.updateTypeLiteralNode = updateTypeLiteralNode;
+ function createArrayTypeNode(elementType) {
+ var node = createSynthesizedNode(164);
+ node.elementType = ts.parenthesizeElementTypeMember(elementType);
+ return node;
+ }
+ ts.createArrayTypeNode = createArrayTypeNode;
+ function updateArrayTypeNode(node, elementType) {
+ return node.elementType !== elementType
+ ? updateNode(createArrayTypeNode(elementType), node)
+ : node;
+ }
+ ts.updateArrayTypeNode = updateArrayTypeNode;
+ function createTupleTypeNode(elementTypes) {
+ var node = createSynthesizedNode(165);
+ node.elementTypes = createNodeArray(elementTypes);
+ return node;
+ }
+ ts.createTupleTypeNode = createTupleTypeNode;
+ function updateTypleTypeNode(node, elementTypes) {
+ return node.elementTypes !== elementTypes
+ ? updateNode(createTupleTypeNode(elementTypes), node)
+ : node;
+ }
+ ts.updateTypleTypeNode = updateTypleTypeNode;
+ function createUnionTypeNode(types) {
+ return createUnionOrIntersectionTypeNode(166, types);
+ }
+ ts.createUnionTypeNode = createUnionTypeNode;
+ function updateUnionTypeNode(node, types) {
+ return updateUnionOrIntersectionTypeNode(node, types);
+ }
+ ts.updateUnionTypeNode = updateUnionTypeNode;
+ function createIntersectionTypeNode(types) {
+ return createUnionOrIntersectionTypeNode(167, types);
+ }
+ ts.createIntersectionTypeNode = createIntersectionTypeNode;
+ function updateIntersectionTypeNode(node, types) {
+ return updateUnionOrIntersectionTypeNode(node, types);
+ }
+ ts.updateIntersectionTypeNode = updateIntersectionTypeNode;
+ function createUnionOrIntersectionTypeNode(kind, types) {
+ var node = createSynthesizedNode(kind);
+ node.types = ts.parenthesizeElementTypeMembers(types);
+ return node;
+ }
+ ts.createUnionOrIntersectionTypeNode = createUnionOrIntersectionTypeNode;
+ function updateUnionOrIntersectionTypeNode(node, types) {
+ return node.types !== types
+ ? updateNode(createUnionOrIntersectionTypeNode(node.kind, types), node)
+ : node;
+ }
+ function createParenthesizedType(type) {
+ var node = createSynthesizedNode(168);
+ node.type = type;
+ return node;
+ }
+ ts.createParenthesizedType = createParenthesizedType;
+ function updateParenthesizedType(node, type) {
+ return node.type !== type
+ ? updateNode(createParenthesizedType(type), node)
+ : node;
+ }
+ ts.updateParenthesizedType = updateParenthesizedType;
+ function createThisTypeNode() {
+ return createSynthesizedNode(169);
+ }
+ ts.createThisTypeNode = createThisTypeNode;
+ function createTypeOperatorNode(type) {
+ var node = createSynthesizedNode(170);
+ node.operator = 127;
+ node.type = ts.parenthesizeElementTypeMember(type);
+ return node;
+ }
+ ts.createTypeOperatorNode = createTypeOperatorNode;
+ function updateTypeOperatorNode(node, type) {
+ return node.type !== type ? updateNode(createTypeOperatorNode(type), node) : node;
+ }
+ ts.updateTypeOperatorNode = updateTypeOperatorNode;
+ function createIndexedAccessTypeNode(objectType, indexType) {
+ var node = createSynthesizedNode(171);
+ node.objectType = ts.parenthesizeElementTypeMember(objectType);
+ node.indexType = indexType;
+ return node;
+ }
+ 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 createMappedTypeNode(readonlyToken, typeParameter, questionToken, type) {
+ var node = createSynthesizedNode(172);
+ node.readonlyToken = readonlyToken;
+ node.typeParameter = typeParameter;
+ node.questionToken = questionToken;
+ node.type = type;
+ return node;
+ }
+ 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 createLiteralTypeNode(literal) {
+ var node = createSynthesizedNode(173);
+ node.literal = literal;
+ return node;
+ }
+ ts.createLiteralTypeNode = createLiteralTypeNode;
+ function updateLiteralTypeNode(node, literal) {
+ return node.literal !== literal
+ ? updateNode(createLiteralTypeNode(literal), node)
+ : node;
+ }
+ ts.updateLiteralTypeNode = updateLiteralTypeNode;
function createObjectBindingPattern(elements) {
var node = createSynthesizedNode(174);
node.elements = createNodeArray(elements);
@@ -12434,9 +13403,8 @@ var ts;
function createArrayLiteral(elements, multiLine) {
var node = createSynthesizedNode(177);
node.elements = ts.parenthesizeListElements(createNodeArray(elements));
- if (multiLine) {
+ if (multiLine)
node.multiLine = true;
- }
return node;
}
ts.createArrayLiteral = createArrayLiteral;
@@ -12449,9 +13417,8 @@ var ts;
function createObjectLiteral(properties, multiLine) {
var node = createSynthesizedNode(178);
node.properties = createNodeArray(properties);
- if (multiLine) {
+ if (multiLine)
node.multiLine = true;
- }
return node;
}
ts.createObjectLiteral = createObjectLiteral;
@@ -12465,7 +13432,7 @@ var ts;
var node = createSynthesizedNode(179);
node.expression = ts.parenthesizeForAccess(expression);
node.name = asName(name);
- setEmitFlags(node, 65536);
+ setEmitFlags(node, 131072);
return node;
}
ts.createPropertyAccess = createPropertyAccess;
@@ -12499,9 +13466,9 @@ var ts;
}
ts.createCall = createCall;
function updateCall(node, expression, typeArguments, argumentsArray) {
- return expression !== node.expression
- || typeArguments !== node.typeArguments
- || argumentsArray !== node.arguments
+ return node.expression !== expression
+ || node.typeArguments !== typeArguments
+ || node.arguments !== argumentsArray
? updateNode(createCall(expression, typeArguments, argumentsArray), node)
: node;
}
@@ -12691,10 +13658,10 @@ var ts;
return node;
}
ts.createBinary = createBinary;
- function updateBinary(node, left, right) {
+ function updateBinary(node, left, right, operator) {
return node.left !== left
|| node.right !== right
- ? updateNode(createBinary(left, node.operatorToken, right), node)
+ ? updateNode(createBinary(left, operator || node.operatorToken, right), node)
: node;
}
ts.updateBinary = updateBinary;
@@ -12821,6 +13788,19 @@ var ts;
: node;
}
ts.updateNonNullExpression = updateNonNullExpression;
+ function createMetaProperty(keywordToken, name) {
+ var node = createSynthesizedNode(204);
+ node.keywordToken = keywordToken;
+ node.name = name;
+ return node;
+ }
+ ts.createMetaProperty = createMetaProperty;
+ function updateMetaProperty(node, name) {
+ return node.name !== name
+ ? updateNode(createMetaProperty(node.keywordToken, name), node)
+ : node;
+ }
+ ts.updateMetaProperty = updateMetaProperty;
function createTemplateSpan(expression, literal) {
var node = createSynthesizedNode(205);
node.expression = expression;
@@ -12835,6 +13815,10 @@ var ts;
: node;
}
ts.updateTemplateSpan = updateTemplateSpan;
+ function createSemicolonClassElement() {
+ return createSynthesizedNode(206);
+ }
+ ts.createSemicolonClassElement = createSemicolonClassElement;
function createBlock(statements, multiLine) {
var block = createSynthesizedNode(207);
block.statements = createNodeArray(statements);
@@ -12844,7 +13828,7 @@ var ts;
}
ts.createBlock = createBlock;
function updateBlock(node, statements) {
- return statements !== node.statements
+ return node.statements !== statements
? updateNode(createBlock(statements, node.multiLine), node)
: node;
}
@@ -12864,35 +13848,6 @@ var ts;
: node;
}
ts.updateVariableStatement = updateVariableStatement;
- function createVariableDeclarationList(declarations, flags) {
- var node = createSynthesizedNode(227);
- node.flags |= flags;
- node.declarations = createNodeArray(declarations);
- return node;
- }
- ts.createVariableDeclarationList = createVariableDeclarationList;
- function updateVariableDeclarationList(node, declarations) {
- return node.declarations !== declarations
- ? updateNode(createVariableDeclarationList(declarations, node.flags), node)
- : node;
- }
- ts.updateVariableDeclarationList = updateVariableDeclarationList;
- function createVariableDeclaration(name, type, initializer) {
- var node = createSynthesizedNode(226);
- node.name = asName(name);
- node.type = type;
- node.initializer = initializer !== undefined ? ts.parenthesizeExpressionForList(initializer) : undefined;
- return node;
- }
- ts.createVariableDeclaration = createVariableDeclaration;
- function updateVariableDeclaration(node, name, type, initializer) {
- return node.name !== name
- || node.type !== type
- || node.initializer !== initializer
- ? updateNode(createVariableDeclaration(name, type, initializer), node)
- : node;
- }
- ts.updateVariableDeclaration = updateVariableDeclaration;
function createEmptyStatement() {
return createSynthesizedNode(209);
}
@@ -13111,6 +14066,39 @@ var ts;
: node;
}
ts.updateTry = updateTry;
+ function createDebuggerStatement() {
+ return createSynthesizedNode(225);
+ }
+ ts.createDebuggerStatement = createDebuggerStatement;
+ function createVariableDeclaration(name, type, initializer) {
+ var node = createSynthesizedNode(226);
+ node.name = asName(name);
+ node.type = type;
+ node.initializer = initializer !== undefined ? ts.parenthesizeExpressionForList(initializer) : undefined;
+ return node;
+ }
+ ts.createVariableDeclaration = createVariableDeclaration;
+ function updateVariableDeclaration(node, name, type, initializer) {
+ return node.name !== name
+ || node.type !== type
+ || node.initializer !== initializer
+ ? updateNode(createVariableDeclaration(name, type, initializer), node)
+ : node;
+ }
+ ts.updateVariableDeclaration = updateVariableDeclaration;
+ function createVariableDeclarationList(declarations, flags) {
+ var node = createSynthesizedNode(227);
+ node.flags |= flags & 3;
+ node.declarations = createNodeArray(declarations);
+ return node;
+ }
+ ts.createVariableDeclarationList = createVariableDeclarationList;
+ function updateVariableDeclarationList(node, declarations) {
+ return node.declarations !== declarations
+ ? updateNode(createVariableDeclarationList(declarations, node.flags), node)
+ : node;
+ }
+ ts.updateVariableDeclarationList = updateVariableDeclarationList;
function createFunctionDeclaration(decorators, modifiers, asteriskToken, name, typeParameters, parameters, type, body) {
var node = createSynthesizedNode(228);
node.decorators = asNodeArray(decorators);
@@ -13159,6 +14147,48 @@ var ts;
: node;
}
ts.updateClassDeclaration = updateClassDeclaration;
+ function createInterfaceDeclaration(decorators, modifiers, name, typeParameters, heritageClauses, members) {
+ var node = createSynthesizedNode(230);
+ 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.createInterfaceDeclaration = createInterfaceDeclaration;
+ function updateInterfaceDeclaration(node, decorators, modifiers, name, typeParameters, heritageClauses, members) {
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.name !== name
+ || node.typeParameters !== typeParameters
+ || node.heritageClauses !== heritageClauses
+ || node.members !== members
+ ? updateNode(createInterfaceDeclaration(decorators, modifiers, name, typeParameters, heritageClauses, members), node)
+ : node;
+ }
+ ts.updateInterfaceDeclaration = updateInterfaceDeclaration;
+ function createTypeAliasDeclaration(decorators, modifiers, name, typeParameters, type) {
+ var node = createSynthesizedNode(231);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
+ node.name = asName(name);
+ node.typeParameters = asNodeArray(typeParameters);
+ node.type = type;
+ return node;
+ }
+ ts.createTypeAliasDeclaration = createTypeAliasDeclaration;
+ function updateTypeAliasDeclaration(node, decorators, modifiers, name, typeParameters, type) {
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.name !== name
+ || node.typeParameters !== typeParameters
+ || node.type !== type
+ ? updateNode(createTypeAliasDeclaration(decorators, modifiers, name, typeParameters, type), node)
+ : node;
+ }
+ ts.updateTypeAliasDeclaration = updateTypeAliasDeclaration;
function createEnumDeclaration(decorators, modifiers, name, members) {
var node = createSynthesizedNode(232);
node.decorators = asNodeArray(decorators);
@@ -13179,7 +14209,7 @@ var ts;
ts.updateEnumDeclaration = updateEnumDeclaration;
function createModuleDeclaration(decorators, modifiers, name, body, flags) {
var node = createSynthesizedNode(233);
- node.flags |= flags;
+ node.flags |= flags & (16 | 4 | 512);
node.decorators = asNodeArray(decorators);
node.modifiers = asNodeArray(modifiers);
node.name = name;
@@ -13220,6 +14250,18 @@ var ts;
: node;
}
ts.updateCaseBlock = updateCaseBlock;
+ function createNamespaceExportDeclaration(name) {
+ var node = createSynthesizedNode(236);
+ node.name = asName(name);
+ return node;
+ }
+ ts.createNamespaceExportDeclaration = createNamespaceExportDeclaration;
+ function updateNamespaceExportDeclaration(node, name) {
+ return node.name !== name
+ ? updateNode(createNamespaceExportDeclaration(name), node)
+ : node;
+ }
+ ts.updateNamespaceExportDeclaration = updateNamespaceExportDeclaration;
function createImportEqualsDeclaration(decorators, modifiers, name, moduleReference) {
var node = createSynthesizedNode(237);
node.decorators = asNodeArray(decorators);
@@ -13250,7 +14292,8 @@ var ts;
function updateImportDeclaration(node, decorators, modifiers, importClause, moduleSpecifier) {
return node.decorators !== decorators
|| node.modifiers !== modifiers
- || node.importClause !== importClause || node.moduleSpecifier !== moduleSpecifier
+ || node.importClause !== importClause
+ || node.moduleSpecifier !== moduleSpecifier
? updateNode(createImportDeclaration(decorators, modifiers, importClause, moduleSpecifier), node)
: node;
}
@@ -13436,19 +14479,6 @@ var ts;
: node;
}
ts.updateJsxClosingElement = updateJsxClosingElement;
- function createJsxAttributes(properties) {
- var jsxAttributes = createSynthesizedNode(254);
- 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(253);
node.name = name;
@@ -13463,6 +14493,18 @@ var ts;
: node;
}
ts.updateJsxAttribute = updateJsxAttribute;
+ function createJsxAttributes(properties) {
+ var node = createSynthesizedNode(254);
+ node.properties = createNodeArray(properties);
+ return node;
+ }
+ ts.createJsxAttributes = createJsxAttributes;
+ function updateJsxAttributes(node, properties) {
+ return node.properties !== properties
+ ? updateNode(createJsxAttributes(properties), node)
+ : node;
+ }
+ ts.updateJsxAttributes = updateJsxAttributes;
function createJsxSpreadAttribute(expression) {
var node = createSynthesizedNode(255);
node.expression = expression;
@@ -13488,20 +14530,6 @@ var ts;
: node;
}
ts.updateJsxExpression = updateJsxExpression;
- function createHeritageClause(token, types) {
- var node = createSynthesizedNode(259);
- node.token = token;
- node.types = createNodeArray(types);
- return node;
- }
- ts.createHeritageClause = createHeritageClause;
- function updateHeritageClause(node, types) {
- if (node.types !== types) {
- return updateNode(createHeritageClause(node.token, types), node);
- }
- return node;
- }
- ts.updateHeritageClause = updateHeritageClause;
function createCaseClause(expression, statements) {
var node = createSynthesizedNode(257);
node.expression = ts.parenthesizeExpressionForList(expression);
@@ -13510,10 +14538,10 @@ var ts;
}
ts.createCaseClause = createCaseClause;
function updateCaseClause(node, expression, statements) {
- if (node.expression !== expression || node.statements !== statements) {
- return updateNode(createCaseClause(expression, statements), node);
- }
- return node;
+ return node.expression !== expression
+ || node.statements !== statements
+ ? updateNode(createCaseClause(expression, statements), node)
+ : node;
}
ts.updateCaseClause = updateCaseClause;
function createDefaultClause(statements) {
@@ -13523,12 +14551,24 @@ var ts;
}
ts.createDefaultClause = createDefaultClause;
function updateDefaultClause(node, statements) {
- if (node.statements !== statements) {
- return updateNode(createDefaultClause(statements), node);
- }
- return node;
+ return node.statements !== statements
+ ? updateNode(createDefaultClause(statements), node)
+ : node;
}
ts.updateDefaultClause = updateDefaultClause;
+ function createHeritageClause(token, types) {
+ var node = createSynthesizedNode(259);
+ node.token = token;
+ node.types = createNodeArray(types);
+ return node;
+ }
+ ts.createHeritageClause = createHeritageClause;
+ function updateHeritageClause(node, types) {
+ return node.types !== types
+ ? updateNode(createHeritageClause(node.token, types), node)
+ : node;
+ }
+ ts.updateHeritageClause = updateHeritageClause;
function createCatchClause(variableDeclaration, block) {
var node = createSynthesizedNode(260);
node.variableDeclaration = typeof variableDeclaration === "string" ? createVariableDeclaration(variableDeclaration) : variableDeclaration;
@@ -13537,10 +14577,10 @@ var ts;
}
ts.createCatchClause = createCatchClause;
function updateCatchClause(node, variableDeclaration, block) {
- if (node.variableDeclaration !== variableDeclaration || node.block !== block) {
- return updateNode(createCatchClause(variableDeclaration, block), node);
- }
- return node;
+ return node.variableDeclaration !== variableDeclaration
+ || node.block !== block
+ ? updateNode(createCatchClause(variableDeclaration, block), node)
+ : node;
}
ts.updateCatchClause = updateCatchClause;
function createPropertyAssignment(name, initializer) {
@@ -13552,10 +14592,10 @@ var ts;
}
ts.createPropertyAssignment = createPropertyAssignment;
function updatePropertyAssignment(node, name, initializer) {
- if (node.name !== name || node.initializer !== initializer) {
- return updateNode(createPropertyAssignment(name, initializer), node);
- }
- return node;
+ return node.name !== name
+ || node.initializer !== initializer
+ ? updateNode(createPropertyAssignment(name, initializer), node)
+ : node;
}
ts.updatePropertyAssignment = updatePropertyAssignment;
function createShorthandPropertyAssignment(name, objectAssignmentInitializer) {
@@ -13566,10 +14606,10 @@ var ts;
}
ts.createShorthandPropertyAssignment = createShorthandPropertyAssignment;
function updateShorthandPropertyAssignment(node, name, objectAssignmentInitializer) {
- if (node.name !== name || node.objectAssignmentInitializer !== objectAssignmentInitializer) {
- return updateNode(createShorthandPropertyAssignment(name, objectAssignmentInitializer), node);
- }
- return node;
+ return node.name !== name
+ || node.objectAssignmentInitializer !== objectAssignmentInitializer
+ ? updateNode(createShorthandPropertyAssignment(name, objectAssignmentInitializer), node)
+ : node;
}
ts.updateShorthandPropertyAssignment = updateShorthandPropertyAssignment;
function createSpreadAssignment(expression) {
@@ -13579,10 +14619,9 @@ var ts;
}
ts.createSpreadAssignment = createSpreadAssignment;
function updateSpreadAssignment(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createSpreadAssignment(expression), node);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createSpreadAssignment(expression), node)
+ : node;
}
ts.updateSpreadAssignment = updateSpreadAssignment;
function createEnumMember(name, initializer) {
@@ -13670,28 +14709,28 @@ var ts;
}
ts.getMutableClone = getMutableClone;
function createNotEmittedStatement(original) {
- var node = createSynthesizedNode(295);
+ var node = createSynthesizedNode(296);
node.original = original;
setTextRange(node, original);
return node;
}
ts.createNotEmittedStatement = createNotEmittedStatement;
function createEndOfDeclarationMarker(original) {
- var node = createSynthesizedNode(298);
+ var node = createSynthesizedNode(300);
node.emitNode = {};
node.original = original;
return node;
}
ts.createEndOfDeclarationMarker = createEndOfDeclarationMarker;
function createMergeDeclarationMarker(original) {
- var node = createSynthesizedNode(297);
+ var node = createSynthesizedNode(299);
node.emitNode = {};
node.original = original;
return node;
}
ts.createMergeDeclarationMarker = createMergeDeclarationMarker;
function createPartiallyEmittedExpression(expression, original) {
- var node = createSynthesizedNode(296);
+ var node = createSynthesizedNode(297);
node.expression = expression;
node.original = original;
setTextRange(node, original);
@@ -13705,6 +14744,29 @@ var ts;
return node;
}
ts.updatePartiallyEmittedExpression = updatePartiallyEmittedExpression;
+ function flattenCommaElements(node) {
+ if (ts.nodeIsSynthesized(node) && !ts.isParseTreeNode(node) && !node.original && !node.emitNode && !node.id) {
+ if (node.kind === 298) {
+ return node.elements;
+ }
+ if (ts.isBinaryExpression(node) && node.operatorToken.kind === 26) {
+ return [node.left, node.right];
+ }
+ }
+ return node;
+ }
+ function createCommaList(elements) {
+ var node = createSynthesizedNode(298);
+ node.elements = createNodeArray(ts.sameFlatMap(elements, flattenCommaElements));
+ return node;
+ }
+ ts.createCommaList = createCommaList;
+ function updateCommaList(node, elements) {
+ return node.elements !== elements
+ ? updateNode(createCommaList(elements), node)
+ : node;
+ }
+ ts.updateCommaList = updateCommaList;
function createBundle(sourceFiles) {
var node = ts.createNode(266);
node.sourceFiles = sourceFiles;
@@ -13718,6 +14780,10 @@ var ts;
return node;
}
ts.updateBundle = updateBundle;
+ function createImmediatelyInvokedFunctionExpression(statements, param, paramValue) {
+ return createCall(createFunctionExpression(undefined, undefined, undefined, undefined, param ? [param] : [], undefined, createBlock(statements, true)), undefined, paramValue ? [paramValue] : []);
+ }
+ ts.createImmediatelyInvokedFunctionExpression = createImmediatelyInvokedFunctionExpression;
function createComma(left, right) {
return createBinary(left, 26, right);
}
@@ -13840,6 +14906,11 @@ var ts;
return node;
}
ts.setSourceMapRange = setSourceMapRange;
+ var SourceMapSource;
+ function createSourceMapSource(fileName, text, skipTrivia) {
+ return new (SourceMapSource || (SourceMapSource = ts.objectAllocator.getSourceMapSourceConstructor()))(fileName, text, skipTrivia);
+ }
+ ts.createSourceMapSource = createSourceMapSource;
function getTokenSourceMapRange(node, token) {
var emitNode = node.emitNode;
var tokenSourceMapRanges = emitNode && emitNode.tokenSourceMapRanges;
@@ -14015,6 +15086,25 @@ var ts;
}
})(ts || (ts = {}));
(function (ts) {
+ ts.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 createTypeCheck(value, tag) {
return tag === "undefined"
? ts.createStrictEquality(value, ts.createVoidZero())
@@ -14255,7 +15345,9 @@ var ts;
}
ts.createCallBinding = createCallBinding;
function inlineExpressions(expressions) {
- return ts.reduceLeft(expressions, ts.createComma);
+ return expressions.length > 10
+ ? ts.createCommaList(expressions)
+ : ts.reduceLeft(expressions, ts.createComma);
}
ts.inlineExpressions = inlineExpressions;
function createExpressionFromEntityName(node) {
@@ -14333,6 +15425,14 @@ var ts;
function createExpressionForMethodDeclaration(method, receiver) {
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 getInternalName(node, allowComments, allowSourceMaps) {
+ return getName(node, allowComments, allowSourceMaps, 16384 | 32768);
+ }
+ ts.getInternalName = getInternalName;
+ function isInternalName(node) {
+ return (ts.getEmitFlags(node) & 32768) !== 0;
+ }
+ ts.isInternalName = isInternalName;
function getLocalName(node, allowComments, allowSourceMaps) {
return getName(node, allowComments, allowSourceMaps, 16384);
}
@@ -14354,9 +15454,10 @@ var ts;
}
ts.getDeclarationName = getDeclarationName;
function getName(node, allowComments, allowSourceMaps, emitFlags) {
- if (node.name && ts.isIdentifier(node.name) && !ts.isGeneratedIdentifier(node.name)) {
- var name = ts.getMutableClone(node.name);
- emitFlags |= ts.getEmitFlags(node.name);
+ var nodeName = ts.getNameOfDeclaration(node);
+ if (nodeName && ts.isIdentifier(nodeName) && !ts.isGeneratedIdentifier(nodeName)) {
+ var name = ts.getMutableClone(nodeName);
+ emitFlags |= ts.getEmitFlags(nodeName);
if (!allowSourceMaps)
emitFlags |= 48;
if (!allowComments)
@@ -14391,6 +15492,18 @@ var ts;
return ts.isBlock(node) ? node : ts.setTextRange(ts.createBlock([ts.setTextRange(ts.createReturn(node), node)], multiLine), node);
}
ts.convertToFunctionBody = convertToFunctionBody;
+ function convertFunctionDeclarationToExpression(node) {
+ ts.Debug.assert(!!node.body);
+ var updated = ts.createFunctionExpression(node.modifiers, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body);
+ ts.setOriginalNode(updated, node);
+ ts.setTextRange(updated, node);
+ if (node.startsOnNewLine) {
+ updated.startsOnNewLine = true;
+ }
+ ts.aggregateTransformFlags(updated);
+ return updated;
+ }
+ ts.convertFunctionDeclarationToExpression = convertFunctionDeclarationToExpression;
function isUseStrictPrologue(node) {
return node.expression.text === "use strict";
}
@@ -14427,7 +15540,7 @@ var ts;
var numStatements = source.length;
while (statementOffset < numStatements) {
var statement = source[statementOffset];
- if (ts.getEmitFlags(statement) & 524288) {
+ if (ts.getEmitFlags(statement) & 1048576) {
target.push(visitor ? ts.visitNode(statement, visitor, ts.isStatement) : statement);
}
else {
@@ -14467,16 +15580,6 @@ var ts;
return statements;
}
ts.ensureUseStrict = ensureUseStrict;
- function parenthesizeConditionalHead(condition) {
- var conditionalPrecedence = ts.getOperatorPrecedence(195, 55);
- 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 === 185) {
@@ -14633,7 +15736,7 @@ var ts;
if (kind === 186 || kind === 187) {
var mutableCall = ts.getMutableClone(emittedExpression);
mutableCall.expression = ts.setTextRange(ts.createParen(callee), callee);
- return recreatePartiallyEmittedExpressions(expression, mutableCall);
+ return recreateOuterExpressions(expression, mutableCall, 4);
}
}
else {
@@ -14645,14 +15748,34 @@ var ts;
return expression;
}
ts.parenthesizeExpressionForExpressionStatement = parenthesizeExpressionForExpressionStatement;
- function recreatePartiallyEmittedExpressions(originalOuterExpression, newInnerExpression) {
- if (ts.isPartiallyEmittedExpression(originalOuterExpression)) {
- var clone_1 = ts.getMutableClone(originalOuterExpression);
- clone_1.expression = recreatePartiallyEmittedExpressions(clone_1.expression, newInnerExpression);
- return clone_1;
+ function parenthesizeElementTypeMember(member) {
+ switch (member.kind) {
+ case 166:
+ case 167:
+ case 160:
+ case 161:
+ return ts.createParenthesizedType(member);
}
- return newInnerExpression;
+ return member;
+ }
+ ts.parenthesizeElementTypeMember = parenthesizeElementTypeMember;
+ function parenthesizeElementTypeMembers(members) {
+ return ts.createNodeArray(ts.sameMap(members, parenthesizeElementTypeMember));
}
+ ts.parenthesizeElementTypeMembers = parenthesizeElementTypeMembers;
+ function parenthesizeTypeParameters(typeParameters) {
+ if (ts.some(typeParameters)) {
+ var nodeArray = ts.createNodeArray();
+ for (var i = 0; i < typeParameters.length; ++i) {
+ var entry = typeParameters[i];
+ nodeArray.push(i === 0 && ts.isFunctionOrConstructorTypeNode(entry) && entry.typeParameters ?
+ ts.createParenthesizedType(entry) :
+ entry);
+ }
+ return nodeArray;
+ }
+ }
+ ts.parenthesizeTypeParameters = parenthesizeTypeParameters;
function getLeftmostExpression(node) {
while (true) {
switch (node.kind) {
@@ -14670,7 +15793,7 @@ var ts;
case 179:
node = node.expression;
continue;
- case 296:
+ case 297:
node = node.expression;
continue;
}
@@ -14691,6 +15814,21 @@ var ts;
OuterExpressionKinds[OuterExpressionKinds["PartiallyEmittedExpressions"] = 4] = "PartiallyEmittedExpressions";
OuterExpressionKinds[OuterExpressionKinds["All"] = 7] = "All";
})(OuterExpressionKinds = ts.OuterExpressionKinds || (ts.OuterExpressionKinds = {}));
+ function isOuterExpression(node, kinds) {
+ if (kinds === void 0) { kinds = 7; }
+ switch (node.kind) {
+ case 185:
+ return (kinds & 1) !== 0;
+ case 184:
+ case 202:
+ case 203:
+ return (kinds & 2) !== 0;
+ case 297:
+ return (kinds & 4) !== 0;
+ }
+ return false;
+ }
+ ts.isOuterExpression = isOuterExpression;
function skipOuterExpressions(node, kinds) {
if (kinds === void 0) { kinds = 7; }
var previousNode;
@@ -14717,19 +15855,36 @@ var ts;
}
ts.skipParentheses = skipParentheses;
function skipAssertions(node) {
- while (ts.isAssertionExpression(node)) {
+ while (ts.isAssertionExpression(node) || node.kind === 203) {
node = node.expression;
}
return node;
}
ts.skipAssertions = skipAssertions;
function skipPartiallyEmittedExpressions(node) {
- while (node.kind === 296) {
+ while (node.kind === 297) {
node = node.expression;
}
return node;
}
ts.skipPartiallyEmittedExpressions = skipPartiallyEmittedExpressions;
+ function updateOuterExpression(outerExpression, expression) {
+ switch (outerExpression.kind) {
+ case 185: return ts.updateParen(outerExpression, expression);
+ case 184: return ts.updateTypeAssertion(outerExpression, outerExpression.type, expression);
+ case 202: return ts.updateAsExpression(outerExpression, expression, outerExpression.type);
+ case 203: return ts.updateNonNullExpression(outerExpression, expression);
+ case 297: return ts.updatePartiallyEmittedExpression(outerExpression, expression);
+ }
+ }
+ function recreateOuterExpressions(outerExpression, innerExpression, kinds) {
+ if (kinds === void 0) { kinds = 7; }
+ if (outerExpression && isOuterExpression(outerExpression, kinds)) {
+ return updateOuterExpression(outerExpression, recreateOuterExpressions(outerExpression.expression, innerExpression));
+ }
+ return innerExpression;
+ }
+ ts.recreateOuterExpressions = recreateOuterExpressions;
function startOnNewLine(node) {
node.startsOnNewLine = true;
return node;
@@ -14741,23 +15896,33 @@ var ts;
return emitNode && emitNode.externalHelpersModuleName;
}
ts.getExternalHelpersModuleName = getExternalHelpersModuleName;
- function getOrCreateExternalHelpersModuleNameIfNeeded(node, compilerOptions) {
- if (compilerOptions.importHelpers && (ts.isExternalModule(node) || compilerOptions.isolatedModules)) {
+ function getOrCreateExternalHelpersModuleNameIfNeeded(node, compilerOptions, hasExportStarsToExportValues) {
+ if (compilerOptions.importHelpers && ts.isEffectiveExternalModule(node, compilerOptions)) {
var externalHelpersModuleName = getExternalHelpersModuleName(node);
if (externalHelpersModuleName) {
return externalHelpersModuleName;
}
- var helpers = ts.getEmitHelpers(node);
- if (helpers) {
- 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 = ts.getOrCreateEmitNode(parseNode);
- return emitNode.externalHelpersModuleName || (emitNode.externalHelpersModuleName = ts.createUniqueName(ts.externalHelpersModuleNameText));
+ var moduleKind = ts.getEmitModuleKind(compilerOptions);
+ var create = hasExportStarsToExportValues
+ && moduleKind !== ts.ModuleKind.System
+ && moduleKind !== ts.ModuleKind.ES2015;
+ if (!create) {
+ var helpers = ts.getEmitHelpers(node);
+ if (helpers) {
+ for (var _i = 0, helpers_2 = helpers; _i < helpers_2.length; _i++) {
+ var helper = helpers_2[_i];
+ if (!helper.scoped) {
+ create = true;
+ break;
+ }
}
}
}
+ if (create) {
+ var parseNode = ts.getOriginalNode(node, ts.isSourceFile);
+ var emitNode = ts.getOrCreateEmitNode(parseNode);
+ return emitNode.externalHelpersModuleName || (emitNode.externalHelpersModuleName = ts.createUniqueName(ts.externalHelpersModuleNameText));
+ }
}
}
ts.getOrCreateExternalHelpersModuleNameIfNeeded = getOrCreateExternalHelpersModuleNameIfNeeded;
@@ -14797,7 +15962,7 @@ var ts;
if (file.moduleName) {
return ts.createLiteral(file.moduleName);
}
- if (!ts.isDeclarationFile(file) && (options.out || options.outFile)) {
+ if (!file.isDeclarationFile && (options.out || options.outFile)) {
return ts.createLiteral(ts.getExternalModuleNameFromPath(host, file.fileName));
}
return undefined;
@@ -14821,7 +15986,7 @@ var ts;
if (ts.isAssignmentExpression(bindingElement, true)) {
return bindingElement.right;
}
- if (ts.isSpreadExpression(bindingElement)) {
+ if (ts.isSpreadElement(bindingElement)) {
return getInitializerOfBindingOrAssignmentElement(bindingElement.expression);
}
}
@@ -14844,7 +16009,7 @@ var ts;
if (ts.isAssignmentExpression(bindingElement, true)) {
return getTargetOfBindingOrAssignmentElement(bindingElement.left);
}
- if (ts.isSpreadExpression(bindingElement)) {
+ if (ts.isSpreadElement(bindingElement)) {
return getTargetOfBindingOrAssignmentElement(bindingElement.expression);
}
return bindingElement;
@@ -14979,11 +16144,6 @@ var ts;
var hasExportDefault = false;
var exportEquals = undefined;
var hasExportStarsToExportValues = false;
- var externalHelpersModuleName = getOrCreateExternalHelpersModuleNameIfNeeded(sourceFile, compilerOptions);
- 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) {
@@ -15073,6 +16233,11 @@ var ts;
break;
}
}
+ var externalHelpersModuleName = getOrCreateExternalHelpersModuleNameIfNeeded(sourceFile, compilerOptions, hasExportStarsToExportValues);
+ var externalHelpersImportDeclaration = externalHelpersModuleName && ts.createImportDeclaration(undefined, undefined, ts.createImportClause(undefined, ts.createNamespaceImport(externalHelpersModuleName)), ts.createLiteral(ts.externalHelpersModuleNameText));
+ if (externalHelpersImportDeclaration) {
+ externalImports.unshift(externalHelpersImportDeclaration);
+ }
return { externalImports: externalImports, exportSpecifiers: exportSpecifiers, exportEquals: exportEquals, hasExportStarsToExportValues: hasExportStarsToExportValues, exportedBindings: exportedBindings, exportedNames: exportedNames, externalHelpersImportDeclaration: externalHelpersImportDeclaration };
}
ts.collectExternalModuleInfo = collectExternalModuleInfo;
@@ -15117,7 +16282,7 @@ var ts;
else if (kind === 71) {
return new (IdentifierConstructor || (IdentifierConstructor = ts.objectAllocator.getIdentifierConstructor()))(kind, pos, end);
}
- else if (kind < 143) {
+ else if (!ts.isNodeKind(kind)) {
return new (TokenConstructor || (TokenConstructor = ts.objectAllocator.getTokenConstructor()))(kind, pos, end);
}
else {
@@ -15454,6 +16619,8 @@ var ts;
return visitNode(cbNode, node.expression);
case 247:
return visitNodes(cbNodes, node.decorators);
+ case 298:
+ return visitNodes(cbNodes, node.elements);
case 249:
return visitNode(cbNode, node.openingElement) ||
visitNodes(cbNodes, node.children) ||
@@ -15507,31 +16674,31 @@ var ts;
visitNode(cbNode, node.type);
case 283:
return visitNodes(cbNodes, node.tags);
- case 286:
+ case 287:
return visitNode(cbNode, node.preParameterName) ||
visitNode(cbNode, node.typeExpression) ||
visitNode(cbNode, node.postParameterName);
- case 287:
- return visitNode(cbNode, node.typeExpression);
case 288:
return visitNode(cbNode, node.typeExpression);
+ case 289:
+ return visitNode(cbNode, node.typeExpression);
case 285:
return visitNode(cbNode, node.typeExpression);
- case 289:
- return visitNodes(cbNodes, node.typeParameters);
case 290:
+ return visitNodes(cbNodes, node.typeParameters);
+ case 291:
return visitNode(cbNode, node.typeExpression) ||
visitNode(cbNode, node.fullName) ||
visitNode(cbNode, node.name) ||
visitNode(cbNode, node.jsDocTypeLiteral);
- case 292:
+ case 293:
return visitNodes(cbNodes, node.jsDocPropertyTags);
- case 291:
+ case 292:
return visitNode(cbNode, node.typeExpression) ||
visitNode(cbNode, node.name);
- case 296:
+ case 297:
return visitNode(cbNode, node.expression);
- case 293:
+ case 294:
return visitNode(cbNode, node.literal);
}
}
@@ -15554,7 +16721,9 @@ var ts;
}
ts.isExternalModule = isExternalModule;
function updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks) {
- return IncrementalParser.updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks);
+ var newSourceFile = IncrementalParser.updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks);
+ newSourceFile.flags |= (sourceFile.flags & 524288);
+ return newSourceFile;
}
ts.updateSourceFile = updateSourceFile;
function parseIsolatedJSDocComment(content, start, length) {
@@ -15643,7 +16812,7 @@ var ts;
processReferenceComments(sourceFile);
sourceFile.statements = parseList(0, parseStatement);
ts.Debug.assert(token() === 1);
- sourceFile.endOfFileToken = parseTokenNode();
+ sourceFile.endOfFileToken = addJSDocComment(parseTokenNode());
setExternalModuleIndicator(sourceFile);
sourceFile.nodeCount = nodeCount;
sourceFile.identifierCount = identifierCount;
@@ -15922,7 +17091,7 @@ var ts;
if (!(pos >= 0)) {
pos = scanner.getStartPos();
}
- return kind >= 143 ? new NodeConstructor(kind, pos, pos) :
+ return ts.isNodeKind(kind) ? new NodeConstructor(kind, pos, pos) :
kind === 71 ? new IdentifierConstructor(kind, pos, pos) :
new TokenConstructor(kind, pos, pos);
}
@@ -16031,12 +17200,12 @@ var ts;
if (token() === 84) {
nextToken();
if (token() === 79) {
- return lookAhead(nextTokenIsClassOrFunctionOrAsync);
+ return lookAhead(nextTokenCanFollowDefaultKeyword);
}
return token() !== 39 && token() !== 118 && token() !== 17 && canFollowModifier();
}
if (token() === 79) {
- return nextTokenIsClassOrFunctionOrAsync();
+ return nextTokenCanFollowDefaultKeyword();
}
if (token() === 115) {
nextToken();
@@ -16054,9 +17223,10 @@ var ts;
|| token() === 24
|| isLiteralPropertyName();
}
- function nextTokenIsClassOrFunctionOrAsync() {
+ function nextTokenCanFollowDefaultKeyword() {
nextToken();
return token() === 75 || token() === 89 ||
+ token() === 109 ||
(token() === 117 && lookAhead(nextTokenIsClassKeywordOnSameLine)) ||
(token() === 120 && lookAhead(nextTokenIsFunctionKeywordOnSameLine));
}
@@ -16788,7 +17958,7 @@ var ts;
if (token() === 19 || token() === 27) {
return parseSignatureMember(155);
}
- if (token() === 94 && lookAhead(isStartOfConstructSignature)) {
+ if (token() === 94 && lookAhead(nextTokenIsOpenParenOrLessThan)) {
return parseSignatureMember(156);
}
var fullStart = getNodePos();
@@ -16798,7 +17968,7 @@ var ts;
}
return parsePropertyOrMethodSignature(fullStart, modifiers);
}
- function isStartOfConstructSignature() {
+ function nextTokenIsOpenParenOrLessThan() {
nextToken();
return token() === 19 || token() === 27;
}
@@ -17108,6 +18278,8 @@ var ts;
case 63:
case 71:
return true;
+ case 91:
+ return lookAhead(nextTokenIsOpenParenOrLessThan);
default:
return isIdentifier();
}
@@ -17532,10 +18704,10 @@ var ts;
}
function parseUnaryExpressionOrHigher() {
if (isUpdateExpression()) {
- var incrementExpression = parseIncrementExpression();
+ var updateExpression = parseUpdateExpression();
return token() === 40 ?
- parseBinaryExpressionRest(getBinaryOperatorPrecedence(), incrementExpression) :
- incrementExpression;
+ parseBinaryExpressionRest(getBinaryOperatorPrecedence(), updateExpression) :
+ updateExpression;
}
var unaryOperator = token();
var simpleUnaryExpression = parseSimpleUnaryExpression();
@@ -17570,7 +18742,7 @@ var ts;
return parseAwaitExpression();
}
default:
- return parseIncrementExpression();
+ return parseUpdateExpression();
}
}
function isUpdateExpression() {
@@ -17592,7 +18764,7 @@ var ts;
return true;
}
}
- function parseIncrementExpression() {
+ function parseUpdateExpression() {
if (token() === 43 || token() === 44) {
var node = createNode(192);
node.operator = token();
@@ -17615,9 +18787,14 @@ var ts;
return expression;
}
function parseLeftHandSideExpressionOrHigher() {
- var expression = token() === 97
- ? parseSuperExpression()
- : parseMemberExpressionOrHigher();
+ var expression;
+ if (token() === 91 && lookAhead(nextTokenIsOpenParenOrLessThan)) {
+ sourceFile.flags |= 524288;
+ expression = parseTokenNode();
+ }
+ else {
+ expression = token() === 97 ? parseSuperExpression() : parseMemberExpressionOrHigher();
+ }
return parseCallExpressionRest(expression);
}
function parseMemberExpressionOrHigher() {
@@ -18434,9 +19611,10 @@ var ts;
case 74:
case 87:
return true;
+ case 91:
+ return isStartOfDeclaration() || lookAhead(nextTokenIsOpenParenOrLessThan);
case 76:
case 84:
- case 91:
return isStartOfDeclaration();
case 120:
case 124:
@@ -19449,7 +20627,10 @@ var ts;
case 17:
return parseJSDocRecordType();
case 89:
- return parseJSDocFunctionType();
+ if (lookAhead(nextTokenIsOpenParen)) {
+ return parseJSDocFunctionType();
+ }
+ break;
case 24:
return parseJSDocVariadicType();
case 94:
@@ -19465,7 +20646,6 @@ var ts;
case 95:
case 139:
case 130:
- case 134:
return parseTokenNode();
case 9:
case 8:
@@ -19603,7 +20783,7 @@ var ts;
return finishNode(result);
}
function parseJSDocLiteralType() {
- var result = createNode(293);
+ var result = createNode(294);
result.literal = parseLiteralTypeNode();
return finishNode(result);
}
@@ -19642,10 +20822,17 @@ var ts;
if (comment) {
comment.parent = parent;
}
+ if (ts.isInJavaScriptFile(parent)) {
+ if (!sourceFile.jsDocDiagnostics) {
+ sourceFile.jsDocDiagnostics = [];
+ }
+ (_a = sourceFile.jsDocDiagnostics).push.apply(_a, parseDiagnostics);
+ }
currentToken = saveToken;
parseDiagnostics.length = saveParseDiagnosticsLength;
parseErrorBeforeNextFinishedNode = saveParseErrorBeforeNextFinishedNode;
return comment;
+ var _a;
}
JSDocParser.parseJSDocComment = parseJSDocComment;
var JSDocState;
@@ -19796,8 +20983,14 @@ var ts;
case "augments":
tag = parseAugmentsTag(atToken, tagName);
break;
+ case "class":
+ case "constructor":
+ tag = parseClassTag(atToken, tagName);
+ break;
+ case "arg":
+ case "argument":
case "param":
- tag = parseParamTag(atToken, tagName);
+ tag = parseParameterOrPropertyTag(atToken, tagName, true);
break;
case "return":
case "returns":
@@ -19904,27 +21097,23 @@ var ts;
return parseJSDocTypeExpression();
});
}
- function parseParamTag(atToken, tagName) {
- var typeExpression = tryParseTypeExpression();
- skipWhitespace();
- var name;
- var isBracketed;
- if (parseOptionalToken(21)) {
- name = parseJSDocIdentifierName();
+ function parseBracketNameInPropertyAndParamTag() {
+ var isBracketed = parseOptional(21);
+ var name = parseJSDocIdentifierName(true);
+ if (isBracketed) {
skipWhitespace();
- isBracketed = true;
if (parseOptionalToken(58)) {
parseExpression();
}
parseExpected(22);
}
- else if (ts.tokenIsIdentifierOrKeyword(token())) {
- name = parseJSDocIdentifierName();
- }
- if (!name) {
- parseErrorAtPosition(scanner.getStartPos(), 0, ts.Diagnostics.Identifier_expected);
- return undefined;
- }
+ return { name: name, isBracketed: isBracketed };
+ }
+ function parseParameterOrPropertyTag(atToken, tagName, shouldParseParamTag) {
+ var typeExpression = tryParseTypeExpression();
+ skipWhitespace();
+ var _a = parseBracketNameInPropertyAndParamTag(), name = _a.name, isBracketed = _a.isBracketed;
+ skipWhitespace();
var preName, postName;
if (typeExpression) {
postName = name;
@@ -19935,52 +21124,38 @@ var ts;
if (!typeExpression) {
typeExpression = tryParseTypeExpression();
}
- var result = createNode(286, atToken.pos);
+ var result = shouldParseParamTag ?
+ createNode(287, atToken.pos) :
+ createNode(292, atToken.pos);
result.atToken = atToken;
result.tagName = tagName;
result.preParameterName = preName;
result.typeExpression = typeExpression;
result.postParameterName = postName;
- result.parameterName = postName || preName;
+ result.name = postName || preName;
result.isBracketed = isBracketed;
return finishNode(result);
}
function parseReturnTag(atToken, tagName) {
- if (ts.forEach(tags, function (t) { return t.kind === 287; })) {
+ 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 result = createNode(287, atToken.pos);
+ var result = createNode(288, 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 === 288; })) {
+ if (ts.forEach(tags, function (t) { return t.kind === 289; })) {
parseErrorAtPosition(tagName.pos, scanner.getTokenPos() - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text);
}
- var result = createNode(288, atToken.pos);
+ var result = createNode(289, atToken.pos);
result.atToken = atToken;
result.tagName = tagName;
result.typeExpression = tryParseTypeExpression();
return finishNode(result);
}
- function parsePropertyTag(atToken, tagName) {
- var typeExpression = tryParseTypeExpression();
- skipWhitespace();
- var name = parseJSDocIdentifierName();
- skipWhitespace();
- if (!name) {
- parseErrorAtPosition(scanner.getStartPos(), 0, ts.Diagnostics.Identifier_expected);
- return undefined;
- }
- var result = createNode(291, atToken.pos);
- result.atToken = atToken;
- result.tagName = tagName;
- result.name = name;
- result.typeExpression = typeExpression;
- return finishNode(result);
- }
function parseAugmentsTag(atToken, tagName) {
var typeExpression = tryParseTypeExpression();
var result = createNode(285, atToken.pos);
@@ -19989,10 +21164,16 @@ var ts;
result.typeExpression = typeExpression;
return finishNode(result);
}
+ function parseClassTag(atToken, tagName) {
+ var tag = createNode(286, atToken.pos);
+ tag.atToken = atToken;
+ tag.tagName = tagName;
+ return finishNode(tag);
+ }
function parseTypedefTag(atToken, tagName) {
var typeExpression = tryParseTypeExpression();
skipWhitespace();
- var typedefTag = createNode(290, atToken.pos);
+ var typedefTag = createNode(291, atToken.pos);
typedefTag.atToken = atToken;
typedefTag.tagName = tagName;
typedefTag.fullName = parseJSDocTypeNameWithNamespace(0);
@@ -20013,7 +21194,7 @@ var ts;
var jsDocTypeReference = typeExpression.type;
if (jsDocTypeReference.name.kind === 71) {
var name = jsDocTypeReference.name;
- if (name.text === "Object") {
+ if (name.text === "Object" || name.text === "object") {
typedefTag.jsDocTypeLiteral = scanChildTags();
}
}
@@ -20027,7 +21208,7 @@ var ts;
}
return finishNode(typedefTag);
function scanChildTags() {
- var jsDocTypeLiteral = createNode(292, scanner.getStartPos());
+ var jsDocTypeLiteral = createNode(293, scanner.getStartPos());
var resumePos = scanner.getStartPos();
var canParseTag = true;
var seenAsterisk = false;
@@ -20073,7 +21254,7 @@ var ts;
jsDocNamespaceNode.flags |= flags;
jsDocNamespaceNode.name = typeNameOrNamespaceName;
jsDocNamespaceNode.body = parseJSDocTypeNameWithNamespace(4);
- return jsDocNamespaceNode;
+ return finishNode(jsDocNamespaceNode);
}
if (typeNameOrNamespaceName && flags & 4) {
typeNameOrNamespaceName.isInJSDocNamespace = true;
@@ -20100,7 +21281,7 @@ var ts;
return true;
case "prop":
case "property":
- var propertyTag = parsePropertyTag(atToken, tagName);
+ var propertyTag = parseParameterOrPropertyTag(atToken, tagName, false);
if (propertyTag) {
if (!parentTag.jsDocPropertyTags) {
parentTag.jsDocPropertyTags = [];
@@ -20113,7 +21294,7 @@ var ts;
return false;
}
function parseTemplateTag(atToken, tagName) {
- if (ts.forEach(tags, function (t) { return t.kind === 289; })) {
+ if (ts.forEach(tags, function (t) { return t.kind === 290; })) {
parseErrorAtPosition(tagName.pos, scanner.getTokenPos() - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text);
}
var typeParameters = createNodeArray();
@@ -20136,7 +21317,7 @@ var ts;
break;
}
}
- var result = createNode(289, atToken.pos);
+ var result = createNode(290, atToken.pos);
result.atToken = atToken;
result.tagName = tagName;
result.typeParameters = typeParameters;
@@ -20147,13 +21328,19 @@ var ts;
function nextJSDocToken() {
return currentToken = scanner.scanJSDocToken();
}
- function parseJSDocIdentifierName() {
- return createJSDocIdentifier(ts.tokenIsIdentifierOrKeyword(token()));
+ function parseJSDocIdentifierName(createIfMissing) {
+ if (createIfMissing === void 0) { createIfMissing = false; }
+ return createJSDocIdentifier(ts.tokenIsIdentifierOrKeyword(token()), createIfMissing);
}
- function createJSDocIdentifier(isIdentifier) {
+ function createJSDocIdentifier(isIdentifier, createIfMissing) {
if (!isIdentifier) {
- parseErrorAtCurrentToken(ts.Diagnostics.Identifier_expected);
- return undefined;
+ if (createIfMissing) {
+ return createMissingNode(71, true, ts.Diagnostics.Identifier_expected);
+ }
+ else {
+ parseErrorAtCurrentToken(ts.Diagnostics.Identifier_expected);
+ return undefined;
+ }
}
var pos = scanner.getTokenPos();
var end = scanner.getTextPos();
@@ -20556,7 +21743,7 @@ var ts;
inStrictMode = bindInStrictMode(file, opts);
classifiableNames = ts.createMap();
symbolCount = 0;
- skipTransformFlagAggregation = ts.isDeclarationFile(file);
+ skipTransformFlagAggregation = file.isDeclarationFile;
Symbol = ts.objectAllocator.getSymbolConstructor();
if (!file.locals) {
bind(file);
@@ -20584,7 +21771,7 @@ var ts;
}
return bindSourceFile;
function bindInStrictMode(file, opts) {
- if ((opts.alwaysStrict === undefined ? opts.strict : opts.alwaysStrict) && !ts.isDeclarationFile(file)) {
+ if ((opts.alwaysStrict === undefined ? opts.strict : opts.alwaysStrict) && !file.isDeclarationFile) {
return true;
}
else {
@@ -20617,19 +21804,20 @@ var ts;
}
}
function getDeclarationName(node) {
- if (node.name) {
+ var name = ts.getNameOfDeclaration(node);
+ if (name) {
if (ts.isAmbientModule(node)) {
- return ts.isGlobalScopeAugmentation(node) ? "__global" : "\"" + node.name.text + "\"";
+ return ts.isGlobalScopeAugmentation(node) ? "__global" : "\"" + name.text + "\"";
}
- if (node.name.kind === 144) {
- var nameExpression = node.name.expression;
+ if (name.kind === 144) {
+ var nameExpression = name.expression;
if (ts.isStringOrNumericLiteral(nameExpression)) {
return nameExpression.text;
}
ts.Debug.assert(ts.isWellKnownSymbolSyntactically(nameExpression));
return ts.getPropertyNameForKnownSymbolName(nameExpression.name.text);
}
- return node.name.text;
+ return name.text;
}
switch (node.kind) {
case 152:
@@ -20647,15 +21835,8 @@ var ts;
case 243:
return node.isExportEquals ? "export=" : "default";
case 194:
- 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;
+ if (ts.getSpecialPropertyAssignmentKind(node) === 2) {
+ return "export=";
}
ts.Debug.fail("Unknown binary declaration kind");
break;
@@ -20669,7 +21850,7 @@ var ts;
var functionType = node.parent;
var index = ts.indexOf(functionType.parameters, node);
return "arg" + index;
- case 290:
+ case 291:
var parentNode = node.parent && node.parent.parent;
var nameFromParentNode = void 0;
if (parentNode && parentNode.kind === 208) {
@@ -20725,9 +21906,9 @@ var ts;
}
}
ts.forEach(symbol.declarations, function (declaration) {
- file.bindDiagnostics.push(ts.createDiagnosticForNode(declaration.name || declaration, message_1, getDisplayName(declaration)));
+ file.bindDiagnostics.push(ts.createDiagnosticForNode(ts.getNameOfDeclaration(declaration) || declaration, message_1, getDisplayName(declaration)));
});
- file.bindDiagnostics.push(ts.createDiagnosticForNode(node.name || node, message_1, getDisplayName(node)));
+ file.bindDiagnostics.push(ts.createDiagnosticForNode(ts.getNameOfDeclaration(node) || node, message_1, getDisplayName(node)));
symbol = createSymbol(0, name);
}
}
@@ -20747,7 +21928,9 @@ var ts;
}
}
else {
- var isJSDocTypedefInJSDocNamespace = node.kind === 290 &&
+ if (node.kind === 291)
+ ts.Debug.assert(ts.isInJavaScriptFile(node));
+ var isJSDocTypedefInJSDocNamespace = node.kind === 291 &&
node.name &&
node.name.kind === 71 &&
node.name.isInJSDocNamespace;
@@ -20876,8 +22059,19 @@ var ts;
ts.forEachChild(node, bind, bindEach);
}
function bindChildrenWorker(node) {
- if (ts.isInJavaScriptFile(node) && node.jsDoc) {
- ts.forEach(node.jsDoc, bind);
+ if (node.jsDoc) {
+ if (ts.isInJavaScriptFile(node)) {
+ for (var _i = 0, _a = node.jsDoc; _i < _a.length; _i++) {
+ var j = _a[_i];
+ bind(j);
+ }
+ }
+ else {
+ for (var _b = 0, _c = node.jsDoc; _b < _c.length; _b++) {
+ var j = _c[_b];
+ setParentPointers(node, j);
+ }
+ }
}
if (checkUnreachable(node)) {
bindEachChild(node);
@@ -20947,7 +22141,7 @@ var ts;
case 283:
bindJSDocComment(node);
break;
- case 290:
+ case 291:
bindJSDocTypedefTag(node);
break;
default:
@@ -21524,13 +22718,13 @@ var ts;
}
function bindVariableDeclarationFlow(node) {
bindEachChild(node);
- if (node.initializer || node.parent.parent.kind === 215 || node.parent.parent.kind === 216) {
+ if (node.initializer || ts.isForInOrOfStatement(node.parent.parent)) {
bindInitializedVariableFlow(node);
}
}
function bindJSDocComment(node) {
ts.forEachChild(node, function (n) {
- if (n.kind !== 290) {
+ if (n.kind !== 291) {
bind(n);
}
});
@@ -21570,7 +22764,7 @@ var ts;
case 232:
case 178:
case 163:
- case 292:
+ case 293:
case 275:
case 254:
return 1;
@@ -21640,7 +22834,7 @@ var ts;
case 178:
case 230:
case 275:
- case 292:
+ case 293:
case 254:
return declareSymbol(container.symbol.members, container.symbol, node, symbolFlags, symbolExcludes);
case 160:
@@ -21928,9 +23122,8 @@ var ts;
}
node.parent = parent;
var saveInStrictMode = inStrictMode;
- if (ts.isInJavaScriptFile(node)) {
+ if (ts.isInJavaScriptFile(node))
bindJSDocTypedefTagIfAny(node);
- }
bindWorker(node);
if (node.kind > 142) {
var saveParent = parent;
@@ -21960,7 +23153,7 @@ var ts;
}
for (var _b = 0, _c = jsDoc.tags; _b < _c.length; _b++) {
var tag = _c[_b];
- if (tag.kind === 290) {
+ if (tag.kind === 291) {
var savedParent = parent;
parent = jsDoc;
bind(tag);
@@ -21992,7 +23185,7 @@ var ts;
case 71:
if (node.isInJSDocNamespace) {
var parentNode = node.parent;
- while (parentNode && parentNode.kind !== 290) {
+ while (parentNode && parentNode.kind !== 291) {
parentNode = parentNode.parent;
}
bindBlockScopedDeclaration(parentNode, 524288, 793064);
@@ -22058,10 +23251,7 @@ var ts;
return bindVariableDeclarationOrBindingElement(node);
case 149:
case 148:
- case 276:
- return bindPropertyOrMethodOrAccessor(node, 4 | (node.questionToken ? 67108864 : 0), 0);
- case 291:
- return bindJSDocProperty(node);
+ return bindPropertyWorker(node);
case 261:
case 262:
return bindPropertyOrMethodOrAccessor(node, 4, 0);
@@ -22099,13 +23289,10 @@ var ts;
return bindPropertyOrMethodOrAccessor(node, 65536, 74687);
case 160:
case 161:
- case 279:
return bindFunctionOrConstructorType(node);
case 163:
case 172:
- case 292:
- case 275:
- return bindAnonymousDeclaration(node, 2048, "__type");
+ return bindAnonymousTypeWorker(node);
case 178:
return bindObjectLiteralExpression(node);
case 186:
@@ -22122,11 +23309,6 @@ var ts;
return bindClassLikeDeclaration(node);
case 230:
return bindBlockScopedDeclaration(node, 64, 792968);
- case 290:
- if (!node.fullName || node.fullName.kind === 71) {
- return bindBlockScopedDeclaration(node, 524288, 793064);
- }
- break;
case 231:
return bindBlockScopedDeclaration(node, 524288, 793064);
case 232:
@@ -22159,8 +23341,31 @@ var ts;
}
case 234:
return updateStrictModeStatementList(node.statements);
+ case 276:
+ return bindPropertyWorker(node);
+ case 292:
+ return declareSymbolAndAddToSymbolTable(node, node.isBracketed || (node.typeExpression && node.typeExpression.type.kind === 278) ?
+ 4 | 67108864 : 4, 0);
+ case 279:
+ return bindFunctionOrConstructorType(node);
+ case 293:
+ case 275:
+ return bindAnonymousTypeWorker(node);
+ case 291: {
+ var fullName = node.fullName;
+ if (!fullName || fullName.kind === 71) {
+ return bindBlockScopedDeclaration(node, 524288, 793064);
+ }
+ break;
+ }
}
}
+ function bindPropertyWorker(node) {
+ return bindPropertyOrMethodOrAccessor(node, 4 | (node.questionToken ? 67108864 : 0), 0);
+ }
+ function bindAnonymousTypeWorker(node) {
+ return bindAnonymousDeclaration(node, 2048, "__type");
+ }
function checkTypePredicate(node) {
var parameterName = node.parameterName, type = node.type;
if (parameterName && parameterName.kind === 71) {
@@ -22377,7 +23582,7 @@ var ts;
}
}
function bindParameter(node) {
- if (inStrictMode) {
+ if (inStrictMode && !ts.isInAmbientContext(node)) {
checkStrictModeEvalOrArguments(node, node.name);
}
if (ts.isBindingPattern(node.name)) {
@@ -22392,7 +23597,7 @@ var ts;
}
}
function bindFunctionDeclaration(node) {
- if (!ts.isDeclarationFile(file) && !ts.isInAmbientContext(node)) {
+ if (!file.isDeclarationFile && !ts.isInAmbientContext(node)) {
if (ts.isAsyncFunction(node)) {
emitFlags |= 1024;
}
@@ -22407,7 +23612,7 @@ var ts;
}
}
function bindFunctionExpression(node) {
- if (!ts.isDeclarationFile(file) && !ts.isInAmbientContext(node)) {
+ if (!file.isDeclarationFile && !ts.isInAmbientContext(node)) {
if (ts.isAsyncFunction(node)) {
emitFlags |= 1024;
}
@@ -22420,10 +23625,8 @@ var ts;
return bindAnonymousDeclaration(node, 16, bindingName);
}
function bindPropertyOrMethodOrAccessor(node, symbolFlags, symbolExcludes) {
- if (!ts.isDeclarationFile(file) && !ts.isInAmbientContext(node)) {
- if (ts.isAsyncFunction(node)) {
- emitFlags |= 1024;
- }
+ if (!file.isDeclarationFile && !ts.isInAmbientContext(node) && ts.isAsyncFunction(node)) {
+ emitFlags |= 1024;
}
if (currentFlow && ts.isObjectLiteralOrClassExpressionMethod(node)) {
node.flowNode = currentFlow;
@@ -22432,9 +23635,6 @@ var ts;
? bindAnonymousDeclaration(node, symbolFlags, "__computed")
: declareSymbolAndAddToSymbolTable(node, symbolFlags, symbolExcludes);
}
- function bindJSDocProperty(node) {
- return declareSymbolAndAddToSymbolTable(node, 4, 0);
- }
function shouldReportErrorOnModuleDeclaration(node) {
var instanceState = getModuleInstanceState(node);
return instanceState === 1 || (instanceState === 2 && options.preserveConstEnums);
@@ -22533,6 +23733,9 @@ var ts;
|| isSuperOrSuperProperty(expression, expressionKind)) {
transformFlags |= 192;
}
+ if (expression.kind === 91) {
+ transformFlags |= 67108864;
+ }
node.transformFlags = transformFlags | 536870912;
return transformFlags & ~537396545;
}
@@ -22982,6 +24185,7 @@ var ts;
case 171:
case 172:
case 173:
+ case 236:
transformFlags = 3;
excludeFlags = -3;
break;
@@ -23122,6 +24326,10 @@ var ts;
}
}
ts.getTransformFlagsSubtreeExclusions = getTransformFlagsSubtreeExclusions;
+ function setParentPointers(parent, child) {
+ child.parent = parent;
+ ts.forEachChild(child, function (childsChild) { return setParentPointers(child, childsChild); });
+ }
})(ts || (ts = {}));
var ts;
(function (ts) {
@@ -23155,6 +24363,7 @@ var ts;
var Signature = ts.objectAllocator.getSignatureConstructor();
var typeCount = 0;
var symbolCount = 0;
+ var enumCount = 0;
var symbolInstantiationDepth = 0;
var emptyArray = [];
var emptySymbols = ts.createMap();
@@ -23299,13 +24508,21 @@ var ts;
tryFindAmbientModuleWithoutAugmentations: function (moduleName) {
return tryFindAmbientModule(moduleName, false);
},
- getApparentType: getApparentType
+ getApparentType: getApparentType,
+ getAllPossiblePropertiesOfType: getAllPossiblePropertiesOfType,
+ getSuggestionForNonexistentProperty: getSuggestionForNonexistentProperty,
+ getSuggestionForNonexistentSymbol: getSuggestionForNonexistentSymbol,
+ getBaseConstraintOfType: getBaseConstraintOfType,
+ getJsxNamespace: getJsxNamespace,
+ resolveNameAtLocation: function (location, name, meaning) {
+ location = ts.getParseTreeNode(location);
+ return resolveName(location, name, meaning, undefined, name);
+ },
};
var tupleTypes = [];
var unionTypes = ts.createMap();
var intersectionTypes = ts.createMap();
- var stringLiteralTypes = ts.createMap();
- var numericLiteralTypes = ts.createMap();
+ var literalTypes = ts.createMap();
var indexedAccessTypes = ts.createMap();
var evolvingArrayTypes = [];
var unknownSymbol = createSymbol(4, "unknown");
@@ -23378,11 +24595,13 @@ var ts;
var flowLoopStart = 0;
var flowLoopCount = 0;
var visitedFlowCount = 0;
- var emptyStringType = getLiteralTypeForText(32, "");
- var zeroType = getLiteralTypeForText(64, "0");
+ var emptyStringType = getLiteralType("");
+ var zeroType = getLiteralType(0);
var resolutionTargets = [];
var resolutionResults = [];
var resolutionPropertyNames = [];
+ var suggestionCount = 0;
+ var maximumSuggestionCount = 10;
var mergedSymbols = [];
var symbolLinks = [];
var nodeLinks = [];
@@ -23639,16 +24858,16 @@ var ts;
recordMergedSymbol(target, source);
}
else if (target.flags & 1024) {
- error(source.declarations[0].name, ts.Diagnostics.Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity, symbolToString(target));
+ error(ts.getNameOfDeclaration(source.declarations[0]), 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;
ts.forEach(source.declarations, function (node) {
- error(node.name ? node.name : node, message_2, symbolToString(source));
+ error(ts.getNameOfDeclaration(node) || node, message_2, symbolToString(source));
});
ts.forEach(target.declarations, function (node) {
- error(node.name ? node.name : node, message_2, symbolToString(source));
+ error(ts.getNameOfDeclaration(node) || node, message_2, symbolToString(source));
});
}
}
@@ -23721,9 +24940,6 @@ 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 === 265 && !ts.isExternalOrCommonJsModule(node);
}
@@ -23731,7 +24947,7 @@ var ts;
if (meaning) {
var symbol = symbols.get(name);
if (symbol) {
- ts.Debug.assert((getCheckFlags(symbol) & 1) === 0, "Should never get an instantiated symbol here.");
+ ts.Debug.assert((ts.getCheckFlags(symbol) & 1) === 0, "Should never get an instantiated symbol here.");
if (symbol.flags & meaning) {
return symbol;
}
@@ -23759,7 +24975,9 @@ var ts;
var useFile = ts.getSourceFileOfNode(usage);
if (declarationFile !== useFile) {
if ((modulekind && (declarationFile.externalModuleIndicator || useFile.externalModuleIndicator)) ||
- (!compilerOptions.outFile && !compilerOptions.out)) {
+ (!compilerOptions.outFile && !compilerOptions.out) ||
+ isInTypeQuery(usage) ||
+ ts.isInAmbientContext(declaration)) {
return true;
}
if (isUsedInFunctionOrInstanceProperty(usage, declaration)) {
@@ -23798,14 +25016,7 @@ var ts;
}
break;
}
- switch (declaration.parent.parent.kind) {
- case 215:
- case 216:
- if (isSameScopeDescendentOf(usage, declaration.parent.parent.expression, container)) {
- return true;
- }
- }
- return false;
+ return ts.isForInOrOfStatement(declaration.parent.parent) && isSameScopeDescendentOf(usage, declaration.parent.parent.expression, container);
}
function isUsedInFunctionOrInstanceProperty(usage, declaration, container) {
return !!ts.findAncestor(usage, function (current) {
@@ -23834,7 +25045,11 @@ var ts;
});
}
}
- function resolveName(location, name, meaning, nameNotFoundMessage, nameArg) {
+ function resolveName(location, name, meaning, nameNotFoundMessage, nameArg, suggestedNameNotFoundMessage) {
+ return resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, getSymbol, suggestedNameNotFoundMessage);
+ }
+ function resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, lookup, suggestedNameNotFoundMessage) {
+ var originalLocation = location;
var result;
var lastLocation;
var propertyWithInvalidInitializer;
@@ -23843,7 +25058,7 @@ var ts;
var isInExternalModule = false;
loop: while (location) {
if (location.locals && !isGlobalSourceFile(location)) {
- if (result = getSymbol(location.locals, name, meaning)) {
+ if (result = lookup(location.locals, name, meaning)) {
var useResult = true;
if (ts.isFunctionLike(location) && lastLocation && lastLocation !== location.body) {
if (meaning & result.flags & 793064 && lastLocation.kind !== 283) {
@@ -23890,12 +25105,12 @@ var ts;
break;
}
}
- if (result = getSymbol(moduleExports, name, meaning & 8914931)) {
+ if (result = lookup(moduleExports, name, meaning & 8914931)) {
break loop;
}
break;
case 232:
- if (result = getSymbol(getSymbolOfNode(location).exports, name, meaning & 8)) {
+ if (result = lookup(getSymbolOfNode(location).exports, name, meaning & 8)) {
break loop;
}
break;
@@ -23904,7 +25119,7 @@ var ts;
if (ts.isClassLike(location.parent) && !(ts.getModifierFlags(location) & 32)) {
var ctor = findConstructorDeclaration(location.parent);
if (ctor && ctor.locals) {
- if (getSymbol(ctor.locals, name, meaning & 107455)) {
+ if (lookup(ctor.locals, name, meaning & 107455)) {
propertyWithInvalidInitializer = location;
}
}
@@ -23913,7 +25128,7 @@ var ts;
case 229:
case 199:
case 230:
- if (result = getSymbol(getSymbolOfNode(location).members, name, meaning & 793064)) {
+ if (result = lookup(getSymbolOfNode(location).members, name, meaning & 793064)) {
if (!isTypeParameterSymbolDeclaredInContainer(result, location)) {
result = undefined;
break;
@@ -23935,7 +25150,7 @@ var ts;
case 144:
grandparent = location.parent.parent;
if (ts.isClassLike(grandparent) || grandparent.kind === 230) {
- if (result = getSymbol(getSymbolOfNode(grandparent).members, name, meaning & 793064)) {
+ if (result = lookup(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;
}
@@ -23982,7 +25197,7 @@ var ts;
result.isReferenced = true;
}
if (!result) {
- result = getSymbol(globals, name, meaning);
+ result = lookup(globals, name, meaning);
}
if (!result) {
if (nameNotFoundMessage) {
@@ -23992,7 +25207,17 @@ var ts;
!checkAndReportErrorForUsingTypeAsNamespace(errorLocation, name, meaning) &&
!checkAndReportErrorForUsingTypeAsValue(errorLocation, name, meaning) &&
!checkAndReportErrorForUsingNamespaceModuleAsValue(errorLocation, name, meaning)) {
- error(errorLocation, nameNotFoundMessage, typeof nameArg === "string" ? nameArg : ts.declarationNameToString(nameArg));
+ var suggestion = void 0;
+ if (suggestedNameNotFoundMessage && suggestionCount < maximumSuggestionCount) {
+ suggestion = getSuggestionForNonexistentSymbol(originalLocation, name, meaning);
+ if (suggestion) {
+ error(errorLocation, suggestedNameNotFoundMessage, typeof nameArg === "string" ? nameArg : ts.declarationNameToString(nameArg), suggestion);
+ }
+ }
+ if (!suggestion) {
+ error(errorLocation, nameNotFoundMessage, typeof nameArg === "string" ? nameArg : ts.declarationNameToString(nameArg));
+ }
+ suggestionCount++;
}
}
return undefined;
@@ -24003,8 +25228,9 @@ 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 ||
- ((meaning & 32 || meaning & 384) && (meaning & 107455) === 107455)) {
+ if (errorLocation &&
+ (meaning & 2 ||
+ ((meaning & 32 || meaning & 384) && (meaning & 107455) === 107455))) {
var exportOrLocalSymbol = getExportSymbolOfValueSymbolIfExported(result);
if (exportOrLocalSymbol.flags & 2 || exportOrLocalSymbol.flags & 32 || exportOrLocalSymbol.flags & 384) {
checkResolvedBlockScopedVariable(exportOrLocalSymbol, errorLocation);
@@ -24089,6 +25315,10 @@ var ts;
}
function checkAndReportErrorForUsingTypeAsValue(errorLocation, name, meaning) {
if (meaning & (107455 & ~1024)) {
+ if (name === "any" || name === "string" || name === "number" || name === "boolean" || name === "never") {
+ error(errorLocation, ts.Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here, name);
+ return true;
+ }
var symbol = resolveSymbol(resolveName(errorLocation, name, 793064 & ~107455, undefined, undefined));
if (symbol && !(symbol.flags & 1024)) {
error(errorLocation, ts.Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here, name);
@@ -24120,13 +25350,13 @@ var ts;
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));
+ error(errorLocation, ts.Diagnostics.Block_scoped_variable_0_used_before_its_declaration, ts.declarationNameToString(ts.getNameOfDeclaration(declaration)));
}
else if (result.flags & 32) {
- error(errorLocation, ts.Diagnostics.Class_0_used_before_its_declaration, ts.declarationNameToString(declaration.name));
+ error(errorLocation, ts.Diagnostics.Class_0_used_before_its_declaration, ts.declarationNameToString(ts.getNameOfDeclaration(declaration)));
}
- else if (result.flags & 384) {
- error(errorLocation, ts.Diagnostics.Enum_0_used_before_its_declaration, ts.declarationNameToString(declaration.name));
+ else if (result.flags & 256) {
+ error(errorLocation, ts.Diagnostics.Enum_0_used_before_its_declaration, ts.declarationNameToString(ts.getNameOfDeclaration(declaration)));
}
}
}
@@ -24138,7 +25368,7 @@ var ts;
if (node.kind === 237) {
return node;
}
- return ts.findAncestor(node, function (n) { return n.kind === 238; });
+ return ts.findAncestor(node, ts.isImportDeclaration);
}
}
function getDeclarationOfAliasSymbol(symbol) {
@@ -24177,6 +25407,9 @@ var ts;
return resolveESModuleSymbol(resolveExternalModuleName(node, moduleSpecifier), moduleSpecifier, dontResolveAlias);
}
function combineValueAndTypeSymbols(valueSymbol, typeSymbol) {
+ if (valueSymbol === unknownSymbol && typeSymbol === unknownSymbol) {
+ return unknownSymbol;
+ }
if (valueSymbol.flags & (793064 | 1920)) {
return valueSymbol;
}
@@ -24241,10 +25474,10 @@ var ts;
function getTargetOfNamespaceExportDeclaration(node, dontResolveAlias) {
return resolveExternalModuleSymbol(node.parent.symbol, dontResolveAlias);
}
- function getTargetOfExportSpecifier(node, dontResolveAlias) {
+ function getTargetOfExportSpecifier(node, meaning, dontResolveAlias) {
return node.parent.parent.moduleSpecifier ?
getExternalModuleMember(node.parent.parent, node, dontResolveAlias) :
- resolveEntityName(node.propertyName || node.name, 107455 | 793064 | 1920, false, dontResolveAlias);
+ resolveEntityName(node.propertyName || node.name, meaning, false, dontResolveAlias);
}
function getTargetOfExportAssignment(node, dontResolveAlias) {
return resolveEntityName(node.expression, 107455 | 793064 | 1920, false, dontResolveAlias);
@@ -24260,15 +25493,19 @@ var ts;
case 242:
return getTargetOfImportSpecifier(node, dontRecursivelyResolve);
case 246:
- return getTargetOfExportSpecifier(node, dontRecursivelyResolve);
+ return getTargetOfExportSpecifier(node, 107455 | 793064 | 1920, dontRecursivelyResolve);
case 243:
return getTargetOfExportAssignment(node, dontRecursivelyResolve);
case 236:
return getTargetOfNamespaceExportDeclaration(node, dontRecursivelyResolve);
}
}
+ function isNonLocalAlias(symbol, excludes) {
+ if (excludes === void 0) { excludes = 107455 | 793064 | 1920; }
+ return symbol && (symbol.flags & (8388608 | excludes)) === 8388608;
+ }
function resolveSymbol(symbol, dontResolveAlias) {
- var shouldResolve = !dontResolveAlias && symbol && symbol.flags & 8388608 && !(symbol.flags & (107455 | 793064 | 1920));
+ var shouldResolve = !dontResolveAlias && isNonLocalAlias(symbol);
return shouldResolve ? resolveAlias(symbol) : symbol;
}
function resolveAlias(symbol) {
@@ -24382,7 +25619,7 @@ var ts;
else {
ts.Debug.fail("Unknown entity name kind.");
}
- ts.Debug.assert((getCheckFlags(symbol) & 1) === 0, "Should never get an instantiated symbol here.");
+ ts.Debug.assert((ts.getCheckFlags(symbol) & 1) === 0, "Should never get an instantiated symbol here.");
return (symbol.flags & meaning) || dontResolveAlias ? symbol : resolveAlias(symbol);
}
function resolveExternalModuleName(location, moduleReferenceExpression) {
@@ -24402,6 +25639,11 @@ var ts;
if (moduleName === undefined) {
return;
}
+ if (ts.startsWith(moduleReference, "@types/")) {
+ var diag = ts.Diagnostics.Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1;
+ var withoutAtTypePrefix = ts.removePrefix(moduleReference, "@types/");
+ error(errorNode, diag, withoutAtTypePrefix, moduleReference);
+ }
var ambientModule = tryFindAmbientModule(moduleName, true);
if (ambientModule) {
return ambientModule;
@@ -24431,7 +25673,9 @@ var ts;
error(errorNode, diag, moduleReference, resolvedModule.resolvedFileName);
}
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);
+ var errorInfo = ts.chainDiagnosticMessages(undefined, ts.Diagnostics.Try_npm_install_types_Slash_0_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0, moduleReference);
+ errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type, moduleReference, resolvedModule.resolvedFileName);
+ diagnostics.add(ts.createDiagnosticForNodeFromMessageChain(errorNode, errorInfo));
}
return undefined;
}
@@ -24459,7 +25703,6 @@ var ts;
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;
}
@@ -24569,8 +25812,8 @@ var ts;
}
function findConstructorDeclaration(node) {
var members = node.members;
- for (var _i = 0, members_1 = members; _i < members_1.length; _i++) {
- var member = members_1[_i];
+ for (var _i = 0, members_2 = members; _i < members_2.length; _i++) {
+ var member = members_2[_i];
if (member.kind === 152 && ts.nodeIsPresent(member.body)) {
return member;
}
@@ -24600,7 +25843,7 @@ var ts;
return type;
}
function createTypeofType() {
- return getUnionType(ts.convertToArray(typeofEQFacts.keys(), function (s) { return getLiteralTypeForText(32, s); }));
+ return getUnionType(ts.convertToArray(typeofEQFacts.keys(), getLiteralType));
}
function isReservedMemberName(name) {
return name.charCodeAt(0) === 95 &&
@@ -24696,7 +25939,7 @@ var ts;
if (!useOnlyExternalAliasing ||
ts.forEach(symbolFromSymbolTable.declarations, ts.isExternalModuleImportEqualsDeclaration)) {
var resolvedImportedSymbol = resolveAlias(symbolFromSymbolTable);
- if (isAccessible(symbolFromSymbolTable, resolveAlias(symbolFromSymbolTable))) {
+ if (isAccessible(symbolFromSymbolTable, resolvedImportedSymbol)) {
return [symbolFromSymbolTable];
}
var accessibleSymbolsFromExports = resolvedImportedSymbol.exports ? getAccessibleSymbolChainFromSymbolTableWorker(resolvedImportedSymbol.exports, visitedSymbolTables) : undefined;
@@ -24870,34 +26113,59 @@ var ts;
return result;
}
function typeToString(type, enclosingDeclaration, flags) {
- var writer = ts.getSingleLineStringWriter();
- getSymbolDisplayBuilder().buildTypeDisplay(type, writer, enclosingDeclaration, flags);
- var result = writer.string();
- ts.releaseStringWriter(writer);
- var maxLength = compilerOptions.noErrorTruncation || flags & 4 ? undefined : 100;
+ var typeNode = nodeBuilder.typeToTypeNode(type, enclosingDeclaration, toNodeBuilderFlags(flags) | ts.NodeBuilderFlags.IgnoreErrors | ts.NodeBuilderFlags.WriteTypeParametersInQualifiedName);
+ ts.Debug.assert(typeNode !== undefined, "should always get typenode");
+ var options = { removeComments: true };
+ var writer = ts.createTextWriter("");
+ var printer = ts.createPrinter(options);
+ var sourceFile = enclosingDeclaration && ts.getSourceFileOfNode(enclosingDeclaration);
+ printer.writeNode(3, typeNode, sourceFile, writer);
+ var result = writer.getText();
+ var maxLength = compilerOptions.noErrorTruncation || flags & 8 ? undefined : 100;
if (maxLength && result.length >= maxLength) {
- result = result.substr(0, maxLength - "...".length) + "...";
+ return result.substr(0, maxLength - "...".length) + "...";
}
return result;
+ function toNodeBuilderFlags(flags) {
+ var result = ts.NodeBuilderFlags.None;
+ if (!flags) {
+ return result;
+ }
+ if (flags & 8) {
+ result |= ts.NodeBuilderFlags.NoTruncation;
+ }
+ if (flags & 256) {
+ result |= ts.NodeBuilderFlags.UseFullyQualifiedType;
+ }
+ if (flags & 4096) {
+ result |= ts.NodeBuilderFlags.SuppressAnyReturnType;
+ }
+ if (flags & 1) {
+ result |= ts.NodeBuilderFlags.WriteArrayAsGenericType;
+ }
+ if (flags & 64) {
+ result |= ts.NodeBuilderFlags.WriteTypeArgumentsOfSignature;
+ }
+ return result;
+ }
}
function createNodeBuilder() {
- var context;
return {
typeToTypeNode: function (type, enclosingDeclaration, flags) {
- context = createNodeBuilderContext(enclosingDeclaration, flags);
- var resultingNode = typeToTypeNodeHelper(type);
+ var context = createNodeBuilderContext(enclosingDeclaration, flags);
+ var resultingNode = typeToTypeNodeHelper(type, context);
var result = context.encounteredError ? undefined : resultingNode;
return result;
},
indexInfoToIndexSignatureDeclaration: function (indexInfo, kind, enclosingDeclaration, flags) {
- context = createNodeBuilderContext(enclosingDeclaration, flags);
- var resultingNode = indexInfoToIndexSignatureDeclarationHelper(indexInfo, kind);
+ var context = createNodeBuilderContext(enclosingDeclaration, flags);
+ var resultingNode = indexInfoToIndexSignatureDeclarationHelper(indexInfo, kind, context);
var result = context.encounteredError ? undefined : resultingNode;
return result;
},
signatureToSignatureDeclaration: function (signature, kind, enclosingDeclaration, flags) {
- context = createNodeBuilderContext(enclosingDeclaration, flags);
- var resultingNode = signatureToSignatureDeclarationHelper(signature, kind);
+ var context = createNodeBuilderContext(enclosingDeclaration, flags);
+ var resultingNode = signatureToSignatureDeclarationHelper(signature, kind, context);
var result = context.encounteredError ? undefined : resultingNode;
return result;
}
@@ -24907,12 +26175,12 @@ var ts;
enclosingDeclaration: enclosingDeclaration,
flags: flags,
encounteredError: false,
- inObjectTypeLiteral: false,
- checkAlias: true,
symbolStack: undefined
};
}
- function typeToTypeNodeHelper(type) {
+ function typeToTypeNodeHelper(type, context) {
+ var inTypeAlias = context.flags & ts.NodeBuilderFlags.InTypeAlias;
+ context.flags &= ~ts.NodeBuilderFlags.InTypeAlias;
if (!type) {
context.encounteredError = true;
return undefined;
@@ -24929,23 +26197,25 @@ var ts;
if (type.flags & 8) {
return ts.createKeywordTypeNode(122);
}
- if (type.flags & 16) {
- var name = symbolToName(type.symbol, false);
+ if (type.flags & 256 && !(type.flags & 65536)) {
+ var parentSymbol = getParentOfSymbol(type.symbol);
+ var parentName = symbolToName(parentSymbol, context, 793064, false);
+ var enumLiteralName = getDeclaredTypeOfSymbol(parentSymbol) === type ? parentName : ts.createQualifiedName(parentName, getNameOfSymbol(type.symbol, context));
+ return ts.createTypeReferenceNode(enumLiteralName, undefined);
+ }
+ if (type.flags & 272) {
+ var name = symbolToName(type.symbol, context, 793064, false);
return ts.createTypeReferenceNode(name, undefined);
}
if (type.flags & (32)) {
- return ts.createLiteralTypeNode((ts.createLiteral(type.text)));
+ return ts.createLiteralTypeNode(ts.setEmitFlags(ts.createLiteral(type.value), 16777216));
}
if (type.flags & (64)) {
- return ts.createLiteralTypeNode((ts.createNumericLiteral(type.text)));
+ return ts.createLiteralTypeNode((ts.createLiteral(type.value)));
}
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(105);
}
@@ -24965,8 +26235,8 @@ var ts;
return ts.createKeywordTypeNode(134);
}
if (type.flags & 16384 && type.isThisType) {
- if (context.inObjectTypeLiteral) {
- if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.allowThisInObjectLiteral)) {
+ if (context.flags & ts.NodeBuilderFlags.InObjectTypeLiteral) {
+ if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.AllowThisInObjectLiteral)) {
context.encounteredError = true;
}
}
@@ -24977,72 +26247,53 @@ var ts;
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);
+ if (type.flags & 16384 || objectFlags & 3) {
+ var name = symbolToName(type.symbol, context, 793064, false);
return ts.createTypeReferenceNode(name, undefined);
}
- if (context.checkAlias && type.aliasSymbol) {
- var name = symbolToName(type.aliasSymbol, false);
- var typeArgumentNodes = type.aliasTypeArguments && mapToTypeNodeArray(type.aliasTypeArguments);
+ if (!inTypeAlias && type.aliasSymbol &&
+ isSymbolAccessible(type.aliasSymbol, context.enclosingDeclaration, 793064, false).accessibility === 0) {
+ var name = symbolToTypeReferenceName(type.aliasSymbol);
+ var typeArgumentNodes = mapToTypeNodes(type.aliasTypeArguments, context);
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(166, unionTypeNodes);
+ if (type.flags & (65536 | 131072)) {
+ var types = type.flags & 65536 ? formatUnionTypes(type.types) : type.types;
+ var typeNodes = mapToTypeNodes(types, context);
+ if (typeNodes && typeNodes.length > 0) {
+ var unionOrIntersectionTypeNode = ts.createUnionOrIntersectionTypeNode(type.flags & 65536 ? 166 : 167, typeNodes);
+ return unionOrIntersectionTypeNode;
}
else {
- if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.allowEmptyUnionOrIntersection)) {
+ if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.AllowEmptyUnionOrIntersection)) {
context.encounteredError = true;
}
return undefined;
}
}
- if (type.flags & 131072) {
- return ts.createUnionOrIntersectionTypeNode(167, 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);
+ var indexTypeNode = typeToTypeNodeHelper(indexedType, context);
return ts.createTypeOperatorNode(indexTypeNode);
}
if (type.flags & 524288) {
- var objectTypeNode = typeToTypeNodeHelper(type.objectType);
- var indexTypeNode = typeToTypeNodeHelper(type.indexType);
+ var objectTypeNode = typeToTypeNodeHelper(type.objectType, context);
+ var indexTypeNode = typeToTypeNodeHelper(type.indexType, context);
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(131) : undefined;
var questionToken = type.declaration && type.declaration.questionToken ? ts.createToken(55) : undefined;
- return ts.createMappedTypeNode(readonlyToken, typeParameterNode, questionToken, templateTypeNode);
+ var typeParameterNode = typeParameterToDeclaration(getTypeParameterFromMappedType(type), context);
+ var templateTypeNode = typeToTypeNodeHelper(getTemplateTypeFromMappedType(type), context);
+ var mappedTypeNode = ts.createMappedTypeNode(readonlyToken, typeParameterNode, questionToken, templateTypeNode);
+ return ts.setEmitFlags(mappedTypeNode, 1);
}
function createAnonymousTypeNode(type) {
var symbol = type.symbol;
@@ -25050,12 +26301,12 @@ var ts;
if (symbol.flags & 32 && !getBaseTypeVariableOfClass(symbol) ||
symbol.flags & (384 | 512) ||
shouldWriteTypeOfFunctionSymbol()) {
- return createTypeQueryNodeFromSymbol(symbol);
+ return createTypeQueryNodeFromSymbol(symbol, 107455);
}
else if (ts.contains(context.symbolStack, symbol)) {
var typeAlias = getTypeAliasForTypeLiteral(type);
if (typeAlias) {
- var entityName = symbolToName(typeAlias, false);
+ var entityName = symbolToName(typeAlias, context, 793064, false);
return ts.createTypeReferenceNode(entityName, undefined);
}
else {
@@ -25097,41 +26348,52 @@ var ts;
var resolved = resolveStructuredTypeMembers(type);
if (!resolved.properties.length && !resolved.stringIndexInfo && !resolved.numberIndexInfo) {
if (!resolved.callSignatures.length && !resolved.constructSignatures.length) {
- return ts.createTypeLiteralNode(undefined);
+ return ts.setEmitFlags(ts.createTypeLiteralNode(undefined), 1);
}
if (resolved.callSignatures.length === 1 && !resolved.constructSignatures.length) {
var signature = resolved.callSignatures[0];
- return signatureToSignatureDeclarationHelper(signature, 160);
+ var signatureNode = signatureToSignatureDeclarationHelper(signature, 160, context);
+ return signatureNode;
}
if (resolved.constructSignatures.length === 1 && !resolved.callSignatures.length) {
var signature = resolved.constructSignatures[0];
- return signatureToSignatureDeclarationHelper(signature, 161);
+ var signatureNode = signatureToSignatureDeclarationHelper(signature, 161, context);
+ return signatureNode;
}
}
- var saveInObjectTypeLiteral = context.inObjectTypeLiteral;
- context.inObjectTypeLiteral = true;
+ var savedFlags = context.flags;
+ context.flags |= ts.NodeBuilderFlags.InObjectTypeLiteral;
var members = createTypeNodesFromResolvedType(resolved);
- context.inObjectTypeLiteral = saveInObjectTypeLiteral;
- return ts.createTypeLiteralNode(members);
+ context.flags = savedFlags;
+ var typeLiteralNode = ts.createTypeLiteralNode(members);
+ return ts.setEmitFlags(typeLiteralNode, 1);
}
- function createTypeQueryNodeFromSymbol(symbol) {
- var entityName = symbolToName(symbol, false);
+ function createTypeQueryNodeFromSymbol(symbol, symbolFlags) {
+ var entityName = symbolToName(symbol, context, symbolFlags, false);
return ts.createTypeQueryNode(entityName);
}
+ function symbolToTypeReferenceName(symbol) {
+ var entityName = symbol.flags & 32 || !isReservedMemberName(symbol.name) ? symbolToName(symbol, context, 793064, false) : ts.createIdentifier("");
+ return entityName;
+ }
function typeReferenceToTypeNode(type) {
var typeArguments = type.typeArguments || emptyArray;
if (type.target === globalArrayType) {
- var elementType = typeToTypeNodeHelper(typeArguments[0]);
+ if (context.flags & ts.NodeBuilderFlags.WriteArrayAsGenericType) {
+ var typeArgumentNode = typeToTypeNodeHelper(typeArguments[0], context);
+ return ts.createTypeReferenceNode("Array", [typeArgumentNode]);
+ }
+ var elementType = typeToTypeNodeHelper(typeArguments[0], context);
return ts.createArrayTypeNode(elementType);
}
else if (type.target.objectFlags & 8) {
if (typeArguments.length > 0) {
- var tupleConstituentNodes = mapToTypeNodeArray(typeArguments.slice(0, getTypeReferenceArity(type)));
+ var tupleConstituentNodes = mapToTypeNodes(typeArguments.slice(0, getTypeReferenceArity(type)), context);
if (tupleConstituentNodes && tupleConstituentNodes.length > 0) {
return ts.createTupleTypeNode(tupleConstituentNodes);
}
}
- if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.allowEmptyTuple)) {
+ if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.AllowEmptyTuple)) {
context.encounteredError = true;
}
return undefined;
@@ -25139,7 +26401,7 @@ var ts;
else {
var outerTypeParameters = type.target.outerTypeParameters;
var i = 0;
- var qualifiedName = undefined;
+ var qualifiedName = void 0;
if (outerTypeParameters) {
var length_1 = outerTypeParameters.length;
while (i < length_1) {
@@ -25149,48 +26411,72 @@ var ts;
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 {
+ var typeArgumentSlice = mapToTypeNodes(typeArguments.slice(start, i), context);
+ var typeArgumentNodes_1 = typeArgumentSlice && ts.createNodeArray(typeArgumentSlice);
+ var namePart = symbolToTypeReferenceName(parent);
+ (namePart.kind === 71 ? namePart : namePart.right).typeArguments = typeArgumentNodes_1;
+ if (qualifiedName) {
ts.Debug.assert(!qualifiedName.right);
- qualifiedName.right = qualifiedNamePart;
+ qualifiedName = addToQualifiedNameMissingRightIdentifier(qualifiedName, namePart);
qualifiedName = ts.createQualifiedName(qualifiedName, undefined);
}
+ else {
+ qualifiedName = ts.createQualifiedName(namePart, undefined);
+ }
}
}
}
var entityName = undefined;
- var nameIdentifier = symbolToName(type.symbol, true);
+ var nameIdentifier = symbolToTypeReferenceName(type.symbol);
if (qualifiedName) {
ts.Debug.assert(!qualifiedName.right);
- qualifiedName.right = nameIdentifier;
+ qualifiedName = addToQualifiedNameMissingRightIdentifier(qualifiedName, 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;
+ var typeArgumentNodes = void 0;
+ if (typeArguments.length > 0) {
+ var typeParameterCount = (type.target.typeParameters || emptyArray).length;
+ typeArgumentNodes = mapToTypeNodes(typeArguments.slice(i, typeParameterCount), context);
+ }
+ if (typeArgumentNodes) {
+ var lastIdentifier = entityName.kind === 71 ? entityName : entityName.right;
+ lastIdentifier.typeArguments = undefined;
+ }
return ts.createTypeReferenceNode(entityName, typeArgumentNodes);
}
}
+ function addToQualifiedNameMissingRightIdentifier(left, right) {
+ ts.Debug.assert(left.right === undefined);
+ if (right.kind === 71) {
+ left.right = right;
+ return left;
+ }
+ var rightPart = right;
+ while (rightPart.left.kind !== 71) {
+ rightPart = rightPart.left;
+ }
+ left.right = rightPart.left;
+ rightPart.left = left;
+ return right;
+ }
function createTypeNodesFromResolvedType(resolvedType) {
var typeElements = [];
for (var _i = 0, _a = resolvedType.callSignatures; _i < _a.length; _i++) {
var signature = _a[_i];
- typeElements.push(signatureToSignatureDeclarationHelper(signature, 155));
+ typeElements.push(signatureToSignatureDeclarationHelper(signature, 155, context));
}
for (var _b = 0, _c = resolvedType.constructSignatures; _b < _c.length; _b++) {
var signature = _c[_b];
- typeElements.push(signatureToSignatureDeclarationHelper(signature, 156));
+ typeElements.push(signatureToSignatureDeclarationHelper(signature, 156, context));
}
if (resolvedType.stringIndexInfo) {
- typeElements.push(indexInfoToIndexSignatureDeclarationHelper(resolvedType.stringIndexInfo, 0));
+ typeElements.push(indexInfoToIndexSignatureDeclarationHelper(resolvedType.stringIndexInfo, 0, context));
}
if (resolvedType.numberIndexInfo) {
- typeElements.push(indexInfoToIndexSignatureDeclarationHelper(resolvedType.numberIndexInfo, 1));
+ typeElements.push(indexInfoToIndexSignatureDeclarationHelper(resolvedType.numberIndexInfo, 1, context));
}
var properties = resolvedType.properties;
if (!properties) {
@@ -25199,74 +26485,126 @@ var ts;
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 saveEnclosingDeclaration = context.enclosingDeclaration;
+ context.enclosingDeclaration = undefined;
+ var propertyName = symbolToName(propertySymbol, context, 107455, true);
+ context.enclosingDeclaration = saveEnclosingDeclaration;
var optionalToken = propertySymbol.flags & 67108864 ? ts.createToken(55) : 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, 150);
+ var methodDeclaration = signatureToSignatureDeclarationHelper(signature, 150, context);
methodDeclaration.name = propertyName;
methodDeclaration.questionToken = optionalToken;
typeElements.push(methodDeclaration);
}
}
else {
- var propertyTypeNode = propertyType ? typeToTypeNodeHelper(propertyType) : ts.createKeywordTypeNode(119);
- typeElements.push(ts.createPropertySignature(propertyName, optionalToken, propertyTypeNode, undefined));
+ var propertyTypeNode = propertyType ? typeToTypeNodeHelper(propertyType, context) : ts.createKeywordTypeNode(119);
+ var modifiers = isReadonlySymbol(propertySymbol) ? [ts.createToken(131)] : undefined;
+ var propertySignature = ts.createPropertySignature(modifiers, propertyName, optionalToken, propertyTypeNode, undefined);
+ typeElements.push(propertySignature);
}
}
return typeElements.length ? typeElements : undefined;
}
}
- function indexInfoToIndexSignatureDeclarationHelper(indexInfo, kind) {
+ function mapToTypeNodes(types, context) {
+ if (ts.some(types)) {
+ var result = [];
+ for (var i = 0; i < types.length; ++i) {
+ var type = types[i];
+ var typeNode = typeToTypeNodeHelper(type, context);
+ if (typeNode) {
+ result.push(typeNode);
+ }
+ }
+ return result;
+ }
+ }
+ function indexInfoToIndexSignatureDeclarationHelper(indexInfo, kind, context) {
+ var name = ts.getNameFromIndexInfo(indexInfo) || "x";
var indexerTypeNode = ts.createKeywordTypeNode(kind === 0 ? 136 : 133);
- 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(131)] : undefined, [indexingParameter], typeNode);
+ var typeNode = typeToTypeNodeHelper(indexInfo.type, context);
+ return ts.createIndexSignature(undefined, indexInfo.isReadonly ? [ts.createToken(131)] : 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); });
+ function signatureToSignatureDeclarationHelper(signature, kind, context) {
+ var typeParameters = signature.typeParameters && signature.typeParameters.map(function (parameter) { return typeParameterToDeclaration(parameter, context); });
+ var parameters = signature.parameters.map(function (parameter) { return symbolToParameterDeclaration(parameter, context); });
+ if (signature.thisParameter) {
+ var thisParameter = symbolToParameterDeclaration(signature.thisParameter, context);
+ parameters.unshift(thisParameter);
+ }
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);
+ var parameterName = typePredicate.kind === 1 ?
+ ts.setEmitFlags(ts.createIdentifier(typePredicate.parameterName), 16777216) :
+ ts.createThisTypeNode();
+ var typeNode = typeToTypeNodeHelper(typePredicate.type, context);
returnTypeNode = ts.createTypePredicateNode(parameterName, typeNode);
}
else {
var returnType = getReturnTypeOfSignature(signature);
- returnTypeNode = returnType && typeToTypeNodeHelper(returnType);
+ returnTypeNode = returnType && typeToTypeNodeHelper(returnType, context);
+ }
+ if (context.flags & ts.NodeBuilderFlags.SuppressAnyReturnType) {
+ if (returnTypeNode && returnTypeNode.kind === 119) {
+ returnTypeNode = undefined;
+ }
}
- var returnTypeNodeExceptAny = returnTypeNode && returnTypeNode.kind !== 119 ? returnTypeNode : undefined;
- return ts.createSignatureDeclaration(kind, typeParameters, parameters, returnTypeNodeExceptAny);
+ else if (!returnTypeNode) {
+ returnTypeNode = ts.createKeywordTypeNode(119);
+ }
+ return ts.createSignatureDeclaration(kind, typeParameters, parameters, returnTypeNode);
}
- function typeParameterToDeclaration(type) {
+ function typeParameterToDeclaration(type, context) {
+ var name = symbolToName(type.symbol, context, 793064, true);
var constraint = getConstraintFromTypeParameter(type);
- var constraintNode = constraint && typeToTypeNodeHelper(constraint);
+ var constraintNode = constraint && typeToTypeNodeHelper(constraint, context);
var defaultParameter = getDefaultFromTypeParameter(type);
- var defaultParameterNode = defaultParameter && typeToTypeNodeHelper(defaultParameter);
- var name = symbolToName(type.symbol, true);
+ var defaultParameterNode = defaultParameter && typeToTypeNodeHelper(defaultParameter, context);
return ts.createTypeParameterDeclaration(name, constraintNode, defaultParameterNode);
}
- function symbolToParameterDeclaration(parameterSymbol) {
+ function symbolToParameterDeclaration(parameterSymbol, context) {
var parameterDeclaration = ts.getDeclarationOfKind(parameterSymbol, 146);
+ if (isTransientSymbol(parameterSymbol) && parameterSymbol.isRestParameter) {
+ return ts.createParameter(undefined, undefined, parameterSymbol.isRestParameter ? ts.createToken(24) : undefined, "args", undefined, typeToTypeNodeHelper(anyArrayType, context), undefined);
+ }
+ var modifiers = parameterDeclaration.modifiers && parameterDeclaration.modifiers.map(ts.getSynthesizedClone);
+ var dotDotDotToken = ts.isRestParameter(parameterDeclaration) ? ts.createToken(24) : undefined;
+ var name = parameterDeclaration.name ?
+ parameterDeclaration.name.kind === 71 ?
+ ts.setEmitFlags(ts.getSynthesizedClone(parameterDeclaration.name), 16777216) :
+ cloneBindingName(parameterDeclaration.name) :
+ parameterSymbol.name;
+ var questionToken = isOptionalParameter(parameterDeclaration) ? ts.createToken(55) : undefined;
var parameterType = getTypeOfSymbol(parameterSymbol);
- var parameterTypeNode = typeToTypeNodeHelper(parameterType);
- var parameterNode = ts.createParameter(parameterDeclaration.decorators, parameterDeclaration.modifiers, parameterDeclaration.dotDotDotToken && ts.createToken(24), ts.getSynthesizedClone(parameterDeclaration.name), parameterDeclaration.questionToken && ts.createToken(55), parameterTypeNode, parameterDeclaration.initializer);
+ if (isRequiredInitializedParameter(parameterDeclaration)) {
+ parameterType = getNullableType(parameterType, 2048);
+ }
+ var parameterTypeNode = typeToTypeNodeHelper(parameterType, context);
+ var parameterNode = ts.createParameter(undefined, modifiers, dotDotDotToken, name, questionToken, parameterTypeNode, undefined);
return parameterNode;
+ function cloneBindingName(node) {
+ return elideInitializerAndSetEmitFlags(node);
+ function elideInitializerAndSetEmitFlags(node) {
+ var visited = ts.visitEachChild(node, elideInitializerAndSetEmitFlags, ts.nullTransformationContext, undefined, elideInitializerAndSetEmitFlags);
+ var clone = ts.nodeIsSynthesized(visited) ? visited : ts.getSynthesizedClone(visited);
+ if (clone.kind === 176) {
+ clone.initializer = undefined;
+ }
+ return ts.setEmitFlags(clone, 1 | 16777216);
+ }
+ }
}
- function symbolToName(symbol, expectsIdentifier) {
+ function symbolToName(symbol, context, meaning, expectsIdentifier) {
var chain;
var isTypeParameter = symbol.flags & 262144;
- if (!isTypeParameter && context.enclosingDeclaration) {
- chain = getSymbolChain(symbol, 0, true);
+ if (!isTypeParameter && (context.enclosingDeclaration || context.flags & ts.NodeBuilderFlags.UseFullyQualifiedType)) {
+ chain = getSymbolChain(symbol, meaning, true);
ts.Debug.assert(chain && chain.length > 0);
}
else {
@@ -25274,18 +26612,18 @@ var ts;
}
if (expectsIdentifier && chain.length !== 1
&& !context.encounteredError
- && !(context.flags & ts.NodeBuilderFlags.allowQualifedNameInPlaceOfIdentifier)) {
+ && !(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 typeParameterNodes;
+ if (context.flags & ts.NodeBuilderFlags.WriteTypeParametersInQualifiedName && index > 0) {
var parentSymbol = chain[index - 1];
var typeParameters = void 0;
- if (getCheckFlags(symbol) & 1) {
+ if (ts.getCheckFlags(symbol) & 1) {
typeParameters = getTypeParametersOfClassOrInterface(parentSymbol);
}
else {
@@ -25294,20 +26632,10 @@ var ts;
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);
- }
+ typeParameterNodes = mapToTypeNodes(typeParameters, context);
}
- var symbolName = getNameOfSymbol(symbol);
- var symbolNameWithTypeParameters = typeParameterString.length > 0 ? symbolName + "<" + typeParameterString + ">" : symbolName;
- var identifier = ts.createIdentifier(symbolNameWithTypeParameters);
+ var symbolName = getNameOfSymbol(symbol, context);
+ var identifier = ts.setEmitFlags(ts.createIdentifier(symbolName, typeParameterNodes), 16777216);
return index > 0 ? ts.createQualifiedName(createEntityNameFromSymbolChain(chain, index - 1), identifier) : identifier;
}
function getSymbolChain(symbol, meaning, endOfChain) {
@@ -25333,28 +26661,29 @@ var ts;
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 === 226) {
- return ts.declarationNameToString(declaration.parent.name);
- }
- if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.allowAnonymousIdentifier)) {
- context.encounteredError = true;
- }
- switch (declaration.kind) {
- case 199:
- return "(Anonymous class)";
- case 186:
- case 187:
- return "(Anonymous function)";
- }
+ }
+ function getNameOfSymbol(symbol, context) {
+ var declaration = ts.firstOrUndefined(symbol.declarations);
+ if (declaration) {
+ var name = ts.getNameOfDeclaration(declaration);
+ if (name) {
+ return ts.declarationNameToString(name);
+ }
+ if (declaration.parent && declaration.parent.kind === 226) {
+ return ts.declarationNameToString(declaration.parent.name);
+ }
+ if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.AllowAnonymousIdentifier)) {
+ context.encounteredError = true;
+ }
+ switch (declaration.kind) {
+ case 199:
+ return "(Anonymous class)";
+ case 186:
+ case 187:
+ return "(Anonymous function)";
}
- return symbol.name;
}
+ return symbol.name;
}
}
function typePredicateToString(typePredicate, enclosingDeclaration, flags) {
@@ -25372,12 +26701,14 @@ var ts;
flags |= t.flags;
if (!(t.flags & 6144)) {
if (t.flags & (128 | 256)) {
- var baseType = t.flags & 128 ? booleanType : t.baseType;
- var count = baseType.types.length;
- if (i + count <= types.length && types[i + count - 1] === baseType.types[count - 1]) {
- result.push(baseType);
- i += count - 1;
- continue;
+ var baseType = t.flags & 128 ? booleanType : getBaseTypeOfEnumLiteralType(t);
+ if (baseType.flags & 65536) {
+ var count = baseType.types.length;
+ if (i + count <= types.length && types[i + count - 1] === baseType.types[count - 1]) {
+ result.push(baseType);
+ i += count - 1;
+ continue;
+ }
}
}
result.push(t);
@@ -25413,13 +26744,14 @@ var ts;
ts.isExternalModuleAugmentation(node.parent.parent);
}
function literalTypeToString(type) {
- return type.flags & 32 ? "\"" + ts.escapeString(type.text) + "\"" : type.text;
+ return type.flags & 32 ? "\"" + ts.escapeString(type.value) + "\"" : "" + type.value;
}
function getNameOfSymbol(symbol) {
if (symbol.declarations && symbol.declarations.length) {
var declaration = symbol.declarations[0];
- if (declaration.name) {
- return ts.declarationNameToString(declaration.name);
+ var name = ts.getNameOfDeclaration(declaration);
+ if (name) {
+ return ts.declarationNameToString(name);
}
if (declaration.parent && declaration.parent.kind === 226) {
return ts.declarationNameToString(declaration.parent.name);
@@ -25462,8 +26794,9 @@ var ts;
function appendParentTypeArgumentsAndSymbolName(symbol) {
if (parentSymbol) {
if (flags & 1) {
- if (getCheckFlags(symbol) & 1) {
- buildDisplayForTypeArgumentsAndDelimiters(getTypeParametersOfClassOrInterface(parentSymbol), symbol.mapper, writer, enclosingDeclaration);
+ if (ts.getCheckFlags(symbol) & 1) {
+ var params = getTypeParametersOfClassOrInterface(parentSymbol.flags & 8388608 ? resolveAlias(parentSymbol) : parentSymbol);
+ buildDisplayForTypeArgumentsAndDelimiters(params, symbol.mapper, writer, enclosingDeclaration);
}
else {
buildTypeParameterDisplayFromSymbol(parentSymbol, writer, enclosingDeclaration);
@@ -25499,7 +26832,7 @@ var ts;
}
}
var isTypeParameter = symbol.flags & 262144;
- var typeFormatFlag = 128 & typeFlags;
+ var typeFormatFlag = 256 & typeFlags;
if (!isTypeParameter && (enclosingDeclaration || typeFormatFlag)) {
walkSymbol(symbol, meaning, true);
}
@@ -25508,13 +26841,13 @@ var ts;
}
}
function buildTypeDisplay(type, writer, enclosingDeclaration, globalFlags, symbolStack) {
- var globalFlagsToPass = globalFlags & 16;
+ var globalFlagsToPass = globalFlags & (32 | 16384);
var inObjectTypeLiteral = false;
return writeType(type, globalFlags);
function writeType(type, flags) {
- var nextFlags = flags & ~512;
+ var nextFlags = flags & ~1024;
if (type.flags & 16793231) {
- writer.writeKeyword(!(globalFlags & 16) && isTypeAny(type)
+ writer.writeKeyword(!(globalFlags & 32) && isTypeAny(type)
? "any"
: type.intrinsicName);
}
@@ -25527,15 +26860,18 @@ var ts;
else if (getObjectFlags(type) & 4) {
writeTypeReference(type, nextFlags);
}
- else if (type.flags & 256) {
- buildSymbolDisplay(getParentOfSymbol(type.symbol), writer, enclosingDeclaration, 793064, 0, nextFlags);
- writePunctuation(writer, 23);
- appendSymbolNameOnly(type.symbol, writer);
+ else if (type.flags & 256 && !(type.flags & 65536)) {
+ var parent = getParentOfSymbol(type.symbol);
+ buildSymbolDisplay(parent, writer, enclosingDeclaration, 793064, 0, nextFlags);
+ if (getDeclaredTypeOfSymbol(parent) !== type) {
+ writePunctuation(writer, 23);
+ appendSymbolNameOnly(type.symbol, writer);
+ }
}
- else if (getObjectFlags(type) & 3 || type.flags & (16 | 16384)) {
+ else if (getObjectFlags(type) & 3 || type.flags & (272 | 16384)) {
buildSymbolDisplay(type.symbol, writer, enclosingDeclaration, 793064, 0, nextFlags);
}
- else if (!(flags & 512) && type.aliasSymbol &&
+ else if (!(flags & 1024) && type.aliasSymbol &&
isSymbolAccessible(type.aliasSymbol, enclosingDeclaration, 793064, false).accessibility === 0) {
var typeArguments = type.aliasTypeArguments;
writeSymbolTypeReference(type.aliasSymbol, typeArguments, 0, ts.length(typeArguments), nextFlags);
@@ -25550,12 +26886,18 @@ var ts;
writer.writeStringLiteral(literalTypeToString(type));
}
else if (type.flags & 262144) {
+ if (flags & 128) {
+ writePunctuation(writer, 19);
+ }
writer.writeKeyword("keyof");
writeSpace(writer);
- writeType(type.type, 64);
+ writeType(type.type, 128);
+ if (flags & 128) {
+ writePunctuation(writer, 20);
+ }
}
else if (type.flags & 524288) {
- writeType(type.objectType, 64);
+ writeType(type.objectType, 128);
writePunctuation(writer, 21);
writeType(type.indexType, 0);
writePunctuation(writer, 22);
@@ -25577,7 +26919,7 @@ var ts;
writePunctuation(writer, delimiter);
writeSpace(writer);
}
- writeType(types[i], delimiter === 26 ? 0 : 64);
+ writeType(types[i], delimiter === 26 ? 0 : 128);
}
}
function writeSymbolTypeReference(symbol, typeArguments, pos, end, flags) {
@@ -25586,7 +26928,7 @@ var ts;
}
if (pos < end) {
writePunctuation(writer, 27);
- writeType(typeArguments[pos], 256);
+ writeType(typeArguments[pos], 512);
pos++;
while (pos < end) {
writePunctuation(writer, 26);
@@ -25600,7 +26942,7 @@ var ts;
function writeTypeReference(type, flags) {
var typeArguments = type.typeArguments || emptyArray;
if (type.target === globalArrayType && !(flags & 1)) {
- writeType(typeArguments[0], 64);
+ writeType(typeArguments[0], 128);
writePunctuation(writer, 21);
writePunctuation(writer, 22);
}
@@ -25609,6 +26951,11 @@ var ts;
writeTypeList(type.typeArguments.slice(0, getTypeReferenceArity(type)), 26);
writePunctuation(writer, 22);
}
+ else if (flags & 16384 &&
+ type.symbol.valueDeclaration &&
+ type.symbol.valueDeclaration.kind === 199) {
+ writeAnonymousType(getDeclaredTypeOfClassOrInterface(type.symbol), flags);
+ }
else {
var outerTypeParameters = type.target.outerTypeParameters;
var i = 0;
@@ -25631,7 +26978,7 @@ var ts;
}
}
function writeUnionOrIntersectionType(type, flags) {
- if (flags & 64) {
+ if (flags & 128) {
writePunctuation(writer, 19);
}
if (type.flags & 65536) {
@@ -25640,14 +26987,16 @@ var ts;
else {
writeTypeList(type.types, 48);
}
- if (flags & 64) {
+ if (flags & 128) {
writePunctuation(writer, 20);
}
}
function writeAnonymousType(type, flags) {
var symbol = type.symbol;
if (symbol) {
- if (symbol.flags & 32 && !getBaseTypeVariableOfClass(symbol) ||
+ if (symbol.flags & 32 &&
+ !getBaseTypeVariableOfClass(symbol) &&
+ !(symbol.valueDeclaration.kind === 199 && flags & 16384) ||
symbol.flags & (384 | 512)) {
writeTypeOfSymbol(type, flags);
}
@@ -25667,9 +27016,17 @@ var ts;
if (!symbolStack) {
symbolStack = [];
}
- symbolStack.push(symbol);
- writeLiteralType(type, flags);
- symbolStack.pop();
+ var isConstructorObject = type.flags & 32768 &&
+ getObjectFlags(type) & 16 &&
+ type.symbol && type.symbol.flags & 32;
+ if (isConstructorObject) {
+ writeLiteralType(type, flags);
+ }
+ else {
+ symbolStack.push(symbol);
+ writeLiteralType(type, flags);
+ symbolStack.pop();
+ }
}
}
else {
@@ -25684,7 +27041,7 @@ var ts;
return declaration.parent.kind === 265 || declaration.parent.kind === 234;
}));
if (isStaticMethodSymbol || isNonLocalFunctionSymbol) {
- return !!(flags & 2) ||
+ return !!(flags & 4) ||
(ts.contains(symbolStack, symbol));
}
}
@@ -25705,11 +27062,11 @@ var ts;
}
}
function shouldAddParenthesisAroundFunctionType(callSignature, flags) {
- if (flags & 64) {
+ if (flags & 128) {
return true;
}
- else if (flags & 256) {
- var typeParameters = callSignature.target && (flags & 32) ?
+ else if (flags & 512) {
+ var typeParameters = callSignature.target && (flags & 64) ?
callSignature.target.typeParameters : callSignature.typeParameters;
return typeParameters && typeParameters.length !== 0;
}
@@ -25734,20 +27091,20 @@ var ts;
if (parenthesizeSignature) {
writePunctuation(writer, 19);
}
- buildSignatureDisplay(resolved.callSignatures[0], writer, enclosingDeclaration, globalFlagsToPass | 8, undefined, symbolStack);
+ buildSignatureDisplay(resolved.callSignatures[0], writer, enclosingDeclaration, globalFlagsToPass | 16, undefined, symbolStack);
if (parenthesizeSignature) {
writePunctuation(writer, 20);
}
return;
}
if (resolved.constructSignatures.length === 1 && !resolved.callSignatures.length) {
- if (flags & 64) {
+ if (flags & 128) {
writePunctuation(writer, 19);
}
writeKeyword(writer, 94);
writeSpace(writer);
- buildSignatureDisplay(resolved.constructSignatures[0], writer, enclosingDeclaration, globalFlagsToPass | 8, undefined, symbolStack);
- if (flags & 64) {
+ buildSignatureDisplay(resolved.constructSignatures[0], writer, enclosingDeclaration, globalFlagsToPass | 16, undefined, symbolStack);
+ if (flags & 128) {
writePunctuation(writer, 20);
}
return;
@@ -25780,6 +27137,14 @@ var ts;
buildIndexSignatureDisplay(resolved.numberIndexInfo, writer, 1, enclosingDeclaration, globalFlags, symbolStack);
for (var _d = 0, _e = resolved.properties; _d < _e.length; _d++) {
var p = _e[_d];
+ if (globalFlags & 16384) {
+ if (p.flags & 16777216) {
+ continue;
+ }
+ if (ts.getDeclarationModifierFlagsFromSymbol(p) & (8 | 16)) {
+ writer.reportPrivateInBaseOfClassExpression(p.name);
+ }
+ }
var t = getTypeOfSymbol(p);
if (p.flags & (16 | 8192) && !getPropertiesOfObjectType(t).length) {
var signatures = getSignaturesOfType(t, 0);
@@ -25795,7 +27160,7 @@ var ts;
writePropertyWithModifiers(p);
writePunctuation(writer, 56);
writeSpace(writer);
- writeType(t, 0);
+ writeType(t, globalFlags & 16384);
writePunctuation(writer, 25);
writer.writeLine();
}
@@ -25869,7 +27234,7 @@ var ts;
writeSpace(writer);
var type = getTypeOfSymbol(p);
if (parameterNode && isRequiredInitializedParameter(parameterNode)) {
- type = includeFalsyTypes(type, 2048);
+ type = getNullableType(type, 2048);
}
buildTypeDisplay(type, writer, enclosingDeclaration, flags, symbolStack);
}
@@ -25928,7 +27293,7 @@ var ts;
function buildDisplayForTypeArgumentsAndDelimiters(typeParameters, mapper, writer, enclosingDeclaration) {
if (typeParameters && typeParameters.length) {
writePunctuation(writer, 27);
- var flags = 256;
+ var flags = 512;
for (var i = 0; i < typeParameters.length; i++) {
if (i > 0) {
writePunctuation(writer, 26);
@@ -25968,10 +27333,10 @@ var ts;
}
function buildReturnTypeDisplay(signature, writer, enclosingDeclaration, flags, symbolStack) {
var returnType = getReturnTypeOfSignature(signature);
- if (flags & 2048 && isTypeAny(returnType)) {
+ if (flags & 4096 && isTypeAny(returnType)) {
return;
}
- if (flags & 8) {
+ if (flags & 16) {
writeSpace(writer);
writePunctuation(writer, 36);
}
@@ -25991,7 +27356,7 @@ var ts;
writeKeyword(writer, 94);
writeSpace(writer);
}
- if (signature.target && (flags & 32)) {
+ if (signature.target && (flags & 64)) {
buildDisplayForTypeArgumentsAndDelimiters(signature.target.typeParameters, signature.mapper, writer, enclosingDeclaration);
}
else {
@@ -26120,10 +27485,7 @@ var ts;
exportSymbol = resolveName(node.parent, node.text, 107455 | 793064 | 1920 | 8388608, ts.Diagnostics.Cannot_find_name_0, node);
}
else if (node.parent.kind === 246) {
- var exportSpecifier = node.parent;
- exportSymbol = exportSpecifier.parent.parent.moduleSpecifier ?
- getExternalModuleMember(exportSpecifier.parent.parent, exportSpecifier) :
- resolveEntityName(exportSpecifier.propertyName || exportSpecifier.name, 107455 | 793064 | 1920 | 8388608);
+ exportSymbol = getTargetOfExportSpecifier(node.parent, 107455 | 793064 | 1920 | 8388608);
}
var result = [];
if (exportSymbol) {
@@ -26244,7 +27606,7 @@ var ts;
for (var _a = 0, _b = getPropertiesOfType(source); _a < _b.length; _a++) {
var prop = _b[_a];
var inNamesToRemove = names.has(prop.name);
- var isPrivate = getDeclarationModifierFlagsFromSymbol(prop) & (8 | 16);
+ var isPrivate = ts.getDeclarationModifierFlagsFromSymbol(prop) & (8 | 16);
var isSetOnlyAccessor = prop.flags & 65536 && !(prop.flags & 32768);
if (!inNamesToRemove && !isPrivate && !isClassMethod(prop) && !isSetOnlyAccessor) {
members.set(prop.name, prop);
@@ -26344,15 +27706,9 @@ var ts;
return expr.kind === 177 && expr.elements.length === 0;
}
function addOptionality(type, optional) {
- return strictNullChecks && optional ? includeFalsyTypes(type, 2048) : type;
+ return strictNullChecks && optional ? getNullableType(type, 2048) : type;
}
function getTypeForVariableLikeDeclaration(declaration, includeOptionality) {
- if (declaration.flags & 65536) {
- var type = getTypeForDeclarationFromJSDocComment(declaration);
- if (type && type !== unknownType) {
- return type;
- }
- }
if (declaration.parent.parent.kind === 215) {
var indexType = getIndexType(checkNonNullExpression(declaration.parent.parent.expression));
return indexType.flags & (16384 | 262144) ? indexType : stringType;
@@ -26364,8 +27720,9 @@ var ts;
if (ts.isBindingPattern(declaration.parent)) {
return getTypeForBindingElement(declaration);
}
- if (declaration.type) {
- var declaredType = getTypeFromTypeNode(declaration.type);
+ var typeNode = ts.getEffectiveTypeAnnotationNode(declaration);
+ if (typeNode) {
+ var declaredType = getTypeFromTypeNode(typeNode);
return addOptionality(declaredType, declaration.questionToken && includeOptionality);
}
if ((noImplicitAny || declaration.flags & 65536) &&
@@ -26422,6 +27779,7 @@ var ts;
var types = [];
var definedInConstructor = false;
var definedInMethod = false;
+ var jsDocType;
for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
var declaration = _a[_i];
var expression = declaration.kind === 194 ? declaration :
@@ -26438,16 +27796,23 @@ var ts;
definedInMethod = true;
}
}
- if (expression.flags & 65536) {
- var type = getTypeForDeclarationFromJSDocComment(expression.parent);
- if (type && type !== unknownType) {
- types.push(getWidenedType(type));
- continue;
+ var type_1 = getTypeForDeclarationFromJSDocComment(expression.parent);
+ if (type_1) {
+ var declarationType = getWidenedType(type_1);
+ if (!jsDocType) {
+ jsDocType = declarationType;
+ }
+ else if (jsDocType !== unknownType && declarationType !== unknownType && !isTypeIdenticalTo(jsDocType, declarationType)) {
+ var name = ts.getNameOfDeclaration(declaration);
+ error(name, ts.Diagnostics.Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2, ts.declarationNameToString(name), typeToString(jsDocType), typeToString(declarationType));
}
}
- types.push(getWidenedLiteralType(checkExpressionCached(expression.right)));
+ else if (!jsDocType) {
+ types.push(getWidenedLiteralType(checkExpressionCached(expression.right)));
+ }
}
- return getWidenedType(addOptionality(getUnionType(types, true), definedInMethod && !definedInConstructor));
+ var type = jsDocType || getUnionType(types, true);
+ return getWidenedType(addOptionality(type, definedInMethod && !definedInConstructor));
}
function getTypeFromBindingElement(element, includePatternInType, reportErrors) {
if (element.initializer) {
@@ -26547,7 +27912,7 @@ var ts;
if (declaration.kind === 243) {
return links.type = checkExpression(declaration.expression);
}
- if (declaration.flags & 65536 && declaration.kind === 291 && declaration.typeExpression) {
+ if (declaration.flags & 65536 && declaration.kind === 292 && declaration.typeExpression) {
return links.type = getTypeFromTypeNode(declaration.typeExpression.type);
}
if (!pushTypeResolution(symbol, 0)) {
@@ -26571,10 +27936,11 @@ var ts;
function getAnnotatedAccessorType(accessor) {
if (accessor) {
if (accessor.kind === 153) {
- return accessor.type && getTypeFromTypeNode(accessor.type);
+ var getterTypeAnnotation = ts.getEffectiveReturnTypeNode(accessor);
+ return getterTypeAnnotation && getTypeFromTypeNode(getterTypeAnnotation);
}
else {
- var setterTypeAnnotation = ts.getSetAccessorTypeAnnotationNode(accessor);
+ var setterTypeAnnotation = ts.getEffectiveSetAccessorTypeAnnotationNode(accessor);
return setterTypeAnnotation && getTypeFromTypeNode(setterTypeAnnotation);
}
}
@@ -26657,7 +28023,7 @@ var ts;
links.type = baseTypeVariable ? getIntersectionType([type, baseTypeVariable]) : type;
}
else {
- links.type = strictNullChecks && symbol.flags & 67108864 ? includeFalsyTypes(type, 2048) : type;
+ links.type = strictNullChecks && symbol.flags & 67108864 ? getNullableType(type, 2048) : type;
}
}
}
@@ -26703,7 +28069,7 @@ var ts;
return links.type;
}
function reportCircularityError(symbol) {
- if (symbol.valueDeclaration.type) {
+ if (ts.getEffectiveTypeAnnotationNode(symbol.valueDeclaration)) {
error(symbol.valueDeclaration, ts.Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol));
return unknownType;
}
@@ -26713,7 +28079,7 @@ var ts;
return anyType;
}
function getTypeOfSymbol(symbol) {
- if (getCheckFlags(symbol) & 1) {
+ if (ts.getCheckFlags(symbol) & 1) {
return getTypeOfInstantiatedSymbol(symbol);
}
if (symbol.flags & (3 | 4)) {
@@ -26832,11 +28198,8 @@ var ts;
}
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;
+ var typeArguments = ts.map(typeArgumentNodes, getTypeFromTypeNode);
+ return ts.sameMap(signatures, function (sig) { return ts.some(sig.typeParameters) ? getSignatureInstantiation(sig, typeArguments) : sig; });
}
function getBaseConstructorTypeOfClass(type) {
if (!type.resolvedBaseConstructorType) {
@@ -26889,11 +28252,12 @@ var ts;
return;
}
var baseTypeNode = getBaseTypeNodeOfClass(type);
+ var typeArgs = typeArgumentsFromTypeReferenceNode(baseTypeNode);
var baseType;
var originalBaseType = baseConstructorType && baseConstructorType.symbol ? getDeclaredTypeOfSymbol(baseConstructorType.symbol) : undefined;
if (baseConstructorType.symbol && baseConstructorType.symbol.flags & 32 &&
areAllOuterTypeParametersApplied(originalBaseType)) {
- baseType = getTypeFromClassOrInterfaceReference(baseTypeNode, baseConstructorType.symbol);
+ baseType = getTypeFromClassOrInterfaceReference(baseTypeNode, baseConstructorType.symbol, typeArgs);
}
else if (baseConstructorType.flags & 1) {
baseType = baseConstructorType;
@@ -27027,7 +28391,7 @@ var ts;
if (!pushTypeResolution(symbol, 2)) {
return unknownType;
}
- var declaration = ts.getDeclarationOfKind(symbol, 290);
+ var declaration = ts.getDeclarationOfKind(symbol, 291);
var type = void 0;
if (declaration) {
if (declaration.jsDocTypeLiteral) {
@@ -27057,77 +28421,80 @@ var ts;
}
return links.declaredType;
}
- function isLiteralEnumMember(symbol, member) {
+ function isLiteralEnumMember(member) {
var expr = member.initializer;
if (!expr) {
return !ts.isInAmbientContext(member);
}
- return expr.kind === 8 ||
+ return expr.kind === 9 || expr.kind === 8 ||
expr.kind === 192 && expr.operator === 38 &&
expr.operand.kind === 8 ||
- expr.kind === 71 && !!symbol.exports.get(expr.text);
+ expr.kind === 71 && (ts.nodeIsMissing(expr) || !!getSymbolOfNode(member.parent).exports.get(expr.text));
}
- function enumHasLiteralMembers(symbol) {
+ function getEnumKind(symbol) {
+ var links = getSymbolLinks(symbol);
+ if (links.enumKind !== undefined) {
+ return links.enumKind;
+ }
+ var hasNonLiteralMember = false;
for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
var declaration = _a[_i];
if (declaration.kind === 232) {
for (var _b = 0, _c = declaration.members; _b < _c.length; _b++) {
var member = _c[_b];
- if (!isLiteralEnumMember(symbol, member)) {
- return false;
+ if (member.initializer && member.initializer.kind === 9) {
+ return links.enumKind = 1;
+ }
+ if (!isLiteralEnumMember(member)) {
+ hasNonLiteralMember = true;
}
}
}
}
- return true;
+ return links.enumKind = hasNonLiteralMember ? 0 : 1;
}
- function createEnumLiteralType(symbol, baseType, text) {
- var type = createType(256);
- type.symbol = symbol;
- type.baseType = baseType;
- type.text = text;
- return type;
+ function getBaseTypeOfEnumLiteralType(type) {
+ return type.flags & 256 && !(type.flags & 65536) ? getDeclaredTypeOfSymbol(getParentOfSymbol(type.symbol)) : type;
}
function getDeclaredTypeOfEnum(symbol) {
var links = getSymbolLinks(symbol);
- if (!links.declaredType) {
- var enumType = links.declaredType = createType(16);
- enumType.symbol = symbol;
- if (enumHasLiteralMembers(symbol)) {
- var memberTypeList = [];
- var memberTypes = [];
- for (var _i = 0, _a = enumType.symbol.declarations; _i < _a.length; _i++) {
- var declaration = _a[_i];
- if (declaration.kind === 232) {
- computeEnumMemberValues(declaration);
- for (var _b = 0, _c = declaration.members; _b < _c.length; _b++) {
- var member = _c[_b];
- var memberSymbol = getSymbolOfNode(member);
- var value = getEnumMemberValue(member);
- if (!memberTypes[value]) {
- var memberType = memberTypes[value] = createEnumLiteralType(memberSymbol, enumType, "" + value);
- memberTypeList.push(memberType);
- }
- }
+ if (links.declaredType) {
+ return links.declaredType;
+ }
+ if (getEnumKind(symbol) === 1) {
+ enumCount++;
+ var memberTypeList = [];
+ for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
+ var declaration = _a[_i];
+ if (declaration.kind === 232) {
+ for (var _b = 0, _c = declaration.members; _b < _c.length; _b++) {
+ var member = _c[_b];
+ var memberType = getLiteralType(getEnumMemberValue(member), enumCount, getSymbolOfNode(member));
+ getSymbolLinks(getSymbolOfNode(member)).declaredType = memberType;
+ memberTypeList.push(memberType);
}
}
- enumType.memberTypes = memberTypes;
- if (memberTypeList.length > 1) {
- enumType.flags |= 65536;
- enumType.types = memberTypeList;
- unionTypes.set(getTypeListId(memberTypeList), enumType);
+ }
+ if (memberTypeList.length) {
+ var enumType_1 = getUnionType(memberTypeList, false, symbol, undefined);
+ if (enumType_1.flags & 65536) {
+ enumType_1.flags |= 256;
+ enumType_1.symbol = symbol;
}
+ return links.declaredType = enumType_1;
}
}
- return links.declaredType;
+ var enumType = createType(16);
+ enumType.symbol = symbol;
+ return links.declaredType = enumType;
}
function getDeclaredTypeOfEnumMember(symbol) {
var links = getSymbolLinks(symbol);
if (!links.declaredType) {
var enumType = getDeclaredTypeOfEnum(getParentOfSymbol(symbol));
- links.declaredType = enumType.flags & 65536 ?
- enumType.memberTypes[getEnumMemberValue(symbol.valueDeclaration)] :
- enumType;
+ if (!links.declaredType) {
+ links.declaredType = enumType;
+ }
}
return links.declaredType;
}
@@ -27201,11 +28568,15 @@ var ts;
return false;
}
function isIndependentVariableLikeDeclaration(node) {
- return node.type && isIndependentType(node.type) || !node.type && !node.initializer;
+ var typeNode = ts.getEffectiveTypeAnnotationNode(node);
+ return typeNode ? isIndependentType(typeNode) : !node.initializer;
}
function isIndependentFunctionLikeDeclaration(node) {
- if (node.kind !== 152 && (!node.type || !isIndependentType(node.type))) {
- return false;
+ if (node.kind !== 152) {
+ var typeNode = ts.getEffectiveReturnTypeNode(node);
+ if (!typeNode || !isIndependentType(typeNode)) {
+ return false;
+ }
}
for (var _i = 0, _a = node.parameters; _i < _a.length; _i++) {
var parameter = _a[_i];
@@ -27359,7 +28730,7 @@ var ts;
}
var baseTypeNode = getBaseTypeNodeOfClass(classType);
var isJavaScript = ts.isInJavaScriptFile(baseTypeNode);
- var typeArguments = ts.map(baseTypeNode.typeArguments, getTypeFromTypeNode);
+ var typeArguments = typeArgumentsFromTypeReferenceNode(baseTypeNode);
var typeArgCount = ts.length(typeArguments);
var result = [];
for (var _i = 0, baseSignatures_1 = baseSignatures; _i < baseSignatures_1.length; _i++) {
@@ -27436,8 +28807,8 @@ var ts;
function getUnionIndexInfo(types, kind) {
var indexTypes = [];
var isAnyReadonly = false;
- for (var _i = 0, types_2 = types; _i < types_2.length; _i++) {
- var type = types_2[_i];
+ for (var _i = 0, types_1 = types; _i < types_1.length; _i++) {
+ var type = types_1[_i];
var indexInfo = getIndexInfoOfType(type, kind);
if (!indexInfo) {
return undefined;
@@ -27581,7 +28952,7 @@ var ts;
var templateMapper = type.mapper ? combineTypeMappers(type.mapper, iterationMapper) : iterationMapper;
var propType = instantiateType(templateType, templateMapper);
if (t.flags & 32) {
- var propName = t.text;
+ var propName = t.value;
var modifiersProp = getPropertyOfType(modifiersType, propName);
var isOptional = templateOptional || !!(modifiersProp && modifiersProp.flags & 67108864);
var prop = createSymbol(4 | (isOptional ? 67108864 : 0), propName);
@@ -27589,6 +28960,7 @@ var ts;
prop.type = propType;
if (propertySymbol) {
prop.syntheticOrigin = propertySymbol;
+ prop.declarations = propertySymbol.declarations;
}
members.set(propName, prop);
}
@@ -27701,6 +29073,27 @@ var ts;
getPropertiesOfUnionOrIntersectionType(type) :
getPropertiesOfObjectType(type);
}
+ function getAllPossiblePropertiesOfType(type) {
+ if (type.flags & 65536) {
+ var props = ts.createMap();
+ for (var _i = 0, _a = type.types; _i < _a.length; _i++) {
+ var memberType = _a[_i];
+ if (memberType.flags & 8190) {
+ continue;
+ }
+ for (var _b = 0, _c = getPropertiesOfType(memberType); _b < _c.length; _b++) {
+ var name = _c[_b].name;
+ if (!props.has(name)) {
+ props.set(name, createUnionOrIntersectionProperty(type, name));
+ }
+ }
+ }
+ return ts.arrayFrom(props.values());
+ }
+ else {
+ return getPropertiesOfType(type);
+ }
+ }
function getConstraintOfType(type) {
return type.flags & 16384 ? getConstraintOfTypeParameter(type) :
type.flags & 524288 ? getConstraintOfIndexedAccess(type) :
@@ -27757,8 +29150,8 @@ var ts;
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];
+ for (var _i = 0, types_2 = types; _i < types_2.length; _i++) {
+ var type_2 = types_2[_i];
var baseType = getBaseConstraint(type_2);
if (baseType) {
baseTypes.push(baseType);
@@ -27790,7 +29183,7 @@ var ts;
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; });
+ var defaultDeclaration = typeParameter.symbol && ts.forEach(typeParameter.symbol.declarations, function (decl) { return ts.isTypeParameterDeclaration(decl) && decl.default; });
typeParameter.default = defaultDeclaration ? getTypeFromTypeNode(defaultDeclaration) : noConstraintType;
}
}
@@ -27800,7 +29193,7 @@ var ts;
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 & 84 ? globalNumberType :
t.flags & 136 ? globalBooleanType :
t.flags & 512 ? getGlobalESSymbolType(languageVersion >= 2) :
t.flags & 16777216 ? emptyObjectType :
@@ -27814,12 +29207,12 @@ var ts;
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];
+ for (var _i = 0, types_3 = types; _i < types_3.length; _i++) {
+ var current = types_3[_i];
var type = getApparentType(current);
if (type !== unknownType) {
var prop = getPropertyOfType(type, name);
- var modifiers = prop ? getDeclarationModifierFlagsFromSymbol(prop) : 0;
+ var modifiers = prop ? ts.getDeclarationModifierFlagsFromSymbol(prop) : 0;
if (prop && !(modifiers & excludeModifiers)) {
commonFlags &= prop.flags;
if (!props) {
@@ -27885,7 +29278,7 @@ var ts;
}
function getPropertyOfUnionOrIntersectionType(type, name) {
var property = getUnionOrIntersectionProperty(type, name);
- return property && !(getCheckFlags(property) & 16) ? property : undefined;
+ return property && !(ts.getCheckFlags(property) & 16) ? property : undefined;
}
function getPropertyOfType(type, name) {
type = getApparentType(type);
@@ -27949,20 +29342,14 @@ var ts;
}
return undefined;
}
- function getTypeParametersFromJSDocTemplate(declaration) {
- if (declaration.flags & 65536) {
- var templateTag = ts.getJSDocTemplateTag(declaration);
- if (templateTag) {
- return getTypeParametersFromDeclaration(templateTag.typeParameters);
- }
- }
- return undefined;
- }
- function getTypeParametersFromDeclaration(typeParameterDeclarations) {
- var result = [];
- ts.forEach(typeParameterDeclarations, function (node) {
+ function getTypeParametersFromDeclaration(declaration) {
+ var result;
+ ts.forEach(ts.getEffectiveTypeParameterDeclarations(declaration), function (node) {
var tp = getDeclaredTypeOfTypeParameter(node.symbol);
if (!ts.contains(result, tp)) {
+ if (!result) {
+ result = [];
+ }
result.push(tp);
}
});
@@ -28119,14 +29506,20 @@ var ts;
var classType = declaration.kind === 152 ?
getDeclaredTypeOfClassOrInterface(getMergedSymbol(declaration.parent.symbol))
: undefined;
- var typeParameters = classType ? classType.localTypeParameters :
- declaration.typeParameters ? getTypeParametersFromDeclaration(declaration.typeParameters) :
- getTypeParametersFromJSDocTemplate(declaration);
+ var typeParameters = classType ? classType.localTypeParameters : getTypeParametersFromDeclaration(declaration);
var returnType = getSignatureReturnTypeFromDeclaration(declaration, isJSConstructSignature, classType);
var typePredicate = declaration.type && declaration.type.kind === 158 ?
createTypePredicateFromTypePredicateNode(declaration.type) :
undefined;
- links.resolvedSignature = createSignature(declaration, typeParameters, thisParameter, parameters, returnType, typePredicate, minArgumentCount, ts.hasRestParameter(declaration), hasLiteralTypes);
+ var hasRestLikeParameter = ts.hasRestParameter(declaration);
+ if (!hasRestLikeParameter && ts.isInJavaScriptFile(declaration) && !ts.hasJSDocParameterTags(declaration) && containsArgumentsReference(declaration)) {
+ hasRestLikeParameter = true;
+ var syntheticArgsSymbol = createSymbol(3, "args");
+ syntheticArgsSymbol.type = anyArrayType;
+ syntheticArgsSymbol.isRestParameter = true;
+ parameters.push(syntheticArgsSymbol);
+ }
+ links.resolvedSignature = createSignature(declaration, typeParameters, thisParameter, parameters, returnType, typePredicate, minArgumentCount, hasRestLikeParameter, hasLiteralTypes);
}
return links.resolvedSignature;
}
@@ -28137,14 +29530,9 @@ var ts;
else if (classType) {
return classType;
}
- else if (declaration.type) {
- return getTypeFromTypeNode(declaration.type);
- }
- if (declaration.flags & 65536) {
- var type = getReturnTypeFromJSDocComment(declaration);
- if (type && type !== unknownType) {
- return type;
- }
+ var typeNode = ts.getEffectiveReturnTypeNode(declaration);
+ if (typeNode) {
+ return getTypeFromTypeNode(typeNode);
}
if (declaration.kind === 153 && !ts.hasDynamicName(declaration)) {
var setter = ts.getDeclarationOfKind(declaration.symbol, 154);
@@ -28248,8 +29636,9 @@ var ts;
type = anyType;
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));
+ var name = ts.getNameOfDeclaration(declaration);
+ if (name) {
+ error(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(name));
}
else {
error(declaration, ts.Diagnostics.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);
@@ -28376,8 +29765,8 @@ var ts;
}
function getPropagatingFlagsOfTypes(types, excludeKinds) {
var result = 0;
- for (var _i = 0, types_5 = types; _i < types_5.length; _i++) {
- var type = types_5[_i];
+ for (var _i = 0, types_4 = types; _i < types_4.length; _i++) {
+ var type = types_4[_i];
if (!(type.flags & excludeKinds)) {
result |= type.flags;
}
@@ -28407,7 +29796,7 @@ var ts;
function getTypeReferenceArity(type) {
return ts.length(type.target.typeParameters);
}
- function getTypeFromClassOrInterfaceReference(node, symbol) {
+ function getTypeFromClassOrInterfaceReference(node, symbol, typeArgs) {
var type = getDeclaredTypeOfSymbol(getMergedSymbol(symbol));
var typeParameters = type.localTypeParameters;
if (typeParameters) {
@@ -28419,7 +29808,7 @@ var ts;
: ts.Diagnostics.Generic_type_0_requires_between_1_and_2_type_arguments, typeToString(type, undefined, 1), minTypeArgumentCount, typeParameters.length);
return unknownType;
}
- var typeArguments = ts.concatenate(type.outerTypeParameters, fillMissingTypeArguments(ts.map(node.typeArguments, getTypeFromTypeNode), typeParameters, minTypeArgumentCount, node));
+ var typeArguments = ts.concatenate(type.outerTypeParameters, fillMissingTypeArguments(typeArgs, typeParameters, minTypeArgumentCount, node));
return createTypeReference(type, typeArguments);
}
if (node.typeArguments) {
@@ -28439,7 +29828,7 @@ var ts;
}
return instantiation;
}
- function getTypeFromTypeAliasReference(node, symbol) {
+ function getTypeFromTypeAliasReference(node, symbol, typeArguments) {
var type = getDeclaredTypeOfSymbol(symbol);
var typeParameters = getSymbolLinks(symbol).typeParameters;
if (typeParameters) {
@@ -28451,7 +29840,6 @@ var ts;
: 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);
return getTypeAliasInstantiation(symbol, typeArguments);
}
if (node.typeArguments) {
@@ -28481,26 +29869,44 @@ var ts;
}
return undefined;
}
- function resolveTypeReferenceName(typeReferenceName) {
+ function resolveTypeReferenceName(typeReferenceName, meaning) {
if (!typeReferenceName) {
return unknownSymbol;
}
- return resolveEntityName(typeReferenceName, 793064) || unknownSymbol;
+ return resolveEntityName(typeReferenceName, meaning) || unknownSymbol;
}
function getTypeReferenceType(node, symbol) {
+ var typeArguments = typeArgumentsFromTypeReferenceNode(node);
if (symbol === unknownSymbol) {
return unknownType;
}
+ var type = getTypeReferenceTypeWorker(node, symbol, typeArguments);
+ if (type) {
+ return type;
+ }
+ if (symbol.flags & 107455 && node.kind === 277) {
+ var valueType = getTypeOfSymbol(symbol);
+ if (valueType.symbol && !isInferredClassType(valueType)) {
+ var referenceType = getTypeReferenceTypeWorker(node, valueType.symbol, typeArguments);
+ if (referenceType) {
+ return referenceType;
+ }
+ }
+ resolveTypeReferenceName(getTypeReferenceName(node), 793064);
+ return valueType;
+ }
+ return getTypeFromNonGenericTypeReference(node, symbol);
+ }
+ function getTypeReferenceTypeWorker(node, symbol, typeArguments) {
if (symbol.flags & (32 | 64)) {
- return getTypeFromClassOrInterfaceReference(node, symbol);
+ return getTypeFromClassOrInterfaceReference(node, symbol, typeArguments);
}
if (symbol.flags & 524288) {
- return getTypeFromTypeAliasReference(node, symbol);
+ return getTypeFromTypeAliasReference(node, symbol, typeArguments);
}
- if (symbol.flags & 107455 && node.kind === 277) {
- return getTypeOfSymbol(symbol);
+ if (symbol.flags & 16 && node.kind === 277 && (symbol.members || ts.getJSDocClassTag(symbol.valueDeclaration))) {
+ return getInferredClassType(symbol);
}
- return getTypeFromNonGenericTypeReference(node, symbol);
}
function getPrimitiveTypeFromJSDocTypeReference(node) {
if (ts.isIdentifier(node.name)) {
@@ -28520,7 +29926,8 @@ var ts;
case "Object":
return anyType;
case "Function":
- return anyFunctionType;
+ case "function":
+ return globalFunctionType;
case "Array":
case "array":
return !node.typeArguments || !node.typeArguments.length ? createArrayType(anyType) : undefined;
@@ -28539,31 +29946,23 @@ var ts;
if (!links.resolvedType) {
var symbol = void 0;
var type = void 0;
+ var meaning = 793064;
if (node.kind === 277) {
type = getPrimitiveTypeFromJSDocTypeReference(node);
- if (!type) {
- var typeReferenceName = getTypeReferenceName(node);
- symbol = resolveTypeReferenceName(typeReferenceName);
- type = getTypeReferenceType(node, symbol);
- }
+ meaning |= 107455;
}
- else {
- var typeNameOrExpression = node.kind === 159
- ? node.typeName
- : ts.isEntityNameExpression(node.expression)
- ? node.expression
- : undefined;
- symbol = typeNameOrExpression && resolveEntityName(typeNameOrExpression, 793064) || unknownSymbol;
- type = symbol === unknownSymbol ? unknownType :
- symbol.flags & (32 | 64) ? getTypeFromClassOrInterfaceReference(node, symbol) :
- symbol.flags & 524288 ? getTypeFromTypeAliasReference(node, symbol) :
- getTypeFromNonGenericTypeReference(node, symbol);
+ if (!type) {
+ symbol = resolveTypeReferenceName(getTypeReferenceName(node), meaning);
+ type = getTypeReferenceType(node, symbol);
}
links.resolvedSymbol = symbol;
links.resolvedType = type;
}
return links.resolvedType;
}
+ function typeArgumentsFromTypeReferenceNode(node) {
+ return ts.map(node.typeArguments, getTypeFromTypeNode);
+ }
function getTypeFromTypeQueryNode(node) {
var links = getNodeLinks(node);
if (!links.resolvedType) {
@@ -28785,14 +30184,14 @@ var ts;
}
}
function addTypesToUnion(typeSet, types) {
- for (var _i = 0, types_6 = types; _i < types_6.length; _i++) {
- var type = types_6[_i];
+ for (var _i = 0, types_5 = types; _i < types_5.length; _i++) {
+ var type = types_5[_i];
addTypeToUnion(typeSet, type);
}
}
function containsIdenticalType(types, type) {
- for (var _i = 0, types_7 = types; _i < types_7.length; _i++) {
- var t = types_7[_i];
+ for (var _i = 0, types_6 = types; _i < types_6.length; _i++) {
+ var t = types_6[_i];
if (isTypeIdenticalTo(t, type)) {
return true;
}
@@ -28800,8 +30199,8 @@ var ts;
return false;
}
function isSubtypeOfAny(candidate, types) {
- for (var _i = 0, types_8 = types; _i < types_8.length; _i++) {
- var type = types_8[_i];
+ for (var _i = 0, types_7 = types; _i < types_7.length; _i++) {
+ var type = types_7[_i];
if (candidate !== type && isTypeSubtypeOf(candidate, type)) {
return true;
}
@@ -28905,10 +30304,13 @@ var ts;
else if (type.flags & 1) {
typeSet.containsAny = true;
}
+ else if (type.flags & 8192) {
+ typeSet.containsNever = true;
+ }
else if (getObjectFlags(type) & 16 && isEmptyObjectType(type)) {
typeSet.containsEmptyObject = true;
}
- else if (!(type.flags & 8192) && (strictNullChecks || !(type.flags & 6144)) && !ts.contains(typeSet, type)) {
+ else if ((strictNullChecks || !(type.flags & 6144)) && !ts.contains(typeSet, type)) {
if (type.flags & 32768) {
typeSet.containsObjectType = true;
}
@@ -28922,8 +30324,8 @@ var ts;
}
}
function addTypesToIntersection(typeSet, types) {
- for (var _i = 0, types_9 = types; _i < types_9.length; _i++) {
- var type = types_9[_i];
+ for (var _i = 0, types_8 = types; _i < types_8.length; _i++) {
+ var type = types_8[_i];
addTypeToIntersection(typeSet, type);
}
}
@@ -28933,6 +30335,9 @@ var ts;
}
var typeSet = [];
addTypesToIntersection(typeSet, types);
+ if (typeSet.containsNever) {
+ return neverType;
+ }
if (typeSet.containsAny) {
return anyType;
}
@@ -28974,9 +30379,9 @@ var ts;
return type.resolvedIndexType;
}
function getLiteralTypeFromPropertyName(prop) {
- return getDeclarationModifierFlagsFromSymbol(prop) & 24 || ts.startsWith(prop.name, "__@") ?
+ return ts.getDeclarationModifierFlagsFromSymbol(prop) & 24 || ts.startsWith(prop.name, "__@") ?
neverType :
- getLiteralTypeForText(32, ts.unescapeIdentifier(prop.name));
+ getLiteralType(ts.unescapeIdentifier(prop.name));
}
function getLiteralTypeFromPropertyNames(type) {
return getUnionType(ts.map(getPropertiesOfType(type), getLiteralTypeFromPropertyName));
@@ -29006,12 +30411,12 @@ var ts;
}
function getPropertyTypeForIndexType(objectType, indexType, accessNode, cacheSymbol) {
var accessExpression = accessNode && accessNode.kind === 180 ? accessNode : undefined;
- var propName = indexType.flags & (32 | 64 | 256) ?
- indexType.text :
+ var propName = indexType.flags & 96 ?
+ "" + indexType.value :
accessExpression && checkThatExpressionIsProperSymbolReference(accessExpression.argumentExpression, indexType, false) ?
ts.getPropertyNameForKnownSymbolName(accessExpression.argumentExpression.name.text) :
undefined;
- if (propName) {
+ if (propName !== undefined) {
var prop = getPropertyOfType(objectType, propName);
if (prop) {
if (accessExpression) {
@@ -29026,11 +30431,11 @@ var ts;
return getTypeOfSymbol(prop);
}
}
- if (isTypeAnyOrAllConstituentTypesHaveKind(indexType, 262178 | 340 | 512)) {
+ if (isTypeAnyOrAllConstituentTypesHaveKind(indexType, 262178 | 84 | 512)) {
if (isTypeAny(objectType)) {
return anyType;
}
- var indexInfo = isTypeAnyOrAllConstituentTypesHaveKind(indexType, 340) && getIndexInfoOfType(objectType, 1) ||
+ var indexInfo = isTypeAnyOrAllConstituentTypesHaveKind(indexType, 84) && getIndexInfoOfType(objectType, 1) ||
getIndexInfoOfType(objectType, 0) ||
undefined;
if (indexInfo) {
@@ -29055,7 +30460,7 @@ var ts;
if (accessNode) {
var indexNode = accessNode.kind === 180 ? 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));
+ error(indexNode, ts.Diagnostics.Property_0_does_not_exist_on_type_1, "" + indexType.value, typeToString(objectType));
}
else if (indexType.flags & (2 | 4)) {
error(indexNode, ts.Diagnostics.Type_0_has_no_matching_index_signature_for_type_1, typeToString(objectType), typeToString(indexType));
@@ -29155,11 +30560,9 @@ var ts;
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;
}
@@ -29187,7 +30590,7 @@ var ts;
for (var _i = 0, _a = getPropertiesOfType(right); _i < _a.length; _i++) {
var rightProp = _a[_i];
var isSetterWithoutGetter = rightProp.flags & 65536 && !(rightProp.flags & 32768);
- if (getDeclarationModifierFlagsFromSymbol(rightProp) & (8 | 16)) {
+ if (ts.getDeclarationModifierFlagsFromSymbol(rightProp) & (8 | 16)) {
skippedPrivateMembers.set(rightProp.name, true);
}
else if (!isClassMethod(rightProp) && !isSetterWithoutGetter) {
@@ -29204,7 +30607,7 @@ var ts;
if (members.has(leftProp.name)) {
var rightProp = members.get(leftProp.name);
var rightType = getTypeOfSymbol(rightProp);
- if (maybeTypeOfKind(rightType, 2048) || rightProp.flags & 67108864) {
+ if (rightProp.flags & 67108864) {
var declarations = ts.concatenate(leftProp.declarations, rightProp.declarations);
var flags = 4 | (leftProp.flags & 67108864);
var result = createSymbol(flags, leftProp.name);
@@ -29235,15 +30638,16 @@ var ts;
function isClassMethod(prop) {
return prop.flags & 8192 && ts.find(prop.declarations, function (decl) { return ts.isClassLike(decl.parent); });
}
- function createLiteralType(flags, text) {
+ function createLiteralType(flags, value, symbol) {
var type = createType(flags);
- type.text = text;
+ type.symbol = symbol;
+ type.value = value;
return type;
}
function getFreshTypeOfLiteralType(type) {
if (type.flags & 96 && !(type.flags & 1048576)) {
if (!type.freshType) {
- var freshType = createLiteralType(type.flags | 1048576, type.text);
+ var freshType = createLiteralType(type.flags | 1048576, type.value, type.symbol);
freshType.regularType = type;
type.freshType = freshType;
}
@@ -29254,11 +30658,13 @@ var ts;
function getRegularTypeOfLiteralType(type) {
return type.flags & 96 && type.flags & 1048576 ? type.regularType : type;
}
- function getLiteralTypeForText(flags, text) {
- var map = flags & 32 ? stringLiteralTypes : numericLiteralTypes;
- var type = map.get(text);
+ function getLiteralType(value, enumId, symbol) {
+ var qualifier = typeof value === "number" ? "#" : "@";
+ var key = enumId ? enumId + qualifier + value : qualifier + value;
+ var type = literalTypes.get(key);
if (!type) {
- map.set(text, type = createLiteralType(flags, text));
+ var flags = (typeof value === "number" ? 64 : 32) | (enumId ? 256 : 0);
+ literalTypes.set(key, type = createLiteralType(flags, value, symbol));
}
return type;
}
@@ -29333,7 +30739,7 @@ var ts;
return getTypeFromThisTypeNode(node);
case 173:
return getTypeFromLiteralTypeNode(node);
- case 293:
+ case 294:
return getTypeFromLiteralTypeNode(node.literal);
case 159:
case 277:
@@ -29367,7 +30773,7 @@ var ts;
case 160:
case 161:
case 163:
- case 292:
+ case 293:
case 279:
return getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node);
case 170:
@@ -29440,23 +30846,13 @@ var ts;
mapper.mappedTypes = typeParameters;
return mapper;
}
- function getInferenceMapper(context) {
- if (!context.mapper) {
- var mapper = function (t) {
- var typeParameters = context.signature.typeParameters;
- for (var i = 0; i < typeParameters.length; i++) {
- if (t === typeParameters[i]) {
- context.inferences[i].isFixed = true;
- return getInferredType(context, i);
- }
- }
- return t;
- };
- mapper.mappedTypes = context.signature.typeParameters;
- mapper.context = context;
- context.mapper = mapper;
- }
- return context.mapper;
+ function isInferenceContext(mapper) {
+ return !!mapper.signature;
+ }
+ function cloneTypeMapper(mapper) {
+ return mapper && isInferenceContext(mapper) ?
+ createInferenceContext(mapper.signature, mapper.flags | 2, mapper.inferences) :
+ mapper;
}
function identityMapper(type) {
return type;
@@ -29507,13 +30903,13 @@ var ts;
if (signature.typePredicate) {
freshTypePredicate = cloneTypePredicate(signature.typePredicate, mapper);
}
- var result = createSignature(signature.declaration, freshTypeParameters, signature.thisParameter && instantiateSymbol(signature.thisParameter, mapper), instantiateList(signature.parameters, mapper, instantiateSymbol), instantiateType(signature.resolvedReturnType, mapper), freshTypePredicate, signature.minArgumentCount, signature.hasRestParameter, signature.hasLiteralTypes);
+ var result = createSignature(signature.declaration, freshTypeParameters, signature.thisParameter && instantiateSymbol(signature.thisParameter, mapper), instantiateList(signature.parameters, mapper, instantiateSymbol), undefined, freshTypePredicate, signature.minArgumentCount, signature.hasRestParameter, signature.hasLiteralTypes);
result.target = signature;
result.mapper = mapper;
return result;
}
function instantiateSymbol(symbol, mapper) {
- if (getCheckFlags(symbol) & 1) {
+ if (ts.getCheckFlags(symbol) & 1) {
var links = getSymbolLinks(symbol);
symbol = links.target;
mapper = combineTypeMappers(links.mapper, mapper);
@@ -29593,10 +30989,10 @@ var ts;
case 199:
case 230:
case 231:
- var declaration = node;
- if (declaration.typeParameters) {
- for (var _i = 0, _a = declaration.typeParameters; _i < _a.length; _i++) {
- var d = _a[_i];
+ var typeParameters = ts.getEffectiveTypeParameterDeclarations(node);
+ if (typeParameters) {
+ for (var _i = 0, typeParameters_1 = typeParameters; _i < typeParameters_1.length; _i++) {
+ var d = typeParameters_1[_i];
if (ts.contains(mappedTypes, getDeclaredTypeOfTypeParameter(getSymbolOfNode(d)))) {
return true;
}
@@ -29616,8 +31012,8 @@ var ts;
break;
case 279:
var func = node;
- for (var _b = 0, _c = func.parameters; _b < _c.length; _b++) {
- var p = _c[_b];
+ for (var _a = 0, _b = func.parameters; _a < _b.length; _a++) {
+ var p = _b[_a];
if (ts.contains(mappedTypes, getTypeOfNode(p))) {
return true;
}
@@ -29716,7 +31112,7 @@ var ts;
if (node.typeParameters) {
return false;
}
- if (ts.forEach(node.parameters, function (p) { return !p.type; })) {
+ if (ts.forEach(node.parameters, function (p) { return !ts.getEffectiveTypeAnnotationNode(p); })) {
return true;
}
if (node.kind === 187) {
@@ -29769,9 +31165,6 @@ var ts;
function areTypesComparable(type1, type2) {
return isTypeComparableTo(type1, type2) || isTypeComparableTo(type2, type1);
}
- function checkTypeSubtypeOf(source, target, errorNode, headMessage, containingMessageChain) {
- return checkTypeRelatedTo(source, target, subtypeRelation, errorNode, headMessage, containingMessageChain);
- }
function checkTypeAssignableTo(source, target, errorNode, headMessage, containingMessageChain) {
return checkTypeRelatedTo(source, target, assignableRelation, errorNode, headMessage, containingMessageChain);
}
@@ -29779,17 +31172,18 @@ 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;
}
if (!target.hasRestParameter && source.minArgumentCount > target.parameters.length) {
return 0;
}
- source = getErasedSignature(source);
- target = getErasedSignature(target);
+ if (source.typeParameters) {
+ source = instantiateSignatureInContextOf(source, target);
+ }
var result = -1;
var sourceThisType = getThisTypeOfSignature(source);
if (sourceThisType && sourceThisType !== voidType) {
@@ -29812,9 +31206,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);
@@ -29841,7 +31241,8 @@ var ts;
}
}
else {
- result &= compareTypes(sourceReturnType, targetReturnType, reportErrors);
+ result &= checkAsCallback && compareTypes(targetReturnType, sourceReturnType, false) ||
+ compareTypes(sourceReturnType, targetReturnType, reportErrors);
}
}
return result;
@@ -29913,33 +31314,32 @@ var ts;
}
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;
+ type.flags & 16777216 ? true :
+ 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) {
+ function isEnumTypeRelatedTo(sourceSymbol, targetSymbol, errorReporter) {
+ if (sourceSymbol === targetSymbol) {
return true;
}
- var id = source.id + "," + target.id;
+ var id = getSymbolId(sourceSymbol) + "," + getSymbolId(targetSymbol);
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)) {
+ if (sourceSymbol.name !== targetSymbol.name || !(sourceSymbol.flags & 256) || !(targetSymbol.flags & 256)) {
enumRelation.set(id, false);
return false;
}
- var targetEnumType = getTypeOfSymbol(target.symbol);
- for (var _i = 0, _a = getPropertiesOfType(getTypeOfSymbol(source.symbol)); _i < _a.length; _i++) {
+ var targetEnumType = getTypeOfSymbol(targetSymbol);
+ for (var _i = 0, _a = getPropertiesOfType(getTypeOfSymbol(sourceSymbol)); _i < _a.length; _i++) {
var property = _a[_i];
if (property.flags & 8) {
var targetProperty = getPropertyOfType(targetEnumType, property.name);
if (!targetProperty || !(targetProperty.flags & 8)) {
if (errorReporter) {
- errorReporter(ts.Diagnostics.Property_0_is_missing_in_type_1, property.name, typeToString(target, undefined, 128));
+ errorReporter(ts.Diagnostics.Property_0_is_missing_in_type_1, property.name, typeToString(getDeclaredTypeOfSymbol(targetSymbol), undefined, 256));
}
enumRelation.set(id, false);
return false;
@@ -29950,42 +31350,47 @@ var ts;
return true;
}
function isSimpleTypeRelatedTo(source, target, relation, errorReporter) {
- if (target.flags & 8192)
+ var s = source.flags;
+ var t = target.flags;
+ if (t & 8192)
return false;
- if (target.flags & 1 || source.flags & 8192)
+ if (t & 1 || s & 8192)
return true;
- if (source.flags & 262178 && target.flags & 2)
+ if (s & 262178 && t & 2)
return true;
- if (source.flags & 340 && target.flags & 4)
+ if (s & 32 && s & 256 &&
+ t & 32 && !(t & 256) &&
+ source.value === target.value)
return true;
- if (source.flags & 136 && target.flags & 8)
+ if (s & 84 && t & 4)
return true;
- if (source.flags & 256 && target.flags & 16 && source.baseType === target)
+ if (s & 64 && s & 256 &&
+ t & 64 && !(t & 256) &&
+ source.value === target.value)
return true;
- if (source.flags & 16 && target.flags & 16 && isEnumTypeRelatedTo(source, target, errorReporter))
+ if (s & 136 && t & 8)
return true;
- if (source.flags & 2048 && (!strictNullChecks || target.flags & (2048 | 1024)))
+ if (s & 16 && t & 16 && isEnumTypeRelatedTo(source.symbol, target.symbol, errorReporter))
return true;
- if (source.flags & 4096 && (!strictNullChecks || target.flags & 4096))
+ if (s & 256 && t & 256) {
+ if (s & 65536 && t & 65536 && isEnumTypeRelatedTo(source.symbol, target.symbol, errorReporter))
+ return true;
+ if (s & 224 && t & 224 &&
+ source.value === target.value &&
+ isEnumTypeRelatedTo(getParentOfSymbol(source.symbol), getParentOfSymbol(target.symbol), errorReporter))
+ return true;
+ }
+ if (s & 2048 && (!strictNullChecks || t & (2048 | 1024)))
return true;
- if (source.flags & 32768 && target.flags & 16777216)
+ if (s & 4096 && (!strictNullChecks || t & 4096))
+ return true;
+ if (s & 32768 && t & 16777216)
return true;
if (relation === assignableRelation || relation === comparableRelation) {
- if (source.flags & 1)
- return true;
- if ((source.flags & 4 | source.flags & 64) && target.flags & 272)
+ if (s & 1)
return true;
- if (source.flags & 256 &&
- target.flags & 256 &&
- source.text === target.text &&
- isEnumTypeRelatedTo(source.baseType, target.baseType, errorReporter)) {
+ if (s & (4 | 64) && !(s & 256) && (t & 16 || t & 64 && t & 256))
return true;
- }
- if (source.flags & 256 &&
- target.flags & 16 &&
- isEnumTypeRelatedTo(target, source.baseType, errorReporter)) {
- return true;
- }
}
return false;
}
@@ -30019,6 +31424,7 @@ var ts;
var expandingFlags;
var depth = 0;
var overflow = false;
+ var isIntersectionConstituent = false;
ts.Debug.assert(relation !== identityRelation || !errorNode, "no error reporting in identity checking");
var result = isRelatedTo(source, target, !!errorNode, headMessage);
if (overflow) {
@@ -30039,8 +31445,8 @@ var ts;
var sourceType = typeToString(source);
var targetType = typeToString(target);
if (sourceType === targetType) {
- sourceType = typeToString(source, undefined, 128);
- targetType = typeToString(target, undefined, 128);
+ sourceType = typeToString(source, undefined, 256);
+ targetType = typeToString(target, undefined, 256);
}
if (!message) {
if (relation === comparableRelation) {
@@ -30083,7 +31489,6 @@ var ts;
return false;
}
function isRelatedTo(source, target, reportErrors, headMessage) {
- var result;
if (source.flags & 96 && source.flags & 1048576) {
source = source.regularType;
}
@@ -30108,42 +31513,47 @@ var ts;
source = getRegularTypeOfObjectLiteral(source);
}
}
+ if (relation !== comparableRelation &&
+ !(source.flags & 196608) &&
+ !(target.flags & 65536) &&
+ !isIntersectionConstituent &&
+ source !== globalObjectType &&
+ getPropertiesOfType(source).length > 0 &&
+ isWeakType(target) &&
+ !hasCommonProperties(source, target)) {
+ if (reportErrors) {
+ reportError(ts.Diagnostics.Type_0_has_no_properties_in_common_with_type_1, typeToString(source), typeToString(target));
+ }
+ return 0;
+ }
+ var result = 0;
var saveErrorInfo = errorInfo;
+ var saveIsIntersectionConstituent = isIntersectionConstituent;
+ isIntersectionConstituent = false;
if (source.flags & 65536) {
- if (relation === comparableRelation) {
- result = someTypeRelatedToType(source, target, reportErrors && !(source.flags & 8190));
- }
- else {
- result = eachTypeRelatedToType(source, target, reportErrors && !(source.flags & 8190));
- }
- if (result) {
- return result;
- }
+ result = relation === comparableRelation ?
+ someTypeRelatedToType(source, target, reportErrors && !(source.flags & 8190)) :
+ eachTypeRelatedToType(source, target, reportErrors && !(source.flags & 8190));
}
else {
if (target.flags & 65536) {
- if (result = typeRelatedToSomeType(source, target, reportErrors && !(source.flags & 8190) && !(target.flags & 8190))) {
- return result;
- }
+ result = typeRelatedToSomeType(source, target, reportErrors && !(source.flags & 8190) && !(target.flags & 8190));
}
else if (target.flags & 131072) {
- if (result = typeRelatedToEachType(source, target, reportErrors)) {
- return result;
- }
+ isIntersectionConstituent = true;
+ result = typeRelatedToEachType(source, target, reportErrors);
}
else if (source.flags & 131072) {
- if (result = someTypeRelatedToType(source, target, false)) {
- return result;
- }
+ result = someTypeRelatedToType(source, target, false);
}
- if (source.flags & 1032192 || target.flags & 1032192) {
+ if (!result && (source.flags & 1032192 || target.flags & 1032192)) {
if (result = recursiveTypeRelatedTo(source, target, reportErrors)) {
errorInfo = saveErrorInfo;
- return result;
}
}
}
- if (reportErrors) {
+ isIntersectionConstituent = saveIsIntersectionConstituent;
+ if (!result && reportErrors) {
if (source.flags & 32768 && target.flags & 8190) {
tryElaborateErrorsForPrimitivesAndObjects(source, target);
}
@@ -30152,7 +31562,7 @@ var ts;
}
reportRelationError(headMessage, source, target);
}
- return 0;
+ return result;
}
function isIdenticalTo(source, target) {
var result;
@@ -30169,24 +31579,6 @@ var ts;
}
return 0;
}
- function isKnownProperty(type, name, isComparingJsxAttributes) {
- if (type.flags & 32768) {
- var resolved = resolveStructuredTypeMembers(type);
- 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, isComparingJsxAttributes)) {
- return true;
- }
- }
- }
- return false;
- }
function hasExcessProperties(source, target, reportErrors) {
if (maybeTypeOfKind(target, 32768) && !(getObjectFlags(target) & 512)) {
var isComparingJsxAttributes = !!(source.flags & 33554432);
@@ -30194,8 +31586,7 @@ var ts;
(isTypeSubsetOf(globalObjectType, target) || (!isComparingJsxAttributes && isEmptyObjectType(target)))) {
return false;
}
- for (var _i = 0, _a = getPropertiesOfObjectType(source); _i < _a.length; _i++) {
- var prop = _a[_i];
+ var _loop_4 = function (prop) {
if (!isKnownProperty(target, prop.name, isComparingJsxAttributes)) {
if (reportErrors) {
ts.Debug.assert(!!errorNode);
@@ -30203,12 +31594,21 @@ var ts;
reportError(ts.Diagnostics.Property_0_does_not_exist_on_type_1, symbolToString(prop), typeToString(target));
}
else {
- errorNode = prop.valueDeclaration;
+ var objectLiteralDeclaration_1 = source.symbol && ts.firstOrUndefined(source.symbol.declarations);
+ if (prop.valueDeclaration && ts.findAncestor(prop.valueDeclaration, function (d) { return d === objectLiteralDeclaration_1; })) {
+ 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;
+ return { value: true };
}
+ };
+ for (var _i = 0, _a = getPropertiesOfObjectType(source); _i < _a.length; _i++) {
+ var prop = _a[_i];
+ var state_2 = _loop_4(prop);
+ if (typeof state_2 === "object")
+ return state_2.value;
}
}
return false;
@@ -30535,10 +31935,10 @@ var ts;
}
}
else if (!(targetProp.flags & 16777216)) {
- var sourcePropFlags = getDeclarationModifierFlagsFromSymbol(sourceProp);
- var targetPropFlags = getDeclarationModifierFlagsFromSymbol(targetProp);
+ var sourcePropFlags = ts.getDeclarationModifierFlagsFromSymbol(sourceProp);
+ var targetPropFlags = ts.getDeclarationModifierFlagsFromSymbol(targetProp);
if (sourcePropFlags & 8 || targetPropFlags & 8) {
- if (getCheckFlags(sourceProp) & 256) {
+ if (ts.getCheckFlags(sourceProp) & 256) {
if (reportErrors) {
reportError(ts.Diagnostics.Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1, symbolToString(sourceProp), typeToString(source));
}
@@ -30589,6 +31989,29 @@ var ts;
}
return result;
}
+ function isWeakType(type) {
+ if (type.flags & 32768) {
+ var resolved = resolveStructuredTypeMembers(type);
+ return resolved.callSignatures.length === 0 && resolved.constructSignatures.length === 0 &&
+ !resolved.stringIndexInfo && !resolved.numberIndexInfo &&
+ resolved.properties.length > 0 &&
+ ts.every(resolved.properties, function (p) { return !!(p.flags & 67108864); });
+ }
+ if (type.flags & 131072) {
+ return ts.every(type.types, isWeakType);
+ }
+ return false;
+ }
+ function hasCommonProperties(source, target) {
+ var isComparingJsxAttributes = !!(source.flags & 33554432);
+ for (var _i = 0, _a = getPropertiesOfType(source); _i < _a.length; _i++) {
+ var prop = _a[_i];
+ if (isKnownProperty(target, prop.name, isComparingJsxAttributes)) {
+ return true;
+ }
+ }
+ return false;
+ }
function propertiesIdenticalTo(source, target) {
if (!(source.flags & 32768 && target.flags & 32768)) {
return 0;
@@ -30635,28 +32058,43 @@ var ts;
}
var result = -1;
var saveErrorInfo = errorInfo;
- outer: for (var _i = 0, targetSignatures_1 = targetSignatures; _i < targetSignatures_1.length; _i++) {
- var t = targetSignatures_1[_i];
- var shouldElaborateErrors = reportErrors;
- for (var _a = 0, sourceSignatures_1 = sourceSignatures; _a < sourceSignatures_1.length; _a++) {
- var s = sourceSignatures_1[_a];
- var related = signatureRelatedTo(s, t, shouldElaborateErrors);
- if (related) {
- result &= related;
- errorInfo = saveErrorInfo;
- continue outer;
+ if (getObjectFlags(source) & 64 && getObjectFlags(target) & 64 && source.symbol === target.symbol) {
+ for (var i = 0; i < targetSignatures.length; i++) {
+ var related = signatureRelatedTo(sourceSignatures[i], targetSignatures[i], true, reportErrors);
+ if (!related) {
+ return 0;
}
- shouldElaborateErrors = false;
+ result &= related;
}
- if (shouldElaborateErrors) {
- reportError(ts.Diagnostics.Type_0_provides_no_match_for_the_signature_1, typeToString(source), signatureToString(t, undefined, undefined, kind));
+ }
+ else if (sourceSignatures.length === 1 && targetSignatures.length === 1) {
+ var eraseGenerics = relation === comparableRelation || compilerOptions.noStrictGenericChecks;
+ result = signatureRelatedTo(sourceSignatures[0], targetSignatures[0], eraseGenerics, reportErrors);
+ }
+ else {
+ outer: for (var _i = 0, targetSignatures_1 = targetSignatures; _i < targetSignatures_1.length; _i++) {
+ var t = targetSignatures_1[_i];
+ var shouldElaborateErrors = reportErrors;
+ for (var _a = 0, sourceSignatures_1 = sourceSignatures; _a < sourceSignatures_1.length; _a++) {
+ var s = sourceSignatures_1[_a];
+ var related = signatureRelatedTo(s, t, true, shouldElaborateErrors);
+ if (related) {
+ result &= related;
+ errorInfo = saveErrorInfo;
+ continue outer;
+ }
+ shouldElaborateErrors = false;
+ }
+ if (shouldElaborateErrors) {
+ reportError(ts.Diagnostics.Type_0_provides_no_match_for_the_signature_1, typeToString(source), signatureToString(t, undefined, undefined, kind));
+ }
+ return 0;
}
- return 0;
}
return result;
}
- function signatureRelatedTo(source, target, reportErrors) {
- return compareSignaturesRelated(source, target, false, reportErrors, reportError, isRelatedTo);
+ function signatureRelatedTo(source, target, erase, reportErrors) {
+ return compareSignaturesRelated(erase ? getErasedSignature(source) : source, erase ? getErasedSignature(target) : target, false, false, reportErrors, reportError, isRelatedTo);
}
function signaturesIdenticalTo(source, target, kind) {
var sourceSignatures = getSignaturesOfType(source, kind);
@@ -30762,7 +32200,7 @@ var ts;
}
}
function forEachProperty(prop, callback) {
- if (getCheckFlags(prop) & 6) {
+ if (ts.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);
@@ -30785,11 +32223,11 @@ var ts;
});
}
function isValidOverrideOf(sourceProp, targetProp) {
- return !forEachProperty(targetProp, function (tp) { return getDeclarationModifierFlagsFromSymbol(tp) & 16 ?
+ return !forEachProperty(targetProp, function (tp) { return ts.getDeclarationModifierFlagsFromSymbol(tp) & 16 ?
!isPropertyInClassDerivedFrom(sourceProp, getDeclaringClass(tp)) : false; });
}
function isClassDerivedFromDeclaringClasses(checkClass, prop) {
- return forEachProperty(prop, function (p) { return getDeclarationModifierFlagsFromSymbol(p) & 16 ?
+ return forEachProperty(prop, function (p) { return ts.getDeclarationModifierFlagsFromSymbol(p) & 16 ?
!hasBaseType(checkClass, getDeclaringClass(p)) : false; }) ? undefined : checkClass;
}
function isAbstractConstructorType(type) {
@@ -30828,8 +32266,8 @@ var ts;
if (sourceProp === targetProp) {
return -1;
}
- var sourcePropAccessibility = getDeclarationModifierFlagsFromSymbol(sourceProp) & 24;
- var targetPropAccessibility = getDeclarationModifierFlagsFromSymbol(targetProp) & 24;
+ var sourcePropAccessibility = ts.getDeclarationModifierFlagsFromSymbol(sourceProp) & 24;
+ var targetPropAccessibility = ts.getDeclarationModifierFlagsFromSymbol(targetProp) & 24;
if (sourcePropAccessibility !== targetPropAccessibility) {
return 0;
}
@@ -30906,18 +32344,10 @@ var ts;
function isRestParameterIndex(signature, parameterIndex) {
return signature.hasRestParameter && parameterIndex >= signature.parameters.length - 1;
}
- function isSupertypeOfEach(candidate, types) {
- 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;
- }
- return true;
- }
function literalTypesWithSameBaseType(types) {
var commonBaseType;
- for (var _i = 0, types_11 = types; _i < types_11.length; _i++) {
- var t = types_11[_i];
+ for (var _i = 0, types_9 = types; _i < types_9.length; _i++) {
+ var t = types_9[_i];
var baseType = getBaseTypeOfLiteralType(t);
if (!commonBaseType) {
commonBaseType = baseType;
@@ -30929,45 +32359,18 @@ var ts;
return true;
}
function getSupertypeOrUnion(types) {
- return literalTypesWithSameBaseType(types) ? getUnionType(types) : ts.forEach(types, function (t) { return isSupertypeOfEach(t, types) ? t : undefined; });
+ return literalTypesWithSameBaseType(types) ?
+ getUnionType(types) :
+ ts.reduceLeft(types, function (s, t) { return isTypeSubtypeOf(s, t) ? t : s; });
}
function getCommonSupertype(types) {
if (!strictNullChecks) {
return getSupertypeOrUnion(types);
}
var primaryTypes = ts.filter(types, function (t) { return !(t.flags & 6144); });
- if (!primaryTypes.length) {
- return getUnionType(types, true);
- }
- var supertype = getSupertypeOrUnion(primaryTypes);
- return supertype && includeFalsyTypes(supertype, getFalsyFlagsOfTypes(types) & 6144);
- }
- function reportNoCommonSupertypeError(types, errorLocation, errorMessageChainHead) {
- var bestSupertype;
- var bestSupertypeDownfallType;
- var bestSupertypeScore = 0;
- for (var i = 0; i < types.length; i++) {
- var score = 0;
- var downfallType = undefined;
- for (var j = 0; j < types.length; j++) {
- if (isTypeSubtypeOf(types[j], types[i])) {
- score++;
- }
- else if (!downfallType) {
- downfallType = types[j];
- }
- }
- ts.Debug.assert(!!downfallType, "If there is no common supertype, each type should have a downfallType");
- if (score > bestSupertypeScore) {
- bestSupertype = types[i];
- bestSupertypeDownfallType = downfallType;
- bestSupertypeScore = score;
- }
- if (bestSupertypeScore === types.length - 1) {
- break;
- }
- }
- checkTypeSubtypeOf(bestSupertypeDownfallType, bestSupertype, errorLocation, ts.Diagnostics.Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0, errorMessageChainHead);
+ return primaryTypes.length ?
+ getNullableType(getSupertypeOrUnion(primaryTypes), getFalsyFlagsOfTypes(types) & 6144) :
+ getUnionType(types, true);
}
function isArrayType(type) {
return getObjectFlags(type) & 4 && type.target === globalArrayType;
@@ -30980,27 +32383,27 @@ var ts;
return !!getPropertyOfType(type, "0");
}
function isUnitType(type) {
- return (type.flags & (480 | 2048 | 4096)) !== 0;
+ return (type.flags & (224 | 2048 | 4096)) !== 0;
}
function isLiteralType(type) {
return type.flags & 8 ? true :
- type.flags & 65536 ? type.flags & 16 ? true : !ts.forEach(type.types, function (t) { return !isUnitType(t); }) :
+ type.flags & 65536 ? type.flags & 256 ? true : !ts.forEach(type.types, function (t) { return !isUnitType(t); }) :
isUnitType(type);
}
function getBaseTypeOfLiteralType(type) {
- return type.flags & 32 ? stringType :
- type.flags & 64 ? numberType :
- type.flags & 128 ? booleanType :
- type.flags & 256 ? type.baseType :
- type.flags & 65536 && !(type.flags & 16) ? getUnionType(ts.sameMap(type.types, getBaseTypeOfLiteralType)) :
+ return type.flags & 256 ? getBaseTypeOfEnumLiteralType(type) :
+ type.flags & 32 ? stringType :
+ type.flags & 64 ? numberType :
+ type.flags & 128 ? booleanType :
+ type.flags & 65536 ? getUnionType(ts.sameMap(type.types, getBaseTypeOfLiteralType)) :
type;
}
function getWidenedLiteralType(type) {
- return type.flags & 32 && type.flags & 1048576 ? stringType :
- type.flags & 64 && type.flags & 1048576 ? numberType :
- type.flags & 128 ? booleanType :
- type.flags & 256 ? type.baseType :
- type.flags & 65536 && !(type.flags & 16) ? getUnionType(ts.sameMap(type.types, getWidenedLiteralType)) :
+ return type.flags & 256 ? getBaseTypeOfEnumLiteralType(type) :
+ type.flags & 32 && type.flags & 1048576 ? stringType :
+ type.flags & 64 && type.flags & 1048576 ? numberType :
+ type.flags & 128 ? booleanType :
+ type.flags & 65536 ? getUnionType(ts.sameMap(type.types, getWidenedLiteralType)) :
type;
}
function isTupleType(type) {
@@ -31008,43 +32411,43 @@ var ts;
}
function getFalsyFlagsOfTypes(types) {
var result = 0;
- for (var _i = 0, types_12 = types; _i < types_12.length; _i++) {
- var t = types_12[_i];
+ for (var _i = 0, types_10 = types; _i < types_10.length; _i++) {
+ var t = types_10[_i];
result |= getFalsyFlags(t);
}
return result;
}
function getFalsyFlags(type) {
return type.flags & 65536 ? getFalsyFlagsOfTypes(type.types) :
- type.flags & 32 ? type.text === "" ? 32 : 0 :
- type.flags & 64 ? type.text === "0" ? 64 : 0 :
+ type.flags & 32 ? type.value === "" ? 32 : 0 :
+ type.flags & 64 ? type.value === 0 ? 64 : 0 :
type.flags & 128 ? type === falseType ? 128 : 0 :
type.flags & 7406;
}
- function includeFalsyTypes(type, flags) {
- if ((getFalsyFlags(type) & flags) === flags) {
- return type;
- }
- var types = [type];
- if (flags & 262178)
- types.push(emptyStringType);
- if (flags & 340)
- types.push(zeroType);
- if (flags & 136)
- types.push(falseType);
- if (flags & 1024)
- types.push(voidType);
- if (flags & 2048)
- types.push(undefinedType);
- if (flags & 4096)
- types.push(nullType);
- return getUnionType(types);
- }
function removeDefinitelyFalsyTypes(type) {
return getFalsyFlags(type) & 7392 ?
filterType(type, function (t) { return !(getFalsyFlags(t) & 7392); }) :
type;
}
+ function extractDefinitelyFalsyTypes(type) {
+ return mapType(type, getDefinitelyFalsyPartOfType);
+ }
+ function getDefinitelyFalsyPartOfType(type) {
+ return type.flags & 2 ? emptyStringType :
+ type.flags & 4 ? zeroType :
+ type.flags & 8 || type === falseType ? falseType :
+ type.flags & (1024 | 2048 | 4096) ||
+ type.flags & 32 && type.value === "" ||
+ type.flags & 64 && type.value === 0 ? type :
+ neverType;
+ }
+ function getNullableType(type, flags) {
+ var missing = (flags & ~type.flags) & (2048 | 4096);
+ return missing === 0 ? type :
+ missing === 2048 ? getUnionType([type, undefinedType]) :
+ missing === 4096 ? getUnionType([type, nullType]) :
+ getUnionType([type, undefinedType, nullType]);
+ }
function getNonNullableType(type) {
return strictNullChecks ? getTypeWithFacts(type, 524288) : type;
}
@@ -31189,7 +32592,7 @@ var ts;
default:
diagnostic = ts.Diagnostics.Variable_0_implicitly_has_an_1_type;
}
- error(declaration, diagnostic, ts.declarationNameToString(declaration.name), typeAsString);
+ error(declaration, diagnostic, ts.declarationNameToString(ts.getNameOfDeclaration(declaration)), typeAsString);
}
function reportErrorsFromWidening(declaration, type) {
if (produceDiagnostics && noImplicitAny && type.flags & 2097152) {
@@ -31218,29 +32621,49 @@ var ts;
callback(getTypeAtPosition(source, i), getTypeAtPosition(target, i));
}
}
- function createInferenceContext(signature, inferUnionTypes, useAnyForNoInferences) {
- var inferences = ts.map(signature.typeParameters, createTypeInferencesObject);
+ function createInferenceContext(signature, flags, baseInferences) {
+ var inferences = baseInferences ? ts.map(baseInferences, cloneInferenceInfo) : ts.map(signature.typeParameters, createInferenceInfo);
+ var context = mapper;
+ context.mappedTypes = signature.typeParameters;
+ context.signature = signature;
+ context.inferences = inferences;
+ context.flags = flags;
+ return context;
+ function mapper(t) {
+ for (var i = 0; i < inferences.length; i++) {
+ if (t === inferences[i].typeParameter) {
+ inferences[i].isFixed = true;
+ return getInferredType(context, i);
+ }
+ }
+ return t;
+ }
+ }
+ function createInferenceInfo(typeParameter) {
return {
- signature: signature,
- inferUnionTypes: inferUnionTypes,
- inferences: inferences,
- inferredTypes: new Array(signature.typeParameters.length),
- useAnyForNoInferences: useAnyForNoInferences
+ typeParameter: typeParameter,
+ candidates: undefined,
+ inferredType: undefined,
+ priority: undefined,
+ topLevel: true,
+ isFixed: false
};
}
- function createTypeInferencesObject() {
+ function cloneInferenceInfo(inference) {
return {
- primary: undefined,
- secondary: undefined,
- topLevel: true,
- isFixed: false,
+ typeParameter: inference.typeParameter,
+ candidates: inference.candidates && inference.candidates.slice(),
+ inferredType: inference.inferredType,
+ priority: inference.priority,
+ topLevel: inference.topLevel,
+ isFixed: inference.isFixed
};
}
function couldContainTypeVariables(type) {
var objectFlags = getObjectFlags(type);
return !!(type.flags & 540672 ||
objectFlags & 4 && ts.forEach(type.typeArguments, couldContainTypeVariables) ||
- objectFlags & 16 && type.symbol && type.symbol.flags & (8192 | 2048 | 32) ||
+ objectFlags & 16 && type.symbol && type.symbol.flags & (16 | 8192 | 2048 | 32) ||
objectFlags & 32 ||
type.flags & 196608 && couldUnionOrIntersectionContainTypeVariables(type));
}
@@ -31259,14 +32682,13 @@ var ts;
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 typeParameter = getIndexedAccessType(getConstraintTypeFromMappedType(target).type, getTypeParameterFromMappedType(target));
+ var inference = createInferenceInfo(typeParameter);
+ var inferences = [inference];
var templateType = getTemplateTypeFromMappedType(target);
var readonlyMask = target.declaration.readonlyToken ? false : true;
var optionalMask = target.declaration.questionToken ? 0 : 67108864;
- var members = createSymbolTable(properties);
+ var members = ts.createMap();
for (var _i = 0, properties_5 = properties; _i < properties_5.length; _i++) {
var prop = properties_5[_i];
var inferredPropType = inferTargetType(getTypeOfSymbol(prop));
@@ -31288,31 +32710,16 @@ var ts;
}
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);
+ inference.candidates = undefined;
+ inferTypes(inferences, sourceType, templateType);
+ return inference.candidates && getUnionType(inference.candidates, 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;
- var inferiority = 0;
- var visited = ts.createMap();
+ function inferTypes(inferences, originalSource, originalTarget, priority) {
+ if (priority === void 0) { priority = 0; }
+ var symbolStack;
+ var visited;
inferFromTypes(originalSource, originalTarget);
- function isInProcess(source, target) {
- for (var i = 0; i < depth; i++) {
- if (source === sourceStack[i] && target === targetStack[i]) {
- return true;
- }
- }
- return false;
- }
function inferFromTypes(source, target) {
if (!couldContainTypeVariables(target)) {
return;
@@ -31325,7 +32732,7 @@ var ts;
}
return;
}
- if (source.flags & 65536 && target.flags & 65536 && !(source.flags & 16 && target.flags & 16) ||
+ if (source.flags & 65536 && target.flags & 65536 && !(source.flags & 256 && target.flags & 256) ||
source.flags & 131072 && target.flags & 131072) {
if (source === target) {
for (var _i = 0, _a = source.types; _i < _a.length; _i++) {
@@ -31354,25 +32761,24 @@ var ts;
}
}
if (target.flags & 540672) {
- if (source.flags & 8388608) {
+ if (source.flags & 8388608 || source === silentNeverType) {
return;
}
- 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 = []) :
- inferences.primary || (inferences.primary = []);
- if (!ts.contains(candidates, source)) {
- candidates.push(source);
- }
- if (target.flags & 16384 && !isTypeParameterAtTopLevel(originalTarget, target)) {
- inferences.topLevel = false;
- }
+ var inference = getInferenceInfoForType(target);
+ if (inference) {
+ if (!inference.isFixed) {
+ if (!inference.candidates || priority < inference.priority) {
+ inference.candidates = [source];
+ inference.priority = priority;
+ }
+ else if (priority === inference.priority) {
+ inference.candidates.push(source);
+ }
+ if (!(priority & 4) && target.flags & 16384 && !isTypeParameterAtTopLevel(originalTarget, target)) {
+ inference.topLevel = false;
}
- return;
}
+ return;
}
}
else if (getObjectFlags(source) & 4 && getObjectFlags(target) & 4 && source.target === target.target) {
@@ -31389,7 +32795,7 @@ var ts;
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)) {
+ if (getInferenceInfoForType(t)) {
typeVariable = t;
typeVariableCount++;
}
@@ -31398,9 +32804,10 @@ var ts;
}
}
if (typeVariableCount === 1) {
- inferiority++;
+ var savePriority = priority;
+ priority |= 1;
inferFromTypes(source, typeVariable);
- inferiority--;
+ priority = savePriority;
}
}
else if (source.flags & 196608) {
@@ -31413,40 +32820,51 @@ var ts;
else {
source = getApparentType(source);
if (source.flags & 32768) {
- if (isInProcess(source, target)) {
+ var key = source.id + "," + target.id;
+ if (visited && visited.get(key)) {
return;
}
- if (isDeeplyNestedType(source, sourceStack, depth) && isDeeplyNestedType(target, targetStack, depth)) {
- return;
+ (visited || (visited = ts.createMap())).set(key, true);
+ var isNonConstructorObject = target.flags & 32768 &&
+ !(getObjectFlags(target) & 16 && target.symbol && target.symbol.flags & 32);
+ var symbol = isNonConstructorObject ? target.symbol : undefined;
+ if (symbol) {
+ if (ts.contains(symbolStack, symbol)) {
+ return;
+ }
+ (symbolStack || (symbolStack = [])).push(symbol);
+ inferFromObjectTypes(source, target);
+ symbolStack.pop();
}
- var key = source.id + "," + target.id;
- if (visited.get(key)) {
- return;
+ else {
+ inferFromObjectTypes(source, target);
}
- visited.set(key, true);
- if (depth === 0) {
- sourceStack = [];
- targetStack = [];
+ }
+ }
+ }
+ function getInferenceInfoForType(type) {
+ if (type.flags & 540672) {
+ for (var _i = 0, inferences_1 = inferences; _i < inferences_1.length; _i++) {
+ var inference = inferences_1[_i];
+ if (type === inference.typeParameter) {
+ return inference;
}
- sourceStack[depth] = source;
- targetStack[depth] = target;
- depth++;
- inferFromObjectTypes(source, target);
- depth--;
}
}
+ return undefined;
}
function inferFromObjectTypes(source, target) {
if (getObjectFlags(target) & 32) {
var constraintType = getConstraintTypeFromMappedType(target);
if (constraintType.flags & 262144) {
- var index = ts.indexOf(typeVariables, constraintType.type);
- if (index >= 0 && !typeInferences[index].isFixed) {
+ var inference = getInferenceInfoForType(constraintType.type);
+ if (inference && !inference.isFixed) {
var inferredType = inferTypeForHomomorphicMappedType(source, target);
if (inferredType) {
- inferiority++;
- inferFromTypes(inferredType, typeVariables[index]);
- inferiority--;
+ var savePriority = priority;
+ priority |= 2;
+ inferFromTypes(inferredType, inference.typeParameter);
+ priority = savePriority;
}
}
return;
@@ -31515,8 +32933,8 @@ var ts;
}
}
function typeIdenticalToSomeType(type, types) {
- for (var _i = 0, types_13 = types; _i < types_13.length; _i++) {
- var t = types_13[_i];
+ for (var _i = 0, types_11 = types; _i < types_11.length; _i++) {
+ var t = types_11[_i];
if (isTypeIdenticalTo(t, type)) {
return true;
}
@@ -31533,65 +32951,58 @@ var ts;
}
return type.flags & 65536 ? getUnionType(reducedTypes) : getIntersectionType(reducedTypes);
}
- function getInferenceCandidates(context, index) {
- var inferences = context.inferences[index];
- return inferences.primary || inferences.secondary || emptyArray;
- }
function hasPrimitiveConstraint(type) {
var constraint = getConstraintOfTypeParameter(type);
return constraint && maybeTypeOfKind(constraint, 8190 | 262144);
}
function getInferredType(context, index) {
- var inferredType = context.inferredTypes[index];
- var inferenceSucceeded;
+ var inference = context.inferences[index];
+ var inferredType = inference.inferredType;
if (!inferredType) {
- var inferences = getInferenceCandidates(context, index);
- if (inferences.length) {
+ if (inference.candidates) {
var signature = context.signature;
- var widenLiteralTypes = context.inferences[index].topLevel &&
- !hasPrimitiveConstraint(signature.typeParameters[index]) &&
- (context.inferences[index].isFixed || !isTypeParameterAtTopLevel(getReturnTypeOfSignature(signature), signature.typeParameters[index]));
- var baseInferences = widenLiteralTypes ? ts.sameMap(inferences, getWidenedLiteralType) : inferences;
- var unionOrSuperType = context.inferUnionTypes ? getUnionType(baseInferences, true) : getCommonSupertype(baseInferences);
- inferredType = unionOrSuperType ? getWidenedType(unionOrSuperType) : unknownType;
- inferenceSucceeded = !!unionOrSuperType;
+ var widenLiteralTypes = inference.topLevel &&
+ !hasPrimitiveConstraint(inference.typeParameter) &&
+ (inference.isFixed || !isTypeParameterAtTopLevel(getReturnTypeOfSignature(signature), inference.typeParameter));
+ var baseCandidates = widenLiteralTypes ? ts.sameMap(inference.candidates, getWidenedLiteralType) : inference.candidates;
+ var unionOrSuperType = context.flags & 1 || inference.priority & 4 ?
+ getUnionType(baseCandidates, true) : getCommonSupertype(baseCandidates);
+ inferredType = getWidenedType(unionOrSuperType);
+ }
+ else if (context.flags & 2) {
+ inferredType = silentNeverType;
}
else {
- var defaultType = getDefaultFromTypeParameter(context.signature.typeParameters[index]);
+ var defaultType = getDefaultFromTypeParameter(inference.typeParameter);
if (defaultType) {
- inferredType = instantiateType(defaultType, combineTypeMappers(createBackreferenceMapper(context.signature.typeParameters, index), getInferenceMapper(context)));
+ inferredType = instantiateType(defaultType, combineTypeMappers(createBackreferenceMapper(context.signature.typeParameters, index), context));
}
else {
- inferredType = context.useAnyForNoInferences ? anyType : emptyObjectType;
+ inferredType = context.flags & 4 ? anyType : emptyObjectType;
}
- inferenceSucceeded = true;
}
- context.inferredTypes[index] = inferredType;
- if (inferenceSucceeded) {
- var constraint = getConstraintOfTypeParameter(context.signature.typeParameters[index]);
- if (constraint) {
- var instantiatedConstraint = instantiateType(constraint, getInferenceMapper(context));
- if (!isTypeAssignableTo(inferredType, getTypeWithThisArgument(instantiatedConstraint, inferredType))) {
- context.inferredTypes[index] = inferredType = instantiatedConstraint;
- }
+ inference.inferredType = inferredType;
+ var constraint = getConstraintOfTypeParameter(context.signature.typeParameters[index]);
+ if (constraint) {
+ var instantiatedConstraint = instantiateType(constraint, context);
+ if (!isTypeAssignableTo(inferredType, getTypeWithThisArgument(instantiatedConstraint, inferredType))) {
+ inference.inferredType = inferredType = instantiatedConstraint;
}
}
- else if (context.failedTypeParameterIndex === undefined || context.failedTypeParameterIndex > index) {
- context.failedTypeParameterIndex = index;
- }
}
return inferredType;
}
function getInferredTypes(context) {
- for (var i = 0; i < context.inferredTypes.length; i++) {
- getInferredType(context, i);
+ var result = [];
+ for (var i = 0; i < context.inferences.length; i++) {
+ result.push(getInferredType(context, i));
}
- return context.inferredTypes;
+ return result;
}
function getResolvedSymbol(node) {
var links = getNodeLinks(node);
if (!links.resolvedSymbol) {
- links.resolvedSymbol = !ts.nodeIsMissing(node) && resolveName(node, node.text, 107455 | 1048576, ts.Diagnostics.Cannot_find_name_0, node) || unknownSymbol;
+ links.resolvedSymbol = !ts.nodeIsMissing(node) && resolveName(node, node.text, 107455 | 1048576, ts.Diagnostics.Cannot_find_name_0, node, ts.Diagnostics.Cannot_find_name_0_Did_you_mean_1) || unknownSymbol;
}
return links.resolvedSymbol;
}
@@ -31601,7 +33012,7 @@ var ts;
function getFlowCacheKey(node) {
if (node.kind === 71) {
var symbol = getResolvedSymbol(node);
- return symbol !== unknownSymbol ? "" + getSymbolId(symbol) : undefined;
+ return symbol !== unknownSymbol ? (isApparentTypePosition(node) ? "@" : "") + getSymbolId(symbol) : undefined;
}
if (node.kind === 99) {
return "0";
@@ -31666,7 +33077,7 @@ var ts;
function isDiscriminantProperty(type, name) {
if (type && type.flags & 65536) {
var prop = getUnionOrIntersectionProperty(type, name);
- if (prop && getCheckFlags(prop) & 2) {
+ if (prop && ts.getCheckFlags(prop) & 2) {
if (prop.isDiscriminantProperty === undefined) {
prop.isDiscriminantProperty = prop.checkFlags & 32 && isLiteralType(getTypeOfSymbol(prop));
}
@@ -31726,8 +33137,8 @@ var ts;
}
function getTypeFactsOfTypes(types) {
var result = 0;
- for (var _i = 0, types_14 = types; _i < types_14.length; _i++) {
- var t = types_14[_i];
+ for (var _i = 0, types_12 = types; _i < types_12.length; _i++) {
+ var t = types_12[_i];
result |= getTypeFacts(t);
}
return result;
@@ -31743,15 +33154,16 @@ var ts;
return strictNullChecks ? 4079361 : 4194049;
}
if (flags & 32) {
+ var isEmpty = type.value === "";
return strictNullChecks ?
- type.text === "" ? 3030785 : 1982209 :
- type.text === "" ? 3145473 : 4194049;
+ isEmpty ? 3030785 : 1982209 :
+ isEmpty ? 3145473 : 4194049;
}
if (flags & (4 | 16)) {
return strictNullChecks ? 4079234 : 4193922;
}
- if (flags & (64 | 256)) {
- var isZero = type.text === "0";
+ if (flags & 64) {
+ var isZero = type.value === 0;
return strictNullChecks ?
isZero ? 3030658 : 1982082 :
isZero ? 3145346 : 4193922;
@@ -31953,7 +33365,7 @@ var ts;
}
return true;
}
- if (source.flags & 256 && target.flags & 16 && source.baseType === target) {
+ if (source.flags & 256 && getBaseTypeOfEnumLiteralType(source) === target) {
return true;
}
return containsType(target.types, source);
@@ -31976,8 +33388,8 @@ var ts;
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];
+ 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) {
@@ -32046,8 +33458,8 @@ var ts;
}
function isEvolvingArrayTypeList(types) {
var hasEvolvingArrayType = false;
- for (var _i = 0, types_16 = types; _i < types_16.length; _i++) {
- var t = types_16[_i];
+ for (var _i = 0, types_14 = types; _i < types_14.length; _i++) {
+ var t = types_14[_i];
if (!(t.flags & 8192)) {
if (!(getObjectFlags(t) & 256)) {
return false;
@@ -32073,7 +33485,7 @@ var ts;
parent.parent.operatorToken.kind === 58 &&
parent.parent.left === parent &&
!ts.isAssignmentTarget(parent.parent) &&
- isTypeAnyOrAllConstituentTypesHaveKind(getTypeOfExpression(parent.argumentExpression), 340 | 2048);
+ isTypeAnyOrAllConstituentTypesHaveKind(getTypeOfExpression(parent.argumentExpression), 84 | 2048);
return isLengthPushOrUnshift || isElementAssignment;
}
function maybeTypePredicateCall(node) {
@@ -32099,7 +33511,7 @@ var ts;
function getFlowTypeOfReference(reference, declaredType, initialType, flowContainer, couldBeUninitialized) {
if (initialType === void 0) { initialType = declaredType; }
var key;
- if (!reference.flowNode || !couldBeUninitialized && !(declaredType.flags & 17810431)) {
+ if (!reference.flowNode || !couldBeUninitialized && !(declaredType.flags & 17810175)) {
return declaredType;
}
var visitedFlowStart = visitedFlowCount;
@@ -32219,7 +33631,7 @@ var ts;
}
else {
var indexType = getTypeOfExpression(node.left.argumentExpression);
- if (isTypeAnyOrAllConstituentTypesHaveKind(indexType, 340 | 2048)) {
+ if (isTypeAnyOrAllConstituentTypesHaveKind(indexType, 84 | 2048)) {
evolvedType_1 = addEvolvingArrayElementType(evolvedType_1, node.right);
}
}
@@ -32652,6 +34064,22 @@ var ts;
!(getFalsyFlags(checkExpression(declaration.initializer)) & 2048);
return annotationIncludesUndefined ? getTypeWithFacts(declaredType, 131072) : declaredType;
}
+ function isApparentTypePosition(node) {
+ var parent = node.parent;
+ return parent.kind === 179 ||
+ parent.kind === 181 && parent.expression === node ||
+ parent.kind === 180 && parent.expression === node;
+ }
+ function typeHasNullableConstraint(type) {
+ return type.flags & 540672 && maybeTypeOfKind(getBaseConstraintOfType(type) || emptyObjectType, 6144);
+ }
+ function getDeclaredOrApparentType(symbol, node) {
+ var type = getTypeOfSymbol(symbol);
+ if (isApparentTypePosition(node) && forEachType(type, typeHasNullableConstraint)) {
+ return mapType(getWidenedType(type), getApparentType);
+ }
+ return type;
+ }
function checkIdentifier(node) {
var symbol = getResolvedSymbol(node);
if (symbol === unknownSymbol) {
@@ -32670,7 +34098,7 @@ var ts;
getNodeLinks(container).flags |= 8192;
return getTypeOfSymbol(symbol);
}
- if (symbol.flags & 8388608 && !isInTypeQuery(node) && !isConstEnumOrConstEnumOnlyModule(resolveAlias(symbol))) {
+ if (isNonLocalAlias(symbol, 107455) && !isInTypeQuery(node) && !isConstEnumOrConstEnumOnlyModule(resolveAlias(symbol))) {
markAliasSymbolAsReferenced(symbol);
}
var localOrExportSymbol = getExportSymbolOfValueSymbolIfExported(symbol);
@@ -32706,7 +34134,7 @@ var ts;
checkCollisionWithCapturedThisVariable(node, node);
checkCollisionWithCapturedNewTargetVariable(node, node);
checkNestedBlockScopedBinding(node, symbol);
- var type = getTypeOfSymbol(localOrExportSymbol);
+ var type = getDeclaredOrApparentType(localOrExportSymbol, node);
var declaration = localOrExportSymbol.valueDeclaration;
var assignmentKind = ts.getAssignmentTargetKind(node);
if (assignmentKind) {
@@ -32733,15 +34161,16 @@ var ts;
}
var assumeInitialized = isParameter || isOuterVariable ||
type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & 1) !== 0 || isInTypeQuery(node) || node.parent.kind === 246) ||
+ node.parent.kind === 203 ||
ts.isInAmbientContext(declaration);
var initialType = assumeInitialized ? (isParameter ? removeOptionalityFromDeclaredType(type, ts.getRootDeclaration(declaration)) : type) :
type === autoType || type === autoArrayType ? undefinedType :
- includeFalsyTypes(type, 2048);
+ getNullableType(type, 2048);
var flowType = getFlowTypeOfReference(node, type, initialType, flowContainer, !assumeInitialized);
if (type === autoType || type === autoArrayType) {
if (flowType === autoType || flowType === autoArrayType) {
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(ts.getNameOfDeclaration(declaration), 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));
}
return convertAutoToAny(flowType);
@@ -33132,8 +34561,15 @@ var ts;
function getContextualTypeForInitializerExpression(node) {
var declaration = node.parent;
if (node === declaration.initializer) {
- if (declaration.type) {
- return getTypeFromTypeNode(declaration.type);
+ var typeNode = ts.getEffectiveTypeAnnotationNode(declaration);
+ if (typeNode) {
+ return getTypeFromTypeNode(typeNode);
+ }
+ if (ts.isInJavaScriptFile(declaration)) {
+ var jsDocType = getTypeForDeclarationFromJSDocComment(declaration);
+ if (jsDocType) {
+ return jsDocType;
+ }
}
if (declaration.kind === 146) {
var type = getContextuallyTypedParameterType(declaration);
@@ -33147,12 +34583,13 @@ var ts;
if (ts.isBindingPattern(declaration.parent)) {
var parentDeclaration = declaration.parent.parent;
var name = declaration.propertyName || declaration.name;
- if (parentDeclaration.kind !== 176 &&
- parentDeclaration.type &&
- !ts.isBindingPattern(name)) {
- var text = ts.getTextOfPropertyName(name);
- if (text) {
- return getTypeOfPropertyOfType(getTypeFromTypeNode(parentDeclaration.type), text);
+ if (parentDeclaration.kind !== 176) {
+ var parentTypeNode = ts.getEffectiveTypeAnnotationNode(parentDeclaration);
+ if (parentTypeNode && !ts.isBindingPattern(name)) {
+ var text = ts.getTextOfPropertyName(name);
+ if (text) {
+ return getTypeOfPropertyOfType(getTypeFromTypeNode(parentTypeNode), text);
+ }
}
}
}
@@ -33196,9 +34633,9 @@ var ts;
return false;
}
function getContextualReturnType(functionDecl) {
- if (functionDecl.type ||
- functionDecl.kind === 152 ||
- functionDecl.kind === 153 && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(functionDecl.symbol, 154))) {
+ if (functionDecl.kind === 152 ||
+ ts.getEffectiveReturnTypeNode(functionDecl) ||
+ isGetAccessorWithAnnotatedSetAccessor(functionDecl)) {
return getReturnTypeOfSignature(getSignatureFromDeclaration(functionDecl));
}
var signature = getContextualSignatureForFunctionLikeDeclaration(functionDecl);
@@ -33225,7 +34662,7 @@ var ts;
function getContextualTypeForBinaryOperand(node) {
var binaryExpression = node.parent;
var operator = binaryExpression.operatorToken.kind;
- if (operator >= 58 && operator <= 70) {
+ if (ts.isAssignmentOperator(operator)) {
if (ts.getSpecialPropertyAssignmentKind(binaryExpression) !== 0) {
return undefined;
}
@@ -33363,6 +34800,8 @@ var ts;
case 261:
case 262:
return getContextualTypeForObjectLiteralElement(parent);
+ case 263:
+ return getApparentTypeOfContextualType(parent.parent);
case 177:
return getContextualTypeForElementExpression(node);
case 195:
@@ -33387,11 +34826,11 @@ var ts;
node = ts.findAncestor(node, function (n) { return !!n.contextualMapper; });
return node ? node.contextualMapper : identityMapper;
}
- function getNonGenericSignature(type, node) {
+ function getContextualCallSignature(type, node) {
var signatures = getSignaturesOfStructuredType(type, 0);
if (signatures.length === 1) {
var signature = signatures[0];
- if (!signature.typeParameters && !isAritySmaller(signature, node)) {
+ if (!isAritySmaller(signature, node)) {
return signature;
}
}
@@ -33430,13 +34869,13 @@ var ts;
return undefined;
}
if (!(type.flags & 65536)) {
- return getNonGenericSignature(type, node);
+ return getContextualCallSignature(type, node);
}
var signatureList;
var types = type.types;
- for (var _i = 0, types_17 = types; _i < types_17.length; _i++) {
- var current = types_17[_i];
- var signature = getNonGenericSignature(current, node);
+ for (var _i = 0, types_15 = types; _i < types_15.length; _i++) {
+ var current = types_15[_i];
+ var signature = getContextualCallSignature(current, node);
if (signature) {
if (!signatureList) {
signatureList = [signature];
@@ -33526,7 +34965,7 @@ var ts;
return name.kind === 144 ? isNumericComputedName(name) : isNumericLiteralName(name.text);
}
function isNumericComputedName(name) {
- return isTypeAnyOrAllConstituentTypesHaveKind(checkComputedPropertyName(name), 340);
+ return isTypeAnyOrAllConstituentTypesHaveKind(checkComputedPropertyName(name), 84);
}
function isTypeAnyOrAllConstituentTypesHaveKind(type, kind) {
return isTypeAny(type) || isTypeOfKind(type, kind);
@@ -33541,7 +34980,7 @@ var ts;
var links = getNodeLinks(node.expression);
if (!links.resolvedType) {
links.resolvedType = checkExpression(node.expression);
- if (!isTypeAnyOrAllConstituentTypesHaveKind(links.resolvedType, 340 | 262178 | 512)) {
+ if (!isTypeAnyOrAllConstituentTypesHaveKind(links.resolvedType, 84 | 262178 | 512)) {
error(node, ts.Diagnostics.A_computed_property_name_must_be_of_type_string_number_symbol_or_any);
}
else {
@@ -33679,6 +35118,8 @@ var ts;
}
if (spread.flags & 32768) {
spread.flags |= propagatedFlags;
+ spread.flags |= 1048576;
+ spread.objectFlags |= 128;
spread.symbol = node.symbol;
}
return spread;
@@ -33738,6 +35179,10 @@ var ts;
var attributesTable = ts.createMap();
var spread = emptyObjectType;
var attributesArray = [];
+ var hasSpreadAnyType = false;
+ var typeToIntersect;
+ var explicitlySpecifyChildrenAttribute = false;
+ var jsxChildrenPropertyName = getJsxElementChildrenPropertyname();
for (var _i = 0, _a = attributes.properties; _i < _a.length; _i++) {
var attributeDecl = _a[_i];
var member = attributeDecl.symbol;
@@ -33755,6 +35200,9 @@ var ts;
attributeSymbol.target = member;
attributesTable.set(attributeSymbol.name, attributeSymbol);
attributesArray.push(attributeSymbol);
+ if (attributeDecl.name.text === jsxChildrenPropertyName) {
+ explicitlySpecifyChildrenAttribute = true;
+ }
}
else {
ts.Debug.assert(attributeDecl.kind === 255);
@@ -33764,37 +35212,37 @@ var ts;
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;
+ hasSpreadAnyType = true;
+ }
+ if (isValidSpreadType(exprType)) {
+ spread = getSpreadType(spread, exprType);
+ }
+ else {
+ typeToIntersect = typeToIntersect ? getIntersectionType([typeToIntersect, exprType]) : exprType;
}
- spread = getSpreadType(spread, exprType);
}
}
- if (spread !== emptyObjectType) {
- if (attributesArray.length > 0) {
- spread = getSpreadType(spread, createJsxAttributesType(attributes.symbol, attributesTable));
- attributesArray = [];
- attributesTable = ts.createMap();
+ if (!hasSpreadAnyType) {
+ if (spread !== emptyObjectType) {
+ if (attributesArray.length > 0) {
+ spread = getSpreadType(spread, createJsxAttributesType(attributes.symbol, attributesTable));
+ }
+ attributesArray = getPropertiesOfType(spread);
}
- attributesArray = getPropertiesOfType(spread);
- }
- attributesTable = ts.createMap();
- if (attributesArray) {
- ts.forEach(attributesArray, function (attr) {
+ attributesTable = ts.createMap();
+ for (var _b = 0, attributesArray_1 = attributesArray; _b < attributesArray_1.length; _b++) {
+ var attr = attributesArray_1[_b];
if (!filter || filter(attr)) {
attributesTable.set(attr.name, attr);
}
- });
+ }
}
var parent = openingLikeElement.parent.kind === 249 ? openingLikeElement.parent : undefined;
if (parent && parent.openingElement === openingLikeElement && parent.children.length > 0) {
var childrenTypes = [];
- for (var _b = 0, _c = parent.children; _b < _c.length; _b++) {
- var child = _c[_b];
+ for (var _c = 0, _d = parent.children; _c < _d.length; _c++) {
+ var child = _d[_c];
if (child.kind === 10) {
if (!child.containsOnlyWhiteSpaces) {
childrenTypes.push(stringType);
@@ -33804,9 +35252,8 @@ var ts;
childrenTypes.push(checkExpression(child, checkMode));
}
}
- var jsxChildrenPropertyName = getJsxElementChildrenPropertyname();
- if (jsxChildrenPropertyName && jsxChildrenPropertyName !== "") {
- if (attributesTable.has(jsxChildrenPropertyName)) {
+ if (!hasSpreadAnyType && jsxChildrenPropertyName && jsxChildrenPropertyName !== "") {
+ if (explicitlySpecifyChildrenAttribute) {
error(attributes, ts.Diagnostics._0_are_specified_twice_The_attribute_named_0_will_be_overwritten, jsxChildrenPropertyName);
}
var childrenPropSymbol = createSymbol(4 | 134217728, jsxChildrenPropertyName);
@@ -33816,11 +35263,15 @@ var ts;
attributesTable.set(jsxChildrenPropertyName, childrenPropSymbol);
}
}
- return createJsxAttributesType(attributes.symbol, attributesTable);
+ if (hasSpreadAnyType) {
+ return anyType;
+ }
+ var attributeType = createJsxAttributesType(attributes.symbol, attributesTable);
+ return typeToIntersect && attributesTable.size ? getIntersectionType([typeToIntersect, attributeType]) :
+ typeToIntersect ? typeToIntersect : attributeType;
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.flags |= 33554432 | 4194304;
result.objectFlags |= 128;
return result;
}
@@ -33875,7 +35326,18 @@ var ts;
return unknownType;
}
}
- return getUnionType(ts.map(signatures, getReturnTypeOfSignature), true);
+ var instantiatedSignatures = [];
+ for (var _i = 0, signatures_3 = signatures; _i < signatures_3.length; _i++) {
+ var signature = signatures_3[_i];
+ if (signature.typeParameters) {
+ var typeArguments = fillMissingTypeArguments(undefined, signature.typeParameters, 0);
+ instantiatedSignatures.push(getSignatureInstantiation(signature, typeArguments));
+ }
+ else {
+ instantiatedSignatures.push(signature);
+ }
+ }
+ return getUnionType(ts.map(instantiatedSignatures, getReturnTypeOfSignature), true);
}
function getNameFromJsxElementAttributesContainer(nameOfAttribPropContainer) {
var jsxNamespace = getGlobalSymbol(JsxNames.JSX, 1920, undefined);
@@ -33909,6 +35371,20 @@ var ts;
}
return _jsxElementChildrenPropertyName;
}
+ function getApparentTypeOfJsxPropsType(propsType) {
+ if (!propsType) {
+ return undefined;
+ }
+ if (propsType.flags & 131072) {
+ var propsApparentType = [];
+ for (var _i = 0, _a = propsType.types; _i < _a.length; _i++) {
+ var t = _a[_i];
+ propsApparentType.push(getApparentType(t));
+ }
+ return getIntersectionType(propsApparentType);
+ }
+ return getApparentType(propsType);
+ }
function defaultTryGetJsxStatelessFunctionAttributesType(openingLikeElement, elementType, elemInstanceType, elementClassType) {
ts.Debug.assert(!(elementType.flags & 65536));
if (!elementClassType || !isTypeAssignableTo(elemInstanceType, elementClassType)) {
@@ -33918,6 +35394,7 @@ var ts;
if (callSignature !== unknownSignature) {
var callReturnType = callSignature && getReturnTypeOfSignature(callSignature);
var paramType = callReturnType && (callSignature.parameters.length === 0 ? emptyObjectType : getTypeOfSymbol(callSignature.parameters[0]));
+ paramType = getApparentTypeOfJsxPropsType(paramType);
if (callReturnType && isTypeAssignableTo(callReturnType, jsxStatelessElementType)) {
var intrinsicAttributes = getJsxType(JsxNames.IntrinsicAttributes);
if (intrinsicAttributes !== unknownType) {
@@ -33943,6 +35420,7 @@ var ts;
var candidate = candidatesOutArray_1[_i];
var callReturnType = getReturnTypeOfSignature(candidate);
var paramType = callReturnType && (candidate.parameters.length === 0 ? emptyObjectType : getTypeOfSymbol(candidate.parameters[0]));
+ paramType = getApparentTypeOfJsxPropsType(paramType);
if (callReturnType && isTypeAssignableTo(callReturnType, jsxStatelessElementType)) {
var shouldBeCandidate = true;
for (var _a = 0, _b = openingLikeElement.attributes.properties; _a < _b.length; _a++) {
@@ -33988,7 +35466,7 @@ var ts;
else if (elementType.flags & 32) {
var intrinsicElementsType = getJsxType(JsxNames.IntrinsicElements);
if (intrinsicElementsType !== unknownType) {
- var stringLiteralTypeName = elementType.text;
+ var stringLiteralTypeName = elementType.value;
var intrinsicProp = getPropertyOfType(intrinsicElementsType, stringLiteralTypeName);
if (intrinsicProp) {
return getTypeOfSymbol(intrinsicProp);
@@ -34135,7 +35613,7 @@ var ts;
function checkJsxOpeningLikeElement(node) {
checkGrammarJsxElement(node);
checkJsxPreconditions(node);
- var reactRefErr = compilerOptions.jsx === 2 ? ts.Diagnostics.Cannot_find_name_0 : undefined;
+ var reactRefErr = diagnostics && compilerOptions.jsx === 2 ? ts.Diagnostics.Cannot_find_name_0 : undefined;
var reactNamespace = getJsxNamespace();
var reactSym = resolveName(node.tagName, reactNamespace, 107455, reactRefErr, reactNamespace);
if (reactSym) {
@@ -34146,6 +35624,26 @@ var ts;
}
checkJsxAttributesAssignableToTagNameAttributes(node);
}
+ function isKnownProperty(targetType, name, isComparingJsxAttributes) {
+ if (targetType.flags & 32768) {
+ var resolved = resolveStructuredTypeMembers(targetType);
+ if (resolved.stringIndexInfo ||
+ resolved.numberIndexInfo && isNumericLiteralName(name) ||
+ getPropertyOfObjectType(targetType, name) ||
+ isComparingJsxAttributes && !isUnhyphenatedJsxName(name)) {
+ return true;
+ }
+ }
+ else if (targetType.flags & 196608) {
+ for (var _i = 0, _a = targetType.types; _i < _a.length; _i++) {
+ var t = _a[_i];
+ if (isKnownProperty(t, name, isComparingJsxAttributes)) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
function checkJsxAttributesAssignableToTagNameAttributes(openingLikeElement) {
var targetAttributesType = isJsxIntrinsicIdentifier(openingLikeElement.tagName) ?
getIntrinsicAttributesTypeFromJsxOpeningLikeElement(openingLikeElement) :
@@ -34157,7 +35655,16 @@ var ts;
error(openingLikeElement, ts.Diagnostics.JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property, getJsxElementPropertiesName());
}
else {
- checkTypeAssignableTo(sourceAttributesType, targetAttributesType, openingLikeElement.attributes.properties.length > 0 ? openingLikeElement.attributes : openingLikeElement);
+ var isSourceAttributeTypeAssignableToTarget = checkTypeAssignableTo(sourceAttributesType, targetAttributesType, openingLikeElement.attributes.properties.length > 0 ? openingLikeElement.attributes : openingLikeElement);
+ if (isSourceAttributeTypeAssignableToTarget && !isTypeAny(sourceAttributesType) && !isTypeAny(targetAttributesType)) {
+ for (var _i = 0, _a = openingLikeElement.attributes.properties; _i < _a.length; _i++) {
+ var attribute = _a[_i];
+ if (ts.isJsxAttribute(attribute) && !isKnownProperty(targetAttributesType, attribute.name.text, true)) {
+ error(attribute, ts.Diagnostics.Property_0_does_not_exist_on_type_1, attribute.name.text, typeToString(targetAttributesType));
+ break;
+ }
+ }
+ }
}
}
function checkJsxExpression(node, checkMode) {
@@ -34175,36 +35682,18 @@ var ts;
function getDeclarationKindFromSymbol(s) {
return s.valueDeclaration ? s.valueDeclaration.kind : 149;
}
- function getDeclarationModifierFlagsFromSymbol(s) {
- 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 isMethodLike(symbol) {
- return !!(symbol.flags & 8192 || getCheckFlags(symbol) & 4);
+ return !!(symbol.flags & 8192 || ts.getCheckFlags(symbol) & 4);
}
function checkPropertyAccessibility(node, left, type, prop) {
- var flags = getDeclarationModifierFlagsFromSymbol(prop);
+ var flags = ts.getDeclarationModifierFlagsFromSymbol(prop);
var errorNode = node.kind === 179 || node.kind === 226 ?
node.name :
node.right;
- if (getCheckFlags(prop) & 256) {
+ if (ts.getCheckFlags(prop) & 256) {
error(errorNode, ts.Diagnostics.Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1, symbolToString(prop), typeToString(type));
return false;
}
@@ -34279,42 +35768,6 @@ var ts;
function checkQualifiedName(node) {
return checkPropertyAccessExpressionOrQualifiedName(node, node.left, node.right);
}
- function reportNonexistentProperty(propNode, containingType) {
- var errorInfo;
- if (containingType.flags & 65536 && !(containingType.flags & 8190)) {
- for (var _i = 0, _a = containingType.types; _i < _a.length; _i++) {
- var subtype = _a[_i];
- if (!getPropertyOfType(subtype, propNode.text)) {
- errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.Property_0_does_not_exist_on_type_1, ts.declarationNameToString(propNode), typeToString(subtype));
- break;
- }
- }
- }
- errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.Property_0_does_not_exist_on_type_1, ts.declarationNameToString(propNode), typeToString(containingType));
- diagnostics.add(ts.createDiagnosticForNodeFromMessageChain(propNode, errorInfo));
- }
- function markPropertyAsReferenced(prop) {
- if (prop &&
- noUnusedIdentifiers &&
- (prop.flags & 106500) &&
- prop.valueDeclaration && (ts.getModifierFlags(prop.valueDeclaration) & 8)) {
- if (getCheckFlags(prop) & 1) {
- getSymbolLinks(prop).target.isReferenced = true;
- }
- else {
- prop.isReferenced = true;
- }
- }
- }
- function isInPropertyInitializer(node) {
- while (node) {
- if (node.parent && node.parent.kind === 149 && 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) {
@@ -34350,7 +35803,7 @@ var ts;
markPropertyAsReferenced(prop);
getNodeLinks(node).resolvedSymbol = prop;
checkPropertyAccessibility(node, left, apparentType, prop);
- var propType = getTypeOfSymbol(prop);
+ var propType = getDeclaredOrApparentType(prop, node);
var assignmentKind = ts.getAssignmentTargetKind(node);
if (assignmentKind) {
if (isReferenceToReadonlyEntity(node, prop) || isReferenceThroughNamespaceImport(node)) {
@@ -34366,16 +35819,133 @@ var ts;
var flowType = getFlowTypeOfReference(node, propType);
return assignmentKind ? getBaseTypeOfLiteralType(flowType) : flowType;
}
+ function reportNonexistentProperty(propNode, containingType) {
+ var errorInfo;
+ if (containingType.flags & 65536 && !(containingType.flags & 8190)) {
+ for (var _i = 0, _a = containingType.types; _i < _a.length; _i++) {
+ var subtype = _a[_i];
+ if (!getPropertyOfType(subtype, propNode.text)) {
+ errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.Property_0_does_not_exist_on_type_1, ts.declarationNameToString(propNode), typeToString(subtype));
+ break;
+ }
+ }
+ }
+ var suggestion = getSuggestionForNonexistentProperty(propNode, containingType);
+ if (suggestion) {
+ errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2, ts.declarationNameToString(propNode), typeToString(containingType), suggestion);
+ }
+ else {
+ errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.Property_0_does_not_exist_on_type_1, ts.declarationNameToString(propNode), typeToString(containingType));
+ }
+ diagnostics.add(ts.createDiagnosticForNodeFromMessageChain(propNode, errorInfo));
+ }
+ function getSuggestionForNonexistentProperty(node, containingType) {
+ var suggestion = getSpellingSuggestionForName(node.text, getPropertiesOfObjectType(containingType), 107455);
+ return suggestion && suggestion.name;
+ }
+ function getSuggestionForNonexistentSymbol(location, name, meaning) {
+ var result = resolveNameHelper(location, name, meaning, undefined, name, function (symbols, name, meaning) {
+ var symbol = getSymbol(symbols, name, meaning);
+ if (symbol) {
+ return symbol;
+ }
+ return getSpellingSuggestionForName(name, ts.arrayFrom(symbols.values()), meaning);
+ });
+ if (result) {
+ return result.name;
+ }
+ }
+ function getSpellingSuggestionForName(name, symbols, meaning) {
+ var worstDistance = name.length * 0.4;
+ var maximumLengthDifference = Math.min(3, name.length * 0.34);
+ var bestDistance = Number.MAX_VALUE;
+ var bestCandidate = undefined;
+ var justCheckExactMatches = false;
+ if (name.length > 30) {
+ return undefined;
+ }
+ name = name.toLowerCase();
+ for (var _i = 0, symbols_3 = symbols; _i < symbols_3.length; _i++) {
+ var candidate = symbols_3[_i];
+ if (candidate.flags & meaning &&
+ candidate.name &&
+ Math.abs(candidate.name.length - name.length) < maximumLengthDifference) {
+ var candidateName = candidate.name.toLowerCase();
+ if (candidateName === name) {
+ return candidate;
+ }
+ if (justCheckExactMatches) {
+ continue;
+ }
+ if (candidateName.length < 3 ||
+ name.length < 3 ||
+ candidateName === "eval" ||
+ candidateName === "intl" ||
+ candidateName === "undefined" ||
+ candidateName === "map" ||
+ candidateName === "nan" ||
+ candidateName === "set") {
+ continue;
+ }
+ var distance = ts.levenshtein(name, candidateName);
+ if (distance > worstDistance) {
+ continue;
+ }
+ if (distance < 3) {
+ justCheckExactMatches = true;
+ bestCandidate = candidate;
+ }
+ else if (distance < bestDistance) {
+ bestDistance = distance;
+ bestCandidate = candidate;
+ }
+ }
+ }
+ return bestCandidate;
+ }
+ function markPropertyAsReferenced(prop) {
+ if (prop &&
+ noUnusedIdentifiers &&
+ (prop.flags & 106500) &&
+ prop.valueDeclaration && (ts.getModifierFlags(prop.valueDeclaration) & 8)) {
+ if (ts.getCheckFlags(prop) & 1) {
+ getSymbolLinks(prop).target.isReferenced = true;
+ }
+ else {
+ prop.isReferenced = true;
+ }
+ }
+ }
+ function isInPropertyInitializer(node) {
+ while (node) {
+ if (node.parent && node.parent.kind === 149 && node.parent.initializer === node) {
+ return true;
+ }
+ node = node.parent;
+ }
+ return false;
+ }
function isValidPropertyAccess(node, propertyName) {
var left = node.kind === 179
? node.expression
: node.left;
- var type = checkExpression(left);
+ return isValidPropertyAccessWithType(node, left, propertyName, getWidenedType(checkExpression(left)));
+ }
+ function isValidPropertyAccessWithType(node, left, propertyName, type) {
if (type !== unknownType && !isTypeAny(type)) {
- var prop = getPropertyOfType(getWidenedType(type), propertyName);
+ var prop = getPropertyOfType(type, propertyName);
if (prop) {
return checkPropertyAccessibility(node, left, type, prop);
}
+ if (ts.isInJavaScriptFile(left) && (type.flags & 65536)) {
+ for (var _i = 0, _a = type.types; _i < _a.length; _i++) {
+ var elementType = _a[_i];
+ if (isValidPropertyAccessWithType(node, left, propertyName, elementType)) {
+ return true;
+ }
+ }
+ }
+ return false;
}
return true;
}
@@ -34473,7 +36043,13 @@ var ts;
}
return true;
}
+ function callLikeExpressionMayHaveTypeArguments(node) {
+ return ts.isCallOrNewExpression(node);
+ }
function resolveUntypedCall(node) {
+ if (callLikeExpressionMayHaveTypeArguments(node)) {
+ ts.forEach(node.typeArguments, checkSourceElement);
+ }
if (node.kind === 183) {
checkExpression(node.template);
}
@@ -34496,8 +36072,8 @@ var ts;
var specializedIndex = -1;
var spliceIndex;
ts.Debug.assert(!result.length);
- for (var _i = 0, signatures_3 = signatures; _i < signatures_3.length; _i++) {
- var signature = signatures_3[_i];
+ for (var _i = 0, signatures_4 = signatures; _i < signatures_4.length; _i++) {
+ var signature = signatures_4[_i];
var symbol = signature.declaration && getSymbolOfNode(signature.declaration);
var parent = signature.declaration && signature.declaration.parent;
if (!lastSymbol || symbol === lastSymbol) {
@@ -34584,7 +36160,7 @@ var ts;
return false;
}
if (spreadArgIndex >= 0) {
- return isRestParameterIndex(signature, spreadArgIndex);
+ return isRestParameterIndex(signature, spreadArgIndex) || spreadArgIndex >= signature.minArgumentCount;
}
if (!signature.hasRestParameter && argCount > signature.parameters.length) {
return false;
@@ -34603,28 +36179,39 @@ var ts;
return undefined;
}
function instantiateSignatureInContextOf(signature, contextualSignature, contextualMapper) {
- var context = createInferenceContext(signature, true, false);
+ var context = createInferenceContext(signature, 1);
forEachMatchingParameterType(contextualSignature, signature, function (source, target) {
- inferTypesWithContext(context, instantiateType(source, contextualMapper), target);
+ inferTypes(context.inferences, instantiateType(source, contextualMapper || identityMapper), target);
});
+ if (!contextualMapper) {
+ inferTypes(context.inferences, getReturnTypeOfSignature(contextualSignature), getReturnTypeOfSignature(signature), 4);
+ }
return getSignatureInstantiation(signature, getInferredTypes(context));
}
function inferTypeArguments(node, signature, args, excludeArgument, context) {
- var typeParameters = signature.typeParameters;
- var inferenceMapper = getInferenceMapper(context);
- for (var i = 0; i < typeParameters.length; i++) {
- if (!context.inferences[i].isFixed) {
- context.inferredTypes[i] = undefined;
+ var inferences = context.inferences;
+ for (var i = 0; i < inferences.length; i++) {
+ if (!inferences[i].isFixed) {
+ inferences[i].inferredType = undefined;
}
}
- if (context.failedTypeParameterIndex !== undefined && !context.inferences[context.failedTypeParameterIndex].isFixed) {
- context.failedTypeParameterIndex = undefined;
+ if (ts.isExpression(node)) {
+ var contextualType = getContextualType(node);
+ if (contextualType) {
+ var instantiatedType = instantiateType(contextualType, cloneTypeMapper(getContextualMapper(node)));
+ var contextualSignature = getSingleCallSignature(instantiatedType);
+ var inferenceSourceType = contextualSignature && contextualSignature.typeParameters ?
+ getOrCreateTypeFromSignature(getSignatureInstantiation(contextualSignature, contextualSignature.typeParameters)) :
+ instantiatedType;
+ var inferenceTargetType = getReturnTypeOfSignature(signature);
+ inferTypes(context.inferences, inferenceSourceType, inferenceTargetType, 4);
+ }
}
var thisType = getThisTypeOfSignature(signature);
if (thisType) {
var thisArgumentNode = getThisArgumentOfCall(node);
var thisArgumentType = thisArgumentNode ? checkExpression(thisArgumentNode) : voidType;
- inferTypesWithContext(context, thisArgumentType, thisType);
+ inferTypes(context.inferences, thisArgumentType, thisType);
}
var argCount = getEffectiveArgumentCount(node, args, signature);
for (var i = 0; i < argCount; i++) {
@@ -34633,10 +36220,10 @@ var ts;
var paramType = getTypeAtPosition(signature, i);
var argType = getEffectiveArgumentType(node, i);
if (argType === undefined) {
- var mapper = excludeArgument && excludeArgument[i] !== undefined ? identityMapper : inferenceMapper;
+ var mapper = excludeArgument && excludeArgument[i] !== undefined ? identityMapper : context;
argType = checkExpressionWithContextualType(arg, paramType, mapper);
}
- inferTypesWithContext(context, argType, paramType);
+ inferTypes(context.inferences, argType, paramType);
}
}
if (excludeArgument) {
@@ -34644,11 +36231,11 @@ var ts;
if (excludeArgument[i] === false) {
var arg = args[i];
var paramType = getTypeAtPosition(signature, i);
- inferTypesWithContext(context, checkExpressionWithContextualType(arg, paramType, inferenceMapper), paramType);
+ inferTypes(context.inferences, checkExpressionWithContextualType(arg, paramType, context), paramType);
}
}
}
- getInferredTypes(context);
+ return getInferredTypes(context);
}
function checkTypeArguments(signature, typeArgumentNodes, typeArgumentTypes, reportErrors, headMessage) {
var typeParameters = signature.typeParameters;
@@ -34820,7 +36407,7 @@ var ts;
case 71:
case 8:
case 9:
- return getLiteralTypeForText(32, element.name.text);
+ return getLiteralType(element.name.text);
case 144:
var nameType = checkComputedPropertyName(element.name);
if (isTypeOfKind(nameType, 512)) {
@@ -34898,7 +36485,7 @@ var ts;
return arg;
}
}
- function resolveCall(node, signatures, candidatesOutArray, headMessage) {
+ function resolveCall(node, signatures, candidatesOutArray, fallbackError) {
var isTaggedTemplate = node.kind === 183;
var isDecorator = node.kind === 147;
var isJsxOpeningOrSelfClosingElement = ts.isJsxOpeningLikeElement(node);
@@ -34909,24 +36496,10 @@ var ts;
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) {
- reportError(ts.Diagnostics.Supplied_parameters_do_not_match_any_signature_of_call_target);
+ diagnostics.add(ts.createDiagnosticForNode(node, ts.Diagnostics.Call_target_does_not_contain_any_signatures));
return resolveErrorCall(node);
}
var args = getEffectiveCallArguments(node);
@@ -34943,16 +36516,12 @@ var ts;
}
var candidateForArgumentError;
var candidateForTypeArgumentError;
- var resultOfFailedInference;
var result;
var signatureHelpTrailingComma = candidatesOutArray && node.kind === 181 && node.arguments.hasTrailingComma;
if (candidates.length > 1) {
result = chooseOverload(candidates, subtypeRelation, signatureHelpTrailingComma);
}
if (!result) {
- candidateForArgumentError = undefined;
- candidateForTypeArgumentError = undefined;
- resultOfFailedInference = undefined;
result = chooseOverload(candidates, assignableRelation, signatureHelpTrailingComma);
}
if (result) {
@@ -34965,27 +36534,46 @@ var ts;
checkApplicableSignature(node, args, candidateForArgumentError, assignableRelation, undefined, true);
}
else if (candidateForTypeArgumentError) {
- if (!isTaggedTemplate && !isDecorator && typeArguments) {
- var typeArguments_2 = node.typeArguments;
- checkTypeArguments(candidateForTypeArgumentError, typeArguments_2, ts.map(typeArguments_2, getTypeFromTypeNode), true, headMessage);
- }
- else {
- ts.Debug.assert(resultOfFailedInference.failedTypeParameterIndex >= 0);
- var failedTypeParameter = candidateForTypeArgumentError.typeParameters[resultOfFailedInference.failedTypeParameterIndex];
- var inferenceCandidates = getInferenceCandidates(resultOfFailedInference, resultOfFailedInference.failedTypeParameterIndex);
- var diagnosticChainHead = ts.chainDiagnosticMessages(undefined, ts.Diagnostics.The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_type_arguments_explicitly, typeToString(failedTypeParameter));
- if (headMessage) {
- diagnosticChainHead = ts.chainDiagnosticMessages(diagnosticChainHead, headMessage);
- }
- reportNoCommonSupertypeError(inferenceCandidates, node.tagName || node.expression || node.tag, diagnosticChainHead);
- }
- }
- else {
- reportError(ts.Diagnostics.Supplied_parameters_do_not_match_any_signature_of_call_target);
+ var typeArguments_1 = node.typeArguments;
+ checkTypeArguments(candidateForTypeArgumentError, typeArguments_1, ts.map(typeArguments_1, getTypeFromTypeNode), true, fallbackError);
+ }
+ else if (typeArguments && ts.every(signatures, function (sig) { return ts.length(sig.typeParameters) !== typeArguments.length; })) {
+ var min = Number.POSITIVE_INFINITY;
+ var max = Number.NEGATIVE_INFINITY;
+ for (var _i = 0, signatures_5 = signatures; _i < signatures_5.length; _i++) {
+ var sig = signatures_5[_i];
+ min = Math.min(min, getMinTypeArgumentCount(sig.typeParameters));
+ max = Math.max(max, ts.length(sig.typeParameters));
+ }
+ var paramCount = min < max ? min + "-" + max : min;
+ diagnostics.add(ts.createDiagnosticForNode(node, ts.Diagnostics.Expected_0_type_arguments_but_got_1, paramCount, typeArguments.length));
+ }
+ else if (args) {
+ var min = Number.POSITIVE_INFINITY;
+ var max = Number.NEGATIVE_INFINITY;
+ for (var _a = 0, signatures_6 = signatures; _a < signatures_6.length; _a++) {
+ var sig = signatures_6[_a];
+ min = Math.min(min, sig.minArgumentCount);
+ max = Math.max(max, sig.parameters.length);
+ }
+ var hasRestParameter_1 = ts.some(signatures, function (sig) { return sig.hasRestParameter; });
+ var hasSpreadArgument = getSpreadArgumentIndex(args) > -1;
+ var paramCount = hasRestParameter_1 ? min :
+ min < max ? min + "-" + max :
+ min;
+ var argCount = args.length - (hasSpreadArgument ? 1 : 0);
+ var error_1 = hasRestParameter_1 && hasSpreadArgument ? ts.Diagnostics.Expected_at_least_0_arguments_but_got_a_minimum_of_1 :
+ hasRestParameter_1 ? ts.Diagnostics.Expected_at_least_0_arguments_but_got_1 :
+ hasSpreadArgument ? ts.Diagnostics.Expected_0_arguments_but_got_a_minimum_of_1 :
+ ts.Diagnostics.Expected_0_arguments_but_got_1;
+ diagnostics.add(ts.createDiagnosticForNode(node, error_1, paramCount, argCount));
+ }
+ else if (fallbackError) {
+ diagnostics.add(ts.createDiagnosticForNode(node, fallbackError));
}
if (!produceDiagnostics) {
- for (var _i = 0, candidates_1 = candidates; _i < candidates_1.length; _i++) {
- var candidate = candidates_1[_i];
+ for (var _b = 0, candidates_1 = candidates; _b < candidates_1.length; _b++) {
+ var candidate = candidates_1[_b];
if (hasCorrectArity(node, args, candidate)) {
if (candidate.typeParameters && typeArguments) {
candidate = getSignatureInstantiation(candidate, ts.map(typeArguments, getTypeFromTypeNode));
@@ -34995,45 +36583,37 @@ var ts;
}
}
return resolveErrorCall(node);
- function reportError(message, arg0, arg1, arg2) {
- var errorInfo;
- errorInfo = ts.chainDiagnosticMessages(errorInfo, message, arg0, arg1, arg2);
- if (headMessage) {
- errorInfo = ts.chainDiagnosticMessages(errorInfo, headMessage);
- }
- diagnostics.add(ts.createDiagnosticForNodeFromMessageChain(node, errorInfo));
- }
function chooseOverload(candidates, relation, signatureHelpTrailingComma) {
if (signatureHelpTrailingComma === void 0) { signatureHelpTrailingComma = false; }
+ candidateForArgumentError = undefined;
+ candidateForTypeArgumentError = undefined;
for (var _i = 0, candidates_2 = candidates; _i < candidates_2.length; _i++) {
var originalCandidate = candidates_2[_i];
if (!hasCorrectArity(node, args, originalCandidate, signatureHelpTrailingComma)) {
continue;
}
var candidate = void 0;
- var typeArgumentsAreValid = void 0;
- var inferenceContext = originalCandidate.typeParameters
- ? createInferenceContext(originalCandidate, false, ts.isInJavaScriptFile(node))
- : undefined;
+ var inferenceContext = originalCandidate.typeParameters ?
+ createInferenceContext(originalCandidate, ts.isInJavaScriptFile(node) ? 4 : 0) :
+ undefined;
while (true) {
candidate = originalCandidate;
if (candidate.typeParameters) {
var typeArgumentTypes = void 0;
if (typeArguments) {
typeArgumentTypes = fillMissingTypeArguments(ts.map(typeArguments, getTypeFromTypeNode), candidate.typeParameters, getMinTypeArgumentCount(candidate.typeParameters));
- typeArgumentsAreValid = checkTypeArguments(candidate, typeArguments, typeArgumentTypes, false);
+ if (!checkTypeArguments(candidate, typeArguments, typeArgumentTypes, false)) {
+ candidateForTypeArgumentError = originalCandidate;
+ break;
+ }
}
else {
- inferTypeArguments(node, candidate, args, excludeArgument, inferenceContext);
- typeArgumentTypes = inferenceContext.inferredTypes;
- typeArgumentsAreValid = inferenceContext.failedTypeParameterIndex === undefined;
- }
- if (!typeArgumentsAreValid) {
- break;
+ typeArgumentTypes = inferTypeArguments(node, candidate, args, excludeArgument, inferenceContext);
}
candidate = getSignatureInstantiation(candidate, typeArgumentTypes);
}
if (!checkApplicableSignature(node, args, candidate, relation, excludeArgument, false)) {
+ candidateForArgumentError = candidate;
break;
}
var index = excludeArgument ? ts.indexOf(excludeArgument, true) : -1;
@@ -35042,22 +36622,6 @@ var ts;
}
excludeArgument[index] = false;
}
- if (originalCandidate.typeParameters) {
- var instantiatedCandidate = candidate;
- if (typeArgumentsAreValid) {
- candidateForArgumentError = instantiatedCandidate;
- }
- else {
- candidateForTypeArgumentError = originalCandidate;
- if (!typeArguments) {
- resultOfFailedInference = inferenceContext;
- }
- }
- }
- else {
- ts.Debug.assert(originalCandidate === candidate);
- candidateForArgumentError = originalCandidate;
- }
}
return undefined;
}
@@ -35133,7 +36697,7 @@ var ts;
}
var valueDecl = expressionType.symbol && getClassLikeDeclarationOfSymbol(expressionType.symbol);
if (valueDecl && ts.getModifierFlags(valueDecl) & 128) {
- error(node, ts.Diagnostics.Cannot_create_an_instance_of_the_abstract_class_0, ts.declarationNameToString(valueDecl.name));
+ error(node, ts.Diagnostics.Cannot_create_an_instance_of_the_abstract_class_0, ts.declarationNameToString(ts.getNameOfDeclaration(valueDecl)));
return resolveErrorCall(node);
}
if (isTypeAny(expressionType)) {
@@ -35152,7 +36716,7 @@ var ts;
var callSignatures = getSignaturesOfType(expressionType, 0);
if (callSignatures.length) {
var signature = resolveCall(node, callSignatures, candidatesOutArray);
- if (getReturnTypeOfSignature(signature) !== voidType) {
+ if (!isJavaScriptConstructor(signature.declaration) && getReturnTypeOfSignature(signature) !== voidType) {
error(node, ts.Diagnostics.Only_a_void_function_can_be_called_with_the_new_keyword);
}
if (getThisTypeOfSignature(signature) === voidType) {
@@ -35260,8 +36824,8 @@ var ts;
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];
+ for (var _i = 0, types_16 = types; _i < types_16.length; _i++) {
+ var type = types_16[_i];
result = result || resolveStatelessJsxOpeningLikeElement(openingLikeElement, type, candidatesOutArray);
}
return result;
@@ -35304,13 +36868,29 @@ var ts;
function getResolvedOrAnySignature(node) {
return getNodeLinks(node).resolvedSignature === resolvingSignature ? resolvingSignature : getResolvedSignature(node);
}
+ function isJavaScriptConstructor(node) {
+ if (ts.isInJavaScriptFile(node)) {
+ if (ts.getJSDocClassTag(node))
+ return true;
+ var symbol = ts.isFunctionDeclaration(node) || ts.isFunctionExpression(node) ? getSymbolOfNode(node) :
+ ts.isVariableDeclaration(node) && ts.isFunctionExpression(node.initializer) ? getSymbolOfNode(node.initializer) :
+ undefined;
+ return symbol && symbol.members !== undefined;
+ }
+ return false;
+ }
function getInferredClassType(symbol) {
var links = getSymbolLinks(symbol);
if (!links.inferredClassType) {
- links.inferredClassType = createAnonymousType(symbol, symbol.members, emptyArray, emptyArray, undefined, undefined);
+ links.inferredClassType = createAnonymousType(symbol, symbol.members || emptySymbols, emptyArray, emptyArray, undefined, undefined);
}
return links.inferredClassType;
}
+ function isInferredClassType(type) {
+ return type.symbol
+ && getObjectFlags(type) & 16
+ && getSymbolLinks(type.symbol).inferredClassType === type;
+ }
function checkCallExpression(node) {
checkGrammarTypeArguments(node, node.typeArguments) || checkGrammarArguments(node, node.arguments);
var signature = getResolvedSignature(node);
@@ -35330,7 +36910,7 @@ var ts;
if (funcSymbol && ts.isDeclarationOfFunctionOrClassExpression(funcSymbol)) {
funcSymbol = getSymbolOfNode(funcSymbol.valueDeclaration.initializer);
}
- if (funcSymbol && funcSymbol.members && funcSymbol.flags & 16) {
+ if (funcSymbol && funcSymbol.flags & 16 && (funcSymbol.members || ts.getJSDocClassTag(funcSymbol.valueDeclaration))) {
return getInferredClassType(funcSymbol);
}
else if (noImplicitAny) {
@@ -35344,6 +36924,28 @@ var ts;
}
return getReturnTypeOfSignature(signature);
}
+ function checkImportCallExpression(node) {
+ checkGrammarArguments(node, node.arguments) || checkGrammarImportCallExpression(node);
+ if (node.arguments.length === 0) {
+ return createPromiseReturnType(node, anyType);
+ }
+ var specifier = node.arguments[0];
+ var specifierType = checkExpressionCached(specifier);
+ for (var i = 1; i < node.arguments.length; ++i) {
+ checkExpressionCached(node.arguments[i]);
+ }
+ if (specifierType.flags & 2048 || specifierType.flags & 4096 || !isTypeAssignableTo(specifierType, stringType)) {
+ error(specifier, ts.Diagnostics.Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0, typeToString(specifierType));
+ }
+ var moduleSymbol = resolveExternalModuleName(node, specifier);
+ if (moduleSymbol) {
+ var esModuleSymbol = resolveESModuleSymbol(moduleSymbol, specifier, true);
+ if (esModuleSymbol) {
+ return createPromiseReturnType(node, getTypeOfSymbol(esModuleSymbol));
+ }
+ }
+ return createPromiseReturnType(node, anyType);
+ }
function isCommonJsRequire(node) {
if (!ts.isRequireCall(node, true)) {
return false;
@@ -35405,7 +37007,7 @@ var ts;
if (strictNullChecks) {
var declaration = symbol.valueDeclaration;
if (declaration && declaration.initializer) {
- return includeFalsyTypes(type, 2048);
+ return getNullableType(type, 2048);
}
}
return type;
@@ -35418,37 +37020,42 @@ var ts;
function getTypeOfFirstParameterOfSignature(signature) {
return signature.parameters.length > 0 ? getTypeAtPosition(signature, 0) : neverType;
}
- function assignContextualParameterTypes(signature, context, mapper, checkMode) {
+ function inferFromAnnotatedParameters(signature, context, mapper) {
var len = signature.parameters.length - (signature.hasRestParameter ? 1 : 0);
- if (checkMode === 2) {
- for (var i = 0; i < len; i++) {
- var declaration = signature.parameters[i].valueDeclaration;
- if (declaration.type) {
- inferTypesWithContext(mapper.context, getTypeFromTypeNode(declaration.type), getTypeAtPosition(context, i));
+ for (var i = 0; i < len; i++) {
+ var declaration = signature.parameters[i].valueDeclaration;
+ if (declaration.type) {
+ var typeNode = ts.getEffectiveTypeAnnotationNode(declaration);
+ if (typeNode) {
+ inferTypes(mapper.inferences, getTypeFromTypeNode(typeNode), getTypeAtPosition(context, i));
}
}
}
+ }
+ function assignContextualParameterTypes(signature, context) {
+ signature.typeParameters = context.typeParameters;
if (context.thisParameter) {
var parameter = signature.thisParameter;
if (!parameter || parameter.valueDeclaration && !parameter.valueDeclaration.type) {
if (!parameter) {
signature.thisParameter = createSymbolWithType(context.thisParameter, undefined);
}
- assignTypeToParameterAndFixTypeParameters(signature.thisParameter, getTypeOfSymbol(context.thisParameter), mapper, checkMode);
+ assignTypeToParameterAndFixTypeParameters(signature.thisParameter, getTypeOfSymbol(context.thisParameter));
}
}
+ var len = signature.parameters.length - (signature.hasRestParameter ? 1 : 0);
for (var i = 0; i < len; i++) {
var parameter = signature.parameters[i];
- if (!parameter.valueDeclaration.type) {
+ if (!ts.getEffectiveTypeAnnotationNode(parameter.valueDeclaration)) {
var contextualParameterType = getTypeAtPosition(context, i);
- assignTypeToParameterAndFixTypeParameters(parameter, contextualParameterType, mapper, checkMode);
+ assignTypeToParameterAndFixTypeParameters(parameter, contextualParameterType);
}
}
if (signature.hasRestParameter && isRestParameterIndex(context, signature.parameters.length - 1)) {
var parameter = ts.lastOrUndefined(signature.parameters);
- if (!parameter.valueDeclaration.type) {
+ if (!ts.getEffectiveTypeAnnotationNode(parameter.valueDeclaration)) {
var contextualParameterType = getTypeOfSymbol(ts.lastOrUndefined(context.parameters));
- assignTypeToParameterAndFixTypeParameters(parameter, contextualParameterType, mapper, checkMode);
+ assignTypeToParameterAndFixTypeParameters(parameter, contextualParameterType);
}
}
}
@@ -35465,27 +37072,17 @@ var ts;
}
}
}
- function assignTypeToParameterAndFixTypeParameters(parameter, contextualType, mapper, checkMode) {
+ function assignTypeToParameterAndFixTypeParameters(parameter, contextualType) {
var links = getSymbolLinks(parameter);
if (!links.type) {
- links.type = instantiateType(contextualType, mapper);
+ links.type = contextualType;
+ var name = ts.getNameOfDeclaration(parameter.valueDeclaration);
if (links.type === emptyObjectType &&
- (parameter.valueDeclaration.name.kind === 174 ||
- parameter.valueDeclaration.name.kind === 175)) {
- links.type = getTypeFromBindingPattern(parameter.valueDeclaration.name);
+ (name.kind === 174 || name.kind === 175)) {
+ links.type = getTypeFromBindingPattern(name);
}
assignBindingElementTypes(parameter.valueDeclaration);
}
- else if (checkMode === 2) {
- inferTypesWithContext(mapper.context, links.type, instantiateType(contextualType, mapper));
- }
- }
- function getReturnTypeFromJSDocComment(func) {
- var returnTag = ts.getJSDocReturnTag(func);
- if (returnTag && returnTag.typeExpression) {
- return getTypeFromTypeNode(returnTag.typeExpression.type);
- }
- return undefined;
}
function createPromiseType(promisedType) {
var globalPromiseType = getGlobalPromiseType(true);
@@ -35498,11 +37095,15 @@ var ts;
function createPromiseReturnType(func, promisedType) {
var promiseType = createPromiseType(promisedType);
if (promiseType === emptyObjectType) {
- 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);
+ error(func, ts.isImportCall(func) ?
+ ts.Diagnostics.A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option :
+ 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);
+ error(func, ts.isImportCall(func) ?
+ ts.Diagnostics.A_dynamic_import_call_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option :
+ 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;
}
@@ -35658,13 +37259,13 @@ var ts;
}
var hasExplicitReturn = func.flags & 256;
if (returnType && returnType.flags & 8192) {
- error(func.type, ts.Diagnostics.A_function_returning_never_cannot_have_a_reachable_end_point);
+ error(ts.getEffectiveReturnTypeNode(func), ts.Diagnostics.A_function_returning_never_cannot_have_a_reachable_end_point);
}
else if (returnType && !hasExplicitReturn) {
- error(func.type, ts.Diagnostics.A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value);
+ error(ts.getEffectiveReturnTypeNode(func), ts.Diagnostics.A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value);
}
else if (returnType && strictNullChecks && !isTypeAssignableTo(undefinedType, returnType)) {
- error(func.type, ts.Diagnostics.Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined);
+ error(ts.getEffectiveReturnTypeNode(func), ts.Diagnostics.Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined);
}
else if (compilerOptions.noImplicitReturns) {
if (!returnType) {
@@ -35676,7 +37277,7 @@ var ts;
return;
}
}
- error(func.type || func, ts.Diagnostics.Not_all_code_paths_return_a_value);
+ error(ts.getEffectiveReturnTypeNode(func) || func, ts.Diagnostics.Not_all_code_paths_return_a_value);
}
}
function checkFunctionExpressionOrObjectLiteralMethod(node, checkMode) {
@@ -35691,29 +37292,30 @@ var ts;
}
var links = getNodeLinks(node);
var type = getTypeOfSymbol(node.symbol);
- var contextSensitive = isContextSensitive(node);
- var mightFixTypeParameters = contextSensitive && checkMode === 2;
- if (mightFixTypeParameters || !(links.flags & 1024)) {
+ if (!(links.flags & 1024)) {
var contextualSignature = getContextualSignature(node);
- var contextChecked = !!(links.flags & 1024);
- if (mightFixTypeParameters || !contextChecked) {
+ if (!(links.flags & 1024)) {
links.flags |= 1024;
if (contextualSignature) {
var signature = getSignaturesOfType(type, 0)[0];
- if (contextSensitive) {
- assignContextualParameterTypes(signature, contextualSignature, getContextualMapper(node), checkMode);
+ if (isContextSensitive(node)) {
+ var contextualMapper = getContextualMapper(node);
+ if (checkMode === 2) {
+ inferFromAnnotatedParameters(signature, contextualSignature, contextualMapper);
+ }
+ var instantiatedContextualSignature = contextualMapper === identityMapper ?
+ contextualSignature : instantiateSignature(contextualSignature, contextualMapper);
+ assignContextualParameterTypes(signature, instantiatedContextualSignature);
}
- if (mightFixTypeParameters || !node.type && !signature.resolvedReturnType) {
+ if (!ts.getEffectiveReturnTypeNode(node) && !signature.resolvedReturnType) {
var returnType = getReturnTypeFromBody(node, checkMode);
if (!signature.resolvedReturnType) {
signature.resolvedReturnType = returnType;
}
}
}
- if (!contextChecked) {
- checkSignatureDeclaration(node);
- checkNodeDeferred(node);
- }
+ checkSignatureDeclaration(node);
+ checkNodeDeferred(node);
}
}
if (produceDiagnostics && node.kind !== 151) {
@@ -35726,15 +37328,16 @@ var ts;
function checkFunctionExpressionOrObjectLiteralMethodDeferred(node) {
ts.Debug.assert(node.kind !== 151 || ts.isObjectLiteralMethod(node));
var functionFlags = ts.getFunctionFlags(node);
- var returnOrPromisedType = node.type &&
+ var returnTypeNode = ts.getEffectiveReturnTypeNode(node);
+ var returnOrPromisedType = returnTypeNode &&
((functionFlags & 3) === 2 ?
checkAsyncFunctionReturnType(node) :
- getTypeFromTypeNode(node.type));
+ getTypeFromTypeNode(returnTypeNode));
if ((functionFlags & 1) === 0) {
checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnOrPromisedType);
}
if (node.body) {
- if (!node.type) {
+ if (!returnTypeNode) {
getReturnTypeOfSignature(getSignatureFromDeclaration(node));
}
if (node.body.kind === 207) {
@@ -35756,15 +37359,15 @@ var ts;
}
}
function checkArithmeticOperandType(operand, type, diagnostic) {
- if (!isTypeAnyOrAllConstituentTypesHaveKind(type, 340)) {
+ if (!isTypeAnyOrAllConstituentTypesHaveKind(type, 84)) {
error(operand, diagnostic);
return false;
}
return true;
}
function isReadonlySymbol(symbol) {
- return !!(getCheckFlags(symbol) & 8 ||
- symbol.flags & 4 && getDeclarationModifierFlagsFromSymbol(symbol) & 64 ||
+ return !!(ts.getCheckFlags(symbol) & 8 ||
+ symbol.flags & 4 && ts.getDeclarationModifierFlagsFromSymbol(symbol) & 64 ||
symbol.flags & 3 && getDeclarationNodeFlagsFromSymbol(symbol) & 2 ||
symbol.flags & 98304 && !(symbol.flags & 65536) ||
symbol.flags & 8);
@@ -35775,8 +37378,9 @@ var ts;
(expr.kind === 179 || expr.kind === 180) &&
expr.expression.kind === 99) {
var func = ts.getContainingFunction(expr);
- if (!(func && func.kind === 152))
+ if (!(func && func.kind === 152)) {
return true;
+ }
return !(func.parent === symbol.valueDeclaration.parent || func === symbol.valueDeclaration.parent);
}
return true;
@@ -35797,7 +37401,7 @@ var ts;
return false;
}
function checkReferenceExpression(expr, invalidReferenceMessage) {
- var node = ts.skipParentheses(expr);
+ var node = ts.skipOuterExpressions(expr, 2 | 1);
if (node.kind !== 71 && node.kind !== 179 && node.kind !== 180) {
error(expr, invalidReferenceMessage);
return false;
@@ -35844,7 +37448,7 @@ var ts;
return silentNeverType;
}
if (node.operator === 38 && node.operand.kind === 8) {
- return getFreshTypeOfLiteralType(getLiteralTypeForText(64, "" + -node.operand.text));
+ return getFreshTypeOfLiteralType(getLiteralType(-node.operand.text));
}
switch (node.operator) {
case 37:
@@ -35887,8 +37491,8 @@ var ts;
}
if (type.flags & 196608) {
var types = type.types;
- for (var _i = 0, types_19 = types; _i < types_19.length; _i++) {
- var t = types_19[_i];
+ for (var _i = 0, types_17 = types; _i < types_17.length; _i++) {
+ var t = types_17[_i];
if (maybeTypeOfKind(t, kind)) {
return true;
}
@@ -35902,8 +37506,8 @@ var ts;
}
if (type.flags & 65536) {
var types = type.types;
- for (var _i = 0, types_20 = types; _i < types_20.length; _i++) {
- var t = types_20[_i];
+ for (var _i = 0, types_18 = types; _i < types_18.length; _i++) {
+ var t = types_18[_i];
if (!isTypeOfKind(t, kind)) {
return false;
}
@@ -35912,8 +37516,8 @@ var ts;
}
if (type.flags & 131072) {
var types = type.types;
- for (var _a = 0, types_21 = types; _a < types_21.length; _a++) {
- var t = types_21[_a];
+ for (var _a = 0, types_19 = types; _a < types_19.length; _a++) {
+ var t = types_19[_a];
if (isTypeOfKind(t, kind)) {
return true;
}
@@ -35948,7 +37552,7 @@ var ts;
}
leftType = checkNonNullType(leftType, left);
rightType = checkNonNullType(rightType, right);
- if (!(isTypeComparableTo(leftType, stringType) || isTypeOfKind(leftType, 340 | 512))) {
+ if (!(isTypeComparableTo(leftType, stringType) || isTypeOfKind(leftType, 84 | 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 | 540672 | 16777216)) {
@@ -36220,7 +37824,7 @@ var ts;
rightType = checkNonNullType(rightType, right);
}
var resultType = void 0;
- if (isTypeOfKind(leftType, 340) && isTypeOfKind(rightType, 340)) {
+ if (isTypeOfKind(leftType, 84) && isTypeOfKind(rightType, 84)) {
resultType = numberType;
}
else {
@@ -36274,7 +37878,7 @@ var ts;
return checkInExpression(left, right, leftType, rightType);
case 53:
return getTypeFacts(leftType) & 1048576 ?
- includeFalsyTypes(rightType, getFalsyFlags(strictNullChecks ? leftType : getBaseTypeOfLiteralType(rightType))) :
+ getUnionType([extractDefinitelyFalsyTypes(strictNullChecks ? leftType : getBaseTypeOfLiteralType(rightType)), rightType]) :
leftType;
case 54:
return getTypeFacts(leftType) & 2097152 ?
@@ -36318,7 +37922,7 @@ var ts;
}
}
function checkAssignmentOperator(valueType) {
- if (produceDiagnostics && operator >= 58 && operator <= 70) {
+ if (produceDiagnostics && ts.isAssignmentOperator(operator)) {
if (checkReferenceExpression(left, ts.Diagnostics.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access)) {
checkTypeAssignableTo(valueType, leftType, left, undefined);
}
@@ -36356,12 +37960,12 @@ var ts;
var func = ts.getContainingFunction(node);
var functionFlags = func && ts.getFunctionFlags(func);
if (node.asteriskToken) {
- if (functionFlags & 2) {
- if (languageVersion < 4) {
- checkExternalEmitHelpers(node, 4096);
- }
+ if ((functionFlags & 3) === 3 &&
+ languageVersion < 5) {
+ checkExternalEmitHelpers(node, 26624);
}
- else if (languageVersion < 2 && compilerOptions.downlevelIteration) {
+ if ((functionFlags & 3) === 1 &&
+ languageVersion < 2 && compilerOptions.downlevelIteration) {
checkExternalEmitHelpers(node, 256);
}
}
@@ -36372,8 +37976,9 @@ var ts;
if (nodeIsYieldStar) {
expressionElementType = checkIteratedTypeOrElementType(expressionType, node.expression, false, (functionFlags & 2) !== 0);
}
- if (func.type) {
- var signatureElementType = getIteratedTypeOfGenerator(getTypeFromTypeNode(func.type), (functionFlags & 2) !== 0) || anyType;
+ var returnType = ts.getEffectiveReturnTypeNode(func);
+ if (returnType) {
+ var signatureElementType = getIteratedTypeOfGenerator(getTypeFromTypeNode(returnType), (functionFlags & 2) !== 0) || anyType;
if (nodeIsYieldStar) {
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)
@@ -36401,9 +38006,9 @@ var ts;
}
switch (node.kind) {
case 9:
- return getFreshTypeOfLiteralType(getLiteralTypeForText(32, node.text));
+ return getFreshTypeOfLiteralType(getLiteralType(node.text));
case 8:
- return getFreshTypeOfLiteralType(getLiteralTypeForText(64, node.text));
+ return getFreshTypeOfLiteralType(getLiteralType(+node.text));
case 101:
return trueType;
case 86:
@@ -36457,7 +38062,7 @@ var ts;
}
contextualType = constraint;
}
- return maybeTypeOfKind(contextualType, (480 | 262144));
+ return maybeTypeOfKind(contextualType, (224 | 262144));
}
return false;
}
@@ -36485,7 +38090,7 @@ var ts;
if (signature && signature.typeParameters) {
var contextualType = getApparentTypeOfContextualType(node);
if (contextualType) {
- var contextualSignature = getSingleCallSignature(contextualType);
+ var contextualSignature = getSingleCallSignature(getNonNullableType(contextualType));
if (contextualSignature && !contextualSignature.typeParameters) {
return getOrCreateTypeFromSignature(instantiateSignatureInContextOf(signature, contextualSignature, getContextualMapper(node)));
}
@@ -36560,6 +38165,9 @@ var ts;
case 180:
return checkIndexedAccess(node);
case 181:
+ if (node.expression.kind === 91) {
+ return checkImportCallExpression(node);
+ }
case 182:
return checkCallExpression(node);
case 183:
@@ -36754,17 +38362,14 @@ var ts;
checkGrammarFunctionLikeDeclaration(node);
}
var functionFlags = ts.getFunctionFlags(node);
- if ((functionFlags & 7) === 2 && languageVersion < 4) {
- checkExternalEmitHelpers(node, 64);
- if (languageVersion < 2) {
- checkExternalEmitHelpers(node, 128);
+ if (!(functionFlags & 4)) {
+ if ((functionFlags & 3) === 3 && languageVersion < 5) {
+ checkExternalEmitHelpers(node, 6144);
}
- }
- if ((functionFlags & 5) === 1) {
- if (functionFlags & 2 && languageVersion < 4) {
- checkExternalEmitHelpers(node, 2048);
+ if ((functionFlags & 3) === 2 && languageVersion < 4) {
+ checkExternalEmitHelpers(node, 64);
}
- else if (languageVersion < 2) {
+ if ((functionFlags & 3) !== 0 && languageVersion < 2) {
checkExternalEmitHelpers(node, 128);
}
}
@@ -36775,7 +38380,8 @@ var ts;
}
if (produceDiagnostics) {
checkCollisionWithArgumentsInGeneratedCode(node);
- if (noImplicitAny && !node.type) {
+ var returnTypeNode = ts.getEffectiveReturnTypeNode(node);
+ if (noImplicitAny && !returnTypeNode) {
switch (node.kind) {
case 156:
error(node, ts.Diagnostics.Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type);
@@ -36785,19 +38391,19 @@ var ts;
break;
}
}
- if (node.type) {
+ if (returnTypeNode) {
var functionFlags_1 = ts.getFunctionFlags(node);
- if ((functionFlags_1 & 5) === 1) {
- var returnType = getTypeFromTypeNode(node.type);
+ if ((functionFlags_1 & (4 | 1)) === 1) {
+ var returnType = getTypeFromTypeNode(returnTypeNode);
if (returnType === voidType) {
- error(node.type, ts.Diagnostics.A_generator_cannot_have_a_void_type_annotation);
+ error(returnTypeNode, ts.Diagnostics.A_generator_cannot_have_a_void_type_annotation);
}
else {
var generatorElementType = getIteratedTypeOfGenerator(returnType, (functionFlags_1 & 2) !== 0) || anyType;
var iterableIteratorInstantiation = functionFlags_1 & 2
? createAsyncIterableIteratorType(generatorElementType)
: createIterableIteratorType(generatorElementType);
- checkTypeAssignableTo(iterableIteratorInstantiation, returnType, node.type);
+ checkTypeAssignableTo(iterableIteratorInstantiation, returnType, returnTypeNode);
}
}
else if ((functionFlags_1 & 3) === 2) {
@@ -36908,7 +38514,7 @@ var ts;
continue;
}
if (names.get(memberName)) {
- error(member.symbol.valueDeclaration.name, ts.Diagnostics.Duplicate_identifier_0, memberName);
+ error(ts.getNameOfDeclaration(member.symbol.valueDeclaration), ts.Diagnostics.Duplicate_identifier_0, memberName);
error(member.name, ts.Diagnostics.Duplicate_identifier_0, memberName);
}
else {
@@ -36982,7 +38588,8 @@ var ts;
return;
}
function containsSuperCallAsComputedPropertyName(n) {
- return n.name && containsSuperCall(n.name);
+ var name = ts.getNameOfDeclaration(n);
+ return name && containsSuperCall(name);
}
function containsSuperCall(n) {
if (ts.isSuperCall(n)) {
@@ -37120,7 +38727,7 @@ var ts;
checkTypeArgumentConstraints(typeParameters, node.typeArguments);
}
}
- if (type.flags & 16 && !type.memberTypes && getNodeLinks(node).resolvedSymbol.flags & 8) {
+ if (type.flags & 16 && getNodeLinks(node).resolvedSymbol.flags & 8) {
error(node, ts.Diagnostics.Enum_type_0_has_members_with_initializers_that_are_not_literals, typeToString(type));
}
}
@@ -37159,7 +38766,7 @@ var ts;
if (isTypeAssignableTo(indexType, getIndexType(objectType))) {
return type;
}
- if (maybeTypeOfKind(objectType, 540672) && isTypeOfKind(indexType, 340)) {
+ if (maybeTypeOfKind(objectType, 540672) && isTypeOfKind(indexType, 84)) {
var constraint = getBaseConstraintOfType(objectType);
if (constraint && getIndexInfoOfType(constraint, 1)) {
return type;
@@ -37209,16 +38816,16 @@ var ts;
ts.forEach(overloads, function (o) {
var deviation = getEffectiveDeclarationFlags(o, flagsToCheck) ^ canonicalFlags_1;
if (deviation & 1) {
- error(o.name, ts.Diagnostics.Overload_signatures_must_all_be_exported_or_non_exported);
+ error(ts.getNameOfDeclaration(o), ts.Diagnostics.Overload_signatures_must_all_be_exported_or_non_exported);
}
else if (deviation & 2) {
- error(o.name, ts.Diagnostics.Overload_signatures_must_all_be_ambient_or_non_ambient);
+ error(ts.getNameOfDeclaration(o), ts.Diagnostics.Overload_signatures_must_all_be_ambient_or_non_ambient);
}
else if (deviation & (8 | 16)) {
- error(o.name || o, ts.Diagnostics.Overload_signatures_must_all_be_public_private_or_protected);
+ error(ts.getNameOfDeclaration(o) || o, ts.Diagnostics.Overload_signatures_must_all_be_public_private_or_protected);
}
else if (deviation & 128) {
- error(o.name, ts.Diagnostics.Overload_signatures_must_all_be_abstract_or_non_abstract);
+ error(ts.getNameOfDeclaration(o), ts.Diagnostics.Overload_signatures_must_all_be_abstract_or_non_abstract);
}
});
}
@@ -37229,7 +38836,7 @@ var ts;
ts.forEach(overloads, function (o) {
var deviation = ts.hasQuestionToken(o) !== canonicalHasQuestionToken_1;
if (deviation) {
- error(o.name, ts.Diagnostics.Overload_signatures_must_all_be_optional_or_required);
+ error(ts.getNameOfDeclaration(o), ts.Diagnostics.Overload_signatures_must_all_be_optional_or_required);
}
});
}
@@ -37337,7 +38944,7 @@ var ts;
}
if (duplicateFunctionDeclaration) {
ts.forEach(declarations, function (declaration) {
- error(declaration.name, ts.Diagnostics.Duplicate_function_implementation);
+ error(ts.getNameOfDeclaration(declaration), ts.Diagnostics.Duplicate_function_implementation);
});
}
if (lastSeenNonAmbientDeclaration && !lastSeenNonAmbientDeclaration.body &&
@@ -37350,8 +38957,8 @@ var ts;
if (bodyDeclaration) {
var signatures = getSignaturesOfSymbol(symbol);
var bodySignature = getSignatureFromDeclaration(bodyDeclaration);
- for (var _a = 0, signatures_4 = signatures; _a < signatures_4.length; _a++) {
- var signature = signatures_4[_a];
+ for (var _a = 0, signatures_7 = signatures; _a < signatures_7.length; _a++) {
+ var signature = signatures_7[_a];
if (!isImplementationCompatibleWithOverload(bodySignature, signature)) {
error(signature.declaration, ts.Diagnostics.Overload_signature_is_not_compatible_with_function_implementation);
break;
@@ -37400,11 +39007,12 @@ var ts;
for (var _b = 0, _c = symbol.declarations; _b < _c.length; _b++) {
var d = _c[_b];
var declarationSpaces = getDeclarationSpaces(d);
+ var name = ts.getNameOfDeclaration(d);
if (declarationSpaces & commonDeclarationSpacesForDefaultAndNonDefault) {
- error(d.name, ts.Diagnostics.Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead, ts.declarationNameToString(d.name));
+ error(name, ts.Diagnostics.Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead, ts.declarationNameToString(name));
}
else if (declarationSpaces & commonDeclarationSpacesForExportsAndLocals) {
- error(d.name, ts.Diagnostics.Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local, ts.declarationNameToString(d.name));
+ error(name, ts.Diagnostics.Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local, ts.declarationNameToString(name));
}
}
}
@@ -37517,44 +39125,45 @@ var ts;
return typeAsAwaitable.awaitedTypeOfType = type;
}
function checkAsyncFunctionReturnType(node) {
- var returnType = getTypeFromTypeNode(node.type);
+ var returnTypeNode = ts.getEffectiveReturnTypeNode(node);
+ var returnType = getTypeFromTypeNode(returnTypeNode);
if (languageVersion >= 2) {
if (returnType === unknownType) {
return unknownType;
}
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);
+ error(returnTypeNode, ts.Diagnostics.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type);
return unknownType;
}
}
else {
- markTypeNodeAsReferenced(node.type);
+ markTypeNodeAsReferenced(returnTypeNode);
if (returnType === unknownType) {
return unknownType;
}
- var promiseConstructorName = ts.getEntityNameFromTypeNode(node.type);
+ var promiseConstructorName = ts.getEntityNameFromTypeNode(returnTypeNode);
if (promiseConstructorName === undefined) {
- 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, typeToString(returnType));
+ error(returnTypeNode, 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, typeToString(returnType));
return unknownType;
}
var promiseConstructorSymbol = resolveEntityName(promiseConstructorName, 107455, true);
var promiseConstructorType = promiseConstructorSymbol ? getTypeOfSymbol(promiseConstructorSymbol) : unknownType;
if (promiseConstructorType === unknownType) {
if (promiseConstructorName.kind === 71 && 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);
+ error(returnTypeNode, 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));
+ error(returnTypeNode, 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(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));
+ error(returnTypeNode, 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;
}
- if (!checkTypeAssignableTo(promiseConstructorType, globalPromiseConstructorLikeType, 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)) {
+ if (!checkTypeAssignableTo(promiseConstructorType, globalPromiseConstructorLikeType, returnTypeNode, 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)) {
return unknownType;
}
var rootName = promiseConstructorName && getFirstIdentifier(promiseConstructorName);
@@ -37600,7 +39209,9 @@ var ts;
checkTypeAssignableTo(returnType, expectedReturnType, node, headMessage, errorInfo);
}
function markTypeNodeAsReferenced(node) {
- var typeName = node && ts.getEntityNameFromTypeNode(node);
+ markEntityNameOrEntityExpressionAsReference(node && ts.getEntityNameFromTypeNode(node));
+ }
+ function markEntityNameOrEntityExpressionAsReference(typeName) {
var rootName = typeName && getFirstIdentifier(typeName);
var rootSymbol = rootName && resolveName(rootName, rootName.text, (typeName.kind === 71 ? 793064 : 1920) | 8388608, undefined, undefined);
if (rootSymbol
@@ -37610,8 +39221,46 @@ var ts;
markAliasSymbolAsReferenced(rootSymbol);
}
}
+ function markDecoratorMedataDataTypeNodeAsReferenced(node) {
+ var entityName = getEntityNameForDecoratorMetadata(node);
+ if (entityName && ts.isEntityName(entityName)) {
+ markEntityNameOrEntityExpressionAsReference(entityName);
+ }
+ }
+ function getEntityNameForDecoratorMetadata(node) {
+ if (node) {
+ switch (node.kind) {
+ case 167:
+ case 166:
+ var commonEntityName = void 0;
+ for (var _i = 0, _a = node.types; _i < _a.length; _i++) {
+ var typeNode = _a[_i];
+ var individualEntityName = getEntityNameForDecoratorMetadata(typeNode);
+ if (!individualEntityName) {
+ return undefined;
+ }
+ if (commonEntityName) {
+ if (!ts.isIdentifier(commonEntityName) ||
+ !ts.isIdentifier(individualEntityName) ||
+ commonEntityName.text !== individualEntityName.text) {
+ return undefined;
+ }
+ }
+ else {
+ commonEntityName = individualEntityName;
+ }
+ }
+ return commonEntityName;
+ case 168:
+ return getEntityNameForDecoratorMetadata(node.type);
+ case 159:
+ return node.typeName;
+ }
+ }
+ }
function getParameterTypeNodeForDecoratorCheck(node) {
- return node.dotDotDotToken ? ts.getRestParameterElementType(node.type) : node.type;
+ var typeNode = ts.getEffectiveTypeAnnotationNode(node);
+ return ts.isRestParameter(node) ? ts.getRestParameterElementType(typeNode) : typeNode;
}
function checkDecorators(node) {
if (!node.decorators) {
@@ -37636,7 +39285,7 @@ var ts;
if (constructor) {
for (var _i = 0, _a = constructor.parameters; _i < _a.length; _i++) {
var parameter = _a[_i];
- markTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(parameter));
+ markDecoratorMedataDataTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(parameter));
}
}
break;
@@ -37645,15 +39294,15 @@ var ts;
case 154:
for (var _b = 0, _c = node.parameters; _b < _c.length; _b++) {
var parameter = _c[_b];
- markTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(parameter));
+ markDecoratorMedataDataTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(parameter));
}
- markTypeNodeAsReferenced(node.type);
+ markDecoratorMedataDataTypeNodeAsReferenced(ts.getEffectiveReturnTypeNode(node));
break;
case 149:
- markTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(node));
+ markDecoratorMedataDataTypeNodeAsReferenced(ts.getEffectiveTypeAnnotationNode(node));
break;
case 146:
- markTypeNodeAsReferenced(node.type);
+ markDecoratorMedataDataTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(node));
break;
}
}
@@ -37661,7 +39310,8 @@ var ts;
}
function checkFunctionDeclaration(node) {
if (produceDiagnostics) {
- checkFunctionOrMethodDeclaration(node) || checkGrammarForGenerator(node);
+ checkFunctionOrMethodDeclaration(node);
+ checkGrammarForGenerator(node);
checkCollisionWithCapturedSuperVariable(node, node.name);
checkCollisionWithCapturedThisVariable(node, node.name);
checkCollisionWithCapturedNewTargetVariable(node, node.name);
@@ -37691,13 +39341,14 @@ var ts;
}
}
checkSourceElement(node.body);
+ var returnTypeNode = ts.getEffectiveReturnTypeNode(node);
if ((functionFlags & 1) === 0) {
- var returnOrPromisedType = node.type && (functionFlags & 2
+ var returnOrPromisedType = returnTypeNode && (functionFlags & 2
? checkAsyncFunctionReturnType(node)
- : getTypeFromTypeNode(node.type));
+ : getTypeFromTypeNode(returnTypeNode));
checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnOrPromisedType);
}
- if (produceDiagnostics && !node.type) {
+ if (produceDiagnostics && !returnTypeNode) {
if (noImplicitAny && ts.nodeIsMissing(node.body) && !isPrivateWithinAmbient(node)) {
reportImplicitAnyError(node, anyType);
}
@@ -37766,15 +39417,16 @@ var ts;
if (!local.isReferenced) {
if (local.valueDeclaration && ts.getRootDeclaration(local.valueDeclaration).kind === 146) {
var parameter = ts.getRootDeclaration(local.valueDeclaration);
+ var name = ts.getNameOfDeclaration(local.valueDeclaration);
if (compilerOptions.noUnusedParameters &&
!ts.isParameterPropertyDeclaration(parameter) &&
!ts.parameterIsThisKeyword(parameter) &&
- !parameterNameStartsWithUnderscore(local.valueDeclaration.name)) {
- error(local.valueDeclaration.name, ts.Diagnostics._0_is_declared_but_never_used, local.name);
+ !parameterNameStartsWithUnderscore(name)) {
+ error(name, ts.Diagnostics._0_is_declared_but_never_used, local.name);
}
}
else if (compilerOptions.noUnusedLocals) {
- ts.forEach(local.declarations, function (d) { return errorUnusedLocal(d.name || d, local.name); });
+ ts.forEach(local.declarations, function (d) { return errorUnusedLocal(ts.getNameOfDeclaration(d) || d, local.name); });
}
}
});
@@ -37790,9 +39442,7 @@ var ts;
function errorUnusedLocal(node, name) {
if (isIdentifierThatStartsWithUnderScore(node)) {
var declaration = ts.getRootDeclaration(node.parent);
- if (declaration.kind === 226 &&
- (declaration.parent.parent.kind === 215 ||
- declaration.parent.parent.kind === 216)) {
+ if (declaration.kind === 226 && ts.isForInOrOfStatement(declaration.parent.parent)) {
return;
}
}
@@ -37852,7 +39502,7 @@ var ts;
for (var _i = 0, _a = local.declarations; _i < _a.length; _i++) {
var declaration = _a[_i];
if (!ts.isAmbientModule(declaration)) {
- errorUnusedLocal(declaration.name, local.name);
+ errorUnusedLocal(ts.getNameOfDeclaration(declaration), local.name);
}
}
}
@@ -37914,7 +39564,7 @@ var ts;
if (getNodeCheckFlags(current) & 4) {
var isDeclaration_1 = node.kind !== 71;
if (isDeclaration_1) {
- error(node.name, ts.Diagnostics.Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference);
+ error(ts.getNameOfDeclaration(node), ts.Diagnostics.Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference);
}
else {
error(node, ts.Diagnostics.Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference);
@@ -37928,7 +39578,7 @@ var ts;
if (getNodeCheckFlags(current) & 8) {
var isDeclaration_2 = node.kind !== 71;
if (isDeclaration_2) {
- error(node.name, ts.Diagnostics.Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference);
+ error(ts.getNameOfDeclaration(node), 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);
@@ -38124,7 +39774,7 @@ var ts;
checkTypeAssignableTo(checkExpressionCached(node.initializer), declarationType, node, undefined);
}
if (!areDeclarationFlagsIdentical(node, symbol.valueDeclaration)) {
- error(symbol.valueDeclaration.name, ts.Diagnostics.All_declarations_of_0_must_have_identical_modifiers, ts.declarationNameToString(node.name));
+ error(ts.getNameOfDeclaration(symbol.valueDeclaration), ts.Diagnostics.All_declarations_of_0_must_have_identical_modifiers, ts.declarationNameToString(node.name));
error(node.name, ts.Diagnostics.All_declarations_of_0_must_have_identical_modifiers, ts.declarationNameToString(node.name));
}
}
@@ -38230,11 +39880,12 @@ var ts;
checkGrammarForInOrForOfStatement(node);
if (node.kind === 216) {
if (node.awaitModifier) {
- if (languageVersion < 4) {
- checkExternalEmitHelpers(node, 8192);
+ var functionFlags = ts.getFunctionFlags(ts.getContainingFunction(node));
+ if ((functionFlags & (4 | 2)) === 2 && languageVersion < 5) {
+ checkExternalEmitHelpers(node, 16384);
}
}
- else if (languageVersion < 2 && compilerOptions.downlevelIteration) {
+ else if (compilerOptions.downlevelIteration && languageVersion < 2) {
checkExternalEmitHelpers(node, 256);
}
}
@@ -38302,17 +39953,17 @@ var ts;
var expressionType = checkNonNullExpression(rhsExpression);
return checkIteratedTypeOrElementType(expressionType, rhsExpression, true, awaitModifier !== undefined);
}
- function checkIteratedTypeOrElementType(inputType, errorNode, allowStringInput, allowAsyncIterable) {
+ function checkIteratedTypeOrElementType(inputType, errorNode, allowStringInput, allowAsyncIterables) {
if (isTypeAny(inputType)) {
return inputType;
}
- return getIteratedTypeOrElementType(inputType, errorNode, allowStringInput, allowAsyncIterable, true) || anyType;
+ return getIteratedTypeOrElementType(inputType, errorNode, allowStringInput, allowAsyncIterables, true) || anyType;
}
- function getIteratedTypeOrElementType(inputType, errorNode, allowStringInput, allowAsyncIterable, checkAssignability) {
+ function getIteratedTypeOrElementType(inputType, errorNode, allowStringInput, allowAsyncIterables, 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 (uplevelIteration || downlevelIteration || allowAsyncIterables) {
+ var iteratedType = getIteratedTypeOfIterable(inputType, uplevelIteration ? errorNode : undefined, allowAsyncIterables, true, checkAssignability);
if (iteratedType || uplevelIteration) {
return iteratedType;
}
@@ -38366,63 +40017,57 @@ var ts;
}
return arrayElementType;
}
- function getIteratedTypeOfIterable(type, errorNode, isAsyncIterable, allowNonAsyncIterables, checkAssignability) {
+ function getIteratedTypeOfIterable(type, errorNode, allowAsyncIterables, allowSyncIterables, checkAssignability) {
if (isTypeAny(type)) {
return undefined;
}
- var typeAsIterable = type;
- 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];
+ return mapType(type, getIteratedType);
+ function getIteratedType(type) {
+ var typeAsIterable = type;
+ if (allowAsyncIterables) {
+ if (typeAsIterable.iteratedTypeOfAsyncIterable) {
+ return typeAsIterable.iteratedTypeOfAsyncIterable;
+ }
+ if (isReferenceToType(type, getGlobalAsyncIterableType(false)) ||
+ isReferenceToType(type, getGlobalAsyncIterableIteratorType(false))) {
+ return typeAsIterable.iteratedTypeOfAsyncIterable = type.typeArguments[0];
+ }
}
- }
- if (!isAsyncIterable || allowNonAsyncIterables) {
- if (isReferenceToType(type, getGlobalIterableType(false)) ||
- isReferenceToType(type, getGlobalIterableIteratorType(false))) {
- return isAsyncIterable
- ? typeAsIterable.iteratedTypeOfAsyncIterable = type.typeArguments[0]
- : typeAsIterable.iteratedTypeOfIterable = type.typeArguments[0];
+ if (allowSyncIterables) {
+ if (typeAsIterable.iteratedTypeOfIterable) {
+ return typeAsIterable.iteratedTypeOfIterable;
+ }
+ if (isReferenceToType(type, getGlobalIterableType(false)) ||
+ isReferenceToType(type, getGlobalIterableIteratorType(false))) {
+ return typeAsIterable.iteratedTypeOfIterable = type.typeArguments[0];
+ }
}
- }
- var iteratorMethodSignatures;
- var isNonAsyncIterable = false;
- if (isAsyncIterable) {
- var iteratorMethod = getTypeOfPropertyOfType(type, ts.getPropertyNameForKnownSymbolName("asyncIterator"));
- if (isTypeAny(iteratorMethod)) {
+ var asyncMethodType = allowAsyncIterables && getTypeOfPropertyOfType(type, ts.getPropertyNameForKnownSymbolName("asyncIterator"));
+ var methodType = asyncMethodType || (allowSyncIterables && getTypeOfPropertyOfType(type, ts.getPropertyNameForKnownSymbolName("iterator")));
+ if (isTypeAny(methodType)) {
return undefined;
}
- iteratorMethodSignatures = iteratorMethod && getSignaturesOfType(iteratorMethod, 0);
- }
- if (!isAsyncIterable || (allowNonAsyncIterables && !ts.some(iteratorMethodSignatures))) {
- var iteratorMethod = getTypeOfPropertyOfType(type, ts.getPropertyNameForKnownSymbolName("iterator"));
- if (isTypeAny(iteratorMethod)) {
+ var signatures = methodType && getSignaturesOfType(methodType, 0);
+ if (!ts.some(signatures)) {
+ if (errorNode) {
+ error(errorNode, allowAsyncIterables
+ ? 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);
+ errorNode = undefined;
+ }
return undefined;
}
- iteratorMethodSignatures = iteratorMethod && getSignaturesOfType(iteratorMethod, 0);
- isNonAsyncIterable = true;
- }
- if (ts.some(iteratorMethodSignatures)) {
- var iteratorMethodReturnType = getUnionType(ts.map(iteratorMethodSignatures, getReturnTypeOfSignature), true);
- var iteratedType = getIteratedTypeOfIterator(iteratorMethodReturnType, errorNode, !isNonAsyncIterable);
+ var returnType = getUnionType(ts.map(signatures, getReturnTypeOfSignature), true);
+ var iteratedType = getIteratedTypeOfIterator(returnType, errorNode, !!asyncMethodType);
if (checkAssignability && errorNode && iteratedType) {
- checkTypeAssignableTo(type, isNonAsyncIterable
- ? createIterableType(iteratedType)
- : createAsyncIterableType(iteratedType), errorNode);
+ checkTypeAssignableTo(type, asyncMethodType
+ ? createAsyncIterableType(iteratedType)
+ : createIterableType(iteratedType), errorNode);
}
- return isAsyncIterable
+ return asyncMethodType
? 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 undefined;
}
function getIteratedTypeOfIterator(type, errorNode, isAsyncIterator) {
if (isTypeAny(type)) {
@@ -38478,14 +40123,15 @@ var ts;
if (isTypeAny(returnType)) {
return undefined;
}
- return getIteratedTypeOfIterable(returnType, undefined, isAsyncGenerator, false, false)
+ return getIteratedTypeOfIterable(returnType, undefined, isAsyncGenerator, !isAsyncGenerator, false)
|| getIteratedTypeOfIterator(returnType, undefined, isAsyncGenerator);
}
function checkBreakOrContinueStatement(node) {
checkGrammarStatementInAmbientContext(node) || checkGrammarBreakOrContinueStatement(node);
}
function isGetAccessorWithAnnotatedSetAccessor(node) {
- return !!(node.kind === 153 && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(node.symbol, 154)));
+ return node.kind === 153
+ && ts.getEffectiveSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(node.symbol, 154)) !== undefined;
}
function isUnwrappedReturnTypeVoidOrAny(func, returnType) {
var unwrappedReturnType = (ts.getFunctionFlags(func) & 3) === 2
@@ -38520,7 +40166,7 @@ var ts;
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)) {
+ else if (ts.getEffectiveReturnTypeNode(func) || isGetAccessorWithAnnotatedSetAccessor(func)) {
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);
@@ -38684,11 +40330,14 @@ var ts;
return;
}
var propDeclaration = prop.valueDeclaration;
- if (indexKind === 1 && !(propDeclaration ? isNumericName(propDeclaration.name) : isNumericLiteralName(prop.name))) {
+ if (indexKind === 1 && !(propDeclaration ? isNumericName(ts.getNameOfDeclaration(propDeclaration)) : isNumericLiteralName(prop.name))) {
return;
}
var errorNode;
- if (propDeclaration && (propDeclaration.name.kind === 144 || prop.parent === containingType.symbol)) {
+ if (propDeclaration &&
+ (propDeclaration.kind === 194 ||
+ ts.getNameOfDeclaration(propDeclaration).kind === 144 ||
+ prop.parent === containingType.symbol)) {
errorNode = propDeclaration;
}
else if (indexDeclaration) {
@@ -38841,7 +40490,7 @@ var ts;
var staticBaseType = getApparentType(baseConstructorType);
checkBaseTypeAccessibility(staticBaseType, baseTypeNode);
checkSourceElement(baseTypeNode.expression);
- if (baseTypeNode.typeArguments) {
+ if (ts.some(baseTypeNode.typeArguments)) {
ts.forEach(baseTypeNode.typeArguments, checkSourceElement);
for (var _i = 0, _a = getConstructorsForTypeArguments(staticBaseType, baseTypeNode.typeArguments, baseTypeNode); _i < _a.length; _i++) {
var constructor = _a[_i];
@@ -38903,7 +40552,7 @@ var ts;
}
}
function getTargetSymbol(s) {
- return getCheckFlags(s) & 1 ? s.target : s;
+ return ts.getCheckFlags(s) & 1 ? s.target : s;
}
function getClassLikeDeclarationOfSymbol(symbol) {
return ts.forEach(symbol.declarations, function (d) { return ts.isClassLike(d) ? d : undefined; });
@@ -38922,7 +40571,7 @@ var ts;
continue;
}
var derived = getTargetSymbol(getPropertyOfObjectType(type, base.name));
- var baseDeclarationFlags = getDeclarationModifierFlagsFromSymbol(base);
+ var baseDeclarationFlags = ts.getDeclarationModifierFlagsFromSymbol(base);
ts.Debug.assert(!!derived, "derived should point to something, even if it is the base class' declaration.");
if (derived) {
if (derived === base) {
@@ -38937,13 +40586,10 @@ var ts;
}
}
else {
- var derivedDeclarationFlags = getDeclarationModifierFlagsFromSymbol(derived);
+ var derivedDeclarationFlags = ts.getDeclarationModifierFlagsFromSymbol(derived);
if (baseDeclarationFlags & 8 || derivedDeclarationFlags & 8) {
continue;
}
- if ((baseDeclarationFlags & 32) !== (derivedDeclarationFlags & 32)) {
- continue;
- }
if (isMethodLike(base) && isMethodLike(derived) || base.flags & 98308 && derived.flags & 98308) {
continue;
}
@@ -38962,14 +40608,11 @@ var ts;
else {
errorMessage = ts.Diagnostics.Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function;
}
- error(derived.valueDeclaration.name || derived.valueDeclaration, errorMessage, typeToString(baseType), symbolToString(base), typeToString(type));
+ error(ts.getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage, typeToString(baseType), symbolToString(base), typeToString(type));
}
}
}
}
- function isAccessor(kind) {
- return kind === 153 || kind === 154;
- }
function checkInheritedPropertiesAreIdentical(type, typeNode) {
var baseTypes = getBaseTypes(type);
if (baseTypes.length < 2) {
@@ -39045,88 +40688,81 @@ var ts;
function computeEnumMemberValues(node) {
var nodeLinks = getNodeLinks(node);
if (!(nodeLinks.flags & 16384)) {
- var enumSymbol = getSymbolOfNode(node);
- var enumType = getDeclaredTypeOfSymbol(enumSymbol);
+ nodeLinks.flags |= 16384;
var autoValue = 0;
- var ambient = ts.isInAmbientContext(node);
- var enumIsConst = ts.isConst(node);
for (var _i = 0, _a = node.members; _i < _a.length; _i++) {
var member = _a[_i];
- if (isComputedNonLiteralName(member.name)) {
- error(member.name, ts.Diagnostics.Computed_property_names_are_not_allowed_in_enums);
- }
- else {
- var text = ts.getTextOfPropertyName(member.name);
- if (isNumericLiteralName(text) && !isInfinityOrNaNString(text)) {
- error(member.name, ts.Diagnostics.An_enum_member_cannot_have_a_numeric_name);
- }
- }
- var previousEnumMemberIsNonConstant = autoValue === undefined;
- var initializer = member.initializer;
- if (initializer) {
- autoValue = computeConstantValueForEnumMemberInitializer(initializer, enumType, enumIsConst, ambient);
- }
- else if (ambient && !enumIsConst) {
- autoValue = undefined;
- }
- else if (previousEnumMemberIsNonConstant) {
- error(member.name, ts.Diagnostics.Enum_member_must_have_initializer);
- }
- if (autoValue !== undefined) {
- getNodeLinks(member).enumMemberValue = autoValue;
- autoValue++;
- }
+ var value = computeMemberValue(member, autoValue);
+ getNodeLinks(member).enumMemberValue = value;
+ autoValue = typeof value === "number" ? value + 1 : undefined;
}
- nodeLinks.flags |= 16384;
}
- function computeConstantValueForEnumMemberInitializer(initializer, enumType, enumIsConst, ambient) {
- var reportError = true;
- var value = evalConstant(initializer);
- if (reportError) {
- if (value === undefined) {
- if (enumIsConst) {
- error(initializer, ts.Diagnostics.In_const_enum_declarations_member_initializer_must_be_constant_expression);
- }
- else if (ambient) {
- error(initializer, ts.Diagnostics.In_ambient_enum_declarations_member_initializer_must_be_constant_expression);
- }
- else {
- checkTypeAssignableTo(checkExpression(initializer), enumType, initializer, undefined);
- }
- }
- else if (enumIsConst) {
- if (isNaN(value)) {
- error(initializer, ts.Diagnostics.const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN);
- }
- else if (!isFinite(value)) {
- error(initializer, ts.Diagnostics.const_enum_member_initializer_was_evaluated_to_a_non_finite_value);
- }
- }
+ }
+ function computeMemberValue(member, autoValue) {
+ if (isComputedNonLiteralName(member.name)) {
+ error(member.name, ts.Diagnostics.Computed_property_names_are_not_allowed_in_enums);
+ }
+ else {
+ var text = ts.getTextOfPropertyName(member.name);
+ if (isNumericLiteralName(text) && !isInfinityOrNaNString(text)) {
+ error(member.name, ts.Diagnostics.An_enum_member_cannot_have_a_numeric_name);
}
- return value;
- function evalConstant(e) {
- switch (e.kind) {
- case 192:
- var value_1 = evalConstant(e.operand);
- if (value_1 === undefined) {
- return undefined;
- }
- switch (e.operator) {
+ }
+ if (member.initializer) {
+ return computeConstantValue(member);
+ }
+ if (ts.isInAmbientContext(member.parent) && !ts.isConst(member.parent)) {
+ return undefined;
+ }
+ if (autoValue !== undefined) {
+ return autoValue;
+ }
+ error(member.name, ts.Diagnostics.Enum_member_must_have_initializer);
+ return undefined;
+ }
+ function computeConstantValue(member) {
+ var enumKind = getEnumKind(getSymbolOfNode(member.parent));
+ var isConstEnum = ts.isConst(member.parent);
+ var initializer = member.initializer;
+ var value = enumKind === 1 && !isLiteralEnumMember(member) ? undefined : evaluate(initializer);
+ if (value !== undefined) {
+ if (isConstEnum && typeof value === "number" && !isFinite(value)) {
+ error(initializer, isNaN(value) ?
+ ts.Diagnostics.const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN :
+ ts.Diagnostics.const_enum_member_initializer_was_evaluated_to_a_non_finite_value);
+ }
+ }
+ else if (enumKind === 1) {
+ error(initializer, ts.Diagnostics.Computed_values_are_not_permitted_in_an_enum_with_string_valued_members);
+ return 0;
+ }
+ else if (isConstEnum) {
+ error(initializer, ts.Diagnostics.In_const_enum_declarations_member_initializer_must_be_constant_expression);
+ }
+ else if (ts.isInAmbientContext(member.parent)) {
+ error(initializer, ts.Diagnostics.In_ambient_enum_declarations_member_initializer_must_be_constant_expression);
+ }
+ else {
+ checkTypeAssignableTo(checkExpression(initializer), getDeclaredTypeOfSymbol(getSymbolOfNode(member.parent)), initializer, undefined);
+ }
+ return value;
+ function evaluate(expr) {
+ switch (expr.kind) {
+ case 192:
+ var value_1 = evaluate(expr.operand);
+ if (typeof value_1 === "number") {
+ switch (expr.operator) {
case 37: return value_1;
case 38: return -value_1;
case 52: return ~value_1;
}
- return undefined;
- case 194:
- var left = evalConstant(e.left);
- if (left === undefined) {
- return undefined;
- }
- var right = evalConstant(e.right);
- if (right === undefined) {
- return undefined;
- }
- switch (e.operatorToken.kind) {
+ }
+ break;
+ case 194:
+ var left = evaluate(expr.left);
+ var right = evaluate(expr.right);
+ if (typeof left === "number" && typeof right === "number") {
+ switch (expr.operatorToken.kind) {
case 49: return left | right;
case 48: return left & right;
case 46: return left >> right;
@@ -39139,75 +40775,53 @@ var ts;
case 38: return left - right;
case 42: return left % right;
}
- return undefined;
- case 8:
- checkGrammarNumericLiteral(e);
- return +e.text;
- case 185:
- return evalConstant(e.expression);
- case 71:
- case 180:
- case 179:
- var member = initializer.parent;
- var currentType = getTypeOfSymbol(getSymbolOfNode(member.parent));
- var enumType_1;
- var propertyName = void 0;
- if (e.kind === 71) {
- enumType_1 = currentType;
- propertyName = e.text;
- }
- else {
- var expression = void 0;
- if (e.kind === 180) {
- if (e.argumentExpression === undefined ||
- e.argumentExpression.kind !== 9) {
- return undefined;
- }
- expression = e.expression;
- propertyName = e.argumentExpression.text;
- }
- else {
- expression = e.expression;
- propertyName = e.name.text;
- }
- var current = expression;
- while (current) {
- if (current.kind === 71) {
- break;
- }
- else if (current.kind === 179) {
- current = current.expression;
- }
- else {
- return undefined;
- }
- }
- enumType_1 = getTypeOfExpression(expression);
- if (!(enumType_1.symbol && (enumType_1.symbol.flags & 384))) {
- return undefined;
- }
- }
- if (propertyName === undefined) {
- return undefined;
- }
- var property = getPropertyOfObjectType(enumType_1, propertyName);
- if (!property || !(property.flags & 8)) {
- return undefined;
- }
- var propertyDecl = property.valueDeclaration;
- if (member === propertyDecl) {
- return undefined;
- }
- if (!isBlockScopedNameDeclaredBeforeUse(propertyDecl, member)) {
- reportError = false;
- error(e, ts.Diagnostics.A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums);
- return undefined;
+ }
+ break;
+ case 9:
+ return expr.text;
+ case 8:
+ checkGrammarNumericLiteral(expr);
+ return +expr.text;
+ case 185:
+ return evaluate(expr.expression);
+ case 71:
+ return ts.nodeIsMissing(expr) ? 0 : evaluateEnumMember(expr, getSymbolOfNode(member.parent), expr.text);
+ case 180:
+ case 179:
+ if (isConstantMemberAccess(expr)) {
+ var type = getTypeOfExpression(expr.expression);
+ if (type.symbol && type.symbol.flags & 384) {
+ var name = expr.kind === 179 ?
+ expr.name.text :
+ expr.argumentExpression.text;
+ return evaluateEnumMember(expr, type.symbol, name);
}
- return getNodeLinks(propertyDecl).enumMemberValue;
+ }
+ break;
+ }
+ return undefined;
+ }
+ function evaluateEnumMember(expr, enumSymbol, name) {
+ var memberSymbol = enumSymbol.exports.get(name);
+ if (memberSymbol) {
+ var declaration = memberSymbol.valueDeclaration;
+ if (declaration !== member) {
+ if (isBlockScopedNameDeclaredBeforeUse(declaration, member)) {
+ return getNodeLinks(declaration).enumMemberValue;
+ }
+ error(expr, ts.Diagnostics.A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums);
+ return 0;
}
}
+ return undefined;
}
}
+ function isConstantMemberAccess(node) {
+ return node.kind === 71 ||
+ node.kind === 179 && isConstantMemberAccess(node.expression) ||
+ node.kind === 180 && isConstantMemberAccess(node.expression) &&
+ node.argumentExpression.kind === 9;
+ }
function checkEnumDeclaration(node) {
if (!produceDiagnostics) {
return;
@@ -39230,7 +40844,7 @@ var ts;
if (enumSymbol.declarations.length > 1) {
ts.forEach(enumSymbol.declarations, function (decl) {
if (ts.isConstEnumDeclaration(decl) !== enumIsConst) {
- error(decl.name, ts.Diagnostics.Enum_declarations_must_all_be_const_or_non_const);
+ error(ts.getNameOfDeclaration(decl), ts.Diagnostics.Enum_declarations_must_all_be_const_or_non_const);
}
});
}
@@ -39455,6 +41069,12 @@ var ts;
ts.Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0;
error(node, message, symbolToString(symbol));
}
+ if (compilerOptions.isolatedModules
+ && node.kind === 246
+ && !(target.flags & 107455)
+ && !ts.isInAmbientContext(node)) {
+ error(node, ts.Diagnostics.Cannot_re_export_a_type_when_the_isolatedModules_flag_is_provided);
+ }
}
}
function checkImportBinding(node) {
@@ -39540,6 +41160,9 @@ var ts;
if (moduleSymbol && hasExportAssignmentSymbol(moduleSymbol)) {
error(node.moduleSpecifier, ts.Diagnostics.Module_0_uses_export_and_cannot_be_used_with_export_Asterisk, symbolToString(moduleSymbol));
}
+ if (modulekind !== ts.ModuleKind.System && modulekind !== ts.ModuleKind.ES2015) {
+ checkExternalEmitHelpers(node, 32768);
+ }
}
}
}
@@ -40057,6 +41680,15 @@ var ts;
return entityNameSymbol;
}
}
+ if (entityName.parent.kind === 287) {
+ var parameter = ts.getParameterFromJSDoc(entityName.parent);
+ return parameter && parameter.symbol;
+ }
+ if (entityName.parent.kind === 145 && entityName.parent.parent.kind === 290) {
+ ts.Debug.assert(!ts.isInJavaScriptFile(entityName));
+ var typeParameter = ts.getTypeParameterFromJsDoc(entityName.parent);
+ return typeParameter && typeParameter.symbol;
+ }
if (ts.isPartOfExpression(entityName)) {
if (ts.nodeIsMissing(entityName)) {
return undefined;
@@ -40101,7 +41733,7 @@ var ts;
if (isInsideWithStatementBody(node)) {
return undefined;
}
- if (ts.isDeclarationName(node)) {
+ if (isDeclarationNameOrImportPropertyName(node)) {
return getSymbolOfNode(node.parent);
}
else if (ts.isLiteralComputedPropertyDeclarationName(node)) {
@@ -40146,13 +41778,9 @@ var ts;
}
return undefined;
case 9:
- if ((ts.isExternalModuleImportEqualsDeclaration(node.parent.parent) &&
- ts.getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node) ||
- ((node.parent.kind === 238 || node.parent.kind === 244) &&
- node.parent.moduleSpecifier === node)) {
- return resolveExternalModuleName(node, node);
- }
- if (ts.isInJavaScriptFile(node) && ts.isRequireCall(node.parent, false)) {
+ if ((ts.isExternalModuleImportEqualsDeclaration(node.parent.parent) && ts.getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node) ||
+ ((node.parent.kind === 238 || node.parent.kind === 244) && node.parent.moduleSpecifier === node) ||
+ ((ts.isInJavaScriptFile(node) && ts.isRequireCall(node.parent, false)) || ts.isImportCall(node.parent))) {
return resolveExternalModuleName(node, node);
}
case 8:
@@ -40214,7 +41842,7 @@ var ts;
var symbol = getSymbolOfNode(node);
return getTypeOfSymbol(symbol);
}
- if (ts.isDeclarationName(node)) {
+ if (isDeclarationNameOrImportPropertyName(node)) {
var symbol = getSymbolAtLocation(node);
return symbol && getTypeOfSymbol(symbol);
}
@@ -40276,24 +41904,24 @@ var ts;
return getNamedMembers(propsByName);
}
function getRootSymbols(symbol) {
- if (getCheckFlags(symbol) & 6) {
- var symbols_3 = [];
+ if (ts.getCheckFlags(symbol) & 6) {
+ var symbols_4 = [];
var name_2 = symbol.name;
ts.forEach(getSymbolLinks(symbol).containingType.types, function (t) {
var symbol = getPropertyOfType(t, name_2);
if (symbol) {
- symbols_3.push(symbol);
+ symbols_4.push(symbol);
}
});
- return symbols_3;
+ return symbols_4;
}
else if (symbol.flags & 134217728) {
- if (symbol.leftSpread) {
- var links = symbol;
- return getRootSymbols(links.leftSpread).concat(getRootSymbols(links.rightSpread));
+ var transient = symbol;
+ if (transient.leftSpread) {
+ return getRootSymbols(transient.leftSpread).concat(getRootSymbols(transient.rightSpread));
}
- if (symbol.syntheticOrigin) {
- return getRootSymbols(symbol.syntheticOrigin);
+ if (transient.syntheticOrigin) {
+ return getRootSymbols(transient.syntheticOrigin);
}
var target = void 0;
var next = symbol;
@@ -40368,7 +41996,7 @@ var ts;
node = ts.getParseTreeNode(node, ts.isIdentifier);
if (node) {
var symbol = getReferencedValueSymbol(node);
- if (symbol && symbol.flags & 8388608) {
+ if (isNonLocalAlias(symbol, 107455)) {
return getDeclarationOfAliasSymbol(symbol);
}
}
@@ -40486,6 +42114,12 @@ var ts;
parameter.initializer &&
!(ts.getModifierFlags(parameter) & 92);
}
+ function isOptionalUninitializedParameterProperty(parameter) {
+ return strictNullChecks &&
+ isOptionalParameter(parameter) &&
+ !parameter.initializer &&
+ !!(ts.getModifierFlags(parameter) & 92);
+ }
function getNodeCheckFlags(node) {
return getNodeLinks(node).flags;
}
@@ -40546,7 +42180,7 @@ var ts;
else if (isTypeOfKind(type, 136)) {
return ts.TypeReferenceSerializationKind.BooleanType;
}
- else if (isTypeOfKind(type, 340)) {
+ else if (isTypeOfKind(type, 84)) {
return ts.TypeReferenceSerializationKind.NumberLikeType;
}
else if (isTypeOfKind(type, 262178)) {
@@ -40573,8 +42207,8 @@ var ts;
var type = symbol && !(symbol.flags & (2048 | 131072))
? getWidenedLiteralType(getTypeOfSymbol(symbol))
: unknownType;
- if (flags & 4096) {
- type = includeFalsyTypes(type, 2048);
+ if (flags & 8192) {
+ type = getNullableType(type, 2048);
}
getSymbolDisplayBuilder().buildTypeDisplay(type, writer, enclosingDeclaration, flags);
}
@@ -40586,15 +42220,6 @@ var ts;
var type = getWidenedType(getRegularTypeOfExpression(expr));
getSymbolDisplayBuilder().buildTypeDisplay(type, writer, enclosingDeclaration, flags);
}
- function writeBaseConstructorTypeOfClass(node, enclosingDeclaration, flags, writer) {
- 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.has(name);
}
@@ -40670,10 +42295,10 @@ var ts;
isDeclarationVisible: isDeclarationVisible,
isImplementationOfOverload: isImplementationOfOverload,
isRequiredInitializedParameter: isRequiredInitializedParameter,
+ isOptionalUninitializedParameterProperty: isOptionalUninitializedParameterProperty,
writeTypeOfDeclaration: writeTypeOfDeclaration,
writeReturnTypeOfSignatureDeclaration: writeReturnTypeOfSignatureDeclaration,
writeTypeOfExpression: writeTypeOfExpression,
- writeBaseConstructorTypeOfClass: writeBaseConstructorTypeOfClass,
isSymbolAccessible: isSymbolAccessible,
isEntityNameVisible: isEntityNameVisible,
getConstantValue: function (node) {
@@ -40820,7 +42445,7 @@ var ts;
var helpersModule = resolveHelpersModule(sourceFile, location);
if (helpersModule !== unknownSymbol) {
var uncheckedHelpers = helpers & ~requestedExternalEmitHelpers;
- for (var helper = 1; helper <= 8192; helper <<= 1) {
+ for (var helper = 1; helper <= 32768; helper <<= 1) {
if (uncheckedHelpers & helper) {
var name = getHelperName(helper);
var symbol = getSymbol(helpersModule.exports, ts.escapeIdentifier(name), 107455);
@@ -40847,10 +42472,12 @@ var ts;
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.");
+ case 2048: return "__await";
+ case 4096: return "__asyncGenerator";
+ case 8192: return "__asyncDelegator";
+ case 16384: return "__asyncValues";
+ case 32768: return "__exportStar";
+ default: ts.Debug.fail("Unrecognized helper");
}
}
function resolveHelpersModule(node, errorNode) {
@@ -41274,6 +42901,10 @@ var ts;
var sourceFile = ts.getSourceFileOfNode(node);
return grammarErrorAtPos(sourceFile, types.pos, 0, ts.Diagnostics._0_list_cannot_be_empty, listType);
}
+ return ts.forEach(types, checkGrammarExpressionWithTypeArguments);
+ }
+ function checkGrammarExpressionWithTypeArguments(node) {
+ return checkGrammarTypeArguments(node, node.typeArguments);
}
function checkGrammarClassDeclarationHeritageClauses(node) {
var seenExtendsClause = false;
@@ -41823,7 +43454,7 @@ var ts;
}
function checkGrammarStatementInAmbientContext(node) {
if (ts.isInAmbientContext(node)) {
- if (isAccessor(node.parent.kind)) {
+ if (ts.isAccessor(node.parent)) {
return getNodeLinks(node).hasReportedStatementInAmbientContext = true;
}
var links = getNodeLinks(node);
@@ -41876,8 +43507,32 @@ var ts;
});
return result;
}
+ function checkGrammarImportCallExpression(node) {
+ if (modulekind === ts.ModuleKind.ES2015) {
+ return grammarErrorOnNode(node, ts.Diagnostics.Dynamic_import_cannot_be_used_when_targeting_ECMAScript_2015_modules);
+ }
+ if (node.typeArguments) {
+ return grammarErrorOnNode(node, ts.Diagnostics.Dynamic_import_cannot_have_type_arguments);
+ }
+ var nodeArguments = node.arguments;
+ if (nodeArguments.length !== 1) {
+ return grammarErrorOnNode(node, ts.Diagnostics.Dynamic_import_must_have_one_specifier_as_an_argument);
+ }
+ if (ts.isSpreadElement(nodeArguments[0])) {
+ return grammarErrorOnNode(nodeArguments[0], ts.Diagnostics.Specifier_of_dynamic_import_cannot_be_spread_element);
+ }
+ }
}
ts.createTypeChecker = createTypeChecker;
+ function isDeclarationNameOrImportPropertyName(name) {
+ switch (name.parent.kind) {
+ case 242:
+ case 246:
+ return true;
+ default:
+ return ts.isDeclarationName(name);
+ }
+ }
})(ts || (ts = {}));
var ts;
(function (ts) {
@@ -41988,73 +43643,69 @@ var ts;
if ((kind > 0 && kind <= 142) || kind === 169) {
return node;
}
- switch (node.kind) {
- case 206:
- case 209:
- case 200:
- case 225:
- case 298:
- case 247:
- return node;
+ switch (kind) {
+ case 71:
+ return ts.updateIdentifier(node, nodesVisitor(node.typeArguments, visitor, ts.isTypeNode));
case 143:
return ts.updateQualifiedName(node, visitNode(node.left, visitor, ts.isEntityName), visitNode(node.right, visitor, ts.isIdentifier));
case 144:
return ts.updateComputedPropertyName(node, visitNode(node.expression, visitor, ts.isExpression));
- case 160:
- return ts.updateFunctionTypeNode(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode));
- case 161:
- return ts.updateConstructorTypeNode(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode));
- case 155:
- return ts.updateCallSignatureDeclaration(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode));
- case 156:
- return ts.updateConstructSignatureDeclaration(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode));
- case 150:
- 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 157:
- 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.updateTypeParameterDeclaration(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.constraint, visitor, ts.isTypeNode), visitNode(node.default, visitor, ts.isTypeNode));
case 146:
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 147:
return ts.updateDecorator(node, visitNode(node.expression, visitor, ts.isExpression));
- case 159:
- return ts.updateTypeReferenceNode(node, visitNode(node.typeName, visitor, ts.isEntityName), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode));
+ case 148:
+ return ts.updatePropertySignature(node, nodesVisitor(node.modifiers, visitor, ts.isToken), 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 149:
+ 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.updateMethodSignature(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.questionToken, tokenVisitor, ts.isToken));
+ case 151:
+ 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.isTypeParameterDeclaration), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context));
+ case 152:
+ 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 153:
+ 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 154:
+ 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 155:
+ return ts.updateCallSignature(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), visitNode(node.type, visitor, ts.isTypeNode));
+ case 156:
+ return ts.updateConstructSignature(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), visitNode(node.type, visitor, ts.isTypeNode));
+ case 157:
+ return ts.updateIndexSignature(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), visitNode(node.type, visitor, ts.isTypeNode));
case 158:
return ts.updateTypePredicateNode(node, visitNode(node.parameterName, visitor), visitNode(node.type, visitor, ts.isTypeNode));
+ case 159:
+ return ts.updateTypeReferenceNode(node, visitNode(node.typeName, visitor, ts.isEntityName), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode));
+ case 160:
+ return ts.updateFunctionTypeNode(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), visitNode(node.type, visitor, ts.isTypeNode));
+ case 161:
+ return ts.updateConstructorTypeNode(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), visitNode(node.type, visitor, ts.isTypeNode));
case 162:
return ts.updateTypeQueryNode(node, visitNode(node.exprName, visitor, ts.isEntityName));
case 163:
- return ts.updateTypeLiteralNode(node, nodesVisitor(node.members, visitor));
+ return ts.updateTypeLiteralNode(node, nodesVisitor(node.members, visitor, ts.isTypeElement));
case 164:
return ts.updateArrayTypeNode(node, visitNode(node.elementType, visitor, ts.isTypeNode));
case 165:
return ts.updateTypleTypeNode(node, nodesVisitor(node.elementTypes, visitor, ts.isTypeNode));
case 166:
+ return ts.updateUnionTypeNode(node, nodesVisitor(node.types, visitor, ts.isTypeNode));
case 167:
- return ts.updateUnionOrIntersectionTypeNode(node, nodesVisitor(node.types, visitor, ts.isTypeNode));
+ return ts.updateIntersectionTypeNode(node, nodesVisitor(node.types, visitor, ts.isTypeNode));
case 168:
- throw ts.Debug.fail("not implemented.");
+ return ts.updateParenthesizedType(node, visitNode(node.type, visitor, ts.isTypeNode));
case 170:
return ts.updateTypeOperatorNode(node, visitNode(node.type, visitor, ts.isTypeNode));
case 171:
return ts.updateIndexedAccessTypeNode(node, visitNode(node.objectType, visitor, ts.isTypeNode), visitNode(node.indexType, visitor, ts.isTypeNode));
case 172:
- 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));
+ return ts.updateMappedTypeNode(node, visitNode(node.readonlyToken, tokenVisitor, ts.isToken), visitNode(node.typeParameter, visitor, ts.isTypeParameterDeclaration), visitNode(node.questionToken, tokenVisitor, ts.isToken), visitNode(node.type, visitor, ts.isTypeNode));
case 173:
return ts.updateLiteralTypeNode(node, visitNode(node.literal, visitor, ts.isExpression));
- case 145:
- return ts.updateTypeParameterDeclaration(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.constraint, visitor, ts.isTypeNode), visitNode(node.default, visitor, ts.isTypeNode));
- case 148:
- 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 149:
- 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 151:
- 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 152:
- 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 153:
- 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 154:
- 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 174:
return ts.updateObjectBindingPattern(node, nodesVisitor(node.elements, visitor, ts.isBindingElement));
case 175:
@@ -42080,9 +43731,9 @@ var ts;
case 185:
return ts.updateParen(node, visitNode(node.expression, visitor, ts.isExpression));
case 186:
- 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));
+ 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.isTypeParameterDeclaration), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context));
case 187:
- 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));
+ return ts.updateArrowFunction(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context));
case 188:
return ts.updateDelete(node, visitNode(node.expression, visitor, ts.isExpression));
case 189:
@@ -42091,12 +43742,12 @@ var ts;
return ts.updateVoid(node, visitNode(node.expression, visitor, ts.isExpression));
case 191:
return ts.updateAwait(node, visitNode(node.expression, visitor, ts.isExpression));
- case 194:
- return ts.updateBinary(node, visitNode(node.left, visitor, ts.isExpression), visitNode(node.right, visitor, ts.isExpression));
case 192:
return ts.updatePrefix(node, visitNode(node.operand, visitor, ts.isExpression));
case 193:
return ts.updatePostfix(node, visitNode(node.operand, visitor, ts.isExpression));
+ case 194:
+ return ts.updateBinary(node, visitNode(node.left, visitor, ts.isExpression), visitNode(node.right, visitor, ts.isExpression), visitNode(node.operatorToken, visitor, ts.isToken));
case 195:
return ts.updateConditional(node, visitNode(node.condition, visitor, ts.isExpression), visitNode(node.whenTrue, visitor, ts.isExpression), visitNode(node.whenFalse, visitor, ts.isExpression));
case 196:
@@ -42106,13 +43757,15 @@ var ts;
case 198:
return ts.updateSpread(node, visitNode(node.expression, visitor, ts.isExpression));
case 199:
- 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));
+ return ts.updateClassExpression(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.heritageClauses, visitor, ts.isHeritageClause), nodesVisitor(node.members, visitor, ts.isClassElement));
case 201:
return ts.updateExpressionWithTypeArguments(node, nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), visitNode(node.expression, visitor, ts.isExpression));
case 202:
return ts.updateAsExpression(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.type, visitor, ts.isTypeNode));
case 203:
return ts.updateNonNullExpression(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 204:
+ return ts.updateMetaProperty(node, visitNode(node.name, visitor, ts.isIdentifier));
case 205:
return ts.updateTemplateSpan(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.literal, visitor, ts.isTemplateMiddleOrTemplateTail));
case 207:
@@ -42154,9 +43807,13 @@ var ts;
case 227:
return ts.updateVariableDeclarationList(node, nodesVisitor(node.declarations, visitor, ts.isVariableDeclaration));
case 228:
- 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));
+ 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.isTypeParameterDeclaration), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context));
case 229:
- 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));
+ 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.isTypeParameterDeclaration), nodesVisitor(node.heritageClauses, visitor, ts.isHeritageClause), nodesVisitor(node.members, visitor, ts.isClassElement));
+ case 230:
+ return ts.updateInterfaceDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.heritageClauses, visitor, ts.isHeritageClause), nodesVisitor(node.members, visitor, ts.isTypeElement));
+ case 231:
+ return ts.updateTypeAliasDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), visitNode(node.type, visitor, ts.isTypeNode));
case 232:
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 233:
@@ -42165,6 +43822,8 @@ var ts;
return ts.updateModuleBlock(node, nodesVisitor(node.statements, visitor, ts.isStatement));
case 235:
return ts.updateCaseBlock(node, nodesVisitor(node.clauses, visitor, ts.isCaseOrDefaultClause));
+ case 236:
+ return ts.updateNamespaceExportDeclaration(node, visitNode(node.name, visitor, ts.isIdentifier));
case 237:
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 238:
@@ -42189,8 +43848,6 @@ var ts;
return ts.updateExternalModuleReference(node, visitNode(node.expression, visitor, ts.isExpression));
case 249:
return ts.updateJsxElement(node, visitNode(node.openingElement, visitor, ts.isJsxOpeningElement), nodesVisitor(node.children, visitor, ts.isJsxChild), visitNode(node.closingElement, visitor, ts.isJsxClosingElement));
- case 254:
- return ts.updateJsxAttributes(node, nodesVisitor(node.properties, visitor, ts.isJsxAttributeLike));
case 250:
return ts.updateJsxSelfClosingElement(node, visitNode(node.tagName, visitor, ts.isJsxTagNameExpression), visitNode(node.attributes, visitor, ts.isJsxAttributes));
case 251:
@@ -42199,6 +43856,8 @@ var ts;
return ts.updateJsxClosingElement(node, visitNode(node.tagName, visitor, ts.isJsxTagNameExpression));
case 253:
return ts.updateJsxAttribute(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.initializer, visitor, ts.isStringLiteralOrJsxExpression));
+ case 254:
+ return ts.updateJsxAttributes(node, nodesVisitor(node.properties, visitor, ts.isJsxAttributeLike));
case 255:
return ts.updateJsxSpreadAttribute(node, visitNode(node.expression, visitor, ts.isExpression));
case 256:
@@ -42221,8 +43880,10 @@ var ts;
return ts.updateEnumMember(node, visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.initializer, visitor, ts.isExpression));
case 265:
return ts.updateSourceFileNode(node, visitLexicalEnvironment(node.statements, visitor, context));
- case 296:
+ case 297:
return ts.updatePartiallyEmittedExpression(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 298:
+ return ts.updateCommaList(node, nodesVisitor(node.elements, visitor, ts.isExpression));
default:
return node;
}
@@ -42259,7 +43920,7 @@ var ts;
case 209:
case 200:
case 225:
- case 295:
+ case 296:
break;
case 143:
result = reduceNode(node.left, cbNode, result);
@@ -42278,6 +43939,13 @@ var ts;
case 147:
result = reduceNode(node.expression, cbNode, result);
break;
+ case 148:
+ result = reduceNodes(node.modifiers, cbNodes, result);
+ result = reduceNode(node.name, cbNode, result);
+ result = reduceNode(node.questionToken, cbNode, result);
+ result = reduceNode(node.type, cbNode, result);
+ result = reduceNode(node.initializer, cbNode, result);
+ break;
case 149:
result = reduceNodes(node.decorators, cbNodes, result);
result = reduceNodes(node.modifiers, cbNodes, result);
@@ -42613,9 +44281,12 @@ var ts;
case 265:
result = reduceNodes(node.statements, cbNodes, result);
break;
- case 296:
+ case 297:
result = reduceNode(node.expression, cbNode, result);
break;
+ case 298:
+ result = reduceNodes(node.elements, cbNodes, result);
+ break;
default:
break;
}
@@ -42679,37 +44350,65 @@ var ts;
}
var Debug;
(function (Debug) {
+ var isDebugInfoEnabled = false;
Debug.failBadSyntaxKind = Debug.shouldAssert(1)
- ? function (node, message) { return Debug.assert(false, message || "Unexpected node.", function () { return "Node " + ts.formatSyntaxKind(node.kind) + " was unexpected."; }); }
+ ? function (node, message) { return Debug.fail((message || "Unexpected node.") + "\r\nNode " + ts.formatSyntaxKind(node.kind) + " was unexpected.", Debug.failBadSyntaxKind); }
: ts.noop;
Debug.assertEachNode = Debug.shouldAssert(1)
- ? function (nodes, test, message) { return Debug.assert(test === undefined || ts.every(nodes, test), message || "Unexpected node.", function () { return "Node array did not pass test '" + getFunctionName(test) + "'."; }); }
+ ? function (nodes, test, message) { return Debug.assert(test === undefined || ts.every(nodes, test), message || "Unexpected node.", function () { return "Node array did not pass test '" + Debug.getFunctionName(test) + "'."; }, Debug.assertEachNode); }
: ts.noop;
Debug.assertNode = Debug.shouldAssert(1)
- ? function (node, test, message) { return Debug.assert(test === undefined || test(node), message || "Unexpected node.", function () { return "Node " + ts.formatSyntaxKind(node.kind) + " did not pass test '" + getFunctionName(test) + "'."; }); }
+ ? function (node, test, message) { return Debug.assert(test === undefined || test(node), message || "Unexpected node.", function () { return "Node " + ts.formatSyntaxKind(node.kind) + " did not pass test '" + Debug.getFunctionName(test) + "'."; }, Debug.assertNode); }
: ts.noop;
Debug.assertOptionalNode = Debug.shouldAssert(1)
- ? function (node, test, message) { return Debug.assert(test === undefined || node === undefined || test(node), message || "Unexpected node.", function () { return "Node " + ts.formatSyntaxKind(node.kind) + " did not pass test '" + getFunctionName(test) + "'."; }); }
+ ? function (node, test, message) { return Debug.assert(test === undefined || node === undefined || test(node), message || "Unexpected node.", function () { return "Node " + ts.formatSyntaxKind(node.kind) + " did not pass test '" + Debug.getFunctionName(test) + "'."; }, Debug.assertOptionalNode); }
: ts.noop;
Debug.assertOptionalToken = Debug.shouldAssert(1)
- ? function (node, kind, message) { return Debug.assert(kind === undefined || node === undefined || node.kind === kind, message || "Unexpected node.", function () { return "Node " + ts.formatSyntaxKind(node.kind) + " was not a '" + ts.formatSyntaxKind(kind) + "' token."; }); }
+ ? function (node, kind, message) { return Debug.assert(kind === undefined || node === undefined || node.kind === kind, message || "Unexpected node.", function () { return "Node " + ts.formatSyntaxKind(node.kind) + " was not a '" + ts.formatSyntaxKind(kind) + "' token."; }, Debug.assertOptionalToken); }
: ts.noop;
Debug.assertMissingNode = Debug.shouldAssert(1)
- ? function (node, message) { return Debug.assert(node === undefined, message || "Unexpected node.", function () { return "Node " + ts.formatSyntaxKind(node.kind) + " was unexpected'."; }); }
+ ? function (node, message) { return Debug.assert(node === undefined, message || "Unexpected node.", function () { return "Node " + ts.formatSyntaxKind(node.kind) + " was unexpected'."; }, Debug.assertMissingNode); }
: ts.noop;
- function getFunctionName(func) {
- if (typeof func !== "function") {
- return "";
- }
- else if (func.hasOwnProperty("name")) {
- return func.name;
- }
- else {
- var text = Function.prototype.toString.call(func);
- var match = /^function\s+([\w\$]+)\s*\(/.exec(text);
- return match ? match[1] : "";
+ function enableDebugInfo() {
+ if (isDebugInfoEnabled)
+ return;
+ Object.defineProperties(ts.objectAllocator.getSymbolConstructor().prototype, {
+ "__debugFlags": { get: function () { return ts.formatSymbolFlags(this.flags); } }
+ });
+ Object.defineProperties(ts.objectAllocator.getTypeConstructor().prototype, {
+ "__debugFlags": { get: function () { return ts.formatTypeFlags(this.flags); } },
+ "__debugObjectFlags": { get: function () { return this.flags & 32768 ? ts.formatObjectFlags(this.objectFlags) : ""; } },
+ "__debugTypeToString": { value: function () { return this.checker.typeToString(this); } },
+ });
+ var nodeConstructors = [
+ ts.objectAllocator.getNodeConstructor(),
+ ts.objectAllocator.getIdentifierConstructor(),
+ ts.objectAllocator.getTokenConstructor(),
+ ts.objectAllocator.getSourceFileConstructor()
+ ];
+ for (var _i = 0, nodeConstructors_1 = nodeConstructors; _i < nodeConstructors_1.length; _i++) {
+ var ctor = nodeConstructors_1[_i];
+ if (!ctor.prototype.hasOwnProperty("__debugKind")) {
+ Object.defineProperties(ctor.prototype, {
+ "__debugKind": { get: function () { return ts.formatSyntaxKind(this.kind); } },
+ "__debugModifierFlags": { get: function () { return ts.formatModifierFlags(ts.getModifierFlagsNoCache(this)); } },
+ "__debugTransformFlags": { get: function () { return ts.formatTransformFlags(this.transformFlags); } },
+ "__debugEmitFlags": { get: function () { return ts.formatEmitFlags(ts.getEmitFlags(this)); } },
+ "__debugGetText": {
+ value: function (includeTrivia) {
+ if (ts.nodeIsSynthesized(this))
+ return "";
+ var parseNode = ts.getParseTreeNode(this);
+ var sourceFile = parseNode && ts.getSourceFileOfNode(parseNode);
+ return sourceFile ? ts.getSourceTextOfNodeFromSourceFile(sourceFile, parseNode, includeTrivia) : "";
+ }
+ }
+ });
+ }
}
+ isDebugInfoEnabled = true;
}
+ Debug.enableDebugInfo = enableDebugInfo;
})(Debug = ts.Debug || (ts.Debug = {}));
})(ts || (ts = {}));
var ts;
@@ -43044,6 +44743,22 @@ var ts;
TypeScriptSubstitutionFlags[TypeScriptSubstitutionFlags["NamespaceExports"] = 2] = "NamespaceExports";
TypeScriptSubstitutionFlags[TypeScriptSubstitutionFlags["NonQualifiedEnumMembers"] = 8] = "NonQualifiedEnumMembers";
})(TypeScriptSubstitutionFlags || (TypeScriptSubstitutionFlags = {}));
+ var ClassFacts;
+ (function (ClassFacts) {
+ ClassFacts[ClassFacts["None"] = 0] = "None";
+ ClassFacts[ClassFacts["HasStaticInitializedProperties"] = 1] = "HasStaticInitializedProperties";
+ ClassFacts[ClassFacts["HasConstructorDecorators"] = 2] = "HasConstructorDecorators";
+ ClassFacts[ClassFacts["HasMemberDecorators"] = 4] = "HasMemberDecorators";
+ ClassFacts[ClassFacts["IsExportOfNamespace"] = 8] = "IsExportOfNamespace";
+ ClassFacts[ClassFacts["IsNamedExternalExport"] = 16] = "IsNamedExternalExport";
+ ClassFacts[ClassFacts["IsDefaultExternalExport"] = 32] = "IsDefaultExternalExport";
+ ClassFacts[ClassFacts["HasExtendsClause"] = 64] = "HasExtendsClause";
+ ClassFacts[ClassFacts["UseImmediatelyInvokedFunctionExpression"] = 128] = "UseImmediatelyInvokedFunctionExpression";
+ ClassFacts[ClassFacts["HasAnyDecorators"] = 6] = "HasAnyDecorators";
+ ClassFacts[ClassFacts["NeedsName"] = 5] = "NeedsName";
+ ClassFacts[ClassFacts["MayNeedImmediatelyInvokedFunctionExpression"] = 7] = "MayNeedImmediatelyInvokedFunctionExpression";
+ ClassFacts[ClassFacts["IsExported"] = 56] = "IsExported";
+ })(ClassFacts || (ClassFacts = {}));
function transformTypeScript(context) {
var startLexicalEnvironment = context.startLexicalEnvironment, resumeLexicalEnvironment = context.resumeLexicalEnvironment, endLexicalEnvironment = context.endLexicalEnvironment, hoistVariableDeclaration = context.hoistVariableDeclaration;
var resolver = context.getEmitResolver();
@@ -43066,7 +44781,7 @@ var ts;
var applicableSubstitutions;
return transformSourceFile;
function transformSourceFile(node) {
- if (ts.isDeclarationFile(node)) {
+ if (node.isDeclarationFile) {
return node;
}
currentSourceFile = node;
@@ -43224,6 +44939,7 @@ var ts;
case 147:
case 231:
case 149:
+ case 236:
return undefined;
case 152:
return visitConstructor(node);
@@ -43295,45 +45011,87 @@ var ts;
function shouldEmitDecorateCallForParameter(parameter) {
return parameter.decorators !== undefined && parameter.decorators.length > 0;
}
+ function getClassFacts(node, staticProperties) {
+ var facts = 0;
+ if (ts.some(staticProperties))
+ facts |= 1;
+ if (ts.getClassExtendsHeritageClauseElement(node))
+ facts |= 64;
+ if (shouldEmitDecorateCallForClass(node))
+ facts |= 2;
+ if (ts.childIsDecorated(node))
+ facts |= 4;
+ if (isExportOfNamespace(node))
+ facts |= 8;
+ else if (isDefaultExternalModuleExport(node))
+ facts |= 32;
+ else if (isNamedExternalModuleExport(node))
+ facts |= 16;
+ if (languageVersion <= 1 && (facts & 7))
+ facts |= 128;
+ return facts;
+ }
function visitClassDeclaration(node) {
var staticProperties = getInitializedProperties(node, true);
- var hasExtendsClause = ts.getClassExtendsHeritageClauseElement(node) !== undefined;
- var isDecoratedClass = shouldEmitDecorateCallForClass(node);
- var name = node.name;
- if (!name && (staticProperties.length > 0 || ts.childIsDecorated(node))) {
- name = ts.getGeneratedNameForNode(node);
- }
- var classStatement = isDecoratedClass
- ? createClassDeclarationHeadWithDecorators(node, name, hasExtendsClause)
- : createClassDeclarationHeadWithoutDecorators(node, name, hasExtendsClause, staticProperties.length > 0);
+ var facts = getClassFacts(node, staticProperties);
+ if (facts & 128) {
+ context.startLexicalEnvironment();
+ }
+ var name = node.name || (facts & 5 ? ts.getGeneratedNameForNode(node) : undefined);
+ var classStatement = facts & 2
+ ? createClassDeclarationHeadWithDecorators(node, name, facts)
+ : createClassDeclarationHeadWithoutDecorators(node, name, facts);
var statements = [classStatement];
- if (staticProperties.length) {
- addInitializedPropertyStatements(statements, staticProperties, ts.getLocalName(node));
+ if (facts & 1) {
+ addInitializedPropertyStatements(statements, staticProperties, facts & 128 ? ts.getInternalName(node) : ts.getLocalName(node));
}
addClassElementDecorationStatements(statements, node, false);
addClassElementDecorationStatements(statements, node, true);
addConstructorDecorationStatement(statements, node);
- if (isNamespaceExport(node)) {
+ if (facts & 128) {
+ var closingBraceLocation = ts.createTokenRange(ts.skipTrivia(currentSourceFile.text, node.members.end), 18);
+ var localName = ts.getInternalName(node);
+ var outer = ts.createPartiallyEmittedExpression(localName);
+ outer.end = closingBraceLocation.end;
+ ts.setEmitFlags(outer, 1536);
+ var statement = ts.createReturn(outer);
+ statement.pos = closingBraceLocation.pos;
+ ts.setEmitFlags(statement, 1536 | 384);
+ statements.push(statement);
+ ts.addRange(statements, context.endLexicalEnvironment());
+ var varStatement = ts.createVariableStatement(undefined, ts.createVariableDeclarationList([
+ ts.createVariableDeclaration(ts.getLocalName(node, false, false), undefined, ts.createImmediatelyInvokedFunctionExpression(statements))
+ ]));
+ ts.setOriginalNode(varStatement, node);
+ ts.setCommentRange(varStatement, node);
+ ts.setSourceMapRange(varStatement, ts.moveRangePastDecorators(node));
+ ts.startOnNewLine(varStatement);
+ statements = [varStatement];
+ }
+ if (facts & 8) {
addExportMemberAssignment(statements, node);
}
- else if (isDecoratedClass) {
- if (isDefaultExternalModuleExport(node)) {
+ else if (facts & 128 || facts & 2) {
+ if (facts & 32) {
statements.push(ts.createExportDefault(ts.getLocalName(node, false, true)));
}
- else if (isNamedExternalModuleExport(node)) {
+ else if (facts & 16) {
statements.push(ts.createExternalModuleExport(ts.getLocalName(node, false, true)));
}
}
if (statements.length > 1) {
statements.push(ts.createEndOfDeclarationMarker(node));
- ts.setEmitFlags(classStatement, ts.getEmitFlags(classStatement) | 2097152);
+ ts.setEmitFlags(classStatement, ts.getEmitFlags(classStatement) | 4194304);
}
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));
+ function createClassDeclarationHeadWithoutDecorators(node, name, facts) {
+ var modifiers = !(facts & 128)
+ ? ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier)
+ : undefined;
+ var classDeclaration = ts.createClassDeclaration(undefined, modifiers, name, undefined, ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause), transformClassMembers(node, (facts & 64) !== 0));
var emitFlags = ts.getEmitFlags(node);
- if (hasStaticProperties) {
+ if (facts & 1) {
emitFlags |= 32;
}
ts.setTextRange(classDeclaration, node);
@@ -43341,12 +45099,12 @@ var ts;
ts.setEmitFlags(classDeclaration, emitFlags);
return classDeclaration;
}
- function createClassDeclarationHeadWithDecorators(node, name, hasExtendsClause) {
+ function createClassDeclarationHeadWithDecorators(node, name, facts) {
var location = ts.moveRangePastDecorators(node);
var classAlias = getClassAliasIfNeeded(node);
var declName = ts.getLocalName(node, false, true);
var heritageClauses = ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause);
- var members = transformClassMembers(node, hasExtendsClause);
+ var members = transformClassMembers(node, (facts & 64) !== 0);
var classExpression = ts.createClassExpression(undefined, name, undefined, heritageClauses, members);
ts.setOriginalNode(classExpression, node);
ts.setTextRange(classExpression, location);
@@ -43372,7 +45130,7 @@ var ts;
enableSubstitutionForClassAliases();
classAliases[ts.getOriginalNodeId(node)] = ts.getSynthesizedClone(temp);
}
- ts.setEmitFlags(classExpression, 32768 | ts.getEmitFlags(classExpression));
+ ts.setEmitFlags(classExpression, 65536 | ts.getEmitFlags(classExpression));
expressions.push(ts.startOnNewLine(ts.createAssignment(temp, classExpression)));
ts.addRange(expressions, generateInitializedPropertyExpressions(staticProperties, temp));
expressions.push(ts.startOnNewLine(temp));
@@ -43600,8 +45358,8 @@ var ts;
function generateClassElementDecorationExpressions(node, isStatic) {
var members = getDecoratedClassElements(node, isStatic);
var expressions;
- for (var _i = 0, members_2 = members; _i < members_2.length; _i++) {
- var member = members_2[_i];
+ for (var _i = 0, members_3 = members; _i < members_3.length; _i++) {
+ var member = members_3[_i];
var expression = generateClassElementDecorationExpression(node, member);
if (expression) {
if (!expressions) {
@@ -43855,15 +45613,10 @@ var ts;
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") {
+ if (ts.isIdentifier(serializedIndividual) && serializedIndividual.text === "Object") {
return serializedIndividual;
}
- else if (serializedUnion && !ts.isVoidExpression(serializedUnion)) {
+ else if (serializedUnion) {
if (!ts.isIdentifier(serializedUnion) ||
!ts.isIdentifier(serializedIndividual) ||
serializedUnion.text !== serializedIndividual.text) {
@@ -44028,7 +45781,7 @@ var ts;
return ts.createNotEmittedStatement(node);
}
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)) {
+ if (isExportOfNamespace(node)) {
var statements = [updated];
addExportMemberAssignment(statements, node);
return statements;
@@ -44059,7 +45812,7 @@ var ts;
return parameter;
}
function visitVariableStatement(node) {
- if (isNamespaceExport(node)) {
+ if (isExportOfNamespace(node)) {
var variables = ts.getInitializedVariables(node.declarationList);
if (variables.length === 0) {
return undefined;
@@ -44150,7 +45903,12 @@ var ts;
}
function transformEnumMember(member) {
var name = getExpressionForPropertyName(member, false);
- return ts.setTextRange(ts.createStatement(ts.setTextRange(ts.createAssignment(ts.createElementAccess(currentNamespaceContainerName, ts.createAssignment(ts.createElementAccess(currentNamespaceContainerName, name), transformEnumMemberDeclarationValue(member))), name), member)), member);
+ var valueExpression = transformEnumMemberDeclarationValue(member);
+ var innerAssignment = ts.createAssignment(ts.createElementAccess(currentNamespaceContainerName, name), valueExpression);
+ var outerAssignment = valueExpression.kind === 9 ?
+ innerAssignment :
+ ts.createAssignment(ts.createElementAccess(currentNamespaceContainerName, innerAssignment), name);
+ return ts.setTextRange(ts.createStatement(ts.setTextRange(outerAssignment, member)), member);
}
function transformEnumMemberDeclarationValue(member) {
var value = resolver.getConstantValue(member);
@@ -44171,7 +45929,7 @@ var ts;
return ts.isInstantiatedModule(node, compilerOptions.preserveConstEnums || compilerOptions.isolatedModules);
}
function hasNamespaceQualifiedExportName(node) {
- return isNamespaceExport(node)
+ return isExportOfNamespace(node)
|| (isExternalModuleExport(node)
&& moduleKind !== ts.ModuleKind.ES2015
&& moduleKind !== ts.ModuleKind.System);
@@ -44197,9 +45955,9 @@ var ts;
return false;
}
function addVarForEnumOrModuleDeclaration(statements, node) {
- var statement = ts.createVariableStatement(ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), [
+ var statement = ts.createVariableStatement(ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), ts.createVariableDeclarationList([
ts.createVariableDeclaration(ts.getLocalName(node, false, true))
- ]);
+ ], currentScope.kind === 265 ? 0 : 1));
ts.setOriginalNode(statement, node);
recordEmittedDeclarationInScope(node);
if (isFirstEmittedDeclarationInScope(node)) {
@@ -44210,13 +45968,13 @@ var ts;
ts.setSourceMapRange(statement, node);
}
ts.setCommentRange(statement, node);
- ts.setEmitFlags(statement, 1024 | 2097152);
+ ts.setEmitFlags(statement, 1024 | 4194304);
statements.push(statement);
return true;
}
else {
var mergeMarker = ts.createMergeDeclarationMarker(statement);
- ts.setEmitFlags(mergeMarker, 1536 | 2097152);
+ ts.setEmitFlags(mergeMarker, 1536 | 4194304);
statements.push(mergeMarker);
return false;
}
@@ -44332,7 +46090,7 @@ var ts;
}
function visitExportDeclaration(node) {
if (!node.exportClause) {
- return resolver.moduleExportsSomeValue(node.moduleSpecifier) ? node : undefined;
+ return compilerOptions.isolatedModules || resolver.moduleExportsSomeValue(node.moduleSpecifier) ? node : undefined;
}
if (!resolver.isValueAliasDeclaration(node)) {
return undefined;
@@ -44365,7 +46123,7 @@ var ts;
}
var moduleReference = ts.createExpressionFromEntityName(node.moduleReference);
ts.setEmitFlags(moduleReference, 1536 | 2048);
- if (isNamedExternalModuleExport(node) || !isNamespaceExport(node)) {
+ if (isNamedExternalModuleExport(node) || !isExportOfNamespace(node)) {
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);
@@ -44374,7 +46132,7 @@ var ts;
return ts.setOriginalNode(createNamespaceExport(node.name, moduleReference, node), node);
}
}
- function isNamespaceExport(node) {
+ function isExportOfNamespace(node) {
return currentNamespace !== undefined && ts.hasModifier(node, 1);
}
function isExternalModuleExport(node) {
@@ -44522,10 +46280,10 @@ var ts;
if (declaration) {
var classAlias = classAliases[declaration.id];
if (classAlias) {
- var clone_2 = ts.getSynthesizedClone(classAlias);
- ts.setSourceMapRange(clone_2, node);
- ts.setCommentRange(clone_2, node);
- return clone_2;
+ var clone_1 = ts.getSynthesizedClone(classAlias);
+ ts.setSourceMapRange(clone_1, node);
+ ts.setCommentRange(clone_1, node);
+ return clone_1;
}
}
}
@@ -44642,7 +46400,7 @@ var ts;
context.onSubstituteNode = onSubstituteNode;
return transformSourceFile;
function transformSourceFile(node) {
- if (ts.isDeclarationFile(node)) {
+ if (node.isDeclarationFile) {
return node;
}
currentSourceFile = node;
@@ -44848,7 +46606,7 @@ var ts;
function createAwaiterHelper(context, hasLexicalArguments, promiseConstructor, body) {
context.requestEmitHelper(awaiterHelper);
var generatorFunc = ts.createFunctionExpression(undefined, ts.createToken(39), undefined, undefined, [], undefined, body);
- (generatorFunc.emitNode || (generatorFunc.emitNode = {})).flags |= 131072;
+ (generatorFunc.emitNode || (generatorFunc.emitNode = {})).flags |= 262144;
return ts.createCall(ts.getHelperName("__awaiter"), undefined, [
ts.createThis(),
hasLexicalArguments ? ts.createIdentifier("arguments") : ts.createVoidZero(),
@@ -44887,7 +46645,7 @@ var ts;
var enclosingSuperContainerFlags = 0;
return transformSourceFile;
function transformSourceFile(node) {
- if (ts.isDeclarationFile(node)) {
+ if (node.isDeclarationFile) {
return node;
}
var visited = ts.visitEachChild(node, visitor, context);
@@ -44955,19 +46713,14 @@ var ts;
}
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.setOriginalNode(ts.setTextRange(ts.createYield(createAwaitHelper(context, ts.visitNode(node.expression, visitor, ts.isExpression))), node), node);
}
return ts.visitEachChild(node, visitor, context);
}
function visitYieldExpression(node) {
- if (enclosingFunctionFlags & 2 && enclosingFunctionFlags & 1) {
+ if (enclosingFunctionFlags & 2 && enclosingFunctionFlags & 1 && node.asteriskToken) {
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.setOriginalNode(ts.setTextRange(ts.createYield(createAwaitHelper(context, ts.updateYield(node, node.asteriskToken, createAsyncDelegatorHelper(context, createAsyncValuesHelper(context, expression, expression), expression)))), node), node);
}
return ts.visitEachChild(node, visitor, context);
}
@@ -45094,6 +46847,11 @@ var ts;
}
return ts.setEmitFlags(ts.setTextRange(ts.createBlock(ts.setTextRange(ts.createNodeArray(statements), statementsLocation), true), bodyLocation), 48 | 384);
}
+ function createDownlevelAwait(expression) {
+ return enclosingFunctionFlags & 1
+ ? ts.createYield(undefined, createAwaitHelper(context, expression))
+ : ts.createAwait(expression);
+ }
function transformForAwaitOfStatement(node, outermostLabeledStatement) {
var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
var iterator = ts.isIdentifier(expression) ? ts.getGeneratedNameForNode(expression) : ts.createTempVariable(undefined);
@@ -45101,19 +46859,17 @@ var ts;
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, []));
+ var callValues = createAsyncValuesHelper(context, expression, node.expression);
+ var callNext = ts.createCall(ts.createPropertyAccess(iterator, "next"), undefined, []);
+ var getDone = ts.createPropertyAccess(result, "done");
+ var getValue = ts.createPropertyAccess(result, "value");
+ var callReturn = ts.createFunctionCall(returnMethod, iterator, []);
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);
+ ts.setTextRange(ts.createVariableDeclaration(iterator, undefined, callValues), node.expression),
+ ts.createVariableDeclaration(result)
+ ]), node.expression), 2097152), ts.createComma(ts.createAssignment(result, createDownlevelAwait(callNext)), ts.createLogicalNot(getDone)), undefined, convertForOfStatementHead(node, createDownlevelAwait(getValue))), node), 256);
return ts.createTry(ts.createBlock([
ts.restoreEnclosingLabel(forStatement, outermostLabeledStatement)
]), ts.createCatchClause(ts.createVariableDeclaration(catchVariable), ts.setEmitFlags(ts.createBlock([
@@ -45122,12 +46878,7 @@ var ts;
])))
]), 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)
+ ts.setEmitFlags(ts.createIf(ts.createLogicalAnd(ts.createLogicalAnd(result, ts.createLogicalNot(getDone)), ts.createAssignment(returnMethod, ts.createPropertyAccess(iterator, "return"))), ts.createStatement(createDownlevelAwait(callReturn))), 1)
]), undefined, ts.setEmitFlags(ts.createBlock([
ts.setEmitFlags(ts.createIf(errorRecord, ts.createThrow(ts.createPropertyAccess(errorRecord, "error"))), 1)
]), 1))
@@ -45252,7 +47003,7 @@ var ts;
var declarations = ts.flattenDestructuringBinding(parameter, visitor, context, 1, temp, false, true);
if (ts.some(declarations)) {
var statement = ts.createVariableStatement(undefined, ts.createVariableDeclarationList(declarations));
- ts.setEmitFlags(statement, 524288);
+ ts.setEmitFlags(statement, 1048576);
statements = ts.append(statements, statement);
}
}
@@ -45359,14 +47110,24 @@ var ts;
return ts.createCall(ts.getHelperName("__assign"), undefined, attributesSegments);
}
ts.createAssignHelper = createAssignHelper;
+ var awaitHelper = {
+ name: "typescript:await",
+ scoped: false,
+ text: "\n var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); }\n "
+ };
+ function createAwaitHelper(context, expression) {
+ context.requestEmitHelper(awaitHelper);
+ return ts.createCall(ts.getHelperName("__await"), undefined, [expression]);
+ }
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\" ? send : fulfill, reject); }\n function send(value) { settle(c[2], { value: 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 "
+ 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 || []), i, q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n };\n "
};
function createAsyncGeneratorHelper(context, generatorFunc) {
+ context.requestEmitHelper(awaitHelper);
context.requestEmitHelper(asyncGeneratorHelper);
- (generatorFunc.emitNode || (generatorFunc.emitNode = {})).flags |= 131072;
+ (generatorFunc.emitNode || (generatorFunc.emitNode = {})).flags |= 262144;
return ts.createCall(ts.getHelperName("__asyncGenerator"), undefined, [
ts.createThis(),
ts.createIdentifier("arguments"),
@@ -45376,11 +47137,11 @@ var ts;
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 }; }) }, p;\n return o = __asyncValues(o), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { return function (v) { return v = p && n === \"throw\" ? f(v) : p && v.done ? v : { value: p ? [\"yield\", v.value] : [\"await\", (o[n] || f).call(o, v)], done: false }, p = !p, v; }; }\n };\n "
+ text: "\n var __asyncDelegator = (this && this.__asyncDelegator) || function (o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { if (o[n]) i[n] = function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; }; }\n };\n "
};
function createAsyncDelegatorHelper(context, expression, location) {
+ context.requestEmitHelper(awaitHelper);
context.requestEmitHelper(asyncDelegator);
- context.requestEmitHelper(asyncValues);
return ts.setTextRange(ts.createCall(ts.getHelperName("__asyncDelegator"), undefined, [expression]), location);
}
var asyncValues = {
@@ -45399,7 +47160,7 @@ var ts;
var compilerOptions = context.getCompilerOptions();
return transformSourceFile;
function transformSourceFile(node) {
- if (ts.isDeclarationFile(node)) {
+ if (node.isDeclarationFile) {
return node;
}
var visited = ts.visitEachChild(node, visitor, context);
@@ -45837,7 +47598,7 @@ var ts;
var hoistVariableDeclaration = context.hoistVariableDeclaration;
return transformSourceFile;
function transformSourceFile(node) {
- if (ts.isDeclarationFile(node)) {
+ if (node.isDeclarationFile) {
return node;
}
return ts.visitEachChild(node, visitor, context);
@@ -45979,7 +47740,7 @@ var ts;
var enabledSubstitutions;
return transformSourceFile;
function transformSourceFile(node) {
- if (ts.isDeclarationFile(node)) {
+ if (node.isDeclarationFile) {
return node;
}
currentSourceFile = node;
@@ -46004,11 +47765,58 @@ var ts;
&& node.kind === 219
&& !node.expression;
}
+ function isClassLikeVariableStatement(node) {
+ if (!ts.isVariableStatement(node))
+ return false;
+ var variable = ts.singleOrUndefined(node.declarationList.declarations);
+ return variable
+ && variable.initializer
+ && ts.isIdentifier(variable.name)
+ && (ts.isClassLike(variable.initializer)
+ || (ts.isAssignmentExpression(variable.initializer)
+ && ts.isIdentifier(variable.initializer.left)
+ && ts.isClassLike(variable.initializer.right)));
+ }
+ function isTypeScriptClassWrapper(node) {
+ var call = ts.tryCast(node, ts.isCallExpression);
+ if (!call || ts.isParseTreeNode(call) ||
+ ts.some(call.typeArguments) ||
+ ts.some(call.arguments)) {
+ return false;
+ }
+ var func = ts.tryCast(ts.skipOuterExpressions(call.expression), ts.isFunctionExpression);
+ if (!func || ts.isParseTreeNode(func) ||
+ ts.some(func.typeParameters) ||
+ ts.some(func.parameters) ||
+ func.type ||
+ !func.body) {
+ return false;
+ }
+ var statements = func.body.statements;
+ if (statements.length < 2) {
+ return false;
+ }
+ var firstStatement = statements[0];
+ if (ts.isParseTreeNode(firstStatement) ||
+ !ts.isClassLike(firstStatement) &&
+ !isClassLikeVariableStatement(firstStatement)) {
+ return false;
+ }
+ var lastStatement = ts.elementAt(statements, -1);
+ var returnStatement = ts.tryCast(ts.isVariableStatement(lastStatement) ? ts.elementAt(statements, -2) : lastStatement, ts.isReturnStatement);
+ if (!returnStatement ||
+ !returnStatement.expression ||
+ !ts.isIdentifier(ts.skipOuterExpressions(returnStatement.expression))) {
+ return false;
+ }
+ return true;
+ }
function shouldVisitNode(node) {
return (node.transformFlags & 128) !== 0
|| convertedLoopState !== undefined
|| (hierarchyFacts & 4096 && ts.isStatement(node))
- || (ts.isIterationStatement(node, false) && shouldConvertIterationStatementBody(node));
+ || (ts.isIterationStatement(node, false) && shouldConvertIterationStatementBody(node))
+ || isTypeScriptClassWrapper(node);
}
function visitor(node) {
if (shouldVisitNode(node)) {
@@ -46262,9 +48070,9 @@ var ts;
statements.push(exportStatement);
}
var emitFlags = ts.getEmitFlags(node);
- if ((emitFlags & 2097152) === 0) {
+ if ((emitFlags & 4194304) === 0) {
statements.push(ts.createEndOfDeclarationMarker(node));
- ts.setEmitFlags(statement, emitFlags | 2097152);
+ ts.setEmitFlags(statement, emitFlags | 4194304);
}
return ts.singleOrMany(statements);
}
@@ -46277,8 +48085,8 @@ var ts;
}
var extendsClauseElement = ts.getClassExtendsHeritageClauseElement(node);
var classFunction = ts.createFunctionExpression(undefined, undefined, undefined, undefined, extendsClauseElement ? [ts.createParameter(undefined, undefined, undefined, "_super")] : [], undefined, transformClassBody(node, extendsClauseElement));
- if (ts.getEmitFlags(node) & 32768) {
- ts.setEmitFlags(classFunction, 32768);
+ if (ts.getEmitFlags(node) & 65536) {
+ ts.setEmitFlags(classFunction, 65536);
}
var inner = ts.createPartiallyEmittedExpression(classFunction);
inner.end = node.end;
@@ -46297,7 +48105,7 @@ var ts;
addConstructor(statements, node, extendsClauseElement);
addClassMembers(statements, node);
var closingBraceLocation = ts.createTokenRange(ts.skipTrivia(currentText, node.members.end), 18);
- var localName = ts.getLocalName(node);
+ var localName = ts.getInternalName(node);
var outer = ts.createPartiallyEmittedExpression(localName);
outer.end = closingBraceLocation.end;
ts.setEmitFlags(outer, 1536);
@@ -46321,7 +48129,7 @@ var ts;
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));
+ var constructorFunction = ts.createFunctionDeclaration(undefined, undefined, undefined, ts.getInternalName(node), undefined, transformConstructorParameters(constructor, hasSynthesizedSuper), undefined, transformConstructorBody(constructor, node, extendsClauseElement, hasSynthesizedSuper));
ts.setTextRange(constructorFunction, constructor || node);
if (extendsClauseElement) {
ts.setEmitFlags(constructorFunction, 8);
@@ -46485,10 +48293,10 @@ var ts;
function addDefaultValueAssignmentForBindingPattern(statements, parameter, name, initializer) {
var temp = ts.getGeneratedNameForNode(parameter);
if (name.elements.length > 0) {
- statements.push(ts.setEmitFlags(ts.createVariableStatement(undefined, ts.createVariableDeclarationList(ts.flattenDestructuringBinding(parameter, visitor, context, 0, temp))), 524288));
+ statements.push(ts.setEmitFlags(ts.createVariableStatement(undefined, ts.createVariableDeclarationList(ts.flattenDestructuringBinding(parameter, visitor, context, 0, temp))), 1048576));
}
else if (initializer) {
- statements.push(ts.setEmitFlags(ts.createStatement(ts.createAssignment(temp, ts.visitNode(initializer, visitor, ts.isExpression))), 524288));
+ statements.push(ts.setEmitFlags(ts.createStatement(ts.createAssignment(temp, ts.visitNode(initializer, visitor, ts.isExpression))), 1048576));
}
}
function addDefaultValueAssignmentForInitializer(statements, parameter, name, initializer) {
@@ -46498,7 +48306,7 @@ var ts;
]), parameter), 1 | 32 | 384));
statement.startsOnNewLine = true;
ts.setTextRange(statement, parameter);
- ts.setEmitFlags(statement, 384 | 32 | 524288);
+ ts.setEmitFlags(statement, 384 | 32 | 1048576);
statements.push(statement);
}
function shouldAddRestParameter(node, inConstructorWithSynthesizedSuper) {
@@ -46516,7 +48324,7 @@ var ts;
var temp = ts.createLoopVariable();
statements.push(ts.setEmitFlags(ts.setTextRange(ts.createVariableStatement(undefined, ts.createVariableDeclarationList([
ts.createVariableDeclaration(declarationName, undefined, ts.createArrayLiteral([]))
- ])), parameter), 524288));
+ ])), parameter), 1048576));
var forStatement = ts.createFor(ts.setTextRange(ts.createVariableDeclarationList([
ts.createVariableDeclaration(temp, undefined, ts.createLiteral(restIndex))
]), parameter), ts.setTextRange(ts.createLessThan(temp, ts.createPropertyAccess(ts.createIdentifier("arguments"), "length")), parameter), ts.setTextRange(ts.createPostfixIncrement(temp), parameter), ts.createBlock([
@@ -46524,7 +48332,7 @@ var ts;
? temp
: ts.createSubtract(temp, ts.createLiteral(restIndex))), ts.createElementAccess(ts.createIdentifier("arguments"), temp))), parameter))
]));
- ts.setEmitFlags(forStatement, 524288);
+ ts.setEmitFlags(forStatement, 1048576);
ts.startOnNewLine(forStatement);
statements.push(forStatement);
}
@@ -46538,7 +48346,7 @@ var ts;
var captureThisStatement = ts.createVariableStatement(undefined, ts.createVariableDeclarationList([
ts.createVariableDeclaration("_this", undefined, initializer)
]));
- ts.setEmitFlags(captureThisStatement, 1536 | 524288);
+ ts.setEmitFlags(captureThisStatement, 1536 | 1048576);
ts.setTextRange(captureThisStatement, originalStatement);
ts.setSourceMapRange(captureThisStatement, node);
statements.push(captureThisStatement);
@@ -46678,7 +48486,7 @@ var ts;
return func;
}
function visitFunctionExpression(node) {
- var ancestorFacts = ts.getEmitFlags(node) & 131072
+ var ancestorFacts = ts.getEmitFlags(node) & 262144
? enterSubtree(16278, 69)
: enterSubtree(16286, 65);
var savedConvertedLoopState = convertedLoopState;
@@ -46842,12 +48650,13 @@ var ts;
}
else {
assignment = ts.createBinary(decl.name, 58, ts.visitNode(decl.initializer, visitor, ts.isExpression));
+ ts.setTextRange(assignment, decl);
}
assignments = ts.append(assignments, assignment);
}
}
if (assignments) {
- updated = ts.setTextRange(ts.createStatement(ts.reduceLeft(assignments, function (acc, v) { return ts.createBinary(v, 26, acc); })), node);
+ updated = ts.setTextRange(ts.createStatement(ts.inlineExpressions(assignments)), node);
}
else {
updated = undefined;
@@ -46864,9 +48673,9 @@ var ts;
if (node.flags & 3) {
enableSubstitutionsForBlockScopedBindings();
}
- var declarations = ts.flatten(ts.map(node.declarations, node.flags & 1
+ var declarations = ts.flatMap(node.declarations, node.flags & 1
? visitVariableDeclarationInLetDeclarationList
- : visitVariableDeclaration));
+ : visitVariableDeclaration);
var declarationList = ts.createVariableDeclarationList(declarations);
ts.setOriginalNode(declarationList, node);
ts.setTextRange(declarationList, node);
@@ -46904,9 +48713,9 @@ var ts;
return visitVariableDeclaration(node);
}
if (!node.initializer && shouldEmitExplicitInitializerForLetDeclaration(node)) {
- var clone_3 = ts.getMutableClone(node);
- clone_3.initializer = ts.createVoidZero();
- return clone_3;
+ var clone_2 = ts.getMutableClone(node);
+ clone_2.initializer = ts.createVoidZero();
+ return clone_2;
}
return ts.visitEachChild(node, visitor, context);
}
@@ -47027,7 +48836,7 @@ var ts;
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);
+ ]), node.expression), 2097152), 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);
ts.setTextRange(forStatement, node);
return ts.restoreEnclosingLabel(forStatement, outermostLabeledStatement, convertedLoopState && resetLabel);
@@ -47046,7 +48855,7 @@ var ts;
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);
+ ]), node.expression), 2097152), 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([
@@ -47083,7 +48892,7 @@ var ts;
}
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));
+ var assignment = ts.createAssignment(temp, ts.setEmitFlags(ts.createObjectLiteral(ts.visitNodes(properties, visitor, ts.isObjectLiteralElementLike, 0, numInitialProperties), node.multiLine), 65536));
if (node.multiLine) {
assignment.startsOnNewLine = true;
}
@@ -47190,11 +48999,11 @@ var ts;
loopBodyFlags |= 8;
}
if (isAsyncBlockContainingAwait) {
- loopBodyFlags |= 131072;
+ loopBodyFlags |= 262144;
}
var convertedLoopVariable = ts.createVariableStatement(undefined, ts.setEmitFlags(ts.createVariableDeclarationList([
ts.createVariableDeclaration(functionName, undefined, ts.setEmitFlags(ts.createFunctionExpression(undefined, containsYield ? ts.createToken(39) : undefined, undefined, undefined, loopParameters, undefined, loopBody), loopBodyFlags))
- ]), 1048576));
+ ]), 2097152));
var statements = [convertedLoopVariable];
var extraVariableDeclarations;
if (currentState.argumentsName) {
@@ -47245,13 +49054,13 @@ var ts;
loop = convert(node, outermostLabeledStatement, convertedLoopBodyStatements);
}
else {
- 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);
+ var clone_3 = ts.getMutableClone(node);
+ clone_3.statement = undefined;
+ clone_3 = ts.visitEachChild(clone_3, visitor, context);
+ clone_3.statement = ts.createBlock(convertedLoopBodyStatements, true);
+ clone_3.transformFlags = 0;
+ ts.aggregateTransformFlags(clone_3);
+ loop = ts.restoreEnclosingLabel(clone_3, outermostLabeledStatement, convertedLoopState && resetLabel);
}
statements.push(loop);
return statements;
@@ -47275,7 +49084,7 @@ var ts;
!state.labeledNonLocalContinues;
var call = ts.createCall(loopFunctionExpressionName, undefined, ts.map(parameters, function (p) { return p.name; }));
var callResult = isAsyncBlockContainingAwait
- ? ts.createYield(ts.createToken(39), ts.setEmitFlags(call, 4194304))
+ ? ts.createYield(ts.createToken(39), ts.setEmitFlags(call, 8388608))
: call;
if (isSimpleLoop) {
statements.push(ts.createStatement(callResult));
@@ -47446,7 +49255,20 @@ var ts;
var savedConvertedLoopState = convertedLoopState;
convertedLoopState = undefined;
var ancestorFacts = enterSubtree(16286, 65);
- var updated = ts.visitEachChild(node, visitor, context);
+ var updated;
+ if (node.transformFlags & 32768) {
+ var parameters = ts.visitParameterList(node.parameters, visitor, context);
+ var body = transformFunctionBody(node);
+ if (node.kind === 153) {
+ updated = ts.updateGetAccessor(node, node.decorators, node.modifiers, node.name, parameters, node.type, body);
+ }
+ else {
+ updated = ts.updateSetAccessor(node, node.decorators, node.modifiers, node.name, parameters, body);
+ }
+ }
+ else {
+ updated = ts.visitEachChild(node, visitor, context);
+ }
exitSubtree(ancestorFacts, 49152, 0);
convertedLoopState = savedConvertedLoopState;
return updated;
@@ -47470,11 +49292,49 @@ var ts;
return ts.visitEachChild(node, visitor, context);
}
function visitCallExpression(node) {
+ if (isTypeScriptClassWrapper(node)) {
+ return visitTypeScriptClassWrapper(node);
+ }
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 visitTypeScriptClassWrapper(node) {
+ var body = ts.cast(ts.skipOuterExpressions(node.expression), ts.isFunctionExpression).body;
+ var classStatements = ts.visitNodes(body.statements, visitor, ts.isStatement, 0, 1);
+ var remainingStatements = ts.visitNodes(body.statements, visitor, ts.isStatement, 1, body.statements.length - 1);
+ var varStatement = ts.cast(ts.firstOrUndefined(classStatements), ts.isVariableStatement);
+ var variable = varStatement.declarationList.declarations[0];
+ var initializer = ts.skipOuterExpressions(variable.initializer);
+ var aliasAssignment = ts.tryCast(initializer, ts.isAssignmentExpression);
+ var call = ts.cast(aliasAssignment ? ts.skipOuterExpressions(aliasAssignment.right) : initializer, ts.isCallExpression);
+ var func = ts.cast(ts.skipOuterExpressions(call.expression), ts.isFunctionExpression);
+ var funcStatements = func.body.statements;
+ var classBodyStart = 0;
+ var classBodyEnd = -1;
+ var statements = [];
+ if (aliasAssignment) {
+ var extendsCall = ts.tryCast(funcStatements[classBodyStart], ts.isExpressionStatement);
+ if (extendsCall) {
+ statements.push(extendsCall);
+ classBodyStart++;
+ }
+ statements.push(funcStatements[classBodyStart]);
+ classBodyStart++;
+ statements.push(ts.createStatement(ts.createAssignment(aliasAssignment.left, ts.cast(variable.name, ts.isIdentifier))));
+ }
+ while (!ts.isReturnStatement(ts.elementAt(funcStatements, classBodyEnd))) {
+ classBodyEnd--;
+ }
+ ts.addRange(statements, funcStatements, classBodyStart, classBodyEnd);
+ if (classBodyEnd < -1) {
+ ts.addRange(statements, funcStatements, classBodyEnd + 1);
+ }
+ ts.addRange(statements, remainingStatements);
+ ts.addRange(statements, classStatements, 1);
+ return ts.recreateOuterExpressions(node.expression, ts.recreateOuterExpressions(variable.initializer, ts.recreateOuterExpressions(aliasAssignment && aliasAssignment.right, ts.updateCall(call, ts.recreateOuterExpressions(call.expression, ts.updateFunctionExpression(func, undefined, undefined, undefined, undefined, func.parameters, undefined, ts.updateBlock(func.body, statements))), undefined, call.arguments))));
+ }
function visitImmediateSuperCallInBody(node) {
return visitCallExpressionWithPotentialCapturedThisAssignment(node, false);
}
@@ -47527,7 +49387,7 @@ var ts;
else {
if (segments.length === 1) {
var firstElement = elements[0];
- return needsUniqueCopy && ts.isSpreadExpression(firstElement) && firstElement.expression.kind !== 177
+ return needsUniqueCopy && ts.isSpreadElement(firstElement) && firstElement.expression.kind !== 177
? ts.createArraySlice(segments[0])
: segments[0];
}
@@ -47535,7 +49395,7 @@ var ts;
}
}
function partitionSpread(node) {
- return ts.isSpreadExpression(node)
+ return ts.isSpreadElement(node)
? visitSpanOfSpreads
: visitSpanOfNonSpreads;
}
@@ -47689,7 +49549,7 @@ var ts;
return node;
}
function substituteIdentifier(node) {
- if (enabledSubstitutions & 2) {
+ if (enabledSubstitutions & 2 && !ts.isInternalName(node)) {
var original = ts.getParseTreeNode(node, ts.isIdentifier);
if (original && isNameOfDeclarationWithCollidingName(original)) {
return ts.setTextRange(ts.getGeneratedNameForNode(original), node);
@@ -47719,14 +49579,31 @@ var ts;
return node;
}
function substituteExpressionIdentifier(node) {
- if (enabledSubstitutions & 2) {
+ if (enabledSubstitutions & 2 && !ts.isInternalName(node)) {
var declaration = resolver.getReferencedDeclarationWithCollidingName(node);
- if (declaration) {
- return ts.setTextRange(ts.getGeneratedNameForNode(declaration.name), node);
+ if (declaration && !(ts.isClassLike(declaration) && isPartOfClassBody(declaration, node))) {
+ return ts.setTextRange(ts.getGeneratedNameForNode(ts.getNameOfDeclaration(declaration)), node);
}
}
return node;
}
+ function isPartOfClassBody(declaration, node) {
+ var currentNode = ts.getParseTreeNode(node);
+ if (!currentNode || currentNode === declaration || currentNode.end <= declaration.pos || currentNode.pos >= declaration.end) {
+ return false;
+ }
+ var blockScope = ts.getEnclosingBlockScopeContainer(declaration);
+ while (currentNode) {
+ if (currentNode === blockScope || currentNode === declaration) {
+ return false;
+ }
+ if (ts.isClassElement(currentNode) && currentNode.parent === declaration) {
+ return true;
+ }
+ currentNode = currentNode.parent;
+ }
+ return false;
+ }
function substituteThisKeyword(node) {
if (enabledSubstitutions & 1
&& hierarchyFacts & 16) {
@@ -47735,8 +49612,9 @@ var ts;
return node;
}
function getClassMemberPrefix(node, member) {
- var expression = ts.getLocalName(node);
- return ts.hasModifier(member, 32) ? expression : ts.createPropertyAccess(expression, "prototype");
+ return ts.hasModifier(member, 32)
+ ? ts.getInternalName(node)
+ : ts.createPropertyAccess(ts.getInternalName(node), "prototype");
}
function hasSynthesizedDefaultSuperCall(constructor, hasExtendsClause) {
if (!constructor || !hasExtendsClause) {
@@ -47871,8 +49749,7 @@ var ts;
var withBlockStack;
return transformSourceFile;
function transformSourceFile(node) {
- if (ts.isDeclarationFile(node)
- || (node.transformFlags & 512) === 0) {
+ if (node.isDeclarationFile || (node.transformFlags & 512) === 0) {
return node;
}
currentSourceFile = node;
@@ -48080,7 +49957,7 @@ var ts;
return undefined;
}
else {
- if (ts.getEmitFlags(node) & 524288) {
+ if (ts.getEmitFlags(node) & 1048576) {
return node;
}
for (var _i = 0, _a = node.declarationList.declarations; _i < _a.length; _i++) {
@@ -48091,7 +49968,7 @@ var ts;
if (variables.length === 0) {
return undefined;
}
- return ts.createStatement(ts.inlineExpressions(ts.map(variables, transformInitializedVariable)));
+ return ts.setSourceMapRange(ts.createStatement(ts.inlineExpressions(ts.map(variables, transformInitializedVariable))), node);
}
}
function visitBinaryExpression(node) {
@@ -48157,10 +50034,10 @@ var ts;
else if (node.operatorToken.kind === 26) {
return visitCommaExpression(node);
}
- 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;
+ 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;
}
return ts.visitEachChild(node, visitor, context);
}
@@ -48216,7 +50093,7 @@ var ts;
var resumeLabel = defineLabel();
var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
if (node.asteriskToken) {
- var iterator = (ts.getEmitFlags(node.expression) & 4194304) === 0
+ var iterator = (ts.getEmitFlags(node.expression) & 8388608) === 0
? ts.createValuesHelper(context, expression, node)
: expression;
emitYieldStar(iterator, node);
@@ -48287,10 +50164,10 @@ var ts;
}
function visitElementAccessExpression(node) {
if (containsYield(node.argumentExpression)) {
- 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;
+ 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;
}
return ts.visitEachChild(node, visitor, context);
}
@@ -48406,7 +50283,7 @@ var ts;
return undefined;
}
function transformInitializedVariable(node) {
- return ts.createAssignment(ts.getSynthesizedClone(node.name), ts.visitNode(node.initializer, visitor, ts.isExpression));
+ return ts.setSourceMapRange(ts.createAssignment(ts.setSourceMapRange(ts.getSynthesizedClone(node.name), node.name), ts.visitNode(node.initializer, visitor, ts.isExpression)), node);
}
function transformAndEmitIfStatement(node) {
if (containsYield(node)) {
@@ -48780,10 +50657,10 @@ var ts;
if (declaration) {
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;
+ var clone_6 = ts.getMutableClone(name);
+ ts.setSourceMapRange(clone_6, node);
+ ts.setCommentRange(clone_6, node);
+ return clone_6;
}
}
}
@@ -49181,7 +51058,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, 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)), 524288));
}
function buildStatements() {
if (operations) {
@@ -49556,9 +51433,10 @@ var ts;
var currentSourceFile;
var currentModuleInfo;
var noSubstitution;
+ var needUMDDynamicImportHelper;
return transformSourceFile;
function transformSourceFile(node) {
- if (ts.isDeclarationFile(node) || !(ts.isExternalModule(node) || compilerOptions.isolatedModules)) {
+ if (node.isDeclarationFile || !(ts.isExternalModule(node) || compilerOptions.isolatedModules || node.transformFlags & 67108864)) {
return node;
}
currentSourceFile = node;
@@ -49568,6 +51446,7 @@ var ts;
var updated = transformModule(node);
currentSourceFile = undefined;
currentModuleInfo = undefined;
+ needUMDDynamicImportHelper = false;
return ts.aggregateTransformFlags(updated);
}
function shouldEmitUnderscoreUnderscoreESModule() {
@@ -49589,9 +51468,10 @@ var ts;
addExportEqualsIfNeeded(statements, false);
ts.addRange(statements, endLexicalEnvironment());
var updated = ts.updateSourceFileNode(node, ts.setTextRange(ts.createNodeArray(statements), node.statements));
- if (currentModuleInfo.hasExportStarsToExportValues) {
+ if (currentModuleInfo.hasExportStarsToExportValues && !compilerOptions.importHelpers) {
ts.addEmitHelper(updated, exportStarHelper);
}
+ ts.addEmitHelpers(updated, context.readEmitHelpers());
return updated;
}
function transformAMDModule(node) {
@@ -49684,9 +51564,12 @@ var ts;
addExportEqualsIfNeeded(statements, true);
ts.addRange(statements, endLexicalEnvironment());
var body = ts.createBlock(statements, true);
- if (currentModuleInfo.hasExportStarsToExportValues) {
+ if (currentModuleInfo.hasExportStarsToExportValues && !compilerOptions.importHelpers) {
ts.addEmitHelper(body, exportStarHelper);
}
+ if (needUMDDynamicImportHelper) {
+ ts.addEmitHelper(body, dynamicImportUMDHelper);
+ }
return body;
}
function addExportEqualsIfNeeded(statements, emitAsReturn) {
@@ -49721,14 +51604,49 @@ var ts;
return visitFunctionDeclaration(node);
case 229:
return visitClassDeclaration(node);
- case 297:
+ case 299:
return visitMergeDeclarationMarker(node);
- case 298:
+ case 300:
return visitEndOfDeclarationMarker(node);
default:
- return node;
+ return ts.visitEachChild(node, importCallExpressionVisitor, context);
+ }
+ }
+ function importCallExpressionVisitor(node) {
+ if (!(node.transformFlags & 67108864)) {
+ return node;
+ }
+ if (ts.isImportCall(node)) {
+ return visitImportCallExpression(node);
+ }
+ else {
+ return ts.visitEachChild(node, importCallExpressionVisitor, context);
+ }
+ }
+ function visitImportCallExpression(node) {
+ switch (compilerOptions.module) {
+ case ts.ModuleKind.AMD:
+ return transformImportCallExpressionAMD(node);
+ case ts.ModuleKind.UMD:
+ return transformImportCallExpressionUMD(node);
+ case ts.ModuleKind.CommonJS:
+ default:
+ return transformImportCallExpressionCommonJS(node);
}
}
+ function transformImportCallExpressionUMD(node) {
+ needUMDDynamicImportHelper = true;
+ return ts.createConditional(ts.createIdentifier("__syncRequire"), transformImportCallExpressionCommonJS(node), transformImportCallExpressionAMD(node));
+ }
+ function transformImportCallExpressionAMD(node) {
+ var resolve = ts.createUniqueName("resolve");
+ var reject = ts.createUniqueName("reject");
+ return ts.createNew(ts.createIdentifier("Promise"), undefined, [ts.createFunctionExpression(undefined, undefined, undefined, undefined, [ts.createParameter(undefined, undefined, undefined, resolve),
+ ts.createParameter(undefined, undefined, undefined, reject)], undefined, ts.createBlock([ts.createStatement(ts.createCall(ts.createIdentifier("require"), undefined, [ts.createArrayLiteral([ts.firstOrUndefined(node.arguments) || ts.createOmittedExpression()]), resolve, reject]))]))]);
+ }
+ function transformImportCallExpressionCommonJS(node) {
+ return ts.createCall(ts.createPropertyAccess(ts.createCall(ts.createPropertyAccess(ts.createIdentifier("Promise"), "resolve"), undefined, []), "then"), undefined, [ts.createFunctionExpression(undefined, undefined, undefined, undefined, undefined, undefined, ts.createBlock([ts.createReturn(ts.createCall(ts.createIdentifier("require"), undefined, node.arguments))]))]);
+ }
function visitImportDeclaration(node) {
var statements;
var namespaceDeclaration = ts.getNamespaceDeclarationNode(node);
@@ -49819,11 +51737,7 @@ var ts;
return ts.singleOrMany(statements);
}
else {
- return ts.setTextRange(ts.createStatement(ts.createCall(ts.createIdentifier("__export"), undefined, [
- moduleKind !== ts.ModuleKind.AMD
- ? createRequireCall(node)
- : generatedName
- ])), node);
+ return ts.setTextRange(ts.createStatement(createExportStarHelper(context, moduleKind !== ts.ModuleKind.AMD ? createRequireCall(node) : generatedName)), node);
}
}
function visitExportAssignment(node) {
@@ -49844,10 +51758,10 @@ var ts;
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));
+ 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, ts.visitNodes(node.parameters, importCallExpressionVisitor), undefined, ts.visitEachChild(node.body, importCallExpressionVisitor, context)), node), node));
}
else {
- statements = ts.append(statements, node);
+ statements = ts.append(statements, ts.visitEachChild(node, importCallExpressionVisitor, context));
}
if (hasAssociatedEndOfDeclarationMarker(node)) {
var id = ts.getOriginalNodeId(node);
@@ -49861,10 +51775,10 @@ var ts;
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));
+ statements = ts.append(statements, ts.setOriginalNode(ts.setTextRange(ts.createClassDeclaration(undefined, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), ts.getDeclarationName(node, true, true), undefined, ts.visitNodes(node.heritageClauses, importCallExpressionVisitor), node.members), node), node));
}
else {
- statements = ts.append(statements, node);
+ statements = ts.append(statements, ts.visitEachChild(node, importCallExpressionVisitor, context));
}
if (hasAssociatedEndOfDeclarationMarker(node)) {
var id = ts.getOriginalNodeId(node);
@@ -49901,7 +51815,7 @@ var ts;
}
}
else {
- statements = ts.append(statements, node);
+ statements = ts.append(statements, ts.visitEachChild(node, importCallExpressionVisitor, context));
}
if (hasAssociatedEndOfDeclarationMarker(node)) {
var id = ts.getOriginalNodeId(node);
@@ -49914,10 +51828,10 @@ var ts;
}
function transformInitializedVariable(node) {
if (ts.isBindingPattern(node.name)) {
- return ts.flattenDestructuringAssignment(node, undefined, context, 0, false, createExportExpression);
+ return ts.flattenDestructuringAssignment(ts.visitNode(node, importCallExpressionVisitor), undefined, context, 0, false, createExportExpression);
}
else {
- return ts.createAssignment(ts.setTextRange(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), ts.visitNode(node.initializer, importCallExpressionVisitor));
}
}
function visitMergeDeclarationMarker(node) {
@@ -49928,7 +51842,7 @@ var ts;
return node;
}
function hasAssociatedEndOfDeclarationMarker(node) {
- return (ts.getEmitFlags(node) & 2097152) !== 0;
+ return (ts.getEmitFlags(node) & 4194304) !== 0;
}
function visitEndOfDeclarationMarker(node) {
var id = ts.getOriginalNodeId(node);
@@ -50041,7 +51955,7 @@ var ts;
])
]));
}
- ts.setEmitFlags(statement, 524288);
+ ts.setEmitFlags(statement, 1048576);
return statement;
}
function createExportStatement(name, value, location, allowComments) {
@@ -50195,7 +52109,18 @@ var ts;
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 }"
+ text: "\n function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n }\n "
+ };
+ function createExportStarHelper(context, module) {
+ var compilerOptions = context.getCompilerOptions();
+ return compilerOptions.importHelpers
+ ? ts.createCall(ts.getHelperName("__exportStar"), undefined, [module, ts.createIdentifier("exports")])
+ : ts.createCall(ts.createIdentifier("__export"), undefined, [module]);
+ }
+ var dynamicImportUMDHelper = {
+ name: "typescript:dynamicimport-sync-require",
+ scoped: true,
+ text: "\n var __syncRequire = typeof module === \"object\" && typeof module.exports === \"object\";"
};
})(ts || (ts = {}));
var ts;
@@ -50227,9 +52152,7 @@ var ts;
var noSubstitution;
return transformSourceFile;
function transformSourceFile(node) {
- if (ts.isDeclarationFile(node)
- || !(ts.isExternalModule(node)
- || compilerOptions.isolatedModules)) {
+ if (node.isDeclarationFile || !(ts.isEffectiveExternalModule(node, compilerOptions) || node.transformFlags & 67108864)) {
return node;
}
var id = ts.getOriginalNodeId(node);
@@ -50467,7 +52390,7 @@ var ts;
if (node.isExportEquals) {
return undefined;
}
- var expression = ts.visitNode(node.expression, destructuringVisitor, ts.isExpression);
+ var expression = ts.visitNode(node.expression, destructuringAndImportCallVisitor, ts.isExpression);
var original = node.original;
if (original && hasAssociatedEndOfDeclarationMarker(original)) {
var id = ts.getOriginalNodeId(node);
@@ -50479,10 +52402,10 @@ 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), node.asteriskToken, 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, destructuringAndImportCallVisitor, ts.isParameterDeclaration), undefined, ts.visitNode(node.body, destructuringAndImportCallVisitor, ts.isBlock)));
}
else {
- hoistedStatements = ts.append(hoistedStatements, node);
+ hoistedStatements = ts.append(hoistedStatements, ts.visitEachChild(node, destructuringAndImportCallVisitor, context));
}
if (hasAssociatedEndOfDeclarationMarker(node)) {
var id = ts.getOriginalNodeId(node);
@@ -50497,7 +52420,7 @@ var ts;
var statements;
var name = ts.getLocalName(node);
hoistVariableDeclaration(name);
- 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));
+ statements = ts.append(statements, ts.setTextRange(ts.createStatement(ts.createAssignment(name, ts.setTextRange(ts.createClassExpression(undefined, node.name, undefined, ts.visitNodes(node.heritageClauses, destructuringAndImportCallVisitor, ts.isHeritageClause), ts.visitNodes(node.members, destructuringAndImportCallVisitor, ts.isClassElement)), node))), node));
if (hasAssociatedEndOfDeclarationMarker(node)) {
var id = ts.getOriginalNodeId(node);
deferredExports[id] = appendExportsOfHoistedDeclaration(deferredExports[id], node);
@@ -50509,7 +52432,7 @@ var ts;
}
function visitVariableStatement(node) {
if (!shouldHoistVariableDeclarationList(node.declarationList)) {
- return ts.visitNode(node, destructuringVisitor, ts.isStatement);
+ return ts.visitNode(node, destructuringAndImportCallVisitor, ts.isStatement);
}
var expressions;
var isExportedDeclaration = ts.hasModifier(node, 1);
@@ -50550,15 +52473,15 @@ var ts;
}
}
function shouldHoistVariableDeclarationList(node) {
- return (ts.getEmitFlags(node) & 1048576) === 0
+ return (ts.getEmitFlags(node) & 2097152) === 0
&& (enclosingBlockScopedContainer.kind === 265
|| (ts.getOriginalNode(node).flags & 3) === 0);
}
function transformInitializedVariable(node, isExportedDeclaration) {
var createAssignment = isExportedDeclaration ? createExportedVariableAssignment : createNonExportedVariableAssignment;
return ts.isBindingPattern(node.name)
- ? ts.flattenDestructuringAssignment(node, destructuringVisitor, context, 0, false, createAssignment)
- : createAssignment(node.name, ts.visitNode(node.initializer, destructuringVisitor, ts.isExpression));
+ ? ts.flattenDestructuringAssignment(node, destructuringAndImportCallVisitor, context, 0, false, createAssignment)
+ : createAssignment(node.name, ts.visitNode(node.initializer, destructuringAndImportCallVisitor, ts.isExpression));
}
function createExportedVariableAssignment(name, value, location) {
return createVariableAssignment(name, value, location, true);
@@ -50581,7 +52504,7 @@ var ts;
return node;
}
function hasAssociatedEndOfDeclarationMarker(node) {
- return (ts.getEmitFlags(node) & 2097152) !== 0;
+ return (ts.getEmitFlags(node) & 4194304) !== 0;
}
function visitEndOfDeclarationMarker(node) {
var id = ts.getOriginalNodeId(node);
@@ -50742,32 +52665,32 @@ var ts;
return visitCatchClause(node);
case 207:
return visitBlock(node);
- case 297:
+ case 299:
return visitMergeDeclarationMarker(node);
- case 298:
+ case 300:
return visitEndOfDeclarationMarker(node);
default:
- return destructuringVisitor(node);
+ return destructuringAndImportCallVisitor(node);
}
}
function visitForStatement(node) {
var savedEnclosingBlockScopedContainer = enclosingBlockScopedContainer;
enclosingBlockScopedContainer = node;
- 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));
+ node = ts.updateFor(node, visitForInitializer(node.initializer), ts.visitNode(node.condition, destructuringAndImportCallVisitor, ts.isExpression), ts.visitNode(node.incrementor, destructuringAndImportCallVisitor, 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, ts.liftToBlock));
+ node = ts.updateForIn(node, visitForInitializer(node.initializer), ts.visitNode(node.expression, destructuringAndImportCallVisitor, 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, node.awaitModifier, visitForInitializer(node.initializer), ts.visitNode(node.expression, destructuringVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, ts.liftToBlock));
+ node = ts.updateForOf(node, node.awaitModifier, visitForInitializer(node.initializer), ts.visitNode(node.expression, destructuringAndImportCallVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, ts.liftToBlock));
enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer;
return node;
}
@@ -50792,19 +52715,19 @@ var ts;
}
}
function visitDoStatement(node) {
- return ts.updateDo(node, ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, 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, destructuringAndImportCallVisitor, ts.isExpression));
}
function visitWhileStatement(node) {
- return ts.updateWhile(node, ts.visitNode(node.expression, destructuringVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, ts.liftToBlock));
+ return ts.updateWhile(node, ts.visitNode(node.expression, destructuringAndImportCallVisitor, 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, ts.liftToBlock));
}
function visitWithStatement(node) {
- return ts.updateWith(node, ts.visitNode(node.expression, destructuringVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, ts.liftToBlock));
+ return ts.updateWith(node, ts.visitNode(node.expression, destructuringAndImportCallVisitor, 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));
+ return ts.updateSwitch(node, ts.visitNode(node.expression, destructuringAndImportCallVisitor, ts.isExpression), ts.visitNode(node.caseBlock, nestedElementVisitor, ts.isCaseBlock));
}
function visitCaseBlock(node) {
var savedEnclosingBlockScopedContainer = enclosingBlockScopedContainer;
@@ -50814,7 +52737,7 @@ var ts;
return node;
}
function visitCaseClause(node) {
- return ts.updateCaseClause(node, ts.visitNode(node.expression, destructuringVisitor, ts.isExpression), ts.visitNodes(node.statements, nestedElementVisitor, ts.isStatement));
+ return ts.updateCaseClause(node, ts.visitNode(node.expression, destructuringAndImportCallVisitor, ts.isExpression), ts.visitNodes(node.statements, nestedElementVisitor, ts.isStatement));
}
function visitDefaultClause(node) {
return ts.visitEachChild(node, nestedElementVisitor, context);
@@ -50836,29 +52759,35 @@ var ts;
enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer;
return node;
}
- function destructuringVisitor(node) {
+ function destructuringAndImportCallVisitor(node) {
if (node.transformFlags & 1024
&& node.kind === 194) {
return visitDestructuringAssignment(node);
}
- else if (node.transformFlags & 2048) {
- return ts.visitEachChild(node, destructuringVisitor, context);
+ else if (ts.isImportCall(node)) {
+ return visitImportCallExpression(node);
+ }
+ else if ((node.transformFlags & 2048) || (node.transformFlags & 67108864)) {
+ return ts.visitEachChild(node, destructuringAndImportCallVisitor, context);
}
else {
return node;
}
}
+ function visitImportCallExpression(node) {
+ return ts.createCall(ts.createPropertyAccess(contextObject, ts.createIdentifier("import")), undefined, node.arguments);
+ }
function visitDestructuringAssignment(node) {
if (hasExportedReferenceInDestructuringTarget(node.left)) {
- return ts.flattenDestructuringAssignment(node, destructuringVisitor, context, 0, true);
+ return ts.flattenDestructuringAssignment(node, destructuringAndImportCallVisitor, context, 0, true);
}
- return ts.visitEachChild(node, destructuringVisitor, context);
+ return ts.visitEachChild(node, destructuringAndImportCallVisitor, context);
}
function hasExportedReferenceInDestructuringTarget(node) {
if (ts.isAssignmentExpression(node, true)) {
return hasExportedReferenceInDestructuringTarget(node.left);
}
- else if (ts.isSpreadExpression(node)) {
+ else if (ts.isSpreadElement(node)) {
return hasExportedReferenceInDestructuringTarget(node.expression);
}
else if (ts.isObjectLiteralExpression(node)) {
@@ -51035,7 +52964,7 @@ var ts;
var currentSourceFile;
return transformSourceFile;
function transformSourceFile(node) {
- if (ts.isDeclarationFile(node)) {
+ if (node.isDeclarationFile) {
return node;
}
if (ts.isExternalModule(node) || compilerOptions.isolatedModules) {
@@ -51098,6 +53027,7 @@ var ts;
(function (ts) {
function getModuleTransformer(moduleKind) {
switch (moduleKind) {
+ case ts.ModuleKind.ESNext:
case ts.ModuleKind.ES2015:
return ts.transformES2015Module;
case ts.ModuleKind.System:
@@ -51150,7 +53080,7 @@ var ts;
}
ts.getTransformers = getTransformers;
function transformNodes(resolver, host, options, nodes, transformers, allowDtsFiles) {
- var enabledSyntaxKindFeatures = new Array(299);
+ var enabledSyntaxKindFeatures = new Array(301);
var lexicalEnvironmentVariableDeclarations;
var lexicalEnvironmentFunctionDeclarations;
var lexicalEnvironmentVariableDeclarationsStack = [];
@@ -51208,7 +53138,7 @@ var ts;
dispose: dispose
};
function transformRoot(node) {
- return node && (!ts.isSourceFile(node) || !ts.isDeclarationFile(node)) ? transformation(node) : node;
+ return node && (!ts.isSourceFile(node) || !node.isDeclarationFile) ? transformation(node) : node;
}
function enableSubstitution(kind) {
ts.Debug.assert(state < 2, "Cannot modify the transformation context after transformation has completed.");
@@ -51244,7 +53174,7 @@ var ts;
function hoistVariableDeclaration(name) {
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);
+ var decl = ts.setEmitFlags(ts.createVariableDeclaration(name), 64);
if (!lexicalEnvironmentVariableDeclarations) {
lexicalEnvironmentVariableDeclarations = [decl];
}
@@ -51378,7 +53308,7 @@ var ts;
var errorNameNode;
var emitJsDocComments = compilerOptions.removeComments ? ts.noop : writeJsDocComments;
var emit = compilerOptions.stripInternal ? stripInternal : emitNode;
- var noDeclare;
+ var needsDeclare = true;
var moduleElementDeclarationEmitInfo = [];
var asynchronousSubModuleDeclarationEmitInfo;
var referencesOutput = "";
@@ -51403,11 +53333,11 @@ var ts;
}
resultHasExternalModuleIndicator = false;
if (!isBundledEmit || !ts.isExternalModule(sourceFile)) {
- noDeclare = false;
+ needsDeclare = true;
emitSourceFile(sourceFile);
}
else if (ts.isExternalModule(sourceFile)) {
- noDeclare = true;
+ needsDeclare = false;
write("declare module \"" + ts.getResolvedExternalModuleName(host, sourceFile) + "\" {");
writeLine();
increaseIndent();
@@ -51470,7 +53400,7 @@ var ts;
var writer = ts.createTextWriter(newLine);
writer.trackSymbol = trackSymbol;
writer.reportInaccessibleThisError = reportInaccessibleThisError;
- writer.reportIllegalExtends = reportIllegalExtends;
+ writer.reportPrivateInBaseOfClassExpression = reportPrivateInBaseOfClassExpression;
writer.writeKeyword = writer.write;
writer.writeOperator = writer.write;
writer.writePunctuation = writer.write;
@@ -51567,10 +53497,10 @@ var ts;
handleSymbolAccessibilityError(resolver.isSymbolAccessible(symbol, enclosingDeclaration, meaning, true));
recordTypeReferenceDirectivesIfNecessary(resolver.getTypeReferenceDirectivesForSymbol(symbol, meaning));
}
- function reportIllegalExtends() {
+ function reportPrivateInBaseOfClassExpression(propertyName) {
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)));
+ emitterDiagnostics.add(ts.createDiagnosticForNode(errorNameNode, ts.Diagnostics.Property_0_of_exported_class_expression_may_not_be_private_or_protected, propertyName));
}
}
function reportInaccessibleThisError() {
@@ -51583,14 +53513,17 @@ var ts;
writer.getSymbolAccessibilityDiagnostic = getSymbolAccessibilityDiagnostic;
write(": ");
var shouldUseResolverType = declaration.kind === 146 &&
- resolver.isRequiredInitializedParameter(declaration);
+ (resolver.isRequiredInitializedParameter(declaration) ||
+ resolver.isOptionalUninitializedParameterProperty(declaration));
if (type && !shouldUseResolverType) {
emitType(type);
}
else {
errorNameNode = declaration.name;
- var format = 2 | 1024 |
- (shouldUseResolverType ? 4096 : 0);
+ var format = 4 |
+ 16384 |
+ 2048 |
+ (shouldUseResolverType ? 8192 : 0);
resolver.writeTypeOfDeclaration(declaration, enclosingDeclaration, format, writer);
errorNameNode = undefined;
}
@@ -51603,7 +53536,7 @@ var ts;
}
else {
errorNameNode = signature.name;
- resolver.writeReturnTypeOfSignatureDeclaration(signature, enclosingDeclaration, 2 | 1024, writer);
+ resolver.writeReturnTypeOfSignatureDeclaration(signature, enclosingDeclaration, 4 | 2048 | 16384, writer);
errorNameNode = undefined;
}
}
@@ -51811,8 +53744,7 @@ var ts;
ts.emitDetachedComments(currentText, currentLineMap, writer, ts.writeCommentRange, node, newLine, true);
emitLines(node.statements);
}
- function getExportDefaultTempVariableName() {
- var baseName = "_default";
+ function getExportTempVariableName(baseName) {
if (!currentIdentifiers.has(baseName)) {
return baseName;
}
@@ -51825,23 +53757,30 @@ var ts;
}
}
}
+ function emitTempVariableDeclaration(expr, baseName, diagnostic, needsDeclare) {
+ var tempVarName = getExportTempVariableName(baseName);
+ if (needsDeclare) {
+ write("declare ");
+ }
+ write("const ");
+ write(tempVarName);
+ write(": ");
+ writer.getSymbolAccessibilityDiagnostic = function () { return diagnostic; };
+ resolver.writeTypeOfExpression(expr, enclosingDeclaration, 4 | 2048 | 16384, writer);
+ write(";");
+ writeLine();
+ return tempVarName;
+ }
function emitExportAssignment(node) {
if (node.expression.kind === 71) {
write(node.isExportEquals ? "export = " : "export default ");
writeTextOfNode(currentText, node.expression);
}
else {
- var tempVarName = getExportDefaultTempVariableName();
- if (!noDeclare) {
- write("declare ");
- }
- write("var ");
- write(tempVarName);
- write(": ");
- writer.getSymbolAccessibilityDiagnostic = getDefaultExportAccessibilityDiagnostic;
- resolver.writeTypeOfExpression(node.expression, enclosingDeclaration, 2 | 1024, writer);
- write(";");
- writeLine();
+ var tempVarName = emitTempVariableDeclaration(node.expression, "_default", {
+ diagnosticMessage: ts.Diagnostics.Default_export_of_the_module_has_or_is_using_private_name_0,
+ errorNode: node
+ }, needsDeclare);
write(node.isExportEquals ? "export = " : "export default ");
write(tempVarName);
}
@@ -51851,12 +53790,6 @@ var ts;
var nodes = resolver.collectLinkedAliases(node.expression);
writeAsynchronousModuleElements(nodes);
}
- function getDefaultExportAccessibilityDiagnostic() {
- return {
- diagnosticMessage: ts.Diagnostics.Default_export_of_the_module_has_or_is_using_private_name_0,
- errorNode: node
- };
- }
}
function isModuleElementVisible(node) {
return resolver.isDeclarationVisible(node);
@@ -51926,7 +53859,7 @@ var ts;
if (modifiers & 512) {
write("default ");
}
- else if (node.kind !== 230 && !noDeclare) {
+ else if (node.kind !== 230 && needsDeclare) {
write("declare ");
}
}
@@ -52154,7 +54087,7 @@ var ts;
var enumMemberValue = resolver.getConstantValue(node);
if (enumMemberValue !== undefined) {
write(" = ");
- write(enumMemberValue.toString());
+ write(ts.getTextOfConstantValue(enumMemberValue));
}
write(",");
writeLine();
@@ -52251,7 +54184,7 @@ var ts;
write(">");
}
}
- function emitHeritageClause(className, typeReferences, isImplementsList) {
+ function emitHeritageClause(typeReferences, isImplementsList) {
if (typeReferences) {
write(isImplementsList ? " implements " : " extends ");
emitCommaList(typeReferences, emitTypeOfTypeReference);
@@ -52263,12 +54196,6 @@ var ts;
else if (!isImplementsList && node.expression.kind === 95) {
write("null");
}
- else {
- writer.getSymbolAccessibilityDiagnostic = getHeritageClauseVisibilityError;
- errorNameNode = className;
- resolver.writeBaseConstructorTypeOfClass(enclosingDeclaration, enclosingDeclaration, 2 | 1024, writer);
- errorNameNode = undefined;
- }
function getHeritageClauseVisibilityError() {
var diagnosticMessage;
if (node.parent.parent.kind === 229) {
@@ -52282,7 +54209,7 @@ var ts;
return {
diagnosticMessage: diagnosticMessage,
errorNode: node,
- typeName: node.parent.parent.name
+ typeName: ts.getNameOfDeclaration(node.parent.parent)
};
}
}
@@ -52297,6 +54224,19 @@ var ts;
});
}
}
+ var prevEnclosingDeclaration = enclosingDeclaration;
+ enclosingDeclaration = node;
+ var baseTypeNode = ts.getClassExtendsHeritageClauseElement(node);
+ var tempVarName;
+ if (baseTypeNode && !ts.isEntityNameExpression(baseTypeNode.expression)) {
+ tempVarName = baseTypeNode.expression.kind === 95 ?
+ "null" :
+ emitTempVariableDeclaration(baseTypeNode.expression, node.name.text + "_base", {
+ diagnosticMessage: ts.Diagnostics.extends_clause_of_exported_class_0_has_or_is_using_private_name_1,
+ errorNode: baseTypeNode,
+ typeName: node.name
+ }, !ts.findAncestor(node, function (n) { return n.kind === 233; }));
+ }
emitJsDocComments(node);
emitModuleElementDeclarationFlags(node);
if (ts.hasModifier(node, 128)) {
@@ -52304,15 +54244,22 @@ var ts;
}
write("class ");
writeTextOfNode(currentText, node.name);
- var prevEnclosingDeclaration = enclosingDeclaration;
- enclosingDeclaration = node;
emitTypeParameters(node.typeParameters);
- var baseTypeNode = ts.getClassExtendsHeritageClauseElement(node);
if (baseTypeNode) {
- node.name;
- emitHeritageClause(node.name, [baseTypeNode], false);
+ if (!ts.isEntityNameExpression(baseTypeNode.expression)) {
+ write(" extends ");
+ write(tempVarName);
+ if (baseTypeNode.typeArguments) {
+ write("<");
+ emitCommaList(baseTypeNode.typeArguments, emitType);
+ write(">");
+ }
+ }
+ else {
+ emitHeritageClause([baseTypeNode], false);
+ }
}
- emitHeritageClause(node.name, ts.getClassImplementsHeritageClauseElements(node), true);
+ emitHeritageClause(ts.getClassImplementsHeritageClauseElements(node), true);
write(" {");
writeLine();
increaseIndent();
@@ -52333,7 +54280,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(node.name, interfaceExtendsTypes, false);
+ emitHeritageClause(interfaceExtendsTypes, false);
}
write(" {");
writeLine();
@@ -52385,7 +54332,8 @@ var ts;
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 === 149 || node.kind === 148) {
+ else if (node.kind === 149 || node.kind === 148 ||
+ (node.kind === 146 && ts.hasModifier(node.parent, 8))) {
if (ts.hasModifier(node, 32)) {
return symbolAccessibilityResult.errorModuleName ?
symbolAccessibilityResult.accessibility === 2 ?
@@ -52393,7 +54341,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 === 229) {
+ else if (node.parent.kind === 229 || node.kind === 146) {
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 :
@@ -52588,6 +54536,11 @@ var ts;
write("[");
}
else {
+ if (node.kind === 152 && ts.hasModifier(node, 8)) {
+ write("();");
+ writeLine();
+ return;
+ }
if (node.kind === 156 || node.kind === 161) {
write("new ");
}
@@ -52846,7 +54799,7 @@ var ts;
function writeReferencePath(referencedFile, addBundledFileReference, emitOnlyDtsFiles) {
var declFileName;
var addedBundledEmitReference = false;
- if (ts.isDeclarationFile(referencedFile)) {
+ if (referencedFile.isDeclarationFile) {
declFileName = referencedFile.fileName;
}
else {
@@ -52906,7 +54859,7 @@ var ts;
function createSourceMapWriter(host, writer) {
var compilerOptions = host.getCompilerOptions();
var extendedDiagnostics = compilerOptions.extendedDiagnostics;
- var currentSourceFile;
+ var currentSource;
var currentSourceText;
var sourceMapDir;
var sourceMapSourceIndex;
@@ -52926,6 +54879,9 @@ var ts;
getText: getText,
getSourceMappingURL: getSourceMappingURL,
};
+ function skipSourceTrivia(pos) {
+ return currentSource.skipTrivia ? currentSource.skipTrivia(pos) : ts.skipTrivia(currentSourceText, pos);
+ }
function initialize(filePath, sourceMapFilePath, sourceFileOrBundle) {
if (disabled) {
return;
@@ -52933,7 +54889,7 @@ var ts;
if (sourceMapData) {
reset();
}
- currentSourceFile = undefined;
+ currentSource = undefined;
currentSourceText = undefined;
sourceMapSourceIndex = -1;
lastRecordedSourceMapSpan = undefined;
@@ -52976,7 +54932,7 @@ var ts;
if (disabled) {
return;
}
- currentSourceFile = undefined;
+ currentSource = undefined;
sourceMapDir = undefined;
sourceMapSourceIndex = undefined;
lastRecordedSourceMapSpan = undefined;
@@ -53019,7 +54975,7 @@ var ts;
if (extendedDiagnostics) {
ts.performance.mark("beforeSourcemap");
}
- var sourceLinePos = ts.getLineAndCharacterOfPosition(currentSourceFile, pos);
+ var sourceLinePos = ts.getLineAndCharacterOfPosition(currentSource, pos);
sourceLinePos.line++;
sourceLinePos.character++;
var emittedLine = writer.getLine();
@@ -53056,12 +55012,21 @@ var ts;
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 !== 295
+ var range = emitNode && emitNode.sourceMapRange;
+ var _a = range || node, pos = _a.pos, end = _a.end;
+ var source = range && range.source;
+ var oldSource = currentSource;
+ if (source === oldSource)
+ source = undefined;
+ if (source)
+ setSourceFile(source);
+ if (node.kind !== 296
&& (emitFlags & 16) === 0
&& pos >= 0) {
- emitPos(ts.skipTrivia(currentSourceText, pos));
+ emitPos(skipSourceTrivia(pos));
}
+ if (source)
+ setSourceFile(oldSource);
if (emitFlags & 64) {
disabled = true;
emitCallback(hint, node);
@@ -53070,11 +55035,15 @@ var ts;
else {
emitCallback(hint, node);
}
- if (node.kind !== 295
+ if (source)
+ setSourceFile(source);
+ if (node.kind !== 296
&& (emitFlags & 32) === 0
&& end >= 0) {
emitPos(end);
}
+ if (source)
+ setSourceFile(oldSource);
}
}
function emitTokenWithSourceMap(node, token, tokenPos, emitCallback) {
@@ -53084,7 +55053,7 @@ var ts;
var emitNode = node && node.emitNode;
var emitFlags = emitNode && emitNode.flags;
var range = emitNode && emitNode.tokenSourceMapRanges && emitNode.tokenSourceMapRanges[token];
- tokenPos = ts.skipTrivia(currentSourceText, range ? range.pos : tokenPos);
+ tokenPos = skipSourceTrivia(range ? range.pos : tokenPos);
if ((emitFlags & 128) === 0 && tokenPos >= 0) {
emitPos(tokenPos);
}
@@ -53100,17 +55069,17 @@ var ts;
if (disabled) {
return;
}
- currentSourceFile = sourceFile;
- currentSourceText = currentSourceFile.text;
+ currentSource = sourceFile;
+ currentSourceText = currentSource.text;
var sourcesDirectoryPath = compilerOptions.sourceRoot ? host.getCommonSourceDirectory() : sourceMapDir;
- var source = ts.getRelativePathToDirectoryOrUrl(sourcesDirectoryPath, currentSourceFile.fileName, host.getCurrentDirectory(), host.getCanonicalFileName, true);
+ var source = ts.getRelativePathToDirectoryOrUrl(sourcesDirectoryPath, currentSource.fileName, host.getCurrentDirectory(), host.getCanonicalFileName, true);
sourceMapSourceIndex = ts.indexOf(sourceMapData.sourceMapSources, source);
if (sourceMapSourceIndex === -1) {
sourceMapSourceIndex = sourceMapData.sourceMapSources.length;
sourceMapData.sourceMapSources.push(source);
- sourceMapData.inputSourceFileNames.push(currentSourceFile.fileName);
+ sourceMapData.inputSourceFileNames.push(currentSource.fileName);
if (compilerOptions.inlineSources) {
- sourceMapData.sourceMapSourcesContent.push(currentSourceFile.text);
+ sourceMapData.sourceMapSourcesContent.push(currentSource.text);
}
}
}
@@ -53210,9 +55179,9 @@ var ts;
if (extendedDiagnostics) {
ts.performance.mark("preEmitNodeWithComment");
}
- var isEmittedNode = node.kind !== 295;
- var skipLeadingComments = pos < 0 || (emitFlags & 512) !== 0;
- var skipTrailingComments = end < 0 || (emitFlags & 1024) !== 0;
+ var isEmittedNode = node.kind !== 296;
+ var skipLeadingComments = pos < 0 || (emitFlags & 512) !== 0 || node.kind === 10;
+ var skipTrailingComments = end < 0 || (emitFlags & 1024) !== 0 || node.kind === 10;
if (!skipLeadingComments) {
emitLeadingComments(pos, isEmittedNode);
}
@@ -53609,7 +55578,7 @@ var ts;
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 shouldSkip = compilerOptions.noEmitHelpers || ts.getExternalHelpersModuleName(sourceFile) !== undefined;
var shouldBundle = ts.isSourceFile(currentNode) && !isOwnFileEmit;
var helpers = ts.getEmitHelpers(currentNode);
if (helpers) {
@@ -53640,7 +55609,7 @@ var ts;
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 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, onBeforeEmitToken = handlers.onBeforeEmitToken, onAfterEmitToken = handlers.onAfterEmitToken;
var newLine = ts.getNewLineCharacter(printerOptions);
var comments = ts.createCommentWriter(printerOptions, onEmitSourceMapOfPosition);
var emitNodeWithComments = comments.emitNodeWithComments, emitBodyWithDetachedComments = comments.emitBodyWithDetachedComments, emitTrailingCommentsOfPosition = comments.emitTrailingCommentsOfPosition, emitLeadingCommentsOfPosition = comments.emitLeadingCommentsOfPosition;
@@ -53726,7 +55695,9 @@ var ts;
return text;
}
function print(hint, node, sourceFile) {
- setSourceFile(sourceFile);
+ if (sourceFile) {
+ setSourceFile(sourceFile);
+ }
pipelineEmitWithNotification(hint, node);
}
function setSourceFile(sourceFile) {
@@ -53802,7 +55773,7 @@ var ts;
function pipelineEmitUnspecified(node) {
var kind = node.kind;
if (ts.isKeyword(kind)) {
- writeTokenText(kind);
+ writeTokenNode(node);
return;
}
switch (kind) {
@@ -53943,6 +55914,8 @@ var ts;
return emitModuleBlock(node);
case 235:
return emitCaseBlock(node);
+ case 236:
+ return emitNamespaceExportDeclaration(node);
case 237:
return emitImportEqualsDeclaration(node);
case 238:
@@ -54002,7 +55975,7 @@ var ts;
return pipelineEmitExpression(trySubstituteNode(1, node));
}
if (ts.isToken(node)) {
- writeTokenText(kind);
+ writeTokenNode(node);
return;
}
}
@@ -54022,7 +55995,8 @@ var ts;
case 97:
case 101:
case 99:
- writeTokenText(kind);
+ case 91:
+ writeTokenNode(node);
return;
case 177:
return emitArrayLiteralExpression(node);
@@ -54082,8 +56056,10 @@ var ts;
return emitJsxElement(node);
case 250:
return emitJsxSelfClosingElement(node);
- case 296:
+ case 297:
return emitPartiallyEmittedExpression(node);
+ case 298:
+ return emitCommaList(node);
}
}
function trySubstituteNode(hint, node) {
@@ -54109,6 +56085,7 @@ var ts;
}
function emitIdentifier(node) {
write(getTextOfNode(node, false));
+ emitTypeArguments(node, node.typeArguments);
}
function emitQualifiedName(node) {
emitEntityName(node.left);
@@ -54131,6 +56108,7 @@ var ts;
function emitTypeParameter(node) {
emit(node.name);
emitWithPrefix(" extends ", node.constraint);
+ emitWithPrefix(" = ", node.default);
}
function emitParameter(node) {
emitDecorators(node, node.decorators);
@@ -54157,6 +56135,7 @@ var ts;
emitDecorators(node, node.decorators);
emitModifiers(node, node.modifiers);
emit(node.name);
+ writeIfPresent(node.questionToken, "?");
emitWithPrefix(": ", node.type);
emitExpressionWithPrefix(" = ", node.initializer);
write(";");
@@ -54176,6 +56155,7 @@ var ts;
emitModifiers(node, node.modifiers);
writeIfPresent(node.asteriskToken, "*");
emit(node.name);
+ writeIfPresent(node.questionToken, "?");
emitSignatureAndBody(node, emitSignatureHead);
}
function emitConstructor(node) {
@@ -54235,7 +56215,7 @@ var ts;
function emitConstructorType(node) {
write("new ");
emitTypeParameters(node, node.typeParameters);
- emitParametersForArrow(node, node.parameters);
+ emitParameters(node, node.parameters);
write(" => ");
emit(node.type);
}
@@ -54245,7 +56225,9 @@ var ts;
}
function emitTypeLiteral(node) {
write("{");
- emitList(node, node.members, 65);
+ if (node.members.length > 0) {
+ emitList(node, node.members, ts.getEmitFlags(node) & 1 ? 448 : 65);
+ }
write("}");
}
function emitArrayType(node) {
@@ -54283,9 +56265,15 @@ var ts;
write("]");
}
function emitMappedType(node) {
+ var emitFlags = ts.getEmitFlags(node);
write("{");
- writeLine();
- increaseIndent();
+ if (emitFlags & 1) {
+ write(" ");
+ }
+ else {
+ writeLine();
+ increaseIndent();
+ }
writeIfPresent(node.readonlyToken, "readonly ");
write("[");
emit(node.typeParameter.name);
@@ -54296,8 +56284,13 @@ var ts;
write(": ");
emit(node.type);
write(";");
- writeLine();
- decreaseIndent();
+ if (emitFlags & 1) {
+ write(" ");
+ }
+ else {
+ writeLine();
+ decreaseIndent();
+ }
write("}");
}
function emitLiteralType(node) {
@@ -54347,7 +56340,7 @@ var ts;
write("{}");
}
else {
- var indentedFlag = ts.getEmitFlags(node) & 32768;
+ var indentedFlag = ts.getEmitFlags(node) & 65536;
if (indentedFlag) {
increaseIndent();
}
@@ -54362,7 +56355,7 @@ var ts;
function emitPropertyAccessExpression(node) {
var indentBeforeDot = false;
var indentAfterDot = false;
- if (!(ts.getEmitFlags(node) & 65536)) {
+ if (!(ts.getEmitFlags(node) & 131072)) {
var dotRangeStart = node.expression.end;
var dotRangeEnd = ts.skipTrivia(currentSourceFile.text, node.expression.end) + 1;
var dotToken = { kind: 23, pos: dotRangeStart, end: dotRangeEnd };
@@ -54386,7 +56379,7 @@ var ts;
}
else if (ts.isPropertyAccessExpression(expression) || ts.isElementAccessExpression(expression)) {
var constantValue = ts.getConstantValue(expression);
- return isFinite(constantValue)
+ return typeof constantValue === "number" && isFinite(constantValue)
&& Math.floor(constantValue) === constantValue
&& printerOptions.removeComments;
}
@@ -54477,7 +56470,7 @@ var ts;
var indentAfterOperator = needsIndentation(node, node.operatorToken, node.right);
emitExpression(node.left);
increaseIndentIf(indentBeforeOperator, isCommaOperator ? " " : undefined);
- writeTokenText(node.operatorToken.kind);
+ writeTokenNode(node.operatorToken);
increaseIndentIf(indentAfterOperator, " ");
emitExpression(node.right);
decreaseIndentIf(indentBeforeOperator, indentAfterOperator);
@@ -54737,11 +56730,11 @@ var ts;
var body = node.body;
if (body) {
if (ts.isBlock(body)) {
- var indentedFlag = ts.getEmitFlags(node) & 32768;
+ var indentedFlag = ts.getEmitFlags(node) & 65536;
if (indentedFlag) {
increaseIndent();
}
- if (ts.getEmitFlags(node) & 262144) {
+ if (ts.getEmitFlags(node) & 524288) {
emitSignatureHead(node);
if (onEmitNode) {
onEmitNode(3, body, emitBlockCallback);
@@ -54844,7 +56837,7 @@ var ts;
emitModifiers(node, node.modifiers);
write("class");
emitNodeWithPrefix(" ", node.name, emitIdentifierName);
- var indentedFlag = ts.getEmitFlags(node) & 32768;
+ var indentedFlag = ts.getEmitFlags(node) & 65536;
if (indentedFlag) {
increaseIndent();
}
@@ -54982,6 +56975,11 @@ var ts;
}
write(";");
}
+ function emitNamespaceExportDeclaration(node) {
+ write("export as namespace ");
+ emit(node.name);
+ write(";");
+ }
function emitNamedExports(node) {
emitNamedImportsOrExports(node);
}
@@ -55081,6 +57079,9 @@ var ts;
(ts.nodeIsSynthesized(parentNode) ||
ts.nodeIsSynthesized(statements[0]) ||
ts.rangeStartPositionsAreOnSameLine(parentNode, statements[0], currentSourceFile));
+ if (statements.length > 0) {
+ emitTrailingCommentsOfPosition(statements.pos);
+ }
if (emitAsSingleStatement) {
write(" ");
emit(statements[0]);
@@ -55156,6 +57157,9 @@ var ts;
function emitPartiallyEmittedExpression(node) {
emitExpression(node.expression);
}
+ function emitCommaList(node) {
+ emitExpressionList(node, node.elements, 272);
+ }
function emitPrologueDirectives(statements, startWithNewLine, seenPrologueDirectives) {
for (var i = 0; i < statements.length; i++) {
var statement = statements[i];
@@ -55211,7 +57215,7 @@ var ts;
}
function emitModifiers(node, modifiers) {
if (modifiers && modifiers.length) {
- emitList(node, modifiers, 256);
+ emitList(node, modifiers, 131328);
write(" ");
}
}
@@ -55257,11 +57261,24 @@ var ts;
function emitParameters(parentNode, parameters) {
emitList(parentNode, parameters, 1360);
}
+ function canEmitSimpleArrowHead(parentNode, parameters) {
+ var parameter = ts.singleOrUndefined(parameters);
+ return parameter
+ && parameter.pos === parentNode.pos
+ && !(ts.isArrowFunction(parentNode) && parentNode.type)
+ && !ts.some(parentNode.decorators)
+ && !ts.some(parentNode.modifiers)
+ && !ts.some(parentNode.typeParameters)
+ && !ts.some(parameter.decorators)
+ && !ts.some(parameter.modifiers)
+ && !parameter.dotDotDotToken
+ && !parameter.questionToken
+ && !parameter.type
+ && !parameter.initializer
+ && ts.isIdentifier(parameter.name);
+ }
function emitParametersForArrow(parentNode, parameters) {
- if (parameters &&
- parameters.length === 1 &&
- parameters[0].type === undefined &&
- parameters[0].pos === parentNode.pos) {
+ if (canEmitSimpleArrowHead(parentNode, parameters)) {
emit(parameters[0]);
}
else {
@@ -55404,6 +57421,15 @@ var ts;
? onEmitSourceMapOfToken(contextNode, token, pos, writeTokenText)
: writeTokenText(token, pos);
}
+ function writeTokenNode(node) {
+ if (onBeforeEmitToken) {
+ onBeforeEmitToken(node);
+ }
+ writeTokenText(node.kind);
+ if (onAfterEmitToken) {
+ onAfterEmitToken(node);
+ }
+ }
function writeTokenText(token, pos) {
var tokenString = ts.tokenToString(token);
write(tokenString);
@@ -55581,7 +57607,9 @@ var ts;
if (node.kind === 9 && node.textSourceNode) {
var textSourceNode = node.textSourceNode;
if (ts.isIdentifier(textSourceNode)) {
- return "\"" + ts.escapeNonAsciiCharacters(ts.escapeString(getTextOfNode(textSourceNode))) + "\"";
+ return ts.getEmitFlags(node) & 16777216 ?
+ "\"" + ts.escapeString(getTextOfNode(textSourceNode)) + "\"" :
+ "\"" + ts.escapeNonAsciiString(getTextOfNode(textSourceNode)) + "\"";
}
else {
return getLiteralTextOfNode(textSourceNode);
@@ -55793,9 +57821,10 @@ var ts;
ListFormat[ListFormat["PreferNewLine"] = 32768] = "PreferNewLine";
ListFormat[ListFormat["NoTrailingNewLine"] = 65536] = "NoTrailingNewLine";
ListFormat[ListFormat["NoInterveningComments"] = 131072] = "NoInterveningComments";
- ListFormat[ListFormat["Modifiers"] = 256] = "Modifiers";
+ ListFormat[ListFormat["Modifiers"] = 131328] = "Modifiers";
ListFormat[ListFormat["HeritageClauses"] = 256] = "HeritageClauses";
- ListFormat[ListFormat["TypeLiteralMembers"] = 65] = "TypeLiteralMembers";
+ ListFormat[ListFormat["SingleLineTypeLiteralMembers"] = 448] = "SingleLineTypeLiteralMembers";
+ ListFormat[ListFormat["MultiLineTypeLiteralMembers"] = 65] = "MultiLineTypeLiteralMembers";
ListFormat[ListFormat["TupleTypeElements"] = 336] = "TupleTypeElements";
ListFormat[ListFormat["UnionTypeConstituents"] = 260] = "UnionTypeConstituents";
ListFormat[ListFormat["IntersectionTypeConstituents"] = 264] = "IntersectionTypeConstituents";
@@ -55803,6 +57832,7 @@ var ts;
ListFormat[ListFormat["ArrayBindingPatternElements"] = 304] = "ArrayBindingPatternElements";
ListFormat[ListFormat["ObjectLiteralExpressionProperties"] = 978] = "ObjectLiteralExpressionProperties";
ListFormat[ListFormat["ArrayLiteralExpressionElements"] = 4466] = "ArrayLiteralExpressionElements";
+ ListFormat[ListFormat["CommaListElements"] = 272] = "CommaListElements";
ListFormat[ListFormat["CallExpressionArguments"] = 1296] = "CallExpressionArguments";
ListFormat[ListFormat["NewExpressionArguments"] = 9488] = "NewExpressionArguments";
ListFormat[ListFormat["TemplateExpressionSpans"] = 131072] = "TemplateExpressionSpans";
@@ -56016,6 +58046,83 @@ var ts;
return output;
}
ts.formatDiagnostics = formatDiagnostics;
+ var redForegroundEscapeSequence = "\u001b[91m";
+ var yellowForegroundEscapeSequence = "\u001b[93m";
+ var blueForegroundEscapeSequence = "\u001b[93m";
+ var gutterStyleSequence = "\u001b[100;30m";
+ var gutterSeparator = " ";
+ var resetEscapeSequence = "\u001b[0m";
+ var ellipsis = "...";
+ 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 padLeft(s, length) {
+ while (s.length < length) {
+ s = " " + s;
+ }
+ return s;
+ }
+ function formatDiagnosticsWithColorAndContext(diagnostics, host) {
+ var output = "";
+ for (var _i = 0, diagnostics_2 = diagnostics; _i < diagnostics_2.length; _i++) {
+ var diagnostic = diagnostics_2[_i];
+ if (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_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;
+ var gutterWidth = (lastLine + 1 + "").length;
+ if (hasMoreThanFiveLines) {
+ gutterWidth = Math.max(ellipsis.length, gutterWidth);
+ }
+ output += ts.sys.newLine;
+ for (var i = firstLine; i <= lastLine; i++) {
+ if (hasMoreThanFiveLines && firstLine + 1 < i && i < lastLine - 1) {
+ output += formatAndReset(padLeft(ellipsis, gutterWidth), gutterStyleSequence) + gutterSeparator + ts.sys.newLine;
+ i = lastLine - 1;
+ }
+ var lineStart = ts.getPositionOfLineAndCharacter(file, i, 0);
+ var lineEnd = i < lastLineInFile ? ts.getPositionOfLineAndCharacter(file, i + 1, 0) : file.text.length;
+ var lineContent = file.text.slice(lineStart, lineEnd);
+ lineContent = lineContent.replace(/\s+$/g, "");
+ lineContent = lineContent.replace("\t", " ");
+ output += formatAndReset(padLeft(i + 1 + "", gutterWidth), gutterStyleSequence) + gutterSeparator;
+ output += lineContent + ts.sys.newLine;
+ output += formatAndReset(padLeft("", gutterWidth), gutterStyleSequence) + gutterSeparator;
+ output += redForegroundEscapeSequence;
+ if (i === firstLine) {
+ var lastCharForLine = i === lastLine ? lastLineChar : undefined;
+ output += lineContent.slice(0, firstLineChar).replace(/\S/g, " ");
+ output += lineContent.slice(firstLineChar, lastCharForLine).replace(/./g, "~");
+ }
+ else if (i === lastLine) {
+ output += lineContent.slice(0, lastLineChar).replace(/./g, "~");
+ }
+ else {
+ output += lineContent.replace(/./g, "~");
+ }
+ output += resetEscapeSequence;
+ output += ts.sys.newLine;
+ }
+ output += ts.sys.newLine;
+ output += relativeFileName + "(" + (firstLine + 1) + "," + (firstLineChar + 1) + "): ";
+ }
+ var categoryColor = getCategoryFormat(diagnostic.category);
+ var category = ts.DiagnosticCategory[diagnostic.category].toLowerCase();
+ output += formatAndReset(category, categoryColor) + " TS" + diagnostic.code + ": " + flattenDiagnosticMessageText(diagnostic.messageText, ts.sys.newLine);
+ }
+ return output;
+ }
+ ts.formatDiagnosticsWithColorAndContext = formatDiagnosticsWithColorAndContext;
function flattenDiagnosticMessageText(messageText, newLine) {
if (typeof messageText === "string") {
return messageText;
@@ -56065,6 +58172,7 @@ var ts;
var diagnosticsProducingTypeChecker;
var noDiagnosticsTypeChecker;
var classifiableNames;
+ var modifiedFilePaths;
var cachedSemanticDiagnosticsForFile = {};
var cachedDeclarationDiagnosticsForFile = {};
var resolvedTypeReferenceDirectives = ts.createMap();
@@ -56107,7 +58215,8 @@ var ts;
}
var filesByName = ts.createFileMap();
var filesByNameIgnoreCase = host.useCaseSensitiveFileNames() ? ts.createFileMap(function (fileName) { return fileName.toLowerCase(); }) : undefined;
- if (!tryReuseStructureFromOldProgram()) {
+ var structuralIsReused = tryReuseStructureFromOldProgram();
+ if (structuralIsReused !== 2) {
ts.forEach(rootNames, function (name) { return processRootFile(name, false); });
var typeReferences = ts.getAutomaticTypeDirectiveNames(options, host);
if (typeReferences.length) {
@@ -56156,7 +58265,8 @@ var ts;
getFileProcessingDiagnostics: function () { return fileProcessingDiagnostics; },
getResolvedTypeReferenceDirectives: function () { return resolvedTypeReferenceDirectives; },
isSourceFileFromExternalLibrary: isSourceFileFromExternalLibrary,
- dropDiagnosticsProducingTypeChecker: dropDiagnosticsProducingTypeChecker
+ dropDiagnosticsProducingTypeChecker: dropDiagnosticsProducingTypeChecker,
+ getSourceFileFromReference: getSourceFileFromReference,
};
verifyCompilerOptions();
ts.performance.mark("afterProgram");
@@ -56189,45 +58299,64 @@ var ts;
return classifiableNames;
}
function resolveModuleNamesReusingOldState(moduleNames, containingFile, file, oldProgramState) {
- if (!oldProgramState && !file.ambientModuleNames.length) {
+ if (structuralIsReused === 0 && !file.ambientModuleNames.length) {
return resolveModuleNamesWorker(moduleNames, containingFile);
}
+ var oldSourceFile = oldProgramState.program && oldProgramState.program.getSourceFile(containingFile);
+ if (oldSourceFile !== file && file.resolvedModules) {
+ var result_4 = [];
+ for (var _i = 0, moduleNames_1 = moduleNames; _i < moduleNames_1.length; _i++) {
+ var moduleName = moduleNames_1[_i];
+ var resolvedModule = file.resolvedModules.get(moduleName);
+ result_4.push(resolvedModule);
+ }
+ return result_4;
+ }
var unknownModuleNames;
var result;
var predictedToResolveToAmbientModuleMarker = {};
for (var i = 0; i < moduleNames.length; i++) {
var moduleName = moduleNames[i];
- var isKnownToResolveToAmbientModule = false;
+ if (file === oldSourceFile) {
+ var oldResolvedModule = oldSourceFile && oldSourceFile.resolvedModules.get(moduleName);
+ if (oldResolvedModule) {
+ if (ts.isTraceEnabled(options, host)) {
+ ts.trace(host, ts.Diagnostics.Reusing_resolution_of_module_0_to_file_1_from_old_program, moduleName, containingFile);
+ }
+ (result || (result = new Array(moduleNames.length)))[i] = oldResolvedModule;
+ continue;
+ }
+ }
+ var resolvesToAmbientModuleInNonModifiedFile = false;
if (ts.contains(file.ambientModuleNames, moduleName)) {
- isKnownToResolveToAmbientModule = true;
+ resolvesToAmbientModuleInNonModifiedFile = true;
if (ts.isTraceEnabled(options, host)) {
ts.trace(host, ts.Diagnostics.Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1, moduleName, containingFile);
}
}
else {
- isKnownToResolveToAmbientModule = checkModuleNameResolvedToAmbientModuleInNonModifiedFile(moduleName, oldProgramState);
+ resolvesToAmbientModuleInNonModifiedFile = moduleNameResolvesToAmbientModuleInNonModifiedFile(moduleName, oldProgramState);
}
- if (isKnownToResolveToAmbientModule) {
- if (!unknownModuleNames) {
- result = new Array(moduleNames.length);
- unknownModuleNames = moduleNames.slice(0, i);
- }
- result[i] = predictedToResolveToAmbientModuleMarker;
+ if (resolvesToAmbientModuleInNonModifiedFile) {
+ (result || (result = new Array(moduleNames.length)))[i] = predictedToResolveToAmbientModuleMarker;
}
- else if (unknownModuleNames) {
- unknownModuleNames.push(moduleName);
+ else {
+ (unknownModuleNames || (unknownModuleNames = [])).push(moduleName);
}
}
- if (!unknownModuleNames) {
- return resolveModuleNamesWorker(moduleNames, containingFile);
- }
- var resolutions = unknownModuleNames.length
+ var resolutions = unknownModuleNames && unknownModuleNames.length
? resolveModuleNamesWorker(unknownModuleNames, containingFile)
: emptyArray;
+ if (!result) {
+ ts.Debug.assert(resolutions.length === moduleNames.length);
+ return resolutions;
+ }
var j = 0;
for (var i = 0; i < result.length; i++) {
- if (result[i] === predictedToResolveToAmbientModuleMarker) {
- result[i] = undefined;
+ if (result[i]) {
+ if (result[i] === predictedToResolveToAmbientModuleMarker) {
+ result[i] = undefined;
+ }
}
else {
result[i] = resolutions[j];
@@ -56236,15 +58365,12 @@ var ts;
}
ts.Debug.assert(j === resolutions.length);
return result;
- function checkModuleNameResolvedToAmbientModuleInNonModifiedFile(moduleName, oldProgramState) {
- if (!oldProgramState) {
- return false;
- }
+ function moduleNameResolvesToAmbientModuleInNonModifiedFile(moduleName, oldProgramState) {
var resolutionToFile = ts.getResolvedModule(oldProgramState.file, moduleName);
if (resolutionToFile) {
return false;
}
- var ambientModule = oldProgram.getTypeChecker().tryFindAmbientModuleWithoutAugmentations(moduleName);
+ var ambientModule = oldProgramState.program && oldProgramState.program.getTypeChecker().tryFindAmbientModuleWithoutAugmentations(moduleName);
if (!(ambientModule && ambientModule.declarations)) {
return false;
}
@@ -56263,67 +58389,76 @@ var ts;
}
function tryReuseStructureFromOldProgram() {
if (!oldProgram) {
- return false;
+ return 0;
}
var oldOptions = oldProgram.getCompilerOptions();
if (ts.changesAffectModuleResolution(oldOptions, options)) {
- return false;
+ return oldProgram.structureIsReused = 0;
}
- ts.Debug.assert(!oldProgram.structureIsReused);
+ ts.Debug.assert(!(oldProgram.structureIsReused & (2 | 1)));
var oldRootNames = oldProgram.getRootFileNames();
if (!ts.arrayIsEqualTo(oldRootNames, rootNames)) {
- return false;
+ return oldProgram.structureIsReused = 0;
}
if (!ts.arrayIsEqualTo(options.types, oldOptions.types)) {
- return false;
+ return oldProgram.structureIsReused = 0;
}
var newSourceFiles = [];
var filePaths = [];
var modifiedSourceFiles = [];
+ oldProgram.structureIsReused = 2;
for (var _i = 0, _a = oldProgram.getSourceFiles(); _i < _a.length; _i++) {
var oldSourceFile = _a[_i];
var newSourceFile = host.getSourceFileByPath
? host.getSourceFileByPath(oldSourceFile.fileName, oldSourceFile.path, options.target)
: host.getSourceFile(oldSourceFile.fileName, options.target);
if (!newSourceFile) {
- return false;
+ return oldProgram.structureIsReused = 0;
}
newSourceFile.path = oldSourceFile.path;
filePaths.push(newSourceFile.path);
if (oldSourceFile !== newSourceFile) {
if (oldSourceFile.hasNoDefaultLib !== newSourceFile.hasNoDefaultLib) {
- return false;
+ oldProgram.structureIsReused = 1;
}
if (!ts.arrayIsEqualTo(oldSourceFile.referencedFiles, newSourceFile.referencedFiles, fileReferenceIsEqualTo)) {
- return false;
+ oldProgram.structureIsReused = 1;
}
collectExternalModuleReferences(newSourceFile);
if (!ts.arrayIsEqualTo(oldSourceFile.imports, newSourceFile.imports, moduleNameIsEqualTo)) {
- return false;
+ oldProgram.structureIsReused = 1;
}
if (!ts.arrayIsEqualTo(oldSourceFile.moduleAugmentations, newSourceFile.moduleAugmentations, moduleNameIsEqualTo)) {
- return false;
+ oldProgram.structureIsReused = 1;
+ }
+ if ((oldSourceFile.flags & 524288) !== (newSourceFile.flags & 524288)) {
+ oldProgram.structureIsReused = 1;
}
if (!ts.arrayIsEqualTo(oldSourceFile.typeReferenceDirectives, newSourceFile.typeReferenceDirectives, fileReferenceIsEqualTo)) {
- return false;
+ oldProgram.structureIsReused = 1;
}
modifiedSourceFiles.push({ oldFile: oldSourceFile, newFile: newSourceFile });
}
- else {
- newSourceFile = oldSourceFile;
- }
newSourceFiles.push(newSourceFile);
}
- var modifiedFilePaths = modifiedSourceFiles.map(function (f) { return f.newFile.path; });
+ if (oldProgram.structureIsReused !== 2) {
+ return oldProgram.structureIsReused;
+ }
+ modifiedFilePaths = modifiedSourceFiles.map(function (f) { return f.newFile.path; });
for (var _b = 0, modifiedSourceFiles_1 = modifiedSourceFiles; _b < modifiedSourceFiles_1.length; _b++) {
var _c = modifiedSourceFiles_1[_b], oldSourceFile = _c.oldFile, newSourceFile = _c.newFile;
var newSourceFilePath = ts.getNormalizedAbsolutePath(newSourceFile.fileName, currentDirectory);
if (resolveModuleNamesWorker) {
var moduleNames = ts.map(ts.concatenate(newSourceFile.imports, newSourceFile.moduleAugmentations), getTextOfLiteral);
- var resolutions = resolveModuleNamesReusingOldState(moduleNames, newSourceFilePath, newSourceFile, { file: oldSourceFile, program: oldProgram, modifiedFilePaths: modifiedFilePaths });
+ var oldProgramState = { program: oldProgram, file: oldSourceFile, modifiedFilePaths: modifiedFilePaths };
+ var resolutions = resolveModuleNamesReusingOldState(moduleNames, newSourceFilePath, newSourceFile, oldProgramState);
var resolutionsChanged = ts.hasChangesInResolutions(moduleNames, resolutions, oldSourceFile.resolvedModules, ts.moduleResolutionIsEqualTo);
if (resolutionsChanged) {
- return false;
+ oldProgram.structureIsReused = 1;
+ newSourceFile.resolvedModules = ts.zipToMap(moduleNames, resolutions);
+ }
+ else {
+ newSourceFile.resolvedModules = oldSourceFile.resolvedModules;
}
}
if (resolveTypeReferenceDirectiveNamesWorker) {
@@ -56331,11 +58466,16 @@ var ts;
var resolutions = resolveTypeReferenceDirectiveNamesWorker(typesReferenceDirectives, newSourceFilePath);
var resolutionsChanged = ts.hasChangesInResolutions(typesReferenceDirectives, resolutions, oldSourceFile.resolvedTypeReferenceDirectiveNames, ts.typeDirectiveIsEqualTo);
if (resolutionsChanged) {
- return false;
+ oldProgram.structureIsReused = 1;
+ newSourceFile.resolvedTypeReferenceDirectiveNames = ts.zipToMap(typesReferenceDirectives, resolutions);
+ }
+ else {
+ newSourceFile.resolvedTypeReferenceDirectiveNames = oldSourceFile.resolvedTypeReferenceDirectiveNames;
}
}
- newSourceFile.resolvedModules = oldSourceFile.resolvedModules;
- newSourceFile.resolvedTypeReferenceDirectiveNames = oldSourceFile.resolvedTypeReferenceDirectiveNames;
+ }
+ if (oldProgram.structureIsReused !== 2) {
+ return oldProgram.structureIsReused;
}
for (var i = 0; i < newSourceFiles.length; i++) {
filesByName.set(filePaths[i], newSourceFiles[i]);
@@ -56347,8 +58487,7 @@ var ts;
fileProcessingDiagnostics.reattachFileDiagnostics(modifiedFile.newFile);
}
resolvedTypeReferenceDirectives = oldProgram.getResolvedTypeReferenceDirectives();
- oldProgram.structureIsReused = true;
- return true;
+ return oldProgram.structureIsReused = 2;
}
function getEmitHost(writeFileCallback) {
return {
@@ -56420,14 +58559,12 @@ var ts;
if (sourceFile) {
return getDiagnostics(sourceFile, cancellationToken);
}
- var allDiagnostics = [];
- ts.forEach(program.getSourceFiles(), function (sourceFile) {
+ return ts.sortAndDeduplicateDiagnostics(ts.flatMap(program.getSourceFiles(), function (sourceFile) {
if (cancellationToken) {
cancellationToken.throwIfCancellationRequested();
}
- ts.addRange(allDiagnostics, getDiagnostics(sourceFile, cancellationToken));
- });
- return ts.sortAndDeduplicateDiagnostics(allDiagnostics);
+ return getDiagnostics(sourceFile, cancellationToken);
+ }));
}
function getSyntacticDiagnostics(sourceFile, cancellationToken) {
return getDiagnosticsHelper(sourceFile, getSyntacticDiagnosticsForFile, cancellationToken);
@@ -56448,6 +58585,9 @@ var ts;
if (ts.isSourceFileJavaScript(sourceFile)) {
if (!sourceFile.additionalSyntacticDiagnostics) {
sourceFile.additionalSyntacticDiagnostics = getJavaScriptSyntacticDiagnosticsForFile(sourceFile);
+ if (ts.isCheckJsEnabledForFile(sourceFile, options)) {
+ sourceFile.additionalSyntacticDiagnostics = ts.concatenate(sourceFile.additionalSyntacticDiagnostics, sourceFile.jsDocDiagnostics);
+ }
}
return ts.concatenate(sourceFile.additionalSyntacticDiagnostics, sourceFile.parseDiagnostics);
}
@@ -56475,9 +58615,9 @@ var ts;
}
var typeChecker = getDiagnosticsProducingTypeChecker();
ts.Debug.assert(!!sourceFile.bindDiagnostics);
- var bindDiagnostics = sourceFile.bindDiagnostics;
- var includeCheckDiagnostics = !ts.isSourceFileJavaScript(sourceFile) || ts.isCheckJsEnabledForFile(sourceFile, options);
- var checkDiagnostics = includeCheckDiagnostics ? typeChecker.getDiagnostics(sourceFile, cancellationToken) : [];
+ var includeBindAndCheckDiagnostics = !ts.isSourceFileJavaScript(sourceFile) || ts.isCheckJsEnabledForFile(sourceFile, options);
+ var bindDiagnostics = includeBindAndCheckDiagnostics ? sourceFile.bindDiagnostics : emptyArray;
+ var checkDiagnostics = includeBindAndCheckDiagnostics ? typeChecker.getDiagnostics(sourceFile, cancellationToken) : emptyArray;
var fileProcessingDiagnosticsInFile = fileProcessingDiagnostics.getDiagnostics(sourceFile.fileName);
var programDiagnosticsInFile = programDiagnostics.getDiagnostics(sourceFile.fileName);
var diagnostics = bindDiagnostics.concat(checkDiagnostics, fileProcessingDiagnosticsInFile, programDiagnosticsInFile);
@@ -56688,18 +58828,13 @@ var ts;
return result;
}
function getDeclarationDiagnosticsForFile(sourceFile, cancellationToken) {
- return ts.isDeclarationFile(sourceFile) ? [] : getDeclarationDiagnosticsWorker(sourceFile, cancellationToken);
+ return sourceFile.isDeclarationFile ? [] : getDeclarationDiagnosticsWorker(sourceFile, cancellationToken);
}
function getOptionsDiagnostics() {
- var allDiagnostics = [];
- ts.addRange(allDiagnostics, fileProcessingDiagnostics.getGlobalDiagnostics());
- ts.addRange(allDiagnostics, programDiagnostics.getGlobalDiagnostics());
- return ts.sortAndDeduplicateDiagnostics(allDiagnostics);
+ return ts.sortAndDeduplicateDiagnostics(ts.concatenate(fileProcessingDiagnostics.getGlobalDiagnostics(), programDiagnostics.getGlobalDiagnostics()));
}
function getGlobalDiagnostics() {
- var allDiagnostics = [];
- ts.addRange(allDiagnostics, getDiagnosticsProducingTypeChecker().getGlobalDiagnostics());
- return ts.sortAndDeduplicateDiagnostics(allDiagnostics);
+ return ts.sortAndDeduplicateDiagnostics(getDiagnosticsProducingTypeChecker().getGlobalDiagnostics().slice());
}
function processRootFile(fileName, isDefaultLib) {
processSourceFile(ts.normalizePath(fileName), isDefaultLib);
@@ -56719,7 +58854,6 @@ var ts;
}
var isJavaScriptFile = ts.isSourceFileJavaScript(file);
var isExternalModuleFile = ts.isExternalModule(file);
- var isDtsFile = ts.isDeclarationFile(file);
var imports;
var moduleAugmentations;
var ambientModules;
@@ -56735,8 +58869,8 @@ var ts;
for (var _i = 0, _a = file.statements; _i < _a.length; _i++) {
var node = _a[_i];
collectModuleReferences(node, false);
- if (isJavaScriptFile) {
- collectRequireCalls(node);
+ if ((file.flags & 524288) || isJavaScriptFile) {
+ collectDynamicImportOrRequireCalls(node);
}
}
file.imports = imports || emptyArray;
@@ -56760,13 +58894,13 @@ var ts;
}
break;
case 233:
- if (ts.isAmbientModule(node) && (inAmbientModule || ts.hasModifier(node, 2) || ts.isDeclarationFile(file))) {
+ if (ts.isAmbientModule(node) && (inAmbientModule || ts.hasModifier(node, 2) || file.isDeclarationFile)) {
var moduleName = node.name;
if (isExternalModuleFile || (inAmbientModule && !ts.isExternalModuleNameRelative(moduleName.text))) {
(moduleAugmentations || (moduleAugmentations = [])).push(moduleName);
}
else if (!inAmbientModule) {
- if (isDtsFile) {
+ if (file.isDeclarationFile) {
(ambientModules || (ambientModules = [])).push(moduleName.text);
}
var body = node.body;
@@ -56780,55 +58914,63 @@ var ts;
}
}
}
- function collectRequireCalls(node) {
+ function collectDynamicImportOrRequireCalls(node) {
if (ts.isRequireCall(node, true)) {
(imports || (imports = [])).push(node.arguments[0]);
}
+ else if (ts.isImportCall(node) && node.arguments.length === 1 && node.arguments[0].kind === 9) {
+ (imports || (imports = [])).push(node.arguments[0]);
+ }
else {
- ts.forEachChild(node, collectRequireCalls);
+ ts.forEachChild(node, collectDynamicImportOrRequireCalls);
}
}
}
- function processSourceFile(fileName, isDefaultLib, refFile, refPos, refEnd) {
- var diagnosticArgument;
- var diagnostic;
+ function getSourceFileFromReference(referencingFile, ref) {
+ return getSourceFileFromReferenceWorker(resolveTripleslashReference(ref.fileName, referencingFile.fileName), function (fileName) { return filesByName.get(ts.toPath(fileName, currentDirectory, getCanonicalFileName)); });
+ }
+ function getSourceFileFromReferenceWorker(fileName, getSourceFile, fail, refFile) {
if (ts.hasExtension(fileName)) {
if (!options.allowNonTsExtensions && !ts.forEach(supportedExtensions, function (extension) { return ts.fileExtensionIs(host.getCanonicalFileName(fileName), extension); })) {
- diagnostic = ts.Diagnostics.File_0_has_unsupported_extension_The_only_supported_extensions_are_1;
- diagnosticArgument = [fileName, "'" + supportedExtensions.join("', '") + "'"];
- }
- else if (!findSourceFile(fileName, ts.toPath(fileName, currentDirectory, getCanonicalFileName), isDefaultLib, refFile, refPos, refEnd)) {
- diagnostic = ts.Diagnostics.File_0_not_found;
- diagnosticArgument = [fileName];
- }
- else if (refFile && host.getCanonicalFileName(fileName) === host.getCanonicalFileName(refFile.fileName)) {
- diagnostic = ts.Diagnostics.A_file_cannot_have_a_reference_to_itself;
- diagnosticArgument = [fileName];
+ if (fail)
+ fail(ts.Diagnostics.File_0_has_unsupported_extension_The_only_supported_extensions_are_1, fileName, "'" + supportedExtensions.join("', '") + "'");
+ return undefined;
}
- }
- else {
- var nonTsFile = options.allowNonTsExtensions && findSourceFile(fileName, ts.toPath(fileName, currentDirectory, getCanonicalFileName), isDefaultLib, refFile, refPos, refEnd);
- if (!nonTsFile) {
- if (options.allowNonTsExtensions) {
- diagnostic = ts.Diagnostics.File_0_not_found;
- diagnosticArgument = [fileName];
+ var sourceFile = getSourceFile(fileName);
+ if (fail) {
+ if (!sourceFile) {
+ fail(ts.Diagnostics.File_0_not_found, fileName);
}
- else if (!ts.forEach(supportedExtensions, function (extension) { return findSourceFile(fileName + extension, ts.toPath(fileName + extension, currentDirectory, getCanonicalFileName), isDefaultLib, refFile, refPos, refEnd); })) {
- diagnostic = ts.Diagnostics.File_0_not_found;
- fileName += ".ts";
- diagnosticArgument = [fileName];
+ else if (refFile && host.getCanonicalFileName(fileName) === host.getCanonicalFileName(refFile.fileName)) {
+ fail(ts.Diagnostics.A_file_cannot_have_a_reference_to_itself, fileName);
}
}
+ return sourceFile;
}
- if (diagnostic) {
- if (refFile !== undefined && refEnd !== undefined && refPos !== undefined) {
- fileProcessingDiagnostics.add(ts.createFileDiagnostic.apply(void 0, [refFile, refPos, refEnd - refPos, diagnostic].concat(diagnosticArgument)));
- }
- else {
- fileProcessingDiagnostics.add(ts.createCompilerDiagnostic.apply(void 0, [diagnostic].concat(diagnosticArgument)));
+ else {
+ var sourceFileNoExtension = options.allowNonTsExtensions && getSourceFile(fileName);
+ if (sourceFileNoExtension)
+ return sourceFileNoExtension;
+ if (fail && options.allowNonTsExtensions) {
+ fail(ts.Diagnostics.File_0_not_found, fileName);
+ return undefined;
}
+ var sourceFileWithAddedExtension = ts.forEach(supportedExtensions, function (extension) { return getSourceFile(fileName + extension); });
+ if (fail && !sourceFileWithAddedExtension)
+ fail(ts.Diagnostics.File_0_not_found, fileName + ".ts");
+ return sourceFileWithAddedExtension;
}
}
+ function processSourceFile(fileName, isDefaultLib, refFile, refPos, refEnd) {
+ getSourceFileFromReferenceWorker(fileName, function (fileName) { return findSourceFile(fileName, ts.toPath(fileName, currentDirectory, getCanonicalFileName), isDefaultLib, refFile, refPos, refEnd); }, function (diagnostic) {
+ var args = [];
+ for (var _i = 1; _i < arguments.length; _i++) {
+ args[_i - 1] = arguments[_i];
+ }
+ fileProcessingDiagnostics.add(refFile !== undefined && refEnd !== undefined && refPos !== undefined
+ ? ts.createFileDiagnostic.apply(void 0, [refFile, refPos, refEnd - refPos, diagnostic].concat(args)) : ts.createCompilerDiagnostic.apply(void 0, [diagnostic].concat(args)));
+ }, refFile);
+ }
function reportFileNamesDifferOnlyInCasingError(fileName, existingFileName, refFile, refPos, refEnd) {
if (refFile !== undefined && refPos !== undefined && refEnd !== undefined) {
fileProcessingDiagnostics.add(ts.createFileDiagnostic(refFile, refPos, refEnd - refPos, ts.Diagnostics.File_name_0_differs_from_already_included_file_name_1_only_in_casing, fileName, existingFileName));
@@ -56963,10 +59105,10 @@ var ts;
function processImportedModules(file) {
collectExternalModuleReferences(file);
if (file.imports.length || file.moduleAugmentations.length) {
- file.resolvedModules = ts.createMap();
var nonGlobalAugmentation = ts.filter(file.moduleAugmentations, function (moduleAugmentation) { return moduleAugmentation.kind === 9; });
var moduleNames = ts.map(ts.concatenate(file.imports, nonGlobalAugmentation), getTextOfLiteral);
- var resolutions = resolveModuleNamesReusingOldState(moduleNames, ts.getNormalizedAbsolutePath(file.fileName, currentDirectory), file);
+ var oldProgramState = { program: oldProgram, file: file, modifiedFilePaths: modifiedFilePaths };
+ var resolutions = resolveModuleNamesReusingOldState(moduleNames, ts.getNormalizedAbsolutePath(file.fileName, currentDirectory), file, oldProgramState);
ts.Debug.assert(resolutions.length === moduleNames.length);
for (var i = 0; i < moduleNames.length; i++) {
var resolution = resolutions[i];
@@ -57015,7 +59157,7 @@ var ts;
var absoluteRootDirectoryPath = host.getCanonicalFileName(ts.getNormalizedAbsolutePath(rootDirectory, currentDirectory));
for (var _i = 0, sourceFiles_3 = sourceFiles; _i < sourceFiles_3.length; _i++) {
var sourceFile = sourceFiles_3[_i];
- if (!ts.isDeclarationFile(sourceFile)) {
+ if (!sourceFile.isDeclarationFile) {
var absoluteSourceFilePath = host.getCanonicalFileName(ts.getNormalizedAbsolutePath(sourceFile.fileName, currentDirectory));
if (absoluteSourceFilePath.indexOf(absoluteRootDirectoryPath) !== 0) {
programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files, sourceFile.fileName, options.rootDir));
@@ -57112,12 +59254,12 @@ var ts;
}
var languageVersion = options.target || 0;
var outFile = options.outFile || options.out;
- var firstNonAmbientExternalModuleSourceFile = ts.forEach(files, function (f) { return ts.isExternalModule(f) && !ts.isDeclarationFile(f) ? f : undefined; });
+ var firstNonAmbientExternalModuleSourceFile = ts.forEach(files, function (f) { return ts.isExternalModule(f) && !f.isDeclarationFile ? f : undefined; });
if (options.isolatedModules) {
if (options.module === ts.ModuleKind.None && languageVersion < 2) {
programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES2015_or_higher));
}
- var firstNonExternalModuleSourceFile = ts.forEach(files, function (f) { return !ts.isExternalModule(f) && !ts.isDeclarationFile(f) ? f : undefined; });
+ var firstNonExternalModuleSourceFile = ts.forEach(files, function (f) { return !ts.isExternalModule(f) && !f.isDeclarationFile ? f : undefined; });
if (firstNonExternalModuleSourceFile) {
var span_7 = ts.getErrorSpanForNode(firstNonExternalModuleSourceFile, firstNonExternalModuleSourceFile);
programDiagnostics.add(ts.createFileDiagnostic(firstNonExternalModuleSourceFile, span_7.start, span_7.length, ts.Diagnostics.Cannot_compile_namespaces_when_the_isolatedModules_flag_is_provided));
@@ -57369,31 +59511,31 @@ var ts;
var ClassificationTypeNames = (function () {
function ClassificationTypeNames() {
}
+ ClassificationTypeNames.comment = "comment";
+ ClassificationTypeNames.identifier = "identifier";
+ ClassificationTypeNames.keyword = "keyword";
+ ClassificationTypeNames.numericLiteral = "number";
+ ClassificationTypeNames.operator = "operator";
+ ClassificationTypeNames.stringLiteral = "string";
+ ClassificationTypeNames.whiteSpace = "whitespace";
+ ClassificationTypeNames.text = "text";
+ ClassificationTypeNames.punctuation = "punctuation";
+ ClassificationTypeNames.className = "class name";
+ ClassificationTypeNames.enumName = "enum name";
+ ClassificationTypeNames.interfaceName = "interface name";
+ ClassificationTypeNames.moduleName = "module name";
+ ClassificationTypeNames.typeParameterName = "type parameter name";
+ ClassificationTypeNames.typeAliasName = "type alias name";
+ ClassificationTypeNames.parameterName = "parameter name";
+ ClassificationTypeNames.docCommentTagName = "doc comment tag name";
+ ClassificationTypeNames.jsxOpenTagName = "jsx open tag name";
+ ClassificationTypeNames.jsxCloseTagName = "jsx close tag name";
+ ClassificationTypeNames.jsxSelfClosingTagName = "jsx self closing tag name";
+ ClassificationTypeNames.jsxAttribute = "jsx attribute";
+ ClassificationTypeNames.jsxText = "jsx text";
+ ClassificationTypeNames.jsxAttributeStringLiteralValue = "jsx attribute string literal value";
return ClassificationTypeNames;
}());
- ClassificationTypeNames.comment = "comment";
- ClassificationTypeNames.identifier = "identifier";
- ClassificationTypeNames.keyword = "keyword";
- ClassificationTypeNames.numericLiteral = "number";
- ClassificationTypeNames.operator = "operator";
- ClassificationTypeNames.stringLiteral = "string";
- ClassificationTypeNames.whiteSpace = "whitespace";
- ClassificationTypeNames.text = "text";
- ClassificationTypeNames.punctuation = "punctuation";
- ClassificationTypeNames.className = "class name";
- ClassificationTypeNames.enumName = "enum name";
- ClassificationTypeNames.interfaceName = "interface name";
- ClassificationTypeNames.moduleName = "module name";
- ClassificationTypeNames.typeParameterName = "type parameter name";
- ClassificationTypeNames.typeAliasName = "type alias name";
- ClassificationTypeNames.parameterName = "parameter name";
- ClassificationTypeNames.docCommentTagName = "doc comment tag name";
- ClassificationTypeNames.jsxOpenTagName = "jsx open tag name";
- ClassificationTypeNames.jsxCloseTagName = "jsx close tag name";
- ClassificationTypeNames.jsxSelfClosingTagName = "jsx self closing tag name";
- ClassificationTypeNames.jsxAttribute = "jsx attribute";
- ClassificationTypeNames.jsxText = "jsx text";
- ClassificationTypeNames.jsxAttributeStringLiteralValue = "jsx attribute string literal value";
ts.ClassificationTypeNames = ClassificationTypeNames;
var ClassificationType;
(function (ClassificationType) {
@@ -57444,7 +59586,6 @@ var ts;
case 148:
case 261:
case 262:
- case 264:
case 151:
case 150:
case 152:
@@ -57461,8 +59602,10 @@ var ts;
case 231:
case 163:
return 2;
+ case 291:
+ return node.name === undefined ? 1 | 2 : 2;
+ case 264:
case 229:
- case 232:
return 1 | 2;
case 233:
if (ts.isAmbientModule(node)) {
@@ -57474,17 +59617,18 @@ var ts;
else {
return 4;
}
+ case 232:
case 241:
case 242:
case 237:
case 238:
case 243:
case 244:
- return 1 | 2 | 4;
+ return 7;
case 265:
return 4 | 1;
}
- return 1 | 2 | 4;
+ return 7;
}
ts.getMeaningFromDeclaration = getMeaningFromDeclaration;
function getMeaningFromLocation(node) {
@@ -57492,9 +59636,9 @@ var ts;
return 1;
}
else if (node.parent.kind === 243) {
- return 1 | 2 | 4;
+ return 7;
}
- else if (isInRightSideOfImport(node)) {
+ else if (isInRightSideOfInternalImportEqualsDeclaration(node)) {
return getMeaningFromRightHandSideOfImportEquals(node);
}
else if (ts.isDeclarationName(node)) {
@@ -57506,6 +59650,10 @@ var ts;
else if (isNamespaceReference(node)) {
return 4;
}
+ else if (ts.isTypeParameterDeclaration(node.parent)) {
+ ts.Debug.assert(ts.isJSDocTemplateTag(node.parent.parent));
+ return 2;
+ }
else {
return 1;
}
@@ -57520,12 +59668,13 @@ var ts;
}
return 4;
}
- function isInRightSideOfImport(node) {
+ function isInRightSideOfInternalImportEqualsDeclaration(node) {
while (node.parent.kind === 143) {
node = node.parent;
}
return ts.isInternalModuleImportEqualsDeclaration(node.parent) && node.parent.moduleReference === node;
}
+ ts.isInRightSideOfInternalImportEqualsDeclaration = isInRightSideOfInternalImportEqualsDeclaration;
function isNamespaceReference(node) {
return isQualifiedNameNamespaceReference(node) || isPropertyAccessNamespaceReference(node);
}
@@ -57560,10 +59709,20 @@ var ts;
if (ts.isRightSideOfQualifiedNameOrPropertyAccess(node)) {
node = node.parent;
}
- return node.parent.kind === 159 ||
- (node.parent.kind === 201 && !ts.isExpressionWithTypeArgumentsInClassExtendsClause(node.parent)) ||
- (node.kind === 99 && !ts.isPartOfExpression(node)) ||
- node.kind === 169;
+ switch (node.kind) {
+ case 99:
+ return !ts.isPartOfExpression(node);
+ case 169:
+ return true;
+ }
+ switch (node.parent.kind) {
+ case 159:
+ case 277:
+ return true;
+ case 201:
+ return !ts.isExpressionWithTypeArgumentsInClassExtendsClause(node.parent);
+ }
+ return false;
}
function isCallExpressionTarget(node) {
return isCallOrNewExpressionTarget(node, 181);
@@ -57635,7 +59794,7 @@ var ts;
case 153:
case 154:
case 233:
- return node.parent.name === node;
+ return ts.getNameOfDeclaration(node.parent) === node;
case 180:
return node.parent.argumentExpression === node;
case 144:
@@ -57650,31 +59809,6 @@ var ts;
ts.getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node;
}
ts.isExpressionOfExternalModuleImportEqualsDeclaration = isExpressionOfExternalModuleImportEqualsDeclaration;
- function isInsideComment(sourceFile, token, position) {
- return position <= token.getStart(sourceFile) &&
- (isInsideCommentRange(ts.getTrailingCommentRanges(sourceFile.text, token.getFullStart())) ||
- isInsideCommentRange(ts.getLeadingCommentRanges(sourceFile.text, token.getFullStart())));
- function isInsideCommentRange(comments) {
- return ts.forEach(comments, function (comment) {
- if (comment.pos < position && position < comment.end) {
- return true;
- }
- else if (position === comment.end) {
- var text = sourceFile.text;
- var width = comment.end - comment.pos;
- if (width <= 2 || text.charCodeAt(comment.pos + 1) === 47) {
- return true;
- }
- else {
- return !(text.charCodeAt(comment.end - 1) === 47 &&
- text.charCodeAt(comment.end - 2) === 42);
- }
- }
- return false;
- });
- }
- }
- ts.isInsideComment = isInsideComment;
function getContainerNode(node) {
while (true) {
node = node.parent;
@@ -57739,7 +59873,7 @@ var ts;
case 246:
case 240:
return ts.ScriptElementKind.alias;
- case 290:
+ case 291:
return ts.ScriptElementKind.typeElement;
default:
return ts.ScriptElementKind.unknown;
@@ -57945,7 +60079,7 @@ var ts;
ts.findChildOfKind = findChildOfKind;
function findContainingList(node) {
var syntaxList = ts.forEach(node.parent.getChildren(), function (c) {
- if (c.kind === 294 && c.pos <= node.pos && c.end >= node.end) {
+ if (c.kind === 295 && c.pos <= node.pos && c.end >= node.end) {
return c;
}
});
@@ -57954,69 +60088,45 @@ var ts;
}
ts.findContainingList = findContainingList;
function getTouchingWord(sourceFile, position, includeJsDocComment) {
- if (includeJsDocComment === void 0) { includeJsDocComment = false; }
- return getTouchingToken(sourceFile, position, function (n) { return isWord(n.kind); }, includeJsDocComment);
+ return getTouchingToken(sourceFile, position, includeJsDocComment, function (n) { return isWord(n.kind); });
}
ts.getTouchingWord = getTouchingWord;
function getTouchingPropertyName(sourceFile, position, includeJsDocComment) {
- if (includeJsDocComment === void 0) { includeJsDocComment = false; }
- return getTouchingToken(sourceFile, position, function (n) { return isPropertyName(n.kind); }, includeJsDocComment);
+ return getTouchingToken(sourceFile, position, includeJsDocComment, function (n) { return isPropertyName(n.kind); });
}
ts.getTouchingPropertyName = getTouchingPropertyName;
- function getTouchingToken(sourceFile, position, includeItemAtEndPosition, includeJsDocComment) {
- if (includeJsDocComment === void 0) { includeJsDocComment = false; }
- return getTokenAtPositionWorker(sourceFile, position, false, includeItemAtEndPosition, includeJsDocComment);
+ function getTouchingToken(sourceFile, position, includeJsDocComment, includePrecedingTokenAtEndPosition) {
+ return getTokenAtPositionWorker(sourceFile, position, false, includePrecedingTokenAtEndPosition, false, includeJsDocComment);
}
ts.getTouchingToken = getTouchingToken;
- function getTokenAtPosition(sourceFile, position, includeJsDocComment) {
- if (includeJsDocComment === void 0) { includeJsDocComment = false; }
- return getTokenAtPositionWorker(sourceFile, position, true, undefined, includeJsDocComment);
+ function getTokenAtPosition(sourceFile, position, includeJsDocComment, includeEndPosition) {
+ return getTokenAtPositionWorker(sourceFile, position, true, undefined, includeEndPosition, includeJsDocComment);
}
ts.getTokenAtPosition = getTokenAtPosition;
- function getTokenAtPositionWorker(sourceFile, position, allowPositionInLeadingTrivia, includeItemAtEndPosition, includeJsDocComment) {
- if (includeJsDocComment === void 0) { includeJsDocComment = false; }
+ function getTokenAtPositionWorker(sourceFile, position, allowPositionInLeadingTrivia, includePrecedingTokenAtEndPosition, includeEndPosition, includeJsDocComment) {
var current = sourceFile;
outer: while (true) {
if (ts.isToken(current)) {
return current;
}
- if (includeJsDocComment) {
- var jsDocChildren = ts.filter(current.getChildren(), ts.isJSDocNode);
- for (var _i = 0, jsDocChildren_1 = jsDocChildren; _i < jsDocChildren_1.length; _i++) {
- var jsDocChild = jsDocChildren_1[_i];
- var start = allowPositionInLeadingTrivia ? jsDocChild.getFullStart() : jsDocChild.getStart(sourceFile, includeJsDocComment);
- if (start <= position) {
- var end = jsDocChild.getEnd();
- if (position < end || (position === end && jsDocChild.kind === 1)) {
- current = jsDocChild;
- continue outer;
- }
- else if (includeItemAtEndPosition && end === position) {
- var previousToken = findPrecedingToken(position, sourceFile, jsDocChild);
- if (previousToken && includeItemAtEndPosition(previousToken)) {
- return previousToken;
- }
- }
- }
- }
- }
- for (var _a = 0, _b = current.getChildren(); _a < _b.length; _a++) {
- var child = _b[_a];
- if (ts.isJSDocNode(child)) {
+ for (var _i = 0, _a = current.getChildren(); _i < _a.length; _i++) {
+ var child = _a[_i];
+ if (!includeJsDocComment && ts.isJSDocNode(child)) {
continue;
}
var start = allowPositionInLeadingTrivia ? child.getFullStart() : child.getStart(sourceFile, includeJsDocComment);
- if (start <= position) {
- var end = child.getEnd();
- if (position < end || (position === end && child.kind === 1)) {
- current = child;
- continue outer;
- }
- else if (includeItemAtEndPosition && end === position) {
- var previousToken = findPrecedingToken(position, sourceFile, child);
- if (previousToken && includeItemAtEndPosition(previousToken)) {
- return previousToken;
- }
+ if (start > position) {
+ continue;
+ }
+ var end = child.getEnd();
+ if (position < end || (position === end && (child.kind === 1 || includeEndPosition))) {
+ current = child;
+ continue outer;
+ }
+ else if (includePrecedingTokenAtEndPosition && end === position) {
+ var previousToken = findPrecedingToken(position, sourceFile, child);
+ if (previousToken && includePrecedingTokenAtEndPosition(previousToken)) {
+ return previousToken;
}
}
}
@@ -58024,7 +60134,7 @@ var ts;
}
}
function findTokenOnLeftOfPosition(file, position) {
- var tokenAtPosition = getTokenAtPosition(file, position);
+ var tokenAtPosition = getTokenAtPosition(file, position, false);
if (ts.isToken(tokenAtPosition) && position > tokenAtPosition.getStart(file) && position < tokenAtPosition.getEnd()) {
return tokenAtPosition;
}
@@ -58050,7 +60160,7 @@ var ts;
}
}
ts.findNextToken = findNextToken;
- function findPrecedingToken(position, sourceFile, startNode) {
+ function findPrecedingToken(position, sourceFile, startNode, includeJsDoc) {
return find(startNode || sourceFile);
function findRightmostToken(n) {
if (ts.isToken(n)) {
@@ -58068,7 +60178,7 @@ var ts;
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);
+ var start = child.getStart(sourceFile, includeJsDoc);
var lookInPreviousChild = (start >= position) ||
(child.kind === 10 && start === child.end);
if (lookInPreviousChild) {
@@ -58080,7 +60190,7 @@ var ts;
}
}
}
- ts.Debug.assert(startNode !== undefined || n.kind === 265);
+ ts.Debug.assert(startNode !== undefined || n.kind === 265 || ts.isJSDocCommentContainingNode(n));
if (children.length) {
var candidate = findRightmostChildNodeWithTokens(children, children.length);
return candidate && findRightmostToken(candidate);
@@ -58110,12 +60220,8 @@ var ts;
return false;
}
ts.isInString = isInString;
- function isInComment(sourceFile, position) {
- return isInCommentHelper(sourceFile, position, undefined);
- }
- ts.isInComment = isInComment;
function isInsideJsxElementOrAttribute(sourceFile, position) {
- var token = getTokenAtPosition(sourceFile, position);
+ var token = getTokenAtPosition(sourceFile, position, false);
if (!token) {
return false;
}
@@ -58138,26 +60244,35 @@ var ts;
}
ts.isInsideJsxElementOrAttribute = isInsideJsxElementOrAttribute;
function isInTemplateString(sourceFile, position) {
- var token = getTokenAtPosition(sourceFile, position);
+ var token = getTokenAtPosition(sourceFile, position, false);
return ts.isTemplateLiteralKind(token.kind) && position > token.getStart(sourceFile);
}
ts.isInTemplateString = isInTemplateString;
- function isInCommentHelper(sourceFile, position, predicate) {
- var token = getTokenAtPosition(sourceFile, position);
- if (token && position <= token.getStart(sourceFile)) {
- 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) &&
- predicate(c); }) :
- ts.forEach(commentRanges, function (c) { return c.pos < position &&
- (c.kind === 2 ? position <= c.end : position < c.end); });
+ function isInComment(sourceFile, position, tokenAtPosition, predicate) {
+ if (tokenAtPosition === void 0) { tokenAtPosition = getTokenAtPosition(sourceFile, position, false); }
+ return position <= tokenAtPosition.getStart(sourceFile) &&
+ (isInCommentRange(ts.getLeadingCommentRanges(sourceFile.text, tokenAtPosition.pos)) ||
+ isInCommentRange(ts.getTrailingCommentRanges(sourceFile.text, tokenAtPosition.pos)));
+ function isInCommentRange(commentRanges) {
+ return ts.forEach(commentRanges, function (c) { return isPositionInCommentRange(c, position, sourceFile.text) && (!predicate || predicate(c)); });
+ }
+ }
+ ts.isInComment = isInComment;
+ function isPositionInCommentRange(_a, position, text) {
+ var pos = _a.pos, end = _a.end, kind = _a.kind;
+ if (pos < position && position < end) {
+ return true;
+ }
+ else if (position === end) {
+ return kind === 2 ||
+ !(text.charCodeAt(end - 1) === 47 && text.charCodeAt(end - 2) === 42);
+ }
+ else {
+ return false;
}
- return false;
}
- ts.isInCommentHelper = isInCommentHelper;
function hasDocComment(sourceFile, position) {
- var token = getTokenAtPosition(sourceFile, position);
+ var token = getTokenAtPosition(sourceFile, position, false);
var commentRanges = ts.getLeadingCommentRanges(sourceFile.text, token.pos);
return ts.forEach(commentRanges, jsDocPrefix);
function jsDocPrefix(c) {
@@ -58166,38 +60281,6 @@ var ts;
}
}
ts.hasDocComment = hasDocComment;
- function getJsDocTagAtPosition(sourceFile, position) {
- var node = ts.getTokenAtPosition(sourceFile, position);
- if (ts.isToken(node)) {
- switch (node.kind) {
- case 104:
- case 110:
- case 76:
- node = node.parent === undefined ? undefined : node.parent.parent;
- break;
- default:
- node = node.parent;
- break;
- }
- }
- if (node) {
- if (node.jsDoc) {
- for (var _i = 0, _a = node.jsDoc; _i < _a.length; _i++) {
- var jsDoc = _a[_i];
- if (jsDoc.tags) {
- for (var _b = 0, _c = jsDoc.tags; _b < _c.length; _b++) {
- var tag = _c[_b];
- if (tag.pos <= position && position <= tag.end) {
- return tag;
- }
- }
- }
- }
- }
- }
- return undefined;
- }
- ts.getJsDocTagAtPosition = getJsDocTagAtPosition;
function nodeHasTokens(n) {
return n.getWidth() !== 0;
}
@@ -58271,6 +60354,9 @@ var ts;
}
ts.isAccessibilityModifier = isAccessibilityModifier;
function compareDataObjects(dst, src) {
+ if (!dst || !src || Object.keys(dst).length !== Object.keys(src).length) {
+ return false;
+ }
for (var e in dst) {
if (typeof dst[e] === "object") {
if (!compareDataObjects(dst[e], src[e])) {
@@ -58311,25 +60397,27 @@ var ts;
}
ts.hasTrailingDirectorySeparator = hasTrailingDirectorySeparator;
function isInReferenceComment(sourceFile, position) {
- return isInCommentHelper(sourceFile, position, isReferenceComment);
- function isReferenceComment(c) {
+ return isInComment(sourceFile, position, undefined, function (c) {
var commentText = sourceFile.text.substring(c.pos, c.end);
return tripleSlashDirectivePrefixRegex.test(commentText);
- }
+ });
}
ts.isInReferenceComment = isInReferenceComment;
function isInNonReferenceComment(sourceFile, position) {
- return isInCommentHelper(sourceFile, position, isNonReferenceComment);
- function isNonReferenceComment(c) {
+ return isInComment(sourceFile, position, undefined, function (c) {
var commentText = sourceFile.text.substring(c.pos, c.end);
return !tripleSlashDirectivePrefixRegex.test(commentText);
- }
+ });
}
ts.isInNonReferenceComment = isInNonReferenceComment;
function createTextSpanFromNode(node, sourceFile) {
return ts.createTextSpanFromBounds(node.getStart(sourceFile), node.getEnd());
}
ts.createTextSpanFromNode = createTextSpanFromNode;
+ function createTextSpanFromRange(range) {
+ return ts.createTextSpanFromBounds(range.pos, range.end);
+ }
+ ts.createTextSpanFromRange = createTextSpanFromRange;
function isTypeKeyword(kind) {
switch (kind) {
case 119:
@@ -58387,7 +60475,7 @@ var ts;
clear: resetWriter,
trackSymbol: ts.noop,
reportInaccessibleThisError: ts.noop,
- reportIllegalExtends: ts.noop
+ reportPrivateInBaseOfClassExpression: ts.noop,
};
function writeIndent() {
if (lineStart) {
@@ -58589,8 +60677,8 @@ var ts;
};
var _a = ts.transpileModule("(" + content + ")", options), outputText = _a.outputText, diagnostics = _a.diagnostics;
var trimmedOutput = outputText.trim();
- for (var _i = 0, diagnostics_2 = diagnostics; _i < diagnostics_2.length; _i++) {
- var diagnostic = diagnostics_2[_i];
+ for (var _i = 0, diagnostics_3 = diagnostics; _i < diagnostics_3.length; _i++) {
+ var diagnostic = diagnostics_3[_i];
diagnostic.start = diagnostic.start - 1;
}
var _b = ts.parseConfigFileTextToJson(configFileName, trimmedOutput.substring(1, trimmedOutput.length - 2), false), config = _b.config, error = _b.error;
@@ -58612,7 +60700,7 @@ var ts;
}
ts.getOpenBrace = getOpenBrace;
function getOpenBraceOfClassLike(declaration, sourceFile) {
- return ts.getTokenAtPosition(sourceFile, declaration.members.pos - 1);
+ return ts.getTokenAtPosition(sourceFile, declaration.members.pos - 1, false);
}
ts.getOpenBraceOfClassLike = getOpenBraceOfClassLike;
})(ts || (ts = {}));
@@ -58624,7 +60712,7 @@ var ts;
if (sourceFile.isDeclarationFile) {
return undefined;
}
- var tokenAtLocation = ts.getTokenAtPosition(sourceFile, position);
+ var tokenAtLocation = ts.getTokenAtPosition(sourceFile, position, false);
var lineOfPosition = sourceFile.getLineAndCharacterOfPosition(position).line;
if (sourceFile.getLineAndCharacterOfPosition(tokenAtLocation.getStart(sourceFile)).line > lineOfPosition) {
tokenAtLocation = ts.findPrecedingToken(tokenAtLocation.pos, sourceFile);
@@ -59137,7 +61225,7 @@ var ts;
var lastEnd = 0;
for (var i = 0; i < dense.length; i += 3) {
var start = dense[i];
- var length_5 = dense[i + 1];
+ var length_6 = dense[i + 1];
var type = dense[i + 2];
if (lastEnd >= 0) {
var whitespaceLength_1 = start - lastEnd;
@@ -59145,8 +61233,8 @@ var ts;
entries.push({ length: whitespaceLength_1, classification: ts.TokenClass.Whitespace });
}
}
- entries.push({ length: length_5, classification: convertClassification(type) });
- lastEnd = start + length_5;
+ entries.push({ length: length_6, classification: convertClassification(type) });
+ lastEnd = start + length_6;
}
var whitespaceLength = text.length - lastEnd;
if (whitespaceLength > 0) {
@@ -59599,7 +61687,7 @@ var ts;
pushClassification(start, width, 1);
continue;
}
- ts.Debug.assert(ch === 61);
+ ts.Debug.assert(ch === 124 || ch === 61);
classifyDisabledMergeCode(text, start, end);
}
}
@@ -59630,16 +61718,16 @@ var ts;
pushClassification(tag.tagName.pos, tag.tagName.end - tag.tagName.pos, 18);
pos = tag.tagName.end;
switch (tag.kind) {
- case 286:
+ case 287:
processJSDocParameterTag(tag);
break;
- case 289:
+ case 290:
processJSDocTemplateTag(tag);
break;
- case 288:
+ case 289:
processElement(tag.typeExpression);
break;
- case 287:
+ case 288:
processElement(tag.typeExpression);
break;
}
@@ -59697,7 +61785,7 @@ var ts;
}
}
function tryClassifyNode(node) {
- if (ts.isJSDocTag(node)) {
+ if (ts.isJSDoc(node)) {
return true;
}
if (ts.nodeIsMissing(node)) {
@@ -60005,8 +62093,8 @@ var ts;
continue;
}
var start = completePrefix.length;
- var length_6 = normalizedMatch.length - start - normalizedSuffix.length;
- result.push(ts.removeFileExtension(normalizedMatch.substr(start, length_6)));
+ var length_7 = normalizedMatch.length - start - normalizedSuffix.length;
+ result.push(ts.removeFileExtension(normalizedMatch.substr(start, length_7)));
}
return result;
}
@@ -60018,21 +62106,18 @@ var ts;
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); });
- var nonRelativeModules = ts.filter(ambientModules, function (moduleName) { return ts.startsWith(moduleName, fragment); });
+ var nonRelativeModuleNames = ts.filter(ambientModules, function (moduleName) { return ts.startsWith(moduleName, fragment); });
if (isNestedModule) {
var moduleNameWithSeperator_1 = ts.ensureTrailingDirectorySeparator(moduleNameFragment);
- nonRelativeModules = ts.map(nonRelativeModules, function (moduleName) {
- if (ts.startsWith(fragment, moduleNameWithSeperator_1)) {
- return moduleName.substr(moduleNameWithSeperator_1.length);
- }
- return moduleName;
+ nonRelativeModuleNames = ts.map(nonRelativeModuleNames, function (nonRelativeModuleName) {
+ return ts.removePrefix(nonRelativeModuleName, moduleNameWithSeperator_1);
});
}
if (!options.moduleResolution || options.moduleResolution === ts.ModuleResolutionKind.NodeJs) {
for (var _i = 0, _a = enumerateNodeModulesVisibleToScript(host, scriptPath); _i < _a.length; _i++) {
var visibleModule = _a[_i];
if (!isNestedModule) {
- nonRelativeModules.push(visibleModule.moduleName);
+ nonRelativeModuleNames.push(visibleModule.moduleName);
}
else if (ts.startsWith(visibleModule.moduleName, moduleNameFragment)) {
var nestedFiles = tryReadDirectory(host, visibleModule.moduleDir, ts.supportedTypeScriptExtensions, undefined, ["./*"]);
@@ -60041,16 +62126,16 @@ var ts;
var f = nestedFiles_1[_b];
f = ts.normalizePath(f);
var nestedModule = ts.removeFileExtension(ts.getBaseFileName(f));
- nonRelativeModules.push(nestedModule);
+ nonRelativeModuleNames.push(nestedModule);
}
}
}
}
}
- return ts.deduplicate(nonRelativeModules);
+ return ts.deduplicate(nonRelativeModuleNames);
}
function getTripleSlashReferenceCompletion(sourceFile, position, compilerOptions, host) {
- var token = ts.getTokenAtPosition(sourceFile, position);
+ var token = ts.getTokenAtPosition(sourceFile, position, false);
if (!token) {
return undefined;
}
@@ -60263,12 +62348,25 @@ var ts;
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() };
+ var symbols = completionData.symbols, isGlobalCompletion = completionData.isGlobalCompletion, isMemberCompletion = completionData.isMemberCompletion, isNewIdentifierLocation = completionData.isNewIdentifierLocation, location = completionData.location, request = completionData.request, hasFilteredClassMemberKeywords = completionData.hasFilteredClassMemberKeywords;
+ if (sourceFile.languageVariant === 1 &&
+ location && location.parent && location.parent.kind === 252) {
+ var tagName = location.parent.parent.openingElement.tagName;
+ return { isGlobalCompletion: false, isMemberCompletion: true, isNewIdentifierLocation: false,
+ entries: [{
+ name: tagName.getFullText(),
+ kind: ts.ScriptElementKind.classElement,
+ kindModifiers: undefined,
+ sortText: "0",
+ }] };
}
- if (requestJsDocTag) {
- return { isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: false, entries: ts.JsDoc.getJSDocTagCompletions() };
+ if (request) {
+ var entries_2 = request.kind === "JsDocTagName"
+ ? ts.JsDoc.getJSDocTagNameCompletions()
+ : request.kind === "JsDocTag"
+ ? ts.JsDoc.getJSDocTagCompletions()
+ : ts.JsDoc.getJSDocParameterNameCompletions(request.tag);
+ return { isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: false, entries: entries_2 };
}
var entries = [];
if (ts.isSourceFileJavaScript(sourceFile)) {
@@ -60277,23 +62375,16 @@ var ts;
}
else {
if (!symbols || symbols.length === 0) {
- if (sourceFile.languageVariant === 1 &&
- location.parent && location.parent.kind === 252) {
- var tagName = location.parent.parent.openingElement.tagName;
- entries.push({
- name: tagName.text,
- kind: undefined,
- kindModifiers: undefined,
- sortText: "0",
- });
- }
- else {
+ if (!hasFilteredClassMemberKeywords) {
return undefined;
}
}
getCompletionEntriesFromSymbols(symbols, entries, location, true, typeChecker, compilerOptions.target, log);
}
- if (!isMemberCompletion && !requestJsDocTag && !requestJsDocTagName) {
+ if (hasFilteredClassMemberKeywords) {
+ ts.addRange(entries, classMemberKeywordCompletions);
+ }
+ else if (!isMemberCompletion) {
ts.addRange(entries, keywordCompletions);
}
return { isGlobalCompletion: isGlobalCompletion, isMemberCompletion: isMemberCompletion, isNewIdentifierLocation: isNewIdentifierLocation, entries: entries };
@@ -60338,8 +62429,8 @@ var ts;
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];
+ for (var _i = 0, symbols_5 = symbols; _i < symbols_5.length; _i++) {
+ var symbol = symbols_5[_i];
var entry = createCompletionEntry(symbol, location, performCharacterChecks, typeChecker, target);
if (entry) {
var id = ts.escapeIdentifier(entry.name);
@@ -60396,10 +62487,11 @@ var ts;
function getStringLiteralCompletionEntriesFromCallExpression(argumentInfo, typeChecker) {
var candidates = [];
var entries = [];
+ var uniques = ts.createMap();
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);
+ addStringLiteralCompletionsFromType(typeChecker.getParameterType(candidate, argumentInfo.argumentIndex), entries, typeChecker, uniques);
}
if (entries.length) {
return { isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: true, entries: entries };
@@ -60427,9 +62519,10 @@ var ts;
}
return undefined;
}
- function addStringLiteralCompletionsFromType(type, result, typeChecker) {
+ function addStringLiteralCompletionsFromType(type, result, typeChecker, uniques) {
+ if (uniques === void 0) { uniques = ts.createMap(); }
if (type && type.flags & 16384) {
- type = typeChecker.getApparentType(type);
+ type = typeChecker.getBaseConstraintOfType(type);
}
if (!type) {
return;
@@ -60437,16 +62530,20 @@ var ts;
if (type.flags & 65536) {
for (var _i = 0, _a = type.types; _i < _a.length; _i++) {
var t = _a[_i];
- addStringLiteralCompletionsFromType(t, result, typeChecker);
+ addStringLiteralCompletionsFromType(t, result, typeChecker, uniques);
}
}
else if (type.flags & 32) {
- result.push({
- name: type.text,
- kindModifiers: ts.ScriptElementKindModifier.none,
- kind: ts.ScriptElementKind.variableElement,
- sortText: "0"
- });
+ var name = type.value;
+ if (!uniques.has(name)) {
+ uniques.set(name, true);
+ result.push({
+ name: name,
+ kindModifiers: ts.ScriptElementKindModifier.none,
+ kind: ts.ScriptElementKind.variableElement,
+ sortText: "0"
+ });
+ }
}
}
function getCompletionEntryDetails(typeChecker, log, compilerOptions, sourceFile, position, entryName) {
@@ -60491,63 +62588,66 @@ var ts;
Completions.getCompletionEntrySymbol = getCompletionEntrySymbol;
function getCompletionData(typeChecker, log, sourceFile, position) {
var isJavaScriptFile = ts.isSourceFileJavaScript(sourceFile);
- var requestJsDocTagName = false;
- var requestJsDocTag = false;
+ var request;
var start = ts.timestamp();
- var currentToken = ts.getTokenAtPosition(sourceFile, position);
+ var currentToken = ts.getTokenAtPosition(sourceFile, position, false);
log("getCompletionData: Get current token: " + (ts.timestamp() - start));
start = ts.timestamp();
- var insideComment = ts.isInsideComment(sourceFile, currentToken, position);
+ var insideComment = ts.isInComment(sourceFile, position, currentToken);
log("getCompletionData: Is inside comment: " + (ts.timestamp() - start));
+ var insideJsDocTagTypeExpression = false;
if (insideComment) {
if (ts.hasDocComment(sourceFile, position)) {
if (sourceFile.text.charCodeAt(position - 1) === 64) {
- requestJsDocTagName = true;
+ request = { kind: "JsDocTagName" };
}
else {
var lineStart = ts.getLineStartPositionForPosition(position, sourceFile);
- requestJsDocTag = !(sourceFile.text.substring(lineStart, position).match(/[^\*|\s|(/\*\*)]/));
+ if (!(sourceFile.text.substring(lineStart, position).match(/[^\*|\s|(/\*\*)]/))) {
+ request = { kind: "JsDocTag" };
+ }
}
}
- var insideJsDocTagExpression = false;
- var tag = ts.getJsDocTagAtPosition(sourceFile, position);
+ var tag = getJsDocTagAtPosition(currentToken, position);
if (tag) {
if (tag.tagName.pos <= position && position <= tag.tagName.end) {
- requestJsDocTagName = true;
+ request = { kind: "JsDocTagName" };
}
- switch (tag.kind) {
- case 288:
- case 286:
- case 287:
- var tagWithExpression = tag;
- if (tagWithExpression.typeExpression) {
- insideJsDocTagExpression = tagWithExpression.typeExpression.pos < position && position < tagWithExpression.typeExpression.end;
- }
- break;
+ if (isTagWithTypeExpression(tag) && tag.typeExpression) {
+ currentToken = ts.getTokenAtPosition(sourceFile, position, true);
+ if (!currentToken ||
+ (!ts.isDeclarationName(currentToken) &&
+ (currentToken.parent.kind !== 292 ||
+ currentToken.parent.name !== currentToken))) {
+ insideJsDocTagTypeExpression = isCurrentlyEditingNode(tag.typeExpression);
+ }
+ }
+ if (ts.isJSDocParameterTag(tag) && (ts.nodeIsMissing(tag.name) || tag.name.pos <= position && position <= tag.name.end)) {
+ request = { kind: "JsDocParameterName", tag: tag };
}
}
- if (requestJsDocTagName || requestJsDocTag) {
- return { symbols: undefined, isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: false, location: undefined, isRightOfDot: false, requestJsDocTagName: requestJsDocTagName, requestJsDocTag: requestJsDocTag };
+ if (request) {
+ return { symbols: undefined, isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: false, location: undefined, isRightOfDot: false, request: request, hasFilteredClassMemberKeywords: false };
}
- if (!insideJsDocTagExpression) {
+ if (!insideJsDocTagTypeExpression) {
log("Returning an empty list because completion was inside a regular comment or plain text part of a JsDoc comment.");
return undefined;
}
}
start = ts.timestamp();
- var previousToken = ts.findPrecedingToken(position, sourceFile);
+ var previousToken = ts.findPrecedingToken(position, sourceFile, undefined, insideJsDocTagTypeExpression);
log("getCompletionData: Get previous token 1: " + (ts.timestamp() - start));
var contextToken = previousToken;
if (contextToken && position <= contextToken.end && ts.isWord(contextToken.kind)) {
var start_2 = ts.timestamp();
- contextToken = ts.findPrecedingToken(contextToken.getFullStart(), sourceFile);
+ contextToken = ts.findPrecedingToken(contextToken.getFullStart(), sourceFile, undefined, insideJsDocTagTypeExpression);
log("getCompletionData: Get previous token 2: " + (ts.timestamp() - start_2));
}
var node = currentToken;
var isRightOfDot = false;
var isRightOfOpenTag = false;
var isStartingCloseTag = false;
- var location = ts.getTouchingPropertyName(sourceFile, position);
+ var location = ts.getTouchingPropertyName(sourceFile, position, insideJsDocTagTypeExpression);
if (contextToken) {
if (isCompletionListBlocker(contextToken)) {
log("Returning an empty list because completion was requested in an invalid position.");
@@ -60598,6 +62698,7 @@ var ts;
var isGlobalCompletion = false;
var isMemberCompletion;
var isNewIdentifierLocation;
+ var hasFilteredClassMemberKeywords = false;
var symbols = [];
if (isRightOfDot) {
getTypeScriptMemberSymbols();
@@ -60628,11 +62729,24 @@ var ts;
}
}
log("getCompletionData: Semantic work: " + (ts.timestamp() - semanticStart));
- return { symbols: symbols, isGlobalCompletion: isGlobalCompletion, isMemberCompletion: isMemberCompletion, isNewIdentifierLocation: isNewIdentifierLocation, location: location, isRightOfDot: (isRightOfDot || isRightOfOpenTag), requestJsDocTagName: requestJsDocTagName, requestJsDocTag: requestJsDocTag };
+ return { symbols: symbols, isGlobalCompletion: isGlobalCompletion, isMemberCompletion: isMemberCompletion, isNewIdentifierLocation: isNewIdentifierLocation, location: location, isRightOfDot: (isRightOfDot || isRightOfOpenTag), request: request, hasFilteredClassMemberKeywords: hasFilteredClassMemberKeywords };
+ function isTagWithTypeExpression(tag) {
+ switch (tag.kind) {
+ case 285:
+ case 287:
+ case 292:
+ case 288:
+ case 289:
+ case 291:
+ return true;
+ }
+ }
function getTypeScriptMemberSymbols() {
isGlobalCompletion = false;
isMemberCompletion = true;
isNewIdentifierLocation = false;
+ var isTypeLocation = ts.isPartOfTypeNode(node.parent) || insideJsDocTagTypeExpression;
+ var isRhsOfImportDeclaration = ts.isInRightSideOfInternalImportEqualsDeclaration(node);
if (node.kind === 71 || node.kind === 143 || node.kind === 179) {
var symbol = typeChecker.getSymbolAtLocation(node);
if (symbol && symbol.flags & 8388608) {
@@ -60640,15 +62754,22 @@ var ts;
}
if (symbol && symbol.flags & 1952) {
var exportedSymbols = typeChecker.getExportsOfModule(symbol);
+ var isValidValueAccess_1 = function (symbol) { return typeChecker.isValidPropertyAccess((node.parent), symbol.name); };
+ var isValidTypeAccess_1 = function (symbol) { return symbolCanbeReferencedAtTypeLocation(symbol); };
+ var isValidAccess_1 = isRhsOfImportDeclaration ?
+ function (symbol) { return isValidTypeAccess_1(symbol) || isValidValueAccess_1(symbol); } :
+ isTypeLocation ? isValidTypeAccess_1 : isValidValueAccess_1;
ts.forEach(exportedSymbols, function (symbol) {
- if (typeChecker.isValidPropertyAccess((node.parent), symbol.name)) {
+ if (isValidAccess_1(symbol)) {
symbols.push(symbol);
}
});
}
}
- var type = typeChecker.getTypeAtLocation(node);
- addTypeProperties(type);
+ if (!isTypeLocation) {
+ var type = typeChecker.getTypeAtLocation(node);
+ addTypeProperties(type);
+ }
}
function addTypeProperties(type) {
if (type) {
@@ -60670,6 +62791,7 @@ var ts;
function tryGetGlobalSymbols() {
var objectLikeContainer;
var namedImportsOrExports;
+ var classLikeContainer;
var jsxContainer;
if (objectLikeContainer = tryGetObjectLikeCompletionContainer(contextToken)) {
return tryGetObjectLikeCompletionSymbols(objectLikeContainer);
@@ -60677,6 +62799,10 @@ var ts;
if (namedImportsOrExports = tryGetNamedImportsOrExportsForCompletion(contextToken)) {
return tryGetImportOrExportClauseCompletionSymbols(namedImportsOrExports);
}
+ if (classLikeContainer = tryGetClassLikeCompletionContainer(contextToken)) {
+ getGetClassLikeCompletionSymbols(classLikeContainer);
+ return true;
+ }
if (jsxContainer = tryGetContainingJsxElement(contextToken)) {
var attrsType = void 0;
if ((jsxContainer.kind === 250) || (jsxContainer.kind === 251)) {
@@ -60706,9 +62832,64 @@ var ts;
ts.isStatement(scopeNode);
}
var symbolMeanings = 793064 | 107455 | 1920 | 8388608;
- symbols = typeChecker.getSymbolsInScope(scopeNode, symbolMeanings);
+ symbols = filterGlobalCompletion(typeChecker.getSymbolsInScope(scopeNode, symbolMeanings));
return true;
}
+ function filterGlobalCompletion(symbols) {
+ return ts.filter(symbols, function (symbol) {
+ if (!ts.isSourceFile(location)) {
+ if (ts.isExportAssignment(location.parent)) {
+ return true;
+ }
+ if (symbol && symbol.flags & 8388608) {
+ symbol = typeChecker.getAliasedSymbol(symbol);
+ }
+ if (ts.isInRightSideOfInternalImportEqualsDeclaration(location)) {
+ return !!(symbol.flags & 1920);
+ }
+ if (insideJsDocTagTypeExpression ||
+ (!isContextTokenValueLocation(contextToken) &&
+ (ts.isPartOfTypeNode(location) || isContextTokenTypeLocation(contextToken)))) {
+ return symbolCanbeReferencedAtTypeLocation(symbol);
+ }
+ }
+ return !!(symbol.flags & 107455);
+ });
+ }
+ function isContextTokenValueLocation(contextToken) {
+ return contextToken &&
+ contextToken.kind === 103 &&
+ contextToken.parent.kind === 162;
+ }
+ function isContextTokenTypeLocation(contextToken) {
+ if (contextToken) {
+ var parentKind = contextToken.parent.kind;
+ switch (contextToken.kind) {
+ case 56:
+ return parentKind === 149 ||
+ parentKind === 148 ||
+ parentKind === 146 ||
+ parentKind === 226 ||
+ ts.isFunctionLikeKind(parentKind);
+ case 58:
+ return parentKind === 231;
+ case 118:
+ return parentKind === 202;
+ }
+ }
+ }
+ function symbolCanbeReferencedAtTypeLocation(symbol) {
+ if (symbol && symbol.flags & 8388608) {
+ symbol = typeChecker.getAliasedSymbol(symbol);
+ }
+ if (symbol.flags & 793064) {
+ return true;
+ }
+ if (symbol.flags & (512 | 1024)) {
+ var exportedSymbols = typeChecker.getExportsOfModule(symbol);
+ return ts.forEach(exportedSymbols, symbolCanbeReferencedAtTypeLocation);
+ }
+ }
function getScopeNode(initialToken, position, sourceFile) {
var scope = initialToken;
while (scope && !ts.positionBelongsToNode(scope, position, sourceFile)) {
@@ -60806,43 +62987,39 @@ var ts;
}
function tryGetObjectLikeCompletionSymbols(objectLikeContainer) {
isMemberCompletion = true;
- var typeForObject;
+ var typeMembers;
var existingMembers;
if (objectLikeContainer.kind === 178) {
isNewIdentifierLocation = true;
- typeForObject = typeChecker.getContextualType(objectLikeContainer);
- typeForObject = typeForObject && typeForObject.getNonNullableType();
+ var typeForObject = typeChecker.getContextualType(objectLikeContainer);
+ if (!typeForObject)
+ return false;
+ typeMembers = typeChecker.getAllPossiblePropertiesOfType(typeForObject);
existingMembers = objectLikeContainer.properties;
}
- else if (objectLikeContainer.kind === 174) {
+ else {
+ ts.Debug.assert(objectLikeContainer.kind === 174);
isNewIdentifierLocation = false;
var rootDeclaration = ts.getRootDeclaration(objectLikeContainer.parent);
- if (ts.isVariableLike(rootDeclaration)) {
- var canGetType = !!(rootDeclaration.initializer || rootDeclaration.type);
- if (!canGetType && rootDeclaration.kind === 146) {
- if (ts.isExpression(rootDeclaration.parent)) {
- canGetType = !!typeChecker.getContextualType(rootDeclaration.parent);
- }
- else if (rootDeclaration.parent.kind === 151 || rootDeclaration.parent.kind === 154) {
- canGetType = ts.isExpression(rootDeclaration.parent.parent) && !!typeChecker.getContextualType(rootDeclaration.parent.parent);
- }
+ if (!ts.isVariableLike(rootDeclaration))
+ throw ts.Debug.fail("Root declaration is not variable-like.");
+ var canGetType = rootDeclaration.initializer || rootDeclaration.type || rootDeclaration.parent.parent.kind === 216;
+ if (!canGetType && rootDeclaration.kind === 146) {
+ if (ts.isExpression(rootDeclaration.parent)) {
+ canGetType = !!typeChecker.getContextualType(rootDeclaration.parent);
}
- if (canGetType) {
- typeForObject = typeChecker.getTypeAtLocation(objectLikeContainer);
- existingMembers = objectLikeContainer.elements;
+ else if (rootDeclaration.parent.kind === 151 || rootDeclaration.parent.kind === 154) {
+ canGetType = ts.isExpression(rootDeclaration.parent.parent) && !!typeChecker.getContextualType(rootDeclaration.parent.parent);
}
}
- else {
- ts.Debug.fail("Root declaration is not variable-like.");
+ if (canGetType) {
+ var typeForObject = typeChecker.getTypeAtLocation(objectLikeContainer);
+ if (!typeForObject)
+ return false;
+ typeMembers = typeChecker.getPropertiesOfType(typeForObject);
+ existingMembers = objectLikeContainer.elements;
}
}
- else {
- ts.Debug.fail("Expected object literal or binding pattern, got " + objectLikeContainer.kind);
- }
- if (!typeForObject) {
- return false;
- }
- var typeMembers = typeChecker.getPropertiesOfType(typeForObject);
if (typeMembers && typeMembers.length > 0) {
symbols = filterObjectMembersList(typeMembers, existingMembers);
}
@@ -60868,13 +63045,49 @@ var ts;
symbols = filterNamedImportOrExportCompletionItems(exports, namedImportsOrExports.elements);
return true;
}
+ function getGetClassLikeCompletionSymbols(classLikeDeclaration) {
+ isMemberCompletion = true;
+ isNewIdentifierLocation = true;
+ hasFilteredClassMemberKeywords = true;
+ var baseTypeNode = ts.getClassExtendsHeritageClauseElement(classLikeDeclaration);
+ var implementsTypeNodes = ts.getClassImplementsHeritageClauseElements(classLikeDeclaration);
+ if (baseTypeNode || implementsTypeNodes) {
+ var classElement = contextToken.parent;
+ var classElementModifierFlags = ts.isClassElement(classElement) && ts.getModifierFlags(classElement);
+ if (contextToken.kind === 71 && !isCurrentlyEditingNode(contextToken)) {
+ switch (contextToken.getText()) {
+ case "private":
+ classElementModifierFlags = classElementModifierFlags | 8;
+ break;
+ case "static":
+ classElementModifierFlags = classElementModifierFlags | 32;
+ break;
+ }
+ }
+ if (!(classElementModifierFlags & 8)) {
+ var baseClassTypeToGetPropertiesFrom = void 0;
+ if (baseTypeNode) {
+ baseClassTypeToGetPropertiesFrom = typeChecker.getTypeAtLocation(baseTypeNode);
+ if (classElementModifierFlags & 32) {
+ baseClassTypeToGetPropertiesFrom = typeChecker.getTypeOfSymbolAtLocation(baseClassTypeToGetPropertiesFrom.symbol, classLikeDeclaration);
+ }
+ }
+ var implementedInterfaceTypePropertySymbols = (classElementModifierFlags & 32) ?
+ undefined :
+ ts.flatMap(implementsTypeNodes, function (typeNode) { return typeChecker.getPropertiesOfType(typeChecker.getTypeAtLocation(typeNode)); });
+ symbols = filterClassMembersList(baseClassTypeToGetPropertiesFrom ?
+ typeChecker.getPropertiesOfType(baseClassTypeToGetPropertiesFrom) :
+ undefined, implementedInterfaceTypePropertySymbols, classLikeDeclaration.members, classElementModifierFlags);
+ }
+ }
+ }
function tryGetObjectLikeCompletionContainer(contextToken) {
if (contextToken) {
switch (contextToken.kind) {
case 17:
case 26:
var parent = contextToken.parent;
- if (parent && (parent.kind === 178 || parent.kind === 174)) {
+ if (ts.isObjectLiteralExpression(parent) || ts.isObjectBindingPattern(parent)) {
return parent;
}
break;
@@ -60896,6 +63109,37 @@ var ts;
}
return undefined;
}
+ function isFromClassElementDeclaration(node) {
+ return ts.isClassElement(node.parent) && ts.isClassLike(node.parent.parent);
+ }
+ function tryGetClassLikeCompletionContainer(contextToken) {
+ if (contextToken) {
+ switch (contextToken.kind) {
+ case 17:
+ if (ts.isClassLike(contextToken.parent)) {
+ return contextToken.parent;
+ }
+ break;
+ case 26:
+ case 25:
+ case 18:
+ if (ts.isClassLike(location)) {
+ return location;
+ }
+ break;
+ default:
+ if (isFromClassElementDeclaration(contextToken) &&
+ (isClassMemberCompletionKeyword(contextToken.kind) ||
+ isClassMemberCompletionKeywordText(contextToken.getText()))) {
+ return contextToken.parent.parent;
+ }
+ }
+ }
+ if (location && location.kind === 295 && ts.isClassLike(location.parent)) {
+ return location.parent;
+ }
+ return undefined;
+ }
function tryGetContainingJsxElement(contextToken) {
if (contextToken) {
var parent = contextToken.parent;
@@ -60933,19 +63177,6 @@ var ts;
}
return undefined;
}
- function isFunction(kind) {
- if (!ts.isFunctionLikeKind(kind)) {
- return false;
- }
- switch (kind) {
- case 152:
- case 161:
- case 160:
- return false;
- default:
- return true;
- }
- }
function isSolelyIdentifierDefinitionLocation(contextToken) {
var containingNodeKind = contextToken.parent.kind;
switch (contextToken.kind) {
@@ -60954,7 +63185,7 @@ var ts;
containingNodeKind === 227 ||
containingNodeKind === 208 ||
containingNodeKind === 232 ||
- isFunction(containingNodeKind) ||
+ isFunctionLikeButNotConstructor(containingNodeKind) ||
containingNodeKind === 229 ||
containingNodeKind === 199 ||
containingNodeKind === 230 ||
@@ -60968,7 +63199,7 @@ var ts;
return containingNodeKind === 175;
case 19:
return containingNodeKind === 260 ||
- isFunction(containingNodeKind);
+ isFunctionLikeButNotConstructor(containingNodeKind);
case 17:
return containingNodeKind === 232 ||
containingNodeKind === 230 ||
@@ -60983,9 +63214,9 @@ var ts;
containingNodeKind === 199 ||
containingNodeKind === 230 ||
containingNodeKind === 231 ||
- isFunction(containingNodeKind);
+ ts.isFunctionLikeKind(containingNodeKind);
case 115:
- return containingNodeKind === 149;
+ return containingNodeKind === 149 && !ts.isClassLike(contextToken.parent.parent);
case 24:
return containingNodeKind === 146 ||
(contextToken.parent && contextToken.parent.parent &&
@@ -60998,13 +63229,16 @@ var ts;
return containingNodeKind === 242 ||
containingNodeKind === 246 ||
containingNodeKind === 240;
+ case 125:
+ case 135:
+ if (isFromClassElementDeclaration(contextToken)) {
+ return false;
+ }
case 75:
case 83:
case 109:
case 89:
case 104:
- case 125:
- case 135:
case 91:
case 110:
case 76:
@@ -61012,6 +63246,10 @@ var ts;
case 138:
return true;
}
+ if (isClassMemberCompletionKeywordText(contextToken.getText()) &&
+ isFromClassElementDeclaration(contextToken)) {
+ return false;
+ }
switch (contextToken.getText()) {
case "abstract":
case "async":
@@ -61032,6 +63270,9 @@ var ts;
}
return false;
}
+ function isFunctionLikeButNotConstructor(kind) {
+ return ts.isFunctionLikeKind(kind) && kind !== 152;
+ }
function isDotOfNumericLiteral(contextToken) {
if (contextToken.kind === 8) {
var text = contextToken.getFullText();
@@ -61043,7 +63284,7 @@ var ts;
var existingImportsOrExports = ts.createMap();
for (var _i = 0, namedImportsOrExports_1 = namedImportsOrExports; _i < namedImportsOrExports_1.length; _i++) {
var element = namedImportsOrExports_1[_i];
- if (element.getStart() <= position && position <= element.getEnd()) {
+ if (isCurrentlyEditingNode(element)) {
continue;
}
var name = element.propertyName || element.name;
@@ -61069,7 +63310,7 @@ var ts;
m.kind !== 154) {
continue;
}
- if (m.getStart() <= position && position <= m.getEnd()) {
+ if (isCurrentlyEditingNode(m)) {
continue;
}
var existingName = void 0;
@@ -61079,17 +63320,51 @@ var ts;
}
}
else {
- existingName = m.name.text;
+ existingName = ts.getNameOfDeclaration(m).text;
}
existingMemberNames.set(existingName, true);
}
return ts.filter(contextualMemberSymbols, function (m) { return !existingMemberNames.get(m.name); });
}
+ function filterClassMembersList(baseSymbols, implementingTypeSymbols, existingMembers, currentClassElementModifierFlags) {
+ var existingMemberNames = ts.createMap();
+ for (var _i = 0, existingMembers_2 = existingMembers; _i < existingMembers_2.length; _i++) {
+ var m = existingMembers_2[_i];
+ if (m.kind !== 149 &&
+ m.kind !== 151 &&
+ m.kind !== 153 &&
+ m.kind !== 154) {
+ continue;
+ }
+ if (isCurrentlyEditingNode(m)) {
+ continue;
+ }
+ if (ts.hasModifier(m, 8)) {
+ continue;
+ }
+ var mIsStatic = ts.hasModifier(m, 32);
+ var currentElementIsStatic = !!(currentClassElementModifierFlags & 32);
+ if ((mIsStatic && !currentElementIsStatic) ||
+ (!mIsStatic && currentElementIsStatic)) {
+ continue;
+ }
+ var existingName = ts.getPropertyNameForPropertyNameNode(m.name);
+ if (existingName) {
+ existingMemberNames.set(existingName, true);
+ }
+ }
+ return ts.concatenate(ts.filter(baseSymbols, function (baseProperty) { return isValidProperty(baseProperty, 8); }), ts.filter(implementingTypeSymbols, function (implementingProperty) { return isValidProperty(implementingProperty, 24); }));
+ function isValidProperty(propertySymbol, inValidModifierFlags) {
+ return !existingMemberNames.get(propertySymbol.name) &&
+ propertySymbol.getDeclarations() &&
+ !(ts.getDeclarationModifierFlagsFromSymbol(propertySymbol) & inValidModifierFlags);
+ }
+ }
function filterJsxAttributes(symbols, attributes) {
var seenNames = ts.createMap();
for (var _i = 0, attributes_1 = attributes; _i < attributes_1.length; _i++) {
var attr = attributes_1[_i];
- if (attr.getStart() <= position && position <= attr.getEnd()) {
+ if (isCurrentlyEditingNode(attr)) {
continue;
}
if (attr.kind === 253) {
@@ -61098,6 +63373,9 @@ var ts;
}
return ts.filter(symbols, function (a) { return !seenNames.get(a.name); });
}
+ function isCurrentlyEditingNode(node) {
+ return node.getStart() <= position && position <= node.getEnd();
+ }
}
function getCompletionEntryDisplayNameForSymbol(typeChecker, symbol, target, performCharacterChecks, location) {
var displayName = ts.getDeclaredName(typeChecker, symbol, location);
@@ -61133,6 +63411,27 @@ var ts;
sortText: "0"
});
}
+ function isClassMemberCompletionKeyword(kind) {
+ switch (kind) {
+ case 114:
+ case 113:
+ case 112:
+ case 117:
+ case 115:
+ case 123:
+ case 131:
+ case 125:
+ case 135:
+ case 120:
+ return true;
+ }
+ }
+ function isClassMemberCompletionKeywordText(text) {
+ return isClassMemberCompletionKeyword(ts.stringToToken(text));
+ }
+ var classMemberKeywordCompletions = ts.filter(keywordCompletions, function (entry) {
+ return isClassMemberCompletionKeywordText(entry.name);
+ });
function isEqualityExpression(node) {
return ts.isBinaryExpression(node) && isEqualityOperatorKind(node.operatorToken.kind);
}
@@ -61142,28 +63441,64 @@ var ts;
kind === 34 ||
kind === 35;
}
+ function getJsDocTagAtPosition(node, position) {
+ var jsDoc = getJsDocHavingNode(node).jsDoc;
+ if (!jsDoc)
+ return undefined;
+ for (var _i = 0, jsDoc_1 = jsDoc; _i < jsDoc_1.length; _i++) {
+ var _a = jsDoc_1[_i], pos = _a.pos, end = _a.end, tags = _a.tags;
+ if (!tags || position < pos || position > end)
+ continue;
+ for (var i = tags.length - 1; i >= 0; i--) {
+ var tag = tags[i];
+ if (position >= tag.pos) {
+ return tag;
+ }
+ }
+ }
+ }
+ function getJsDocHavingNode(node) {
+ if (!ts.isToken(node))
+ return node;
+ switch (node.kind) {
+ case 104:
+ case 110:
+ case 76:
+ return node.parent.parent;
+ default:
+ return node.parent;
+ }
+ }
})(Completions = ts.Completions || (ts.Completions = {}));
})(ts || (ts = {}));
var ts;
(function (ts) {
var DocumentHighlights;
(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));
+ function getDocumentHighlights(program, cancellationToken, sourceFile, position, sourceFilesToSearch) {
+ var node = ts.getTouchingWord(sourceFile, position, true);
+ if (!node)
+ return undefined;
+ if (ts.isJsxOpeningElement(node.parent) && node.parent.tagName === node || ts.isJsxClosingElement(node.parent)) {
+ var _a = node.parent.parent, openingElement = _a.openingElement, closingElement = _a.closingElement;
+ var highlightSpans = [openingElement, closingElement].map(function (_a) {
+ var tagName = _a.tagName;
+ return getHighlightSpanForNode(tagName, sourceFile);
+ });
+ return [{ fileName: sourceFile.fileName, highlightSpans: highlightSpans }];
+ }
+ return getSemanticDocumentHighlights(node, program, 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),
+ textSpan: ts.createTextSpanFromNode(node, sourceFile),
kind: ts.HighlightSpanKind.none
};
}
- function getSemanticDocumentHighlights(node, typeChecker, cancellationToken, sourceFilesToSearch) {
- var referenceEntries = ts.FindAllReferences.getReferenceEntriesForNode(node, sourceFilesToSearch, typeChecker, cancellationToken);
+ function getSemanticDocumentHighlights(node, program, cancellationToken, sourceFilesToSearch) {
+ var referenceEntries = ts.FindAllReferences.getReferenceEntriesForNode(node, program, sourceFilesToSearch, cancellationToken);
return referenceEntries && convertReferencedSymbols(referenceEntries);
}
function convertReferencedSymbols(referenceEntries) {
@@ -61774,7 +64109,7 @@ var ts;
}
function handleDirectImports(exportingModuleSymbol) {
var theseDirectImports = getDirectImports(exportingModuleSymbol);
- if (theseDirectImports)
+ if (theseDirectImports) {
for (var _i = 0, theseDirectImports_1 = theseDirectImports; _i < theseDirectImports_1.length; _i++) {
var direct = theseDirectImports_1[_i];
if (!markSeenDirectImport(direct)) {
@@ -61817,6 +64152,7 @@ var ts;
break;
}
}
+ }
}
function handleNamespaceImport(importDeclaration, name, isReExport) {
if (exportKind === 2) {
@@ -61848,11 +64184,12 @@ var ts;
var moduleSymbol = checker.getMergedSymbol(sourceFileLike.symbol);
ts.Debug.assert(!!(moduleSymbol.flags & 1536));
var directImports = getDirectImports(moduleSymbol);
- if (directImports)
+ 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());
@@ -61865,11 +64202,12 @@ var ts;
function addSearch(location, symbol) {
importSearches.push([location, symbol]);
}
- if (directImports)
+ 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 === 237) {
@@ -61889,6 +64227,9 @@ var ts;
searchForNamedImport(decl.exportClause);
return;
}
+ if (!decl.importClause) {
+ return;
+ }
var importClause = decl.importClause;
var namedBindings = importClause.namedBindings;
if (namedBindings && namedBindings.kind === 240) {
@@ -61916,7 +64257,7 @@ var ts;
}
}
function searchForNamedImport(namedBindings) {
- if (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;
@@ -61936,6 +64277,7 @@ var ts;
addSearch(name, localSymbol);
}
}
+ }
}
}
function findNamespaceReExports(sourceFileLike, name, checker) {
@@ -61954,10 +64296,41 @@ var ts;
}
});
}
+ function findModuleReferences(program, sourceFiles, searchModuleSymbol) {
+ var refs = [];
+ var checker = program.getTypeChecker();
+ for (var _i = 0, sourceFiles_4 = sourceFiles; _i < sourceFiles_4.length; _i++) {
+ var referencingFile = sourceFiles_4[_i];
+ var searchSourceFile = searchModuleSymbol.valueDeclaration;
+ if (searchSourceFile.kind === 265) {
+ for (var _a = 0, _b = referencingFile.referencedFiles; _a < _b.length; _a++) {
+ var ref = _b[_a];
+ if (program.getSourceFileFromReference(referencingFile, ref) === searchSourceFile) {
+ refs.push({ kind: "reference", referencingFile: referencingFile, ref: ref });
+ }
+ }
+ for (var _c = 0, _d = referencingFile.typeReferenceDirectives; _c < _d.length; _c++) {
+ var ref = _d[_c];
+ var referenced = program.getResolvedTypeReferenceDirectives().get(ref.fileName);
+ if (referenced !== undefined && referenced.resolvedFileName === searchSourceFile.fileName) {
+ refs.push({ kind: "reference", referencingFile: referencingFile, ref: ref });
+ }
+ }
+ }
+ forEachImport(referencingFile, function (_importDecl, moduleSpecifier) {
+ var moduleSymbol = checker.getSymbolAtLocation(moduleSpecifier);
+ if (moduleSymbol === searchModuleSymbol) {
+ refs.push({ kind: "import", literal: moduleSpecifier });
+ }
+ });
+ }
+ return refs;
+ }
+ FindAllReferences.findModuleReferences = findModuleReferences;
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];
+ for (var _i = 0, sourceFiles_5 = sourceFiles; _i < sourceFiles_5.length; _i++) {
+ var sourceFile = sourceFiles_5[_i];
cancellationToken.throwIfCancellationRequested();
forEachImport(sourceFile, function (importDecl, moduleSpecifier) {
var moduleSymbol = checker.getSymbolAtLocation(moduleSpecifier);
@@ -61979,7 +64352,7 @@ var ts;
});
}
function forEachImport(sourceFile, action) {
- if (sourceFile.externalModuleIndicator) {
+ if (sourceFile.externalModuleIndicator || sourceFile.imports !== undefined) {
for (var _i = 0, _a = sourceFile.imports; _i < _a.length; _i++) {
var moduleSpecifier = _a[_i];
action(importerFromModuleSpecifier(moduleSpecifier), moduleSpecifier);
@@ -62007,25 +64380,20 @@ var ts;
}
}
});
- 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 === 238 || decl.kind === 244) {
- return decl;
+ switch (decl.kind) {
+ case 181:
+ case 238:
+ case 244:
+ return decl;
+ case 248:
+ return decl.parent;
+ default:
+ ts.Debug.fail("Unexpected module specifier parent: " + decl.kind);
}
- ts.Debug.assert(decl.kind === 248);
- return decl.parent;
}
function getImportOrExportSymbol(node, symbol, checker, comingFromExport) {
return comingFromExport ? getExport() : getExport() || getImport();
@@ -62033,7 +64401,7 @@ var ts;
var parent = node.parent;
if (symbol.flags & 7340032) {
if (parent.kind === 179) {
- return symbol.declarations.some(function (d) { return d === parent; }) && parent.parent.kind === 194
+ return symbol.declarations.some(function (d) { return d === parent; }) && ts.isBinaryExpression(parent.parent)
? getSpecialPropertyExport(parent.parent, false)
: undefined;
}
@@ -62046,7 +64414,7 @@ var ts;
else {
var exportNode = getExportNode(parent);
if (exportNode && ts.hasModifier(exportNode, 1)) {
- if (exportNode.kind === 237 && exportNode.moduleReference === node) {
+ if (ts.isImportEqualsDeclaration(exportNode) && exportNode.moduleReference === node) {
if (comingFromExport) {
return undefined;
}
@@ -62057,18 +64425,24 @@ var ts;
return exportInfo(symbol, getExportKindForDeclaration(exportNode));
}
}
- else if (parent.kind === 243) {
- var exportingModuleSymbol = parent.symbol.parent;
- ts.Debug.assert(!!exportingModuleSymbol);
- return { kind: 1, symbol: symbol, exportInfo: { exportingModuleSymbol: exportingModuleSymbol, exportKind: 2 } };
+ else if (ts.isExportAssignment(parent)) {
+ return getExportAssignmentExport(parent);
}
- else if (parent.kind === 194) {
+ else if (ts.isExportAssignment(parent.parent)) {
+ return getExportAssignmentExport(parent.parent);
+ }
+ else if (ts.isBinaryExpression(parent)) {
return getSpecialPropertyExport(parent, true);
}
- else if (parent.parent.kind === 194) {
+ else if (ts.isBinaryExpression(parent.parent)) {
return getSpecialPropertyExport(parent.parent, true);
}
}
+ function getExportAssignmentExport(ex) {
+ var exportingModuleSymbol = ex.symbol.parent;
+ ts.Debug.assert(!!exportingModuleSymbol);
+ return { kind: 1, symbol: symbol, exportInfo: { exportingModuleSymbol: exportingModuleSymbol, exportKind: 2 } };
+ }
function getSpecialPropertyExport(node, useLhsSymbol) {
var kind;
switch (ts.getSpecialPropertyAssignmentKind(node)) {
@@ -62088,16 +64462,16 @@ var ts;
function getImport() {
var isImport = isNodeImport(node);
if (!isImport)
- return;
+ return undefined;
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);
- }
+ if (!importedSymbol)
+ return undefined;
+ importedSymbol = skipExportSpecifierSymbol(importedSymbol, checker);
+ if (importedSymbol.name === "export=") {
+ importedSymbol = getExportEqualsLocalSymbol(importedSymbol, checker);
+ }
+ if (symbolName(importedSymbol) === symbol.name) {
+ return __assign({ kind: 0, symbol: importedSymbol }, isImport);
}
}
function exportInfo(symbol, kind) {
@@ -62109,6 +64483,19 @@ var ts;
}
}
FindAllReferences.getImportOrExportSymbol = getImportOrExportSymbol;
+ function getExportEqualsLocalSymbol(importedSymbol, checker) {
+ if (importedSymbol.flags & 8388608) {
+ return checker.getImmediateAliasedSymbol(importedSymbol);
+ }
+ var decl = importedSymbol.valueDeclaration;
+ if (ts.isExportAssignment(decl)) {
+ return decl.expression.symbol;
+ }
+ else if (ts.isBinaryExpression(decl)) {
+ return decl.right.symbol;
+ }
+ ts.Debug.fail();
+ }
function getExportNode(parent) {
if (parent.kind === 226) {
var p = parent;
@@ -62144,21 +64531,23 @@ var ts;
if (symbol.name !== "default") {
return symbol.name;
}
- var name = ts.forEach(symbol.declarations, function (_a) {
- var name = _a.name;
+ return ts.forEach(symbol.declarations, function (decl) {
+ if (ts.isExportAssignment(decl)) {
+ return ts.isIdentifier(decl.expression) ? decl.expression.text : undefined;
+ }
+ var name = ts.getNameOfDeclaration(decl);
return name && name.kind === 71 && name.text;
});
- ts.Debug.assert(!!name);
- return name;
}
function skipExportSpecifierSymbol(symbol, checker) {
- if (symbol.declarations)
+ 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) {
@@ -62192,12 +64581,13 @@ var ts;
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);
+ function findReferencedSymbols(program, cancellationToken, sourceFiles, sourceFile, position) {
+ var referencedSymbols = findAllReferencedSymbols(program, cancellationToken, sourceFiles, sourceFile, position);
if (!referencedSymbols || !referencedSymbols.length) {
return undefined;
}
var out = [];
+ var checker = program.getTypeChecker();
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) {
@@ -62207,39 +64597,44 @@ var ts;
return out;
}
FindAllReferences.findReferencedSymbols = findReferencedSymbols;
- function getImplementationsAtPosition(checker, cancellationToken, sourceFiles, sourceFile, position) {
- var node = ts.getTouchingPropertyName(sourceFile, position);
- var referenceEntries = getImplementationReferenceEntries(checker, cancellationToken, sourceFiles, node);
+ function getImplementationsAtPosition(program, cancellationToken, sourceFiles, sourceFile, position) {
+ var node = ts.getTouchingPropertyName(sourceFile, position, false);
+ var referenceEntries = getImplementationReferenceEntries(program, cancellationToken, sourceFiles, node);
+ var checker = program.getTypeChecker();
return ts.map(referenceEntries, function (entry) { return toImplementationLocation(entry, checker); });
}
FindAllReferences.getImplementationsAtPosition = getImplementationsAtPosition;
- function getImplementationReferenceEntries(typeChecker, cancellationToken, sourceFiles, node) {
+ function getImplementationReferenceEntries(program, cancellationToken, sourceFiles, node) {
+ if (node.kind === 265) {
+ return undefined;
+ }
+ var checker = program.getTypeChecker();
if (node.parent.kind === 262) {
- var result_4 = [];
- FindAllReferences.Core.getReferenceEntriesForShorthandPropertyAssignment(node, typeChecker, function (node) { return result_4.push(nodeEntry(node)); });
- return result_4;
+ var result_5 = [];
+ FindAllReferences.Core.getReferenceEntriesForShorthandPropertyAssignment(node, checker, function (node) { return result_5.push(nodeEntry(node)); });
+ return result_5;
}
else if (node.kind === 97 || ts.isSuperProperty(node.parent)) {
- var symbol = typeChecker.getSymbolAtLocation(node);
+ var symbol = checker.getSymbolAtLocation(node);
return symbol.valueDeclaration && [nodeEntry(symbol.valueDeclaration)];
}
else {
- return getReferenceEntriesForNode(node, sourceFiles, typeChecker, cancellationToken, { implementations: true });
+ return getReferenceEntriesForNode(node, program, sourceFiles, cancellationToken, { implementations: true });
}
}
- function findReferencedEntries(checker, cancellationToken, sourceFiles, sourceFile, position, options) {
- var x = flattenEntries(findAllReferencedSymbols(checker, cancellationToken, sourceFiles, sourceFile, position, options));
+ function findReferencedEntries(program, cancellationToken, sourceFiles, sourceFile, position, options) {
+ var x = flattenEntries(findAllReferencedSymbols(program, cancellationToken, sourceFiles, sourceFile, position, options));
return ts.map(x, toReferenceEntry);
}
FindAllReferences.findReferencedEntries = findReferencedEntries;
- function getReferenceEntriesForNode(node, sourceFiles, checker, cancellationToken, options) {
+ function getReferenceEntriesForNode(node, program, sourceFiles, cancellationToken, options) {
if (options === void 0) { options = {}; }
- return flattenEntries(FindAllReferences.Core.getReferencedSymbolsForNode(node, sourceFiles, checker, cancellationToken, options));
+ return flattenEntries(FindAllReferences.Core.getReferencedSymbolsForNode(node, program, sourceFiles, cancellationToken, options));
}
FindAllReferences.getReferenceEntriesForNode = getReferenceEntriesForNode;
- function findAllReferencedSymbols(checker, cancellationToken, sourceFiles, sourceFile, position, options) {
+ function findAllReferencedSymbols(program, cancellationToken, sourceFiles, sourceFile, position, options) {
var node = ts.getTouchingPropertyName(sourceFile, position, true);
- return FindAllReferences.Core.getReferencedSymbolsForNode(node, sourceFiles, checker, cancellationToken, options);
+ return FindAllReferences.Core.getReferencedSymbolsForNode(node, program, sourceFiles, cancellationToken, options);
}
function flattenEntries(referenceSymbols) {
return referenceSymbols && ts.flatMap(referenceSymbols, function (r) { return r.references; });
@@ -62249,10 +64644,6 @@ var ts;
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 };
@@ -62306,7 +64697,7 @@ var ts;
fileName: node.getSourceFile().fileName,
textSpan: getTextSpan(node),
isWriteAccess: isWriteAccess(node),
- isDefinition: ts.isDeclarationName(node) || ts.isLiteralComputedPropertyDeclarationName(node),
+ isDefinition: ts.isAnyDeclarationName(node) || ts.isLiteralComputedPropertyDeclarationName(node),
isInString: isInString
};
}
@@ -62367,20 +64758,19 @@ var ts;
return ts.createTextSpanFromBounds(start, end);
}
function isWriteAccess(node) {
- if (node.kind === 71 && ts.isDeclarationName(node)) {
+ if (ts.isAnyDeclarationName(node)) {
return true;
}
var parent = node.parent;
- if (parent) {
- if (parent.kind === 193 || parent.kind === 192) {
+ switch (parent && parent.kind) {
+ case 193:
+ case 192:
return true;
- }
- else if (parent.kind === 194 && parent.left === node) {
- var operator = parent.operatorToken.kind;
- return 58 <= operator && operator <= 70;
- }
+ case 194:
+ return parent.left === node && ts.isAssignmentOperator(parent.operatorToken.kind);
+ default:
+ return false;
}
- return false;
}
})(FindAllReferences = ts.FindAllReferences || (ts.FindAllReferences = {}));
})(ts || (ts = {}));
@@ -62389,7 +64779,7 @@ var ts;
(function (FindAllReferences) {
var Core;
(function (Core) {
- function getReferencedSymbolsForNode(node, sourceFiles, checker, cancellationToken, options) {
+ function getReferencedSymbolsForNode(node, program, sourceFiles, cancellationToken, options) {
if (options === void 0) { options = {}; }
if (node.kind === 265) {
return undefined;
@@ -62400,6 +64790,7 @@ var ts;
return special;
}
}
+ var checker = program.getTypeChecker();
var symbol = checker.getSymbolAtLocation(node);
if (!symbol) {
if (!options.implementations && node.kind === 9) {
@@ -62407,12 +64798,59 @@ var ts;
}
return undefined;
}
- if (!symbol.declarations || !symbol.declarations.length) {
- return undefined;
+ if (symbol.flags & 1536 && isModuleReferenceLocation(node)) {
+ return getReferencedSymbolsForModule(program, symbol, sourceFiles);
}
return getReferencedSymbolsForSymbol(symbol, node, sourceFiles, checker, cancellationToken, options);
}
Core.getReferencedSymbolsForNode = getReferencedSymbolsForNode;
+ function isModuleReferenceLocation(node) {
+ if (node.kind !== 9) {
+ return false;
+ }
+ switch (node.parent.kind) {
+ case 233:
+ case 248:
+ case 238:
+ case 244:
+ return true;
+ case 181:
+ return ts.isRequireCall(node.parent, false) || ts.isImportCall(node.parent);
+ default:
+ return false;
+ }
+ }
+ function getReferencedSymbolsForModule(program, symbol, sourceFiles) {
+ ts.Debug.assert(!!symbol.valueDeclaration);
+ var references = FindAllReferences.findModuleReferences(program, sourceFiles, symbol).map(function (reference) {
+ if (reference.kind === "import") {
+ return { type: "node", node: reference.literal };
+ }
+ else {
+ return {
+ type: "span",
+ fileName: reference.referencingFile.fileName,
+ textSpan: ts.createTextSpanFromRange(reference.ref),
+ };
+ }
+ });
+ for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
+ var decl = _a[_i];
+ switch (decl.kind) {
+ case 265:
+ break;
+ case 233:
+ references.push({ type: "node", node: decl.name });
+ break;
+ default:
+ ts.Debug.fail("Expected a module symbol to be declared by a SourceFile or ModuleDeclaration.");
+ }
+ }
+ return [{
+ definition: { type: "symbol", symbol: symbol, node: symbol.valueDeclaration },
+ references: references
+ }];
+ }
function getReferencedSymbolsSpecial(node, sourceFiles, cancellationToken) {
if (ts.isTypeKeyword(node.kind)) {
return getAllReferencesForKeyword(sourceFiles, node.kind, cancellationToken);
@@ -62438,7 +64876,7 @@ var ts;
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 state = new State(sourceFiles, node.kind === 123, 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) {
@@ -62463,51 +64901,59 @@ var ts;
}
return symbol;
}
- function createState(sourceFiles, originalLocation, checker, cancellationToken, searchMeaning, options, result) {
- var symbolIdToReferences = [];
- var inheritsFromCache = ts.createMap();
- var sourceFileToSeenSymbols = [];
- var isForConstructor = originalLocation.kind === 123;
- 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) {
+ var State = (function () {
+ function State(sourceFiles, isForConstructor, checker, cancellationToken, searchMeaning, options, result) {
+ this.sourceFiles = sourceFiles;
+ this.isForConstructor = isForConstructor;
+ this.checker = checker;
+ this.cancellationToken = cancellationToken;
+ this.searchMeaning = searchMeaning;
+ this.options = options;
+ this.result = result;
+ this.inheritsFromCache = ts.createMap();
+ this.markSeenContainingTypeReference = ts.nodeSeenTracker();
+ this.markSeenReExportRHS = ts.nodeSeenTracker();
+ this.symbolIdToReferences = [];
+ this.sourceFileToSeenSymbols = [];
+ }
+ State.prototype.getImportSearches = function (exportSymbol, exportInfo) {
+ if (!this.importTracker)
+ this.importTracker = FindAllReferences.createImportTracker(this.sourceFiles, this.checker, this.cancellationToken);
+ return this.importTracker(exportSymbol, exportInfo, this.options.isForRename);
+ };
+ State.prototype.createSearch = function (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 _a = searchOptions.text, text = _a === void 0 ? ts.stripQuotes(ts.getDeclaredName(this.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];
+ var parents = this.options.implementations && getParentSymbolsOfPropertyAccess(location, symbol, this.checker);
+ return {
+ location: location, symbol: symbol, comingFrom: comingFrom, text: text, escapedText: escapedText, parents: parents,
+ includes: function (referenceSymbol) { return allSearchSymbols ? ts.contains(allSearchSymbols, referenceSymbol) : referenceSymbol === symbol; },
+ };
+ };
+ State.prototype.referenceAdder = function (searchSymbol, searchLocation) {
+ var symbolId = ts.getSymbolId(searchSymbol);
+ var references = this.symbolIdToReferences[symbolId];
if (!references) {
- references = symbolIdToReferences[symbolId] = [];
- result.push({ definition: { type: "symbol", symbol: referenceSymbol, node: searchLocation }, references: references });
+ references = this.symbolIdToReferences[symbolId] = [];
+ this.result.push({ definition: { type: "symbol", symbol: searchSymbol, node: searchLocation }, references: references });
}
return function (node) { return references.push(FindAllReferences.nodeEntry(node)); };
- }
- function addStringOrCommentReference(fileName, textSpan) {
- result.push({
+ };
+ State.prototype.addStringOrCommentReference = function (fileName, textSpan) {
+ this.result.push({
definition: undefined,
references: [{ type: "span", fileName: fileName, textSpan: textSpan }]
});
- }
- function markSearchedSymbol(sourceFile, symbol) {
+ };
+ State.prototype.markSearchedSymbol = function (sourceFile, symbol) {
var sourceId = ts.getNodeId(sourceFile);
var symbolId = ts.getSymbolId(symbol);
- var seenSymbols = sourceFileToSeenSymbols[sourceId] || (sourceFileToSeenSymbols[sourceId] = []);
+ var seenSymbols = this.sourceFileToSeenSymbols[sourceId] || (this.sourceFileToSeenSymbols[sourceId] = []);
return !seenSymbols[symbolId] && (seenSymbols[symbolId] = true);
- }
- }
+ };
+ return State;
+ }());
function searchForImportsOfExport(exportLocation, exportSymbol, exportInfo, state) {
var _a = state.getImportSearches(exportSymbol, exportInfo), importSearches = _a.importSearches, singleReferences = _a.singleReferences, indirectUsers = _a.indirectUsers;
if (singleReferences.length) {
@@ -62528,7 +64974,7 @@ var ts;
indirectSearch = state.createSearch(exportLocation, exportSymbol, 1);
break;
case 1:
- indirectSearch = state.isForRename ? undefined : state.createSearch(exportLocation, exportSymbol, 1, { text: "default" });
+ indirectSearch = state.options.isForRename ? undefined : state.createSearch(exportLocation, exportSymbol, 1, { text: "default" });
break;
case 2:
break;
@@ -62579,10 +65025,11 @@ var ts;
return undefined;
}
if (flags & (4 | 8192)) {
- var privateDeclaration = ts.find(declarations, function (d) { return !!(ts.getModifierFlags(d) & 8); });
+ var privateDeclaration = ts.find(declarations, function (d) { return ts.hasModifier(d, 8); });
if (privateDeclaration) {
return ts.getAncestor(privateDeclaration, 229);
}
+ return undefined;
}
if (isObjectBindingPatternElementWithoutPropertyName(symbol)) {
return undefined;
@@ -62590,9 +65037,6 @@ var ts;
if (parent && !((parent.flags & 1536) && ts.isExternalModuleSymbol(parent) && !parent.globalExports)) {
return undefined;
}
- if ((flags & 134217728 && symbol.checkFlags & 6)) {
- return undefined;
- }
var scope;
for (var _i = 0, declarations_10 = declarations; _i < declarations_10.length; _i++) {
var declaration = declarations_10[_i];
@@ -62607,7 +65051,8 @@ var ts;
}
return parent ? scope.getSourceFile() : scope;
}
- function getPossibleSymbolReferencePositions(sourceFile, symbolName, start, end) {
+ function getPossibleSymbolReferencePositions(sourceFile, symbolName, container) {
+ if (container === void 0) { container = sourceFile; }
var positions = [];
if (!symbolName || !symbolName.length) {
return positions;
@@ -62615,9 +65060,9 @@ var ts;
var text = sourceFile.text;
var sourceLength = text.length;
var symbolNameLength = symbolName.length;
- var position = text.indexOf(symbolName, start);
+ var position = text.indexOf(symbolName, container.pos);
while (position >= 0) {
- if (position > end)
+ if (position > container.end)
break;
var endPosition = position + symbolNameLength;
if ((position === 0 || !ts.isIdentifierPart(text.charCodeAt(position - 1), 5)) &&
@@ -62632,15 +65077,11 @@ var ts;
var references = [];
var sourceFile = container.getSourceFile();
var labelName = targetLabel.text;
- var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, labelName, container.getStart(), container.getEnd());
+ var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, labelName, container);
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) {
- continue;
- }
- if (node === targetLabel ||
- (ts.isJumpStatementTarget(node) && ts.getTargetLabel(node, labelName) === targetLabel)) {
+ var node = ts.getTouchingWord(sourceFile, position, false);
+ if (node && (node === targetLabel || (ts.isJumpStatementTarget(node) && ts.getTargetLabel(node, labelName) === targetLabel))) {
references.push(FindAllReferences.nodeEntry(node));
}
}
@@ -62649,30 +65090,30 @@ var ts;
function isValidReferencePosition(node, searchSymbolName) {
switch (node && node.kind) {
case 71:
- return node.getWidth() === searchSymbolName.length;
+ return ts.unescapeIdentifier(node.text).length === searchSymbolName.length;
case 9:
return (ts.isLiteralNameOfPropertyDeclarationOrIndexAccess(node) || isNameOfExternalModuleImportOrDeclaration(node)) &&
- node.getWidth() === searchSymbolName.length + 2;
+ node.text.length === searchSymbolName.length;
case 8:
- return ts.isLiteralNameOfPropertyDeclarationOrIndexAccess(node) && node.getWidth() === searchSymbolName.length;
+ return ts.isLiteralNameOfPropertyDeclarationOrIndexAccess(node) && node.text.length === 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];
+ for (var _i = 0, sourceFiles_6 = sourceFiles; _i < sourceFiles_6.length; _i++) {
+ var sourceFile = sourceFiles_6[_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());
+ var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, searchText, sourceFile);
for (var _i = 0, possiblePositions_2 = possiblePositions; _i < possiblePositions_2.length; _i++) {
var position = possiblePositions_2[_i];
- var referenceLocation = ts.getTouchingPropertyName(sourceFile, position);
+ var referenceLocation = ts.getTouchingPropertyName(sourceFile, position, true);
if (referenceLocation.kind === kind) {
references.push(FindAllReferences.nodeEntry(referenceLocation));
}
@@ -62686,17 +65127,15 @@ var ts;
if (!state.markSearchedSymbol(sourceFile, search.symbol)) {
return;
}
- 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];
+ for (var _i = 0, _a = getPossibleSymbolReferencePositions(sourceFile, search.text, container); _i < _a.length; _i++) {
+ var position = _a[_i];
getReferencesAtLocation(sourceFile, position, search, state);
}
}
function getReferencesAtLocation(sourceFile, position, search, state) {
- var referenceLocation = ts.getTouchingPropertyName(sourceFile, position);
+ var referenceLocation = ts.getTouchingPropertyName(sourceFile, position, true);
if (!isValidReferencePosition(referenceLocation, search.text)) {
- if (!state.implementations && (state.findInStrings && ts.isInString(sourceFile, position) || state.findInComments && ts.isInNonReferenceComment(sourceFile, position))) {
+ if (!state.options.implementations && (state.options.findInStrings && ts.isInString(sourceFile, position) || state.options.findInComments && ts.isInNonReferenceComment(sourceFile, position))) {
state.addStringOrCommentReference(sourceFile.fileName, ts.createTextSpan(position, search.text.length));
}
return;
@@ -62744,7 +65183,7 @@ var ts;
if (!exportDeclaration.moduleSpecifier) {
addRef();
}
- if (!state.isForRename && state.markSeenReExportRHS(name)) {
+ if (!state.options.isForRename && state.markSeenReExportRHS(name)) {
addReference(name, referenceSymbol, name, state);
}
}
@@ -62753,7 +65192,7 @@ var ts;
addRef();
}
}
- if (!(referenceLocation === propertyName && state.isForRename)) {
+ if (!(referenceLocation === propertyName && state.options.isForRename)) {
var exportKind = referenceLocation.originalKeywordKind === 79 ? 1 : 0;
var exportInfo = FindAllReferences.getExportInfo(referenceSymbol, exportKind, state.checker);
ts.Debug.assert(!!exportInfo);
@@ -62785,7 +65224,7 @@ var ts;
return;
var symbol = importOrExport.symbol;
if (importOrExport.kind === 0) {
- if (!state.isForRename || importOrExport.isNamedImport) {
+ if (!state.options.isForRename || importOrExport.isNamedImport) {
searchForImportedSymbol(symbol, state);
}
}
@@ -62797,12 +65236,12 @@ var ts;
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);
+ addReference(ts.getNameOfDeclaration(valueDeclaration), shorthandValueSymbol, search.location, state);
}
}
function addReference(referenceLocation, relatedSymbol, searchLocation, state) {
var addRef = state.referenceAdder(relatedSymbol, searchLocation);
- if (state.implementations) {
+ if (state.options.implementations) {
addImplementationReferences(referenceLocation, addRef, state);
}
else {
@@ -63027,10 +65466,10 @@ var ts;
}
var references = [];
var sourceFile = searchSpaceNode.getSourceFile();
- var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "super", searchSpaceNode.getStart(), searchSpaceNode.getEnd());
- for (var _i = 0, possiblePositions_4 = possiblePositions; _i < possiblePositions_4.length; _i++) {
- var position = possiblePositions_4[_i];
- var node = ts.getTouchingWord(sourceFile, position);
+ var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "super", searchSpaceNode);
+ for (var _i = 0, possiblePositions_3 = possiblePositions; _i < possiblePositions_3.length; _i++) {
+ var position = possiblePositions_3[_i];
+ var node = ts.getTouchingWord(sourceFile, position, false);
if (!node || node.kind !== 97) {
continue;
}
@@ -63073,13 +65512,13 @@ var ts;
if (searchSpaceNode.kind === 265) {
ts.forEach(sourceFiles, function (sourceFile) {
cancellationToken.throwIfCancellationRequested();
- possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "this", sourceFile.getStart(), sourceFile.getEnd());
+ possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "this");
getThisReferencesInFile(sourceFile, sourceFile, possiblePositions, references);
});
}
else {
var sourceFile = searchSpaceNode.getSourceFile();
- possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "this", searchSpaceNode.getStart(), searchSpaceNode.getEnd());
+ possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "this", searchSpaceNode);
getThisReferencesInFile(sourceFile, searchSpaceNode, possiblePositions, references);
}
return [{
@@ -63088,7 +65527,7 @@ var ts;
}];
function getThisReferencesInFile(sourceFile, searchSpaceNode, possiblePositions, result) {
ts.forEach(possiblePositions, function (position) {
- var node = ts.getTouchingWord(sourceFile, position);
+ var node = ts.getTouchingWord(sourceFile, position, false);
if (!node || !ts.isThis(node)) {
return;
}
@@ -63123,10 +65562,10 @@ var ts;
}
function getReferencesForStringLiteral(node, sourceFiles, cancellationToken) {
var references = [];
- for (var _i = 0, sourceFiles_6 = sourceFiles; _i < sourceFiles_6.length; _i++) {
- var sourceFile = sourceFiles_6[_i];
+ for (var _i = 0, sourceFiles_7 = sourceFiles; _i < sourceFiles_7.length; _i++) {
+ var sourceFile = sourceFiles_7[_i];
cancellationToken.throwIfCancellationRequested();
- var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, node.text, sourceFile.getStart(), sourceFile.getEnd());
+ var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, node.text);
getReferencesForStringLiteralInFile(sourceFile, node.text, possiblePositions, references);
}
return [{
@@ -63134,9 +65573,9 @@ var ts;
references: references
}];
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);
+ for (var _i = 0, possiblePositions_4 = possiblePositions; _i < possiblePositions_4.length; _i++) {
+ var position = possiblePositions_4[_i];
+ var node_7 = ts.getTouchingWord(sourceFile, position, false);
if (node_7 && node_7.kind === 9 && node_7.text === searchText) {
references.push(FindAllReferences.nodeEntry(node_7, true));
}
@@ -63264,20 +65703,20 @@ var ts;
var contextualType = checker.getContextualType(objectLiteral);
var name = getNameFromObjectLiteralElement(node);
if (name && contextualType) {
- var result_5 = [];
+ var result_6 = [];
var symbol = contextualType.getProperty(name);
if (symbol) {
- result_5.push(symbol);
+ result_6.push(symbol);
}
if (contextualType.flags & 65536) {
ts.forEach(contextualType.types, function (t) {
var symbol = t.getProperty(name);
if (symbol) {
- result_5.push(symbol);
+ result_6.push(symbol);
}
});
}
- return result_5;
+ return result_6;
}
return undefined;
}
@@ -63390,7 +65829,6 @@ var ts;
if (referenceFile) {
return [getDefinitionInfoForFileReference(comment.fileName, referenceFile.fileName)];
}
- return undefined;
}
var typeReferenceDirective = findReferenceInPosition(sourceFile.typeReferenceDirectives, position);
if (typeReferenceDirective) {
@@ -63398,7 +65836,7 @@ var ts;
return referenceFile && referenceFile.resolvedFileName &&
[getDefinitionInfoForFileReference(typeReferenceDirective.fileName, referenceFile.resolvedFileName)];
}
- var node = ts.getTouchingPropertyName(sourceFile, position);
+ var node = ts.getTouchingPropertyName(sourceFile, position, true);
if (node === sourceFile) {
return undefined;
}
@@ -63416,12 +65854,10 @@ var ts;
if (!symbol) {
return undefined;
}
- if (symbol.flags & 8388608) {
- var declaration = symbol.declarations[0];
- if (node.kind === 71 &&
- (node.parent === declaration ||
- (declaration.kind === 242 && declaration.parent && declaration.parent.kind === 241))) {
- symbol = typeChecker.getAliasedSymbol(symbol);
+ if (symbol.flags & 8388608 && shouldSkipAlias(node, symbol.declarations[0])) {
+ var aliased = typeChecker.getAliasedSymbol(symbol);
+ if (aliased.declarations) {
+ symbol = aliased;
}
}
if (node.parent.kind === 262) {
@@ -63435,27 +65871,17 @@ 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;
- }
+ if (element && typeChecker.getContextualType(element.parent)) {
+ return ts.flatMap(ts.getPropertySymbolsFromContextualType(typeChecker, element), function (propertySymbol) {
+ return getDefinitionFromSymbol(typeChecker, propertySymbol, node);
+ });
}
return getDefinitionFromSymbol(typeChecker, symbol, node);
}
GoToDefinition.getDefinitionAtPosition = getDefinitionAtPosition;
function getTypeDefinitionAtPosition(typeChecker, sourceFile, position) {
- var node = ts.getTouchingPropertyName(sourceFile, position);
+ var node = ts.getTouchingPropertyName(sourceFile, position, true);
if (node === sourceFile) {
return undefined;
}
@@ -63468,13 +65894,13 @@ var ts;
return undefined;
}
if (type.flags & 65536 && !(type.flags & 16)) {
- var result_6 = [];
+ var result_7 = [];
ts.forEach(type.types, function (t) {
if (t.symbol) {
- ts.addRange(result_6, getDefinitionFromSymbol(typeChecker, t.symbol, node));
+ ts.addRange(result_7, getDefinitionFromSymbol(typeChecker, t.symbol, node));
}
});
- return result_6;
+ return result_7;
}
if (!type.symbol) {
return undefined;
@@ -63482,6 +65908,23 @@ var ts;
return getDefinitionFromSymbol(typeChecker, type.symbol, node);
}
GoToDefinition.getTypeDefinitionAtPosition = getTypeDefinitionAtPosition;
+ function shouldSkipAlias(node, declaration) {
+ if (node.kind !== 71) {
+ return false;
+ }
+ if (node.parent === declaration) {
+ return true;
+ }
+ switch (declaration.kind) {
+ case 239:
+ case 237:
+ return true;
+ case 242:
+ return declaration.parent.kind === 241;
+ default:
+ return false;
+ }
+ }
function getDefinitionFromSymbol(typeChecker, symbol, node) {
var result = [];
var declarations = symbol.getDeclarations();
@@ -63546,7 +65989,7 @@ var ts;
}
}
function createDefinitionInfo(node, symbolKind, symbolName, containerName) {
- return createDefinitionInfoFromName(node.name || node, symbolKind, symbolName, containerName);
+ return createDefinitionInfoFromName(ts.getNameOfDeclaration(node) || node, symbolKind, symbolName, containerName);
}
function createDefinitionInfoFromName(name, symbolKind, symbolName, containerName) {
var sourceFile = name.getSourceFile();
@@ -63573,7 +66016,7 @@ var ts;
function findReferenceInPosition(refs, pos) {
for (var _i = 0, refs_1 = refs; _i < refs_1.length; _i++) {
var ref = refs_1[_i];
- if (ref.pos <= pos && pos < ref.end) {
+ if (ref.pos <= pos && pos <= ref.end) {
return ref;
}
}
@@ -63642,6 +66085,7 @@ var ts;
"namespace",
"param",
"private",
+ "prop",
"property",
"public",
"requires",
@@ -63652,8 +66096,6 @@ var ts;
"throws",
"type",
"typedef",
- "property",
- "prop",
"version"
];
var jsDocTagNameCompletionEntries;
@@ -63736,11 +66178,29 @@ var ts;
}));
}
JsDoc.getJSDocTagCompletions = getJSDocTagCompletions;
+ function getJSDocParameterNameCompletions(tag) {
+ var nameThusFar = tag.name.text;
+ var jsdoc = tag.parent;
+ var fn = jsdoc.parent;
+ if (!ts.isFunctionLike(fn))
+ return [];
+ return ts.mapDefined(fn.parameters, function (param) {
+ if (!ts.isIdentifier(param.name))
+ return undefined;
+ var name = param.name.text;
+ if (jsdoc.tags.some(function (t) { return t !== tag && ts.isJSDocParameterTag(t) && t.name.text === name; })
+ || nameThusFar !== undefined && !ts.startsWith(name, nameThusFar)) {
+ return undefined;
+ }
+ return { name: name, kind: ts.ScriptElementKind.parameterElement, kindModifiers: "", sortText: "0" };
+ });
+ }
+ JsDoc.getJSDocParameterNameCompletions = getJSDocParameterNameCompletions;
function getDocCommentTemplateAtPosition(newLine, sourceFile, position) {
if (ts.isInString(sourceFile, position) || ts.isInComment(sourceFile, position) || ts.hasDocComment(sourceFile, position)) {
return undefined;
}
- var tokenAtPos = ts.getTokenAtPosition(sourceFile, position);
+ var tokenAtPos = ts.getTokenAtPosition(sourceFile, position, false);
var tokenStart = tokenAtPos.getStart();
if (!tokenAtPos || tokenStart < position) {
return undefined;
@@ -63943,7 +66403,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 safeList.has(f); }));
+ mergeTypings(ts.mapDefined(cleanedTypingNames, function (f) { return safeList.get(f); }));
}
var hasJsxFile = ts.forEach(fileNames, function (f) { return ts.ensureScriptKind(f, ts.getScriptKindFromFileName(f)) === 2; });
if (hasJsxFile) {
@@ -63997,7 +66457,7 @@ var ts;
function getNavigateToItems(sourceFiles, checker, cancellationToken, searchValue, maxResultCount, excludeDtsFiles) {
var patternMatcher = ts.createPatternMatcher(searchValue);
var rawItems = [];
- var _loop_4 = function (sourceFile) {
+ var _loop_5 = function (sourceFile) {
cancellationToken.throwIfCancellationRequested();
if (excludeDtsFiles && ts.fileExtensionIs(sourceFile.fileName, ".d.ts")) {
return "continue";
@@ -64027,9 +66487,9 @@ var ts;
}
});
};
- for (var _i = 0, sourceFiles_7 = sourceFiles; _i < sourceFiles_7.length; _i++) {
- var sourceFile = sourceFiles_7[_i];
- _loop_4(sourceFile);
+ for (var _i = 0, sourceFiles_8 = sourceFiles; _i < sourceFiles_8.length; _i++) {
+ var sourceFile = sourceFiles_8[_i];
+ _loop_5(sourceFile);
}
rawItems = ts.filter(rawItems, function (item) {
var decl = item.declaration;
@@ -64069,16 +66529,19 @@ var ts;
return undefined;
}
function tryAddSingleDeclarationName(declaration, containers) {
- if (declaration && declaration.name) {
- var text = getTextOfIdentifierOrLiteral(declaration.name);
- if (text !== undefined) {
- containers.unshift(text);
- }
- else if (declaration.name.kind === 144) {
- return tryAddComputedPropertyName(declaration.name.expression, containers, true);
- }
- else {
- return false;
+ if (declaration) {
+ var name = ts.getNameOfDeclaration(declaration);
+ if (name) {
+ var text = getTextOfIdentifierOrLiteral(name);
+ if (text !== undefined) {
+ containers.unshift(text);
+ }
+ else if (name.kind === 144) {
+ return tryAddComputedPropertyName(name.expression, containers, true);
+ }
+ else {
+ return false;
+ }
}
}
return true;
@@ -64102,8 +66565,9 @@ var ts;
}
function getContainers(declaration) {
var containers = [];
- if (declaration.name.kind === 144) {
- if (!tryAddComputedPropertyName(declaration.name.expression, containers, false)) {
+ var name = ts.getNameOfDeclaration(declaration);
+ if (name.kind === 144) {
+ if (!tryAddComputedPropertyName(name.expression, containers, false)) {
return undefined;
}
}
@@ -64136,6 +66600,7 @@ var ts;
function createNavigateToItem(rawItem) {
var declaration = rawItem.declaration;
var container = ts.getContainerNode(declaration);
+ var containerName = container && ts.getNameOfDeclaration(container);
return {
name: rawItem.name,
kind: ts.getNodeKind(declaration),
@@ -64144,8 +66609,8 @@ var ts;
isCaseSensitive: rawItem.isCaseSensitive,
fileName: rawItem.fileName,
textSpan: ts.createTextSpanFromNode(declaration),
- containerName: container && container.name ? container.name.text : "",
- containerKind: container && container.name ? ts.getNodeKind(container) : ""
+ containerName: containerName ? containerName.text : "",
+ containerKind: containerName ? ts.getNodeKind(container) : ""
};
}
}
@@ -64348,7 +66813,7 @@ var ts;
default:
ts.forEach(node.jsDoc, function (jsDoc) {
ts.forEach(jsDoc.tags, function (tag) {
- if (tag.kind === 290) {
+ if (tag.kind === 291) {
addLeafNode(tag);
}
});
@@ -64359,8 +66824,8 @@ var ts;
function mergeChildren(children) {
var nameToItems = ts.createMap();
ts.filterMutate(children, function (child) {
- var decl = child.node;
- var name = decl.name && nodeText(decl.name);
+ var declName = ts.getNameOfDeclaration(child.node);
+ var name = declName && nodeText(declName);
if (!name) {
return true;
}
@@ -64438,16 +66903,16 @@ var ts;
if (node.kind === 233) {
return getModuleName(node);
}
- var decl = node;
- if (decl.name) {
- return ts.getPropertyNameForPropertyNameNode(decl.name);
+ var declName = ts.getNameOfDeclaration(node);
+ if (declName) {
+ return ts.getPropertyNameForPropertyNameNode(declName);
}
switch (node.kind) {
case 186:
case 187:
case 199:
return getFunctionOrClassName(node);
- case 290:
+ case 291:
return getJSDocTypedefTagName(node);
default:
return undefined;
@@ -64457,7 +66922,7 @@ var ts;
if (node.kind === 233) {
return getModuleName(node);
}
- var name = node.name;
+ var name = ts.getNameOfDeclaration(node);
if (name) {
var text = nodeText(name);
if (text.length > 0) {
@@ -64487,7 +66952,7 @@ var ts;
return "()";
case 157:
return "[]";
- case 290:
+ case 291:
return getJSDocTypedefTagName(node);
default:
return "<unknown>";
@@ -64534,7 +66999,7 @@ var ts;
case 233:
case 265:
case 231:
- case 290:
+ case 291:
return true;
case 152:
case 151:
@@ -65313,7 +67778,14 @@ var ts;
var token = ts.scanner.getToken();
if (token === 91) {
token = nextToken();
- if (token === 9) {
+ if (token === 19) {
+ token = nextToken();
+ if (token === 9) {
+ recordModuleName();
+ return true;
+ }
+ }
+ else if (token === 9) {
recordModuleName();
return true;
}
@@ -65677,7 +68149,7 @@ var ts;
}
}
function getImmediatelyContainingArgumentInfo(node, position, sourceFile) {
- if (node.parent.kind === 181 || node.parent.kind === 182) {
+ if (ts.isCallOrNewExpression(node.parent)) {
var callExpression = node.parent;
if (node.kind === 27 ||
node.kind === 19) {
@@ -65942,9 +68414,10 @@ var ts;
(function (SymbolDisplay) {
function getSymbolKind(typeChecker, symbol, location) {
var flags = symbol.flags;
- if (flags & 32)
+ if (flags & 32) {
return ts.getDeclarationOfKind(symbol, 199) ?
ts.ScriptElementKind.localClassElement : ts.ScriptElementKind.classElement;
+ }
if (flags & 384)
return ts.ScriptElementKind.enumElement;
if (flags & 524288)
@@ -66055,7 +68528,7 @@ var ts;
}
}
var callExpressionLike = void 0;
- if (location.kind === 181 || location.kind === 182) {
+ if (ts.isCallOrNewExpression(location)) {
callExpressionLike = location;
}
else if (ts.isCallExpressionTarget(location) || ts.isNewExpressionTarget(location)) {
@@ -66110,7 +68583,7 @@ var ts;
if (!(type.flags & 32768 && type.objectFlags & 16) && type.symbol) {
ts.addRange(displayParts, ts.symbolToDisplayParts(typeChecker, type.symbol, enclosingDeclaration, undefined, 1));
}
- addSignatureDisplayParts(signature, allSignatures, 8);
+ addSignatureDisplayParts(signature, allSignatures, 16);
break;
default:
addSignatureDisplayParts(signature, allSignatures);
@@ -66120,24 +68593,29 @@ var ts;
}
else if ((ts.isNameOfFunctionDeclaration(location) && !(symbol.flags & 98304)) ||
(location.kind === 123 && location.parent.kind === 152)) {
- var functionDeclaration = location.parent;
- var allSignatures = functionDeclaration.kind === 152 ? type.getNonNullableType().getConstructSignatures() : type.getNonNullableType().getCallSignatures();
- if (!typeChecker.isImplementationOfOverload(functionDeclaration)) {
- signature = typeChecker.getSignatureFromDeclaration(functionDeclaration);
- }
- else {
- signature = allSignatures[0];
- }
- if (functionDeclaration.kind === 152) {
- symbolKind = ts.ScriptElementKind.constructorImplementationElement;
- addPrefixForAnyFunctionOrVar(type.symbol, symbolKind);
- }
- else {
- addPrefixForAnyFunctionOrVar(functionDeclaration.kind === 155 &&
- !(type.symbol.flags & 2048 || type.symbol.flags & 4096) ? type.symbol : symbol, symbolKind);
+ var functionDeclaration_1 = location.parent;
+ var locationIsSymbolDeclaration = ts.findDeclaration(symbol, function (declaration) {
+ return declaration === (location.kind === 123 ? functionDeclaration_1.parent : functionDeclaration_1);
+ });
+ if (locationIsSymbolDeclaration) {
+ var allSignatures = functionDeclaration_1.kind === 152 ? type.getNonNullableType().getConstructSignatures() : type.getNonNullableType().getCallSignatures();
+ if (!typeChecker.isImplementationOfOverload(functionDeclaration_1)) {
+ signature = typeChecker.getSignatureFromDeclaration(functionDeclaration_1);
+ }
+ else {
+ signature = allSignatures[0];
+ }
+ if (functionDeclaration_1.kind === 152) {
+ symbolKind = ts.ScriptElementKind.constructorImplementationElement;
+ addPrefixForAnyFunctionOrVar(type.symbol, symbolKind);
+ }
+ else {
+ addPrefixForAnyFunctionOrVar(functionDeclaration_1.kind === 155 &&
+ !(type.symbol.flags & 2048 || type.symbol.flags & 4096) ? type.symbol : symbol, symbolKind);
+ }
+ addSignatureDisplayParts(signature, allSignatures);
+ hasAddedSymbolInfo = true;
}
- addSignatureDisplayParts(signature, allSignatures);
- hasAddedSymbolInfo = true;
}
}
}
@@ -66168,7 +68646,7 @@ var ts;
displayParts.push(ts.spacePart());
displayParts.push(ts.operatorPart(58));
displayParts.push(ts.spacePart());
- ts.addRange(displayParts, ts.typeToDisplayParts(typeChecker, typeChecker.getDeclaredTypeOfSymbol(symbol), enclosingDeclaration, 512));
+ ts.addRange(displayParts, ts.typeToDisplayParts(typeChecker, typeChecker.getDeclaredTypeOfSymbol(symbol), enclosingDeclaration, 1024));
}
if (symbolFlags & 384) {
addNewLineIfDisplayPartsExist();
@@ -66201,9 +68679,9 @@ var ts;
writeTypeParametersOfSymbol(symbol.parent, enclosingDeclaration);
}
else {
- var declaration = ts.getDeclarationOfKind(symbol, 145);
- ts.Debug.assert(declaration !== undefined);
- declaration = declaration.parent;
+ var decl = ts.getDeclarationOfKind(symbol, 145);
+ ts.Debug.assert(decl !== undefined);
+ var declaration = decl.parent;
if (declaration) {
if (ts.isFunctionLikeKind(declaration.kind)) {
addInPrefix();
@@ -66215,7 +68693,7 @@ var ts;
else if (declaration.kind !== 155 && declaration.name) {
addFullSymbolName(declaration.symbol);
}
- ts.addRange(displayParts, ts.signatureToDisplayParts(typeChecker, signature, sourceFile, 32));
+ ts.addRange(displayParts, ts.signatureToDisplayParts(typeChecker, signature, sourceFile, 64));
}
else if (declaration.kind === 231) {
addInPrefix();
@@ -66237,7 +68715,7 @@ var ts;
displayParts.push(ts.spacePart());
displayParts.push(ts.operatorPart(58));
displayParts.push(ts.spacePart());
- displayParts.push(ts.displayPart(constantValue.toString(), ts.SymbolDisplayPartKind.numericLiteral));
+ displayParts.push(ts.displayPart(ts.getTextOfConstantValue(constantValue), typeof constantValue === "number" ? ts.SymbolDisplayPartKind.numericLiteral : ts.SymbolDisplayPartKind.stringLiteral));
}
}
}
@@ -66383,7 +68861,7 @@ var ts;
}
}
function addSignatureDisplayParts(signature, allSignatures, flags) {
- ts.addRange(displayParts, ts.signatureToDisplayParts(typeChecker, signature, enclosingDeclaration, flags | 32));
+ ts.addRange(displayParts, ts.signatureToDisplayParts(typeChecker, signature, enclosingDeclaration, flags | 64));
if (allSignatures.length > 1) {
displayParts.push(ts.spacePart());
displayParts.push(ts.punctuationPart(19));
@@ -66483,7 +68961,7 @@ var ts;
ts.addRange(diagnostics, program.getSyntacticDiagnostics(sourceFile));
ts.addRange(diagnostics, program.getOptionsDiagnostics());
}
- program.emit();
+ program.emit(undefined, undefined, undefined, undefined, transpileOptions.transformers);
ts.Debug.assert(outputText !== undefined, "Output generation failed");
return { outputText: outputText, diagnostics: diagnostics, sourceMapText: sourceMapText };
}
@@ -66500,7 +68978,7 @@ var ts;
return typeof o.type === "object" && !ts.forEachEntry(o.type, function (v) { return typeof v !== "number"; });
});
options = ts.clone(options);
- var _loop_5 = function (opt) {
+ var _loop_6 = function (opt) {
if (!ts.hasProperty(options, opt.name)) {
return "continue";
}
@@ -66516,7 +68994,7 @@ var ts;
};
for (var _i = 0, commandLineOptionsStringToEnum_1 = commandLineOptionsStringToEnum; _i < commandLineOptionsStringToEnum_1.length; _i++) {
var opt = commandLineOptionsStringToEnum_1[_i];
- _loop_5(opt);
+ _loop_6(opt);
}
return options;
}
@@ -66757,9 +69235,10 @@ var ts;
var formatting;
(function (formatting) {
var FormattingContext = (function () {
- function FormattingContext(sourceFile, formattingRequestKind) {
+ function FormattingContext(sourceFile, formattingRequestKind, options) {
this.sourceFile = sourceFile;
this.formattingRequestKind = formattingRequestKind;
+ this.options = options;
}
FormattingContext.prototype.updateContext = function (currentRange, currentTokenParent, nextRange, nextTokenParent, commonParent) {
ts.Debug.assert(currentRange !== undefined, "currentTokenSpan is null");
@@ -66970,9 +69449,9 @@ var ts;
}
return true;
};
+ RuleOperationContext.Any = new RuleOperationContext();
return RuleOperationContext;
}());
- RuleOperationContext.Any = new RuleOperationContext();
formatting.RuleOperationContext = RuleOperationContext;
})(formatting = ts.formatting || (ts.formatting = {}));
})(ts || (ts = {}));
@@ -66997,7 +69476,7 @@ var ts;
this.NoSpaceAfterCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create3(18, formatting.Shared.TokenRange.FromTokens([22, 26, 25])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8));
this.NoSpaceBeforeDot = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 23), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8));
this.NoSpaceAfterDot = new formatting.Rule(formatting.RuleDescriptor.create3(23, 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, 21), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8));
+ this.NoSpaceBeforeOpenBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.AnyExcept(120), 21), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8));
this.NoSpaceAfterCloseBracket = new formatting.Rule(formatting.RuleDescriptor.create3(22, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNotBeforeBlockInFunctionDeclarationContext), 8));
this.FunctionOpenBraceLeftTokenRange = formatting.Shared.TokenRange.AnyIncludingMultilineComments;
this.SpaceBeforeOpenBraceInFunction = new formatting.Rule(formatting.RuleDescriptor.create2(this.FunctionOpenBraceLeftTokenRange, 17), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext, Rules.IsBeforeBlockContext, Rules.IsNotFormatOnEnter, Rules.IsSameLineTokenOrBeforeMultilineBlockContext), 2), 1);
@@ -67005,10 +69484,10 @@ var ts;
this.SpaceBeforeOpenBraceInTypeScriptDeclWithBlock = new formatting.Rule(formatting.RuleDescriptor.create2(this.TypeScriptOpenBraceLeftTokenRange, 17), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsTypeScriptDeclWithBlockContext, Rules.IsNotFormatOnEnter, Rules.IsSameLineTokenOrBeforeMultilineBlockContext), 2), 1);
this.ControlOpenBraceLeftTokenRange = formatting.Shared.TokenRange.FromTokens([20, 3, 81, 102, 87, 82]);
this.SpaceBeforeOpenBraceInControl = new formatting.Rule(formatting.RuleDescriptor.create2(this.ControlOpenBraceLeftTokenRange, 17), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext, Rules.IsNotFormatOnEnter, Rules.IsSameLineTokenOrBeforeMultilineBlockContext), 2), 1);
- this.SpaceAfterOpenBrace = new formatting.Rule(formatting.RuleDescriptor.create3(17, 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, 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsBraceWrappedContext), 2));
- this.NoSpaceAfterOpenBrace = new formatting.Rule(formatting.RuleDescriptor.create3(17, 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, 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8));
+ this.SpaceAfterOpenBrace = new formatting.Rule(formatting.RuleDescriptor.create3(17, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabledOrUndefined("insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces"), Rules.IsBraceWrappedContext), 2));
+ this.SpaceBeforeCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabledOrUndefined("insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces"), Rules.IsBraceWrappedContext), 2));
+ this.NoSpaceAfterOpenBrace = new formatting.Rule(formatting.RuleDescriptor.create3(17, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabled("insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces"), Rules.IsNonJsxSameLineTokenContext), 8));
+ this.NoSpaceBeforeCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabled("insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces"), Rules.IsNonJsxSameLineTokenContext), 8));
this.NoSpaceBetweenEmptyBraceBrackets = new formatting.Rule(formatting.RuleDescriptor.create1(17, 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsObjectContext), 8));
this.NewLineAfterOpenBraceInBlockContext = new formatting.Rule(formatting.RuleDescriptor.create3(17, 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, 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsMultilineBlockContext), 4));
@@ -67025,11 +69504,12 @@ var ts;
this.SpaceAfterSubtractWhenFollowedByPredecrement = new formatting.Rule(formatting.RuleDescriptor.create1(38, 44), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2));
this.NoSpaceBeforeComma = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 26), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8));
this.SpaceAfterCertainKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([104, 100, 94, 80, 96, 103, 121]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2));
+ this.NoSpaceAfterNewKeywordOnConstructorSignature = new formatting.Rule(formatting.RuleDescriptor.create1(94, 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsConstructorSignatureContext), 8));
this.SpaceAfterLetConstInVariableDeclaration = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([110, 76]), 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, 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsFunctionCallOrNewContext, Rules.IsPreviousTokenNotComma), 8));
this.SpaceAfterFunctionInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create3(89, 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, 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsFunctionDeclContext), 2));
- this.NoSpaceBeforeOpenParenInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsFunctionDeclContext), 8));
+ this.SpaceBeforeOpenParenInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceBeforeFunctionParenthesis"), Rules.IsNonJsxSameLineTokenContext, Rules.IsFunctionDeclContext), 2));
+ this.NoSpaceBeforeOpenParenInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceBeforeFunctionParenthesis"), Rules.IsNonJsxSameLineTokenContext, Rules.IsFunctionDeclContext), 8));
this.SpaceAfterVoidOperator = new formatting.Rule(formatting.RuleDescriptor.create3(105, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsVoidOpContext), 2));
this.NoSpaceBetweenReturnAndSemicolon = new formatting.Rule(formatting.RuleDescriptor.create1(96, 25), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8));
this.SpaceBetweenStatements = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([20, 81, 82, 73]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNonJsxElementContext, Rules.IsNotForContext), 2));
@@ -67037,8 +69517,8 @@ var ts;
this.SpaceAfterGetSetInMember = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([125, 135]), 71), 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(123, 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2));
- this.NoSpaceAfterConstructor = new formatting.Rule(formatting.RuleDescriptor.create1(123, 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8));
+ this.SpaceAfterConstructor = new formatting.Rule(formatting.RuleDescriptor.create1(123, 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceAfterConstructor"), Rules.IsNonJsxSameLineTokenContext), 2));
+ this.NoSpaceAfterConstructor = new formatting.Rule(formatting.RuleDescriptor.create1(123, 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceAfterConstructor"), Rules.IsNonJsxSameLineTokenContext), 8));
this.NoSpaceAfterModuleImport = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([128, 132]), 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8));
this.SpaceAfterCertainTypeScriptKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([117, 75, 124, 79, 83, 84, 85, 125, 108, 91, 109, 128, 129, 112, 114, 113, 131, 135, 115, 138, 140, 127]), 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([85, 108, 140])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2));
@@ -67069,6 +69549,41 @@ var ts;
this.NoSpaceBeforeEqualInJsxAttribute = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 58), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsJsxAttributeContext, Rules.IsNonJsxSameLineTokenContext), 8));
this.NoSpaceAfterEqualInJsxAttribute = new formatting.Rule(formatting.RuleDescriptor.create3(58, 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, 51), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNonNullAssertionContext), 8));
+ this.SpaceAfterComma = new formatting.Rule(formatting.RuleDescriptor.create3(26, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceAfterCommaDelimiter"), Rules.IsNonJsxSameLineTokenContext, Rules.IsNonJsxElementContext, Rules.IsNextTokenNotCloseBracket), 2));
+ this.NoSpaceAfterComma = new formatting.Rule(formatting.RuleDescriptor.create3(26, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceAfterCommaDelimiter"), Rules.IsNonJsxSameLineTokenContext, Rules.IsNonJsxElementContext), 8));
+ this.SpaceBeforeBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.BinaryOperators), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceBeforeAndAfterBinaryOperators"), Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2));
+ this.SpaceAfterBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.BinaryOperators, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceBeforeAndAfterBinaryOperators"), Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2));
+ this.NoSpaceBeforeBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.BinaryOperators), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceBeforeAndAfterBinaryOperators"), Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 8));
+ this.NoSpaceAfterBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.BinaryOperators, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceBeforeAndAfterBinaryOperators"), Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 8));
+ this.SpaceAfterKeywordInControl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Keywords, 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceAfterKeywordsInControlFlowStatements"), Rules.IsControlDeclContext), 2));
+ this.NoSpaceAfterKeywordInControl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Keywords, 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceAfterKeywordsInControlFlowStatements"), Rules.IsControlDeclContext), 8));
+ this.NewLineBeforeOpenBraceInFunction = new formatting.Rule(formatting.RuleDescriptor.create2(this.FunctionOpenBraceLeftTokenRange, 17), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("placeOpenBraceOnNewLineForFunctions"), Rules.IsFunctionDeclContext, Rules.IsBeforeMultilineBlockContext), 4), 1);
+ this.NewLineBeforeOpenBraceInTypeScriptDeclWithBlock = new formatting.Rule(formatting.RuleDescriptor.create2(this.TypeScriptOpenBraceLeftTokenRange, 17), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("placeOpenBraceOnNewLineForFunctions"), Rules.IsTypeScriptDeclWithBlockContext, Rules.IsBeforeMultilineBlockContext), 4), 1);
+ this.NewLineBeforeOpenBraceInControl = new formatting.Rule(formatting.RuleDescriptor.create2(this.ControlOpenBraceLeftTokenRange, 17), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("placeOpenBraceOnNewLineForControlBlocks"), Rules.IsControlDeclContext, Rules.IsBeforeMultilineBlockContext), 4), 1);
+ this.SpaceAfterSemicolonInFor = new formatting.Rule(formatting.RuleDescriptor.create3(25, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceAfterSemicolonInForStatements"), Rules.IsNonJsxSameLineTokenContext, Rules.IsForContext), 2));
+ this.NoSpaceAfterSemicolonInFor = new formatting.Rule(formatting.RuleDescriptor.create3(25, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceAfterSemicolonInForStatements"), Rules.IsNonJsxSameLineTokenContext, Rules.IsForContext), 8));
+ this.SpaceAfterOpenParen = new formatting.Rule(formatting.RuleDescriptor.create3(19, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"), Rules.IsNonJsxSameLineTokenContext), 2));
+ this.SpaceBeforeCloseParen = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 20), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"), Rules.IsNonJsxSameLineTokenContext), 2));
+ this.NoSpaceBetweenParens = new formatting.Rule(formatting.RuleDescriptor.create1(19, 20), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8));
+ this.NoSpaceAfterOpenParen = new formatting.Rule(formatting.RuleDescriptor.create3(19, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"), Rules.IsNonJsxSameLineTokenContext), 8));
+ this.NoSpaceBeforeCloseParen = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 20), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"), Rules.IsNonJsxSameLineTokenContext), 8));
+ this.SpaceAfterOpenBracket = new formatting.Rule(formatting.RuleDescriptor.create3(21, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets"), Rules.IsNonJsxSameLineTokenContext), 2));
+ this.SpaceBeforeCloseBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 22), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets"), Rules.IsNonJsxSameLineTokenContext), 2));
+ this.NoSpaceBetweenBrackets = new formatting.Rule(formatting.RuleDescriptor.create1(21, 22), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8));
+ this.NoSpaceAfterOpenBracket = new formatting.Rule(formatting.RuleDescriptor.create3(21, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets"), Rules.IsNonJsxSameLineTokenContext), 8));
+ this.NoSpaceBeforeCloseBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 22), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets"), Rules.IsNonJsxSameLineTokenContext), 8));
+ this.NoSpaceAfterTemplateHeadAndMiddle = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([14, 15]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces"), Rules.IsNonJsxSameLineTokenContext), 8));
+ this.SpaceAfterTemplateHeadAndMiddle = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([14, 15]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces"), Rules.IsNonJsxSameLineTokenContext), 2));
+ this.NoSpaceBeforeTemplateMiddleAndTail = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([15, 16])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces"), Rules.IsNonJsxSameLineTokenContext), 8));
+ this.SpaceBeforeTemplateMiddleAndTail = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([15, 16])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces"), Rules.IsNonJsxSameLineTokenContext), 2));
+ this.NoSpaceAfterOpenBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create3(17, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces"), Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 8));
+ this.SpaceAfterOpenBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create3(17, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces"), Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 2));
+ this.NoSpaceBeforeCloseBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces"), Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 8));
+ this.SpaceBeforeCloseBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces"), Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 2));
+ this.SpaceAfterAnonymousFunctionKeyword = new formatting.Rule(formatting.RuleDescriptor.create1(89, 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceAfterFunctionKeywordForAnonymousFunctions"), Rules.IsFunctionDeclContext), 2));
+ this.NoSpaceAfterAnonymousFunctionKeyword = new formatting.Rule(formatting.RuleDescriptor.create1(89, 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceAfterFunctionKeywordForAnonymousFunctions"), Rules.IsFunctionDeclContext), 8));
+ this.NoSpaceAfterTypeAssertion = new formatting.Rule(formatting.RuleDescriptor.create3(29, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceAfterTypeAssertion"), Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeAssertionContext), 8));
+ this.SpaceAfterTypeAssertion = new formatting.Rule(formatting.RuleDescriptor.create3(29, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceAfterTypeAssertion"), Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeAssertionContext), 2));
this.HighPriorityCommonRules = [
this.IgnoreBeforeComment, this.IgnoreAfterLineComment,
this.NoSpaceBeforeColon, this.SpaceAfterColon, this.NoSpaceBeforeQuestionMark, this.SpaceAfterQuestionMarkInConditionalOperator,
@@ -67112,7 +69627,25 @@ var ts;
this.SpaceBeforeAt,
this.NoSpaceAfterAt,
this.SpaceAfterDecorator,
- this.NoSpaceBeforeNonNullAssertionOperator
+ this.NoSpaceBeforeNonNullAssertionOperator,
+ this.NoSpaceAfterNewKeywordOnConstructorSignature
+ ];
+ this.UserConfigurableRules = [
+ this.SpaceAfterConstructor, this.NoSpaceAfterConstructor,
+ this.SpaceAfterComma, this.NoSpaceAfterComma,
+ this.SpaceAfterAnonymousFunctionKeyword, this.NoSpaceAfterAnonymousFunctionKeyword,
+ this.SpaceAfterKeywordInControl, this.NoSpaceAfterKeywordInControl,
+ this.SpaceAfterOpenParen, this.SpaceBeforeCloseParen, this.NoSpaceBetweenParens, this.NoSpaceAfterOpenParen, this.NoSpaceBeforeCloseParen,
+ this.SpaceAfterOpenBracket, this.SpaceBeforeCloseBracket, this.NoSpaceBetweenBrackets, this.NoSpaceAfterOpenBracket, this.NoSpaceBeforeCloseBracket,
+ this.SpaceAfterOpenBrace, this.SpaceBeforeCloseBrace, this.NoSpaceBetweenEmptyBraceBrackets, this.NoSpaceAfterOpenBrace, this.NoSpaceBeforeCloseBrace,
+ this.SpaceAfterTemplateHeadAndMiddle, this.SpaceBeforeTemplateMiddleAndTail, this.NoSpaceAfterTemplateHeadAndMiddle, this.NoSpaceBeforeTemplateMiddleAndTail,
+ this.SpaceAfterOpenBraceInJsxExpression, this.SpaceBeforeCloseBraceInJsxExpression, this.NoSpaceAfterOpenBraceInJsxExpression, this.NoSpaceBeforeCloseBraceInJsxExpression,
+ this.SpaceAfterSemicolonInFor, this.NoSpaceAfterSemicolonInFor,
+ this.SpaceBeforeBinaryOperator, this.SpaceAfterBinaryOperator, this.NoSpaceBeforeBinaryOperator, this.NoSpaceAfterBinaryOperator,
+ this.SpaceBeforeOpenParenInFuncDecl, this.NoSpaceBeforeOpenParenInFuncDecl,
+ this.NewLineBeforeOpenBraceInControl,
+ this.NewLineBeforeOpenBraceInFunction, this.NewLineBeforeOpenBraceInTypeScriptDeclWithBlock,
+ this.SpaceAfterTypeAssertion, this.NoSpaceAfterTypeAssertion
];
this.LowPriorityCommonRules = [
this.NoSpaceBeforeSemicolon,
@@ -67123,41 +69656,6 @@ var ts;
this.SpaceAfterSemicolon,
this.SpaceBetweenStatements, this.SpaceAfterTryFinally
];
- this.SpaceAfterComma = new formatting.Rule(formatting.RuleDescriptor.create3(26, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNonJsxElementContext, Rules.IsNextTokenNotCloseBracket), 2));
- this.NoSpaceAfterComma = new formatting.Rule(formatting.RuleDescriptor.create3(26, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNonJsxElementContext), 8));
- this.SpaceBeforeBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.BinaryOperators), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2));
- this.SpaceAfterBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.BinaryOperators, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2));
- this.NoSpaceBeforeBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.BinaryOperators), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 8));
- this.NoSpaceAfterBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.BinaryOperators, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 8));
- this.SpaceAfterKeywordInControl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Keywords, 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext), 2));
- this.NoSpaceAfterKeywordInControl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Keywords, 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext), 8));
- this.NewLineBeforeOpenBraceInFunction = new formatting.Rule(formatting.RuleDescriptor.create2(this.FunctionOpenBraceLeftTokenRange, 17), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext, Rules.IsBeforeMultilineBlockContext), 4), 1);
- this.NewLineBeforeOpenBraceInTypeScriptDeclWithBlock = new formatting.Rule(formatting.RuleDescriptor.create2(this.TypeScriptOpenBraceLeftTokenRange, 17), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsTypeScriptDeclWithBlockContext, Rules.IsBeforeMultilineBlockContext), 4), 1);
- this.NewLineBeforeOpenBraceInControl = new formatting.Rule(formatting.RuleDescriptor.create2(this.ControlOpenBraceLeftTokenRange, 17), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext, Rules.IsBeforeMultilineBlockContext), 4), 1);
- this.SpaceAfterSemicolonInFor = new formatting.Rule(formatting.RuleDescriptor.create3(25, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsForContext), 2));
- this.NoSpaceAfterSemicolonInFor = new formatting.Rule(formatting.RuleDescriptor.create3(25, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsForContext), 8));
- this.SpaceAfterOpenParen = new formatting.Rule(formatting.RuleDescriptor.create3(19, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2));
- this.SpaceBeforeCloseParen = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 20), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2));
- this.NoSpaceBetweenParens = new formatting.Rule(formatting.RuleDescriptor.create1(19, 20), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8));
- this.NoSpaceAfterOpenParen = new formatting.Rule(formatting.RuleDescriptor.create3(19, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8));
- this.NoSpaceBeforeCloseParen = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 20), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8));
- this.SpaceAfterOpenBracket = new formatting.Rule(formatting.RuleDescriptor.create3(21, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2));
- this.SpaceBeforeCloseBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 22), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2));
- this.NoSpaceBetweenBrackets = new formatting.Rule(formatting.RuleDescriptor.create1(21, 22), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8));
- this.NoSpaceAfterOpenBracket = new formatting.Rule(formatting.RuleDescriptor.create3(21, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8));
- this.NoSpaceBeforeCloseBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 22), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8));
- this.NoSpaceAfterTemplateHeadAndMiddle = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([14, 15]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8));
- this.SpaceAfterTemplateHeadAndMiddle = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([14, 15]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2));
- this.NoSpaceBeforeTemplateMiddleAndTail = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([15, 16])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8));
- this.SpaceBeforeTemplateMiddleAndTail = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([15, 16])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2));
- this.NoSpaceAfterOpenBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create3(17, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 8));
- this.SpaceAfterOpenBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create3(17, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 2));
- this.NoSpaceBeforeCloseBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 8));
- this.SpaceBeforeCloseBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 2));
- this.SpaceAfterAnonymousFunctionKeyword = new formatting.Rule(formatting.RuleDescriptor.create1(89, 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 2));
- this.NoSpaceAfterAnonymousFunctionKeyword = new formatting.Rule(formatting.RuleDescriptor.create1(89, 19), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 8));
- this.NoSpaceAfterTypeAssertion = new formatting.Rule(formatting.RuleDescriptor.create3(29, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeAssertionContext), 8));
- this.SpaceAfterTypeAssertion = new formatting.Rule(formatting.RuleDescriptor.create3(29, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeAssertionContext), 2));
}
Rules.prototype.getRuleName = function (rule) {
var o = this;
@@ -67168,6 +69666,18 @@ var ts;
}
throw new Error("Unknown rule");
};
+ Rules.IsOptionEnabled = function (optionName) {
+ return function (context) { return context.options && context.options.hasOwnProperty(optionName) && !!context.options[optionName]; };
+ };
+ Rules.IsOptionDisabled = function (optionName) {
+ return function (context) { return context.options && context.options.hasOwnProperty(optionName) && !context.options[optionName]; };
+ };
+ Rules.IsOptionDisabledOrUndefined = function (optionName) {
+ return function (context) { return !context.options || !context.options.hasOwnProperty(optionName) || !context.options[optionName]; };
+ };
+ Rules.IsOptionEnabledOrUndefined = function (optionName) {
+ return function (context) { return !context.options || !context.options.hasOwnProperty(optionName) || !!context.options[optionName]; };
+ };
Rules.IsForContext = function (context) {
return context.contextNode.kind === 214;
};
@@ -67383,6 +69893,9 @@ var ts;
Rules.IsObjectTypeContext = function (context) {
return context.contextNode.kind === 163;
};
+ Rules.IsConstructorSignatureContext = function (context) {
+ return context.contextNode.kind === 156;
+ };
Rules.IsTypeArgumentOrParameterOrAssertion = function (token, parent) {
if (token.kind !== 27 && token.kind !== 29) {
return false;
@@ -67464,8 +69977,7 @@ var ts;
};
RulesMap.prototype.FillRule = function (rule, rulesBucketConstructionStateList) {
var _this = this;
- var specificRule = rule.Descriptor.LeftTokenRange !== formatting.Shared.TokenRange.Any &&
- rule.Descriptor.RightTokenRange !== formatting.Shared.TokenRange.Any;
+ var specificRule = rule.Descriptor.LeftTokenRange.isSpecific() && rule.Descriptor.RightTokenRange.isSpecific();
rule.Descriptor.LeftTokenRange.GetTokens().forEach(function (left) {
rule.Descriptor.RightTokenRange.GetTokens().forEach(function (right) {
var rulesBucketIndex = _this.GetRuleBucketIndex(left, right);
@@ -67573,27 +70085,14 @@ var ts;
(function (formatting) {
var Shared;
(function (Shared) {
- var TokenRangeAccess = (function () {
- function TokenRangeAccess(from, to, except) {
- this.tokens = [];
- for (var token = from; token <= to; token++) {
- if (ts.indexOf(except, token) < 0) {
- this.tokens.push(token);
- }
- }
- }
- TokenRangeAccess.prototype.GetTokens = function () {
- return this.tokens;
- };
- TokenRangeAccess.prototype.Contains = function (token) {
- return this.tokens.indexOf(token) >= 0;
- };
- return TokenRangeAccess;
- }());
- Shared.TokenRangeAccess = TokenRangeAccess;
+ var allTokens = [];
+ for (var token = 0; token <= 142; token++) {
+ allTokens.push(token);
+ }
var TokenValuesAccess = (function () {
- function TokenValuesAccess(tks) {
- this.tokens = tks && tks.length ? tks : [];
+ function TokenValuesAccess(tokens) {
+ if (tokens === void 0) { tokens = []; }
+ this.tokens = tokens;
}
TokenValuesAccess.prototype.GetTokens = function () {
return this.tokens;
@@ -67601,9 +70100,9 @@ var ts;
TokenValuesAccess.prototype.Contains = function (token) {
return this.tokens.indexOf(token) >= 0;
};
+ TokenValuesAccess.prototype.isSpecific = function () { return true; };
return TokenValuesAccess;
}());
- Shared.TokenValuesAccess = TokenValuesAccess;
var TokenSingleValueAccess = (function () {
function TokenSingleValueAccess(token) {
this.token = token;
@@ -67614,18 +70113,14 @@ var ts;
TokenSingleValueAccess.prototype.Contains = function (tokenValue) {
return tokenValue === this.token;
};
+ TokenSingleValueAccess.prototype.isSpecific = function () { return true; };
return TokenSingleValueAccess;
}());
- Shared.TokenSingleValueAccess = TokenSingleValueAccess;
var TokenAllAccess = (function () {
function TokenAllAccess() {
}
TokenAllAccess.prototype.GetTokens = function () {
- var result = [];
- for (var token = 0; token <= 142; token++) {
- result.push(token);
- }
- return result;
+ return allTokens;
};
TokenAllAccess.prototype.Contains = function () {
return true;
@@ -67633,51 +70128,80 @@ var ts;
TokenAllAccess.prototype.toString = function () {
return "[allTokens]";
};
+ TokenAllAccess.prototype.isSpecific = function () { return false; };
return TokenAllAccess;
}());
- Shared.TokenAllAccess = TokenAllAccess;
- var TokenRange = (function () {
- function TokenRange(tokenAccess) {
- this.tokenAccess = tokenAccess;
+ var TokenAllExceptAccess = (function () {
+ function TokenAllExceptAccess(except) {
+ this.except = except;
}
- TokenRange.FromToken = function (token) {
- return new TokenRange(new TokenSingleValueAccess(token));
- };
- TokenRange.FromTokens = function (tokens) {
- return new TokenRange(new TokenValuesAccess(tokens));
- };
- TokenRange.FromRange = function (f, to, except) {
- if (except === void 0) { except = []; }
- return new TokenRange(new TokenRangeAccess(f, to, except));
+ TokenAllExceptAccess.prototype.GetTokens = function () {
+ var _this = this;
+ return allTokens.filter(function (t) { return t !== _this.except; });
};
- TokenRange.AllTokens = function () {
- return new TokenRange(new TokenAllAccess());
+ TokenAllExceptAccess.prototype.Contains = function (token) {
+ return token !== this.except;
};
- TokenRange.prototype.GetTokens = function () {
- return this.tokenAccess.GetTokens();
- };
- TokenRange.prototype.Contains = function (token) {
- return this.tokenAccess.Contains(token);
- };
- TokenRange.prototype.toString = function () {
- return this.tokenAccess.toString();
- };
- return TokenRange;
+ TokenAllExceptAccess.prototype.isSpecific = function () { return false; };
+ return TokenAllExceptAccess;
}());
- TokenRange.Any = TokenRange.AllTokens();
- TokenRange.AnyIncludingMultilineComments = TokenRange.FromTokens(TokenRange.Any.GetTokens().concat([3]));
- TokenRange.Keywords = TokenRange.FromRange(72, 142);
- TokenRange.BinaryOperators = TokenRange.FromRange(27, 70);
- TokenRange.BinaryKeywordOperators = TokenRange.FromTokens([92, 93, 142, 118, 126]);
- TokenRange.UnaryPrefixOperators = TokenRange.FromTokens([43, 44, 52, 51]);
- TokenRange.UnaryPrefixExpressions = TokenRange.FromTokens([8, 71, 19, 21, 17, 99, 94]);
- TokenRange.UnaryPreincrementExpressions = TokenRange.FromTokens([71, 19, 99, 94]);
- TokenRange.UnaryPostincrementExpressions = TokenRange.FromTokens([71, 20, 22, 94]);
- TokenRange.UnaryPredecrementExpressions = TokenRange.FromTokens([71, 19, 99, 94]);
- TokenRange.UnaryPostdecrementExpressions = TokenRange.FromTokens([71, 20, 22, 94]);
- TokenRange.Comments = TokenRange.FromTokens([2, 3]);
- TokenRange.TypeNames = TokenRange.FromTokens([71, 133, 136, 122, 137, 105, 119]);
- Shared.TokenRange = TokenRange;
+ var TokenRange;
+ (function (TokenRange) {
+ function FromToken(token) {
+ return new TokenSingleValueAccess(token);
+ }
+ TokenRange.FromToken = FromToken;
+ function FromTokens(tokens) {
+ return new TokenValuesAccess(tokens);
+ }
+ TokenRange.FromTokens = FromTokens;
+ function FromRange(from, to, except) {
+ if (except === void 0) { except = []; }
+ var tokens = [];
+ for (var token = from; token <= to; token++) {
+ if (ts.indexOf(except, token) < 0) {
+ tokens.push(token);
+ }
+ }
+ return new TokenValuesAccess(tokens);
+ }
+ TokenRange.FromRange = FromRange;
+ function AnyExcept(token) {
+ return new TokenAllExceptAccess(token);
+ }
+ TokenRange.AnyExcept = AnyExcept;
+ TokenRange.Any = new TokenAllAccess();
+ TokenRange.AnyIncludingMultilineComments = TokenRange.FromTokens(allTokens.concat([3]));
+ TokenRange.Keywords = TokenRange.FromRange(72, 142);
+ TokenRange.BinaryOperators = TokenRange.FromRange(27, 70);
+ TokenRange.BinaryKeywordOperators = TokenRange.FromTokens([
+ 92, 93, 142, 118, 126
+ ]);
+ TokenRange.UnaryPrefixOperators = TokenRange.FromTokens([
+ 43, 44, 52, 51
+ ]);
+ TokenRange.UnaryPrefixExpressions = TokenRange.FromTokens([
+ 8, 71, 19, 21,
+ 17, 99, 94
+ ]);
+ TokenRange.UnaryPreincrementExpressions = TokenRange.FromTokens([
+ 71, 19, 99, 94
+ ]);
+ TokenRange.UnaryPostincrementExpressions = TokenRange.FromTokens([
+ 71, 20, 22, 94
+ ]);
+ TokenRange.UnaryPredecrementExpressions = TokenRange.FromTokens([
+ 71, 19, 99, 94
+ ]);
+ TokenRange.UnaryPostdecrementExpressions = TokenRange.FromTokens([
+ 71, 20, 22, 94
+ ]);
+ TokenRange.Comments = TokenRange.FromTokens([2, 3]);
+ TokenRange.TypeNames = TokenRange.FromTokens([
+ 71, 133, 136, 122,
+ 137, 105, 119
+ ]);
+ })(TokenRange = Shared.TokenRange || (Shared.TokenRange = {}));
})(Shared = formatting.Shared || (formatting.Shared = {}));
})(formatting = ts.formatting || (ts.formatting = {}));
})(ts || (ts = {}));
@@ -67688,6 +70212,8 @@ var ts;
var RulesProvider = (function () {
function RulesProvider() {
this.globalRules = new formatting.Rules();
+ var activeRules = this.globalRules.HighPriorityCommonRules.slice(0).concat(this.globalRules.UserConfigurableRules).concat(this.globalRules.LowPriorityCommonRules);
+ this.rulesMap = formatting.RulesMap.create(activeRules);
}
RulesProvider.prototype.getRuleName = function (rule) {
return this.globalRules.getRuleName(rule);
@@ -67703,121 +70229,9 @@ var ts;
};
RulesProvider.prototype.ensureUpToDate = function (options) {
if (!this.options || !ts.compareDataObjects(this.options, options)) {
- var activeRules = this.createActiveRules(options);
- var rulesMap = formatting.RulesMap.create(activeRules);
- this.activeRules = activeRules;
- this.rulesMap = rulesMap;
this.options = ts.clone(options);
}
};
- 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);
- }
- else {
- rules.push(this.globalRules.NoSpaceAfterComma);
- }
- if (options.insertSpaceAfterFunctionKeywordForAnonymousFunctions) {
- rules.push(this.globalRules.SpaceAfterAnonymousFunctionKeyword);
- }
- else {
- rules.push(this.globalRules.NoSpaceAfterAnonymousFunctionKeyword);
- }
- if (options.insertSpaceAfterKeywordsInControlFlowStatements) {
- rules.push(this.globalRules.SpaceAfterKeywordInControl);
- }
- else {
- rules.push(this.globalRules.NoSpaceAfterKeywordInControl);
- }
- if (options.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis) {
- rules.push(this.globalRules.SpaceAfterOpenParen);
- rules.push(this.globalRules.SpaceBeforeCloseParen);
- rules.push(this.globalRules.NoSpaceBetweenParens);
- }
- else {
- rules.push(this.globalRules.NoSpaceAfterOpenParen);
- rules.push(this.globalRules.NoSpaceBeforeCloseParen);
- rules.push(this.globalRules.NoSpaceBetweenParens);
- }
- if (options.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets) {
- rules.push(this.globalRules.SpaceAfterOpenBracket);
- rules.push(this.globalRules.SpaceBeforeCloseBracket);
- rules.push(this.globalRules.NoSpaceBetweenBrackets);
- }
- else {
- rules.push(this.globalRules.NoSpaceAfterOpenBracket);
- rules.push(this.globalRules.NoSpaceBeforeCloseBracket);
- rules.push(this.globalRules.NoSpaceBetweenBrackets);
- }
- if (options.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces !== false) {
- rules.push(this.globalRules.SpaceAfterOpenBrace);
- rules.push(this.globalRules.SpaceBeforeCloseBrace);
- rules.push(this.globalRules.NoSpaceBetweenEmptyBraceBrackets);
- }
- else {
- rules.push(this.globalRules.NoSpaceAfterOpenBrace);
- rules.push(this.globalRules.NoSpaceBeforeCloseBrace);
- rules.push(this.globalRules.NoSpaceBetweenEmptyBraceBrackets);
- }
- if (options.insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces) {
- rules.push(this.globalRules.SpaceAfterTemplateHeadAndMiddle);
- rules.push(this.globalRules.SpaceBeforeTemplateMiddleAndTail);
- }
- else {
- rules.push(this.globalRules.NoSpaceAfterTemplateHeadAndMiddle);
- rules.push(this.globalRules.NoSpaceBeforeTemplateMiddleAndTail);
- }
- if (options.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces) {
- rules.push(this.globalRules.SpaceAfterOpenBraceInJsxExpression);
- rules.push(this.globalRules.SpaceBeforeCloseBraceInJsxExpression);
- }
- else {
- rules.push(this.globalRules.NoSpaceAfterOpenBraceInJsxExpression);
- rules.push(this.globalRules.NoSpaceBeforeCloseBraceInJsxExpression);
- }
- if (options.insertSpaceAfterSemicolonInForStatements) {
- rules.push(this.globalRules.SpaceAfterSemicolonInFor);
- }
- else {
- rules.push(this.globalRules.NoSpaceAfterSemicolonInFor);
- }
- if (options.insertSpaceBeforeAndAfterBinaryOperators) {
- rules.push(this.globalRules.SpaceBeforeBinaryOperator);
- rules.push(this.globalRules.SpaceAfterBinaryOperator);
- }
- else {
- 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);
- }
- if (options.placeOpenBraceOnNewLineForFunctions) {
- rules.push(this.globalRules.NewLineBeforeOpenBraceInFunction);
- rules.push(this.globalRules.NewLineBeforeOpenBraceInTypeScriptDeclWithBlock);
- }
- if (options.insertSpaceAfterTypeAssertion) {
- rules.push(this.globalRules.SpaceAfterTypeAssertion);
- }
- else {
- rules.push(this.globalRules.NoSpaceAfterTypeAssertion);
- }
- rules = rules.concat(this.globalRules.LowPriorityCommonRules);
- return rules;
- };
return RulesProvider;
}());
formatting.RulesProvider = RulesProvider;
@@ -68002,7 +70416,7 @@ var ts;
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 formattingContext = new formatting.FormattingContext(sourceFile, requestKind, options);
var previousRangeHasError;
var previousRange;
var previousParent;
@@ -68085,7 +70499,7 @@ var ts;
}
case 149:
case 146:
- return node.name.kind;
+ return ts.getNameOfDeclaration(node).kind;
}
}
function getDynamicIndentation(node, nodeStartLine, indentation, delta) {
@@ -68858,9 +71272,7 @@ var ts;
if (node.kind === 20) {
return -1;
}
- if (node.parent && (node.parent.kind === 181 ||
- node.parent.kind === 182) &&
- node.parent.expression !== node) {
+ if (node.parent && ts.isCallOrNewExpression(node.parent) && node.parent.expression !== node) {
var fullCallOrNewExpression = node.parent.expression;
var startingExpression = getStartingExpression(fullCallOrNewExpression);
if (fullCallOrNewExpression === startingExpression) {
@@ -69140,7 +71552,7 @@ var ts;
return this;
}
if (index !== containingList.length - 1) {
- var nextToken = ts.getTokenAtPosition(sourceFile, node.end);
+ var nextToken = ts.getTokenAtPosition(sourceFile, node.end, false);
if (nextToken && isSeparator(node, nextToken)) {
var startPosition = ts.skipTrivia(sourceFile.text, getAdjustedStartPosition(sourceFile, node, {}, Position.FullStart), false, true);
var nextElement = containingList[index + 1];
@@ -69149,7 +71561,7 @@ var ts;
}
}
else {
- var previousToken = ts.getTokenAtPosition(sourceFile, containingList[index - 1].end);
+ var previousToken = ts.getTokenAtPosition(sourceFile, containingList[index - 1].end, false);
if (previousToken && isSeparator(node, previousToken)) {
this.deleteNodeRange(sourceFile, previousToken, node);
}
@@ -69217,7 +71629,7 @@ var ts;
}
var end = after.getEnd();
if (index !== containingList.length - 1) {
- var nextToken = ts.getTokenAtPosition(sourceFile, after.end);
+ var nextToken = ts.getTokenAtPosition(sourceFile, after.end, false);
if (nextToken && isSeparator(after, nextToken)) {
var lineAndCharOfNextElement = ts.getLineAndCharacterOfPosition(sourceFile, skipWhitespacesAndLineBreaks(sourceFile.text, containingList[index + 1].getFullStart()));
var lineAndCharOfNextToken = ts.getLineAndCharacterOfPosition(sourceFile, nextToken.end);
@@ -69356,7 +71768,7 @@ var ts;
}());
textChanges.ChangeTracker = ChangeTracker;
function getNonformattedText(node, sourceFile, newLine) {
- var options = { newLine: newLine, target: sourceFile.languageVersion };
+ var options = { newLine: newLine, target: sourceFile && sourceFile.languageVersion };
var writer = new Writer(ts.getNewLineCharacter(options));
var printer = ts.createPrinter(options, writer);
printer.writeNode(3, node, sourceFile, writer);
@@ -69385,27 +71797,8 @@ var ts;
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 visited = ts.visitEachChild(node, assignPositionsToNode, ts.nullTransformationContext, assignPositionsToNodeArray, assignPositionsToNode);
var newNode = ts.nodeIsSynthesized(visited)
? visited
: (Proxy.prototype = visited, new Proxy());
@@ -69448,6 +71841,16 @@ var ts;
setEnd(nodes, _this.lastNonTriviaPosition);
}
};
+ this.onBeforeEmitToken = function (node) {
+ if (node) {
+ setPos(node, _this.lastNonTriviaPosition);
+ }
+ };
+ this.onAfterEmitToken = function (node) {
+ if (node) {
+ setEnd(node, _this.lastNonTriviaPosition);
+ }
+ };
}
Writer.prototype.setLastNonTriviaPosition = function (s, force) {
if (force || !isTrivia(s)) {
@@ -69514,14 +71917,14 @@ var ts;
var codefix;
(function (codefix) {
var codeFixes = [];
- function registerCodeFix(action) {
- ts.forEach(action.errorCodes, function (error) {
+ function registerCodeFix(codeFix) {
+ ts.forEach(codeFix.errorCodes, function (error) {
var fixes = codeFixes[error];
if (!fixes) {
fixes = [];
codeFixes[error] = fixes;
}
- fixes.push(action);
+ fixes.push(codeFix);
});
}
codefix.registerCodeFix = registerCodeFix;
@@ -69545,6 +71948,42 @@ var ts;
})(ts || (ts = {}));
var ts;
(function (ts) {
+ var refactor;
+ (function (refactor_1) {
+ var refactors = ts.createMap();
+ function registerRefactor(refactor) {
+ refactors.set(refactor.name, refactor);
+ }
+ refactor_1.registerRefactor = registerRefactor;
+ function getApplicableRefactors(context) {
+ var results;
+ var refactorList = [];
+ refactors.forEach(function (refactor) {
+ refactorList.push(refactor);
+ });
+ for (var _i = 0, refactorList_1 = refactorList; _i < refactorList_1.length; _i++) {
+ var refactor_2 = refactorList_1[_i];
+ if (context.cancellationToken && context.cancellationToken.isCancellationRequested()) {
+ return results;
+ }
+ var infos = refactor_2.getAvailableActions(context);
+ if (infos && infos.length) {
+ (_a = (results || (results = []))).push.apply(_a, infos);
+ }
+ }
+ return results;
+ var _a;
+ }
+ refactor_1.getApplicableRefactors = getApplicableRefactors;
+ function getEditsForRefactor(context, refactorName, actionName) {
+ var refactor = refactors.get(refactorName);
+ return refactor && refactor.getEditsForAction(context, actionName);
+ }
+ refactor_1.getEditsForRefactor = getEditsForRefactor;
+ })(refactor = ts.refactor || (ts.refactor = {}));
+})(ts || (ts = {}));
+var ts;
+(function (ts) {
var codefix;
(function (codefix) {
codefix.registerCodeFix({
@@ -69554,7 +71993,7 @@ var ts;
function getActionForClassLikeIncorrectImplementsInterface(context) {
var sourceFile = context.sourceFile;
var start = context.span.start;
- var token = ts.getTokenAtPosition(sourceFile, start);
+ var token = ts.getTokenAtPosition(sourceFile, start, false);
var checker = context.program.getTypeChecker();
var classDeclaration = ts.getContainingClass(token);
if (!classDeclaration) {
@@ -69607,94 +72046,189 @@ var ts;
var codefix;
(function (codefix) {
codefix.registerCodeFix({
- errorCodes: [ts.Diagnostics.Property_0_does_not_exist_on_type_1.code],
+ errorCodes: [ts.Diagnostics.Property_0_does_not_exist_on_type_1.code,
+ ts.Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2.code],
getCodeActions: getActionsForAddMissingMember
});
function getActionsForAddMissingMember(context) {
- var sourceFile = context.sourceFile;
+ var tokenSourceFile = context.sourceFile;
var start = context.span.start;
- var token = ts.getTokenAtPosition(sourceFile, start);
+ var token = ts.getTokenAtPosition(tokenSourceFile, start, false);
if (token.kind !== 71) {
return undefined;
}
- if (!ts.isPropertyAccessExpression(token.parent) || token.parent.expression.kind !== 99) {
+ if (!ts.isPropertyAccessExpression(token.parent)) {
return undefined;
}
- var classMemberDeclaration = ts.getThisContainer(token, false);
- if (!ts.isClassElement(classMemberDeclaration)) {
- return undefined;
+ var tokenName = token.getText(tokenSourceFile);
+ var makeStatic = false;
+ var classDeclaration;
+ if (token.parent.expression.kind === 99) {
+ var containingClassMemberDeclaration = ts.getThisContainer(token, false);
+ if (!ts.isClassElement(containingClassMemberDeclaration)) {
+ return undefined;
+ }
+ classDeclaration = containingClassMemberDeclaration.parent;
+ makeStatic = classDeclaration && ts.hasModifier(containingClassMemberDeclaration, 32);
+ }
+ else {
+ var checker = context.program.getTypeChecker();
+ var leftExpression = token.parent.expression;
+ var leftExpressionType = checker.getTypeAtLocation(leftExpression);
+ if (leftExpressionType.flags & 32768) {
+ var symbol = leftExpressionType.symbol;
+ if (symbol.flags & 32) {
+ classDeclaration = symbol.declarations && symbol.declarations[0];
+ if (leftExpressionType !== checker.getDeclaredTypeOfSymbol(symbol)) {
+ makeStatic = true;
+ }
+ }
+ }
}
- 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) {
+ var classDeclarationSourceFile = ts.getSourceFileOfNode(classDeclaration);
+ var classOpenBrace = ts.getOpenBraceOfClassLike(classDeclaration, classDeclarationSourceFile);
+ return ts.isInJavaScriptFile(classDeclarationSourceFile) ?
+ getActionsForAddMissingMemberInJavaScriptFile(classDeclaration, makeStatic) :
+ getActionsForAddMissingMemberInTypeScriptFile(classDeclaration, makeStatic);
+ function getActionsForAddMissingMemberInJavaScriptFile(classDeclaration, makeStatic) {
+ var actions;
+ var methodCodeAction = getActionForMethodDeclaration(false);
+ if (methodCodeAction) {
+ actions = [methodCodeAction];
+ }
+ if (makeStatic) {
if (classDeclaration.kind === 199) {
- return undefined;
+ return actions;
}
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 staticInitialization = ts.createStatement(ts.createAssignment(ts.createPropertyAccess(ts.createIdentifier(className), tokenName), ts.createIdentifier("undefined")));
+ var staticInitializationChangeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context);
+ staticInitializationChangeTracker.insertNodeAfter(classDeclarationSourceFile, classDeclaration, staticInitialization, { suffix: context.newLineCharacter });
+ var initializeStaticAction = {
+ description: ts.formatStringFromArgs(ts.getLocaleSpecificMessage(ts.Diagnostics.Initialize_static_property_0), [tokenName]),
+ changes: staticInitializationChangeTracker.getChanges()
+ };
+ (actions || (actions = [])).push(initializeStaticAction);
+ return actions;
}
else {
var classConstructor = ts.getFirstConstructorWithBody(classDeclaration);
if (!classConstructor) {
- return undefined;
+ return actions;
}
- 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
- }]
- }]
- }];
+ var propertyInitialization = ts.createStatement(ts.createAssignment(ts.createPropertyAccess(ts.createThis(), tokenName), ts.createIdentifier("undefined")));
+ var propertyInitializationChangeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context);
+ propertyInitializationChangeTracker.insertNodeAt(classDeclarationSourceFile, classConstructor.body.getEnd() - 1, propertyInitialization, { prefix: context.newLineCharacter, suffix: context.newLineCharacter });
+ var initializeAction = {
+ description: ts.formatStringFromArgs(ts.getLocaleSpecificMessage(ts.Diagnostics.Initialize_property_0_in_the_constructor), [tokenName]),
+ changes: propertyInitializationChangeTracker.getChanges()
+ };
+ (actions || (actions = [])).push(initializeAction);
+ return actions;
}
}
- function getActionsForAddMissingMemberInTypeScriptFile() {
+ function getActionsForAddMissingMemberInTypeScriptFile(classDeclaration, makeStatic) {
+ var actions;
+ var methodCodeAction = getActionForMethodDeclaration(true);
+ if (methodCodeAction) {
+ actions = [methodCodeAction];
+ }
var typeNode;
if (token.parent.parent.kind === 194) {
var binaryExpression = token.parent.parent;
+ var otherExpression = token.parent === binaryExpression.left ? binaryExpression.right : binaryExpression.left;
var checker = context.program.getTypeChecker();
- var widenedType = checker.getWidenedType(checker.getBaseTypeOfLiteralType(checker.getTypeAtLocation(binaryExpression.right)));
+ var widenedType = checker.getWidenedType(checker.getBaseTypeOfLiteralType(checker.getTypeAtLocation(otherExpression)));
typeNode = checker.typeToTypeNode(widenedType, classDeclaration);
}
typeNode = typeNode || ts.createKeywordTypeNode(119);
- var openBrace = ts.getOpenBraceOfClassLike(classDeclaration, sourceFile);
- var property = ts.createProperty(undefined, isStatic ? [ts.createToken(115)] : undefined, token.getText(sourceFile), undefined, typeNode, undefined);
+ var property = ts.createProperty(undefined, makeStatic ? [ts.createToken(115)] : undefined, tokenName, 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) {
+ propertyChangeTracker.insertNodeAfter(classDeclarationSourceFile, classOpenBrace, property, { suffix: context.newLineCharacter });
+ (actions || (actions = [])).push({
+ description: ts.formatStringFromArgs(ts.getLocaleSpecificMessage(ts.Diagnostics.Declare_property_0), [tokenName]),
+ changes: propertyChangeTracker.getChanges()
+ });
+ if (!makeStatic) {
var stringTypeNode = ts.createKeywordTypeNode(136);
var indexingParameter = ts.createParameter(undefined, undefined, undefined, "x", undefined, stringTypeNode, undefined);
- var indexSignature = ts.createIndexSignatureDeclaration(undefined, undefined, [indexingParameter], typeNode);
+ var indexSignature = ts.createIndexSignature(undefined, undefined, [indexingParameter], typeNode);
var indexSignatureChangeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context);
- indexSignatureChangeTracker.insertNodeAfter(sourceFile, openBrace, indexSignature, { suffix: context.newLineCharacter });
+ indexSignatureChangeTracker.insertNodeAfter(classDeclarationSourceFile, classOpenBrace, indexSignature, { suffix: context.newLineCharacter });
actions.push({
- description: ts.formatStringFromArgs(ts.getLocaleSpecificMessage(ts.Diagnostics.Add_index_signature_for_missing_property_0), [token.getText()]),
+ description: ts.formatStringFromArgs(ts.getLocaleSpecificMessage(ts.Diagnostics.Add_index_signature_for_property_0), [tokenName]),
changes: indexSignatureChangeTracker.getChanges()
});
}
return actions;
}
+ function getActionForMethodDeclaration(includeTypeScriptSyntax) {
+ if (token.parent.parent.kind === 181) {
+ var callExpression = token.parent.parent;
+ var methodDeclaration = codefix.createMethodFromCallExpression(callExpression, tokenName, includeTypeScriptSyntax, makeStatic);
+ var methodDeclarationChangeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context);
+ methodDeclarationChangeTracker.insertNodeAfter(classDeclarationSourceFile, classOpenBrace, methodDeclaration, { suffix: context.newLineCharacter });
+ return {
+ description: ts.formatStringFromArgs(ts.getLocaleSpecificMessage(makeStatic ?
+ ts.Diagnostics.Declare_method_0 :
+ ts.Diagnostics.Declare_static_method_0), [tokenName]),
+ changes: methodDeclarationChangeTracker.getChanges()
+ };
+ }
+ }
+ }
+ })(codefix = ts.codefix || (ts.codefix = {}));
+})(ts || (ts = {}));
+var ts;
+(function (ts) {
+ var codefix;
+ (function (codefix) {
+ codefix.registerCodeFix({
+ errorCodes: [ts.Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2.code,
+ ts.Diagnostics.Cannot_find_name_0_Did_you_mean_1.code],
+ getCodeActions: getActionsForCorrectSpelling
+ });
+ function getActionsForCorrectSpelling(context) {
+ var sourceFile = context.sourceFile;
+ var node = ts.getTokenAtPosition(sourceFile, context.span.start, false);
+ var checker = context.program.getTypeChecker();
+ var suggestion;
+ if (node.kind === 71 && ts.isPropertyAccessExpression(node.parent)) {
+ var containingType = checker.getTypeAtLocation(node.parent.expression);
+ suggestion = checker.getSuggestionForNonexistentProperty(node, containingType);
+ }
+ else {
+ var meaning = ts.getMeaningFromLocation(node);
+ suggestion = checker.getSuggestionForNonexistentSymbol(node, ts.getTextOfNode(node), convertSemanticMeaningToSymbolFlags(meaning));
+ }
+ if (suggestion) {
+ return [{
+ description: ts.formatStringFromArgs(ts.getLocaleSpecificMessage(ts.Diagnostics.Change_spelling_to_0), [suggestion]),
+ changes: [{
+ fileName: sourceFile.fileName,
+ textChanges: [{
+ span: { start: node.getStart(), length: node.getWidth() },
+ newText: suggestion
+ }],
+ }],
+ }];
+ }
+ }
+ function convertSemanticMeaningToSymbolFlags(meaning) {
+ var flags = 0;
+ if (meaning & 4) {
+ flags |= 1920;
+ }
+ if (meaning & 2) {
+ flags |= 793064;
+ }
+ if (meaning & 1) {
+ flags |= 107455;
+ }
+ return flags;
}
})(codefix = ts.codefix || (ts.codefix = {}));
})(ts || (ts = {}));
@@ -69713,7 +72247,7 @@ var ts;
function getActionForClassLikeMissingAbstractMember(context) {
var sourceFile = context.sourceFile;
var start = context.span.start;
- var token = ts.getTokenAtPosition(sourceFile, start);
+ var token = ts.getTokenAtPosition(sourceFile, start, false);
var checker = context.program.getTypeChecker();
if (ts.isClassLike(token.parent)) {
var classDeclaration = token.parent;
@@ -69748,7 +72282,7 @@ var ts;
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;
- var token = ts.getTokenAtPosition(sourceFile, context.span.start);
+ var token = ts.getTokenAtPosition(sourceFile, context.span.start, false);
if (token.kind !== 99) {
return undefined;
}
@@ -69793,7 +72327,7 @@ var ts;
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);
+ var token = ts.getTokenAtPosition(sourceFile, context.span.start, false);
if (token.kind !== 123) {
return undefined;
}
@@ -69817,7 +72351,7 @@ var ts;
getCodeActions: function (context) {
var sourceFile = context.sourceFile;
var start = context.span.start;
- var token = ts.getTokenAtPosition(sourceFile, start);
+ var token = ts.getTokenAtPosition(sourceFile, start, false);
var classDeclNode = ts.getContainingClass(token);
if (!(token.kind === 71 && ts.isClassLike(classDeclNode))) {
return undefined;
@@ -69855,7 +72389,7 @@ var ts;
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);
+ var token = ts.getTokenAtPosition(sourceFile, context.span.start, false);
if (token.kind !== 71) {
return undefined;
}
@@ -69881,126 +72415,135 @@ var ts;
getCodeActions: function (context) {
var sourceFile = context.sourceFile;
var start = context.span.start;
- var token = ts.getTokenAtPosition(sourceFile, start);
+ var token = ts.getTokenAtPosition(sourceFile, start, false);
if (token.kind === 21) {
- token = ts.getTokenAtPosition(sourceFile, start + 1);
+ token = ts.getTokenAtPosition(sourceFile, start + 1, false);
}
switch (token.kind) {
case 71:
- switch (token.parent.kind) {
- case 226:
- switch (token.parent.parent.parent.kind) {
- case 214:
- var forStatement = token.parent.parent.parent;
- var forInitializer = forStatement.initializer;
- if (forInitializer.declarations.length === 1) {
- return deleteNode(forInitializer);
- }
- else {
- return deleteNodeInList(token.parent);
- }
- case 216:
- var forOfStatement = token.parent.parent.parent;
- if (forOfStatement.initializer.kind === 227) {
- var forOfInitializer = forOfStatement.initializer;
- return replaceNode(forOfInitializer.declarations[0], ts.createObjectLiteral());
- }
- break;
- case 215:
- return undefined;
- case 260:
- 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 145:
- var typeParameters = token.parent.parent.typeParameters;
- if (typeParameters.length === 1) {
- var previousToken = ts.getTokenAtPosition(sourceFile, typeParameters.pos - 1);
- if (!previousToken || previousToken.kind !== 27) {
- return deleteRange(typeParameters);
- }
- var nextToken = ts.getTokenAtPosition(sourceFile, typeParameters.end);
- if (!nextToken || nextToken.kind !== 29) {
- return deleteRange(typeParameters);
- }
- return deleteNodeRange(previousToken, nextToken);
- }
- else {
- return deleteNodeInList(token.parent);
- }
- case 146:
- var functionDeclaration = token.parent.parent;
- if (functionDeclaration.parameters.length === 1) {
- return deleteNode(token.parent);
- }
- else {
- return deleteNodeInList(token.parent);
- }
- case 237:
- var importEquals = ts.getAncestor(token, 237);
- return deleteNode(importEquals);
- case 242:
- var namedImports = token.parent.parent;
- if (namedImports.elements.length === 1) {
- var importSpec = ts.getAncestor(token, 238);
- return deleteNode(importSpec);
- }
- else {
- return deleteNodeInList(token.parent);
- }
- case 239:
- var importClause = token.parent;
- if (!importClause.namedBindings) {
- var importDecl = ts.getAncestor(importClause, 238);
- return deleteNode(importDecl);
- }
- else {
- var start_4 = importClause.name.getStart(sourceFile);
- var nextToken = ts.getTokenAtPosition(sourceFile, importClause.name.end);
- if (nextToken && nextToken.kind === 26) {
- return deleteRange({ pos: start_4, end: ts.skipTrivia(sourceFile.text, nextToken.end, false, true) });
- }
- else {
- return deleteNode(importClause.name);
- }
- }
- case 240:
- var namespaceImport = token.parent;
- if (namespaceImport.name === token && !namespaceImport.parent.name) {
- var importDecl = ts.getAncestor(namespaceImport, 238);
- return deleteNode(importDecl);
- }
- else {
- var previousToken = ts.getTokenAtPosition(sourceFile, namespaceImport.pos - 1);
- if (previousToken && previousToken.kind === 26) {
- var startPosition = ts.textChanges.getAdjustedStartPosition(sourceFile, previousToken, {}, ts.textChanges.Position.FullStart);
- return deleteRange({ pos: startPosition, end: namespaceImport.end });
- }
- return deleteRange(namespaceImport);
- }
- }
- break;
+ return deleteIdentifierOrPrefixWithUnderscore(token);
case 149:
case 240:
+ return [deleteNode(token.parent)];
+ default:
+ return [deleteDefault()];
+ }
+ function deleteDefault() {
+ if (ts.isDeclarationName(token)) {
return deleteNode(token.parent);
+ }
+ else if (ts.isLiteralComputedPropertyDeclarationName(token)) {
+ return deleteNode(token.parent.parent);
+ }
+ else {
+ return undefined;
+ }
}
- if (ts.isDeclarationName(token)) {
- return deleteNode(token.parent);
+ function prefixIdentifierWithUnderscore(identifier) {
+ var startPosition = identifier.getStart(sourceFile, false);
+ return {
+ description: ts.formatStringFromArgs(ts.getLocaleSpecificMessage(ts.Diagnostics.Prefix_0_with_an_underscore), { 0: token.getText() }),
+ changes: [{
+ fileName: sourceFile.path,
+ textChanges: [{
+ span: { start: startPosition, length: 0 },
+ newText: "_"
+ }]
+ }]
+ };
}
- else if (ts.isLiteralComputedPropertyDeclarationName(token)) {
- return deleteNode(token.parent.parent);
+ function deleteIdentifierOrPrefixWithUnderscore(identifier) {
+ var parent = identifier.parent;
+ switch (parent.kind) {
+ case 226:
+ return deleteVariableDeclarationOrPrefixWithUnderscore(identifier, parent);
+ case 145:
+ var typeParameters = parent.parent.typeParameters;
+ if (typeParameters.length === 1) {
+ var previousToken = ts.getTokenAtPosition(sourceFile, typeParameters.pos - 1, false);
+ var nextToken = ts.getTokenAtPosition(sourceFile, typeParameters.end, false);
+ ts.Debug.assert(previousToken.kind === 27);
+ ts.Debug.assert(nextToken.kind === 29);
+ return [deleteNodeRange(previousToken, nextToken)];
+ }
+ else {
+ return [deleteNodeInList(parent)];
+ }
+ case 146:
+ var functionDeclaration = parent.parent;
+ return [functionDeclaration.parameters.length === 1 ? deleteNode(parent) : deleteNodeInList(parent),
+ prefixIdentifierWithUnderscore(identifier)];
+ case 237:
+ var importEquals = ts.getAncestor(identifier, 237);
+ return [deleteNode(importEquals)];
+ case 242:
+ var namedImports = parent.parent;
+ if (namedImports.elements.length === 1) {
+ var importSpec = ts.getAncestor(identifier, 238);
+ return [deleteNode(importSpec)];
+ }
+ else {
+ return [deleteNodeInList(parent)];
+ }
+ case 239:
+ var importClause = parent;
+ if (!importClause.namedBindings) {
+ var importDecl = ts.getAncestor(importClause, 238);
+ return [deleteNode(importDecl)];
+ }
+ else {
+ var start_4 = importClause.name.getStart(sourceFile);
+ var nextToken = ts.getTokenAtPosition(sourceFile, importClause.name.end, false);
+ if (nextToken && nextToken.kind === 26) {
+ return [deleteRange({ pos: start_4, end: ts.skipTrivia(sourceFile.text, nextToken.end, false, true) })];
+ }
+ else {
+ return [deleteNode(importClause.name)];
+ }
+ }
+ case 240:
+ var namespaceImport = parent;
+ if (namespaceImport.name === identifier && !namespaceImport.parent.name) {
+ var importDecl = ts.getAncestor(namespaceImport, 238);
+ return [deleteNode(importDecl)];
+ }
+ else {
+ var previousToken = ts.getTokenAtPosition(sourceFile, namespaceImport.pos - 1, false);
+ if (previousToken && previousToken.kind === 26) {
+ var startPosition = ts.textChanges.getAdjustedStartPosition(sourceFile, previousToken, {}, ts.textChanges.Position.FullStart);
+ return [deleteRange({ pos: startPosition, end: namespaceImport.end })];
+ }
+ return [deleteRange(namespaceImport)];
+ }
+ default:
+ return [deleteDefault()];
+ }
}
- else {
- return undefined;
+ function deleteVariableDeclarationOrPrefixWithUnderscore(identifier, varDecl) {
+ switch (varDecl.parent.parent.kind) {
+ case 214:
+ var forStatement = varDecl.parent.parent;
+ var forInitializer = forStatement.initializer;
+ return [forInitializer.declarations.length === 1 ? deleteNode(forInitializer) : deleteNodeInList(varDecl)];
+ case 216:
+ var forOfStatement = varDecl.parent.parent;
+ ts.Debug.assert(forOfStatement.initializer.kind === 227);
+ var forOfInitializer = forOfStatement.initializer;
+ return [
+ replaceNode(forOfInitializer.declarations[0], ts.createObjectLiteral()),
+ prefixIdentifierWithUnderscore(identifier)
+ ];
+ case 215:
+ return [prefixIdentifierWithUnderscore(identifier)];
+ default:
+ var variableStatement = varDecl.parent.parent;
+ if (variableStatement.declarationList.declarations.length === 1) {
+ return [deleteNode(variableStatement)];
+ }
+ else {
+ return [deleteNodeInList(varDecl)];
+ }
+ }
}
function deleteNode(n) {
return makeChange(ts.textChanges.ChangeTracker.fromCodeFixContext(context).deleteNode(sourceFile, n));
@@ -70018,10 +72561,10 @@ var ts;
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()
- }];
+ return {
+ description: ts.formatStringFromArgs(ts.getLocaleSpecificMessage(ts.Diagnostics.Remove_declaration_for_Colon_0), { 0: token.getText() }),
+ changes: changeTracker.getChanges()
+ };
}
}
});
@@ -70031,6 +72574,15 @@ var ts;
(function (ts) {
var codefix;
(function (codefix) {
+ codefix.registerCodeFix({
+ errorCodes: [
+ ts.Diagnostics.Cannot_find_name_0.code,
+ ts.Diagnostics.Cannot_find_name_0_Did_you_mean_1.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: getImportCodeActions
+ });
var ModuleSpecifierComparison;
(function (ModuleSpecifierComparison) {
ModuleSpecifierComparison[ModuleSpecifierComparison["Better"] = 0] = "Better";
@@ -70113,342 +72665,349 @@ var ts;
};
return ImportCodeActionMap;
}());
- codefix.registerCodeFix({
- 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();
- var allSourceFiles = context.program.getSourceFiles();
- var useCaseSensitiveFileNames = context.host.useCaseSensitiveFileNames ? context.host.useCaseSensitiveFileNames() : false;
- var token = ts.getTokenAtPosition(sourceFile, context.span.start);
- var name = token.getText();
- var symbolIdActionMap = new ImportCodeActionMap();
- 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)) {
- candidateModules.push(otherSourceFile.symbol);
- }
- }
- 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) {
- var localSymbol = ts.getLocalSymbolForExportDefault(defaultExport);
- if (localSymbol && localSymbol.name === name && checkSymbolHasMeaning(localSymbol, currentTokenMeaning)) {
- var symbolId = getUniqueSymbolId(localSymbol);
- symbolIdActionMap.addActions(symbolId, getCodeActionForImport(moduleSymbol, true));
- }
- }
- var exportSymbolWithIdenticalName = checker.tryGetMemberInModuleExports(name, moduleSymbol);
- if (exportSymbolWithIdenticalName && checkSymbolHasMeaning(exportSymbolWithIdenticalName, currentTokenMeaning)) {
- var symbolId = getUniqueSymbolId(exportSymbolWithIdenticalName);
- symbolIdActionMap.addActions(symbolId, getCodeActionForImport(moduleSymbol));
- }
- }
- return symbolIdActionMap.getAllActions();
- function getImportDeclarations(moduleSymbol) {
- var moduleSymbolId = getUniqueSymbolId(moduleSymbol);
- var cached = cachedImportDeclarations[moduleSymbolId];
- if (cached) {
- return cached;
+ function getImportCodeActions(context) {
+ var sourceFile = context.sourceFile;
+ var checker = context.program.getTypeChecker();
+ var allSourceFiles = context.program.getSourceFiles();
+ var useCaseSensitiveFileNames = context.host.useCaseSensitiveFileNames ? context.host.useCaseSensitiveFileNames() : false;
+ var token = ts.getTokenAtPosition(sourceFile, context.span.start, false);
+ var name = token.getText();
+ var symbolIdActionMap = new ImportCodeActionMap();
+ 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 umdSymbol = checker.getSymbolAtLocation(token);
+ var symbol = void 0;
+ var symbolName = void 0;
+ if (umdSymbol.flags & 8388608) {
+ symbol = checker.getAliasedSymbol(umdSymbol);
+ symbolName = name;
+ }
+ else if (ts.isJsxOpeningLikeElement(token.parent) && token.parent.tagName === token) {
+ symbol = checker.getAliasedSymbol(checker.resolveNameAtLocation(token, checker.getJsxNamespace(), 107455));
+ symbolName = symbol.name;
+ }
+ else {
+ ts.Debug.fail("Either the symbol or the JSX namespace should be a UMD global if we got here");
+ }
+ return getCodeActionForImport(symbol, symbolName, 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)) {
+ candidateModules.push(otherSourceFile.symbol);
+ }
+ }
+ 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) {
+ var localSymbol = ts.getLocalSymbolForExportDefault(defaultExport);
+ if (localSymbol && localSymbol.name === name && checkSymbolHasMeaning(localSymbol, currentTokenMeaning)) {
+ var symbolId = getUniqueSymbolId(localSymbol);
+ symbolIdActionMap.addActions(symbolId, getCodeActionForImport(moduleSymbol, name, true));
}
- var existingDeclarations = [];
- for (var _i = 0, _a = sourceFile.imports; _i < _a.length; _i++) {
- var importModuleSpecifier = _a[_i];
- var importSymbol = checker.getSymbolAtLocation(importModuleSpecifier);
- if (importSymbol === moduleSymbol) {
- existingDeclarations.push(getImportDeclaration(importModuleSpecifier));
- }
- }
- cachedImportDeclarations[moduleSymbolId] = existingDeclarations;
- return existingDeclarations;
- function getImportDeclaration(moduleSpecifier) {
- var node = moduleSpecifier;
- while (node) {
- if (node.kind === 238) {
- return node;
- }
- if (node.kind === 237) {
- return node;
- }
- node = node.parent;
- }
- return undefined;
+ }
+ var exportSymbolWithIdenticalName = checker.tryGetMemberInModuleExports(name, moduleSymbol);
+ if (exportSymbolWithIdenticalName && checkSymbolHasMeaning(exportSymbolWithIdenticalName, currentTokenMeaning)) {
+ var symbolId = getUniqueSymbolId(exportSymbolWithIdenticalName);
+ symbolIdActionMap.addActions(symbolId, getCodeActionForImport(moduleSymbol, name));
+ }
+ }
+ return symbolIdActionMap.getAllActions();
+ function getImportDeclarations(moduleSymbol) {
+ var moduleSymbolId = getUniqueSymbolId(moduleSymbol);
+ var cached = cachedImportDeclarations[moduleSymbolId];
+ if (cached) {
+ return cached;
+ }
+ var existingDeclarations = [];
+ for (var _i = 0, _a = sourceFile.imports; _i < _a.length; _i++) {
+ var importModuleSpecifier = _a[_i];
+ var importSymbol = checker.getSymbolAtLocation(importModuleSpecifier);
+ if (importSymbol === moduleSymbol) {
+ existingDeclarations.push(getImportDeclaration(importModuleSpecifier));
}
}
- function getUniqueSymbolId(symbol) {
- if (symbol.flags & 8388608) {
- return ts.getSymbolId(checker.getAliasedSymbol(symbol));
+ cachedImportDeclarations[moduleSymbolId] = existingDeclarations;
+ return existingDeclarations;
+ function getImportDeclaration(moduleSpecifier) {
+ var node = moduleSpecifier;
+ while (node) {
+ if (node.kind === 238) {
+ return node;
+ }
+ if (node.kind === 237) {
+ return node;
+ }
+ node = node.parent;
}
- return ts.getSymbolId(symbol);
+ return undefined;
}
- function checkSymbolHasMeaning(symbol, meaning) {
- var declarations = symbol.getDeclarations();
- return declarations ? ts.some(symbol.declarations, function (decl) { return !!(ts.getMeaningFromDeclaration(decl) & meaning); }) : false;
+ }
+ function getUniqueSymbolId(symbol) {
+ if (symbol.flags & 8388608) {
+ return ts.getSymbolId(checker.getAliasedSymbol(symbol));
}
- function getCodeActionForImport(moduleSymbol, isDefault, isNamespaceImport) {
- var existingDeclarations = getImportDeclarations(moduleSymbol);
- if (existingDeclarations.length > 0) {
- return getCodeActionsForExistingImport(existingDeclarations);
- }
- else {
- return [getCodeActionForNewImport()];
- }
- function getCodeActionsForExistingImport(declarations) {
- var actions = [];
- var namespaceImportDeclaration;
- var namedImportDeclaration;
- var existingModuleSpecifier;
- for (var _i = 0, declarations_14 = declarations; _i < declarations_14.length; _i++) {
- var declaration = declarations_14[_i];
- if (declaration.kind === 238) {
- var namedBindings = declaration.importClause && declaration.importClause.namedBindings;
- if (namedBindings && namedBindings.kind === 240) {
- namespaceImportDeclaration = declaration;
- }
- else {
- namedImportDeclaration = declaration;
- }
- existingModuleSpecifier = declaration.moduleSpecifier.getText();
+ return ts.getSymbolId(symbol);
+ }
+ function checkSymbolHasMeaning(symbol, meaning) {
+ var declarations = symbol.getDeclarations();
+ return declarations ? ts.some(symbol.declarations, function (decl) { return !!(ts.getMeaningFromDeclaration(decl) & meaning); }) : false;
+ }
+ function getCodeActionForImport(moduleSymbol, symbolName, isDefault, isNamespaceImport) {
+ var existingDeclarations = getImportDeclarations(moduleSymbol);
+ if (existingDeclarations.length > 0) {
+ return getCodeActionsForExistingImport(existingDeclarations);
+ }
+ else {
+ return [getCodeActionForNewImport()];
+ }
+ function getCodeActionsForExistingImport(declarations) {
+ var actions = [];
+ var namespaceImportDeclaration;
+ var namedImportDeclaration;
+ var existingModuleSpecifier;
+ for (var _i = 0, declarations_14 = declarations; _i < declarations_14.length; _i++) {
+ var declaration = declarations_14[_i];
+ if (declaration.kind === 238) {
+ var namedBindings = declaration.importClause && declaration.importClause.namedBindings;
+ if (namedBindings && namedBindings.kind === 240) {
+ namespaceImportDeclaration = declaration;
}
else {
- namespaceImportDeclaration = declaration;
- existingModuleSpecifier = getModuleSpecifierFromImportEqualsDeclaration(declaration);
+ namedImportDeclaration = declaration;
}
+ existingModuleSpecifier = declaration.moduleSpecifier.getText();
}
- if (namespaceImportDeclaration) {
- actions.push(getCodeActionForNamespaceImport(namespaceImportDeclaration));
+ else {
+ namespaceImportDeclaration = declaration;
+ existingModuleSpecifier = getModuleSpecifierFromImportEqualsDeclaration(declaration);
}
- if (!isNamespaceImport && namedImportDeclaration && namedImportDeclaration.importClause &&
- (namedImportDeclaration.importClause.name || namedImportDeclaration.importClause.namedBindings)) {
- 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], fileTextChanges, "InsertingIntoExistingImport", moduleSpecifierWithoutQuotes));
+ }
+ if (namespaceImportDeclaration) {
+ actions.push(getCodeActionForNamespaceImport(namespaceImportDeclaration));
+ }
+ if (!isNamespaceImport && namedImportDeclaration && namedImportDeclaration.importClause &&
+ (namedImportDeclaration.importClause.name || namedImportDeclaration.importClause.namedBindings)) {
+ 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], fileTextChanges, "InsertingIntoExistingImport", moduleSpecifierWithoutQuotes));
+ }
+ else {
+ actions.push(getCodeActionForNewImport(existingModuleSpecifier));
+ }
+ return actions;
+ function getModuleSpecifierFromImportEqualsDeclaration(declaration) {
+ if (declaration.moduleReference && declaration.moduleReference.kind === 248) {
+ return declaration.moduleReference.expression.getText();
}
- else {
- actions.push(getCodeActionForNewImport(existingModuleSpecifier));
+ return declaration.moduleReference.getText();
+ }
+ function getTextChangeForImportClause(importClause) {
+ var importList = importClause.namedBindings;
+ 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();
}
- return actions;
- function getModuleSpecifierFromImportEqualsDeclaration(declaration) {
- if (declaration.moduleReference && declaration.moduleReference.kind === 248) {
- return declaration.moduleReference.expression.getText();
- }
- return declaration.moduleReference.getText();
- }
- function getTextChangeForImportClause(importClause) {
- var importList = importClause.namedBindings;
- 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();
- }
- return createChangeTracker().insertNodeInListAfter(sourceFile, importList.elements[importList.elements.length - 1], newImportSpecifier).getChanges();
+ return createChangeTracker().insertNodeInListAfter(sourceFile, importList.elements[importList.elements.length - 1], newImportSpecifier).getChanges();
+ }
+ function getCodeActionForNamespaceImport(declaration) {
+ var namespacePrefix;
+ if (declaration.kind === 238) {
+ namespacePrefix = declaration.importClause.namedBindings.name.getText();
}
- function getCodeActionForNamespaceImport(declaration) {
- var namespacePrefix;
- if (declaration.kind === 238) {
- 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], createChangeTracker().replaceNode(sourceFile, token, ts.createPropertyAccess(ts.createIdentifier(namespacePrefix), name)).getChanges(), "CodeChange");
+ else {
+ namespacePrefix = declaration.name.getText();
}
+ namespacePrefix = ts.stripQuotes(namespacePrefix);
+ 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 (!lastImportDeclaration) {
- for (var i = sourceFile.statements.length - 1; i >= 0; i--) {
- var statement = sourceFile.statements[i];
- if (statement.kind === 237 || statement.kind === 238) {
- lastImportDeclaration = statement;
- break;
- }
+ }
+ function getCodeActionForNewImport(moduleSpecifier) {
+ if (!lastImportDeclaration) {
+ for (var i = sourceFile.statements.length - 1; i >= 0; i--) {
+ var statement = sourceFile.statements[i];
+ if (statement.kind === 237 || statement.kind === 238) {
+ lastImportDeclaration = statement;
+ break;
}
}
- var getCanonicalFileName = ts.createGetCanonicalFileName(useCaseSensitiveFileNames);
- var moduleSpecifierWithoutQuotes = ts.stripQuotes(moduleSpecifier || getModuleSpecifierForNewImport());
- 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 });
+ }
+ var getCanonicalFileName = ts.createGetCanonicalFileName(useCaseSensitiveFileNames);
+ var moduleSpecifierWithoutQuotes = ts.stripQuotes(moduleSpecifier || getModuleSpecifierForNewImport());
+ var changeTracker = createChangeTracker();
+ var importClause = isDefault
+ ? ts.createImportClause(ts.createIdentifier(symbolName), undefined)
+ : isNamespaceImport
+ ? ts.createImportClause(undefined, ts.createNamespaceImport(ts.createIdentifier(symbolName)))
+ : ts.createImportClause(undefined, ts.createNamedImports([ts.createImportSpecifier(undefined, ts.createIdentifier(symbolName))]));
+ 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, [symbolName, "\"" + moduleSpecifierWithoutQuotes + "\""], changeTracker.getChanges(), "NewImport", moduleSpecifierWithoutQuotes);
+ function getModuleSpecifierForNewImport() {
+ var fileName = sourceFile.fileName;
+ var moduleFileName = moduleSymbol.valueDeclaration.getSourceFile().fileName;
+ var sourceDirectory = ts.getDirectoryPath(fileName);
+ var options = context.program.getCompilerOptions();
+ return tryGetModuleNameFromAmbientModule() ||
+ tryGetModuleNameFromTypeRoots() ||
+ tryGetModuleNameAsNodeModule() ||
+ tryGetModuleNameFromBaseUrl() ||
+ tryGetModuleNameFromRootDirs() ||
+ ts.removeFileExtension(getRelativePath(moduleFileName, sourceDirectory));
+ function tryGetModuleNameFromAmbientModule() {
+ var decl = moduleSymbol.valueDeclaration;
+ if (ts.isModuleDeclaration(decl) && ts.isStringLiteral(decl.name)) {
+ return decl.name.text;
+ }
}
- return createCodeAction(ts.Diagnostics.Import_0_from_1, [name, "\"" + moduleSpecifierWithoutQuotes + "\""], changeTracker.getChanges(), "NewImport", moduleSpecifierWithoutQuotes);
- function getModuleSpecifierForNewImport() {
- var fileName = sourceFile.fileName;
- var moduleFileName = moduleSymbol.valueDeclaration.getSourceFile().fileName;
- var sourceDirectory = ts.getDirectoryPath(fileName);
- var options = context.program.getCompilerOptions();
- return tryGetModuleNameFromAmbientModule() ||
- tryGetModuleNameFromTypeRoots() ||
- tryGetModuleNameAsNodeModule() ||
- tryGetModuleNameFromBaseUrl() ||
- tryGetModuleNameFromRootDirs() ||
- ts.removeFileExtension(getRelativePath(moduleFileName, sourceDirectory));
- function tryGetModuleNameFromAmbientModule() {
- if (moduleSymbol.valueDeclaration.kind !== 265) {
- return moduleSymbol.name;
- }
+ function tryGetModuleNameFromBaseUrl() {
+ if (!options.baseUrl) {
+ return undefined;
}
- function tryGetModuleNameFromBaseUrl() {
- if (!options.baseUrl) {
- return undefined;
- }
- 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) {
- for (var _i = 0, _a = options.paths[key]; _i < _a.length; _i++) {
- var pattern = _a[_i];
- var indexOfStar = pattern.indexOf("*");
- if (indexOfStar === 0 && pattern.length === 1) {
- continue;
- }
- else if (indexOfStar !== -1) {
- var prefix = pattern.substr(0, indexOfStar);
- var suffix = pattern.substr(indexOfStar + 1);
- if (relativeName.length >= prefix.length + suffix.length &&
- ts.startsWith(relativeName, prefix) &&
- ts.endsWith(relativeName, suffix)) {
- var matchedStar = relativeName.substr(prefix.length, relativeName.length - suffix.length);
- return key.replace("\*", matchedStar);
- }
- }
- else if (pattern === relativeName || pattern === relativeNameWithIndex) {
- return key;
+ 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) {
+ for (var _i = 0, _a = options.paths[key]; _i < _a.length; _i++) {
+ var pattern = _a[_i];
+ var indexOfStar = pattern.indexOf("*");
+ if (indexOfStar === 0 && pattern.length === 1) {
+ continue;
+ }
+ else if (indexOfStar !== -1) {
+ var prefix = pattern.substr(0, indexOfStar);
+ var suffix = pattern.substr(indexOfStar + 1);
+ if (relativeName.length >= prefix.length + suffix.length &&
+ ts.startsWith(relativeName, prefix) &&
+ ts.endsWith(relativeName, suffix)) {
+ var matchedStar = relativeName.substr(prefix.length, relativeName.length - suffix.length);
+ return key.replace("\*", matchedStar);
}
}
+ else if (pattern === relativeName || pattern === relativeNameWithIndex) {
+ return key;
+ }
}
}
- return relativeName;
}
- function tryGetModuleNameFromRootDirs() {
- if (options.rootDirs) {
- 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);
- }
+ return relativeName;
+ }
+ function tryGetModuleNameFromRootDirs() {
+ if (options.rootDirs) {
+ 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);
}
- return undefined;
}
- function tryGetModuleNameFromTypeRoots() {
- var typeRoots = ts.getEffectiveTypeRoots(options, context.host);
- if (typeRoots) {
- var normalizedTypeRoots = ts.map(typeRoots, function (typeRoot) { return ts.toPath(typeRoot, undefined, getCanonicalFileName); });
- for (var _i = 0, normalizedTypeRoots_1 = normalizedTypeRoots; _i < normalizedTypeRoots_1.length; _i++) {
- var typeRoot = normalizedTypeRoots_1[_i];
- if (ts.startsWith(moduleFileName, typeRoot)) {
- var relativeFileName = moduleFileName.substring(typeRoot.length + 1);
- return removeExtensionAndIndexPostFix(relativeFileName);
- }
+ return undefined;
+ }
+ function tryGetModuleNameFromTypeRoots() {
+ var typeRoots = ts.getEffectiveTypeRoots(options, context.host);
+ if (typeRoots) {
+ var normalizedTypeRoots = ts.map(typeRoots, function (typeRoot) { return ts.toPath(typeRoot, undefined, getCanonicalFileName); });
+ for (var _i = 0, normalizedTypeRoots_1 = normalizedTypeRoots; _i < normalizedTypeRoots_1.length; _i++) {
+ var typeRoot = normalizedTypeRoots_1[_i];
+ if (ts.startsWith(moduleFileName, typeRoot)) {
+ var relativeFileName = moduleFileName.substring(typeRoot.length + 1);
+ return removeExtensionAndIndexPostFix(relativeFileName);
}
}
}
- function tryGetModuleNameAsNodeModule() {
- if (ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.NodeJs) {
- return undefined;
- }
- var indexOfNodeModules = moduleFileName.indexOf("node_modules");
- if (indexOfNodeModules < 0) {
- return undefined;
- }
- var relativeFileName;
- if (sourceDirectory.indexOf(moduleFileName.substring(0, indexOfNodeModules - 1)) === 0) {
- relativeFileName = moduleFileName.substring(indexOfNodeModules + 13);
- }
- else {
- relativeFileName = getRelativePath(moduleFileName, sourceDirectory);
- }
- relativeFileName = ts.removeFileExtension(relativeFileName);
- if (ts.endsWith(relativeFileName, "/index")) {
- relativeFileName = ts.getDirectoryPath(relativeFileName);
- }
- else {
- try {
- var moduleDirectory = ts.getDirectoryPath(moduleFileName);
- var packageJsonContent = JSON.parse(context.host.readFile(ts.combinePaths(moduleDirectory, "package.json")));
- if (packageJsonContent) {
- var mainFile = packageJsonContent.main || packageJsonContent.typings;
- if (mainFile) {
- var mainExportFile = ts.toPath(mainFile, moduleDirectory, getCanonicalFileName);
- if (ts.removeFileExtension(mainExportFile) === ts.removeFileExtension(moduleFileName)) {
- relativeFileName = ts.getDirectoryPath(relativeFileName);
- }
+ }
+ function tryGetModuleNameAsNodeModule() {
+ if (ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.NodeJs) {
+ return undefined;
+ }
+ var indexOfNodeModules = moduleFileName.indexOf("node_modules");
+ if (indexOfNodeModules < 0) {
+ return undefined;
+ }
+ var relativeFileName;
+ if (sourceDirectory.indexOf(moduleFileName.substring(0, indexOfNodeModules - 1)) === 0) {
+ relativeFileName = moduleFileName.substring(indexOfNodeModules + 13);
+ }
+ else {
+ relativeFileName = getRelativePath(moduleFileName, sourceDirectory);
+ }
+ relativeFileName = ts.removeFileExtension(relativeFileName);
+ if (ts.endsWith(relativeFileName, "/index")) {
+ relativeFileName = ts.getDirectoryPath(relativeFileName);
+ }
+ else {
+ try {
+ var moduleDirectory = ts.getDirectoryPath(moduleFileName);
+ var packageJsonContent = JSON.parse(context.host.readFile(ts.combinePaths(moduleDirectory, "package.json")));
+ if (packageJsonContent) {
+ var mainFile = packageJsonContent.main || packageJsonContent.typings;
+ if (mainFile) {
+ var mainExportFile = ts.toPath(mainFile, moduleDirectory, getCanonicalFileName);
+ if (ts.removeFileExtension(mainExportFile) === ts.removeFileExtension(moduleFileName)) {
+ relativeFileName = ts.getDirectoryPath(relativeFileName);
}
}
}
- catch (e) { }
}
- return relativeFileName;
+ catch (e) { }
}
+ return ts.getPackageNameFromAtTypesDirectory(relativeFileName);
}
- function getPathRelativeToRootDirs(path, rootDirs) {
- for (var _i = 0, rootDirs_2 = rootDirs; _i < rootDirs_2.length; _i++) {
- var rootDir = rootDirs_2[_i];
- var relativeName = getRelativePathIfInDirectory(path, rootDir);
- if (relativeName !== undefined) {
- return relativeName;
- }
- }
- return undefined;
- }
- function removeExtensionAndIndexPostFix(fileName) {
- fileName = ts.removeFileExtension(fileName);
- if (ts.endsWith(fileName, "/index")) {
- fileName = fileName.substr(0, fileName.length - 6);
+ }
+ function getPathRelativeToRootDirs(path, rootDirs) {
+ for (var _i = 0, rootDirs_2 = rootDirs; _i < rootDirs_2.length; _i++) {
+ var rootDir = rootDirs_2[_i];
+ var relativeName = getRelativePathIfInDirectory(path, rootDir);
+ if (relativeName !== undefined) {
+ return relativeName;
}
- 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;
+ return undefined;
+ }
+ function removeExtensionAndIndexPostFix(fileName) {
+ fileName = ts.removeFileExtension(fileName);
+ if (ts.endsWith(fileName, "/index")) {
+ fileName = fileName.substr(0, fileName.length - 6);
}
+ 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 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: changes,
- kind: kind,
- moduleSpecifier: 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: changes,
+ kind: kind,
+ moduleSpecifier: moduleSpecifier
+ };
+ }
+ }
})(codefix = ts.codefix || (ts.codefix = {}));
})(ts || (ts = {}));
var ts;
@@ -70470,7 +73029,7 @@ var ts;
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 token = ts.getTouchingToken(sourceFile, startPosition, false);
var tokenLeadingCommnets = ts.getLeadingCommentRangesOfNode(token, sourceFile);
if (!tokenLeadingCommnets || !tokenLeadingCommnets.length || tokenLeadingCommnets[0].pos >= startPosition) {
return {
@@ -70563,7 +73122,7 @@ var ts;
return undefined;
}
var declaration = declarations[0];
- var name = ts.getSynthesizedClone(declaration.name);
+ var name = ts.getSynthesizedClone(ts.getNameOfDeclaration(declaration));
var visibilityModifier = createVisibilityModifier(ts.getModifierFlags(declaration));
var modifiers = visibilityModifier ? ts.createNodeArray([visibilityModifier]) : undefined;
var type = checker.getWidenedType(checker.getTypeOfSymbolAtLocation(symbol, enclosingDeclaration));
@@ -70612,7 +73171,7 @@ var ts;
return undefined;
}
function signatureToMethodDeclaration(signature, enclosingDeclaration, body) {
- var signatureDeclaration = checker.signatureToSignatureDeclaration(signature, 151, enclosingDeclaration);
+ var signatureDeclaration = checker.signatureToSignatureDeclaration(signature, 151, enclosingDeclaration, ts.NodeBuilderFlags.SuppressAnyReturnType);
if (signatureDeclaration) {
signatureDeclaration.decorators = undefined;
signatureDeclaration.modifiers = modifiers;
@@ -70623,6 +73182,29 @@ var ts;
return signatureDeclaration;
}
}
+ function createMethodFromCallExpression(callExpression, methodName, includeTypeScriptSyntax, makeStatic) {
+ var parameters = createDummyParameters(callExpression.arguments.length, undefined, undefined, includeTypeScriptSyntax);
+ var typeParameters;
+ if (includeTypeScriptSyntax) {
+ var typeArgCount = ts.length(callExpression.typeArguments);
+ for (var i = 0; i < typeArgCount; i++) {
+ var name = typeArgCount < 8 ? String.fromCharCode(84 + i) : "T" + i;
+ var typeParameter = ts.createTypeParameterDeclaration(name, undefined, undefined);
+ (typeParameters ? typeParameters : typeParameters = []).push(typeParameter);
+ }
+ }
+ var newMethod = ts.createMethod(undefined, makeStatic ? [ts.createToken(115)] : undefined, undefined, methodName, undefined, typeParameters, parameters, includeTypeScriptSyntax ? ts.createKeywordTypeNode(119) : undefined, createStubbedMethodBody());
+ return newMethod;
+ }
+ codefix.createMethodFromCallExpression = createMethodFromCallExpression;
+ function createDummyParameters(argCount, names, minArgumentCount, addAnyType) {
+ var parameters = [];
+ for (var i = 0; i < argCount; i++) {
+ var newParameter = ts.createParameter(undefined, undefined, undefined, names && names[i] || "arg" + i, minArgumentCount !== undefined && i >= minArgumentCount ? ts.createToken(55) : undefined, addAnyType ? ts.createKeywordTypeNode(119) : undefined, undefined);
+ parameters.push(newParameter);
+ }
+ return parameters;
+ }
function createMethodImplementingSignatures(signatures, name, optional, modifiers) {
var maxArgsSignature = signatures[0];
var minArgumentCount = signatures[0].minArgumentCount;
@@ -70639,12 +73221,7 @@ var ts;
}
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(119);
- var newParameter = ts.createParameter(undefined, undefined, undefined, maxArgsParameterSymbolNames[i], i >= minArgumentCount ? ts.createToken(55) : undefined, anyType, undefined);
- parameters.push(newParameter);
- }
+ var parameters = createDummyParameters(maxNonRestArgs, maxArgsParameterSymbolNames, minArgumentCount, true);
if (someSigHasRestParameter) {
var anyArrayType = ts.createArrayTypeNode(ts.createKeywordTypeNode(119));
var restParameter = ts.createParameter(undefined, undefined, ts.createToken(24), maxArgsParameterSymbolNames[maxNonRestArgs] || "rest", maxNonRestArgs >= minArgumentCount ? ts.createToken(55) : undefined, anyArrayType, undefined);
@@ -70653,7 +73230,7 @@ var ts;
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(55) : undefined, typeParameters, parameters, returnType, createStubbedMethodBody());
+ return ts.createMethod(undefined, modifiers, undefined, name, optional ? ts.createToken(55) : undefined, typeParameters, parameters, returnType, createStubbedMethodBody());
}
codefix.createStubbedMethod = createStubbedMethod;
function createStubbedMethodBody() {
@@ -70672,9 +73249,190 @@ var ts;
})(ts || (ts = {}));
var ts;
(function (ts) {
+ var refactor;
+ (function (refactor) {
+ var actionName = "convert";
+ var convertFunctionToES6Class = {
+ name: "Convert to ES2015 class",
+ description: ts.Diagnostics.Convert_function_to_an_ES2015_class.message,
+ getEditsForAction: getEditsForAction,
+ getAvailableActions: getAvailableActions
+ };
+ refactor.registerRefactor(convertFunctionToES6Class);
+ function getAvailableActions(context) {
+ var start = context.startPosition;
+ var node = ts.getTokenAtPosition(context.file, start, false);
+ var checker = context.program.getTypeChecker();
+ var symbol = checker.getSymbolAtLocation(node);
+ if (symbol && ts.isDeclarationOfFunctionOrClassExpression(symbol)) {
+ symbol = symbol.valueDeclaration.initializer.symbol;
+ }
+ if (symbol && (symbol.flags & 16) && symbol.members && (symbol.members.size > 0)) {
+ return [
+ {
+ name: convertFunctionToES6Class.name,
+ description: convertFunctionToES6Class.description,
+ actions: [
+ {
+ description: convertFunctionToES6Class.description,
+ name: actionName
+ }
+ ]
+ }
+ ];
+ }
+ }
+ function getEditsForAction(context, action) {
+ if (actionName !== action) {
+ return undefined;
+ }
+ var start = context.startPosition;
+ var sourceFile = context.file;
+ var checker = context.program.getTypeChecker();
+ var token = ts.getTokenAtPosition(sourceFile, start, false);
+ var ctorSymbol = checker.getSymbolAtLocation(token);
+ var newLine = context.rulesProvider.getFormatOptions().newLineCharacter;
+ var deletedNodes = [];
+ var deletes = [];
+ if (!(ctorSymbol.flags & (16 | 3))) {
+ return undefined;
+ }
+ var ctorDeclaration = ctorSymbol.valueDeclaration;
+ var changeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context);
+ var precedingNode;
+ var newClassDeclaration;
+ switch (ctorDeclaration.kind) {
+ case 228:
+ precedingNode = ctorDeclaration;
+ deleteNode(ctorDeclaration);
+ newClassDeclaration = createClassFromFunctionDeclaration(ctorDeclaration);
+ break;
+ case 226:
+ precedingNode = ctorDeclaration.parent.parent;
+ if (ctorDeclaration.parent.declarations.length === 1) {
+ deleteNode(precedingNode);
+ }
+ else {
+ deleteNode(ctorDeclaration, true);
+ }
+ newClassDeclaration = createClassFromVariableDeclaration(ctorDeclaration);
+ break;
+ }
+ if (!newClassDeclaration) {
+ return undefined;
+ }
+ changeTracker.insertNodeAfter(sourceFile, precedingNode, newClassDeclaration, { suffix: newLine });
+ for (var _i = 0, deletes_1 = deletes; _i < deletes_1.length; _i++) {
+ var deleteCallback = deletes_1[_i];
+ deleteCallback();
+ }
+ return {
+ edits: changeTracker.getChanges()
+ };
+ function deleteNode(node, inList) {
+ if (inList === void 0) { inList = false; }
+ if (deletedNodes.some(function (n) { return ts.isNodeDescendantOf(node, n); })) {
+ return;
+ }
+ deletedNodes.push(node);
+ if (inList) {
+ deletes.push(function () { return changeTracker.deleteNodeInList(sourceFile, node); });
+ }
+ else {
+ deletes.push(function () { return changeTracker.deleteNode(sourceFile, node); });
+ }
+ }
+ function createClassElementsFromSymbol(symbol) {
+ var memberElements = [];
+ if (symbol.members) {
+ symbol.members.forEach(function (member) {
+ var memberElement = createClassElement(member, undefined);
+ if (memberElement) {
+ memberElements.push(memberElement);
+ }
+ });
+ }
+ if (symbol.exports) {
+ symbol.exports.forEach(function (member) {
+ var memberElement = createClassElement(member, [ts.createToken(115)]);
+ if (memberElement) {
+ memberElements.push(memberElement);
+ }
+ });
+ }
+ return memberElements;
+ function shouldConvertDeclaration(_target, source) {
+ return ts.isFunctionLike(source);
+ }
+ function createClassElement(symbol, modifiers) {
+ if (!(symbol.flags & 4)) {
+ return;
+ }
+ var memberDeclaration = symbol.valueDeclaration;
+ var assignmentBinaryExpression = memberDeclaration.parent;
+ if (!shouldConvertDeclaration(memberDeclaration, assignmentBinaryExpression.right)) {
+ return;
+ }
+ var nodeToDelete = assignmentBinaryExpression.parent && assignmentBinaryExpression.parent.kind === 210
+ ? assignmentBinaryExpression.parent : assignmentBinaryExpression;
+ deleteNode(nodeToDelete);
+ if (!assignmentBinaryExpression.right) {
+ return ts.createProperty([], modifiers, symbol.name, undefined, undefined, undefined);
+ }
+ switch (assignmentBinaryExpression.right.kind) {
+ case 186:
+ var functionExpression = assignmentBinaryExpression.right;
+ return ts.createMethod(undefined, modifiers, undefined, memberDeclaration.name, undefined, undefined, functionExpression.parameters, undefined, functionExpression.body);
+ case 187:
+ var arrowFunction = assignmentBinaryExpression.right;
+ var arrowFunctionBody = arrowFunction.body;
+ var bodyBlock = void 0;
+ if (arrowFunctionBody.kind === 207) {
+ bodyBlock = arrowFunctionBody;
+ }
+ else {
+ var expression = arrowFunctionBody;
+ bodyBlock = ts.createBlock([ts.createReturn(expression)]);
+ }
+ return ts.createMethod(undefined, modifiers, undefined, memberDeclaration.name, undefined, undefined, arrowFunction.parameters, undefined, bodyBlock);
+ default:
+ if (ts.isSourceFileJavaScript(sourceFile)) {
+ return;
+ }
+ return ts.createProperty(undefined, modifiers, memberDeclaration.name, undefined, undefined, assignmentBinaryExpression.right);
+ }
+ }
+ }
+ function createClassFromVariableDeclaration(node) {
+ var initializer = node.initializer;
+ if (!initializer || initializer.kind !== 186) {
+ return undefined;
+ }
+ if (node.name.kind !== 71) {
+ return undefined;
+ }
+ var memberElements = createClassElementsFromSymbol(initializer.symbol);
+ if (initializer.body) {
+ memberElements.unshift(ts.createConstructor(undefined, undefined, initializer.parameters, initializer.body));
+ }
+ return ts.createClassDeclaration(undefined, undefined, node.name, undefined, undefined, memberElements);
+ }
+ function createClassFromFunctionDeclaration(node) {
+ var memberElements = createClassElementsFromSymbol(ctorSymbol);
+ if (node.body) {
+ memberElements.unshift(ts.createConstructor(undefined, undefined, node.parameters, node.body));
+ }
+ return ts.createClassDeclaration(undefined, undefined, node.name, undefined, undefined, memberElements);
+ }
+ }
+ })(refactor = ts.refactor || (ts.refactor = {}));
+})(ts || (ts = {}));
+var ts;
+(function (ts) {
ts.servicesVersion = "0.5";
+ var ruleProvider;
function createNode(kind, pos, end, parent) {
- var node = kind >= 143 ? new NodeObject(kind, pos, end) :
+ var node = ts.isNodeKind(kind) ? new NodeObject(kind, pos, end) :
kind === 71 ? new IdentifierObject(71, pos, end) :
new TokenObject(kind, pos, end);
node.parent = parent;
@@ -70719,10 +73477,11 @@ var ts;
}
return sourceFile.text.substring(this.getStart(sourceFile), this.getEnd());
};
- NodeObject.prototype.addSyntheticNodes = function (nodes, pos, end, useJSDocScanner) {
+ NodeObject.prototype.addSyntheticNodes = function (nodes, pos, end) {
ts.scanner.setTextPos(pos);
while (pos < end) {
- var token = useJSDocScanner ? ts.scanner.scanJSDocToken() : ts.scanner.scan();
+ var token = ts.scanner.scan();
+ ts.Debug.assert(token !== 1);
var textPos = ts.scanner.getTextPos();
if (textPos <= end) {
nodes.push(createNode(token, pos, textPos, this));
@@ -70732,7 +73491,7 @@ var ts;
return pos;
};
NodeObject.prototype.createSyntaxList = function (nodes) {
- var list = createNode(294, nodes.pos, nodes.end, this);
+ var list = createNode(295, nodes.pos, nodes.end, this);
list._children = [];
var pos = nodes.pos;
for (var _i = 0, nodes_9 = nodes; _i < nodes_9.length; _i++) {
@@ -70750,43 +73509,44 @@ var ts;
};
NodeObject.prototype.createChildren = function (sourceFile) {
var _this = this;
- var children;
- if (this.kind >= 143) {
- ts.scanner.setText((sourceFile || this.getSourceFile()).text);
- children = [];
- var pos_3 = this.pos;
- var useJSDocScanner_1 = this.kind >= 283 && this.kind <= 293;
- var processNode = function (node) {
- var isJSDocTagNode = ts.isJSDocTag(node);
- if (!isJSDocTagNode && pos_3 < node.pos) {
- pos_3 = _this.addSyntheticNodes(children, pos_3, node.pos, useJSDocScanner_1);
- }
- children.push(node);
- if (!isJSDocTagNode) {
- pos_3 = node.end;
- }
- };
- var processNodes = function (nodes) {
- if (pos_3 < nodes.pos) {
- pos_3 = _this.addSyntheticNodes(children, pos_3, nodes.pos, useJSDocScanner_1);
- }
- children.push(_this.createSyntaxList(nodes));
- pos_3 = nodes.end;
- };
- if (this.jsDoc) {
- for (var _i = 0, _a = this.jsDoc; _i < _a.length; _i++) {
- var jsDocComment = _a[_i];
- processNode(jsDocComment);
- }
+ if (!ts.isNodeKind(this.kind)) {
+ this._children = ts.emptyArray;
+ return;
+ }
+ if (ts.isJSDocCommentContainingNode(this)) {
+ var children_3 = [];
+ this.forEachChild(function (child) { children_3.push(child); });
+ this._children = children_3;
+ return;
+ }
+ var children = [];
+ ts.scanner.setText((sourceFile || this.getSourceFile()).text);
+ var pos = this.pos;
+ var processNode = function (node) {
+ pos = _this.addSyntheticNodes(children, pos, node.pos);
+ children.push(node);
+ pos = node.end;
+ };
+ var processNodes = function (nodes) {
+ if (pos < nodes.pos) {
+ pos = _this.addSyntheticNodes(children, pos, nodes.pos);
}
- pos_3 = this.pos;
- ts.forEachChild(this, processNode, processNodes);
- if (pos_3 < this.end) {
- this.addSyntheticNodes(children, pos_3, this.end);
+ children.push(_this.createSyntaxList(nodes));
+ pos = nodes.end;
+ };
+ if (this.jsDoc) {
+ for (var _i = 0, _a = this.jsDoc; _i < _a.length; _i++) {
+ var jsDocComment = _a[_i];
+ processNode(jsDocComment);
}
- ts.scanner.setText(undefined);
}
- this._children = children || ts.emptyArray;
+ pos = this.pos;
+ ts.forEachChild(this, processNode, processNodes);
+ if (pos < this.end) {
+ this.addSyntheticNodes(children, pos, this.end);
+ }
+ ts.scanner.setText(undefined);
+ this._children = children;
};
NodeObject.prototype.getChildCount = function (sourceFile) {
if (!this._children)
@@ -70808,7 +73568,7 @@ var ts;
if (!children.length) {
return undefined;
}
- var child = ts.find(children, function (kid) { return kid.kind < 267 || kid.kind > 293; });
+ var child = ts.find(children, function (kid) { return kid.kind < 267 || kid.kind > 294; });
return child.kind < 143 ?
child :
child.getFirstToken(sourceFile);
@@ -71051,13 +73811,14 @@ var ts;
return declarations;
}
function getDeclarationName(declaration) {
- if (declaration.name) {
- var result_7 = getTextOfIdentifierOrLiteral(declaration.name);
- if (result_7 !== undefined) {
- return result_7;
+ var name = ts.getNameOfDeclaration(declaration);
+ if (name) {
+ var result_8 = getTextOfIdentifierOrLiteral(name);
+ if (result_8 !== undefined) {
+ return result_8;
}
- if (declaration.name.kind === 144) {
- var expr = declaration.name.expression;
+ if (name.kind === 144) {
+ var expr = name.expression;
if (expr.kind === 179) {
return expr.name.text;
}
@@ -71127,8 +73888,9 @@ var ts;
ts.forEachChild(decl.name, visit);
break;
}
- if (decl.initializer)
+ if (decl.initializer) {
visit(decl.initializer);
+ }
}
case 264:
case 149:
@@ -71163,6 +73925,17 @@ var ts;
};
return SourceFileObject;
}(NodeObject));
+ var SourceMapSourceObject = (function () {
+ function SourceMapSourceObject(fileName, text, skipTrivia) {
+ this.fileName = fileName;
+ this.text = text;
+ this.skipTrivia = skipTrivia;
+ }
+ SourceMapSourceObject.prototype.getLineAndCharacterOfPosition = function (pos) {
+ return ts.getLineAndCharacterOfPosition(this, pos);
+ };
+ return SourceMapSourceObject;
+ }());
function getServicesObjectAllocator() {
return {
getNodeConstructor: function () { return NodeObject; },
@@ -71172,6 +73945,7 @@ var ts;
getSymbolConstructor: function () { return SymbolObject; },
getTypeConstructor: function () { return TypeObject; },
getSignatureConstructor: function () { return SignatureObject; },
+ getSourceMapSourceConstructor: function () { return SourceMapSourceObject; },
};
}
function toEditorSettings(optionsAsMap) {
@@ -71219,7 +73993,6 @@ var ts;
var HostCache = (function () {
function HostCache(host, getCanonicalFileName) {
this.host = host;
- this.getCanonicalFileName = getCanonicalFileName;
this.currentDirectory = host.getCurrentDirectory();
this.fileNameToEntry = ts.createFileMap();
var rootFileNames = host.getScriptFileNames();
@@ -71246,19 +74019,15 @@ var ts;
this.fileNameToEntry.set(path, entry);
return entry;
};
- HostCache.prototype.getEntry = function (path) {
+ HostCache.prototype.getEntryByPath = function (path) {
return this.fileNameToEntry.get(path);
};
- HostCache.prototype.contains = function (path) {
+ HostCache.prototype.containsEntryByPath = function (path) {
return this.fileNameToEntry.contains(path);
};
- HostCache.prototype.getOrCreateEntry = function (fileName) {
- var path = ts.toPath(fileName, this.currentDirectory, this.getCanonicalFileName);
- return this.getOrCreateEntryByPath(fileName, path);
- };
HostCache.prototype.getOrCreateEntryByPath = function (fileName, path) {
- return this.contains(path)
- ? this.getEntry(path)
+ return this.containsEntryByPath(path)
+ ? this.getEntryByPath(path)
: this.createEntry(fileName, path);
};
HostCache.prototype.getRootFileNames = function () {
@@ -71271,11 +74040,11 @@ var ts;
return fileNames;
};
HostCache.prototype.getVersion = function (path) {
- var file = this.getEntry(path);
+ var file = this.getEntryByPath(path);
return file && file.version;
};
HostCache.prototype.getScriptSnapshot = function (path) {
- var file = this.getEntry(path);
+ var file = this.getEntryByPath(path);
return file && file.scriptSnapshot;
};
return HostCache;
@@ -71400,7 +74169,7 @@ var ts;
function createLanguageService(host, documentRegistry) {
if (documentRegistry === void 0) { documentRegistry = ts.createDocumentRegistry(host.useCaseSensitiveFileNames && host.useCaseSensitiveFileNames(), host.getCurrentDirectory()); }
var syntaxTreeCache = new SyntaxTreeCache(host);
- var ruleProvider;
+ ruleProvider = ruleProvider || new ts.formatting.RulesProvider();
var program;
var lastProjectVersion;
var lastTypesRootVersion = 0;
@@ -71424,9 +74193,6 @@ var ts;
return sourceFile;
}
function getRuleProvider(options) {
- if (!ruleProvider) {
- ruleProvider = new ts.formatting.RulesProvider();
- }
ruleProvider.ensureUpToDate(options);
return ruleProvider;
}
@@ -71473,11 +74239,18 @@ var ts;
writeFile: ts.noop,
getCurrentDirectory: function () { return currentDirectory; },
fileExists: function (fileName) {
- return hostCache.getOrCreateEntry(fileName) !== undefined;
+ var path = ts.toPath(fileName, currentDirectory, getCanonicalFileName);
+ return hostCache.containsEntryByPath(path) ?
+ !!hostCache.getEntryByPath(path) :
+ (host.fileExists && host.fileExists(fileName));
},
readFile: function (fileName) {
- var entry = hostCache.getOrCreateEntry(fileName);
- return entry && entry.scriptSnapshot.getText(0, entry.scriptSnapshot.getLength());
+ var path = ts.toPath(fileName, currentDirectory, getCanonicalFileName);
+ if (hostCache.containsEntryByPath(path)) {
+ var entry = hostCache.getEntryByPath(path);
+ return entry && entry.scriptSnapshot.getText(0, entry.scriptSnapshot.getLength());
+ }
+ return host.readFile && host.readFile(fileName);
},
directoryExists: function (directoryName) {
return ts.directoryProbablyExists(directoryName, host);
@@ -71567,7 +74340,9 @@ var ts;
ts.forEach(program.getSourceFiles(), function (f) {
return documentRegistry.releaseDocument(f.fileName, program.getCompilerOptions());
});
+ program = undefined;
}
+ host = undefined;
}
function getSyntacticDiagnostics(fileName) {
synchronizeHostData();
@@ -71602,7 +74377,7 @@ var ts;
function getQuickInfoAtPosition(fileName, position) {
synchronizeHostData();
var sourceFile = getValidSourceFile(fileName);
- var node = ts.getTouchingPropertyName(sourceFile, position);
+ var node = ts.getTouchingPropertyName(sourceFile, position, true);
if (node === sourceFile) {
return undefined;
}
@@ -71653,7 +74428,7 @@ var ts;
}
function getImplementationAtPosition(fileName, position) {
synchronizeHostData();
- return ts.FindAllReferences.getImplementationsAtPosition(program.getTypeChecker(), cancellationToken, program.getSourceFiles(), getValidSourceFile(fileName), position);
+ return ts.FindAllReferences.getImplementationsAtPosition(program, cancellationToken, program.getSourceFiles(), getValidSourceFile(fileName), position);
}
function getOccurrencesAtPosition(fileName, position) {
var results = getOccurrencesAtPositionCore(fileName, position);
@@ -71667,7 +74442,7 @@ var ts;
synchronizeHostData();
var sourceFilesToSearch = ts.map(filesToSearch, function (f) { return program.getSourceFile(f); });
var sourceFile = getValidSourceFile(fileName);
- return ts.DocumentHighlights.getDocumentHighlights(program.getTypeChecker(), cancellationToken, sourceFile, position, sourceFilesToSearch);
+ return ts.DocumentHighlights.getDocumentHighlights(program, cancellationToken, sourceFile, position, sourceFilesToSearch);
}
function getOccurrencesAtPositionCore(fileName, position) {
return convertDocumentHighlights(getDocumentHighlights(fileName, position, [fileName]));
@@ -71700,11 +74475,11 @@ var ts;
}
function getReferences(fileName, position, options) {
synchronizeHostData();
- return ts.FindAllReferences.findReferencedEntries(program.getTypeChecker(), cancellationToken, program.getSourceFiles(), getValidSourceFile(fileName), position, options);
+ return ts.FindAllReferences.findReferencedEntries(program, cancellationToken, program.getSourceFiles(), getValidSourceFile(fileName), position, options);
}
function findReferences(fileName, position) {
synchronizeHostData();
- return ts.FindAllReferences.findReferencedSymbols(program.getTypeChecker(), cancellationToken, program.getSourceFiles(), getValidSourceFile(fileName), position);
+ return ts.FindAllReferences.findReferencedSymbols(program, cancellationToken, program.getSourceFiles(), getValidSourceFile(fileName), position);
}
function getNavigateToItems(searchValue, maxResultCount, fileName, excludeDtsFiles) {
synchronizeHostData();
@@ -71742,7 +74517,7 @@ var ts;
}
function getNameOrDottedNameSpan(fileName, startPos, _endPos) {
var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName);
- var node = ts.getTouchingPropertyName(sourceFile, startPos);
+ var node = ts.getTouchingPropertyName(sourceFile, startPos, false);
if (node === sourceFile) {
return;
}
@@ -71822,7 +74597,7 @@ var ts;
function getBraceMatchingAtPosition(fileName, position) {
var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName);
var result = [];
- var token = ts.getTouchingToken(sourceFile, position);
+ var token = ts.getTouchingToken(sourceFile, position, false);
if (token.getStart(sourceFile) === position) {
var matchKind = getMatchingTokenKind(token);
if (matchKind) {
@@ -71952,8 +74727,7 @@ var ts;
ts.Debug.assert(matchArray.length === descriptors.length + firstDescriptorCaptureIndex);
var preamble = matchArray[1];
var matchPosition = matchArray.index + preamble.length;
- var token = ts.getTokenAtPosition(sourceFile, matchPosition);
- if (!ts.isInsideComment(sourceFile, token, matchPosition)) {
+ if (!ts.isInComment(sourceFile, matchPosition)) {
continue;
}
var descriptor = undefined;
@@ -72001,6 +74775,28 @@ var ts;
var defaultLibFileName = host.getDefaultLibFileName(host.getCompilationSettings());
return ts.Rename.getRenameInfo(program.getTypeChecker(), defaultLibFileName, getCanonicalFileName, getValidSourceFile(fileName), position);
}
+ function getRefactorContext(file, positionOrRange, formatOptions) {
+ var _a = typeof positionOrRange === "number" ? [positionOrRange, undefined] : [positionOrRange.pos, positionOrRange.end], startPosition = _a[0], endPosition = _a[1];
+ return {
+ file: file,
+ startPosition: startPosition,
+ endPosition: endPosition,
+ program: getProgram(),
+ newLineCharacter: host.getNewLine(),
+ rulesProvider: getRuleProvider(formatOptions),
+ cancellationToken: cancellationToken
+ };
+ }
+ function getApplicableRefactors(fileName, positionOrRange) {
+ synchronizeHostData();
+ var file = getValidSourceFile(fileName);
+ return ts.refactor.getApplicableRefactors(getRefactorContext(file, positionOrRange));
+ }
+ function getEditsForRefactor(fileName, formatOptions, positionOrRange, refactorName, actionName) {
+ synchronizeHostData();
+ var file = getValidSourceFile(fileName);
+ return ts.refactor.getEditsForRefactor(getRefactorContext(file, positionOrRange, formatOptions), refactorName, actionName);
+ }
return {
dispose: dispose,
cleanupSemanticCache: cleanupSemanticCache,
@@ -72043,7 +74839,9 @@ var ts;
getEmitOutput: getEmitOutput,
getNonBoundSourceFile: getNonBoundSourceFile,
getSourceFile: getSourceFile,
- getProgram: getProgram
+ getProgram: getProgram,
+ getApplicableRefactors: getApplicableRefactors,
+ getEditsForRefactor: getEditsForRefactor,
};
}
ts.createLanguageService = createLanguageService;
@@ -72119,20 +74917,20 @@ var ts;
var contextualType = typeChecker.getContextualType(objectLiteral);
var name = ts.getTextOfPropertyName(node.name);
if (name && contextualType) {
- var result_8 = [];
+ var result_9 = [];
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);
+ result_9.push(symbol);
}
});
- return result_8;
+ return result_9;
}
if (symbol) {
- result_8.push(symbol);
- return result_8;
+ result_9.push(symbol);
+ return result_9;
}
}
return undefined;
@@ -72168,6 +74966,7 @@ var ts;
Arguments.LogFile = "--logFile";
Arguments.EnableTelemetry = "--enableTelemetry";
Arguments.TypingSafeListLocation = "--typingSafeListLocation";
+ Arguments.NpmLocation = "--npmLocation";
})(Arguments = server.Arguments || (server.Arguments = {}));
function hasArgument(argumentName) {
return ts.sys.args.indexOf(argumentName) >= 0;
@@ -72331,6 +75130,37 @@ var ts;
return arr;
}
server.toSortedReadonlyArray = toSortedReadonlyArray;
+ function enumerateInsertsAndDeletes(a, b, inserted, deleted, compare) {
+ compare = compare || ts.compareValues;
+ var aIndex = 0;
+ var bIndex = 0;
+ var aLen = a.length;
+ var bLen = b.length;
+ while (aIndex < aLen && bIndex < bLen) {
+ var aItem = a[aIndex];
+ var bItem = b[bIndex];
+ var compareResult = compare(aItem, bItem);
+ if (compareResult === -1) {
+ inserted(aItem);
+ aIndex++;
+ }
+ else if (compareResult === 1) {
+ deleted(bItem);
+ bIndex++;
+ }
+ else {
+ aIndex++;
+ bIndex++;
+ }
+ }
+ while (aIndex < aLen) {
+ inserted(a[aIndex++]);
+ }
+ while (bIndex < bLen) {
+ deleted(b[bIndex++]);
+ }
+ }
+ server.enumerateInsertsAndDeletes = enumerateInsertsAndDeletes;
var ThrottledOperations = (function () {
function ThrottledOperations(host) {
this.host = host;
@@ -72517,6 +75347,11 @@ var ts;
CommandNames.GetCodeFixes = "getCodeFixes";
CommandNames.GetCodeFixesFull = "getCodeFixes-full";
CommandNames.GetSupportedCodeFixes = "getSupportedCodeFixes";
+ CommandNames.GetApplicableRefactors = "getApplicableRefactors";
+ CommandNames.GetRefactorCodeActions = "getRefactorCodeActions";
+ CommandNames.GetRefactorCodeActionsFull = "getRefactorCodeActions-full";
+ CommandNames.GetEditsForRefactor = "getEditsForRefactor";
+ CommandNames.GetEditsForRefactorFull = "getEditsForRefactor-full";
})(CommandNames = server.CommandNames || (server.CommandNames = {}));
function formatMessage(msg, logger, byteLength, newLine) {
var verboseLogging = logger.hasLevel(server.LogLevel.verbose);
@@ -72610,7 +75445,7 @@ var ts;
return MultistepOperation;
}());
var Session = (function () {
- function Session(optsOrArg) {
+ function Session(opts) {
var _this = this;
this.changeSeq = 0;
this.handlers = ts.createMapFromTemplate((_a = {},
@@ -72850,25 +75685,16 @@ var ts;
_a[CommandNames.GetSupportedCodeFixes] = function () {
return _this.requiredResponse(_this.getSupportedCodeFixes());
},
+ _a[CommandNames.GetApplicableRefactors] = function (request) {
+ return _this.requiredResponse(_this.getApplicableRefactors(request.arguments));
+ },
+ _a[CommandNames.GetEditsForRefactor] = function (request) {
+ return _this.requiredResponse(_this.getEditsForRefactor(request.arguments, true));
+ },
+ _a[CommandNames.GetEditsForRefactorFull] = function (request) {
+ return _this.requiredResponse(_this.getEditsForRefactor(request.arguments, false));
+ },
_a));
- var opts;
- if (arguments.length === 1) {
- opts = optsOrArg;
- }
- else {
- opts = {
- host: arguments[0],
- cancellationToken: arguments[1],
- useSingleInferredProject: arguments[2],
- typingsInstaller: arguments[3],
- byteLength: arguments[4],
- hrtime: arguments[5],
- logger: arguments[6],
- canUseEvents: arguments[7],
- eventHandler: arguments[8],
- throttleWaitMilliseconds: arguments[9]
- };
- }
this.host = opts.host;
this.cancellationToken = opts.cancellationToken;
this.typingsInstaller = opts.typingsInstaller;
@@ -72898,7 +75724,8 @@ var ts;
throttleWaitMilliseconds: throttleWaitMilliseconds,
eventHandler: this.eventHandler,
globalPlugins: opts.globalPlugins,
- pluginProbeLocations: opts.pluginProbeLocations
+ pluginProbeLocations: opts.pluginProbeLocations,
+ allowLocalPluginLoads: opts.allowLocalPluginLoads
};
this.projectService = new server.ProjectService(settings);
this.gcTimer = new server.GcTimer(this.host, 7000, this.logger);
@@ -72925,13 +75752,22 @@ var ts;
var _b = event.data, triggerFile = _b.triggerFile, configFileName = _b.configFileName, diagnostics = _b.diagnostics;
this.configFileDiagnosticEvent(triggerFile, configFileName, diagnostics);
break;
- case server.ProjectLanguageServiceStateEvent:
+ case server.ProjectLanguageServiceStateEvent: {
var eventName = "projectLanguageServiceState";
this.event({
projectName: event.data.project.getProjectName(),
languageServiceEnabled: event.data.languageServiceEnabled
}, eventName);
break;
+ }
+ case server.ProjectInfoTelemetryEvent: {
+ var eventName = "telemetry";
+ this.event({
+ telemetryEventName: event.eventName,
+ payload: event.data,
+ }, eventName);
+ break;
+ }
}
};
Session.prototype.logError = function (err, cmd) {
@@ -73834,6 +76670,58 @@ var ts;
Session.prototype.getSupportedCodeFixes = function () {
return ts.getSupportedCodeFixes();
};
+ Session.prototype.isLocation = function (locationOrSpan) {
+ return locationOrSpan.line !== undefined;
+ };
+ Session.prototype.extractPositionAndRange = function (args, scriptInfo) {
+ var position = undefined;
+ var textRange;
+ if (this.isLocation(args)) {
+ position = getPosition(args);
+ }
+ else {
+ var _a = this.getStartAndEndPosition(args, scriptInfo), startPosition = _a.startPosition, endPosition = _a.endPosition;
+ textRange = { pos: startPosition, end: endPosition };
+ }
+ return { position: position, textRange: textRange };
+ function getPosition(loc) {
+ return loc.position !== undefined ? loc.position : scriptInfo.lineOffsetToPosition(loc.line, loc.offset);
+ }
+ };
+ Session.prototype.getApplicableRefactors = function (args) {
+ var _a = this.getFileAndProjectWithoutRefreshingInferredProjects(args), file = _a.file, project = _a.project;
+ var scriptInfo = project.getScriptInfoForNormalizedPath(file);
+ var _b = this.extractPositionAndRange(args, scriptInfo), position = _b.position, textRange = _b.textRange;
+ return project.getLanguageService().getApplicableRefactors(file, position || textRange);
+ };
+ Session.prototype.getEditsForRefactor = function (args, simplifiedResult) {
+ var _this = this;
+ var _a = this.getFileAndProjectWithoutRefreshingInferredProjects(args), file = _a.file, project = _a.project;
+ var scriptInfo = project.getScriptInfoForNormalizedPath(file);
+ var _b = this.extractPositionAndRange(args, scriptInfo), position = _b.position, textRange = _b.textRange;
+ var result = project.getLanguageService().getEditsForRefactor(file, this.projectService.getFormatCodeOptions(), position || textRange, args.refactor, args.action);
+ if (result === undefined) {
+ return {
+ edits: []
+ };
+ }
+ if (simplifiedResult) {
+ var file_2 = result.renameFilename;
+ var location = undefined;
+ if (file_2 !== undefined && result.renameLocation !== undefined) {
+ var renameScriptInfo = project.getScriptInfoForNormalizedPath(server.toNormalizedPath(file_2));
+ location = renameScriptInfo.positionToLineOffset(result.renameLocation);
+ }
+ return {
+ renameLocation: location,
+ renameFilename: file_2,
+ edits: result.edits.map(function (change) { return _this.mapTextChangesToCodeEdits(project, change); })
+ };
+ }
+ else {
+ return result;
+ }
+ };
Session.prototype.getCodeFixes = function (args, simplifiedResult) {
var _this = this;
if (args.errorCodes.length === 0) {
@@ -73841,8 +76729,7 @@ var ts;
}
var _a = this.getFileAndProjectWithoutRefreshingInferredProjects(args), file = _a.file, project = _a.project;
var scriptInfo = project.getScriptInfoForNormalizedPath(file);
- var startPosition = getStartPosition();
- var endPosition = getEndPosition();
+ var _b = this.getStartAndEndPosition(args, scriptInfo), startPosition = _b.startPosition, endPosition = _b.endPosition;
var formatOptions = this.projectService.getFormatCodeOptions(file);
var codeActions = project.getLanguageService().getCodeFixesAtPosition(file, startPosition, endPosition, args.errorCodes, formatOptions);
if (!codeActions) {
@@ -73854,12 +76741,24 @@ var ts;
else {
return codeActions;
}
- function getStartPosition() {
- return args.startPosition !== undefined ? args.startPosition : scriptInfo.lineOffsetToPosition(args.startLine, args.startOffset);
+ };
+ Session.prototype.getStartAndEndPosition = function (args, scriptInfo) {
+ var startPosition = undefined, endPosition = undefined;
+ if (args.startPosition !== undefined) {
+ startPosition = args.startPosition;
}
- function getEndPosition() {
- return args.endPosition !== undefined ? args.endPosition : scriptInfo.lineOffsetToPosition(args.endLine, args.endOffset);
+ else {
+ startPosition = scriptInfo.lineOffsetToPosition(args.startLine, args.startOffset);
+ args.startPosition = startPosition;
+ }
+ if (args.endPosition !== undefined) {
+ endPosition = args.endPosition;
+ }
+ else {
+ endPosition = scriptInfo.lineOffsetToPosition(args.endLine, args.endOffset);
+ args.endPosition = endPosition;
}
+ return { startPosition: startPosition, endPosition: endPosition };
};
Session.prototype.mapCodeAction = function (codeAction, scriptInfo) {
var _this = this;
@@ -73871,6 +76770,14 @@ var ts;
}); })
};
};
+ Session.prototype.mapTextChangesToCodeEdits = function (project, textChanges) {
+ var _this = this;
+ var scriptInfo = project.getScriptInfoForNormalizedPath(server.toNormalizedPath(textChanges.fileName));
+ return {
+ fileName: textChanges.fileName,
+ textChanges: textChanges.textChanges.map(function (textChange) { return _this.convertTextChangeToCodeEdit(textChange, scriptInfo); })
+ };
+ };
Session.prototype.convertTextChangeToCodeEdit = function (change, scriptInfo) {
return {
start: scriptInfo.positionToLineOffset(change.span.start),
@@ -73905,18 +76812,22 @@ 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.isScriptOpen()) {
- if (fileNameInProject.indexOf(".d.ts") > 0)
+ if (fileNameInProject.indexOf(".d.ts") > 0) {
veryLowPriorityFiles.push(fileNameInProject);
- else
+ }
+ else {
lowPriorityFiles.push(fileNameInProject);
+ }
}
- else
+ else {
mediumPriorityFiles.push(fileNameInProject);
+ }
}
}
fileNamesInProject = highPriorityFiles.concat(mediumPriorityFiles).concat(lowPriorityFiles).concat(veryLowPriorityFiles);
@@ -74340,11 +77251,11 @@ var ts;
snap.index.load(lm.lines);
return svc;
};
+ ScriptVersionCache.changeNumberThreshold = 8;
+ ScriptVersionCache.changeLengthThreshold = 256;
+ ScriptVersionCache.maxVersions = 8;
return ScriptVersionCache;
}());
- ScriptVersionCache.changeNumberThreshold = 8;
- ScriptVersionCache.changeLengthThreshold = 256;
- ScriptVersionCache.maxVersions = 8;
server.ScriptVersionCache = ScriptVersionCache;
var LineIndexSnapshot = (function () {
function LineIndexSnapshot(version, cache) {
@@ -75196,6 +78107,10 @@ var ts;
this.realpath = function (path) { return _this.host.realpath(path); };
}
}
+ LSHost.prototype.dispose = function () {
+ this.project = undefined;
+ this.resolveModuleName = undefined;
+ };
LSHost.prototype.startRecordingFilesWithChangedResolutions = function () {
this.filesWithChangedSetOfUnresolvedImports = [];
};
@@ -75767,12 +78682,6 @@ var ts;
ProjectKind[ProjectKind["Configured"] = 1] = "Configured";
ProjectKind[ProjectKind["External"] = 2] = "External";
})(ProjectKind = server.ProjectKind || (server.ProjectKind = {}));
- function remove(items, item) {
- var index = items.indexOf(item);
- if (index >= 0) {
- items.splice(index, 1);
- }
- }
function countEachFileTypes(infos) {
var result = { js: 0, jsx: 0, ts: 0, tsx: 0, dts: 0 };
for (var _i = 0, infos_1 = infos; _i < infos_1.length; _i++) {
@@ -75796,6 +78705,7 @@ var ts;
}
return result;
}
+ server.countEachFileTypes = countEachFileTypes;
function hasOneOrMoreJsAndNoTsFiles(project) {
var counts = countEachFileTypes(project.getScriptInfos());
return counts.js > 0 && counts.ts === 0 && counts.tsx === 0;
@@ -75935,7 +78845,7 @@ var ts;
return this.projectName;
};
Project.prototype.getExternalFiles = function () {
- return [];
+ return server.emptyArray;
};
Project.prototype.getSourceFile = function (path) {
if (!this.program) {
@@ -75965,7 +78875,13 @@ var ts;
this.rootFiles = undefined;
this.rootFilesMap = undefined;
this.program = undefined;
+ this.builder = undefined;
+ this.cachedUnresolvedImportsPerFile = undefined;
+ this.projectErrors = undefined;
+ this.lsHost.dispose();
+ this.lsHost = undefined;
this.languageService.dispose();
+ this.languageService = undefined;
};
Project.prototype.getCompilerOptions = function () {
return this.compilerOptions;
@@ -76163,10 +79079,11 @@ var ts;
return true;
};
Project.prototype.updateGraphWorker = function () {
+ var _this = this;
var oldProgram = this.program;
this.program = this.languageService.getProgram();
var hasChanges = false;
- if (!oldProgram || (this.program !== oldProgram && !oldProgram.structureIsReused)) {
+ if (!oldProgram || (this.program !== oldProgram && !(oldProgram.structureIsReused & 2))) {
hasChanges = true;
if (oldProgram) {
for (var _i = 0, _a = oldProgram.getSourceFiles(); _i < _a.length; _i++) {
@@ -76181,6 +79098,17 @@ var ts;
}
}
}
+ var oldExternalFiles = this.externalFiles || server.emptyArray;
+ this.externalFiles = this.getExternalFiles();
+ server.enumerateInsertsAndDeletes(this.externalFiles, oldExternalFiles, function (inserted) {
+ var scriptInfo = _this.projectService.getOrCreateScriptInfo(inserted, false);
+ scriptInfo.attachToProject(_this);
+ }, function (removed) {
+ var scriptInfoToDetach = _this.projectService.getScriptInfo(removed);
+ if (scriptInfoToDetach) {
+ scriptInfoToDetach.detachFromProject(_this);
+ }
+ });
return hasChanges;
};
Project.prototype.getScriptInfoLSHost = function (fileName) {
@@ -76252,7 +79180,7 @@ var ts;
var currentFiles_1 = ts.arrayToMap(this.getFileNames(), function (x) { return x; });
var added_1 = [];
var removed_1 = [];
- var updated = ts.arrayFrom(updatedFileNames.keys());
+ var updated = updatedFileNames ? ts.arrayFrom(updatedFileNames.keys()) : [];
ts.forEachKey(currentFiles_1, function (id) {
if (!lastReportedFileNames_1.has(id)) {
added_1.push(id);
@@ -76320,7 +79248,7 @@ var ts;
return ts.filter(allFileNames, function (file) { return _this.projectService.host.fileExists(file); });
};
Project.prototype.removeRoot = function (info) {
- remove(this.rootFiles, info);
+ ts.orderedRemoveItem(this.rootFiles, info);
this.rootFilesMap.remove(info.path);
};
return Project;
@@ -76389,16 +79317,16 @@ var ts;
exclude: []
};
};
+ InferredProject.newName = (function () {
+ var nextId = 1;
+ return function () {
+ var id = nextId;
+ nextId++;
+ return server.makeInferredProjectName(id);
+ };
+ })();
return InferredProject;
}(Project));
- InferredProject.newName = (function () {
- var nextId = 1;
- return function () {
- var id = nextId;
- nextId++;
- return server.makeInferredProjectName(id);
- };
- })();
server.InferredProject = InferredProject;
var ConfiguredProject = (function (_super) {
__extends(ConfiguredProject, _super);
@@ -76423,6 +79351,11 @@ var ts;
return;
}
var searchPaths = [ts.combinePaths(host.getExecutingFilePath(), "../../..")].concat(this.projectService.pluginProbeLocations);
+ if (this.projectService.allowLocalPluginLoads) {
+ var local = ts.getDirectoryPath(this.canonicalConfigFilePath);
+ this.projectService.logger.info("Local plugin loading enabled; adding " + local + " to search paths");
+ searchPaths.unshift(local);
+ }
if (options.plugins) {
for (var _i = 0, _a = options.plugins; _i < _a.length; _i++) {
var pluginConfigEntry = _a[_i];
@@ -76430,7 +79363,7 @@ var ts;
}
}
if (this.projectService.globalPlugins) {
- var _loop_6 = function (globalPluginName) {
+ var _loop_7 = function (globalPluginName) {
if (options.plugins && options.plugins.some(function (p) { return p.name === globalPluginName; }))
return "continue";
this_1.enablePlugin({ name: globalPluginName, global: true }, searchPaths);
@@ -76438,7 +79371,7 @@ var ts;
var this_1 = this;
for (var _b = 0, _c = this.projectService.globalPlugins; _b < _c.length; _b++) {
var globalPluginName = _c[_b];
- _loop_6(globalPluginName);
+ _loop_7(globalPluginName);
}
}
};
@@ -76491,19 +79424,17 @@ var ts;
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);
- }
+ var _this = this;
+ return server.toSortedReadonlyArray(ts.flatMap(this.plugins, function (plugin) {
+ if (typeof plugin.getExternalFiles !== "function")
+ return;
+ try {
+ return plugin.getExternalFiles(_this);
}
- }
- return items;
+ catch (e) {
+ _this.projectService.logger.info("A plugin threw an exception in getExternalFiles: " + e);
+ }
+ }));
};
ConfiguredProject.prototype.watchConfigFile = function (callback) {
var _this = this;
@@ -76554,6 +79485,7 @@ var ts;
_super.prototype.close.call(this);
if (this.projectFileWatcher) {
this.projectFileWatcher.close();
+ this.projectFileWatcher = undefined;
}
if (this.typeRootsWatchers) {
for (var _i = 0, _a = this.typeRootsWatchers; _i < _a.length; _i++) {
@@ -76636,6 +79568,7 @@ var ts;
server.ContextEvent = "context";
server.ConfigFileDiagEvent = "configFileDiag";
server.ProjectLanguageServiceStateEvent = "projectLanguageServiceState";
+ server.ProjectInfoTelemetryEvent = "projectInfo";
function prepareConvertersForEnumLikeCompilerOptions(commandLineOptions) {
var map = ts.createMap();
for (var _i = 0, commandLineOptions_1 = commandLineOptions; _i < commandLineOptions_1.length; _i++) {
@@ -76798,6 +79731,7 @@ var ts;
this.configuredProjects = [];
this.openFiles = [];
this.projectToSizeMap = ts.createMap();
+ this.seenProjects = ts.createMap();
this.host = opts.host;
this.logger = opts.logger;
this.cancellationToken = opts.cancellationToken;
@@ -76807,6 +79741,7 @@ var ts;
this.eventHandler = opts.eventHandler;
this.globalPlugins = opts.globalPlugins || server.emptyArray;
this.pluginProbeLocations = opts.pluginProbeLocations || server.emptyArray;
+ this.allowLocalPluginLoads = !!opts.allowLocalPluginLoads;
ts.Debug.assert(!!this.host.createHash, "'ServerHost.createHash' is required for ProjectService");
this.toCanonicalFileName = ts.createGetCanonicalFileName(this.host.useCaseSensitiveFileNames);
this.directoryWatchers = new DirectoryWatchers(this);
@@ -76943,8 +79878,14 @@ var ts;
}
else {
if (info && (!info.isScriptOpen())) {
- info.reloadFromFile();
- this.updateProjectGraphs(info.containingProjects);
+ if (info.containingProjects.length === 0) {
+ info.stopWatcher();
+ this.filenameToScriptInfo.remove(info.path);
+ }
+ else {
+ info.reloadFromFile();
+ this.updateProjectGraphs(info.containingProjects);
+ }
}
}
};
@@ -77126,8 +80067,21 @@ var ts;
}
}
}
- if (info.containingProjects.length === 0) {
- this.filenameToScriptInfo.remove(info.path);
+ if (this.host.fileExists(info.fileName)) {
+ this.watchClosedScriptInfo(info);
+ }
+ else {
+ this.handleDeletedFile(info);
+ }
+ };
+ ProjectService.prototype.deleteOrphanScriptInfoNotInAnyProject = function () {
+ for (var _i = 0, _a = this.filenameToScriptInfo.getKeys(); _i < _a.length; _i++) {
+ var path = _a[_i];
+ var info = this.filenameToScriptInfo.get(path);
+ if (!info.isScriptOpen() && info.containingProjects.length === 0) {
+ info.stopWatcher();
+ this.filenameToScriptInfo.remove(info.path);
+ }
}
};
ProjectService.prototype.openOrUpdateConfiguredProjectForFile = function (fileName, projectRootPath) {
@@ -77235,7 +80189,10 @@ var ts;
var projectOptions = {
files: parsedCommandLine.fileNames,
compilerOptions: parsedCommandLine.options,
- configHasFilesProperty: config["files"] !== undefined,
+ configHasExtendsProperty: config.extends !== undefined,
+ configHasFilesProperty: config.files !== undefined,
+ configHasIncludeProperty: config.include !== undefined,
+ configHasExcludeProperty: config.exclude !== undefined,
wildcardDirectories: ts.createMapFromTemplate(parsedCommandLine.wildcardDirectories),
typeAcquisition: parsedCommandLine.typeAcquisition,
compileOnSave: parsedCommandLine.compileOnSave
@@ -77272,8 +80229,49 @@ var ts;
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);
+ this.sendProjectTelemetry(project.externalProjectName, project);
return project;
};
+ ProjectService.prototype.sendProjectTelemetry = function (projectKey, project, projectOptions) {
+ if (this.seenProjects.has(projectKey)) {
+ return;
+ }
+ this.seenProjects.set(projectKey, true);
+ if (!this.eventHandler)
+ return;
+ var data = {
+ projectId: this.host.createHash(projectKey),
+ fileStats: server.countEachFileTypes(project.getScriptInfos()),
+ compilerOptions: ts.convertCompilerOptionsForTelemetry(project.getCompilerOptions()),
+ typeAcquisition: convertTypeAcquisition(project.getTypeAcquisition()),
+ extends: projectOptions && projectOptions.configHasExtendsProperty,
+ files: projectOptions && projectOptions.configHasFilesProperty,
+ include: projectOptions && projectOptions.configHasIncludeProperty,
+ exclude: projectOptions && projectOptions.configHasExcludeProperty,
+ compileOnSave: project.compileOnSaveEnabled,
+ configFileName: configFileName(),
+ projectType: project instanceof server.ExternalProject ? "external" : "configured",
+ languageServiceEnabled: project.languageServiceEnabled,
+ version: ts.version,
+ };
+ this.eventHandler({ eventName: server.ProjectInfoTelemetryEvent, data: data });
+ function configFileName() {
+ if (!(project instanceof server.ConfiguredProject)) {
+ return "other";
+ }
+ var configFilePath = project instanceof server.ConfiguredProject && project.getConfigFilePath();
+ var base = ts.getBaseFileName(configFilePath);
+ return base === "tsconfig.json" || base === "jsconfig.json" ? base : "other";
+ }
+ function convertTypeAcquisition(_a) {
+ var enable = _a.enable, include = _a.include, exclude = _a.exclude;
+ return {
+ enable: enable,
+ include: include !== undefined && include.length !== 0,
+ exclude: exclude !== undefined && exclude.length !== 0,
+ };
+ }
+ };
ProjectService.prototype.reportConfigFileDiagnostics = function (configFileName, diagnostics, triggerFile) {
if (!this.eventHandler) {
return;
@@ -77295,6 +80293,7 @@ var ts;
project.watchWildcards(function (project, path) { return _this.onSourceFileInDirectoryChangedForConfiguredProject(project, path); });
project.watchTypeRoots(function (project, path) { return _this.onTypeRootFileChanged(project, path); });
this.configuredProjects.push(project);
+ this.sendProjectTelemetry(project.getConfigFilePath(), project, projectOptions);
return project;
};
ProjectService.prototype.watchConfigDirectoryForProject = function (project, options) {
@@ -77326,7 +80325,7 @@ var ts;
var conversionResult = this.convertConfigFileContentToProjectOptions(configFileName);
var projectOptions = conversionResult.success
? conversionResult.projectOptions
- : { files: [], compilerOptions: {}, typeAcquisition: { enable: false } };
+ : { files: [], compilerOptions: {}, configHasExtendsProperty: false, configHasFilesProperty: false, configHasIncludeProperty: false, configHasExcludeProperty: false, typeAcquisition: { enable: false } };
var project = this.createAndAddConfiguredProject(configFileName, projectOptions, conversionResult.configFileErrors, clientFileName);
return {
success: conversionResult.success,
@@ -77449,8 +80448,14 @@ var ts;
ProjectService.prototype.getScriptInfo = function (uncheckedFileName) {
return this.getScriptInfoForNormalizedPath(server.toNormalizedPath(uncheckedFileName));
};
- ProjectService.prototype.getOrCreateScriptInfoForNormalizedPath = function (fileName, openedByClient, fileContent, scriptKind, hasMixedContent) {
+ ProjectService.prototype.watchClosedScriptInfo = function (info) {
var _this = this;
+ if (!info.hasMixedContent) {
+ var fileName_3 = info.fileName;
+ info.setWatcher(this.host.watchFile(fileName_3, function (_) { return _this.onSourceFileChanged(fileName_3); }));
+ }
+ };
+ ProjectService.prototype.getOrCreateScriptInfoForNormalizedPath = function (fileName, openedByClient, fileContent, scriptKind, hasMixedContent) {
var info = this.getScriptInfoForNormalizedPath(fileName);
if (!info) {
if (openedByClient || this.host.fileExists(fileName)) {
@@ -77462,14 +80467,13 @@ var ts;
}
}
else {
- if (!hasMixedContent) {
- info.setWatcher(this.host.watchFile(fileName, function (_) { return _this.onSourceFileChanged(fileName); }));
- }
+ this.watchClosedScriptInfo(info);
}
}
}
if (info) {
if (openedByClient && !info.isScriptOpen()) {
+ info.stopWatcher();
info.open(fileContent);
if (hasMixedContent) {
info.registerFileUpdate();
@@ -77569,6 +80573,7 @@ var ts;
}
var info = this.getOrCreateScriptInfoForNormalizedPath(fileName, true, fileContent, scriptKind, hasMixedContent);
this.assignScriptInfoToInferredProjectIfNecessary(info, true);
+ this.deleteOrphanScriptInfoNotInAnyProject();
this.printProjects();
return { configFileName: configFileName, configFileErrors: configFileErrors };
var _a;
@@ -77581,13 +80586,13 @@ var ts;
this.printProjects();
};
ProjectService.prototype.collectChanges = function (lastKnownProjectVersions, currentProjects, result) {
- var _loop_7 = function (proj) {
+ var _loop_8 = 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_7(proj);
+ _loop_8(proj);
}
};
ProjectService.prototype.synchronizeProjectList = function (knownProjects) {
@@ -77706,7 +80711,7 @@ var ts;
var types = (typeAcquisition && typeAcquisition.include) || [];
var excludeRules = [];
var normalizedNames = rootFiles.map(function (f) { return ts.normalizeSlashes(f.fileName); });
- var _loop_8 = function (name) {
+ var _loop_9 = function (name) {
var rule = ProjectService.safelist[name];
for (var _i = 0, normalizedNames_1 = normalizedNames; _i < normalizedNames_1.length; _i++) {
var root = normalizedNames_1[_i];
@@ -77721,7 +80726,7 @@ var ts;
}
}
if (rule.exclude) {
- var _loop_9 = function (exclude) {
+ var _loop_10 = function (exclude) {
var processedRule = root.replace(rule.match, function () {
var groups = [];
for (var _i = 0; _i < arguments.length; _i++) {
@@ -77744,7 +80749,7 @@ var ts;
};
for (var _c = 0, _d = rule.exclude; _c < _d.length; _c++) {
var exclude = _d[_c];
- _loop_9(exclude);
+ _loop_10(exclude);
}
}
else {
@@ -77763,7 +80768,7 @@ var ts;
var this_2 = this;
for (var _i = 0, _a = Object.keys(ProjectService.safelist); _i < _a.length; _i++) {
var name = _a[_i];
- _loop_8(name);
+ _loop_9(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]); }); });
@@ -77859,10 +80864,10 @@ var ts;
this.refreshInferredProjects();
}
};
+ ProjectService.safelist = defaultTypeSafeList;
+ ProjectService.filenameEscapeRegexp = /[-\/\\^$*+?.()|[\]{}]/g;
return ProjectService;
}());
- ProjectService.safelist = defaultTypeSafeList;
- ProjectService.filenameEscapeRegexp = /[-\/\\^$*+?.()|[\]{}]/g;
server.ProjectService = ProjectService;
})(server = ts.server || (ts.server = {}));
})(ts || (ts = {}));
@@ -78382,6 +81387,9 @@ 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 (result.resolvedModule && result.resolvedModule.extension !== ts.Extension.Ts && result.resolvedModule.extension !== ts.Extension.Tsx && result.resolvedModule.extension !== ts.Extension.Dts) {
+ resolvedFileName = undefined;
+ }
return {
resolvedFileName: resolvedFileName,
failedLookupLocations: result.failedLookupLocations
@@ -78543,4 +81551,4 @@ var TypeScript;
Services.TypeScriptServicesFactory = ts.TypeScriptServicesFactory;
})(Services = TypeScript.Services || (TypeScript.Services = {}));
})(TypeScript || (TypeScript = {}));
-var toolsVersion = "2.3";
+var toolsVersion = "2.4";
diff --git a/node_modules/typedoc/node_modules/typescript/lib/typescript.d.ts b/node_modules/typedoc/node_modules/typescript/lib/typescript.d.ts
index 98f951b58..d4aaff8eb 100644
--- a/node_modules/typedoc/node_modules/typescript/lib/typescript.d.ts
+++ b/node_modules/typedoc/node_modules/typescript/lib/typescript.d.ts
@@ -1,18 +1,18 @@
-/*! *****************************************************************************
-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.
+***************************************************************************** */
+
declare namespace ts {
/**
* Type of objects whose values are all of the same type.
@@ -348,20 +348,22 @@ declare namespace ts {
JSDocComment = 283,
JSDocTag = 284,
JSDocAugmentsTag = 285,
- JSDocParameterTag = 286,
- JSDocReturnTag = 287,
- JSDocTypeTag = 288,
- JSDocTemplateTag = 289,
- JSDocTypedefTag = 290,
- JSDocPropertyTag = 291,
- JSDocTypeLiteral = 292,
- JSDocLiteralType = 293,
- SyntaxList = 294,
- NotEmittedStatement = 295,
- PartiallyEmittedExpression = 296,
- MergeDeclarationMarker = 297,
- EndOfDeclarationMarker = 298,
- Count = 299,
+ JSDocClassTag = 286,
+ JSDocParameterTag = 287,
+ JSDocReturnTag = 288,
+ JSDocTypeTag = 289,
+ JSDocTemplateTag = 290,
+ JSDocTypedefTag = 291,
+ JSDocPropertyTag = 292,
+ JSDocTypeLiteral = 293,
+ JSDocLiteralType = 294,
+ SyntaxList = 295,
+ NotEmittedStatement = 296,
+ PartiallyEmittedExpression = 297,
+ CommaListExpression = 298,
+ MergeDeclarationMarker = 299,
+ EndOfDeclarationMarker = 300,
+ Count = 301,
FirstAssignment = 58,
LastAssignment = 70,
FirstCompoundAssignment = 59,
@@ -388,9 +390,9 @@ declare namespace ts {
LastBinaryOperator = 70,
FirstNode = 143,
FirstJSDocNode = 267,
- LastJSDocNode = 293,
- FirstJSDocTagNode = 283,
- LastJSDocTagNode = 293,
+ LastJSDocNode = 294,
+ FirstJSDocTagNode = 284,
+ LastJSDocTagNode = 294,
}
enum NodeFlags {
None = 0,
@@ -474,6 +476,10 @@ declare namespace ts {
type ModifiersArray = NodeArray<Modifier>;
interface Identifier extends PrimaryExpression {
kind: SyntaxKind.Identifier;
+ /**
+ * Text of identifier (with escapes converted to characters).
+ * If the identifier begins with two underscores, this will begin with three.
+ */
text: string;
originalKeywordKind?: SyntaxKind;
isInJSDocNamespace?: boolean;
@@ -491,9 +497,11 @@ declare namespace ts {
type DeclarationName = Identifier | StringLiteral | NumericLiteral | ComputedPropertyName | BindingPattern;
interface Declaration extends Node {
_declarationBrand: any;
+ }
+ interface NamedDeclaration extends Declaration {
name?: DeclarationName;
}
- interface DeclarationStatement extends Declaration, Statement {
+ interface DeclarationStatement extends NamedDeclaration, Statement {
name?: Identifier | StringLiteral | NumericLiteral;
}
interface ComputedPropertyName extends Node {
@@ -504,7 +512,7 @@ declare namespace ts {
kind: SyntaxKind.Decorator;
expression: LeftHandSideExpression;
}
- interface TypeParameterDeclaration extends Declaration {
+ interface TypeParameterDeclaration extends NamedDeclaration {
kind: SyntaxKind.TypeParameter;
parent?: DeclarationWithTypeParameters;
name: Identifier;
@@ -512,7 +520,7 @@ declare namespace ts {
default?: TypeNode;
expression?: Expression;
}
- interface SignatureDeclaration extends Declaration {
+ interface SignatureDeclaration extends NamedDeclaration {
name?: PropertyName;
typeParameters?: NodeArray<TypeParameterDeclaration>;
parameters: NodeArray<ParameterDeclaration>;
@@ -525,7 +533,7 @@ declare namespace ts {
kind: SyntaxKind.ConstructSignature;
}
type BindingName = Identifier | BindingPattern;
- interface VariableDeclaration extends Declaration {
+ interface VariableDeclaration extends NamedDeclaration {
kind: SyntaxKind.VariableDeclaration;
parent?: VariableDeclarationList | CatchClause;
name: BindingName;
@@ -537,7 +545,7 @@ declare namespace ts {
parent?: VariableStatement | ForStatement | ForOfStatement | ForInStatement;
declarations: NodeArray<VariableDeclaration>;
}
- interface ParameterDeclaration extends Declaration {
+ interface ParameterDeclaration extends NamedDeclaration {
kind: SyntaxKind.Parameter;
parent?: SignatureDeclaration;
dotDotDotToken?: DotDotDotToken;
@@ -546,7 +554,7 @@ declare namespace ts {
type?: TypeNode;
initializer?: Expression;
}
- interface BindingElement extends Declaration {
+ interface BindingElement extends NamedDeclaration {
kind: SyntaxKind.BindingElement;
parent?: BindingPattern;
propertyName?: PropertyName;
@@ -568,7 +576,7 @@ declare namespace ts {
type?: TypeNode;
initializer?: Expression;
}
- interface ObjectLiteralElement extends Declaration {
+ interface ObjectLiteralElement extends NamedDeclaration {
_objectLiteralBrandBrand: any;
name?: PropertyName;
}
@@ -590,7 +598,7 @@ declare namespace ts {
kind: SyntaxKind.SpreadAssignment;
expression: Expression;
}
- interface VariableLikeDeclaration extends Declaration {
+ interface VariableLikeDeclaration extends NamedDeclaration {
propertyName?: PropertyName;
dotDotDotToken?: DotDotDotToken;
name: DeclarationName;
@@ -598,7 +606,7 @@ declare namespace ts {
type?: TypeNode;
initializer?: Expression;
}
- interface PropertyLikeDeclaration extends Declaration {
+ interface PropertyLikeDeclaration extends NamedDeclaration {
name: PropertyName;
}
interface ObjectBindingPattern extends Node {
@@ -684,6 +692,7 @@ declare namespace ts {
interface ConstructorTypeNode extends TypeNode, SignatureDeclaration {
kind: SyntaxKind.ConstructorType;
}
+ type TypeReferenceType = TypeReferenceNode | ExpressionWithTypeArguments | JSDocTypeReference;
interface TypeReferenceNode extends TypeNode {
kind: SyntaxKind.TypeReference;
typeName: EntityName;
@@ -761,22 +770,24 @@ declare namespace ts {
interface UnaryExpression extends Expression {
_unaryExpressionBrand: any;
}
- interface IncrementExpression extends UnaryExpression {
- _incrementExpressionBrand: any;
+ /** Deprecated, please use UpdateExpression */
+ type IncrementExpression = UpdateExpression;
+ interface UpdateExpression extends UnaryExpression {
+ _updateExpressionBrand: any;
}
type PrefixUnaryOperator = SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken | SyntaxKind.PlusToken | SyntaxKind.MinusToken | SyntaxKind.TildeToken | SyntaxKind.ExclamationToken;
- interface PrefixUnaryExpression extends IncrementExpression {
+ interface PrefixUnaryExpression extends UpdateExpression {
kind: SyntaxKind.PrefixUnaryExpression;
operator: PrefixUnaryOperator;
operand: UnaryExpression;
}
type PostfixUnaryOperator = SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken;
- interface PostfixUnaryExpression extends IncrementExpression {
+ interface PostfixUnaryExpression extends UpdateExpression {
kind: SyntaxKind.PostfixUnaryExpression;
operand: LeftHandSideExpression;
operator: PostfixUnaryOperator;
}
- interface LeftHandSideExpression extends IncrementExpression {
+ interface LeftHandSideExpression extends UpdateExpression {
_leftHandSideExpressionBrand: any;
}
interface MemberExpression extends LeftHandSideExpression {
@@ -797,6 +808,9 @@ declare namespace ts {
interface SuperExpression extends PrimaryExpression {
kind: SyntaxKind.SuperKeyword;
}
+ interface ImportExpression extends PrimaryExpression {
+ kind: SyntaxKind.ImportKeyword;
+ }
interface DeleteExpression extends UnaryExpression {
kind: SyntaxKind.DeleteExpression;
expression: UnaryExpression;
@@ -950,7 +964,7 @@ declare namespace ts {
}
type EntityNameExpression = Identifier | PropertyAccessEntityNameExpression | ParenthesizedExpression;
type EntityNameOrEntityNameExpression = EntityName | EntityNameExpression;
- interface PropertyAccessExpression extends MemberExpression, Declaration {
+ interface PropertyAccessExpression extends MemberExpression, NamedDeclaration {
kind: SyntaxKind.PropertyAccessExpression;
expression: LeftHandSideExpression;
name: Identifier;
@@ -981,6 +995,9 @@ declare namespace ts {
interface SuperCall extends CallExpression {
expression: SuperExpression;
}
+ interface ImportCall extends CallExpression {
+ expression: ImportExpression;
+ }
interface ExpressionWithTypeArguments extends TypeNode {
kind: SyntaxKind.ExpressionWithTypeArguments;
parent?: HeritageClause;
@@ -1016,7 +1033,7 @@ declare namespace ts {
}
interface MetaProperty extends PrimaryExpression {
kind: SyntaxKind.MetaProperty;
- keywordToken: SyntaxKind;
+ keywordToken: SyntaxKind.NewKeyword;
name: Identifier;
}
interface JsxElement extends PrimaryExpression {
@@ -1076,6 +1093,13 @@ declare namespace ts {
interface NotEmittedStatement extends Statement {
kind: SyntaxKind.NotEmittedStatement;
}
+ /**
+ * A list of comma-seperated expressions. This node is only created by transformations.
+ */
+ interface CommaListExpression extends Expression {
+ kind: SyntaxKind.CommaListExpression;
+ elements: NodeArray<Expression>;
+ }
interface EmptyStatement extends Statement {
kind: SyntaxKind.EmptyStatement;
}
@@ -1123,6 +1147,7 @@ declare namespace ts {
condition?: Expression;
incrementor?: Expression;
}
+ type ForInOrOfStatement = ForInStatement | ForOfStatement;
interface ForInStatement extends IterationStatement {
kind: SyntaxKind.ForInStatement;
initializer: ForInitializer;
@@ -1196,8 +1221,8 @@ declare namespace ts {
variableDeclaration: VariableDeclaration;
block: Block;
}
- type DeclarationWithTypeParameters = SignatureDeclaration | ClassLikeDeclaration | InterfaceDeclaration | TypeAliasDeclaration;
- interface ClassLikeDeclaration extends Declaration {
+ type DeclarationWithTypeParameters = SignatureDeclaration | ClassLikeDeclaration | InterfaceDeclaration | TypeAliasDeclaration | JSDocTemplateTag;
+ interface ClassLikeDeclaration extends NamedDeclaration {
name?: Identifier;
typeParameters?: NodeArray<TypeParameterDeclaration>;
heritageClauses?: NodeArray<HeritageClause>;
@@ -1210,11 +1235,11 @@ declare namespace ts {
interface ClassExpression extends ClassLikeDeclaration, PrimaryExpression {
kind: SyntaxKind.ClassExpression;
}
- interface ClassElement extends Declaration {
+ interface ClassElement extends NamedDeclaration {
_classElementBrand: any;
name?: PropertyName;
}
- interface TypeElement extends Declaration {
+ interface TypeElement extends NamedDeclaration {
_typeElementBrand: any;
name?: PropertyName;
questionToken?: QuestionToken;
@@ -1238,7 +1263,7 @@ declare namespace ts {
typeParameters?: NodeArray<TypeParameterDeclaration>;
type: TypeNode;
}
- interface EnumMember extends Declaration {
+ interface EnumMember extends NamedDeclaration {
kind: SyntaxKind.EnumMember;
parent?: EnumDeclaration;
name: PropertyName;
@@ -1297,13 +1322,13 @@ declare namespace ts {
moduleSpecifier: Expression;
}
type NamedImportBindings = NamespaceImport | NamedImports;
- interface ImportClause extends Declaration {
+ interface ImportClause extends NamedDeclaration {
kind: SyntaxKind.ImportClause;
parent?: ImportDeclaration;
name?: Identifier;
namedBindings?: NamedImportBindings;
}
- interface NamespaceImport extends Declaration {
+ interface NamespaceImport extends NamedDeclaration {
kind: SyntaxKind.NamespaceImport;
parent?: ImportClause;
name: Identifier;
@@ -1330,13 +1355,13 @@ declare namespace ts {
elements: NodeArray<ExportSpecifier>;
}
type NamedImportsOrExports = NamedImports | NamedExports;
- interface ImportSpecifier extends Declaration {
+ interface ImportSpecifier extends NamedDeclaration {
kind: SyntaxKind.ImportSpecifier;
parent?: NamedImports;
propertyName?: Identifier;
name: Identifier;
}
- interface ExportSpecifier extends Declaration {
+ interface ExportSpecifier extends NamedDeclaration {
kind: SyntaxKind.ExportSpecifier;
parent?: NamedExports;
propertyName?: Identifier;
@@ -1444,6 +1469,7 @@ declare namespace ts {
comment: string | undefined;
}
interface JSDocTag extends Node {
+ parent: JSDoc;
atToken: AtToken;
tagName: Identifier;
comment: string | undefined;
@@ -1455,6 +1481,9 @@ declare namespace ts {
kind: SyntaxKind.JSDocAugmentsTag;
typeExpression: JSDocTypeExpression;
}
+ interface JSDocClassTag extends JSDocTag {
+ kind: SyntaxKind.JSDocClassTag;
+ }
interface JSDocTemplateTag extends JSDocTag {
kind: SyntaxKind.JSDocTemplateTag;
typeParameters: NodeArray<TypeParameterDeclaration>;
@@ -1467,7 +1496,8 @@ declare namespace ts {
kind: SyntaxKind.JSDocTypeTag;
typeExpression: JSDocTypeExpression;
}
- interface JSDocTypedefTag extends JSDocTag, Declaration {
+ interface JSDocTypedefTag extends JSDocTag, NamedDeclaration {
+ parent: JSDoc;
kind: SyntaxKind.JSDocTypedefTag;
fullName?: JSDocNamespaceDeclaration | Identifier;
name?: Identifier;
@@ -1475,9 +1505,15 @@ declare namespace ts {
jsDocTypeLiteral?: JSDocTypeLiteral;
}
interface JSDocPropertyTag extends JSDocTag, TypeElement {
+ parent: JSDoc;
kind: SyntaxKind.JSDocPropertyTag;
name: Identifier;
+ /** the parameter name, if provided *before* the type (TypeScript-style) */
+ preParameterName?: Identifier;
+ /** the parameter name, if provided *after* the type (JSDoc-standard) */
+ postParameterName?: Identifier;
typeExpression: JSDocTypeExpression;
+ isBracketed: boolean;
}
interface JSDocTypeLiteral extends JSDocType {
kind: SyntaxKind.JSDocTypeLiteral;
@@ -1492,7 +1528,7 @@ declare namespace ts {
/** the parameter name, if provided *after* the type (JSDoc-standard) */
postParameterName?: Identifier;
/** the parameter name, regardless of the location it was provided */
- parameterName: Identifier;
+ name: Identifier;
isBracketed: boolean;
}
enum FlowFlags {
@@ -1690,10 +1726,10 @@ declare namespace ts {
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;
+ getPropertyOfType(type: Type, propertyName: string): Symbol | undefined;
+ getIndexInfoOfType(type: Type, kind: IndexKind): IndexInfo | undefined;
getSignaturesOfType(type: Type, kind: SignatureKind): Signature[];
- getIndexTypeOfType(type: Type, kind: IndexKind): Type;
+ getIndexTypeOfType(type: Type, kind: IndexKind): Type | undefined;
getBaseTypes(type: InterfaceType): BaseType[];
getBaseTypeOfLiteralType(type: Type): Type;
getWidenedType(type: Type): Type;
@@ -1706,11 +1742,11 @@ declare namespace ts {
/** 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;
+ getSymbolAtLocation(node: Node): Symbol | undefined;
getSymbolsOfParameterPropertyDeclaration(parameter: ParameterDeclaration, parameterName: string): Symbol[];
- getShorthandAssignmentValueSymbol(location: Node): Symbol;
- getExportSpecifierLocalTargetSymbol(location: ExportSpecifier): Symbol;
- getPropertySymbolOfDestructuringAssignment(location: Identifier): Symbol;
+ getShorthandAssignmentValueSymbol(location: Node): Symbol | undefined;
+ getExportSpecifierLocalTargetSymbol(location: ExportSpecifier): Symbol | undefined;
+ getPropertySymbolOfDestructuringAssignment(location: Identifier): Symbol | undefined;
getTypeAtLocation(node: Node): Type;
getTypeFromTypeNode(node: TypeNode): Type;
signatureToString(signature: Signature, enclosingDeclaration?: Node, flags?: TypeFormatFlags, kind?: SignatureKind): string;
@@ -1720,38 +1756,48 @@ declare namespace ts {
getFullyQualifiedName(symbol: Symbol): string;
getAugmentedPropertiesOfType(type: Type): Symbol[];
getRootSymbols(symbol: Symbol): Symbol[];
- getContextualType(node: Expression): Type;
- getResolvedSignature(node: CallLikeExpression, candidatesOutArray?: Signature[]): Signature;
- getSignatureFromDeclaration(declaration: SignatureDeclaration): Signature;
- isImplementationOfOverload(node: FunctionLikeDeclaration): boolean;
+ getContextualType(node: Expression): Type | undefined;
+ getResolvedSignature(node: CallLikeExpression, candidatesOutArray?: Signature[]): Signature | undefined;
+ getSignatureFromDeclaration(declaration: SignatureDeclaration): Signature | undefined;
+ isImplementationOfOverload(node: FunctionLikeDeclaration): boolean | undefined;
isUndefinedSymbol(symbol: Symbol): boolean;
isArgumentsSymbol(symbol: Symbol): boolean;
isUnknownSymbol(symbol: Symbol): boolean;
- getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): number;
+ getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): string | number | undefined;
isValidPropertyAccess(node: PropertyAccessExpression | QualifiedName, propertyName: string): boolean;
/** Follow all aliases to get the original symbol. */
getAliasedSymbol(symbol: Symbol): Symbol;
getExportsOfModule(moduleSymbol: Symbol): Symbol[];
- getAllAttributesTypeFromJsxOpeningLikeElement(elementNode: JsxOpeningLikeElement): Type;
+ getAllAttributesTypeFromJsxOpeningLikeElement(elementNode: JsxOpeningLikeElement): Type | undefined;
getJsxIntrinsicTagNames(): Symbol[];
isOptionalParameter(node: ParameterDeclaration): boolean;
getAmbientModules(): Symbol[];
tryGetMemberInModuleExports(memberName: string, moduleSymbol: Symbol): Symbol | undefined;
getApparentType(type: Type): Type;
+ getSuggestionForNonexistentProperty(node: Identifier, containingType: Type): string | undefined;
+ getSuggestionForNonexistentSymbol(location: Node, name: string, meaning: SymbolFlags): string | undefined;
}
enum NodeBuilderFlags {
None = 0,
- allowThisInObjectLiteral = 1,
- allowQualifedNameInPlaceOfIdentifier = 2,
- allowTypeParameterInQualifiedName = 4,
- allowAnonymousIdentifier = 8,
- allowEmptyUnionOrIntersection = 16,
- allowEmptyTuple = 32,
+ NoTruncation = 1,
+ WriteArrayAsGenericType = 2,
+ WriteTypeArgumentsOfSignature = 32,
+ UseFullyQualifiedType = 64,
+ SuppressAnyReturnType = 256,
+ WriteTypeParametersInQualifiedName = 512,
+ AllowThisInObjectLiteral = 1024,
+ AllowQualifedNameInPlaceOfIdentifier = 2048,
+ AllowAnonymousIdentifier = 8192,
+ AllowEmptyUnionOrIntersection = 16384,
+ AllowEmptyTuple = 32768,
+ IgnoreErrors = 60416,
+ InObjectTypeLiteral = 1048576,
+ InTypeAlias = 8388608,
}
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;
+ buildSignatureDisplay(signature: 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;
@@ -1776,23 +1822,24 @@ declare namespace ts {
clear(): void;
trackSymbol(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): void;
reportInaccessibleThisError(): void;
- reportIllegalExtends(): void;
+ reportPrivateInBaseOfClassExpression(propertyName: string): void;
}
enum TypeFormatFlags {
None = 0,
WriteArrayAsGenericType = 1,
- UseTypeOfFunction = 2,
- NoTruncation = 4,
- WriteArrowStyleSignature = 8,
- WriteOwnNameForAnyLike = 16,
- WriteTypeArgumentsOfSignature = 32,
- InElementType = 64,
- UseFullyQualifiedType = 128,
- InFirstTypeArgument = 256,
- InTypeAlias = 512,
- UseTypeAliasValue = 1024,
- SuppressAnyReturnType = 2048,
- AddUndefined = 4096,
+ UseTypeOfFunction = 4,
+ NoTruncation = 8,
+ WriteArrowStyleSignature = 16,
+ WriteOwnNameForAnyLike = 32,
+ WriteTypeArgumentsOfSignature = 64,
+ InElementType = 128,
+ UseFullyQualifiedType = 256,
+ InFirstTypeArgument = 512,
+ InTypeAlias = 1024,
+ UseTypeAliasValue = 2048,
+ SuppressAnyReturnType = 4096,
+ AddUndefined = 8192,
+ WriteClassExpressionAsTypeLiteral = 16384,
}
enum SymbolFormatFlags {
None = 0,
@@ -1912,18 +1959,18 @@ declare namespace ts {
Index = 262144,
IndexedAccess = 524288,
NonPrimitive = 16777216,
- Literal = 480,
+ Literal = 224,
StringOrNumberLiteral = 96,
PossiblyFalsy = 7406,
StringLike = 262178,
- NumberLike = 340,
+ NumberLike = 84,
BooleanLike = 136,
EnumLike = 272,
UnionOrIntersection = 196608,
StructuredType = 229376,
StructuredOrTypeVariable = 1032192,
TypeVariable = 540672,
- Narrowable = 17810431,
+ Narrowable = 17810175,
NotUnionOrUnit = 16810497,
}
type DestructuringPattern = BindingPattern | ObjectLiteralExpression | ArrayLiteralExpression;
@@ -1935,15 +1982,17 @@ declare namespace ts {
aliasTypeArguments?: Type[];
}
interface LiteralType extends Type {
- text: string;
+ value: string | number;
freshType?: LiteralType;
regularType?: LiteralType;
}
- interface EnumType extends Type {
- memberTypes: EnumLiteralType[];
+ interface StringLiteralType extends LiteralType {
+ value: string;
}
- interface EnumLiteralType extends LiteralType {
- baseType: EnumType & UnionType;
+ interface NumberLiteralType extends LiteralType {
+ value: number;
+ }
+ interface EnumType extends Type {
}
enum ObjectFlags {
Class = 1,
@@ -1988,7 +2037,7 @@ declare namespace ts {
*/
interface TypeReference extends ObjectType {
target: GenericType;
- typeArguments: Type[];
+ typeArguments?: Type[];
}
interface GenericType extends InterfaceType, TypeReference {
}
@@ -2024,7 +2073,7 @@ declare namespace ts {
}
interface Signature {
declaration: SignatureDeclaration;
- typeParameters: TypeParameter[];
+ typeParameters?: TypeParameter[];
parameters: Symbol[];
}
enum IndexKind {
@@ -2036,6 +2085,24 @@ declare namespace ts {
isReadonly: boolean;
declaration?: SignatureDeclaration;
}
+ enum InferencePriority {
+ NakedTypeVariable = 1,
+ MappedType = 2,
+ ReturnType = 4,
+ }
+ interface InferenceInfo {
+ typeParameter: TypeParameter;
+ candidates: Type[];
+ inferredType: Type;
+ priority: InferencePriority;
+ topLevel: boolean;
+ isFixed: boolean;
+ }
+ enum InferenceFlags {
+ InferUnionTypes = 1,
+ NoDefault = 2,
+ AnyDefault = 4,
+ }
interface JsFileExtensionInfo {
extension: string;
isMixedContent: boolean;
@@ -2059,9 +2126,9 @@ declare namespace ts {
next?: DiagnosticMessageChain;
}
interface Diagnostic {
- file: SourceFile;
- start: number;
- length: number;
+ file: SourceFile | undefined;
+ start: number | undefined;
+ length: number | undefined;
messageText: string | DiagnosticMessageChain;
category: DiagnosticCategory;
code: number;
@@ -2117,6 +2184,7 @@ declare namespace ts {
noImplicitAny?: boolean;
noImplicitReturns?: boolean;
noImplicitThis?: boolean;
+ noStrictGenericChecks?: boolean;
noUnusedLocals?: boolean;
noUnusedParameters?: boolean;
noImplicitUseStrict?: boolean;
@@ -2171,6 +2239,7 @@ declare namespace ts {
UMD = 3,
System = 4,
ES2015 = 5,
+ ESNext = 6,
}
enum JsxEmit {
None = 0,
@@ -2301,6 +2370,14 @@ declare namespace ts {
resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[], containingFile: string): ResolvedTypeReferenceDirective[];
getEnvironmentVariable?(name: string): string;
}
+ interface SourceMapRange extends TextRange {
+ source?: SourceMapSource;
+ }
+ interface SourceMapSource {
+ fileName: string;
+ text: string;
+ skipTrivia?: (pos: number) => number;
+ }
enum EmitFlags {
SingleLine = 1,
AdviseOnEmitNode = 2,
@@ -2320,14 +2397,16 @@ declare namespace ts {
HelperName = 4096,
ExportName = 8192,
LocalName = 16384,
- Indented = 32768,
- NoIndentation = 65536,
- AsyncFunctionBody = 131072,
- ReuseTempVariableScope = 262144,
- CustomPrologue = 524288,
- NoHoisting = 1048576,
- HasEndOfDeclarationMarker = 2097152,
- Iterator = 4194304,
+ InternalName = 32768,
+ Indented = 65536,
+ NoIndentation = 131072,
+ AsyncFunctionBody = 262144,
+ ReuseTempVariableScope = 524288,
+ CustomPrologue = 1048576,
+ NoHoisting = 2097152,
+ HasEndOfDeclarationMarker = 4194304,
+ Iterator = 8388608,
+ NoAsciiEscaping = 16777216,
}
interface EmitHelper {
readonly name: string;
@@ -2515,7 +2594,7 @@ declare namespace ts {
}
declare namespace ts {
/** The version of the TypeScript compiler release */
- const version = "2.3.2";
+ const version = "2.4.1";
}
declare function setTimeout(handler: (...args: any[]) => void, timeout: number): any;
declare function clearTimeout(handle: any): void;
@@ -2550,6 +2629,10 @@ declare namespace ts {
getDirectories(path: string): string[];
readDirectory(path: string, extensions?: string[], exclude?: string[], include?: string[]): string[];
getModifiedTime?(path: string): Date;
+ /**
+ * This should be cryptographically secure.
+ * A good implementation is node.js' `crypto.createHash`. (https://nodejs.org/api/crypto.html#crypto_crypto_createhash_algorithm)
+ */
createHash?(data: string): string;
getMemoryUsage?(): number;
exit(exitCode?: number): void;
@@ -2602,22 +2685,22 @@ declare namespace ts {
scanRange<T>(start: number, length: number, callback: () => T): T;
tryScan<T>(callback: () => T): T;
}
- function tokenToString(t: SyntaxKind): string;
+ function tokenToString(t: SyntaxKind): string | undefined;
function getPositionOfLineAndCharacter(sourceFile: SourceFile, line: number, character: number): number;
- function getLineAndCharacterOfPosition(sourceFile: SourceFile, position: number): LineAndCharacter;
+ function getLineAndCharacterOfPosition(sourceFile: SourceFileLike, position: number): LineAndCharacter;
function isWhiteSpaceLike(ch: number): boolean;
/** Does not include line breaks. For that, see isWhiteSpaceLike. */
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: 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 forEachLeadingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T) => U, state?: T): U | undefined;
+ function forEachTrailingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T) => U, state?: T): U | undefined;
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 getShebang(text: string): string | undefined;
function isIdentifierStart(ch: number, languageVersion: ScriptTarget): boolean;
function isIdentifierPart(ch: number, languageVersion: ScriptTarget): boolean;
function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, languageVariant?: LanguageVariant, text?: string, onError?: ErrorCallback, start?: number, length?: number): Scanner;
@@ -2694,6 +2777,204 @@ declare namespace ts {
* @returns The unescaped identifier text.
*/
function unescapeIdentifier(identifier: string): string;
+ function getNameOfDeclaration(declaration: Declaration): DeclarationName | undefined;
+}
+declare namespace ts {
+ function isNumericLiteral(node: Node): node is NumericLiteral;
+ function isStringLiteral(node: Node): node is StringLiteral;
+ function isJsxText(node: Node): node is JsxText;
+ function isRegularExpressionLiteral(node: Node): node is RegularExpressionLiteral;
+ function isNoSubstitutionTemplateLiteral(node: Node): node is LiteralExpression;
+ function isTemplateHead(node: Node): node is TemplateHead;
+ function isTemplateMiddle(node: Node): node is TemplateMiddle;
+ function isTemplateTail(node: Node): node is TemplateTail;
+ function isIdentifier(node: Node): node is Identifier;
+ function isQualifiedName(node: Node): node is QualifiedName;
+ function isComputedPropertyName(node: Node): node is ComputedPropertyName;
+ function isTypeParameterDeclaration(node: Node): node is TypeParameterDeclaration;
+ function isParameter(node: Node): node is ParameterDeclaration;
+ function isDecorator(node: Node): node is Decorator;
+ function isPropertySignature(node: Node): node is PropertySignature;
+ function isPropertyDeclaration(node: Node): node is PropertyDeclaration;
+ function isMethodSignature(node: Node): node is MethodSignature;
+ function isMethodDeclaration(node: Node): node is MethodDeclaration;
+ function isConstructorDeclaration(node: Node): node is ConstructorDeclaration;
+ function isGetAccessorDeclaration(node: Node): node is GetAccessorDeclaration;
+ function isSetAccessorDeclaration(node: Node): node is SetAccessorDeclaration;
+ function isCallSignatureDeclaration(node: Node): node is CallSignatureDeclaration;
+ function isConstructSignatureDeclaration(node: Node): node is ConstructSignatureDeclaration;
+ function isIndexSignatureDeclaration(node: Node): node is IndexSignatureDeclaration;
+ function isTypePredicateNode(node: Node): node is TypePredicateNode;
+ function isTypeReferenceNode(node: Node): node is TypeReferenceNode;
+ function isFunctionTypeNode(node: Node): node is FunctionTypeNode;
+ function isConstructorTypeNode(node: Node): node is ConstructorTypeNode;
+ function isTypeQueryNode(node: Node): node is TypeQueryNode;
+ function isTypeLiteralNode(node: Node): node is TypeLiteralNode;
+ function isArrayTypeNode(node: Node): node is ArrayTypeNode;
+ function isTupleTypeNode(node: Node): node is TupleTypeNode;
+ function isUnionTypeNode(node: Node): node is UnionTypeNode;
+ function isIntersectionTypeNode(node: Node): node is IntersectionTypeNode;
+ function isParenthesizedTypeNode(node: Node): node is ParenthesizedTypeNode;
+ function isThisTypeNode(node: Node): node is ThisTypeNode;
+ function isTypeOperatorNode(node: Node): node is TypeOperatorNode;
+ function isIndexedAccessTypeNode(node: Node): node is IndexedAccessTypeNode;
+ function isMappedTypeNode(node: Node): node is MappedTypeNode;
+ function isLiteralTypeNode(node: Node): node is LiteralTypeNode;
+ function isObjectBindingPattern(node: Node): node is ObjectBindingPattern;
+ function isArrayBindingPattern(node: Node): node is ArrayBindingPattern;
+ function isBindingElement(node: Node): node is BindingElement;
+ 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 isCallExpression(node: Node): node is CallExpression;
+ function isNewExpression(node: Node): node is NewExpression;
+ function isTaggedTemplateExpression(node: Node): node is TaggedTemplateExpression;
+ function isTypeAssertion(node: Node): node is TypeAssertion;
+ function isParenthesizedExpression(node: Node): node is ParenthesizedExpression;
+ function isFunctionExpression(node: Node): node is FunctionExpression;
+ function isArrowFunction(node: Node): node is ArrowFunction;
+ function isDeleteExpression(node: Node): node is DeleteExpression;
+ function isTypeOfExpression(node: Node): node is TypeOfExpression;
+ function isVoidExpression(node: Node): node is VoidExpression;
+ function isAwaitExpression(node: Node): node is AwaitExpression;
+ function isPrefixUnaryExpression(node: Node): node is PrefixUnaryExpression;
+ function isPostfixUnaryExpression(node: Node): node is PostfixUnaryExpression;
+ function isBinaryExpression(node: Node): node is BinaryExpression;
+ function isConditionalExpression(node: Node): node is ConditionalExpression;
+ function isTemplateExpression(node: Node): node is TemplateExpression;
+ function isYieldExpression(node: Node): node is YieldExpression;
+ function isSpreadElement(node: Node): node is SpreadElement;
+ function isClassExpression(node: Node): node is ClassExpression;
+ function isOmittedExpression(node: Node): node is OmittedExpression;
+ function isExpressionWithTypeArguments(node: Node): node is ExpressionWithTypeArguments;
+ function isAsExpression(node: Node): node is AsExpression;
+ function isNonNullExpression(node: Node): node is NonNullExpression;
+ function isMetaProperty(node: Node): node is MetaProperty;
+ function isTemplateSpan(node: Node): node is TemplateSpan;
+ function isSemicolonClassElement(node: Node): node is SemicolonClassElement;
+ function isBlock(node: Node): node is Block;
+ function isVariableStatement(node: Node): node is VariableStatement;
+ function isEmptyStatement(node: Node): node is EmptyStatement;
+ function isExpressionStatement(node: Node): node is ExpressionStatement;
+ function isIfStatement(node: Node): node is IfStatement;
+ function isDoStatement(node: Node): node is DoStatement;
+ function isWhileStatement(node: Node): node is WhileStatement;
+ function isForStatement(node: Node): node is ForStatement;
+ function isForInStatement(node: Node): node is ForInStatement;
+ function isForOfStatement(node: Node): node is ForOfStatement;
+ function isContinueStatement(node: Node): node is ContinueStatement;
+ function isBreakStatement(node: Node): node is BreakStatement;
+ function isReturnStatement(node: Node): node is ReturnStatement;
+ function isWithStatement(node: Node): node is WithStatement;
+ function isSwitchStatement(node: Node): node is SwitchStatement;
+ function isLabeledStatement(node: Node): node is LabeledStatement;
+ function isThrowStatement(node: Node): node is ThrowStatement;
+ function isTryStatement(node: Node): node is TryStatement;
+ function isDebuggerStatement(node: Node): node is DebuggerStatement;
+ function isVariableDeclaration(node: Node): node is VariableDeclaration;
+ function isVariableDeclarationList(node: Node): node is VariableDeclarationList;
+ function isFunctionDeclaration(node: Node): node is FunctionDeclaration;
+ function isClassDeclaration(node: Node): node is ClassDeclaration;
+ function isInterfaceDeclaration(node: Node): node is InterfaceDeclaration;
+ function isTypeAliasDeclaration(node: Node): node is TypeAliasDeclaration;
+ function isEnumDeclaration(node: Node): node is EnumDeclaration;
+ function isModuleDeclaration(node: Node): node is ModuleDeclaration;
+ function isModuleBlock(node: Node): node is ModuleBlock;
+ function isCaseBlock(node: Node): node is CaseBlock;
+ function isNamespaceExportDeclaration(node: Node): node is NamespaceExportDeclaration;
+ function isImportEqualsDeclaration(node: Node): node is ImportEqualsDeclaration;
+ function isImportDeclaration(node: Node): node is ImportDeclaration;
+ function isImportClause(node: Node): node is ImportClause;
+ function isNamespaceImport(node: Node): node is NamespaceImport;
+ function isNamedImports(node: Node): node is NamedImports;
+ function isImportSpecifier(node: Node): node is ImportSpecifier;
+ function isExportAssignment(node: Node): node is ExportAssignment;
+ function isExportDeclaration(node: Node): node is ExportDeclaration;
+ function isNamedExports(node: Node): node is NamedExports;
+ function isExportSpecifier(node: Node): node is ExportSpecifier;
+ function isMissingDeclaration(node: Node): node is MissingDeclaration;
+ function isExternalModuleReference(node: Node): node is ExternalModuleReference;
+ function isJsxElement(node: Node): node is JsxElement;
+ function isJsxSelfClosingElement(node: Node): node is JsxSelfClosingElement;
+ function isJsxOpeningElement(node: Node): node is JsxOpeningElement;
+ function isJsxClosingElement(node: Node): node is JsxClosingElement;
+ function isJsxAttribute(node: Node): node is JsxAttribute;
+ function isJsxAttributes(node: Node): node is JsxAttributes;
+ function isJsxSpreadAttribute(node: Node): node is JsxSpreadAttribute;
+ function isJsxExpression(node: Node): node is JsxExpression;
+ function isCaseClause(node: Node): node is CaseClause;
+ function isDefaultClause(node: Node): node is DefaultClause;
+ 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 isSpreadAssignment(node: Node): node is SpreadAssignment;
+ function isEnumMember(node: Node): node is EnumMember;
+ function isSourceFile(node: Node): node is SourceFile;
+ function isBundle(node: Node): node is Bundle;
+ function isJSDocTypeExpression(node: Node): node is JSDocTypeExpression;
+ function isJSDocAllType(node: JSDocAllType): node is JSDocAllType;
+ function isJSDocUnknownType(node: Node): node is JSDocUnknownType;
+ function isJSDocArrayType(node: Node): node is JSDocArrayType;
+ function isJSDocUnionType(node: Node): node is JSDocUnionType;
+ function isJSDocTupleType(node: Node): node is JSDocTupleType;
+ function isJSDocNullableType(node: Node): node is JSDocNullableType;
+ function isJSDocNonNullableType(node: Node): node is JSDocNonNullableType;
+ function isJSDocRecordType(node: Node): node is JSDocRecordType;
+ function isJSDocRecordMember(node: Node): node is JSDocRecordMember;
+ function isJSDocTypeReference(node: Node): node is JSDocTypeReference;
+ function isJSDocOptionalType(node: Node): node is JSDocOptionalType;
+ function isJSDocFunctionType(node: Node): node is JSDocFunctionType;
+ function isJSDocVariadicType(node: Node): node is JSDocVariadicType;
+ function isJSDocConstructorType(node: Node): node is JSDocConstructorType;
+ function isJSDocThisType(node: Node): node is JSDocThisType;
+ function isJSDoc(node: Node): node is JSDoc;
+ function isJSDocAugmentsTag(node: Node): node is JSDocAugmentsTag;
+ function isJSDocParameterTag(node: Node): node is JSDocParameterTag;
+ function isJSDocReturnTag(node: Node): node is JSDocReturnTag;
+ function isJSDocTypeTag(node: Node): node is JSDocTypeTag;
+ function isJSDocTemplateTag(node: Node): node is JSDocTemplateTag;
+ function isJSDocTypedefTag(node: Node): node is JSDocTypedefTag;
+ function isJSDocPropertyTag(node: Node): node is JSDocPropertyTag;
+ function isJSDocTypeLiteral(node: Node): node is JSDocTypeLiteral;
+ function isJSDocLiteralType(node: Node): node is JSDocLiteralType;
+}
+declare namespace ts {
+ /**
+ * True if node is of some token syntax kind.
+ * For example, this is true for an IfKeyword but not for an IfStatement.
+ */
+ function isToken(n: Node): boolean;
+ function isLiteralExpression(node: Node): node is LiteralExpression;
+ function isTemplateMiddleOrTemplateTail(node: Node): node is TemplateMiddle | TemplateTail;
+ function isModifier(node: Node): node is Modifier;
+ function isEntityName(node: Node): node is EntityName;
+ function isPropertyName(node: Node): node is PropertyName;
+ function isBindingName(node: Node): node is BindingName;
+ function isFunctionLike(node: Node): node is FunctionLikeDeclaration;
+ function isClassElement(node: Node): node is ClassElement;
+ function isClassLike(node: Node): node is ClassLikeDeclaration;
+ function isAccessor(node: Node): node is AccessorDeclaration;
+ function isTypeElement(node: Node): node is TypeElement;
+ function isObjectLiteralElementLike(node: Node): node is ObjectLiteralElementLike;
+ /**
+ * Node test that determines whether a node is a valid type node.
+ * This differs from the `isPartOfTypeNode` function which determines whether a node is *part*
+ * of a TypeNode.
+ */
+ function isTypeNode(node: Node): node is TypeNode;
+ function isFunctionOrConstructorTypeNode(node: Node): node is FunctionTypeNode | ConstructorTypeNode;
+ function isPropertyAccessOrQualifiedName(node: Node): node is PropertyAccessExpression | QualifiedName;
+ function isCallLikeExpression(node: Node): node is CallLikeExpression;
+ function isCallOrNewExpression(node: Node): node is CallExpression | NewExpression;
+ function isTemplateLiteral(node: Node): node is TemplateLiteral;
+ function isAssertionExpression(node: Node): node is AssertionExpression;
+ function isIterationStatement(node: Node, lookInLabeledStatements: boolean): node is IterationStatement;
+ function isJsxOpeningLikeElement(node: Node): node is JsxOpeningLikeElement;
+ function isCaseOrDefaultClause(node: Node): node is CaseOrDefaultClause;
+ /** True if node is of a kind that may contain comment text. */
+ function isJSDocCommentContainingNode(node: Node): boolean;
}
declare namespace ts {
/**
@@ -2708,6 +2989,7 @@ declare namespace ts {
function createLiteral(value: string | number | boolean): PrimaryExpression;
function createNumericLiteral(value: string): NumericLiteral;
function createIdentifier(text: string): Identifier;
+ function updateIdentifier(node: Identifier, typeArguments: NodeArray<TypeNode> | undefined): Identifier;
/** Create a unique temporary variable. */
function createTempVariable(recordTempVariable: ((node: Identifier) => void) | undefined): Identifier;
/** Create a unique temporary variable for use in a loop. */
@@ -2726,63 +3008,65 @@ declare namespace ts {
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 createTypeParameterDeclaration(name: string | Identifier, constraint?: TypeNode, defaultType?: TypeNode): TypeParameterDeclaration;
+ function updateTypeParameterDeclaration(node: TypeParameterDeclaration, name: Identifier, constraint: TypeNode | undefined, defaultType: TypeNode | undefined): TypeParameterDeclaration;
+ 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 createPropertySignature(modifiers: Modifier[] | undefined, name: PropertyName | string, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertySignature;
+ function updatePropertySignature(node: PropertySignature, modifiers: Modifier[] | undefined, name: PropertyName, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertySignature;
+ function createProperty(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertyDeclaration;
+ function updateProperty(node: PropertyDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: PropertyName, type: TypeNode | undefined, initializer: Expression | undefined): PropertyDeclaration;
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 createMethod(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 createCallSignature(typeParameters: TypeParameterDeclaration[] | undefined, parameters: ParameterDeclaration[], type: TypeNode | undefined): CallSignatureDeclaration;
+ function updateCallSignature(node: CallSignatureDeclaration, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined): CallSignatureDeclaration;
+ function createConstructSignature(typeParameters: TypeParameterDeclaration[] | undefined, parameters: ParameterDeclaration[], type: TypeNode | undefined): ConstructSignatureDeclaration;
+ function updateConstructSignature(node: ConstructSignatureDeclaration, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined): ConstructSignatureDeclaration;
+ function createIndexSignature(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, parameters: ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration;
+ function updateIndexSignature(node: IndexSignatureDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, parameters: ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration;
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 createTypeReferenceNode(typeName: string | EntityName, typeArguments: TypeNode[] | undefined): TypeReferenceNode;
+ function updateTypeReferenceNode(node: TypeReferenceNode, typeName: EntityName, typeArguments: NodeArray<TypeNode> | undefined): TypeReferenceNode;
+ 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 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 createArrayTypeNode(elementType: TypeNode): ArrayTypeNode;
+ function updateArrayTypeNode(node: ArrayTypeNode, elementType: TypeNode): ArrayTypeNode;
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 createUnionTypeNode(types: TypeNode[]): UnionTypeNode;
+ function updateUnionTypeNode(node: UnionTypeNode, types: NodeArray<TypeNode>): UnionTypeNode;
+ function createIntersectionTypeNode(types: TypeNode[]): IntersectionTypeNode;
+ function updateIntersectionTypeNode(node: IntersectionTypeNode, types: NodeArray<TypeNode>): IntersectionTypeNode;
+ function createUnionOrIntersectionTypeNode(kind: SyntaxKind.UnionType | SyntaxKind.IntersectionType, types: TypeNode[]): UnionTypeNode | IntersectionTypeNode;
+ function createParenthesizedType(type: TypeNode): ParenthesizedTypeNode;
+ function updateParenthesizedType(node: ParenthesizedTypeNode, type: TypeNode): ParenthesizedTypeNode;
+ function createThisTypeNode(): ThisTypeNode;
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 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 createLiteralTypeNode(literal: Expression): LiteralTypeNode;
+ function updateLiteralTypeNode(node: LiteralTypeNode, literal: Expression): LiteralTypeNode;
function createObjectBindingPattern(elements: BindingElement[]): ObjectBindingPattern;
function updateObjectBindingPattern(node: ObjectBindingPattern, elements: BindingElement[]): ObjectBindingPattern;
function createArrayBindingPattern(elements: ArrayBindingElement[]): ArrayBindingPattern;
@@ -2824,7 +3108,7 @@ declare namespace ts {
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 updateBinary(node: BinaryExpression, left: Expression, right: Expression, operator?: BinaryOperator | BinaryOperatorToken): 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;
@@ -2844,16 +3128,15 @@ declare namespace ts {
function updateAsExpression(node: AsExpression, expression: Expression, type: TypeNode): AsExpression;
function createNonNullExpression(expression: Expression): NonNullExpression;
function updateNonNullExpression(node: NonNullExpression, expression: Expression): NonNullExpression;
+ function createMetaProperty(keywordToken: MetaProperty["keywordToken"], name: Identifier): MetaProperty;
+ function updateMetaProperty(node: MetaProperty, name: Identifier): MetaProperty;
function createTemplateSpan(expression: Expression, literal: TemplateMiddle | TemplateTail): TemplateSpan;
function updateTemplateSpan(node: TemplateSpan, expression: Expression, literal: TemplateMiddle | TemplateTail): TemplateSpan;
+ function createSemicolonClassElement(): SemicolonClassElement;
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;
@@ -2885,10 +3168,19 @@ declare namespace ts {
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 createDebuggerStatement(): DebuggerStatement;
+ function createVariableDeclaration(name: string | BindingName, type?: TypeNode, initializer?: Expression): VariableDeclaration;
+ function updateVariableDeclaration(node: VariableDeclaration, name: BindingName, type: TypeNode | undefined, initializer: Expression | undefined): VariableDeclaration;
+ function createVariableDeclarationList(declarations: VariableDeclaration[], flags?: NodeFlags): VariableDeclarationList;
+ function updateVariableDeclarationList(node: VariableDeclarationList, declarations: VariableDeclaration[]): VariableDeclarationList;
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 createInterfaceDeclaration(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: string | Identifier, typeParameters: TypeParameterDeclaration[] | undefined, heritageClauses: HeritageClause[] | undefined, members: TypeElement[]): InterfaceDeclaration;
+ function updateInterfaceDeclaration(node: InterfaceDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: Identifier, typeParameters: TypeParameterDeclaration[] | undefined, heritageClauses: HeritageClause[] | undefined, members: TypeElement[]): InterfaceDeclaration;
+ function createTypeAliasDeclaration(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: string | Identifier, typeParameters: TypeParameterDeclaration[] | undefined, type: TypeNode): TypeAliasDeclaration;
+ function updateTypeAliasDeclaration(node: TypeAliasDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: Identifier, typeParameters: TypeParameterDeclaration[] | undefined, type: TypeNode): TypeAliasDeclaration;
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;
@@ -2897,12 +3189,14 @@ declare namespace ts {
function updateModuleBlock(node: ModuleBlock, statements: Statement[]): ModuleBlock;
function createCaseBlock(clauses: CaseOrDefaultClause[]): CaseBlock;
function updateCaseBlock(node: CaseBlock, clauses: CaseOrDefaultClause[]): CaseBlock;
+ function createNamespaceExportDeclaration(name: string | Identifier): NamespaceExportDeclaration;
+ function updateNamespaceExportDeclaration(node: NamespaceExportDeclaration, name: Identifier): NamespaceExportDeclaration;
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 createImportClause(name: Identifier | undefined, namedBindings: NamedImportBindings | undefined): ImportClause;
+ function updateImportClause(node: ImportClause, name: Identifier | undefined, namedBindings: NamedImportBindings | undefined): ImportClause;
function createNamespaceImport(name: Identifier): NamespaceImport;
function updateNamespaceImport(node: NamespaceImport, name: Identifier): NamespaceImport;
function createNamedImports(elements: ImportSpecifier[]): NamedImports;
@@ -2927,20 +3221,20 @@ declare namespace ts {
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 createJsxAttributes(properties: JsxAttributeLike[]): JsxAttributes;
+ function updateJsxAttributes(node: JsxAttributes, properties: JsxAttributeLike[]): JsxAttributes;
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 createHeritageClause(token: HeritageClause["token"], types: ExpressionWithTypeArguments[]): HeritageClause;
+ function updateHeritageClause(node: HeritageClause, types: ExpressionWithTypeArguments[]): HeritageClause;
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;
@@ -2973,8 +3267,12 @@ declare namespace ts {
*/
function createPartiallyEmittedExpression(expression: Expression, original?: Node): PartiallyEmittedExpression;
function updatePartiallyEmittedExpression(node: PartiallyEmittedExpression, expression: Expression): PartiallyEmittedExpression;
+ function createCommaList(elements: Expression[]): CommaListExpression;
+ function updateCommaList(node: CommaListExpression, elements: Expression[]): CommaListExpression;
function createBundle(sourceFiles: SourceFile[]): Bundle;
function updateBundle(node: Bundle, sourceFiles: SourceFile[]): Bundle;
+ function createImmediatelyInvokedFunctionExpression(statements: Statement[]): CallExpression;
+ function createImmediatelyInvokedFunctionExpression(statements: Statement[], param: ParameterDeclaration, paramValue: Expression): CallExpression;
function createComma(left: Expression, right: Expression): Expression;
function createLessThan(left: Expression, right: Expression): Expression;
function createAssignment(left: ObjectLiteralExpression | ArrayLiteralExpression, right: Expression): DestructuringAssignment;
@@ -3007,19 +3305,23 @@ declare namespace ts {
/**
* Gets a custom text range to use when emitting source maps.
*/
- function getSourceMapRange(node: Node): TextRange;
+ function getSourceMapRange(node: Node): SourceMapRange;
/**
* Sets a custom text range to use when emitting source maps.
*/
- function setSourceMapRange<T extends Node>(node: T, range: TextRange | undefined): T;
+ function setSourceMapRange<T extends Node>(node: T, range: SourceMapRange | undefined): T;
+ /**
+ * Create an external source map source file reference
+ */
+ function createSourceMapSource(fileName: string, text: string, skipTrivia?: (pos: number) => number): SourceMapSource;
/**
* Gets the TextRange to use for source maps for a token of a node.
*/
- function getTokenSourceMapRange(node: Node, token: SyntaxKind): TextRange | undefined;
+ function getTokenSourceMapRange(node: Node, token: SyntaxKind): SourceMapRange | 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;
+ function setTokenSourceMapRange<T extends Node>(node: T, token: SyntaxKind, range: SourceMapRange | undefined): T;
/**
* Gets a custom text range to use when emitting comments.
*/
@@ -3037,11 +3339,11 @@ declare namespace ts {
/**
* Gets the constant value to emit for an expression.
*/
- function getConstantValue(node: PropertyAccessExpression | ElementAccessExpression): number;
+ function getConstantValue(node: PropertyAccessExpression | ElementAccessExpression): string | number;
/**
* Sets the constant value to emit for an expression.
*/
- function setConstantValue(node: PropertyAccessExpression | ElementAccessExpression, value: number): PropertyAccessExpression | ElementAccessExpression;
+ function setConstantValue(node: PropertyAccessExpression | ElementAccessExpression, value: string | number): PropertyAccessExpression | ElementAccessExpression;
/**
* Adds an EmitHelper to a node.
*/
@@ -3066,17 +3368,23 @@ declare namespace ts {
}
declare namespace ts {
function createNode(kind: SyntaxKind, pos?: number, end?: number): Node;
- function forEachChild<T>(node: Node, cbNode: (node: Node) => T, cbNodeArray?: (nodes: Node[]) => T): T;
+ /**
+ * Invokes a callback for each child of the given node. The 'cbNode' callback is invoked for all child nodes
+ * stored in properties. If a 'cbNodes' callback is specified, it is invoked for embedded arrays; otherwise,
+ * embedded arrays are flattened and the 'cbNode' callback is invoked for each element. If a callback returns
+ * a truthy value, iteration stops and that value is returned. Otherwise, undefined is returned.
+ *
+ * @param node a given node to visit its children
+ * @param cbNode a callback to be invoked for all child nodes
+ * @param cbNodeArray a callback to be invoked for embedded array
+ */
+ function forEachChild<T>(node: Node, cbNode: (node: Node) => T | undefined, cbNodeArray?: (nodes: NodeArray<Node>) => T | undefined): T | undefined;
function createSourceFile(fileName: string, sourceText: string, languageVersion: ScriptTarget, setParentNodes?: boolean, scriptKind?: ScriptKind): SourceFile;
function parseIsolatedEntityName(text: string, languageVersion: ScriptTarget): EntityName;
function isExternalModule(file: SourceFile): boolean;
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;
@@ -3215,7 +3523,21 @@ declare namespace ts {
getNewLine(): string;
}
function formatDiagnostics(diagnostics: Diagnostic[], host: FormatDiagnosticsHost): string;
+ function formatDiagnosticsWithColorAndContext(diagnostics: Diagnostic[], host: FormatDiagnosticsHost): string;
function flattenDiagnosticMessageText(messageText: string | DiagnosticMessageChain, newLine: string): string;
+ /**
+ * Create a new 'Program' instance. A Program is an immutable collection of 'SourceFile's and a 'CompilerOptions'
+ * that represent a compilation unit.
+ *
+ * Creating a program proceeds from a set of root files, expanding the set of inputs by following imports and
+ * triple-slash-reference-path directives transitively. '@types' and triple-slash-reference-types are also pulled in.
+ *
+ * @param rootNames - A set of root files.
+ * @param options - The compiler options which should be used.
+ * @param host - The host interacts with the underlying file system.
+ * @param oldProgram - Reuses an old program structure.
+ * @returns A 'Program' object.
+ */
function createProgram(rootNames: string[], options: CompilerOptions, host?: CompilerHost, oldProgram?: Program): Program;
}
declare namespace ts {
@@ -3243,9 +3565,10 @@ declare namespace ts {
* @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
+ * @param resolutionStack Only present for backwards-compatibility. Should be empty.
*/
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 | undefined;
+ function convertCompileOnSaveOptionFromJson(jsonOption: any, basePath: string, errors: Diagnostic[]): boolean;
function convertCompilerOptionsFromJson(jsonOptions: any, basePath: string, configFileName?: string): {
options: CompilerOptions;
errors: Diagnostic[];
@@ -3271,31 +3594,31 @@ 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;
+ forEachChild<T>(cbNode: (node: Node) => T | undefined, cbNodeArray?: (nodes: NodeArray<Node>) => T | undefined): T | undefined;
}
interface Symbol {
getFlags(): SymbolFlags;
getName(): string;
- getDeclarations(): Declaration[];
+ getDeclarations(): Declaration[] | undefined;
getDocumentationComment(): SymbolDisplayPart[];
getJsDocTags(): JSDocTagInfo[];
}
interface Type {
getFlags(): TypeFlags;
- getSymbol(): Symbol;
+ getSymbol(): Symbol | undefined;
getProperties(): Symbol[];
- getProperty(propertyName: string): Symbol;
+ getProperty(propertyName: string): Symbol | undefined;
getApparentProperties(): Symbol[];
getCallSignatures(): Signature[];
getConstructSignatures(): Signature[];
- getStringIndexType(): Type;
- getNumberIndexType(): Type;
- getBaseTypes(): BaseType[];
+ getStringIndexType(): Type | undefined;
+ getNumberIndexType(): Type | undefined;
+ getBaseTypes(): BaseType[] | undefined;
getNonNullableType(): Type;
}
interface Signature {
getDeclaration(): SignatureDeclaration;
- getTypeParameters(): TypeParameter[];
+ getTypeParameters(): TypeParameter[] | undefined;
getParameters(): Symbol[];
getReturnType(): Type;
getDocumentationComment(): SymbolDisplayPart[];
@@ -3311,6 +3634,9 @@ declare namespace ts {
interface SourceFileLike {
getLineAndCharacterOfPosition(pos: number): LineAndCharacter;
}
+ interface SourceMapSource {
+ 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
@@ -3419,6 +3745,8 @@ declare namespace ts {
getDocCommentTemplateAtPosition(fileName: string, position: number): TextInsertion;
isValidBraceCompletionAtPosition(fileName: string, position: number, openingBrace: number): boolean;
getCodeFixesAtPosition(fileName: string, start: number, end: number, errorCodes: number[], formatOptions: FormatCodeSettings): CodeAction[];
+ getApplicableRefactors(fileName: string, positionOrRaneg: number | TextRange): ApplicableRefactorInfo[];
+ getEditsForRefactor(fileName: string, formatOptions: FormatCodeSettings, positionOrRange: number | TextRange, refactorName: string, actionName: string): RefactorEditInfo | undefined;
getEmitOutput(fileName: string, emitOnlyDtsFiles?: boolean): EmitOutput;
getProgram(): Program;
dispose(): void;
@@ -3489,6 +3817,54 @@ declare namespace ts {
/** Text changes to apply to each file as part of the code action */
changes: FileTextChanges[];
}
+ /**
+ * A set of one or more available refactoring actions, grouped under a parent refactoring.
+ */
+ interface ApplicableRefactorInfo {
+ /**
+ * The programmatic name of the refactoring
+ */
+ name: string;
+ /**
+ * A description of this refactoring category to show to the user.
+ * If the refactoring gets inlined (see below), this text will not be visible.
+ */
+ description: string;
+ /**
+ * Inlineable refactorings can have their actions hoisted out to the top level
+ * of a context menu. Non-inlineanable refactorings should always be shown inside
+ * their parent grouping.
+ *
+ * If not specified, this value is assumed to be 'true'
+ */
+ inlineable?: boolean;
+ actions: RefactorActionInfo[];
+ }
+ /**
+ * Represents a single refactoring action - for example, the "Extract Method..." refactor might
+ * offer several actions, each corresponding to a surround class or closure to extract into.
+ */
+ type RefactorActionInfo = {
+ /**
+ * The programmatic name of the refactoring action
+ */
+ name: string;
+ /**
+ * A description of this refactoring action to show to the user.
+ * If the parent refactoring is inlined away, this will be the only text shown,
+ * so this description should make sense by itself if the parent is inlineable=true
+ */
+ description: string;
+ };
+ /**
+ * A set of edits to make in response to a refactor action, plus an optional
+ * location where renaming should be invoked from
+ */
+ type RefactorEditInfo = {
+ edits: FileTextChanges[];
+ renameFilename?: string;
+ renameLocation?: number;
+ };
interface TextInsertion {
newText: string;
/** The position in newText the caret should point to after the insertion. */
@@ -4003,6 +4379,7 @@ declare namespace ts {
reportDiagnostics?: boolean;
moduleName?: string;
renamedDependencies?: MapLike<string>;
+ transformers?: CustomTransformers;
}
interface TranspileOutput {
outputText: string;
@@ -4042,5 +4419,5 @@ declare namespace ts {
*/
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/typedoc/node_modules/typescript/lib/typescript.js b/node_modules/typedoc/node_modules/typescript/lib/typescript.js
index 40ab60cd3..165d17f48 100644
--- a/node_modules/typedoc/node_modules/typescript/lib/typescript.js
+++ b/node_modules/typedoc/node_modules/typescript/lib/typescript.js
@@ -1,18 +1,18 @@
-/*! *****************************************************************************
-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.
+***************************************************************************** */
+
var __assign = (this && this.__assign) || Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
@@ -352,23 +352,25 @@ var ts;
SyntaxKind[SyntaxKind["JSDocComment"] = 283] = "JSDocComment";
SyntaxKind[SyntaxKind["JSDocTag"] = 284] = "JSDocTag";
SyntaxKind[SyntaxKind["JSDocAugmentsTag"] = 285] = "JSDocAugmentsTag";
- SyntaxKind[SyntaxKind["JSDocParameterTag"] = 286] = "JSDocParameterTag";
- SyntaxKind[SyntaxKind["JSDocReturnTag"] = 287] = "JSDocReturnTag";
- SyntaxKind[SyntaxKind["JSDocTypeTag"] = 288] = "JSDocTypeTag";
- SyntaxKind[SyntaxKind["JSDocTemplateTag"] = 289] = "JSDocTemplateTag";
- SyntaxKind[SyntaxKind["JSDocTypedefTag"] = 290] = "JSDocTypedefTag";
- SyntaxKind[SyntaxKind["JSDocPropertyTag"] = 291] = "JSDocPropertyTag";
- SyntaxKind[SyntaxKind["JSDocTypeLiteral"] = 292] = "JSDocTypeLiteral";
- SyntaxKind[SyntaxKind["JSDocLiteralType"] = 293] = "JSDocLiteralType";
+ SyntaxKind[SyntaxKind["JSDocClassTag"] = 286] = "JSDocClassTag";
+ SyntaxKind[SyntaxKind["JSDocParameterTag"] = 287] = "JSDocParameterTag";
+ SyntaxKind[SyntaxKind["JSDocReturnTag"] = 288] = "JSDocReturnTag";
+ SyntaxKind[SyntaxKind["JSDocTypeTag"] = 289] = "JSDocTypeTag";
+ SyntaxKind[SyntaxKind["JSDocTemplateTag"] = 290] = "JSDocTemplateTag";
+ SyntaxKind[SyntaxKind["JSDocTypedefTag"] = 291] = "JSDocTypedefTag";
+ SyntaxKind[SyntaxKind["JSDocPropertyTag"] = 292] = "JSDocPropertyTag";
+ SyntaxKind[SyntaxKind["JSDocTypeLiteral"] = 293] = "JSDocTypeLiteral";
+ SyntaxKind[SyntaxKind["JSDocLiteralType"] = 294] = "JSDocLiteralType";
// Synthesized list
- SyntaxKind[SyntaxKind["SyntaxList"] = 294] = "SyntaxList";
+ SyntaxKind[SyntaxKind["SyntaxList"] = 295] = "SyntaxList";
// Transformation nodes
- SyntaxKind[SyntaxKind["NotEmittedStatement"] = 295] = "NotEmittedStatement";
- SyntaxKind[SyntaxKind["PartiallyEmittedExpression"] = 296] = "PartiallyEmittedExpression";
- SyntaxKind[SyntaxKind["MergeDeclarationMarker"] = 297] = "MergeDeclarationMarker";
- SyntaxKind[SyntaxKind["EndOfDeclarationMarker"] = 298] = "EndOfDeclarationMarker";
+ SyntaxKind[SyntaxKind["NotEmittedStatement"] = 296] = "NotEmittedStatement";
+ SyntaxKind[SyntaxKind["PartiallyEmittedExpression"] = 297] = "PartiallyEmittedExpression";
+ SyntaxKind[SyntaxKind["CommaListExpression"] = 298] = "CommaListExpression";
+ SyntaxKind[SyntaxKind["MergeDeclarationMarker"] = 299] = "MergeDeclarationMarker";
+ SyntaxKind[SyntaxKind["EndOfDeclarationMarker"] = 300] = "EndOfDeclarationMarker";
// Enum value count
- SyntaxKind[SyntaxKind["Count"] = 299] = "Count";
+ SyntaxKind[SyntaxKind["Count"] = 301] = "Count";
// Markers
SyntaxKind[SyntaxKind["FirstAssignment"] = 58] = "FirstAssignment";
SyntaxKind[SyntaxKind["LastAssignment"] = 70] = "LastAssignment";
@@ -396,9 +398,9 @@ var ts;
SyntaxKind[SyntaxKind["LastBinaryOperator"] = 70] = "LastBinaryOperator";
SyntaxKind[SyntaxKind["FirstNode"] = 143] = "FirstNode";
SyntaxKind[SyntaxKind["FirstJSDocNode"] = 267] = "FirstJSDocNode";
- SyntaxKind[SyntaxKind["LastJSDocNode"] = 293] = "LastJSDocNode";
- SyntaxKind[SyntaxKind["FirstJSDocTagNode"] = 283] = "FirstJSDocTagNode";
- SyntaxKind[SyntaxKind["LastJSDocTagNode"] = 293] = "LastJSDocTagNode";
+ SyntaxKind[SyntaxKind["LastJSDocNode"] = 294] = "LastJSDocNode";
+ SyntaxKind[SyntaxKind["FirstJSDocTagNode"] = 284] = "FirstJSDocTagNode";
+ SyntaxKind[SyntaxKind["LastJSDocTagNode"] = 294] = "LastJSDocTagNode";
})(SyntaxKind = ts.SyntaxKind || (ts.SyntaxKind = {}));
var NodeFlags;
(function (NodeFlags) {
@@ -422,6 +424,16 @@ var ts;
NodeFlags[NodeFlags["JavaScriptFile"] = 65536] = "JavaScriptFile";
NodeFlags[NodeFlags["ThisNodeOrAnySubNodesHasError"] = 131072] = "ThisNodeOrAnySubNodesHasError";
NodeFlags[NodeFlags["HasAggregatedChildData"] = 262144] = "HasAggregatedChildData";
+ // This flag will be set when the parser encounters a dynamic import expression so that module resolution
+ // will not have to walk the tree if the flag is not set. However, this flag is just a approximation because
+ // once it is set, the flag never gets cleared (hence why it's named "PossiblyContainsDynamicImport").
+ // During editing, if dynamic import is removed, incremental parsing will *NOT* update this flag. This means that the tree will always be traversed
+ // during module resolution. However, the removal operation should not occur often and in the case of the
+ // removal, it is likely that users will add the import anyway.
+ // The advantage of this approach is its simplicity. For the case of batch compilation,
+ // we guarantee that users won't have to pay the price of walking the tree if a dynamic import isn't used.
+ /* @internal */
+ NodeFlags[NodeFlags["PossiblyContainsDynamicImport"] = 524288] = "PossiblyContainsDynamicImport";
NodeFlags[NodeFlags["BlockScoped"] = 3] = "BlockScoped";
NodeFlags[NodeFlags["ReachabilityCheckFlags"] = 384] = "ReachabilityCheckFlags";
NodeFlags[NodeFlags["ReachabilityAndEmitFlags"] = 1408] = "ReachabilityAndEmitFlags";
@@ -512,6 +524,13 @@ var ts;
return OperationCanceledException;
}());
ts.OperationCanceledException = OperationCanceledException;
+ /* @internal */
+ var StructureIsReused;
+ (function (StructureIsReused) {
+ StructureIsReused[StructureIsReused["Not"] = 0] = "Not";
+ StructureIsReused[StructureIsReused["SafeModules"] = 1] = "SafeModules";
+ StructureIsReused[StructureIsReused["Completely"] = 2] = "Completely";
+ })(StructureIsReused = ts.StructureIsReused || (ts.StructureIsReused = {}));
/** Return code used by getEmitOutput function to indicate status of the function */
var ExitStatus;
(function (ExitStatus) {
@@ -527,29 +546,41 @@ var ts;
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";
+ // Options
+ NodeBuilderFlags[NodeBuilderFlags["NoTruncation"] = 1] = "NoTruncation";
+ NodeBuilderFlags[NodeBuilderFlags["WriteArrayAsGenericType"] = 2] = "WriteArrayAsGenericType";
+ NodeBuilderFlags[NodeBuilderFlags["WriteTypeArgumentsOfSignature"] = 32] = "WriteTypeArgumentsOfSignature";
+ NodeBuilderFlags[NodeBuilderFlags["UseFullyQualifiedType"] = 64] = "UseFullyQualifiedType";
+ NodeBuilderFlags[NodeBuilderFlags["SuppressAnyReturnType"] = 256] = "SuppressAnyReturnType";
+ NodeBuilderFlags[NodeBuilderFlags["WriteTypeParametersInQualifiedName"] = 512] = "WriteTypeParametersInQualifiedName";
+ // Error handling
+ NodeBuilderFlags[NodeBuilderFlags["AllowThisInObjectLiteral"] = 1024] = "AllowThisInObjectLiteral";
+ NodeBuilderFlags[NodeBuilderFlags["AllowQualifedNameInPlaceOfIdentifier"] = 2048] = "AllowQualifedNameInPlaceOfIdentifier";
+ NodeBuilderFlags[NodeBuilderFlags["AllowAnonymousIdentifier"] = 8192] = "AllowAnonymousIdentifier";
+ NodeBuilderFlags[NodeBuilderFlags["AllowEmptyUnionOrIntersection"] = 16384] = "AllowEmptyUnionOrIntersection";
+ NodeBuilderFlags[NodeBuilderFlags["AllowEmptyTuple"] = 32768] = "AllowEmptyTuple";
+ NodeBuilderFlags[NodeBuilderFlags["IgnoreErrors"] = 60416] = "IgnoreErrors";
+ // State
+ NodeBuilderFlags[NodeBuilderFlags["InObjectTypeLiteral"] = 1048576] = "InObjectTypeLiteral";
+ NodeBuilderFlags[NodeBuilderFlags["InTypeAlias"] = 8388608] = "InTypeAlias";
})(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[TypeFormatFlags["UseTypeOfFunction"] = 4] = "UseTypeOfFunction";
+ TypeFormatFlags[TypeFormatFlags["NoTruncation"] = 8] = "NoTruncation";
+ TypeFormatFlags[TypeFormatFlags["WriteArrowStyleSignature"] = 16] = "WriteArrowStyleSignature";
+ TypeFormatFlags[TypeFormatFlags["WriteOwnNameForAnyLike"] = 32] = "WriteOwnNameForAnyLike";
+ TypeFormatFlags[TypeFormatFlags["WriteTypeArgumentsOfSignature"] = 64] = "WriteTypeArgumentsOfSignature";
+ TypeFormatFlags[TypeFormatFlags["InElementType"] = 128] = "InElementType";
+ TypeFormatFlags[TypeFormatFlags["UseFullyQualifiedType"] = 256] = "UseFullyQualifiedType";
+ TypeFormatFlags[TypeFormatFlags["InFirstTypeArgument"] = 512] = "InFirstTypeArgument";
+ TypeFormatFlags[TypeFormatFlags["InTypeAlias"] = 1024] = "InTypeAlias";
+ TypeFormatFlags[TypeFormatFlags["UseTypeAliasValue"] = 2048] = "UseTypeAliasValue";
+ TypeFormatFlags[TypeFormatFlags["SuppressAnyReturnType"] = 4096] = "SuppressAnyReturnType";
+ TypeFormatFlags[TypeFormatFlags["AddUndefined"] = 8192] = "AddUndefined";
+ TypeFormatFlags[TypeFormatFlags["WriteClassExpressionAsTypeLiteral"] = 16384] = "WriteClassExpressionAsTypeLiteral";
})(TypeFormatFlags = ts.TypeFormatFlags || (ts.TypeFormatFlags = {}));
var SymbolFormatFlags;
(function (SymbolFormatFlags) {
@@ -677,6 +708,12 @@ var ts;
SymbolFlags[SymbolFlags["Classifiable"] = 788448] = "Classifiable";
})(SymbolFlags = ts.SymbolFlags || (ts.SymbolFlags = {}));
/* @internal */
+ var EnumKind;
+ (function (EnumKind) {
+ EnumKind[EnumKind["Numeric"] = 0] = "Numeric";
+ EnumKind[EnumKind["Literal"] = 1] = "Literal"; // Literal enum (each member has a TypeFlags.EnumLiteral type)
+ })(EnumKind = ts.EnumKind || (ts.EnumKind = {}));
+ /* @internal */
var CheckFlags;
(function (CheckFlags) {
CheckFlags[CheckFlags["Instantiated"] = 1] = "Instantiated";
@@ -751,7 +788,7 @@ var ts;
TypeFlags[TypeFlags["JsxAttributes"] = 33554432] = "JsxAttributes";
/* @internal */
TypeFlags[TypeFlags["Nullable"] = 6144] = "Nullable";
- TypeFlags[TypeFlags["Literal"] = 480] = "Literal";
+ TypeFlags[TypeFlags["Literal"] = 224] = "Literal";
TypeFlags[TypeFlags["StringOrNumberLiteral"] = 96] = "StringOrNumberLiteral";
/* @internal */
TypeFlags[TypeFlags["DefinitelyFalsy"] = 7392] = "DefinitelyFalsy";
@@ -761,7 +798,7 @@ var ts;
/* @internal */
TypeFlags[TypeFlags["Primitive"] = 8190] = "Primitive";
TypeFlags[TypeFlags["StringLike"] = 262178] = "StringLike";
- TypeFlags[TypeFlags["NumberLike"] = 340] = "NumberLike";
+ TypeFlags[TypeFlags["NumberLike"] = 84] = "NumberLike";
TypeFlags[TypeFlags["BooleanLike"] = 136] = "BooleanLike";
TypeFlags[TypeFlags["EnumLike"] = 272] = "EnumLike";
TypeFlags[TypeFlags["UnionOrIntersection"] = 196608] = "UnionOrIntersection";
@@ -770,7 +807,7 @@ var ts;
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"] = 17810431] = "Narrowable";
+ TypeFlags[TypeFlags["Narrowable"] = 17810175] = "Narrowable";
TypeFlags[TypeFlags["NotUnionOrUnit"] = 16810497] = "NotUnionOrUnit";
/* @internal */
TypeFlags[TypeFlags["RequiresWidening"] = 6291456] = "RequiresWidening";
@@ -801,6 +838,18 @@ var ts;
IndexKind[IndexKind["String"] = 0] = "String";
IndexKind[IndexKind["Number"] = 1] = "Number";
})(IndexKind = ts.IndexKind || (ts.IndexKind = {}));
+ var InferencePriority;
+ (function (InferencePriority) {
+ InferencePriority[InferencePriority["NakedTypeVariable"] = 1] = "NakedTypeVariable";
+ InferencePriority[InferencePriority["MappedType"] = 2] = "MappedType";
+ InferencePriority[InferencePriority["ReturnType"] = 4] = "ReturnType";
+ })(InferencePriority = ts.InferencePriority || (ts.InferencePriority = {}));
+ var InferenceFlags;
+ (function (InferenceFlags) {
+ InferenceFlags[InferenceFlags["InferUnionTypes"] = 1] = "InferUnionTypes";
+ InferenceFlags[InferenceFlags["NoDefault"] = 2] = "NoDefault";
+ InferenceFlags[InferenceFlags["AnyDefault"] = 4] = "AnyDefault";
+ })(InferenceFlags = ts.InferenceFlags || (ts.InferenceFlags = {}));
/* @internal */
var SpecialPropertyAssignmentKind;
(function (SpecialPropertyAssignmentKind) {
@@ -835,6 +884,7 @@ var ts;
ModuleKind[ModuleKind["UMD"] = 3] = "UMD";
ModuleKind[ModuleKind["System"] = 4] = "System";
ModuleKind[ModuleKind["ES2015"] = 5] = "ES2015";
+ ModuleKind[ModuleKind["ESNext"] = 6] = "ESNext";
})(ModuleKind = ts.ModuleKind || (ts.ModuleKind = {}));
var JsxEmit;
(function (JsxEmit) {
@@ -1057,6 +1107,10 @@ var ts;
TransformFlags[TransformFlags["ContainsBindingPattern"] = 8388608] = "ContainsBindingPattern";
TransformFlags[TransformFlags["ContainsYield"] = 16777216] = "ContainsYield";
TransformFlags[TransformFlags["ContainsHoistedDeclarationOrCompletion"] = 33554432] = "ContainsHoistedDeclarationOrCompletion";
+ TransformFlags[TransformFlags["ContainsDynamicImport"] = 67108864] = "ContainsDynamicImport";
+ // Please leave this as 1 << 29.
+ // It is the maximum bit we can set before we outgrow the size of a v8 small integer (SMI) on an x86 system.
+ // It is a good reminder of how much room we have left
TransformFlags[TransformFlags["HasComputedFlags"] = 536870912] = "HasComputedFlags";
// Assertions
// - Bitmasks that are used to assert facts about the syntax of a node and its subtree.
@@ -1110,14 +1164,16 @@ var ts;
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[EmitFlags["InternalName"] = 32768] = "InternalName";
+ EmitFlags[EmitFlags["Indented"] = 65536] = "Indented";
+ EmitFlags[EmitFlags["NoIndentation"] = 131072] = "NoIndentation";
+ EmitFlags[EmitFlags["AsyncFunctionBody"] = 262144] = "AsyncFunctionBody";
+ EmitFlags[EmitFlags["ReuseTempVariableScope"] = 524288] = "ReuseTempVariableScope";
+ EmitFlags[EmitFlags["CustomPrologue"] = 1048576] = "CustomPrologue";
+ EmitFlags[EmitFlags["NoHoisting"] = 2097152] = "NoHoisting";
+ EmitFlags[EmitFlags["HasEndOfDeclarationMarker"] = 4194304] = "HasEndOfDeclarationMarker";
+ EmitFlags[EmitFlags["Iterator"] = 8388608] = "Iterator";
+ EmitFlags[EmitFlags["NoAsciiEscaping"] = 16777216] = "NoAsciiEscaping";
})(EmitFlags = ts.EmitFlags || (ts.EmitFlags = {}));
/**
* Used by the checker, this enum keeps track of external emit helpers that should be type
@@ -1137,17 +1193,23 @@ var ts;
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["Await"] = 2048] = "Await";
+ ExternalEmitHelpers[ExternalEmitHelpers["AsyncGenerator"] = 4096] = "AsyncGenerator";
+ ExternalEmitHelpers[ExternalEmitHelpers["AsyncDelegator"] = 8192] = "AsyncDelegator";
+ ExternalEmitHelpers[ExternalEmitHelpers["AsyncValues"] = 16384] = "AsyncValues";
+ ExternalEmitHelpers[ExternalEmitHelpers["ExportStar"] = 32768] = "ExportStar";
// Helpers included by ES2015 for..of
ExternalEmitHelpers[ExternalEmitHelpers["ForOfIncludes"] = 256] = "ForOfIncludes";
// Helpers included by ES2017 for..await..of
- ExternalEmitHelpers[ExternalEmitHelpers["ForAwaitOfIncludes"] = 8192] = "ForAwaitOfIncludes";
+ ExternalEmitHelpers[ExternalEmitHelpers["ForAwaitOfIncludes"] = 16384] = "ForAwaitOfIncludes";
+ // Helpers included by ES2017 async generators
+ ExternalEmitHelpers[ExternalEmitHelpers["AsyncGeneratorIncludes"] = 6144] = "AsyncGeneratorIncludes";
+ // Helpers included by yield* in ES2017 async generators
+ ExternalEmitHelpers[ExternalEmitHelpers["AsyncDelegatorIncludes"] = 26624] = "AsyncDelegatorIncludes";
// Helpers included by ES2015 spread
ExternalEmitHelpers[ExternalEmitHelpers["SpreadIncludes"] = 1536] = "SpreadIncludes";
ExternalEmitHelpers[ExternalEmitHelpers["FirstEmitHelper"] = 1] = "FirstEmitHelper";
- ExternalEmitHelpers[ExternalEmitHelpers["LastEmitHelper"] = 8192] = "LastEmitHelper";
+ ExternalEmitHelpers[ExternalEmitHelpers["LastEmitHelper"] = 32768] = "LastEmitHelper";
})(ExternalEmitHelpers = ts.ExternalEmitHelpers || (ts.ExternalEmitHelpers = {}));
var EmitHint;
(function (EmitHint) {
@@ -1256,7 +1318,7 @@ var ts;
var ts;
(function (ts) {
/** The version of the TypeScript compiler release */
- ts.version = "2.3.2";
+ ts.version = "2.4.1";
})(ts || (ts = {}));
/* @internal */
(function (ts) {
@@ -1298,10 +1360,11 @@ var ts;
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)
+ for (var key in template) {
if (hasOwnProperty.call(template, key)) {
map.set(key, template[key]);
}
+ }
return map;
}
ts.createMapFromTemplate = createMapFromTemplate;
@@ -1449,12 +1512,6 @@ 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);
@@ -1476,6 +1533,15 @@ var ts;
}
}
ts.zipWith = zipWith;
+ function zipToMap(keys, values) {
+ Debug.assert(keys.length === values.length);
+ var map = createMap();
+ for (var i = 0; i < keys.length; ++i) {
+ map.set(keys[i], values[i]);
+ }
+ return map;
+ }
+ ts.zipToMap = zipToMap;
/**
* Iterates through `array` by index and performs the callback on each element of array until the callback
* returns a falsey value, then returns false.
@@ -1704,6 +1770,47 @@ var ts;
}
ts.flatMap = flatMap;
/**
+ * Maps an array. If the mapped value is an array, it is spread into the result.
+ * Avoids allocation if all elements map to themselves.
+ *
+ * @param array The array to map.
+ * @param mapfn The callback used to map the result into one or more values.
+ */
+ function sameFlatMap(array, mapfn) {
+ var result;
+ if (array) {
+ for (var i = 0; i < array.length; i++) {
+ var item = array[i];
+ var mapped = mapfn(item, i);
+ if (result || item !== mapped || isArray(mapped)) {
+ if (!result) {
+ result = array.slice(0, i);
+ }
+ if (isArray(mapped)) {
+ addRange(result, mapped);
+ }
+ else {
+ result.push(mapped);
+ }
+ }
+ }
+ }
+ return result || array;
+ }
+ ts.sameFlatMap = sameFlatMap;
+ function mapDefined(array, mapFn) {
+ var result = [];
+ for (var i = 0; i < array.length; i++) {
+ var item = array[i];
+ var mapped = mapFn(item, i);
+ if (mapped !== undefined) {
+ result.push(mapped);
+ }
+ }
+ return result;
+ }
+ ts.mapDefined = mapDefined;
+ /**
* Computes the first matching span of elements and returns a tuple of the first span
* and the remaining elements.
*/
@@ -1925,19 +2032,34 @@ var ts;
}
ts.append = append;
/**
+ * Gets the actual offset into an array for a relative offset. Negative offsets indicate a
+ * position offset from the end of the array.
+ */
+ function toOffset(array, offset) {
+ return offset < 0 ? array.length + offset : offset;
+ }
+ /**
* Appends a range of value to an array, returning the array.
*
* @param to The array to which `value` is to be appended. If `to` is `undefined`, a new array
* is created if `value` was appended.
* @param from The values to append to the array. If `from` is `undefined`, nothing is
* appended. If an element of `from` is `undefined`, that element is not appended.
+ * @param start The offset in `from` at which to start copying values.
+ * @param end The offset in `from` at which to stop copying values (non-inclusive).
*/
- function addRange(to, from) {
+ function addRange(to, from, start, end) {
if (from === undefined)
return to;
- for (var _i = 0, from_1 = from; _i < from_1.length; _i++) {
- var v = from_1[_i];
- to = append(to, v);
+ if (to === undefined)
+ return from.slice(start, end);
+ start = start === undefined ? 0 : toOffset(from, start);
+ end = end === undefined ? from.length : toOffset(from, end);
+ for (var i = start; i < end && i < from.length; i++) {
+ var v = from[i];
+ if (v !== undefined) {
+ to.push(from[i]);
+ }
}
return to;
}
@@ -1964,21 +2086,31 @@ var ts;
}
ts.rangeEquals = rangeEquals;
/**
+ * Returns the element at a specific offset in an array if non-empty, `undefined` otherwise.
+ * A negative offset indicates the element should be retrieved from the end of the array.
+ */
+ function elementAt(array, offset) {
+ if (array) {
+ offset = toOffset(array, offset);
+ if (offset < array.length) {
+ return array[offset];
+ }
+ }
+ return undefined;
+ }
+ ts.elementAt = elementAt;
+ /**
* Returns the first element of an array if non-empty, `undefined` otherwise.
*/
function firstOrUndefined(array) {
- return array && array.length > 0
- ? array[0]
- : undefined;
+ return elementAt(array, 0);
}
ts.firstOrUndefined = firstOrUndefined;
/**
* Returns the last element of an array if non-empty, `undefined` otherwise.
*/
function lastOrUndefined(array) {
- return array && array.length > 0
- ? array[array.length - 1]
- : undefined;
+ return elementAt(array, -1);
}
ts.lastOrUndefined = lastOrUndefined;
/**
@@ -2117,10 +2249,11 @@ var ts;
*/
function getOwnKeys(map) {
var keys = [];
- for (var key in map)
+ for (var key in map) {
if (hasOwnProperty.call(map, key)) {
keys.push(key);
}
+ }
return keys;
}
ts.getOwnKeys = getOwnKeys;
@@ -2186,10 +2319,11 @@ var ts;
}
for (var _a = 0, args_1 = args; _a < args_1.length; _a++) {
var arg = args_1[_a];
- for (var p in arg)
+ for (var p in arg) {
if (hasProperty(arg, p)) {
t[p] = arg[p];
}
+ }
}
return t;
}
@@ -2205,18 +2339,20 @@ var ts;
return true;
if (!left || !right)
return false;
- for (var key in left)
+ for (var key in left) {
if (hasOwnProperty.call(left, key)) {
if (!hasOwnProperty.call(right, key) === undefined)
return false;
if (equalityComparer ? !equalityComparer(left[key], right[key]) : left[key] !== right[key])
return false;
}
- for (var key in right)
+ }
+ for (var key in right) {
if (hasOwnProperty.call(right, key)) {
if (!hasOwnProperty.call(left, key))
return false;
}
+ }
return true;
}
ts.equalOwnProperties = equalOwnProperties;
@@ -2247,14 +2383,16 @@ var ts;
ts.clone = clone;
function extend(first, second) {
var result = {};
- for (var id in second)
+ for (var id in second) {
if (hasOwnProperty.call(second, id)) {
result[id] = second[id];
}
- for (var id in first)
+ }
+ for (var id in first) {
if (hasOwnProperty.call(first, id)) {
result[id] = first[id];
}
+ }
return result;
}
ts.extend = extend;
@@ -2291,6 +2429,16 @@ var ts;
return Array.isArray ? Array.isArray(value) : value instanceof Array;
}
ts.isArray = isArray;
+ function tryCast(value, test) {
+ return value !== undefined && test(value) ? value : undefined;
+ }
+ ts.tryCast = tryCast;
+ function cast(value, test) {
+ if (value !== undefined && test(value))
+ return value;
+ Debug.fail("Invalid cast. The supplied value did not pass the test '" + Debug.getFunctionName(test) + "'.");
+ }
+ ts.cast = cast;
/** Does nothing. */
function noop() { }
ts.noop = noop;
@@ -2880,6 +3028,11 @@ var ts;
}
ts.startsWith = startsWith;
/* @internal */
+ function removePrefix(str, prefix) {
+ return startsWith(str, prefix) ? str.substr(prefix.length) : str;
+ }
+ ts.removePrefix = removePrefix;
+ /* @internal */
function endsWith(str, suffix) {
var expectedPos = str.length - suffix.length;
return expectedPos >= 0 && str.indexOf(suffix, expectedPos) === expectedPos;
@@ -2893,7 +3046,8 @@ var ts;
return path.length > extension.length && endsWith(path, extension);
}
ts.fileExtensionIs = fileExtensionIs;
- function fileExtensionIsAny(path, extensions) {
+ /* @internal */
+ function fileExtensionIsOneOf(path, extensions) {
for (var _i = 0, extensions_1 = extensions; _i < extensions_1.length; _i++) {
var extension = extensions_1[_i];
if (fileExtensionIs(path, extension)) {
@@ -2902,7 +3056,7 @@ var ts;
}
return false;
}
- ts.fileExtensionIsAny = fileExtensionIsAny;
+ ts.fileExtensionIsOneOf = fileExtensionIsOneOf;
// Reserved characters, forces escaping of any non-word (or digit), non-whitespace character.
// It may be inefficient (we could just match (/[-[\]{}()*+?.,\\^$|#\s]/g), but this is future
// proof.
@@ -3052,7 +3206,7 @@ var ts;
var _loop_1 = function (current) {
var name = combinePaths(path, current);
var absoluteName = combinePaths(absolutePath, current);
- if (extensions && !fileExtensionIsAny(name, extensions))
+ if (extensions && !fileExtensionIsOneOf(name, extensions))
return "continue";
if (excludeRegex && excludeRegex.test(absoluteName))
return "continue";
@@ -3274,8 +3428,11 @@ var ts;
this.name = name;
this.declarations = undefined;
}
- function Type(_checker, flags) {
+ function Type(checker, flags) {
this.flags = flags;
+ if (Debug.isDebugging) {
+ this.checker = checker;
+ }
}
function Signature() {
}
@@ -3290,6 +3447,11 @@ var ts;
this.parent = undefined;
this.original = undefined;
}
+ function SourceMapSource(fileName, text, skipTrivia) {
+ this.fileName = fileName;
+ this.text = text;
+ this.skipTrivia = skipTrivia || (function (pos) { return pos; });
+ }
ts.objectAllocator = {
getNodeConstructor: function () { return Node; },
getTokenConstructor: function () { return Node; },
@@ -3297,7 +3459,8 @@ var ts;
getSourceFileConstructor: function () { return Node; },
getSymbolConstructor: function () { return Symbol; },
getTypeConstructor: function () { return Type; },
- getSignatureConstructor: function () { return Signature; }
+ getSignatureConstructor: function () { return Signature; },
+ getSourceMapSourceConstructor: function () { return SourceMapSource; },
};
var AssertionLevel;
(function (AssertionLevel) {
@@ -3309,25 +3472,43 @@ var ts;
var Debug;
(function (Debug) {
Debug.currentAssertionLevel = 0 /* None */;
+ Debug.isDebugging = false;
function shouldAssert(level) {
return Debug.currentAssertionLevel >= level;
}
Debug.shouldAssert = shouldAssert;
- function assert(expression, message, verboseDebugInfo) {
+ function assert(expression, message, verboseDebugInfo, stackCrawlMark) {
if (!expression) {
- var verboseDebugString = "";
if (verboseDebugInfo) {
- verboseDebugString = "\r\nVerbose Debug Information: " + verboseDebugInfo();
+ message += "\r\nVerbose Debug Information: " + verboseDebugInfo();
}
- debugger;
- throw new Error("Debug Failure. False expression: " + (message || "") + verboseDebugString);
+ fail(message ? "False expression: " + message : "False expression.", stackCrawlMark || assert);
}
}
Debug.assert = assert;
- function fail(message) {
- Debug.assert(/*expression*/ false, message);
+ function fail(message, stackCrawlMark) {
+ debugger;
+ var e = new Error(message ? "Debug Failure. " : "Debug Failure.");
+ if (Error.captureStackTrace) {
+ Error.captureStackTrace(e, stackCrawlMark || fail);
+ }
+ throw e;
}
Debug.fail = fail;
+ function getFunctionName(func) {
+ if (typeof func !== "function") {
+ return "";
+ }
+ else if (func.hasOwnProperty("name")) {
+ return func.name;
+ }
+ else {
+ var text = Function.prototype.toString.call(func);
+ var match = /^function\s+([\w\$]+)\s*\(/.exec(text);
+ return match ? match[1] : "";
+ }
+ }
+ Debug.getFunctionName = getFunctionName;
})(Debug = ts.Debug || (ts.Debug = {}));
/** Remove an item from an array, moving everything to its right one space left. */
function orderedRemoveItem(array, item) {
@@ -3807,6 +3988,7 @@ var ts;
realpath: function (path) {
return _fs.realpathSync(path);
},
+ debugMode: ts.some(process.execArgv, function (arg) { return /^--(inspect|debug)(-brk)?(=\d+)?$/i.test(arg); }),
tryEnableSourceMapsForHost: function () {
try {
require("source-map-support").install();
@@ -3891,6 +4073,9 @@ var ts;
? 1 /* Normal */
: 0 /* None */;
}
+ if (ts.sys && ts.sys.debugMode) {
+ ts.Debug.isDebugging = true;
+ }
})(ts || (ts = {}));
// <auto-generated />
/// <reference path="types.ts" />
@@ -4057,6 +4242,7 @@ var ts;
Line_terminator_not_permitted_before_arrow: { code: 1200, category: ts.DiagnosticCategory.Error, key: "Line_terminator_not_permitted_before_arrow_1200", message: "Line terminator not permitted before arrow." },
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: 1202, category: ts.DiagnosticCategory.Error, key: "Import_assignment_cannot_be_used_when_targeting_ECMAScript_2015_modules_Consider_using_import_Asteri_1202", message: "Import assignment cannot be used when targeting ECMAScript 2015 modules. Consider using 'import * as ns from \"mod\"', 'import {a} from \"mod\"', 'import d from \"mod\"', or another module format instead." },
Export_assignment_cannot_be_used_when_targeting_ECMAScript_2015_modules_Consider_using_export_default_or_another_module_format_instead: { code: 1203, category: ts.DiagnosticCategory.Error, key: "Export_assignment_cannot_be_used_when_targeting_ECMAScript_2015_modules_Consider_using_export_defaul_1203", message: "Export assignment cannot be used when targeting ECMAScript 2015 modules. Consider using 'export default' or another module format instead." },
+ Cannot_re_export_a_type_when_the_isolatedModules_flag_is_provided: { code: 1205, category: ts.DiagnosticCategory.Error, key: "Cannot_re_export_a_type_when_the_isolatedModules_flag_is_provided_1205", message: "Cannot re-export a type when the '--isolatedModules' flag is provided." },
Decorators_are_not_valid_here: { code: 1206, category: ts.DiagnosticCategory.Error, key: "Decorators_are_not_valid_here_1206", message: "Decorators are not valid here." },
Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name: { code: 1207, category: ts.DiagnosticCategory.Error, key: "Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name_1207", message: "Decorators cannot be applied to multiple get/set accessors of the same name." },
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." },
@@ -4118,6 +4304,10 @@ var ts;
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." },
+ Dynamic_import_cannot_be_used_when_targeting_ECMAScript_2015_modules: { code: 1323, category: ts.DiagnosticCategory.Error, key: "Dynamic_import_cannot_be_used_when_targeting_ECMAScript_2015_modules_1323", message: "Dynamic import cannot be used when targeting ECMAScript 2015 modules." },
+ Dynamic_import_must_have_one_specifier_as_an_argument: { code: 1324, category: ts.DiagnosticCategory.Error, key: "Dynamic_import_must_have_one_specifier_as_an_argument_1324", message: "Dynamic import must have one specifier as an argument." },
+ Specifier_of_dynamic_import_cannot_be_spread_element: { code: 1325, category: ts.DiagnosticCategory.Error, key: "Specifier_of_dynamic_import_cannot_be_spread_element_1325", message: "Specifier of dynamic import cannot be spread element." },
+ Dynamic_import_cannot_have_type_arguments: { code: 1326, category: ts.DiagnosticCategory.Error, key: "Dynamic_import_cannot_have_type_arguments_1326", message: "Dynamic import cannot have type arguments" },
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." },
@@ -4164,7 +4354,7 @@ var ts;
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." },
+ Call_target_does_not_contain_any_signatures: { code: 2346, category: ts.DiagnosticCategory.Error, key: "Call_target_does_not_contain_any_signatures_2346", message: "Call target does not contain any signatures." },
Untyped_function_calls_may_not_accept_type_arguments: { code: 2347, category: ts.DiagnosticCategory.Error, key: "Untyped_function_calls_may_not_accept_type_arguments_2347", message: "Untyped function calls may not accept type arguments." },
Value_of_type_0_is_not_callable_Did_you_mean_to_include_new: { code: 2348, category: ts.DiagnosticCategory.Error, key: "Value_of_type_0_is_not_callable_Did_you_mean_to_include_new_2348", message: "Value of type '{0}' is not callable. Did you mean to include 'new'?" },
Cannot_invoke_an_expression_whose_type_lacks_a_call_signature_Type_0_has_no_compatible_call_signatures: { code: 2349, category: ts.DiagnosticCategory.Error, key: "Cannot_invoke_an_expression_whose_type_lacks_a_call_signature_Type_0_has_no_compatible_call_signatur_2349", message: "Cannot invoke an expression whose type lacks a call signature. Type '{0}' has no compatible call signatures." },
@@ -4359,6 +4549,15 @@ var ts;
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." },
+ Property_0_does_not_exist_on_type_1_Did_you_mean_2: { code: 2551, category: ts.DiagnosticCategory.Error, key: "Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551", message: "Property '{0}' does not exist on type '{1}'. Did you mean '{2}'?" },
+ Cannot_find_name_0_Did_you_mean_1: { code: 2552, category: ts.DiagnosticCategory.Error, key: "Cannot_find_name_0_Did_you_mean_1_2552", message: "Cannot find name '{0}'. Did you mean '{1}'?" },
+ Computed_values_are_not_permitted_in_an_enum_with_string_valued_members: { code: 2553, category: ts.DiagnosticCategory.Error, key: "Computed_values_are_not_permitted_in_an_enum_with_string_valued_members_2553", message: "Computed values are not permitted in an enum with string valued members." },
+ Expected_0_arguments_but_got_1: { code: 2554, category: ts.DiagnosticCategory.Error, key: "Expected_0_arguments_but_got_1_2554", message: "Expected {0} arguments, but got {1}." },
+ Expected_at_least_0_arguments_but_got_1: { code: 2555, category: ts.DiagnosticCategory.Error, key: "Expected_at_least_0_arguments_but_got_1_2555", message: "Expected at least {0} arguments, but got {1}." },
+ Expected_0_arguments_but_got_a_minimum_of_1: { code: 2556, category: ts.DiagnosticCategory.Error, key: "Expected_0_arguments_but_got_a_minimum_of_1_2556", message: "Expected {0} arguments, but got a minimum of {1}." },
+ Expected_at_least_0_arguments_but_got_a_minimum_of_1: { code: 2557, category: ts.DiagnosticCategory.Error, key: "Expected_at_least_0_arguments_but_got_a_minimum_of_1_2557", message: "Expected at least {0} arguments, but got a minimum of {1}." },
+ Expected_0_type_arguments_but_got_1: { code: 2558, category: ts.DiagnosticCategory.Error, key: "Expected_0_type_arguments_but_got_1_2558", message: "Expected {0} type arguments, but got {1}." },
+ Type_0_has_no_properties_in_common_with_type_1: { code: 2559, category: ts.DiagnosticCategory.Error, key: "Type_0_has_no_properties_in_common_with_type_1_2559", message: "Type '{0}' has no properties in common with type '{1}'." },
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." },
@@ -4370,7 +4569,6 @@ var ts;
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}'." },
@@ -4429,6 +4627,8 @@ var ts;
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." },
_0_are_specified_twice_The_attribute_named_0_will_be_overwritten: { code: 2710, category: ts.DiagnosticCategory.Error, key: "_0_are_specified_twice_The_attribute_named_0_will_be_overwritten_2710", message: "'{0}' are specified twice. The attribute named '{0}' will be overwritten." },
+ A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option: { code: 2711, category: ts.DiagnosticCategory.Error, key: "A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES20_2711", message: "A dynamic import call returns a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your `--lib` option." },
+ A_dynamic_import_call_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: 2712, category: ts.DiagnosticCategory.Error, key: "A_dynamic_import_call_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declarat_2712", message: "A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option." },
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}'." },
@@ -4503,7 +4703,7 @@ var ts;
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." },
+ Property_0_of_exported_class_expression_may_not_be_private_or_protected: { code: 4094, category: ts.DiagnosticCategory.Error, key: "Property_0_of_exported_class_expression_may_not_be_private_or_protected_4094", message: "Property '{0}' of exported class expression may not be private or protected." },
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}'." },
@@ -4545,7 +4745,7 @@ var ts;
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_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'." },
+ Specify_module_code_generation_Colon_commonjs_amd_system_umd_es2015_or_ESNext: { code: 6016, category: ts.DiagnosticCategory.Message, key: "Specify_module_code_generation_Colon_commonjs_amd_system_umd_es2015_or_ESNext_6016", message: "Specify module code generation: 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'." },
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_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'." },
@@ -4654,6 +4854,7 @@ var ts;
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." },
+ Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1: { code: 6137, category: ts.DiagnosticCategory.Error, key: "Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1_6137", message: "Cannot import type declaration files. Consider importing '{0}' instead of '{1}'." },
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}'." },
@@ -4699,6 +4900,9 @@ var ts;
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}'" },
+ Reusing_resolution_of_module_0_to_file_1_from_old_program: { code: 6183, category: ts.DiagnosticCategory.Message, key: "Reusing_resolution_of_module_0_to_file_1_from_old_program_6183", message: "Reusing resolution of module '{0}' to file '{1}' from old program." },
+ Reusing_module_resolutions_originating_in_0_since_resolutions_are_unchanged_from_old_program: { code: 6184, category: ts.DiagnosticCategory.Message, key: "Reusing_module_resolutions_originating_in_0_since_resolutions_are_unchanged_from_old_program_6184", message: "Reusing module resolutions originating in '{0}' since resolutions are unchanged from old program." },
+ Disable_strict_checking_of_generic_signatures_in_function_types: { code: 6185, category: ts.DiagnosticCategory.Message, key: "Disable_strict_checking_of_generic_signatures_in_function_types_6185", message: "Disable strict checking of generic signatures in function types." },
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." },
@@ -4725,6 +4929,8 @@ var ts;
Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation: { code: 7032, category: ts.DiagnosticCategory.Error, key: "Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation_7032", message: "Property '{0}' implicitly has type 'any', because its set accessor lacks a parameter type annotation." },
Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation: { code: 7033, category: ts.DiagnosticCategory.Error, key: "Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation_7033", message: "Property '{0}' implicitly has type 'any', because its get accessor lacks a return type annotation." },
Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined: { code: 7034, category: ts.DiagnosticCategory.Error, key: "Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined_7034", message: "Variable '{0}' implicitly has type '{1}' in some locations where its type cannot be determined." },
+ Try_npm_install_types_Slash_0_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0: { code: 7035, category: ts.DiagnosticCategory.Error, key: "Try_npm_install_types_Slash_0_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_mod_7035", message: "Try `npm install @types/{0}` if it exists or add a new declaration (.d.ts) file containing `declare module '{0}';`" },
+ Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0: { code: 7036, category: ts.DiagnosticCategory.Error, key: "Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0_7036", message: "Dynamic import's specifier must be of type 'string', but here has type '{0}'." },
You_cannot_rename_this_element: { code: 8000, category: ts.DiagnosticCategory.Error, key: "You_cannot_rename_this_element_8000", message: "You cannot rename this element." },
You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library: { code: 8001, category: ts.DiagnosticCategory.Error, key: "You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library_8001", message: "You cannot rename elements that are defined in the standard TypeScript library." },
import_can_only_be_used_in_a_ts_file: { code: 8002, category: ts.DiagnosticCategory.Error, key: "import_can_only_be_used_in_a_ts_file_8002", message: "'import ... =' can only be used in a .ts file." },
@@ -4773,12 +4979,18 @@ var ts;
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}'." },
+ Declare_property_0: { code: 90016, category: ts.DiagnosticCategory.Message, key: "Declare_property_0_90016", message: "Declare property '{0}'." },
+ Add_index_signature_for_property_0: { code: 90017, category: ts.DiagnosticCategory.Message, key: "Add_index_signature_for_property_0_90017", message: "Add index signature for 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}'." },
+ Change_spelling_to_0: { code: 90022, category: ts.DiagnosticCategory.Message, key: "Change_spelling_to_0_90022", message: "Change spelling to '{0}'." },
+ Declare_method_0: { code: 90023, category: ts.DiagnosticCategory.Message, key: "Declare_method_0_90023", message: "Declare method '{0}'." },
+ Declare_static_method_0: { code: 90024, category: ts.DiagnosticCategory.Message, key: "Declare_static_method_0_90024", message: "Declare static method '{0}'." },
+ Prefix_0_with_an_underscore: { code: 90025, category: ts.DiagnosticCategory.Message, key: "Prefix_0_with_an_underscore_90025", message: "Prefix '{0}' with an underscore." },
+ Convert_function_to_an_ES2015_class: { code: 95001, category: ts.DiagnosticCategory.Message, key: "Convert_function_to_an_ES2015_class_95001", message: "Convert function to an ES2015 class" },
+ Convert_function_0_to_class: { code: 95002, category: ts.DiagnosticCategory.Message, key: "Convert_function_0_to_class_95002", message: "Convert function '{0}' to class" },
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." },
@@ -5151,6 +5363,7 @@ var ts;
case 47 /* slash */:
// starts of normal trivia
case 60 /* lessThan */:
+ case 124 /* bar */:
case 61 /* equals */:
case 62 /* greaterThan */:
// Starts of conflict marker trivia
@@ -5217,6 +5430,7 @@ var ts;
}
break;
case 60 /* lessThan */:
+ case 124 /* bar */:
case 61 /* equals */:
case 62 /* greaterThan */:
if (isConflictMarkerTrivia(text, pos)) {
@@ -5273,12 +5487,12 @@ var ts;
}
}
else {
- ts.Debug.assert(ch === 61 /* equals */);
- // Consume everything from the start of the mid-conflict marker to the start of the next
- // end-conflict marker.
+ ts.Debug.assert(ch === 124 /* bar */ || ch === 61 /* equals */);
+ // Consume everything from the start of a ||||||| or ======= marker to the start
+ // of the next ======= or >>>>>>> marker.
while (pos < len) {
- var ch_1 = text.charCodeAt(pos);
- if (ch_1 === 62 /* greaterThan */ && isConflictMarkerTrivia(text, pos)) {
+ var currentChar = text.charCodeAt(pos);
+ if ((currentChar === 61 /* equals */ || currentChar === 62 /* greaterThan */) && currentChar !== ch && isConflictMarkerTrivia(text, pos)) {
break;
}
pos++;
@@ -5441,9 +5655,10 @@ var ts;
ts.getTrailingCommentRanges = getTrailingCommentRanges;
/** Optionally, get the shebang */
function getShebang(text) {
- return shebangTriviaRegex.test(text)
- ? shebangTriviaRegex.exec(text)[0]
- : undefined;
+ var match = shebangTriviaRegex.exec(text);
+ if (match) {
+ return match[0];
+ }
}
ts.getShebang = getShebang;
function isIdentifierStart(ch, languageVersion) {
@@ -6024,13 +6239,13 @@ var ts;
pos += 2;
var commentClosed = false;
while (pos < end) {
- var ch_2 = text.charCodeAt(pos);
- if (ch_2 === 42 /* asterisk */ && text.charCodeAt(pos + 1) === 47 /* slash */) {
+ var ch_1 = text.charCodeAt(pos);
+ if (ch_1 === 42 /* asterisk */ && text.charCodeAt(pos + 1) === 47 /* slash */) {
pos += 2;
commentClosed = true;
break;
}
- if (isLineBreak(ch_2)) {
+ if (isLineBreak(ch_1)) {
precedingLineBreak = true;
}
pos++;
@@ -6190,6 +6405,15 @@ var ts;
pos++;
return token = 17 /* OpenBraceToken */;
case 124 /* bar */:
+ if (isConflictMarkerTrivia(text, pos)) {
+ pos = scanConflictMarkerTrivia(text, pos, error);
+ if (skipTrivia) {
+ continue;
+ }
+ else {
+ return token = 7 /* ConflictMarkerTrivia */;
+ }
+ }
if (text.charCodeAt(pos + 1) === 124 /* bar */) {
return pos += 2, token = 54 /* BarBarToken */;
}
@@ -6601,7 +6825,7 @@ var ts;
clear: function () { return str_1 = ""; },
trackSymbol: ts.noop,
reportInaccessibleThisError: ts.noop,
- reportIllegalExtends: ts.noop
+ reportPrivateInBaseOfClassExpression: ts.noop,
};
}
return stringWriters.pop();
@@ -6652,9 +6876,7 @@ var ts;
ts.typeDirectiveIsEqualTo = typeDirectiveIsEqualTo;
/* @internal */
function hasChangesInResolutions(names, newResolutions, oldResolutions, comparer) {
- if (names.length !== newResolutions.length) {
- return false;
- }
+ ts.Debug.assert(names.length === newResolutions.length);
for (var i = 0; i < names.length; i++) {
var newResolution = newResolutions[i];
var oldResolution = oldResolutions && oldResolutions.get(names[i]);
@@ -6779,17 +7001,13 @@ var ts;
return !nodeIsMissing(node);
}
ts.nodeIsPresent = nodeIsPresent;
- function isToken(n) {
- return n.kind >= 0 /* FirstToken */ && n.kind <= 142 /* 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.
if (nodeIsMissing(node)) {
return node.pos;
}
- if (isJSDocNode(node)) {
+ if (ts.isJSDocNode(node)) {
return ts.skipTrivia((sourceFile || getSourceFileOfNode(node)).text, node.pos, /*stopAfterLineBreak*/ false, /*stopAtComments*/ true);
}
if (includeJsDoc && node.jsDoc && node.jsDoc.length > 0) {
@@ -6799,20 +7017,12 @@ 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 === 294 /* SyntaxList */ && node._children.length > 0) {
+ if (node.kind === 295 /* 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 >= 267 /* FirstJSDocNode */ && node.kind <= 293 /* LastJSDocNode */;
- }
- ts.isJSDocNode = isJSDocNode;
- function isJSDocTag(node) {
- return node.kind >= 283 /* FirstJSDocTagNode */ && node.kind <= 293 /* LastJSDocTagNode */;
- }
- ts.isJSDocTag = isJSDocTag;
function getNonDecoratorTokenPosOfNode(node, sourceFile) {
if (nodeIsMissing(node) || !node.decorators) {
return getTokenPosOfNode(node, sourceFile);
@@ -6847,28 +7057,30 @@ var ts;
if (!nodeIsSynthesized(node) && node.parent) {
return getSourceTextOfNodeFromSourceFile(sourceFile, node);
}
+ var escapeText = ts.getEmitFlags(node) & 16777216 /* NoAsciiEscaping */ ? escapeString : escapeNonAsciiString;
// 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.
+ // or a (possibly escaped) quoted form of the original text if it's string-like.
switch (node.kind) {
case 9 /* StringLiteral */:
- return getQuotedEscapedLiteralText('"', node.text, '"');
+ return '"' + escapeText(node.text) + '"';
case 13 /* NoSubstitutionTemplateLiteral */:
- return getQuotedEscapedLiteralText("`", node.text, "`");
+ return "`" + escapeText(node.text) + "`";
case 14 /* TemplateHead */:
- return getQuotedEscapedLiteralText("`", node.text, "${");
+ return "`" + escapeText(node.text) + "${";
case 15 /* TemplateMiddle */:
- return getQuotedEscapedLiteralText("}", node.text, "${");
+ return "}" + escapeText(node.text) + "${";
case 16 /* TemplateTail */:
- return getQuotedEscapedLiteralText("}", node.text, "`");
+ return "}" + escapeText(node.text) + "`";
case 8 /* NumericLiteral */:
return node.text;
}
ts.Debug.fail("Literal kind '" + node.kind + "' not accounted for.");
}
ts.getLiteralText = getLiteralText;
- function getQuotedEscapedLiteralText(leftQuote, text, rightQuote) {
- return leftQuote + escapeNonAsciiCharacters(escapeString(text)) + rightQuote;
+ function getTextOfConstantValue(value) {
+ return typeof value === "string" ? '"' + escapeNonAsciiString(value) + '"' : "" + value;
}
+ ts.getTextOfConstantValue = getTextOfConstantValue;
// Add an extra underscore to identifiers that start with two underscores to avoid issues with magic names like '__proto__'
function escapeIdentifier(identifier) {
return identifier.length >= 2 && identifier.charCodeAt(0) === 95 /* _ */ && identifier.charCodeAt(1) === 95 /* _ */ ? "_" + identifier : identifier;
@@ -6907,7 +7119,7 @@ var ts;
function isBlockScopedContainerTopLevel(node) {
return node.kind === 265 /* SourceFile */ ||
node.kind === 233 /* ModuleDeclaration */ ||
- isFunctionLike(node);
+ ts.isFunctionLike(node);
}
ts.isBlockScopedContainerTopLevel = isBlockScopedContainerTopLevel;
function isGlobalScopeAugmentation(module) {
@@ -6954,7 +7166,7 @@ var ts;
case 207 /* Block */:
// function block is not considered block-scope container
// see comment in binder.ts: bind(...), case for SyntaxKind.Block
- return parentNode && !isFunctionLike(parentNode);
+ return parentNode && !ts.isFunctionLike(parentNode);
}
return false;
}
@@ -7097,10 +7309,6 @@ var ts;
return (file.externalModuleIndicator || file.commonJsModuleIndicator) !== undefined;
}
ts.isExternalOrCommonJsModule = isExternalOrCommonJsModule;
- function isDeclarationFile(file) {
- return file.isDeclarationFile;
- }
- ts.isDeclarationFile = isDeclarationFile;
function isConstEnumDeclaration(node) {
return node.kind === 232 /* EnumDeclaration */ && isConst(node);
}
@@ -7118,6 +7326,10 @@ var ts;
return n.kind === 181 /* CallExpression */ && n.expression.kind === 97 /* SuperKeyword */;
}
ts.isSuperCall = isSuperCall;
+ function isImportCall(n) {
+ return n.kind === 181 /* CallExpression */ && n.expression.kind === 91 /* ImportKeyword */;
+ }
+ ts.isImportCall = isImportCall;
function isPrologueDirective(node) {
return node.kind === 210 /* ExpressionStatement */
&& node.expression.kind === 9 /* StringLiteral */;
@@ -7241,10 +7453,6 @@ var ts;
return false;
}
ts.isChildOfNodeWithKind = isChildOfNodeWithKind;
- function isPrefixUnaryExpression(node) {
- return node.kind === 192 /* 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) {
@@ -7295,7 +7503,7 @@ var ts;
// skipped in this traversal.
return;
default:
- if (isFunctionLike(node)) {
+ if (ts.isFunctionLike(node)) {
var name = node.name;
if (name && name.kind === 144 /* ComputedPropertyName */) {
// Note that we will not include methods/accessors of a class because they would require
@@ -7348,38 +7556,6 @@ var ts;
return false;
}
ts.isVariableLike = isVariableLike;
- function isAccessor(node) {
- return node && (node.kind === 153 /* GetAccessor */ || node.kind === 154 /* SetAccessor */);
- }
- ts.isAccessor = isAccessor;
- function isClassLike(node) {
- return node && (node.kind === 229 /* ClassDeclaration */ || node.kind === 199 /* ClassExpression */);
- }
- ts.isClassLike = isClassLike;
- function isFunctionLike(node) {
- return node && isFunctionLikeKind(node.kind);
- }
- ts.isFunctionLike = isFunctionLike;
- function isFunctionLikeKind(kind) {
- switch (kind) {
- case 152 /* Constructor */:
- case 186 /* FunctionExpression */:
- case 228 /* FunctionDeclaration */:
- case 187 /* ArrowFunction */:
- case 151 /* MethodDeclaration */:
- case 150 /* MethodSignature */:
- case 153 /* GetAccessor */:
- case 154 /* SetAccessor */:
- case 155 /* CallSignature */:
- case 156 /* ConstructSignature */:
- case 157 /* IndexSignature */:
- case 160 /* FunctionType */:
- case 161 /* ConstructorType */:
- return true;
- }
- return false;
- }
- ts.isFunctionLikeKind = isFunctionLikeKind;
function introducesArgumentsExoticObject(node) {
switch (node.kind) {
case 151 /* MethodDeclaration */:
@@ -7394,20 +7570,6 @@ var ts;
return false;
}
ts.introducesArgumentsExoticObject = introducesArgumentsExoticObject;
- function isIterationStatement(node, lookInLabeledStatements) {
- switch (node.kind) {
- case 214 /* ForStatement */:
- case 215 /* ForInStatement */:
- case 216 /* ForOfStatement */:
- case 212 /* DoStatement */:
- case 213 /* WhileStatement */:
- return true;
- case 222 /* LabeledStatement */:
- return lookInLabeledStatements && isIterationStatement(node.statement, lookInLabeledStatements);
- }
- return false;
- }
- ts.isIterationStatement = isIterationStatement;
function unwrapInnermostStatementOfLabel(node, beforeUnwrapLabelCallback) {
while (true) {
if (beforeUnwrapLabelCallback) {
@@ -7421,7 +7583,7 @@ var ts;
}
ts.unwrapInnermostStatementOfLabel = unwrapInnermostStatementOfLabel;
function isFunctionBlock(node) {
- return node && node.kind === 207 /* Block */ && isFunctionLike(node.parent);
+ return node && node.kind === 207 /* Block */ && ts.isFunctionLike(node.parent);
}
ts.isFunctionBlock = isFunctionBlock;
function isObjectLiteralMethod(node) {
@@ -7445,7 +7607,7 @@ var ts;
function getContainingFunction(node) {
while (true) {
node = node.parent;
- if (!node || isFunctionLike(node)) {
+ if (!node || ts.isFunctionLike(node)) {
return node;
}
}
@@ -7454,7 +7616,7 @@ var ts;
function getContainingClass(node) {
while (true) {
node = node.parent;
- if (!node || isClassLike(node)) {
+ if (!node || ts.isClassLike(node)) {
return node;
}
}
@@ -7472,7 +7634,7 @@ var ts;
// then the computed property is not a 'this' container.
// A computed property name in a class needs to be a this container
// so that we can error on it.
- if (isClassLike(node.parent.parent)) {
+ if (ts.isClassLike(node.parent.parent)) {
return node;
}
// If this is a computed property, then the parent should not
@@ -7484,12 +7646,12 @@ var ts;
break;
case 147 /* Decorator */:
// Decorators are always applied outside of the body of a class or method.
- if (node.parent.kind === 146 /* Parameter */ && isClassElement(node.parent.parent)) {
+ if (node.parent.kind === 146 /* Parameter */ && ts.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;
}
- else if (isClassElement(node.parent)) {
+ else if (ts.isClassElement(node.parent)) {
// If the decorator's parent is a class element, we resolve the 'this' container
// from the parent class declaration.
node = node.parent;
@@ -7568,12 +7730,12 @@ var ts;
return node;
case 147 /* Decorator */:
// Decorators are always applied outside of the body of a class or method.
- if (node.parent.kind === 146 /* Parameter */ && isClassElement(node.parent.parent)) {
+ if (node.parent.kind === 146 /* Parameter */ && ts.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;
}
- else if (isClassElement(node.parent)) {
+ else if (ts.isClassElement(node.parent)) {
// If the decorator's parent is a class element, we resolve the 'this' container
// from the parent class declaration.
node = node.parent;
@@ -7622,25 +7784,11 @@ var ts;
return undefined;
}
ts.getEntityNameFromTypeNode = getEntityNameFromTypeNode;
- function isCallLikeExpression(node) {
- switch (node.kind) {
- case 251 /* JsxOpeningElement */:
- case 250 /* JsxSelfClosingElement */:
- case 181 /* CallExpression */:
- case 182 /* NewExpression */:
- case 183 /* TaggedTemplateExpression */:
- case 147 /* Decorator */:
- return true;
- default:
- return false;
- }
- }
- ts.isCallLikeExpression = isCallLikeExpression;
function getInvokedExpression(node) {
if (node.kind === 183 /* TaggedTemplateExpression */) {
return node.tag;
}
- else if (isJsxOpeningLikeElement(node)) {
+ else if (ts.isJsxOpeningLikeElement(node)) {
return node.tagName;
}
// Will either be a CallExpression, NewExpression, or Decorator.
@@ -7878,11 +8026,11 @@ var ts;
}
ts.getRightMostAssignedExpression = getRightMostAssignedExpression;
function isExportsIdentifier(node) {
- return isIdentifier(node) && node.text === "exports";
+ return ts.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";
+ return ts.isPropertyAccessExpression(node) && ts.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
@@ -7992,35 +8140,24 @@ var ts;
}
ts.getCommentsFromJSDoc = getCommentsFromJSDoc;
function hasJSDocParameterTags(node) {
- var parameterTags = getJSDocTags(node, 286 /* JSDocParameterTag */);
+ var parameterTags = getJSDocTags(node, 287 /* 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 === 286 /* JSDocParameterTag */) {
- if (doc.kind === kind) {
- result.push(doc);
- }
- }
- else {
- var tags = doc.tags;
- if (tags) {
- result.push.apply(result, ts.filter(tags, function (tag) { return tag.kind === kind; }));
- }
- }
- }
- return result;
- }
+ return ts.flatMap(getJSDocs(node), function (doc) {
+ return doc.kind === 283 /* JSDocComment */
+ ? ts.filter(doc.tags, function (tag) { return tag.kind === kind; })
+ : doc.kind === kind && doc;
+ });
}
function getFirstJSDocTag(node, kind) {
return node && ts.firstOrUndefined(getJSDocTags(node, kind));
}
function getJSDocs(node) {
+ if (ts.isJSDocTypedefTag(node)) {
+ return [node.parent];
+ }
var cache = node.jsDocCache;
if (!cache) {
getJSDocsWorker(node);
@@ -8072,22 +8209,19 @@ var ts;
}
ts.getJSDocs = getJSDocs;
function getJSDocParameterTags(param) {
- if (!isParameter(param)) {
- return undefined;
- }
var func = param.parent;
- var tags = getJSDocTags(func, 286 /* JSDocParameterTag */);
+ var tags = getJSDocTags(func, 287 /* 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 === 286 /* JSDocParameterTag */; });
+ var paramTags = ts.filter(tags, function (tag) { return tag.kind === 287 /* JSDocParameterTag */; });
if (paramTags && 0 <= i && i < paramTags.length) {
return [paramTags[i]];
}
}
else if (param.name.kind === 71 /* Identifier */) {
var name_1 = param.name.text;
- return ts.filter(tags, function (tag) { return tag.kind === 286 /* JSDocParameterTag */ && tag.parameterName.text === name_1; });
+ return ts.filter(tags, function (tag) { return tag.kind === 287 /* JSDocParameterTag */ && tag.name.text === name_1; });
}
else {
// TODO: it's a destructured parameter, so it should look up an "object type" series of multiple lines
@@ -8096,8 +8230,27 @@ var ts;
}
}
ts.getJSDocParameterTags = getJSDocParameterTags;
+ /** Does the opposite of `getJSDocParameterTags`: given a JSDoc parameter, finds the parameter corresponding to it. */
+ function getParameterFromJSDoc(node) {
+ var name = node.name.text;
+ var grandParent = node.parent.parent;
+ ts.Debug.assert(node.parent.kind === 283 /* JSDocComment */);
+ if (!ts.isFunctionLike(grandParent)) {
+ return undefined;
+ }
+ return ts.find(grandParent.parameters, function (p) {
+ return p.name.kind === 71 /* Identifier */ && p.name.text === name;
+ });
+ }
+ ts.getParameterFromJSDoc = getParameterFromJSDoc;
+ function getTypeParameterFromJsDoc(node) {
+ var name = node.name.text;
+ var typeParameters = node.parent.parent.parent.typeParameters;
+ return ts.find(typeParameters, function (p) { return p.name.text === name; });
+ }
+ ts.getTypeParameterFromJsDoc = getTypeParameterFromJsDoc;
function getJSDocType(node) {
- var tag = getFirstJSDocTag(node, 288 /* JSDocTypeTag */);
+ var tag = getFirstJSDocTag(node, 289 /* JSDocTypeTag */);
if (!tag && node.kind === 146 /* Parameter */) {
var paramTags = getJSDocParameterTags(node);
if (paramTags) {
@@ -8111,12 +8264,21 @@ var ts;
return getFirstJSDocTag(node, 285 /* JSDocAugmentsTag */);
}
ts.getJSDocAugmentsTag = getJSDocAugmentsTag;
+ function getJSDocClassTag(node) {
+ return getFirstJSDocTag(node, 286 /* JSDocClassTag */);
+ }
+ ts.getJSDocClassTag = getJSDocClassTag;
function getJSDocReturnTag(node) {
- return getFirstJSDocTag(node, 287 /* JSDocReturnTag */);
+ return getFirstJSDocTag(node, 288 /* JSDocReturnTag */);
}
ts.getJSDocReturnTag = getJSDocReturnTag;
+ function getJSDocReturnType(node) {
+ var returnTag = getJSDocReturnTag(node);
+ return returnTag && returnTag.typeExpression && returnTag.typeExpression.type;
+ }
+ ts.getJSDocReturnType = getJSDocReturnType;
function getJSDocTemplateTag(node) {
- return getFirstJSDocTag(node, 289 /* JSDocTemplateTag */);
+ return getFirstJSDocTag(node, 290 /* JSDocTemplateTag */);
}
ts.getJSDocTemplateTag = getJSDocTemplateTag;
function hasRestParameter(s) {
@@ -8228,25 +8390,37 @@ var ts;
ts.isInAmbientContext = isInAmbientContext;
// True if the given identifier, string literal, or number literal is the name of a declaration node
function isDeclarationName(name) {
- if (name.kind !== 71 /* Identifier */ && name.kind !== 9 /* StringLiteral */ && name.kind !== 8 /* NumericLiteral */) {
- return false;
- }
- var parent = name.parent;
- if (parent.kind === 242 /* ImportSpecifier */ || parent.kind === 246 /* ExportSpecifier */) {
- if (parent.propertyName) {
- return true;
- }
- }
- if (isDeclaration(parent)) {
- return parent.name === name;
+ switch (name.kind) {
+ case 71 /* Identifier */:
+ case 9 /* StringLiteral */:
+ case 8 /* NumericLiteral */:
+ return ts.isDeclaration(name.parent) && name.parent.name === name;
+ default:
+ return false;
}
- return false;
}
ts.isDeclarationName = isDeclarationName;
+ /* @internal */
+ // See GH#16030
+ function isAnyDeclarationName(name) {
+ switch (name.kind) {
+ case 71 /* Identifier */:
+ case 9 /* StringLiteral */:
+ case 8 /* NumericLiteral */:
+ if (ts.isDeclaration(name.parent)) {
+ return name.parent.name === name;
+ }
+ var binExp = name.parent.parent;
+ return ts.isBinaryExpression(binExp) && getSpecialPropertyAssignmentKind(binExp) !== 0 /* None */ && ts.getNameOfDeclaration(binExp) === name;
+ default:
+ return false;
+ }
+ }
+ ts.isAnyDeclarationName = isAnyDeclarationName;
function isLiteralComputedPropertyDeclarationName(node) {
return (node.kind === 9 /* StringLiteral */ || node.kind === 8 /* NumericLiteral */) &&
node.parent.kind === 144 /* ComputedPropertyName */ &&
- isDeclaration(node.parent.parent);
+ ts.isDeclaration(node.parent.parent);
}
ts.isLiteralComputedPropertyDeclarationName = isLiteralComputedPropertyDeclarationName;
// Return true if the given identifier is classified as an IdentifierName
@@ -8355,21 +8529,19 @@ var ts;
var isNoDefaultLibRegEx = /^(\/\/\/\s*<reference\s+no-default-lib\s*=\s*)('|")(.+?)\2\s*\/>/gim;
if (simpleReferenceRegEx.test(comment)) {
if (isNoDefaultLibRegEx.test(comment)) {
- return {
- isNoDefaultLib: true
- };
+ return { isNoDefaultLib: true };
}
else {
var refMatchResult = ts.fullTripleSlashReferencePathRegEx.exec(comment);
var refLibResult = !refMatchResult && ts.fullTripleSlashReferenceTypeReferenceDirectiveRegEx.exec(comment);
- if (refMatchResult || refLibResult) {
- var start = commentRange.pos;
- var end = commentRange.end;
+ var match = refMatchResult || refLibResult;
+ if (match) {
+ var pos = commentRange.pos + match[1].length + match[2].length;
return {
fileReference: {
- pos: start,
- end: end,
- fileName: (refMatchResult || refLibResult)[3]
+ pos: pos,
+ end: pos + match[3].length,
+ fileName: match[3]
},
isNoDefaultLib: false,
isTypeReferenceDirective: !!refLibResult
@@ -8397,12 +8569,13 @@ var ts;
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[FunctionFlags["AsyncGenerator"] = 3] = "AsyncGenerator";
})(FunctionFlags = ts.FunctionFlags || (ts.FunctionFlags = {}));
function getFunctionFlags(node) {
+ if (!node) {
+ return 4 /* Invalid */;
+ }
var flags = 0 /* Normal */;
switch (node.kind) {
case 228 /* FunctionDeclaration */:
@@ -8437,10 +8610,6 @@ var ts;
return false;
}
ts.isAsyncFunction = isAsyncFunction;
- function isNumericLiteral(node) {
- return node.kind === 8 /* NumericLiteral */;
- }
- ts.isNumericLiteral = isNumericLiteral;
function isStringOrNumericLiteral(node) {
var kind = node.kind;
return kind === 9 /* StringLiteral */
@@ -8455,7 +8624,8 @@ var ts;
* Symbol.
*/
function hasDynamicName(declaration) {
- return declaration.name && isDynamicName(declaration.name);
+ var name = ts.getNameOfDeclaration(declaration);
+ return name && isDynamicName(name);
}
ts.hasDynamicName = hasDynamicName;
function isDynamicName(name) {
@@ -8470,7 +8640,7 @@ var ts;
* where Symbol is literally the word "Symbol", and name is any identifierName
*/
function isWellKnownSymbolSyntactically(node) {
- return isPropertyAccessExpression(node) && isESSymbolIdentifier(node.expression);
+ return ts.isPropertyAccessExpression(node) && isESSymbolIdentifier(node.expression);
}
ts.isWellKnownSymbolSyntactically = isWellKnownSymbolSyntactically;
function getPropertyNameForPropertyNameNode(name) {
@@ -8505,24 +8675,6 @@ var ts;
return node.text === "push" || node.text === "unshift";
}
ts.isPushOrUnshiftIdentifier = isPushOrUnshiftIdentifier;
- function isModifierKind(token) {
- switch (token) {
- case 117 /* AbstractKeyword */:
- case 120 /* AsyncKeyword */:
- case 76 /* ConstKeyword */:
- case 124 /* DeclareKeyword */:
- case 79 /* DefaultKeyword */:
- case 84 /* ExportKeyword */:
- case 114 /* PublicKeyword */:
- case 112 /* PrivateKeyword */:
- case 113 /* ProtectedKeyword */:
- case 131 /* ReadonlyKeyword */:
- case 115 /* StaticKeyword */:
- return true;
- }
- return false;
- }
- ts.isModifierKind = isModifierKind;
function isParameterDeclaration(node) {
var root = getRootDeclaration(node);
return root.kind === 146 /* Parameter */;
@@ -8561,7 +8713,7 @@ var ts;
}
ts.getOriginalSourceFileOrBundle = getOriginalSourceFileOrBundle;
function getOriginalSourceFile(sourceFile) {
- return ts.getParseTreeNode(sourceFile, isSourceFile) || sourceFile;
+ return ts.getParseTreeNode(sourceFile, ts.isSourceFile) || sourceFile;
}
function getOriginalSourceFiles(sourceFiles) {
return ts.sameMap(sourceFiles, getOriginalSourceFile);
@@ -8738,6 +8890,8 @@ var ts;
return 2;
case 198 /* SpreadElement */:
return 1;
+ case 298 /* CommaListExpression */:
+ return 0;
default:
return -1;
}
@@ -8851,14 +9005,15 @@ var ts;
return "\\u" + paddedHexCode;
}
var nonAsciiCharacters = /[^\u0000-\u007F]/g;
- function escapeNonAsciiCharacters(s) {
+ function escapeNonAsciiString(s) {
+ s = escapeString(s);
// Replace non-ASCII characters with '\uNNNN' escapes if any exist.
// Otherwise just return the original string.
return nonAsciiCharacters.test(s) ?
s.replace(nonAsciiCharacters, function (c) { return get16BitUnicodeEscapeSequence(c.charCodeAt(0)); }) :
s;
}
- ts.escapeNonAsciiCharacters = escapeNonAsciiCharacters;
+ ts.escapeNonAsciiString = escapeNonAsciiString;
var indentStrings = ["", " "];
function getIndentString(level) {
if (indentStrings[level] === undefined) {
@@ -8947,7 +9102,7 @@ var ts;
ts.getResolvedExternalModuleName = getResolvedExternalModuleName;
function getExternalModuleNameFromDeclaration(host, resolver, declaration) {
var file = resolver.getExternalModuleFileFromDeclaration(declaration);
- if (!file || isDeclarationFile(file)) {
+ if (!file || file.isDeclarationFile) {
return undefined;
}
return getResolvedExternalModuleName(host, file);
@@ -9013,7 +9168,7 @@ var ts;
ts.getSourceFilesToEmit = getSourceFilesToEmit;
/** 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);
+ return !(options.noEmitForJsFiles && isSourceFileJavaScript(sourceFile)) && !sourceFile.isDeclarationFile && !isSourceFileFromExternalLibrary(sourceFile);
}
ts.sourceFileMayBeEmitted = sourceFileMayBeEmitted;
/**
@@ -9097,13 +9252,17 @@ var ts;
});
}
ts.getFirstConstructorWithBody = getFirstConstructorWithBody;
- /** Get the type annotaion for the value parameter. */
- function getSetAccessorTypeAnnotationNode(accessor) {
+ function getSetAccessorValueParameter(accessor) {
if (accessor && accessor.parameters.length > 0) {
var hasThis = accessor.parameters.length === 2 && parameterIsThisKeyword(accessor.parameters[0]);
- return accessor.parameters[hasThis ? 1 : 0].type;
+ return accessor.parameters[hasThis ? 1 : 0];
}
}
+ /** Get the type annotation for the value parameter. */
+ function getSetAccessorTypeAnnotationNode(accessor) {
+ var parameter = getSetAccessorValueParameter(accessor);
+ return parameter && parameter.type;
+ }
ts.getSetAccessorTypeAnnotationNode = getSetAccessorTypeAnnotationNode;
function getThisParameter(signature) {
if (signature.parameters.length) {
@@ -9174,6 +9333,55 @@ var ts;
};
}
ts.getAllAccessorDeclarations = getAllAccessorDeclarations;
+ /**
+ * Gets the effective type annotation of a variable, parameter, or property. If the node was
+ * parsed in a JavaScript file, gets the type annotation from JSDoc.
+ */
+ function getEffectiveTypeAnnotationNode(node) {
+ if (node.type) {
+ return node.type;
+ }
+ if (node.flags & 65536 /* JavaScriptFile */) {
+ return getJSDocType(node);
+ }
+ }
+ ts.getEffectiveTypeAnnotationNode = getEffectiveTypeAnnotationNode;
+ /**
+ * Gets the effective return type annotation of a signature. If the node was parsed in a
+ * JavaScript file, gets the return type annotation from JSDoc.
+ */
+ function getEffectiveReturnTypeNode(node) {
+ if (node.type) {
+ return node.type;
+ }
+ if (node.flags & 65536 /* JavaScriptFile */) {
+ return getJSDocReturnType(node);
+ }
+ }
+ ts.getEffectiveReturnTypeNode = getEffectiveReturnTypeNode;
+ /**
+ * Gets the effective type parameters. If the node was parsed in a
+ * JavaScript file, gets the type parameters from the `@template` tag from JSDoc.
+ */
+ function getEffectiveTypeParameterDeclarations(node) {
+ if (node.typeParameters) {
+ return node.typeParameters;
+ }
+ if (node.flags & 65536 /* JavaScriptFile */) {
+ var templateTag = getJSDocTemplateTag(node);
+ return templateTag && templateTag.typeParameters;
+ }
+ }
+ ts.getEffectiveTypeParameterDeclarations = getEffectiveTypeParameterDeclarations;
+ /**
+ * Gets the effective type annotation of the value parameter of a set accessor. If the node
+ * was parsed in a JavaScript file, gets the type annotation from JSDoc.
+ */
+ function getEffectiveSetAccessorTypeAnnotationNode(node) {
+ var parameter = getSetAccessorValueParameter(node);
+ return parameter && getEffectiveTypeAnnotationNode(parameter);
+ }
+ ts.getEffectiveSetAccessorTypeAnnotationNode = getEffectiveSetAccessorTypeAnnotationNode;
function emitNewLineBeforeLeadingComments(lineMap, writer, node, leadingComments) {
emitNewLineBeforeLeadingCommentsOfPosition(lineMap, writer, node.pos, leadingComments);
}
@@ -9379,6 +9587,13 @@ var ts;
if (node.modifierFlagsCache & 536870912 /* HasComputedFlags */) {
return node.modifierFlagsCache & ~536870912 /* HasComputedFlags */;
}
+ var flags = getModifierFlagsNoCache(node);
+ node.modifierFlagsCache = flags | 536870912 /* HasComputedFlags */;
+ return flags;
+ }
+ ts.getModifierFlags = getModifierFlags;
+ /* @internal */
+ function getModifierFlagsNoCache(node) {
var flags = 0 /* None */;
if (node.modifiers) {
for (var _i = 0, _a = node.modifiers; _i < _a.length; _i++) {
@@ -9389,10 +9604,9 @@ var ts;
if (node.flags & 4 /* NestedNamespace */ || (node.kind === 71 /* Identifier */ && node.isInJSDocNamespace)) {
flags |= 1 /* Export */;
}
- node.modifierFlagsCache = flags | 536870912 /* HasComputedFlags */;
return flags;
}
- ts.getModifierFlags = getModifierFlags;
+ ts.getModifierFlagsNoCache = getModifierFlagsNoCache;
function modifierToFlag(token) {
switch (token) {
case 115 /* StaticKeyword */: return 32 /* Static */;
@@ -9424,17 +9638,17 @@ var ts;
function tryGetClassExtendingExpressionWithTypeArguments(node) {
if (node.kind === 201 /* ExpressionWithTypeArguments */ &&
node.parent.token === 85 /* ExtendsKeyword */ &&
- isClassLike(node.parent.parent)) {
+ ts.isClassLike(node.parent.parent)) {
return node.parent.parent;
}
}
ts.tryGetClassExtendingExpressionWithTypeArguments = tryGetClassExtendingExpressionWithTypeArguments;
function isAssignmentExpression(node, excludeCompoundAssignment) {
- return isBinaryExpression(node)
+ return ts.isBinaryExpression(node)
&& (excludeCompoundAssignment
? node.operatorToken.kind === 58 /* EqualsToken */
: isAssignmentOperator(node.operatorToken.kind))
- && isLeftHandSideExpression(node.left);
+ && ts.isLeftHandSideExpression(node.left);
}
ts.isAssignmentExpression = isAssignmentExpression;
function isDestructuringAssignment(node) {
@@ -9456,7 +9670,7 @@ var ts;
if (node.kind === 71 /* Identifier */) {
return true;
}
- else if (isPropertyAccessExpression(node)) {
+ else if (ts.isPropertyAccessExpression(node)) {
return isSupportedExpressionWithTypeArgumentsRest(node.expression);
}
else {
@@ -9473,7 +9687,7 @@ var ts;
&& node.parent
&& node.parent.token === 108 /* ImplementsKeyword */
&& node.parent.parent
- && isClassLike(node.parent.parent);
+ && ts.isClassLike(node.parent.parent);
}
ts.isExpressionWithTypeArgumentsInClassImplementsClause = isExpressionWithTypeArgumentsInClassImplementsClause;
function isEntityNameExpression(node) {
@@ -9497,11 +9711,11 @@ var ts;
}
ts.isEmptyArrayLiteral = isEmptyArrayLiteral;
function getLocalSymbolForExportDefault(symbol) {
- return isExportDefaultSymbol(symbol) ? symbol.valueDeclaration.localSymbol : undefined;
+ return isExportDefaultSymbol(symbol) ? symbol.declarations[0].localSymbol : undefined;
}
ts.getLocalSymbolForExportDefault = getLocalSymbolForExportDefault;
function isExportDefaultSymbol(symbol) {
- return symbol && symbol.valueDeclaration && hasModifier(symbol.valueDeclaration, 512 /* Default */);
+ return symbol && ts.length(symbol.declarations) > 0 && hasModifier(symbol.declarations[0], 512 /* Default */);
}
/** Return ".ts", ".d.ts", or ".tsx", if that is the extension. */
function tryExtractTypeScriptExtension(fileName) {
@@ -9577,13 +9791,13 @@ var ts;
var carriageReturnLineFeed = "\r\n";
var lineFeed = "\n";
function getNewLineCharacter(options) {
- if (options.newLine === 0 /* CarriageReturnLineFeed */) {
- return carriageReturnLineFeed;
+ switch (options.newLine) {
+ case 0 /* CarriageReturnLineFeed */:
+ return carriageReturnLineFeed;
+ case 1 /* LineFeed */:
+ return lineFeed;
}
- else if (options.newLine === 1 /* LineFeed */) {
- return lineFeed;
- }
- else if (ts.sys) {
+ if (ts.sys) {
return ts.sys.newLine;
}
return carriageReturnLineFeed;
@@ -9661,27 +9875,77 @@ var ts;
}
return false;
}
- var syntaxKindCache = [];
- function formatSyntaxKind(kind) {
- var syntaxKindEnum = ts.SyntaxKind;
- if (syntaxKindEnum) {
- var cached = syntaxKindCache[kind];
- if (cached !== undefined) {
- return cached;
- }
- for (var name in syntaxKindEnum) {
- if (syntaxKindEnum[name] === kind) {
- var result = kind + " (" + name + ")";
- syntaxKindCache[kind] = result;
- return result;
+ /**
+ * Formats an enum value as a string for debugging and debug assertions.
+ */
+ function formatEnum(value, enumObject, isFlags) {
+ if (value === void 0) { value = 0; }
+ var members = getEnumMembers(enumObject);
+ if (value === 0) {
+ return members.length > 0 && members[0][0] === 0 ? members[0][1] : "0";
+ }
+ if (isFlags) {
+ var result = "";
+ var remainingFlags = value;
+ for (var i = members.length - 1; i >= 0 && remainingFlags !== 0; i--) {
+ var _a = members[i], enumValue = _a[0], enumName = _a[1];
+ if (enumValue !== 0 && (remainingFlags & enumValue) === enumValue) {
+ remainingFlags &= ~enumValue;
+ result = "" + enumName + (result ? ", " : "") + result;
}
}
+ if (remainingFlags === 0) {
+ return result;
+ }
}
else {
- return kind.toString();
+ for (var _i = 0, members_1 = members; _i < members_1.length; _i++) {
+ var _b = members_1[_i], enumValue = _b[0], enumName = _b[1];
+ if (enumValue === value) {
+ return enumName;
+ }
+ }
+ }
+ return value.toString();
+ }
+ function getEnumMembers(enumObject) {
+ var result = [];
+ for (var name in enumObject) {
+ var value = enumObject[name];
+ if (typeof value === "number") {
+ result.push([value, name]);
+ }
}
+ return ts.stableSort(result, function (x, y) { return ts.compareValues(x[0], y[0]); });
+ }
+ function formatSyntaxKind(kind) {
+ return formatEnum(kind, ts.SyntaxKind, /*isFlags*/ false);
}
ts.formatSyntaxKind = formatSyntaxKind;
+ function formatModifierFlags(flags) {
+ return formatEnum(flags, ts.ModifierFlags, /*isFlags*/ true);
+ }
+ ts.formatModifierFlags = formatModifierFlags;
+ function formatTransformFlags(flags) {
+ return formatEnum(flags, ts.TransformFlags, /*isFlags*/ true);
+ }
+ ts.formatTransformFlags = formatTransformFlags;
+ function formatEmitFlags(flags) {
+ return formatEnum(flags, ts.EmitFlags, /*isFlags*/ true);
+ }
+ ts.formatEmitFlags = formatEmitFlags;
+ function formatSymbolFlags(flags) {
+ return formatEnum(flags, ts.SymbolFlags, /*isFlags*/ true);
+ }
+ ts.formatSymbolFlags = formatSymbolFlags;
+ function formatTypeFlags(flags) {
+ return formatEnum(flags, ts.TypeFlags, /*isFlags*/ true);
+ }
+ ts.formatTypeFlags = formatTypeFlags;
+ function formatObjectFlags(flags) {
+ return formatEnum(flags, ts.ObjectFlags, /*isFlags*/ true);
+ }
+ ts.formatObjectFlags = formatObjectFlags;
function getRangePos(range) {
return range ? range.pos : -1;
}
@@ -9864,42 +10128,1152 @@ var ts;
return node.symbol && getDeclarationOfKind(node.symbol, kind) === node;
}
ts.isFirstDeclarationOfKind = isFirstDeclarationOfKind;
- // Node tests
- //
- // All node tests in the following list should *not* reference parent pointers so that
- // they may be used with transformations.
+ function isWatchSet(options) {
+ // Firefox has Object.prototype.watch
+ return options.watch && options.hasOwnProperty("watch");
+ }
+ ts.isWatchSet = isWatchSet;
+ function getCheckFlags(symbol) {
+ return symbol.flags & 134217728 /* Transient */ ? symbol.checkFlags : 0;
+ }
+ ts.getCheckFlags = getCheckFlags;
+ function getDeclarationModifierFlagsFromSymbol(s) {
+ 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;
+ }
+ ts.getDeclarationModifierFlagsFromSymbol = getDeclarationModifierFlagsFromSymbol;
+ function levenshtein(s1, s2) {
+ var previous = new Array(s2.length + 1);
+ var current = new Array(s2.length + 1);
+ for (var i = 0; i < s2.length + 1; i++) {
+ previous[i] = i;
+ current[i] = -1;
+ }
+ for (var i = 1; i < s1.length + 1; i++) {
+ current[0] = i;
+ for (var j = 1; j < s2.length + 1; j++) {
+ current[j] = Math.min(previous[j] + 1, current[j - 1] + 1, previous[j - 1] + (s1[i - 1] === s2[j - 1] ? 0 : 2));
+ }
+ // shift current back to previous, and then reuse previous' array
+ var tmp = previous;
+ previous = current;
+ current = tmp;
+ }
+ return previous[previous.length - 1];
+ }
+ ts.levenshtein = levenshtein;
+})(ts || (ts = {}));
+(function (ts) {
+ function getDefaultLibFileName(options) {
+ switch (options.target) {
+ case 5 /* ESNext */:
+ return "lib.esnext.full.d.ts";
+ case 4 /* ES2017 */:
+ return "lib.es2017.full.d.ts";
+ case 3 /* ES2016 */:
+ return "lib.es2016.full.d.ts";
+ case 2 /* ES2015 */:
+ return "lib.es6.d.ts"; // We don't use lib.es2015.full.d.ts due to breaking change.
+ default:
+ return "lib.d.ts";
+ }
+ }
+ ts.getDefaultLibFileName = getDefaultLibFileName;
+ function textSpanEnd(span) {
+ return span.start + span.length;
+ }
+ ts.textSpanEnd = textSpanEnd;
+ function textSpanIsEmpty(span) {
+ return span.length === 0;
+ }
+ ts.textSpanIsEmpty = textSpanIsEmpty;
+ function textSpanContainsPosition(span, position) {
+ return position >= span.start && position < textSpanEnd(span);
+ }
+ ts.textSpanContainsPosition = textSpanContainsPosition;
+ // Returns true if 'span' contains 'other'.
+ function textSpanContainsTextSpan(span, other) {
+ return other.start >= span.start && textSpanEnd(other) <= textSpanEnd(span);
+ }
+ ts.textSpanContainsTextSpan = textSpanContainsTextSpan;
+ function textSpanOverlapsWith(span, other) {
+ var overlapStart = Math.max(span.start, other.start);
+ var overlapEnd = Math.min(textSpanEnd(span), textSpanEnd(other));
+ return overlapStart < overlapEnd;
+ }
+ ts.textSpanOverlapsWith = textSpanOverlapsWith;
+ function textSpanOverlap(span1, span2) {
+ var overlapStart = Math.max(span1.start, span2.start);
+ var overlapEnd = Math.min(textSpanEnd(span1), textSpanEnd(span2));
+ if (overlapStart < overlapEnd) {
+ return createTextSpanFromBounds(overlapStart, overlapEnd);
+ }
+ return undefined;
+ }
+ ts.textSpanOverlap = textSpanOverlap;
+ function textSpanIntersectsWithTextSpan(span, other) {
+ return other.start <= textSpanEnd(span) && textSpanEnd(other) >= span.start;
+ }
+ ts.textSpanIntersectsWithTextSpan = textSpanIntersectsWithTextSpan;
+ function textSpanIntersectsWith(span, start, length) {
+ var end = start + length;
+ return start <= textSpanEnd(span) && end >= span.start;
+ }
+ ts.textSpanIntersectsWith = textSpanIntersectsWith;
+ function decodedTextSpanIntersectsWith(start1, length1, start2, length2) {
+ var end1 = start1 + length1;
+ var end2 = start2 + length2;
+ return start2 <= end1 && end2 >= start1;
+ }
+ ts.decodedTextSpanIntersectsWith = decodedTextSpanIntersectsWith;
+ function textSpanIntersectsWithPosition(span, position) {
+ return position <= textSpanEnd(span) && position >= span.start;
+ }
+ ts.textSpanIntersectsWithPosition = textSpanIntersectsWithPosition;
+ function textSpanIntersection(span1, span2) {
+ var intersectStart = Math.max(span1.start, span2.start);
+ var intersectEnd = Math.min(textSpanEnd(span1), textSpanEnd(span2));
+ if (intersectStart <= intersectEnd) {
+ return createTextSpanFromBounds(intersectStart, intersectEnd);
+ }
+ return undefined;
+ }
+ ts.textSpanIntersection = textSpanIntersection;
+ function createTextSpan(start, length) {
+ if (start < 0) {
+ throw new Error("start < 0");
+ }
+ if (length < 0) {
+ throw new Error("length < 0");
+ }
+ return { start: start, length: length };
+ }
+ ts.createTextSpan = createTextSpan;
+ function createTextSpanFromBounds(start, end) {
+ return createTextSpan(start, end - start);
+ }
+ ts.createTextSpanFromBounds = createTextSpanFromBounds;
+ function textChangeRangeNewSpan(range) {
+ return createTextSpan(range.span.start, range.newLength);
+ }
+ ts.textChangeRangeNewSpan = textChangeRangeNewSpan;
+ function textChangeRangeIsUnchanged(range) {
+ return textSpanIsEmpty(range.span) && range.newLength === 0;
+ }
+ ts.textChangeRangeIsUnchanged = textChangeRangeIsUnchanged;
+ function createTextChangeRange(span, newLength) {
+ if (newLength < 0) {
+ throw new Error("newLength < 0");
+ }
+ return { span: span, newLength: newLength };
+ }
+ ts.createTextChangeRange = createTextChangeRange;
+ ts.unchangedTextChangeRange = createTextChangeRange(createTextSpan(0, 0), 0);
+ /**
+ * Called to merge all the changes that occurred across several versions of a script snapshot
+ * into a single change. i.e. if a user keeps making successive edits to a script we will
+ * have a text change from V1 to V2, V2 to V3, ..., Vn.
+ *
+ * This function will then merge those changes into a single change range valid between V1 and
+ * Vn.
+ */
+ function collapseTextChangeRangesAcrossMultipleVersions(changes) {
+ if (changes.length === 0) {
+ return ts.unchangedTextChangeRange;
+ }
+ if (changes.length === 1) {
+ return changes[0];
+ }
+ // We change from talking about { { oldStart, oldLength }, newLength } to { oldStart, oldEnd, newEnd }
+ // as it makes things much easier to reason about.
+ var change0 = changes[0];
+ var oldStartN = change0.span.start;
+ var oldEndN = textSpanEnd(change0.span);
+ var newEndN = oldStartN + change0.newLength;
+ for (var i = 1; i < changes.length; i++) {
+ var nextChange = changes[i];
+ // Consider the following case:
+ // i.e. two edits. The first represents the text change range { { 10, 50 }, 30 }. i.e. The span starting
+ // at 10, with length 50 is reduced to length 30. The second represents the text change range { { 30, 30 }, 40 }.
+ // i.e. the span starting at 30 with length 30 is increased to length 40.
+ //
+ // 0 10 20 30 40 50 60 70 80 90 100
+ // -------------------------------------------------------------------------------------------------------
+ // | /
+ // | /----
+ // T1 | /----
+ // | /----
+ // | /----
+ // -------------------------------------------------------------------------------------------------------
+ // | \
+ // | \
+ // T2 | \
+ // | \
+ // | \
+ // -------------------------------------------------------------------------------------------------------
+ //
+ // Merging these turns out to not be too difficult. First, determining the new start of the change is trivial
+ // it's just the min of the old and new starts. i.e.:
+ //
+ // 0 10 20 30 40 50 60 70 80 90 100
+ // ------------------------------------------------------------*------------------------------------------
+ // | /
+ // | /----
+ // T1 | /----
+ // | /----
+ // | /----
+ // ----------------------------------------$-------------------$------------------------------------------
+ // . | \
+ // . | \
+ // T2 . | \
+ // . | \
+ // . | \
+ // ----------------------------------------------------------------------*--------------------------------
+ //
+ // (Note the dots represent the newly inferred start.
+ // Determining the new and old end is also pretty simple. Basically it boils down to paying attention to the
+ // absolute positions at the asterisks, and the relative change between the dollar signs. Basically, we see
+ // which if the two $'s precedes the other, and we move that one forward until they line up. in this case that
+ // means:
+ //
+ // 0 10 20 30 40 50 60 70 80 90 100
+ // --------------------------------------------------------------------------------*----------------------
+ // | /
+ // | /----
+ // T1 | /----
+ // | /----
+ // | /----
+ // ------------------------------------------------------------$------------------------------------------
+ // . | \
+ // . | \
+ // T2 . | \
+ // . | \
+ // . | \
+ // ----------------------------------------------------------------------*--------------------------------
+ //
+ // In other words (in this case), we're recognizing that the second edit happened after where the first edit
+ // ended with a delta of 20 characters (60 - 40). Thus, if we go back in time to where the first edit started
+ // that's the same as if we started at char 80 instead of 60.
+ //
+ // As it so happens, the same logic applies if the second edit precedes the first edit. In that case rather
+ // than pushing the first edit forward to match the second, we'll push the second edit forward to match the
+ // first.
+ //
+ // In this case that means we have { oldStart: 10, oldEnd: 80, newEnd: 70 } or, in TextChangeRange
+ // semantics: { { start: 10, length: 70 }, newLength: 60 }
+ //
+ // The math then works out as follows.
+ // If we have { oldStart1, oldEnd1, newEnd1 } and { oldStart2, oldEnd2, newEnd2 } then we can compute the
+ // final result like so:
+ //
+ // {
+ // oldStart3: Min(oldStart1, oldStart2),
+ // oldEnd3 : Max(oldEnd1, oldEnd1 + (oldEnd2 - newEnd1)),
+ // newEnd3 : Max(newEnd2, newEnd2 + (newEnd1 - oldEnd2))
+ // }
+ var oldStart1 = oldStartN;
+ var oldEnd1 = oldEndN;
+ var newEnd1 = newEndN;
+ var oldStart2 = nextChange.span.start;
+ var oldEnd2 = textSpanEnd(nextChange.span);
+ var newEnd2 = oldStart2 + nextChange.newLength;
+ oldStartN = Math.min(oldStart1, oldStart2);
+ oldEndN = Math.max(oldEnd1, oldEnd1 + (oldEnd2 - newEnd1));
+ newEndN = Math.max(newEnd2, newEnd2 + (newEnd1 - oldEnd2));
+ }
+ return createTextChangeRange(createTextSpanFromBounds(oldStartN, oldEndN), /*newLength*/ newEndN - oldStartN);
+ }
+ ts.collapseTextChangeRangesAcrossMultipleVersions = collapseTextChangeRangesAcrossMultipleVersions;
+ function getTypeParameterOwner(d) {
+ if (d && d.kind === 145 /* TypeParameter */) {
+ for (var current = d; current; current = current.parent) {
+ if (ts.isFunctionLike(current) || ts.isClassLike(current) || current.kind === 230 /* InterfaceDeclaration */) {
+ return current;
+ }
+ }
+ }
+ }
+ ts.getTypeParameterOwner = getTypeParameterOwner;
+ function isParameterPropertyDeclaration(node) {
+ return ts.hasModifier(node, 92 /* ParameterPropertyModifier */) && node.parent.kind === 152 /* Constructor */ && ts.isClassLike(node.parent.parent);
+ }
+ ts.isParameterPropertyDeclaration = isParameterPropertyDeclaration;
+ function walkUpBindingElementsAndPatterns(node) {
+ while (node && (node.kind === 176 /* BindingElement */ || ts.isBindingPattern(node))) {
+ node = node.parent;
+ }
+ return node;
+ }
+ function getCombinedModifierFlags(node) {
+ node = walkUpBindingElementsAndPatterns(node);
+ var flags = ts.getModifierFlags(node);
+ if (node.kind === 226 /* VariableDeclaration */) {
+ node = node.parent;
+ }
+ if (node && node.kind === 227 /* VariableDeclarationList */) {
+ flags |= ts.getModifierFlags(node);
+ node = node.parent;
+ }
+ if (node && node.kind === 208 /* VariableStatement */) {
+ flags |= ts.getModifierFlags(node);
+ }
+ return flags;
+ }
+ ts.getCombinedModifierFlags = getCombinedModifierFlags;
+ // Returns the node flags for this node and all relevant parent nodes. This is done so that
+ // nodes like variable declarations and binding elements can returned a view of their flags
+ // that includes the modifiers from their container. i.e. flags like export/declare aren't
+ // stored on the variable declaration directly, but on the containing variable statement
+ // (if it has one). Similarly, flags for let/const are store on the variable declaration
+ // list. By calling this function, all those flags are combined so that the client can treat
+ // the node as if it actually had those flags.
+ function getCombinedNodeFlags(node) {
+ node = walkUpBindingElementsAndPatterns(node);
+ var flags = node.flags;
+ if (node.kind === 226 /* VariableDeclaration */) {
+ node = node.parent;
+ }
+ if (node && node.kind === 227 /* VariableDeclarationList */) {
+ flags |= node.flags;
+ node = node.parent;
+ }
+ if (node && node.kind === 208 /* 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.
+ */
+ function validateLocaleAndSetLanguage(locale, sys, errors) {
+ var matchResult = /^([a-z]+)([_\-]([a-z]+))?$/.exec(locale.toLowerCase());
+ if (!matchResult) {
+ if (errors) {
+ errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1, "en", "ja-jp"));
+ }
+ return;
+ }
+ var language = matchResult[1];
+ var territory = matchResult[3];
+ // First try the entire locale, then fall back to just language if that's all we have.
+ // Either ways do not fail, and fallback to the English diagnostic strings.
+ if (!trySetLanguageAndTerritory(language, territory, errors)) {
+ trySetLanguageAndTerritory(language, /*territory*/ undefined, errors);
+ }
+ function trySetLanguageAndTerritory(language, territory, errors) {
+ var compilerFilePath = ts.normalizePath(sys.getExecutingFilePath());
+ var containingDirectoryPath = ts.getDirectoryPath(compilerFilePath);
+ var filePath = ts.combinePaths(containingDirectoryPath, language);
+ if (territory) {
+ filePath = filePath + "-" + territory;
+ }
+ filePath = sys.resolvePath(ts.combinePaths(filePath, "diagnosticMessages.generated.json"));
+ if (!sys.fileExists(filePath)) {
+ return false;
+ }
+ // TODO: Add codePage support for readFile?
+ var fileContents = "";
+ try {
+ fileContents = sys.readFile(filePath);
+ }
+ catch (e) {
+ if (errors) {
+ errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Unable_to_open_file_0, filePath));
+ }
+ return false;
+ }
+ try {
+ ts.localizedDiagnosticMessages = JSON.parse(fileContents);
+ }
+ catch (e) {
+ if (errors) {
+ errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Corrupted_locale_file_0, filePath));
+ }
+ return false;
+ }
+ return true;
+ }
+ }
+ 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;
+ function getNameOfDeclaration(declaration) {
+ if (!declaration) {
+ return undefined;
+ }
+ if (declaration.kind === 194 /* BinaryExpression */) {
+ var expr = declaration;
+ switch (ts.getSpecialPropertyAssignmentKind(expr)) {
+ case 1 /* ExportsProperty */:
+ case 4 /* ThisProperty */:
+ case 5 /* Property */:
+ case 3 /* PrototypeProperty */:
+ return expr.left.name;
+ default:
+ return undefined;
+ }
+ }
+ else {
+ return declaration.name;
+ }
+ }
+ ts.getNameOfDeclaration = getNameOfDeclaration;
+})(ts || (ts = {}));
+// Simple node tests of the form `node.kind === SyntaxKind.Foo`.
+(function (ts) {
+ // Literals
+ function isNumericLiteral(node) {
+ return node.kind === 8 /* NumericLiteral */;
+ }
+ ts.isNumericLiteral = isNumericLiteral;
+ function isStringLiteral(node) {
+ return node.kind === 9 /* StringLiteral */;
+ }
+ ts.isStringLiteral = isStringLiteral;
+ function isJsxText(node) {
+ return node.kind === 10 /* JsxText */;
+ }
+ ts.isJsxText = isJsxText;
+ function isRegularExpressionLiteral(node) {
+ return node.kind === 12 /* RegularExpressionLiteral */;
+ }
+ ts.isRegularExpressionLiteral = isRegularExpressionLiteral;
+ function isNoSubstitutionTemplateLiteral(node) {
+ return node.kind === 13 /* NoSubstitutionTemplateLiteral */;
+ }
+ ts.isNoSubstitutionTemplateLiteral = isNoSubstitutionTemplateLiteral;
+ // Pseudo-literals
+ function isTemplateHead(node) {
+ return node.kind === 14 /* TemplateHead */;
+ }
+ ts.isTemplateHead = isTemplateHead;
+ function isTemplateMiddle(node) {
+ return node.kind === 15 /* TemplateMiddle */;
+ }
+ ts.isTemplateMiddle = isTemplateMiddle;
+ function isTemplateTail(node) {
+ return node.kind === 16 /* TemplateTail */;
+ }
+ ts.isTemplateTail = isTemplateTail;
+ function isIdentifier(node) {
+ return node.kind === 71 /* Identifier */;
+ }
+ ts.isIdentifier = isIdentifier;
+ // Names
+ function isQualifiedName(node) {
+ return node.kind === 143 /* QualifiedName */;
+ }
+ ts.isQualifiedName = isQualifiedName;
+ function isComputedPropertyName(node) {
+ return node.kind === 144 /* ComputedPropertyName */;
+ }
+ ts.isComputedPropertyName = isComputedPropertyName;
+ // Signature elements
+ function isTypeParameterDeclaration(node) {
+ return node.kind === 145 /* TypeParameter */;
+ }
+ ts.isTypeParameterDeclaration = isTypeParameterDeclaration;
+ function isParameter(node) {
+ return node.kind === 146 /* Parameter */;
+ }
+ ts.isParameter = isParameter;
+ function isDecorator(node) {
+ return node.kind === 147 /* Decorator */;
+ }
+ ts.isDecorator = isDecorator;
+ // TypeMember
+ function isPropertySignature(node) {
+ return node.kind === 148 /* PropertySignature */;
+ }
+ ts.isPropertySignature = isPropertySignature;
+ function isPropertyDeclaration(node) {
+ return node.kind === 149 /* PropertyDeclaration */;
+ }
+ ts.isPropertyDeclaration = isPropertyDeclaration;
+ function isMethodSignature(node) {
+ return node.kind === 150 /* MethodSignature */;
+ }
+ ts.isMethodSignature = isMethodSignature;
+ function isMethodDeclaration(node) {
+ return node.kind === 151 /* MethodDeclaration */;
+ }
+ ts.isMethodDeclaration = isMethodDeclaration;
+ function isConstructorDeclaration(node) {
+ return node.kind === 152 /* Constructor */;
+ }
+ ts.isConstructorDeclaration = isConstructorDeclaration;
+ function isGetAccessorDeclaration(node) {
+ return node.kind === 153 /* GetAccessor */;
+ }
+ ts.isGetAccessorDeclaration = isGetAccessorDeclaration;
+ function isSetAccessorDeclaration(node) {
+ return node.kind === 154 /* SetAccessor */;
+ }
+ ts.isSetAccessorDeclaration = isSetAccessorDeclaration;
+ function isCallSignatureDeclaration(node) {
+ return node.kind === 155 /* CallSignature */;
+ }
+ ts.isCallSignatureDeclaration = isCallSignatureDeclaration;
+ function isConstructSignatureDeclaration(node) {
+ return node.kind === 156 /* ConstructSignature */;
+ }
+ ts.isConstructSignatureDeclaration = isConstructSignatureDeclaration;
+ function isIndexSignatureDeclaration(node) {
+ return node.kind === 157 /* IndexSignature */;
+ }
+ ts.isIndexSignatureDeclaration = isIndexSignatureDeclaration;
+ // Type
+ function isTypePredicateNode(node) {
+ return node.kind === 158 /* TypePredicate */;
+ }
+ ts.isTypePredicateNode = isTypePredicateNode;
+ function isTypeReferenceNode(node) {
+ return node.kind === 159 /* TypeReference */;
+ }
+ ts.isTypeReferenceNode = isTypeReferenceNode;
+ function isFunctionTypeNode(node) {
+ return node.kind === 160 /* FunctionType */;
+ }
+ ts.isFunctionTypeNode = isFunctionTypeNode;
+ function isConstructorTypeNode(node) {
+ return node.kind === 161 /* ConstructorType */;
+ }
+ ts.isConstructorTypeNode = isConstructorTypeNode;
+ function isTypeQueryNode(node) {
+ return node.kind === 162 /* TypeQuery */;
+ }
+ ts.isTypeQueryNode = isTypeQueryNode;
+ function isTypeLiteralNode(node) {
+ return node.kind === 163 /* TypeLiteral */;
+ }
+ ts.isTypeLiteralNode = isTypeLiteralNode;
+ function isArrayTypeNode(node) {
+ return node.kind === 164 /* ArrayType */;
+ }
+ ts.isArrayTypeNode = isArrayTypeNode;
+ function isTupleTypeNode(node) {
+ return node.kind === 165 /* TupleType */;
+ }
+ ts.isTupleTypeNode = isTupleTypeNode;
+ function isUnionTypeNode(node) {
+ return node.kind === 166 /* UnionType */;
+ }
+ ts.isUnionTypeNode = isUnionTypeNode;
+ function isIntersectionTypeNode(node) {
+ return node.kind === 167 /* IntersectionType */;
+ }
+ ts.isIntersectionTypeNode = isIntersectionTypeNode;
+ function isParenthesizedTypeNode(node) {
+ return node.kind === 168 /* ParenthesizedType */;
+ }
+ ts.isParenthesizedTypeNode = isParenthesizedTypeNode;
+ function isThisTypeNode(node) {
+ return node.kind === 169 /* ThisType */;
+ }
+ ts.isThisTypeNode = isThisTypeNode;
+ function isTypeOperatorNode(node) {
+ return node.kind === 170 /* TypeOperator */;
+ }
+ ts.isTypeOperatorNode = isTypeOperatorNode;
+ function isIndexedAccessTypeNode(node) {
+ return node.kind === 171 /* IndexedAccessType */;
+ }
+ ts.isIndexedAccessTypeNode = isIndexedAccessTypeNode;
+ function isMappedTypeNode(node) {
+ return node.kind === 172 /* MappedType */;
+ }
+ ts.isMappedTypeNode = isMappedTypeNode;
+ function isLiteralTypeNode(node) {
+ return node.kind === 173 /* LiteralType */;
+ }
+ ts.isLiteralTypeNode = isLiteralTypeNode;
+ // Binding patterns
+ function isObjectBindingPattern(node) {
+ return node.kind === 174 /* ObjectBindingPattern */;
+ }
+ ts.isObjectBindingPattern = isObjectBindingPattern;
+ function isArrayBindingPattern(node) {
+ return node.kind === 175 /* ArrayBindingPattern */;
+ }
+ ts.isArrayBindingPattern = isArrayBindingPattern;
+ function isBindingElement(node) {
+ return node.kind === 176 /* BindingElement */;
+ }
+ ts.isBindingElement = isBindingElement;
+ // Expression
+ function isArrayLiteralExpression(node) {
+ return node.kind === 177 /* ArrayLiteralExpression */;
+ }
+ ts.isArrayLiteralExpression = isArrayLiteralExpression;
+ function isObjectLiteralExpression(node) {
+ return node.kind === 178 /* ObjectLiteralExpression */;
+ }
+ ts.isObjectLiteralExpression = isObjectLiteralExpression;
+ function isPropertyAccessExpression(node) {
+ return node.kind === 179 /* PropertyAccessExpression */;
+ }
+ ts.isPropertyAccessExpression = isPropertyAccessExpression;
+ function isElementAccessExpression(node) {
+ return node.kind === 180 /* ElementAccessExpression */;
+ }
+ ts.isElementAccessExpression = isElementAccessExpression;
+ function isCallExpression(node) {
+ return node.kind === 181 /* CallExpression */;
+ }
+ ts.isCallExpression = isCallExpression;
+ function isNewExpression(node) {
+ return node.kind === 182 /* NewExpression */;
+ }
+ ts.isNewExpression = isNewExpression;
+ function isTaggedTemplateExpression(node) {
+ return node.kind === 183 /* TaggedTemplateExpression */;
+ }
+ ts.isTaggedTemplateExpression = isTaggedTemplateExpression;
+ function isTypeAssertion(node) {
+ return node.kind === 184 /* TypeAssertionExpression */;
+ }
+ ts.isTypeAssertion = isTypeAssertion;
+ function isParenthesizedExpression(node) {
+ return node.kind === 185 /* ParenthesizedExpression */;
+ }
+ ts.isParenthesizedExpression = isParenthesizedExpression;
+ function isFunctionExpression(node) {
+ return node.kind === 186 /* FunctionExpression */;
+ }
+ ts.isFunctionExpression = isFunctionExpression;
+ function isArrowFunction(node) {
+ return node.kind === 187 /* ArrowFunction */;
+ }
+ ts.isArrowFunction = isArrowFunction;
+ function isDeleteExpression(node) {
+ return node.kind === 188 /* DeleteExpression */;
+ }
+ ts.isDeleteExpression = isDeleteExpression;
+ function isTypeOfExpression(node) {
+ return node.kind === 191 /* AwaitExpression */;
+ }
+ ts.isTypeOfExpression = isTypeOfExpression;
+ function isVoidExpression(node) {
+ return node.kind === 190 /* VoidExpression */;
+ }
+ ts.isVoidExpression = isVoidExpression;
+ function isAwaitExpression(node) {
+ return node.kind === 191 /* AwaitExpression */;
+ }
+ ts.isAwaitExpression = isAwaitExpression;
+ function isPrefixUnaryExpression(node) {
+ return node.kind === 192 /* PrefixUnaryExpression */;
+ }
+ ts.isPrefixUnaryExpression = isPrefixUnaryExpression;
+ function isPostfixUnaryExpression(node) {
+ return node.kind === 193 /* PostfixUnaryExpression */;
+ }
+ ts.isPostfixUnaryExpression = isPostfixUnaryExpression;
+ function isBinaryExpression(node) {
+ return node.kind === 194 /* BinaryExpression */;
+ }
+ ts.isBinaryExpression = isBinaryExpression;
+ function isConditionalExpression(node) {
+ return node.kind === 195 /* ConditionalExpression */;
+ }
+ ts.isConditionalExpression = isConditionalExpression;
+ function isTemplateExpression(node) {
+ return node.kind === 196 /* TemplateExpression */;
+ }
+ ts.isTemplateExpression = isTemplateExpression;
+ function isYieldExpression(node) {
+ return node.kind === 197 /* YieldExpression */;
+ }
+ ts.isYieldExpression = isYieldExpression;
+ function isSpreadElement(node) {
+ return node.kind === 198 /* SpreadElement */;
+ }
+ ts.isSpreadElement = isSpreadElement;
+ function isClassExpression(node) {
+ return node.kind === 199 /* ClassExpression */;
+ }
+ ts.isClassExpression = isClassExpression;
+ function isOmittedExpression(node) {
+ return node.kind === 200 /* OmittedExpression */;
+ }
+ ts.isOmittedExpression = isOmittedExpression;
+ function isExpressionWithTypeArguments(node) {
+ return node.kind === 201 /* ExpressionWithTypeArguments */;
+ }
+ ts.isExpressionWithTypeArguments = isExpressionWithTypeArguments;
+ function isAsExpression(node) {
+ return node.kind === 202 /* AsExpression */;
+ }
+ ts.isAsExpression = isAsExpression;
+ function isNonNullExpression(node) {
+ return node.kind === 203 /* NonNullExpression */;
+ }
+ ts.isNonNullExpression = isNonNullExpression;
+ function isMetaProperty(node) {
+ return node.kind === 204 /* MetaProperty */;
+ }
+ ts.isMetaProperty = isMetaProperty;
+ // Misc
+ function isTemplateSpan(node) {
+ return node.kind === 205 /* TemplateSpan */;
+ }
+ ts.isTemplateSpan = isTemplateSpan;
+ function isSemicolonClassElement(node) {
+ return node.kind === 206 /* SemicolonClassElement */;
+ }
+ ts.isSemicolonClassElement = isSemicolonClassElement;
+ // Block
+ function isBlock(node) {
+ return node.kind === 207 /* Block */;
+ }
+ ts.isBlock = isBlock;
+ function isVariableStatement(node) {
+ return node.kind === 208 /* VariableStatement */;
+ }
+ ts.isVariableStatement = isVariableStatement;
+ function isEmptyStatement(node) {
+ return node.kind === 209 /* EmptyStatement */;
+ }
+ ts.isEmptyStatement = isEmptyStatement;
+ function isExpressionStatement(node) {
+ return node.kind === 210 /* ExpressionStatement */;
+ }
+ ts.isExpressionStatement = isExpressionStatement;
+ function isIfStatement(node) {
+ return node.kind === 211 /* IfStatement */;
+ }
+ ts.isIfStatement = isIfStatement;
+ function isDoStatement(node) {
+ return node.kind === 212 /* DoStatement */;
+ }
+ ts.isDoStatement = isDoStatement;
+ function isWhileStatement(node) {
+ return node.kind === 213 /* WhileStatement */;
+ }
+ ts.isWhileStatement = isWhileStatement;
+ function isForStatement(node) {
+ return node.kind === 214 /* ForStatement */;
+ }
+ ts.isForStatement = isForStatement;
+ function isForInStatement(node) {
+ return node.kind === 215 /* ForInStatement */;
+ }
+ ts.isForInStatement = isForInStatement;
+ function isForOfStatement(node) {
+ return node.kind === 216 /* ForOfStatement */;
+ }
+ ts.isForOfStatement = isForOfStatement;
+ function isContinueStatement(node) {
+ return node.kind === 217 /* ContinueStatement */;
+ }
+ ts.isContinueStatement = isContinueStatement;
+ function isBreakStatement(node) {
+ return node.kind === 218 /* BreakStatement */;
+ }
+ ts.isBreakStatement = isBreakStatement;
+ function isReturnStatement(node) {
+ return node.kind === 219 /* ReturnStatement */;
+ }
+ ts.isReturnStatement = isReturnStatement;
+ function isWithStatement(node) {
+ return node.kind === 220 /* WithStatement */;
+ }
+ ts.isWithStatement = isWithStatement;
+ function isSwitchStatement(node) {
+ return node.kind === 221 /* SwitchStatement */;
+ }
+ ts.isSwitchStatement = isSwitchStatement;
+ function isLabeledStatement(node) {
+ return node.kind === 222 /* LabeledStatement */;
+ }
+ ts.isLabeledStatement = isLabeledStatement;
+ function isThrowStatement(node) {
+ return node.kind === 223 /* ThrowStatement */;
+ }
+ ts.isThrowStatement = isThrowStatement;
+ function isTryStatement(node) {
+ return node.kind === 224 /* TryStatement */;
+ }
+ ts.isTryStatement = isTryStatement;
+ function isDebuggerStatement(node) {
+ return node.kind === 225 /* DebuggerStatement */;
+ }
+ ts.isDebuggerStatement = isDebuggerStatement;
+ function isVariableDeclaration(node) {
+ return node.kind === 226 /* VariableDeclaration */;
+ }
+ ts.isVariableDeclaration = isVariableDeclaration;
+ function isVariableDeclarationList(node) {
+ return node.kind === 227 /* VariableDeclarationList */;
+ }
+ ts.isVariableDeclarationList = isVariableDeclarationList;
+ function isFunctionDeclaration(node) {
+ return node.kind === 228 /* FunctionDeclaration */;
+ }
+ ts.isFunctionDeclaration = isFunctionDeclaration;
+ function isClassDeclaration(node) {
+ return node.kind === 229 /* ClassDeclaration */;
+ }
+ ts.isClassDeclaration = isClassDeclaration;
+ function isInterfaceDeclaration(node) {
+ return node.kind === 230 /* InterfaceDeclaration */;
+ }
+ ts.isInterfaceDeclaration = isInterfaceDeclaration;
+ function isTypeAliasDeclaration(node) {
+ return node.kind === 231 /* TypeAliasDeclaration */;
+ }
+ ts.isTypeAliasDeclaration = isTypeAliasDeclaration;
+ function isEnumDeclaration(node) {
+ return node.kind === 232 /* EnumDeclaration */;
+ }
+ ts.isEnumDeclaration = isEnumDeclaration;
+ function isModuleDeclaration(node) {
+ return node.kind === 233 /* ModuleDeclaration */;
+ }
+ ts.isModuleDeclaration = isModuleDeclaration;
+ function isModuleBlock(node) {
+ return node.kind === 234 /* ModuleBlock */;
+ }
+ ts.isModuleBlock = isModuleBlock;
+ function isCaseBlock(node) {
+ return node.kind === 235 /* CaseBlock */;
+ }
+ ts.isCaseBlock = isCaseBlock;
+ function isNamespaceExportDeclaration(node) {
+ return node.kind === 236 /* NamespaceExportDeclaration */;
+ }
+ ts.isNamespaceExportDeclaration = isNamespaceExportDeclaration;
+ function isImportEqualsDeclaration(node) {
+ return node.kind === 237 /* ImportEqualsDeclaration */;
+ }
+ ts.isImportEqualsDeclaration = isImportEqualsDeclaration;
+ function isImportDeclaration(node) {
+ return node.kind === 238 /* ImportDeclaration */;
+ }
+ ts.isImportDeclaration = isImportDeclaration;
+ function isImportClause(node) {
+ return node.kind === 239 /* ImportClause */;
+ }
+ ts.isImportClause = isImportClause;
+ function isNamespaceImport(node) {
+ return node.kind === 240 /* NamespaceImport */;
+ }
+ ts.isNamespaceImport = isNamespaceImport;
+ function isNamedImports(node) {
+ return node.kind === 241 /* NamedImports */;
+ }
+ ts.isNamedImports = isNamedImports;
+ function isImportSpecifier(node) {
+ return node.kind === 242 /* ImportSpecifier */;
+ }
+ ts.isImportSpecifier = isImportSpecifier;
+ function isExportAssignment(node) {
+ return node.kind === 243 /* ExportAssignment */;
+ }
+ ts.isExportAssignment = isExportAssignment;
+ function isExportDeclaration(node) {
+ return node.kind === 244 /* ExportDeclaration */;
+ }
+ ts.isExportDeclaration = isExportDeclaration;
+ function isNamedExports(node) {
+ return node.kind === 245 /* NamedExports */;
+ }
+ ts.isNamedExports = isNamedExports;
+ function isExportSpecifier(node) {
+ return node.kind === 246 /* ExportSpecifier */;
+ }
+ ts.isExportSpecifier = isExportSpecifier;
+ function isMissingDeclaration(node) {
+ return node.kind === 247 /* MissingDeclaration */;
+ }
+ ts.isMissingDeclaration = isMissingDeclaration;
+ // Module References
+ function isExternalModuleReference(node) {
+ return node.kind === 248 /* ExternalModuleReference */;
+ }
+ ts.isExternalModuleReference = isExternalModuleReference;
+ // JSX
+ function isJsxElement(node) {
+ return node.kind === 249 /* JsxElement */;
+ }
+ ts.isJsxElement = isJsxElement;
+ function isJsxSelfClosingElement(node) {
+ return node.kind === 250 /* JsxSelfClosingElement */;
+ }
+ ts.isJsxSelfClosingElement = isJsxSelfClosingElement;
+ function isJsxOpeningElement(node) {
+ return node.kind === 251 /* JsxOpeningElement */;
+ }
+ ts.isJsxOpeningElement = isJsxOpeningElement;
+ function isJsxClosingElement(node) {
+ return node.kind === 252 /* JsxClosingElement */;
+ }
+ ts.isJsxClosingElement = isJsxClosingElement;
+ function isJsxAttribute(node) {
+ return node.kind === 253 /* JsxAttribute */;
+ }
+ ts.isJsxAttribute = isJsxAttribute;
+ function isJsxAttributes(node) {
+ return node.kind === 254 /* JsxAttributes */;
+ }
+ ts.isJsxAttributes = isJsxAttributes;
+ function isJsxSpreadAttribute(node) {
+ return node.kind === 255 /* JsxSpreadAttribute */;
+ }
+ ts.isJsxSpreadAttribute = isJsxSpreadAttribute;
+ function isJsxExpression(node) {
+ return node.kind === 256 /* JsxExpression */;
+ }
+ ts.isJsxExpression = isJsxExpression;
+ // Clauses
+ function isCaseClause(node) {
+ return node.kind === 257 /* CaseClause */;
+ }
+ ts.isCaseClause = isCaseClause;
+ function isDefaultClause(node) {
+ return node.kind === 258 /* DefaultClause */;
+ }
+ ts.isDefaultClause = isDefaultClause;
+ function isHeritageClause(node) {
+ return node.kind === 259 /* HeritageClause */;
+ }
+ ts.isHeritageClause = isHeritageClause;
+ function isCatchClause(node) {
+ return node.kind === 260 /* CatchClause */;
+ }
+ ts.isCatchClause = isCatchClause;
+ // Property assignments
+ function isPropertyAssignment(node) {
+ return node.kind === 261 /* PropertyAssignment */;
+ }
+ ts.isPropertyAssignment = isPropertyAssignment;
+ function isShorthandPropertyAssignment(node) {
+ return node.kind === 262 /* ShorthandPropertyAssignment */;
+ }
+ ts.isShorthandPropertyAssignment = isShorthandPropertyAssignment;
+ function isSpreadAssignment(node) {
+ return node.kind === 263 /* SpreadAssignment */;
+ }
+ ts.isSpreadAssignment = isSpreadAssignment;
+ // Enum
+ function isEnumMember(node) {
+ return node.kind === 264 /* EnumMember */;
+ }
+ ts.isEnumMember = isEnumMember;
+ // Top-level nodes
+ function isSourceFile(node) {
+ return node.kind === 265 /* SourceFile */;
+ }
+ ts.isSourceFile = isSourceFile;
+ function isBundle(node) {
+ return node.kind === 266 /* Bundle */;
+ }
+ ts.isBundle = isBundle;
+ // JSDoc
+ function isJSDocTypeExpression(node) {
+ return node.kind === 267 /* JSDocTypeExpression */;
+ }
+ ts.isJSDocTypeExpression = isJSDocTypeExpression;
+ function isJSDocAllType(node) {
+ return node.kind === 268 /* JSDocAllType */;
+ }
+ ts.isJSDocAllType = isJSDocAllType;
+ function isJSDocUnknownType(node) {
+ return node.kind === 269 /* JSDocUnknownType */;
+ }
+ ts.isJSDocUnknownType = isJSDocUnknownType;
+ function isJSDocArrayType(node) {
+ return node.kind === 270 /* JSDocArrayType */;
+ }
+ ts.isJSDocArrayType = isJSDocArrayType;
+ function isJSDocUnionType(node) {
+ return node.kind === 271 /* JSDocUnionType */;
+ }
+ ts.isJSDocUnionType = isJSDocUnionType;
+ function isJSDocTupleType(node) {
+ return node.kind === 272 /* JSDocTupleType */;
+ }
+ ts.isJSDocTupleType = isJSDocTupleType;
+ function isJSDocNullableType(node) {
+ return node.kind === 273 /* JSDocNullableType */;
+ }
+ ts.isJSDocNullableType = isJSDocNullableType;
+ function isJSDocNonNullableType(node) {
+ return node.kind === 274 /* JSDocNonNullableType */;
+ }
+ ts.isJSDocNonNullableType = isJSDocNonNullableType;
+ function isJSDocRecordType(node) {
+ return node.kind === 275 /* JSDocRecordType */;
+ }
+ ts.isJSDocRecordType = isJSDocRecordType;
+ function isJSDocRecordMember(node) {
+ return node.kind === 276 /* JSDocRecordMember */;
+ }
+ ts.isJSDocRecordMember = isJSDocRecordMember;
+ function isJSDocTypeReference(node) {
+ return node.kind === 277 /* JSDocTypeReference */;
+ }
+ ts.isJSDocTypeReference = isJSDocTypeReference;
+ function isJSDocOptionalType(node) {
+ return node.kind === 278 /* JSDocOptionalType */;
+ }
+ ts.isJSDocOptionalType = isJSDocOptionalType;
+ function isJSDocFunctionType(node) {
+ return node.kind === 279 /* JSDocFunctionType */;
+ }
+ ts.isJSDocFunctionType = isJSDocFunctionType;
+ function isJSDocVariadicType(node) {
+ return node.kind === 280 /* JSDocVariadicType */;
+ }
+ ts.isJSDocVariadicType = isJSDocVariadicType;
+ function isJSDocConstructorType(node) {
+ return node.kind === 281 /* JSDocConstructorType */;
+ }
+ ts.isJSDocConstructorType = isJSDocConstructorType;
+ function isJSDocThisType(node) {
+ return node.kind === 282 /* JSDocThisType */;
+ }
+ ts.isJSDocThisType = isJSDocThisType;
+ function isJSDoc(node) {
+ return node.kind === 283 /* JSDocComment */;
+ }
+ ts.isJSDoc = isJSDoc;
+ function isJSDocAugmentsTag(node) {
+ return node.kind === 285 /* JSDocAugmentsTag */;
+ }
+ ts.isJSDocAugmentsTag = isJSDocAugmentsTag;
+ function isJSDocParameterTag(node) {
+ return node.kind === 287 /* JSDocParameterTag */;
+ }
+ ts.isJSDocParameterTag = isJSDocParameterTag;
+ function isJSDocReturnTag(node) {
+ return node.kind === 288 /* JSDocReturnTag */;
+ }
+ ts.isJSDocReturnTag = isJSDocReturnTag;
+ function isJSDocTypeTag(node) {
+ return node.kind === 289 /* JSDocTypeTag */;
+ }
+ ts.isJSDocTypeTag = isJSDocTypeTag;
+ function isJSDocTemplateTag(node) {
+ return node.kind === 290 /* JSDocTemplateTag */;
+ }
+ ts.isJSDocTemplateTag = isJSDocTemplateTag;
+ function isJSDocTypedefTag(node) {
+ return node.kind === 291 /* JSDocTypedefTag */;
+ }
+ ts.isJSDocTypedefTag = isJSDocTypedefTag;
+ function isJSDocPropertyTag(node) {
+ return node.kind === 292 /* JSDocPropertyTag */;
+ }
+ ts.isJSDocPropertyTag = isJSDocPropertyTag;
+ function isJSDocTypeLiteral(node) {
+ return node.kind === 293 /* JSDocTypeLiteral */;
+ }
+ ts.isJSDocTypeLiteral = isJSDocTypeLiteral;
+ function isJSDocLiteralType(node) {
+ return node.kind === 294 /* JSDocLiteralType */;
+ }
+ ts.isJSDocLiteralType = isJSDocLiteralType;
+})(ts || (ts = {}));
+// Node tests
+//
+// All node tests in the following list should *not* reference parent pointers so that
+// they may be used with transformations.
+(function (ts) {
+ /* @internal */
+ function isNode(node) {
+ return isNodeKind(node.kind);
+ }
+ ts.isNode = isNode;
+ /* @internal */
+ function isNodeKind(kind) {
+ return kind >= 143 /* FirstNode */;
+ }
+ ts.isNodeKind = isNodeKind;
+ /**
+ * True if node is of some token syntax kind.
+ * For example, this is true for an IfKeyword but not for an IfStatement.
+ */
+ function isToken(n) {
+ return n.kind >= 0 /* FirstToken */ && n.kind <= 142 /* LastToken */;
+ }
+ ts.isToken = isToken;
// Node Arrays
+ /* @internal */
function isNodeArray(array) {
return array.hasOwnProperty("pos")
&& array.hasOwnProperty("end");
}
ts.isNodeArray = isNodeArray;
// Literals
- function isNoSubstitutionTemplateLiteral(node) {
- return node.kind === 13 /* NoSubstitutionTemplateLiteral */;
- }
- ts.isNoSubstitutionTemplateLiteral = isNoSubstitutionTemplateLiteral;
+ /* @internal */
function isLiteralKind(kind) {
return 8 /* FirstLiteralToken */ <= kind && kind <= 13 /* LastLiteralToken */;
}
ts.isLiteralKind = isLiteralKind;
- function isTextualLiteralKind(kind) {
- return kind === 9 /* StringLiteral */ || kind === 13 /* NoSubstitutionTemplateLiteral */;
- }
- ts.isTextualLiteralKind = isTextualLiteralKind;
function isLiteralExpression(node) {
return isLiteralKind(node.kind);
}
ts.isLiteralExpression = isLiteralExpression;
// Pseudo-literals
+ /* @internal */
function isTemplateLiteralKind(kind) {
return 13 /* FirstTemplateToken */ <= kind && kind <= 16 /* LastTemplateToken */;
}
ts.isTemplateLiteralKind = isTemplateLiteralKind;
- function isTemplateHead(node) {
- return node.kind === 14 /* TemplateHead */;
- }
- ts.isTemplateHead = isTemplateHead;
function isTemplateMiddleOrTemplateTail(node) {
var kind = node.kind;
return kind === 15 /* TemplateMiddle */
@@ -9907,33 +11281,36 @@ var ts;
}
ts.isTemplateMiddleOrTemplateTail = isTemplateMiddleOrTemplateTail;
// Identifiers
- function isIdentifier(node) {
- return node.kind === 71 /* Identifier */;
- }
- ts.isIdentifier = isIdentifier;
- function isVoidExpression(node) {
- return node.kind === 190 /* VoidExpression */;
- }
- ts.isVoidExpression = isVoidExpression;
+ /* @internal */
function isGeneratedIdentifier(node) {
// Using `>` here catches both `GeneratedIdentifierKind.None` and `undefined`.
- return isIdentifier(node) && node.autoGenerateKind > 0 /* None */;
+ return ts.isIdentifier(node) && node.autoGenerateKind > 0 /* None */;
}
ts.isGeneratedIdentifier = isGeneratedIdentifier;
// Keywords
+ /* @internal */
+ function isModifierKind(token) {
+ switch (token) {
+ case 117 /* AbstractKeyword */:
+ case 120 /* AsyncKeyword */:
+ case 76 /* ConstKeyword */:
+ case 124 /* DeclareKeyword */:
+ case 79 /* DefaultKeyword */:
+ case 84 /* ExportKeyword */:
+ case 114 /* PublicKeyword */:
+ case 112 /* PrivateKeyword */:
+ case 113 /* ProtectedKeyword */:
+ case 131 /* ReadonlyKeyword */:
+ case 115 /* StaticKeyword */:
+ return true;
+ }
+ return false;
+ }
+ ts.isModifierKind = isModifierKind;
function isModifier(node) {
return isModifierKind(node.kind);
}
ts.isModifier = isModifier;
- // Names
- function isQualifiedName(node) {
- return node.kind === 143 /* QualifiedName */;
- }
- ts.isQualifiedName = isQualifiedName;
- function isComputedPropertyName(node) {
- return node.kind === 144 /* ComputedPropertyName */;
- }
- ts.isComputedPropertyName = isComputedPropertyName;
function isEntityName(node) {
var kind = node.kind;
return kind === 143 /* QualifiedName */
@@ -9948,12 +11325,6 @@ var ts;
|| kind === 144 /* ComputedPropertyName */;
}
ts.isPropertyName = isPropertyName;
- function isModuleName(node) {
- var kind = node.kind;
- return kind === 71 /* Identifier */
- || kind === 9 /* StringLiteral */;
- }
- ts.isModuleName = isModuleName;
function isBindingName(node) {
var kind = node.kind;
return kind === 71 /* Identifier */
@@ -9961,24 +11332,33 @@ var ts;
|| kind === 175 /* ArrayBindingPattern */;
}
ts.isBindingName = isBindingName;
- // Signature elements
- function isTypeParameter(node) {
- return node.kind === 145 /* TypeParameter */;
- }
- ts.isTypeParameter = isTypeParameter;
- function isParameter(node) {
- return node.kind === 146 /* Parameter */;
- }
- ts.isParameter = isParameter;
- function isDecorator(node) {
- return node.kind === 147 /* Decorator */;
+ // Functions
+ function isFunctionLike(node) {
+ return node && isFunctionLikeKind(node.kind);
}
- ts.isDecorator = isDecorator;
- // Type members
- function isMethodDeclaration(node) {
- return node.kind === 151 /* MethodDeclaration */;
+ ts.isFunctionLike = isFunctionLike;
+ /* @internal */
+ function isFunctionLikeKind(kind) {
+ switch (kind) {
+ case 152 /* Constructor */:
+ case 186 /* FunctionExpression */:
+ case 228 /* FunctionDeclaration */:
+ case 187 /* ArrowFunction */:
+ case 151 /* MethodDeclaration */:
+ case 150 /* MethodSignature */:
+ case 153 /* GetAccessor */:
+ case 154 /* SetAccessor */:
+ case 155 /* CallSignature */:
+ case 156 /* ConstructSignature */:
+ case 157 /* IndexSignature */:
+ case 160 /* FunctionType */:
+ case 161 /* ConstructorType */:
+ return true;
+ }
+ return false;
}
- ts.isMethodDeclaration = isMethodDeclaration;
+ ts.isFunctionLikeKind = isFunctionLikeKind;
+ // Classes
function isClassElement(node) {
var kind = node.kind;
return kind === 152 /* Constructor */
@@ -9987,9 +11367,29 @@ var ts;
|| kind === 153 /* GetAccessor */
|| kind === 154 /* SetAccessor */
|| kind === 157 /* IndexSignature */
- || kind === 206 /* SemicolonClassElement */;
+ || kind === 206 /* SemicolonClassElement */
+ || kind === 247 /* MissingDeclaration */;
}
ts.isClassElement = isClassElement;
+ function isClassLike(node) {
+ return node && (node.kind === 229 /* ClassDeclaration */ || node.kind === 199 /* ClassExpression */);
+ }
+ ts.isClassLike = isClassLike;
+ function isAccessor(node) {
+ return node && (node.kind === 153 /* GetAccessor */ || node.kind === 154 /* SetAccessor */);
+ }
+ ts.isAccessor = isAccessor;
+ // Type members
+ function isTypeElement(node) {
+ var kind = node.kind;
+ return kind === 156 /* ConstructSignature */
+ || kind === 155 /* CallSignature */
+ || kind === 148 /* PropertySignature */
+ || kind === 150 /* MethodSignature */
+ || kind === 157 /* IndexSignature */
+ || kind === 247 /* MissingDeclaration */;
+ }
+ ts.isTypeElement = isTypeElement;
function isObjectLiteralElementLike(node) {
var kind = node.kind;
return kind === 261 /* PropertyAssignment */
@@ -10026,15 +11426,17 @@ var ts;
return isTypeNodeKind(node.kind);
}
ts.isTypeNode = isTypeNode;
- // Binding patterns
- function isArrayBindingPattern(node) {
- return node.kind === 175 /* ArrayBindingPattern */;
- }
- ts.isArrayBindingPattern = isArrayBindingPattern;
- function isObjectBindingPattern(node) {
- return node.kind === 174 /* ObjectBindingPattern */;
+ function isFunctionOrConstructorTypeNode(node) {
+ switch (node.kind) {
+ case 160 /* FunctionType */:
+ case 161 /* ConstructorType */:
+ return true;
+ }
+ return false;
}
- ts.isObjectBindingPattern = isObjectBindingPattern;
+ ts.isFunctionOrConstructorTypeNode = isFunctionOrConstructorTypeNode;
+ // Binding patterns
+ /* @internal */
function isBindingPattern(node) {
if (node) {
var kind = node.kind;
@@ -10044,16 +11446,14 @@ var ts;
return false;
}
ts.isBindingPattern = isBindingPattern;
+ /* @internal */
function isAssignmentPattern(node) {
var kind = node.kind;
return kind === 177 /* ArrayLiteralExpression */
|| kind === 178 /* ObjectLiteralExpression */;
}
ts.isAssignmentPattern = isAssignmentPattern;
- function isBindingElement(node) {
- return node.kind === 176 /* BindingElement */;
- }
- ts.isBindingElement = isBindingElement;
+ /* @internal */
function isArrayBindingElement(node) {
var kind = node.kind;
return kind === 176 /* BindingElement */
@@ -10063,6 +11463,7 @@ var ts;
/**
* Determines whether the BindingOrAssignmentElement is a BindingElement-like declaration
*/
+ /* @internal */
function isDeclarationBindingElement(bindingElement) {
switch (bindingElement.kind) {
case 226 /* VariableDeclaration */:
@@ -10076,6 +11477,7 @@ var ts;
/**
* Determines whether a node is a BindingOrAssignmentPattern
*/
+ /* @internal */
function isBindingOrAssignmentPattern(node) {
return isObjectBindingOrAssignmentPattern(node)
|| isArrayBindingOrAssignmentPattern(node);
@@ -10084,6 +11486,7 @@ var ts;
/**
* Determines whether a node is an ObjectBindingOrAssignmentPattern
*/
+ /* @internal */
function isObjectBindingOrAssignmentPattern(node) {
switch (node.kind) {
case 174 /* ObjectBindingPattern */:
@@ -10096,6 +11499,7 @@ var ts;
/**
* Determines whether a node is an ArrayBindingOrAssignmentPattern
*/
+ /* @internal */
function isArrayBindingOrAssignmentPattern(node) {
switch (node.kind) {
case 175 /* ArrayBindingPattern */:
@@ -10106,54 +11510,36 @@ var ts;
}
ts.isArrayBindingOrAssignmentPattern = isArrayBindingOrAssignmentPattern;
// Expression
- function isArrayLiteralExpression(node) {
- return node.kind === 177 /* ArrayLiteralExpression */;
- }
- ts.isArrayLiteralExpression = isArrayLiteralExpression;
- function isObjectLiteralExpression(node) {
- return node.kind === 178 /* ObjectLiteralExpression */;
- }
- ts.isObjectLiteralExpression = isObjectLiteralExpression;
- function isPropertyAccessExpression(node) {
- return node.kind === 179 /* PropertyAccessExpression */;
- }
- ts.isPropertyAccessExpression = isPropertyAccessExpression;
function isPropertyAccessOrQualifiedName(node) {
var kind = node.kind;
return kind === 179 /* PropertyAccessExpression */
|| kind === 143 /* QualifiedName */;
}
ts.isPropertyAccessOrQualifiedName = isPropertyAccessOrQualifiedName;
- function isElementAccessExpression(node) {
- return node.kind === 180 /* ElementAccessExpression */;
- }
- ts.isElementAccessExpression = isElementAccessExpression;
- function isBinaryExpression(node) {
- return node.kind === 194 /* BinaryExpression */;
- }
- ts.isBinaryExpression = isBinaryExpression;
- function isConditionalExpression(node) {
- return node.kind === 195 /* ConditionalExpression */;
+ function isCallLikeExpression(node) {
+ switch (node.kind) {
+ case 251 /* JsxOpeningElement */:
+ case 250 /* JsxSelfClosingElement */:
+ case 181 /* CallExpression */:
+ case 182 /* NewExpression */:
+ case 183 /* TaggedTemplateExpression */:
+ case 147 /* Decorator */:
+ return true;
+ default:
+ return false;
+ }
}
- ts.isConditionalExpression = isConditionalExpression;
- function isCallExpression(node) {
- return node.kind === 181 /* CallExpression */;
+ ts.isCallLikeExpression = isCallLikeExpression;
+ function isCallOrNewExpression(node) {
+ return node.kind === 181 /* CallExpression */ || node.kind === 182 /* NewExpression */;
}
- ts.isCallExpression = isCallExpression;
+ ts.isCallOrNewExpression = isCallOrNewExpression;
function isTemplateLiteral(node) {
var kind = node.kind;
return kind === 196 /* TemplateExpression */
|| kind === 13 /* NoSubstitutionTemplateLiteral */;
}
ts.isTemplateLiteral = isTemplateLiteral;
- function isSpreadExpression(node) {
- return node.kind === 198 /* SpreadElement */;
- }
- ts.isSpreadExpression = isSpreadExpression;
- function isExpressionWithTypeArguments(node) {
- return node.kind === 201 /* ExpressionWithTypeArguments */;
- }
- ts.isExpressionWithTypeArguments = isExpressionWithTypeArguments;
function isLeftHandSideExpressionKind(kind) {
return kind === 179 /* PropertyAccessExpression */
|| kind === 180 /* ElementAccessExpression */
@@ -10181,6 +11567,7 @@ var ts;
|| kind === 203 /* NonNullExpression */
|| kind === 204 /* MetaProperty */;
}
+ /* @internal */
function isLeftHandSideExpression(node) {
return isLeftHandSideExpressionKind(ts.skipPartiallyEmittedExpressions(node).kind);
}
@@ -10195,6 +11582,7 @@ var ts;
|| kind === 184 /* TypeAssertionExpression */
|| isLeftHandSideExpressionKind(kind);
}
+ /* @internal */
function isUnaryExpression(node) {
return isUnaryExpressionKind(ts.skipPartiallyEmittedExpressions(node).kind);
}
@@ -10207,8 +11595,10 @@ var ts;
|| kind === 198 /* SpreadElement */
|| kind === 202 /* AsExpression */
|| kind === 200 /* OmittedExpression */
+ || kind === 298 /* CommaListExpression */
|| isUnaryExpressionKind(kind);
}
+ /* @internal */
function isExpression(node) {
return isExpressionKind(ts.skipPartiallyEmittedExpressions(node).kind);
}
@@ -10219,59 +11609,61 @@ var ts;
|| kind === 202 /* AsExpression */;
}
ts.isAssertionExpression = isAssertionExpression;
+ /* @internal */
function isPartiallyEmittedExpression(node) {
- return node.kind === 296 /* PartiallyEmittedExpression */;
+ return node.kind === 297 /* PartiallyEmittedExpression */;
}
ts.isPartiallyEmittedExpression = isPartiallyEmittedExpression;
+ /* @internal */
function isNotEmittedStatement(node) {
- return node.kind === 295 /* NotEmittedStatement */;
+ return node.kind === 296 /* NotEmittedStatement */;
}
ts.isNotEmittedStatement = isNotEmittedStatement;
+ /* @internal */
function isNotEmittedOrPartiallyEmittedNode(node) {
return isNotEmittedStatement(node)
|| isPartiallyEmittedExpression(node);
}
ts.isNotEmittedOrPartiallyEmittedNode = isNotEmittedOrPartiallyEmittedNode;
- function isOmittedExpression(node) {
- return node.kind === 200 /* OmittedExpression */;
+ // Statement
+ function isIterationStatement(node, lookInLabeledStatements) {
+ switch (node.kind) {
+ case 214 /* ForStatement */:
+ case 215 /* ForInStatement */:
+ case 216 /* ForOfStatement */:
+ case 212 /* DoStatement */:
+ case 213 /* WhileStatement */:
+ return true;
+ case 222 /* LabeledStatement */:
+ return lookInLabeledStatements && isIterationStatement(node.statement, lookInLabeledStatements);
+ }
+ return false;
}
- ts.isOmittedExpression = isOmittedExpression;
- // Misc
- function isTemplateSpan(node) {
- return node.kind === 205 /* TemplateSpan */;
+ ts.isIterationStatement = isIterationStatement;
+ /* @internal */
+ function isForInOrOfStatement(node) {
+ return node.kind === 215 /* ForInStatement */ || node.kind === 216 /* ForOfStatement */;
}
- ts.isTemplateSpan = isTemplateSpan;
+ ts.isForInOrOfStatement = isForInOrOfStatement;
// Element
- function isBlock(node) {
- return node.kind === 207 /* Block */;
- }
- ts.isBlock = isBlock;
+ /* @internal */
function isConciseBody(node) {
- return isBlock(node)
+ return ts.isBlock(node)
|| isExpression(node);
}
ts.isConciseBody = isConciseBody;
+ /* @internal */
function isFunctionBody(node) {
- return isBlock(node);
+ return ts.isBlock(node);
}
ts.isFunctionBody = isFunctionBody;
+ /* @internal */
function isForInitializer(node) {
- return isVariableDeclarationList(node)
+ return ts.isVariableDeclarationList(node)
|| isExpression(node);
}
ts.isForInitializer = isForInitializer;
- function isVariableDeclaration(node) {
- return node.kind === 226 /* VariableDeclaration */;
- }
- ts.isVariableDeclaration = isVariableDeclaration;
- function isVariableDeclarationList(node) {
- return node.kind === 227 /* VariableDeclarationList */;
- }
- ts.isVariableDeclarationList = isVariableDeclarationList;
- function isCaseBlock(node) {
- return node.kind === 235 /* CaseBlock */;
- }
- ts.isCaseBlock = isCaseBlock;
+ /* @internal */
function isModuleBody(node) {
var kind = node.kind;
return kind === 234 /* ModuleBlock */
@@ -10279,44 +11671,28 @@ var ts;
|| kind === 71 /* Identifier */;
}
ts.isModuleBody = isModuleBody;
+ /* @internal */
function isNamespaceBody(node) {
var kind = node.kind;
return kind === 234 /* ModuleBlock */
|| kind === 233 /* ModuleDeclaration */;
}
ts.isNamespaceBody = isNamespaceBody;
+ /* @internal */
function isJSDocNamespaceBody(node) {
var kind = node.kind;
return kind === 71 /* Identifier */
|| kind === 233 /* ModuleDeclaration */;
}
ts.isJSDocNamespaceBody = isJSDocNamespaceBody;
- function isImportEqualsDeclaration(node) {
- return node.kind === 237 /* ImportEqualsDeclaration */;
- }
- ts.isImportEqualsDeclaration = isImportEqualsDeclaration;
- function isImportClause(node) {
- return node.kind === 239 /* ImportClause */;
- }
- ts.isImportClause = isImportClause;
+ /* @internal */
function isNamedImportBindings(node) {
var kind = node.kind;
return kind === 241 /* NamedImports */
|| kind === 240 /* NamespaceImport */;
}
ts.isNamedImportBindings = isNamedImportBindings;
- function isImportSpecifier(node) {
- return node.kind === 242 /* ImportSpecifier */;
- }
- ts.isImportSpecifier = isImportSpecifier;
- function isNamedExports(node) {
- return node.kind === 245 /* NamedExports */;
- }
- ts.isNamedExports = isNamedExports;
- function isExportSpecifier(node) {
- return node.kind === 246 /* ExportSpecifier */;
- }
- ts.isExportSpecifier = isExportSpecifier;
+ /* @internal */
function isModuleOrEnumDeclaration(node) {
return node.kind === 233 /* ModuleDeclaration */ || node.kind === 232 /* EnumDeclaration */;
}
@@ -10352,7 +11728,7 @@ var ts;
|| kind === 231 /* TypeAliasDeclaration */
|| kind === 145 /* TypeParameter */
|| kind === 226 /* VariableDeclaration */
- || kind === 290 /* JSDocTypedefTag */;
+ || kind === 291 /* JSDocTypedefTag */;
}
function isDeclarationStatementKind(kind) {
return kind === 228 /* FunctionDeclaration */
@@ -10387,14 +11763,19 @@ var ts;
|| kind === 208 /* VariableStatement */
|| kind === 213 /* WhileStatement */
|| kind === 220 /* WithStatement */
- || kind === 295 /* NotEmittedStatement */
- || kind === 298 /* EndOfDeclarationMarker */
- || kind === 297 /* MergeDeclarationMarker */;
+ || kind === 296 /* NotEmittedStatement */
+ || kind === 300 /* EndOfDeclarationMarker */
+ || kind === 299 /* MergeDeclarationMarker */;
}
+ /* @internal */
function isDeclaration(node) {
+ if (node.kind === 145 /* TypeParameter */) {
+ return node.parent.kind !== 290 /* JSDocTemplateTag */ || ts.isInJavaScriptFile(node);
+ }
return isDeclarationKind(node.kind);
}
ts.isDeclaration = isDeclaration;
+ /* @internal */
function isDeclarationStatement(node) {
return isDeclarationStatementKind(node.kind);
}
@@ -10402,10 +11783,12 @@ var ts;
/**
* Determines whether the node is a statement that is not also a declaration
*/
+ /* @internal */
function isStatementButNotDeclaration(node) {
return isStatementKindButNotDeclarationKind(node.kind);
}
ts.isStatementButNotDeclaration = isStatementButNotDeclaration;
+ /* @internal */
function isStatement(node) {
var kind = node.kind;
return isStatementKindButNotDeclarationKind(kind)
@@ -10414,6 +11797,7 @@ var ts;
}
ts.isStatement = isStatement;
// Module references
+ /* @internal */
function isModuleReference(node) {
var kind = node.kind;
return kind === 248 /* ExternalModuleReference */
@@ -10422,14 +11806,7 @@ var ts;
}
ts.isModuleReference = isModuleReference;
// JSX
- function isJsxOpeningElement(node) {
- return node.kind === 251 /* JsxOpeningElement */;
- }
- ts.isJsxOpeningElement = isJsxOpeningElement;
- function isJsxClosingElement(node) {
- return node.kind === 252 /* JsxClosingElement */;
- }
- ts.isJsxClosingElement = isJsxClosingElement;
+ /* @internal */
function isJsxTagNameExpression(node) {
var kind = node.kind;
return kind === 99 /* ThisKeyword */
@@ -10437,6 +11814,7 @@ var ts;
|| kind === 179 /* PropertyAccessExpression */;
}
ts.isJsxTagNameExpression = isJsxTagNameExpression;
+ /* @internal */
function isJsxChild(node) {
var kind = node.kind;
return kind === 249 /* JsxElement */
@@ -10445,25 +11823,14 @@ var ts;
|| kind === 10 /* JsxText */;
}
ts.isJsxChild = isJsxChild;
- function isJsxAttributes(node) {
- var kind = node.kind;
- return kind === 254 /* JsxAttributes */;
- }
- ts.isJsxAttributes = isJsxAttributes;
+ /* @internal */
function isJsxAttributeLike(node) {
var kind = node.kind;
return kind === 253 /* JsxAttribute */
|| kind === 255 /* JsxSpreadAttribute */;
}
ts.isJsxAttributeLike = isJsxAttributeLike;
- function isJsxSpreadAttribute(node) {
- return node.kind === 255 /* JsxSpreadAttribute */;
- }
- ts.isJsxSpreadAttribute = isJsxSpreadAttribute;
- function isJsxAttribute(node) {
- return node.kind === 253 /* JsxAttribute */;
- }
- ts.isJsxAttribute = isJsxAttribute;
+ /* @internal */
function isStringLiteralOrJsxExpression(node) {
var kind = node.kind;
return kind === 9 /* StringLiteral */
@@ -10483,412 +11850,24 @@ var ts;
|| kind === 258 /* DefaultClause */;
}
ts.isCaseOrDefaultClause = isCaseOrDefaultClause;
- function isHeritageClause(node) {
- return node.kind === 259 /* HeritageClause */;
- }
- ts.isHeritageClause = isHeritageClause;
- function isCatchClause(node) {
- return node.kind === 260 /* CatchClause */;
- }
- ts.isCatchClause = isCatchClause;
- // Property assignments
- function isPropertyAssignment(node) {
- return node.kind === 261 /* PropertyAssignment */;
- }
- ts.isPropertyAssignment = isPropertyAssignment;
- function isShorthandPropertyAssignment(node) {
- return node.kind === 262 /* ShorthandPropertyAssignment */;
- }
- ts.isShorthandPropertyAssignment = isShorthandPropertyAssignment;
- // Enum
- function isEnumMember(node) {
- return node.kind === 264 /* EnumMember */;
- }
- ts.isEnumMember = isEnumMember;
- // Top-level nodes
- function isSourceFile(node) {
- return node.kind === 265 /* SourceFile */;
- }
- ts.isSourceFile = isSourceFile;
- function isWatchSet(options) {
- // Firefox has Object.prototype.watch
- return options.watch && options.hasOwnProperty("watch");
- }
- ts.isWatchSet = isWatchSet;
-})(ts || (ts = {}));
-(function (ts) {
- function getDefaultLibFileName(options) {
- switch (options.target) {
- case 5 /* ESNext */:
- return "lib.esnext.full.d.ts";
- case 4 /* ES2017 */:
- return "lib.es2017.full.d.ts";
- case 3 /* ES2016 */:
- return "lib.es2016.full.d.ts";
- case 2 /* ES2015 */:
- return "lib.es6.d.ts"; // We don't use lib.es2015.full.d.ts due to breaking change.
- default:
- return "lib.d.ts";
- }
- }
- ts.getDefaultLibFileName = getDefaultLibFileName;
- function textSpanEnd(span) {
- return span.start + span.length;
- }
- ts.textSpanEnd = textSpanEnd;
- function textSpanIsEmpty(span) {
- return span.length === 0;
- }
- ts.textSpanIsEmpty = textSpanIsEmpty;
- function textSpanContainsPosition(span, position) {
- return position >= span.start && position < textSpanEnd(span);
- }
- ts.textSpanContainsPosition = textSpanContainsPosition;
- // Returns true if 'span' contains 'other'.
- function textSpanContainsTextSpan(span, other) {
- return other.start >= span.start && textSpanEnd(other) <= textSpanEnd(span);
- }
- ts.textSpanContainsTextSpan = textSpanContainsTextSpan;
- function textSpanOverlapsWith(span, other) {
- var overlapStart = Math.max(span.start, other.start);
- var overlapEnd = Math.min(textSpanEnd(span), textSpanEnd(other));
- return overlapStart < overlapEnd;
- }
- ts.textSpanOverlapsWith = textSpanOverlapsWith;
- function textSpanOverlap(span1, span2) {
- var overlapStart = Math.max(span1.start, span2.start);
- var overlapEnd = Math.min(textSpanEnd(span1), textSpanEnd(span2));
- if (overlapStart < overlapEnd) {
- return createTextSpanFromBounds(overlapStart, overlapEnd);
- }
- return undefined;
- }
- ts.textSpanOverlap = textSpanOverlap;
- function textSpanIntersectsWithTextSpan(span, other) {
- return other.start <= textSpanEnd(span) && textSpanEnd(other) >= span.start;
- }
- ts.textSpanIntersectsWithTextSpan = textSpanIntersectsWithTextSpan;
- function textSpanIntersectsWith(span, start, length) {
- var end = start + length;
- return start <= textSpanEnd(span) && end >= span.start;
- }
- ts.textSpanIntersectsWith = textSpanIntersectsWith;
- function decodedTextSpanIntersectsWith(start1, length1, start2, length2) {
- var end1 = start1 + length1;
- var end2 = start2 + length2;
- return start2 <= end1 && end2 >= start1;
- }
- ts.decodedTextSpanIntersectsWith = decodedTextSpanIntersectsWith;
- function textSpanIntersectsWithPosition(span, position) {
- return position <= textSpanEnd(span) && position >= span.start;
- }
- ts.textSpanIntersectsWithPosition = textSpanIntersectsWithPosition;
- function textSpanIntersection(span1, span2) {
- var intersectStart = Math.max(span1.start, span2.start);
- var intersectEnd = Math.min(textSpanEnd(span1), textSpanEnd(span2));
- if (intersectStart <= intersectEnd) {
- return createTextSpanFromBounds(intersectStart, intersectEnd);
- }
- return undefined;
- }
- ts.textSpanIntersection = textSpanIntersection;
- function createTextSpan(start, length) {
- if (start < 0) {
- throw new Error("start < 0");
- }
- if (length < 0) {
- throw new Error("length < 0");
- }
- return { start: start, length: length };
- }
- ts.createTextSpan = createTextSpan;
- function createTextSpanFromBounds(start, end) {
- return createTextSpan(start, end - start);
- }
- ts.createTextSpanFromBounds = createTextSpanFromBounds;
- function textChangeRangeNewSpan(range) {
- return createTextSpan(range.span.start, range.newLength);
- }
- ts.textChangeRangeNewSpan = textChangeRangeNewSpan;
- function textChangeRangeIsUnchanged(range) {
- return textSpanIsEmpty(range.span) && range.newLength === 0;
- }
- ts.textChangeRangeIsUnchanged = textChangeRangeIsUnchanged;
- function createTextChangeRange(span, newLength) {
- if (newLength < 0) {
- throw new Error("newLength < 0");
- }
- return { span: span, newLength: newLength };
- }
- ts.createTextChangeRange = createTextChangeRange;
- ts.unchangedTextChangeRange = createTextChangeRange(createTextSpan(0, 0), 0);
- /**
- * Called to merge all the changes that occurred across several versions of a script snapshot
- * into a single change. i.e. if a user keeps making successive edits to a script we will
- * have a text change from V1 to V2, V2 to V3, ..., Vn.
- *
- * This function will then merge those changes into a single change range valid between V1 and
- * Vn.
- */
- function collapseTextChangeRangesAcrossMultipleVersions(changes) {
- if (changes.length === 0) {
- return ts.unchangedTextChangeRange;
- }
- if (changes.length === 1) {
- return changes[0];
- }
- // We change from talking about { { oldStart, oldLength }, newLength } to { oldStart, oldEnd, newEnd }
- // as it makes things much easier to reason about.
- var change0 = changes[0];
- var oldStartN = change0.span.start;
- var oldEndN = textSpanEnd(change0.span);
- var newEndN = oldStartN + change0.newLength;
- for (var i = 1; i < changes.length; i++) {
- var nextChange = changes[i];
- // Consider the following case:
- // i.e. two edits. The first represents the text change range { { 10, 50 }, 30 }. i.e. The span starting
- // at 10, with length 50 is reduced to length 30. The second represents the text change range { { 30, 30 }, 40 }.
- // i.e. the span starting at 30 with length 30 is increased to length 40.
- //
- // 0 10 20 30 40 50 60 70 80 90 100
- // -------------------------------------------------------------------------------------------------------
- // | /
- // | /----
- // T1 | /----
- // | /----
- // | /----
- // -------------------------------------------------------------------------------------------------------
- // | \
- // | \
- // T2 | \
- // | \
- // | \
- // -------------------------------------------------------------------------------------------------------
- //
- // Merging these turns out to not be too difficult. First, determining the new start of the change is trivial
- // it's just the min of the old and new starts. i.e.:
- //
- // 0 10 20 30 40 50 60 70 80 90 100
- // ------------------------------------------------------------*------------------------------------------
- // | /
- // | /----
- // T1 | /----
- // | /----
- // | /----
- // ----------------------------------------$-------------------$------------------------------------------
- // . | \
- // . | \
- // T2 . | \
- // . | \
- // . | \
- // ----------------------------------------------------------------------*--------------------------------
- //
- // (Note the dots represent the newly inferred start.
- // Determining the new and old end is also pretty simple. Basically it boils down to paying attention to the
- // absolute positions at the asterisks, and the relative change between the dollar signs. Basically, we see
- // which if the two $'s precedes the other, and we move that one forward until they line up. in this case that
- // means:
- //
- // 0 10 20 30 40 50 60 70 80 90 100
- // --------------------------------------------------------------------------------*----------------------
- // | /
- // | /----
- // T1 | /----
- // | /----
- // | /----
- // ------------------------------------------------------------$------------------------------------------
- // . | \
- // . | \
- // T2 . | \
- // . | \
- // . | \
- // ----------------------------------------------------------------------*--------------------------------
- //
- // In other words (in this case), we're recognizing that the second edit happened after where the first edit
- // ended with a delta of 20 characters (60 - 40). Thus, if we go back in time to where the first edit started
- // that's the same as if we started at char 80 instead of 60.
- //
- // As it so happens, the same logic applies if the second edit precedes the first edit. In that case rather
- // than pushing the first edit forward to match the second, we'll push the second edit forward to match the
- // first.
- //
- // In this case that means we have { oldStart: 10, oldEnd: 80, newEnd: 70 } or, in TextChangeRange
- // semantics: { { start: 10, length: 70 }, newLength: 60 }
- //
- // The math then works out as follows.
- // If we have { oldStart1, oldEnd1, newEnd1 } and { oldStart2, oldEnd2, newEnd2 } then we can compute the
- // final result like so:
- //
- // {
- // oldStart3: Min(oldStart1, oldStart2),
- // oldEnd3 : Max(oldEnd1, oldEnd1 + (oldEnd2 - newEnd1)),
- // newEnd3 : Max(newEnd2, newEnd2 + (newEnd1 - oldEnd2))
- // }
- var oldStart1 = oldStartN;
- var oldEnd1 = oldEndN;
- var newEnd1 = newEndN;
- var oldStart2 = nextChange.span.start;
- var oldEnd2 = textSpanEnd(nextChange.span);
- var newEnd2 = oldStart2 + nextChange.newLength;
- oldStartN = Math.min(oldStart1, oldStart2);
- oldEndN = Math.max(oldEnd1, oldEnd1 + (oldEnd2 - newEnd1));
- newEndN = Math.max(newEnd2, newEnd2 + (newEnd1 - oldEnd2));
- }
- return createTextChangeRange(createTextSpanFromBounds(oldStartN, oldEndN), /*newLength*/ newEndN - oldStartN);
- }
- ts.collapseTextChangeRangesAcrossMultipleVersions = collapseTextChangeRangesAcrossMultipleVersions;
- function getTypeParameterOwner(d) {
- if (d && d.kind === 145 /* TypeParameter */) {
- for (var current = d; current; current = current.parent) {
- if (ts.isFunctionLike(current) || ts.isClassLike(current) || current.kind === 230 /* InterfaceDeclaration */) {
- return current;
- }
- }
- }
- }
- ts.getTypeParameterOwner = getTypeParameterOwner;
- function isParameterPropertyDeclaration(node) {
- return ts.hasModifier(node, 92 /* ParameterPropertyModifier */) && node.parent.kind === 152 /* Constructor */ && ts.isClassLike(node.parent.parent);
- }
- ts.isParameterPropertyDeclaration = isParameterPropertyDeclaration;
- function walkUpBindingElementsAndPatterns(node) {
- while (node && (node.kind === 176 /* BindingElement */ || ts.isBindingPattern(node))) {
- node = node.parent;
- }
- return node;
- }
- function getCombinedModifierFlags(node) {
- node = walkUpBindingElementsAndPatterns(node);
- var flags = ts.getModifierFlags(node);
- if (node.kind === 226 /* VariableDeclaration */) {
- node = node.parent;
- }
- if (node && node.kind === 227 /* VariableDeclarationList */) {
- flags |= ts.getModifierFlags(node);
- node = node.parent;
- }
- if (node && node.kind === 208 /* VariableStatement */) {
- flags |= ts.getModifierFlags(node);
- }
- return flags;
- }
- ts.getCombinedModifierFlags = getCombinedModifierFlags;
- // Returns the node flags for this node and all relevant parent nodes. This is done so that
- // nodes like variable declarations and binding elements can returned a view of their flags
- // that includes the modifiers from their container. i.e. flags like export/declare aren't
- // stored on the variable declaration directly, but on the containing variable statement
- // (if it has one). Similarly, flags for let/const are store on the variable declaration
- // list. By calling this function, all those flags are combined so that the client can treat
- // the node as if it actually had those flags.
- function getCombinedNodeFlags(node) {
- node = walkUpBindingElementsAndPatterns(node);
- var flags = node.flags;
- if (node.kind === 226 /* VariableDeclaration */) {
- node = node.parent;
- }
- if (node && node.kind === 227 /* VariableDeclarationList */) {
- flags |= node.flags;
- node = node.parent;
- }
- if (node && node.kind === 208 /* 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.
- */
- function validateLocaleAndSetLanguage(locale, sys, errors) {
- var matchResult = /^([a-z]+)([_\-]([a-z]+))?$/.exec(locale.toLowerCase());
- if (!matchResult) {
- if (errors) {
- errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1, "en", "ja-jp"));
- }
- return;
- }
- var language = matchResult[1];
- var territory = matchResult[3];
- // First try the entire locale, then fall back to just language if that's all we have.
- // Either ways do not fail, and fallback to the English diagnostic strings.
- if (!trySetLanguageAndTerritory(language, territory, errors)) {
- trySetLanguageAndTerritory(language, /*territory*/ undefined, errors);
- }
- function trySetLanguageAndTerritory(language, territory, errors) {
- var compilerFilePath = ts.normalizePath(sys.getExecutingFilePath());
- var containingDirectoryPath = ts.getDirectoryPath(compilerFilePath);
- var filePath = ts.combinePaths(containingDirectoryPath, language);
- if (territory) {
- filePath = filePath + "-" + territory;
- }
- filePath = sys.resolvePath(ts.combinePaths(filePath, "diagnosticMessages.generated.json"));
- if (!sys.fileExists(filePath)) {
- return false;
- }
- // TODO: Add codePage support for readFile?
- var fileContents = "";
- try {
- fileContents = sys.readFile(filePath);
- }
- catch (e) {
- if (errors) {
- errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Unable_to_open_file_0, filePath));
- }
- return false;
- }
- try {
- ts.localizedDiagnosticMessages = JSON.parse(fileContents);
- }
- catch (e) {
- if (errors) {
- errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Corrupted_locale_file_0, filePath));
- }
- return false;
- }
- return true;
- }
- }
- 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;
+ // JSDoc
+ /** True if node is of some JSDoc syntax kind. */
+ /* @internal */
+ function isJSDocNode(node) {
+ return node.kind >= 267 /* FirstJSDocNode */ && node.kind <= 294 /* LastJSDocNode */;
}
- 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.isJSDocNode = isJSDocNode;
+ /** True if node is of a kind that may contain comment text. */
+ function isJSDocCommentContainingNode(node) {
+ return node.kind === 283 /* JSDocComment */ || isJSDocTag(node);
}
- 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.isJSDocCommentContainingNode = isJSDocCommentContainingNode;
+ // TODO: determine what this does before making it public.
+ /* @internal */
+ function isJSDocTag(node) {
+ return node.kind >= 284 /* FirstJSDocTagNode */ && node.kind <= 294 /* LastJSDocTagNode */;
}
- ts.unescapeIdentifier = unescapeIdentifier;
+ ts.isJSDocTag = isJSDocTag;
})(ts || (ts = {}));
/// <reference path="core.ts"/>
/// <reference path="utilities.ts"/>
@@ -10981,16 +11960,24 @@ var ts;
node.textSourceNode = sourceNode;
return node;
}
- // Identifiers
- function createIdentifier(text) {
+ function createIdentifier(text, typeArguments) {
var node = createSynthesizedNode(71 /* Identifier */);
node.text = ts.escapeIdentifier(text);
node.originalKeywordKind = text ? ts.stringToToken(text) : 0 /* Unknown */;
node.autoGenerateKind = 0 /* None */;
node.autoGenerateId = 0;
+ if (typeArguments) {
+ node.typeArguments = createNodeArray(typeArguments);
+ }
return node;
}
ts.createIdentifier = createIdentifier;
+ function updateIdentifier(node, typeArguments) {
+ return node.typeArguments !== typeArguments
+ ? updateNode(createIdentifier(node.text, typeArguments), node)
+ : node;
+ }
+ ts.updateIdentifier = updateIdentifier;
var nextAutoGenerateId = 0;
/** Create a unique temporary variable. */
function createTempVariable(recordTempVariable) {
@@ -11085,228 +12072,13 @@ var ts;
: 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(160 /* 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(161 /* 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(155 /* 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(156 /* 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(150 /* 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(169 /* ThisType */);
- }
- ts.createThisTypeNode = createThisTypeNode;
- function createLiteralTypeNode(literal) {
- var literalTypeNode = createSynthesizedNode(173 /* 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(159 /* 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(158 /* 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(162 /* 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(164 /* 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(163 /* 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(165 /* 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(172 /* 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(170 /* TypeOperator */);
- typeOperatorNode.operator = 127 /* 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(171 /* 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
+ // Signature elements
function createTypeParameterDeclaration(name, constraint, defaultType) {
- var typeParameter = createSynthesizedNode(145 /* TypeParameter */);
- typeParameter.name = asName(name);
- typeParameter.constraint = constraint;
- typeParameter.default = defaultType;
- return typeParameter;
+ var node = createSynthesizedNode(145 /* TypeParameter */);
+ node.name = asName(name);
+ node.constraint = constraint;
+ node.default = defaultType;
+ return node;
}
ts.createTypeParameterDeclaration = createTypeParameterDeclaration;
function updateTypeParameterDeclaration(node, name, constraint, defaultType) {
@@ -11317,44 +12089,6 @@ var ts;
: node;
}
ts.updateTypeParameterDeclaration = updateTypeParameterDeclaration;
- // Signature elements
- function createPropertySignature(name, questionToken, type, initializer) {
- var propertySignature = createSynthesizedNode(148 /* 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(157 /* 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) {
var node = createSynthesizedNode(146 /* Parameter */);
node.decorators = asNodeArray(decorators);
@@ -11391,7 +12125,27 @@ var ts;
: node;
}
ts.updateDecorator = updateDecorator;
- // Type members
+ // Type Elements
+ function createPropertySignature(modifiers, name, questionToken, type, initializer) {
+ var node = createSynthesizedNode(148 /* PropertySignature */);
+ node.modifiers = asNodeArray(modifiers);
+ node.name = asName(name);
+ node.questionToken = questionToken;
+ node.type = type;
+ node.initializer = initializer;
+ return node;
+ }
+ ts.createPropertySignature = createPropertySignature;
+ function updatePropertySignature(node, modifiers, name, questionToken, type, initializer) {
+ return node.modifiers !== modifiers
+ || node.name !== name
+ || node.questionToken !== questionToken
+ || node.type !== type
+ || node.initializer !== initializer
+ ? updateNode(createPropertySignature(modifiers, name, questionToken, type, initializer), node)
+ : node;
+ }
+ ts.updatePropertySignature = updatePropertySignature;
function createProperty(decorators, modifiers, name, questionToken, type, initializer) {
var node = createSynthesizedNode(149 /* PropertyDeclaration */);
node.decorators = asNodeArray(decorators);
@@ -11413,7 +12167,24 @@ var ts;
: node;
}
ts.updateProperty = updateProperty;
- function createMethodDeclaration(decorators, modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body) {
+ function createMethodSignature(typeParameters, parameters, type, name, questionToken) {
+ var node = createSignatureDeclaration(150 /* MethodSignature */, typeParameters, parameters, type);
+ node.name = asName(name);
+ node.questionToken = questionToken;
+ return node;
+ }
+ 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 createMethod(decorators, modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body) {
var node = createSynthesizedNode(151 /* MethodDeclaration */);
node.decorators = asNodeArray(decorators);
node.modifiers = asNodeArray(modifiers);
@@ -11426,7 +12197,7 @@ var ts;
node.body = body;
return node;
}
- ts.createMethodDeclaration = createMethodDeclaration;
+ ts.createMethod = createMethod;
function updateMethod(node, decorators, modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body) {
return node.decorators !== decorators
|| node.modifiers !== modifiers
@@ -11436,7 +12207,7 @@ var ts;
|| node.parameters !== parameters
|| node.type !== type
|| node.body !== body
- ? updateNode(createMethodDeclaration(decorators, modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body), node)
+ ? updateNode(createMethod(decorators, modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body), node)
: node;
}
ts.updateMethod = updateMethod;
@@ -11504,6 +12275,251 @@ var ts;
: node;
}
ts.updateSetAccessor = updateSetAccessor;
+ function createCallSignature(typeParameters, parameters, type) {
+ return createSignatureDeclaration(155 /* CallSignature */, typeParameters, parameters, type);
+ }
+ ts.createCallSignature = createCallSignature;
+ function updateCallSignature(node, typeParameters, parameters, type) {
+ return updateSignatureDeclaration(node, typeParameters, parameters, type);
+ }
+ ts.updateCallSignature = updateCallSignature;
+ function createConstructSignature(typeParameters, parameters, type) {
+ return createSignatureDeclaration(156 /* ConstructSignature */, typeParameters, parameters, type);
+ }
+ ts.createConstructSignature = createConstructSignature;
+ function updateConstructSignature(node, typeParameters, parameters, type) {
+ return updateSignatureDeclaration(node, typeParameters, parameters, type);
+ }
+ ts.updateConstructSignature = updateConstructSignature;
+ function createIndexSignature(decorators, modifiers, parameters, type) {
+ var node = createSynthesizedNode(157 /* IndexSignature */);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
+ node.parameters = createNodeArray(parameters);
+ node.type = type;
+ return node;
+ }
+ ts.createIndexSignature = createIndexSignature;
+ function updateIndexSignature(node, decorators, modifiers, parameters, type) {
+ return node.parameters !== parameters
+ || node.type !== type
+ || node.decorators !== decorators
+ || node.modifiers !== modifiers
+ ? updateNode(createIndexSignature(decorators, modifiers, parameters, type), node)
+ : node;
+ }
+ ts.updateIndexSignature = updateIndexSignature;
+ /* @internal */
+ function createSignatureDeclaration(kind, typeParameters, parameters, type) {
+ var node = createSynthesizedNode(kind);
+ node.typeParameters = asNodeArray(typeParameters);
+ node.parameters = asNodeArray(parameters);
+ node.type = type;
+ return node;
+ }
+ 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;
+ }
+ // Types
+ function createKeywordTypeNode(kind) {
+ return createSynthesizedNode(kind);
+ }
+ ts.createKeywordTypeNode = createKeywordTypeNode;
+ function createTypePredicateNode(parameterName, type) {
+ var node = createSynthesizedNode(158 /* TypePredicate */);
+ node.parameterName = asName(parameterName);
+ node.type = type;
+ return node;
+ }
+ 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 createTypeReferenceNode(typeName, typeArguments) {
+ var node = createSynthesizedNode(159 /* TypeReference */);
+ node.typeName = asName(typeName);
+ node.typeArguments = typeArguments && ts.parenthesizeTypeParameters(typeArguments);
+ return node;
+ }
+ 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 createFunctionTypeNode(typeParameters, parameters, type) {
+ return createSignatureDeclaration(160 /* 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(161 /* ConstructorType */, typeParameters, parameters, type);
+ }
+ ts.createConstructorTypeNode = createConstructorTypeNode;
+ function updateConstructorTypeNode(node, typeParameters, parameters, type) {
+ return updateSignatureDeclaration(node, typeParameters, parameters, type);
+ }
+ ts.updateConstructorTypeNode = updateConstructorTypeNode;
+ function createTypeQueryNode(exprName) {
+ var node = createSynthesizedNode(162 /* TypeQuery */);
+ node.exprName = exprName;
+ return node;
+ }
+ ts.createTypeQueryNode = createTypeQueryNode;
+ function updateTypeQueryNode(node, exprName) {
+ return node.exprName !== exprName
+ ? updateNode(createTypeQueryNode(exprName), node)
+ : node;
+ }
+ ts.updateTypeQueryNode = updateTypeQueryNode;
+ function createTypeLiteralNode(members) {
+ var node = createSynthesizedNode(163 /* TypeLiteral */);
+ node.members = createNodeArray(members);
+ return node;
+ }
+ ts.createTypeLiteralNode = createTypeLiteralNode;
+ function updateTypeLiteralNode(node, members) {
+ return node.members !== members
+ ? updateNode(createTypeLiteralNode(members), node)
+ : node;
+ }
+ ts.updateTypeLiteralNode = updateTypeLiteralNode;
+ function createArrayTypeNode(elementType) {
+ var node = createSynthesizedNode(164 /* ArrayType */);
+ node.elementType = ts.parenthesizeElementTypeMember(elementType);
+ return node;
+ }
+ ts.createArrayTypeNode = createArrayTypeNode;
+ function updateArrayTypeNode(node, elementType) {
+ return node.elementType !== elementType
+ ? updateNode(createArrayTypeNode(elementType), node)
+ : node;
+ }
+ ts.updateArrayTypeNode = updateArrayTypeNode;
+ function createTupleTypeNode(elementTypes) {
+ var node = createSynthesizedNode(165 /* TupleType */);
+ node.elementTypes = createNodeArray(elementTypes);
+ return node;
+ }
+ ts.createTupleTypeNode = createTupleTypeNode;
+ function updateTypleTypeNode(node, elementTypes) {
+ return node.elementTypes !== elementTypes
+ ? updateNode(createTupleTypeNode(elementTypes), node)
+ : node;
+ }
+ ts.updateTypleTypeNode = updateTypleTypeNode;
+ function createUnionTypeNode(types) {
+ return createUnionOrIntersectionTypeNode(166 /* UnionType */, types);
+ }
+ ts.createUnionTypeNode = createUnionTypeNode;
+ function updateUnionTypeNode(node, types) {
+ return updateUnionOrIntersectionTypeNode(node, types);
+ }
+ ts.updateUnionTypeNode = updateUnionTypeNode;
+ function createIntersectionTypeNode(types) {
+ return createUnionOrIntersectionTypeNode(167 /* IntersectionType */, types);
+ }
+ ts.createIntersectionTypeNode = createIntersectionTypeNode;
+ function updateIntersectionTypeNode(node, types) {
+ return updateUnionOrIntersectionTypeNode(node, types);
+ }
+ ts.updateIntersectionTypeNode = updateIntersectionTypeNode;
+ function createUnionOrIntersectionTypeNode(kind, types) {
+ var node = createSynthesizedNode(kind);
+ node.types = ts.parenthesizeElementTypeMembers(types);
+ return node;
+ }
+ ts.createUnionOrIntersectionTypeNode = createUnionOrIntersectionTypeNode;
+ function updateUnionOrIntersectionTypeNode(node, types) {
+ return node.types !== types
+ ? updateNode(createUnionOrIntersectionTypeNode(node.kind, types), node)
+ : node;
+ }
+ function createParenthesizedType(type) {
+ var node = createSynthesizedNode(168 /* ParenthesizedType */);
+ node.type = type;
+ return node;
+ }
+ ts.createParenthesizedType = createParenthesizedType;
+ function updateParenthesizedType(node, type) {
+ return node.type !== type
+ ? updateNode(createParenthesizedType(type), node)
+ : node;
+ }
+ ts.updateParenthesizedType = updateParenthesizedType;
+ function createThisTypeNode() {
+ return createSynthesizedNode(169 /* ThisType */);
+ }
+ ts.createThisTypeNode = createThisTypeNode;
+ function createTypeOperatorNode(type) {
+ var node = createSynthesizedNode(170 /* TypeOperator */);
+ node.operator = 127 /* KeyOfKeyword */;
+ node.type = ts.parenthesizeElementTypeMember(type);
+ return node;
+ }
+ ts.createTypeOperatorNode = createTypeOperatorNode;
+ function updateTypeOperatorNode(node, type) {
+ return node.type !== type ? updateNode(createTypeOperatorNode(type), node) : node;
+ }
+ ts.updateTypeOperatorNode = updateTypeOperatorNode;
+ function createIndexedAccessTypeNode(objectType, indexType) {
+ var node = createSynthesizedNode(171 /* IndexedAccessType */);
+ node.objectType = ts.parenthesizeElementTypeMember(objectType);
+ node.indexType = indexType;
+ return node;
+ }
+ 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 createMappedTypeNode(readonlyToken, typeParameter, questionToken, type) {
+ var node = createSynthesizedNode(172 /* MappedType */);
+ node.readonlyToken = readonlyToken;
+ node.typeParameter = typeParameter;
+ node.questionToken = questionToken;
+ node.type = type;
+ return node;
+ }
+ 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 createLiteralTypeNode(literal) {
+ var node = createSynthesizedNode(173 /* LiteralType */);
+ node.literal = literal;
+ return node;
+ }
+ ts.createLiteralTypeNode = createLiteralTypeNode;
+ function updateLiteralTypeNode(node, literal) {
+ return node.literal !== literal
+ ? updateNode(createLiteralTypeNode(literal), node)
+ : node;
+ }
+ ts.updateLiteralTypeNode = updateLiteralTypeNode;
// Binding Patterns
function createObjectBindingPattern(elements) {
var node = createSynthesizedNode(174 /* ObjectBindingPattern */);
@@ -11551,9 +12567,8 @@ var ts;
function createArrayLiteral(elements, multiLine) {
var node = createSynthesizedNode(177 /* ArrayLiteralExpression */);
node.elements = ts.parenthesizeListElements(createNodeArray(elements));
- if (multiLine) {
+ if (multiLine)
node.multiLine = true;
- }
return node;
}
ts.createArrayLiteral = createArrayLiteral;
@@ -11566,9 +12581,8 @@ var ts;
function createObjectLiteral(properties, multiLine) {
var node = createSynthesizedNode(178 /* ObjectLiteralExpression */);
node.properties = createNodeArray(properties);
- if (multiLine) {
+ if (multiLine)
node.multiLine = true;
- }
return node;
}
ts.createObjectLiteral = createObjectLiteral;
@@ -11582,7 +12596,7 @@ var ts;
var node = createSynthesizedNode(179 /* PropertyAccessExpression */);
node.expression = ts.parenthesizeForAccess(expression);
node.name = asName(name);
- setEmitFlags(node, 65536 /* NoIndentation */);
+ setEmitFlags(node, 131072 /* NoIndentation */);
return node;
}
ts.createPropertyAccess = createPropertyAccess;
@@ -11618,9 +12632,9 @@ var ts;
}
ts.createCall = createCall;
function updateCall(node, expression, typeArguments, argumentsArray) {
- return expression !== node.expression
- || typeArguments !== node.typeArguments
- || argumentsArray !== node.arguments
+ return node.expression !== expression
+ || node.typeArguments !== typeArguments
+ || node.arguments !== argumentsArray
? updateNode(createCall(expression, typeArguments, argumentsArray), node)
: node;
}
@@ -11810,10 +12824,10 @@ var ts;
return node;
}
ts.createBinary = createBinary;
- function updateBinary(node, left, right) {
+ function updateBinary(node, left, right, operator) {
return node.left !== left
|| node.right !== right
- ? updateNode(createBinary(left, node.operatorToken, right), node)
+ ? updateNode(createBinary(left, operator || node.operatorToken, right), node)
: node;
}
ts.updateBinary = updateBinary;
@@ -11940,6 +12954,19 @@ var ts;
: node;
}
ts.updateNonNullExpression = updateNonNullExpression;
+ function createMetaProperty(keywordToken, name) {
+ var node = createSynthesizedNode(204 /* MetaProperty */);
+ node.keywordToken = keywordToken;
+ node.name = name;
+ return node;
+ }
+ ts.createMetaProperty = createMetaProperty;
+ function updateMetaProperty(node, name) {
+ return node.name !== name
+ ? updateNode(createMetaProperty(node.keywordToken, name), node)
+ : node;
+ }
+ ts.updateMetaProperty = updateMetaProperty;
// Misc
function createTemplateSpan(expression, literal) {
var node = createSynthesizedNode(205 /* TemplateSpan */);
@@ -11955,6 +12982,10 @@ var ts;
: node;
}
ts.updateTemplateSpan = updateTemplateSpan;
+ function createSemicolonClassElement() {
+ return createSynthesizedNode(206 /* SemicolonClassElement */);
+ }
+ ts.createSemicolonClassElement = createSemicolonClassElement;
// Element
function createBlock(statements, multiLine) {
var block = createSynthesizedNode(207 /* Block */);
@@ -11965,7 +12996,7 @@ var ts;
}
ts.createBlock = createBlock;
function updateBlock(node, statements) {
- return statements !== node.statements
+ return node.statements !== statements
? updateNode(createBlock(statements, node.multiLine), node)
: node;
}
@@ -11985,35 +13016,6 @@ var ts;
: node;
}
ts.updateVariableStatement = updateVariableStatement;
- function createVariableDeclarationList(declarations, flags) {
- var node = createSynthesizedNode(227 /* VariableDeclarationList */);
- node.flags |= flags;
- node.declarations = createNodeArray(declarations);
- return node;
- }
- ts.createVariableDeclarationList = createVariableDeclarationList;
- function updateVariableDeclarationList(node, declarations) {
- return node.declarations !== declarations
- ? updateNode(createVariableDeclarationList(declarations, node.flags), node)
- : node;
- }
- ts.updateVariableDeclarationList = updateVariableDeclarationList;
- function createVariableDeclaration(name, type, initializer) {
- var node = createSynthesizedNode(226 /* VariableDeclaration */);
- node.name = asName(name);
- node.type = type;
- node.initializer = initializer !== undefined ? ts.parenthesizeExpressionForList(initializer) : undefined;
- return node;
- }
- ts.createVariableDeclaration = createVariableDeclaration;
- function updateVariableDeclaration(node, name, type, initializer) {
- return node.name !== name
- || node.type !== type
- || node.initializer !== initializer
- ? updateNode(createVariableDeclaration(name, type, initializer), node)
- : node;
- }
- ts.updateVariableDeclaration = updateVariableDeclaration;
function createEmptyStatement() {
return createSynthesizedNode(209 /* EmptyStatement */);
}
@@ -12232,6 +13234,39 @@ var ts;
: node;
}
ts.updateTry = updateTry;
+ function createDebuggerStatement() {
+ return createSynthesizedNode(225 /* DebuggerStatement */);
+ }
+ ts.createDebuggerStatement = createDebuggerStatement;
+ function createVariableDeclaration(name, type, initializer) {
+ var node = createSynthesizedNode(226 /* VariableDeclaration */);
+ node.name = asName(name);
+ node.type = type;
+ node.initializer = initializer !== undefined ? ts.parenthesizeExpressionForList(initializer) : undefined;
+ return node;
+ }
+ ts.createVariableDeclaration = createVariableDeclaration;
+ function updateVariableDeclaration(node, name, type, initializer) {
+ return node.name !== name
+ || node.type !== type
+ || node.initializer !== initializer
+ ? updateNode(createVariableDeclaration(name, type, initializer), node)
+ : node;
+ }
+ ts.updateVariableDeclaration = updateVariableDeclaration;
+ function createVariableDeclarationList(declarations, flags) {
+ var node = createSynthesizedNode(227 /* VariableDeclarationList */);
+ node.flags |= flags & 3 /* BlockScoped */;
+ node.declarations = createNodeArray(declarations);
+ return node;
+ }
+ ts.createVariableDeclarationList = createVariableDeclarationList;
+ function updateVariableDeclarationList(node, declarations) {
+ return node.declarations !== declarations
+ ? updateNode(createVariableDeclarationList(declarations, node.flags), node)
+ : node;
+ }
+ ts.updateVariableDeclarationList = updateVariableDeclarationList;
function createFunctionDeclaration(decorators, modifiers, asteriskToken, name, typeParameters, parameters, type, body) {
var node = createSynthesizedNode(228 /* FunctionDeclaration */);
node.decorators = asNodeArray(decorators);
@@ -12280,6 +13315,48 @@ var ts;
: node;
}
ts.updateClassDeclaration = updateClassDeclaration;
+ function createInterfaceDeclaration(decorators, modifiers, name, typeParameters, heritageClauses, members) {
+ var node = createSynthesizedNode(230 /* InterfaceDeclaration */);
+ 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.createInterfaceDeclaration = createInterfaceDeclaration;
+ function updateInterfaceDeclaration(node, decorators, modifiers, name, typeParameters, heritageClauses, members) {
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.name !== name
+ || node.typeParameters !== typeParameters
+ || node.heritageClauses !== heritageClauses
+ || node.members !== members
+ ? updateNode(createInterfaceDeclaration(decorators, modifiers, name, typeParameters, heritageClauses, members), node)
+ : node;
+ }
+ ts.updateInterfaceDeclaration = updateInterfaceDeclaration;
+ function createTypeAliasDeclaration(decorators, modifiers, name, typeParameters, type) {
+ var node = createSynthesizedNode(231 /* TypeAliasDeclaration */);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
+ node.name = asName(name);
+ node.typeParameters = asNodeArray(typeParameters);
+ node.type = type;
+ return node;
+ }
+ ts.createTypeAliasDeclaration = createTypeAliasDeclaration;
+ function updateTypeAliasDeclaration(node, decorators, modifiers, name, typeParameters, type) {
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.name !== name
+ || node.typeParameters !== typeParameters
+ || node.type !== type
+ ? updateNode(createTypeAliasDeclaration(decorators, modifiers, name, typeParameters, type), node)
+ : node;
+ }
+ ts.updateTypeAliasDeclaration = updateTypeAliasDeclaration;
function createEnumDeclaration(decorators, modifiers, name, members) {
var node = createSynthesizedNode(232 /* EnumDeclaration */);
node.decorators = asNodeArray(decorators);
@@ -12300,7 +13377,7 @@ var ts;
ts.updateEnumDeclaration = updateEnumDeclaration;
function createModuleDeclaration(decorators, modifiers, name, body, flags) {
var node = createSynthesizedNode(233 /* ModuleDeclaration */);
- node.flags |= flags;
+ node.flags |= flags & (16 /* Namespace */ | 4 /* NestedNamespace */ | 512 /* GlobalAugmentation */);
node.decorators = asNodeArray(decorators);
node.modifiers = asNodeArray(modifiers);
node.name = name;
@@ -12341,6 +13418,18 @@ var ts;
: node;
}
ts.updateCaseBlock = updateCaseBlock;
+ function createNamespaceExportDeclaration(name) {
+ var node = createSynthesizedNode(236 /* NamespaceExportDeclaration */);
+ node.name = asName(name);
+ return node;
+ }
+ ts.createNamespaceExportDeclaration = createNamespaceExportDeclaration;
+ function updateNamespaceExportDeclaration(node, name) {
+ return node.name !== name
+ ? updateNode(createNamespaceExportDeclaration(name), node)
+ : node;
+ }
+ ts.updateNamespaceExportDeclaration = updateNamespaceExportDeclaration;
function createImportEqualsDeclaration(decorators, modifiers, name, moduleReference) {
var node = createSynthesizedNode(237 /* ImportEqualsDeclaration */);
node.decorators = asNodeArray(decorators);
@@ -12371,7 +13460,8 @@ var ts;
function updateImportDeclaration(node, decorators, modifiers, importClause, moduleSpecifier) {
return node.decorators !== decorators
|| node.modifiers !== modifiers
- || node.importClause !== importClause || node.moduleSpecifier !== moduleSpecifier
+ || node.importClause !== importClause
+ || node.moduleSpecifier !== moduleSpecifier
? updateNode(createImportDeclaration(decorators, modifiers, importClause, moduleSpecifier), node)
: node;
}
@@ -12559,19 +13649,6 @@ var ts;
: node;
}
ts.updateJsxClosingElement = updateJsxClosingElement;
- function createJsxAttributes(properties) {
- var jsxAttributes = createSynthesizedNode(254 /* 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(253 /* JsxAttribute */);
node.name = name;
@@ -12586,6 +13663,18 @@ var ts;
: node;
}
ts.updateJsxAttribute = updateJsxAttribute;
+ function createJsxAttributes(properties) {
+ var node = createSynthesizedNode(254 /* JsxAttributes */);
+ node.properties = createNodeArray(properties);
+ return node;
+ }
+ ts.createJsxAttributes = createJsxAttributes;
+ function updateJsxAttributes(node, properties) {
+ return node.properties !== properties
+ ? updateNode(createJsxAttributes(properties), node)
+ : node;
+ }
+ ts.updateJsxAttributes = updateJsxAttributes;
function createJsxSpreadAttribute(expression) {
var node = createSynthesizedNode(255 /* JsxSpreadAttribute */);
node.expression = expression;
@@ -12612,20 +13701,6 @@ var ts;
}
ts.updateJsxExpression = updateJsxExpression;
// Clauses
- function createHeritageClause(token, types) {
- var node = createSynthesizedNode(259 /* HeritageClause */);
- node.token = token;
- node.types = createNodeArray(types);
- return node;
- }
- ts.createHeritageClause = createHeritageClause;
- function updateHeritageClause(node, types) {
- if (node.types !== types) {
- return updateNode(createHeritageClause(node.token, types), node);
- }
- return node;
- }
- ts.updateHeritageClause = updateHeritageClause;
function createCaseClause(expression, statements) {
var node = createSynthesizedNode(257 /* CaseClause */);
node.expression = ts.parenthesizeExpressionForList(expression);
@@ -12634,10 +13709,10 @@ var ts;
}
ts.createCaseClause = createCaseClause;
function updateCaseClause(node, expression, statements) {
- if (node.expression !== expression || node.statements !== statements) {
- return updateNode(createCaseClause(expression, statements), node);
- }
- return node;
+ return node.expression !== expression
+ || node.statements !== statements
+ ? updateNode(createCaseClause(expression, statements), node)
+ : node;
}
ts.updateCaseClause = updateCaseClause;
function createDefaultClause(statements) {
@@ -12647,12 +13722,24 @@ var ts;
}
ts.createDefaultClause = createDefaultClause;
function updateDefaultClause(node, statements) {
- if (node.statements !== statements) {
- return updateNode(createDefaultClause(statements), node);
- }
- return node;
+ return node.statements !== statements
+ ? updateNode(createDefaultClause(statements), node)
+ : node;
}
ts.updateDefaultClause = updateDefaultClause;
+ function createHeritageClause(token, types) {
+ var node = createSynthesizedNode(259 /* HeritageClause */);
+ node.token = token;
+ node.types = createNodeArray(types);
+ return node;
+ }
+ ts.createHeritageClause = createHeritageClause;
+ function updateHeritageClause(node, types) {
+ return node.types !== types
+ ? updateNode(createHeritageClause(node.token, types), node)
+ : node;
+ }
+ ts.updateHeritageClause = updateHeritageClause;
function createCatchClause(variableDeclaration, block) {
var node = createSynthesizedNode(260 /* CatchClause */);
node.variableDeclaration = typeof variableDeclaration === "string" ? createVariableDeclaration(variableDeclaration) : variableDeclaration;
@@ -12661,10 +13748,10 @@ var ts;
}
ts.createCatchClause = createCatchClause;
function updateCatchClause(node, variableDeclaration, block) {
- if (node.variableDeclaration !== variableDeclaration || node.block !== block) {
- return updateNode(createCatchClause(variableDeclaration, block), node);
- }
- return node;
+ return node.variableDeclaration !== variableDeclaration
+ || node.block !== block
+ ? updateNode(createCatchClause(variableDeclaration, block), node)
+ : node;
}
ts.updateCatchClause = updateCatchClause;
// Property assignments
@@ -12677,10 +13764,10 @@ var ts;
}
ts.createPropertyAssignment = createPropertyAssignment;
function updatePropertyAssignment(node, name, initializer) {
- if (node.name !== name || node.initializer !== initializer) {
- return updateNode(createPropertyAssignment(name, initializer), node);
- }
- return node;
+ return node.name !== name
+ || node.initializer !== initializer
+ ? updateNode(createPropertyAssignment(name, initializer), node)
+ : node;
}
ts.updatePropertyAssignment = updatePropertyAssignment;
function createShorthandPropertyAssignment(name, objectAssignmentInitializer) {
@@ -12691,10 +13778,10 @@ var ts;
}
ts.createShorthandPropertyAssignment = createShorthandPropertyAssignment;
function updateShorthandPropertyAssignment(node, name, objectAssignmentInitializer) {
- if (node.name !== name || node.objectAssignmentInitializer !== objectAssignmentInitializer) {
- return updateNode(createShorthandPropertyAssignment(name, objectAssignmentInitializer), node);
- }
- return node;
+ return node.name !== name
+ || node.objectAssignmentInitializer !== objectAssignmentInitializer
+ ? updateNode(createShorthandPropertyAssignment(name, objectAssignmentInitializer), node)
+ : node;
}
ts.updateShorthandPropertyAssignment = updateShorthandPropertyAssignment;
function createSpreadAssignment(expression) {
@@ -12704,10 +13791,9 @@ var ts;
}
ts.createSpreadAssignment = createSpreadAssignment;
function updateSpreadAssignment(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createSpreadAssignment(expression), node);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createSpreadAssignment(expression), node)
+ : node;
}
ts.updateSpreadAssignment = updateSpreadAssignment;
// Enum
@@ -12807,7 +13893,7 @@ var ts;
* @param original The original statement.
*/
function createNotEmittedStatement(original) {
- var node = createSynthesizedNode(295 /* NotEmittedStatement */);
+ var node = createSynthesizedNode(296 /* NotEmittedStatement */);
node.original = original;
setTextRange(node, original);
return node;
@@ -12819,7 +13905,7 @@ var ts;
*/
/* @internal */
function createEndOfDeclarationMarker(original) {
- var node = createSynthesizedNode(298 /* EndOfDeclarationMarker */);
+ var node = createSynthesizedNode(300 /* EndOfDeclarationMarker */);
node.emitNode = {};
node.original = original;
return node;
@@ -12831,7 +13917,7 @@ var ts;
*/
/* @internal */
function createMergeDeclarationMarker(original) {
- var node = createSynthesizedNode(297 /* MergeDeclarationMarker */);
+ var node = createSynthesizedNode(299 /* MergeDeclarationMarker */);
node.emitNode = {};
node.original = original;
return node;
@@ -12846,7 +13932,7 @@ var ts;
* @param location The location for the expression. Defaults to the positions from "original" if provided.
*/
function createPartiallyEmittedExpression(expression, original) {
- var node = createSynthesizedNode(296 /* PartiallyEmittedExpression */);
+ var node = createSynthesizedNode(297 /* PartiallyEmittedExpression */);
node.expression = expression;
node.original = original;
setTextRange(node, original);
@@ -12860,6 +13946,29 @@ var ts;
return node;
}
ts.updatePartiallyEmittedExpression = updatePartiallyEmittedExpression;
+ function flattenCommaElements(node) {
+ if (ts.nodeIsSynthesized(node) && !ts.isParseTreeNode(node) && !node.original && !node.emitNode && !node.id) {
+ if (node.kind === 298 /* CommaListExpression */) {
+ return node.elements;
+ }
+ if (ts.isBinaryExpression(node) && node.operatorToken.kind === 26 /* CommaToken */) {
+ return [node.left, node.right];
+ }
+ }
+ return node;
+ }
+ function createCommaList(elements) {
+ var node = createSynthesizedNode(298 /* CommaListExpression */);
+ node.elements = createNodeArray(ts.sameFlatMap(elements, flattenCommaElements));
+ return node;
+ }
+ ts.createCommaList = createCommaList;
+ function updateCommaList(node, elements) {
+ return node.elements !== elements
+ ? updateNode(createCommaList(elements), node)
+ : node;
+ }
+ ts.updateCommaList = updateCommaList;
function createBundle(sourceFiles) {
var node = ts.createNode(266 /* Bundle */);
node.sourceFiles = sourceFiles;
@@ -12873,7 +13982,18 @@ var ts;
return node;
}
ts.updateBundle = updateBundle;
- // Compound nodes
+ function createImmediatelyInvokedFunctionExpression(statements, param, paramValue) {
+ return createCall(createFunctionExpression(
+ /*modifiers*/ undefined,
+ /*asteriskToken*/ undefined,
+ /*name*/ undefined,
+ /*typeParameters*/ undefined,
+ /*parameters*/ param ? [param] : [],
+ /*type*/ undefined, createBlock(statements, /*multiLine*/ true)),
+ /*typeArguments*/ undefined,
+ /*argumentsArray*/ paramValue ? [paramValue] : []);
+ }
+ ts.createImmediatelyInvokedFunctionExpression = createImmediatelyInvokedFunctionExpression;
function createComma(left, right) {
return createBinary(left, 26 /* CommaToken */, right);
}
@@ -13026,6 +14146,14 @@ var ts;
return node;
}
ts.setSourceMapRange = setSourceMapRange;
+ var SourceMapSource;
+ /**
+ * Create an external source map source file reference
+ */
+ function createSourceMapSource(fileName, text, skipTrivia) {
+ return new (SourceMapSource || (SourceMapSource = ts.objectAllocator.getSourceMapSourceConstructor()))(fileName, text, skipTrivia);
+ }
+ ts.createSourceMapSource = createSourceMapSource;
/**
* Gets the TextRange to use for source maps for a token of a node.
*/
@@ -13207,6 +14335,7 @@ var ts;
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 = {};
+ // We are using `.slice()` here in case `destEmitNode.leadingComments` is pushed to later.
if (leadingComments)
destEmitNode.leadingComments = ts.addRange(leadingComments.slice(), destEmitNode.leadingComments);
if (trailingComments)
@@ -13236,7 +14365,25 @@ var ts;
})(ts || (ts = {}));
/* @internal */
(function (ts) {
- // Compound nodes
+ ts.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 createTypeCheck(value, tag) {
return tag === "undefined"
? ts.createStrictEquality(value, ts.createVoidZero())
@@ -13498,7 +14645,11 @@ var ts;
}
ts.createCallBinding = createCallBinding;
function inlineExpressions(expressions) {
- return ts.reduceLeft(expressions, ts.createComma);
+ // Avoid deeply nested comma expressions as traversing them during emit can result in "Maximum call
+ // stack size exceeded" errors.
+ return expressions.length > 10
+ ? ts.createCommaList(expressions)
+ : ts.reduceLeft(expressions, ts.createComma);
}
ts.inlineExpressions = inlineExpressions;
function createExpressionFromEntityName(node) {
@@ -13596,6 +14747,28 @@ var ts;
/*original*/ method));
}
/**
+ * Gets the internal name of a declaration. This is primarily used for declarations that can be
+ * referred to by name in the body of an ES5 class function body. An internal name will *never*
+ * be prefixed with an module or namespace export modifier like "exports." when emitted as an
+ * expression. An internal name will also *never* be renamed due to a collision with a block
+ * scoped variable.
+ *
+ * @param node The declaration.
+ * @param allowComments A value indicating whether comments may be emitted for the name.
+ * @param allowSourceMaps A value indicating whether source maps may be emitted for the name.
+ */
+ function getInternalName(node, allowComments, allowSourceMaps) {
+ return getName(node, allowComments, allowSourceMaps, 16384 /* LocalName */ | 32768 /* InternalName */);
+ }
+ ts.getInternalName = getInternalName;
+ /**
+ * Gets whether an identifier should only be referred to by its internal name.
+ */
+ function isInternalName(node) {
+ return (ts.getEmitFlags(node) & 32768 /* InternalName */) !== 0;
+ }
+ ts.isInternalName = isInternalName;
+ /**
* Gets the local name of a declaration. This is primarily used for declarations that can be
* referred to by name in the declaration's immediate scope (classes, enums, namespaces). A
* local name will *never* be prefixed with an module or namespace export modifier like
@@ -13650,9 +14823,10 @@ var ts;
}
ts.getDeclarationName = getDeclarationName;
function getName(node, allowComments, allowSourceMaps, emitFlags) {
- if (node.name && ts.isIdentifier(node.name) && !ts.isGeneratedIdentifier(node.name)) {
- var name = ts.getMutableClone(node.name);
- emitFlags |= ts.getEmitFlags(node.name);
+ var nodeName = ts.getNameOfDeclaration(node);
+ if (nodeName && ts.isIdentifier(nodeName) && !ts.isGeneratedIdentifier(nodeName)) {
+ var name = ts.getMutableClone(nodeName);
+ emitFlags |= ts.getEmitFlags(nodeName);
if (!allowSourceMaps)
emitFlags |= 48 /* NoSourceMap */;
if (!allowComments)
@@ -13706,6 +14880,18 @@ var ts;
return ts.isBlock(node) ? node : ts.setTextRange(ts.createBlock([ts.setTextRange(ts.createReturn(node), node)], multiLine), node);
}
ts.convertToFunctionBody = convertToFunctionBody;
+ function convertFunctionDeclarationToExpression(node) {
+ ts.Debug.assert(!!node.body);
+ var updated = ts.createFunctionExpression(node.modifiers, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body);
+ ts.setOriginalNode(updated, node);
+ ts.setTextRange(updated, node);
+ if (node.startsOnNewLine) {
+ updated.startsOnNewLine = true;
+ }
+ ts.aggregateTransformFlags(updated);
+ return updated;
+ }
+ ts.convertFunctionDeclarationToExpression = convertFunctionDeclarationToExpression;
function isUseStrictPrologue(node) {
return node.expression.text === "use strict";
}
@@ -13765,7 +14951,7 @@ var ts;
var numStatements = source.length;
while (statementOffset < numStatements) {
var statement = source[statementOffset];
- if (ts.getEmitFlags(statement) & 524288 /* CustomPrologue */) {
+ if (ts.getEmitFlags(statement) & 1048576 /* CustomPrologue */) {
target.push(visitor ? ts.visitNode(statement, visitor, ts.isStatement) : statement);
}
else {
@@ -13810,16 +14996,6 @@ var ts;
return statements;
}
ts.ensureUseStrict = ensureUseStrict;
- function parenthesizeConditionalHead(condition) {
- var conditionalPrecedence = ts.getOperatorPrecedence(195 /* ConditionalExpression */, 55 /* 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.
@@ -14083,7 +15259,7 @@ var ts;
if (kind === 186 /* FunctionExpression */ || kind === 187 /* ArrowFunction */) {
var mutableCall = ts.getMutableClone(emittedExpression);
mutableCall.expression = ts.setTextRange(ts.createParen(callee), callee);
- return recreatePartiallyEmittedExpressions(expression, mutableCall);
+ return recreateOuterExpressions(expression, mutableCall, 4 /* PartiallyEmittedExpressions */);
}
}
else {
@@ -14095,20 +15271,34 @@ var ts;
return expression;
}
ts.parenthesizeExpressionForExpressionStatement = parenthesizeExpressionForExpressionStatement;
- /**
- * Clones a series of not-emitted expressions with a new inner expression.
- *
- * @param originalOuterExpression The original outer expression.
- * @param newInnerExpression The new inner expression.
- */
- function recreatePartiallyEmittedExpressions(originalOuterExpression, newInnerExpression) {
- if (ts.isPartiallyEmittedExpression(originalOuterExpression)) {
- var clone_1 = ts.getMutableClone(originalOuterExpression);
- clone_1.expression = recreatePartiallyEmittedExpressions(clone_1.expression, newInnerExpression);
- return clone_1;
+ function parenthesizeElementTypeMember(member) {
+ switch (member.kind) {
+ case 166 /* UnionType */:
+ case 167 /* IntersectionType */:
+ case 160 /* FunctionType */:
+ case 161 /* ConstructorType */:
+ return ts.createParenthesizedType(member);
}
- return newInnerExpression;
+ return member;
}
+ ts.parenthesizeElementTypeMember = parenthesizeElementTypeMember;
+ function parenthesizeElementTypeMembers(members) {
+ return ts.createNodeArray(ts.sameMap(members, parenthesizeElementTypeMember));
+ }
+ ts.parenthesizeElementTypeMembers = parenthesizeElementTypeMembers;
+ function parenthesizeTypeParameters(typeParameters) {
+ if (ts.some(typeParameters)) {
+ var nodeArray = ts.createNodeArray();
+ for (var i = 0; i < typeParameters.length; ++i) {
+ var entry = typeParameters[i];
+ nodeArray.push(i === 0 && ts.isFunctionOrConstructorTypeNode(entry) && entry.typeParameters ?
+ ts.createParenthesizedType(entry) :
+ entry);
+ }
+ return nodeArray;
+ }
+ }
+ ts.parenthesizeTypeParameters = parenthesizeTypeParameters;
function getLeftmostExpression(node) {
while (true) {
switch (node.kind) {
@@ -14126,7 +15316,7 @@ var ts;
case 179 /* PropertyAccessExpression */:
node = node.expression;
continue;
- case 296 /* PartiallyEmittedExpression */:
+ case 297 /* PartiallyEmittedExpression */:
node = node.expression;
continue;
}
@@ -14147,6 +15337,21 @@ var ts;
OuterExpressionKinds[OuterExpressionKinds["PartiallyEmittedExpressions"] = 4] = "PartiallyEmittedExpressions";
OuterExpressionKinds[OuterExpressionKinds["All"] = 7] = "All";
})(OuterExpressionKinds = ts.OuterExpressionKinds || (ts.OuterExpressionKinds = {}));
+ function isOuterExpression(node, kinds) {
+ if (kinds === void 0) { kinds = 7 /* All */; }
+ switch (node.kind) {
+ case 185 /* ParenthesizedExpression */:
+ return (kinds & 1 /* Parentheses */) !== 0;
+ case 184 /* TypeAssertionExpression */:
+ case 202 /* AsExpression */:
+ case 203 /* NonNullExpression */:
+ return (kinds & 2 /* Assertions */) !== 0;
+ case 297 /* PartiallyEmittedExpression */:
+ return (kinds & 4 /* PartiallyEmittedExpressions */) !== 0;
+ }
+ return false;
+ }
+ ts.isOuterExpression = isOuterExpression;
function skipOuterExpressions(node, kinds) {
if (kinds === void 0) { kinds = 7 /* All */; }
var previousNode;
@@ -14173,19 +15378,36 @@ var ts;
}
ts.skipParentheses = skipParentheses;
function skipAssertions(node) {
- while (ts.isAssertionExpression(node)) {
+ while (ts.isAssertionExpression(node) || node.kind === 203 /* NonNullExpression */) {
node = node.expression;
}
return node;
}
ts.skipAssertions = skipAssertions;
function skipPartiallyEmittedExpressions(node) {
- while (node.kind === 296 /* PartiallyEmittedExpression */) {
+ while (node.kind === 297 /* PartiallyEmittedExpression */) {
node = node.expression;
}
return node;
}
ts.skipPartiallyEmittedExpressions = skipPartiallyEmittedExpressions;
+ function updateOuterExpression(outerExpression, expression) {
+ switch (outerExpression.kind) {
+ case 185 /* ParenthesizedExpression */: return ts.updateParen(outerExpression, expression);
+ case 184 /* TypeAssertionExpression */: return ts.updateTypeAssertion(outerExpression, outerExpression.type, expression);
+ case 202 /* AsExpression */: return ts.updateAsExpression(outerExpression, expression, outerExpression.type);
+ case 203 /* NonNullExpression */: return ts.updateNonNullExpression(outerExpression, expression);
+ case 297 /* PartiallyEmittedExpression */: return ts.updatePartiallyEmittedExpression(outerExpression, expression);
+ }
+ }
+ function recreateOuterExpressions(outerExpression, innerExpression, kinds) {
+ if (kinds === void 0) { kinds = 7 /* All */; }
+ if (outerExpression && isOuterExpression(outerExpression, kinds)) {
+ return updateOuterExpression(outerExpression, recreateOuterExpressions(outerExpression.expression, innerExpression));
+ }
+ return innerExpression;
+ }
+ ts.recreateOuterExpressions = recreateOuterExpressions;
function startOnNewLine(node) {
node.startsOnNewLine = true;
return node;
@@ -14197,23 +15419,33 @@ var ts;
return emitNode && emitNode.externalHelpersModuleName;
}
ts.getExternalHelpersModuleName = getExternalHelpersModuleName;
- function getOrCreateExternalHelpersModuleNameIfNeeded(node, compilerOptions) {
- if (compilerOptions.importHelpers && (ts.isExternalModule(node) || compilerOptions.isolatedModules)) {
+ function getOrCreateExternalHelpersModuleNameIfNeeded(node, compilerOptions, hasExportStarsToExportValues) {
+ if (compilerOptions.importHelpers && ts.isEffectiveExternalModule(node, compilerOptions)) {
var externalHelpersModuleName = getExternalHelpersModuleName(node);
if (externalHelpersModuleName) {
return externalHelpersModuleName;
}
- var helpers = ts.getEmitHelpers(node);
- if (helpers) {
- 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 = ts.getOrCreateEmitNode(parseNode);
- return emitNode.externalHelpersModuleName || (emitNode.externalHelpersModuleName = ts.createUniqueName(ts.externalHelpersModuleNameText));
+ var moduleKind = ts.getEmitModuleKind(compilerOptions);
+ var create = hasExportStarsToExportValues
+ && moduleKind !== ts.ModuleKind.System
+ && moduleKind !== ts.ModuleKind.ES2015;
+ if (!create) {
+ var helpers = ts.getEmitHelpers(node);
+ if (helpers) {
+ for (var _i = 0, helpers_2 = helpers; _i < helpers_2.length; _i++) {
+ var helper = helpers_2[_i];
+ if (!helper.scoped) {
+ create = true;
+ break;
+ }
}
}
}
+ if (create) {
+ var parseNode = ts.getOriginalNode(node, ts.isSourceFile);
+ var emitNode = ts.getOrCreateEmitNode(parseNode);
+ return emitNode.externalHelpersModuleName || (emitNode.externalHelpersModuleName = ts.createUniqueName(ts.externalHelpersModuleNameText));
+ }
}
}
ts.getOrCreateExternalHelpersModuleNameIfNeeded = getOrCreateExternalHelpersModuleNameIfNeeded;
@@ -14275,7 +15507,7 @@ var ts;
if (file.moduleName) {
return ts.createLiteral(file.moduleName);
}
- if (!ts.isDeclarationFile(file) && (options.out || options.outFile)) {
+ if (!file.isDeclarationFile && (options.out || options.outFile)) {
return ts.createLiteral(ts.getExternalModuleNameFromPath(host, file.fileName));
}
return undefined;
@@ -14316,7 +15548,7 @@ var ts;
// `1` in `[[a] = 1] = ...`
return bindingElement.right;
}
- if (ts.isSpreadExpression(bindingElement)) {
+ if (ts.isSpreadElement(bindingElement)) {
// Recovery consistent with existing emit.
return getInitializerOfBindingOrAssignmentElement(bindingElement.expression);
}
@@ -14378,7 +15610,7 @@ var ts;
// `a[0]` in `[a[0] = 1] = ...`
return getTargetOfBindingOrAssignmentElement(bindingElement.left);
}
- if (ts.isSpreadExpression(bindingElement)) {
+ if (ts.isSpreadElement(bindingElement)) {
// `a` in `[...a] = ...`
return getTargetOfBindingOrAssignmentElement(bindingElement.expression);
}
@@ -14542,13 +15774,6 @@ var ts;
var hasExportDefault = false;
var exportEquals = undefined;
var hasExportStarsToExportValues = false;
- var externalHelpersModuleName = getOrCreateExternalHelpersModuleNameIfNeeded(sourceFile, compilerOptions);
- var externalHelpersImportDeclaration = externalHelpersModuleName && ts.createImportDeclaration(
- /*decorators*/ undefined,
- /*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) {
@@ -14651,6 +15876,13 @@ var ts;
break;
}
}
+ var externalHelpersModuleName = getOrCreateExternalHelpersModuleNameIfNeeded(sourceFile, compilerOptions, hasExportStarsToExportValues);
+ var externalHelpersImportDeclaration = externalHelpersModuleName && ts.createImportDeclaration(
+ /*decorators*/ undefined,
+ /*modifiers*/ undefined, ts.createImportClause(/*name*/ undefined, ts.createNamespaceImport(externalHelpersModuleName)), ts.createLiteral(ts.externalHelpersModuleNameText));
+ if (externalHelpersImportDeclaration) {
+ externalImports.unshift(externalHelpersImportDeclaration);
+ }
return { externalImports: externalImports, exportSpecifiers: exportSpecifiers, exportEquals: exportEquals, hasExportStarsToExportValues: hasExportStarsToExportValues, exportedBindings: exportedBindings, exportedNames: exportedNames, externalHelpersImportDeclaration: externalHelpersImportDeclaration };
}
ts.collectExternalModuleInfo = collectExternalModuleInfo;
@@ -14699,7 +15931,7 @@ var ts;
else if (kind === 71 /* Identifier */) {
return new (IdentifierConstructor || (IdentifierConstructor = ts.objectAllocator.getIdentifierConstructor()))(kind, pos, end);
}
- else if (kind < 143 /* FirstNode */) {
+ else if (!ts.isNodeKind(kind)) {
return new (TokenConstructor || (TokenConstructor = ts.objectAllocator.getTokenConstructor()))(kind, pos, end);
}
else {
@@ -14728,10 +15960,16 @@ var ts;
}
}
}
- // Invokes a callback for each child of the given node. The 'cbNode' callback is invoked for all child nodes
- // stored in properties. If a 'cbNodes' callback is specified, it is invoked for embedded arrays; otherwise,
- // embedded arrays are flattened and the 'cbNode' callback is invoked for each element. If a callback returns
- // a truthy value, iteration stops and that value is returned. Otherwise, undefined is returned.
+ /**
+ * Invokes a callback for each child of the given node. The 'cbNode' callback is invoked for all child nodes
+ * stored in properties. If a 'cbNodes' callback is specified, it is invoked for embedded arrays; otherwise,
+ * embedded arrays are flattened and the 'cbNode' callback is invoked for each element. If a callback returns
+ * a truthy value, iteration stops and that value is returned. Otherwise, undefined is returned.
+ *
+ * @param node a given node to visit its children
+ * @param cbNode a callback to be invoked for all child nodes
+ * @param cbNodeArray a callback to be invoked for embedded array
+ */
function forEachChild(node, cbNode, cbNodeArray) {
if (!node) {
return;
@@ -15043,6 +16281,8 @@ var ts;
return visitNode(cbNode, node.expression);
case 247 /* MissingDeclaration */:
return visitNodes(cbNodes, node.decorators);
+ case 298 /* CommaListExpression */:
+ return visitNodes(cbNodes, node.elements);
case 249 /* JsxElement */:
return visitNode(cbNode, node.openingElement) ||
visitNodes(cbNodes, node.children) ||
@@ -15096,31 +16336,31 @@ var ts;
visitNode(cbNode, node.type);
case 283 /* JSDocComment */:
return visitNodes(cbNodes, node.tags);
- case 286 /* JSDocParameterTag */:
+ case 287 /* JSDocParameterTag */:
return visitNode(cbNode, node.preParameterName) ||
visitNode(cbNode, node.typeExpression) ||
visitNode(cbNode, node.postParameterName);
- case 287 /* JSDocReturnTag */:
+ case 288 /* JSDocReturnTag */:
return visitNode(cbNode, node.typeExpression);
- case 288 /* JSDocTypeTag */:
+ case 289 /* JSDocTypeTag */:
return visitNode(cbNode, node.typeExpression);
case 285 /* JSDocAugmentsTag */:
return visitNode(cbNode, node.typeExpression);
- case 289 /* JSDocTemplateTag */:
+ case 290 /* JSDocTemplateTag */:
return visitNodes(cbNodes, node.typeParameters);
- case 290 /* JSDocTypedefTag */:
+ case 291 /* JSDocTypedefTag */:
return visitNode(cbNode, node.typeExpression) ||
visitNode(cbNode, node.fullName) ||
visitNode(cbNode, node.name) ||
visitNode(cbNode, node.jsDocTypeLiteral);
- case 292 /* JSDocTypeLiteral */:
+ case 293 /* JSDocTypeLiteral */:
return visitNodes(cbNodes, node.jsDocPropertyTags);
- case 291 /* JSDocPropertyTag */:
+ case 292 /* JSDocPropertyTag */:
return visitNode(cbNode, node.typeExpression) ||
visitNode(cbNode, node.name);
- case 296 /* PartiallyEmittedExpression */:
+ case 297 /* PartiallyEmittedExpression */:
return visitNode(cbNode, node.expression);
- case 293 /* JSDocLiteralType */:
+ case 294 /* JSDocLiteralType */:
return visitNode(cbNode, node.literal);
}
}
@@ -15153,7 +16393,11 @@ var ts;
// becoming detached from any SourceFile). It is recommended that this SourceFile not
// be used once 'update' is called on it.
function updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks) {
- return IncrementalParser.updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks);
+ var newSourceFile = IncrementalParser.updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks);
+ // Because new source file node is created, it may not have the flag PossiblyContainDynamicImport. This is the case if there is no new edit to add dynamic import.
+ // We will manually port the flag to the new source file.
+ newSourceFile.flags |= (sourceFile.flags & 524288 /* PossiblyContainsDynamicImport */);
+ return newSourceFile;
}
ts.updateSourceFile = updateSourceFile;
/* @internal */
@@ -15332,7 +16576,7 @@ var ts;
processReferenceComments(sourceFile);
sourceFile.statements = parseList(0 /* SourceElements */, parseStatement);
ts.Debug.assert(token() === 1 /* EndOfFileToken */);
- sourceFile.endOfFileToken = parseTokenNode();
+ sourceFile.endOfFileToken = addJSDocComment(parseTokenNode());
setExternalModuleIndicator(sourceFile);
sourceFile.nodeCount = nodeCount;
sourceFile.identifierCount = identifierCount;
@@ -15677,7 +16921,7 @@ var ts;
if (!(pos >= 0)) {
pos = scanner.getStartPos();
}
- return kind >= 143 /* FirstNode */ ? new NodeConstructor(kind, pos, pos) :
+ return ts.isNodeKind(kind) ? new NodeConstructor(kind, pos, pos) :
kind === 71 /* Identifier */ ? new IdentifierConstructor(kind, pos, pos) :
new TokenConstructor(kind, pos, pos);
}
@@ -15800,12 +17044,12 @@ var ts;
if (token() === 84 /* ExportKeyword */) {
nextToken();
if (token() === 79 /* DefaultKeyword */) {
- return lookAhead(nextTokenIsClassOrFunctionOrAsync);
+ return lookAhead(nextTokenCanFollowDefaultKeyword);
}
return token() !== 39 /* AsteriskToken */ && token() !== 118 /* AsKeyword */ && token() !== 17 /* OpenBraceToken */ && canFollowModifier();
}
if (token() === 79 /* DefaultKeyword */) {
- return nextTokenIsClassOrFunctionOrAsync();
+ return nextTokenCanFollowDefaultKeyword();
}
if (token() === 115 /* StaticKeyword */) {
nextToken();
@@ -15823,9 +17067,10 @@ var ts;
|| token() === 24 /* DotDotDotToken */
|| isLiteralPropertyName();
}
- function nextTokenIsClassOrFunctionOrAsync() {
+ function nextTokenCanFollowDefaultKeyword() {
nextToken();
return token() === 75 /* ClassKeyword */ || token() === 89 /* FunctionKeyword */ ||
+ token() === 109 /* InterfaceKeyword */ ||
(token() === 117 /* AbstractKeyword */ && lookAhead(nextTokenIsClassKeywordOnSameLine)) ||
(token() === 120 /* AsyncKeyword */ && lookAhead(nextTokenIsFunctionKeywordOnSameLine));
}
@@ -16803,7 +18048,7 @@ var ts;
if (token() === 19 /* OpenParenToken */ || token() === 27 /* LessThanToken */) {
return parseSignatureMember(155 /* CallSignature */);
}
- if (token() === 94 /* NewKeyword */ && lookAhead(isStartOfConstructSignature)) {
+ if (token() === 94 /* NewKeyword */ && lookAhead(nextTokenIsOpenParenOrLessThan)) {
return parseSignatureMember(156 /* ConstructSignature */);
}
var fullStart = getNodePos();
@@ -16813,7 +18058,7 @@ var ts;
}
return parsePropertyOrMethodSignature(fullStart, modifiers);
}
- function isStartOfConstructSignature() {
+ function nextTokenIsOpenParenOrLessThan() {
nextToken();
return token() === 19 /* OpenParenToken */ || token() === 27 /* LessThanToken */;
}
@@ -17140,6 +18385,8 @@ var ts;
case 63 /* SlashEqualsToken */:
case 71 /* Identifier */:
return true;
+ case 91 /* ImportKeyword */:
+ return lookAhead(nextTokenIsOpenParenOrLessThan);
default:
return isIdentifier();
}
@@ -17780,10 +19027,10 @@ var ts;
* 5) --UnaryExpression[?Yield]
*/
if (isUpdateExpression()) {
- var incrementExpression = parseIncrementExpression();
+ var updateExpression = parseUpdateExpression();
return token() === 40 /* AsteriskAsteriskToken */ ?
- parseBinaryExpressionRest(getBinaryOperatorPrecedence(), incrementExpression) :
- incrementExpression;
+ parseBinaryExpressionRest(getBinaryOperatorPrecedence(), updateExpression) :
+ updateExpression;
}
/**
* ES7 UnaryExpression:
@@ -17847,7 +19094,7 @@ var ts;
}
// falls through
default:
- return parseIncrementExpression();
+ return parseUpdateExpression();
}
}
/**
@@ -17862,7 +19109,7 @@ var ts;
*/
function isUpdateExpression() {
// This function is called inside parseUnaryExpression to decide
- // whether to call parseSimpleUnaryExpression or call parseIncrementExpression directly
+ // whether to call parseSimpleUnaryExpression or call parseUpdateExpression directly
switch (token()) {
case 37 /* PlusToken */:
case 38 /* MinusToken */:
@@ -17885,9 +19132,9 @@ var ts;
}
}
/**
- * Parse ES7 IncrementExpression. IncrementExpression is used instead of ES6's PostFixExpression.
+ * Parse ES7 UpdateExpression. UpdateExpression is used instead of ES6's PostFixExpression.
*
- * ES7 IncrementExpression[yield]:
+ * ES7 UpdateExpression[yield]:
* 1) LeftHandSideExpression[?yield]
* 2) LeftHandSideExpression[?yield] [[no LineTerminator here]]++
* 3) LeftHandSideExpression[?yield] [[no LineTerminator here]]--
@@ -17895,7 +19142,7 @@ var ts;
* 5) --LeftHandSideExpression[?yield]
* In TypeScript (2), (3) are parsed as PostfixUnaryExpression. (4), (5) are parsed as PrefixUnaryExpression
*/
- function parseIncrementExpression() {
+ function parseUpdateExpression() {
if (token() === 43 /* PlusPlusToken */ || token() === 44 /* MinusMinusToken */) {
var node = createNode(192 /* PrefixUnaryExpression */);
node.operator = token();
@@ -17941,23 +19188,33 @@ var ts;
// CallExpression Arguments
// CallExpression[Expression]
// CallExpression.IdentifierName
- // super ( ArgumentListopt )
+ // import (AssignmentExpression)
+ // super Arguments
// super.IdentifierName
//
- // Because of the recursion in these calls, we need to bottom out first. There are two
- // bottom out states we can run into. Either we see 'super' which must start either of
- // the last two CallExpression productions. Or we have a MemberExpression which either
- // completes the LeftHandSideExpression, or starts the beginning of the first four
- // CallExpression productions.
- var expression = token() === 97 /* SuperKeyword */
- ? parseSuperExpression()
- : parseMemberExpressionOrHigher();
+ // Because of the recursion in these calls, we need to bottom out first. There are three
+ // bottom out states we can run into: 1) We see 'super' which must start either of
+ // the last two CallExpression productions. 2) We see 'import' which must start import call.
+ // 3)we have a MemberExpression which either completes the LeftHandSideExpression,
+ // or starts the beginning of the first four CallExpression productions.
+ var expression;
+ if (token() === 91 /* ImportKeyword */ && lookAhead(nextTokenIsOpenParenOrLessThan)) {
+ // We don't want to eagerly consume all import keyword as import call expression so we look a head to find "("
+ // For example:
+ // var foo3 = require("subfolder
+ // import * as foo1 from "module-from-node -> we want this import to be a statement rather than import call expression
+ sourceFile.flags |= 524288 /* PossiblyContainsDynamicImport */;
+ expression = parseTokenNode();
+ }
+ else {
+ expression = token() === 97 /* SuperKeyword */ ? parseSuperExpression() : parseMemberExpressionOrHigher();
+ }
// Now, we *may* be complete. However, we might have consumed the start of a
// CallExpression. As such, we need to consume the rest of it here to be complete.
return parseCallExpressionRest(expression);
}
function parseMemberExpressionOrHigher() {
- // Note: to make our lives simpler, we decompose the the NewExpression productions and
+ // Note: to make our lives simpler, we decompose the NewExpression productions and
// place ObjectCreationExpression and FunctionExpression into PrimaryExpression.
// like so:
//
@@ -18353,7 +19610,7 @@ var ts;
case 48 /* AmpersandToken */: // foo<x> &
case 49 /* BarToken */: // foo<x> |
case 18 /* CloseBraceToken */: // foo<x> }
- case 1 /* EndOfFileToken */:
+ case 1 /* EndOfFileToken */:// foo<x>
// these cases can't legally follow a type arg list. However, they're not legal
// expressions either. The user is probably in the middle of a generic type. So
// treat it as such.
@@ -18918,9 +20175,10 @@ var ts;
case 74 /* CatchKeyword */:
case 87 /* FinallyKeyword */:
return true;
+ case 91 /* ImportKeyword */:
+ return isStartOfDeclaration() || lookAhead(nextTokenIsOpenParenOrLessThan);
case 76 /* ConstKeyword */:
case 84 /* ExportKeyword */:
- case 91 /* ImportKeyword */:
return isStartOfDeclaration();
case 120 /* AsyncKeyword */:
case 124 /* DeclareKeyword */:
@@ -19328,7 +20586,7 @@ var ts;
case 27 /* LessThanToken */: // Generic Method declaration
case 56 /* ColonToken */: // Type Annotation for declaration
case 58 /* EqualsToken */: // Initializer for declaration
- case 55 /* QuestionToken */:
+ case 55 /* QuestionToken */:// Not valid, but permitted so that it gets caught later on.
return true;
default:
// Covers
@@ -20055,7 +21313,10 @@ var ts;
case 17 /* OpenBraceToken */:
return parseJSDocRecordType();
case 89 /* FunctionKeyword */:
- return parseJSDocFunctionType();
+ if (lookAhead(nextTokenIsOpenParen)) {
+ return parseJSDocFunctionType();
+ }
+ break;
case 24 /* DotDotDotToken */:
return parseJSDocVariadicType();
case 94 /* NewKeyword */:
@@ -20071,7 +21332,6 @@ var ts;
case 95 /* NullKeyword */:
case 139 /* UndefinedKeyword */:
case 130 /* NeverKeyword */:
- case 134 /* ObjectKeyword */:
return parseTokenNode();
case 9 /* StringLiteral */:
case 8 /* NumericLiteral */:
@@ -20211,7 +21471,7 @@ var ts;
return finishNode(result);
}
function parseJSDocLiteralType() {
- var result = createNode(293 /* JSDocLiteralType */);
+ var result = createNode(294 /* JSDocLiteralType */);
result.literal = parseLiteralTypeNode();
return finishNode(result);
}
@@ -20260,10 +21520,17 @@ var ts;
if (comment) {
comment.parent = parent;
}
+ if (ts.isInJavaScriptFile(parent)) {
+ if (!sourceFile.jsDocDiagnostics) {
+ sourceFile.jsDocDiagnostics = [];
+ }
+ (_a = sourceFile.jsDocDiagnostics).push.apply(_a, parseDiagnostics);
+ }
currentToken = saveToken;
parseDiagnostics.length = saveParseDiagnosticsLength;
parseErrorBeforeNextFinishedNode = saveParseErrorBeforeNextFinishedNode;
return comment;
+ var _a;
}
JSDocParser.parseJSDocComment = parseJSDocComment;
var JSDocState;
@@ -20429,8 +21696,14 @@ var ts;
case "augments":
tag = parseAugmentsTag(atToken, tagName);
break;
+ case "class":
+ case "constructor":
+ tag = parseClassTag(atToken, tagName);
+ break;
+ case "arg":
+ case "argument":
case "param":
- tag = parseParamTag(atToken, tagName);
+ tag = parseParameterOrPropertyTag(atToken, tagName, /*shouldParseParamTag*/ true);
break;
case "return":
case "returns":
@@ -20544,29 +21817,25 @@ var ts;
return parseJSDocTypeExpression();
});
}
- function parseParamTag(atToken, tagName) {
- var typeExpression = tryParseTypeExpression();
- skipWhitespace();
- var name;
- var isBracketed;
+ function parseBracketNameInPropertyAndParamTag() {
// Looking for something like '[foo]' or 'foo'
- if (parseOptionalToken(21 /* OpenBracketToken */)) {
- name = parseJSDocIdentifierName();
+ var isBracketed = parseOptional(21 /* OpenBracketToken */);
+ var name = parseJSDocIdentifierName(/*createIfMissing*/ true);
+ if (isBracketed) {
skipWhitespace();
- isBracketed = true;
// May have an optional default, e.g. '[foo = 42]'
if (parseOptionalToken(58 /* EqualsToken */)) {
parseExpression();
}
parseExpected(22 /* CloseBracketToken */);
}
- else if (ts.tokenIsIdentifierOrKeyword(token())) {
- name = parseJSDocIdentifierName();
- }
- if (!name) {
- parseErrorAtPosition(scanner.getStartPos(), 0, ts.Diagnostics.Identifier_expected);
- return undefined;
- }
+ return { name: name, isBracketed: isBracketed };
+ }
+ function parseParameterOrPropertyTag(atToken, tagName, shouldParseParamTag) {
+ var typeExpression = tryParseTypeExpression();
+ skipWhitespace();
+ var _a = parseBracketNameInPropertyAndParamTag(), name = _a.name, isBracketed = _a.isBracketed;
+ skipWhitespace();
var preName, postName;
if (typeExpression) {
postName = name;
@@ -20577,52 +21846,38 @@ var ts;
if (!typeExpression) {
typeExpression = tryParseTypeExpression();
}
- var result = createNode(286 /* JSDocParameterTag */, atToken.pos);
+ var result = shouldParseParamTag ?
+ createNode(287 /* JSDocParameterTag */, atToken.pos) :
+ createNode(292 /* JSDocPropertyTag */, atToken.pos);
result.atToken = atToken;
result.tagName = tagName;
result.preParameterName = preName;
result.typeExpression = typeExpression;
result.postParameterName = postName;
- result.parameterName = postName || preName;
+ result.name = postName || preName;
result.isBracketed = isBracketed;
return finishNode(result);
}
function parseReturnTag(atToken, tagName) {
- if (ts.forEach(tags, function (t) { return t.kind === 287 /* JSDocReturnTag */; })) {
+ if (ts.forEach(tags, function (t) { return t.kind === 288 /* JSDocReturnTag */; })) {
parseErrorAtPosition(tagName.pos, scanner.getTokenPos() - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text);
}
- var result = createNode(287 /* JSDocReturnTag */, atToken.pos);
+ var result = createNode(288 /* 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 === 288 /* JSDocTypeTag */; })) {
+ if (ts.forEach(tags, function (t) { return t.kind === 289 /* JSDocTypeTag */; })) {
parseErrorAtPosition(tagName.pos, scanner.getTokenPos() - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text);
}
- var result = createNode(288 /* JSDocTypeTag */, atToken.pos);
+ var result = createNode(289 /* JSDocTypeTag */, atToken.pos);
result.atToken = atToken;
result.tagName = tagName;
result.typeExpression = tryParseTypeExpression();
return finishNode(result);
}
- function parsePropertyTag(atToken, tagName) {
- var typeExpression = tryParseTypeExpression();
- skipWhitespace();
- var name = parseJSDocIdentifierName();
- skipWhitespace();
- if (!name) {
- parseErrorAtPosition(scanner.getStartPos(), /*length*/ 0, ts.Diagnostics.Identifier_expected);
- return undefined;
- }
- var result = createNode(291 /* JSDocPropertyTag */, atToken.pos);
- result.atToken = atToken;
- result.tagName = tagName;
- result.name = name;
- result.typeExpression = typeExpression;
- return finishNode(result);
- }
function parseAugmentsTag(atToken, tagName) {
var typeExpression = tryParseTypeExpression();
var result = createNode(285 /* JSDocAugmentsTag */, atToken.pos);
@@ -20631,10 +21886,16 @@ var ts;
result.typeExpression = typeExpression;
return finishNode(result);
}
+ function parseClassTag(atToken, tagName) {
+ var tag = createNode(286 /* JSDocClassTag */, atToken.pos);
+ tag.atToken = atToken;
+ tag.tagName = tagName;
+ return finishNode(tag);
+ }
function parseTypedefTag(atToken, tagName) {
var typeExpression = tryParseTypeExpression();
skipWhitespace();
- var typedefTag = createNode(290 /* JSDocTypedefTag */, atToken.pos);
+ var typedefTag = createNode(291 /* JSDocTypedefTag */, atToken.pos);
typedefTag.atToken = atToken;
typedefTag.tagName = tagName;
typedefTag.fullName = parseJSDocTypeNameWithNamespace(/*flags*/ 0);
@@ -20657,7 +21918,7 @@ var ts;
var jsDocTypeReference = typeExpression.type;
if (jsDocTypeReference.name.kind === 71 /* Identifier */) {
var name = jsDocTypeReference.name;
- if (name.text === "Object") {
+ if (name.text === "Object" || name.text === "object") {
typedefTag.jsDocTypeLiteral = scanChildTags();
}
}
@@ -20671,7 +21932,7 @@ var ts;
}
return finishNode(typedefTag);
function scanChildTags() {
- var jsDocTypeLiteral = createNode(292 /* JSDocTypeLiteral */, scanner.getStartPos());
+ var jsDocTypeLiteral = createNode(293 /* JSDocTypeLiteral */, scanner.getStartPos());
var resumePos = scanner.getStartPos();
var canParseTag = true;
var seenAsterisk = false;
@@ -20717,7 +21978,7 @@ var ts;
jsDocNamespaceNode.flags |= flags;
jsDocNamespaceNode.name = typeNameOrNamespaceName;
jsDocNamespaceNode.body = parseJSDocTypeNameWithNamespace(4 /* NestedNamespace */);
- return jsDocNamespaceNode;
+ return finishNode(jsDocNamespaceNode);
}
if (typeNameOrNamespaceName && flags & 4 /* NestedNamespace */) {
typeNameOrNamespaceName.isInJSDocNamespace = true;
@@ -20745,7 +22006,7 @@ var ts;
return true;
case "prop":
case "property":
- var propertyTag = parsePropertyTag(atToken, tagName);
+ var propertyTag = parseParameterOrPropertyTag(atToken, tagName, /*shouldParseParamTag*/ false);
if (propertyTag) {
if (!parentTag.jsDocPropertyTags) {
parentTag.jsDocPropertyTags = [];
@@ -20759,7 +22020,7 @@ var ts;
return false;
}
function parseTemplateTag(atToken, tagName) {
- if (ts.forEach(tags, function (t) { return t.kind === 289 /* JSDocTemplateTag */; })) {
+ if (ts.forEach(tags, function (t) { return t.kind === 290 /* 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'
@@ -20783,7 +22044,7 @@ var ts;
break;
}
}
- var result = createNode(289 /* JSDocTemplateTag */, atToken.pos);
+ var result = createNode(290 /* JSDocTemplateTag */, atToken.pos);
result.atToken = atToken;
result.tagName = tagName;
result.typeParameters = typeParameters;
@@ -20794,13 +22055,19 @@ var ts;
function nextJSDocToken() {
return currentToken = scanner.scanJSDocToken();
}
- function parseJSDocIdentifierName() {
- return createJSDocIdentifier(ts.tokenIsIdentifierOrKeyword(token()));
+ function parseJSDocIdentifierName(createIfMissing) {
+ if (createIfMissing === void 0) { createIfMissing = false; }
+ return createJSDocIdentifier(ts.tokenIsIdentifierOrKeyword(token()), createIfMissing);
}
- function createJSDocIdentifier(isIdentifier) {
+ function createJSDocIdentifier(isIdentifier, createIfMissing) {
if (!isIdentifier) {
- parseErrorAtCurrentToken(ts.Diagnostics.Identifier_expected);
- return undefined;
+ if (createIfMissing) {
+ return createMissingNode(71 /* Identifier */, /*reportAtCurrentPosition*/ true, ts.Diagnostics.Identifier_expected);
+ }
+ else {
+ parseErrorAtCurrentToken(ts.Diagnostics.Identifier_expected);
+ return undefined;
+ }
}
var pos = scanner.getTokenPos();
var end = scanner.getTextPos();
@@ -21416,7 +22683,7 @@ var ts;
inStrictMode = bindInStrictMode(file, opts);
classifiableNames = ts.createMap();
symbolCount = 0;
- skipTransformFlagAggregation = ts.isDeclarationFile(file);
+ skipTransformFlagAggregation = file.isDeclarationFile;
Symbol = ts.objectAllocator.getSymbolConstructor();
if (!file.locals) {
bind(file);
@@ -21444,7 +22711,7 @@ var ts;
}
return bindSourceFile;
function bindInStrictMode(file, opts) {
- if ((opts.alwaysStrict === undefined ? opts.strict : opts.alwaysStrict) && !ts.isDeclarationFile(file)) {
+ if ((opts.alwaysStrict === undefined ? opts.strict : opts.alwaysStrict) && !file.isDeclarationFile) {
// bind in strict mode source files with alwaysStrict option
return true;
}
@@ -21481,12 +22748,13 @@ var ts;
// Should not be called on a declaration with a computed property name,
// unless it is a well known Symbol.
function getDeclarationName(node) {
- if (node.name) {
+ var name = ts.getNameOfDeclaration(node);
+ if (name) {
if (ts.isAmbientModule(node)) {
- return ts.isGlobalScopeAugmentation(node) ? "__global" : "\"" + node.name.text + "\"";
+ return ts.isGlobalScopeAugmentation(node) ? "__global" : "\"" + name.text + "\"";
}
- if (node.name.kind === 144 /* ComputedPropertyName */) {
- var nameExpression = node.name.expression;
+ if (name.kind === 144 /* ComputedPropertyName */) {
+ var nameExpression = name.expression;
// treat computed property names where expression is string/numeric literal as just string/numeric literal
if (ts.isStringOrNumericLiteral(nameExpression)) {
return nameExpression.text;
@@ -21494,7 +22762,7 @@ var ts;
ts.Debug.assert(ts.isWellKnownSymbolSyntactically(nameExpression));
return ts.getPropertyNameForKnownSymbolName(nameExpression.name.text);
}
- return node.name.text;
+ return name.text;
}
switch (node.kind) {
case 152 /* Constructor */:
@@ -21512,18 +22780,9 @@ var ts;
case 243 /* ExportAssignment */:
return node.isExportEquals ? "export=" : "default";
case 194 /* 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 */:
- // className.prototype.methodName = ...
- return node.left.expression.name.text;
+ if (ts.getSpecialPropertyAssignmentKind(node) === 2 /* ModuleExports */) {
+ // module.exports = ...
+ return "export=";
}
ts.Debug.fail("Unknown binary declaration kind");
break;
@@ -21539,7 +22798,7 @@ var ts;
var functionType = node.parent;
var index = ts.indexOf(functionType.parameters, node);
return "arg" + index;
- case 290 /* JSDocTypedefTag */:
+ case 291 /* JSDocTypedefTag */:
var parentNode = node.parent && node.parent.parent;
var nameFromParentNode = void 0;
if (parentNode && parentNode.kind === 208 /* VariableStatement */) {
@@ -21638,9 +22897,9 @@ var ts;
}
}
ts.forEach(symbol.declarations, function (declaration) {
- file.bindDiagnostics.push(ts.createDiagnosticForNode(declaration.name || declaration, message_1, getDisplayName(declaration)));
+ file.bindDiagnostics.push(ts.createDiagnosticForNode(ts.getNameOfDeclaration(declaration) || declaration, message_1, getDisplayName(declaration)));
});
- file.bindDiagnostics.push(ts.createDiagnosticForNode(node.name || node, message_1, getDisplayName(node)));
+ file.bindDiagnostics.push(ts.createDiagnosticForNode(ts.getNameOfDeclaration(node) || node, message_1, getDisplayName(node)));
symbol = createSymbol(0 /* None */, name);
}
}
@@ -21675,7 +22934,9 @@ 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 === 290 /* JSDocTypedefTag */ &&
+ if (node.kind === 291 /* JSDocTypedefTag */)
+ ts.Debug.assert(ts.isInJavaScriptFile(node)); // We shouldn't add symbols for JSDoc nodes if not in a JS file.
+ var isJSDocTypedefInJSDocNamespace = node.kind === 291 /* JSDocTypedefTag */ &&
node.name &&
node.name.kind === 71 /* Identifier */ &&
node.name.isInJSDocNamespace;
@@ -21833,8 +23094,19 @@ var ts;
// Binding of JsDocComment should be done before the current block scope container changes.
// because the scope of JsDocComment should not be affected by whether the current node is a
// container or not.
- if (ts.isInJavaScriptFile(node) && node.jsDoc) {
- ts.forEach(node.jsDoc, bind);
+ if (node.jsDoc) {
+ if (ts.isInJavaScriptFile(node)) {
+ for (var _i = 0, _a = node.jsDoc; _i < _a.length; _i++) {
+ var j = _a[_i];
+ bind(j);
+ }
+ }
+ else {
+ for (var _b = 0, _c = node.jsDoc; _b < _c.length; _b++) {
+ var j = _c[_b];
+ setParentPointers(node, j);
+ }
+ }
}
if (checkUnreachable(node)) {
bindEachChild(node);
@@ -21904,7 +23176,7 @@ var ts;
case 283 /* JSDocComment */:
bindJSDocComment(node);
break;
- case 290 /* JSDocTypedefTag */:
+ case 291 /* JSDocTypedefTag */:
bindJSDocTypedefTag(node);
break;
default:
@@ -22520,13 +23792,13 @@ var ts;
}
function bindVariableDeclarationFlow(node) {
bindEachChild(node);
- if (node.initializer || node.parent.parent.kind === 215 /* ForInStatement */ || node.parent.parent.kind === 216 /* ForOfStatement */) {
+ if (node.initializer || ts.isForInOrOfStatement(node.parent.parent)) {
bindInitializedVariableFlow(node);
}
}
function bindJSDocComment(node) {
ts.forEachChild(node, function (n) {
- if (n.kind !== 290 /* JSDocTypedefTag */) {
+ if (n.kind !== 291 /* JSDocTypedefTag */) {
bind(n);
}
});
@@ -22572,7 +23844,7 @@ var ts;
case 232 /* EnumDeclaration */:
case 178 /* ObjectLiteralExpression */:
case 163 /* TypeLiteral */:
- case 292 /* JSDocTypeLiteral */:
+ case 293 /* JSDocTypeLiteral */:
case 275 /* JSDocRecordType */:
case 254 /* JsxAttributes */:
return 1 /* IsContainer */;
@@ -22664,7 +23936,7 @@ var ts;
case 178 /* ObjectLiteralExpression */:
case 230 /* InterfaceDeclaration */:
case 275 /* JSDocRecordType */:
- case 292 /* JSDocTypeLiteral */:
+ case 293 /* JSDocTypeLiteral */:
case 254 /* JsxAttributes */:
// Interface/Object-types always have their children added to the 'members' of
// their container. They are only accessible through an instance of their
@@ -22691,7 +23963,7 @@ var ts;
// 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
- // their container in the tree. To accomplish this, we simply add their declared
+ // their container in the tree). To accomplish this, we simply add their declared
// symbol to the 'locals' of the container. These symbols can then be found as
// the type checker walks up the containers, checking them for matching names.
return declareSymbol(container.locals, /*parent*/ undefined, node, symbolFlags, symbolExcludes);
@@ -23021,9 +24293,8 @@ var ts;
// 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)) {
+ 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:
@@ -23068,7 +24339,7 @@ var ts;
}
for (var _b = 0, _c = jsDoc.tags; _b < _c.length; _b++) {
var tag = _c[_b];
- if (tag.kind === 290 /* JSDocTypedefTag */) {
+ if (tag.kind === 291 /* JSDocTypedefTag */) {
var savedParent = parent;
parent = jsDoc;
bind(tag);
@@ -23107,7 +24378,7 @@ var ts;
// current "blockScopeContainer" needs to be set to its immediate namespace parent.
if (node.isInJSDocNamespace) {
var parentNode = node.parent;
- while (parentNode && parentNode.kind !== 290 /* JSDocTypedefTag */) {
+ while (parentNode && parentNode.kind !== 291 /* JSDocTypedefTag */) {
parentNode = parentNode.parent;
}
bindBlockScopedDeclaration(parentNode, 524288 /* TypeAlias */, 793064 /* TypeAliasExcludes */);
@@ -23175,10 +24446,7 @@ var ts;
return bindVariableDeclarationOrBindingElement(node);
case 149 /* PropertyDeclaration */:
case 148 /* PropertySignature */:
- case 276 /* JSDocRecordMember */:
- return bindPropertyOrMethodOrAccessor(node, 4 /* Property */ | (node.questionToken ? 67108864 /* Optional */ : 0 /* None */), 0 /* PropertyExcludes */);
- case 291 /* JSDocPropertyTag */:
- return bindJSDocProperty(node);
+ return bindPropertyWorker(node);
case 261 /* PropertyAssignment */:
case 262 /* ShorthandPropertyAssignment */:
return bindPropertyOrMethodOrAccessor(node, 4 /* Property */, 0 /* PropertyExcludes */);
@@ -23220,13 +24488,10 @@ var ts;
return bindPropertyOrMethodOrAccessor(node, 65536 /* SetAccessor */, 74687 /* SetAccessorExcludes */);
case 160 /* FunctionType */:
case 161 /* ConstructorType */:
- case 279 /* JSDocFunctionType */:
return bindFunctionOrConstructorType(node);
case 163 /* TypeLiteral */:
case 172 /* MappedType */:
- case 292 /* JSDocTypeLiteral */:
- case 275 /* JSDocRecordType */:
- return bindAnonymousDeclaration(node, 2048 /* TypeLiteral */, "__type");
+ return bindAnonymousTypeWorker(node);
case 178 /* ObjectLiteralExpression */:
return bindObjectLiteralExpression(node);
case 186 /* FunctionExpression */:
@@ -23245,11 +24510,6 @@ var ts;
return bindClassLikeDeclaration(node);
case 230 /* InterfaceDeclaration */:
return bindBlockScopedDeclaration(node, 64 /* Interface */, 792968 /* InterfaceExcludes */);
- case 290 /* JSDocTypedefTag */:
- if (!node.fullName || node.fullName.kind === 71 /* Identifier */) {
- return bindBlockScopedDeclaration(node, 524288 /* TypeAlias */, 793064 /* TypeAliasExcludes */);
- }
- break;
case 231 /* TypeAliasDeclaration */:
return bindBlockScopedDeclaration(node, 524288 /* TypeAlias */, 793064 /* TypeAliasExcludes */);
case 232 /* EnumDeclaration */:
@@ -23285,8 +24545,31 @@ var ts;
// falls through
case 234 /* ModuleBlock */:
return updateStrictModeStatementList(node.statements);
+ case 276 /* JSDocRecordMember */:
+ return bindPropertyWorker(node);
+ case 292 /* JSDocPropertyTag */:
+ return declareSymbolAndAddToSymbolTable(node, node.isBracketed || (node.typeExpression && node.typeExpression.type.kind === 278 /* JSDocOptionalType */) ?
+ 4 /* Property */ | 67108864 /* Optional */ : 4 /* Property */, 0 /* PropertyExcludes */);
+ case 279 /* JSDocFunctionType */:
+ return bindFunctionOrConstructorType(node);
+ case 293 /* JSDocTypeLiteral */:
+ case 275 /* JSDocRecordType */:
+ return bindAnonymousTypeWorker(node);
+ case 291 /* JSDocTypedefTag */: {
+ var fullName = node.fullName;
+ if (!fullName || fullName.kind === 71 /* Identifier */) {
+ return bindBlockScopedDeclaration(node, 524288 /* TypeAlias */, 793064 /* TypeAliasExcludes */);
+ }
+ break;
+ }
}
}
+ function bindPropertyWorker(node) {
+ return bindPropertyOrMethodOrAccessor(node, 4 /* Property */ | (node.questionToken ? 67108864 /* Optional */ : 0 /* None */), 0 /* PropertyExcludes */);
+ }
+ function bindAnonymousTypeWorker(node) {
+ return bindAnonymousDeclaration(node, 2048 /* TypeLiteral */, "__type");
+ }
function checkTypePredicate(node) {
var parameterName = node.parameterName, type = node.type;
if (parameterName && parameterName.kind === 71 /* Identifier */) {
@@ -23397,7 +24680,7 @@ var ts;
// 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='.
+ // Similarly 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
@@ -23556,7 +24839,7 @@ var ts;
}
}
function bindParameter(node) {
- if (inStrictMode) {
+ if (inStrictMode && !ts.isInAmbientContext(node)) {
// It is a SyntaxError if the identifier eval or arguments appears within a FormalParameterList of a
// strict mode FunctionLikeDeclaration or FunctionExpression(13.1)
checkStrictModeEvalOrArguments(node, node.name);
@@ -23575,7 +24858,7 @@ var ts;
}
}
function bindFunctionDeclaration(node) {
- if (!ts.isDeclarationFile(file) && !ts.isInAmbientContext(node)) {
+ if (!file.isDeclarationFile && !ts.isInAmbientContext(node)) {
if (ts.isAsyncFunction(node)) {
emitFlags |= 1024 /* HasAsyncFunctions */;
}
@@ -23590,7 +24873,7 @@ var ts;
}
}
function bindFunctionExpression(node) {
- if (!ts.isDeclarationFile(file) && !ts.isInAmbientContext(node)) {
+ if (!file.isDeclarationFile && !ts.isInAmbientContext(node)) {
if (ts.isAsyncFunction(node)) {
emitFlags |= 1024 /* HasAsyncFunctions */;
}
@@ -23603,10 +24886,8 @@ var ts;
return bindAnonymousDeclaration(node, 16 /* Function */, bindingName);
}
function bindPropertyOrMethodOrAccessor(node, symbolFlags, symbolExcludes) {
- if (!ts.isDeclarationFile(file) && !ts.isInAmbientContext(node)) {
- if (ts.isAsyncFunction(node)) {
- emitFlags |= 1024 /* HasAsyncFunctions */;
- }
+ if (!file.isDeclarationFile && !ts.isInAmbientContext(node) && ts.isAsyncFunction(node)) {
+ emitFlags |= 1024 /* HasAsyncFunctions */;
}
if (currentFlow && ts.isObjectLiteralOrClassExpressionMethod(node)) {
node.flowNode = currentFlow;
@@ -23615,9 +24896,6 @@ var ts;
? bindAnonymousDeclaration(node, symbolFlags, "__computed")
: declareSymbolAndAddToSymbolTable(node, symbolFlags, symbolExcludes);
}
- function bindJSDocProperty(node) {
- return declareSymbolAndAddToSymbolTable(node, 4 /* Property */, 0 /* PropertyExcludes */);
- }
// reachability checks
function shouldReportErrorOnModuleDeclaration(node) {
var instanceState = getModuleInstanceState(node);
@@ -23739,6 +25017,9 @@ var ts;
// node.
transformFlags |= 192 /* AssertES2015 */;
}
+ if (expression.kind === 91 /* ImportKeyword */) {
+ transformFlags |= 67108864 /* ContainsDynamicImport */;
+ }
node.transformFlags = transformFlags | 536870912 /* HasComputedFlags */;
return transformFlags & ~537396545 /* ArrayLiteralOrCallOrNewExcludes */;
}
@@ -24286,6 +25567,7 @@ var ts;
case 171 /* IndexedAccessType */:
case 172 /* MappedType */:
case 173 /* LiteralType */:
+ case 236 /* NamespaceExportDeclaration */:
// Types and signatures are TypeScript syntax, and exclude all other facts.
transformFlags = 3 /* AssertTypeScript */;
excludeFlags = -3 /* TypeExcludes */;
@@ -24458,6 +25740,14 @@ var ts;
}
}
ts.getTransformFlagsSubtreeExclusions = getTransformFlagsSubtreeExclusions;
+ /**
+ * "Binds" JSDoc nodes in TypeScript code.
+ * Since we will never create symbols for JSDoc, we just set parent pointers instead.
+ */
+ function setParentPointers(parent, child) {
+ child.parent = parent;
+ ts.forEachChild(child, function (childsChild) { return setParentPointers(child, childsChild); });
+ }
})(ts || (ts = {}));
/// <reference path="core.ts" />
/// <reference path="diagnosticInformationMap.generated.ts" />
@@ -24490,13 +25780,11 @@ var ts;
ts.Debug.assert(ts.extensionIsTypeScript(resolved.extension));
return resolved.path;
}
- /** Adds `isExernalLibraryImport` to a Resolved to get a ResolvedModule. */
- function resolvedModuleFromResolved(_a, isExternalLibraryImport) {
- var path = _a.path, extension = _a.extension;
- return { resolvedFileName: path, extension: extension, isExternalLibraryImport: isExternalLibraryImport };
- }
function createResolvedModuleWithFailedLookupLocations(resolved, isExternalLibraryImport, failedLookupLocations) {
- return { resolvedModule: resolved && resolvedModuleFromResolved(resolved, isExternalLibraryImport), failedLookupLocations: failedLookupLocations };
+ return {
+ resolvedModule: resolved && { resolvedFileName: resolved.path, extension: resolved.extension, isExternalLibraryImport: isExternalLibraryImport },
+ failedLookupLocations: failedLookupLocations
+ };
}
function moduleHasNonRelativeName(moduleName) {
return !(ts.isRootedDiskPath(moduleName) || ts.isExternalModuleNameRelative(moduleName));
@@ -24824,6 +26112,8 @@ var ts;
case ts.ModuleResolutionKind.Classic:
result = classicNameResolver(moduleName, containingFile, compilerOptions, host, cache);
break;
+ default:
+ ts.Debug.fail("Unexpected moduleResolution: " + moduleResolution);
}
if (perFolderCache) {
perFolderCache.set(moduleName, result);
@@ -25008,11 +26298,13 @@ var ts;
if (state.traceEnabled) {
trace(state.host, ts.Diagnostics.Trying_substitution_0_candidate_module_location_Colon_1, subst, path);
}
- // A path mapping may have a ".ts" extension; in contrast to an import, which should omit it.
- var tsExtension = ts.tryGetExtensionFromPath(candidate);
- if (tsExtension !== undefined) {
+ // A path mapping may have an extension, in contrast to an import, which should omit it.
+ var extension = ts.tryGetExtensionFromPath(candidate);
+ if (extension !== undefined) {
var path_1 = tryFile(candidate, failedLookupLocations, /*onlyRecordFailures*/ false, state);
- return path_1 && { path: path_1, extension: tsExtension };
+ if (path_1 !== undefined) {
+ return { path: path_1, extension: extension };
+ }
}
return loader(extensions, candidate, failedLookupLocations, !directoryProbablyExists(ts.getDirectoryPath(candidate), state.host), state);
});
@@ -25026,13 +26318,24 @@ var ts;
}
}
function nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache) {
- return nodeModuleNameResolverWorker(moduleName, containingFile, compilerOptions, host, cache, /*jsOnly*/ false);
+ return nodeModuleNameResolverWorker(moduleName, ts.getDirectoryPath(containingFile), compilerOptions, host, cache, /*jsOnly*/ false);
}
ts.nodeModuleNameResolver = nodeModuleNameResolver;
+ /**
+ * Expose resolution logic to allow us to use Node module resolution logic from arbitrary locations.
+ * No way to do this with `require()`: https://github.com/nodejs/node/issues/5963
+ * Throws an error if the module can't be resolved.
+ */
/* @internal */
- function nodeModuleNameResolverWorker(moduleName, containingFile, compilerOptions, host, cache, jsOnly) {
- if (jsOnly === void 0) { jsOnly = false; }
- var containingDirectory = ts.getDirectoryPath(containingFile);
+ function resolveJavaScriptModule(moduleName, initialDir, host) {
+ var _a = nodeModuleNameResolverWorker(moduleName, initialDir, { moduleResolution: ts.ModuleResolutionKind.NodeJs, allowJs: true }, host, /*cache*/ undefined, /*jsOnly*/ true), resolvedModule = _a.resolvedModule, failedLookupLocations = _a.failedLookupLocations;
+ if (!resolvedModule) {
+ throw new Error("Could not resolve JS module " + moduleName + " starting at " + initialDir + ". Looked in: " + failedLookupLocations.join(", "));
+ }
+ return resolvedModule.resolvedFileName;
+ }
+ ts.resolveJavaScriptModule = resolveJavaScriptModule;
+ function nodeModuleNameResolverWorker(moduleName, containingDirectory, compilerOptions, host, cache, jsOnly) {
var traceEnabled = isTraceEnabled(compilerOptions, host);
var failedLookupLocations = [];
var state = { compilerOptions: compilerOptions, host: host, traceEnabled: traceEnabled };
@@ -25063,7 +26366,6 @@ var ts;
}
}
}
- ts.nodeModuleNameResolverWorker = nodeModuleNameResolverWorker;
function realpath(path, host, traceEnabled) {
if (!host.realpath) {
return path;
@@ -25283,10 +26585,12 @@ var ts;
return loadModuleFromNodeModulesFolder(Extensions.DtsOnly, mangleScopedPackage(moduleName, state), nodeModulesAtTypes_1, nodeModulesAtTypesExists, failedLookupLocations, state);
}
}
+ /** Double underscores are used in DefinitelyTyped to delimit scoped packages. */
+ var mangledScopedPackageSeparator = "__";
/** 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, "__");
+ var replaceSlash = moduleName.replace(ts.directorySeparator, mangledScopedPackageSeparator);
if (replaceSlash !== moduleName) {
var mangled = replaceSlash.slice(1); // Take off the "@"
if (state.traceEnabled) {
@@ -25297,6 +26601,17 @@ var ts;
}
return moduleName;
}
+ /* @internal */
+ function getPackageNameFromAtTypesDirectory(mangledName) {
+ var withoutAtTypePrefix = ts.removePrefix(mangledName, "@types/");
+ if (withoutAtTypePrefix !== mangledName) {
+ return withoutAtTypePrefix.indexOf("__") !== -1 ?
+ "@" + withoutAtTypePrefix.replace(mangledScopedPackageSeparator, ts.directorySeparator) :
+ withoutAtTypePrefix;
+ }
+ return mangledName;
+ }
+ ts.getPackageNameFromAtTypesDirectory = getPackageNameFromAtTypesDirectory;
function tryFindNonRelativeModuleNameInCache(cache, moduleName, containingDirectory, traceEnabled, host) {
var result = cache && cache.get(containingDirectory);
if (result) {
@@ -25426,6 +26741,7 @@ var ts;
var Signature = ts.objectAllocator.getSignatureConstructor();
var typeCount = 0;
var symbolCount = 0;
+ var enumCount = 0;
var symbolInstantiationDepth = 0;
var emptyArray = [];
var emptySymbols = ts.createMap();
@@ -25577,13 +26893,21 @@ var ts;
// since we are only interested in declarations of the module itself
return tryFindAmbientModule(moduleName, /*withAugmentations*/ false);
},
- getApparentType: getApparentType
+ getApparentType: getApparentType,
+ getAllPossiblePropertiesOfType: getAllPossiblePropertiesOfType,
+ getSuggestionForNonexistentProperty: getSuggestionForNonexistentProperty,
+ getSuggestionForNonexistentSymbol: getSuggestionForNonexistentSymbol,
+ getBaseConstraintOfType: getBaseConstraintOfType,
+ getJsxNamespace: getJsxNamespace,
+ resolveNameAtLocation: function (location, name, meaning) {
+ location = ts.getParseTreeNode(location);
+ return resolveName(location, name, meaning, /*nameNotFoundMessage*/ undefined, name);
+ },
};
var tupleTypes = [];
var unionTypes = ts.createMap();
var intersectionTypes = ts.createMap();
- var stringLiteralTypes = ts.createMap();
- var numericLiteralTypes = ts.createMap();
+ var literalTypes = ts.createMap();
var indexedAccessTypes = ts.createMap();
var evolvingArrayTypes = [];
var unknownSymbol = createSymbol(4 /* Property */, "unknown");
@@ -25666,11 +26990,13 @@ var ts;
var flowLoopStart = 0;
var flowLoopCount = 0;
var visitedFlowCount = 0;
- var emptyStringType = getLiteralTypeForText(32 /* StringLiteral */, "");
- var zeroType = getLiteralTypeForText(64 /* NumberLiteral */, "0");
+ var emptyStringType = getLiteralType("");
+ var zeroType = getLiteralType(0);
var resolutionTargets = [];
var resolutionResults = [];
var resolutionPropertyNames = [];
+ var suggestionCount = 0;
+ var maximumSuggestionCount = 10;
var mergedSymbols = [];
var symbolLinks = [];
var nodeLinks = [];
@@ -25936,16 +27262,16 @@ var ts;
recordMergedSymbol(target, source);
}
else if (target.flags & 1024 /* NamespaceModule */) {
- error(source.declarations[0].name, ts.Diagnostics.Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity, symbolToString(target));
+ error(ts.getNameOfDeclaration(source.declarations[0]), 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;
ts.forEach(source.declarations, function (node) {
- error(node.name ? node.name : node, message_2, symbolToString(source));
+ error(ts.getNameOfDeclaration(node) || node, message_2, symbolToString(source));
});
ts.forEach(target.declarations, function (node) {
- error(node.name ? node.name : node, message_2, symbolToString(source));
+ error(ts.getNameOfDeclaration(node) || node, message_2, symbolToString(source));
});
}
}
@@ -26027,9 +27353,6 @@ 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 === 265 /* SourceFile */ && !ts.isExternalOrCommonJsModule(node);
}
@@ -26037,7 +27360,7 @@ var ts;
if (meaning) {
var symbol = symbols.get(name);
if (symbol) {
- ts.Debug.assert((getCheckFlags(symbol) & 1 /* Instantiated */) === 0, "Should never get an instantiated symbol here.");
+ ts.Debug.assert((ts.getCheckFlags(symbol) & 1 /* Instantiated */) === 0, "Should never get an instantiated symbol here.");
if (symbol.flags & meaning) {
return symbol;
}
@@ -26073,7 +27396,9 @@ var ts;
var useFile = ts.getSourceFileOfNode(usage);
if (declarationFile !== useFile) {
if ((modulekind && (declarationFile.externalModuleIndicator || useFile.externalModuleIndicator)) ||
- (!compilerOptions.outFile && !compilerOptions.out)) {
+ (!compilerOptions.outFile && !compilerOptions.out) ||
+ isInTypeQuery(usage) ||
+ ts.isInAmbientContext(declaration)) {
// nodes are in different files and order cannot be determined
return true;
}
@@ -26129,15 +27454,8 @@ var ts;
}
break;
}
- switch (declaration.parent.parent.kind) {
- case 215 /* ForInStatement */:
- case 216 /* ForOfStatement */:
- // ForIn/ForOf case - use site should not be used in expression part
- if (isSameScopeDescendentOf(usage, declaration.parent.parent.expression, container)) {
- return true;
- }
- }
- return false;
+ // ForIn/ForOf case - use site should not be used in expression part
+ return ts.isForInOrOfStatement(declaration.parent.parent) && isSameScopeDescendentOf(usage, declaration.parent.parent.expression, container);
}
function isUsedInFunctionOrInstanceProperty(usage, declaration, container) {
return !!ts.findAncestor(usage, function (current) {
@@ -26169,7 +27487,11 @@ var ts;
// Resolve a given name for a given meaning at a given location. An error is reported if the name was not found and
// the nameNotFoundMessage argument is not undefined. Returns the resolved symbol, or undefined if no symbol with
// the given name can be found.
- function resolveName(location, name, meaning, nameNotFoundMessage, nameArg) {
+ function resolveName(location, name, meaning, nameNotFoundMessage, nameArg, suggestedNameNotFoundMessage) {
+ return resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, getSymbol, suggestedNameNotFoundMessage);
+ }
+ function resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, lookup, suggestedNameNotFoundMessage) {
+ var originalLocation = location; // needed for did-you-mean error reporting, which gathers candidates starting from the original location
var result;
var lastLocation;
var propertyWithInvalidInitializer;
@@ -26179,7 +27501,7 @@ var ts;
loop: while (location) {
// Locals of a source file are not in scope (because they get merged into the global symbol table)
if (location.locals && !isGlobalSourceFile(location)) {
- if (result = getSymbol(location.locals, name, meaning)) {
+ if (result = lookup(location.locals, name, meaning)) {
var useResult = true;
if (ts.isFunctionLike(location) && lastLocation && lastLocation !== location.body) {
// symbol lookup restrictions for function-like declarations
@@ -26250,12 +27572,12 @@ var ts;
break;
}
}
- if (result = getSymbol(moduleExports, name, meaning & 8914931 /* ModuleMember */)) {
+ if (result = lookup(moduleExports, name, meaning & 8914931 /* ModuleMember */)) {
break loop;
}
break;
case 232 /* EnumDeclaration */:
- if (result = getSymbol(getSymbolOfNode(location).exports, name, meaning & 8 /* EnumMember */)) {
+ if (result = lookup(getSymbolOfNode(location).exports, name, meaning & 8 /* EnumMember */)) {
break loop;
}
break;
@@ -26270,7 +27592,7 @@ var ts;
if (ts.isClassLike(location.parent) && !(ts.getModifierFlags(location) & 32 /* Static */)) {
var ctor = findConstructorDeclaration(location.parent);
if (ctor && ctor.locals) {
- if (getSymbol(ctor.locals, name, meaning & 107455 /* Value */)) {
+ if (lookup(ctor.locals, name, meaning & 107455 /* Value */)) {
// Remember the property node, it will be used later to report appropriate error
propertyWithInvalidInitializer = location;
}
@@ -26280,7 +27602,7 @@ var ts;
case 229 /* ClassDeclaration */:
case 199 /* ClassExpression */:
case 230 /* InterfaceDeclaration */:
- if (result = getSymbol(getSymbolOfNode(location).members, name, meaning & 793064 /* Type */)) {
+ if (result = lookup(getSymbolOfNode(location).members, name, meaning & 793064 /* Type */)) {
if (!isTypeParameterSymbolDeclaredInContainer(result, location)) {
// ignore type parameters not declared in this container
result = undefined;
@@ -26315,7 +27637,7 @@ var ts;
grandparent = location.parent.parent;
if (ts.isClassLike(grandparent) || grandparent.kind === 230 /* InterfaceDeclaration */) {
// A reference to this grandparent's type parameters would be an error
- if (result = getSymbol(getSymbolOfNode(grandparent).members, name, meaning & 793064 /* Type */)) {
+ if (result = lookup(getSymbolOfNode(grandparent).members, name, meaning & 793064 /* Type */)) {
error(errorLocation, ts.Diagnostics.A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type);
return undefined;
}
@@ -26376,7 +27698,7 @@ var ts;
result.isReferenced = true;
}
if (!result) {
- result = getSymbol(globals, name, meaning);
+ result = lookup(globals, name, meaning);
}
if (!result) {
if (nameNotFoundMessage) {
@@ -26386,7 +27708,17 @@ var ts;
!checkAndReportErrorForUsingTypeAsNamespace(errorLocation, name, meaning) &&
!checkAndReportErrorForUsingTypeAsValue(errorLocation, name, meaning) &&
!checkAndReportErrorForUsingNamespaceModuleAsValue(errorLocation, name, meaning)) {
- error(errorLocation, nameNotFoundMessage, typeof nameArg === "string" ? nameArg : ts.declarationNameToString(nameArg));
+ var suggestion = void 0;
+ if (suggestedNameNotFoundMessage && suggestionCount < maximumSuggestionCount) {
+ suggestion = getSuggestionForNonexistentSymbol(originalLocation, name, meaning);
+ if (suggestion) {
+ error(errorLocation, suggestedNameNotFoundMessage, typeof nameArg === "string" ? nameArg : ts.declarationNameToString(nameArg), suggestion);
+ }
+ }
+ if (!suggestion) {
+ error(errorLocation, nameNotFoundMessage, typeof nameArg === "string" ? nameArg : ts.declarationNameToString(nameArg));
+ }
+ suggestionCount++;
}
}
return undefined;
@@ -26400,7 +27732,7 @@ 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;
}
- // Only check for block-scoped variable if we are looking for the
+ // Only check for block-scoped variable if we have an error location and are looking for the
// name with variable meaning
// For example,
// declare module foo {
@@ -26411,8 +27743,9 @@ var ts;
// 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 */ ||
- ((meaning & 32 /* Class */ || meaning & 384 /* Enum */) && (meaning & 107455 /* Value */) === 107455 /* Value */)) {
+ if (errorLocation &&
+ (meaning & 2 /* BlockScopedVariable */ ||
+ ((meaning & 32 /* Class */ || meaning & 384 /* Enum */) && (meaning & 107455 /* Value */) === 107455 /* Value */))) {
var exportOrLocalSymbol = getExportSymbolOfValueSymbolIfExported(result);
if (exportOrLocalSymbol.flags & 2 /* BlockScopedVariable */ || exportOrLocalSymbol.flags & 32 /* Class */ || exportOrLocalSymbol.flags & 384 /* Enum */) {
checkResolvedBlockScopedVariable(exportOrLocalSymbol, errorLocation);
@@ -26505,6 +27838,10 @@ var ts;
}
function checkAndReportErrorForUsingTypeAsValue(errorLocation, name, meaning) {
if (meaning & (107455 /* Value */ & ~1024 /* NamespaceModule */)) {
+ if (name === "any" || name === "string" || name === "number" || name === "boolean" || name === "never") {
+ error(errorLocation, ts.Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here, name);
+ return true;
+ }
var symbol = resolveSymbol(resolveName(errorLocation, name, 793064 /* Type */ & ~107455 /* Value */, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined));
if (symbol && !(symbol.flags & 1024 /* NamespaceModule */)) {
error(errorLocation, ts.Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here, name);
@@ -26537,13 +27874,13 @@ var ts;
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));
+ error(errorLocation, ts.Diagnostics.Block_scoped_variable_0_used_before_its_declaration, ts.declarationNameToString(ts.getNameOfDeclaration(declaration)));
}
else if (result.flags & 32 /* Class */) {
- error(errorLocation, ts.Diagnostics.Class_0_used_before_its_declaration, ts.declarationNameToString(declaration.name));
+ error(errorLocation, ts.Diagnostics.Class_0_used_before_its_declaration, ts.declarationNameToString(ts.getNameOfDeclaration(declaration)));
}
- else if (result.flags & 384 /* Enum */) {
- error(errorLocation, ts.Diagnostics.Enum_0_used_before_its_declaration, ts.declarationNameToString(declaration.name));
+ else if (result.flags & 256 /* RegularEnum */) {
+ error(errorLocation, ts.Diagnostics.Enum_0_used_before_its_declaration, ts.declarationNameToString(ts.getNameOfDeclaration(declaration)));
}
}
}
@@ -26559,7 +27896,7 @@ var ts;
if (node.kind === 237 /* ImportEqualsDeclaration */) {
return node;
}
- return ts.findAncestor(node, function (n) { return n.kind === 238 /* ImportDeclaration */; });
+ return ts.findAncestor(node, ts.isImportDeclaration);
}
}
function getDeclarationOfAliasSymbol(symbol) {
@@ -26616,6 +27953,9 @@ var ts;
// An 'import { Point } from "graphics"' needs to create a symbol that combines the value side 'Point'
// property with the type/namespace side interface 'Point'.
function combineValueAndTypeSymbols(valueSymbol, typeSymbol) {
+ if (valueSymbol === unknownSymbol && typeSymbol === unknownSymbol) {
+ return unknownSymbol;
+ }
if (valueSymbol.flags & (793064 /* Type */ | 1920 /* Namespace */)) {
return valueSymbol;
}
@@ -26683,10 +28023,10 @@ var ts;
function getTargetOfNamespaceExportDeclaration(node, dontResolveAlias) {
return resolveExternalModuleSymbol(node.parent.symbol, dontResolveAlias);
}
- function getTargetOfExportSpecifier(node, dontResolveAlias) {
+ function getTargetOfExportSpecifier(node, meaning, dontResolveAlias) {
return node.parent.parent.moduleSpecifier ?
getExternalModuleMember(node.parent.parent, node, dontResolveAlias) :
- resolveEntityName(node.propertyName || node.name, 107455 /* Value */ | 793064 /* Type */ | 1920 /* Namespace */, /*ignoreErrors*/ false, dontResolveAlias);
+ resolveEntityName(node.propertyName || node.name, meaning, /*ignoreErrors*/ false, dontResolveAlias);
}
function getTargetOfExportAssignment(node, dontResolveAlias) {
return resolveEntityName(node.expression, 107455 /* Value */ | 793064 /* Type */ | 1920 /* Namespace */, /*ignoreErrors*/ false, dontResolveAlias);
@@ -26702,15 +28042,22 @@ var ts;
case 242 /* ImportSpecifier */:
return getTargetOfImportSpecifier(node, dontRecursivelyResolve);
case 246 /* ExportSpecifier */:
- return getTargetOfExportSpecifier(node, dontRecursivelyResolve);
+ return getTargetOfExportSpecifier(node, 107455 /* Value */ | 793064 /* Type */ | 1920 /* Namespace */, dontRecursivelyResolve);
case 243 /* ExportAssignment */:
return getTargetOfExportAssignment(node, dontRecursivelyResolve);
case 236 /* NamespaceExportDeclaration */:
return getTargetOfNamespaceExportDeclaration(node, dontRecursivelyResolve);
}
}
+ /**
+ * Indicates that a symbol is an alias that does not merge with a local declaration.
+ */
+ function isNonLocalAlias(symbol, excludes) {
+ if (excludes === void 0) { excludes = 107455 /* Value */ | 793064 /* Type */ | 1920 /* Namespace */; }
+ return symbol && (symbol.flags & (8388608 /* Alias */ | excludes)) === 8388608 /* Alias */;
+ }
function resolveSymbol(symbol, dontResolveAlias) {
- var shouldResolve = !dontResolveAlias && symbol && symbol.flags & 8388608 /* Alias */ && !(symbol.flags & (107455 /* Value */ | 793064 /* Type */ | 1920 /* Namespace */));
+ var shouldResolve = !dontResolveAlias && isNonLocalAlias(symbol);
return shouldResolve ? resolveAlias(symbol) : symbol;
}
function resolveAlias(symbol) {
@@ -26851,7 +28198,7 @@ var ts;
else {
ts.Debug.fail("Unknown entity name kind.");
}
- ts.Debug.assert((getCheckFlags(symbol) & 1 /* Instantiated */) === 0, "Should never get an instantiated symbol here.");
+ ts.Debug.assert((ts.getCheckFlags(symbol) & 1 /* Instantiated */) === 0, "Should never get an instantiated symbol here.");
return (symbol.flags & meaning) || dontResolveAlias ? symbol : resolveAlias(symbol);
}
function resolveExternalModuleName(location, moduleReferenceExpression) {
@@ -26873,6 +28220,11 @@ var ts;
if (moduleName === undefined) {
return;
}
+ if (ts.startsWith(moduleReference, "@types/")) {
+ var diag = ts.Diagnostics.Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1;
+ var withoutAtTypePrefix = ts.removePrefix(moduleReference, "@types/");
+ error(errorNode, diag, withoutAtTypePrefix, moduleReference);
+ }
var ambientModule = tryFindAmbientModule(moduleName, /*withAugmentations*/ true);
if (ambientModule) {
return ambientModule;
@@ -26905,7 +28257,9 @@ var ts;
error(errorNode, diag, moduleReference, resolvedModule.resolvedFileName);
}
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);
+ var errorInfo = ts.chainDiagnosticMessages(/*details*/ undefined, ts.Diagnostics.Try_npm_install_types_Slash_0_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0, moduleReference);
+ errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type, moduleReference, resolvedModule.resolvedFileName);
+ diagnostics.add(ts.createDiagnosticForNodeFromMessageChain(errorNode, errorInfo));
}
// Failed imports and untyped modules are both treated in an untyped manner; only difference is whether we give a diagnostic first.
return undefined;
@@ -26940,7 +28294,6 @@ var ts;
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;
}
@@ -27059,8 +28412,8 @@ var ts;
}
function findConstructorDeclaration(node) {
var members = node.members;
- for (var _i = 0, members_1 = members; _i < members_1.length; _i++) {
- var member = members_1[_i];
+ for (var _i = 0, members_2 = members; _i < members_2.length; _i++) {
+ var member = members_2[_i];
if (member.kind === 152 /* Constructor */ && ts.nodeIsPresent(member.body)) {
return member;
}
@@ -27090,7 +28443,7 @@ var ts;
return type;
}
function createTypeofType() {
- return getUnionType(ts.convertToArray(typeofEQFacts.keys(), function (s) { return getLiteralTypeForText(32 /* StringLiteral */, s); }));
+ return getUnionType(ts.convertToArray(typeofEQFacts.keys(), getLiteralType));
}
// 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
@@ -27201,7 +28554,7 @@ var ts;
// Is this external alias, then use it to name
ts.forEach(symbolFromSymbolTable.declarations, ts.isExternalModuleImportEqualsDeclaration)) {
var resolvedImportedSymbol = resolveAlias(symbolFromSymbolTable);
- if (isAccessible(symbolFromSymbolTable, resolveAlias(symbolFromSymbolTable))) {
+ if (isAccessible(symbolFromSymbolTable, resolvedImportedSymbol)) {
return [symbolFromSymbolTable];
}
// Look in the exported members, if we can find accessibleSymbolChain, symbol is accessible using this chain
@@ -27420,34 +28773,59 @@ var ts;
return result;
}
function typeToString(type, enclosingDeclaration, flags) {
- var writer = ts.getSingleLineStringWriter();
- getSymbolDisplayBuilder().buildTypeDisplay(type, writer, enclosingDeclaration, flags);
- var result = writer.string();
- ts.releaseStringWriter(writer);
- var maxLength = compilerOptions.noErrorTruncation || flags & 4 /* NoTruncation */ ? undefined : 100;
+ var typeNode = nodeBuilder.typeToTypeNode(type, enclosingDeclaration, toNodeBuilderFlags(flags) | ts.NodeBuilderFlags.IgnoreErrors | ts.NodeBuilderFlags.WriteTypeParametersInQualifiedName);
+ ts.Debug.assert(typeNode !== undefined, "should always get typenode");
+ var options = { removeComments: true };
+ var writer = ts.createTextWriter("");
+ var printer = ts.createPrinter(options);
+ var sourceFile = enclosingDeclaration && ts.getSourceFileOfNode(enclosingDeclaration);
+ printer.writeNode(3 /* Unspecified */, typeNode, /*sourceFile*/ sourceFile, writer);
+ var result = writer.getText();
+ var maxLength = compilerOptions.noErrorTruncation || flags & 8 /* NoTruncation */ ? undefined : 100;
if (maxLength && result.length >= maxLength) {
- result = result.substr(0, maxLength - "...".length) + "...";
+ return result.substr(0, maxLength - "...".length) + "...";
}
return result;
+ function toNodeBuilderFlags(flags) {
+ var result = ts.NodeBuilderFlags.None;
+ if (!flags) {
+ return result;
+ }
+ if (flags & 8 /* NoTruncation */) {
+ result |= ts.NodeBuilderFlags.NoTruncation;
+ }
+ if (flags & 256 /* UseFullyQualifiedType */) {
+ result |= ts.NodeBuilderFlags.UseFullyQualifiedType;
+ }
+ if (flags & 4096 /* SuppressAnyReturnType */) {
+ result |= ts.NodeBuilderFlags.SuppressAnyReturnType;
+ }
+ if (flags & 1 /* WriteArrayAsGenericType */) {
+ result |= ts.NodeBuilderFlags.WriteArrayAsGenericType;
+ }
+ if (flags & 64 /* WriteTypeArgumentsOfSignature */) {
+ result |= ts.NodeBuilderFlags.WriteTypeArgumentsOfSignature;
+ }
+ return result;
+ }
}
function createNodeBuilder() {
- var context;
return {
typeToTypeNode: function (type, enclosingDeclaration, flags) {
- context = createNodeBuilderContext(enclosingDeclaration, flags);
- var resultingNode = typeToTypeNodeHelper(type);
+ var context = createNodeBuilderContext(enclosingDeclaration, flags);
+ var resultingNode = typeToTypeNodeHelper(type, context);
var result = context.encounteredError ? undefined : resultingNode;
return result;
},
indexInfoToIndexSignatureDeclaration: function (indexInfo, kind, enclosingDeclaration, flags) {
- context = createNodeBuilderContext(enclosingDeclaration, flags);
- var resultingNode = indexInfoToIndexSignatureDeclarationHelper(indexInfo, kind);
+ var context = createNodeBuilderContext(enclosingDeclaration, flags);
+ var resultingNode = indexInfoToIndexSignatureDeclarationHelper(indexInfo, kind, context);
var result = context.encounteredError ? undefined : resultingNode;
return result;
},
signatureToSignatureDeclaration: function (signature, kind, enclosingDeclaration, flags) {
- context = createNodeBuilderContext(enclosingDeclaration, flags);
- var resultingNode = signatureToSignatureDeclarationHelper(signature, kind);
+ var context = createNodeBuilderContext(enclosingDeclaration, flags);
+ var resultingNode = signatureToSignatureDeclarationHelper(signature, kind, context);
var result = context.encounteredError ? undefined : resultingNode;
return result;
}
@@ -27457,15 +28835,14 @@ var ts;
enclosingDeclaration: enclosingDeclaration,
flags: flags,
encounteredError: false,
- inObjectTypeLiteral: false,
- checkAlias: true,
symbolStack: undefined
};
}
- function typeToTypeNodeHelper(type) {
+ function typeToTypeNodeHelper(type, context) {
+ var inTypeAlias = context.flags & ts.NodeBuilderFlags.InTypeAlias;
+ context.flags &= ~ts.NodeBuilderFlags.InTypeAlias;
if (!type) {
context.encounteredError = true;
- // TODO(aozgaa): should we return implict any (undefined) or explicit any (keywordtypenode)?
return undefined;
}
if (type.flags & 1 /* Any */) {
@@ -27480,23 +28857,25 @@ var ts;
if (type.flags & 8 /* Boolean */) {
return ts.createKeywordTypeNode(122 /* BooleanKeyword */);
}
- if (type.flags & 16 /* Enum */) {
- var name = symbolToName(type.symbol, /*expectsIdentifier*/ false);
+ if (type.flags & 256 /* EnumLiteral */ && !(type.flags & 65536 /* Union */)) {
+ var parentSymbol = getParentOfSymbol(type.symbol);
+ var parentName = symbolToName(parentSymbol, context, 793064 /* Type */, /*expectsIdentifier*/ false);
+ var enumLiteralName = getDeclaredTypeOfSymbol(parentSymbol) === type ? parentName : ts.createQualifiedName(parentName, getNameOfSymbol(type.symbol, context));
+ return ts.createTypeReferenceNode(enumLiteralName, /*typeArguments*/ undefined);
+ }
+ if (type.flags & 272 /* EnumLike */) {
+ var name = symbolToName(type.symbol, context, 793064 /* Type */, /*expectsIdentifier*/ false);
return ts.createTypeReferenceNode(name, /*typeArguments*/ undefined);
}
if (type.flags & (32 /* StringLiteral */)) {
- return ts.createLiteralTypeNode((ts.createLiteral(type.text)));
+ return ts.createLiteralTypeNode(ts.setEmitFlags(ts.createLiteral(type.value), 16777216 /* NoAsciiEscaping */));
}
if (type.flags & (64 /* NumberLiteral */)) {
- return ts.createLiteralTypeNode((ts.createNumericLiteral(type.text)));
+ return ts.createLiteralTypeNode((ts.createLiteral(type.value)));
}
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(105 /* VoidKeyword */);
}
@@ -27516,8 +28895,8 @@ var ts;
return ts.createKeywordTypeNode(134 /* ObjectKeyword */);
}
if (type.flags & 16384 /* TypeParameter */ && type.isThisType) {
- if (context.inObjectTypeLiteral) {
- if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.allowThisInObjectLiteral)) {
+ if (context.flags & ts.NodeBuilderFlags.InObjectTypeLiteral) {
+ if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.AllowThisInObjectLiteral)) {
context.encounteredError = true;
}
}
@@ -27528,39 +28907,31 @@ var ts;
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);
+ if (type.flags & 16384 /* TypeParameter */ || objectFlags & 3 /* ClassOrInterface */) {
+ var name = symbolToName(type.symbol, context, 793064 /* Type */, /*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);
+ if (!inTypeAlias && type.aliasSymbol &&
+ isSymbolAccessible(type.aliasSymbol, context.enclosingDeclaration, 793064 /* Type */, /*shouldComputeAliasesToMakeVisible*/ false).accessibility === 0 /* Accessible */) {
+ var name = symbolToTypeReferenceName(type.aliasSymbol);
+ var typeArgumentNodes = mapToTypeNodes(type.aliasTypeArguments, context);
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(166 /* UnionType */, unionTypeNodes);
+ if (type.flags & (65536 /* Union */ | 131072 /* Intersection */)) {
+ var types = type.flags & 65536 /* Union */ ? formatUnionTypes(type.types) : type.types;
+ var typeNodes = mapToTypeNodes(types, context);
+ if (typeNodes && typeNodes.length > 0) {
+ var unionOrIntersectionTypeNode = ts.createUnionOrIntersectionTypeNode(type.flags & 65536 /* Union */ ? 166 /* UnionType */ : 167 /* IntersectionType */, typeNodes);
+ return unionOrIntersectionTypeNode;
}
else {
- if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.allowEmptyUnionOrIntersection)) {
+ if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.AllowEmptyUnionOrIntersection)) {
context.encounteredError = true;
}
return undefined;
}
}
- if (type.flags & 131072 /* Intersection */) {
- return ts.createUnionOrIntersectionTypeNode(167 /* IntersectionType */, mapToTypeNodeArray(type.types));
- }
if (objectFlags & (16 /* Anonymous */ | 32 /* Mapped */)) {
ts.Debug.assert(!!(type.flags & 32768 /* Object */));
// The type is an object literal type.
@@ -27568,35 +28939,23 @@ var ts;
}
if (type.flags & 262144 /* Index */) {
var indexedType = type.type;
- var indexTypeNode = typeToTypeNodeHelper(indexedType);
+ var indexTypeNode = typeToTypeNodeHelper(indexedType, context);
return ts.createTypeOperatorNode(indexTypeNode);
}
if (type.flags & 524288 /* IndexedAccess */) {
- var objectTypeNode = typeToTypeNodeHelper(type.objectType);
- var indexTypeNode = typeToTypeNodeHelper(type.indexType);
+ var objectTypeNode = typeToTypeNodeHelper(type.objectType, context);
+ var indexTypeNode = typeToTypeNodeHelper(type.indexType, context);
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(131 /* ReadonlyKeyword */) : undefined;
var questionToken = type.declaration && type.declaration.questionToken ? ts.createToken(55 /* QuestionToken */) : undefined;
- return ts.createMappedTypeNode(readonlyToken, typeParameterNode, questionToken, templateTypeNode);
+ var typeParameterNode = typeParameterToDeclaration(getTypeParameterFromMappedType(type), context);
+ var templateTypeNode = typeToTypeNodeHelper(getTemplateTypeFromMappedType(type), context);
+ var mappedTypeNode = ts.createMappedTypeNode(readonlyToken, typeParameterNode, questionToken, templateTypeNode);
+ return ts.setEmitFlags(mappedTypeNode, 1 /* SingleLine */);
}
function createAnonymousTypeNode(type) {
var symbol = type.symbol;
@@ -27605,14 +28964,14 @@ var ts;
if (symbol.flags & 32 /* Class */ && !getBaseTypeVariableOfClass(symbol) ||
symbol.flags & (384 /* Enum */ | 512 /* ValueModule */) ||
shouldWriteTypeOfFunctionSymbol()) {
- return createTypeQueryNodeFromSymbol(symbol);
+ return createTypeQueryNodeFromSymbol(symbol, 107455 /* Value */);
}
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);
+ var entityName = symbolToName(typeAlias, context, 793064 /* Type */, /*expectsIdentifier*/ false);
return ts.createTypeReferenceNode(entityName, /*typeArguments*/ undefined);
}
else {
@@ -27658,41 +29017,53 @@ var ts;
var resolved = resolveStructuredTypeMembers(type);
if (!resolved.properties.length && !resolved.stringIndexInfo && !resolved.numberIndexInfo) {
if (!resolved.callSignatures.length && !resolved.constructSignatures.length) {
- return ts.createTypeLiteralNode(/*members*/ undefined);
+ return ts.setEmitFlags(ts.createTypeLiteralNode(/*members*/ undefined), 1 /* SingleLine */);
}
if (resolved.callSignatures.length === 1 && !resolved.constructSignatures.length) {
var signature = resolved.callSignatures[0];
- return signatureToSignatureDeclarationHelper(signature, 160 /* FunctionType */);
+ var signatureNode = signatureToSignatureDeclarationHelper(signature, 160 /* FunctionType */, context);
+ return signatureNode;
}
if (resolved.constructSignatures.length === 1 && !resolved.callSignatures.length) {
var signature = resolved.constructSignatures[0];
- return signatureToSignatureDeclarationHelper(signature, 161 /* ConstructorType */);
+ var signatureNode = signatureToSignatureDeclarationHelper(signature, 161 /* ConstructorType */, context);
+ return signatureNode;
}
}
- var saveInObjectTypeLiteral = context.inObjectTypeLiteral;
- context.inObjectTypeLiteral = true;
+ var savedFlags = context.flags;
+ context.flags |= ts.NodeBuilderFlags.InObjectTypeLiteral;
var members = createTypeNodesFromResolvedType(resolved);
- context.inObjectTypeLiteral = saveInObjectTypeLiteral;
- return ts.createTypeLiteralNode(members);
+ context.flags = savedFlags;
+ var typeLiteralNode = ts.createTypeLiteralNode(members);
+ return ts.setEmitFlags(typeLiteralNode, 1 /* SingleLine */);
}
- function createTypeQueryNodeFromSymbol(symbol) {
- var entityName = symbolToName(symbol, /*expectsIdentifier*/ false);
+ function createTypeQueryNodeFromSymbol(symbol, symbolFlags) {
+ var entityName = symbolToName(symbol, context, symbolFlags, /*expectsIdentifier*/ false);
return ts.createTypeQueryNode(entityName);
}
+ function symbolToTypeReferenceName(symbol) {
+ // Unnamed function expressions and arrow functions have reserved names that we don't want to display
+ var entityName = symbol.flags & 32 /* Class */ || !isReservedMemberName(symbol.name) ? symbolToName(symbol, context, 793064 /* Type */, /*expectsIdentifier*/ false) : ts.createIdentifier("");
+ return entityName;
+ }
function typeReferenceToTypeNode(type) {
var typeArguments = type.typeArguments || emptyArray;
if (type.target === globalArrayType) {
- var elementType = typeToTypeNodeHelper(typeArguments[0]);
+ if (context.flags & ts.NodeBuilderFlags.WriteArrayAsGenericType) {
+ var typeArgumentNode = typeToTypeNodeHelper(typeArguments[0], context);
+ return ts.createTypeReferenceNode("Array", [typeArgumentNode]);
+ }
+ var elementType = typeToTypeNodeHelper(typeArguments[0], context);
return ts.createArrayTypeNode(elementType);
}
else if (type.target.objectFlags & 8 /* Tuple */) {
if (typeArguments.length > 0) {
- var tupleConstituentNodes = mapToTypeNodeArray(typeArguments.slice(0, getTypeReferenceArity(type)));
+ var tupleConstituentNodes = mapToTypeNodes(typeArguments.slice(0, getTypeReferenceArity(type)), context);
if (tupleConstituentNodes && tupleConstituentNodes.length > 0) {
return ts.createTupleTypeNode(tupleConstituentNodes);
}
}
- if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.allowEmptyTuple)) {
+ if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.AllowEmptyTuple)) {
context.encounteredError = true;
}
return undefined;
@@ -27700,7 +29071,7 @@ var ts;
else {
var outerTypeParameters = type.target.outerTypeParameters;
var i = 0;
- var qualifiedName = undefined;
+ var qualifiedName = void 0;
if (outerTypeParameters) {
var length_1 = outerTypeParameters.length;
while (i < length_1) {
@@ -27713,48 +29084,72 @@ var ts;
// 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 {
+ var typeArgumentSlice = mapToTypeNodes(typeArguments.slice(start, i), context);
+ var typeArgumentNodes_1 = typeArgumentSlice && ts.createNodeArray(typeArgumentSlice);
+ var namePart = symbolToTypeReferenceName(parent);
+ (namePart.kind === 71 /* Identifier */ ? namePart : namePart.right).typeArguments = typeArgumentNodes_1;
+ if (qualifiedName) {
ts.Debug.assert(!qualifiedName.right);
- qualifiedName.right = qualifiedNamePart;
+ qualifiedName = addToQualifiedNameMissingRightIdentifier(qualifiedName, namePart);
qualifiedName = ts.createQualifiedName(qualifiedName, /*right*/ undefined);
}
+ else {
+ qualifiedName = ts.createQualifiedName(namePart, /*right*/ undefined);
+ }
}
}
}
var entityName = undefined;
- var nameIdentifier = symbolToName(type.symbol, /*expectsIdentifier*/ true);
+ var nameIdentifier = symbolToTypeReferenceName(type.symbol);
if (qualifiedName) {
ts.Debug.assert(!qualifiedName.right);
- qualifiedName.right = nameIdentifier;
+ qualifiedName = addToQualifiedNameMissingRightIdentifier(qualifiedName, 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;
+ var typeArgumentNodes = void 0;
+ if (typeArguments.length > 0) {
+ var typeParameterCount = (type.target.typeParameters || emptyArray).length;
+ typeArgumentNodes = mapToTypeNodes(typeArguments.slice(i, typeParameterCount), context);
+ }
+ if (typeArgumentNodes) {
+ var lastIdentifier = entityName.kind === 71 /* Identifier */ ? entityName : entityName.right;
+ lastIdentifier.typeArguments = undefined;
+ }
return ts.createTypeReferenceNode(entityName, typeArgumentNodes);
}
}
+ function addToQualifiedNameMissingRightIdentifier(left, right) {
+ ts.Debug.assert(left.right === undefined);
+ if (right.kind === 71 /* Identifier */) {
+ left.right = right;
+ return left;
+ }
+ var rightPart = right;
+ while (rightPart.left.kind !== 71 /* Identifier */) {
+ rightPart = rightPart.left;
+ }
+ left.right = rightPart.left;
+ rightPart.left = left;
+ return right;
+ }
function createTypeNodesFromResolvedType(resolvedType) {
var typeElements = [];
for (var _i = 0, _a = resolvedType.callSignatures; _i < _a.length; _i++) {
var signature = _a[_i];
- typeElements.push(signatureToSignatureDeclarationHelper(signature, 155 /* CallSignature */));
+ typeElements.push(signatureToSignatureDeclarationHelper(signature, 155 /* CallSignature */, context));
}
for (var _b = 0, _c = resolvedType.constructSignatures; _b < _c.length; _b++) {
var signature = _c[_b];
- typeElements.push(signatureToSignatureDeclarationHelper(signature, 156 /* ConstructSignature */));
+ typeElements.push(signatureToSignatureDeclarationHelper(signature, 156 /* ConstructSignature */, context));
}
if (resolvedType.stringIndexInfo) {
- typeElements.push(indexInfoToIndexSignatureDeclarationHelper(resolvedType.stringIndexInfo, 0 /* String */));
+ typeElements.push(indexInfoToIndexSignatureDeclarationHelper(resolvedType.stringIndexInfo, 0 /* String */, context));
}
if (resolvedType.numberIndexInfo) {
- typeElements.push(indexInfoToIndexSignatureDeclarationHelper(resolvedType.numberIndexInfo, 1 /* Number */));
+ typeElements.push(indexInfoToIndexSignatureDeclarationHelper(resolvedType.numberIndexInfo, 1 /* Number */, context));
}
var properties = resolvedType.properties;
if (!properties) {
@@ -27763,86 +29158,141 @@ var ts;
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 saveEnclosingDeclaration = context.enclosingDeclaration;
+ context.enclosingDeclaration = undefined;
+ var propertyName = symbolToName(propertySymbol, context, 107455 /* Value */, /*expectsIdentifier*/ true);
+ context.enclosingDeclaration = saveEnclosingDeclaration;
var optionalToken = propertySymbol.flags & 67108864 /* Optional */ ? ts.createToken(55 /* 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, 150 /* MethodSignature */);
+ var methodDeclaration = signatureToSignatureDeclarationHelper(signature, 150 /* MethodSignature */, context);
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(119 /* AnyKeyword */);
- typeElements.push(ts.createPropertySignature(propertyName, optionalToken, propertyTypeNode,
- /*initializer*/ undefined));
+ var propertyTypeNode = propertyType ? typeToTypeNodeHelper(propertyType, context) : ts.createKeywordTypeNode(119 /* AnyKeyword */);
+ var modifiers = isReadonlySymbol(propertySymbol) ? [ts.createToken(131 /* ReadonlyKeyword */)] : undefined;
+ var propertySignature = ts.createPropertySignature(modifiers, propertyName, optionalToken, propertyTypeNode,
+ /*initializer*/ undefined);
+ typeElements.push(propertySignature);
}
}
return typeElements.length ? typeElements : undefined;
}
}
- function indexInfoToIndexSignatureDeclarationHelper(indexInfo, kind) {
+ function mapToTypeNodes(types, context) {
+ if (ts.some(types)) {
+ var result = [];
+ for (var i = 0; i < types.length; ++i) {
+ var type = types[i];
+ var typeNode = typeToTypeNodeHelper(type, context);
+ if (typeNode) {
+ result.push(typeNode);
+ }
+ }
+ return result;
+ }
+ }
+ function indexInfoToIndexSignatureDeclarationHelper(indexInfo, kind, context) {
+ var name = ts.getNameFromIndexInfo(indexInfo) || "x";
var indexerTypeNode = ts.createKeywordTypeNode(kind === 0 /* String */ ? 136 /* StringKeyword */ : 133 /* 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(
+ var typeNode = typeToTypeNodeHelper(indexInfo.type, context);
+ return ts.createIndexSignature(
/*decorators*/ undefined, indexInfo.isReadonly ? [ts.createToken(131 /* 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); });
+ function signatureToSignatureDeclarationHelper(signature, kind, context) {
+ var typeParameters = signature.typeParameters && signature.typeParameters.map(function (parameter) { return typeParameterToDeclaration(parameter, context); });
+ var parameters = signature.parameters.map(function (parameter) { return symbolToParameterDeclaration(parameter, context); });
+ if (signature.thisParameter) {
+ var thisParameter = symbolToParameterDeclaration(signature.thisParameter, context);
+ parameters.unshift(thisParameter);
+ }
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);
+ var parameterName = typePredicate.kind === 1 /* Identifier */ ?
+ ts.setEmitFlags(ts.createIdentifier(typePredicate.parameterName), 16777216 /* NoAsciiEscaping */) :
+ ts.createThisTypeNode();
+ var typeNode = typeToTypeNodeHelper(typePredicate.type, context);
returnTypeNode = ts.createTypePredicateNode(parameterName, typeNode);
}
else {
var returnType = getReturnTypeOfSignature(signature);
- returnTypeNode = returnType && typeToTypeNodeHelper(returnType);
+ returnTypeNode = returnType && typeToTypeNodeHelper(returnType, context);
}
- var returnTypeNodeExceptAny = returnTypeNode && returnTypeNode.kind !== 119 /* AnyKeyword */ ? returnTypeNode : undefined;
- return ts.createSignatureDeclaration(kind, typeParameters, parameters, returnTypeNodeExceptAny);
+ if (context.flags & ts.NodeBuilderFlags.SuppressAnyReturnType) {
+ if (returnTypeNode && returnTypeNode.kind === 119 /* AnyKeyword */) {
+ returnTypeNode = undefined;
+ }
+ }
+ else if (!returnTypeNode) {
+ returnTypeNode = ts.createKeywordTypeNode(119 /* AnyKeyword */);
+ }
+ return ts.createSignatureDeclaration(kind, typeParameters, parameters, returnTypeNode);
}
- function typeParameterToDeclaration(type) {
+ function typeParameterToDeclaration(type, context) {
+ var name = symbolToName(type.symbol, context, 793064 /* Type */, /*expectsIdentifier*/ true);
var constraint = getConstraintFromTypeParameter(type);
- var constraintNode = constraint && typeToTypeNodeHelper(constraint);
+ var constraintNode = constraint && typeToTypeNodeHelper(constraint, context);
var defaultParameter = getDefaultFromTypeParameter(type);
- var defaultParameterNode = defaultParameter && typeToTypeNodeHelper(defaultParameter);
- var name = symbolToName(type.symbol, /*expectsIdentifier*/ true);
+ var defaultParameterNode = defaultParameter && typeToTypeNodeHelper(defaultParameter, context);
return ts.createTypeParameterDeclaration(name, constraintNode, defaultParameterNode);
}
- function symbolToParameterDeclaration(parameterSymbol) {
+ function symbolToParameterDeclaration(parameterSymbol, context) {
var parameterDeclaration = ts.getDeclarationOfKind(parameterSymbol, 146 /* Parameter */);
+ if (isTransientSymbol(parameterSymbol) && parameterSymbol.isRestParameter) {
+ // special-case synthetic rest parameters in JS files
+ return ts.createParameter(
+ /*decorators*/ undefined,
+ /*modifiers*/ undefined, parameterSymbol.isRestParameter ? ts.createToken(24 /* DotDotDotToken */) : undefined, "args",
+ /*questionToken*/ undefined, typeToTypeNodeHelper(anyArrayType, context),
+ /*initializer*/ undefined);
+ }
+ var modifiers = parameterDeclaration.modifiers && parameterDeclaration.modifiers.map(ts.getSynthesizedClone);
+ var dotDotDotToken = ts.isRestParameter(parameterDeclaration) ? ts.createToken(24 /* DotDotDotToken */) : undefined;
+ var name = parameterDeclaration.name ?
+ parameterDeclaration.name.kind === 71 /* Identifier */ ?
+ ts.setEmitFlags(ts.getSynthesizedClone(parameterDeclaration.name), 16777216 /* NoAsciiEscaping */) :
+ cloneBindingName(parameterDeclaration.name) :
+ parameterSymbol.name;
+ var questionToken = isOptionalParameter(parameterDeclaration) ? ts.createToken(55 /* QuestionToken */) : undefined;
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(24 /* DotDotDotToken */),
- // Clone name to remove trivia.
- ts.getSynthesizedClone(parameterDeclaration.name), parameterDeclaration.questionToken && ts.createToken(55 /* QuestionToken */), parameterTypeNode, parameterDeclaration.initializer);
+ if (isRequiredInitializedParameter(parameterDeclaration)) {
+ parameterType = getNullableType(parameterType, 2048 /* Undefined */);
+ }
+ var parameterTypeNode = typeToTypeNodeHelper(parameterType, context);
+ var parameterNode = ts.createParameter(
+ /*decorators*/ undefined, modifiers, dotDotDotToken, name, questionToken, parameterTypeNode,
+ /*initializer*/ undefined);
return parameterNode;
+ function cloneBindingName(node) {
+ return elideInitializerAndSetEmitFlags(node);
+ function elideInitializerAndSetEmitFlags(node) {
+ var visited = ts.visitEachChild(node, elideInitializerAndSetEmitFlags, ts.nullTransformationContext, /*nodesVisitor*/ undefined, elideInitializerAndSetEmitFlags);
+ var clone = ts.nodeIsSynthesized(visited) ? visited : ts.getSynthesizedClone(visited);
+ if (clone.kind === 176 /* BindingElement */) {
+ clone.initializer = undefined;
+ }
+ return ts.setEmitFlags(clone, 1 /* SingleLine */ | 16777216 /* NoAsciiEscaping */);
+ }
+ }
}
- function symbolToName(symbol, expectsIdentifier) {
+ function symbolToName(symbol, context, meaning, 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);
+ if (!isTypeParameter && (context.enclosingDeclaration || context.flags & ts.NodeBuilderFlags.UseFullyQualifiedType)) {
+ chain = getSymbolChain(symbol, meaning, /*endOfChain*/ true);
ts.Debug.assert(chain && chain.length > 0);
}
else {
@@ -27850,19 +29300,18 @@ var ts;
}
if (expectsIdentifier && chain.length !== 1
&& !context.encounteredError
- && !(context.flags & ts.NodeBuilderFlags.allowQualifedNameInPlaceOfIdentifier)) {
+ && !(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 typeParameterNodes;
+ if (context.flags & ts.NodeBuilderFlags.WriteTypeParametersInQualifiedName && index > 0) {
var parentSymbol = chain[index - 1];
var typeParameters = void 0;
- if (getCheckFlags(symbol) & 1 /* Instantiated */) {
+ if (ts.getCheckFlags(symbol) & 1 /* Instantiated */) {
typeParameters = getTypeParametersOfClassOrInterface(parentSymbol);
}
else {
@@ -27871,20 +29320,10 @@ var ts;
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);
- }
+ typeParameterNodes = mapToTypeNodes(typeParameters, context);
}
- var symbolName = getNameOfSymbol(symbol);
- var symbolNameWithTypeParameters = typeParameterString.length > 0 ? symbolName + "<" + typeParameterString + ">" : symbolName;
- var identifier = ts.createIdentifier(symbolNameWithTypeParameters);
+ var symbolName = getNameOfSymbol(symbol, context);
+ var identifier = ts.setEmitFlags(ts.createIdentifier(symbolName, typeParameterNodes), 16777216 /* NoAsciiEscaping */);
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. */
@@ -27916,28 +29355,29 @@ var ts;
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 === 226 /* VariableDeclaration */) {
- return ts.declarationNameToString(declaration.parent.name);
- }
- if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.allowAnonymousIdentifier)) {
- context.encounteredError = true;
- }
- switch (declaration.kind) {
- case 199 /* ClassExpression */:
- return "(Anonymous class)";
- case 186 /* FunctionExpression */:
- case 187 /* ArrowFunction */:
- return "(Anonymous function)";
- }
+ }
+ function getNameOfSymbol(symbol, context) {
+ var declaration = ts.firstOrUndefined(symbol.declarations);
+ if (declaration) {
+ var name = ts.getNameOfDeclaration(declaration);
+ if (name) {
+ return ts.declarationNameToString(name);
+ }
+ if (declaration.parent && declaration.parent.kind === 226 /* VariableDeclaration */) {
+ return ts.declarationNameToString(declaration.parent.name);
+ }
+ if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.AllowAnonymousIdentifier)) {
+ context.encounteredError = true;
+ }
+ switch (declaration.kind) {
+ case 199 /* ClassExpression */:
+ return "(Anonymous class)";
+ case 186 /* FunctionExpression */:
+ case 187 /* ArrowFunction */:
+ return "(Anonymous function)";
}
- return symbol.name;
}
+ return symbol.name;
}
}
function typePredicateToString(typePredicate, enclosingDeclaration, flags) {
@@ -27955,12 +29395,14 @@ var ts;
flags |= t.flags;
if (!(t.flags & 6144 /* Nullable */)) {
if (t.flags & (128 /* BooleanLiteral */ | 256 /* EnumLiteral */)) {
- var baseType = t.flags & 128 /* BooleanLiteral */ ? booleanType : t.baseType;
- var count = baseType.types.length;
- if (i + count <= types.length && types[i + count - 1] === baseType.types[count - 1]) {
- result.push(baseType);
- i += count - 1;
- continue;
+ var baseType = t.flags & 128 /* BooleanLiteral */ ? booleanType : getBaseTypeOfEnumLiteralType(t);
+ if (baseType.flags & 65536 /* Union */) {
+ var count = baseType.types.length;
+ if (i + count <= types.length && types[i + count - 1] === baseType.types[count - 1]) {
+ result.push(baseType);
+ i += count - 1;
+ continue;
+ }
}
}
result.push(t);
@@ -27996,13 +29438,14 @@ var ts;
ts.isExternalModuleAugmentation(node.parent.parent);
}
function literalTypeToString(type) {
- return type.flags & 32 /* StringLiteral */ ? "\"" + ts.escapeString(type.text) + "\"" : type.text;
+ return type.flags & 32 /* StringLiteral */ ? "\"" + ts.escapeString(type.value) + "\"" : "" + type.value;
}
function getNameOfSymbol(symbol) {
if (symbol.declarations && symbol.declarations.length) {
var declaration = symbol.declarations[0];
- if (declaration.name) {
- return ts.declarationNameToString(declaration.name);
+ var name = ts.getNameOfDeclaration(declaration);
+ if (name) {
+ return ts.declarationNameToString(name);
}
if (declaration.parent && declaration.parent.kind === 226 /* VariableDeclaration */) {
return ts.declarationNameToString(declaration.parent.name);
@@ -28059,8 +29502,9 @@ var ts;
if (parentSymbol) {
// Write type arguments of instantiated class/interface here
if (flags & 1 /* WriteTypeParametersOrArguments */) {
- if (getCheckFlags(symbol) & 1 /* Instantiated */) {
- buildDisplayForTypeArgumentsAndDelimiters(getTypeParametersOfClassOrInterface(parentSymbol), symbol.mapper, writer, enclosingDeclaration);
+ if (ts.getCheckFlags(symbol) & 1 /* Instantiated */) {
+ var params = getTypeParametersOfClassOrInterface(parentSymbol.flags & 8388608 /* Alias */ ? resolveAlias(parentSymbol) : parentSymbol);
+ buildDisplayForTypeArgumentsAndDelimiters(params, symbol.mapper, writer, enclosingDeclaration);
}
else {
buildTypeParameterDisplayFromSymbol(parentSymbol, writer, enclosingDeclaration);
@@ -28112,7 +29556,7 @@ var ts;
// and there is an enclosing declaration or we specifically
// asked for it
var isTypeParameter = symbol.flags & 262144 /* TypeParameter */;
- var typeFormatFlag = 128 /* UseFullyQualifiedType */ & typeFlags;
+ var typeFormatFlag = 256 /* UseFullyQualifiedType */ & typeFlags;
if (!isTypeParameter && (enclosingDeclaration || typeFormatFlag)) {
walkSymbol(symbol, meaning, /*endOfChain*/ true);
}
@@ -28121,15 +29565,15 @@ var ts;
}
}
function buildTypeDisplay(type, writer, enclosingDeclaration, globalFlags, symbolStack) {
- var globalFlagsToPass = globalFlags & 16 /* WriteOwnNameForAnyLike */;
+ var globalFlagsToPass = globalFlags & (32 /* WriteOwnNameForAnyLike */ | 16384 /* WriteClassExpressionAsTypeLiteral */);
var inObjectTypeLiteral = false;
return writeType(type, globalFlags);
function writeType(type, flags) {
- var nextFlags = flags & ~512 /* InTypeAlias */;
+ var nextFlags = flags & ~1024 /* InTypeAlias */;
// Write undefined/null type as any
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)
+ writer.writeKeyword(!(globalFlags & 32 /* WriteOwnNameForAnyLike */) && isTypeAny(type)
? "any"
: type.intrinsicName);
}
@@ -28142,16 +29586,21 @@ var ts;
else if (getObjectFlags(type) & 4 /* Reference */) {
writeTypeReference(type, nextFlags);
}
- else if (type.flags & 256 /* EnumLiteral */) {
- buildSymbolDisplay(getParentOfSymbol(type.symbol), writer, enclosingDeclaration, 793064 /* Type */, 0 /* None */, nextFlags);
- writePunctuation(writer, 23 /* DotToken */);
- appendSymbolNameOnly(type.symbol, writer);
+ else if (type.flags & 256 /* EnumLiteral */ && !(type.flags & 65536 /* Union */)) {
+ var parent = getParentOfSymbol(type.symbol);
+ buildSymbolDisplay(parent, writer, enclosingDeclaration, 793064 /* Type */, 0 /* None */, nextFlags);
+ // In a literal enum type with a single member E { A }, E and E.A denote the
+ // same type. We always display this type simply as E.
+ if (getDeclaredTypeOfSymbol(parent) !== type) {
+ writePunctuation(writer, 23 /* DotToken */);
+ appendSymbolNameOnly(type.symbol, writer);
+ }
}
- else if (getObjectFlags(type) & 3 /* ClassOrInterface */ || type.flags & (16 /* Enum */ | 16384 /* TypeParameter */)) {
+ else if (getObjectFlags(type) & 3 /* ClassOrInterface */ || type.flags & (272 /* EnumLike */ | 16384 /* TypeParameter */)) {
// The specified symbol flags need to be reinterpreted as type flags
buildSymbolDisplay(type.symbol, writer, enclosingDeclaration, 793064 /* Type */, 0 /* None */, nextFlags);
}
- else if (!(flags & 512 /* InTypeAlias */) && type.aliasSymbol &&
+ else if (!(flags & 1024 /* InTypeAlias */) && type.aliasSymbol &&
isSymbolAccessible(type.aliasSymbol, enclosingDeclaration, 793064 /* Type */, /*shouldComputeAliasesToMakeVisible*/ false).accessibility === 0 /* Accessible */) {
var typeArguments = type.aliasTypeArguments;
writeSymbolTypeReference(type.aliasSymbol, typeArguments, 0, ts.length(typeArguments), nextFlags);
@@ -28166,12 +29615,18 @@ var ts;
writer.writeStringLiteral(literalTypeToString(type));
}
else if (type.flags & 262144 /* Index */) {
+ if (flags & 128 /* InElementType */) {
+ writePunctuation(writer, 19 /* OpenParenToken */);
+ }
writer.writeKeyword("keyof");
writeSpace(writer);
- writeType(type.type, 64 /* InElementType */);
+ writeType(type.type, 128 /* InElementType */);
+ if (flags & 128 /* InElementType */) {
+ writePunctuation(writer, 20 /* CloseParenToken */);
+ }
}
else if (type.flags & 524288 /* IndexedAccess */) {
- writeType(type.objectType, 64 /* InElementType */);
+ writeType(type.objectType, 128 /* InElementType */);
writePunctuation(writer, 21 /* OpenBracketToken */);
writeType(type.indexType, 0 /* None */);
writePunctuation(writer, 22 /* CloseBracketToken */);
@@ -28195,7 +29650,7 @@ var ts;
writePunctuation(writer, delimiter);
writeSpace(writer);
}
- writeType(types[i], delimiter === 26 /* CommaToken */ ? 0 /* None */ : 64 /* InElementType */);
+ writeType(types[i], delimiter === 26 /* CommaToken */ ? 0 /* None */ : 128 /* InElementType */);
}
}
function writeSymbolTypeReference(symbol, typeArguments, pos, end, flags) {
@@ -28205,7 +29660,7 @@ var ts;
}
if (pos < end) {
writePunctuation(writer, 27 /* LessThanToken */);
- writeType(typeArguments[pos], 256 /* InFirstTypeArgument */);
+ writeType(typeArguments[pos], 512 /* InFirstTypeArgument */);
pos++;
while (pos < end) {
writePunctuation(writer, 26 /* CommaToken */);
@@ -28219,7 +29674,7 @@ var ts;
function writeTypeReference(type, flags) {
var typeArguments = type.typeArguments || emptyArray;
if (type.target === globalArrayType && !(flags & 1 /* WriteArrayAsGenericType */)) {
- writeType(typeArguments[0], 64 /* InElementType */);
+ writeType(typeArguments[0], 128 /* InElementType */);
writePunctuation(writer, 21 /* OpenBracketToken */);
writePunctuation(writer, 22 /* CloseBracketToken */);
}
@@ -28228,6 +29683,11 @@ var ts;
writeTypeList(type.typeArguments.slice(0, getTypeReferenceArity(type)), 26 /* CommaToken */);
writePunctuation(writer, 22 /* CloseBracketToken */);
}
+ else if (flags & 16384 /* WriteClassExpressionAsTypeLiteral */ &&
+ type.symbol.valueDeclaration &&
+ type.symbol.valueDeclaration.kind === 199 /* ClassExpression */) {
+ writeAnonymousType(getDeclaredTypeOfClassOrInterface(type.symbol), flags);
+ }
else {
// Write the type reference in the format f<A>.g<B>.C<X, Y> where A and B are type arguments
// for outer type parameters, and f and g are the respective declaring containers of those
@@ -28256,7 +29716,7 @@ var ts;
}
}
function writeUnionOrIntersectionType(type, flags) {
- if (flags & 64 /* InElementType */) {
+ if (flags & 128 /* InElementType */) {
writePunctuation(writer, 19 /* OpenParenToken */);
}
if (type.flags & 65536 /* Union */) {
@@ -28265,7 +29725,7 @@ var ts;
else {
writeTypeList(type.types, 48 /* AmpersandToken */);
}
- if (flags & 64 /* InElementType */) {
+ if (flags & 128 /* InElementType */) {
writePunctuation(writer, 20 /* CloseParenToken */);
}
}
@@ -28273,7 +29733,9 @@ 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 */ && !getBaseTypeVariableOfClass(symbol) ||
+ if (symbol.flags & 32 /* Class */ &&
+ !getBaseTypeVariableOfClass(symbol) &&
+ !(symbol.valueDeclaration.kind === 199 /* ClassExpression */ && flags & 16384 /* WriteClassExpressionAsTypeLiteral */) ||
symbol.flags & (384 /* Enum */ | 512 /* ValueModule */)) {
writeTypeOfSymbol(type, flags);
}
@@ -28295,12 +29757,23 @@ var ts;
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
+ // However, in case of class expressions, we want to write both the static side and the instance side.
+ // We skip adding the static side so that the instance side has a chance to be written
+ // before checking for circular references.
if (!symbolStack) {
symbolStack = [];
}
- symbolStack.push(symbol);
- writeLiteralType(type, flags);
- symbolStack.pop();
+ var isConstructorObject = type.flags & 32768 /* Object */ &&
+ getObjectFlags(type) & 16 /* Anonymous */ &&
+ type.symbol && type.symbol.flags & 32 /* Class */;
+ if (isConstructorObject) {
+ writeLiteralType(type, flags);
+ }
+ else {
+ symbolStack.push(symbol);
+ writeLiteralType(type, flags);
+ symbolStack.pop();
+ }
}
}
else {
@@ -28317,7 +29790,7 @@ var ts;
}));
if (isStaticMethodSymbol || isNonLocalFunctionSymbol) {
// typeof is allowed only for static/non local functions
- return !!(flags & 2 /* UseTypeOfFunction */) ||
+ return !!(flags & 4 /* UseTypeOfFunction */) ||
(ts.contains(symbolStack, symbol)); // it is type of the symbol uses itself recursively
}
}
@@ -28338,12 +29811,12 @@ var ts;
}
}
function shouldAddParenthesisAroundFunctionType(callSignature, flags) {
- if (flags & 64 /* InElementType */) {
+ if (flags & 128 /* InElementType */) {
return true;
}
- else if (flags & 256 /* InFirstTypeArgument */) {
+ else if (flags & 512 /* InFirstTypeArgument */) {
// Add parenthesis around function type for the first type argument to avoid ambiguity
- var typeParameters = callSignature.target && (flags & 32 /* WriteTypeArgumentsOfSignature */) ?
+ var typeParameters = callSignature.target && (flags & 64 /* WriteTypeArgumentsOfSignature */) ?
callSignature.target.typeParameters : callSignature.typeParameters;
return typeParameters && typeParameters.length !== 0;
}
@@ -28368,20 +29841,20 @@ var ts;
if (parenthesizeSignature) {
writePunctuation(writer, 19 /* OpenParenToken */);
}
- buildSignatureDisplay(resolved.callSignatures[0], writer, enclosingDeclaration, globalFlagsToPass | 8 /* WriteArrowStyleSignature */, /*kind*/ undefined, symbolStack);
+ buildSignatureDisplay(resolved.callSignatures[0], writer, enclosingDeclaration, globalFlagsToPass | 16 /* WriteArrowStyleSignature */, /*kind*/ undefined, symbolStack);
if (parenthesizeSignature) {
writePunctuation(writer, 20 /* CloseParenToken */);
}
return;
}
if (resolved.constructSignatures.length === 1 && !resolved.callSignatures.length) {
- if (flags & 64 /* InElementType */) {
+ if (flags & 128 /* InElementType */) {
writePunctuation(writer, 19 /* OpenParenToken */);
}
writeKeyword(writer, 94 /* NewKeyword */);
writeSpace(writer);
- buildSignatureDisplay(resolved.constructSignatures[0], writer, enclosingDeclaration, globalFlagsToPass | 8 /* WriteArrowStyleSignature */, /*kind*/ undefined, symbolStack);
- if (flags & 64 /* InElementType */) {
+ buildSignatureDisplay(resolved.constructSignatures[0], writer, enclosingDeclaration, globalFlagsToPass | 16 /* WriteArrowStyleSignature */, /*kind*/ undefined, symbolStack);
+ if (flags & 128 /* InElementType */) {
writePunctuation(writer, 20 /* CloseParenToken */);
}
return;
@@ -28414,6 +29887,14 @@ var ts;
buildIndexSignatureDisplay(resolved.numberIndexInfo, writer, 1 /* Number */, enclosingDeclaration, globalFlags, symbolStack);
for (var _d = 0, _e = resolved.properties; _d < _e.length; _d++) {
var p = _e[_d];
+ if (globalFlags & 16384 /* WriteClassExpressionAsTypeLiteral */) {
+ if (p.flags & 16777216 /* Prototype */) {
+ continue;
+ }
+ if (ts.getDeclarationModifierFlagsFromSymbol(p) & (8 /* Private */ | 16 /* Protected */)) {
+ writer.reportPrivateInBaseOfClassExpression(p.name);
+ }
+ }
var t = getTypeOfSymbol(p);
if (p.flags & (16 /* Function */ | 8192 /* Method */) && !getPropertiesOfObjectType(t).length) {
var signatures = getSignaturesOfType(t, 0 /* Call */);
@@ -28429,7 +29910,7 @@ var ts;
writePropertyWithModifiers(p);
writePunctuation(writer, 56 /* ColonToken */);
writeSpace(writer);
- writeType(t, 0 /* None */);
+ writeType(t, globalFlags & 16384 /* WriteClassExpressionAsTypeLiteral */);
writePunctuation(writer, 25 /* SemicolonToken */);
writer.writeLine();
}
@@ -28503,7 +29984,7 @@ var ts;
writeSpace(writer);
var type = getTypeOfSymbol(p);
if (parameterNode && isRequiredInitializedParameter(parameterNode)) {
- type = includeFalsyTypes(type, 2048 /* Undefined */);
+ type = getNullableType(type, 2048 /* Undefined */);
}
buildTypeDisplay(type, writer, enclosingDeclaration, flags, symbolStack);
}
@@ -28563,7 +30044,7 @@ var ts;
function buildDisplayForTypeArgumentsAndDelimiters(typeParameters, mapper, writer, enclosingDeclaration) {
if (typeParameters && typeParameters.length) {
writePunctuation(writer, 27 /* LessThanToken */);
- var flags = 256 /* InFirstTypeArgument */;
+ var flags = 512 /* InFirstTypeArgument */;
for (var i = 0; i < typeParameters.length; i++) {
if (i > 0) {
writePunctuation(writer, 26 /* CommaToken */);
@@ -28603,10 +30084,10 @@ var ts;
}
function buildReturnTypeDisplay(signature, writer, enclosingDeclaration, flags, symbolStack) {
var returnType = getReturnTypeOfSignature(signature);
- if (flags & 2048 /* SuppressAnyReturnType */ && isTypeAny(returnType)) {
+ if (flags & 4096 /* SuppressAnyReturnType */ && isTypeAny(returnType)) {
return;
}
- if (flags & 8 /* WriteArrowStyleSignature */) {
+ if (flags & 16 /* WriteArrowStyleSignature */) {
writeSpace(writer);
writePunctuation(writer, 36 /* EqualsGreaterThanToken */);
}
@@ -28626,7 +30107,7 @@ var ts;
writeKeyword(writer, 94 /* NewKeyword */);
writeSpace(writer);
}
- if (signature.target && (flags & 32 /* WriteTypeArgumentsOfSignature */)) {
+ if (signature.target && (flags & 64 /* WriteTypeArgumentsOfSignature */)) {
// Instantiated signature, write type arguments instead
// This is achieved by passing in the mapper separately
buildDisplayForTypeArgumentsAndDelimiters(signature.target.typeParameters, signature.mapper, writer, enclosingDeclaration);
@@ -28770,10 +30251,7 @@ var ts;
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 === 246 /* ExportSpecifier */) {
- var exportSpecifier = node.parent;
- exportSymbol = exportSpecifier.parent.parent.moduleSpecifier ?
- getExternalModuleMember(exportSpecifier.parent.parent, exportSpecifier) :
- resolveEntityName(exportSpecifier.propertyName || exportSpecifier.name, 107455 /* Value */ | 793064 /* Type */ | 1920 /* Namespace */ | 8388608 /* Alias */);
+ exportSymbol = getTargetOfExportSpecifier(node.parent, 107455 /* Value */ | 793064 /* Type */ | 1920 /* Namespace */ | 8388608 /* Alias */);
}
var result = [];
if (exportSymbol) {
@@ -28916,7 +30394,7 @@ var ts;
for (var _a = 0, _b = getPropertiesOfType(source); _a < _b.length; _a++) {
var prop = _b[_a];
var inNamesToRemove = names.has(prop.name);
- var isPrivate = getDeclarationModifierFlagsFromSymbol(prop) & (8 /* Private */ | 16 /* Protected */);
+ var isPrivate = ts.getDeclarationModifierFlagsFromSymbol(prop) & (8 /* Private */ | 16 /* Protected */);
var isSetOnlyAccessor = prop.flags & 65536 /* SetAccessor */ && !(prop.flags & 32768 /* GetAccessor */);
if (!inNamesToRemove && !isPrivate && !isClassMethod(prop) && !isSetOnlyAccessor) {
members.set(prop.name, prop);
@@ -28985,7 +30463,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, /*allowAsyncIterable*/ false);
+ var elementType = checkIteratedTypeOrElementType(parentType, pattern, /*allowStringInput*/ false, /*allowAsyncIterables*/ false);
if (declaration.dotDotDotToken) {
// Rest element has an array type with the same element type as the parent type
type = createArrayType(elementType);
@@ -29032,19 +30510,10 @@ var ts;
return expr.kind === 177 /* ArrayLiteralExpression */ && expr.elements.length === 0;
}
function addOptionality(type, optional) {
- return strictNullChecks && optional ? includeFalsyTypes(type, 2048 /* Undefined */) : type;
+ return strictNullChecks && optional ? getNullableType(type, 2048 /* Undefined */) : type;
}
// Return the inferred type for a variable, parameter, or property declaration
function getTypeForVariableLikeDeclaration(declaration, includeOptionality) {
- 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 = 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 === 215 /* ForInStatement */) {
@@ -29063,8 +30532,9 @@ var ts;
return getTypeForBindingElement(declaration);
}
// Use type from type annotation if one is present
- if (declaration.type) {
- var declaredType = getTypeFromTypeNode(declaration.type);
+ var typeNode = ts.getEffectiveTypeAnnotationNode(declaration);
+ if (typeNode) {
+ var declaredType = getTypeFromTypeNode(typeNode);
return addOptionality(declaredType, /*optional*/ declaration.questionToken && includeOptionality);
}
if ((noImplicitAny || declaration.flags & 65536 /* JavaScriptFile */) &&
@@ -29135,6 +30605,7 @@ var ts;
var types = [];
var definedInConstructor = false;
var definedInMethod = false;
+ var jsDocType;
for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
var declaration = _a[_i];
var expression = declaration.kind === 194 /* BinaryExpression */ ? declaration :
@@ -29151,17 +30622,25 @@ var ts;
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;
+ // If there is a JSDoc type, use it
+ var type_1 = getTypeForDeclarationFromJSDocComment(expression.parent);
+ if (type_1) {
+ var declarationType = getWidenedType(type_1);
+ if (!jsDocType) {
+ jsDocType = declarationType;
+ }
+ else if (jsDocType !== unknownType && declarationType !== unknownType && !isTypeIdenticalTo(jsDocType, declarationType)) {
+ var name = ts.getNameOfDeclaration(declaration);
+ error(name, ts.Diagnostics.Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2, ts.declarationNameToString(name), typeToString(jsDocType), typeToString(declarationType));
}
}
- types.push(getWidenedLiteralType(checkExpressionCached(expression.right)));
+ else if (!jsDocType) {
+ // If we don't have an explicit JSDoc type, get the type from the expression.
+ types.push(getWidenedLiteralType(checkExpressionCached(expression.right)));
+ }
}
- return getWidenedType(addOptionality(getUnionType(types, /*subtypeReduction*/ true), definedInMethod && !definedInConstructor));
+ var type = jsDocType || getUnionType(types, /*subtypeReduction*/ true);
+ return getWidenedType(addOptionality(type, 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
@@ -29292,7 +30771,7 @@ var ts;
if (declaration.kind === 243 /* ExportAssignment */) {
return links.type = checkExpression(declaration.expression);
}
- if (declaration.flags & 65536 /* JavaScriptFile */ && declaration.kind === 291 /* JSDocPropertyTag */ && declaration.typeExpression) {
+ if (declaration.flags & 65536 /* JavaScriptFile */ && declaration.kind === 292 /* JSDocPropertyTag */ && declaration.typeExpression) {
return links.type = getTypeFromTypeNode(declaration.typeExpression.type);
}
// Handle variable, parameter or property
@@ -29322,10 +30801,11 @@ var ts;
function getAnnotatedAccessorType(accessor) {
if (accessor) {
if (accessor.kind === 153 /* GetAccessor */) {
- return accessor.type && getTypeFromTypeNode(accessor.type);
+ var getterTypeAnnotation = ts.getEffectiveReturnTypeNode(accessor);
+ return getterTypeAnnotation && getTypeFromTypeNode(getterTypeAnnotation);
}
else {
- var setterTypeAnnotation = ts.getSetAccessorTypeAnnotationNode(accessor);
+ var setterTypeAnnotation = ts.getEffectiveSetAccessorTypeAnnotationNode(accessor);
return setterTypeAnnotation && getTypeFromTypeNode(setterTypeAnnotation);
}
}
@@ -29411,7 +30891,7 @@ var ts;
links.type = baseTypeVariable ? getIntersectionType([type, baseTypeVariable]) : type;
}
else {
- links.type = strictNullChecks && symbol.flags & 67108864 /* Optional */ ? includeFalsyTypes(type, 2048 /* Undefined */) : type;
+ links.type = strictNullChecks && symbol.flags & 67108864 /* Optional */ ? getNullableType(type, 2048 /* Undefined */) : type;
}
}
}
@@ -29463,7 +30943,7 @@ var ts;
}
function reportCircularityError(symbol) {
// Check if variable has type annotation that circularly references the variable itself
- if (symbol.valueDeclaration.type) {
+ if (ts.getEffectiveTypeAnnotationNode(symbol.valueDeclaration)) {
error(symbol.valueDeclaration, ts.Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol));
return unknownType;
}
@@ -29474,7 +30954,7 @@ var ts;
return anyType;
}
function getTypeOfSymbol(symbol) {
- if (getCheckFlags(symbol) & 1 /* Instantiated */) {
+ if (ts.getCheckFlags(symbol) & 1 /* Instantiated */) {
return getTypeOfInstantiatedSymbol(symbol);
}
if (symbol.flags & (3 /* Variable */ | 4 /* Property */)) {
@@ -29606,11 +31086,8 @@ var ts;
}
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;
+ var typeArguments = ts.map(typeArgumentNodes, getTypeFromTypeNode);
+ return ts.sameMap(signatures, function (sig) { return ts.some(sig.typeParameters) ? getSignatureInstantiation(sig, typeArguments) : sig; });
}
/**
* The base constructor of a class can resolve to
@@ -29673,6 +31150,7 @@ var ts;
return;
}
var baseTypeNode = getBaseTypeNodeOfClass(type);
+ var typeArgs = typeArgumentsFromTypeReferenceNode(baseTypeNode);
var baseType;
var originalBaseType = baseConstructorType && baseConstructorType.symbol ? getDeclaredTypeOfSymbol(baseConstructorType.symbol) : undefined;
if (baseConstructorType.symbol && baseConstructorType.symbol.flags & 32 /* Class */ &&
@@ -29680,7 +31158,7 @@ var ts;
// When base constructor type is a class with no captured type arguments we know that the constructors all have the same type parameters as the
// class and all return the instance type of the class. There is no need for further checks and we can apply the
// type arguments in the same manner as a type reference to get the same error reporting experience.
- baseType = getTypeFromClassOrInterfaceReference(baseTypeNode, baseConstructorType.symbol);
+ baseType = getTypeFromClassOrInterfaceReference(baseTypeNode, baseConstructorType.symbol, typeArgs);
}
else if (baseConstructorType.flags & 1 /* Any */) {
baseType = baseConstructorType;
@@ -29832,7 +31310,7 @@ var ts;
if (!pushTypeResolution(symbol, 2 /* DeclaredType */)) {
return unknownType;
}
- var declaration = ts.getDeclarationOfKind(symbol, 290 /* JSDocTypedefTag */);
+ var declaration = ts.getDeclarationOfKind(symbol, 291 /* JSDocTypedefTag */);
var type = void 0;
if (declaration) {
if (declaration.jsDocTypeLiteral) {
@@ -29864,77 +31342,80 @@ var ts;
}
return links.declaredType;
}
- function isLiteralEnumMember(symbol, member) {
+ function isLiteralEnumMember(member) {
var expr = member.initializer;
if (!expr) {
return !ts.isInAmbientContext(member);
}
- return expr.kind === 8 /* NumericLiteral */ ||
+ return expr.kind === 9 /* StringLiteral */ || expr.kind === 8 /* NumericLiteral */ ||
expr.kind === 192 /* PrefixUnaryExpression */ && expr.operator === 38 /* MinusToken */ &&
expr.operand.kind === 8 /* NumericLiteral */ ||
- expr.kind === 71 /* Identifier */ && !!symbol.exports.get(expr.text);
+ expr.kind === 71 /* Identifier */ && (ts.nodeIsMissing(expr) || !!getSymbolOfNode(member.parent).exports.get(expr.text));
}
- function enumHasLiteralMembers(symbol) {
+ function getEnumKind(symbol) {
+ var links = getSymbolLinks(symbol);
+ if (links.enumKind !== undefined) {
+ return links.enumKind;
+ }
+ var hasNonLiteralMember = false;
for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
var declaration = _a[_i];
if (declaration.kind === 232 /* EnumDeclaration */) {
for (var _b = 0, _c = declaration.members; _b < _c.length; _b++) {
var member = _c[_b];
- if (!isLiteralEnumMember(symbol, member)) {
- return false;
+ if (member.initializer && member.initializer.kind === 9 /* StringLiteral */) {
+ return links.enumKind = 1 /* Literal */;
+ }
+ if (!isLiteralEnumMember(member)) {
+ hasNonLiteralMember = true;
}
}
}
}
- return true;
+ return links.enumKind = hasNonLiteralMember ? 0 /* Numeric */ : 1 /* Literal */;
}
- function createEnumLiteralType(symbol, baseType, text) {
- var type = createType(256 /* EnumLiteral */);
- type.symbol = symbol;
- type.baseType = baseType;
- type.text = text;
- return type;
+ function getBaseTypeOfEnumLiteralType(type) {
+ return type.flags & 256 /* EnumLiteral */ && !(type.flags & 65536 /* Union */) ? getDeclaredTypeOfSymbol(getParentOfSymbol(type.symbol)) : type;
}
function getDeclaredTypeOfEnum(symbol) {
var links = getSymbolLinks(symbol);
- if (!links.declaredType) {
- var enumType = links.declaredType = createType(16 /* Enum */);
- enumType.symbol = symbol;
- if (enumHasLiteralMembers(symbol)) {
- var memberTypeList = [];
- var memberTypes = [];
- for (var _i = 0, _a = enumType.symbol.declarations; _i < _a.length; _i++) {
- var declaration = _a[_i];
- if (declaration.kind === 232 /* EnumDeclaration */) {
- computeEnumMemberValues(declaration);
- for (var _b = 0, _c = declaration.members; _b < _c.length; _b++) {
- var member = _c[_b];
- var memberSymbol = getSymbolOfNode(member);
- var value = getEnumMemberValue(member);
- if (!memberTypes[value]) {
- var memberType = memberTypes[value] = createEnumLiteralType(memberSymbol, enumType, "" + value);
- memberTypeList.push(memberType);
- }
- }
+ if (links.declaredType) {
+ return links.declaredType;
+ }
+ if (getEnumKind(symbol) === 1 /* Literal */) {
+ enumCount++;
+ var memberTypeList = [];
+ for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
+ var declaration = _a[_i];
+ if (declaration.kind === 232 /* EnumDeclaration */) {
+ for (var _b = 0, _c = declaration.members; _b < _c.length; _b++) {
+ var member = _c[_b];
+ var memberType = getLiteralType(getEnumMemberValue(member), enumCount, getSymbolOfNode(member));
+ getSymbolLinks(getSymbolOfNode(member)).declaredType = memberType;
+ memberTypeList.push(memberType);
}
}
- enumType.memberTypes = memberTypes;
- if (memberTypeList.length > 1) {
- enumType.flags |= 65536 /* Union */;
- enumType.types = memberTypeList;
- unionTypes.set(getTypeListId(memberTypeList), enumType);
+ }
+ if (memberTypeList.length) {
+ var enumType_1 = getUnionType(memberTypeList, /*subtypeReduction*/ false, symbol, /*aliasTypeArguments*/ undefined);
+ if (enumType_1.flags & 65536 /* Union */) {
+ enumType_1.flags |= 256 /* EnumLiteral */;
+ enumType_1.symbol = symbol;
}
+ return links.declaredType = enumType_1;
}
}
- return links.declaredType;
+ var enumType = createType(16 /* Enum */);
+ enumType.symbol = symbol;
+ return links.declaredType = enumType;
}
function getDeclaredTypeOfEnumMember(symbol) {
var links = getSymbolLinks(symbol);
if (!links.declaredType) {
var enumType = getDeclaredTypeOfEnum(getParentOfSymbol(symbol));
- links.declaredType = enumType.flags & 65536 /* Union */ ?
- enumType.memberTypes[getEnumMemberValue(symbol.valueDeclaration)] :
- enumType;
+ if (!links.declaredType) {
+ links.declaredType = enumType;
+ }
}
return links.declaredType;
}
@@ -30014,13 +31495,17 @@ var ts;
// A variable-like declaration is considered independent (free of this references) if it has a type annotation
// that specifies an independent type, or if it has no type annotation and no initializer (and thus of type any).
function isIndependentVariableLikeDeclaration(node) {
- return node.type && isIndependentType(node.type) || !node.type && !node.initializer;
+ var typeNode = ts.getEffectiveTypeAnnotationNode(node);
+ return typeNode ? isIndependentType(typeNode) : !node.initializer;
}
// 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 !== 152 /* Constructor */ && (!node.type || !isIndependentType(node.type))) {
- return false;
+ if (node.kind !== 152 /* Constructor */) {
+ var typeNode = ts.getEffectiveReturnTypeNode(node);
+ if (!typeNode || !isIndependentType(typeNode)) {
+ return false;
+ }
}
for (var _i = 0, _a = node.parameters; _i < _a.length; _i++) {
var parameter = _a[_i];
@@ -30181,7 +31666,7 @@ var ts;
}
var baseTypeNode = getBaseTypeNodeOfClass(classType);
var isJavaScript = ts.isInJavaScriptFile(baseTypeNode);
- var typeArguments = ts.map(baseTypeNode.typeArguments, getTypeFromTypeNode);
+ var typeArguments = typeArgumentsFromTypeReferenceNode(baseTypeNode);
var typeArgCount = ts.length(typeArguments);
var result = [];
for (var _i = 0, baseSignatures_1 = baseSignatures; _i < baseSignatures_1.length; _i++) {
@@ -30268,8 +31753,8 @@ var ts;
function getUnionIndexInfo(types, kind) {
var indexTypes = [];
var isAnyReadonly = false;
- for (var _i = 0, types_2 = types; _i < types_2.length; _i++) {
- var type = types_2[_i];
+ for (var _i = 0, types_1 = types; _i < types_1.length; _i++) {
+ var type = types_1[_i];
var indexInfo = getIndexInfoOfType(type, kind);
if (!indexInfo) {
return undefined;
@@ -30443,7 +31928,7 @@ var ts;
// 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 propName = t.value;
var modifiersProp = getPropertyOfType(modifiersType, propName);
var isOptional = templateOptional || !!(modifiersProp && modifiersProp.flags & 67108864 /* Optional */);
var prop = createSymbol(4 /* Property */ | (isOptional ? 67108864 /* Optional */ : 0), propName);
@@ -30451,6 +31936,7 @@ var ts;
prop.type = propType;
if (propertySymbol) {
prop.syntheticOrigin = propertySymbol;
+ prop.declarations = propertySymbol.declarations;
}
members.set(propName, prop);
}
@@ -30575,6 +32061,27 @@ var ts;
getPropertiesOfUnionOrIntersectionType(type) :
getPropertiesOfObjectType(type);
}
+ function getAllPossiblePropertiesOfType(type) {
+ if (type.flags & 65536 /* Union */) {
+ var props = ts.createMap();
+ for (var _i = 0, _a = type.types; _i < _a.length; _i++) {
+ var memberType = _a[_i];
+ if (memberType.flags & 8190 /* Primitive */) {
+ continue;
+ }
+ for (var _b = 0, _c = getPropertiesOfType(memberType); _b < _c.length; _b++) {
+ var name = _c[_b].name;
+ if (!props.has(name)) {
+ props.set(name, createUnionOrIntersectionProperty(type, name));
+ }
+ }
+ }
+ return ts.arrayFrom(props.values());
+ }
+ else {
+ return getPropertiesOfType(type);
+ }
+ }
function getConstraintOfType(type) {
return type.flags & 16384 /* TypeParameter */ ? getConstraintOfTypeParameter(type) :
type.flags & 524288 /* IndexedAccess */ ? getConstraintOfIndexedAccess(type) :
@@ -30636,8 +32143,8 @@ var ts;
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];
+ for (var _i = 0, types_2 = types; _i < types_2.length; _i++) {
+ var type_2 = types_2[_i];
var baseType = getBaseConstraint(type_2);
if (baseType) {
baseTypes.push(baseType);
@@ -30678,7 +32185,7 @@ var ts;
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; });
+ var defaultDeclaration = typeParameter.symbol && ts.forEach(typeParameter.symbol.declarations, function (decl) { return ts.isTypeParameterDeclaration(decl) && decl.default; });
typeParameter.default = defaultDeclaration ? getTypeFromTypeNode(defaultDeclaration) : noConstraintType;
}
}
@@ -30693,7 +32200,7 @@ var ts;
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 & 84 /* NumberLike */ ? globalNumberType :
t.flags & 136 /* BooleanLike */ ? globalBooleanType :
t.flags & 512 /* ESSymbol */ ? getGlobalESSymbolType(/*reportErrors*/ languageVersion >= 2 /* ES2015 */) :
t.flags & 16777216 /* NonPrimitive */ ? emptyObjectType :
@@ -30708,12 +32215,12 @@ var ts;
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];
+ for (var _i = 0, types_3 = types; _i < types_3.length; _i++) {
+ var current = types_3[_i];
var type = getApparentType(current);
if (type !== unknownType) {
var prop = getPropertyOfType(type, name);
- var modifiers = prop ? getDeclarationModifierFlagsFromSymbol(prop) : 0;
+ var modifiers = prop ? ts.getDeclarationModifierFlagsFromSymbol(prop) : 0;
if (prop && !(modifiers & excludeModifiers)) {
commonFlags &= prop.flags;
if (!props) {
@@ -30785,7 +32292,7 @@ var ts;
function getPropertyOfUnionOrIntersectionType(type, name) {
var property = getUnionOrIntersectionProperty(type, name);
// We need to filter out partial properties in union types
- return property && !(getCheckFlags(property) & 16 /* Partial */) ? property : undefined;
+ return property && !(ts.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
@@ -30865,22 +32372,16 @@ var ts;
}
return undefined;
}
- function getTypeParametersFromJSDocTemplate(declaration) {
- if (declaration.flags & 65536 /* JavaScriptFile */) {
- var templateTag = ts.getJSDocTemplateTag(declaration);
- if (templateTag) {
- return getTypeParametersFromDeclaration(templateTag.typeParameters);
- }
- }
- return undefined;
- }
// Return list of type parameters with duplicates removed (duplicate identifier errors are generated in the actual
// type checking functions).
- function getTypeParametersFromDeclaration(typeParameterDeclarations) {
- var result = [];
- ts.forEach(typeParameterDeclarations, function (node) {
+ function getTypeParametersFromDeclaration(declaration) {
+ var result;
+ ts.forEach(ts.getEffectiveTypeParameterDeclarations(declaration), function (node) {
var tp = getDeclaredTypeOfTypeParameter(node.symbol);
if (!ts.contains(result, tp)) {
+ if (!result) {
+ result = [];
+ }
result.push(tp);
}
});
@@ -31059,14 +32560,21 @@ var ts;
var classType = declaration.kind === 152 /* Constructor */ ?
getDeclaredTypeOfClassOrInterface(getMergedSymbol(declaration.parent.symbol))
: undefined;
- var typeParameters = classType ? classType.localTypeParameters :
- declaration.typeParameters ? getTypeParametersFromDeclaration(declaration.typeParameters) :
- getTypeParametersFromJSDocTemplate(declaration);
+ var typeParameters = classType ? classType.localTypeParameters : getTypeParametersFromDeclaration(declaration);
var returnType = getSignatureReturnTypeFromDeclaration(declaration, isJSConstructSignature, classType);
var typePredicate = declaration.type && declaration.type.kind === 158 /* TypePredicate */ ?
createTypePredicateFromTypePredicateNode(declaration.type) :
undefined;
- links.resolvedSignature = createSignature(declaration, typeParameters, thisParameter, parameters, returnType, typePredicate, minArgumentCount, ts.hasRestParameter(declaration), hasLiteralTypes);
+ // JS functions get a free rest parameter if they reference `arguments`
+ var hasRestLikeParameter = ts.hasRestParameter(declaration);
+ if (!hasRestLikeParameter && ts.isInJavaScriptFile(declaration) && !ts.hasJSDocParameterTags(declaration) && containsArgumentsReference(declaration)) {
+ hasRestLikeParameter = true;
+ var syntheticArgsSymbol = createSymbol(3 /* Variable */, "args");
+ syntheticArgsSymbol.type = anyArrayType;
+ syntheticArgsSymbol.isRestParameter = true;
+ parameters.push(syntheticArgsSymbol);
+ }
+ links.resolvedSignature = createSignature(declaration, typeParameters, thisParameter, parameters, returnType, typePredicate, minArgumentCount, hasRestLikeParameter, hasLiteralTypes);
}
return links.resolvedSignature;
}
@@ -31077,14 +32585,9 @@ var ts;
else if (classType) {
return classType;
}
- else if (declaration.type) {
- return getTypeFromTypeNode(declaration.type);
- }
- if (declaration.flags & 65536 /* JavaScriptFile */) {
- var type = getReturnTypeFromJSDocComment(declaration);
- if (type && type !== unknownType) {
- return type;
- }
+ var typeNode = ts.getEffectiveReturnTypeNode(declaration);
+ if (typeNode) {
+ return getTypeFromTypeNode(typeNode);
}
// 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.
@@ -31193,8 +32696,9 @@ var ts;
type = anyType;
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));
+ var name = ts.getNameOfDeclaration(declaration);
+ if (name) {
+ error(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(name));
}
else {
error(declaration, ts.Diagnostics.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);
@@ -31329,8 +32833,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_5 = types; _i < types_5.length; _i++) {
- var type = types_5[_i];
+ for (var _i = 0, types_4 = types; _i < types_4.length; _i++) {
+ var type = types_4[_i];
if (!(type.flags & excludeKinds)) {
result |= type.flags;
}
@@ -31360,8 +32864,10 @@ var ts;
function getTypeReferenceArity(type) {
return ts.length(type.target.typeParameters);
}
- // Get type from reference to class or interface
- function getTypeFromClassOrInterfaceReference(node, symbol) {
+ /**
+ * Get type from type-reference that reference to class or interface
+ */
+ function getTypeFromClassOrInterfaceReference(node, symbol, typeArgs) {
var type = getDeclaredTypeOfSymbol(getMergedSymbol(symbol));
var typeParameters = type.localTypeParameters;
if (typeParameters) {
@@ -31376,7 +32882,7 @@ var ts;
// 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.
- var typeArguments = ts.concatenate(type.outerTypeParameters, fillMissingTypeArguments(ts.map(node.typeArguments, getTypeFromTypeNode), typeParameters, minTypeArgumentCount, node));
+ var typeArguments = ts.concatenate(type.outerTypeParameters, fillMissingTypeArguments(typeArgs, typeParameters, minTypeArgumentCount, node));
return createTypeReference(type, typeArguments);
}
if (node.typeArguments) {
@@ -31396,10 +32902,12 @@ var ts;
}
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
- // declared type. Instantiations are cached using the type identities of the type arguments as the key.
- function getTypeFromTypeAliasReference(node, symbol) {
+ /**
+ * 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
+ * declared type. Instantiations are cached using the type identities of the type arguments as the key.
+ */
+ function getTypeFromTypeAliasReference(node, symbol, typeArguments) {
var type = getDeclaredTypeOfSymbol(symbol);
var typeParameters = getSymbolLinks(symbol).typeParameters;
if (typeParameters) {
@@ -31411,7 +32919,6 @@ var ts;
: 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);
return getTypeAliasInstantiation(symbol, typeArguments);
}
if (node.typeArguments) {
@@ -31420,7 +32927,9 @@ var ts;
}
return type;
}
- // Get type from reference to named type that cannot be generic (enum or type parameter)
+ /**
+ * Get type from reference to named type that cannot be generic (enum or type parameter)
+ */
function getTypeFromNonGenericTypeReference(node, symbol) {
if (node.typeArguments) {
error(node, ts.Diagnostics.Type_0_is_not_generic, symbolToString(symbol));
@@ -31444,29 +32953,48 @@ var ts;
}
return undefined;
}
- function resolveTypeReferenceName(typeReferenceName) {
+ function resolveTypeReferenceName(typeReferenceName, meaning) {
if (!typeReferenceName) {
return unknownSymbol;
}
- return resolveEntityName(typeReferenceName, 793064 /* Type */) || unknownSymbol;
+ return resolveEntityName(typeReferenceName, meaning) || unknownSymbol;
}
function getTypeReferenceType(node, symbol) {
+ var typeArguments = typeArgumentsFromTypeReferenceNode(node); // Do unconditionally so we mark type arguments as referenced.
if (symbol === unknownSymbol) {
return unknownType;
}
+ var type = getTypeReferenceTypeWorker(node, symbol, typeArguments);
+ if (type) {
+ return type;
+ }
+ if (symbol.flags & 107455 /* Value */ && node.kind === 277 /* JSDocTypeReference */) {
+ // A JSDocTypeReference may have resolved to a value (as opposed to a type). If
+ // the symbol is a constructor function, return the inferred class type; otherwise,
+ // the type of this reference is just the type of the value we resolved to.
+ var valueType = getTypeOfSymbol(symbol);
+ if (valueType.symbol && !isInferredClassType(valueType)) {
+ var referenceType = getTypeReferenceTypeWorker(node, valueType.symbol, typeArguments);
+ if (referenceType) {
+ return referenceType;
+ }
+ }
+ // Resolve the type reference as a Type for the purpose of reporting errors.
+ resolveTypeReferenceName(getTypeReferenceName(node), 793064 /* Type */);
+ return valueType;
+ }
+ return getTypeFromNonGenericTypeReference(node, symbol);
+ }
+ function getTypeReferenceTypeWorker(node, symbol, typeArguments) {
if (symbol.flags & (32 /* Class */ | 64 /* Interface */)) {
- return getTypeFromClassOrInterfaceReference(node, symbol);
+ return getTypeFromClassOrInterfaceReference(node, symbol, typeArguments);
}
if (symbol.flags & 524288 /* TypeAlias */) {
- return getTypeFromTypeAliasReference(node, symbol);
+ return getTypeFromTypeAliasReference(node, symbol, typeArguments);
}
- if (symbol.flags & 107455 /* Value */ && node.kind === 277 /* 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.
- return getTypeOfSymbol(symbol);
+ if (symbol.flags & 16 /* Function */ && node.kind === 277 /* JSDocTypeReference */ && (symbol.members || ts.getJSDocClassTag(symbol.valueDeclaration))) {
+ return getInferredClassType(symbol);
}
- return getTypeFromNonGenericTypeReference(node, symbol);
}
function getPrimitiveTypeFromJSDocTypeReference(node) {
if (ts.isIdentifier(node.name)) {
@@ -31486,7 +33014,8 @@ var ts;
case "Object":
return anyType;
case "Function":
- return anyFunctionType;
+ case "function":
+ return globalFunctionType;
case "Array":
case "array":
return !node.typeArguments || !node.typeArguments.length ? createArrayType(anyType) : undefined;
@@ -31505,26 +33034,14 @@ var ts;
if (!links.resolvedType) {
var symbol = void 0;
var type = void 0;
+ var meaning = 793064 /* Type */;
if (node.kind === 277 /* JSDocTypeReference */) {
type = getPrimitiveTypeFromJSDocTypeReference(node);
- if (!type) {
- var typeReferenceName = getTypeReferenceName(node);
- symbol = resolveTypeReferenceName(typeReferenceName);
- type = getTypeReferenceType(node, symbol);
- }
+ meaning |= 107455 /* Value */;
}
- else {
- // We only support expressions that are simple qualified names. For other expressions this produces undefined.
- var typeNameOrExpression = node.kind === 159 /* TypeReference */
- ? node.typeName
- : ts.isEntityNameExpression(node.expression)
- ? node.expression
- : undefined;
- symbol = typeNameOrExpression && resolveEntityName(typeNameOrExpression, 793064 /* Type */) || unknownSymbol;
- type = symbol === unknownSymbol ? unknownType :
- symbol.flags & (32 /* Class */ | 64 /* Interface */) ? getTypeFromClassOrInterfaceReference(node, symbol) :
- symbol.flags & 524288 /* TypeAlias */ ? getTypeFromTypeAliasReference(node, symbol) :
- getTypeFromNonGenericTypeReference(node, symbol);
+ if (!type) {
+ symbol = resolveTypeReferenceName(getTypeReferenceName(node), meaning);
+ type = getTypeReferenceType(node, symbol);
}
// Cache both the resolved symbol and the resolved type. The resolved symbol is needed in when we check the
// type reference in checkTypeReferenceOrExpressionWithTypeArguments.
@@ -31533,6 +33050,9 @@ var ts;
}
return links.resolvedType;
}
+ function typeArgumentsFromTypeReferenceNode(node) {
+ return ts.map(node.typeArguments, getTypeFromTypeNode);
+ }
function getTypeFromTypeQueryNode(node) {
var links = getNodeLinks(node);
if (!links.resolvedType) {
@@ -31774,14 +33294,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_6 = types; _i < types_6.length; _i++) {
- var type = types_6[_i];
+ for (var _i = 0, types_5 = types; _i < types_5.length; _i++) {
+ var type = types_5[_i];
addTypeToUnion(typeSet, type);
}
}
function containsIdenticalType(types, type) {
- for (var _i = 0, types_7 = types; _i < types_7.length; _i++) {
- var t = types_7[_i];
+ for (var _i = 0, types_6 = types; _i < types_6.length; _i++) {
+ var t = types_6[_i];
if (isTypeIdenticalTo(t, type)) {
return true;
}
@@ -31789,8 +33309,8 @@ var ts;
return false;
}
function isSubtypeOfAny(candidate, types) {
- for (var _i = 0, types_8 = types; _i < types_8.length; _i++) {
- var type = types_8[_i];
+ for (var _i = 0, types_7 = types; _i < types_7.length; _i++) {
+ var type = types_7[_i];
if (candidate !== type && isTypeSubtypeOf(candidate, type)) {
return true;
}
@@ -31902,10 +33422,13 @@ var ts;
else if (type.flags & 1 /* Any */) {
typeSet.containsAny = true;
}
+ else if (type.flags & 8192 /* Never */) {
+ typeSet.containsNever = 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)) {
+ else if ((strictNullChecks || !(type.flags & 6144 /* Nullable */)) && !ts.contains(typeSet, type)) {
if (type.flags & 32768 /* Object */) {
typeSet.containsObjectType = true;
}
@@ -31921,8 +33444,8 @@ 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 addTypesToIntersection(typeSet, types) {
- for (var _i = 0, types_9 = types; _i < types_9.length; _i++) {
- var type = types_9[_i];
+ for (var _i = 0, types_8 = types; _i < types_8.length; _i++) {
+ var type = types_8[_i];
addTypeToIntersection(typeSet, type);
}
}
@@ -31942,6 +33465,9 @@ var ts;
}
var typeSet = [];
addTypesToIntersection(typeSet, types);
+ if (typeSet.containsNever) {
+ return neverType;
+ }
if (typeSet.containsAny) {
return anyType;
}
@@ -31986,9 +33512,9 @@ var ts;
return type.resolvedIndexType;
}
function getLiteralTypeFromPropertyName(prop) {
- return getDeclarationModifierFlagsFromSymbol(prop) & 24 /* NonPublicAccessibilityModifier */ || ts.startsWith(prop.name, "__@") ?
+ return ts.getDeclarationModifierFlagsFromSymbol(prop) & 24 /* NonPublicAccessibilityModifier */ || ts.startsWith(prop.name, "__@") ?
neverType :
- getLiteralTypeForText(32 /* StringLiteral */, ts.unescapeIdentifier(prop.name));
+ getLiteralType(ts.unescapeIdentifier(prop.name));
}
function getLiteralTypeFromPropertyNames(type) {
return getUnionType(ts.map(getPropertiesOfType(type), getLiteralTypeFromPropertyName));
@@ -32018,12 +33544,12 @@ var ts;
}
function getPropertyTypeForIndexType(objectType, indexType, accessNode, cacheSymbol) {
var accessExpression = accessNode && accessNode.kind === 180 /* ElementAccessExpression */ ? accessNode : undefined;
- var propName = indexType.flags & (32 /* StringLiteral */ | 64 /* NumberLiteral */ | 256 /* EnumLiteral */) ?
- indexType.text :
+ var propName = indexType.flags & 96 /* StringOrNumberLiteral */ ?
+ "" + indexType.value :
accessExpression && checkThatExpressionIsProperSymbolReference(accessExpression.argumentExpression, indexType, /*reportError*/ false) ?
ts.getPropertyNameForKnownSymbolName(accessExpression.argumentExpression.name.text) :
undefined;
- if (propName) {
+ if (propName !== undefined) {
var prop = getPropertyOfType(objectType, propName);
if (prop) {
if (accessExpression) {
@@ -32038,11 +33564,11 @@ var ts;
return getTypeOfSymbol(prop);
}
}
- if (isTypeAnyOrAllConstituentTypesHaveKind(indexType, 262178 /* StringLike */ | 340 /* NumberLike */ | 512 /* ESSymbol */)) {
+ if (isTypeAnyOrAllConstituentTypesHaveKind(indexType, 262178 /* StringLike */ | 84 /* NumberLike */ | 512 /* ESSymbol */)) {
if (isTypeAny(objectType)) {
return anyType;
}
- var indexInfo = isTypeAnyOrAllConstituentTypesHaveKind(indexType, 340 /* NumberLike */) && getIndexInfoOfType(objectType, 1 /* Number */) ||
+ var indexInfo = isTypeAnyOrAllConstituentTypesHaveKind(indexType, 84 /* NumberLike */) && getIndexInfoOfType(objectType, 1 /* Number */) ||
getIndexInfoOfType(objectType, 0 /* String */) ||
undefined;
if (indexInfo) {
@@ -32067,7 +33593,7 @@ var ts;
if (accessNode) {
var indexNode = accessNode.kind === 180 /* 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));
+ error(indexNode, ts.Diagnostics.Property_0_does_not_exist_on_type_1, "" + indexType.value, typeToString(objectType));
}
else if (indexType.flags & (2 /* String */ | 4 /* Number */)) {
error(indexNode, ts.Diagnostics.Type_0_has_no_matching_index_signature_for_type_1, typeToString(objectType), typeToString(indexType));
@@ -32186,11 +33712,9 @@ var ts;
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;
}
@@ -32220,7 +33744,7 @@ var ts;
var rightProp = _a[_i];
// we approximate own properties as non-methods plus methods that are inside the object literal
var isSetterWithoutGetter = rightProp.flags & 65536 /* SetAccessor */ && !(rightProp.flags & 32768 /* GetAccessor */);
- if (getDeclarationModifierFlagsFromSymbol(rightProp) & (8 /* Private */ | 16 /* Protected */)) {
+ if (ts.getDeclarationModifierFlagsFromSymbol(rightProp) & (8 /* Private */ | 16 /* Protected */)) {
skippedPrivateMembers.set(rightProp.name, true);
}
else if (!isClassMethod(rightProp) && !isSetterWithoutGetter) {
@@ -32237,7 +33761,7 @@ var ts;
if (members.has(leftProp.name)) {
var rightProp = members.get(leftProp.name);
var rightType = getTypeOfSymbol(rightProp);
- if (maybeTypeOfKind(rightType, 2048 /* Undefined */) || rightProp.flags & 67108864 /* Optional */) {
+ if (rightProp.flags & 67108864 /* Optional */) {
var declarations = ts.concatenate(leftProp.declarations, rightProp.declarations);
var flags = 4 /* Property */ | (leftProp.flags & 67108864 /* Optional */);
var result = createSymbol(flags, leftProp.name);
@@ -32268,15 +33792,16 @@ var ts;
function isClassMethod(prop) {
return prop.flags & 8192 /* Method */ && ts.find(prop.declarations, function (decl) { return ts.isClassLike(decl.parent); });
}
- function createLiteralType(flags, text) {
+ function createLiteralType(flags, value, symbol) {
var type = createType(flags);
- type.text = text;
+ type.symbol = symbol;
+ type.value = value;
return type;
}
function getFreshTypeOfLiteralType(type) {
if (type.flags & 96 /* StringOrNumberLiteral */ && !(type.flags & 1048576 /* FreshLiteral */)) {
if (!type.freshType) {
- var freshType = createLiteralType(type.flags | 1048576 /* FreshLiteral */, type.text);
+ var freshType = createLiteralType(type.flags | 1048576 /* FreshLiteral */, type.value, type.symbol);
freshType.regularType = type;
type.freshType = freshType;
}
@@ -32287,11 +33812,17 @@ var ts;
function getRegularTypeOfLiteralType(type) {
return type.flags & 96 /* StringOrNumberLiteral */ && type.flags & 1048576 /* FreshLiteral */ ? type.regularType : type;
}
- function getLiteralTypeForText(flags, text) {
- var map = flags & 32 /* StringLiteral */ ? stringLiteralTypes : numericLiteralTypes;
- var type = map.get(text);
+ function getLiteralType(value, enumId, symbol) {
+ // We store all literal types in a single map with keys of the form '#NNN' and '@SSS',
+ // where NNN is the text representation of a numeric literal and SSS are the characters
+ // of a string literal. For literal enum members we use 'EEE#NNN' and 'EEE@SSS', where
+ // EEE is a unique id for the containing enum type.
+ var qualifier = typeof value === "number" ? "#" : "@";
+ var key = enumId ? enumId + qualifier + value : qualifier + value;
+ var type = literalTypes.get(key);
if (!type) {
- map.set(text, type = createLiteralType(flags, text));
+ var flags = (typeof value === "number" ? 64 /* NumberLiteral */ : 32 /* StringLiteral */) | (enumId ? 256 /* EnumLiteral */ : 0);
+ literalTypes.set(key, type = createLiteralType(flags, value, symbol));
}
return type;
}
@@ -32366,7 +33897,7 @@ var ts;
return getTypeFromThisTypeNode(node);
case 173 /* LiteralType */:
return getTypeFromLiteralTypeNode(node);
- case 293 /* JSDocLiteralType */:
+ case 294 /* JSDocLiteralType */:
return getTypeFromLiteralTypeNode(node.literal);
case 159 /* TypeReference */:
case 277 /* JSDocTypeReference */:
@@ -32400,7 +33931,7 @@ var ts;
case 160 /* FunctionType */:
case 161 /* ConstructorType */:
case 163 /* TypeLiteral */:
- case 292 /* JSDocTypeLiteral */:
+ case 293 /* JSDocTypeLiteral */:
case 279 /* JSDocFunctionType */:
return getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node);
case 170 /* TypeOperator */:
@@ -32479,23 +34010,13 @@ var ts;
mapper.mappedTypes = typeParameters;
return mapper;
}
- function getInferenceMapper(context) {
- if (!context.mapper) {
- var mapper = function (t) {
- var typeParameters = context.signature.typeParameters;
- for (var i = 0; i < typeParameters.length; i++) {
- if (t === typeParameters[i]) {
- context.inferences[i].isFixed = true;
- return getInferredType(context, i);
- }
- }
- return t;
- };
- mapper.mappedTypes = context.signature.typeParameters;
- mapper.context = context;
- context.mapper = mapper;
- }
- return context.mapper;
+ function isInferenceContext(mapper) {
+ return !!mapper.signature;
+ }
+ function cloneTypeMapper(mapper) {
+ return mapper && isInferenceContext(mapper) ?
+ createInferenceContext(mapper.signature, mapper.flags | 2 /* NoDefault */, mapper.inferences) :
+ mapper;
}
function identityMapper(type) {
return type;
@@ -32549,13 +34070,14 @@ var ts;
if (signature.typePredicate) {
freshTypePredicate = cloneTypePredicate(signature.typePredicate, mapper);
}
- var result = createSignature(signature.declaration, freshTypeParameters, signature.thisParameter && instantiateSymbol(signature.thisParameter, mapper), instantiateList(signature.parameters, mapper, instantiateSymbol), instantiateType(signature.resolvedReturnType, mapper), freshTypePredicate, signature.minArgumentCount, signature.hasRestParameter, signature.hasLiteralTypes);
+ var result = createSignature(signature.declaration, freshTypeParameters, signature.thisParameter && instantiateSymbol(signature.thisParameter, mapper), instantiateList(signature.parameters, mapper, instantiateSymbol),
+ /*resolvedReturnType*/ undefined, freshTypePredicate, signature.minArgumentCount, signature.hasRestParameter, signature.hasLiteralTypes);
result.target = signature;
result.mapper = mapper;
return result;
}
function instantiateSymbol(symbol, mapper) {
- if (getCheckFlags(symbol) & 1 /* Instantiated */) {
+ if (ts.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
@@ -32648,10 +34170,10 @@ var ts;
case 199 /* ClassExpression */:
case 230 /* InterfaceDeclaration */:
case 231 /* TypeAliasDeclaration */:
- var declaration = node;
- if (declaration.typeParameters) {
- for (var _i = 0, _a = declaration.typeParameters; _i < _a.length; _i++) {
- var d = _a[_i];
+ var typeParameters = ts.getEffectiveTypeParameterDeclarations(node);
+ if (typeParameters) {
+ for (var _i = 0, typeParameters_1 = typeParameters; _i < typeParameters_1.length; _i++) {
+ var d = typeParameters_1[_i];
if (ts.contains(mappedTypes, getDeclaredTypeOfTypeParameter(getSymbolOfNode(d)))) {
return true;
}
@@ -32671,8 +34193,8 @@ var ts;
break;
case 279 /* JSDocFunctionType */:
var func = node;
- for (var _b = 0, _c = func.parameters; _b < _c.length; _b++) {
- var p = _c[_b];
+ for (var _a = 0, _b = func.parameters; _a < _b.length; _a++) {
+ var p = _b[_a];
if (ts.contains(mappedTypes, getTypeOfNode(p))) {
return true;
}
@@ -32800,7 +34322,7 @@ var ts;
return false;
}
// Functions with any parameters that lack type annotations are context sensitive.
- if (ts.forEach(node.parameters, function (p) { return !p.type; })) {
+ if (ts.forEach(node.parameters, function (p) { return !ts.getEffectiveTypeAnnotationNode(p); })) {
return true;
}
// For arrow functions we now know we're not context sensitive.
@@ -32859,6 +34381,12 @@ var ts;
/**
* This is *not* a bi-directional relationship.
* If one needs to check both directions for comparability, use a second call to this function or 'checkTypeComparableTo'.
+ *
+ * A type S is comparable to a type T if some (but not necessarily all) of the possible values of S are also possible values of T.
+ * It is used to check following cases:
+ * - the types of the left and right sides of equality/inequality operators (`===`, `!==`, `==`, `!=`).
+ * - the types of `case` clause expressions and their respective `switch` expressions.
+ * - the type of an expression in a type assertion with the type being asserted.
*/
function isTypeComparableTo(source, target) {
return isTypeRelatedTo(source, target, comparableRelation);
@@ -32866,9 +34394,6 @@ var ts;
function areTypesComparable(type1, type2) {
return isTypeComparableTo(type1, type2) || isTypeComparableTo(type2, type1);
}
- function checkTypeSubtypeOf(source, target, errorNode, headMessage, containingMessageChain) {
- return checkTypeRelatedTo(source, target, subtypeRelation, errorNode, headMessage, containingMessageChain);
- }
function checkTypeAssignableTo(source, target, errorNode, headMessage, containingMessageChain) {
return checkTypeRelatedTo(source, target, assignableRelation, errorNode, headMessage, containingMessageChain);
}
@@ -32880,12 +34405,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 */;
@@ -32893,10 +34419,9 @@ var ts;
if (!target.hasRestParameter && source.minArgumentCount > target.parameters.length) {
return 0 /* False */;
}
- // Spec 1.0 Section 3.8.3 & 3.8.4:
- // M and N (the signatures) are instantiated using type Any as the type argument for all type parameters declared by M and N
- source = getErasedSignature(source);
- target = getErasedSignature(target);
+ if (source.typeParameters) {
+ source = instantiateSignatureInContextOf(source, target);
+ }
var result = -1 /* True */;
var sourceThisType = getThisTypeOfSignature(source);
if (sourceThisType && sourceThisType !== voidType) {
@@ -32920,9 +34445,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);
@@ -32950,7 +34489,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;
@@ -33026,33 +34569,32 @@ var ts;
}
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;
+ type.flags & 16777216 /* NonPrimitive */ ? true :
+ 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) {
+ function isEnumTypeRelatedTo(sourceSymbol, targetSymbol, errorReporter) {
+ if (sourceSymbol === targetSymbol) {
return true;
}
- var id = source.id + "," + target.id;
+ var id = getSymbolId(sourceSymbol) + "," + getSymbolId(targetSymbol);
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 */)) {
+ if (sourceSymbol.name !== targetSymbol.name || !(sourceSymbol.flags & 256 /* RegularEnum */) || !(targetSymbol.flags & 256 /* RegularEnum */)) {
enumRelation.set(id, false);
return false;
}
- var targetEnumType = getTypeOfSymbol(target.symbol);
- for (var _i = 0, _a = getPropertiesOfType(getTypeOfSymbol(source.symbol)); _i < _a.length; _i++) {
+ var targetEnumType = getTypeOfSymbol(targetSymbol);
+ for (var _i = 0, _a = getPropertiesOfType(getTypeOfSymbol(sourceSymbol)); _i < _a.length; _i++) {
var property = _a[_i];
if (property.flags & 8 /* EnumMember */) {
var targetProperty = getPropertyOfType(targetEnumType, property.name);
if (!targetProperty || !(targetProperty.flags & 8 /* EnumMember */)) {
if (errorReporter) {
- errorReporter(ts.Diagnostics.Property_0_is_missing_in_type_1, property.name, typeToString(target, /*enclosingDeclaration*/ undefined, 128 /* UseFullyQualifiedType */));
+ errorReporter(ts.Diagnostics.Property_0_is_missing_in_type_1, property.name, typeToString(getDeclaredTypeOfSymbol(targetSymbol), /*enclosingDeclaration*/ undefined, 256 /* UseFullyQualifiedType */));
}
enumRelation.set(id, false);
return false;
@@ -33063,42 +34605,50 @@ var ts;
return true;
}
function isSimpleTypeRelatedTo(source, target, relation, errorReporter) {
- if (target.flags & 8192 /* Never */)
+ var s = source.flags;
+ var t = target.flags;
+ if (t & 8192 /* Never */)
return false;
- if (target.flags & 1 /* Any */ || source.flags & 8192 /* Never */)
+ if (t & 1 /* Any */ || s & 8192 /* Never */)
return true;
- if (source.flags & 262178 /* StringLike */ && target.flags & 2 /* String */)
+ if (s & 262178 /* StringLike */ && t & 2 /* String */)
return true;
- if (source.flags & 340 /* NumberLike */ && target.flags & 4 /* Number */)
+ if (s & 32 /* StringLiteral */ && s & 256 /* EnumLiteral */ &&
+ t & 32 /* StringLiteral */ && !(t & 256 /* EnumLiteral */) &&
+ source.value === target.value)
return true;
- if (source.flags & 136 /* BooleanLike */ && target.flags & 8 /* Boolean */)
+ if (s & 84 /* NumberLike */ && t & 4 /* Number */)
return true;
- if (source.flags & 256 /* EnumLiteral */ && target.flags & 16 /* Enum */ && source.baseType === target)
+ if (s & 64 /* NumberLiteral */ && s & 256 /* EnumLiteral */ &&
+ t & 64 /* NumberLiteral */ && !(t & 256 /* EnumLiteral */) &&
+ source.value === target.value)
return true;
- if (source.flags & 16 /* Enum */ && target.flags & 16 /* Enum */ && isEnumTypeRelatedTo(source, target, errorReporter))
+ if (s & 136 /* BooleanLike */ && t & 8 /* Boolean */)
return true;
- if (source.flags & 2048 /* Undefined */ && (!strictNullChecks || target.flags & (2048 /* Undefined */ | 1024 /* Void */)))
+ if (s & 16 /* Enum */ && t & 16 /* Enum */ && isEnumTypeRelatedTo(source.symbol, target.symbol, errorReporter))
+ return true;
+ if (s & 256 /* EnumLiteral */ && t & 256 /* EnumLiteral */) {
+ if (s & 65536 /* Union */ && t & 65536 /* Union */ && isEnumTypeRelatedTo(source.symbol, target.symbol, errorReporter))
+ return true;
+ if (s & 224 /* Literal */ && t & 224 /* Literal */ &&
+ source.value === target.value &&
+ isEnumTypeRelatedTo(getParentOfSymbol(source.symbol), getParentOfSymbol(target.symbol), errorReporter))
+ return true;
+ }
+ if (s & 2048 /* Undefined */ && (!strictNullChecks || t & (2048 /* Undefined */ | 1024 /* Void */)))
return true;
- if (source.flags & 4096 /* Null */ && (!strictNullChecks || target.flags & 4096 /* Null */))
+ if (s & 4096 /* Null */ && (!strictNullChecks || t & 4096 /* Null */))
return true;
- if (source.flags & 32768 /* Object */ && target.flags & 16777216 /* NonPrimitive */)
+ if (s & 32768 /* Object */ && t & 16777216 /* NonPrimitive */)
return true;
if (relation === assignableRelation || relation === comparableRelation) {
- if (source.flags & 1 /* Any */)
- return true;
- if ((source.flags & 4 /* Number */ | source.flags & 64 /* NumberLiteral */) && target.flags & 272 /* EnumLike */)
+ if (s & 1 /* Any */)
return true;
- if (source.flags & 256 /* EnumLiteral */ &&
- target.flags & 256 /* EnumLiteral */ &&
- source.text === target.text &&
- isEnumTypeRelatedTo(source.baseType, target.baseType, errorReporter)) {
- return true;
- }
- if (source.flags & 256 /* EnumLiteral */ &&
- target.flags & 16 /* Enum */ &&
- isEnumTypeRelatedTo(target, source.baseType, errorReporter)) {
+ // Type number or any numeric literal type is assignable to any numeric enum type or any
+ // numeric enum literal type. This rule exists for backwards compatibility reasons because
+ // bit-flag enum types sometimes look like literal enum types with numeric literal values.
+ if (s & (4 /* Number */ | 64 /* NumberLiteral */) && !(s & 256 /* EnumLiteral */) && (t & 16 /* Enum */ || t & 64 /* NumberLiteral */ && t & 256 /* EnumLiteral */))
return true;
- }
}
return false;
}
@@ -33142,6 +34692,7 @@ var ts;
var expandingFlags;
var depth = 0;
var overflow = false;
+ var isIntersectionConstituent = false;
ts.Debug.assert(relation !== identityRelation || !errorNode, "no error reporting in identity checking");
var result = isRelatedTo(source, target, /*reportErrors*/ !!errorNode, headMessage);
if (overflow) {
@@ -33162,8 +34713,8 @@ var ts;
var sourceType = typeToString(source);
var targetType = typeToString(target);
if (sourceType === targetType) {
- sourceType = typeToString(source, /*enclosingDeclaration*/ undefined, 128 /* UseFullyQualifiedType */);
- targetType = typeToString(target, /*enclosingDeclaration*/ undefined, 128 /* UseFullyQualifiedType */);
+ sourceType = typeToString(source, /*enclosingDeclaration*/ undefined, 256 /* UseFullyQualifiedType */);
+ targetType = typeToString(target, /*enclosingDeclaration*/ undefined, 256 /* UseFullyQualifiedType */);
}
if (!message) {
if (relation === comparableRelation) {
@@ -33214,7 +34765,6 @@ var ts;
* * Ternary.False if they are not related.
*/
function isRelatedTo(source, target, reportErrors, headMessage) {
- var result;
if (source.flags & 96 /* StringOrNumberLiteral */ && source.flags & 1048576 /* FreshLiteral */) {
source = source.regularType;
}
@@ -33244,31 +34794,38 @@ var ts;
source = getRegularTypeOfObjectLiteral(source);
}
}
+ if (relation !== comparableRelation &&
+ !(source.flags & 196608 /* UnionOrIntersection */) &&
+ !(target.flags & 65536 /* Union */) &&
+ !isIntersectionConstituent &&
+ source !== globalObjectType &&
+ getPropertiesOfType(source).length > 0 &&
+ isWeakType(target) &&
+ !hasCommonProperties(source, target)) {
+ if (reportErrors) {
+ reportError(ts.Diagnostics.Type_0_has_no_properties_in_common_with_type_1, typeToString(source), typeToString(target));
+ }
+ return 0 /* False */;
+ }
+ var result = 0 /* False */;
var saveErrorInfo = errorInfo;
+ var saveIsIntersectionConstituent = isIntersectionConstituent;
+ isIntersectionConstituent = false;
// Note that these checks are specifically ordered to produce correct results. In particular,
// we need to deconstruct unions before intersections (because unions are always at the top),
// and we need to handle "each" relations before "some" relations for the same kind of type.
if (source.flags & 65536 /* Union */) {
- if (relation === comparableRelation) {
- result = someTypeRelatedToType(source, target, reportErrors && !(source.flags & 8190 /* Primitive */));
- }
- else {
- result = eachTypeRelatedToType(source, target, reportErrors && !(source.flags & 8190 /* Primitive */));
- }
- if (result) {
- return result;
- }
+ result = relation === comparableRelation ?
+ someTypeRelatedToType(source, target, reportErrors && !(source.flags & 8190 /* Primitive */)) :
+ eachTypeRelatedToType(source, target, reportErrors && !(source.flags & 8190 /* Primitive */));
}
else {
if (target.flags & 65536 /* Union */) {
- if (result = typeRelatedToSomeType(source, target, reportErrors && !(source.flags & 8190 /* Primitive */) && !(target.flags & 8190 /* Primitive */))) {
- return result;
- }
+ result = typeRelatedToSomeType(source, target, reportErrors && !(source.flags & 8190 /* Primitive */) && !(target.flags & 8190 /* Primitive */));
}
else if (target.flags & 131072 /* Intersection */) {
- if (result = typeRelatedToEachType(source, target, reportErrors)) {
- return result;
- }
+ isIntersectionConstituent = true;
+ result = typeRelatedToEachType(source, target, reportErrors);
}
else if (source.flags & 131072 /* Intersection */) {
// Check to see if any constituents of the intersection are immediately related to the target.
@@ -33284,18 +34841,16 @@ var ts;
//
// - 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;
- }
+ result = someTypeRelatedToType(source, target, /*reportErrors*/ false);
}
- if (source.flags & 1032192 /* StructuredOrTypeVariable */ || target.flags & 1032192 /* StructuredOrTypeVariable */) {
+ if (!result && (source.flags & 1032192 /* StructuredOrTypeVariable */ || target.flags & 1032192 /* StructuredOrTypeVariable */)) {
if (result = recursiveTypeRelatedTo(source, target, reportErrors)) {
errorInfo = saveErrorInfo;
- return result;
}
}
}
- if (reportErrors) {
+ isIntersectionConstituent = saveIsIntersectionConstituent;
+ if (!result && reportErrors) {
if (source.flags & 32768 /* Object */ && target.flags & 8190 /* Primitive */) {
tryElaborateErrorsForPrimitivesAndObjects(source, target);
}
@@ -33304,7 +34859,7 @@ var ts;
}
reportRelationError(headMessage, source, target);
}
- return 0 /* False */;
+ return result;
}
function isIdenticalTo(source, target) {
var result;
@@ -33321,29 +34876,6 @@ var ts;
}
return 0 /* False */;
}
- // Check if a property with the given name is known anywhere in the given type. In an object type, a property
- // 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, isComparingJsxAttributes) {
- if (type.flags & 32768 /* Object */) {
- var resolved = resolveStructuredTypeMembers(type);
- 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, isComparingJsxAttributes)) {
- return true;
- }
- }
- }
- return false;
- }
function hasExcessProperties(source, target, reportErrors) {
if (maybeTypeOfKind(target, 32768 /* Object */) && !(getObjectFlags(target) & 512 /* ObjectLiteralPatternWithComputedProperties */)) {
var isComparingJsxAttributes = !!(source.flags & 33554432 /* JsxAttributes */);
@@ -33351,8 +34883,7 @@ var ts;
(isTypeSubsetOf(globalObjectType, target) || (!isComparingJsxAttributes && isEmptyObjectType(target)))) {
return false;
}
- for (var _i = 0, _a = getPropertiesOfObjectType(source); _i < _a.length; _i++) {
- var prop = _a[_i];
+ var _loop_4 = function (prop) {
if (!isKnownProperty(target, prop.name, isComparingJsxAttributes)) {
if (reportErrors) {
// We know *exactly* where things went wrong when comparing the types.
@@ -33365,12 +34896,22 @@ var ts;
reportError(ts.Diagnostics.Property_0_does_not_exist_on_type_1, symbolToString(prop), typeToString(target));
}
else {
- errorNode = prop.valueDeclaration;
+ // use the property's value declaration if the property is assigned inside the literal itself
+ var objectLiteralDeclaration_1 = source.symbol && ts.firstOrUndefined(source.symbol.declarations);
+ if (prop.valueDeclaration && ts.findAncestor(prop.valueDeclaration, function (d) { return d === objectLiteralDeclaration_1; })) {
+ 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;
+ return { value: true };
}
+ };
+ for (var _i = 0, _a = getPropertiesOfObjectType(source); _i < _a.length; _i++) {
+ var prop = _a[_i];
+ var state_2 = _loop_4(prop);
+ if (typeof state_2 === "object")
+ return state_2.value;
}
}
return false;
@@ -33732,10 +35273,10 @@ var ts;
}
}
else if (!(targetProp.flags & 16777216 /* Prototype */)) {
- var sourcePropFlags = getDeclarationModifierFlagsFromSymbol(sourceProp);
- var targetPropFlags = getDeclarationModifierFlagsFromSymbol(targetProp);
+ var sourcePropFlags = ts.getDeclarationModifierFlagsFromSymbol(sourceProp);
+ var targetPropFlags = ts.getDeclarationModifierFlagsFromSymbol(targetProp);
if (sourcePropFlags & 8 /* Private */ || targetPropFlags & 8 /* Private */) {
- if (getCheckFlags(sourceProp) & 256 /* ContainsPrivate */) {
+ if (ts.getCheckFlags(sourceProp) & 256 /* ContainsPrivate */) {
if (reportErrors) {
reportError(ts.Diagnostics.Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1, symbolToString(sourceProp), typeToString(source));
}
@@ -33794,6 +35335,33 @@ var ts;
}
return result;
}
+ /**
+ * A type is 'weak' if it is an object type with at least one optional property
+ * and no required properties, call/construct signatures or index signatures
+ */
+ function isWeakType(type) {
+ if (type.flags & 32768 /* Object */) {
+ var resolved = resolveStructuredTypeMembers(type);
+ return resolved.callSignatures.length === 0 && resolved.constructSignatures.length === 0 &&
+ !resolved.stringIndexInfo && !resolved.numberIndexInfo &&
+ resolved.properties.length > 0 &&
+ ts.every(resolved.properties, function (p) { return !!(p.flags & 67108864 /* Optional */); });
+ }
+ if (type.flags & 131072 /* Intersection */) {
+ return ts.every(type.types, isWeakType);
+ }
+ return false;
+ }
+ function hasCommonProperties(source, target) {
+ var isComparingJsxAttributes = !!(source.flags & 33554432 /* JsxAttributes */);
+ for (var _i = 0, _a = getPropertiesOfType(source); _i < _a.length; _i++) {
+ var prop = _a[_i];
+ if (isKnownProperty(target, prop.name, isComparingJsxAttributes)) {
+ return true;
+ }
+ }
+ return false;
+ }
function propertiesIdenticalTo(source, target) {
if (!(source.flags & 32768 /* Object */ && target.flags & 32768 /* Object */)) {
return 0 /* False */;
@@ -33844,32 +35412,57 @@ var ts;
}
var result = -1 /* True */;
var saveErrorInfo = errorInfo;
- outer: for (var _i = 0, targetSignatures_1 = targetSignatures; _i < targetSignatures_1.length; _i++) {
- var t = targetSignatures_1[_i];
- // Only elaborate errors from the first failure
- var shouldElaborateErrors = reportErrors;
- for (var _a = 0, sourceSignatures_1 = sourceSignatures; _a < sourceSignatures_1.length; _a++) {
- var s = sourceSignatures_1[_a];
- var related = signatureRelatedTo(s, t, shouldElaborateErrors);
- if (related) {
- result &= related;
- errorInfo = saveErrorInfo;
- continue outer;
+ if (getObjectFlags(source) & 64 /* Instantiated */ && getObjectFlags(target) & 64 /* Instantiated */ && source.symbol === target.symbol) {
+ // We have instantiations of the same anonymous type (which typically will be the type of a
+ // method). Simply do a pairwise comparison of the signatures in the two signature lists instead
+ // of the much more expensive N * M comparison matrix we explore below. We erase type parameters
+ // as they are known to always be the same.
+ for (var i = 0; i < targetSignatures.length; i++) {
+ var related = signatureRelatedTo(sourceSignatures[i], targetSignatures[i], /*erase*/ true, reportErrors);
+ if (!related) {
+ return 0 /* False */;
}
- shouldElaborateErrors = false;
+ result &= related;
}
- if (shouldElaborateErrors) {
- reportError(ts.Diagnostics.Type_0_provides_no_match_for_the_signature_1, typeToString(source), signatureToString(t, /*enclosingDeclaration*/ undefined, /*flags*/ undefined, kind));
+ }
+ else if (sourceSignatures.length === 1 && targetSignatures.length === 1) {
+ // For simple functions (functions with a single signature) we only erase type parameters for
+ // the comparable relation. Otherwise, if the source signature is generic, we instantiate it
+ // in the context of the target signature before checking the relationship. Ideally we'd do
+ // this regardless of the number of signatures, but the potential costs are prohibitive due
+ // to the quadratic nature of the logic below.
+ var eraseGenerics = relation === comparableRelation || compilerOptions.noStrictGenericChecks;
+ result = signatureRelatedTo(sourceSignatures[0], targetSignatures[0], eraseGenerics, reportErrors);
+ }
+ else {
+ outer: for (var _i = 0, targetSignatures_1 = targetSignatures; _i < targetSignatures_1.length; _i++) {
+ var t = targetSignatures_1[_i];
+ // Only elaborate errors from the first failure
+ var shouldElaborateErrors = reportErrors;
+ for (var _a = 0, sourceSignatures_1 = sourceSignatures; _a < sourceSignatures_1.length; _a++) {
+ var s = sourceSignatures_1[_a];
+ var related = signatureRelatedTo(s, t, /*erase*/ true, shouldElaborateErrors);
+ if (related) {
+ result &= related;
+ errorInfo = saveErrorInfo;
+ continue outer;
+ }
+ shouldElaborateErrors = false;
+ }
+ if (shouldElaborateErrors) {
+ reportError(ts.Diagnostics.Type_0_provides_no_match_for_the_signature_1, typeToString(source), signatureToString(t, /*enclosingDeclaration*/ undefined, /*flags*/ undefined, kind));
+ }
+ return 0 /* False */;
}
- return 0 /* False */;
}
return result;
}
/**
* See signatureAssignableTo, compareSignaturesIdentical
*/
- function signatureRelatedTo(source, target, reportErrors) {
- return compareSignaturesRelated(source, target, /*ignoreReturnTypes*/ false, reportErrors, reportError, isRelatedTo);
+ function signatureRelatedTo(source, target, erase, reportErrors) {
+ return compareSignaturesRelated(erase ? getErasedSignature(source) : source, erase ? getErasedSignature(target) : target,
+ /*checkAsCallback*/ false, /*ignoreReturnTypes*/ false, reportErrors, reportError, isRelatedTo);
}
function signaturesIdenticalTo(source, target, kind) {
var sourceSignatures = getSignaturesOfType(source, kind);
@@ -33981,7 +35574,7 @@ var ts;
// 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 */) {
+ if (ts.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);
@@ -34008,13 +35601,13 @@ var ts;
}
// 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 */ ?
+ return !forEachProperty(targetProp, function (tp) { return ts.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 */ ?
+ return forEachProperty(prop, function (p) { return ts.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
@@ -34063,8 +35656,8 @@ var ts;
if (sourceProp === targetProp) {
return -1 /* True */;
}
- var sourcePropAccessibility = getDeclarationModifierFlagsFromSymbol(sourceProp) & 24 /* NonPublicAccessibilityModifier */;
- var targetPropAccessibility = getDeclarationModifierFlagsFromSymbol(targetProp) & 24 /* NonPublicAccessibilityModifier */;
+ var sourcePropAccessibility = ts.getDeclarationModifierFlagsFromSymbol(sourceProp) & 24 /* NonPublicAccessibilityModifier */;
+ var targetPropAccessibility = ts.getDeclarationModifierFlagsFromSymbol(targetProp) & 24 /* NonPublicAccessibilityModifier */;
if (sourcePropAccessibility !== targetPropAccessibility) {
return 0 /* False */;
}
@@ -34157,18 +35750,10 @@ var ts;
function isRestParameterIndex(signature, parameterIndex) {
return signature.hasRestParameter && parameterIndex >= signature.parameters.length - 1;
}
- function isSupertypeOfEach(candidate, types) {
- 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;
- }
- return true;
- }
function literalTypesWithSameBaseType(types) {
var commonBaseType;
- for (var _i = 0, types_11 = types; _i < types_11.length; _i++) {
- var t = types_11[_i];
+ for (var _i = 0, types_9 = types; _i < types_9.length; _i++) {
+ var t = types_9[_i];
var baseType = getBaseTypeOfLiteralType(t);
if (!commonBaseType) {
commonBaseType = baseType;
@@ -34179,55 +35764,22 @@ var ts;
}
return true;
}
- // When the candidate types are all literal types with the same base type, the common
- // supertype is a union of those literal types. Otherwise, the common supertype is the
- // first type that is a supertype of each of the other types.
+ // When the candidate types are all literal types with the same base type, return a union
+ // of those literal types. Otherwise, return the leftmost type for which no type to the
+ // right is a supertype.
function getSupertypeOrUnion(types) {
- return literalTypesWithSameBaseType(types) ? getUnionType(types) : ts.forEach(types, function (t) { return isSupertypeOfEach(t, types) ? t : undefined; });
+ return literalTypesWithSameBaseType(types) ?
+ getUnionType(types) :
+ ts.reduceLeft(types, function (s, t) { return isTypeSubtypeOf(s, t) ? t : s; });
}
function getCommonSupertype(types) {
if (!strictNullChecks) {
return getSupertypeOrUnion(types);
}
var primaryTypes = ts.filter(types, function (t) { return !(t.flags & 6144 /* Nullable */); });
- if (!primaryTypes.length) {
- return getUnionType(types, /*subtypeReduction*/ true);
- }
- var supertype = getSupertypeOrUnion(primaryTypes);
- return supertype && includeFalsyTypes(supertype, getFalsyFlagsOfTypes(types) & 6144 /* Nullable */);
- }
- function reportNoCommonSupertypeError(types, errorLocation, errorMessageChainHead) {
- // The downfallType/bestSupertypeDownfallType is the first type that caused a particular candidate
- // to not be the common supertype. So if it weren't for this one downfallType (and possibly others),
- // the type in question could have been the common supertype.
- var bestSupertype;
- var bestSupertypeDownfallType;
- var bestSupertypeScore = 0;
- for (var i = 0; i < types.length; i++) {
- var score = 0;
- var downfallType = undefined;
- for (var j = 0; j < types.length; j++) {
- if (isTypeSubtypeOf(types[j], types[i])) {
- score++;
- }
- else if (!downfallType) {
- downfallType = types[j];
- }
- }
- ts.Debug.assert(!!downfallType, "If there is no common supertype, each type should have a downfallType");
- if (score > bestSupertypeScore) {
- bestSupertype = types[i];
- bestSupertypeDownfallType = downfallType;
- bestSupertypeScore = score;
- }
- // types.length - 1 is the maximum score, given that getCommonSupertype returned false
- if (bestSupertypeScore === types.length - 1) {
- break;
- }
- }
- // In the following errors, the {1} slot is before the {0} slot because checkTypeSubtypeOf supplies the
- // subtype as the first argument to the error
- checkTypeSubtypeOf(bestSupertypeDownfallType, bestSupertype, errorLocation, ts.Diagnostics.Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0, errorMessageChainHead);
+ return primaryTypes.length ?
+ getNullableType(getSupertypeOrUnion(primaryTypes), getFalsyFlagsOfTypes(types) & 6144 /* Nullable */) :
+ getUnionType(types, /*subtypeReduction*/ true);
}
function isArrayType(type) {
return getObjectFlags(type) & 4 /* Reference */ && type.target === globalArrayType;
@@ -34242,27 +35794,27 @@ var ts;
return !!getPropertyOfType(type, "0");
}
function isUnitType(type) {
- return (type.flags & (480 /* Literal */ | 2048 /* Undefined */ | 4096 /* Null */)) !== 0;
+ return (type.flags & (224 /* Literal */ | 2048 /* Undefined */ | 4096 /* Null */)) !== 0;
}
function isLiteralType(type) {
return type.flags & 8 /* Boolean */ ? true :
- type.flags & 65536 /* Union */ ? type.flags & 16 /* Enum */ ? true : !ts.forEach(type.types, function (t) { return !isUnitType(t); }) :
+ type.flags & 65536 /* Union */ ? type.flags & 256 /* EnumLiteral */ ? true : !ts.forEach(type.types, function (t) { return !isUnitType(t); }) :
isUnitType(type);
}
function getBaseTypeOfLiteralType(type) {
- return type.flags & 32 /* StringLiteral */ ? stringType :
- type.flags & 64 /* NumberLiteral */ ? numberType :
- type.flags & 128 /* BooleanLiteral */ ? booleanType :
- type.flags & 256 /* EnumLiteral */ ? type.baseType :
- type.flags & 65536 /* Union */ && !(type.flags & 16 /* Enum */) ? getUnionType(ts.sameMap(type.types, getBaseTypeOfLiteralType)) :
+ return type.flags & 256 /* EnumLiteral */ ? getBaseTypeOfEnumLiteralType(type) :
+ type.flags & 32 /* StringLiteral */ ? stringType :
+ type.flags & 64 /* NumberLiteral */ ? numberType :
+ type.flags & 128 /* BooleanLiteral */ ? booleanType :
+ type.flags & 65536 /* Union */ ? getUnionType(ts.sameMap(type.types, getBaseTypeOfLiteralType)) :
type;
}
function getWidenedLiteralType(type) {
- return type.flags & 32 /* StringLiteral */ && type.flags & 1048576 /* FreshLiteral */ ? stringType :
- type.flags & 64 /* NumberLiteral */ && type.flags & 1048576 /* FreshLiteral */ ? numberType :
- type.flags & 128 /* BooleanLiteral */ ? booleanType :
- type.flags & 256 /* EnumLiteral */ ? type.baseType :
- type.flags & 65536 /* Union */ && !(type.flags & 16 /* Enum */) ? getUnionType(ts.sameMap(type.types, getWidenedLiteralType)) :
+ return type.flags & 256 /* EnumLiteral */ ? getBaseTypeOfEnumLiteralType(type) :
+ type.flags & 32 /* StringLiteral */ && type.flags & 1048576 /* FreshLiteral */ ? stringType :
+ type.flags & 64 /* NumberLiteral */ && type.flags & 1048576 /* FreshLiteral */ ? numberType :
+ type.flags & 128 /* BooleanLiteral */ ? booleanType :
+ type.flags & 65536 /* Union */ ? getUnionType(ts.sameMap(type.types, getWidenedLiteralType)) :
type;
}
/**
@@ -34274,8 +35826,8 @@ var ts;
}
function getFalsyFlagsOfTypes(types) {
var result = 0;
- for (var _i = 0, types_12 = types; _i < types_12.length; _i++) {
- var t = types_12[_i];
+ for (var _i = 0, types_10 = types; _i < types_10.length; _i++) {
+ var t = types_10[_i];
result |= getFalsyFlags(t);
}
return result;
@@ -34285,35 +35837,35 @@ var ts;
// no flags for all other types (including non-falsy literal types).
function getFalsyFlags(type) {
return type.flags & 65536 /* Union */ ? getFalsyFlagsOfTypes(type.types) :
- type.flags & 32 /* StringLiteral */ ? type.text === "" ? 32 /* StringLiteral */ : 0 :
- type.flags & 64 /* NumberLiteral */ ? type.text === "0" ? 64 /* NumberLiteral */ : 0 :
+ type.flags & 32 /* StringLiteral */ ? type.value === "" ? 32 /* StringLiteral */ : 0 :
+ type.flags & 64 /* NumberLiteral */ ? type.value === 0 ? 64 /* NumberLiteral */ : 0 :
type.flags & 128 /* BooleanLiteral */ ? type === falseType ? 128 /* BooleanLiteral */ : 0 :
type.flags & 7406 /* PossiblyFalsy */;
}
- function includeFalsyTypes(type, flags) {
- if ((getFalsyFlags(type) & flags) === flags) {
- return type;
- }
- var types = [type];
- if (flags & 262178 /* StringLike */)
- types.push(emptyStringType);
- if (flags & 340 /* NumberLike */)
- types.push(zeroType);
- if (flags & 136 /* BooleanLike */)
- types.push(falseType);
- if (flags & 1024 /* Void */)
- types.push(voidType);
- if (flags & 2048 /* Undefined */)
- types.push(undefinedType);
- if (flags & 4096 /* Null */)
- types.push(nullType);
- return getUnionType(types);
- }
function removeDefinitelyFalsyTypes(type) {
return getFalsyFlags(type) & 7392 /* DefinitelyFalsy */ ?
filterType(type, function (t) { return !(getFalsyFlags(t) & 7392 /* DefinitelyFalsy */); }) :
type;
}
+ function extractDefinitelyFalsyTypes(type) {
+ return mapType(type, getDefinitelyFalsyPartOfType);
+ }
+ function getDefinitelyFalsyPartOfType(type) {
+ return type.flags & 2 /* String */ ? emptyStringType :
+ type.flags & 4 /* Number */ ? zeroType :
+ type.flags & 8 /* Boolean */ || type === falseType ? falseType :
+ type.flags & (1024 /* Void */ | 2048 /* Undefined */ | 4096 /* Null */) ||
+ type.flags & 32 /* StringLiteral */ && type.value === "" ||
+ type.flags & 64 /* NumberLiteral */ && type.value === 0 ? type :
+ neverType;
+ }
+ function getNullableType(type, flags) {
+ var missing = (flags & ~type.flags) & (2048 /* Undefined */ | 4096 /* Null */);
+ return missing === 0 ? type :
+ missing === 2048 /* Undefined */ ? getUnionType([type, undefinedType]) :
+ missing === 4096 /* Null */ ? getUnionType([type, nullType]) :
+ getUnionType([type, undefinedType, nullType]);
+ }
function getNonNullableType(type) {
return strictNullChecks ? getTypeWithFacts(type, 524288 /* NEUndefinedOrNull */) : type;
}
@@ -34480,7 +36032,7 @@ var ts;
default:
diagnostic = ts.Diagnostics.Variable_0_implicitly_has_an_1_type;
}
- error(declaration, diagnostic, ts.declarationNameToString(declaration.name), typeAsString);
+ error(declaration, diagnostic, ts.declarationNameToString(ts.getNameOfDeclaration(declaration)), typeAsString);
}
function reportErrorsFromWidening(declaration, type) {
if (produceDiagnostics && noImplicitAny && type.flags & 2097152 /* ContainsWideningType */) {
@@ -34510,22 +36062,42 @@ var ts;
callback(getTypeAtPosition(source, i), getTypeAtPosition(target, i));
}
}
- function createInferenceContext(signature, inferUnionTypes, useAnyForNoInferences) {
- var inferences = ts.map(signature.typeParameters, createTypeInferencesObject);
+ function createInferenceContext(signature, flags, baseInferences) {
+ var inferences = baseInferences ? ts.map(baseInferences, cloneInferenceInfo) : ts.map(signature.typeParameters, createInferenceInfo);
+ var context = mapper;
+ context.mappedTypes = signature.typeParameters;
+ context.signature = signature;
+ context.inferences = inferences;
+ context.flags = flags;
+ return context;
+ function mapper(t) {
+ for (var i = 0; i < inferences.length; i++) {
+ if (t === inferences[i].typeParameter) {
+ inferences[i].isFixed = true;
+ return getInferredType(context, i);
+ }
+ }
+ return t;
+ }
+ }
+ function createInferenceInfo(typeParameter) {
return {
- signature: signature,
- inferUnionTypes: inferUnionTypes,
- inferences: inferences,
- inferredTypes: new Array(signature.typeParameters.length),
- useAnyForNoInferences: useAnyForNoInferences
+ typeParameter: typeParameter,
+ candidates: undefined,
+ inferredType: undefined,
+ priority: undefined,
+ topLevel: true,
+ isFixed: false
};
}
- function createTypeInferencesObject() {
+ function cloneInferenceInfo(inference) {
return {
- primary: undefined,
- secondary: undefined,
- topLevel: true,
- isFixed: false,
+ typeParameter: inference.typeParameter,
+ candidates: inference.candidates && inference.candidates.slice(),
+ inferredType: inference.inferredType,
+ priority: inference.priority,
+ topLevel: inference.topLevel,
+ isFixed: inference.isFixed
};
}
// Return true if the given type could possibly reference a type parameter for which
@@ -34535,7 +36107,7 @@ var ts;
var objectFlags = getObjectFlags(type);
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 & 16 /* Anonymous */ && type.symbol && type.symbol.flags & (16 /* Function */ | 8192 /* Method */ | 2048 /* TypeLiteral */ | 32 /* Class */) ||
objectFlags & 32 /* Mapped */ ||
type.flags & 196608 /* UnionOrIntersection */ && couldUnionOrIntersectionContainTypeVariables(type));
}
@@ -34558,14 +36130,13 @@ var ts;
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 typeParameter = getIndexedAccessType(getConstraintTypeFromMappedType(target).type, getTypeParameterFromMappedType(target));
+ var inference = createInferenceInfo(typeParameter);
+ var inferences = [inference];
var templateType = getTemplateTypeFromMappedType(target);
var readonlyMask = target.declaration.readonlyToken ? false : true;
var optionalMask = target.declaration.questionToken ? 0 : 67108864 /* Optional */;
- var members = createSymbolTable(properties);
+ var members = ts.createMap();
for (var _i = 0, properties_5 = properties; _i < properties_5.length; _i++) {
var prop = properties_5[_i];
var inferredPropType = inferTargetType(getTypeOfSymbol(prop));
@@ -34587,31 +36158,16 @@ var ts;
}
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);
+ inference.candidates = undefined;
+ inferTypes(inferences, sourceType, templateType);
+ return inference.candidates && getUnionType(inference.candidates, /*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;
- var inferiority = 0;
- var visited = ts.createMap();
+ function inferTypes(inferences, originalSource, originalTarget, priority) {
+ if (priority === void 0) { priority = 0; }
+ var symbolStack;
+ var visited;
inferFromTypes(originalSource, originalTarget);
- function isInProcess(source, target) {
- for (var i = 0; i < depth; i++) {
- if (source === sourceStack[i] && target === targetStack[i]) {
- return true;
- }
- }
- return false;
- }
function inferFromTypes(source, target) {
if (!couldContainTypeVariables(target)) {
return;
@@ -34626,7 +36182,7 @@ var ts;
}
return;
}
- if (source.flags & 65536 /* Union */ && target.flags & 65536 /* Union */ && !(source.flags & 16 /* Enum */ && target.flags & 16 /* Enum */) ||
+ if (source.flags & 65536 /* Union */ && target.flags & 65536 /* Union */ && !(source.flags & 256 /* EnumLiteral */ && target.flags & 256 /* EnumLiteral */) ||
source.flags & 131072 /* Intersection */ && target.flags & 131072 /* Intersection */) {
// Source and target are both unions or both intersections. If source and target
// are the same type, just relate each constituent type to itself.
@@ -34671,32 +36227,26 @@ var ts;
// Because the anyFunctionType is internal, it should not be exposed to the user by adding
// it as an inference candidate. Hopefully, a better candidate will come along that does
// not contain anyFunctionType when we come back to this argument for its second round
- // of inference.
- if (source.flags & 8388608 /* ContainsAnyFunctionType */) {
+ // of inference. Also, we exclude inferences for silentNeverType which is used as a wildcard
+ // when constructing types from type parameters that had no inference candidates.
+ if (source.flags & 8388608 /* ContainsAnyFunctionType */ || source === silentNeverType) {
return;
}
- 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
- // T | string[], we really don't know if we should be inferring to T or not (because
- // the correct constituent on the target side could be string[]). Therefore, we put
- // such inferior inferences into a secondary bucket, and only use them if the primary
- // bucket is empty.
- var candidates = inferiority ?
- inferences.secondary || (inferences.secondary = []) :
- inferences.primary || (inferences.primary = []);
- if (!ts.contains(candidates, source)) {
- candidates.push(source);
- }
- if (target.flags & 16384 /* TypeParameter */ && !isTypeParameterAtTopLevel(originalTarget, target)) {
- inferences.topLevel = false;
- }
+ var inference = getInferenceInfoForType(target);
+ if (inference) {
+ if (!inference.isFixed) {
+ if (!inference.candidates || priority < inference.priority) {
+ inference.candidates = [source];
+ inference.priority = priority;
+ }
+ else if (priority === inference.priority) {
+ inference.candidates.push(source);
+ }
+ if (!(priority & 4 /* ReturnType */) && target.flags & 16384 /* TypeParameter */ && !isTypeParameterAtTopLevel(originalTarget, target)) {
+ inference.topLevel = false;
}
- return;
}
+ return;
}
}
else if (getObjectFlags(source) & 4 /* Reference */ && getObjectFlags(target) & 4 /* Reference */ && source.target === target.target) {
@@ -34715,7 +36265,7 @@ var ts;
// 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)) {
+ if (getInferenceInfoForType(t)) {
typeVariable = t;
typeVariableCount++;
}
@@ -34727,9 +36277,10 @@ var ts;
// variable. This gives meaningful results for union types in co-variant positions and intersection
// types in contra-variant positions (such as callback parameters).
if (typeVariableCount === 1) {
- inferiority++;
+ var savePriority = priority;
+ priority |= 1 /* NakedTypeVariable */;
inferFromTypes(source, typeVariable);
- inferiority--;
+ priority = savePriority;
}
}
else if (source.flags & 196608 /* UnionOrIntersection */) {
@@ -34743,28 +36294,42 @@ var ts;
else {
source = getApparentType(source);
if (source.flags & 32768 /* Object */) {
- if (isInProcess(source, target)) {
+ var key = source.id + "," + target.id;
+ if (visited && visited.get(key)) {
return;
}
- if (isDeeplyNestedType(source, sourceStack, depth) && isDeeplyNestedType(target, targetStack, depth)) {
- return;
+ (visited || (visited = ts.createMap())).set(key, true);
+ // If we are already processing another target type with the same associated symbol (such as
+ // an instantiation of the same generic type), we do not explore this target as it would yield
+ // no further inferences. We exclude the static side of classes from this check since it shares
+ // its symbol with the instance side which would lead to false positives.
+ var isNonConstructorObject = target.flags & 32768 /* Object */ &&
+ !(getObjectFlags(target) & 16 /* Anonymous */ && target.symbol && target.symbol.flags & 32 /* Class */);
+ var symbol = isNonConstructorObject ? target.symbol : undefined;
+ if (symbol) {
+ if (ts.contains(symbolStack, symbol)) {
+ return;
+ }
+ (symbolStack || (symbolStack = [])).push(symbol);
+ inferFromObjectTypes(source, target);
+ symbolStack.pop();
}
- var key = source.id + "," + target.id;
- if (visited.get(key)) {
- return;
+ else {
+ inferFromObjectTypes(source, target);
}
- visited.set(key, true);
- if (depth === 0) {
- sourceStack = [];
- targetStack = [];
+ }
+ }
+ }
+ function getInferenceInfoForType(type) {
+ if (type.flags & 540672 /* TypeVariable */) {
+ for (var _i = 0, inferences_1 = inferences; _i < inferences_1.length; _i++) {
+ var inference = inferences_1[_i];
+ if (type === inference.typeParameter) {
+ return inference;
}
- sourceStack[depth] = source;
- targetStack[depth] = target;
- depth++;
- inferFromObjectTypes(source, target);
- depth--;
}
}
+ return undefined;
}
function inferFromObjectTypes(source, target) {
if (getObjectFlags(target) & 32 /* Mapped */) {
@@ -34774,13 +36339,14 @@ var ts;
// 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 inference = getInferenceInfoForType(constraintType.type);
+ if (inference && !inference.isFixed) {
var inferredType = inferTypeForHomomorphicMappedType(source, target);
if (inferredType) {
- inferiority++;
- inferFromTypes(inferredType, typeVariables[index]);
- inferiority--;
+ var savePriority = priority;
+ priority |= 2 /* MappedType */;
+ inferFromTypes(inferredType, inference.typeParameter);
+ priority = savePriority;
}
}
return;
@@ -34851,8 +36417,8 @@ var ts;
}
}
function typeIdenticalToSomeType(type, types) {
- for (var _i = 0, types_13 = types; _i < types_13.length; _i++) {
- var t = types_13[_i];
+ for (var _i = 0, types_11 = types; _i < types_11.length; _i++) {
+ var t = types_11[_i];
if (isTypeIdenticalTo(t, type)) {
return true;
}
@@ -34873,33 +36439,33 @@ var ts;
}
return type.flags & 65536 /* Union */ ? getUnionType(reducedTypes) : getIntersectionType(reducedTypes);
}
- function getInferenceCandidates(context, index) {
- var inferences = context.inferences[index];
- return inferences.primary || inferences.secondary || emptyArray;
- }
function hasPrimitiveConstraint(type) {
var constraint = getConstraintOfTypeParameter(type);
return constraint && maybeTypeOfKind(constraint, 8190 /* Primitive */ | 262144 /* Index */);
}
function getInferredType(context, index) {
- var inferredType = context.inferredTypes[index];
- var inferenceSucceeded;
+ var inference = context.inferences[index];
+ var inferredType = inference.inferredType;
if (!inferredType) {
- var inferences = getInferenceCandidates(context, index);
- if (inferences.length) {
+ if (inference.candidates) {
// We widen inferred literal types if
// all inferences were made to top-level ocurrences of the type parameter, and
// the type parameter has no constraint or its constraint includes no primitive or literal types, and
// the type parameter was fixed during inference or does not occur at top-level in the return type.
var signature = context.signature;
- var widenLiteralTypes = context.inferences[index].topLevel &&
- !hasPrimitiveConstraint(signature.typeParameters[index]) &&
- (context.inferences[index].isFixed || !isTypeParameterAtTopLevel(getReturnTypeOfSignature(signature), signature.typeParameters[index]));
- var baseInferences = widenLiteralTypes ? ts.sameMap(inferences, getWidenedLiteralType) : inferences;
- // Infer widened union or supertype, or the unknown type for no common supertype
- var unionOrSuperType = context.inferUnionTypes ? getUnionType(baseInferences, /*subtypeReduction*/ true) : getCommonSupertype(baseInferences);
- inferredType = unionOrSuperType ? getWidenedType(unionOrSuperType) : unknownType;
- inferenceSucceeded = !!unionOrSuperType;
+ var widenLiteralTypes = inference.topLevel &&
+ !hasPrimitiveConstraint(inference.typeParameter) &&
+ (inference.isFixed || !isTypeParameterAtTopLevel(getReturnTypeOfSignature(signature), inference.typeParameter));
+ var baseCandidates = widenLiteralTypes ? ts.sameMap(inference.candidates, getWidenedLiteralType) : inference.candidates;
+ // Infer widened union or supertype, or the unknown type for no common supertype. We infer union types
+ // for inferences coming from return types in order to avoid common supertype failures.
+ var unionOrSuperType = context.flags & 1 /* InferUnionTypes */ || inference.priority & 4 /* ReturnType */ ?
+ getUnionType(baseCandidates, /*subtypeReduction*/ true) : getCommonSupertype(baseCandidates);
+ inferredType = getWidenedType(unionOrSuperType);
+ }
+ else if (context.flags & 2 /* NoDefault */) {
+ // We use silentNeverType as the wildcard that signals no inferences.
+ inferredType = silentNeverType;
}
else {
// Infer either the default or the empty object type when no inferences were
@@ -34907,48 +36473,39 @@ var ts;
// 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.
- var defaultType = getDefaultFromTypeParameter(context.signature.typeParameters[index]);
+ var defaultType = getDefaultFromTypeParameter(inference.typeParameter);
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)));
+ inferredType = instantiateType(defaultType, combineTypeMappers(createBackreferenceMapper(context.signature.typeParameters, index), context));
}
else {
- inferredType = context.useAnyForNoInferences ? anyType : emptyObjectType;
+ inferredType = context.flags & 4 /* AnyDefault */ ? anyType : emptyObjectType;
}
- inferenceSucceeded = true;
}
- context.inferredTypes[index] = inferredType;
- // Only do the constraint check if inference succeeded (to prevent cascading errors)
- if (inferenceSucceeded) {
- var constraint = getConstraintOfTypeParameter(context.signature.typeParameters[index]);
- if (constraint) {
- var instantiatedConstraint = instantiateType(constraint, getInferenceMapper(context));
- if (!isTypeAssignableTo(inferredType, getTypeWithThisArgument(instantiatedConstraint, inferredType))) {
- context.inferredTypes[index] = inferredType = instantiatedConstraint;
- }
+ inference.inferredType = inferredType;
+ var constraint = getConstraintOfTypeParameter(context.signature.typeParameters[index]);
+ if (constraint) {
+ var instantiatedConstraint = instantiateType(constraint, context);
+ if (!isTypeAssignableTo(inferredType, getTypeWithThisArgument(instantiatedConstraint, inferredType))) {
+ inference.inferredType = inferredType = instantiatedConstraint;
}
}
- else if (context.failedTypeParameterIndex === undefined || context.failedTypeParameterIndex > index) {
- // If inference failed, it is necessary to record the index of the failed type parameter (the one we are on).
- // It might be that inference has already failed on a later type parameter on a previous call to inferTypeArguments.
- // So if this failure is on preceding type parameter, this type parameter is the new failure index.
- context.failedTypeParameterIndex = index;
- }
}
return inferredType;
}
function getInferredTypes(context) {
- for (var i = 0; i < context.inferredTypes.length; i++) {
- getInferredType(context, i);
+ var result = [];
+ for (var i = 0; i < context.inferences.length; i++) {
+ result.push(getInferredType(context, i));
}
- return context.inferredTypes;
+ return result;
}
// EXPRESSION TYPE CHECKING
function getResolvedSymbol(node) {
var links = getNodeLinks(node);
if (!links.resolvedSymbol) {
- links.resolvedSymbol = !ts.nodeIsMissing(node) && resolveName(node, node.text, 107455 /* Value */ | 1048576 /* ExportValue */, ts.Diagnostics.Cannot_find_name_0, node) || unknownSymbol;
+ links.resolvedSymbol = !ts.nodeIsMissing(node) && resolveName(node, node.text, 107455 /* Value */ | 1048576 /* ExportValue */, ts.Diagnostics.Cannot_find_name_0, node, ts.Diagnostics.Cannot_find_name_0_Did_you_mean_1) || unknownSymbol;
}
return links.resolvedSymbol;
}
@@ -34961,11 +36518,13 @@ var ts;
// 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
// leftmost identifier followed by zero or more property names separated by dots.
- // The result is undefined if the reference isn't a dotted name.
+ // The result is undefined if the reference isn't a dotted name. We prefix nodes
+ // occurring in an apparent type position with '@' because the control flow type
+ // of such nodes may be based on the apparent type instead of the declared type.
function getFlowCacheKey(node) {
if (node.kind === 71 /* Identifier */) {
var symbol = getResolvedSymbol(node);
- return symbol !== unknownSymbol ? "" + getSymbolId(symbol) : undefined;
+ return symbol !== unknownSymbol ? (isApparentTypePosition(node) ? "@" : "") + getSymbolId(symbol) : undefined;
}
if (node.kind === 99 /* ThisKeyword */) {
return "0";
@@ -35034,7 +36593,7 @@ var ts;
function isDiscriminantProperty(type, name) {
if (type && type.flags & 65536 /* Union */) {
var prop = getUnionOrIntersectionProperty(type, name);
- if (prop && getCheckFlags(prop) & 2 /* SyntheticProperty */) {
+ if (prop && ts.getCheckFlags(prop) & 2 /* SyntheticProperty */) {
if (prop.isDiscriminantProperty === undefined) {
prop.isDiscriminantProperty = prop.checkFlags & 32 /* HasNonUniformType */ && isLiteralType(getTypeOfSymbol(prop));
}
@@ -35097,8 +36656,8 @@ var ts;
}
function getTypeFactsOfTypes(types) {
var result = 0 /* None */;
- for (var _i = 0, types_14 = types; _i < types_14.length; _i++) {
- var t = types_14[_i];
+ for (var _i = 0, types_12 = types; _i < types_12.length; _i++) {
+ var t = types_12[_i];
result |= getTypeFacts(t);
}
return result;
@@ -35116,15 +36675,16 @@ var ts;
return strictNullChecks ? 4079361 /* StringStrictFacts */ : 4194049 /* StringFacts */;
}
if (flags & 32 /* StringLiteral */) {
+ var isEmpty = type.value === "";
return strictNullChecks ?
- type.text === "" ? 3030785 /* EmptyStringStrictFacts */ : 1982209 /* NonEmptyStringStrictFacts */ :
- type.text === "" ? 3145473 /* EmptyStringFacts */ : 4194049 /* NonEmptyStringFacts */;
+ isEmpty ? 3030785 /* EmptyStringStrictFacts */ : 1982209 /* NonEmptyStringStrictFacts */ :
+ isEmpty ? 3145473 /* EmptyStringFacts */ : 4194049 /* NonEmptyStringFacts */;
}
if (flags & (4 /* Number */ | 16 /* Enum */)) {
return strictNullChecks ? 4079234 /* NumberStrictFacts */ : 4193922 /* NumberFacts */;
}
- if (flags & (64 /* NumberLiteral */ | 256 /* EnumLiteral */)) {
- var isZero = type.text === "0";
+ if (flags & 64 /* NumberLiteral */) {
+ var isZero = type.value === 0;
return strictNullChecks ?
isZero ? 3030658 /* ZeroStrictFacts */ : 1982082 /* NonZeroStrictFacts */ :
isZero ? 3145346 /* ZeroFacts */ : 4193922 /* NonZeroFacts */;
@@ -35181,11 +36741,11 @@ var ts;
}
function getTypeOfDestructuredArrayElement(type, index) {
return isTupleLikeType(type) && getTypeOfPropertyOfType(type, "" + index) ||
- checkIteratedTypeOrElementType(type, /*errorNode*/ undefined, /*allowStringInput*/ false, /*allowAsyncIterable*/ false) ||
+ checkIteratedTypeOrElementType(type, /*errorNode*/ undefined, /*allowStringInput*/ false, /*allowAsyncIterables*/ false) ||
unknownType;
}
function getTypeOfDestructuredSpreadExpression(type) {
- return createArrayType(checkIteratedTypeOrElementType(type, /*errorNode*/ undefined, /*allowStringInput*/ false, /*allowAsyncIterable*/ false) || unknownType);
+ return createArrayType(checkIteratedTypeOrElementType(type, /*errorNode*/ undefined, /*allowStringInput*/ false, /*allowAsyncIterables*/ false) || unknownType);
}
function getAssignedTypeOfBinaryExpression(node) {
var isDestructuringDefaultAssignment = node.parent.kind === 177 /* ArrayLiteralExpression */ && isDestructuringAssignmentTarget(node.parent) ||
@@ -35331,7 +36891,7 @@ var ts;
}
return true;
}
- if (source.flags & 256 /* EnumLiteral */ && target.flags & 16 /* Enum */ && source.baseType === target) {
+ if (source.flags & 256 /* EnumLiteral */ && getBaseTypeOfEnumLiteralType(source) === target) {
return true;
}
return containsType(target.types, source);
@@ -35357,8 +36917,8 @@ var ts;
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];
+ 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) {
@@ -35438,8 +36998,8 @@ var ts;
}
function isEvolvingArrayTypeList(types) {
var hasEvolvingArrayType = false;
- for (var _i = 0, types_16 = types; _i < types_16.length; _i++) {
- var t = types_16[_i];
+ for (var _i = 0, types_14 = types; _i < types_14.length; _i++) {
+ var t = types_14[_i];
if (!(t.flags & 8192 /* Never */)) {
if (!(getObjectFlags(t) & 256 /* EvolvingArray */)) {
return false;
@@ -35470,7 +37030,7 @@ var ts;
parent.parent.operatorToken.kind === 58 /* EqualsToken */ &&
parent.parent.left === parent &&
!ts.isAssignmentTarget(parent.parent) &&
- isTypeAnyOrAllConstituentTypesHaveKind(getTypeOfExpression(parent.argumentExpression), 340 /* NumberLike */ | 2048 /* Undefined */);
+ isTypeAnyOrAllConstituentTypesHaveKind(getTypeOfExpression(parent.argumentExpression), 84 /* NumberLike */ | 2048 /* Undefined */);
return isLengthPushOrUnshift || isElementAssignment;
}
function maybeTypePredicateCall(node) {
@@ -35496,7 +37056,7 @@ var ts;
function getFlowTypeOfReference(reference, declaredType, initialType, flowContainer, couldBeUninitialized) {
if (initialType === void 0) { initialType = declaredType; }
var key;
- if (!reference.flowNode || !couldBeUninitialized && !(declaredType.flags & 17810431 /* Narrowable */)) {
+ if (!reference.flowNode || !couldBeUninitialized && !(declaredType.flags & 17810175 /* Narrowable */)) {
return declaredType;
}
var visitedFlowStart = visitedFlowCount;
@@ -35638,7 +37198,7 @@ var ts;
}
else {
var indexType = getTypeOfExpression(node.left.argumentExpression);
- if (isTypeAnyOrAllConstituentTypesHaveKind(indexType, 340 /* NumberLike */ | 2048 /* Undefined */)) {
+ if (isTypeAnyOrAllConstituentTypesHaveKind(indexType, 84 /* NumberLike */ | 2048 /* Undefined */)) {
evolvedType_1 = addEvolvingArrayElementType(evolvedType_1, node.right);
}
}
@@ -36145,6 +37705,26 @@ var ts;
!(getFalsyFlags(checkExpression(declaration.initializer)) & 2048 /* Undefined */);
return annotationIncludesUndefined ? getTypeWithFacts(declaredType, 131072 /* NEUndefined */) : declaredType;
}
+ function isApparentTypePosition(node) {
+ var parent = node.parent;
+ return parent.kind === 179 /* PropertyAccessExpression */ ||
+ parent.kind === 181 /* CallExpression */ && parent.expression === node ||
+ parent.kind === 180 /* ElementAccessExpression */ && parent.expression === node;
+ }
+ function typeHasNullableConstraint(type) {
+ return type.flags & 540672 /* TypeVariable */ && maybeTypeOfKind(getBaseConstraintOfType(type) || emptyObjectType, 6144 /* Nullable */);
+ }
+ function getDeclaredOrApparentType(symbol, node) {
+ // When a node is the left hand expression of a property access, element access, or call expression,
+ // and the type of the node includes type variables with constraints that are nullable, we fetch the
+ // apparent type of the node *before* performing control flow analysis such that narrowings apply to
+ // the constraint type.
+ var type = getTypeOfSymbol(symbol);
+ if (isApparentTypePosition(node) && forEachType(type, typeHasNullableConstraint)) {
+ return mapType(getWidenedType(type), getApparentType);
+ }
+ return type;
+ }
function checkIdentifier(node) {
var symbol = getResolvedSymbol(node);
if (symbol === unknownSymbol) {
@@ -36169,7 +37749,9 @@ var ts;
getNodeLinks(container).flags |= 8192 /* CaptureArguments */;
return getTypeOfSymbol(symbol);
}
- if (symbol.flags & 8388608 /* Alias */ && !isInTypeQuery(node) && !isConstEnumOrConstEnumOnlyModule(resolveAlias(symbol))) {
+ // We should only mark aliases as referenced if there isn't a local value declaration
+ // for the symbol.
+ if (isNonLocalAlias(symbol, /*excludes*/ 107455 /* Value */) && !isInTypeQuery(node) && !isConstEnumOrConstEnumOnlyModule(resolveAlias(symbol))) {
markAliasSymbolAsReferenced(symbol);
}
var localOrExportSymbol = getExportSymbolOfValueSymbolIfExported(symbol);
@@ -36211,7 +37793,7 @@ var ts;
checkCollisionWithCapturedThisVariable(node, node);
checkCollisionWithCapturedNewTargetVariable(node, node);
checkNestedBlockScopedBinding(node, symbol);
- var type = getTypeOfSymbol(localOrExportSymbol);
+ var type = getDeclaredOrApparentType(localOrExportSymbol, node);
var declaration = localOrExportSymbol.valueDeclaration;
var assignmentKind = ts.getAssignmentTargetKind(node);
if (assignmentKind) {
@@ -36249,10 +37831,11 @@ var ts;
// declaration container are the same).
var assumeInitialized = isParameter || isOuterVariable ||
type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & 1 /* Any */) !== 0 || isInTypeQuery(node) || node.parent.kind === 246 /* ExportSpecifier */) ||
+ node.parent.kind === 203 /* NonNullExpression */ ||
ts.isInAmbientContext(declaration);
var initialType = assumeInitialized ? (isParameter ? removeOptionalityFromDeclaredType(type, ts.getRootDeclaration(declaration)) : type) :
type === autoType || type === autoArrayType ? undefinedType :
- includeFalsyTypes(type, 2048 /* Undefined */);
+ getNullableType(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
@@ -36260,7 +37843,7 @@ var ts;
if (type === autoType || type === autoArrayType) {
if (flowType === autoType || flowType === autoArrayType) {
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(ts.getNameOfDeclaration(declaration), 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));
}
return convertAutoToAny(flowType);
@@ -36792,8 +38375,15 @@ var ts;
function getContextualTypeForInitializerExpression(node) {
var declaration = node.parent;
if (node === declaration.initializer) {
- if (declaration.type) {
- return getTypeFromTypeNode(declaration.type);
+ var typeNode = ts.getEffectiveTypeAnnotationNode(declaration);
+ if (typeNode) {
+ return getTypeFromTypeNode(typeNode);
+ }
+ if (ts.isInJavaScriptFile(declaration)) {
+ var jsDocType = getTypeForDeclarationFromJSDocComment(declaration);
+ if (jsDocType) {
+ return jsDocType;
+ }
}
if (declaration.kind === 146 /* Parameter */) {
var type = getContextuallyTypedParameterType(declaration);
@@ -36807,12 +38397,13 @@ var ts;
if (ts.isBindingPattern(declaration.parent)) {
var parentDeclaration = declaration.parent.parent;
var name = declaration.propertyName || declaration.name;
- if (parentDeclaration.kind !== 176 /* BindingElement */ &&
- parentDeclaration.type &&
- !ts.isBindingPattern(name)) {
- var text = ts.getTextOfPropertyName(name);
- if (text) {
- return getTypeOfPropertyOfType(getTypeFromTypeNode(parentDeclaration.type), text);
+ if (parentDeclaration.kind !== 176 /* BindingElement */) {
+ var parentTypeNode = ts.getEffectiveTypeAnnotationNode(parentDeclaration);
+ if (parentTypeNode && !ts.isBindingPattern(name)) {
+ var text = ts.getTextOfPropertyName(name);
+ if (text) {
+ return getTypeOfPropertyOfType(getTypeFromTypeNode(parentTypeNode), text);
+ }
}
}
}
@@ -36858,9 +38449,9 @@ var ts;
function getContextualReturnType(functionDecl) {
// 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 === 152 /* Constructor */ ||
- functionDecl.kind === 153 /* GetAccessor */ && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(functionDecl.symbol, 154 /* SetAccessor */))) {
+ if (functionDecl.kind === 152 /* Constructor */ ||
+ ts.getEffectiveReturnTypeNode(functionDecl) ||
+ isGetAccessorWithAnnotatedSetAccessor(functionDecl)) {
return getReturnTypeOfSignature(getSignatureFromDeclaration(functionDecl));
}
// Otherwise, if the containing function is contextually typed by a function type with exactly one call signature
@@ -36890,7 +38481,7 @@ var ts;
function getContextualTypeForBinaryOperand(node) {
var binaryExpression = node.parent;
var operator = binaryExpression.operatorToken.kind;
- if (operator >= 58 /* FirstAssignment */ && operator <= 70 /* LastAssignment */) {
+ if (ts.isAssignmentOperator(operator)) {
// Don't do this for special property assignments to avoid circularity
if (ts.getSpecialPropertyAssignmentKind(binaryExpression) !== 0 /* None */) {
return undefined;
@@ -36970,7 +38561,7 @@ var ts;
var index = ts.indexOf(arrayLiteral.elements, node);
return getTypeOfPropertyOfContextualType(type, "" + index)
|| getIndexTypeOfContextualType(type, 1 /* Number */)
- || getIteratedTypeOrElementType(type, /*errorNode*/ undefined, /*allowStringInput*/ false, /*allowAsyncIterable*/ false, /*checkAssignability*/ false);
+ || getIteratedTypeOrElementType(type, /*errorNode*/ undefined, /*allowStringInput*/ false, /*allowAsyncIterables*/ false, /*checkAssignability*/ false);
}
return undefined;
}
@@ -37075,6 +38666,8 @@ var ts;
case 261 /* PropertyAssignment */:
case 262 /* ShorthandPropertyAssignment */:
return getContextualTypeForObjectLiteralElement(parent);
+ case 263 /* SpreadAssignment */:
+ return getApparentTypeOfContextualType(parent.parent);
case 177 /* ArrayLiteralExpression */:
return getContextualTypeForElementExpression(node);
case 195 /* ConditionalExpression */:
@@ -37099,13 +38692,13 @@ var ts;
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) {
+ // If the given type is an object or union type with a single signature, and if that signature has at
+ // least as many parameters as the given function, return the signature. Otherwise return undefined.
+ function getContextualCallSignature(type, node) {
var signatures = getSignaturesOfStructuredType(type, 0 /* Call */);
if (signatures.length === 1) {
var signature = signatures[0];
- if (!signature.typeParameters && !isAritySmaller(signature, node)) {
+ if (!isAritySmaller(signature, node)) {
return signature;
}
}
@@ -37151,13 +38744,13 @@ var ts;
return undefined;
}
if (!(type.flags & 65536 /* Union */)) {
- return getNonGenericSignature(type, node);
+ return getContextualCallSignature(type, node);
}
var signatureList;
var types = type.types;
- for (var _i = 0, types_17 = types; _i < types_17.length; _i++) {
- var current = types_17[_i];
- var signature = getNonGenericSignature(current, node);
+ for (var _i = 0, types_15 = types; _i < types_15.length; _i++) {
+ var current = types_15[_i];
+ var signature = getContextualCallSignature(current, node);
if (signature) {
if (!signatureList) {
// This signature will contribute to contextual union signature
@@ -37188,7 +38781,7 @@ var ts;
checkExternalEmitHelpers(node, 1536 /* SpreadIncludes */);
}
var arrayOrIterableType = checkExpression(node.expression, checkMode);
- return checkIteratedTypeOrElementType(arrayOrIterableType, node.expression, /*allowStringInput*/ false, /*allowAsyncIterable*/ false);
+ return checkIteratedTypeOrElementType(arrayOrIterableType, node.expression, /*allowStringInput*/ false, /*allowAsyncIterables*/ false);
}
function hasDefaultValue(node) {
return (node.kind === 176 /* BindingElement */ && !!node.initializer) ||
@@ -37216,7 +38809,7 @@ var ts;
// if there is no index type / iterated type.
var restArrayType = checkExpression(e.expression, checkMode);
var restElementType = getIndexTypeOfType(restArrayType, 1 /* Number */) ||
- getIteratedTypeOrElementType(restArrayType, /*errorNode*/ undefined, /*allowStringInput*/ false, /*allowAsyncIterable*/ false, /*checkAssignability*/ false);
+ getIteratedTypeOrElementType(restArrayType, /*errorNode*/ undefined, /*allowStringInput*/ false, /*allowAsyncIterables*/ false, /*checkAssignability*/ false);
if (restElementType) {
elementTypes.push(restElementType);
}
@@ -37270,7 +38863,7 @@ var ts;
function isNumericComputedName(name) {
// It seems odd to consider an expression of type Any to result in a numeric name,
// but this behavior is consistent with checkIndexedAccess
- return isTypeAnyOrAllConstituentTypesHaveKind(checkComputedPropertyName(name), 340 /* NumberLike */);
+ return isTypeAnyOrAllConstituentTypesHaveKind(checkComputedPropertyName(name), 84 /* NumberLike */);
}
function isTypeAnyOrAllConstituentTypesHaveKind(type, kind) {
return isTypeAny(type) || isTypeOfKind(type, kind);
@@ -37308,7 +38901,7 @@ var ts;
links.resolvedType = checkExpression(node.expression);
// This will allow types number, string, symbol or any. It will also allow enums, the unknown
// type, and any union of these types (like string | number).
- if (!isTypeAnyOrAllConstituentTypesHaveKind(links.resolvedType, 340 /* NumberLike */ | 262178 /* StringLike */ | 512 /* ESSymbol */)) {
+ if (!isTypeAnyOrAllConstituentTypesHaveKind(links.resolvedType, 84 /* NumberLike */ | 262178 /* StringLike */ | 512 /* ESSymbol */)) {
error(node, ts.Diagnostics.A_computed_property_name_must_be_of_type_string_number_symbol_or_any);
}
else {
@@ -37459,6 +39052,8 @@ var ts;
if (spread.flags & 32768 /* Object */) {
// only set the symbol and flags if this is a (fresh) object type
spread.flags |= propagatedFlags;
+ spread.flags |= 1048576 /* FreshLiteral */;
+ spread.objectFlags |= 128 /* ObjectLiteral */;
spread.symbol = node.symbol;
}
return spread;
@@ -37537,6 +39132,10 @@ var ts;
var attributesTable = ts.createMap();
var spread = emptyObjectType;
var attributesArray = [];
+ var hasSpreadAnyType = false;
+ var typeToIntersect;
+ var explicitlySpecifyChildrenAttribute = false;
+ var jsxChildrenPropertyName = getJsxElementChildrenPropertyname();
for (var _i = 0, _a = attributes.properties; _i < _a.length; _i++) {
var attributeDecl = _a[_i];
var member = attributeDecl.symbol;
@@ -37554,6 +39153,9 @@ var ts;
attributeSymbol.target = member;
attributesTable.set(attributeSymbol.name, attributeSymbol);
attributesArray.push(attributeSymbol);
+ if (attributeDecl.name.text === jsxChildrenPropertyName) {
+ explicitlySpecifyChildrenAttribute = true;
+ }
}
else {
ts.Debug.assert(attributeDecl.kind === 255 /* JsxSpreadAttribute */);
@@ -37563,39 +39165,39 @@ var ts;
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;
+ hasSpreadAnyType = true;
+ }
+ if (isValidSpreadType(exprType)) {
+ spread = getSpreadType(spread, exprType);
+ }
+ else {
+ typeToIntersect = typeToIntersect ? getIntersectionType([typeToIntersect, exprType]) : exprType;
}
- spread = getSpreadType(spread, exprType);
}
}
- if (spread !== emptyObjectType) {
- if (attributesArray.length > 0) {
- spread = getSpreadType(spread, createJsxAttributesType(attributes.symbol, attributesTable));
- attributesArray = [];
- attributesTable = ts.createMap();
+ if (!hasSpreadAnyType) {
+ if (spread !== emptyObjectType) {
+ if (attributesArray.length > 0) {
+ spread = getSpreadType(spread, createJsxAttributesType(attributes.symbol, attributesTable));
+ }
+ attributesArray = getPropertiesOfType(spread);
}
- attributesArray = getPropertiesOfType(spread);
- }
- attributesTable = ts.createMap();
- if (attributesArray) {
- ts.forEach(attributesArray, function (attr) {
+ attributesTable = ts.createMap();
+ for (var _b = 0, attributesArray_1 = attributesArray; _b < attributesArray_1.length; _b++) {
+ var attr = attributesArray_1[_b];
if (!filter || filter(attr)) {
attributesTable.set(attr.name, attr);
}
- });
+ }
}
// Handle children attribute
var parent = openingLikeElement.parent.kind === 249 /* JsxElement */ ? openingLikeElement.parent : undefined;
// We have to check that openingElement of the parent is the one we are visiting as this may not be true for selfClosingElement
if (parent && parent.openingElement === openingLikeElement && parent.children.length > 0) {
var childrenTypes = [];
- for (var _b = 0, _c = parent.children; _b < _c.length; _b++) {
- var child = _c[_b];
+ for (var _c = 0, _d = parent.children; _c < _d.length; _c++) {
+ var child = _d[_c];
// In React, JSX text that contains only whitespaces will be ignored so we don't want to type-check that
// because then type of children property will have constituent of string type.
if (child.kind === 10 /* JsxText */) {
@@ -37607,11 +39209,11 @@ var ts;
childrenTypes.push(checkExpression(child, checkMode));
}
}
- // Error if there is a attribute named "children" and children element.
- // This is because children element will overwrite the value from attributes
- var jsxChildrenPropertyName = getJsxElementChildrenPropertyname();
- if (jsxChildrenPropertyName && jsxChildrenPropertyName !== "") {
- if (attributesTable.has(jsxChildrenPropertyName)) {
+ if (!hasSpreadAnyType && jsxChildrenPropertyName && jsxChildrenPropertyName !== "") {
+ // Error if there is a attribute named "children" explicitly specified and children element.
+ // This is because children element will overwrite the value from attributes.
+ // Note: we will not warn "children" attribute overwritten if "children" attribute is specified in object spread.
+ if (explicitlySpecifyChildrenAttribute) {
error(attributes, ts.Diagnostics._0_are_specified_twice_The_attribute_named_0_will_be_overwritten, jsxChildrenPropertyName);
}
// If there are children in the body of JSX element, create dummy attribute "children" with anyType so that it will pass the attribute checking process
@@ -37622,7 +39224,12 @@ var ts;
attributesTable.set(jsxChildrenPropertyName, childrenPropSymbol);
}
}
- return createJsxAttributesType(attributes.symbol, attributesTable);
+ if (hasSpreadAnyType) {
+ return anyType;
+ }
+ var attributeType = createJsxAttributesType(attributes.symbol, attributesTable);
+ return typeToIntersect && attributesTable.size ? getIntersectionType([typeToIntersect, attributeType]) :
+ typeToIntersect ? typeToIntersect : attributeType;
/**
* Create anonymous type from given attributes symbol table.
* @param symbol a symbol of JsxAttributes containing attributes corresponding to attributesTable
@@ -37630,8 +39237,7 @@ var ts;
*/
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.flags |= 33554432 /* JsxAttributes */ | 4194304 /* ContainsObjectLiteral */;
result.objectFlags |= 128 /* ObjectLiteral */;
return result;
}
@@ -37709,7 +39315,18 @@ var ts;
return unknownType;
}
}
- return getUnionType(ts.map(signatures, getReturnTypeOfSignature), /*subtypeReduction*/ true);
+ var instantiatedSignatures = [];
+ for (var _i = 0, signatures_3 = signatures; _i < signatures_3.length; _i++) {
+ var signature = signatures_3[_i];
+ if (signature.typeParameters) {
+ var typeArguments = fillMissingTypeArguments(/*typeArguments*/ undefined, signature.typeParameters, /*minTypeArgumentCount*/ 0);
+ instantiatedSignatures.push(getSignatureInstantiation(signature, typeArguments));
+ }
+ else {
+ instantiatedSignatures.push(signature);
+ }
+ }
+ return getUnionType(ts.map(instantiatedSignatures, getReturnTypeOfSignature), /*subtypeReduction*/ true);
}
/**
* Look into JSX namespace and then look for container with matching name as nameOfAttribPropContainer.
@@ -37761,6 +39378,20 @@ var ts;
}
return _jsxElementChildrenPropertyName;
}
+ function getApparentTypeOfJsxPropsType(propsType) {
+ if (!propsType) {
+ return undefined;
+ }
+ if (propsType.flags & 131072 /* Intersection */) {
+ var propsApparentType = [];
+ for (var _i = 0, _a = propsType.types; _i < _a.length; _i++) {
+ var t = _a[_i];
+ propsApparentType.push(getApparentType(t));
+ }
+ return getIntersectionType(propsApparentType);
+ }
+ return getApparentType(propsType);
+ }
/**
* Get JSX attributes type by trying to resolve openingLikeElement as a stateless function component.
* Return only attributes type of successfully resolved call signature.
@@ -37781,6 +39412,7 @@ var ts;
if (callSignature !== unknownSignature) {
var callReturnType = callSignature && getReturnTypeOfSignature(callSignature);
var paramType = callReturnType && (callSignature.parameters.length === 0 ? emptyObjectType : getTypeOfSymbol(callSignature.parameters[0]));
+ paramType = getApparentTypeOfJsxPropsType(paramType);
if (callReturnType && isTypeAssignableTo(callReturnType, jsxStatelessElementType)) {
// Intersect in JSX.IntrinsicAttributes if it exists
var intrinsicAttributes = getJsxType(JsxNames.IntrinsicAttributes);
@@ -37819,6 +39451,7 @@ var ts;
var candidate = candidatesOutArray_1[_i];
var callReturnType = getReturnTypeOfSignature(candidate);
var paramType = callReturnType && (candidate.parameters.length === 0 ? emptyObjectType : getTypeOfSymbol(candidate.parameters[0]));
+ paramType = getApparentTypeOfJsxPropsType(paramType);
if (callReturnType && isTypeAssignableTo(callReturnType, jsxStatelessElementType)) {
var shouldBeCandidate = true;
for (var _a = 0, _b = openingLikeElement.attributes.properties; _a < _b.length; _a++) {
@@ -37888,7 +39521,7 @@ var ts;
// <CustomTag> Hello World </CustomTag>
var intrinsicElementsType = getJsxType(JsxNames.IntrinsicElements);
if (intrinsicElementsType !== unknownType) {
- var stringLiteralTypeName = elementType.text;
+ var stringLiteralTypeName = elementType.value;
var intrinsicProp = getPropertyOfType(intrinsicElementsType, stringLiteralTypeName);
if (intrinsicProp) {
return getTypeOfSymbol(intrinsicProp);
@@ -38079,7 +39712,7 @@ var ts;
checkJsxPreconditions(node);
// The reactNamespace/jsxFactory's root symbol should be marked as 'used' so we don't incorrectly elide its import.
// And if there is no reactNamespace/jsxFactory's symbol in scope when targeting React emit, we should issue an error.
- var reactRefErr = compilerOptions.jsx === 2 /* React */ ? ts.Diagnostics.Cannot_find_name_0 : undefined;
+ var reactRefErr = diagnostics && compilerOptions.jsx === 2 /* React */ ? ts.Diagnostics.Cannot_find_name_0 : undefined;
var reactNamespace = getJsxNamespace();
var reactSym = resolveName(node.tagName, reactNamespace, 107455 /* Value */, reactRefErr, reactNamespace);
if (reactSym) {
@@ -38094,6 +39727,40 @@ var ts;
checkJsxAttributesAssignableToTagNameAttributes(node);
}
/**
+ * Check if a property with the given name is known anywhere in the given type. In an object type, a property
+ * is considered known if
+ * 1. the object type is empty and the check is for assignability, or
+ * 2. if the object type has index signatures, or
+ * 3. if the property is actually declared in the object type
+ * (this means that 'toString', for example, is not usually a known property).
+ * 4. In a union or intersection type,
+ * a property is considered known if it is known in any constituent type.
+ * @param targetType a type to search a given name in
+ * @param name a property name to search
+ * @param isComparingJsxAttributes a boolean flag indicating whether we are searching in JsxAttributesType
+ */
+ function isKnownProperty(targetType, name, isComparingJsxAttributes) {
+ if (targetType.flags & 32768 /* Object */) {
+ var resolved = resolveStructuredTypeMembers(targetType);
+ if (resolved.stringIndexInfo ||
+ resolved.numberIndexInfo && isNumericLiteralName(name) ||
+ getPropertyOfObjectType(targetType, name) ||
+ isComparingJsxAttributes && !isUnhyphenatedJsxName(name)) {
+ // For JSXAttributes, if the attribute has a hyphenated name, consider that the attribute to be known.
+ return true;
+ }
+ }
+ else if (targetType.flags & 196608 /* UnionOrIntersection */) {
+ for (var _i = 0, _a = targetType.types; _i < _a.length; _i++) {
+ var t = _a[_i];
+ if (isKnownProperty(t, name, isComparingJsxAttributes)) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+ /**
* 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"
@@ -38121,7 +39788,20 @@ var ts;
error(openingLikeElement, ts.Diagnostics.JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property, getJsxElementPropertiesName());
}
else {
- checkTypeAssignableTo(sourceAttributesType, targetAttributesType, openingLikeElement.attributes.properties.length > 0 ? openingLikeElement.attributes : openingLikeElement);
+ // Check if sourceAttributesType assignable to targetAttributesType though this check will allow excess properties
+ var isSourceAttributeTypeAssignableToTarget = checkTypeAssignableTo(sourceAttributesType, targetAttributesType, openingLikeElement.attributes.properties.length > 0 ? openingLikeElement.attributes : openingLikeElement);
+ // After we check for assignability, we will do another pass to check that all explicitly specified attributes have correct name corresponding in targetAttributeType.
+ // This will allow excess properties in spread type as it is very common pattern to spread outter attributes into React component in its render method.
+ if (isSourceAttributeTypeAssignableToTarget && !isTypeAny(sourceAttributesType) && !isTypeAny(targetAttributesType)) {
+ for (var _i = 0, _a = openingLikeElement.attributes.properties; _i < _a.length; _i++) {
+ var attribute = _a[_i];
+ if (ts.isJsxAttribute(attribute) && !isKnownProperty(targetAttributesType, attribute.name.text, /*isComparingJsxAttributes*/ true)) {
+ error(attribute, ts.Diagnostics.Property_0_does_not_exist_on_type_1, attribute.name.text, typeToString(targetAttributesType));
+ // We break here so that errors won't be cascading
+ break;
+ }
+ }
+ }
}
}
function checkJsxExpression(node, checkMode) {
@@ -38141,29 +39821,11 @@ var ts;
function getDeclarationKindFromSymbol(s) {
return s.valueDeclaration ? s.valueDeclaration.kind : 149 /* PropertyDeclaration */;
}
- function getDeclarationModifierFlagsFromSymbol(s) {
- 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 */);
+ return !!(symbol.flags & 8192 /* Method */ || ts.getCheckFlags(symbol) & 4 /* SyntheticMethod */);
}
/**
* Check whether the requested property access is valid.
@@ -38174,11 +39836,11 @@ var ts;
* @param prop The symbol for the right hand side of the property access.
*/
function checkPropertyAccessibility(node, left, type, prop) {
- var flags = getDeclarationModifierFlagsFromSymbol(prop);
+ var flags = ts.getDeclarationModifierFlagsFromSymbol(prop);
var errorNode = node.kind === 179 /* PropertyAccessExpression */ || node.kind === 226 /* VariableDeclaration */ ?
node.name :
node.right;
- if (getCheckFlags(prop) & 256 /* ContainsPrivate */) {
+ if (ts.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;
@@ -38276,42 +39938,6 @@ var ts;
function checkQualifiedName(node) {
return checkPropertyAccessExpressionOrQualifiedName(node, node.left, node.right);
}
- function reportNonexistentProperty(propNode, containingType) {
- var errorInfo;
- if (containingType.flags & 65536 /* Union */ && !(containingType.flags & 8190 /* Primitive */)) {
- for (var _i = 0, _a = containingType.types; _i < _a.length; _i++) {
- var subtype = _a[_i];
- if (!getPropertyOfType(subtype, propNode.text)) {
- errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.Property_0_does_not_exist_on_type_1, ts.declarationNameToString(propNode), typeToString(subtype));
- break;
- }
- }
- }
- errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.Property_0_does_not_exist_on_type_1, ts.declarationNameToString(propNode), typeToString(containingType));
- diagnostics.add(ts.createDiagnosticForNodeFromMessageChain(propNode, errorInfo));
- }
- function markPropertyAsReferenced(prop) {
- if (prop &&
- noUnusedIdentifiers &&
- (prop.flags & 106500 /* ClassMember */) &&
- prop.valueDeclaration && (ts.getModifierFlags(prop.valueDeclaration) & 8 /* Private */)) {
- if (getCheckFlags(prop) & 1 /* Instantiated */) {
- getSymbolLinks(prop).target.isReferenced = true;
- }
- else {
- prop.isReferenced = true;
- }
- }
- }
- function isInPropertyInitializer(node) {
- while (node) {
- if (node.parent && node.parent.kind === 149 /* 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) {
@@ -38348,7 +39974,7 @@ var ts;
markPropertyAsReferenced(prop);
getNodeLinks(node).resolvedSymbol = prop;
checkPropertyAccessibility(node, left, apparentType, prop);
- var propType = getTypeOfSymbol(prop);
+ var propType = getDeclaredOrApparentType(prop, node);
var assignmentKind = ts.getAssignmentTargetKind(node);
if (assignmentKind) {
if (isReferenceToReadonlyEntity(node, prop) || isReferenceThroughNamespaceImport(node)) {
@@ -38367,16 +39993,153 @@ var ts;
var flowType = getFlowTypeOfReference(node, propType);
return assignmentKind ? getBaseTypeOfLiteralType(flowType) : flowType;
}
+ function reportNonexistentProperty(propNode, containingType) {
+ var errorInfo;
+ if (containingType.flags & 65536 /* Union */ && !(containingType.flags & 8190 /* Primitive */)) {
+ for (var _i = 0, _a = containingType.types; _i < _a.length; _i++) {
+ var subtype = _a[_i];
+ if (!getPropertyOfType(subtype, propNode.text)) {
+ errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.Property_0_does_not_exist_on_type_1, ts.declarationNameToString(propNode), typeToString(subtype));
+ break;
+ }
+ }
+ }
+ var suggestion = getSuggestionForNonexistentProperty(propNode, containingType);
+ if (suggestion) {
+ errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2, ts.declarationNameToString(propNode), typeToString(containingType), suggestion);
+ }
+ else {
+ errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.Property_0_does_not_exist_on_type_1, ts.declarationNameToString(propNode), typeToString(containingType));
+ }
+ diagnostics.add(ts.createDiagnosticForNodeFromMessageChain(propNode, errorInfo));
+ }
+ function getSuggestionForNonexistentProperty(node, containingType) {
+ var suggestion = getSpellingSuggestionForName(node.text, getPropertiesOfObjectType(containingType), 107455 /* Value */);
+ return suggestion && suggestion.name;
+ }
+ function getSuggestionForNonexistentSymbol(location, name, meaning) {
+ var result = resolveNameHelper(location, name, meaning, /*nameNotFoundMessage*/ undefined, name, function (symbols, name, meaning) {
+ var symbol = getSymbol(symbols, name, meaning);
+ if (symbol) {
+ // Sometimes the symbol is found when location is a return type of a function: `typeof x` and `x` is declared in the body of the function
+ // So the table *contains* `x` but `x` isn't actually in scope.
+ // However, resolveNameHelper will continue and call this callback again, so we'll eventually get a correct suggestion.
+ return symbol;
+ }
+ return getSpellingSuggestionForName(name, ts.arrayFrom(symbols.values()), meaning);
+ });
+ if (result) {
+ return result.name;
+ }
+ }
+ /**
+ * Given a name and a list of symbols whose names are *not* equal to the name, return a spelling suggestion if there is one that is close enough.
+ * Names less than length 3 only check for case-insensitive equality, not levenshtein distance.
+ *
+ * If there is a candidate that's the same except for case, return that.
+ * If there is a candidate that's within one edit of the name, return that.
+ * Otherwise, return the candidate with the smallest Levenshtein distance,
+ * except for candidates:
+ * * With no name
+ * * Whose meaning doesn't match the `meaning` parameter.
+ * * Whose length differs from the target name by more than 0.3 of the length of the name.
+ * * Whose levenshtein distance is more than 0.4 of the length of the name
+ * (0.4 allows 1 substitution/transposition for every 5 characters,
+ * and 1 insertion/deletion at 3 characters)
+ * Names longer than 30 characters don't get suggestions because Levenshtein distance is an n**2 algorithm.
+ */
+ function getSpellingSuggestionForName(name, symbols, meaning) {
+ var worstDistance = name.length * 0.4;
+ var maximumLengthDifference = Math.min(3, name.length * 0.34);
+ var bestDistance = Number.MAX_VALUE;
+ var bestCandidate = undefined;
+ var justCheckExactMatches = false;
+ if (name.length > 30) {
+ return undefined;
+ }
+ name = name.toLowerCase();
+ for (var _i = 0, symbols_3 = symbols; _i < symbols_3.length; _i++) {
+ var candidate = symbols_3[_i];
+ if (candidate.flags & meaning &&
+ candidate.name &&
+ Math.abs(candidate.name.length - name.length) < maximumLengthDifference) {
+ var candidateName = candidate.name.toLowerCase();
+ if (candidateName === name) {
+ return candidate;
+ }
+ if (justCheckExactMatches) {
+ continue;
+ }
+ if (candidateName.length < 3 ||
+ name.length < 3 ||
+ candidateName === "eval" ||
+ candidateName === "intl" ||
+ candidateName === "undefined" ||
+ candidateName === "map" ||
+ candidateName === "nan" ||
+ candidateName === "set") {
+ continue;
+ }
+ var distance = ts.levenshtein(name, candidateName);
+ if (distance > worstDistance) {
+ continue;
+ }
+ if (distance < 3) {
+ justCheckExactMatches = true;
+ bestCandidate = candidate;
+ }
+ else if (distance < bestDistance) {
+ bestDistance = distance;
+ bestCandidate = candidate;
+ }
+ }
+ }
+ return bestCandidate;
+ }
+ function markPropertyAsReferenced(prop) {
+ if (prop &&
+ noUnusedIdentifiers &&
+ (prop.flags & 106500 /* ClassMember */) &&
+ prop.valueDeclaration && (ts.getModifierFlags(prop.valueDeclaration) & 8 /* Private */)) {
+ if (ts.getCheckFlags(prop) & 1 /* Instantiated */) {
+ getSymbolLinks(prop).target.isReferenced = true;
+ }
+ else {
+ prop.isReferenced = true;
+ }
+ }
+ }
+ function isInPropertyInitializer(node) {
+ while (node) {
+ if (node.parent && node.parent.kind === 149 /* PropertyDeclaration */ && node.parent.initializer === node) {
+ return true;
+ }
+ node = node.parent;
+ }
+ return false;
+ }
function isValidPropertyAccess(node, propertyName) {
var left = node.kind === 179 /* PropertyAccessExpression */
? node.expression
: node.left;
- var type = checkExpression(left);
+ return isValidPropertyAccessWithType(node, left, propertyName, getWidenedType(checkExpression(left)));
+ }
+ function isValidPropertyAccessWithType(node, left, propertyName, type) {
if (type !== unknownType && !isTypeAny(type)) {
- var prop = getPropertyOfType(getWidenedType(type), propertyName);
+ var prop = getPropertyOfType(type, propertyName);
if (prop) {
return checkPropertyAccessibility(node, left, type, prop);
}
+ // In js files properties of unions are allowed in completion
+ if (ts.isInJavaScriptFile(left) && (type.flags & 65536 /* Union */)) {
+ for (var _i = 0, _a = type.types; _i < _a.length; _i++) {
+ var elementType = _a[_i];
+ if (isValidPropertyAccessWithType(node, left, propertyName, elementType)) {
+ return true;
+ }
+ }
+ }
+ return false;
}
return true;
}
@@ -38489,7 +40252,16 @@ var ts;
}
return true;
}
+ function callLikeExpressionMayHaveTypeArguments(node) {
+ // TODO: Also include tagged templates (https://github.com/Microsoft/TypeScript/issues/11947)
+ return ts.isCallOrNewExpression(node);
+ }
function resolveUntypedCall(node) {
+ if (callLikeExpressionMayHaveTypeArguments(node)) {
+ // Check type arguments even though we will give an error that untyped calls may not accept type arguments.
+ // This gets us diagnostics for the type arguments and marks them as referenced.
+ ts.forEach(node.typeArguments, checkSourceElement);
+ }
if (node.kind === 183 /* TaggedTemplateExpression */) {
checkExpression(node.template);
}
@@ -38520,8 +40292,8 @@ var ts;
var specializedIndex = -1;
var spliceIndex;
ts.Debug.assert(!result.length);
- for (var _i = 0, signatures_3 = signatures; _i < signatures_3.length; _i++) {
- var signature = signatures_3[_i];
+ for (var _i = 0, signatures_4 = signatures; _i < signatures_4.length; _i++) {
+ var signature = signatures_4[_i];
var symbol = signature.declaration && getSymbolOfNode(signature.declaration);
var parent = signature.declaration && signature.declaration.parent;
if (!lastSymbol || symbol === lastSymbol) {
@@ -38629,7 +40401,7 @@ var ts;
// If spread arguments are present, check that they correspond to a rest parameter. If so, no
// further checking is necessary.
if (spreadArgIndex >= 0) {
- return isRestParameterIndex(signature, spreadArgIndex);
+ return isRestParameterIndex(signature, spreadArgIndex) || spreadArgIndex >= signature.minArgumentCount;
}
// Too many arguments implies incorrect arity.
if (!signature.hasRestParameter && argCount > signature.parameters.length) {
@@ -38652,41 +40424,60 @@ 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, /*useAnyForNoInferences*/ false);
+ var context = createInferenceContext(signature, 1 /* InferUnionTypes */);
forEachMatchingParameterType(contextualSignature, signature, function (source, target) {
// Type parameters from outer context referenced by source type are fixed by instantiation of the source type
- inferTypesWithContext(context, instantiateType(source, contextualMapper), target);
+ inferTypes(context.inferences, instantiateType(source, contextualMapper || identityMapper), target);
});
+ if (!contextualMapper) {
+ inferTypes(context.inferences, getReturnTypeOfSignature(contextualSignature), getReturnTypeOfSignature(signature), 4 /* ReturnType */);
+ }
return getSignatureInstantiation(signature, getInferredTypes(context));
}
function inferTypeArguments(node, signature, args, excludeArgument, context) {
- var typeParameters = signature.typeParameters;
- var inferenceMapper = getInferenceMapper(context);
+ var inferences = context.inferences;
// Clear out all the inference results from the last time inferTypeArguments was called on this context
- for (var i = 0; i < typeParameters.length; i++) {
+ for (var i = 0; i < inferences.length; i++) {
// As an optimization, we don't have to clear (and later recompute) inferred types
// for type parameters that have already been fixed on the previous call to inferTypeArguments.
// It would be just as correct to reset all of them. But then we'd be repeating the same work
// for the type parameters that were fixed, namely the work done by getInferredType.
- if (!context.inferences[i].isFixed) {
- context.inferredTypes[i] = undefined;
+ if (!inferences[i].isFixed) {
+ inferences[i].inferredType = undefined;
}
}
- // On this call to inferTypeArguments, we may get more inferences for certain type parameters that were not
- // fixed last time. This means that a type parameter that failed inference last time may succeed this time,
- // or vice versa. Therefore, the failedTypeParameterIndex is useless if it points to an unfixed type parameter,
- // because it may change. So here we reset it. However, getInferredType will not revisit any type parameters
- // that were previously fixed. So if a fixed type parameter failed previously, it will fail again because
- // it will contain the exact same set of inferences. So if we reset the index from a fixed type parameter,
- // we will lose information that we won't recover this time around.
- if (context.failedTypeParameterIndex !== undefined && !context.inferences[context.failedTypeParameterIndex].isFixed) {
- context.failedTypeParameterIndex = undefined;
+ // If a contextual type is available, infer from that type to the return type of the call expression. For
+ // example, given a 'function wrap<T, U>(cb: (x: T) => U): (x: T) => U' and a call expression
+ // 'let f: (x: string) => number = wrap(s => s.length)', we infer from the declared type of 'f' to the
+ // return type of 'wrap'.
+ if (ts.isExpression(node)) {
+ var contextualType = getContextualType(node);
+ if (contextualType) {
+ // We clone the contextual mapper to avoid disturbing a resolution in progress for an
+ // outer call expression. Effectively we just want a snapshot of whatever has been
+ // inferred for any outer call expression so far.
+ var instantiatedType = instantiateType(contextualType, cloneTypeMapper(getContextualMapper(node)));
+ // If the contextual type is a generic function type with a single call signature, we
+ // instantiate the type with its own type parameters and type arguments. This ensures that
+ // the type parameters are not erased to type any during type inference such that they can
+ // be inferred as actual types from the contextual type. For example:
+ // declare function arrayMap<T, U>(f: (x: T) => U): (a: T[]) => U[];
+ // const boxElements: <A>(a: A[]) => { value: A }[] = arrayMap(value => ({ value }));
+ // Above, the type of the 'value' parameter is inferred to be 'A'.
+ var contextualSignature = getSingleCallSignature(instantiatedType);
+ var inferenceSourceType = contextualSignature && contextualSignature.typeParameters ?
+ getOrCreateTypeFromSignature(getSignatureInstantiation(contextualSignature, contextualSignature.typeParameters)) :
+ instantiatedType;
+ var inferenceTargetType = getReturnTypeOfSignature(signature);
+ // Inferences made from return types have lower priority than all other inferences.
+ inferTypes(context.inferences, inferenceSourceType, inferenceTargetType, 4 /* ReturnType */);
+ }
}
var thisType = getThisTypeOfSignature(signature);
if (thisType) {
var thisArgumentNode = getThisArgumentOfCall(node);
var thisArgumentType = thisArgumentNode ? checkExpression(thisArgumentNode) : voidType;
- inferTypesWithContext(context, thisArgumentType, thisType);
+ inferTypes(context.inferences, 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.
@@ -38702,10 +40493,10 @@ var ts;
if (argType === undefined) {
// For context sensitive arguments we pass the identityMapper, which is a signal to treat all
// context sensitive function expressions as wildcards
- var mapper = excludeArgument && excludeArgument[i] !== undefined ? identityMapper : inferenceMapper;
+ var mapper = excludeArgument && excludeArgument[i] !== undefined ? identityMapper : context;
argType = checkExpressionWithContextualType(arg, paramType, mapper);
}
- inferTypesWithContext(context, argType, paramType);
+ inferTypes(context.inferences, argType, paramType);
}
}
// In the second pass we visit only context sensitive arguments, and only those that aren't excluded, this
@@ -38719,11 +40510,11 @@ var ts;
if (excludeArgument[i] === false) {
var arg = args[i];
var paramType = getTypeAtPosition(signature, i);
- inferTypesWithContext(context, checkExpressionWithContextualType(arg, paramType, inferenceMapper), paramType);
+ inferTypes(context.inferences, checkExpressionWithContextualType(arg, paramType, context), paramType);
}
}
}
- getInferredTypes(context);
+ return getInferredTypes(context);
}
function checkTypeArguments(signature, typeArgumentNodes, typeArgumentTypes, reportErrors, headMessage) {
var typeParameters = signature.typeParameters;
@@ -39000,7 +40791,7 @@ var ts;
case 71 /* Identifier */:
case 8 /* NumericLiteral */:
case 9 /* StringLiteral */:
- return getLiteralTypeForText(32 /* StringLiteral */, element.name.text);
+ return getLiteralType(element.name.text);
case 144 /* ComputedPropertyName */:
var nameType = checkComputedPropertyName(element.name);
if (isTypeOfKind(nameType, 512 /* ESSymbol */)) {
@@ -39110,7 +40901,7 @@ var ts;
return arg;
}
}
- function resolveCall(node, signatures, candidatesOutArray, headMessage) {
+ function resolveCall(node, signatures, candidatesOutArray, fallbackError) {
var isTaggedTemplate = node.kind === 183 /* TaggedTemplateExpression */;
var isDecorator = node.kind === 147 /* Decorator */;
var isJsxOpeningOrSelfClosingElement = ts.isJsxOpeningLikeElement(node);
@@ -39122,25 +40913,11 @@ var ts;
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);
if (!candidates.length) {
- reportError(ts.Diagnostics.Supplied_parameters_do_not_match_any_signature_of_call_target);
+ diagnostics.add(ts.createDiagnosticForNode(node, ts.Diagnostics.Call_target_does_not_contain_any_signatures));
return resolveErrorCall(node);
}
var args = getEffectiveCallArguments(node);
@@ -39178,9 +40955,9 @@ var ts;
// was fine. So if there is any overload that is only incorrect because of an
// argument, we will report an error on that one.
//
- // function foo(s: string) {}
- // function foo(n: number) {} // Report argument error on this overload
- // function foo() {}
+ // function foo(s: string): void;
+ // function foo(n: number): void; // Report argument error on this overload
+ // function foo(): void;
// foo(true);
//
// If none of the overloads even made it that far, there are two possibilities.
@@ -39188,13 +40965,12 @@ var ts;
// report an error on that. Or none of the overloads even had correct arity,
// in which case give an arity error.
//
- // function foo<T>(x: T, y: T) {} // Report type argument inference error
- // function foo() {}
- // foo(0, true);
+ // function foo<T extends string>(x: T): void; // Report type argument error
+ // function foo(): void;
+ // foo<number>(0);
//
var candidateForArgumentError;
var candidateForTypeArgumentError;
- var resultOfFailedInference;
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.
@@ -39213,10 +40989,6 @@ var ts;
result = chooseOverload(candidates, subtypeRelation, signatureHelpTrailingComma);
}
if (!result) {
- // Reinitialize these pointers for round two
- candidateForArgumentError = undefined;
- candidateForTypeArgumentError = undefined;
- resultOfFailedInference = undefined;
result = chooseOverload(candidates, assignableRelation, signatureHelpTrailingComma);
}
if (result) {
@@ -39239,24 +41011,42 @@ var ts;
checkApplicableSignature(node, args, candidateForArgumentError, assignableRelation, /*excludeArgument*/ undefined, /*reportErrors*/ true);
}
else if (candidateForTypeArgumentError) {
- if (!isTaggedTemplate && !isDecorator && typeArguments) {
- var typeArguments_2 = node.typeArguments;
- checkTypeArguments(candidateForTypeArgumentError, typeArguments_2, ts.map(typeArguments_2, getTypeFromTypeNode), /*reportErrors*/ true, headMessage);
- }
- else {
- ts.Debug.assert(resultOfFailedInference.failedTypeParameterIndex >= 0);
- var failedTypeParameter = candidateForTypeArgumentError.typeParameters[resultOfFailedInference.failedTypeParameterIndex];
- var inferenceCandidates = getInferenceCandidates(resultOfFailedInference, resultOfFailedInference.failedTypeParameterIndex);
- var diagnosticChainHead = ts.chainDiagnosticMessages(/*details*/ undefined, // details will be provided by call to reportNoCommonSupertypeError
- ts.Diagnostics.The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_type_arguments_explicitly, typeToString(failedTypeParameter));
- if (headMessage) {
- diagnosticChainHead = ts.chainDiagnosticMessages(diagnosticChainHead, headMessage);
- }
- reportNoCommonSupertypeError(inferenceCandidates, node.tagName || node.expression || node.tag, diagnosticChainHead);
- }
- }
- else {
- reportError(ts.Diagnostics.Supplied_parameters_do_not_match_any_signature_of_call_target);
+ var typeArguments_1 = node.typeArguments;
+ checkTypeArguments(candidateForTypeArgumentError, typeArguments_1, ts.map(typeArguments_1, getTypeFromTypeNode), /*reportErrors*/ true, fallbackError);
+ }
+ else if (typeArguments && ts.every(signatures, function (sig) { return ts.length(sig.typeParameters) !== typeArguments.length; })) {
+ var min = Number.POSITIVE_INFINITY;
+ var max = Number.NEGATIVE_INFINITY;
+ for (var _i = 0, signatures_5 = signatures; _i < signatures_5.length; _i++) {
+ var sig = signatures_5[_i];
+ min = Math.min(min, getMinTypeArgumentCount(sig.typeParameters));
+ max = Math.max(max, ts.length(sig.typeParameters));
+ }
+ var paramCount = min < max ? min + "-" + max : min;
+ diagnostics.add(ts.createDiagnosticForNode(node, ts.Diagnostics.Expected_0_type_arguments_but_got_1, paramCount, typeArguments.length));
+ }
+ else if (args) {
+ var min = Number.POSITIVE_INFINITY;
+ var max = Number.NEGATIVE_INFINITY;
+ for (var _a = 0, signatures_6 = signatures; _a < signatures_6.length; _a++) {
+ var sig = signatures_6[_a];
+ min = Math.min(min, sig.minArgumentCount);
+ max = Math.max(max, sig.parameters.length);
+ }
+ var hasRestParameter_1 = ts.some(signatures, function (sig) { return sig.hasRestParameter; });
+ var hasSpreadArgument = getSpreadArgumentIndex(args) > -1;
+ var paramCount = hasRestParameter_1 ? min :
+ min < max ? min + "-" + max :
+ min;
+ var argCount = args.length - (hasSpreadArgument ? 1 : 0);
+ var error_1 = hasRestParameter_1 && hasSpreadArgument ? ts.Diagnostics.Expected_at_least_0_arguments_but_got_a_minimum_of_1 :
+ hasRestParameter_1 ? ts.Diagnostics.Expected_at_least_0_arguments_but_got_1 :
+ hasSpreadArgument ? ts.Diagnostics.Expected_0_arguments_but_got_a_minimum_of_1 :
+ ts.Diagnostics.Expected_0_arguments_but_got_1;
+ diagnostics.add(ts.createDiagnosticForNode(node, error_1, paramCount, argCount));
+ }
+ else if (fallbackError) {
+ diagnostics.add(ts.createDiagnosticForNode(node, fallbackError));
}
// No signature was applicable. We have already reported the errors for the invalid signature.
// If this is a type resolution session, e.g. Language Service, try to get better information that anySignature.
@@ -39264,8 +41054,8 @@ var ts;
// declare function f(a: { xa: number; xb: number; });
// f({ |
if (!produceDiagnostics) {
- for (var _i = 0, candidates_1 = candidates; _i < candidates_1.length; _i++) {
- var candidate = candidates_1[_i];
+ for (var _b = 0, candidates_1 = candidates; _b < candidates_1.length; _b++) {
+ var candidate = candidates_1[_b];
if (hasCorrectArity(node, args, candidate)) {
if (candidate.typeParameters && typeArguments) {
candidate = getSignatureInstantiation(candidate, ts.map(typeArguments, getTypeFromTypeNode));
@@ -39275,45 +41065,37 @@ var ts;
}
}
return resolveErrorCall(node);
- function reportError(message, arg0, arg1, arg2) {
- var errorInfo;
- errorInfo = ts.chainDiagnosticMessages(errorInfo, message, arg0, arg1, arg2);
- if (headMessage) {
- errorInfo = ts.chainDiagnosticMessages(errorInfo, headMessage);
- }
- diagnostics.add(ts.createDiagnosticForNodeFromMessageChain(node, errorInfo));
- }
function chooseOverload(candidates, relation, signatureHelpTrailingComma) {
if (signatureHelpTrailingComma === void 0) { signatureHelpTrailingComma = false; }
+ candidateForArgumentError = undefined;
+ candidateForTypeArgumentError = undefined;
for (var _i = 0, candidates_2 = candidates; _i < candidates_2.length; _i++) {
var originalCandidate = candidates_2[_i];
if (!hasCorrectArity(node, args, originalCandidate, signatureHelpTrailingComma)) {
continue;
}
var candidate = void 0;
- var typeArgumentsAreValid = void 0;
- var inferenceContext = originalCandidate.typeParameters
- ? createInferenceContext(originalCandidate, /*inferUnionTypes*/ false, /*useAnyForNoInferences*/ ts.isInJavaScriptFile(node))
- : undefined;
+ var inferenceContext = originalCandidate.typeParameters ?
+ createInferenceContext(originalCandidate, /*flags*/ ts.isInJavaScriptFile(node) ? 4 /* AnyDefault */ : 0) :
+ undefined;
while (true) {
candidate = originalCandidate;
if (candidate.typeParameters) {
var typeArgumentTypes = void 0;
if (typeArguments) {
typeArgumentTypes = fillMissingTypeArguments(ts.map(typeArguments, getTypeFromTypeNode), candidate.typeParameters, getMinTypeArgumentCount(candidate.typeParameters));
- typeArgumentsAreValid = checkTypeArguments(candidate, typeArguments, typeArgumentTypes, /*reportErrors*/ false);
+ if (!checkTypeArguments(candidate, typeArguments, typeArgumentTypes, /*reportErrors*/ false)) {
+ candidateForTypeArgumentError = originalCandidate;
+ break;
+ }
}
else {
- inferTypeArguments(node, candidate, args, excludeArgument, inferenceContext);
- typeArgumentTypes = inferenceContext.inferredTypes;
- typeArgumentsAreValid = inferenceContext.failedTypeParameterIndex === undefined;
- }
- if (!typeArgumentsAreValid) {
- break;
+ typeArgumentTypes = inferTypeArguments(node, candidate, args, excludeArgument, inferenceContext);
}
candidate = getSignatureInstantiation(candidate, typeArgumentTypes);
}
if (!checkApplicableSignature(node, args, candidate, relation, excludeArgument, /*reportErrors*/ false)) {
+ candidateForArgumentError = candidate;
break;
}
var index = excludeArgument ? ts.indexOf(excludeArgument, /*value*/ true) : -1;
@@ -39322,27 +41104,6 @@ var ts;
}
excludeArgument[index] = false;
}
- // A post-mortem of this iteration of the loop. The signature was not applicable,
- // so we want to track it as a candidate for reporting an error. If the candidate
- // had no type parameters, or had no issues related to type arguments, we can
- // report an error based on the arguments. If there was an issue with type
- // arguments, then we can only report an error based on the type arguments.
- if (originalCandidate.typeParameters) {
- var instantiatedCandidate = candidate;
- if (typeArgumentsAreValid) {
- candidateForArgumentError = instantiatedCandidate;
- }
- else {
- candidateForTypeArgumentError = originalCandidate;
- if (!typeArguments) {
- resultOfFailedInference = inferenceContext;
- }
- }
- }
- else {
- ts.Debug.assert(originalCandidate === candidate);
- candidateForArgumentError = originalCandidate;
- }
}
return undefined;
}
@@ -39450,7 +41211,7 @@ var ts;
// only the class declaration node will have the Abstract flag set.
var valueDecl = expressionType.symbol && getClassLikeDeclarationOfSymbol(expressionType.symbol);
if (valueDecl && ts.getModifierFlags(valueDecl) & 128 /* Abstract */) {
- error(node, ts.Diagnostics.Cannot_create_an_instance_of_the_abstract_class_0, ts.declarationNameToString(valueDecl.name));
+ error(node, ts.Diagnostics.Cannot_create_an_instance_of_the_abstract_class_0, ts.declarationNameToString(ts.getNameOfDeclaration(valueDecl)));
return resolveErrorCall(node);
}
// TS 1.0 spec: 4.11
@@ -39480,7 +41241,7 @@ var ts;
var callSignatures = getSignaturesOfType(expressionType, 0 /* Call */);
if (callSignatures.length) {
var signature = resolveCall(node, callSignatures, candidatesOutArray);
- if (getReturnTypeOfSignature(signature) !== voidType) {
+ if (!isJavaScriptConstructor(signature.declaration) && getReturnTypeOfSignature(signature) !== voidType) {
error(node, ts.Diagnostics.Only_a_void_function_can_be_called_with_the_new_keyword);
}
if (getThisTypeOfSignature(signature) === voidType) {
@@ -39617,8 +41378,8 @@ var ts;
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];
+ for (var _i = 0, types_16 = types; _i < types_16.length; _i++) {
+ var type = types_16[_i];
result = result || resolveStatelessJsxOpeningLikeElement(openingLikeElement, type, candidatesOutArray);
}
return result;
@@ -39678,13 +41439,35 @@ var ts;
// that could cause infinite recursion. Instead, return anySignature.
return getNodeLinks(node).resolvedSignature === resolvingSignature ? resolvingSignature : getResolvedSignature(node);
}
+ /**
+ * Indicates whether a declaration can be treated as a constructor in a JavaScript
+ * file.
+ */
+ function isJavaScriptConstructor(node) {
+ if (ts.isInJavaScriptFile(node)) {
+ // If the node has a @class tag, treat it like a constructor.
+ if (ts.getJSDocClassTag(node))
+ return true;
+ // If the symbol of the node has members, treat it like a constructor.
+ var symbol = ts.isFunctionDeclaration(node) || ts.isFunctionExpression(node) ? getSymbolOfNode(node) :
+ ts.isVariableDeclaration(node) && ts.isFunctionExpression(node.initializer) ? getSymbolOfNode(node.initializer) :
+ undefined;
+ return symbol && symbol.members !== undefined;
+ }
+ return false;
+ }
function getInferredClassType(symbol) {
var links = getSymbolLinks(symbol);
if (!links.inferredClassType) {
- links.inferredClassType = createAnonymousType(symbol, symbol.members, emptyArray, emptyArray, /*stringIndexType*/ undefined, /*numberIndexType*/ undefined);
+ links.inferredClassType = createAnonymousType(symbol, symbol.members || emptySymbols, emptyArray, emptyArray, /*stringIndexType*/ undefined, /*numberIndexType*/ undefined);
}
return links.inferredClassType;
}
+ function isInferredClassType(type) {
+ return type.symbol
+ && getObjectFlags(type) & 16 /* Anonymous */
+ && getSymbolLinks(type.symbol).inferredClassType === type;
+ }
/**
* Syntactically and semantically checks a call or new expression.
* @param node The call/new expression to be checked.
@@ -39715,7 +41498,7 @@ var ts;
if (funcSymbol && ts.isDeclarationOfFunctionOrClassExpression(funcSymbol)) {
funcSymbol = getSymbolOfNode(funcSymbol.valueDeclaration.initializer);
}
- if (funcSymbol && funcSymbol.members && funcSymbol.flags & 16 /* Function */) {
+ if (funcSymbol && funcSymbol.flags & 16 /* Function */ && (funcSymbol.members || ts.getJSDocClassTag(funcSymbol.valueDeclaration))) {
return getInferredClassType(funcSymbol);
}
else if (noImplicitAny) {
@@ -39730,6 +41513,31 @@ var ts;
}
return getReturnTypeOfSignature(signature);
}
+ function checkImportCallExpression(node) {
+ // Check grammar of dynamic import
+ checkGrammarArguments(node, node.arguments) || checkGrammarImportCallExpression(node);
+ if (node.arguments.length === 0) {
+ return createPromiseReturnType(node, anyType);
+ }
+ var specifier = node.arguments[0];
+ var specifierType = checkExpressionCached(specifier);
+ // Even though multiple arugments is grammatically incorrect, type-check extra arguments for completion
+ for (var i = 1; i < node.arguments.length; ++i) {
+ checkExpressionCached(node.arguments[i]);
+ }
+ if (specifierType.flags & 2048 /* Undefined */ || specifierType.flags & 4096 /* Null */ || !isTypeAssignableTo(specifierType, stringType)) {
+ error(specifier, ts.Diagnostics.Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0, typeToString(specifierType));
+ }
+ // resolveExternalModuleName will return undefined if the moduleReferenceExpression is not a string literal
+ var moduleSymbol = resolveExternalModuleName(node, specifier);
+ if (moduleSymbol) {
+ var esModuleSymbol = resolveESModuleSymbol(moduleSymbol, specifier, /*dontRecursivelyResolve*/ true);
+ if (esModuleSymbol) {
+ return createPromiseReturnType(node, getTypeOfSymbol(esModuleSymbol));
+ }
+ }
+ return createPromiseReturnType(node, anyType);
+ }
function isCommonJsRequire(node) {
if (!ts.isRequireCall(node, /*checkArgumentIsStringLiteral*/ true)) {
return false;
@@ -39795,7 +41603,7 @@ var ts;
if (strictNullChecks) {
var declaration = symbol.valueDeclaration;
if (declaration && declaration.initializer) {
- return includeFalsyTypes(type, 2048 /* Undefined */);
+ return getNullableType(type, 2048 /* Undefined */);
}
}
return type;
@@ -39808,37 +41616,42 @@ var ts;
function getTypeOfFirstParameterOfSignature(signature) {
return signature.parameters.length > 0 ? getTypeAtPosition(signature, 0) : neverType;
}
- function assignContextualParameterTypes(signature, context, mapper, checkMode) {
+ function inferFromAnnotatedParameters(signature, context, mapper) {
var len = signature.parameters.length - (signature.hasRestParameter ? 1 : 0);
- if (checkMode === 2 /* Inferential */) {
- for (var i = 0; i < len; i++) {
- var declaration = signature.parameters[i].valueDeclaration;
- if (declaration.type) {
- inferTypesWithContext(mapper.context, getTypeFromTypeNode(declaration.type), getTypeAtPosition(context, i));
+ for (var i = 0; i < len; i++) {
+ var declaration = signature.parameters[i].valueDeclaration;
+ if (declaration.type) {
+ var typeNode = ts.getEffectiveTypeAnnotationNode(declaration);
+ if (typeNode) {
+ inferTypes(mapper.inferences, getTypeFromTypeNode(typeNode), getTypeAtPosition(context, i));
}
}
}
+ }
+ function assignContextualParameterTypes(signature, context) {
+ signature.typeParameters = context.typeParameters;
if (context.thisParameter) {
var parameter = signature.thisParameter;
if (!parameter || parameter.valueDeclaration && !parameter.valueDeclaration.type) {
if (!parameter) {
signature.thisParameter = createSymbolWithType(context.thisParameter, /*type*/ undefined);
}
- assignTypeToParameterAndFixTypeParameters(signature.thisParameter, getTypeOfSymbol(context.thisParameter), mapper, checkMode);
+ assignTypeToParameterAndFixTypeParameters(signature.thisParameter, getTypeOfSymbol(context.thisParameter));
}
}
+ var len = signature.parameters.length - (signature.hasRestParameter ? 1 : 0);
for (var i = 0; i < len; i++) {
var parameter = signature.parameters[i];
- if (!parameter.valueDeclaration.type) {
+ if (!ts.getEffectiveTypeAnnotationNode(parameter.valueDeclaration)) {
var contextualParameterType = getTypeAtPosition(context, i);
- assignTypeToParameterAndFixTypeParameters(parameter, contextualParameterType, mapper, checkMode);
+ assignTypeToParameterAndFixTypeParameters(parameter, contextualParameterType);
}
}
if (signature.hasRestParameter && isRestParameterIndex(context, signature.parameters.length - 1)) {
var parameter = ts.lastOrUndefined(signature.parameters);
- if (!parameter.valueDeclaration.type) {
+ if (!ts.getEffectiveTypeAnnotationNode(parameter.valueDeclaration)) {
var contextualParameterType = getTypeOfSymbol(ts.lastOrUndefined(context.parameters));
- assignTypeToParameterAndFixTypeParameters(parameter, contextualParameterType, mapper, checkMode);
+ assignTypeToParameterAndFixTypeParameters(parameter, contextualParameterType);
}
}
}
@@ -39857,57 +41670,18 @@ var ts;
}
}
}
- function assignTypeToParameterAndFixTypeParameters(parameter, contextualType, mapper, checkMode) {
+ function assignTypeToParameterAndFixTypeParameters(parameter, contextualType) {
var links = getSymbolLinks(parameter);
if (!links.type) {
- links.type = instantiateType(contextualType, mapper);
+ links.type = contextualType;
+ var name = ts.getNameOfDeclaration(parameter.valueDeclaration);
// 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 === 174 /* ObjectBindingPattern */ ||
- parameter.valueDeclaration.name.kind === 175 /* ArrayBindingPattern */)) {
- links.type = getTypeFromBindingPattern(parameter.valueDeclaration.name);
+ (name.kind === 174 /* ObjectBindingPattern */ || name.kind === 175 /* ArrayBindingPattern */)) {
+ links.type = getTypeFromBindingPattern(name);
}
assignBindingElementTypes(parameter.valueDeclaration);
}
- 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,
- // we need to ensure that type parameters at the same positions get fixed again. This is
- // done by calling instantiateType to attach the mapper to the contextualType, and then
- // calling inferTypes to force a walk of contextualType so that all the correct fixing
- // happens. The choice to pass in links.type may seem kind of arbitrary, but it serves
- // to make sure that all the correct positions in contextualType are reached by the walk.
- // Here is an example:
- //
- // interface Base {
- // baseProp;
- // }
- // interface Derived extends Base {
- // toBase(): Base;
- // }
- //
- // var derived: Derived;
- //
- // declare function foo<T>(x: T, func: (p: T) => T): T;
- // declare function foo<T>(x: T, func: (p: T) => T): T;
- //
- // var result = foo(derived, d => d.toBase());
- //
- // We are typing d while checking the second overload. But we've already given d
- // a type (Derived) from the first overload. However, we still want to fix the
- // 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).
- inferTypesWithContext(mapper.context, links.type, instantiateType(contextualType, mapper));
- }
- }
- function getReturnTypeFromJSDocComment(func) {
- var returnTag = ts.getJSDocReturnTag(func);
- if (returnTag && returnTag.typeExpression) {
- return getTypeFromTypeNode(returnTag.typeExpression.type);
- }
- return undefined;
}
function createPromiseType(promisedType) {
// creates a `Promise<T>` type where `T` is the promisedType argument
@@ -39922,11 +41696,15 @@ var ts;
function createPromiseReturnType(func, promisedType) {
var promiseType = createPromiseType(promisedType);
if (promiseType === emptyObjectType) {
- 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);
+ error(func, ts.isImportCall(func) ?
+ ts.Diagnostics.A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option :
+ 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);
+ error(func, ts.isImportCall(func) ?
+ ts.Diagnostics.A_dynamic_import_call_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option :
+ 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;
}
@@ -39996,7 +41774,7 @@ 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 (functionFlags & 3 /* AsyncOrAsyncGenerator */) === 2 /* Async */
+ return (functionFlags & 3 /* AsyncGenerator */) === 2 /* Async */
? createPromiseReturnType(func, widenedType) // Async function
: widenedType; // Generator function, AsyncGenerator function, or normal function
}
@@ -40109,16 +41887,16 @@ var ts;
}
var hasExplicitReturn = func.flags & 256 /* HasExplicitReturn */;
if (returnType && returnType.flags & 8192 /* Never */) {
- error(func.type, ts.Diagnostics.A_function_returning_never_cannot_have_a_reachable_end_point);
+ error(ts.getEffectiveReturnTypeNode(func), ts.Diagnostics.A_function_returning_never_cannot_have_a_reachable_end_point);
}
else if (returnType && !hasExplicitReturn) {
// minimal check: function has syntactic return type annotation and no explicit return statements in the body
// this function does not conform to the specification.
// NOTE: having returnType !== undefined is a precondition for entering this branch so func.type will always be present
- error(func.type, ts.Diagnostics.A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value);
+ error(ts.getEffectiveReturnTypeNode(func), ts.Diagnostics.A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value);
}
else if (returnType && strictNullChecks && !isTypeAssignableTo(undefinedType, returnType)) {
- error(func.type, ts.Diagnostics.Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined);
+ error(ts.getEffectiveReturnTypeNode(func), ts.Diagnostics.Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined);
}
else if (compilerOptions.noImplicitReturns) {
if (!returnType) {
@@ -40133,7 +41911,7 @@ var ts;
return;
}
}
- error(func.type || func, ts.Diagnostics.Not_all_code_paths_return_a_value);
+ error(ts.getEffectiveReturnTypeNode(func) || func, ts.Diagnostics.Not_all_code_paths_return_a_value);
}
}
function checkFunctionExpressionOrObjectLiteralMethod(node, checkMode) {
@@ -40150,35 +41928,34 @@ var ts;
}
var links = getNodeLinks(node);
var type = getTypeOfSymbol(node.symbol);
- var contextSensitive = isContextSensitive(node);
- 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.
- if (mightFixTypeParameters || !(links.flags & 1024 /* ContextChecked */)) {
+ if (!(links.flags & 1024 /* ContextChecked */)) {
var contextualSignature = getContextualSignature(node);
// If a type check is started at a function expression that is an argument of a function call, obtaining the
// contextual type may recursively get back to here during overload resolution of the call. If so, we will have
// already assigned contextual types.
- var contextChecked = !!(links.flags & 1024 /* ContextChecked */);
- if (mightFixTypeParameters || !contextChecked) {
+ if (!(links.flags & 1024 /* ContextChecked */)) {
links.flags |= 1024 /* ContextChecked */;
if (contextualSignature) {
var signature = getSignaturesOfType(type, 0 /* Call */)[0];
- if (contextSensitive) {
- assignContextualParameterTypes(signature, contextualSignature, getContextualMapper(node), checkMode);
+ if (isContextSensitive(node)) {
+ var contextualMapper = getContextualMapper(node);
+ if (checkMode === 2 /* Inferential */) {
+ inferFromAnnotatedParameters(signature, contextualSignature, contextualMapper);
+ }
+ var instantiatedContextualSignature = contextualMapper === identityMapper ?
+ contextualSignature : instantiateSignature(contextualSignature, contextualMapper);
+ assignContextualParameterTypes(signature, instantiatedContextualSignature);
}
- if (mightFixTypeParameters || !node.type && !signature.resolvedReturnType) {
+ if (!ts.getEffectiveReturnTypeNode(node) && !signature.resolvedReturnType) {
var returnType = getReturnTypeFromBody(node, checkMode);
if (!signature.resolvedReturnType) {
signature.resolvedReturnType = returnType;
}
}
}
- if (!contextChecked) {
- checkSignatureDeclaration(node);
- checkNodeDeferred(node);
- }
+ checkSignatureDeclaration(node);
+ checkNodeDeferred(node);
}
}
if (produceDiagnostics && node.kind !== 151 /* MethodDeclaration */) {
@@ -40191,16 +41968,17 @@ var ts;
function checkFunctionExpressionOrObjectLiteralMethodDeferred(node) {
ts.Debug.assert(node.kind !== 151 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node));
var functionFlags = ts.getFunctionFlags(node);
- var returnOrPromisedType = node.type &&
- ((functionFlags & 3 /* AsyncOrAsyncGenerator */) === 2 /* Async */ ?
+ var returnTypeNode = ts.getEffectiveReturnTypeNode(node);
+ var returnOrPromisedType = returnTypeNode &&
+ ((functionFlags & 3 /* AsyncGenerator */) === 2 /* Async */ ?
checkAsyncFunctionReturnType(node) :
- getTypeFromTypeNode(node.type)); // AsyncGenerator function, Generator function, or normal function
+ getTypeFromTypeNode(returnTypeNode)); // AsyncGenerator function, Generator function, or normal function
if ((functionFlags & 1 /* Generator */) === 0) {
// return is not necessary in the body of generators
checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnOrPromisedType);
}
if (node.body) {
- if (!node.type) {
+ if (!returnTypeNode) {
// There are some checks that are only performed in getReturnTypeFromBody, that may produce errors
// we need. An example is the noImplicitAny errors resulting from widening the return expression
// of a function. Because checking of function expression bodies is deferred, there was never an
@@ -40219,7 +41997,7 @@ var ts;
// its return type annotation.
var exprType = checkExpression(node.body);
if (returnOrPromisedType) {
- if ((functionFlags & 3 /* AsyncOrAsyncGenerator */) === 2 /* Async */) {
+ if ((functionFlags & 3 /* AsyncGenerator */) === 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);
}
@@ -40232,7 +42010,7 @@ var ts;
}
}
function checkArithmeticOperandType(operand, type, diagnostic) {
- if (!isTypeAnyOrAllConstituentTypesHaveKind(type, 340 /* NumberLike */)) {
+ if (!isTypeAnyOrAllConstituentTypesHaveKind(type, 84 /* NumberLike */)) {
error(operand, diagnostic);
return false;
}
@@ -40245,8 +42023,8 @@ 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 !!(getCheckFlags(symbol) & 8 /* Readonly */ ||
- symbol.flags & 4 /* Property */ && getDeclarationModifierFlagsFromSymbol(symbol) & 64 /* Readonly */ ||
+ return !!(ts.getCheckFlags(symbol) & 8 /* Readonly */ ||
+ symbol.flags & 4 /* Property */ && ts.getDeclarationModifierFlagsFromSymbol(symbol) & 64 /* Readonly */ ||
symbol.flags & 3 /* Variable */ && getDeclarationNodeFlagsFromSymbol(symbol) & 2 /* Const */ ||
symbol.flags & 98304 /* Accessor */ && !(symbol.flags & 65536 /* SetAccessor */) ||
symbol.flags & 8 /* EnumMember */);
@@ -40259,8 +42037,9 @@ var ts;
expr.expression.kind === 99 /* 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 === 152 /* Constructor */))
+ if (!(func && func.kind === 152 /* 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,
// then symbol is writeable here.
@@ -40285,7 +42064,7 @@ var ts;
}
function checkReferenceExpression(expr, invalidReferenceMessage) {
// References are combinations of identifiers, parentheses, and property accesses.
- var node = ts.skipParentheses(expr);
+ var node = ts.skipOuterExpressions(expr, 2 /* Assertions */ | 1 /* Parentheses */);
if (node.kind !== 71 /* Identifier */ && node.kind !== 179 /* PropertyAccessExpression */ && node.kind !== 180 /* ElementAccessExpression */) {
error(expr, invalidReferenceMessage);
return false;
@@ -40333,7 +42112,7 @@ var ts;
return silentNeverType;
}
if (node.operator === 38 /* MinusToken */ && node.operand.kind === 8 /* NumericLiteral */) {
- return getFreshTypeOfLiteralType(getLiteralTypeForText(64 /* NumberLiteral */, "" + -node.operand.text));
+ return getFreshTypeOfLiteralType(getLiteralType(-node.operand.text));
}
switch (node.operator) {
case 37 /* PlusToken */:
@@ -40380,8 +42159,8 @@ var ts;
}
if (type.flags & 196608 /* UnionOrIntersection */) {
var types = type.types;
- for (var _i = 0, types_19 = types; _i < types_19.length; _i++) {
- var t = types_19[_i];
+ for (var _i = 0, types_17 = types; _i < types_17.length; _i++) {
+ var t = types_17[_i];
if (maybeTypeOfKind(t, kind)) {
return true;
}
@@ -40398,8 +42177,8 @@ var ts;
}
if (type.flags & 65536 /* Union */) {
var types = type.types;
- for (var _i = 0, types_20 = types; _i < types_20.length; _i++) {
- var t = types_20[_i];
+ for (var _i = 0, types_18 = types; _i < types_18.length; _i++) {
+ var t = types_18[_i];
if (!isTypeOfKind(t, kind)) {
return false;
}
@@ -40408,8 +42187,8 @@ var ts;
}
if (type.flags & 131072 /* Intersection */) {
var types = type.types;
- for (var _a = 0, types_21 = types; _a < types_21.length; _a++) {
- var t = types_21[_a];
+ for (var _a = 0, types_19 = types; _a < types_19.length; _a++) {
+ var t = types_19[_a];
if (isTypeOfKind(t, kind)) {
return true;
}
@@ -40454,7 +42233,7 @@ var ts;
// 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.
// The result is always of the Boolean primitive type.
- if (!(isTypeComparableTo(leftType, stringType) || isTypeOfKind(leftType, 340 /* NumberLike */ | 512 /* ESSymbol */))) {
+ if (!(isTypeComparableTo(leftType, stringType) || isTypeOfKind(leftType, 84 /* 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 */ | 540672 /* TypeVariable */ | 16777216 /* NonPrimitive */)) {
@@ -40523,7 +42302,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(sourceType, node, /*allowStringInput*/ false, /*allowAsyncIterable*/ false) || unknownType;
+ var elementType = checkIteratedTypeOrElementType(sourceType, node, /*allowStringInput*/ false, /*allowAsyncIterables*/ false) || unknownType;
var elements = node.elements;
for (var i = 0; i < elements.length; i++) {
checkArrayLiteralDestructuringElementAssignment(node, sourceType, i, elementType, checkMode);
@@ -40749,7 +42528,7 @@ var ts;
rightType = checkNonNullType(rightType, right);
}
var resultType = void 0;
- if (isTypeOfKind(leftType, 340 /* NumberLike */) && isTypeOfKind(rightType, 340 /* NumberLike */)) {
+ if (isTypeOfKind(leftType, 84 /* NumberLike */) && isTypeOfKind(rightType, 84 /* NumberLike */)) {
// Operands of an enum type are treated as having the primitive type Number.
// If both operands are of the Number primitive type, the result is of the Number primitive type.
resultType = numberType;
@@ -40809,7 +42588,7 @@ var ts;
return checkInExpression(left, right, leftType, rightType);
case 53 /* AmpersandAmpersandToken */:
return getTypeFacts(leftType) & 1048576 /* Truthy */ ?
- includeFalsyTypes(rightType, getFalsyFlags(strictNullChecks ? leftType : getBaseTypeOfLiteralType(rightType))) :
+ getUnionType([extractDefinitelyFalsyTypes(strictNullChecks ? leftType : getBaseTypeOfLiteralType(rightType)), rightType]) :
leftType;
case 54 /* BarBarToken */:
return getTypeFacts(leftType) & 2097152 /* Falsy */ ?
@@ -40854,7 +42633,7 @@ var ts;
}
}
function checkAssignmentOperator(valueType) {
- if (produceDiagnostics && operator >= 58 /* FirstAssignment */ && operator <= 70 /* LastAssignment */) {
+ if (produceDiagnostics && ts.isAssignmentOperator(operator)) {
// TypeScript 1.0 spec (April 2014): 4.17
// An assignment of the form
// VarExpr = ValueExpr
@@ -40902,12 +42681,15 @@ var ts;
// we are in a yield context.
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) {
+ // Async generator functions prior to ESNext require the __await, __asyncDelegator,
+ // and __asyncValues helpers
+ if ((functionFlags & 3 /* AsyncGenerator */) === 3 /* AsyncGenerator */ &&
+ languageVersion < 5 /* ESNext */) {
+ checkExternalEmitHelpers(node, 26624 /* AsyncDelegatorIncludes */);
+ }
+ // Generator functions prior to ES2015 require the __values helper
+ if ((functionFlags & 3 /* AsyncGenerator */) === 1 /* Generator */ &&
+ languageVersion < 2 /* ES2015 */ && compilerOptions.downlevelIteration) {
checkExternalEmitHelpers(node, 256 /* Values */);
}
}
@@ -40921,8 +42703,9 @@ var ts;
// 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 = getIteratedTypeOfGenerator(getTypeFromTypeNode(func.type), (functionFlags & 2 /* Async */) !== 0) || anyType;
+ var returnType = ts.getEffectiveReturnTypeNode(func);
+ if (returnType) {
+ var signatureElementType = getIteratedTypeOfGenerator(getTypeFromTypeNode(returnType), (functionFlags & 2 /* Async */) !== 0) || anyType;
if (nodeIsYieldStar) {
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)
@@ -40953,9 +42736,9 @@ var ts;
}
switch (node.kind) {
case 9 /* StringLiteral */:
- return getFreshTypeOfLiteralType(getLiteralTypeForText(32 /* StringLiteral */, node.text));
+ return getFreshTypeOfLiteralType(getLiteralType(node.text));
case 8 /* NumericLiteral */:
- return getFreshTypeOfLiteralType(getLiteralTypeForText(64 /* NumberLiteral */, node.text));
+ return getFreshTypeOfLiteralType(getLiteralType(+node.text));
case 101 /* TrueKeyword */:
return trueType;
case 86 /* FalseKeyword */:
@@ -41020,7 +42803,7 @@ var ts;
}
contextualType = constraint;
}
- return maybeTypeOfKind(contextualType, (480 /* Literal */ | 262144 /* Index */));
+ return maybeTypeOfKind(contextualType, (224 /* Literal */ | 262144 /* Index */));
}
return false;
}
@@ -41055,7 +42838,7 @@ var ts;
if (signature && signature.typeParameters) {
var contextualType = getApparentTypeOfContextualType(node);
if (contextualType) {
- var contextualSignature = getSingleCallSignature(contextualType);
+ var contextualSignature = getSingleCallSignature(getNonNullableType(contextualType));
if (contextualSignature && !contextualSignature.typeParameters) {
return getOrCreateTypeFromSignature(instantiateSignatureInContextOf(signature, contextualSignature, getContextualMapper(node)));
}
@@ -41159,6 +42942,10 @@ var ts;
case 180 /* ElementAccessExpression */:
return checkIndexedAccess(node);
case 181 /* CallExpression */:
+ if (node.expression.kind === 91 /* ImportKeyword */) {
+ return checkImportCallExpression(node);
+ }
+ /* falls through */
case 182 /* NewExpression */:
return checkCallExpression(node);
case 183 /* TaggedTemplateExpression */:
@@ -41365,28 +43152,31 @@ var ts;
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 */) {
+ if (!(functionFlags & 4 /* Invalid */)) {
+ // Async generators prior to ESNext require the __await and __asyncGenerator helpers
+ if ((functionFlags & 3 /* AsyncGenerator */) === 3 /* AsyncGenerator */ && languageVersion < 5 /* ESNext */) {
+ checkExternalEmitHelpers(node, 6144 /* AsyncGeneratorIncludes */);
+ }
+ // Async functions prior to ES2017 require the __awaiter helper
+ if ((functionFlags & 3 /* AsyncGenerator */) === 2 /* Async */ && languageVersion < 4 /* ES2017 */) {
+ checkExternalEmitHelpers(node, 64 /* Awaiter */);
+ }
+ // Generator functions, Async functions, and Async Generator functions prior to
+ // ES2015 require the __generator helper
+ if ((functionFlags & 3 /* AsyncGenerator */) !== 0 /* Normal */ && languageVersion < 2 /* ES2015 */) {
checkExternalEmitHelpers(node, 128 /* Generator */);
}
}
checkTypeParameters(node.typeParameters);
ts.forEach(node.parameters, checkParameter);
+ // TODO(rbuckton): Should we start checking JSDoc types?
if (node.type) {
checkSourceElement(node.type);
}
if (produceDiagnostics) {
checkCollisionWithArgumentsInGeneratedCode(node);
- if (noImplicitAny && !node.type) {
+ var returnTypeNode = ts.getEffectiveReturnTypeNode(node);
+ if (noImplicitAny && !returnTypeNode) {
switch (node.kind) {
case 156 /* ConstructSignature */:
error(node, ts.Diagnostics.Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type);
@@ -41396,12 +43186,12 @@ var ts;
break;
}
}
- if (node.type) {
+ if (returnTypeNode) {
var functionFlags_1 = ts.getFunctionFlags(node);
- if ((functionFlags_1 & 5 /* InvalidGenerator */) === 1 /* Generator */) {
- var returnType = getTypeFromTypeNode(node.type);
+ if ((functionFlags_1 & (4 /* Invalid */ | 1 /* Generator */)) === 1 /* Generator */) {
+ var returnType = getTypeFromTypeNode(returnTypeNode);
if (returnType === voidType) {
- error(node.type, ts.Diagnostics.A_generator_cannot_have_a_void_type_annotation);
+ error(returnTypeNode, ts.Diagnostics.A_generator_cannot_have_a_void_type_annotation);
}
else {
var generatorElementType = getIteratedTypeOfGenerator(returnType, (functionFlags_1 & 2 /* Async */) !== 0) || anyType;
@@ -41414,10 +43204,10 @@ var ts;
// interface BadGenerator extends Iterable<number>, Iterator<string> { }
// function* g(): BadGenerator { } // Iterable and Iterator have different types!
//
- checkTypeAssignableTo(iterableIteratorInstantiation, returnType, node.type);
+ checkTypeAssignableTo(iterableIteratorInstantiation, returnType, returnTypeNode);
}
}
- else if ((functionFlags_1 & 3 /* AsyncOrAsyncGenerator */) === 2 /* Async */) {
+ else if ((functionFlags_1 & 3 /* AsyncGenerator */) === 2 /* Async */) {
checkAsyncFunctionReturnType(node);
}
}
@@ -41536,7 +43326,7 @@ var ts;
continue;
}
if (names.get(memberName)) {
- error(member.symbol.valueDeclaration.name, ts.Diagnostics.Duplicate_identifier_0, memberName);
+ error(ts.getNameOfDeclaration(member.symbol.valueDeclaration), ts.Diagnostics.Duplicate_identifier_0, memberName);
error(member.name, ts.Diagnostics.Duplicate_identifier_0, memberName);
}
else {
@@ -41624,7 +43414,8 @@ var ts;
return;
}
function containsSuperCallAsComputedPropertyName(n) {
- return n.name && containsSuperCall(n.name);
+ var name = ts.getNameOfDeclaration(n);
+ return name && containsSuperCall(name);
}
function containsSuperCall(n) {
if (ts.isSuperCall(n)) {
@@ -41781,7 +43572,7 @@ var ts;
checkTypeArgumentConstraints(typeParameters, node.typeArguments);
}
}
- if (type.flags & 16 /* Enum */ && !type.memberTypes && getNodeLinks(node).resolvedSymbol.flags & 8 /* EnumMember */) {
+ if (type.flags & 16 /* Enum */ && getNodeLinks(node).resolvedSymbol.flags & 8 /* EnumMember */) {
error(node, ts.Diagnostics.Enum_type_0_has_members_with_initializers_that_are_not_literals, typeToString(type));
}
}
@@ -41824,7 +43615,7 @@ var ts;
}
// 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 */)) {
+ if (maybeTypeOfKind(objectType, 540672 /* TypeVariable */) && isTypeOfKind(indexType, 84 /* NumberLike */)) {
var constraint = getBaseConstraintOfType(objectType);
if (constraint && getIndexInfoOfType(constraint, 1 /* Number */)) {
return type;
@@ -41884,16 +43675,16 @@ var ts;
ts.forEach(overloads, function (o) {
var deviation = getEffectiveDeclarationFlags(o, flagsToCheck) ^ canonicalFlags_1;
if (deviation & 1 /* Export */) {
- error(o.name, ts.Diagnostics.Overload_signatures_must_all_be_exported_or_non_exported);
+ error(ts.getNameOfDeclaration(o), ts.Diagnostics.Overload_signatures_must_all_be_exported_or_non_exported);
}
else if (deviation & 2 /* Ambient */) {
- error(o.name, ts.Diagnostics.Overload_signatures_must_all_be_ambient_or_non_ambient);
+ error(ts.getNameOfDeclaration(o), ts.Diagnostics.Overload_signatures_must_all_be_ambient_or_non_ambient);
}
else if (deviation & (8 /* Private */ | 16 /* Protected */)) {
- error(o.name || o, ts.Diagnostics.Overload_signatures_must_all_be_public_private_or_protected);
+ error(ts.getNameOfDeclaration(o) || o, ts.Diagnostics.Overload_signatures_must_all_be_public_private_or_protected);
}
else if (deviation & 128 /* Abstract */) {
- error(o.name, ts.Diagnostics.Overload_signatures_must_all_be_abstract_or_non_abstract);
+ error(ts.getNameOfDeclaration(o), ts.Diagnostics.Overload_signatures_must_all_be_abstract_or_non_abstract);
}
});
}
@@ -41904,7 +43695,7 @@ var ts;
ts.forEach(overloads, function (o) {
var deviation = ts.hasQuestionToken(o) !== canonicalHasQuestionToken_1;
if (deviation) {
- error(o.name, ts.Diagnostics.Overload_signatures_must_all_be_optional_or_required);
+ error(ts.getNameOfDeclaration(o), ts.Diagnostics.Overload_signatures_must_all_be_optional_or_required);
}
});
}
@@ -42028,7 +43819,7 @@ var ts;
}
if (duplicateFunctionDeclaration) {
ts.forEach(declarations, function (declaration) {
- error(declaration.name, ts.Diagnostics.Duplicate_function_implementation);
+ error(ts.getNameOfDeclaration(declaration), ts.Diagnostics.Duplicate_function_implementation);
});
}
// Abstract methods can't have an implementation -- in particular, they don't need one.
@@ -42042,8 +43833,8 @@ var ts;
if (bodyDeclaration) {
var signatures = getSignaturesOfSymbol(symbol);
var bodySignature = getSignatureFromDeclaration(bodyDeclaration);
- for (var _a = 0, signatures_4 = signatures; _a < signatures_4.length; _a++) {
- var signature = signatures_4[_a];
+ for (var _a = 0, signatures_7 = signatures; _a < signatures_7.length; _a++) {
+ var signature = signatures_7[_a];
if (!isImplementationCompatibleWithOverload(bodySignature, signature)) {
error(signature.declaration, ts.Diagnostics.Overload_signature_is_not_compatible_with_function_implementation);
break;
@@ -42101,12 +43892,13 @@ var ts;
for (var _b = 0, _c = symbol.declarations; _b < _c.length; _b++) {
var d = _c[_b];
var declarationSpaces = getDeclarationSpaces(d);
+ var name = ts.getNameOfDeclaration(d);
// Only error on the declarations that contributed to the intersecting spaces.
if (declarationSpaces & commonDeclarationSpacesForDefaultAndNonDefault) {
- error(d.name, ts.Diagnostics.Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead, ts.declarationNameToString(d.name));
+ error(name, ts.Diagnostics.Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead, ts.declarationNameToString(name));
}
else if (declarationSpaces & commonDeclarationSpacesForExportsAndLocals) {
- error(d.name, ts.Diagnostics.Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local, ts.declarationNameToString(d.name));
+ error(name, ts.Diagnostics.Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local, ts.declarationNameToString(name));
}
}
}
@@ -42326,7 +44118,8 @@ var ts;
// then<U>(...): Promise<U>;
// }
//
- var returnType = getTypeFromTypeNode(node.type);
+ var returnTypeNode = ts.getEffectiveReturnTypeNode(node);
+ var returnType = getTypeFromTypeNode(returnTypeNode);
if (languageVersion >= 2 /* ES2015 */) {
if (returnType === unknownType) {
return unknownType;
@@ -42335,29 +44128,29 @@ var ts;
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);
+ error(returnTypeNode, ts.Diagnostics.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type);
return unknownType;
}
}
else {
// Always mark the type node as referenced if it points to a value
- markTypeNodeAsReferenced(node.type);
+ markTypeNodeAsReferenced(returnTypeNode);
if (returnType === unknownType) {
return unknownType;
}
- var promiseConstructorName = ts.getEntityNameFromTypeNode(node.type);
+ var promiseConstructorName = ts.getEntityNameFromTypeNode(returnTypeNode);
if (promiseConstructorName === undefined) {
- 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, typeToString(returnType));
+ error(returnTypeNode, 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, typeToString(returnType));
return unknownType;
}
var promiseConstructorSymbol = resolveEntityName(promiseConstructorName, 107455 /* Value */, /*ignoreErrors*/ true);
var promiseConstructorType = promiseConstructorSymbol ? getTypeOfSymbol(promiseConstructorSymbol) : unknownType;
if (promiseConstructorType === unknownType) {
if (promiseConstructorName.kind === 71 /* 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);
+ error(returnTypeNode, 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));
+ error(returnTypeNode, 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;
}
@@ -42365,10 +44158,10 @@ var ts;
if (globalPromiseConstructorLikeType === emptyObjectType) {
// If we couldn't resolve the global PromiseConstructorLike type we cannot verify
// compatibility with __awaiter.
- 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));
+ error(returnTypeNode, 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;
}
- if (!checkTypeAssignableTo(promiseConstructorType, globalPromiseConstructorLikeType, 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)) {
+ if (!checkTypeAssignableTo(promiseConstructorType, globalPromiseConstructorLikeType, returnTypeNode, 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)) {
return unknownType;
}
// Verify there is no local declaration that could collide with the promise constructor.
@@ -42421,7 +44214,9 @@ var ts;
* marked as referenced to prevent import elision.
*/
function markTypeNodeAsReferenced(node) {
- var typeName = node && ts.getEntityNameFromTypeNode(node);
+ markEntityNameOrEntityExpressionAsReference(node && ts.getEntityNameFromTypeNode(node));
+ }
+ function markEntityNameOrEntityExpressionAsReference(typeName) {
var rootName = typeName && getFirstIdentifier(typeName);
var rootSymbol = rootName && resolveName(rootName, rootName.text, (typeName.kind === 71 /* Identifier */ ? 793064 /* Type */ : 1920 /* Namespace */) | 8388608 /* Alias */, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined);
if (rootSymbol
@@ -42431,8 +44226,60 @@ var ts;
markAliasSymbolAsReferenced(rootSymbol);
}
}
+ /**
+ * This function marks the type used for metadata decorator as referenced if it is import
+ * from external module.
+ * This is different from markTypeNodeAsReferenced because it tries to simplify type nodes in
+ * union and intersection type
+ * @param node
+ */
+ function markDecoratorMedataDataTypeNodeAsReferenced(node) {
+ var entityName = getEntityNameForDecoratorMetadata(node);
+ if (entityName && ts.isEntityName(entityName)) {
+ markEntityNameOrEntityExpressionAsReference(entityName);
+ }
+ }
+ function getEntityNameForDecoratorMetadata(node) {
+ if (node) {
+ switch (node.kind) {
+ case 167 /* IntersectionType */:
+ case 166 /* UnionType */:
+ var commonEntityName = void 0;
+ for (var _i = 0, _a = node.types; _i < _a.length; _i++) {
+ var typeNode = _a[_i];
+ var individualEntityName = getEntityNameForDecoratorMetadata(typeNode);
+ if (!individualEntityName) {
+ // Individual is something like string number
+ // So it would be serialized to either that type or object
+ // Safe to return here
+ return undefined;
+ }
+ if (commonEntityName) {
+ // Note this is in sync with the transformation that happens for type node.
+ // Keep this in sync with serializeUnionOrIntersectionType
+ // Verify if they refer to same entity and is identifier
+ // return undefined if they dont match because we would emit object
+ if (!ts.isIdentifier(commonEntityName) ||
+ !ts.isIdentifier(individualEntityName) ||
+ commonEntityName.text !== individualEntityName.text) {
+ return undefined;
+ }
+ }
+ else {
+ commonEntityName = individualEntityName;
+ }
+ }
+ return commonEntityName;
+ case 168 /* ParenthesizedType */:
+ return getEntityNameForDecoratorMetadata(node.type);
+ case 159 /* TypeReference */:
+ return node.typeName;
+ }
+ }
+ }
function getParameterTypeNodeForDecoratorCheck(node) {
- return node.dotDotDotToken ? ts.getRestParameterElementType(node.type) : node.type;
+ var typeNode = ts.getEffectiveTypeAnnotationNode(node);
+ return ts.isRestParameter(node) ? ts.getRestParameterElementType(typeNode) : typeNode;
}
/** Check the decorators of a node */
function checkDecorators(node) {
@@ -42461,7 +44308,7 @@ var ts;
if (constructor) {
for (var _i = 0, _a = constructor.parameters; _i < _a.length; _i++) {
var parameter = _a[_i];
- markTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(parameter));
+ markDecoratorMedataDataTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(parameter));
}
}
break;
@@ -42470,15 +44317,15 @@ var ts;
case 154 /* SetAccessor */:
for (var _b = 0, _c = node.parameters; _b < _c.length; _b++) {
var parameter = _c[_b];
- markTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(parameter));
+ markDecoratorMedataDataTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(parameter));
}
- markTypeNodeAsReferenced(node.type);
+ markDecoratorMedataDataTypeNodeAsReferenced(ts.getEffectiveReturnTypeNode(node));
break;
case 149 /* PropertyDeclaration */:
- markTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(node));
+ markDecoratorMedataDataTypeNodeAsReferenced(ts.getEffectiveTypeAnnotationNode(node));
break;
case 146 /* Parameter */:
- markTypeNodeAsReferenced(node.type);
+ markDecoratorMedataDataTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(node));
break;
}
}
@@ -42486,7 +44333,8 @@ var ts;
}
function checkFunctionDeclaration(node) {
if (produceDiagnostics) {
- checkFunctionOrMethodDeclaration(node) || checkGrammarForGenerator(node);
+ checkFunctionOrMethodDeclaration(node);
+ checkGrammarForGenerator(node);
checkCollisionWithCapturedSuperVariable(node, node.name);
checkCollisionWithCapturedThisVariable(node, node.name);
checkCollisionWithCapturedNewTargetVariable(node, node.name);
@@ -42532,13 +44380,14 @@ var ts;
}
}
checkSourceElement(node.body);
+ var returnTypeNode = ts.getEffectiveReturnTypeNode(node);
if ((functionFlags & 1 /* Generator */) === 0) {
- var returnOrPromisedType = node.type && (functionFlags & 2 /* Async */
+ var returnOrPromisedType = returnTypeNode && (functionFlags & 2 /* Async */
? checkAsyncFunctionReturnType(node) // Async function
- : getTypeFromTypeNode(node.type)); // normal function
+ : getTypeFromTypeNode(returnTypeNode)); // normal function
checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnOrPromisedType);
}
- if (produceDiagnostics && !node.type) {
+ if (produceDiagnostics && !returnTypeNode) {
// 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 (noImplicitAny && ts.nodeIsMissing(node.body) && !isPrivateWithinAmbient(node)) {
@@ -42612,15 +44461,16 @@ var ts;
if (!local.isReferenced) {
if (local.valueDeclaration && ts.getRootDeclaration(local.valueDeclaration).kind === 146 /* Parameter */) {
var parameter = ts.getRootDeclaration(local.valueDeclaration);
+ var name = ts.getNameOfDeclaration(local.valueDeclaration);
if (compilerOptions.noUnusedParameters &&
!ts.isParameterPropertyDeclaration(parameter) &&
!ts.parameterIsThisKeyword(parameter) &&
- !parameterNameStartsWithUnderscore(local.valueDeclaration.name)) {
- error(local.valueDeclaration.name, ts.Diagnostics._0_is_declared_but_never_used, local.name);
+ !parameterNameStartsWithUnderscore(name)) {
+ error(name, ts.Diagnostics._0_is_declared_but_never_used, local.name);
}
}
else if (compilerOptions.noUnusedLocals) {
- ts.forEach(local.declarations, function (d) { return errorUnusedLocal(d.name || d, local.name); });
+ ts.forEach(local.declarations, function (d) { return errorUnusedLocal(ts.getNameOfDeclaration(d) || d, local.name); });
}
}
});
@@ -42636,9 +44486,7 @@ var ts;
function errorUnusedLocal(node, name) {
if (isIdentifierThatStartsWithUnderScore(node)) {
var declaration = ts.getRootDeclaration(node.parent);
- if (declaration.kind === 226 /* VariableDeclaration */ &&
- (declaration.parent.parent.kind === 215 /* ForInStatement */ ||
- declaration.parent.parent.kind === 216 /* ForOfStatement */)) {
+ if (declaration.kind === 226 /* VariableDeclaration */ && ts.isForInOrOfStatement(declaration.parent.parent)) {
return;
}
}
@@ -42700,7 +44548,7 @@ var ts;
for (var _i = 0, _a = local.declarations; _i < _a.length; _i++) {
var declaration = _a[_i];
if (!ts.isAmbientModule(declaration)) {
- errorUnusedLocal(declaration.name, local.name);
+ errorUnusedLocal(ts.getNameOfDeclaration(declaration), local.name);
}
}
}
@@ -42768,7 +44616,7 @@ var ts;
if (getNodeCheckFlags(current) & 4 /* CaptureThis */) {
var isDeclaration_1 = node.kind !== 71 /* Identifier */;
if (isDeclaration_1) {
- error(node.name, ts.Diagnostics.Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference);
+ error(ts.getNameOfDeclaration(node), ts.Diagnostics.Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference);
}
else {
error(node, ts.Diagnostics.Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference);
@@ -42782,7 +44630,7 @@ var ts;
if (getNodeCheckFlags(current) & 8 /* CaptureNewTarget */) {
var isDeclaration_2 = node.kind !== 71 /* Identifier */;
if (isDeclaration_2) {
- error(node.name, ts.Diagnostics.Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference);
+ error(ts.getNameOfDeclaration(node), 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);
@@ -43048,7 +44896,7 @@ var ts;
checkTypeAssignableTo(checkExpressionCached(node.initializer), declarationType, node, /*headMessage*/ undefined);
}
if (!areDeclarationFlagsIdentical(node, symbol.valueDeclaration)) {
- error(symbol.valueDeclaration.name, ts.Diagnostics.All_declarations_of_0_must_have_identical_modifiers, ts.declarationNameToString(node.name));
+ error(ts.getNameOfDeclaration(symbol.valueDeclaration), ts.Diagnostics.All_declarations_of_0_must_have_identical_modifiers, ts.declarationNameToString(node.name));
error(node.name, ts.Diagnostics.All_declarations_of_0_must_have_identical_modifiers, ts.declarationNameToString(node.name));
}
}
@@ -43163,11 +45011,14 @@ var ts;
checkGrammarForInOrForOfStatement(node);
if (node.kind === 216 /* ForOfStatement */) {
if (node.awaitModifier) {
- if (languageVersion < 4 /* ES2017 */) {
- checkExternalEmitHelpers(node, 8192 /* ForAwaitOfIncludes */);
+ var functionFlags = ts.getFunctionFlags(ts.getContainingFunction(node));
+ if ((functionFlags & (4 /* Invalid */ | 2 /* Async */)) === 2 /* Async */ && languageVersion < 5 /* ESNext */) {
+ // for..await..of in an async function or async generator function prior to ESNext requires the __asyncValues helper
+ checkExternalEmitHelpers(node, 16384 /* ForAwaitOfIncludes */);
}
}
- else if (languageVersion < 2 /* ES2015 */ && compilerOptions.downlevelIteration) {
+ else if (compilerOptions.downlevelIteration && languageVersion < 2 /* ES2015 */) {
+ // for..of prior to ES2015 requires the __values helper when downlevelIteration is enabled
checkExternalEmitHelpers(node, 256 /* ForOfIncludes */);
}
}
@@ -43262,26 +45113,26 @@ var ts;
var expressionType = checkNonNullExpression(rhsExpression);
return checkIteratedTypeOrElementType(expressionType, rhsExpression, /*allowStringInput*/ true, awaitModifier !== undefined);
}
- function checkIteratedTypeOrElementType(inputType, errorNode, allowStringInput, allowAsyncIterable) {
+ function checkIteratedTypeOrElementType(inputType, errorNode, allowStringInput, allowAsyncIterables) {
if (isTypeAny(inputType)) {
return inputType;
}
- return getIteratedTypeOrElementType(inputType, errorNode, allowStringInput, allowAsyncIterable, /*checkAssignability*/ true) || anyType;
+ return getIteratedTypeOrElementType(inputType, errorNode, allowStringInput, allowAsyncIterables, /*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) {
+ function getIteratedTypeOrElementType(inputType, errorNode, allowStringInput, allowAsyncIterables, 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) {
+ if (uplevelIteration || downlevelIteration || allowAsyncIterables) {
// We only report errors for an invalid iterable type in ES2015 or higher.
- var iteratedType = getIteratedTypeOfIterable(inputType, uplevelIteration ? errorNode : undefined, allowAsyncIterable, allowAsyncIterable, checkAssignability);
+ var iteratedType = getIteratedTypeOfIterable(inputType, uplevelIteration ? errorNode : undefined, allowAsyncIterables, /*allowSyncIterables*/ true, checkAssignability);
if (iteratedType || uplevelIteration) {
return iteratedType;
}
@@ -43386,70 +45237,65 @@ var ts;
* 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 getIteratedTypeOfIterable(type, errorNode, isAsyncIterable, allowNonAsyncIterables, checkAssignability) {
+ function getIteratedTypeOfIterable(type, errorNode, allowAsyncIterables, allowSyncIterables, checkAssignability) {
if (isTypeAny(type)) {
return undefined;
}
- var typeAsIterable = type;
- 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 isNonAsyncIterable = false;
- if (isAsyncIterable) {
- var iteratorMethod = getTypeOfPropertyOfType(type, ts.getPropertyNameForKnownSymbolName("asyncIterator"));
- if (isTypeAny(iteratorMethod)) {
+ return mapType(type, getIteratedType);
+ function getIteratedType(type) {
+ var typeAsIterable = type;
+ if (allowAsyncIterables) {
+ if (typeAsIterable.iteratedTypeOfAsyncIterable) {
+ return typeAsIterable.iteratedTypeOfAsyncIterable;
+ }
+ // 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 (allowSyncIterables) {
+ if (typeAsIterable.iteratedTypeOfIterable) {
+ return typeAsIterable.iteratedTypeOfIterable;
+ }
+ // 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 typeAsIterable.iteratedTypeOfIterable = type.typeArguments[0];
+ }
+ }
+ var asyncMethodType = allowAsyncIterables && getTypeOfPropertyOfType(type, ts.getPropertyNameForKnownSymbolName("asyncIterator"));
+ var methodType = asyncMethodType || (allowSyncIterables && getTypeOfPropertyOfType(type, ts.getPropertyNameForKnownSymbolName("iterator")));
+ if (isTypeAny(methodType)) {
return undefined;
}
- iteratorMethodSignatures = iteratorMethod && getSignaturesOfType(iteratorMethod, 0 /* Call */);
- }
- if (!isAsyncIterable || (allowNonAsyncIterables && !ts.some(iteratorMethodSignatures))) {
- var iteratorMethod = getTypeOfPropertyOfType(type, ts.getPropertyNameForKnownSymbolName("iterator"));
- if (isTypeAny(iteratorMethod)) {
+ var signatures = methodType && getSignaturesOfType(methodType, 0 /* Call */);
+ if (!ts.some(signatures)) {
+ if (errorNode) {
+ error(errorNode, allowAsyncIterables
+ ? 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);
+ // only report on the first error
+ errorNode = undefined;
+ }
return undefined;
}
- iteratorMethodSignatures = iteratorMethod && getSignaturesOfType(iteratorMethod, 0 /* Call */);
- isNonAsyncIterable = true;
- }
- if (ts.some(iteratorMethodSignatures)) {
- var iteratorMethodReturnType = getUnionType(ts.map(iteratorMethodSignatures, getReturnTypeOfSignature), /*subtypeReduction*/ true);
- var iteratedType = getIteratedTypeOfIterator(iteratorMethodReturnType, errorNode, /*isAsyncIterator*/ !isNonAsyncIterable);
+ var returnType = getUnionType(ts.map(signatures, getReturnTypeOfSignature), /*subtypeReduction*/ true);
+ var iteratedType = getIteratedTypeOfIterator(returnType, errorNode, /*isAsyncIterator*/ !!asyncMethodType);
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, isNonAsyncIterable
- ? createIterableType(iteratedType)
- : createAsyncIterableType(iteratedType), errorNode);
+ checkTypeAssignableTo(type, asyncMethodType
+ ? createAsyncIterableType(iteratedType)
+ : createIterableType(iteratedType), errorNode);
}
- return isAsyncIterable
+ return asyncMethodType
? 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 undefined;
}
/**
* This function has very similar logic as getIteratedTypeOfIterable, except that it operates on
@@ -43538,7 +45384,7 @@ var ts;
if (isTypeAny(returnType)) {
return undefined;
}
- return getIteratedTypeOfIterable(returnType, /*errorNode*/ undefined, isAsyncGenerator, /*allowNonAsyncIterables*/ false, /*checkAssignability*/ false)
+ return getIteratedTypeOfIterable(returnType, /*errorNode*/ undefined, /*allowAsyncIterables*/ isAsyncGenerator, /*allowSyncIterables*/ !isAsyncGenerator, /*checkAssignability*/ false)
|| getIteratedTypeOfIterator(returnType, /*errorNode*/ undefined, isAsyncGenerator);
}
function checkBreakOrContinueStatement(node) {
@@ -43547,10 +45393,11 @@ var ts;
// TODO: Check that target label is valid
}
function isGetAccessorWithAnnotatedSetAccessor(node) {
- return !!(node.kind === 153 /* GetAccessor */ && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(node.symbol, 154 /* SetAccessor */)));
+ return node.kind === 153 /* GetAccessor */
+ && ts.getEffectiveSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(node.symbol, 154 /* SetAccessor */)) !== undefined;
}
function isUnwrappedReturnTypeVoidOrAny(func, returnType) {
- var unwrappedReturnType = (ts.getFunctionFlags(func) & 3 /* AsyncOrAsyncGenerator */) === 2 /* Async */
+ var unwrappedReturnType = (ts.getFunctionFlags(func) & 3 /* AsyncGenerator */) === 2 /* Async */
? getPromisedTypeOfPromise(returnType) // Async function
: returnType; // AsyncGenerator function, Generator function, or normal function
return unwrappedReturnType && maybeTypeOfKind(unwrappedReturnType, 1024 /* Void */ | 1 /* Any */);
@@ -43587,7 +45434,7 @@ var ts;
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)) {
+ else if (ts.getEffectiveReturnTypeNode(func) || isGetAccessorWithAnnotatedSetAccessor(func)) {
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);
@@ -43772,13 +45619,16 @@ var ts;
}
var propDeclaration = prop.valueDeclaration;
// index is numeric and property name is not valid numeric literal
- if (indexKind === 1 /* Number */ && !(propDeclaration ? isNumericName(propDeclaration.name) : isNumericLiteralName(prop.name))) {
+ if (indexKind === 1 /* Number */ && !(propDeclaration ? isNumericName(ts.getNameOfDeclaration(propDeclaration)) : 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
+ // this allows us to rule out cases when both property and indexer are inherited from the base class
var errorNode;
- if (propDeclaration && (propDeclaration.name.kind === 144 /* ComputedPropertyName */ || prop.parent === containingType.symbol)) {
+ if (propDeclaration &&
+ (propDeclaration.kind === 194 /* BinaryExpression */ ||
+ ts.getNameOfDeclaration(propDeclaration).kind === 144 /* ComputedPropertyName */ ||
+ prop.parent === containingType.symbol)) {
errorNode = propDeclaration;
}
else if (indexDeclaration) {
@@ -43949,7 +45799,7 @@ var ts;
var staticBaseType = getApparentType(baseConstructorType);
checkBaseTypeAccessibility(staticBaseType, baseTypeNode);
checkSourceElement(baseTypeNode.expression);
- if (baseTypeNode.typeArguments) {
+ if (ts.some(baseTypeNode.typeArguments)) {
ts.forEach(baseTypeNode.typeArguments, checkSourceElement);
for (var _i = 0, _a = getConstructorsForTypeArguments(staticBaseType, baseTypeNode.typeArguments, baseTypeNode); _i < _a.length; _i++) {
var constructor = _a[_i];
@@ -44017,7 +45867,7 @@ 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 getCheckFlags(s) & 1 /* Instantiated */ ? s.target : s;
+ return ts.getCheckFlags(s) & 1 /* Instantiated */ ? s.target : s;
}
function getClassLikeDeclarationOfSymbol(symbol) {
return ts.forEach(symbol.declarations, function (d) { return ts.isClassLike(d) ? d : undefined; });
@@ -44050,7 +45900,7 @@ var ts;
continue;
}
var derived = getTargetSymbol(getPropertyOfObjectType(type, base.name));
- var baseDeclarationFlags = getDeclarationModifierFlagsFromSymbol(base);
+ var baseDeclarationFlags = ts.getDeclarationModifierFlagsFromSymbol(base);
ts.Debug.assert(!!derived, "derived should point to something, even if it is the base class' declaration.");
if (derived) {
// In order to resolve whether the inherited method was overridden in the base class or not,
@@ -44073,15 +45923,11 @@ var ts;
}
else {
// derived overrides base.
- var derivedDeclarationFlags = getDeclarationModifierFlagsFromSymbol(derived);
+ var derivedDeclarationFlags = ts.getDeclarationModifierFlagsFromSymbol(derived);
if (baseDeclarationFlags & 8 /* Private */ || derivedDeclarationFlags & 8 /* Private */) {
// either base or derived property is private - not override, skip it
continue;
}
- if ((baseDeclarationFlags & 32 /* Static */) !== (derivedDeclarationFlags & 32 /* Static */)) {
- // value of 'static' is not the same for properties - not override, skip it
- continue;
- }
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;
@@ -44101,14 +45947,11 @@ var ts;
else {
errorMessage = ts.Diagnostics.Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function;
}
- error(derived.valueDeclaration.name || derived.valueDeclaration, errorMessage, typeToString(baseType), symbolToString(base), typeToString(type));
+ error(ts.getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage, typeToString(baseType), symbolToString(base), typeToString(type));
}
}
}
}
- function isAccessor(kind) {
- return kind === 153 /* GetAccessor */ || kind === 154 /* SetAccessor */;
- }
function checkInheritedPropertiesAreIdentical(type, typeNode) {
var baseTypes = getBaseTypes(type);
if (baseTypes.length < 2) {
@@ -44188,97 +46031,88 @@ var ts;
function computeEnumMemberValues(node) {
var nodeLinks = getNodeLinks(node);
if (!(nodeLinks.flags & 16384 /* EnumValuesComputed */)) {
- var enumSymbol = getSymbolOfNode(node);
- var enumType = getDeclaredTypeOfSymbol(enumSymbol);
- var autoValue = 0; // set to undefined when enum member is non-constant
- var ambient = ts.isInAmbientContext(node);
- var enumIsConst = ts.isConst(node);
+ nodeLinks.flags |= 16384 /* EnumValuesComputed */;
+ var autoValue = 0;
for (var _i = 0, _a = node.members; _i < _a.length; _i++) {
var member = _a[_i];
- if (isComputedNonLiteralName(member.name)) {
- error(member.name, ts.Diagnostics.Computed_property_names_are_not_allowed_in_enums);
- }
- else {
- var text = ts.getTextOfPropertyName(member.name);
- if (isNumericLiteralName(text) && !isInfinityOrNaNString(text)) {
- error(member.name, ts.Diagnostics.An_enum_member_cannot_have_a_numeric_name);
- }
- }
- var previousEnumMemberIsNonConstant = autoValue === undefined;
- var initializer = member.initializer;
- if (initializer) {
- autoValue = computeConstantValueForEnumMemberInitializer(initializer, enumType, enumIsConst, ambient);
- }
- else if (ambient && !enumIsConst) {
- // In ambient enum declarations that specify no const modifier, enum member declarations
- // that omit a value are considered computed members (as opposed to having auto-incremented values assigned).
- autoValue = undefined;
- }
- else if (previousEnumMemberIsNonConstant) {
- // If the member declaration specifies no value, the member is considered a constant enum member.
- // If the member is the first member in the enum declaration, it is assigned the value zero.
- // Otherwise, it is assigned the value of the immediately preceding member plus one,
- // and an error occurs if the immediately preceding member is not a constant enum member
- error(member.name, ts.Diagnostics.Enum_member_must_have_initializer);
- }
- if (autoValue !== undefined) {
- getNodeLinks(member).enumMemberValue = autoValue;
- autoValue++;
- }
+ var value = computeMemberValue(member, autoValue);
+ getNodeLinks(member).enumMemberValue = value;
+ autoValue = typeof value === "number" ? value + 1 : undefined;
}
- nodeLinks.flags |= 16384 /* EnumValuesComputed */;
}
- function computeConstantValueForEnumMemberInitializer(initializer, enumType, enumIsConst, ambient) {
- // Controls if error should be reported after evaluation of constant value is completed
- // Can be false if another more precise error was already reported during evaluation.
- var reportError = true;
- var value = evalConstant(initializer);
- if (reportError) {
- if (value === undefined) {
- if (enumIsConst) {
- error(initializer, ts.Diagnostics.In_const_enum_declarations_member_initializer_must_be_constant_expression);
- }
- else if (ambient) {
- error(initializer, ts.Diagnostics.In_ambient_enum_declarations_member_initializer_must_be_constant_expression);
- }
- else {
- // Only here do we need to check that the initializer is assignable to the enum type.
- checkTypeAssignableTo(checkExpression(initializer), enumType, initializer, /*headMessage*/ undefined);
- }
- }
- else if (enumIsConst) {
- if (isNaN(value)) {
- error(initializer, ts.Diagnostics.const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN);
- }
- else if (!isFinite(value)) {
- error(initializer, ts.Diagnostics.const_enum_member_initializer_was_evaluated_to_a_non_finite_value);
- }
- }
+ }
+ function computeMemberValue(member, autoValue) {
+ if (isComputedNonLiteralName(member.name)) {
+ error(member.name, ts.Diagnostics.Computed_property_names_are_not_allowed_in_enums);
+ }
+ else {
+ var text = ts.getTextOfPropertyName(member.name);
+ if (isNumericLiteralName(text) && !isInfinityOrNaNString(text)) {
+ error(member.name, ts.Diagnostics.An_enum_member_cannot_have_a_numeric_name);
}
- return value;
- function evalConstant(e) {
- switch (e.kind) {
- case 192 /* PrefixUnaryExpression */:
- var value_1 = evalConstant(e.operand);
- if (value_1 === undefined) {
- return undefined;
- }
- switch (e.operator) {
+ }
+ if (member.initializer) {
+ return computeConstantValue(member);
+ }
+ // In ambient enum declarations that specify no const modifier, enum member declarations that omit
+ // a value are considered computed members (as opposed to having auto-incremented values).
+ if (ts.isInAmbientContext(member.parent) && !ts.isConst(member.parent)) {
+ return undefined;
+ }
+ // If the member declaration specifies no value, the member is considered a constant enum member.
+ // If the member is the first member in the enum declaration, it is assigned the value zero.
+ // Otherwise, it is assigned the value of the immediately preceding member plus one, and an error
+ // occurs if the immediately preceding member is not a constant enum member.
+ if (autoValue !== undefined) {
+ return autoValue;
+ }
+ error(member.name, ts.Diagnostics.Enum_member_must_have_initializer);
+ return undefined;
+ }
+ function computeConstantValue(member) {
+ var enumKind = getEnumKind(getSymbolOfNode(member.parent));
+ var isConstEnum = ts.isConst(member.parent);
+ var initializer = member.initializer;
+ var value = enumKind === 1 /* Literal */ && !isLiteralEnumMember(member) ? undefined : evaluate(initializer);
+ if (value !== undefined) {
+ if (isConstEnum && typeof value === "number" && !isFinite(value)) {
+ error(initializer, isNaN(value) ?
+ ts.Diagnostics.const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN :
+ ts.Diagnostics.const_enum_member_initializer_was_evaluated_to_a_non_finite_value);
+ }
+ }
+ else if (enumKind === 1 /* Literal */) {
+ error(initializer, ts.Diagnostics.Computed_values_are_not_permitted_in_an_enum_with_string_valued_members);
+ return 0;
+ }
+ else if (isConstEnum) {
+ error(initializer, ts.Diagnostics.In_const_enum_declarations_member_initializer_must_be_constant_expression);
+ }
+ else if (ts.isInAmbientContext(member.parent)) {
+ error(initializer, ts.Diagnostics.In_ambient_enum_declarations_member_initializer_must_be_constant_expression);
+ }
+ else {
+ // Only here do we need to check that the initializer is assignable to the enum type.
+ checkTypeAssignableTo(checkExpression(initializer), getDeclaredTypeOfSymbol(getSymbolOfNode(member.parent)), initializer, /*headMessage*/ undefined);
+ }
+ return value;
+ function evaluate(expr) {
+ switch (expr.kind) {
+ case 192 /* PrefixUnaryExpression */:
+ var value_1 = evaluate(expr.operand);
+ if (typeof value_1 === "number") {
+ switch (expr.operator) {
case 37 /* PlusToken */: return value_1;
case 38 /* MinusToken */: return -value_1;
case 52 /* TildeToken */: return ~value_1;
}
- return undefined;
- case 194 /* BinaryExpression */:
- var left = evalConstant(e.left);
- if (left === undefined) {
- return undefined;
- }
- var right = evalConstant(e.right);
- if (right === undefined) {
- return undefined;
- }
- switch (e.operatorToken.kind) {
+ }
+ break;
+ case 194 /* BinaryExpression */:
+ var left = evaluate(expr.left);
+ var right = evaluate(expr.right);
+ if (typeof left === "number" && typeof right === "number") {
+ switch (expr.operatorToken.kind) {
case 49 /* BarToken */: return left | right;
case 48 /* AmpersandToken */: return left & right;
case 46 /* GreaterThanGreaterThanToken */: return left >> right;
@@ -44291,81 +46125,53 @@ var ts;
case 38 /* MinusToken */: return left - right;
case 42 /* PercentToken */: return left % right;
}
- return undefined;
- case 8 /* NumericLiteral */:
- checkGrammarNumericLiteral(e);
- return +e.text;
- case 185 /* ParenthesizedExpression */:
- return evalConstant(e.expression);
- case 71 /* Identifier */:
- case 180 /* ElementAccessExpression */:
- case 179 /* PropertyAccessExpression */:
- var member = initializer.parent;
- var currentType = getTypeOfSymbol(getSymbolOfNode(member.parent));
- var enumType_1;
- var propertyName = void 0;
- if (e.kind === 71 /* Identifier */) {
- // unqualified names can refer to member that reside in different declaration of the enum so just doing name resolution won't work.
- // instead pick current enum type and later try to fetch member from the type
- enumType_1 = currentType;
- propertyName = e.text;
- }
- else {
- var expression = void 0;
- if (e.kind === 180 /* ElementAccessExpression */) {
- if (e.argumentExpression === undefined ||
- e.argumentExpression.kind !== 9 /* StringLiteral */) {
- return undefined;
- }
- expression = e.expression;
- propertyName = e.argumentExpression.text;
- }
- else {
- expression = e.expression;
- propertyName = e.name.text;
- }
- // expression part in ElementAccess\PropertyAccess should be either identifier or dottedName
- var current = expression;
- while (current) {
- if (current.kind === 71 /* Identifier */) {
- break;
- }
- else if (current.kind === 179 /* PropertyAccessExpression */) {
- current = current.expression;
- }
- else {
- return undefined;
- }
- }
- enumType_1 = getTypeOfExpression(expression);
- // allow references to constant members of other enums
- if (!(enumType_1.symbol && (enumType_1.symbol.flags & 384 /* Enum */))) {
- return undefined;
- }
- }
- if (propertyName === undefined) {
- return undefined;
- }
- var property = getPropertyOfObjectType(enumType_1, propertyName);
- if (!property || !(property.flags & 8 /* EnumMember */)) {
- return undefined;
- }
- var propertyDecl = property.valueDeclaration;
- // self references are illegal
- if (member === propertyDecl) {
- return undefined;
- }
- // illegal case: forward reference
- if (!isBlockScopedNameDeclaredBeforeUse(propertyDecl, member)) {
- reportError = false;
- error(e, ts.Diagnostics.A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums);
- return undefined;
+ }
+ break;
+ case 9 /* StringLiteral */:
+ return expr.text;
+ case 8 /* NumericLiteral */:
+ checkGrammarNumericLiteral(expr);
+ return +expr.text;
+ case 185 /* ParenthesizedExpression */:
+ return evaluate(expr.expression);
+ case 71 /* Identifier */:
+ return ts.nodeIsMissing(expr) ? 0 : evaluateEnumMember(expr, getSymbolOfNode(member.parent), expr.text);
+ case 180 /* ElementAccessExpression */:
+ case 179 /* PropertyAccessExpression */:
+ if (isConstantMemberAccess(expr)) {
+ var type = getTypeOfExpression(expr.expression);
+ if (type.symbol && type.symbol.flags & 384 /* Enum */) {
+ var name = expr.kind === 179 /* PropertyAccessExpression */ ?
+ expr.name.text :
+ expr.argumentExpression.text;
+ return evaluateEnumMember(expr, type.symbol, name);
}
- return getNodeLinks(propertyDecl).enumMemberValue;
+ }
+ break;
+ }
+ return undefined;
+ }
+ function evaluateEnumMember(expr, enumSymbol, name) {
+ var memberSymbol = enumSymbol.exports.get(name);
+ if (memberSymbol) {
+ var declaration = memberSymbol.valueDeclaration;
+ if (declaration !== member) {
+ if (isBlockScopedNameDeclaredBeforeUse(declaration, member)) {
+ return getNodeLinks(declaration).enumMemberValue;
+ }
+ error(expr, ts.Diagnostics.A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums);
+ return 0;
}
}
+ return undefined;
}
}
+ function isConstantMemberAccess(node) {
+ return node.kind === 71 /* Identifier */ ||
+ node.kind === 179 /* PropertyAccessExpression */ && isConstantMemberAccess(node.expression) ||
+ node.kind === 180 /* ElementAccessExpression */ && isConstantMemberAccess(node.expression) &&
+ node.argumentExpression.kind === 9 /* StringLiteral */;
+ }
function checkEnumDeclaration(node) {
if (!produceDiagnostics) {
return;
@@ -44396,7 +46202,7 @@ var ts;
// check that const is placed\omitted on all enum declarations
ts.forEach(enumSymbol.declarations, function (decl) {
if (ts.isConstEnumDeclaration(decl) !== enumIsConst) {
- error(decl.name, ts.Diagnostics.Enum_declarations_must_all_be_const_or_non_const);
+ error(ts.getNameOfDeclaration(decl), ts.Diagnostics.Enum_declarations_must_all_be_const_or_non_const);
}
});
}
@@ -44655,6 +46461,13 @@ var ts;
ts.Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0;
error(node, message, symbolToString(symbol));
}
+ // Don't allow to re-export something with no value side when `--isolatedModules` is set.
+ if (compilerOptions.isolatedModules
+ && node.kind === 246 /* ExportSpecifier */
+ && !(target.flags & 107455 /* Value */)
+ && !ts.isInAmbientContext(node)) {
+ error(node, ts.Diagnostics.Cannot_re_export_a_type_when_the_isolatedModules_flag_is_provided);
+ }
}
}
function checkImportBinding(node) {
@@ -44748,6 +46561,9 @@ var ts;
if (moduleSymbol && hasExportAssignmentSymbol(moduleSymbol)) {
error(node.moduleSpecifier, ts.Diagnostics.Module_0_uses_export_and_cannot_be_used_with_export_Asterisk, symbolToString(moduleSymbol));
}
+ if (modulekind !== ts.ModuleKind.System && modulekind !== ts.ModuleKind.ES2015) {
+ checkExternalEmitHelpers(node, 32768 /* ExportStar */);
+ }
}
}
}
@@ -45330,6 +47146,15 @@ var ts;
return entityNameSymbol;
}
}
+ if (entityName.parent.kind === 287 /* JSDocParameterTag */) {
+ var parameter = ts.getParameterFromJSDoc(entityName.parent);
+ return parameter && parameter.symbol;
+ }
+ if (entityName.parent.kind === 145 /* TypeParameter */ && entityName.parent.parent.kind === 290 /* JSDocTemplateTag */) {
+ ts.Debug.assert(!ts.isInJavaScriptFile(entityName)); // Otherwise `isDeclarationName` would have been true.
+ var typeParameter = ts.getTypeParameterFromJsDoc(entityName.parent);
+ return typeParameter && typeParameter.symbol;
+ }
if (ts.isPartOfExpression(entityName)) {
if (ts.nodeIsMissing(entityName)) {
// Missing entity name.
@@ -45377,7 +47202,7 @@ var ts;
// We cannot answer semantic questions within a with block, do not proceed any further
return undefined;
}
- if (ts.isDeclarationName(node)) {
+ if (isDeclarationNameOrImportPropertyName(node)) {
// This is a declaration, call getSymbolOfNode
return getSymbolOfNode(node.parent);
}
@@ -45425,14 +47250,12 @@ var ts;
}
return undefined;
case 9 /* StringLiteral */:
- // External module name in an import declaration
- if ((ts.isExternalModuleImportEqualsDeclaration(node.parent.parent) &&
- ts.getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node) ||
- ((node.parent.kind === 238 /* ImportDeclaration */ || node.parent.kind === 244 /* ExportDeclaration */) &&
- node.parent.moduleSpecifier === node)) {
- return resolveExternalModuleName(node, node);
- }
- if (ts.isInJavaScriptFile(node) && ts.isRequireCall(node.parent, /*checkArgumentIsStringLiteral*/ false)) {
+ // 1). import x = require("./mo/*gotToDefinitionHere*/d")
+ // 2). External module name in an import declaration
+ // 3). Dynamic import call or require in javascript
+ if ((ts.isExternalModuleImportEqualsDeclaration(node.parent.parent) && ts.getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node) ||
+ ((node.parent.kind === 238 /* ImportDeclaration */ || node.parent.kind === 244 /* ExportDeclaration */) && node.parent.moduleSpecifier === node) ||
+ ((ts.isInJavaScriptFile(node) && ts.isRequireCall(node.parent, /*checkArgumentIsStringLiteral*/ false)) || ts.isImportCall(node.parent))) {
return resolveExternalModuleName(node, node);
}
// falls through
@@ -45505,7 +47328,7 @@ var ts;
var symbol = getSymbolOfNode(node);
return getTypeOfSymbol(symbol);
}
- if (ts.isDeclarationName(node)) {
+ if (isDeclarationNameOrImportPropertyName(node)) {
var symbol = getSymbolAtLocation(node);
return symbol && getTypeOfSymbol(symbol);
}
@@ -45550,7 +47373,7 @@ var ts;
ts.Debug.assert(expr.parent.kind === 177 /* ArrayLiteralExpression */);
// [{ property1: p1, property2 }] = elems;
var typeOfArrayLiteral = getTypeOfArrayLiteralOrObjectLiteralDestructuringAssignment(expr.parent);
- var elementType = checkIteratedTypeOrElementType(typeOfArrayLiteral || unknownType, expr.parent, /*allowStringInput*/ false, /*allowAsyncIterable*/ false) || unknownType;
+ var elementType = checkIteratedTypeOrElementType(typeOfArrayLiteral || unknownType, expr.parent, /*allowStringInput*/ false, /*allowAsyncIterables*/ 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
@@ -45595,24 +47418,24 @@ var ts;
return getNamedMembers(propsByName);
}
function getRootSymbols(symbol) {
- if (getCheckFlags(symbol) & 6 /* Synthetic */) {
- var symbols_3 = [];
+ if (ts.getCheckFlags(symbol) & 6 /* Synthetic */) {
+ var symbols_4 = [];
var name_2 = symbol.name;
ts.forEach(getSymbolLinks(symbol).containingType.types, function (t) {
var symbol = getPropertyOfType(t, name_2);
if (symbol) {
- symbols_3.push(symbol);
+ symbols_4.push(symbol);
}
});
- return symbols_3;
+ return symbols_4;
}
else if (symbol.flags & 134217728 /* Transient */) {
- if (symbol.leftSpread) {
- var links = symbol;
- return getRootSymbols(links.leftSpread).concat(getRootSymbols(links.rightSpread));
+ var transient = symbol;
+ if (transient.leftSpread) {
+ return getRootSymbols(transient.leftSpread).concat(getRootSymbols(transient.rightSpread));
}
- if (symbol.syntheticOrigin) {
- return getRootSymbols(symbol.syntheticOrigin);
+ if (transient.syntheticOrigin) {
+ return getRootSymbols(transient.syntheticOrigin);
}
var target = void 0;
var next = symbol;
@@ -45705,7 +47528,9 @@ var ts;
node = ts.getParseTreeNode(node, ts.isIdentifier);
if (node) {
var symbol = getReferencedValueSymbol(node);
- if (symbol && symbol.flags & 8388608 /* Alias */) {
+ // We should only get the declaration of an alias if there isn't a local value
+ // declaration for the symbol
+ if (isNonLocalAlias(symbol, /*excludes*/ 107455 /* Value */)) {
return getDeclarationOfAliasSymbol(symbol);
}
}
@@ -45858,6 +47683,12 @@ var ts;
parameter.initializer &&
!(ts.getModifierFlags(parameter) & 92 /* ParameterPropertyModifier */);
}
+ function isOptionalUninitializedParameterProperty(parameter) {
+ return strictNullChecks &&
+ isOptionalParameter(parameter) &&
+ !parameter.initializer &&
+ !!(ts.getModifierFlags(parameter) & 92 /* ParameterPropertyModifier */);
+ }
function getNodeCheckFlags(node) {
return getNodeLinks(node).flags;
}
@@ -45922,7 +47753,7 @@ var ts;
else if (isTypeOfKind(type, 136 /* BooleanLike */)) {
return ts.TypeReferenceSerializationKind.BooleanType;
}
- else if (isTypeOfKind(type, 340 /* NumberLike */)) {
+ else if (isTypeOfKind(type, 84 /* NumberLike */)) {
return ts.TypeReferenceSerializationKind.NumberLikeType;
}
else if (isTypeOfKind(type, 262178 /* StringLike */)) {
@@ -45950,8 +47781,8 @@ var ts;
var type = symbol && !(symbol.flags & (2048 /* TypeLiteral */ | 131072 /* Signature */))
? getWidenedLiteralType(getTypeOfSymbol(symbol))
: unknownType;
- if (flags & 4096 /* AddUndefined */) {
- type = includeFalsyTypes(type, 2048 /* Undefined */);
+ if (flags & 8192 /* AddUndefined */) {
+ type = getNullableType(type, 2048 /* Undefined */);
}
getSymbolDisplayBuilder().buildTypeDisplay(type, writer, enclosingDeclaration, flags);
}
@@ -45963,15 +47794,6 @@ var ts;
var type = getWidenedType(getRegularTypeOfExpression(expr));
getSymbolDisplayBuilder().buildTypeDisplay(type, writer, enclosingDeclaration, flags);
}
- function writeBaseConstructorTypeOfClass(node, enclosingDeclaration, flags, writer) {
- 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.has(name);
}
@@ -46054,10 +47876,10 @@ var ts;
isDeclarationVisible: isDeclarationVisible,
isImplementationOfOverload: isImplementationOfOverload,
isRequiredInitializedParameter: isRequiredInitializedParameter,
+ isOptionalUninitializedParameterProperty: isOptionalUninitializedParameterProperty,
writeTypeOfDeclaration: writeTypeOfDeclaration,
writeReturnTypeOfSignatureDeclaration: writeReturnTypeOfSignatureDeclaration,
writeTypeOfExpression: writeTypeOfExpression,
- writeBaseConstructorTypeOfClass: writeBaseConstructorTypeOfClass,
isSymbolAccessible: isSymbolAccessible,
isEntityNameVisible: isEntityNameVisible,
getConstantValue: function (node) {
@@ -46225,7 +48047,7 @@ var ts;
var helpersModule = resolveHelpersModule(sourceFile, location);
if (helpersModule !== unknownSymbol) {
var uncheckedHelpers = helpers & ~requestedExternalEmitHelpers;
- for (var helper = 1 /* FirstEmitHelper */; helper <= 8192 /* LastEmitHelper */; helper <<= 1) {
+ for (var helper = 1 /* FirstEmitHelper */; helper <= 32768 /* LastEmitHelper */; helper <<= 1) {
if (uncheckedHelpers & helper) {
var name = getHelperName(helper);
var symbol = getSymbol(helpersModule.exports, ts.escapeIdentifier(name), 107455 /* Value */);
@@ -46252,10 +48074,12 @@ var ts;
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.");
+ case 2048 /* Await */: return "__await";
+ case 4096 /* AsyncGenerator */: return "__asyncGenerator";
+ case 8192 /* AsyncDelegator */: return "__asyncDelegator";
+ case 16384 /* AsyncValues */: return "__asyncValues";
+ case 32768 /* ExportStar */: return "__exportStar";
+ default: ts.Debug.fail("Unrecognized helper");
}
}
function resolveHelpersModule(node, errorNode) {
@@ -46687,6 +48511,10 @@ var ts;
var sourceFile = ts.getSourceFileOfNode(node);
return grammarErrorAtPos(sourceFile, types.pos, 0, ts.Diagnostics._0_list_cannot_be_empty, listType);
}
+ return ts.forEach(types, checkGrammarExpressionWithTypeArguments);
+ }
+ function checkGrammarExpressionWithTypeArguments(node) {
+ return checkGrammarTypeArguments(node, node.typeArguments);
}
function checkGrammarClassDeclarationHeritageClauses(node) {
var seenExtendsClause = false;
@@ -47294,7 +49122,7 @@ var ts;
function checkGrammarStatementInAmbientContext(node) {
if (ts.isInAmbientContext(node)) {
// An accessors is already reported about the ambient context
- if (isAccessor(node.parent.kind)) {
+ if (ts.isAccessor(node.parent)) {
return getNodeLinks(node).hasReportedStatementInAmbientContext = true;
}
// Find containing block which is either Block, ModuleBlock, SourceFile
@@ -47358,8 +49186,35 @@ var ts;
});
return result;
}
+ function checkGrammarImportCallExpression(node) {
+ if (modulekind === ts.ModuleKind.ES2015) {
+ return grammarErrorOnNode(node, ts.Diagnostics.Dynamic_import_cannot_be_used_when_targeting_ECMAScript_2015_modules);
+ }
+ if (node.typeArguments) {
+ return grammarErrorOnNode(node, ts.Diagnostics.Dynamic_import_cannot_have_type_arguments);
+ }
+ var nodeArguments = node.arguments;
+ if (nodeArguments.length !== 1) {
+ return grammarErrorOnNode(node, ts.Diagnostics.Dynamic_import_must_have_one_specifier_as_an_argument);
+ }
+ // see: parseArgumentOrArrayLiteralElement...we use this function which parse arguments of callExpression to parse specifier for dynamic import.
+ // parseArgumentOrArrayLiteralElement allows spread element to be in an argument list which is not allowed as specifier in dynamic import.
+ if (ts.isSpreadElement(nodeArguments[0])) {
+ return grammarErrorOnNode(nodeArguments[0], ts.Diagnostics.Specifier_of_dynamic_import_cannot_be_spread_element);
+ }
+ }
}
ts.createTypeChecker = createTypeChecker;
+ /** Like 'isDeclarationName', but returns true for LHS of `import { x as y }` or `export { x as y }`. */
+ function isDeclarationNameOrImportPropertyName(name) {
+ switch (name.parent.kind) {
+ case 242 /* ImportSpecifier */:
+ case 246 /* ExportSpecifier */:
+ return true;
+ default:
+ return ts.isDeclarationName(name);
+ }
+ }
})(ts || (ts = {}));
/// <reference path="checker.ts" />
/// <reference path="factory.ts" />
@@ -47497,79 +49352,73 @@ var ts;
if ((kind > 0 /* FirstToken */ && kind <= 142 /* LastToken */) || kind === 169 /* ThisType */) {
return node;
}
- switch (node.kind) {
- case 206 /* SemicolonClassElement */:
- case 209 /* EmptyStatement */:
- case 200 /* OmittedExpression */:
- case 225 /* DebuggerStatement */:
- case 298 /* EndOfDeclarationMarker */:
- case 247 /* MissingDeclaration */:
- // No need to visit nodes with no children.
- return node;
+ switch (kind) {
// Names
+ case 71 /* Identifier */:
+ return ts.updateIdentifier(node, nodesVisitor(node.typeArguments, visitor, ts.isTypeNode));
case 143 /* QualifiedName */:
return ts.updateQualifiedName(node, visitNode(node.left, visitor, ts.isEntityName), visitNode(node.right, visitor, ts.isIdentifier));
case 144 /* ComputedPropertyName */:
return ts.updateComputedPropertyName(node, visitNode(node.expression, visitor, ts.isExpression));
- // Signatures and Signature Elements
- case 160 /* FunctionType */:
- return ts.updateFunctionTypeNode(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode));
- case 161 /* ConstructorType */:
- return ts.updateConstructorTypeNode(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode));
- case 155 /* CallSignature */:
- return ts.updateCallSignatureDeclaration(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode));
- case 156 /* ConstructSignature */:
- return ts.updateConstructSignatureDeclaration(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode));
- case 150 /* 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 157 /* 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));
+ // Signature elements
+ case 145 /* TypeParameter */:
+ return ts.updateTypeParameterDeclaration(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.constraint, visitor, ts.isTypeNode), visitNode(node.default, visitor, ts.isTypeNode));
case 146 /* 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 147 /* Decorator */:
return ts.updateDecorator(node, visitNode(node.expression, visitor, ts.isExpression));
+ // Type elements
+ case 148 /* PropertySignature */:
+ return ts.updatePropertySignature(node, nodesVisitor(node.modifiers, visitor, ts.isToken), 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 149 /* 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 /* MethodSignature */:
+ return ts.updateMethodSignature(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.questionToken, tokenVisitor, ts.isToken));
+ case 151 /* 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.isTypeParameterDeclaration), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context));
+ case 152 /* 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 153 /* 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 154 /* 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));
+ case 155 /* CallSignature */:
+ return ts.updateCallSignature(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), visitNode(node.type, visitor, ts.isTypeNode));
+ case 156 /* ConstructSignature */:
+ return ts.updateConstructSignature(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), visitNode(node.type, visitor, ts.isTypeNode));
+ case 157 /* IndexSignature */:
+ return ts.updateIndexSignature(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), visitNode(node.type, visitor, ts.isTypeNode));
// Types
- case 159 /* TypeReference */:
- return ts.updateTypeReferenceNode(node, visitNode(node.typeName, visitor, ts.isEntityName), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode));
case 158 /* TypePredicate */:
return ts.updateTypePredicateNode(node, visitNode(node.parameterName, visitor), visitNode(node.type, visitor, ts.isTypeNode));
+ case 159 /* TypeReference */:
+ return ts.updateTypeReferenceNode(node, visitNode(node.typeName, visitor, ts.isEntityName), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode));
+ case 160 /* FunctionType */:
+ return ts.updateFunctionTypeNode(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), visitNode(node.type, visitor, ts.isTypeNode));
+ case 161 /* ConstructorType */:
+ return ts.updateConstructorTypeNode(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), visitNode(node.type, visitor, ts.isTypeNode));
case 162 /* TypeQuery */:
return ts.updateTypeQueryNode(node, visitNode(node.exprName, visitor, ts.isEntityName));
case 163 /* TypeLiteral */:
- return ts.updateTypeLiteralNode(node, nodesVisitor(node.members, visitor));
+ return ts.updateTypeLiteralNode(node, nodesVisitor(node.members, visitor, ts.isTypeElement));
case 164 /* ArrayType */:
return ts.updateArrayTypeNode(node, visitNode(node.elementType, visitor, ts.isTypeNode));
case 165 /* TupleType */:
return ts.updateTypleTypeNode(node, nodesVisitor(node.elementTypes, visitor, ts.isTypeNode));
case 166 /* UnionType */:
+ return ts.updateUnionTypeNode(node, nodesVisitor(node.types, visitor, ts.isTypeNode));
case 167 /* IntersectionType */:
- return ts.updateUnionOrIntersectionTypeNode(node, nodesVisitor(node.types, visitor, ts.isTypeNode));
+ return ts.updateIntersectionTypeNode(node, nodesVisitor(node.types, visitor, ts.isTypeNode));
case 168 /* ParenthesizedType */:
- throw ts.Debug.fail("not implemented.");
+ return ts.updateParenthesizedType(node, visitNode(node.type, visitor, ts.isTypeNode));
case 170 /* TypeOperator */:
return ts.updateTypeOperatorNode(node, visitNode(node.type, visitor, ts.isTypeNode));
case 171 /* IndexedAccessType */:
return ts.updateIndexedAccessTypeNode(node, visitNode(node.objectType, visitor, ts.isTypeNode), visitNode(node.indexType, visitor, ts.isTypeNode));
case 172 /* 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));
+ return ts.updateMappedTypeNode(node, visitNode(node.readonlyToken, tokenVisitor, ts.isToken), visitNode(node.typeParameter, visitor, ts.isTypeParameterDeclaration), visitNode(node.questionToken, tokenVisitor, ts.isToken), visitNode(node.type, visitor, ts.isTypeNode));
case 173 /* LiteralType */:
return ts.updateLiteralTypeNode(node, visitNode(node.literal, visitor, ts.isExpression));
- // Type Declarations
- case 145 /* 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 148 /* 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 149 /* 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 151 /* 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 152 /* 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 153 /* 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 154 /* 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 174 /* ObjectBindingPattern */:
return ts.updateObjectBindingPattern(node, nodesVisitor(node.elements, visitor, ts.isBindingElement));
@@ -47597,9 +49446,9 @@ var ts;
case 185 /* ParenthesizedExpression */:
return ts.updateParen(node, visitNode(node.expression, visitor, ts.isExpression));
case 186 /* 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));
+ 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.isTypeParameterDeclaration), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context));
case 187 /* 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));
+ return ts.updateArrowFunction(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context));
case 188 /* DeleteExpression */:
return ts.updateDelete(node, visitNode(node.expression, visitor, ts.isExpression));
case 189 /* TypeOfExpression */:
@@ -47608,12 +49457,12 @@ var ts;
return ts.updateVoid(node, visitNode(node.expression, visitor, ts.isExpression));
case 191 /* AwaitExpression */:
return ts.updateAwait(node, visitNode(node.expression, visitor, ts.isExpression));
- case 194 /* BinaryExpression */:
- return ts.updateBinary(node, visitNode(node.left, visitor, ts.isExpression), visitNode(node.right, visitor, ts.isExpression));
case 192 /* PrefixUnaryExpression */:
return ts.updatePrefix(node, visitNode(node.operand, visitor, ts.isExpression));
case 193 /* PostfixUnaryExpression */:
return ts.updatePostfix(node, visitNode(node.operand, visitor, ts.isExpression));
+ case 194 /* BinaryExpression */:
+ return ts.updateBinary(node, visitNode(node.left, visitor, ts.isExpression), visitNode(node.right, visitor, ts.isExpression), visitNode(node.operatorToken, visitor, ts.isToken));
case 195 /* ConditionalExpression */:
return ts.updateConditional(node, visitNode(node.condition, visitor, ts.isExpression), visitNode(node.whenTrue, visitor, ts.isExpression), visitNode(node.whenFalse, visitor, ts.isExpression));
case 196 /* TemplateExpression */:
@@ -47623,13 +49472,15 @@ var ts;
case 198 /* SpreadElement */:
return ts.updateSpread(node, visitNode(node.expression, visitor, ts.isExpression));
case 199 /* 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));
+ return ts.updateClassExpression(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.heritageClauses, visitor, ts.isHeritageClause), nodesVisitor(node.members, visitor, ts.isClassElement));
case 201 /* ExpressionWithTypeArguments */:
return ts.updateExpressionWithTypeArguments(node, nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), visitNode(node.expression, visitor, ts.isExpression));
case 202 /* AsExpression */:
return ts.updateAsExpression(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.type, visitor, ts.isTypeNode));
case 203 /* NonNullExpression */:
return ts.updateNonNullExpression(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 204 /* MetaProperty */:
+ return ts.updateMetaProperty(node, visitNode(node.name, visitor, ts.isIdentifier));
// Misc
case 205 /* TemplateSpan */:
return ts.updateTemplateSpan(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.literal, visitor, ts.isTemplateMiddleOrTemplateTail));
@@ -47673,9 +49524,13 @@ var ts;
case 227 /* VariableDeclarationList */:
return ts.updateVariableDeclarationList(node, nodesVisitor(node.declarations, visitor, ts.isVariableDeclaration));
case 228 /* 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));
+ 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.isTypeParameterDeclaration), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context));
case 229 /* 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));
+ 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.isTypeParameterDeclaration), nodesVisitor(node.heritageClauses, visitor, ts.isHeritageClause), nodesVisitor(node.members, visitor, ts.isClassElement));
+ case 230 /* InterfaceDeclaration */:
+ return ts.updateInterfaceDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.heritageClauses, visitor, ts.isHeritageClause), nodesVisitor(node.members, visitor, ts.isTypeElement));
+ case 231 /* TypeAliasDeclaration */:
+ return ts.updateTypeAliasDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), visitNode(node.type, visitor, ts.isTypeNode));
case 232 /* 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 233 /* ModuleDeclaration */:
@@ -47684,6 +49539,8 @@ var ts;
return ts.updateModuleBlock(node, nodesVisitor(node.statements, visitor, ts.isStatement));
case 235 /* CaseBlock */:
return ts.updateCaseBlock(node, nodesVisitor(node.clauses, visitor, ts.isCaseOrDefaultClause));
+ case 236 /* NamespaceExportDeclaration */:
+ return ts.updateNamespaceExportDeclaration(node, visitNode(node.name, visitor, ts.isIdentifier));
case 237 /* 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 238 /* ImportDeclaration */:
@@ -47710,8 +49567,6 @@ var ts;
// JSX
case 249 /* JsxElement */:
return ts.updateJsxElement(node, visitNode(node.openingElement, visitor, ts.isJsxOpeningElement), nodesVisitor(node.children, visitor, ts.isJsxChild), visitNode(node.closingElement, visitor, ts.isJsxClosingElement));
- case 254 /* JsxAttributes */:
- return ts.updateJsxAttributes(node, nodesVisitor(node.properties, visitor, ts.isJsxAttributeLike));
case 250 /* JsxSelfClosingElement */:
return ts.updateJsxSelfClosingElement(node, visitNode(node.tagName, visitor, ts.isJsxTagNameExpression), visitNode(node.attributes, visitor, ts.isJsxAttributes));
case 251 /* JsxOpeningElement */:
@@ -47720,6 +49575,8 @@ var ts;
return ts.updateJsxClosingElement(node, visitNode(node.tagName, visitor, ts.isJsxTagNameExpression));
case 253 /* JsxAttribute */:
return ts.updateJsxAttribute(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.initializer, visitor, ts.isStringLiteralOrJsxExpression));
+ case 254 /* JsxAttributes */:
+ return ts.updateJsxAttributes(node, nodesVisitor(node.properties, visitor, ts.isJsxAttributeLike));
case 255 /* JsxSpreadAttribute */:
return ts.updateJsxSpreadAttribute(node, visitNode(node.expression, visitor, ts.isExpression));
case 256 /* JsxExpression */:
@@ -47747,9 +49604,12 @@ var ts;
case 265 /* SourceFile */:
return ts.updateSourceFileNode(node, visitLexicalEnvironment(node.statements, visitor, context));
// Transformation nodes
- case 296 /* PartiallyEmittedExpression */:
+ case 297 /* PartiallyEmittedExpression */:
return ts.updatePartiallyEmittedExpression(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 298 /* CommaListExpression */:
+ return ts.updateCommaList(node, nodesVisitor(node.elements, visitor, ts.isExpression));
default:
+ // No need to visit nodes with no children.
return node;
}
}
@@ -47802,7 +49662,7 @@ var ts;
case 209 /* EmptyStatement */:
case 200 /* OmittedExpression */:
case 225 /* DebuggerStatement */:
- case 295 /* NotEmittedStatement */:
+ case 296 /* NotEmittedStatement */:
// No need to visit nodes with no children.
break;
// Names
@@ -47825,6 +49685,13 @@ var ts;
result = reduceNode(node.expression, cbNode, result);
break;
// Type member
+ case 148 /* PropertySignature */:
+ result = reduceNodes(node.modifiers, cbNodes, result);
+ result = reduceNode(node.name, cbNode, result);
+ result = reduceNode(node.questionToken, cbNode, result);
+ result = reduceNode(node.type, cbNode, result);
+ result = reduceNode(node.initializer, cbNode, result);
+ break;
case 149 /* PropertyDeclaration */:
result = reduceNodes(node.decorators, cbNodes, result);
result = reduceNodes(node.modifiers, cbNodes, result);
@@ -48172,9 +50039,12 @@ var ts;
result = reduceNodes(node.statements, cbNodes, result);
break;
// Transformation nodes
- case 296 /* PartiallyEmittedExpression */:
+ case 297 /* PartiallyEmittedExpression */:
result = reduceNode(node.expression, cbNode, result);
break;
+ case 298 /* CommaListExpression */:
+ result = reduceNodes(node.elements, cbNodes, result);
+ break;
default:
break;
}
@@ -48263,37 +50133,69 @@ var ts;
}
var Debug;
(function (Debug) {
+ var isDebugInfoEnabled = false;
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."; }); }
+ ? function (node, message) { return Debug.fail((message || "Unexpected node.") + "\r\nNode " + ts.formatSyntaxKind(node.kind) + " was unexpected.", Debug.failBadSyntaxKind); }
: ts.noop;
Debug.assertEachNode = Debug.shouldAssert(1 /* Normal */)
- ? function (nodes, test, message) { return Debug.assert(test === undefined || ts.every(nodes, test), message || "Unexpected node.", function () { return "Node array did not pass test '" + getFunctionName(test) + "'."; }); }
+ ? function (nodes, test, message) { return Debug.assert(test === undefined || ts.every(nodes, test), message || "Unexpected node.", function () { return "Node array did not pass test '" + Debug.getFunctionName(test) + "'."; }, Debug.assertEachNode); }
: ts.noop;
Debug.assertNode = Debug.shouldAssert(1 /* Normal */)
- ? function (node, test, message) { return Debug.assert(test === undefined || test(node), message || "Unexpected node.", function () { return "Node " + ts.formatSyntaxKind(node.kind) + " did not pass test '" + getFunctionName(test) + "'."; }); }
+ ? function (node, test, message) { return Debug.assert(test === undefined || test(node), message || "Unexpected node.", function () { return "Node " + ts.formatSyntaxKind(node.kind) + " did not pass test '" + Debug.getFunctionName(test) + "'."; }, Debug.assertNode); }
: ts.noop;
Debug.assertOptionalNode = Debug.shouldAssert(1 /* Normal */)
- ? function (node, test, message) { return Debug.assert(test === undefined || node === undefined || test(node), message || "Unexpected node.", function () { return "Node " + ts.formatSyntaxKind(node.kind) + " did not pass test '" + getFunctionName(test) + "'."; }); }
+ ? function (node, test, message) { return Debug.assert(test === undefined || node === undefined || test(node), message || "Unexpected node.", function () { return "Node " + ts.formatSyntaxKind(node.kind) + " did not pass test '" + Debug.getFunctionName(test) + "'."; }, Debug.assertOptionalNode); }
: ts.noop;
Debug.assertOptionalToken = Debug.shouldAssert(1 /* Normal */)
- ? function (node, kind, message) { return Debug.assert(kind === undefined || node === undefined || node.kind === kind, message || "Unexpected node.", function () { return "Node " + ts.formatSyntaxKind(node.kind) + " was not a '" + ts.formatSyntaxKind(kind) + "' token."; }); }
+ ? function (node, kind, message) { return Debug.assert(kind === undefined || node === undefined || node.kind === kind, message || "Unexpected node.", function () { return "Node " + ts.formatSyntaxKind(node.kind) + " was not a '" + ts.formatSyntaxKind(kind) + "' token."; }, Debug.assertOptionalToken); }
: ts.noop;
Debug.assertMissingNode = Debug.shouldAssert(1 /* Normal */)
- ? function (node, message) { return Debug.assert(node === undefined, message || "Unexpected node.", function () { return "Node " + ts.formatSyntaxKind(node.kind) + " was unexpected'."; }); }
+ ? function (node, message) { return Debug.assert(node === undefined, message || "Unexpected node.", function () { return "Node " + ts.formatSyntaxKind(node.kind) + " was unexpected'."; }, Debug.assertMissingNode); }
: ts.noop;
- function getFunctionName(func) {
- if (typeof func !== "function") {
- return "";
- }
- else if (func.hasOwnProperty("name")) {
- return func.name;
- }
- else {
- var text = Function.prototype.toString.call(func);
- var match = /^function\s+([\w\$]+)\s*\(/.exec(text);
- return match ? match[1] : "";
+ /**
+ * Injects debug information into frequently used types.
+ */
+ function enableDebugInfo() {
+ if (isDebugInfoEnabled)
+ return;
+ // Add additional properties in debug mode to assist with debugging.
+ Object.defineProperties(ts.objectAllocator.getSymbolConstructor().prototype, {
+ "__debugFlags": { get: function () { return ts.formatSymbolFlags(this.flags); } }
+ });
+ Object.defineProperties(ts.objectAllocator.getTypeConstructor().prototype, {
+ "__debugFlags": { get: function () { return ts.formatTypeFlags(this.flags); } },
+ "__debugObjectFlags": { get: function () { return this.flags & 32768 /* Object */ ? ts.formatObjectFlags(this.objectFlags) : ""; } },
+ "__debugTypeToString": { value: function () { return this.checker.typeToString(this); } },
+ });
+ var nodeConstructors = [
+ ts.objectAllocator.getNodeConstructor(),
+ ts.objectAllocator.getIdentifierConstructor(),
+ ts.objectAllocator.getTokenConstructor(),
+ ts.objectAllocator.getSourceFileConstructor()
+ ];
+ for (var _i = 0, nodeConstructors_1 = nodeConstructors; _i < nodeConstructors_1.length; _i++) {
+ var ctor = nodeConstructors_1[_i];
+ if (!ctor.prototype.hasOwnProperty("__debugKind")) {
+ Object.defineProperties(ctor.prototype, {
+ "__debugKind": { get: function () { return ts.formatSyntaxKind(this.kind); } },
+ "__debugModifierFlags": { get: function () { return ts.formatModifierFlags(ts.getModifierFlagsNoCache(this)); } },
+ "__debugTransformFlags": { get: function () { return ts.formatTransformFlags(this.transformFlags); } },
+ "__debugEmitFlags": { get: function () { return ts.formatEmitFlags(ts.getEmitFlags(this)); } },
+ "__debugGetText": {
+ value: function (includeTrivia) {
+ if (ts.nodeIsSynthesized(this))
+ return "";
+ var parseNode = ts.getParseTreeNode(this);
+ var sourceFile = parseNode && ts.getSourceFileOfNode(parseNode);
+ return sourceFile ? ts.getSourceTextOfNodeFromSourceFile(sourceFile, parseNode, includeTrivia) : "";
+ }
+ }
+ });
+ }
}
+ isDebugInfoEnabled = true;
}
+ Debug.enableDebugInfo = enableDebugInfo;
})(Debug = ts.Debug || (ts.Debug = {}));
})(ts || (ts = {}));
/// <reference path="../factory.ts" />
@@ -48754,6 +50656,22 @@ var ts;
/* Enables substitutions for unqualified enum members */
TypeScriptSubstitutionFlags[TypeScriptSubstitutionFlags["NonQualifiedEnumMembers"] = 8] = "NonQualifiedEnumMembers";
})(TypeScriptSubstitutionFlags || (TypeScriptSubstitutionFlags = {}));
+ var ClassFacts;
+ (function (ClassFacts) {
+ ClassFacts[ClassFacts["None"] = 0] = "None";
+ ClassFacts[ClassFacts["HasStaticInitializedProperties"] = 1] = "HasStaticInitializedProperties";
+ ClassFacts[ClassFacts["HasConstructorDecorators"] = 2] = "HasConstructorDecorators";
+ ClassFacts[ClassFacts["HasMemberDecorators"] = 4] = "HasMemberDecorators";
+ ClassFacts[ClassFacts["IsExportOfNamespace"] = 8] = "IsExportOfNamespace";
+ ClassFacts[ClassFacts["IsNamedExternalExport"] = 16] = "IsNamedExternalExport";
+ ClassFacts[ClassFacts["IsDefaultExternalExport"] = 32] = "IsDefaultExternalExport";
+ ClassFacts[ClassFacts["HasExtendsClause"] = 64] = "HasExtendsClause";
+ ClassFacts[ClassFacts["UseImmediatelyInvokedFunctionExpression"] = 128] = "UseImmediatelyInvokedFunctionExpression";
+ ClassFacts[ClassFacts["HasAnyDecorators"] = 6] = "HasAnyDecorators";
+ ClassFacts[ClassFacts["NeedsName"] = 5] = "NeedsName";
+ ClassFacts[ClassFacts["MayNeedImmediatelyInvokedFunctionExpression"] = 7] = "MayNeedImmediatelyInvokedFunctionExpression";
+ ClassFacts[ClassFacts["IsExported"] = 56] = "IsExported";
+ })(ClassFacts || (ClassFacts = {}));
function transformTypeScript(context) {
var startLexicalEnvironment = context.startLexicalEnvironment, resumeLexicalEnvironment = context.resumeLexicalEnvironment, endLexicalEnvironment = context.endLexicalEnvironment, hoistVariableDeclaration = context.hoistVariableDeclaration;
var resolver = context.getEmitResolver();
@@ -48797,7 +50715,7 @@ var ts;
* @param node A SourceFile node.
*/
function transformSourceFile(node) {
- if (ts.isDeclarationFile(node)) {
+ if (node.isDeclarationFile) {
return node;
}
currentSourceFile = node;
@@ -49031,7 +50949,9 @@ var ts;
case 231 /* TypeAliasDeclaration */:
// TypeScript type-only declarations are elided.
case 149 /* PropertyDeclaration */:
- // TypeScript property declarations are elided.
+ // TypeScript property declarations are elided.
+ case 236 /* NamespaceExportDeclaration */:
+ // TypeScript namespace export declarations are elided.
return undefined;
case 152 /* Constructor */:
return visitConstructor(node);
@@ -49157,6 +51077,26 @@ var ts;
function shouldEmitDecorateCallForParameter(parameter) {
return parameter.decorators !== undefined && parameter.decorators.length > 0;
}
+ function getClassFacts(node, staticProperties) {
+ var facts = 0 /* None */;
+ if (ts.some(staticProperties))
+ facts |= 1 /* HasStaticInitializedProperties */;
+ if (ts.getClassExtendsHeritageClauseElement(node))
+ facts |= 64 /* HasExtendsClause */;
+ if (shouldEmitDecorateCallForClass(node))
+ facts |= 2 /* HasConstructorDecorators */;
+ if (ts.childIsDecorated(node))
+ facts |= 4 /* HasMemberDecorators */;
+ if (isExportOfNamespace(node))
+ facts |= 8 /* IsExportOfNamespace */;
+ else if (isDefaultExternalModuleExport(node))
+ facts |= 32 /* IsDefaultExternalExport */;
+ else if (isNamedExternalModuleExport(node))
+ facts |= 16 /* IsNamedExternalExport */;
+ if (languageVersion <= 1 /* ES5 */ && (facts & 7 /* MayNeedImmediatelyInvokedFunctionExpression */))
+ facts |= 128 /* UseImmediatelyInvokedFunctionExpression */;
+ return facts;
+ }
/**
* Transforms a class declaration with TypeScript syntax into compatible ES6.
*
@@ -49170,51 +51110,80 @@ var ts;
*/
function visitClassDeclaration(node) {
var staticProperties = getInitializedProperties(node, /*isStatic*/ true);
- var hasExtendsClause = ts.getClassExtendsHeritageClauseElement(node) !== undefined;
- var isDecoratedClass = shouldEmitDecorateCallForClass(node);
- // emit name if
- // - node has a name
- // - node has static initializers
- // - node has a member that is decorated
- //
- var name = node.name;
- if (!name && (staticProperties.length > 0 || ts.childIsDecorated(node))) {
- name = ts.getGeneratedNameForNode(node);
- }
- var classStatement = isDecoratedClass
- ? createClassDeclarationHeadWithDecorators(node, name, hasExtendsClause)
- : createClassDeclarationHeadWithoutDecorators(node, name, hasExtendsClause, staticProperties.length > 0);
+ var facts = getClassFacts(node, staticProperties);
+ if (facts & 128 /* UseImmediatelyInvokedFunctionExpression */) {
+ context.startLexicalEnvironment();
+ }
+ var name = node.name || (facts & 5 /* NeedsName */ ? ts.getGeneratedNameForNode(node) : undefined);
+ var classStatement = facts & 2 /* HasConstructorDecorators */
+ ? createClassDeclarationHeadWithDecorators(node, name, facts)
+ : createClassDeclarationHeadWithoutDecorators(node, name, facts);
var statements = [classStatement];
// Emit static property assignment. Because classDeclaration is lexically evaluated,
// it is safe to emit static property assignment after classDeclaration
// From ES6 specification:
// HasLexicalDeclaration (N) : Determines if the argument identifier has a binding in this environment record that was created using
// a lexical declaration such as a LexicalDeclaration or a ClassDeclaration.
- if (staticProperties.length) {
- addInitializedPropertyStatements(statements, staticProperties, ts.getLocalName(node));
+ if (facts & 1 /* HasStaticInitializedProperties */) {
+ addInitializedPropertyStatements(statements, staticProperties, facts & 128 /* UseImmediatelyInvokedFunctionExpression */ ? ts.getInternalName(node) : ts.getLocalName(node));
}
// Write any decorators of the node.
addClassElementDecorationStatements(statements, node, /*isStatic*/ false);
addClassElementDecorationStatements(statements, node, /*isStatic*/ true);
addConstructorDecorationStatement(statements, node);
+ if (facts & 128 /* UseImmediatelyInvokedFunctionExpression */) {
+ // When we emit a TypeScript class down to ES5, we must wrap it in an IIFE so that the
+ // 'es2015' transformer can properly nest static initializers and decorators. The result
+ // looks something like:
+ //
+ // var C = function () {
+ // class C {
+ // }
+ // C.static_prop = 1;
+ // return C;
+ // }();
+ //
+ var closingBraceLocation = ts.createTokenRange(ts.skipTrivia(currentSourceFile.text, node.members.end), 18 /* CloseBraceToken */);
+ var localName = ts.getInternalName(node);
+ // The following partially-emitted expression exists purely to align our sourcemap
+ // emit with the original emitter.
+ var outer = ts.createPartiallyEmittedExpression(localName);
+ outer.end = closingBraceLocation.end;
+ ts.setEmitFlags(outer, 1536 /* NoComments */);
+ var statement = ts.createReturn(outer);
+ statement.pos = closingBraceLocation.pos;
+ ts.setEmitFlags(statement, 1536 /* NoComments */ | 384 /* NoTokenSourceMaps */);
+ statements.push(statement);
+ ts.addRange(statements, context.endLexicalEnvironment());
+ var varStatement = ts.createVariableStatement(
+ /*modifiers*/ undefined, ts.createVariableDeclarationList([
+ ts.createVariableDeclaration(ts.getLocalName(node, /*allowComments*/ false, /*allowSourceMaps*/ false),
+ /*type*/ undefined, ts.createImmediatelyInvokedFunctionExpression(statements))
+ ]));
+ ts.setOriginalNode(varStatement, node);
+ ts.setCommentRange(varStatement, node);
+ ts.setSourceMapRange(varStatement, ts.moveRangePastDecorators(node));
+ ts.startOnNewLine(varStatement);
+ statements = [varStatement];
+ }
// If the class is exported as part of a TypeScript namespace, emit the namespace export.
// Otherwise, if the class was exported at the top level and was decorated, emit an export
// declaration or export default for the class.
- if (isNamespaceExport(node)) {
+ if (facts & 8 /* IsExportOfNamespace */) {
addExportMemberAssignment(statements, node);
}
- else if (isDecoratedClass) {
- if (isDefaultExternalModuleExport(node)) {
+ else if (facts & 128 /* UseImmediatelyInvokedFunctionExpression */ || facts & 2 /* HasConstructorDecorators */) {
+ if (facts & 32 /* IsDefaultExternalExport */) {
statements.push(ts.createExportDefault(ts.getLocalName(node, /*allowComments*/ false, /*allowSourceMaps*/ true)));
}
- else if (isNamedExternalModuleExport(node)) {
+ else if (facts & 16 /* IsNamedExternalExport */) {
statements.push(ts.createExternalModuleExport(ts.getLocalName(node, /*allowComments*/ false, /*allowSourceMaps*/ true)));
}
}
if (statements.length > 1) {
// Add a DeclarationMarker as a marker for the end of the declaration
statements.push(ts.createEndOfDeclarationMarker(node));
- ts.setEmitFlags(classStatement, ts.getEmitFlags(classStatement) | 2097152 /* HasEndOfDeclarationMarker */);
+ ts.setEmitFlags(classStatement, ts.getEmitFlags(classStatement) | 4194304 /* HasEndOfDeclarationMarker */);
}
return ts.singleOrMany(statements);
}
@@ -49223,20 +51192,23 @@ var ts;
*
* @param node A ClassDeclaration node.
* @param name The name of the class.
- * @param hasExtendsClause A value indicating whether the class has an extends clause.
- * @param hasStaticProperties A value indicating whether the class has static properties.
+ * @param facts Precomputed facts about the class.
*/
- function createClassDeclarationHeadWithoutDecorators(node, name, hasExtendsClause, hasStaticProperties) {
+ function createClassDeclarationHeadWithoutDecorators(node, name, facts) {
// ${modifiers} class ${name} ${heritageClauses} {
// ${members}
// }
+ // we do not emit modifiers on the declaration if we are emitting an IIFE
+ var modifiers = !(facts & 128 /* UseImmediatelyInvokedFunctionExpression */)
+ ? ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier)
+ : undefined;
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));
+ /*decorators*/ undefined, modifiers, name,
+ /*typeParameters*/ undefined, ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause), transformClassMembers(node, (facts & 64 /* HasExtendsClause */) !== 0));
// 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) {
+ if (facts & 1 /* HasStaticInitializedProperties */) {
emitFlags |= 32 /* NoTrailingSourceMap */;
}
ts.setTextRange(classDeclaration, node);
@@ -49247,13 +51219,8 @@ var ts;
/**
* Transforms a decorated class declaration and appends the resulting statements. If
* the class requires an alias to avoid issues with double-binding, the alias is returned.
- *
- * @param statements A statement list to which to add the declaration.
- * @param node A ClassDeclaration node.
- * @param name The name of the class.
- * @param hasExtendsClause A value indicating whether the class has an extends clause.
*/
- function createClassDeclarationHeadWithDecorators(node, name, hasExtendsClause) {
+ function createClassDeclarationHeadWithDecorators(node, name, facts) {
// When we emit an ES6 class that has a class decorator, we must tailor the
// emit to certain specific cases.
//
@@ -49346,7 +51313,7 @@ var ts;
// ${members}
// }
var heritageClauses = ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause);
- var members = transformClassMembers(node, hasExtendsClause);
+ var members = transformClassMembers(node, (facts & 64 /* HasExtendsClause */) !== 0);
var classExpression = ts.createClassExpression(/*modifiers*/ undefined, name, /*typeParameters*/ undefined, heritageClauses, members);
ts.setOriginalNode(classExpression, node);
ts.setTextRange(classExpression, location);
@@ -49390,7 +51357,7 @@ var ts;
}
// To preserve the behavior of the old emitter, we explicitly indent
// the body of a class with static initializers.
- ts.setEmitFlags(classExpression, 32768 /* Indented */ | ts.getEmitFlags(classExpression));
+ ts.setEmitFlags(classExpression, 65536 /* Indented */ | ts.getEmitFlags(classExpression));
expressions.push(ts.startOnNewLine(ts.createAssignment(temp, classExpression)));
ts.addRange(expressions, generateInitializedPropertyExpressions(staticProperties, temp));
expressions.push(ts.startOnNewLine(temp));
@@ -49847,8 +51814,8 @@ var ts;
function generateClassElementDecorationExpressions(node, isStatic) {
var members = getDecoratedClassElements(node, isStatic);
var expressions;
- for (var _i = 0, members_2 = members; _i < members_2.length; _i++) {
- var member = members_2[_i];
+ for (var _i = 0, members_3 = members; _i < members_3.length; _i++) {
+ var member = members_3[_i];
var expression = generateClassElementDecorationExpression(node, member);
if (expression) {
if (!expressions) {
@@ -50216,21 +52183,17 @@ var ts;
return ts.createIdentifier("Object");
}
function serializeUnionOrIntersectionType(node) {
+ // Note when updating logic here also update getEntityNameForDecoratorMetadata
+ // so that aliases can be marked as referenced
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") {
+ if (ts.isIdentifier(serializedIndividual) && serializedIndividual.text === "Object") {
// One of the individual is global object, return immediately
return serializedIndividual;
}
- else if (serializedUnion && !ts.isVoidExpression(serializedUnion)) {
+ else if (serializedUnion) {
// Different types
if (!ts.isIdentifier(serializedUnion) ||
!ts.isIdentifier(serializedIndividual) ||
@@ -50521,7 +52484,7 @@ var ts;
/*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)) {
+ if (isExportOfNamespace(node)) {
var statements = [updated];
addExportMemberAssignment(statements, node);
return statements;
@@ -50591,7 +52554,7 @@ var ts;
* - The node is exported from a TypeScript namespace.
*/
function visitVariableStatement(node) {
- if (isNamespaceExport(node)) {
+ if (isExportOfNamespace(node)) {
var variables = ts.getInitializedVariables(node.declarationList);
if (variables.length === 0) {
// elide statement if there are no initialized variables.
@@ -50760,7 +52723,12 @@ 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.setTextRange(ts.createStatement(ts.setTextRange(ts.createAssignment(ts.createElementAccess(currentNamespaceContainerName, ts.createAssignment(ts.createElementAccess(currentNamespaceContainerName, name), transformEnumMemberDeclarationValue(member))), name), member)), member);
+ var valueExpression = transformEnumMemberDeclarationValue(member);
+ var innerAssignment = ts.createAssignment(ts.createElementAccess(currentNamespaceContainerName, name), valueExpression);
+ var outerAssignment = valueExpression.kind === 9 /* StringLiteral */ ?
+ innerAssignment :
+ ts.createAssignment(ts.createElementAccess(currentNamespaceContainerName, innerAssignment), name);
+ return ts.setTextRange(ts.createStatement(ts.setTextRange(outerAssignment, member)), member);
}
/**
* Transforms the value of an enum member.
@@ -50795,7 +52763,7 @@ var ts;
* or `exports.x`).
*/
function hasNamespaceQualifiedExportName(node) {
- return isNamespaceExport(node)
+ return isExportOfNamespace(node)
|| (isExternalModuleExport(node)
&& moduleKind !== ts.ModuleKind.ES2015
&& moduleKind !== ts.ModuleKind.System);
@@ -50835,10 +52803,12 @@ var ts;
* Adds a leading VariableStatement for a enum or module declaration.
*/
function addVarForEnumOrModuleDeclaration(statements, node) {
- // Emit a variable statement for the module.
- var statement = ts.createVariableStatement(ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), [
+ // Emit a variable statement for the module. We emit top-level enums as a `var`
+ // declaration to avoid static errors in global scripts scripts due to redeclaration.
+ // enums in any other scope are emitted as a `let` declaration.
+ var statement = ts.createVariableStatement(ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), ts.createVariableDeclarationList([
ts.createVariableDeclaration(ts.getLocalName(node, /*allowComments*/ false, /*allowSourceMaps*/ true))
- ]);
+ ], currentScope.kind === 265 /* SourceFile */ ? 0 /* None */ : 1 /* Let */));
ts.setOriginalNode(statement, node);
recordEmittedDeclarationInScope(node);
if (isFirstEmittedDeclarationInScope(node)) {
@@ -50868,7 +52838,7 @@ var ts;
// })(m1 || (m1 = {})); // trailing comment module
//
ts.setCommentRange(statement, node);
- ts.setEmitFlags(statement, 1024 /* NoTrailingComments */ | 2097152 /* HasEndOfDeclarationMarker */);
+ ts.setEmitFlags(statement, 1024 /* NoTrailingComments */ | 4194304 /* HasEndOfDeclarationMarker */);
statements.push(statement);
return true;
}
@@ -50878,7 +52848,7 @@ var ts;
// begin/end semantics of the declararation and to properly handle exports
// we wrap the leading variable declaration in a `MergeDeclarationMarker`.
var mergeMarker = ts.createMergeDeclarationMarker(statement);
- ts.setEmitFlags(mergeMarker, 1536 /* NoComments */ | 2097152 /* HasEndOfDeclarationMarker */);
+ ts.setEmitFlags(mergeMarker, 1536 /* NoComments */ | 4194304 /* HasEndOfDeclarationMarker */);
statements.push(mergeMarker);
return false;
}
@@ -51095,7 +53065,7 @@ var ts;
function visitExportDeclaration(node) {
if (!node.exportClause) {
// Elide a star export if the module it references does not export a value.
- return resolver.moduleExportsSomeValue(node.moduleSpecifier) ? node : undefined;
+ return compilerOptions.isolatedModules || resolver.moduleExportsSomeValue(node.moduleSpecifier) ? node : undefined;
}
if (!resolver.isValueAliasDeclaration(node)) {
// Elide the export declaration if it does not export a value.
@@ -51159,7 +53129,7 @@ var ts;
}
var moduleReference = ts.createExpressionFromEntityName(node.moduleReference);
ts.setEmitFlags(moduleReference, 1536 /* NoComments */ | 2048 /* NoNestedComments */);
- if (isNamedExternalModuleExport(node) || !isNamespaceExport(node)) {
+ if (isNamedExternalModuleExport(node) || !isExportOfNamespace(node)) {
// export var ${name} = ${moduleReference};
// var ${name} = ${moduleReference};
return ts.setOriginalNode(ts.setTextRange(ts.createVariableStatement(ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), ts.createVariableDeclarationList([
@@ -51177,7 +53147,7 @@ var ts;
*
* @param node The node to test.
*/
- function isNamespaceExport(node) {
+ function isExportOfNamespace(node) {
return currentNamespace !== undefined && ts.hasModifier(node, 1 /* Export */);
}
/**
@@ -51381,10 +53351,10 @@ var ts;
if (declaration) {
var classAlias = classAliases[declaration.id];
if (classAlias) {
- var clone_2 = ts.getSynthesizedClone(classAlias);
- ts.setSourceMapRange(clone_2, node);
- ts.setCommentRange(clone_2, node);
- return clone_2;
+ var clone_1 = ts.getSynthesizedClone(classAlias);
+ ts.setSourceMapRange(clone_1, node);
+ ts.setCommentRange(clone_1, node);
+ return clone_1;
}
}
}
@@ -51524,7 +53494,7 @@ var ts;
context.onSubstituteNode = onSubstituteNode;
return transformSourceFile;
function transformSourceFile(node) {
- if (ts.isDeclarationFile(node)) {
+ if (node.isDeclarationFile) {
return node;
}
currentSourceFile = node;
@@ -51816,7 +53786,7 @@ var ts;
/*parameters*/ [],
/*type*/ undefined, body);
// Mark this node as originally an async function
- (generatorFunc.emitNode || (generatorFunc.emitNode = {})).flags |= 131072 /* AsyncFunctionBody */;
+ (generatorFunc.emitNode || (generatorFunc.emitNode = {})).flags |= 262144 /* AsyncFunctionBody */;
return ts.createCall(ts.getHelperName("__awaiter"),
/*typeArguments*/ undefined, [
ts.createThis(),
@@ -51861,7 +53831,7 @@ var ts;
var enclosingSuperContainerFlags = 0;
return transformSourceFile;
function transformSourceFile(node) {
- if (ts.isDeclarationFile(node)) {
+ if (node.isDeclarationFile) {
return node;
}
var visited = ts.visitEachChild(node, visitor, context);
@@ -51929,21 +53899,15 @@ var ts;
}
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])),
+ return ts.setOriginalNode(ts.setTextRange(ts.createYield(createAwaitHelper(context, ts.visitNode(node.expression, visitor, ts.isExpression))),
/*location*/ node), node);
}
return ts.visitEachChild(node, visitor, context);
}
function visitYieldExpression(node) {
- if (enclosingFunctionFlags & 2 /* Async */ && enclosingFunctionFlags & 1 /* Generator */) {
+ if (enclosingFunctionFlags & 2 /* Async */ && enclosingFunctionFlags & 1 /* Generator */ && node.asteriskToken) {
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.setOriginalNode(ts.setTextRange(ts.createYield(createAwaitHelper(context, ts.updateYield(node, node.asteriskToken, createAsyncDelegatorHelper(context, createAsyncValuesHelper(context, expression, expression), expression)))), node), node);
}
return ts.visitEachChild(node, visitor, context);
}
@@ -52093,6 +54057,11 @@ var ts;
return ts.setEmitFlags(ts.setTextRange(ts.createBlock(ts.setTextRange(ts.createNodeArray(statements), statementsLocation),
/*multiLine*/ true), bodyLocation), 48 /* NoSourceMap */ | 384 /* NoTokenSourceMaps */);
}
+ function createDownlevelAwait(expression) {
+ return enclosingFunctionFlags & 1 /* Generator */
+ ? ts.createYield(/*asteriskToken*/ undefined, createAwaitHelper(context, expression))
+ : ts.createAwait(expression);
+ }
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);
@@ -52100,24 +54069,21 @@ var ts;
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, []));
+ var callValues = createAsyncValuesHelper(context, expression, /*location*/ node.expression);
+ var callNext = ts.createCall(ts.createPropertyAccess(iterator, "next"), /*typeArguments*/ undefined, []);
+ var getDone = ts.createPropertyAccess(result, "done");
+ var getValue = ts.createPropertyAccess(result, "value");
+ var callReturn = ts.createFunctionCall(returnMethod, iterator, []);
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"))),
+ ts.setTextRange(ts.createVariableDeclaration(iterator, /*type*/ undefined, callValues), node.expression),
+ ts.createVariableDeclaration(result)
+ ]), node.expression), 2097152 /* NoHoisting */),
+ /*condition*/ ts.createComma(ts.createAssignment(result, createDownlevelAwait(callNext)), ts.createLogicalNot(getDone)),
+ /*incrementor*/ undefined,
+ /*statement*/ convertForOfStatementHead(node, createDownlevelAwait(getValue))),
/*location*/ node), 256 /* NoTokenTrailingSourceMaps */);
return ts.createTry(ts.createBlock([
ts.restoreEnclosingLabel(forStatement, outermostLabeledStatement)
@@ -52128,13 +54094,7 @@ var ts;
]), 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 */)
+ ts.setEmitFlags(ts.createIf(ts.createLogicalAnd(ts.createLogicalAnd(result, ts.createLogicalNot(getDone)), ts.createAssignment(returnMethod, ts.createPropertyAccess(iterator, "return"))), ts.createStatement(createDownlevelAwait(callReturn))), 1 /* SingleLine */)
]),
/*catchClause*/ undefined,
/*finallyBlock*/ ts.setEmitFlags(ts.createBlock([
@@ -52290,7 +54250,7 @@ var ts;
if (ts.some(declarations)) {
var statement = ts.createVariableStatement(
/*modifiers*/ undefined, ts.createVariableDeclarationList(declarations));
- ts.setEmitFlags(statement, 524288 /* CustomPrologue */);
+ ts.setEmitFlags(statement, 1048576 /* CustomPrologue */);
statements = ts.append(statements, statement);
}
}
@@ -52420,15 +54380,25 @@ var ts;
/*typeArguments*/ undefined, attributesSegments);
}
ts.createAssignHelper = createAssignHelper;
+ var awaitHelper = {
+ name: "typescript:await",
+ scoped: false,
+ text: "\n var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); }\n "
+ };
+ function createAwaitHelper(context, expression) {
+ context.requestEmitHelper(awaitHelper);
+ return ts.createCall(ts.getHelperName("__await"), /*typeArguments*/ undefined, [expression]);
+ }
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\" ? send : fulfill, reject); }\n function send(value) { settle(c[2], { value: 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 "
+ 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 || []), i, q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n };\n "
};
function createAsyncGeneratorHelper(context, generatorFunc) {
+ context.requestEmitHelper(awaitHelper);
context.requestEmitHelper(asyncGeneratorHelper);
// Mark this node as originally an async function
- (generatorFunc.emitNode || (generatorFunc.emitNode = {})).flags |= 131072 /* AsyncFunctionBody */;
+ (generatorFunc.emitNode || (generatorFunc.emitNode = {})).flags |= 262144 /* AsyncFunctionBody */;
return ts.createCall(ts.getHelperName("__asyncGenerator"),
/*typeArguments*/ undefined, [
ts.createThis(),
@@ -52439,11 +54409,11 @@ var ts;
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 }; }) }, p;\n return o = __asyncValues(o), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { return function (v) { return v = p && n === \"throw\" ? f(v) : p && v.done ? v : { value: p ? [\"yield\", v.value] : [\"await\", (o[n] || f).call(o, v)], done: false }, p = !p, v; }; }\n };\n "
+ text: "\n var __asyncDelegator = (this && this.__asyncDelegator) || function (o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { if (o[n]) i[n] = function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; }; }\n };\n "
};
function createAsyncDelegatorHelper(context, expression, location) {
+ context.requestEmitHelper(awaitHelper);
context.requestEmitHelper(asyncDelegator);
- context.requestEmitHelper(asyncValues);
return ts.setTextRange(ts.createCall(ts.getHelperName("__asyncDelegator"),
/*typeArguments*/ undefined, [expression]), location);
}
@@ -52473,7 +54443,7 @@ var ts;
* @param node A SourceFile node.
*/
function transformSourceFile(node) {
- if (ts.isDeclarationFile(node)) {
+ if (node.isDeclarationFile) {
return node;
}
var visited = ts.visitEachChild(node, visitor, context);
@@ -52958,7 +54928,7 @@ var ts;
var hoistVariableDeclaration = context.hoistVariableDeclaration;
return transformSourceFile;
function transformSourceFile(node) {
- if (ts.isDeclarationFile(node)) {
+ if (node.isDeclarationFile) {
return node;
}
return ts.visitEachChild(node, visitor, context);
@@ -53165,7 +55135,7 @@ var ts;
var enabledSubstitutions;
return transformSourceFile;
function transformSourceFile(node) {
- if (ts.isDeclarationFile(node)) {
+ if (node.isDeclarationFile) {
return node;
}
currentSourceFile = node;
@@ -53202,11 +55172,58 @@ var ts;
&& node.kind === 219 /* ReturnStatement */
&& !node.expression;
}
+ function isClassLikeVariableStatement(node) {
+ if (!ts.isVariableStatement(node))
+ return false;
+ var variable = ts.singleOrUndefined(node.declarationList.declarations);
+ return variable
+ && variable.initializer
+ && ts.isIdentifier(variable.name)
+ && (ts.isClassLike(variable.initializer)
+ || (ts.isAssignmentExpression(variable.initializer)
+ && ts.isIdentifier(variable.initializer.left)
+ && ts.isClassLike(variable.initializer.right)));
+ }
+ function isTypeScriptClassWrapper(node) {
+ var call = ts.tryCast(node, ts.isCallExpression);
+ if (!call || ts.isParseTreeNode(call) ||
+ ts.some(call.typeArguments) ||
+ ts.some(call.arguments)) {
+ return false;
+ }
+ var func = ts.tryCast(ts.skipOuterExpressions(call.expression), ts.isFunctionExpression);
+ if (!func || ts.isParseTreeNode(func) ||
+ ts.some(func.typeParameters) ||
+ ts.some(func.parameters) ||
+ func.type ||
+ !func.body) {
+ return false;
+ }
+ var statements = func.body.statements;
+ if (statements.length < 2) {
+ return false;
+ }
+ var firstStatement = statements[0];
+ if (ts.isParseTreeNode(firstStatement) ||
+ !ts.isClassLike(firstStatement) &&
+ !isClassLikeVariableStatement(firstStatement)) {
+ return false;
+ }
+ var lastStatement = ts.elementAt(statements, -1);
+ var returnStatement = ts.tryCast(ts.isVariableStatement(lastStatement) ? ts.elementAt(statements, -2) : lastStatement, ts.isReturnStatement);
+ if (!returnStatement ||
+ !returnStatement.expression ||
+ !ts.isIdentifier(ts.skipOuterExpressions(returnStatement.expression))) {
+ return false;
+ }
+ return true;
+ }
function shouldVisitNode(node) {
return (node.transformFlags & 128 /* ContainsES2015 */) !== 0
|| convertedLoopState !== undefined
|| (hierarchyFacts & 4096 /* ConstructorWithCapturedSuper */ && ts.isStatement(node))
- || (ts.isIterationStatement(node, /*lookInLabeledStatements*/ false) && shouldConvertIterationStatementBody(node));
+ || (ts.isIterationStatement(node, /*lookInLabeledStatements*/ false) && shouldConvertIterationStatementBody(node))
+ || isTypeScriptClassWrapper(node);
}
function visitor(node) {
if (shouldVisitNode(node)) {
@@ -53483,10 +55500,10 @@ var ts;
statements.push(exportStatement);
}
var emitFlags = ts.getEmitFlags(node);
- if ((emitFlags & 2097152 /* HasEndOfDeclarationMarker */) === 0) {
+ if ((emitFlags & 4194304 /* HasEndOfDeclarationMarker */) === 0) {
// Add a DeclarationMarker as a marker for the end of the declaration
statements.push(ts.createEndOfDeclarationMarker(node));
- ts.setEmitFlags(statement, emitFlags | 2097152 /* HasEndOfDeclarationMarker */);
+ ts.setEmitFlags(statement, emitFlags | 4194304 /* HasEndOfDeclarationMarker */);
}
return ts.singleOrMany(statements);
}
@@ -53548,8 +55565,8 @@ var ts;
// To preserve the behavior of the old emitter, we explicitly indent
// the body of the function here if it was requested in an earlier
// transformation.
- if (ts.getEmitFlags(node) & 32768 /* Indented */) {
- ts.setEmitFlags(classFunction, 32768 /* Indented */);
+ if (ts.getEmitFlags(node) & 65536 /* Indented */) {
+ ts.setEmitFlags(classFunction, 65536 /* Indented */);
}
// "inner" and "outer" below are added purely to preserve source map locations from
// the old emitter
@@ -53578,7 +55595,7 @@ var ts;
addClassMembers(statements, node);
// Create a synthetic text range for the return statement.
var closingBraceLocation = ts.createTokenRange(ts.skipTrivia(currentText, node.members.end), 18 /* CloseBraceToken */);
- var localName = ts.getLocalName(node);
+ var localName = ts.getInternalName(node);
// The following partially-emitted expression exists purely to align our sourcemap
// emit with the original emitter.
var outer = ts.createPartiallyEmittedExpression(localName);
@@ -53622,7 +55639,7 @@ var ts;
var constructorFunction = ts.createFunctionDeclaration(
/*decorators*/ undefined,
/*modifiers*/ undefined,
- /*asteriskToken*/ undefined, ts.getDeclarationName(node),
+ /*asteriskToken*/ undefined, ts.getInternalName(node),
/*typeParameters*/ undefined, transformConstructorParameters(constructor, hasSynthesizedSuper),
/*type*/ undefined, transformConstructorBody(constructor, node, extendsClauseElement, hasSynthesizedSuper));
ts.setTextRange(constructorFunction, constructor || node);
@@ -53912,10 +55929,10 @@ var ts;
// of an initializer, we must emit that expression to preserve side effects.
if (name.elements.length > 0) {
statements.push(ts.setEmitFlags(ts.createVariableStatement(
- /*modifiers*/ undefined, ts.createVariableDeclarationList(ts.flattenDestructuringBinding(parameter, visitor, context, 0 /* All */, temp))), 524288 /* CustomPrologue */));
+ /*modifiers*/ undefined, ts.createVariableDeclarationList(ts.flattenDestructuringBinding(parameter, visitor, context, 0 /* All */, temp))), 1048576 /* CustomPrologue */));
}
else if (initializer) {
- statements.push(ts.setEmitFlags(ts.createStatement(ts.createAssignment(temp, ts.visitNode(initializer, visitor, ts.isExpression))), 524288 /* CustomPrologue */));
+ statements.push(ts.setEmitFlags(ts.createStatement(ts.createAssignment(temp, ts.visitNode(initializer, visitor, ts.isExpression))), 1048576 /* CustomPrologue */));
}
}
/**
@@ -53933,7 +55950,7 @@ var ts;
]), parameter), 1 /* SingleLine */ | 32 /* NoTrailingSourceMap */ | 384 /* NoTokenSourceMaps */));
statement.startsOnNewLine = true;
ts.setTextRange(statement, parameter);
- ts.setEmitFlags(statement, 384 /* NoTokenSourceMaps */ | 32 /* NoTrailingSourceMap */ | 524288 /* CustomPrologue */);
+ ts.setEmitFlags(statement, 384 /* NoTokenSourceMaps */ | 32 /* NoTrailingSourceMap */ | 1048576 /* CustomPrologue */);
statements.push(statement);
}
/**
@@ -53974,7 +55991,7 @@ var ts;
ts.createVariableDeclaration(declarationName,
/*type*/ undefined, ts.createArrayLiteral([]))
])),
- /*location*/ parameter), 524288 /* CustomPrologue */));
+ /*location*/ parameter), 1048576 /* CustomPrologue */));
// for (var _i = restIndex; _i < arguments.length; _i++) {
// param[_i - restIndex] = arguments[_i];
// }
@@ -53986,7 +56003,7 @@ var ts;
: ts.createSubtract(temp, ts.createLiteral(restIndex))), ts.createElementAccess(ts.createIdentifier("arguments"), temp))),
/*location*/ parameter))
]));
- ts.setEmitFlags(forStatement, 524288 /* CustomPrologue */);
+ ts.setEmitFlags(forStatement, 1048576 /* CustomPrologue */);
ts.startOnNewLine(forStatement);
statements.push(forStatement);
}
@@ -54008,7 +56025,7 @@ var ts;
ts.createVariableDeclaration("_this",
/*type*/ undefined, initializer)
]));
- ts.setEmitFlags(captureThisStatement, 1536 /* NoComments */ | 524288 /* CustomPrologue */);
+ ts.setEmitFlags(captureThisStatement, 1536 /* NoComments */ | 1048576 /* CustomPrologue */);
ts.setTextRange(captureThisStatement, originalStatement);
ts.setSourceMapRange(captureThisStatement, node);
statements.push(captureThisStatement);
@@ -54212,7 +56229,7 @@ var ts;
* @param node a FunctionExpression node.
*/
function visitFunctionExpression(node) {
- var ancestorFacts = ts.getEmitFlags(node) & 131072 /* AsyncFunctionBody */
+ var ancestorFacts = ts.getEmitFlags(node) & 262144 /* AsyncFunctionBody */
? enterSubtree(16278 /* AsyncFunctionBodyExcludes */, 69 /* AsyncFunctionBodyIncludes */)
: enterSubtree(16286 /* FunctionExcludes */, 65 /* FunctionIncludes */);
var savedConvertedLoopState = convertedLoopState;
@@ -54443,12 +56460,13 @@ var ts;
}
else {
assignment = ts.createBinary(decl.name, 58 /* EqualsToken */, ts.visitNode(decl.initializer, visitor, ts.isExpression));
+ ts.setTextRange(assignment, decl);
}
assignments = ts.append(assignments, assignment);
}
}
if (assignments) {
- updated = ts.setTextRange(ts.createStatement(ts.reduceLeft(assignments, function (acc, v) { return ts.createBinary(v, 26 /* CommaToken */, acc); })), node);
+ updated = ts.setTextRange(ts.createStatement(ts.inlineExpressions(assignments)), node);
}
else {
// none of declarations has initializer - the entire variable statement can be deleted
@@ -54471,9 +56489,9 @@ var ts;
if (node.flags & 3 /* BlockScoped */) {
enableSubstitutionsForBlockScopedBindings();
}
- var declarations = ts.flatten(ts.map(node.declarations, node.flags & 1 /* Let */
+ var declarations = ts.flatMap(node.declarations, node.flags & 1 /* Let */
? visitVariableDeclarationInLetDeclarationList
- : visitVariableDeclaration));
+ : visitVariableDeclaration);
var declarationList = ts.createVariableDeclarationList(declarations);
ts.setOriginalNode(declarationList, node);
ts.setTextRange(declarationList, node);
@@ -54566,9 +56584,9 @@ var ts;
return visitVariableDeclaration(node);
}
if (!node.initializer && shouldEmitExplicitInitializerForLetDeclaration(node)) {
- var clone_3 = ts.getMutableClone(node);
- clone_3.initializer = ts.createVoidZero();
- return clone_3;
+ var clone_2 = ts.getMutableClone(node);
+ clone_2.initializer = ts.createVoidZero();
+ return clone_2;
}
return ts.visitEachChild(node, visitor, context);
}
@@ -54736,7 +56754,7 @@ var ts;
/*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 */),
+ ]), node.expression), 2097152 /* 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)),
@@ -54761,7 +56779,7 @@ var ts;
/*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 */),
+ ]), node.expression), 2097152 /* NoHoisting */),
/*condition*/ ts.createLogicalNot(ts.createPropertyAccess(result, "done")),
/*incrementor*/ ts.createAssignment(result, next),
/*statement*/ convertForOfStatementHead(node, ts.createPropertyAccess(result, "value"), convertedLoopBodyStatements)),
@@ -54816,7 +56834,7 @@ var ts;
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 */));
+ var assignment = ts.createAssignment(temp, ts.setEmitFlags(ts.createObjectLiteral(ts.visitNodes(properties, visitor, ts.isObjectLiteralElementLike, 0, numInitialProperties), node.multiLine), 65536 /* Indented */));
if (node.multiLine) {
assignment.startsOnNewLine = true;
}
@@ -54940,7 +56958,7 @@ var ts;
loopBodyFlags |= 8 /* CapturesThis */;
}
if (isAsyncBlockContainingAwait) {
- loopBodyFlags |= 131072 /* AsyncFunctionBody */;
+ loopBodyFlags |= 262144 /* AsyncFunctionBody */;
}
var convertedLoopVariable = ts.createVariableStatement(
/*modifiers*/ undefined, ts.setEmitFlags(ts.createVariableDeclarationList([
@@ -54950,7 +56968,7 @@ var ts;
/*name*/ undefined,
/*typeParameters*/ undefined, loopParameters,
/*type*/ undefined, loopBody), loopBodyFlags))
- ]), 1048576 /* NoHoisting */));
+ ]), 2097152 /* NoHoisting */));
var statements = [convertedLoopVariable];
var extraVariableDeclarations;
// propagate state from the inner loop to the outer loop if necessary
@@ -55019,17 +57037,17 @@ var ts;
loop = convert(node, outermostLabeledStatement, convertedLoopBodyStatements);
}
else {
- var clone_4 = ts.getMutableClone(node);
+ var clone_3 = ts.getMutableClone(node);
// clean statement part
- clone_4.statement = undefined;
+ clone_3.statement = undefined;
// visit childnodes to transform initializer/condition/incrementor parts
- clone_4 = ts.visitEachChild(clone_4, visitor, context);
+ clone_3 = ts.visitEachChild(clone_3, visitor, context);
// set loop statement
- clone_4.statement = ts.createBlock(convertedLoopBodyStatements, /*multiline*/ true);
+ clone_3.statement = ts.createBlock(convertedLoopBodyStatements, /*multiline*/ true);
// reset and re-aggregate the transform flags
- clone_4.transformFlags = 0;
- ts.aggregateTransformFlags(clone_4);
- loop = ts.restoreEnclosingLabel(clone_4, outermostLabeledStatement, convertedLoopState && resetLabel);
+ clone_3.transformFlags = 0;
+ ts.aggregateTransformFlags(clone_3);
+ loop = ts.restoreEnclosingLabel(clone_3, outermostLabeledStatement, convertedLoopState && resetLabel);
}
statements.push(loop);
return statements;
@@ -55056,7 +57074,7 @@ var ts;
!state.labeledNonLocalContinues;
var call = ts.createCall(loopFunctionExpressionName, /*typeArguments*/ undefined, ts.map(parameters, function (p) { return p.name; }));
var callResult = isAsyncBlockContainingAwait
- ? ts.createYield(ts.createToken(39 /* AsteriskToken */), ts.setEmitFlags(call, 4194304 /* Iterator */))
+ ? ts.createYield(ts.createToken(39 /* AsteriskToken */), ts.setEmitFlags(call, 8388608 /* Iterator */))
: call;
if (isSimpleLoop) {
statements.push(ts.createStatement(callResult));
@@ -55276,7 +57294,20 @@ var ts;
var savedConvertedLoopState = convertedLoopState;
convertedLoopState = undefined;
var ancestorFacts = enterSubtree(16286 /* FunctionExcludes */, 65 /* FunctionIncludes */);
- var updated = ts.visitEachChild(node, visitor, context);
+ var updated;
+ if (node.transformFlags & 32768 /* ContainsCapturedLexicalThis */) {
+ var parameters = ts.visitParameterList(node.parameters, visitor, context);
+ var body = transformFunctionBody(node);
+ if (node.kind === 153 /* GetAccessor */) {
+ updated = ts.updateGetAccessor(node, node.decorators, node.modifiers, node.name, parameters, node.type, body);
+ }
+ else {
+ updated = ts.updateSetAccessor(node, node.decorators, node.modifiers, node.name, parameters, body);
+ }
+ }
+ else {
+ updated = ts.visitEachChild(node, visitor, context);
+ }
exitSubtree(ancestorFacts, 49152 /* PropagateNewTargetMask */, 0 /* None */);
convertedLoopState = savedConvertedLoopState;
return updated;
@@ -55323,12 +57354,122 @@ var ts;
* @param node a CallExpression.
*/
function visitCallExpression(node) {
+ if (isTypeScriptClassWrapper(node)) {
+ return visitTypeScriptClassWrapper(node);
+ }
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 visitTypeScriptClassWrapper(node) {
+ // This is a call to a class wrapper function (an IIFE) created by the 'ts' transformer.
+ // The wrapper has a form similar to:
+ //
+ // (function() {
+ // class C { // 1
+ // }
+ // C.x = 1; // 2
+ // return C;
+ // }())
+ //
+ // When we transform the class, we end up with something like this:
+ //
+ // (function () {
+ // var C = (function () { // 3
+ // function C() {
+ // }
+ // return C; // 4
+ // }());
+ // C.x = 1;
+ // return C;
+ // }())
+ //
+ // We want to simplify the two nested IIFEs to end up with something like this:
+ //
+ // (function () {
+ // function C() {
+ // }
+ // C.x = 1;
+ // return C;
+ // }())
+ // We skip any outer expressions in a number of places to get to the innermost
+ // expression, but we will restore them later to preserve comments and source maps.
+ var body = ts.cast(ts.skipOuterExpressions(node.expression), ts.isFunctionExpression).body;
+ // The class statements are the statements generated by visiting the first statement of the
+ // body (1), while all other statements are added to remainingStatements (2)
+ var classStatements = ts.visitNodes(body.statements, visitor, ts.isStatement, 0, 1);
+ var remainingStatements = ts.visitNodes(body.statements, visitor, ts.isStatement, 1, body.statements.length - 1);
+ var varStatement = ts.cast(ts.firstOrUndefined(classStatements), ts.isVariableStatement);
+ // We know there is only one variable declaration here as we verified this in an
+ // earlier call to isTypeScriptClassWrapper
+ var variable = varStatement.declarationList.declarations[0];
+ var initializer = ts.skipOuterExpressions(variable.initializer);
+ // Under certain conditions, the 'ts' transformer may introduce a class alias, which
+ // we see as an assignment, for example:
+ //
+ // (function () {
+ // var C = C_1 = (function () {
+ // function C() {
+ // }
+ // C.x = function () { return C_1; }
+ // return C;
+ // }());
+ // C = C_1 = __decorate([dec], C);
+ // return C;
+ // var C_1;
+ // }())
+ //
+ var aliasAssignment = ts.tryCast(initializer, ts.isAssignmentExpression);
+ // The underlying call (3) is another IIFE that may contain a '_super' argument.
+ var call = ts.cast(aliasAssignment ? ts.skipOuterExpressions(aliasAssignment.right) : initializer, ts.isCallExpression);
+ var func = ts.cast(ts.skipOuterExpressions(call.expression), ts.isFunctionExpression);
+ var funcStatements = func.body.statements;
+ var classBodyStart = 0;
+ var classBodyEnd = -1;
+ var statements = [];
+ if (aliasAssignment) {
+ // If we have a class alias assignment, we need to move it to the down-level constructor
+ // function we generated for the class.
+ var extendsCall = ts.tryCast(funcStatements[classBodyStart], ts.isExpressionStatement);
+ if (extendsCall) {
+ statements.push(extendsCall);
+ classBodyStart++;
+ }
+ // The next statement is the function declaration.
+ statements.push(funcStatements[classBodyStart]);
+ classBodyStart++;
+ // Add the class alias following the declaration.
+ statements.push(ts.createStatement(ts.createAssignment(aliasAssignment.left, ts.cast(variable.name, ts.isIdentifier))));
+ }
+ // Find the trailing 'return' statement (4)
+ while (!ts.isReturnStatement(ts.elementAt(funcStatements, classBodyEnd))) {
+ classBodyEnd--;
+ }
+ // When we extract the statements of the inner IIFE, we exclude the 'return' statement (4)
+ // as we already have one that has been introduced by the 'ts' transformer.
+ ts.addRange(statements, funcStatements, classBodyStart, classBodyEnd);
+ if (classBodyEnd < -1) {
+ // If there were any hoisted declarations following the return statement, we should
+ // append them.
+ ts.addRange(statements, funcStatements, classBodyEnd + 1);
+ }
+ // Add the remaining statements of the outer wrapper.
+ ts.addRange(statements, remainingStatements);
+ // The 'es2015' class transform may add an end-of-declaration marker. If so we will add it
+ // after the remaining statements from the 'ts' transformer.
+ ts.addRange(statements, classStatements, /*start*/ 1);
+ // Recreate any outer parentheses or partially-emitted expressions to preserve source map
+ // and comment locations.
+ return ts.recreateOuterExpressions(node.expression, ts.recreateOuterExpressions(variable.initializer, ts.recreateOuterExpressions(aliasAssignment && aliasAssignment.right, ts.updateCall(call, ts.recreateOuterExpressions(call.expression, ts.updateFunctionExpression(func,
+ /*modifiers*/ undefined,
+ /*asteriskToken*/ undefined,
+ /*name*/ undefined,
+ /*typeParameters*/ undefined, func.parameters,
+ /*type*/ undefined, ts.updateBlock(func.body, statements))),
+ /*typeArguments*/ undefined, call.arguments))));
+ }
function visitImmediateSuperCallInBody(node) {
return visitCallExpressionWithPotentialCapturedThisAssignment(node, /*assignToCapturedThis*/ false);
}
@@ -55432,7 +57573,7 @@ var ts;
else {
if (segments.length === 1) {
var firstElement = elements[0];
- return needsUniqueCopy && ts.isSpreadExpression(firstElement) && firstElement.expression.kind !== 177 /* ArrayLiteralExpression */
+ return needsUniqueCopy && ts.isSpreadElement(firstElement) && firstElement.expression.kind !== 177 /* ArrayLiteralExpression */
? ts.createArraySlice(segments[0])
: segments[0];
}
@@ -55441,7 +57582,7 @@ var ts;
}
}
function partitionSpread(node) {
- return ts.isSpreadExpression(node)
+ return ts.isSpreadElement(node)
? visitSpanOfSpreads
: visitSpanOfNonSpreads;
}
@@ -55721,7 +57862,7 @@ var ts;
function substituteIdentifier(node) {
// Only substitute the identifier if we have enabled substitutions for block-scoped
// bindings.
- if (enabledSubstitutions & 2 /* BlockScopedBindings */) {
+ if (enabledSubstitutions & 2 /* BlockScopedBindings */ && !ts.isInternalName(node)) {
var original = ts.getParseTreeNode(node, ts.isIdentifier);
if (original && isNameOfDeclarationWithCollidingName(original)) {
return ts.setTextRange(ts.getGeneratedNameForNode(original), node);
@@ -55767,14 +57908,37 @@ var ts;
* @param node An Identifier node.
*/
function substituteExpressionIdentifier(node) {
- if (enabledSubstitutions & 2 /* BlockScopedBindings */) {
+ if (enabledSubstitutions & 2 /* BlockScopedBindings */ && !ts.isInternalName(node)) {
var declaration = resolver.getReferencedDeclarationWithCollidingName(node);
- if (declaration) {
- return ts.setTextRange(ts.getGeneratedNameForNode(declaration.name), node);
+ if (declaration && !(ts.isClassLike(declaration) && isPartOfClassBody(declaration, node))) {
+ return ts.setTextRange(ts.getGeneratedNameForNode(ts.getNameOfDeclaration(declaration)), node);
}
}
return node;
}
+ function isPartOfClassBody(declaration, node) {
+ var currentNode = ts.getParseTreeNode(node);
+ if (!currentNode || currentNode === declaration || currentNode.end <= declaration.pos || currentNode.pos >= declaration.end) {
+ // if the node has no correlation to a parse tree node, its definitely not
+ // part of the body.
+ // if the node is outside of the document range of the declaration, its
+ // definitely not part of the body.
+ return false;
+ }
+ var blockScope = ts.getEnclosingBlockScopeContainer(declaration);
+ while (currentNode) {
+ if (currentNode === blockScope || currentNode === declaration) {
+ // if we are in the enclosing block scope of the declaration, we are definitely
+ // not inside the class body.
+ return false;
+ }
+ if (ts.isClassElement(currentNode) && currentNode.parent === declaration) {
+ return true;
+ }
+ currentNode = currentNode.parent;
+ }
+ return false;
+ }
/**
* Substitutes `this` when contained within an arrow function.
*
@@ -55788,8 +57952,9 @@ var ts;
return node;
}
function getClassMemberPrefix(node, member) {
- var expression = ts.getLocalName(node);
- return ts.hasModifier(member, 32 /* Static */) ? expression : ts.createPropertyAccess(expression, "prototype");
+ return ts.hasModifier(member, 32 /* Static */)
+ ? ts.getInternalName(node)
+ : ts.createPropertyAccess(ts.getInternalName(node), "prototype");
}
function hasSynthesizedDefaultSuperCall(constructor, hasExtendsClause) {
if (!constructor || !hasExtendsClause) {
@@ -56178,8 +58343,7 @@ var ts;
var withBlockStack; // A stack containing `with` blocks.
return transformSourceFile;
function transformSourceFile(node) {
- if (ts.isDeclarationFile(node)
- || (node.transformFlags & 512 /* ContainsGenerator */) === 0) {
+ if (node.isDeclarationFile || (node.transformFlags & 512 /* ContainsGenerator */) === 0) {
return node;
}
currentSourceFile = node;
@@ -56470,7 +58634,7 @@ var ts;
}
else {
// Do not hoist custom prologues.
- if (ts.getEmitFlags(node) & 524288 /* CustomPrologue */) {
+ if (ts.getEmitFlags(node) & 1048576 /* CustomPrologue */) {
return node;
}
for (var _i = 0, _a = node.declarationList.declarations; _i < _a.length; _i++) {
@@ -56481,7 +58645,7 @@ var ts;
if (variables.length === 0) {
return undefined;
}
- return ts.createStatement(ts.inlineExpressions(ts.map(variables, transformInitializedVariable)));
+ return ts.setSourceMapRange(ts.createStatement(ts.inlineExpressions(ts.map(variables, transformInitializedVariable))), node);
}
}
/**
@@ -56587,10 +58751,10 @@ var ts;
// _a = a();
// .yield resumeLabel
// _a + %sent% + c()
- 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;
+ 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;
}
return ts.visitEachChild(node, visitor, context);
}
@@ -56728,7 +58892,7 @@ var ts;
var resumeLabel = defineLabel();
var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
if (node.asteriskToken) {
- var iterator = (ts.getEmitFlags(node.expression) & 4194304 /* Iterator */) === 0
+ var iterator = (ts.getEmitFlags(node.expression) & 8388608 /* Iterator */) === 0
? ts.createValuesHelper(context, expression, /*location*/ node)
: expression;
emitYieldStar(iterator, /*location*/ node);
@@ -56851,10 +59015,10 @@ var ts;
// .yield resumeLabel
// .mark resumeLabel
// a = _a[%sent%]
- 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;
+ 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;
}
return ts.visitEachChild(node, visitor, context);
}
@@ -56993,7 +59157,7 @@ var ts;
return undefined;
}
function transformInitializedVariable(node) {
- return ts.createAssignment(ts.getSynthesizedClone(node.name), ts.visitNode(node.initializer, visitor, ts.isExpression));
+ return ts.setSourceMapRange(ts.createAssignment(ts.setSourceMapRange(ts.getSynthesizedClone(node.name), node.name), ts.visitNode(node.initializer, visitor, ts.isExpression)), node);
}
function transformAndEmitIfStatement(node) {
if (containsYield(node)) {
@@ -57544,10 +59708,10 @@ var ts;
if (declaration) {
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;
+ var clone_6 = ts.getMutableClone(name);
+ ts.setSourceMapRange(clone_6, node);
+ ts.setCommentRange(clone_6, node);
+ return clone_6;
}
}
}
@@ -58148,7 +60312,7 @@ var ts;
/*name*/ undefined,
/*typeParameters*/ undefined, [ts.createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, state)],
/*type*/ undefined, ts.createBlock(buildResult,
- /*multiLine*/ buildResult.length > 0)), 262144 /* ReuseTempVariableScope */));
+ /*multiLine*/ buildResult.length > 0)), 524288 /* ReuseTempVariableScope */));
}
/**
* Builds the statements for the generator function body.
@@ -58625,6 +60789,7 @@ var ts;
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.
+ var needUMDDynamicImportHelper;
return transformSourceFile;
/**
* Transforms the module aspects of a SourceFile.
@@ -58632,7 +60797,7 @@ var ts;
* @param node The SourceFile node.
*/
function transformSourceFile(node) {
- if (ts.isDeclarationFile(node) || !(ts.isExternalModule(node) || compilerOptions.isolatedModules)) {
+ if (node.isDeclarationFile || !(ts.isExternalModule(node) || compilerOptions.isolatedModules || node.transformFlags & 67108864 /* ContainsDynamicImport */)) {
return node;
}
currentSourceFile = node;
@@ -58643,6 +60808,7 @@ var ts;
var updated = transformModule(node);
currentSourceFile = undefined;
currentModuleInfo = undefined;
+ needUMDDynamicImportHelper = false;
return ts.aggregateTransformFlags(updated);
}
function shouldEmitUnderscoreUnderscoreESModule() {
@@ -58669,11 +60835,12 @@ var ts;
addExportEqualsIfNeeded(statements, /*emitAsReturn*/ false);
ts.addRange(statements, endLexicalEnvironment());
var updated = ts.updateSourceFileNode(node, ts.setTextRange(ts.createNodeArray(statements), node.statements));
- if (currentModuleInfo.hasExportStarsToExportValues) {
+ if (currentModuleInfo.hasExportStarsToExportValues && !compilerOptions.importHelpers) {
// If we have any `export * from ...` declarations
// we need to inform the emitter to add the __export helper.
ts.addEmitHelper(updated, exportStarHelper);
}
+ ts.addEmitHelpers(updated, context.readEmitHelpers());
return updated;
}
/**
@@ -58872,11 +61039,14 @@ var ts;
// and merge any new lexical declarations.
ts.addRange(statements, endLexicalEnvironment());
var body = ts.createBlock(statements, /*multiLine*/ true);
- if (currentModuleInfo.hasExportStarsToExportValues) {
+ if (currentModuleInfo.hasExportStarsToExportValues && !compilerOptions.importHelpers) {
// If we have any `export * from ...` declarations
// we need to inform the emitter to add the __export helper.
ts.addEmitHelper(body, exportStarHelper);
}
+ if (needUMDDynamicImportHelper) {
+ ts.addEmitHelper(body, dynamicImportUMDHelper);
+ }
return body;
}
/**
@@ -58927,16 +61097,92 @@ var ts;
return visitFunctionDeclaration(node);
case 229 /* ClassDeclaration */:
return visitClassDeclaration(node);
- case 297 /* MergeDeclarationMarker */:
+ case 299 /* MergeDeclarationMarker */:
return visitMergeDeclarationMarker(node);
- case 298 /* EndOfDeclarationMarker */:
+ case 300 /* 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;
+ return ts.visitEachChild(node, importCallExpressionVisitor, context);
+ }
+ }
+ function importCallExpressionVisitor(node) {
+ // This visitor does not need to descend into the tree if there is no dynamic import,
+ // as export/import statements are only transformed at the top level of a file.
+ if (!(node.transformFlags & 67108864 /* ContainsDynamicImport */)) {
+ return node;
+ }
+ if (ts.isImportCall(node)) {
+ return visitImportCallExpression(node);
+ }
+ else {
+ return ts.visitEachChild(node, importCallExpressionVisitor, context);
+ }
+ }
+ function visitImportCallExpression(node) {
+ switch (compilerOptions.module) {
+ case ts.ModuleKind.AMD:
+ return transformImportCallExpressionAMD(node);
+ case ts.ModuleKind.UMD:
+ return transformImportCallExpressionUMD(node);
+ case ts.ModuleKind.CommonJS:
+ default:
+ return transformImportCallExpressionCommonJS(node);
}
}
+ function transformImportCallExpressionUMD(node) {
+ // (function (factory) {
+ // ... (regular UMD)
+ // }
+ // })(function (require, exports, useSyncRequire) {
+ // "use strict";
+ // Object.defineProperty(exports, "__esModule", { value: true });
+ // var __syncRequire = typeof module === "object" && typeof module.exports === "object";
+ // var __resolved = new Promise(function (resolve) { resolve(); });
+ // .....
+ // __syncRequire
+ // ? __resolved.then(function () { return require(x); }) /*CommonJs Require*/
+ // : new Promise(function (_a, _b) { require([x], _a, _b); }); /*Amd Require*/
+ // });
+ needUMDDynamicImportHelper = true;
+ return ts.createConditional(
+ /*condition*/ ts.createIdentifier("__syncRequire"),
+ /*whenTrue*/ transformImportCallExpressionCommonJS(node),
+ /*whenFalse*/ transformImportCallExpressionAMD(node));
+ }
+ function transformImportCallExpressionAMD(node) {
+ // improt("./blah")
+ // emit as
+ // define(["require", "exports", "blah"], function (require, exports) {
+ // ...
+ // new Promise(function (_a, _b) { require([x], _a, _b); }); /*Amd Require*/
+ // });
+ var resolve = ts.createUniqueName("resolve");
+ var reject = ts.createUniqueName("reject");
+ return ts.createNew(ts.createIdentifier("Promise"),
+ /*typeArguments*/ undefined, [ts.createFunctionExpression(
+ /*modifiers*/ undefined,
+ /*asteriskToken*/ undefined,
+ /*name*/ undefined,
+ /*typeParameters*/ undefined, [ts.createParameter(/*decorator*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, /*name*/ resolve),
+ ts.createParameter(/*decorator*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, /*name*/ reject)],
+ /*type*/ undefined, ts.createBlock([ts.createStatement(ts.createCall(ts.createIdentifier("require"),
+ /*typeArguments*/ undefined, [ts.createArrayLiteral([ts.firstOrUndefined(node.arguments) || ts.createOmittedExpression()]), resolve, reject]))]))]);
+ }
+ function transformImportCallExpressionCommonJS(node) {
+ // import("./blah")
+ // emit as
+ // Promise.resolve().then(function () { return require(x); }) /*CommonJs Require*/
+ // We have to wrap require in then callback so that require is done in asynchronously
+ // if we simply do require in resolve callback in Promise constructor. We will execute the loading immediately
+ return ts.createCall(ts.createPropertyAccess(ts.createCall(ts.createPropertyAccess(ts.createIdentifier("Promise"), "resolve"), /*typeArguments*/ undefined, /*argumentsArray*/ []), "then"),
+ /*typeArguments*/ undefined, [ts.createFunctionExpression(
+ /*modifiers*/ undefined,
+ /*asteriskToken*/ undefined,
+ /*name*/ undefined,
+ /*typeParameters*/ undefined,
+ /*parameters*/ undefined,
+ /*type*/ undefined, ts.createBlock([ts.createReturn(ts.createCall(ts.createIdentifier("require"), /*typeArguments*/ undefined, node.arguments))]))]);
+ }
/**
* Visits an ImportDeclaration node.
*
@@ -59074,12 +61320,7 @@ var ts;
}
else {
// export * from "mod";
- return ts.setTextRange(ts.createStatement(ts.createCall(ts.createIdentifier("__export"),
- /*typeArguments*/ undefined, [
- moduleKind !== ts.ModuleKind.AMD
- ? createRequireCall(node)
- : generatedName
- ])), node);
+ return ts.setTextRange(ts.createStatement(createExportStarHelper(context, moduleKind !== ts.ModuleKind.AMD ? createRequireCall(node) : generatedName)), node);
}
}
/**
@@ -59113,13 +61354,13 @@ var ts;
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),
+ /*typeParameters*/ undefined, ts.visitNodes(node.parameters, importCallExpressionVisitor),
+ /*type*/ undefined, ts.visitEachChild(node.body, importCallExpressionVisitor, context)),
/*location*/ node),
/*original*/ node));
}
else {
- statements = ts.append(statements, node);
+ statements = ts.append(statements, ts.visitEachChild(node, importCallExpressionVisitor, context));
}
if (hasAssociatedEndOfDeclarationMarker(node)) {
// Defer exports until we encounter an EndOfDeclarationMarker node
@@ -59141,10 +61382,10 @@ var ts;
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));
+ /*typeParameters*/ undefined, ts.visitNodes(node.heritageClauses, importCallExpressionVisitor), node.members), node), node));
}
else {
- statements = ts.append(statements, node);
+ statements = ts.append(statements, ts.visitEachChild(node, importCallExpressionVisitor, context));
}
if (hasAssociatedEndOfDeclarationMarker(node)) {
// Defer exports until we encounter an EndOfDeclarationMarker node
@@ -59189,7 +61430,7 @@ var ts;
}
}
else {
- statements = ts.append(statements, node);
+ statements = ts.append(statements, ts.visitEachChild(node, importCallExpressionVisitor, context));
}
if (hasAssociatedEndOfDeclarationMarker(node)) {
// Defer exports until we encounter an EndOfDeclarationMarker node
@@ -59208,13 +61449,13 @@ var ts;
*/
function transformInitializedVariable(node) {
if (ts.isBindingPattern(node.name)) {
- return ts.flattenDestructuringAssignment(node,
+ return ts.flattenDestructuringAssignment(ts.visitNode(node, importCallExpressionVisitor),
/*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);
+ /*location*/ node.name), ts.visitNode(node.initializer, importCallExpressionVisitor));
}
}
/**
@@ -59243,7 +61484,7 @@ var ts;
* @param node The node to test.
*/
function hasAssociatedEndOfDeclarationMarker(node) {
- return (ts.getEmitFlags(node) & 2097152 /* HasEndOfDeclarationMarker */) !== 0;
+ return (ts.getEmitFlags(node) & 4194304 /* HasEndOfDeclarationMarker */) !== 0;
}
/**
* Visits a DeclarationMarker used as a placeholder for the end of a transformed
@@ -59431,7 +61672,7 @@ var ts;
])
]));
}
- ts.setEmitFlags(statement, 524288 /* CustomPrologue */);
+ ts.setEmitFlags(statement, 1048576 /* CustomPrologue */);
return statement;
}
/**
@@ -59687,7 +61928,19 @@ var ts;
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 }"
+ text: "\n function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n }\n "
+ };
+ function createExportStarHelper(context, module) {
+ var compilerOptions = context.getCompilerOptions();
+ return compilerOptions.importHelpers
+ ? ts.createCall(ts.getHelperName("__exportStar"), /*typeArguments*/ undefined, [module, ts.createIdentifier("exports")])
+ : ts.createCall(ts.createIdentifier("__export"), /*typeArguments*/ undefined, [module]);
+ }
+ // emit helper for dynamic import
+ var dynamicImportUMDHelper = {
+ name: "typescript:dynamicimport-sync-require",
+ scoped: true,
+ text: "\n var __syncRequire = typeof module === \"object\" && typeof module.exports === \"object\";"
};
})(ts || (ts = {}));
/// <reference path="../../factory.ts" />
@@ -59728,9 +61981,7 @@ var ts;
* @param node The SourceFile node.
*/
function transformSourceFile(node) {
- if (ts.isDeclarationFile(node)
- || !(ts.isExternalModule(node)
- || compilerOptions.isolatedModules)) {
+ if (node.isDeclarationFile || !(ts.isEffectiveExternalModule(node, compilerOptions) || node.transformFlags & 67108864 /* ContainsDynamicImport */)) {
return node;
}
var id = ts.getOriginalNodeId(node);
@@ -60161,7 +62412,7 @@ var ts;
// Elide `export=` as it is illegal in a SystemJS module.
return undefined;
}
- var expression = ts.visitNode(node.expression, destructuringVisitor, ts.isExpression);
+ var expression = ts.visitNode(node.expression, destructuringAndImportCallVisitor, ts.isExpression);
var original = node.original;
if (original && hasAssociatedEndOfDeclarationMarker(original)) {
// Defer exports until we encounter an EndOfDeclarationMarker node
@@ -60180,11 +62431,11 @@ 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), 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)));
+ /*typeParameters*/ undefined, ts.visitNodes(node.parameters, destructuringAndImportCallVisitor, ts.isParameterDeclaration),
+ /*type*/ undefined, ts.visitNode(node.body, destructuringAndImportCallVisitor, ts.isBlock)));
}
else {
- hoistedStatements = ts.append(hoistedStatements, node);
+ hoistedStatements = ts.append(hoistedStatements, ts.visitEachChild(node, destructuringAndImportCallVisitor, context));
}
if (hasAssociatedEndOfDeclarationMarker(node)) {
// Defer exports until we encounter an EndOfDeclarationMarker node
@@ -60209,7 +62460,7 @@ var ts;
// Rewrite the class declaration into an assignment of a class expression.
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)), node))), node));
+ /*typeParameters*/ undefined, ts.visitNodes(node.heritageClauses, destructuringAndImportCallVisitor, ts.isHeritageClause), ts.visitNodes(node.members, destructuringAndImportCallVisitor, ts.isClassElement)), node))), node));
if (hasAssociatedEndOfDeclarationMarker(node)) {
// Defer exports until we encounter an EndOfDeclarationMarker node
var id = ts.getOriginalNodeId(node);
@@ -60228,7 +62479,7 @@ var ts;
*/
function visitVariableStatement(node) {
if (!shouldHoistVariableDeclarationList(node.declarationList)) {
- return ts.visitNode(node, destructuringVisitor, ts.isStatement);
+ return ts.visitNode(node, destructuringAndImportCallVisitor, ts.isStatement);
}
var expressions;
var isExportedDeclaration = ts.hasModifier(node, 1 /* Export */);
@@ -60281,7 +62532,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
+ return (ts.getEmitFlags(node) & 2097152 /* NoHoisting */) === 0
&& (enclosingBlockScopedContainer.kind === 265 /* SourceFile */
|| (ts.getOriginalNode(node).flags & 3 /* BlockScoped */) === 0);
}
@@ -60294,9 +62545,9 @@ var ts;
function transformInitializedVariable(node, isExportedDeclaration) {
var createAssignment = isExportedDeclaration ? createExportedVariableAssignment : createNonExportedVariableAssignment;
return ts.isBindingPattern(node.name)
- ? ts.flattenDestructuringAssignment(node, destructuringVisitor, context, 0 /* All */,
+ ? ts.flattenDestructuringAssignment(node, destructuringAndImportCallVisitor, context, 0 /* All */,
/*needsValue*/ false, createAssignment)
- : createAssignment(node.name, ts.visitNode(node.initializer, destructuringVisitor, ts.isExpression));
+ : createAssignment(node.name, ts.visitNode(node.initializer, destructuringAndImportCallVisitor, ts.isExpression));
}
/**
* Creates an assignment expression for an exported variable declaration.
@@ -60359,7 +62610,7 @@ var ts;
* @param node The node to test.
*/
function hasAssociatedEndOfDeclarationMarker(node) {
- return (ts.getEmitFlags(node) & 2097152 /* HasEndOfDeclarationMarker */) !== 0;
+ return (ts.getEmitFlags(node) & 4194304 /* HasEndOfDeclarationMarker */) !== 0;
}
/**
* Visits a DeclarationMarker used as a placeholder for the end of a transformed
@@ -60618,12 +62869,12 @@ var ts;
return visitCatchClause(node);
case 207 /* Block */:
return visitBlock(node);
- case 297 /* MergeDeclarationMarker */:
+ case 299 /* MergeDeclarationMarker */:
return visitMergeDeclarationMarker(node);
- case 298 /* EndOfDeclarationMarker */:
+ case 300 /* EndOfDeclarationMarker */:
return visitEndOfDeclarationMarker(node);
default:
- return destructuringVisitor(node);
+ return destructuringAndImportCallVisitor(node);
}
}
/**
@@ -60634,7 +62885,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), ts.visitNode(node.incrementor, destructuringVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement));
+ node = ts.updateFor(node, visitForInitializer(node.initializer), ts.visitNode(node.condition, destructuringAndImportCallVisitor, ts.isExpression), ts.visitNode(node.incrementor, destructuringAndImportCallVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement));
enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer;
return node;
}
@@ -60646,7 +62897,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, ts.liftToBlock));
+ node = ts.updateForIn(node, visitForInitializer(node.initializer), ts.visitNode(node.expression, destructuringAndImportCallVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, ts.liftToBlock));
enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer;
return node;
}
@@ -60658,7 +62909,7 @@ var ts;
function visitForOfStatement(node) {
var savedEnclosingBlockScopedContainer = enclosingBlockScopedContainer;
enclosingBlockScopedContainer = node;
- 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));
+ node = ts.updateForOf(node, node.awaitModifier, visitForInitializer(node.initializer), ts.visitNode(node.expression, destructuringAndImportCallVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, ts.liftToBlock));
enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer;
return node;
}
@@ -60699,7 +62950,7 @@ var ts;
* @param node The node to visit.
*/
function visitDoStatement(node) {
- return ts.updateDo(node, ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, 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, destructuringAndImportCallVisitor, ts.isExpression));
}
/**
* Visits the body of a WhileStatement to hoist declarations.
@@ -60707,7 +62958,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, ts.liftToBlock));
+ return ts.updateWhile(node, ts.visitNode(node.expression, destructuringAndImportCallVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, ts.liftToBlock));
}
/**
* Visits the body of a LabeledStatement to hoist declarations.
@@ -60723,7 +62974,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, ts.liftToBlock));
+ return ts.updateWith(node, ts.visitNode(node.expression, destructuringAndImportCallVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, ts.liftToBlock));
}
/**
* Visits the body of a SwitchStatement to hoist declarations.
@@ -60731,7 +62982,7 @@ var ts;
* @param node The node to visit.
*/
function visitSwitchStatement(node) {
- return ts.updateSwitch(node, ts.visitNode(node.expression, destructuringVisitor, ts.isExpression), ts.visitNode(node.caseBlock, nestedElementVisitor, ts.isCaseBlock));
+ return ts.updateSwitch(node, ts.visitNode(node.expression, destructuringAndImportCallVisitor, ts.isExpression), ts.visitNode(node.caseBlock, nestedElementVisitor, ts.isCaseBlock));
}
/**
* Visits the body of a CaseBlock to hoist declarations.
@@ -60751,7 +63002,7 @@ var ts;
* @param node The node to visit.
*/
function visitCaseClause(node) {
- return ts.updateCaseClause(node, ts.visitNode(node.expression, destructuringVisitor, ts.isExpression), ts.visitNodes(node.statements, nestedElementVisitor, ts.isStatement));
+ return ts.updateCaseClause(node, ts.visitNode(node.expression, destructuringAndImportCallVisitor, ts.isExpression), ts.visitNodes(node.statements, nestedElementVisitor, ts.isStatement));
}
/**
* Visits the body of a DefaultClause to hoist declarations.
@@ -60801,18 +63052,35 @@ var ts;
*
* @param node The node to visit.
*/
- function destructuringVisitor(node) {
+ function destructuringAndImportCallVisitor(node) {
if (node.transformFlags & 1024 /* DestructuringAssignment */
&& node.kind === 194 /* BinaryExpression */) {
return visitDestructuringAssignment(node);
}
- else if (node.transformFlags & 2048 /* ContainsDestructuringAssignment */) {
- return ts.visitEachChild(node, destructuringVisitor, context);
+ else if (ts.isImportCall(node)) {
+ return visitImportCallExpression(node);
+ }
+ else if ((node.transformFlags & 2048 /* ContainsDestructuringAssignment */) || (node.transformFlags & 67108864 /* ContainsDynamicImport */)) {
+ return ts.visitEachChild(node, destructuringAndImportCallVisitor, context);
}
else {
return node;
}
}
+ function visitImportCallExpression(node) {
+ // import("./blah")
+ // emit as
+ // System.register([], function (_export, _context) {
+ // return {
+ // setters: [],
+ // execute: () => {
+ // _context.import('./blah');
+ // }
+ // };
+ // });
+ return ts.createCall(ts.createPropertyAccess(contextObject, ts.createIdentifier("import")),
+ /*typeArguments*/ undefined, node.arguments);
+ }
/**
* Visits a DestructuringAssignment to flatten destructuring to exported symbols.
*
@@ -60820,10 +63088,10 @@ var ts;
*/
function visitDestructuringAssignment(node) {
if (hasExportedReferenceInDestructuringTarget(node.left)) {
- return ts.flattenDestructuringAssignment(node, destructuringVisitor, context, 0 /* All */,
+ return ts.flattenDestructuringAssignment(node, destructuringAndImportCallVisitor, context, 0 /* All */,
/*needsValue*/ true);
}
- return ts.visitEachChild(node, destructuringVisitor, context);
+ return ts.visitEachChild(node, destructuringAndImportCallVisitor, context);
}
/**
* Determines whether the target of a destructuring assigment refers to an exported symbol.
@@ -60834,7 +63102,7 @@ var ts;
if (ts.isAssignmentExpression(node, /*excludeCompoundAssignment*/ true)) {
return hasExportedReferenceInDestructuringTarget(node.left);
}
- else if (ts.isSpreadExpression(node)) {
+ else if (ts.isSpreadElement(node)) {
return hasExportedReferenceInDestructuringTarget(node.expression);
}
else if (ts.isObjectLiteralExpression(node)) {
@@ -61102,7 +63370,7 @@ var ts;
var currentSourceFile;
return transformSourceFile;
function transformSourceFile(node) {
- if (ts.isDeclarationFile(node)) {
+ if (node.isDeclarationFile) {
return node;
}
if (ts.isExternalModule(node) || compilerOptions.isolatedModules) {
@@ -61201,6 +63469,7 @@ var ts;
(function (ts) {
function getModuleTransformer(moduleKind) {
switch (moduleKind) {
+ case ts.ModuleKind.ESNext:
case ts.ModuleKind.ES2015:
return ts.transformES2015Module;
case ts.ModuleKind.System:
@@ -61265,7 +63534,7 @@ var ts;
* @param allowDtsFiles A value indicating whether to allow the transformation of .d.ts files.
*/
function transformNodes(resolver, host, options, nodes, transformers, allowDtsFiles) {
- var enabledSyntaxKindFeatures = new Array(299 /* Count */);
+ var enabledSyntaxKindFeatures = new Array(301 /* Count */);
var lexicalEnvironmentVariableDeclarations;
var lexicalEnvironmentFunctionDeclarations;
var lexicalEnvironmentVariableDeclarationsStack = [];
@@ -61330,7 +63599,7 @@ var ts;
dispose: dispose
};
function transformRoot(node) {
- return node && (!ts.isSourceFile(node) || !ts.isDeclarationFile(node)) ? transformation(node) : node;
+ return node && (!ts.isSourceFile(node) || !node.isDeclarationFile) ? transformation(node) : node;
}
/**
* Enables expression substitutions in the pretty printer for the provided SyntaxKind.
@@ -61396,7 +63665,7 @@ var ts;
function hoistVariableDeclaration(name) {
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);
+ var decl = ts.setEmitFlags(ts.createVariableDeclaration(name), 64 /* NoNestedSourceMaps */);
if (!lexicalEnvironmentVariableDeclarations) {
lexicalEnvironmentVariableDeclarations = [decl];
}
@@ -61533,7 +63802,7 @@ var ts;
function createSourceMapWriter(host, writer) {
var compilerOptions = host.getCompilerOptions();
var extendedDiagnostics = compilerOptions.extendedDiagnostics;
- var currentSourceFile;
+ var currentSource;
var currentSourceText;
var sourceMapDir; // The directory in which sourcemap will be
// Current source map file and its index in the sources list
@@ -61557,6 +63826,12 @@ var ts;
getSourceMappingURL: getSourceMappingURL,
};
/**
+ * Skips trivia such as comments and white-space that can optionally overriden by the source map source
+ */
+ function skipSourceTrivia(pos) {
+ return currentSource.skipTrivia ? currentSource.skipTrivia(pos) : ts.skipTrivia(currentSourceText, pos);
+ }
+ /**
* Initialize the SourceMapWriter for a new output file.
*
* @param filePath The path to the generated output file.
@@ -61570,7 +63845,7 @@ var ts;
if (sourceMapData) {
reset();
}
- currentSourceFile = undefined;
+ currentSource = undefined;
currentSourceText = undefined;
// Current source map file and its index in the sources list
sourceMapSourceIndex = -1;
@@ -61627,7 +63902,7 @@ var ts;
if (disabled) {
return;
}
- currentSourceFile = undefined;
+ currentSource = undefined;
sourceMapDir = undefined;
sourceMapSourceIndex = undefined;
lastRecordedSourceMapSpan = undefined;
@@ -61687,7 +63962,7 @@ var ts;
if (extendedDiagnostics) {
ts.performance.mark("beforeSourcemap");
}
- var sourceLinePos = ts.getLineAndCharacterOfPosition(currentSourceFile, pos);
+ var sourceLinePos = ts.getLineAndCharacterOfPosition(currentSource, pos);
// Convert the location to be one-based.
sourceLinePos.line++;
sourceLinePos.character++;
@@ -61736,12 +64011,21 @@ var ts;
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 !== 295 /* NotEmittedStatement */
+ var range = emitNode && emitNode.sourceMapRange;
+ var _a = range || node, pos = _a.pos, end = _a.end;
+ var source = range && range.source;
+ var oldSource = currentSource;
+ if (source === oldSource)
+ source = undefined;
+ if (source)
+ setSourceFile(source);
+ if (node.kind !== 296 /* NotEmittedStatement */
&& (emitFlags & 16 /* NoLeadingSourceMap */) === 0
&& pos >= 0) {
- emitPos(ts.skipTrivia(currentSourceText, pos));
+ emitPos(skipSourceTrivia(pos));
}
+ if (source)
+ setSourceFile(oldSource);
if (emitFlags & 64 /* NoNestedSourceMaps */) {
disabled = true;
emitCallback(hint, node);
@@ -61750,11 +64034,15 @@ var ts;
else {
emitCallback(hint, node);
}
- if (node.kind !== 295 /* NotEmittedStatement */
+ if (source)
+ setSourceFile(source);
+ if (node.kind !== 296 /* NotEmittedStatement */
&& (emitFlags & 32 /* NoTrailingSourceMap */) === 0
&& end >= 0) {
emitPos(end);
}
+ if (source)
+ setSourceFile(oldSource);
}
}
/**
@@ -61772,7 +64060,7 @@ var ts;
var emitNode = node && node.emitNode;
var emitFlags = emitNode && emitNode.flags;
var range = emitNode && emitNode.tokenSourceMapRanges && emitNode.tokenSourceMapRanges[token];
- tokenPos = ts.skipTrivia(currentSourceText, range ? range.pos : tokenPos);
+ tokenPos = skipSourceTrivia(range ? range.pos : tokenPos);
if ((emitFlags & 128 /* NoTokenLeadingSourceMaps */) === 0 && tokenPos >= 0) {
emitPos(tokenPos);
}
@@ -61793,22 +64081,22 @@ var ts;
if (disabled) {
return;
}
- currentSourceFile = sourceFile;
- currentSourceText = currentSourceFile.text;
+ currentSource = sourceFile;
+ currentSourceText = currentSource.text;
// Add the file to tsFilePaths
// If sourceroot option: Use the relative path corresponding to the common directory path
// otherwise source locations relative to map file location
var sourcesDirectoryPath = compilerOptions.sourceRoot ? host.getCommonSourceDirectory() : sourceMapDir;
- var source = ts.getRelativePathToDirectoryOrUrl(sourcesDirectoryPath, currentSourceFile.fileName, host.getCurrentDirectory(), host.getCanonicalFileName,
+ var source = ts.getRelativePathToDirectoryOrUrl(sourcesDirectoryPath, currentSource.fileName, host.getCurrentDirectory(), host.getCanonicalFileName,
/*isAbsolutePathAnUrl*/ true);
sourceMapSourceIndex = ts.indexOf(sourceMapData.sourceMapSources, source);
if (sourceMapSourceIndex === -1) {
sourceMapSourceIndex = sourceMapData.sourceMapSources.length;
sourceMapData.sourceMapSources.push(source);
// The one that can be used from program to get the actual source file
- sourceMapData.inputSourceFileNames.push(currentSourceFile.fileName);
+ sourceMapData.inputSourceFileNames.push(currentSource.fileName);
if (compilerOptions.inlineSources) {
- sourceMapData.sourceMapSourcesContent.push(currentSourceFile.text);
+ sourceMapData.sourceMapSourcesContent.push(currentSource.text);
}
}
}
@@ -61925,9 +64213,11 @@ var ts;
if (extendedDiagnostics) {
ts.performance.mark("preEmitNodeWithComment");
}
- var isEmittedNode = node.kind !== 295 /* NotEmittedStatement */;
- var skipLeadingComments = pos < 0 || (emitFlags & 512 /* NoLeadingComments */) !== 0;
- var skipTrailingComments = end < 0 || (emitFlags & 1024 /* NoTrailingComments */) !== 0;
+ var isEmittedNode = node.kind !== 296 /* NotEmittedStatement */;
+ // We have to explicitly check that the node is JsxText because if the compilerOptions.jsx is "preserve" we will not do any transformation.
+ // It is expensive to walk entire tree just to set one kind of node to have no comments.
+ var skipLeadingComments = pos < 0 || (emitFlags & 512 /* NoLeadingComments */) !== 0 || node.kind === 10 /* JsxText */;
+ var skipTrailingComments = end < 0 || (emitFlags & 1024 /* NoTrailingComments */) !== 0 || node.kind === 10 /* JsxText */;
// Emit leading comments if the position is not synthesized and the node
// has not opted out from emitting leading comments.
if (!skipLeadingComments) {
@@ -62279,7 +64569,7 @@ var ts;
var errorNameNode;
var emitJsDocComments = compilerOptions.removeComments ? ts.noop : writeJsDocComments;
var emit = compilerOptions.stripInternal ? stripInternal : emitNode;
- var noDeclare;
+ var needsDeclare = true;
var moduleElementDeclarationEmitInfo = [];
var asynchronousSubModuleDeclarationEmitInfo;
// Contains the reference paths that needs to go in the declaration file.
@@ -62315,11 +64605,11 @@ var ts;
}
resultHasExternalModuleIndicator = false;
if (!isBundledEmit || !ts.isExternalModule(sourceFile)) {
- noDeclare = false;
+ needsDeclare = true;
emitSourceFile(sourceFile);
}
else if (ts.isExternalModule(sourceFile)) {
- noDeclare = true;
+ needsDeclare = false;
write("declare module \"" + ts.getResolvedExternalModuleName(host, sourceFile) + "\" {");
writeLine();
increaseIndent();
@@ -62386,7 +64676,7 @@ var ts;
var writer = ts.createTextWriter(newLine);
writer.trackSymbol = trackSymbol;
writer.reportInaccessibleThisError = reportInaccessibleThisError;
- writer.reportIllegalExtends = reportIllegalExtends;
+ writer.reportPrivateInBaseOfClassExpression = reportPrivateInBaseOfClassExpression;
writer.writeKeyword = writer.write;
writer.writeOperator = writer.write;
writer.writePunctuation = writer.write;
@@ -62494,10 +64784,10 @@ var ts;
handleSymbolAccessibilityError(resolver.isSymbolAccessible(symbol, enclosingDeclaration, meaning, /*shouldComputeAliasesToMakeVisible*/ true));
recordTypeReferenceDirectivesIfNecessary(resolver.getTypeReferenceDirectivesForSymbol(symbol, meaning));
}
- function reportIllegalExtends() {
+ function reportPrivateInBaseOfClassExpression(propertyName) {
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)));
+ emitterDiagnostics.add(ts.createDiagnosticForNode(errorNameNode, ts.Diagnostics.Property_0_of_exported_class_expression_may_not_be_private_or_protected, propertyName));
}
}
function reportInaccessibleThisError() {
@@ -62510,17 +64800,22 @@ var ts;
writer.getSymbolAccessibilityDiagnostic = getSymbolAccessibilityDiagnostic;
write(": ");
// use the checker's type, not the declared type,
- // for non-optional initialized parameters that aren't a parameter property
+ // for optional parameter properties
+ // and also for non-optional initialized parameters that aren't a parameter property
+ // these types may need to add `undefined`.
var shouldUseResolverType = declaration.kind === 146 /* Parameter */ &&
- resolver.isRequiredInitializedParameter(declaration);
+ (resolver.isRequiredInitializedParameter(declaration) ||
+ resolver.isOptionalUninitializedParameterProperty(declaration));
if (type && !shouldUseResolverType) {
// Write the type
emitType(type);
}
else {
errorNameNode = declaration.name;
- var format = 2 /* UseTypeOfFunction */ | 1024 /* UseTypeAliasValue */ |
- (shouldUseResolverType ? 4096 /* AddUndefined */ : 0);
+ var format = 4 /* UseTypeOfFunction */ |
+ 16384 /* WriteClassExpressionAsTypeLiteral */ |
+ 2048 /* UseTypeAliasValue */ |
+ (shouldUseResolverType ? 8192 /* AddUndefined */ : 0);
resolver.writeTypeOfDeclaration(declaration, enclosingDeclaration, format, writer);
errorNameNode = undefined;
}
@@ -62534,7 +64829,7 @@ var ts;
}
else {
errorNameNode = signature.name;
- resolver.writeReturnTypeOfSignatureDeclaration(signature, enclosingDeclaration, 2 /* UseTypeOfFunction */ | 1024 /* UseTypeAliasValue */, writer);
+ resolver.writeReturnTypeOfSignatureDeclaration(signature, enclosingDeclaration, 4 /* UseTypeOfFunction */ | 2048 /* UseTypeAliasValue */ | 16384 /* WriteClassExpressionAsTypeLiteral */, writer);
errorNameNode = undefined;
}
}
@@ -62743,15 +65038,14 @@ var ts;
currentIdentifiers = node.identifiers;
isCurrentFileExternalModule = ts.isExternalModule(node);
enclosingDeclaration = node;
- ts.emitDetachedComments(currentText, currentLineMap, writer, ts.writeCommentRange, node, newLine, /*removeComents*/ true);
+ ts.emitDetachedComments(currentText, currentLineMap, writer, ts.writeCommentRange, node, newLine, /*removeComments*/ true);
emitLines(node.statements);
}
- // Return a temp variable name to be used in `export default` statements.
+ // Return a temp variable name to be used in `export default`/`export class ... extends` statements.
// The temp name will be of the form _default_counter.
// Note that export default is only allowed at most once in a module, so we
// do not need to keep track of created temp names.
- function getExportDefaultTempVariableName() {
- var baseName = "_default";
+ function getExportTempVariableName(baseName) {
if (!currentIdentifiers.has(baseName)) {
return baseName;
}
@@ -62764,24 +65058,30 @@ var ts;
}
}
}
+ function emitTempVariableDeclaration(expr, baseName, diagnostic, needsDeclare) {
+ var tempVarName = getExportTempVariableName(baseName);
+ if (needsDeclare) {
+ write("declare ");
+ }
+ write("const ");
+ write(tempVarName);
+ write(": ");
+ writer.getSymbolAccessibilityDiagnostic = function () { return diagnostic; };
+ resolver.writeTypeOfExpression(expr, enclosingDeclaration, 4 /* UseTypeOfFunction */ | 2048 /* UseTypeAliasValue */ | 16384 /* WriteClassExpressionAsTypeLiteral */, writer);
+ write(";");
+ writeLine();
+ return tempVarName;
+ }
function emitExportAssignment(node) {
if (node.expression.kind === 71 /* Identifier */) {
write(node.isExportEquals ? "export = " : "export default ");
writeTextOfNode(currentText, node.expression);
}
else {
- // Expression
- var tempVarName = getExportDefaultTempVariableName();
- if (!noDeclare) {
- write("declare ");
- }
- write("var ");
- write(tempVarName);
- write(": ");
- writer.getSymbolAccessibilityDiagnostic = getDefaultExportAccessibilityDiagnostic;
- resolver.writeTypeOfExpression(node.expression, enclosingDeclaration, 2 /* UseTypeOfFunction */ | 1024 /* UseTypeAliasValue */, writer);
- write(";");
- writeLine();
+ var tempVarName = emitTempVariableDeclaration(node.expression, "_default", {
+ diagnosticMessage: ts.Diagnostics.Default_export_of_the_module_has_or_is_using_private_name_0,
+ errorNode: node
+ }, needsDeclare);
write(node.isExportEquals ? "export = " : "export default ");
write(tempVarName);
}
@@ -62793,12 +65093,6 @@ var ts;
// write each of these declarations asynchronously
writeAsynchronousModuleElements(nodes);
}
- function getDefaultExportAccessibilityDiagnostic() {
- return {
- diagnosticMessage: ts.Diagnostics.Default_export_of_the_module_has_or_is_using_private_name_0,
- errorNode: node
- };
- }
}
function isModuleElementVisible(node) {
return resolver.isDeclarationVisible(node);
@@ -62871,7 +65165,7 @@ var ts;
if (modifiers & 512 /* Default */) {
write("default ");
}
- else if (node.kind !== 230 /* InterfaceDeclaration */ && !noDeclare) {
+ else if (node.kind !== 230 /* InterfaceDeclaration */ && needsDeclare) {
write("declare ");
}
}
@@ -63108,7 +65402,7 @@ var ts;
var enumMemberValue = resolver.getConstantValue(node);
if (enumMemberValue !== undefined) {
write(" = ");
- write(enumMemberValue.toString());
+ write(ts.getTextOfConstantValue(enumMemberValue));
}
write(",");
writeLine();
@@ -63207,7 +65501,7 @@ var ts;
write(">");
}
}
- function emitHeritageClause(className, typeReferences, isImplementsList) {
+ function emitHeritageClause(typeReferences, isImplementsList) {
if (typeReferences) {
write(isImplementsList ? " implements " : " extends ");
emitCommaList(typeReferences, emitTypeOfTypeReference);
@@ -63219,12 +65513,6 @@ var ts;
else if (!isImplementsList && node.expression.kind === 95 /* NullKeyword */) {
write("null");
}
- 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
@@ -63241,7 +65529,7 @@ var ts;
return {
diagnosticMessage: diagnosticMessage,
errorNode: node,
- typeName: node.parent.parent.name
+ typeName: ts.getNameOfDeclaration(node.parent.parent)
};
}
}
@@ -63256,6 +65544,19 @@ var ts;
});
}
}
+ var prevEnclosingDeclaration = enclosingDeclaration;
+ enclosingDeclaration = node;
+ var baseTypeNode = ts.getClassExtendsHeritageClauseElement(node);
+ var tempVarName;
+ if (baseTypeNode && !ts.isEntityNameExpression(baseTypeNode.expression)) {
+ tempVarName = baseTypeNode.expression.kind === 95 /* NullKeyword */ ?
+ "null" :
+ emitTempVariableDeclaration(baseTypeNode.expression, node.name.text + "_base", {
+ diagnosticMessage: ts.Diagnostics.extends_clause_of_exported_class_0_has_or_is_using_private_name_1,
+ errorNode: baseTypeNode,
+ typeName: node.name
+ }, !ts.findAncestor(node, function (n) { return n.kind === 233 /* ModuleDeclaration */; }));
+ }
emitJsDocComments(node);
emitModuleElementDeclarationFlags(node);
if (ts.hasModifier(node, 128 /* Abstract */)) {
@@ -63263,15 +65564,22 @@ var ts;
}
write("class ");
writeTextOfNode(currentText, node.name);
- var prevEnclosingDeclaration = enclosingDeclaration;
- enclosingDeclaration = node;
emitTypeParameters(node.typeParameters);
- var baseTypeNode = ts.getClassExtendsHeritageClauseElement(node);
if (baseTypeNode) {
- node.name;
- emitHeritageClause(node.name, [baseTypeNode], /*isImplementsList*/ false);
+ if (!ts.isEntityNameExpression(baseTypeNode.expression)) {
+ write(" extends ");
+ write(tempVarName);
+ if (baseTypeNode.typeArguments) {
+ write("<");
+ emitCommaList(baseTypeNode.typeArguments, emitType);
+ write(">");
+ }
+ }
+ else {
+ emitHeritageClause([baseTypeNode], /*isImplementsList*/ false);
+ }
}
- emitHeritageClause(node.name, ts.getClassImplementsHeritageClauseElements(node), /*isImplementsList*/ true);
+ emitHeritageClause(ts.getClassImplementsHeritageClauseElements(node), /*isImplementsList*/ true);
write(" {");
writeLine();
increaseIndent();
@@ -63292,7 +65600,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(node.name, interfaceExtendsTypes, /*isImplementsList*/ false);
+ emitHeritageClause(interfaceExtendsTypes, /*isImplementsList*/ false);
}
write(" {");
writeLine();
@@ -63351,7 +65659,8 @@ var ts;
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 === 149 /* PropertyDeclaration */ || node.kind === 148 /* PropertySignature */) {
+ else if (node.kind === 149 /* PropertyDeclaration */ || node.kind === 148 /* PropertySignature */ ||
+ (node.kind === 146 /* Parameter */ && ts.hasModifier(node.parent, 8 /* Private */))) {
// TODO(jfreeman): Deal with computed properties in error reporting.
if (ts.hasModifier(node, 32 /* Static */)) {
return symbolAccessibilityResult.errorModuleName ?
@@ -63360,7 +65669,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 === 229 /* ClassDeclaration */) {
+ else if (node.parent.kind === 229 /* ClassDeclaration */ || node.kind === 146 /* Parameter */) {
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 :
@@ -63570,6 +65879,11 @@ var ts;
write("[");
}
else {
+ if (node.kind === 152 /* Constructor */ && ts.hasModifier(node, 8 /* Private */)) {
+ write("();");
+ writeLine();
+ return;
+ }
// Construct signature or constructor type write new Signature
if (node.kind === 156 /* ConstructSignature */ || node.kind === 161 /* ConstructorType */) {
write("new ");
@@ -63876,7 +66190,7 @@ var ts;
function writeReferencePath(referencedFile, addBundledFileReference, emitOnlyDtsFiles) {
var declFileName;
var addedBundledEmitReference = false;
- if (ts.isDeclarationFile(referencedFile)) {
+ if (referencedFile.isDeclarationFile) {
// Declaration file, use declaration file name
declFileName = referencedFile.fileName;
}
@@ -64060,7 +66374,7 @@ var ts;
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 shouldSkip = compilerOptions.noEmitHelpers || ts.getExternalHelpersModuleName(sourceFile) !== undefined;
var shouldBundle = ts.isSourceFile(currentNode) && !isOwnFileEmit;
var helpers = ts.getEmitHelpers(currentNode);
if (helpers) {
@@ -64097,7 +66411,7 @@ var ts;
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 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, onBeforeEmitToken = handlers.onBeforeEmitToken, onAfterEmitToken = handlers.onAfterEmitToken;
var newLine = ts.getNewLineCharacter(printerOptions);
var comments = ts.createCommentWriter(printerOptions, onEmitSourceMapOfPosition);
var emitNodeWithComments = comments.emitNodeWithComments, emitBodyWithDetachedComments = comments.emitBodyWithDetachedComments, emitTrailingCommentsOfPosition = comments.emitTrailingCommentsOfPosition, emitLeadingCommentsOfPosition = comments.emitLeadingCommentsOfPosition;
@@ -64185,7 +66499,9 @@ var ts;
return text;
}
function print(hint, node, sourceFile) {
- setSourceFile(sourceFile);
+ if (sourceFile) {
+ setSourceFile(sourceFile);
+ }
pipelineEmitWithNotification(hint, node);
}
function setSourceFile(sourceFile) {
@@ -64264,7 +66580,7 @@ var ts;
// Strict mode reserved words
// Contextual keywords
if (ts.isKeyword(kind)) {
- writeTokenText(kind);
+ writeTokenNode(node);
return;
}
switch (kind) {
@@ -64416,6 +66732,8 @@ var ts;
return emitModuleBlock(node);
case 235 /* CaseBlock */:
return emitCaseBlock(node);
+ case 236 /* NamespaceExportDeclaration */:
+ return emitNamespaceExportDeclaration(node);
case 237 /* ImportEqualsDeclaration */:
return emitImportEqualsDeclaration(node);
case 238 /* ImportDeclaration */:
@@ -64482,7 +66800,7 @@ var ts;
return pipelineEmitExpression(trySubstituteNode(1 /* Expression */, node));
}
if (ts.isToken(node)) {
- writeTokenText(kind);
+ writeTokenNode(node);
return;
}
}
@@ -64505,7 +66823,8 @@ var ts;
case 97 /* SuperKeyword */:
case 101 /* TrueKeyword */:
case 99 /* ThisKeyword */:
- writeTokenText(kind);
+ case 91 /* ImportKeyword */:
+ writeTokenNode(node);
return;
// Expressions
case 177 /* ArrayLiteralExpression */:
@@ -64568,8 +66887,10 @@ var ts;
case 250 /* JsxSelfClosingElement */:
return emitJsxSelfClosingElement(node);
// Transformation nodes
- case 296 /* PartiallyEmittedExpression */:
+ case 297 /* PartiallyEmittedExpression */:
return emitPartiallyEmittedExpression(node);
+ case 298 /* CommaListExpression */:
+ return emitCommaList(node);
}
}
function trySubstituteNode(hint, node) {
@@ -64608,6 +66929,7 @@ var ts;
//
function emitIdentifier(node) {
write(getTextOfNode(node, /*includeTrivia*/ false));
+ emitTypeArguments(node, node.typeArguments);
}
//
// Names
@@ -64636,6 +66958,7 @@ var ts;
function emitTypeParameter(node) {
emit(node.name);
emitWithPrefix(" extends ", node.constraint);
+ emitWithPrefix(" = ", node.default);
}
function emitParameter(node) {
emitDecorators(node, node.decorators);
@@ -64665,6 +66988,7 @@ var ts;
emitDecorators(node, node.decorators);
emitModifiers(node, node.modifiers);
emit(node.name);
+ writeIfPresent(node.questionToken, "?");
emitWithPrefix(": ", node.type);
emitExpressionWithPrefix(" = ", node.initializer);
write(";");
@@ -64684,6 +67008,7 @@ var ts;
emitModifiers(node, node.modifiers);
writeIfPresent(node.asteriskToken, "*");
emit(node.name);
+ writeIfPresent(node.questionToken, "?");
emitSignatureAndBody(node, emitSignatureHead);
}
function emitConstructor(node) {
@@ -64746,7 +67071,7 @@ var ts;
function emitConstructorType(node) {
write("new ");
emitTypeParameters(node, node.typeParameters);
- emitParametersForArrow(node, node.parameters);
+ emitParameters(node, node.parameters);
write(" => ");
emit(node.type);
}
@@ -64756,7 +67081,10 @@ var ts;
}
function emitTypeLiteral(node) {
write("{");
- emitList(node, node.members, 65 /* TypeLiteralMembers */);
+ // If the literal is empty, do not add spaces between braces.
+ if (node.members.length > 0) {
+ emitList(node, node.members, ts.getEmitFlags(node) & 1 /* SingleLine */ ? 448 /* SingleLineTypeLiteralMembers */ : 65 /* MultiLineTypeLiteralMembers */);
+ }
write("}");
}
function emitArrayType(node) {
@@ -64794,9 +67122,15 @@ var ts;
write("]");
}
function emitMappedType(node) {
+ var emitFlags = ts.getEmitFlags(node);
write("{");
- writeLine();
- increaseIndent();
+ if (emitFlags & 1 /* SingleLine */) {
+ write(" ");
+ }
+ else {
+ writeLine();
+ increaseIndent();
+ }
writeIfPresent(node.readonlyToken, "readonly ");
write("[");
emit(node.typeParameter.name);
@@ -64807,8 +67141,13 @@ var ts;
write(": ");
emit(node.type);
write(";");
- writeLine();
- decreaseIndent();
+ if (emitFlags & 1 /* SingleLine */) {
+ write(" ");
+ }
+ else {
+ writeLine();
+ decreaseIndent();
+ }
write("}");
}
function emitLiteralType(node) {
@@ -64864,7 +67203,7 @@ var ts;
write("{}");
}
else {
- var indentedFlag = ts.getEmitFlags(node) & 32768 /* Indented */;
+ var indentedFlag = ts.getEmitFlags(node) & 65536 /* Indented */;
if (indentedFlag) {
increaseIndent();
}
@@ -64879,7 +67218,7 @@ var ts;
function emitPropertyAccessExpression(node) {
var indentBeforeDot = false;
var indentAfterDot = false;
- if (!(ts.getEmitFlags(node) & 65536 /* NoIndentation */)) {
+ if (!(ts.getEmitFlags(node) & 131072 /* NoIndentation */)) {
var dotRangeStart = node.expression.end;
var dotRangeEnd = ts.skipTrivia(currentSourceFile.text, node.expression.end) + 1;
var dotToken = { kind: 23 /* DotToken */, pos: dotRangeStart, end: dotRangeEnd };
@@ -64908,7 +67247,7 @@ var ts;
// check if constant enum value is integer
var constantValue = ts.getConstantValue(expression);
// isFinite handles cases when constantValue is undefined
- return isFinite(constantValue)
+ return typeof constantValue === "number" && isFinite(constantValue)
&& Math.floor(constantValue) === constantValue
&& printerOptions.removeComments;
}
@@ -65011,7 +67350,7 @@ var ts;
var indentAfterOperator = needsIndentation(node, node.operatorToken, node.right);
emitExpression(node.left);
increaseIndentIf(indentBeforeOperator, isCommaOperator ? " " : undefined);
- writeTokenText(node.operatorToken.kind);
+ writeTokenNode(node.operatorToken);
increaseIndentIf(indentAfterOperator, " ");
emitExpression(node.right);
decreaseIndentIf(indentBeforeOperator, indentAfterOperator);
@@ -65281,11 +67620,11 @@ var ts;
var body = node.body;
if (body) {
if (ts.isBlock(body)) {
- var indentedFlag = ts.getEmitFlags(node) & 32768 /* Indented */;
+ var indentedFlag = ts.getEmitFlags(node) & 65536 /* Indented */;
if (indentedFlag) {
increaseIndent();
}
- if (ts.getEmitFlags(node) & 262144 /* ReuseTempVariableScope */) {
+ if (ts.getEmitFlags(node) & 524288 /* ReuseTempVariableScope */) {
emitSignatureHead(node);
if (onEmitNode) {
onEmitNode(3 /* Unspecified */, body, emitBlockCallback);
@@ -65395,7 +67734,7 @@ var ts;
emitModifiers(node, node.modifiers);
write("class");
emitNodeWithPrefix(" ", node.name, emitIdentifierName);
- var indentedFlag = ts.getEmitFlags(node) & 32768 /* Indented */;
+ var indentedFlag = ts.getEmitFlags(node) & 65536 /* Indented */;
if (indentedFlag) {
increaseIndent();
}
@@ -65533,6 +67872,11 @@ var ts;
}
write(";");
}
+ function emitNamespaceExportDeclaration(node) {
+ write("export as namespace ");
+ emit(node.name);
+ write(";");
+ }
function emitNamedExports(node) {
emitNamedImportsOrExports(node);
}
@@ -65645,6 +67989,21 @@ var ts;
ts.nodeIsSynthesized(parentNode) ||
ts.nodeIsSynthesized(statements[0]) ||
ts.rangeStartPositionsAreOnSameLine(parentNode, statements[0], currentSourceFile));
+ // e.g:
+ // case 0: // Zero
+ // case 1: // One
+ // case 2: // two
+ // return "hi";
+ // If there is no statements, emitNodeWithComments of the parentNode which is caseClause will take care of trailing comment.
+ // So in example above, comment "// Zero" and "// One" will be emit in emitTrailingComments in emitNodeWithComments.
+ // However, for "case 2", because parentNode which is caseClause has an "end" property to be end of the statements (in this case return statement)
+ // comment "// two" will not be emitted in emitNodeWithComments.
+ // Therefore, we have to do the check here to emit such comment.
+ if (statements.length > 0) {
+ // We use emitTrailingCommentsOfPosition instead of emitLeadingCommentsOfPosition because leading comments is defined as comments before the node after newline character separating it from previous line
+ // Note: we can't use parentNode.end as such position includes statements.
+ emitTrailingCommentsOfPosition(statements.pos);
+ }
if (emitAsSingleStatement) {
write(" ");
emit(statements[0]);
@@ -65739,6 +68098,9 @@ var ts;
function emitPartiallyEmittedExpression(node) {
emitExpression(node.expression);
}
+ function emitCommaList(node) {
+ emitExpressionList(node, node.elements, 272 /* CommaListElements */);
+ }
/**
* Emits any prologue directives at the start of a Statement list, returning the
* number of prologue directives written to the output.
@@ -65803,7 +68165,7 @@ var ts;
//
function emitModifiers(node, modifiers) {
if (modifiers && modifiers.length) {
- emitList(node, modifiers, 256 /* Modifiers */);
+ emitList(node, modifiers, 131328 /* Modifiers */);
write(" ");
}
}
@@ -65849,11 +68211,24 @@ var ts;
function emitParameters(parentNode, parameters) {
emitList(parentNode, parameters, 1360 /* Parameters */);
}
+ function canEmitSimpleArrowHead(parentNode, parameters) {
+ var parameter = ts.singleOrUndefined(parameters);
+ return parameter
+ && parameter.pos === parentNode.pos // may not have parsed tokens between parent and parameter
+ && !(ts.isArrowFunction(parentNode) && parentNode.type) // arrow function may not have return type annotation
+ && !ts.some(parentNode.decorators) // parent may not have decorators
+ && !ts.some(parentNode.modifiers) // parent may not have modifiers
+ && !ts.some(parentNode.typeParameters) // parent may not have type parameters
+ && !ts.some(parameter.decorators) // parameter may not have decorators
+ && !ts.some(parameter.modifiers) // parameter may not have modifiers
+ && !parameter.dotDotDotToken // parameter may not be rest
+ && !parameter.questionToken // parameter may not be optional
+ && !parameter.type // parameter may not have a type annotation
+ && !parameter.initializer // parameter may not have an initializer
+ && ts.isIdentifier(parameter.name); // parameter name must be identifier
+ }
function emitParametersForArrow(parentNode, parameters) {
- if (parameters &&
- parameters.length === 1 &&
- parameters[0].type === undefined &&
- parameters[0].pos === parentNode.pos) {
+ if (canEmitSimpleArrowHead(parentNode, parameters)) {
emit(parameters[0]);
}
else {
@@ -66020,6 +68395,15 @@ var ts;
? onEmitSourceMapOfToken(contextNode, token, pos, writeTokenText)
: writeTokenText(token, pos);
}
+ function writeTokenNode(node) {
+ if (onBeforeEmitToken) {
+ onBeforeEmitToken(node);
+ }
+ writeTokenText(node.kind);
+ if (onAfterEmitToken) {
+ onAfterEmitToken(node);
+ }
+ }
function writeTokenText(token, pos) {
var tokenString = ts.tokenToString(token);
write(tokenString);
@@ -66202,7 +68586,9 @@ var ts;
if (node.kind === 9 /* StringLiteral */ && node.textSourceNode) {
var textSourceNode = node.textSourceNode;
if (ts.isIdentifier(textSourceNode)) {
- return "\"" + ts.escapeNonAsciiCharacters(ts.escapeString(getTextOfNode(textSourceNode))) + "\"";
+ return ts.getEmitFlags(node) & 16777216 /* NoAsciiEscaping */ ?
+ "\"" + ts.escapeString(getTextOfNode(textSourceNode)) + "\"" :
+ "\"" + ts.escapeNonAsciiString(getTextOfNode(textSourceNode)) + "\"";
}
else {
return getLiteralTextOfNode(textSourceNode);
@@ -66480,9 +68866,10 @@ var ts;
ListFormat[ListFormat["NoTrailingNewLine"] = 65536] = "NoTrailingNewLine";
ListFormat[ListFormat["NoInterveningComments"] = 131072] = "NoInterveningComments";
// Precomputed Formats
- ListFormat[ListFormat["Modifiers"] = 256] = "Modifiers";
+ ListFormat[ListFormat["Modifiers"] = 131328] = "Modifiers";
ListFormat[ListFormat["HeritageClauses"] = 256] = "HeritageClauses";
- ListFormat[ListFormat["TypeLiteralMembers"] = 65] = "TypeLiteralMembers";
+ ListFormat[ListFormat["SingleLineTypeLiteralMembers"] = 448] = "SingleLineTypeLiteralMembers";
+ ListFormat[ListFormat["MultiLineTypeLiteralMembers"] = 65] = "MultiLineTypeLiteralMembers";
ListFormat[ListFormat["TupleTypeElements"] = 336] = "TupleTypeElements";
ListFormat[ListFormat["UnionTypeConstituents"] = 260] = "UnionTypeConstituents";
ListFormat[ListFormat["IntersectionTypeConstituents"] = 264] = "IntersectionTypeConstituents";
@@ -66490,6 +68877,7 @@ var ts;
ListFormat[ListFormat["ArrayBindingPatternElements"] = 304] = "ArrayBindingPatternElements";
ListFormat[ListFormat["ObjectLiteralExpressionProperties"] = 978] = "ObjectLiteralExpressionProperties";
ListFormat[ListFormat["ArrayLiteralExpressionElements"] = 4466] = "ArrayLiteralExpressionElements";
+ ListFormat[ListFormat["CommaListElements"] = 272] = "CommaListElements";
ListFormat[ListFormat["CallExpressionArguments"] = 1296] = "CallExpressionArguments";
ListFormat[ListFormat["NewExpressionArguments"] = 9488] = "NewExpressionArguments";
ListFormat[ListFormat["TemplateExpressionSpans"] = 131072] = "TemplateExpressionSpans";
@@ -66716,6 +69104,90 @@ var ts;
return output;
}
ts.formatDiagnostics = formatDiagnostics;
+ var redForegroundEscapeSequence = "\u001b[91m";
+ var yellowForegroundEscapeSequence = "\u001b[93m";
+ var blueForegroundEscapeSequence = "\u001b[93m";
+ var gutterStyleSequence = "\u001b[100;30m";
+ var gutterSeparator = " ";
+ var resetEscapeSequence = "\u001b[0m";
+ var ellipsis = "...";
+ 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 padLeft(s, length) {
+ while (s.length < length) {
+ s = " " + s;
+ }
+ return s;
+ }
+ function formatDiagnosticsWithColorAndContext(diagnostics, host) {
+ var output = "";
+ for (var _i = 0, diagnostics_2 = diagnostics; _i < diagnostics_2.length; _i++) {
+ var diagnostic = diagnostics_2[_i];
+ if (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_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;
+ var gutterWidth = (lastLine + 1 + "").length;
+ if (hasMoreThanFiveLines) {
+ gutterWidth = Math.max(ellipsis.length, gutterWidth);
+ }
+ output += ts.sys.newLine;
+ for (var i = firstLine; i <= lastLine; i++) {
+ // If the error spans over 5 lines, we'll only show the first 2 and last 2 lines,
+ // so we'll skip ahead to the second-to-last line.
+ if (hasMoreThanFiveLines && firstLine + 1 < i && i < lastLine - 1) {
+ output += formatAndReset(padLeft(ellipsis, gutterWidth), gutterStyleSequence) + gutterSeparator + ts.sys.newLine;
+ i = lastLine - 1;
+ }
+ var lineStart = ts.getPositionOfLineAndCharacter(file, i, 0);
+ var lineEnd = i < lastLineInFile ? ts.getPositionOfLineAndCharacter(file, i + 1, 0) : file.text.length;
+ var lineContent = file.text.slice(lineStart, lineEnd);
+ lineContent = lineContent.replace(/\s+$/g, ""); // trim from end
+ lineContent = lineContent.replace("\t", " "); // convert tabs to single spaces
+ // Output the gutter and the actual contents of the line.
+ output += formatAndReset(padLeft(i + 1 + "", gutterWidth), gutterStyleSequence) + gutterSeparator;
+ output += lineContent + ts.sys.newLine;
+ // Output the gutter and the error span for the line using tildes.
+ output += formatAndReset(padLeft("", gutterWidth), gutterStyleSequence) + gutterSeparator;
+ output += redForegroundEscapeSequence;
+ if (i === firstLine) {
+ // If we're on the last line, then limit it to the last character of the last line.
+ // Otherwise, we'll just squiggle the rest of the line, giving 'slice' no end position.
+ var lastCharForLine = i === lastLine ? lastLineChar : undefined;
+ output += lineContent.slice(0, firstLineChar).replace(/\S/g, " ");
+ output += lineContent.slice(firstLineChar, lastCharForLine).replace(/./g, "~");
+ }
+ else if (i === lastLine) {
+ output += lineContent.slice(0, lastLineChar).replace(/./g, "~");
+ }
+ else {
+ // Squiggle the entire line.
+ output += lineContent.replace(/./g, "~");
+ }
+ output += resetEscapeSequence;
+ output += ts.sys.newLine;
+ }
+ output += ts.sys.newLine;
+ output += relativeFileName + "(" + (firstLine + 1) + "," + (firstLineChar + 1) + "): ";
+ }
+ var categoryColor = getCategoryFormat(diagnostic.category);
+ var category = ts.DiagnosticCategory[diagnostic.category].toLowerCase();
+ output += formatAndReset(category, categoryColor) + " TS" + diagnostic.code + ": " + flattenDiagnosticMessageText(diagnostic.messageText, ts.sys.newLine);
+ }
+ return output;
+ }
+ ts.formatDiagnosticsWithColorAndContext = formatDiagnosticsWithColorAndContext;
function flattenDiagnosticMessageText(messageText, newLine) {
if (typeof messageText === "string") {
return messageText;
@@ -66758,6 +69230,19 @@ var ts;
}
return resolutions;
}
+ /**
+ * Create a new 'Program' instance. A Program is an immutable collection of 'SourceFile's and a 'CompilerOptions'
+ * that represent a compilation unit.
+ *
+ * Creating a program proceeds from a set of root files, expanding the set of inputs by following imports and
+ * triple-slash-reference-path directives transitively. '@types' and triple-slash-reference-types are also pulled in.
+ *
+ * @param rootNames - A set of root files.
+ * @param options - The compiler options which should be used.
+ * @param host - The host interacts with the underlying file system.
+ * @param oldProgram - Reuses an old program structure.
+ * @returns A 'Program' object.
+ */
function createProgram(rootNames, options, host, oldProgram) {
var program;
var files = [];
@@ -66765,6 +69250,7 @@ var ts;
var diagnosticsProducingTypeChecker;
var noDiagnosticsTypeChecker;
var classifiableNames;
+ var modifiedFilePaths;
var cachedSemanticDiagnosticsForFile = {};
var cachedDeclarationDiagnosticsForFile = {};
var resolvedTypeReferenceDirectives = ts.createMap();
@@ -66821,7 +69307,8 @@ var ts;
// stores 'filename -> file association' ignoring case
// used to track cases when two file names differ only in casing
var filesByNameIgnoreCase = host.useCaseSensitiveFileNames() ? ts.createFileMap(function (fileName) { return fileName.toLowerCase(); }) : undefined;
- if (!tryReuseStructureFromOldProgram()) {
+ var structuralIsReused = tryReuseStructureFromOldProgram();
+ if (structuralIsReused !== 2 /* Completely */) {
ts.forEach(rootNames, function (name) { return processRootFile(name, /*isDefaultLib*/ false); });
// load type declarations specified via 'types' argument or implicitly from types/ and node_modules/@types folders
var typeReferences = ts.getAutomaticTypeDirectiveNames(options, host);
@@ -66880,7 +69367,8 @@ var ts;
getFileProcessingDiagnostics: function () { return fileProcessingDiagnostics; },
getResolvedTypeReferenceDirectives: function () { return resolvedTypeReferenceDirectives; },
isSourceFileFromExternalLibrary: isSourceFileFromExternalLibrary,
- dropDiagnosticsProducingTypeChecker: dropDiagnosticsProducingTypeChecker
+ dropDiagnosticsProducingTypeChecker: dropDiagnosticsProducingTypeChecker,
+ getSourceFileFromReference: getSourceFileFromReference,
};
verifyCompilerOptions();
ts.performance.mark("afterProgram");
@@ -66918,76 +69406,100 @@ var ts;
return classifiableNames;
}
function resolveModuleNamesReusingOldState(moduleNames, containingFile, file, oldProgramState) {
- if (!oldProgramState && !file.ambientModuleNames.length) {
- // if old program state is not supplied and file does not contain locally defined ambient modules
- // then the best we can do is fallback to the default logic
+ if (structuralIsReused === 0 /* Not */ && !file.ambientModuleNames.length) {
+ // If the old program state does not permit reusing resolutions and `file` does not contain locally defined ambient modules,
+ // the best we can do is fallback to the default logic.
return resolveModuleNamesWorker(moduleNames, containingFile);
}
- // at this point we know that either
+ var oldSourceFile = oldProgramState.program && oldProgramState.program.getSourceFile(containingFile);
+ if (oldSourceFile !== file && file.resolvedModules) {
+ // `file` was created for the new program.
+ //
+ // We only set `file.resolvedModules` via work from the current function,
+ // so it is defined iff we already called the current function on `file`.
+ // That call happened no later than the creation of the `file` object,
+ // which per above occured during the current program creation.
+ // Since we assume the filesystem does not change during program creation,
+ // it is safe to reuse resolutions from the earlier call.
+ var result_4 = [];
+ for (var _i = 0, moduleNames_1 = moduleNames; _i < moduleNames_1.length; _i++) {
+ var moduleName = moduleNames_1[_i];
+ var resolvedModule = file.resolvedModules.get(moduleName);
+ result_4.push(resolvedModule);
+ }
+ return result_4;
+ }
+ // At this point, we know at least one of the following hold:
// - file has local declarations for ambient modules
- // OR
// - old program state is available
- // OR
- // - both of items above
- // With this it is possible that we can tell how some module names from the initial list will be resolved
- // without doing actual resolution (in particular if some name was resolved to ambient module).
- // Such names should be excluded from the list of module names that will be provided to `resolveModuleNamesWorker`
- // since we don't want to resolve them again.
- // this is a list of modules for which we cannot predict resolution so they should be actually resolved
+ // With this information, we can infer some module resolutions without performing resolution.
+ /** An ordered list of module names for which we cannot recover the resolution. */
var unknownModuleNames;
- // this is a list of combined results assembles from predicted and resolved results.
- // Order in this list matches the order in the original list of module names `moduleNames` which is important
- // so later we can split results to resolutions of modules and resolutions of module augmentations.
+ /**
+ * The indexing of elements in this list matches that of `moduleNames`.
+ *
+ * Before combining results, result[i] is in one of the following states:
+ * * undefined: needs to be recomputed,
+ * * predictedToResolveToAmbientModuleMarker: known to be an ambient module.
+ * Needs to be reset to undefined before returning,
+ * * ResolvedModuleFull instance: can be reused.
+ */
var result;
- // a transient placeholder that is used to mark predicted resolution in the result list
+ /** A transient placeholder used to mark predicted resolution in the result list. */
var predictedToResolveToAmbientModuleMarker = {};
for (var i = 0; i < moduleNames.length; i++) {
var moduleName = moduleNames[i];
- // module name is known to be resolved to ambient module if
- // - module name is contained in the list of ambient modules that are locally declared in the file
- // - in the old program module name was resolved to ambient module whose declaration is in non-modified file
+ // If we want to reuse resolutions more aggressively, we can refine this to check for whether the
+ // text of the corresponding modulenames has changed.
+ if (file === oldSourceFile) {
+ var oldResolvedModule = oldSourceFile && oldSourceFile.resolvedModules.get(moduleName);
+ if (oldResolvedModule) {
+ if (ts.isTraceEnabled(options, host)) {
+ ts.trace(host, ts.Diagnostics.Reusing_resolution_of_module_0_to_file_1_from_old_program, moduleName, containingFile);
+ }
+ (result || (result = new Array(moduleNames.length)))[i] = oldResolvedModule;
+ continue;
+ }
+ }
+ // We know moduleName resolves to an ambient module provided that moduleName:
+ // - is in the list of ambient modules locally declared in the current source file.
+ // - resolved to an ambient module in the old program whose declaration is in an unmodified file
// (so the same module declaration will land in the new program)
- var isKnownToResolveToAmbientModule = false;
+ var resolvesToAmbientModuleInNonModifiedFile = false;
if (ts.contains(file.ambientModuleNames, moduleName)) {
- isKnownToResolveToAmbientModule = true;
+ resolvesToAmbientModuleInNonModifiedFile = true;
if (ts.isTraceEnabled(options, host)) {
ts.trace(host, ts.Diagnostics.Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1, moduleName, containingFile);
}
}
else {
- isKnownToResolveToAmbientModule = checkModuleNameResolvedToAmbientModuleInNonModifiedFile(moduleName, oldProgramState);
+ resolvesToAmbientModuleInNonModifiedFile = moduleNameResolvesToAmbientModuleInNonModifiedFile(moduleName, oldProgramState);
}
- if (isKnownToResolveToAmbientModule) {
- if (!unknownModuleNames) {
- // found a first module name for which result can be prediced
- // this means that this module name should not be passed to `resolveModuleNamesWorker`.
- // We'll use a separate list for module names that are definitely unknown.
- result = new Array(moduleNames.length);
- // copy all module names that appear before the current one in the list
- // since they are known to be unknown
- unknownModuleNames = moduleNames.slice(0, i);
- }
- // mark prediced resolution in the result list
- result[i] = predictedToResolveToAmbientModuleMarker;
+ if (resolvesToAmbientModuleInNonModifiedFile) {
+ (result || (result = new Array(moduleNames.length)))[i] = predictedToResolveToAmbientModuleMarker;
}
- else if (unknownModuleNames) {
- // found unknown module name and we are already using separate list for those - add it to the list
- unknownModuleNames.push(moduleName);
+ else {
+ // Resolution failed in the old program, or resolved to an ambient module for which we can't reuse the result.
+ (unknownModuleNames || (unknownModuleNames = [])).push(moduleName);
}
}
- if (!unknownModuleNames) {
- // we've looked throught the list but have not seen any predicted resolution
- // use default logic
- return resolveModuleNamesWorker(moduleNames, containingFile);
- }
- var resolutions = unknownModuleNames.length
+ var resolutions = unknownModuleNames && unknownModuleNames.length
? resolveModuleNamesWorker(unknownModuleNames, containingFile)
: emptyArray;
- // combine results of resolutions and predicted results
+ // Combine results of resolutions and predicted results
+ if (!result) {
+ // There were no unresolved/ambient resolutions.
+ ts.Debug.assert(resolutions.length === moduleNames.length);
+ return resolutions;
+ }
var j = 0;
for (var i = 0; i < result.length; i++) {
- if (result[i] === predictedToResolveToAmbientModuleMarker) {
- result[i] = undefined;
+ if (result[i]) {
+ // `result[i]` is either a `ResolvedModuleFull` or a marker.
+ // If it is the former, we can leave it as is.
+ if (result[i] === predictedToResolveToAmbientModuleMarker) {
+ result[i] = undefined;
+ }
}
else {
result[i] = resolutions[j];
@@ -66996,16 +69508,15 @@ var ts;
}
ts.Debug.assert(j === resolutions.length);
return result;
- function checkModuleNameResolvedToAmbientModuleInNonModifiedFile(moduleName, oldProgramState) {
- if (!oldProgramState) {
- return false;
- }
+ // If we change our policy of rechecking failed lookups on each program create,
+ // we should adjust the value returned here.
+ function moduleNameResolvesToAmbientModuleInNonModifiedFile(moduleName, oldProgramState) {
var resolutionToFile = ts.getResolvedModule(oldProgramState.file, moduleName);
if (resolutionToFile) {
// module used to be resolved to file - ignore it
return false;
}
- var ambientModule = oldProgram.getTypeChecker().tryFindAmbientModuleWithoutAugmentations(moduleName);
+ var ambientModule = oldProgramState.program && oldProgramState.program.getTypeChecker().tryFindAmbientModuleWithoutAugmentations(moduleName);
if (!(ambientModule && ambientModule.declarations)) {
return false;
}
@@ -67025,84 +69536,94 @@ var ts;
}
function tryReuseStructureFromOldProgram() {
if (!oldProgram) {
- return false;
+ return 0 /* Not */;
}
// check properties that can affect structure of the program or module resolution strategy
// if any of these properties has changed - structure cannot be reused
var oldOptions = oldProgram.getCompilerOptions();
if (ts.changesAffectModuleResolution(oldOptions, options)) {
- return false;
+ return oldProgram.structureIsReused = 0 /* Not */;
}
- ts.Debug.assert(!oldProgram.structureIsReused);
+ ts.Debug.assert(!(oldProgram.structureIsReused & (2 /* Completely */ | 1 /* SafeModules */)));
// there is an old program, check if we can reuse its structure
var oldRootNames = oldProgram.getRootFileNames();
if (!ts.arrayIsEqualTo(oldRootNames, rootNames)) {
- return false;
+ return oldProgram.structureIsReused = 0 /* Not */;
}
if (!ts.arrayIsEqualTo(options.types, oldOptions.types)) {
- return false;
+ return oldProgram.structureIsReused = 0 /* Not */;
}
// check if program source files has changed in the way that can affect structure of the program
var newSourceFiles = [];
var filePaths = [];
var modifiedSourceFiles = [];
+ oldProgram.structureIsReused = 2 /* Completely */;
for (var _i = 0, _a = oldProgram.getSourceFiles(); _i < _a.length; _i++) {
var oldSourceFile = _a[_i];
var newSourceFile = host.getSourceFileByPath
? host.getSourceFileByPath(oldSourceFile.fileName, oldSourceFile.path, options.target)
: host.getSourceFile(oldSourceFile.fileName, options.target);
if (!newSourceFile) {
- return false;
+ return oldProgram.structureIsReused = 0 /* Not */;
}
newSourceFile.path = oldSourceFile.path;
filePaths.push(newSourceFile.path);
if (oldSourceFile !== newSourceFile) {
+ // The `newSourceFile` object was created for the new program.
if (oldSourceFile.hasNoDefaultLib !== newSourceFile.hasNoDefaultLib) {
// value of no-default-lib has changed
// this will affect if default library is injected into the list of files
- return false;
+ oldProgram.structureIsReused = 1 /* SafeModules */;
}
// check tripleslash references
if (!ts.arrayIsEqualTo(oldSourceFile.referencedFiles, newSourceFile.referencedFiles, fileReferenceIsEqualTo)) {
// tripleslash references has changed
- return false;
+ oldProgram.structureIsReused = 1 /* SafeModules */;
}
// check imports and module augmentations
collectExternalModuleReferences(newSourceFile);
if (!ts.arrayIsEqualTo(oldSourceFile.imports, newSourceFile.imports, moduleNameIsEqualTo)) {
// imports has changed
- return false;
+ oldProgram.structureIsReused = 1 /* SafeModules */;
}
if (!ts.arrayIsEqualTo(oldSourceFile.moduleAugmentations, newSourceFile.moduleAugmentations, moduleNameIsEqualTo)) {
// moduleAugmentations has changed
- return false;
+ oldProgram.structureIsReused = 1 /* SafeModules */;
+ }
+ if ((oldSourceFile.flags & 524288 /* PossiblyContainsDynamicImport */) !== (newSourceFile.flags & 524288 /* PossiblyContainsDynamicImport */)) {
+ // dynamicImport has changed
+ oldProgram.structureIsReused = 1 /* SafeModules */;
}
if (!ts.arrayIsEqualTo(oldSourceFile.typeReferenceDirectives, newSourceFile.typeReferenceDirectives, fileReferenceIsEqualTo)) {
// 'types' references has changed
- return false;
+ oldProgram.structureIsReused = 1 /* SafeModules */;
}
// tentatively approve the file
modifiedSourceFiles.push({ oldFile: oldSourceFile, newFile: newSourceFile });
}
- else {
- // file has no changes - use it as is
- newSourceFile = oldSourceFile;
- }
// if file has passed all checks it should be safe to reuse it
newSourceFiles.push(newSourceFile);
}
- var modifiedFilePaths = modifiedSourceFiles.map(function (f) { return f.newFile.path; });
+ if (oldProgram.structureIsReused !== 2 /* Completely */) {
+ return oldProgram.structureIsReused;
+ }
+ modifiedFilePaths = modifiedSourceFiles.map(function (f) { return f.newFile.path; });
// try to verify results of module resolution
for (var _b = 0, modifiedSourceFiles_1 = modifiedSourceFiles; _b < modifiedSourceFiles_1.length; _b++) {
var _c = modifiedSourceFiles_1[_b], oldSourceFile = _c.oldFile, newSourceFile = _c.newFile;
var newSourceFilePath = ts.getNormalizedAbsolutePath(newSourceFile.fileName, currentDirectory);
if (resolveModuleNamesWorker) {
var moduleNames = ts.map(ts.concatenate(newSourceFile.imports, newSourceFile.moduleAugmentations), getTextOfLiteral);
- var resolutions = resolveModuleNamesReusingOldState(moduleNames, newSourceFilePath, newSourceFile, { file: oldSourceFile, program: oldProgram, modifiedFilePaths: modifiedFilePaths });
+ var oldProgramState = { program: oldProgram, file: oldSourceFile, modifiedFilePaths: modifiedFilePaths };
+ var resolutions = resolveModuleNamesReusingOldState(moduleNames, newSourceFilePath, newSourceFile, oldProgramState);
// ensure that module resolution results are still correct
var resolutionsChanged = ts.hasChangesInResolutions(moduleNames, resolutions, oldSourceFile.resolvedModules, ts.moduleResolutionIsEqualTo);
if (resolutionsChanged) {
- return false;
+ oldProgram.structureIsReused = 1 /* SafeModules */;
+ newSourceFile.resolvedModules = ts.zipToMap(moduleNames, resolutions);
+ }
+ else {
+ newSourceFile.resolvedModules = oldSourceFile.resolvedModules;
}
}
if (resolveTypeReferenceDirectiveNamesWorker) {
@@ -67111,12 +69632,16 @@ var ts;
// ensure that types resolutions are still correct
var resolutionsChanged = ts.hasChangesInResolutions(typesReferenceDirectives, resolutions, oldSourceFile.resolvedTypeReferenceDirectiveNames, ts.typeDirectiveIsEqualTo);
if (resolutionsChanged) {
- return false;
+ oldProgram.structureIsReused = 1 /* SafeModules */;
+ newSourceFile.resolvedTypeReferenceDirectiveNames = ts.zipToMap(typesReferenceDirectives, resolutions);
+ }
+ else {
+ newSourceFile.resolvedTypeReferenceDirectiveNames = oldSourceFile.resolvedTypeReferenceDirectiveNames;
}
}
- // pass the cache of module/types resolutions from the old source file
- newSourceFile.resolvedModules = oldSourceFile.resolvedModules;
- newSourceFile.resolvedTypeReferenceDirectiveNames = oldSourceFile.resolvedTypeReferenceDirectiveNames;
+ }
+ if (oldProgram.structureIsReused !== 2 /* Completely */) {
+ return oldProgram.structureIsReused;
}
// update fileName -> file mapping
for (var i = 0; i < newSourceFiles.length; i++) {
@@ -67129,8 +69654,7 @@ var ts;
fileProcessingDiagnostics.reattachFileDiagnostics(modifiedFile.newFile);
}
resolvedTypeReferenceDirectives = oldProgram.getResolvedTypeReferenceDirectives();
- oldProgram.structureIsReused = true;
- return true;
+ return oldProgram.structureIsReused = 2 /* Completely */;
}
function getEmitHost(writeFileCallback) {
return {
@@ -67213,14 +69737,12 @@ var ts;
if (sourceFile) {
return getDiagnostics(sourceFile, cancellationToken);
}
- var allDiagnostics = [];
- ts.forEach(program.getSourceFiles(), function (sourceFile) {
+ return ts.sortAndDeduplicateDiagnostics(ts.flatMap(program.getSourceFiles(), function (sourceFile) {
if (cancellationToken) {
cancellationToken.throwIfCancellationRequested();
}
- ts.addRange(allDiagnostics, getDiagnostics(sourceFile, cancellationToken));
- });
- return ts.sortAndDeduplicateDiagnostics(allDiagnostics);
+ return getDiagnostics(sourceFile, cancellationToken);
+ }));
}
function getSyntacticDiagnostics(sourceFile, cancellationToken) {
return getDiagnosticsHelper(sourceFile, getSyntacticDiagnosticsForFile, cancellationToken);
@@ -67244,6 +69766,9 @@ var ts;
if (ts.isSourceFileJavaScript(sourceFile)) {
if (!sourceFile.additionalSyntacticDiagnostics) {
sourceFile.additionalSyntacticDiagnostics = getJavaScriptSyntacticDiagnosticsForFile(sourceFile);
+ if (ts.isCheckJsEnabledForFile(sourceFile, options)) {
+ sourceFile.additionalSyntacticDiagnostics = ts.concatenate(sourceFile.additionalSyntacticDiagnostics, sourceFile.jsDocDiagnostics);
+ }
}
return ts.concatenate(sourceFile.additionalSyntacticDiagnostics, sourceFile.parseDiagnostics);
}
@@ -67283,10 +69808,10 @@ var ts;
}
var typeChecker = getDiagnosticsProducingTypeChecker();
ts.Debug.assert(!!sourceFile.bindDiagnostics);
- var bindDiagnostics = sourceFile.bindDiagnostics;
// 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 includeBindAndCheckDiagnostics = !ts.isSourceFileJavaScript(sourceFile) || ts.isCheckJsEnabledForFile(sourceFile, options);
+ var bindDiagnostics = includeBindAndCheckDiagnostics ? sourceFile.bindDiagnostics : emptyArray;
+ var checkDiagnostics = includeBindAndCheckDiagnostics ? typeChecker.getDiagnostics(sourceFile, cancellationToken) : emptyArray;
var fileProcessingDiagnosticsInFile = fileProcessingDiagnostics.getDiagnostics(sourceFile.fileName);
var programDiagnosticsInFile = programDiagnostics.getDiagnostics(sourceFile.fileName);
var diagnostics = bindDiagnostics.concat(checkDiagnostics, fileProcessingDiagnosticsInFile, programDiagnosticsInFile);
@@ -67518,18 +70043,13 @@ var ts;
return result;
}
function getDeclarationDiagnosticsForFile(sourceFile, cancellationToken) {
- return ts.isDeclarationFile(sourceFile) ? [] : getDeclarationDiagnosticsWorker(sourceFile, cancellationToken);
+ return sourceFile.isDeclarationFile ? [] : getDeclarationDiagnosticsWorker(sourceFile, cancellationToken);
}
function getOptionsDiagnostics() {
- var allDiagnostics = [];
- ts.addRange(allDiagnostics, fileProcessingDiagnostics.getGlobalDiagnostics());
- ts.addRange(allDiagnostics, programDiagnostics.getGlobalDiagnostics());
- return ts.sortAndDeduplicateDiagnostics(allDiagnostics);
+ return ts.sortAndDeduplicateDiagnostics(ts.concatenate(fileProcessingDiagnostics.getGlobalDiagnostics(), programDiagnostics.getGlobalDiagnostics()));
}
function getGlobalDiagnostics() {
- var allDiagnostics = [];
- ts.addRange(allDiagnostics, getDiagnosticsProducingTypeChecker().getGlobalDiagnostics());
- return ts.sortAndDeduplicateDiagnostics(allDiagnostics);
+ return ts.sortAndDeduplicateDiagnostics(getDiagnosticsProducingTypeChecker().getGlobalDiagnostics().slice());
}
function processRootFile(fileName, isDefaultLib) {
processSourceFile(ts.normalizePath(fileName), isDefaultLib);
@@ -67549,7 +70069,7 @@ var ts;
}
var isJavaScriptFile = ts.isSourceFileJavaScript(file);
var isExternalModuleFile = ts.isExternalModule(file);
- var isDtsFile = ts.isDeclarationFile(file);
+ // file.imports may not be undefined if there exists dynamic import
var imports;
var moduleAugmentations;
var ambientModules;
@@ -67568,8 +70088,8 @@ var ts;
for (var _i = 0, _a = file.statements; _i < _a.length; _i++) {
var node = _a[_i];
collectModuleReferences(node, /*inAmbientModule*/ false);
- if (isJavaScriptFile) {
- collectRequireCalls(node);
+ if ((file.flags & 524288 /* PossiblyContainsDynamicImport */) || isJavaScriptFile) {
+ collectDynamicImportOrRequireCalls(node);
}
}
file.imports = imports || emptyArray;
@@ -67596,7 +70116,7 @@ var ts;
}
break;
case 233 /* ModuleDeclaration */:
- if (ts.isAmbientModule(node) && (inAmbientModule || ts.hasModifier(node, 2 /* Ambient */) || ts.isDeclarationFile(file))) {
+ if (ts.isAmbientModule(node) && (inAmbientModule || ts.hasModifier(node, 2 /* Ambient */) || file.isDeclarationFile)) {
var moduleName = node.name;
// Ambient module declarations can be interpreted as augmentations for some existing external modules.
// This will happen in two cases:
@@ -67607,7 +70127,7 @@ var ts;
(moduleAugmentations || (moduleAugmentations = [])).push(moduleName);
}
else if (!inAmbientModule) {
- if (isDtsFile) {
+ if (file.isDeclarationFile) {
// for global .d.ts files record name of ambient module
(ambientModules || (ambientModules = [])).push(moduleName.text);
}
@@ -67627,55 +70147,65 @@ var ts;
}
}
}
- function collectRequireCalls(node) {
+ function collectDynamicImportOrRequireCalls(node) {
if (ts.isRequireCall(node, /*checkArgumentIsStringLiteral*/ true)) {
(imports || (imports = [])).push(node.arguments[0]);
}
+ else if (ts.isImportCall(node) && node.arguments.length === 1 && node.arguments[0].kind === 9 /* StringLiteral */) {
+ (imports || (imports = [])).push(node.arguments[0]);
+ }
else {
- ts.forEachChild(node, collectRequireCalls);
+ ts.forEachChild(node, collectDynamicImportOrRequireCalls);
}
}
}
- function processSourceFile(fileName, isDefaultLib, refFile, refPos, refEnd) {
- var diagnosticArgument;
- var diagnostic;
+ /** This should have similar behavior to 'processSourceFile' without diagnostics or mutation. */
+ function getSourceFileFromReference(referencingFile, ref) {
+ return getSourceFileFromReferenceWorker(resolveTripleslashReference(ref.fileName, referencingFile.fileName), function (fileName) { return filesByName.get(ts.toPath(fileName, currentDirectory, getCanonicalFileName)); });
+ }
+ function getSourceFileFromReferenceWorker(fileName, getSourceFile, fail, refFile) {
if (ts.hasExtension(fileName)) {
if (!options.allowNonTsExtensions && !ts.forEach(supportedExtensions, function (extension) { return ts.fileExtensionIs(host.getCanonicalFileName(fileName), extension); })) {
- diagnostic = ts.Diagnostics.File_0_has_unsupported_extension_The_only_supported_extensions_are_1;
- diagnosticArgument = [fileName, "'" + supportedExtensions.join("', '") + "'"];
- }
- else if (!findSourceFile(fileName, ts.toPath(fileName, currentDirectory, getCanonicalFileName), isDefaultLib, refFile, refPos, refEnd)) {
- diagnostic = ts.Diagnostics.File_0_not_found;
- diagnosticArgument = [fileName];
- }
- else if (refFile && host.getCanonicalFileName(fileName) === host.getCanonicalFileName(refFile.fileName)) {
- diagnostic = ts.Diagnostics.A_file_cannot_have_a_reference_to_itself;
- diagnosticArgument = [fileName];
+ if (fail)
+ fail(ts.Diagnostics.File_0_has_unsupported_extension_The_only_supported_extensions_are_1, fileName, "'" + supportedExtensions.join("', '") + "'");
+ return undefined;
}
- }
- else {
- var nonTsFile = options.allowNonTsExtensions && findSourceFile(fileName, ts.toPath(fileName, currentDirectory, getCanonicalFileName), isDefaultLib, refFile, refPos, refEnd);
- if (!nonTsFile) {
- if (options.allowNonTsExtensions) {
- diagnostic = ts.Diagnostics.File_0_not_found;
- diagnosticArgument = [fileName];
+ var sourceFile = getSourceFile(fileName);
+ if (fail) {
+ if (!sourceFile) {
+ fail(ts.Diagnostics.File_0_not_found, fileName);
}
- else if (!ts.forEach(supportedExtensions, function (extension) { return findSourceFile(fileName + extension, ts.toPath(fileName + extension, currentDirectory, getCanonicalFileName), isDefaultLib, refFile, refPos, refEnd); })) {
- diagnostic = ts.Diagnostics.File_0_not_found;
- fileName += ".ts";
- diagnosticArgument = [fileName];
+ else if (refFile && host.getCanonicalFileName(fileName) === host.getCanonicalFileName(refFile.fileName)) {
+ fail(ts.Diagnostics.A_file_cannot_have_a_reference_to_itself, fileName);
}
}
+ return sourceFile;
}
- if (diagnostic) {
- if (refFile !== undefined && refEnd !== undefined && refPos !== undefined) {
- fileProcessingDiagnostics.add(ts.createFileDiagnostic.apply(void 0, [refFile, refPos, refEnd - refPos, diagnostic].concat(diagnosticArgument)));
- }
- else {
- fileProcessingDiagnostics.add(ts.createCompilerDiagnostic.apply(void 0, [diagnostic].concat(diagnosticArgument)));
+ else {
+ var sourceFileNoExtension = options.allowNonTsExtensions && getSourceFile(fileName);
+ if (sourceFileNoExtension)
+ return sourceFileNoExtension;
+ if (fail && options.allowNonTsExtensions) {
+ fail(ts.Diagnostics.File_0_not_found, fileName);
+ return undefined;
}
+ var sourceFileWithAddedExtension = ts.forEach(supportedExtensions, function (extension) { return getSourceFile(fileName + extension); });
+ if (fail && !sourceFileWithAddedExtension)
+ fail(ts.Diagnostics.File_0_not_found, fileName + ".ts");
+ return sourceFileWithAddedExtension;
}
}
+ /** This has side effects through `findSourceFile`. */
+ function processSourceFile(fileName, isDefaultLib, refFile, refPos, refEnd) {
+ getSourceFileFromReferenceWorker(fileName, function (fileName) { return findSourceFile(fileName, ts.toPath(fileName, currentDirectory, getCanonicalFileName), isDefaultLib, refFile, refPos, refEnd); }, function (diagnostic) {
+ var args = [];
+ for (var _i = 1; _i < arguments.length; _i++) {
+ args[_i - 1] = arguments[_i];
+ }
+ fileProcessingDiagnostics.add(refFile !== undefined && refEnd !== undefined && refPos !== undefined
+ ? ts.createFileDiagnostic.apply(void 0, [refFile, refPos, refEnd - refPos, diagnostic].concat(args)) : ts.createCompilerDiagnostic.apply(void 0, [diagnostic].concat(args)));
+ }, refFile);
+ }
function reportFileNamesDifferOnlyInCasingError(fileName, existingFileName, refFile, refPos, refEnd) {
if (refFile !== undefined && refPos !== undefined && refEnd !== undefined) {
fileProcessingDiagnostics.add(ts.createFileDiagnostic(refFile, refPos, refEnd - refPos, ts.Diagnostics.File_name_0_differs_from_already_included_file_name_1_only_in_casing, fileName, existingFileName));
@@ -67827,11 +70357,11 @@ var ts;
function processImportedModules(file) {
collectExternalModuleReferences(file);
if (file.imports.length || file.moduleAugmentations.length) {
- file.resolvedModules = ts.createMap();
// Because global augmentation doesn't have string literal name, we can check for global augmentation as such.
var nonGlobalAugmentation = ts.filter(file.moduleAugmentations, function (moduleAugmentation) { return moduleAugmentation.kind === 9 /* StringLiteral */; });
var moduleNames = ts.map(ts.concatenate(file.imports, nonGlobalAugmentation), getTextOfLiteral);
- var resolutions = resolveModuleNamesReusingOldState(moduleNames, ts.getNormalizedAbsolutePath(file.fileName, currentDirectory), file);
+ var oldProgramState = { program: oldProgram, file: file, modifiedFilePaths: modifiedFilePaths };
+ var resolutions = resolveModuleNamesReusingOldState(moduleNames, ts.getNormalizedAbsolutePath(file.fileName, currentDirectory), file, oldProgramState);
ts.Debug.assert(resolutions.length === moduleNames.length);
for (var i = 0; i < moduleNames.length; i++) {
var resolution = resolutions[i];
@@ -67888,7 +70418,7 @@ var ts;
var absoluteRootDirectoryPath = host.getCanonicalFileName(ts.getNormalizedAbsolutePath(rootDirectory, currentDirectory));
for (var _i = 0, sourceFiles_3 = sourceFiles; _i < sourceFiles_3.length; _i++) {
var sourceFile = sourceFiles_3[_i];
- if (!ts.isDeclarationFile(sourceFile)) {
+ if (!sourceFile.isDeclarationFile) {
var absoluteSourceFilePath = host.getCanonicalFileName(ts.getNormalizedAbsolutePath(sourceFile.fileName, currentDirectory));
if (absoluteSourceFilePath.indexOf(absoluteRootDirectoryPath) !== 0) {
programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files, sourceFile.fileName, options.rootDir));
@@ -67986,12 +70516,12 @@ var ts;
}
var languageVersion = options.target || 0 /* ES3 */;
var outFile = options.outFile || options.out;
- var firstNonAmbientExternalModuleSourceFile = ts.forEach(files, function (f) { return ts.isExternalModule(f) && !ts.isDeclarationFile(f) ? f : undefined; });
+ var firstNonAmbientExternalModuleSourceFile = ts.forEach(files, function (f) { return ts.isExternalModule(f) && !f.isDeclarationFile ? f : undefined; });
if (options.isolatedModules) {
if (options.module === ts.ModuleKind.None && languageVersion < 2 /* ES2015 */) {
programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES2015_or_higher));
}
- var firstNonExternalModuleSourceFile = ts.forEach(files, function (f) { return !ts.isExternalModule(f) && !ts.isDeclarationFile(f) ? f : undefined; });
+ var firstNonExternalModuleSourceFile = ts.forEach(files, function (f) { return !ts.isExternalModule(f) && !f.isDeclarationFile ? f : undefined; });
if (firstNonExternalModuleSourceFile) {
var span_7 = ts.getErrorSpanForNode(firstNonExternalModuleSourceFile, firstNonExternalModuleSourceFile);
programDiagnostics.add(ts.createFileDiagnostic(firstNonExternalModuleSourceFile, span_7.start, span_7.length, ts.Diagnostics.Cannot_compile_namespaces_when_the_isolatedModules_flag_is_provided));
@@ -68215,11 +70745,12 @@ var ts;
"umd": ts.ModuleKind.UMD,
"es6": ts.ModuleKind.ES2015,
"es2015": ts.ModuleKind.ES2015,
+ "esnext": ts.ModuleKind.ESNext
}),
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,
+ description: ts.Diagnostics.Specify_module_code_generation_Colon_commonjs_amd_system_umd_es2015_or_ESNext,
},
{
name: "lib",
@@ -68254,6 +70785,7 @@ var ts;
"es2017.object": "lib.es2017.object.d.ts",
"es2017.sharedmemory": "lib.es2017.sharedmemory.d.ts",
"es2017.string": "lib.es2017.string.d.ts",
+ "es2017.intl": "lib.es2017.intl.d.ts",
"esnext.asynciterable": "lib.esnext.asynciterable.d.ts",
}),
},
@@ -68726,6 +71258,12 @@ var ts;
description: ts.Diagnostics.The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files
},
{
+ name: "noStrictGenericChecks",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Disable_strict_checking_of_generic_signatures_in_function_types,
+ },
+ {
// A list of plugins to load in the language service
name: "plugins",
type: "list",
@@ -68788,7 +71326,6 @@ var ts;
return typeAcquisition;
}
ts.convertEnableAutoDiscoveryToEnable = convertEnableAutoDiscoveryToEnable;
- /* @internal */
function getOptionNameMap() {
if (optionNameMapCache) {
return optionNameMapCache;
@@ -68804,7 +71341,6 @@ var ts;
optionNameMapCache = { optionNameMap: optionNameMap, shortOptionNames: shortOptionNames };
return optionNameMapCache;
}
- ts.getOptionNameMap = getOptionNameMap;
/* @internal */
function createCompilerDiagnosticForInvalidCustomType(opt) {
var namesOfType = ts.arrayFrom(opt.type.keys()).map(function (key) { return "'" + key + "'"; }).join(", ");
@@ -68841,7 +71377,6 @@ var ts;
var options = {};
var fileNames = [];
var errors = [];
- var _a = getOptionNameMap(), optionNameMap = _a.optionNameMap, shortOptionNames = _a.shortOptionNames;
parseStrings(commandLine);
return {
options: options,
@@ -68857,13 +71392,7 @@ var ts;
parseResponseFile(s.slice(1));
}
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.
- var short = shortOptionNames.get(s);
- if (short !== undefined) {
- s = short;
- }
- var opt = optionNameMap.get(s);
+ var opt = getOptionFromName(s.slice(s.charCodeAt(1) === 45 /* minus */ ? 2 : 1), /*allowShort*/ true);
if (opt) {
if (opt.isTSConfigOnly) {
errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_can_only_be_specified_in_tsconfig_json_file, opt.name));
@@ -68951,6 +71480,19 @@ var ts;
}
}
ts.parseCommandLine = parseCommandLine;
+ function getOptionFromName(optionName, allowShort) {
+ if (allowShort === void 0) { allowShort = false; }
+ optionName = optionName.toLowerCase();
+ var _a = getOptionNameMap(), optionNameMap = _a.optionNameMap, shortOptionNames = _a.shortOptionNames;
+ // Try to translate short option names to their full equivalents.
+ if (allowShort) {
+ var short = shortOptionNames.get(optionName);
+ if (short !== undefined) {
+ optionName = short;
+ }
+ }
+ return optionNameMap.get(optionName);
+ }
/**
* Read tsconfig.json file
* @param fileName The path to the config file
@@ -69120,7 +71662,7 @@ var ts;
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);
+ result.push(optionName && "" + tab + tab + optionName + (description && (makePadding(marginLength - optionName.length + 2) + description)));
}
if (configurations.files && configurations.files.length) {
result.push(tab + "},");
@@ -69168,57 +71710,37 @@ var ts;
* @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
+ * @param resolutionStack Only present for backwards-compatibility. Should be empty.
*/
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);
- // typingOptions has been deprecated and is only supported for backward compatibility purposes.
- // It should be removed in future releases - use typeAcquisition instead.
- var jsonOptions = json["typeAcquisition"] || json["typingOptions"];
- var typeAcquisition = convertTypeAcquisitionFromJsonWorker(jsonOptions, basePath, errors, configFileName);
- var baseCompileOnSave;
- 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, baseCompileOnSave, baseOptions]), include = _b[0], exclude = _b[1], files = _b[2], baseCompileOnSave = _b[3], baseOptions = _b[4];
- }
- else {
- errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Compiler_option_0_requires_a_value_of_type_1, "extends", "string"));
+ var options = (function () {
+ var _a = parseConfig(json, host, basePath, configFileName, resolutionStack, errors), include = _a.include, exclude = _a.exclude, files = _a.files, options = _a.options, compileOnSave = _a.compileOnSave;
+ if (include) {
+ json.include = include;
}
- if (include && !json["include"]) {
- json["include"] = include;
+ if (exclude) {
+ json.exclude = exclude;
}
- if (exclude && !json["exclude"]) {
- json["exclude"] = exclude;
+ if (files) {
+ json.files = files;
}
- if (files && !json["files"]) {
- json["files"] = files;
+ if (compileOnSave !== undefined) {
+ json.compileOnSave = compileOnSave;
}
- options = ts.assign({}, baseOptions, options);
- }
+ return options;
+ })();
options = ts.extend(existingOptions, options);
options.configFilePath = configFileName;
- var _c = getFileNames(errors), fileNames = _c.fileNames, wildcardDirectories = _c.wildcardDirectories;
+ // typingOptions has been deprecated and is only supported for backward compatibility purposes.
+ // It should be removed in future releases - use typeAcquisition instead.
+ var jsonOptions = json["typeAcquisition"] || json["typingOptions"];
+ var typeAcquisition = convertTypeAcquisitionFromJsonWorker(jsonOptions, basePath, errors, configFileName);
+ var _a = getFileNames(), fileNames = _a.fileNames, wildcardDirectories = _a.wildcardDirectories;
var compileOnSave = convertCompileOnSaveOptionFromJson(json, basePath, errors);
- if (baseCompileOnSave && json[ts.compileOnSaveCommandLineOption.name] === undefined) {
- compileOnSave = baseCompileOnSave;
- }
return {
options: options,
fileNames: fileNames,
@@ -69228,39 +71750,7 @@ var ts;
wildcardDirectories: wildcardDirectories,
compileOnSave: compileOnSave
};
- function tryExtendsName(extendedConfig) {
- // If the path isn't a rooted or relative path, don't try to resolve it (we reserve the right to special case module-id like paths in the future)
- 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); };
- // Merge configs (copy the resolution stack so it is never reused between branches in potential diamond-problem scenarios)
- var result = parseJsonConfigFileContent(extendedResult.config, host, extendedDirname, /*existingOptions*/ 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.compileOnSave, result.options];
- }
- function getFileNames(errors) {
+ function getFileNames() {
var fileNames;
if (ts.hasProperty(json, "files")) {
if (ts.isArray(json["files"])) {
@@ -69291,9 +71781,6 @@ var ts;
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 {
// If no includes were specified, exclude common package folders and the outDir
excludeSpecs = includeSpecs ? [] : ["node_modules", "bower_components", "jspm_packages"];
@@ -69311,9 +71798,73 @@ var ts;
}
return result;
}
- var _b;
}
ts.parseJsonConfigFileContent = parseJsonConfigFileContent;
+ /**
+ * This *just* extracts options/include/exclude/files out of a config file.
+ * It does *not* resolve the included files.
+ */
+ function parseConfig(json, host, basePath, configFileName, resolutionStack, errors) {
+ basePath = ts.normalizeSlashes(basePath);
+ var getCanonicalFileName = ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames);
+ var resolvedPath = ts.toPath(configFileName || "", basePath, getCanonicalFileName);
+ if (resolutionStack.indexOf(resolvedPath) >= 0) {
+ errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Circularity_detected_while_resolving_configuration_Colon_0, resolutionStack.concat([resolvedPath]).join(" -> ")));
+ return { include: undefined, exclude: undefined, files: undefined, options: {}, compileOnSave: undefined };
+ }
+ if (ts.hasProperty(json, "excludes")) {
+ errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Unknown_option_excludes_Did_you_mean_exclude));
+ }
+ var options = convertCompilerOptionsFromJsonWorker(json.compilerOptions, basePath, errors, configFileName);
+ var include = json.include, exclude = json.exclude, files = json.files;
+ var compileOnSave = json.compileOnSave;
+ if (json.extends) {
+ // copy the resolution stack so it is never reused between branches in potential diamond-problem scenarios.
+ resolutionStack = resolutionStack.concat([resolvedPath]);
+ var base = getExtendedConfig(json.extends, host, basePath, getCanonicalFileName, resolutionStack, errors);
+ if (base) {
+ include = include || base.include;
+ exclude = exclude || base.exclude;
+ files = files || base.files;
+ if (compileOnSave === undefined) {
+ compileOnSave = base.compileOnSave;
+ }
+ options = ts.assign({}, base.options, options);
+ }
+ }
+ return { include: include, exclude: exclude, files: files, options: options, compileOnSave: compileOnSave };
+ }
+ function getExtendedConfig(extended, // Usually a string.
+ host, basePath, getCanonicalFileName, resolutionStack, errors) {
+ if (typeof extended !== "string") {
+ errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Compiler_option_0_requires_a_value_of_type_1, "extends", "string"));
+ return undefined;
+ }
+ extended = ts.normalizeSlashes(extended);
+ // If the path isn't a rooted or relative path, don't try to resolve it (we reserve the right to special case module-id like paths in the future)
+ if (!(ts.isRootedDiskPath(extended) || ts.startsWith(extended, "./") || ts.startsWith(extended, "../"))) {
+ errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.A_path_in_an_extends_option_must_be_relative_or_rooted_but_0_is_not, extended));
+ return undefined;
+ }
+ var extendedConfigPath = ts.toPath(extended, 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, extended));
+ return undefined;
+ }
+ }
+ var extendedResult = readConfigFile(extendedConfigPath, function (path) { return host.readFile(path); });
+ if (extendedResult.error) {
+ errors.push(extendedResult.error);
+ return undefined;
+ }
+ 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 _a = parseConfig(extendedResult.config, host, extendedDirname, ts.getBaseFileName(extendedConfigPath), resolutionStack, errors), include = _a.include, exclude = _a.exclude, files = _a.files, options = _a.options, compileOnSave = _a.compileOnSave;
+ return { include: ts.map(include, updatePath), exclude: ts.map(exclude, updatePath), files: ts.map(files, updatePath), compileOnSave: compileOnSave, options: options };
+ }
function convertCompileOnSaveOptionFromJson(jsonOption, basePath, errors) {
if (!ts.hasProperty(jsonOption, ts.compileOnSaveCommandLineOption.name)) {
return false;
@@ -69609,7 +72160,7 @@ var ts;
}
}
// Remove any subpaths under an existing recursively watched directory.
- for (var key in wildcardDirectories)
+ 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];
@@ -69618,6 +72169,7 @@ var ts;
}
}
}
+ }
}
return wildcardDirectories;
}
@@ -69687,6 +72239,45 @@ var ts;
function caseInsensitiveKeyMapper(key) {
return key.toLowerCase();
}
+ /**
+ * Produces a cleaned version of compiler options with personally identifiying info (aka, paths) removed.
+ * Also converts enum values back to strings.
+ */
+ /* @internal */
+ function convertCompilerOptionsForTelemetry(opts) {
+ var out = {};
+ for (var key in opts) {
+ if (opts.hasOwnProperty(key)) {
+ var type = getOptionFromName(key);
+ if (type !== undefined) {
+ out[key] = getOptionValueWithEmptyStrings(opts[key], type);
+ }
+ }
+ }
+ return out;
+ }
+ ts.convertCompilerOptionsForTelemetry = convertCompilerOptionsForTelemetry;
+ function getOptionValueWithEmptyStrings(value, option) {
+ switch (option.type) {
+ case "object":// "paths". Can't get any useful information from the value since we blank out strings, so just return "".
+ return "";
+ case "string":// Could be any arbitrary string -- use empty string instead.
+ return "";
+ case "number":// Allow numbers, but be sure to check it's actually a number.
+ return typeof value === "number" ? value : "";
+ case "boolean":
+ return typeof value === "boolean" ? value : "";
+ case "list":
+ var elementType_1 = option.element;
+ return ts.isArray(value) ? value.map(function (v) { return getOptionValueWithEmptyStrings(v, elementType_1); }) : "";
+ default:
+ return ts.forEachEntry(option.type, function (optionEnumValue, optionStringValue) {
+ if (optionEnumValue === value) {
+ return optionStringValue;
+ }
+ });
+ }
+ }
})(ts || (ts = {}));
var ts;
(function (ts) {
@@ -69871,31 +72462,31 @@ var ts;
var ClassificationTypeNames = (function () {
function ClassificationTypeNames() {
}
+ ClassificationTypeNames.comment = "comment";
+ ClassificationTypeNames.identifier = "identifier";
+ ClassificationTypeNames.keyword = "keyword";
+ ClassificationTypeNames.numericLiteral = "number";
+ ClassificationTypeNames.operator = "operator";
+ ClassificationTypeNames.stringLiteral = "string";
+ ClassificationTypeNames.whiteSpace = "whitespace";
+ ClassificationTypeNames.text = "text";
+ ClassificationTypeNames.punctuation = "punctuation";
+ ClassificationTypeNames.className = "class name";
+ ClassificationTypeNames.enumName = "enum name";
+ ClassificationTypeNames.interfaceName = "interface name";
+ ClassificationTypeNames.moduleName = "module name";
+ ClassificationTypeNames.typeParameterName = "type parameter name";
+ ClassificationTypeNames.typeAliasName = "type alias name";
+ ClassificationTypeNames.parameterName = "parameter name";
+ ClassificationTypeNames.docCommentTagName = "doc comment tag name";
+ ClassificationTypeNames.jsxOpenTagName = "jsx open tag name";
+ ClassificationTypeNames.jsxCloseTagName = "jsx close tag name";
+ ClassificationTypeNames.jsxSelfClosingTagName = "jsx self closing tag name";
+ ClassificationTypeNames.jsxAttribute = "jsx attribute";
+ ClassificationTypeNames.jsxText = "jsx text";
+ ClassificationTypeNames.jsxAttributeStringLiteralValue = "jsx attribute string literal value";
return ClassificationTypeNames;
}());
- ClassificationTypeNames.comment = "comment";
- ClassificationTypeNames.identifier = "identifier";
- ClassificationTypeNames.keyword = "keyword";
- ClassificationTypeNames.numericLiteral = "number";
- ClassificationTypeNames.operator = "operator";
- ClassificationTypeNames.stringLiteral = "string";
- ClassificationTypeNames.whiteSpace = "whitespace";
- ClassificationTypeNames.text = "text";
- ClassificationTypeNames.punctuation = "punctuation";
- ClassificationTypeNames.className = "class name";
- ClassificationTypeNames.enumName = "enum name";
- ClassificationTypeNames.interfaceName = "interface name";
- ClassificationTypeNames.moduleName = "module name";
- ClassificationTypeNames.typeParameterName = "type parameter name";
- ClassificationTypeNames.typeAliasName = "type alias name";
- ClassificationTypeNames.parameterName = "parameter name";
- ClassificationTypeNames.docCommentTagName = "doc comment tag name";
- ClassificationTypeNames.jsxOpenTagName = "jsx open tag name";
- ClassificationTypeNames.jsxCloseTagName = "jsx close tag name";
- ClassificationTypeNames.jsxSelfClosingTagName = "jsx self closing tag name";
- ClassificationTypeNames.jsxAttribute = "jsx attribute";
- ClassificationTypeNames.jsxText = "jsx text";
- ClassificationTypeNames.jsxAttributeStringLiteralValue = "jsx attribute string literal value";
ts.ClassificationTypeNames = ClassificationTypeNames;
var ClassificationType;
(function (ClassificationType) {
@@ -69948,7 +72539,6 @@ var ts;
case 148 /* PropertySignature */:
case 261 /* PropertyAssignment */:
case 262 /* ShorthandPropertyAssignment */:
- case 264 /* EnumMember */:
case 151 /* MethodDeclaration */:
case 150 /* MethodSignature */:
case 152 /* Constructor */:
@@ -69965,8 +72555,11 @@ var ts;
case 231 /* TypeAliasDeclaration */:
case 163 /* TypeLiteral */:
return 2 /* Type */;
+ case 291 /* JSDocTypedefTag */:
+ // If it has no name node, it shares the name with the value declaration below it.
+ return node.name === undefined ? 1 /* Value */ | 2 /* Type */ : 2 /* Type */;
+ case 264 /* EnumMember */:
case 229 /* ClassDeclaration */:
- case 232 /* EnumDeclaration */:
return 1 /* Value */ | 2 /* Type */;
case 233 /* ModuleDeclaration */:
if (ts.isAmbientModule(node)) {
@@ -69978,18 +72571,19 @@ var ts;
else {
return 4 /* Namespace */;
}
+ case 232 /* EnumDeclaration */:
case 241 /* NamedImports */:
case 242 /* ImportSpecifier */:
case 237 /* ImportEqualsDeclaration */:
case 238 /* ImportDeclaration */:
case 243 /* ExportAssignment */:
case 244 /* ExportDeclaration */:
- return 1 /* Value */ | 2 /* Type */ | 4 /* Namespace */;
+ return 7 /* All */;
// An external module can be a Value
case 265 /* SourceFile */:
return 4 /* Namespace */ | 1 /* Value */;
}
- return 1 /* Value */ | 2 /* Type */ | 4 /* Namespace */;
+ return 7 /* All */;
}
ts.getMeaningFromDeclaration = getMeaningFromDeclaration;
function getMeaningFromLocation(node) {
@@ -69997,9 +72591,9 @@ var ts;
return 1 /* Value */;
}
else if (node.parent.kind === 243 /* ExportAssignment */) {
- return 1 /* Value */ | 2 /* Type */ | 4 /* Namespace */;
+ return 7 /* All */;
}
- else if (isInRightSideOfImport(node)) {
+ else if (isInRightSideOfInternalImportEqualsDeclaration(node)) {
return getMeaningFromRightHandSideOfImportEquals(node);
}
else if (ts.isDeclarationName(node)) {
@@ -70011,6 +72605,10 @@ var ts;
else if (isNamespaceReference(node)) {
return 4 /* Namespace */;
}
+ else if (ts.isTypeParameterDeclaration(node.parent)) {
+ ts.Debug.assert(ts.isJSDocTemplateTag(node.parent.parent)); // Else would be handled by isDeclarationName
+ return 2 /* Type */;
+ }
else {
return 1 /* Value */;
}
@@ -70028,12 +72626,13 @@ var ts;
}
return 4 /* Namespace */;
}
- function isInRightSideOfImport(node) {
+ function isInRightSideOfInternalImportEqualsDeclaration(node) {
while (node.parent.kind === 143 /* QualifiedName */) {
node = node.parent;
}
return ts.isInternalModuleImportEqualsDeclaration(node.parent) && node.parent.moduleReference === node;
}
+ ts.isInRightSideOfInternalImportEqualsDeclaration = isInRightSideOfInternalImportEqualsDeclaration;
function isNamespaceReference(node) {
return isQualifiedNameNamespaceReference(node) || isPropertyAccessNamespaceReference(node);
}
@@ -70068,10 +72667,20 @@ var ts;
if (ts.isRightSideOfQualifiedNameOrPropertyAccess(node)) {
node = node.parent;
}
- return node.parent.kind === 159 /* TypeReference */ ||
- (node.parent.kind === 201 /* ExpressionWithTypeArguments */ && !ts.isExpressionWithTypeArgumentsInClassExtendsClause(node.parent)) ||
- (node.kind === 99 /* ThisKeyword */ && !ts.isPartOfExpression(node)) ||
- node.kind === 169 /* ThisType */;
+ switch (node.kind) {
+ case 99 /* ThisKeyword */:
+ return !ts.isPartOfExpression(node);
+ case 169 /* ThisType */:
+ return true;
+ }
+ switch (node.parent.kind) {
+ case 159 /* TypeReference */:
+ case 277 /* JSDocTypeReference */:
+ return true;
+ case 201 /* ExpressionWithTypeArguments */:
+ return !ts.isExpressionWithTypeArgumentsInClassExtendsClause(node.parent);
+ }
+ return false;
}
function isCallExpressionTarget(node) {
return isCallOrNewExpressionTarget(node, 181 /* CallExpression */);
@@ -70143,7 +72752,7 @@ var ts;
case 153 /* GetAccessor */:
case 154 /* SetAccessor */:
case 233 /* ModuleDeclaration */:
- return node.parent.name === node;
+ return ts.getNameOfDeclaration(node.parent) === node;
case 180 /* ElementAccessExpression */:
return node.parent.argumentExpression === node;
case 144 /* ComputedPropertyName */:
@@ -70158,36 +72767,6 @@ var ts;
ts.getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node;
}
ts.isExpressionOfExternalModuleImportEqualsDeclaration = isExpressionOfExternalModuleImportEqualsDeclaration;
- /** Returns true if the position is within a comment */
- function isInsideComment(sourceFile, token, position) {
- // The position has to be: 1. in the leading trivia (before token.getStart()), and 2. within a comment
- return position <= token.getStart(sourceFile) &&
- (isInsideCommentRange(ts.getTrailingCommentRanges(sourceFile.text, token.getFullStart())) ||
- isInsideCommentRange(ts.getLeadingCommentRanges(sourceFile.text, token.getFullStart())));
- function isInsideCommentRange(comments) {
- return ts.forEach(comments, function (comment) {
- // either we are 1. completely inside the comment, or 2. at the end of the comment
- if (comment.pos < position && position < comment.end) {
- return true;
- }
- else if (position === comment.end) {
- var text = sourceFile.text;
- var width = comment.end - comment.pos;
- // is single line comment or just /*
- if (width <= 2 || text.charCodeAt(comment.pos + 1) === 47 /* slash */) {
- return true;
- }
- else {
- // is unterminated multi-line comment
- return !(text.charCodeAt(comment.end - 1) === 47 /* slash */ &&
- text.charCodeAt(comment.end - 2) === 42 /* asterisk */);
- }
- }
- return false;
- });
- }
- }
- ts.isInsideComment = isInsideComment;
function getContainerNode(node) {
while (true) {
node = node.parent;
@@ -70252,7 +72831,7 @@ var ts;
case 246 /* ExportSpecifier */:
case 240 /* NamespaceImport */:
return ts.ScriptElementKind.alias;
- case 290 /* JSDocTypedefTag */:
+ case 291 /* JSDocTypedefTag */:
return ts.ScriptElementKind.typeElement;
default:
return ts.ScriptElementKind.unknown;
@@ -70479,7 +73058,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 === 294 /* SyntaxList */ && c.pos <= node.pos && c.end >= node.end) {
+ if (c.kind === 295 /* SyntaxList */ && c.pos <= node.pos && c.end >= node.end) {
return c;
}
});
@@ -70492,78 +73071,56 @@ var ts;
* position >= start and (position < end or (position === end && token is keyword or identifier))
*/
function getTouchingWord(sourceFile, position, includeJsDocComment) {
- if (includeJsDocComment === void 0) { includeJsDocComment = false; }
- return getTouchingToken(sourceFile, position, function (n) { return isWord(n.kind); }, includeJsDocComment);
+ return getTouchingToken(sourceFile, position, includeJsDocComment, function (n) { return isWord(n.kind); });
}
ts.getTouchingWord = getTouchingWord;
/* Gets the token whose text has range [start, end) and position >= start
* and (position < end or (position === end && token is keyword or identifier or numeric/string literal))
*/
function getTouchingPropertyName(sourceFile, position, includeJsDocComment) {
- if (includeJsDocComment === void 0) { includeJsDocComment = false; }
- return getTouchingToken(sourceFile, position, function (n) { return isPropertyName(n.kind); }, includeJsDocComment);
+ return getTouchingToken(sourceFile, position, includeJsDocComment, function (n) { return isPropertyName(n.kind); });
}
ts.getTouchingPropertyName = getTouchingPropertyName;
- /** Returns the token if position is in [start, end) or if position === end and includeItemAtEndPosition(token) === true */
- function getTouchingToken(sourceFile, position, includeItemAtEndPosition, includeJsDocComment) {
- if (includeJsDocComment === void 0) { includeJsDocComment = false; }
- return getTokenAtPositionWorker(sourceFile, position, /*allowPositionInLeadingTrivia*/ false, includeItemAtEndPosition, includeJsDocComment);
+ /**
+ * Returns the token if position is in [start, end).
+ * If position === end, returns the preceding token if includeItemAtEndPosition(previousToken) === true
+ */
+ function getTouchingToken(sourceFile, position, includeJsDocComment, includePrecedingTokenAtEndPosition) {
+ return getTokenAtPositionWorker(sourceFile, position, /*allowPositionInLeadingTrivia*/ false, includePrecedingTokenAtEndPosition, /*includeEndPosition*/ false, includeJsDocComment);
}
ts.getTouchingToken = getTouchingToken;
/** Returns a token if position is in [start-of-leading-trivia, end) */
- function getTokenAtPosition(sourceFile, position, includeJsDocComment) {
- if (includeJsDocComment === void 0) { includeJsDocComment = false; }
- return getTokenAtPositionWorker(sourceFile, position, /*allowPositionInLeadingTrivia*/ true, /*includeItemAtEndPosition*/ undefined, includeJsDocComment);
+ function getTokenAtPosition(sourceFile, position, includeJsDocComment, includeEndPosition) {
+ return getTokenAtPositionWorker(sourceFile, position, /*allowPositionInLeadingTrivia*/ true, /*includePrecedingTokenAtEndPosition*/ undefined, includeEndPosition, includeJsDocComment);
}
ts.getTokenAtPosition = getTokenAtPosition;
/** Get the token whose text contains the position */
- function getTokenAtPositionWorker(sourceFile, position, allowPositionInLeadingTrivia, includeItemAtEndPosition, includeJsDocComment) {
- if (includeJsDocComment === void 0) { includeJsDocComment = false; }
+ function getTokenAtPositionWorker(sourceFile, position, allowPositionInLeadingTrivia, includePrecedingTokenAtEndPosition, includeEndPosition, includeJsDocComment) {
var current = sourceFile;
outer: while (true) {
if (ts.isToken(current)) {
// exit early
return current;
}
- if (includeJsDocComment) {
- var jsDocChildren = ts.filter(current.getChildren(), ts.isJSDocNode);
- for (var _i = 0, jsDocChildren_1 = jsDocChildren; _i < jsDocChildren_1.length; _i++) {
- var jsDocChild = jsDocChildren_1[_i];
- var start = allowPositionInLeadingTrivia ? jsDocChild.getFullStart() : jsDocChild.getStart(sourceFile, includeJsDocComment);
- if (start <= position) {
- var end = jsDocChild.getEnd();
- if (position < end || (position === end && jsDocChild.kind === 1 /* EndOfFileToken */)) {
- current = jsDocChild;
- continue outer;
- }
- else if (includeItemAtEndPosition && end === position) {
- var previousToken = findPrecedingToken(position, sourceFile, jsDocChild);
- if (previousToken && includeItemAtEndPosition(previousToken)) {
- return previousToken;
- }
- }
- }
- }
- }
// find the child that contains 'position'
- 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)) {
+ for (var _i = 0, _a = current.getChildren(); _i < _a.length; _i++) {
+ var child = _a[_i];
+ if (!includeJsDocComment && ts.isJSDocNode(child)) {
continue;
}
var start = allowPositionInLeadingTrivia ? child.getFullStart() : child.getStart(sourceFile, includeJsDocComment);
- if (start <= position) {
- var end = child.getEnd();
- if (position < end || (position === end && child.kind === 1 /* EndOfFileToken */)) {
- current = child;
- continue outer;
- }
- else if (includeItemAtEndPosition && end === position) {
- var previousToken = findPrecedingToken(position, sourceFile, child);
- if (previousToken && includeItemAtEndPosition(previousToken)) {
- return previousToken;
- }
+ if (start > position) {
+ continue;
+ }
+ var end = child.getEnd();
+ if (position < end || (position === end && (child.kind === 1 /* EndOfFileToken */ || includeEndPosition))) {
+ current = child;
+ continue outer;
+ }
+ else if (includePrecedingTokenAtEndPosition && end === position) {
+ var previousToken = findPrecedingToken(position, sourceFile, child);
+ if (previousToken && includePrecedingTokenAtEndPosition(previousToken)) {
+ return previousToken;
}
}
}
@@ -70581,7 +73138,7 @@ var ts;
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);
+ var tokenAtPosition = getTokenAtPosition(file, position, /*includeJsDocComment*/ false);
if (ts.isToken(tokenAtPosition) && position > tokenAtPosition.getStart(file) && position < tokenAtPosition.getEnd()) {
return tokenAtPosition;
}
@@ -70611,7 +73168,7 @@ var ts;
}
}
ts.findNextToken = findNextToken;
- function findPrecedingToken(position, sourceFile, startNode) {
+ function findPrecedingToken(position, sourceFile, startNode, includeJsDoc) {
return find(startNode || sourceFile);
function findRightmostToken(n) {
if (ts.isToken(n)) {
@@ -70637,7 +73194,7 @@ var ts;
// NOTE: JsxText is a weird kind of node that can contain only whitespaces (since they are not counted as trivia).
// if this is the case - then we should assume that token in question is located in previous child.
if (position < child.end && (nodeHasTokens(child) || child.kind === 10 /* JsxText */)) {
- var start = child.getStart(sourceFile);
+ var start = child.getStart(sourceFile, includeJsDoc);
var lookInPreviousChild = (start >= position) ||
(child.kind === 10 /* JsxText */ && start === child.end); // whitespace only JsxText
if (lookInPreviousChild) {
@@ -70651,7 +73208,7 @@ var ts;
}
}
}
- ts.Debug.assert(startNode !== undefined || n.kind === 265 /* SourceFile */);
+ ts.Debug.assert(startNode !== undefined || n.kind === 265 /* SourceFile */ || ts.isJSDocCommentContainingNode(n));
// 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.
@@ -70690,15 +73247,11 @@ var ts;
return false;
}
ts.isInString = isInString;
- function isInComment(sourceFile, position) {
- return isInCommentHelper(sourceFile, position, /*predicate*/ undefined);
- }
- ts.isInComment = isInComment;
/**
* returns true if the position is in between the open and close elements of an JSX expression.
*/
function isInsideJsxElementOrAttribute(sourceFile, position) {
- var token = getTokenAtPosition(sourceFile, position);
+ var token = getTokenAtPosition(sourceFile, position, /*includeJsDocComment*/ false);
if (!token) {
return false;
}
@@ -70727,18 +73280,32 @@ var ts;
}
ts.isInsideJsxElementOrAttribute = isInsideJsxElementOrAttribute;
function isInTemplateString(sourceFile, position) {
- var token = getTokenAtPosition(sourceFile, position);
+ var token = getTokenAtPosition(sourceFile, position, /*includeJsDocComment*/ false);
return ts.isTemplateLiteralKind(token.kind) && position > token.getStart(sourceFile);
}
ts.isInTemplateString = isInTemplateString;
/**
- * Returns true if the cursor at position in sourceFile is within a comment that additionally
- * satisfies predicate, and false otherwise.
+ * Returns true if the cursor at position in sourceFile is within a comment.
+ *
+ * @param tokenAtPosition Must equal `getTokenAtPosition(sourceFile, position)
+ * @param predicate Additional predicate to test on the comment range.
*/
- function isInCommentHelper(sourceFile, position, predicate) {
- var token = getTokenAtPosition(sourceFile, position);
- if (token && position <= token.getStart(sourceFile)) {
- var commentRanges = ts.getLeadingCommentRanges(sourceFile.text, token.pos);
+ function isInComment(sourceFile, position, tokenAtPosition, predicate) {
+ if (tokenAtPosition === void 0) { tokenAtPosition = getTokenAtPosition(sourceFile, position, /*includeJsDocComment*/ false); }
+ return position <= tokenAtPosition.getStart(sourceFile) &&
+ (isInCommentRange(ts.getLeadingCommentRanges(sourceFile.text, tokenAtPosition.pos)) ||
+ isInCommentRange(ts.getTrailingCommentRanges(sourceFile.text, tokenAtPosition.pos)));
+ function isInCommentRange(commentRanges) {
+ return ts.forEach(commentRanges, function (c) { return isPositionInCommentRange(c, position, sourceFile.text) && (!predicate || predicate(c)); });
+ }
+ }
+ ts.isInComment = isInComment;
+ function isPositionInCommentRange(_a, position, text) {
+ var pos = _a.pos, end = _a.end, kind = _a.kind;
+ if (pos < position && position < end) {
+ return true;
+ }
+ else if (position === end) {
// The end marker of a single-line comment does not include the newline character.
// In the following case, we are inside a comment (^ denotes the cursor position):
//
@@ -70749,18 +73316,16 @@ var ts;
// /* asdf */^
//
// 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) &&
- predicate(c); }) :
- ts.forEach(commentRanges, function (c) { return c.pos < position &&
- (c.kind === 2 /* SingleLineCommentTrivia */ ? position <= c.end : position < c.end); });
+ return kind === 2 /* SingleLineCommentTrivia */ ||
+ // true for unterminated multi-line comment
+ !(text.charCodeAt(end - 1) === 47 /* slash */ && text.charCodeAt(end - 2) === 42 /* asterisk */);
+ }
+ else {
+ return false;
}
- return false;
}
- ts.isInCommentHelper = isInCommentHelper;
function hasDocComment(sourceFile, position) {
- var token = getTokenAtPosition(sourceFile, position);
+ var token = getTokenAtPosition(sourceFile, position, /*includeJsDocComment*/ false);
// First, we have to see if this position actually landed in a comment.
var commentRanges = ts.getLeadingCommentRanges(sourceFile.text, token.pos);
return ts.forEach(commentRanges, jsDocPrefix);
@@ -70770,42 +73335,6 @@ var ts;
}
}
ts.hasDocComment = hasDocComment;
- /**
- * Get the corresponding JSDocTag node if the position is in a jsDoc comment
- */
- function getJsDocTagAtPosition(sourceFile, position) {
- var node = ts.getTokenAtPosition(sourceFile, position);
- if (ts.isToken(node)) {
- switch (node.kind) {
- case 104 /* VarKeyword */:
- case 110 /* LetKeyword */:
- case 76 /* ConstKeyword */:
- // if the current token is var, let or const, skip the VariableDeclarationList
- node = node.parent === undefined ? undefined : node.parent.parent;
- break;
- default:
- node = node.parent;
- break;
- }
- }
- if (node) {
- if (node.jsDoc) {
- for (var _i = 0, _a = node.jsDoc; _i < _a.length; _i++) {
- var jsDoc = _a[_i];
- if (jsDoc.tags) {
- for (var _b = 0, _c = jsDoc.tags; _b < _c.length; _b++) {
- var tag = _c[_b];
- if (tag.pos <= position && position <= tag.end) {
- return tag;
- }
- }
- }
- }
- }
- }
- return undefined;
- }
- ts.getJsDocTagAtPosition = getJsDocTagAtPosition;
function nodeHasTokens(n) {
// If we have a token or node that has a non-zero width, it must have tokens.
// Note, that getWidth() does not take trivia into account.
@@ -70881,6 +73410,9 @@ var ts;
}
ts.isAccessibilityModifier = isAccessibilityModifier;
function compareDataObjects(dst, src) {
+ if (!dst || !src || Object.keys(dst).length !== Object.keys(src).length) {
+ return false;
+ }
for (var e in dst) {
if (typeof dst[e] === "object") {
if (!compareDataObjects(dst[e], src[e])) {
@@ -70929,25 +73461,27 @@ var ts;
}
ts.hasTrailingDirectorySeparator = hasTrailingDirectorySeparator;
function isInReferenceComment(sourceFile, position) {
- return isInCommentHelper(sourceFile, position, isReferenceComment);
- function isReferenceComment(c) {
+ return isInComment(sourceFile, position, /*tokenAtPosition*/ undefined, function (c) {
var commentText = sourceFile.text.substring(c.pos, c.end);
return tripleSlashDirectivePrefixRegex.test(commentText);
- }
+ });
}
ts.isInReferenceComment = isInReferenceComment;
function isInNonReferenceComment(sourceFile, position) {
- return isInCommentHelper(sourceFile, position, isNonReferenceComment);
- function isNonReferenceComment(c) {
+ return isInComment(sourceFile, position, /*tokenAtPosition*/ undefined, function (c) {
var commentText = sourceFile.text.substring(c.pos, c.end);
return !tripleSlashDirectivePrefixRegex.test(commentText);
- }
+ });
}
ts.isInNonReferenceComment = isInNonReferenceComment;
function createTextSpanFromNode(node, sourceFile) {
return ts.createTextSpanFromBounds(node.getStart(sourceFile), node.getEnd());
}
ts.createTextSpanFromNode = createTextSpanFromNode;
+ function createTextSpanFromRange(range) {
+ return ts.createTextSpanFromBounds(range.pos, range.end);
+ }
+ ts.createTextSpanFromRange = createTextSpanFromRange;
function isTypeKeyword(kind) {
switch (kind) {
case 119 /* AnyKeyword */:
@@ -71009,7 +73543,7 @@ var ts;
clear: resetWriter,
trackSymbol: ts.noop,
reportInaccessibleThisError: ts.noop,
- reportIllegalExtends: ts.noop
+ reportPrivateInBaseOfClassExpression: ts.noop,
};
function writeIndent() {
if (lineStart) {
@@ -71228,8 +73762,8 @@ var ts;
// also, the emitted result will have "(" in the beginning and ");" in the end. We need to strip these
// as well
var trimmedOutput = outputText.trim();
- for (var _i = 0, diagnostics_2 = diagnostics; _i < diagnostics_2.length; _i++) {
- var diagnostic = diagnostics_2[_i];
+ for (var _i = 0, diagnostics_3 = diagnostics; _i < diagnostics_3.length; _i++) {
+ var diagnostic = diagnostics_3[_i];
diagnostic.start = diagnostic.start - 1;
}
var _b = ts.parseConfigFileTextToJson(configFileName, trimmedOutput.substring(1, trimmedOutput.length - 2), /*stripComments*/ false), config = _b.config, error = _b.error;
@@ -71252,7 +73786,7 @@ var ts;
}
ts.getOpenBrace = getOpenBrace;
function getOpenBraceOfClassLike(declaration, sourceFile) {
- return ts.getTokenAtPosition(sourceFile, declaration.members.pos - 1);
+ return ts.getTokenAtPosition(sourceFile, declaration.members.pos - 1, /*includeJsDocComment*/ false);
}
ts.getOpenBraceOfClassLike = getOpenBraceOfClassLike;
})(ts || (ts = {}));
@@ -71324,7 +73858,7 @@ var ts;
var lastEnd = 0;
for (var i = 0; i < dense.length; i += 3) {
var start = dense[i];
- var length_5 = dense[i + 1];
+ var length_6 = dense[i + 1];
var type = dense[i + 2];
// Make a whitespace entry between the last item and this one.
if (lastEnd >= 0) {
@@ -71333,8 +73867,8 @@ var ts;
entries.push({ length: whitespaceLength_1, classification: ts.TokenClass.Whitespace });
}
}
- entries.push({ length: length_5, classification: convertClassification(type) });
- lastEnd = start + length_5;
+ entries.push({ length: length_6, classification: convertClassification(type) });
+ lastEnd = start + length_6;
}
var whitespaceLength = text.length - lastEnd;
if (whitespaceLength > 0) {
@@ -71874,9 +74408,9 @@ var ts;
pushClassification(start, width, 1 /* comment */);
continue;
}
- // for the ======== add a comment for the first line, and then lex all
- // subsequent lines up until the end of the conflict marker.
- ts.Debug.assert(ch === 61 /* equals */);
+ // for the ||||||| and ======== markers, add a comment for the first line,
+ // and then lex all subsequent lines up until the end of the conflict marker.
+ ts.Debug.assert(ch === 124 /* bar */ || ch === 61 /* equals */);
classifyDisabledMergeCode(text, start, end);
}
}
@@ -71908,20 +74442,20 @@ var ts;
if (tag.pos !== pos) {
pushCommentRange(pos, tag.pos - pos);
}
- pushClassification(tag.atToken.pos, tag.atToken.end - tag.atToken.pos, 10 /* punctuation */);
- pushClassification(tag.tagName.pos, tag.tagName.end - tag.tagName.pos, 18 /* docCommentTagName */);
+ pushClassification(tag.atToken.pos, tag.atToken.end - tag.atToken.pos, 10 /* punctuation */); // "@"
+ pushClassification(tag.tagName.pos, tag.tagName.end - tag.tagName.pos, 18 /* docCommentTagName */); // e.g. "param"
pos = tag.tagName.end;
switch (tag.kind) {
- case 286 /* JSDocParameterTag */:
+ case 287 /* JSDocParameterTag */:
processJSDocParameterTag(tag);
break;
- case 289 /* JSDocTemplateTag */:
+ case 290 /* JSDocTemplateTag */:
processJSDocTemplateTag(tag);
break;
- case 288 /* JSDocTypeTag */:
+ case 289 /* JSDocTypeTag */:
processElement(tag.typeExpression);
break;
- case 287 /* JSDocReturnTag */:
+ case 288 /* JSDocReturnTag */:
processElement(tag.typeExpression);
break;
}
@@ -71957,8 +74491,8 @@ var ts;
}
}
function classifyDisabledMergeCode(text, start, end) {
- // Classify the line that the ======= marker is on as a comment. Then just lex
- // all further tokens and add them to the result.
+ // Classify the line that the ||||||| or ======= marker is on as a comment.
+ // Then just lex all further tokens and add them to the result.
var i;
for (i = start; i < end; i++) {
if (ts.isLineBreak(text.charCodeAt(i))) {
@@ -71985,7 +74519,7 @@ var ts;
* False will mean that node is not classified and traverse routine should recurse into node contents.
*/
function tryClassifyNode(node) {
- if (ts.isJSDocTag(node)) {
+ if (ts.isJSDoc(node)) {
return true;
}
if (ts.nodeIsMissing(node)) {
@@ -72343,8 +74877,8 @@ var ts;
continue;
}
var start = completePrefix.length;
- var length_6 = normalizedMatch.length - start - normalizedSuffix.length;
- result.push(ts.removeFileExtension(normalizedMatch.substr(start, length_6)));
+ var length_7 = normalizedMatch.length - start - normalizedSuffix.length;
+ result.push(ts.removeFileExtension(normalizedMatch.substr(start, length_7)));
}
return result;
}
@@ -72358,24 +74892,21 @@ var ts;
var moduleNameFragment = isNestedModule ? fragment.substr(0, fragment.lastIndexOf(ts.directorySeparator)) : undefined;
// Get modules that the type checker picked up
var ambientModules = ts.map(typeChecker.getAmbientModules(), function (sym) { return ts.stripQuotes(sym.name); });
- var nonRelativeModules = ts.filter(ambientModules, function (moduleName) { return ts.startsWith(moduleName, fragment); });
+ var nonRelativeModuleNames = ts.filter(ambientModules, function (moduleName) { return ts.startsWith(moduleName, fragment); });
// Nested modules of the form "module-name/sub" need to be adjusted to only return the string
// after the last '/' that appears in the fragment because that's where the replacement span
// starts
if (isNestedModule) {
var moduleNameWithSeperator_1 = ts.ensureTrailingDirectorySeparator(moduleNameFragment);
- nonRelativeModules = ts.map(nonRelativeModules, function (moduleName) {
- if (ts.startsWith(fragment, moduleNameWithSeperator_1)) {
- return moduleName.substr(moduleNameWithSeperator_1.length);
- }
- return moduleName;
+ nonRelativeModuleNames = ts.map(nonRelativeModuleNames, function (nonRelativeModuleName) {
+ return ts.removePrefix(nonRelativeModuleName, moduleNameWithSeperator_1);
});
}
if (!options.moduleResolution || options.moduleResolution === ts.ModuleResolutionKind.NodeJs) {
for (var _i = 0, _a = enumerateNodeModulesVisibleToScript(host, scriptPath); _i < _a.length; _i++) {
var visibleModule = _a[_i];
if (!isNestedModule) {
- nonRelativeModules.push(visibleModule.moduleName);
+ nonRelativeModuleNames.push(visibleModule.moduleName);
}
else if (ts.startsWith(visibleModule.moduleName, moduleNameFragment)) {
var nestedFiles = tryReadDirectory(host, visibleModule.moduleDir, ts.supportedTypeScriptExtensions, /*exclude*/ undefined, /*include*/ ["./*"]);
@@ -72384,16 +74915,16 @@ var ts;
var f = nestedFiles_1[_b];
f = ts.normalizePath(f);
var nestedModule = ts.removeFileExtension(ts.getBaseFileName(f));
- nonRelativeModules.push(nestedModule);
+ nonRelativeModuleNames.push(nestedModule);
}
}
}
}
}
- return ts.deduplicate(nonRelativeModules);
+ return ts.deduplicate(nonRelativeModuleNames);
}
function getTripleSlashReferenceCompletion(sourceFile, position, compilerOptions, host) {
- var token = ts.getTokenAtPosition(sourceFile, position);
+ var token = ts.getTokenAtPosition(sourceFile, position, /*includeJsDocComment*/ false);
if (!token) {
return undefined;
}
@@ -72635,14 +75166,29 @@ var ts;
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() };
+ var symbols = completionData.symbols, isGlobalCompletion = completionData.isGlobalCompletion, isMemberCompletion = completionData.isMemberCompletion, isNewIdentifierLocation = completionData.isNewIdentifierLocation, location = completionData.location, request = completionData.request, hasFilteredClassMemberKeywords = completionData.hasFilteredClassMemberKeywords;
+ if (sourceFile.languageVariant === 1 /* JSX */ &&
+ location && location.parent && location.parent.kind === 252 /* 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;
+ return { isGlobalCompletion: false, isMemberCompletion: true, isNewIdentifierLocation: false,
+ entries: [{
+ name: tagName.getFullText(),
+ kind: ts.ScriptElementKind.classElement,
+ kindModifiers: undefined,
+ sortText: "0",
+ }] };
}
- 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() };
+ if (request) {
+ var entries_2 = request.kind === "JsDocTagName"
+ ? ts.JsDoc.getJSDocTagNameCompletions()
+ : request.kind === "JsDocTag"
+ ? ts.JsDoc.getJSDocTagCompletions()
+ : ts.JsDoc.getJSDocParameterNameCompletions(request.tag);
+ return { isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: false, entries: entries_2 };
}
var entries = [];
if (ts.isSourceFileJavaScript(sourceFile)) {
@@ -72651,28 +75197,16 @@ var ts;
}
else {
if (!symbols || symbols.length === 0) {
- if (sourceFile.languageVariant === 1 /* JSX */ &&
- location.parent && location.parent.kind === 252 /* 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 {
+ if (!hasFilteredClassMemberKeywords) {
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) {
+ if (hasFilteredClassMemberKeywords) {
+ ts.addRange(entries, classMemberKeywordCompletions);
+ }
+ else if (!isMemberCompletion) {
ts.addRange(entries, keywordCompletions);
}
return { isGlobalCompletion: isGlobalCompletion, isMemberCompletion: isMemberCompletion, isNewIdentifierLocation: isNewIdentifierLocation, entries: entries };
@@ -72728,8 +75262,8 @@ var ts;
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];
+ for (var _i = 0, symbols_5 = symbols; _i < symbols_5.length; _i++) {
+ var symbol = symbols_5[_i];
var entry = createCompletionEntry(symbol, location, performCharacterChecks, typeChecker, target);
if (entry) {
var id = ts.escapeIdentifier(entry.name);
@@ -72819,10 +75353,11 @@ var ts;
function getStringLiteralCompletionEntriesFromCallExpression(argumentInfo, typeChecker) {
var candidates = [];
var entries = [];
+ var uniques = ts.createMap();
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);
+ addStringLiteralCompletionsFromType(typeChecker.getParameterType(candidate, argumentInfo.argumentIndex), entries, typeChecker, uniques);
}
if (entries.length) {
return { isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: true, entries: entries };
@@ -72850,9 +75385,10 @@ var ts;
}
return undefined;
}
- function addStringLiteralCompletionsFromType(type, result, typeChecker) {
+ function addStringLiteralCompletionsFromType(type, result, typeChecker, uniques) {
+ if (uniques === void 0) { uniques = ts.createMap(); }
if (type && type.flags & 16384 /* TypeParameter */) {
- type = typeChecker.getApparentType(type);
+ type = typeChecker.getBaseConstraintOfType(type);
}
if (!type) {
return;
@@ -72860,16 +75396,20 @@ var ts;
if (type.flags & 65536 /* Union */) {
for (var _i = 0, _a = type.types; _i < _a.length; _i++) {
var t = _a[_i];
- addStringLiteralCompletionsFromType(t, result, typeChecker);
+ addStringLiteralCompletionsFromType(t, result, typeChecker, uniques);
}
}
else if (type.flags & 32 /* StringLiteral */) {
- result.push({
- name: type.text,
- kindModifiers: ts.ScriptElementKindModifier.none,
- kind: ts.ScriptElementKind.variableElement,
- sortText: "0"
- });
+ var name = type.value;
+ if (!uniques.has(name)) {
+ uniques.set(name, true);
+ result.push({
+ name: name,
+ kindModifiers: ts.ScriptElementKindModifier.none,
+ kind: ts.ScriptElementKind.variableElement,
+ sortText: "0"
+ });
+ }
}
}
function getCompletionEntryDetails(typeChecker, log, compilerOptions, sourceFile, position, entryName) {
@@ -72925,23 +75465,22 @@ var ts;
Completions.getCompletionEntrySymbol = getCompletionEntrySymbol;
function getCompletionData(typeChecker, log, sourceFile, position) {
var isJavaScriptFile = ts.isSourceFileJavaScript(sourceFile);
- // 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 request;
var start = ts.timestamp();
- var currentToken = ts.getTokenAtPosition(sourceFile, position);
+ var currentToken = ts.getTokenAtPosition(sourceFile, position, /*includeJsDocComment*/ false);
+ // We will check for jsdoc comments with insideComment and getJsDocTagAtPosition. (TODO: that seems rather inefficient to check the same thing so many times.)
log("getCompletionData: Get current token: " + (ts.timestamp() - start));
start = ts.timestamp();
// Completion not allowed inside comments, bail out if this is the case
- var insideComment = ts.isInsideComment(sourceFile, currentToken, position);
+ var insideComment = ts.isInComment(sourceFile, position, currentToken);
log("getCompletionData: Is inside comment: " + (ts.timestamp() - start));
+ var insideJsDocTagTypeExpression = false;
if (insideComment) {
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;
+ // The current position is next to the '@' sign, when no tag name being provided yet.
+ // Provide a full list of tag names
+ request = { kind: "JsDocTagName" };
}
else {
// When completion is requested without "@", we will have check to make sure that
@@ -72961,33 +75500,37 @@ var ts;
// * |c|
// */
var lineStart = ts.getLineStartPositionForPosition(position, sourceFile);
- requestJsDocTag = !(sourceFile.text.substring(lineStart, position).match(/[^\*|\s|(/\*\*)]/));
+ if (!(sourceFile.text.substring(lineStart, position).match(/[^\*|\s|(/\*\*)]/))) {
+ request = { kind: "JsDocTag" };
+ }
}
}
// Completion should work inside certain JsDoc tags. For example:
// /** @type {number | string} */
// Completion should work in the brackets
- var insideJsDocTagExpression = false;
- var tag = ts.getJsDocTagAtPosition(sourceFile, position);
+ var tag = getJsDocTagAtPosition(currentToken, position);
if (tag) {
if (tag.tagName.pos <= position && position <= tag.tagName.end) {
- requestJsDocTagName = true;
+ request = { kind: "JsDocTagName" };
}
- switch (tag.kind) {
- case 288 /* JSDocTypeTag */:
- case 286 /* JSDocParameterTag */:
- case 287 /* JSDocReturnTag */:
- var tagWithExpression = tag;
- if (tagWithExpression.typeExpression) {
- insideJsDocTagExpression = tagWithExpression.typeExpression.pos < position && position < tagWithExpression.typeExpression.end;
- }
- break;
+ if (isTagWithTypeExpression(tag) && tag.typeExpression) {
+ currentToken = ts.getTokenAtPosition(sourceFile, position, /*includeJsDocComment*/ true);
+ if (!currentToken ||
+ (!ts.isDeclarationName(currentToken) &&
+ (currentToken.parent.kind !== 292 /* JSDocPropertyTag */ ||
+ currentToken.parent.name !== currentToken))) {
+ // Use as type location if inside tag's type expression
+ insideJsDocTagTypeExpression = isCurrentlyEditingNode(tag.typeExpression);
+ }
+ }
+ if (ts.isJSDocParameterTag(tag) && (ts.nodeIsMissing(tag.name) || tag.name.pos <= position && position <= tag.name.end)) {
+ request = { kind: "JsDocParameterName", tag: tag };
}
}
- if (requestJsDocTagName || requestJsDocTag) {
- return { symbols: undefined, isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: false, location: undefined, isRightOfDot: false, requestJsDocTagName: requestJsDocTagName, requestJsDocTag: requestJsDocTag };
+ if (request) {
+ return { symbols: undefined, isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: false, location: undefined, isRightOfDot: false, request: request, hasFilteredClassMemberKeywords: false };
}
- if (!insideJsDocTagExpression) {
+ if (!insideJsDocTagTypeExpression) {
// Proceed if the current position is in jsDoc tag expression; otherwise it is a normal
// comment or the plain text part of a jsDoc comment, so no completion should be available
log("Returning an empty list because completion was inside a regular comment or plain text part of a JsDoc comment.");
@@ -72995,7 +75538,7 @@ var ts;
}
}
start = ts.timestamp();
- var previousToken = ts.findPrecedingToken(position, sourceFile);
+ var previousToken = ts.findPrecedingToken(position, sourceFile, /*startNode*/ undefined, insideJsDocTagTypeExpression);
log("getCompletionData: Get previous token 1: " + (ts.timestamp() - start));
// The decision to provide completion depends on the contextToken, which is determined through the previousToken.
// Note: 'previousToken' (and thus 'contextToken') can be undefined if we are the beginning of the file
@@ -73004,7 +75547,7 @@ var ts;
// Skip this partial identifier and adjust the contextToken to the token that precedes it.
if (contextToken && position <= contextToken.end && ts.isWord(contextToken.kind)) {
var start_2 = ts.timestamp();
- contextToken = ts.findPrecedingToken(contextToken.getFullStart(), sourceFile);
+ contextToken = ts.findPrecedingToken(contextToken.getFullStart(), sourceFile, /*startNode*/ undefined, insideJsDocTagTypeExpression);
log("getCompletionData: Get previous token 2: " + (ts.timestamp() - start_2));
}
// Find the node where completion is requested on.
@@ -73014,7 +75557,7 @@ var ts;
var isRightOfDot = false;
var isRightOfOpenTag = false;
var isStartingCloseTag = false;
- var location = ts.getTouchingPropertyName(sourceFile, position);
+ var location = ts.getTouchingPropertyName(sourceFile, position, insideJsDocTagTypeExpression); // TODO: GH#15853
if (contextToken) {
// Bail out if this is a known invalid completion location
if (isCompletionListBlocker(contextToken)) {
@@ -73073,6 +75616,7 @@ var ts;
var isGlobalCompletion = false;
var isMemberCompletion;
var isNewIdentifierLocation;
+ var hasFilteredClassMemberKeywords = false;
var symbols = [];
if (isRightOfDot) {
getTypeScriptMemberSymbols();
@@ -73106,12 +75650,26 @@ var ts;
}
}
log("getCompletionData: Semantic work: " + (ts.timestamp() - semanticStart));
- return { symbols: symbols, isGlobalCompletion: isGlobalCompletion, isMemberCompletion: isMemberCompletion, isNewIdentifierLocation: isNewIdentifierLocation, location: location, isRightOfDot: (isRightOfDot || isRightOfOpenTag), requestJsDocTagName: requestJsDocTagName, requestJsDocTag: requestJsDocTag };
+ return { symbols: symbols, isGlobalCompletion: isGlobalCompletion, isMemberCompletion: isMemberCompletion, isNewIdentifierLocation: isNewIdentifierLocation, location: location, isRightOfDot: (isRightOfDot || isRightOfOpenTag), request: request, hasFilteredClassMemberKeywords: hasFilteredClassMemberKeywords };
+ function isTagWithTypeExpression(tag) {
+ switch (tag.kind) {
+ case 285 /* JSDocAugmentsTag */:
+ case 287 /* JSDocParameterTag */:
+ case 292 /* JSDocPropertyTag */:
+ case 288 /* JSDocReturnTag */:
+ case 289 /* JSDocTypeTag */:
+ case 291 /* JSDocTypedefTag */:
+ return true;
+ }
+ }
function getTypeScriptMemberSymbols() {
// Right of dot member completion list
isGlobalCompletion = false;
isMemberCompletion = true;
isNewIdentifierLocation = false;
+ // Since this is qualified name check its a type node location
+ var isTypeLocation = ts.isPartOfTypeNode(node.parent) || insideJsDocTagTypeExpression;
+ var isRhsOfImportDeclaration = ts.isInRightSideOfInternalImportEqualsDeclaration(node);
if (node.kind === 71 /* Identifier */ || node.kind === 143 /* QualifiedName */ || node.kind === 179 /* PropertyAccessExpression */) {
var symbol = typeChecker.getSymbolAtLocation(node);
// This is an alias, follow what it aliases
@@ -73121,15 +75679,23 @@ var ts;
if (symbol && symbol.flags & 1952 /* HasExports */) {
// Extract module or enum members
var exportedSymbols = typeChecker.getExportsOfModule(symbol);
+ var isValidValueAccess_1 = function (symbol) { return typeChecker.isValidPropertyAccess((node.parent), symbol.name); };
+ var isValidTypeAccess_1 = function (symbol) { return symbolCanbeReferencedAtTypeLocation(symbol); };
+ var isValidAccess_1 = isRhsOfImportDeclaration ?
+ // Any kind is allowed when dotting off namespace in internal import equals declaration
+ function (symbol) { return isValidTypeAccess_1(symbol) || isValidValueAccess_1(symbol); } :
+ isTypeLocation ? isValidTypeAccess_1 : isValidValueAccess_1;
ts.forEach(exportedSymbols, function (symbol) {
- if (typeChecker.isValidPropertyAccess((node.parent), symbol.name)) {
+ if (isValidAccess_1(symbol)) {
symbols.push(symbol);
}
});
}
}
- var type = typeChecker.getTypeAtLocation(node);
- addTypeProperties(type);
+ if (!isTypeLocation) {
+ var type = typeChecker.getTypeAtLocation(node);
+ addTypeProperties(type);
+ }
}
function addTypeProperties(type) {
if (type) {
@@ -73157,6 +75723,7 @@ var ts;
function tryGetGlobalSymbols() {
var objectLikeContainer;
var namedImportsOrExports;
+ var classLikeContainer;
var jsxContainer;
if (objectLikeContainer = tryGetObjectLikeCompletionContainer(contextToken)) {
return tryGetObjectLikeCompletionSymbols(objectLikeContainer);
@@ -73166,6 +75733,11 @@ var ts;
// try to show exported member for imported module
return tryGetImportOrExportClauseCompletionSymbols(namedImportsOrExports);
}
+ if (classLikeContainer = tryGetClassLikeCompletionContainer(contextToken)) {
+ // cursor inside class declaration
+ getGetClassLikeCompletionSymbols(classLikeContainer);
+ return true;
+ }
if (jsxContainer = tryGetContainingJsxElement(contextToken)) {
var attrsType = void 0;
if ((jsxContainer.kind === 250 /* JsxSelfClosingElement */) || (jsxContainer.kind === 251 /* JsxOpeningElement */)) {
@@ -73221,11 +75793,73 @@ var ts;
scopeNode.kind === 256 /* JsxExpression */ ||
ts.isStatement(scopeNode);
}
- /// TODO filter meaning based on the current context
var symbolMeanings = 793064 /* Type */ | 107455 /* Value */ | 1920 /* Namespace */ | 8388608 /* Alias */;
- symbols = typeChecker.getSymbolsInScope(scopeNode, symbolMeanings);
+ symbols = filterGlobalCompletion(typeChecker.getSymbolsInScope(scopeNode, symbolMeanings));
return true;
}
+ function filterGlobalCompletion(symbols) {
+ return ts.filter(symbols, function (symbol) {
+ if (!ts.isSourceFile(location)) {
+ // export = /**/ here we want to get all meanings, so any symbol is ok
+ if (ts.isExportAssignment(location.parent)) {
+ return true;
+ }
+ // This is an alias, follow what it aliases
+ if (symbol && symbol.flags & 8388608 /* Alias */) {
+ symbol = typeChecker.getAliasedSymbol(symbol);
+ }
+ // import m = /**/ <-- It can only access namespace (if typing import = x. this would get member symbols and not namespace)
+ if (ts.isInRightSideOfInternalImportEqualsDeclaration(location)) {
+ return !!(symbol.flags & 1920 /* Namespace */);
+ }
+ if (insideJsDocTagTypeExpression ||
+ (!isContextTokenValueLocation(contextToken) &&
+ (ts.isPartOfTypeNode(location) || isContextTokenTypeLocation(contextToken)))) {
+ // Its a type, but you can reach it by namespace.type as well
+ return symbolCanbeReferencedAtTypeLocation(symbol);
+ }
+ }
+ // expressions are value space (which includes the value namespaces)
+ return !!(symbol.flags & 107455 /* Value */);
+ });
+ }
+ function isContextTokenValueLocation(contextToken) {
+ return contextToken &&
+ contextToken.kind === 103 /* TypeOfKeyword */ &&
+ contextToken.parent.kind === 162 /* TypeQuery */;
+ }
+ function isContextTokenTypeLocation(contextToken) {
+ if (contextToken) {
+ var parentKind = contextToken.parent.kind;
+ switch (contextToken.kind) {
+ case 56 /* ColonToken */:
+ return parentKind === 149 /* PropertyDeclaration */ ||
+ parentKind === 148 /* PropertySignature */ ||
+ parentKind === 146 /* Parameter */ ||
+ parentKind === 226 /* VariableDeclaration */ ||
+ ts.isFunctionLikeKind(parentKind);
+ case 58 /* EqualsToken */:
+ return parentKind === 231 /* TypeAliasDeclaration */;
+ case 118 /* AsKeyword */:
+ return parentKind === 202 /* AsExpression */;
+ }
+ }
+ }
+ function symbolCanbeReferencedAtTypeLocation(symbol) {
+ // This is an alias, follow what it aliases
+ if (symbol && symbol.flags & 8388608 /* Alias */) {
+ symbol = typeChecker.getAliasedSymbol(symbol);
+ }
+ if (symbol.flags & 793064 /* Type */) {
+ return true;
+ }
+ if (symbol.flags & (512 /* ValueModule */ | 1024 /* NamespaceModule */)) {
+ var exportedSymbols = typeChecker.getExportsOfModule(symbol);
+ // If the exported symbols contains type,
+ // symbol can be referenced at locations where type is allowed
+ return ts.forEach(exportedSymbols, symbolCanbeReferencedAtTypeLocation);
+ }
+ }
/**
* Finds the first node that "embraces" the position, so that one may
* accurately aggregate locals from the closest containing scope.
@@ -73282,7 +75916,7 @@ var ts;
|| containingNodeKind === 157 /* IndexSignature */ // [ | : string ]
|| containingNodeKind === 144 /* ComputedPropertyName */; // [ | /* this can become an index signature */
case 128 /* ModuleKeyword */: // module |
- case 129 /* NamespaceKeyword */:
+ case 129 /* NamespaceKeyword */:// namespace |
return true;
case 23 /* DotToken */:
return containingNodeKind === 233 /* ModuleDeclaration */; // module A.|
@@ -73339,53 +75973,48 @@ var ts;
function tryGetObjectLikeCompletionSymbols(objectLikeContainer) {
// We're looking up possible property names from contextual/inferred/declared type.
isMemberCompletion = true;
- var typeForObject;
+ var typeMembers;
var existingMembers;
if (objectLikeContainer.kind === 178 /* ObjectLiteralExpression */) {
// We are completing on contextual types, but may also include properties
// other than those within the declared type.
isNewIdentifierLocation = true;
- // If the object literal is being assigned to something of type 'null | { hello: string }',
- // it clearly isn't trying to satisfy the 'null' type. So we grab the non-nullable type if possible.
- typeForObject = typeChecker.getContextualType(objectLikeContainer);
- typeForObject = typeForObject && typeForObject.getNonNullableType();
+ var typeForObject = typeChecker.getContextualType(objectLikeContainer);
+ if (!typeForObject)
+ return false;
+ typeMembers = typeChecker.getAllPossiblePropertiesOfType(typeForObject);
existingMembers = objectLikeContainer.properties;
}
- else if (objectLikeContainer.kind === 174 /* ObjectBindingPattern */) {
+ else {
+ ts.Debug.assert(objectLikeContainer.kind === 174 /* ObjectBindingPattern */);
// We are *only* completing on properties from the type being destructured.
isNewIdentifierLocation = false;
var rootDeclaration = ts.getRootDeclaration(objectLikeContainer.parent);
- if (ts.isVariableLike(rootDeclaration)) {
- // We don't want to complete using the type acquired by the shape
- // of the binding pattern; we are only interested in types acquired
- // through type declaration or inference.
- // 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 === 146 /* Parameter */) {
- if (ts.isExpression(rootDeclaration.parent)) {
- canGetType = !!typeChecker.getContextualType(rootDeclaration.parent);
- }
- else if (rootDeclaration.parent.kind === 151 /* MethodDeclaration */ || rootDeclaration.parent.kind === 154 /* SetAccessor */) {
- canGetType = ts.isExpression(rootDeclaration.parent.parent) && !!typeChecker.getContextualType(rootDeclaration.parent.parent);
- }
- }
- if (canGetType) {
- typeForObject = typeChecker.getTypeAtLocation(objectLikeContainer);
- existingMembers = objectLikeContainer.elements;
- }
- }
- else {
- ts.Debug.fail("Root declaration is not variable-like.");
+ if (!ts.isVariableLike(rootDeclaration))
+ throw ts.Debug.fail("Root declaration is not variable-like.");
+ // We don't want to complete using the type acquired by the shape
+ // of the binding pattern; we are only interested in types acquired
+ // through type declaration or inference.
+ // 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 || rootDeclaration.parent.parent.kind === 216 /* ForOfStatement */;
+ if (!canGetType && rootDeclaration.kind === 146 /* Parameter */) {
+ if (ts.isExpression(rootDeclaration.parent)) {
+ canGetType = !!typeChecker.getContextualType(rootDeclaration.parent);
+ }
+ else if (rootDeclaration.parent.kind === 151 /* MethodDeclaration */ || rootDeclaration.parent.kind === 154 /* SetAccessor */) {
+ canGetType = ts.isExpression(rootDeclaration.parent.parent) && !!typeChecker.getContextualType(rootDeclaration.parent.parent);
+ }
+ }
+ if (canGetType) {
+ var typeForObject = typeChecker.getTypeAtLocation(objectLikeContainer);
+ if (!typeForObject)
+ return false;
+ // In a binding pattern, get only known properties. Everywhere else we will get all possible properties.
+ typeMembers = typeChecker.getPropertiesOfType(typeForObject);
+ existingMembers = objectLikeContainer.elements;
}
}
- else {
- ts.Debug.fail("Expected object literal or binding pattern, got " + objectLikeContainer.kind);
- }
- if (!typeForObject) {
- return false;
- }
- var typeMembers = typeChecker.getPropertiesOfType(typeForObject);
if (typeMembers && typeMembers.length > 0) {
// Add filtered items to the completion list
symbols = filterObjectMembersList(typeMembers, existingMembers);
@@ -73428,6 +76057,53 @@ var ts;
return true;
}
/**
+ * Aggregates relevant symbols for completion in class declaration
+ * Relevant symbols are stored in the captured 'symbols' variable.
+ */
+ function getGetClassLikeCompletionSymbols(classLikeDeclaration) {
+ // We're looking up possible property names from parent type.
+ isMemberCompletion = true;
+ // Declaring new property/method/accessor
+ isNewIdentifierLocation = true;
+ // Has keywords for class elements
+ hasFilteredClassMemberKeywords = true;
+ var baseTypeNode = ts.getClassExtendsHeritageClauseElement(classLikeDeclaration);
+ var implementsTypeNodes = ts.getClassImplementsHeritageClauseElements(classLikeDeclaration);
+ if (baseTypeNode || implementsTypeNodes) {
+ var classElement = contextToken.parent;
+ var classElementModifierFlags = ts.isClassElement(classElement) && ts.getModifierFlags(classElement);
+ // If this is context token is not something we are editing now, consider if this would lead to be modifier
+ if (contextToken.kind === 71 /* Identifier */ && !isCurrentlyEditingNode(contextToken)) {
+ switch (contextToken.getText()) {
+ case "private":
+ classElementModifierFlags = classElementModifierFlags | 8 /* Private */;
+ break;
+ case "static":
+ classElementModifierFlags = classElementModifierFlags | 32 /* Static */;
+ break;
+ }
+ }
+ // No member list for private methods
+ if (!(classElementModifierFlags & 8 /* Private */)) {
+ var baseClassTypeToGetPropertiesFrom = void 0;
+ if (baseTypeNode) {
+ baseClassTypeToGetPropertiesFrom = typeChecker.getTypeAtLocation(baseTypeNode);
+ if (classElementModifierFlags & 32 /* Static */) {
+ // Use static class to get property symbols from
+ baseClassTypeToGetPropertiesFrom = typeChecker.getTypeOfSymbolAtLocation(baseClassTypeToGetPropertiesFrom.symbol, classLikeDeclaration);
+ }
+ }
+ var implementedInterfaceTypePropertySymbols = (classElementModifierFlags & 32 /* Static */) ?
+ undefined :
+ ts.flatMap(implementsTypeNodes, function (typeNode) { return typeChecker.getPropertiesOfType(typeChecker.getTypeAtLocation(typeNode)); });
+ // List of property symbols of base type that are not private and already implemented
+ symbols = filterClassMembersList(baseClassTypeToGetPropertiesFrom ?
+ typeChecker.getPropertiesOfType(baseClassTypeToGetPropertiesFrom) :
+ undefined, implementedInterfaceTypePropertySymbols, classLikeDeclaration.members, classElementModifierFlags);
+ }
+ }
+ }
+ /**
* Returns the immediate owning object literal or binding pattern of a context token,
* on the condition that one exists and that the context implies completion should be given.
*/
@@ -73435,9 +76111,9 @@ var ts;
if (contextToken) {
switch (contextToken.kind) {
case 17 /* OpenBraceToken */: // const x = { |
- case 26 /* CommaToken */:
+ case 26 /* CommaToken */:// const x = { a: 0, |
var parent = contextToken.parent;
- if (parent && (parent.kind === 178 /* ObjectLiteralExpression */ || parent.kind === 174 /* ObjectBindingPattern */)) {
+ if (ts.isObjectLiteralExpression(parent) || ts.isObjectBindingPattern(parent)) {
return parent;
}
break;
@@ -73453,7 +76129,7 @@ var ts;
if (contextToken) {
switch (contextToken.kind) {
case 17 /* OpenBraceToken */: // import { |
- case 26 /* CommaToken */:
+ case 26 /* CommaToken */:// import { a as 0, |
switch (contextToken.parent.kind) {
case 241 /* NamedImports */:
case 245 /* NamedExports */:
@@ -73463,6 +76139,44 @@ var ts;
}
return undefined;
}
+ function isFromClassElementDeclaration(node) {
+ return ts.isClassElement(node.parent) && ts.isClassLike(node.parent.parent);
+ }
+ /**
+ * Returns the immediate owning class declaration of a context token,
+ * on the condition that one exists and that the context implies completion should be given.
+ */
+ function tryGetClassLikeCompletionContainer(contextToken) {
+ if (contextToken) {
+ switch (contextToken.kind) {
+ case 17 /* OpenBraceToken */:// class c { |
+ if (ts.isClassLike(contextToken.parent)) {
+ return contextToken.parent;
+ }
+ break;
+ // class c {getValue(): number; | }
+ case 26 /* CommaToken */:
+ case 25 /* SemicolonToken */:
+ // class c { method() { } | }
+ case 18 /* CloseBraceToken */:
+ if (ts.isClassLike(location)) {
+ return location;
+ }
+ break;
+ default:
+ if (isFromClassElementDeclaration(contextToken) &&
+ (isClassMemberCompletionKeyword(contextToken.kind) ||
+ isClassMemberCompletionKeywordText(contextToken.getText()))) {
+ return contextToken.parent.parent;
+ }
+ }
+ }
+ // class c { method() { } | method2() { } }
+ if (location && location.kind === 295 /* SyntaxList */ && ts.isClassLike(location.parent)) {
+ return location.parent;
+ }
+ return undefined;
+ }
function tryGetContainingJsxElement(contextToken) {
if (contextToken) {
var parent = contextToken.parent;
@@ -73520,19 +76234,6 @@ var ts;
}
return undefined;
}
- function isFunction(kind) {
- if (!ts.isFunctionLikeKind(kind)) {
- return false;
- }
- switch (kind) {
- case 152 /* Constructor */:
- case 161 /* ConstructorType */:
- case 160 /* FunctionType */:
- return false;
- default:
- return true;
- }
- }
/**
* @returns true if we are certain that the currently edited location must define a new location; false otherwise.
*/
@@ -73544,7 +76245,7 @@ var ts;
containingNodeKind === 227 /* VariableDeclarationList */ ||
containingNodeKind === 208 /* VariableStatement */ ||
containingNodeKind === 232 /* EnumDeclaration */ ||
- isFunction(containingNodeKind) ||
+ isFunctionLikeButNotConstructor(containingNodeKind) ||
containingNodeKind === 229 /* ClassDeclaration */ ||
containingNodeKind === 199 /* ClassExpression */ ||
containingNodeKind === 230 /* InterfaceDeclaration */ ||
@@ -73558,7 +76259,7 @@ var ts;
return containingNodeKind === 175 /* ArrayBindingPattern */; // var [x|
case 19 /* OpenParenToken */:
return containingNodeKind === 260 /* CatchClause */ ||
- isFunction(containingNodeKind);
+ isFunctionLikeButNotConstructor(containingNodeKind);
case 17 /* OpenBraceToken */:
return containingNodeKind === 232 /* EnumDeclaration */ ||
containingNodeKind === 230 /* InterfaceDeclaration */ ||
@@ -73573,9 +76274,9 @@ var ts;
containingNodeKind === 199 /* ClassExpression */ ||
containingNodeKind === 230 /* InterfaceDeclaration */ ||
containingNodeKind === 231 /* TypeAliasDeclaration */ ||
- isFunction(containingNodeKind);
+ ts.isFunctionLikeKind(containingNodeKind);
case 115 /* StaticKeyword */:
- return containingNodeKind === 149 /* PropertyDeclaration */;
+ return containingNodeKind === 149 /* PropertyDeclaration */ && !ts.isClassLike(contextToken.parent.parent);
case 24 /* DotDotDotToken */:
return containingNodeKind === 146 /* Parameter */ ||
(contextToken.parent && contextToken.parent.parent &&
@@ -73588,20 +76289,30 @@ var ts;
return containingNodeKind === 242 /* ImportSpecifier */ ||
containingNodeKind === 246 /* ExportSpecifier */ ||
containingNodeKind === 240 /* NamespaceImport */;
+ case 125 /* GetKeyword */:
+ case 135 /* SetKeyword */:
+ if (isFromClassElementDeclaration(contextToken)) {
+ return false;
+ }
+ // falls through
case 75 /* ClassKeyword */:
case 83 /* EnumKeyword */:
case 109 /* InterfaceKeyword */:
case 89 /* FunctionKeyword */:
case 104 /* VarKeyword */:
- case 125 /* GetKeyword */:
- case 135 /* SetKeyword */:
case 91 /* ImportKeyword */:
case 110 /* LetKeyword */:
case 76 /* ConstKeyword */:
case 116 /* YieldKeyword */:
- case 138 /* TypeKeyword */:
+ case 138 /* TypeKeyword */:// type htm|
return true;
}
+ // If the previous token is keyword correspoding to class member completion keyword
+ // there will be completion available here
+ if (isClassMemberCompletionKeywordText(contextToken.getText()) &&
+ isFromClassElementDeclaration(contextToken)) {
+ return false;
+ }
// Previous token may have been a keyword that was converted to an identifier.
switch (contextToken.getText()) {
case "abstract":
@@ -73623,6 +76334,9 @@ var ts;
}
return false;
}
+ function isFunctionLikeButNotConstructor(kind) {
+ return ts.isFunctionLikeKind(kind) && kind !== 152 /* Constructor */;
+ }
function isDotOfNumericLiteral(contextToken) {
if (contextToken.kind === 8 /* NumericLiteral */) {
var text = contextToken.getFullText();
@@ -73644,7 +76358,7 @@ var ts;
for (var _i = 0, namedImportsOrExports_1 = namedImportsOrExports; _i < namedImportsOrExports_1.length; _i++) {
var element = namedImportsOrExports_1[_i];
// If this is the current item we are editing right now, do not filter it out
- if (element.getStart() <= position && position <= element.getEnd()) {
+ if (isCurrentlyEditingNode(element)) {
continue;
}
var name = element.propertyName || element.name;
@@ -73678,7 +76392,7 @@ var ts;
continue;
}
// If this is the current item we are editing right now, do not filter it out
- if (m.getStart() <= position && position <= m.getEnd()) {
+ if (isCurrentlyEditingNode(m)) {
continue;
}
var existingName = void 0;
@@ -73692,13 +76406,56 @@ var ts;
// TODO(jfreeman): Account for computed property name
// NOTE: if one only performs this step when m.name is an identifier,
// things like '__proto__' are not filtered out.
- existingName = m.name.text;
+ existingName = ts.getNameOfDeclaration(m).text;
}
existingMemberNames.set(existingName, true);
}
return ts.filter(contextualMemberSymbols, function (m) { return !existingMemberNames.get(m.name); });
}
/**
+ * Filters out completion suggestions for class elements.
+ *
+ * @returns Symbols to be suggested in an class element depending on existing memebers and symbol flags
+ */
+ function filterClassMembersList(baseSymbols, implementingTypeSymbols, existingMembers, currentClassElementModifierFlags) {
+ var existingMemberNames = ts.createMap();
+ for (var _i = 0, existingMembers_2 = existingMembers; _i < existingMembers_2.length; _i++) {
+ var m = existingMembers_2[_i];
+ // Ignore omitted expressions for missing members
+ if (m.kind !== 149 /* PropertyDeclaration */ &&
+ m.kind !== 151 /* MethodDeclaration */ &&
+ m.kind !== 153 /* GetAccessor */ &&
+ m.kind !== 154 /* SetAccessor */) {
+ continue;
+ }
+ // If this is the current item we are editing right now, do not filter it out
+ if (isCurrentlyEditingNode(m)) {
+ continue;
+ }
+ // Dont filter member even if the name matches if it is declared private in the list
+ if (ts.hasModifier(m, 8 /* Private */)) {
+ continue;
+ }
+ // do not filter it out if the static presence doesnt match
+ var mIsStatic = ts.hasModifier(m, 32 /* Static */);
+ var currentElementIsStatic = !!(currentClassElementModifierFlags & 32 /* Static */);
+ if ((mIsStatic && !currentElementIsStatic) ||
+ (!mIsStatic && currentElementIsStatic)) {
+ continue;
+ }
+ var existingName = ts.getPropertyNameForPropertyNameNode(m.name);
+ if (existingName) {
+ existingMemberNames.set(existingName, true);
+ }
+ }
+ return ts.concatenate(ts.filter(baseSymbols, function (baseProperty) { return isValidProperty(baseProperty, 8 /* Private */); }), ts.filter(implementingTypeSymbols, function (implementingProperty) { return isValidProperty(implementingProperty, 24 /* NonPublicAccessibilityModifier */); }));
+ function isValidProperty(propertySymbol, inValidModifierFlags) {
+ return !existingMemberNames.get(propertySymbol.name) &&
+ propertySymbol.getDeclarations() &&
+ !(ts.getDeclarationModifierFlagsFromSymbol(propertySymbol) & inValidModifierFlags);
+ }
+ }
+ /**
* Filters out completion suggestions from 'symbols' according to existing JSX attributes.
*
* @returns Symbols to be suggested in a JSX element, barring those whose attributes
@@ -73709,7 +76466,7 @@ var ts;
for (var _i = 0, attributes_1 = attributes; _i < attributes_1.length; _i++) {
var attr = attributes_1[_i];
// If this is the current item we are editing right now, do not filter it out
- if (attr.getStart() <= position && position <= attr.getEnd()) {
+ if (isCurrentlyEditingNode(attr)) {
continue;
}
if (attr.kind === 253 /* JsxAttribute */) {
@@ -73718,6 +76475,9 @@ var ts;
}
return ts.filter(symbols, function (a) { return !seenNames.get(a.name); });
}
+ function isCurrentlyEditingNode(node) {
+ return node.getStart() <= position && position <= node.getEnd();
+ }
}
/**
* Get the name to be display in completion from a given symbol.
@@ -73770,6 +76530,27 @@ var ts;
sortText: "0"
});
}
+ function isClassMemberCompletionKeyword(kind) {
+ switch (kind) {
+ case 114 /* PublicKeyword */:
+ case 113 /* ProtectedKeyword */:
+ case 112 /* PrivateKeyword */:
+ case 117 /* AbstractKeyword */:
+ case 115 /* StaticKeyword */:
+ case 123 /* ConstructorKeyword */:
+ case 131 /* ReadonlyKeyword */:
+ case 125 /* GetKeyword */:
+ case 135 /* SetKeyword */:
+ case 120 /* AsyncKeyword */:
+ return true;
+ }
+ }
+ function isClassMemberCompletionKeywordText(text) {
+ return isClassMemberCompletionKeyword(ts.stringToToken(text));
+ }
+ var classMemberKeywordCompletions = ts.filter(keywordCompletions, function (entry) {
+ return isClassMemberCompletionKeywordText(entry.name);
+ });
function isEqualityExpression(node) {
return ts.isBinaryExpression(node) && isEqualityOperatorKind(node.operatorToken.kind);
}
@@ -73779,6 +76560,36 @@ var ts;
kind === 34 /* EqualsEqualsEqualsToken */ ||
kind === 35 /* ExclamationEqualsEqualsToken */;
}
+ /** Get the corresponding JSDocTag node if the position is in a jsDoc comment */
+ function getJsDocTagAtPosition(node, position) {
+ var jsDoc = getJsDocHavingNode(node).jsDoc;
+ if (!jsDoc)
+ return undefined;
+ for (var _i = 0, jsDoc_1 = jsDoc; _i < jsDoc_1.length; _i++) {
+ var _a = jsDoc_1[_i], pos = _a.pos, end = _a.end, tags = _a.tags;
+ if (!tags || position < pos || position > end)
+ continue;
+ for (var i = tags.length - 1; i >= 0; i--) {
+ var tag = tags[i];
+ if (position >= tag.pos) {
+ return tag;
+ }
+ }
+ }
+ }
+ function getJsDocHavingNode(node) {
+ if (!ts.isToken(node))
+ return node;
+ switch (node.kind) {
+ case 104 /* VarKeyword */:
+ case 110 /* LetKeyword */:
+ case 76 /* ConstKeyword */:
+ // if the current token is var, let or const, skip the VariableDeclarationList
+ return node.parent.parent;
+ default:
+ return node.parent;
+ }
+ }
})(Completions = ts.Completions || (ts.Completions = {}));
})(ts || (ts = {}));
/* @internal */
@@ -73786,22 +76597,31 @@ var ts;
(function (ts) {
var DocumentHighlights;
(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));
+ function getDocumentHighlights(program, cancellationToken, sourceFile, position, sourceFilesToSearch) {
+ var node = ts.getTouchingWord(sourceFile, position, /*includeJsDocComment*/ true);
+ if (!node)
+ return undefined;
+ if (ts.isJsxOpeningElement(node.parent) && node.parent.tagName === node || ts.isJsxClosingElement(node.parent)) {
+ // For a JSX element, just highlight the matching tag, not all references.
+ var _a = node.parent.parent, openingElement = _a.openingElement, closingElement = _a.closingElement;
+ var highlightSpans = [openingElement, closingElement].map(function (_a) {
+ var tagName = _a.tagName;
+ return getHighlightSpanForNode(tagName, sourceFile);
+ });
+ return [{ fileName: sourceFile.fileName, highlightSpans: highlightSpans }];
+ }
+ return getSemanticDocumentHighlights(node, program, 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),
+ textSpan: ts.createTextSpanFromNode(node, sourceFile),
kind: ts.HighlightSpanKind.none
};
}
- function getSemanticDocumentHighlights(node, typeChecker, cancellationToken, sourceFilesToSearch) {
- var referenceEntries = ts.FindAllReferences.getReferenceEntriesForNode(node, sourceFilesToSearch, typeChecker, cancellationToken);
+ function getSemanticDocumentHighlights(node, program, cancellationToken, sourceFilesToSearch) {
+ var referenceEntries = ts.FindAllReferences.getReferenceEntriesForNode(node, program, sourceFilesToSearch, cancellationToken);
return referenceEntries && convertReferencedSymbols(referenceEntries);
}
function convertReferencedSymbols(referenceEntries) {
@@ -74469,7 +77289,7 @@ var ts;
}
function handleDirectImports(exportingModuleSymbol) {
var theseDirectImports = getDirectImports(exportingModuleSymbol);
- if (theseDirectImports)
+ if (theseDirectImports) {
for (var _i = 0, theseDirectImports_1 = theseDirectImports; _i < theseDirectImports_1.length; _i++) {
var direct = theseDirectImports_1[_i];
if (!markSeenDirectImport(direct)) {
@@ -74515,6 +77335,7 @@ var ts;
break;
}
}
+ }
}
function handleNamespaceImport(importDeclaration, name, isReExport) {
if (exportKind === 2 /* ExportEquals */) {
@@ -74548,11 +77369,12 @@ var ts;
var moduleSymbol = checker.getMergedSymbol(sourceFileLike.symbol);
ts.Debug.assert(!!(moduleSymbol.flags & 1536 /* Module */));
var directImports = getDirectImports(moduleSymbol);
- if (directImports)
+ 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());
@@ -74570,11 +77392,12 @@ var ts;
function addSearch(location, symbol) {
importSearches.push([location, symbol]);
}
- if (directImports)
+ 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 === 237 /* ImportEqualsDeclaration */) {
@@ -74595,6 +77418,9 @@ var ts;
searchForNamedImport(decl.exportClause);
return;
}
+ if (!decl.importClause) {
+ return;
+ }
var importClause = decl.importClause;
var namedBindings = importClause.namedBindings;
if (namedBindings && namedBindings.kind === 240 /* NamespaceImport */) {
@@ -74632,7 +77458,7 @@ var ts;
}
}
function searchForNamedImport(namedBindings) {
- if (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;
@@ -74654,6 +77480,7 @@ var ts;
addSearch(name, localSymbol);
}
}
+ }
}
}
/** Returns 'true' is the namespace 'name' is re-exported from this module, and 'false' if it is only used locally. */
@@ -74673,11 +77500,42 @@ var ts;
}
});
}
+ function findModuleReferences(program, sourceFiles, searchModuleSymbol) {
+ var refs = [];
+ var checker = program.getTypeChecker();
+ for (var _i = 0, sourceFiles_4 = sourceFiles; _i < sourceFiles_4.length; _i++) {
+ var referencingFile = sourceFiles_4[_i];
+ var searchSourceFile = searchModuleSymbol.valueDeclaration;
+ if (searchSourceFile.kind === 265 /* SourceFile */) {
+ for (var _a = 0, _b = referencingFile.referencedFiles; _a < _b.length; _a++) {
+ var ref = _b[_a];
+ if (program.getSourceFileFromReference(referencingFile, ref) === searchSourceFile) {
+ refs.push({ kind: "reference", referencingFile: referencingFile, ref: ref });
+ }
+ }
+ for (var _c = 0, _d = referencingFile.typeReferenceDirectives; _c < _d.length; _c++) {
+ var ref = _d[_c];
+ var referenced = program.getResolvedTypeReferenceDirectives().get(ref.fileName);
+ if (referenced !== undefined && referenced.resolvedFileName === searchSourceFile.fileName) {
+ refs.push({ kind: "reference", referencingFile: referencingFile, ref: ref });
+ }
+ }
+ }
+ forEachImport(referencingFile, function (_importDecl, moduleSpecifier) {
+ var moduleSymbol = checker.getSymbolAtLocation(moduleSpecifier);
+ if (moduleSymbol === searchModuleSymbol) {
+ refs.push({ kind: "import", literal: moduleSpecifier });
+ }
+ });
+ }
+ return refs;
+ }
+ FindAllReferences.findModuleReferences = findModuleReferences;
/** 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];
+ for (var _i = 0, sourceFiles_5 = sourceFiles; _i < sourceFiles_5.length; _i++) {
+ var sourceFile = sourceFiles_5[_i];
cancellationToken.throwIfCancellationRequested();
forEachImport(sourceFile, function (importDecl, moduleSpecifier) {
var moduleSymbol = checker.getSymbolAtLocation(moduleSpecifier);
@@ -74701,7 +77559,7 @@ var ts;
}
/** Calls `action` for each import, re-export, or require() in a file. */
function forEachImport(sourceFile, action) {
- if (sourceFile.externalModuleIndicator) {
+ if (sourceFile.externalModuleIndicator || sourceFile.imports !== undefined) {
for (var _i = 0, _a = sourceFile.imports; _i < _a.length; _i++) {
var moduleSpecifier = _a[_i];
action(importerFromModuleSpecifier(moduleSpecifier), moduleSpecifier);
@@ -74729,26 +77587,20 @@ var ts;
}
}
});
- 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 === 238 /* ImportDeclaration */ || decl.kind === 244 /* ExportDeclaration */) {
- return decl;
+ switch (decl.kind) {
+ case 181 /* CallExpression */:
+ case 238 /* ImportDeclaration */:
+ case 244 /* ExportDeclaration */:
+ return decl;
+ case 248 /* ExternalModuleReference */:
+ return decl.parent;
+ default:
+ ts.Debug.fail("Unexpected module specifier parent: " + decl.kind);
}
- ts.Debug.assert(decl.kind === 248 /* ExternalModuleReference */);
- return decl.parent;
}
/**
* Given a local reference, we might notice that it's an import/export and recursively search for references of that.
@@ -74765,7 +77617,7 @@ var ts;
if (parent.kind === 179 /* 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 === 194 /* BinaryExpression */
+ return symbol.declarations.some(function (d) { return d === parent; }) && ts.isBinaryExpression(parent.parent)
? getSpecialPropertyExport(parent.parent, /*useLhsSymbol*/ false)
: undefined;
}
@@ -74778,7 +77630,7 @@ var ts;
else {
var exportNode = getExportNode(parent);
if (exportNode && ts.hasModifier(exportNode, 1 /* Export */)) {
- if (exportNode.kind === 237 /* ImportEqualsDeclaration */ && exportNode.moduleReference === node) {
+ if (ts.isImportEqualsDeclaration(exportNode) && 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;
@@ -74790,19 +77642,25 @@ var ts;
return exportInfo(symbol, getExportKindForDeclaration(exportNode));
}
}
- else if (parent.kind === 243 /* 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 (ts.isExportAssignment(parent)) {
+ return getExportAssignmentExport(parent);
}
- else if (parent.kind === 194 /* BinaryExpression */) {
+ else if (ts.isExportAssignment(parent.parent)) {
+ return getExportAssignmentExport(parent.parent);
+ }
+ else if (ts.isBinaryExpression(parent)) {
return getSpecialPropertyExport(parent, /*useLhsSymbol*/ true);
}
- else if (parent.parent.kind === 194 /* BinaryExpression */) {
+ else if (ts.isBinaryExpression(parent.parent)) {
return getSpecialPropertyExport(parent.parent, /*useLhsSymbol*/ true);
}
}
+ function getExportAssignmentExport(ex) {
+ // Get the symbol for the `export =` node; its parent is the module it's the export of.
+ var exportingModuleSymbol = ex.symbol.parent;
+ ts.Debug.assert(!!exportingModuleSymbol);
+ return { kind: 1 /* Export */, symbol: symbol, exportInfo: { exportingModuleSymbol: exportingModuleSymbol, exportKind: 2 /* ExportEquals */ } };
+ }
function getSpecialPropertyExport(node, useLhsSymbol) {
var kind;
switch (ts.getSpecialPropertyAssignmentKind(node)) {
@@ -74822,19 +77680,19 @@ var ts;
function getImport() {
var isImport = isNodeImport(node);
if (!isImport)
- return;
+ return undefined;
// 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);
- }
+ if (!importedSymbol)
+ return undefined;
+ // 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 = getExportEqualsLocalSymbol(importedSymbol, checker);
+ }
+ if (symbolName(importedSymbol) === symbol.name) {
+ return __assign({ kind: 0 /* Import */, symbol: importedSymbol }, isImport);
}
}
function exportInfo(symbol, kind) {
@@ -74847,6 +77705,20 @@ var ts;
}
}
FindAllReferences.getImportOrExportSymbol = getImportOrExportSymbol;
+ function getExportEqualsLocalSymbol(importedSymbol, checker) {
+ if (importedSymbol.flags & 8388608 /* Alias */) {
+ return checker.getImmediateAliasedSymbol(importedSymbol);
+ }
+ var decl = importedSymbol.valueDeclaration;
+ if (ts.isExportAssignment(decl)) {
+ return decl.expression.symbol;
+ }
+ else if (ts.isBinaryExpression(decl)) {
+ return decl.right.symbol;
+ }
+ ts.Debug.fail();
+ }
+ // If a reference is a class expression, the exported node would be its parent.
// If a reference is a variable declaration, the exported node would be the variable statement.
function getExportNode(parent) {
if (parent.kind === 226 /* VariableDeclaration */) {
@@ -74885,23 +77757,25 @@ var ts;
if (symbol.name !== "default") {
return symbol.name;
}
- var name = ts.forEach(symbol.declarations, function (_a) {
- var name = _a.name;
+ return ts.forEach(symbol.declarations, function (decl) {
+ if (ts.isExportAssignment(decl)) {
+ return ts.isIdentifier(decl.expression) ? decl.expression.text : undefined;
+ }
+ var name = ts.getNameOfDeclaration(decl);
return name && name.kind === 71 /* 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)
+ 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) {
@@ -74937,12 +77811,13 @@ var ts;
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);
+ function findReferencedSymbols(program, cancellationToken, sourceFiles, sourceFile, position) {
+ var referencedSymbols = findAllReferencedSymbols(program, cancellationToken, sourceFiles, sourceFile, position);
if (!referencedSymbols || !referencedSymbols.length) {
return undefined;
}
var out = [];
+ var checker = program.getTypeChecker();
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.
@@ -74953,44 +77828,50 @@ var ts;
return out;
}
FindAllReferences.findReferencedSymbols = findReferencedSymbols;
- function getImplementationsAtPosition(checker, cancellationToken, sourceFiles, sourceFile, position) {
- var node = ts.getTouchingPropertyName(sourceFile, position);
- var referenceEntries = getImplementationReferenceEntries(checker, cancellationToken, sourceFiles, node);
+ function getImplementationsAtPosition(program, cancellationToken, sourceFiles, sourceFile, position) {
+ // A node in a JSDoc comment can't have an implementation anyway.
+ var node = ts.getTouchingPropertyName(sourceFile, position, /*includeJsDocComment*/ false);
+ var referenceEntries = getImplementationReferenceEntries(program, cancellationToken, sourceFiles, node);
+ var checker = program.getTypeChecker();
return ts.map(referenceEntries, function (entry) { return toImplementationLocation(entry, checker); });
}
FindAllReferences.getImplementationsAtPosition = getImplementationsAtPosition;
- function getImplementationReferenceEntries(typeChecker, cancellationToken, sourceFiles, node) {
+ function getImplementationReferenceEntries(program, cancellationToken, sourceFiles, node) {
+ if (node.kind === 265 /* SourceFile */) {
+ return undefined;
+ }
+ var checker = program.getTypeChecker();
// 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 === 262 /* ShorthandPropertyAssignment */) {
- var result_4 = [];
- FindAllReferences.Core.getReferenceEntriesForShorthandPropertyAssignment(node, typeChecker, function (node) { return result_4.push(nodeEntry(node)); });
- return result_4;
+ var result_5 = [];
+ FindAllReferences.Core.getReferenceEntriesForShorthandPropertyAssignment(node, checker, function (node) { return result_5.push(nodeEntry(node)); });
+ return result_5;
}
else if (node.kind === 97 /* 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);
+ var symbol = checker.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 });
+ return getReferenceEntriesForNode(node, program, sourceFiles, cancellationToken, { implementations: true });
}
}
- function findReferencedEntries(checker, cancellationToken, sourceFiles, sourceFile, position, options) {
- var x = flattenEntries(findAllReferencedSymbols(checker, cancellationToken, sourceFiles, sourceFile, position, options));
+ function findReferencedEntries(program, cancellationToken, sourceFiles, sourceFile, position, options) {
+ var x = flattenEntries(findAllReferencedSymbols(program, cancellationToken, sourceFiles, sourceFile, position, options));
return ts.map(x, toReferenceEntry);
}
FindAllReferences.findReferencedEntries = findReferencedEntries;
- function getReferenceEntriesForNode(node, sourceFiles, checker, cancellationToken, options) {
+ function getReferenceEntriesForNode(node, program, sourceFiles, cancellationToken, options) {
if (options === void 0) { options = {}; }
- return flattenEntries(FindAllReferences.Core.getReferencedSymbolsForNode(node, sourceFiles, checker, cancellationToken, options));
+ return flattenEntries(FindAllReferences.Core.getReferencedSymbolsForNode(node, program, sourceFiles, cancellationToken, options));
}
FindAllReferences.getReferenceEntriesForNode = getReferenceEntriesForNode;
- function findAllReferencedSymbols(checker, cancellationToken, sourceFiles, sourceFile, position, options) {
+ function findAllReferencedSymbols(program, cancellationToken, sourceFiles, sourceFile, position, options) {
var node = ts.getTouchingPropertyName(sourceFile, position, /*includeJsDocComment*/ true);
- return FindAllReferences.Core.getReferencedSymbolsForNode(node, sourceFiles, checker, cancellationToken, options);
+ return FindAllReferences.Core.getReferencedSymbolsForNode(node, program, sourceFiles, cancellationToken, options);
}
function flattenEntries(referenceSymbols) {
return referenceSymbols && ts.flatMap(referenceSymbols, function (r) { return r.references; });
@@ -75000,10 +77881,6 @@ var ts;
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 };
@@ -75057,7 +77934,7 @@ var ts;
fileName: node.getSourceFile().fileName,
textSpan: getTextSpan(node),
isWriteAccess: isWriteAccess(node),
- isDefinition: ts.isDeclarationName(node) || ts.isLiteralComputedPropertyDeclarationName(node),
+ isDefinition: ts.isAnyDeclarationName(node) || ts.isLiteralComputedPropertyDeclarationName(node),
isInString: isInString
};
}
@@ -75119,20 +77996,19 @@ var ts;
}
/** 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 === 71 /* Identifier */ && ts.isDeclarationName(node)) {
+ if (ts.isAnyDeclarationName(node)) {
return true;
}
var parent = node.parent;
- if (parent) {
- if (parent.kind === 193 /* PostfixUnaryExpression */ || parent.kind === 192 /* PrefixUnaryExpression */) {
+ switch (parent && parent.kind) {
+ case 193 /* PostfixUnaryExpression */:
+ case 192 /* PrefixUnaryExpression */:
return true;
- }
- else if (parent.kind === 194 /* BinaryExpression */ && parent.left === node) {
- var operator = parent.operatorToken.kind;
- return 58 /* FirstAssignment */ <= operator && operator <= 70 /* LastAssignment */;
- }
+ case 194 /* BinaryExpression */:
+ return parent.left === node && ts.isAssignmentOperator(parent.operatorToken.kind);
+ default:
+ return false;
}
- return false;
}
})(FindAllReferences = ts.FindAllReferences || (ts.FindAllReferences = {}));
})(ts || (ts = {}));
@@ -75144,7 +78020,7 @@ var ts;
var Core;
(function (Core) {
/** Core find-all-references algorithm. Handles special cases before delegating to `getReferencedSymbolsForSymbol`. */
- function getReferencedSymbolsForNode(node, sourceFiles, checker, cancellationToken, options) {
+ function getReferencedSymbolsForNode(node, program, sourceFiles, cancellationToken, options) {
if (options === void 0) { options = {}; }
if (node.kind === 265 /* SourceFile */) {
return undefined;
@@ -75155,6 +78031,7 @@ var ts;
return special;
}
}
+ var checker = program.getTypeChecker();
var symbol = checker.getSymbolAtLocation(node);
// Could not find a symbol e.g. unknown identifier
if (!symbol) {
@@ -75165,13 +78042,60 @@ var ts;
// 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;
+ if (symbol.flags & 1536 /* Module */ && isModuleReferenceLocation(node)) {
+ return getReferencedSymbolsForModule(program, symbol, sourceFiles);
}
return getReferencedSymbolsForSymbol(symbol, node, sourceFiles, checker, cancellationToken, options);
}
Core.getReferencedSymbolsForNode = getReferencedSymbolsForNode;
+ function isModuleReferenceLocation(node) {
+ if (node.kind !== 9 /* StringLiteral */) {
+ return false;
+ }
+ switch (node.parent.kind) {
+ case 233 /* ModuleDeclaration */:
+ case 248 /* ExternalModuleReference */:
+ case 238 /* ImportDeclaration */:
+ case 244 /* ExportDeclaration */:
+ return true;
+ case 181 /* CallExpression */:
+ return ts.isRequireCall(node.parent, /*checkArgumentIsStringLiteral*/ false) || ts.isImportCall(node.parent);
+ default:
+ return false;
+ }
+ }
+ function getReferencedSymbolsForModule(program, symbol, sourceFiles) {
+ ts.Debug.assert(!!symbol.valueDeclaration);
+ var references = FindAllReferences.findModuleReferences(program, sourceFiles, symbol).map(function (reference) {
+ if (reference.kind === "import") {
+ return { type: "node", node: reference.literal };
+ }
+ else {
+ return {
+ type: "span",
+ fileName: reference.referencingFile.fileName,
+ textSpan: ts.createTextSpanFromRange(reference.ref),
+ };
+ }
+ });
+ for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
+ var decl = _a[_i];
+ switch (decl.kind) {
+ case 265 /* SourceFile */:
+ // Don't include the source file itself. (This may not be ideal behavior, but awkward to include an entire file as a reference.)
+ break;
+ case 233 /* ModuleDeclaration */:
+ references.push({ type: "node", node: decl.name });
+ break;
+ default:
+ ts.Debug.fail("Expected a module symbol to be declared by a SourceFile or ModuleDeclaration.");
+ }
+ }
+ return [{
+ definition: { type: "symbol", symbol: symbol, node: symbol.valueDeclaration },
+ references: references
+ }];
+ }
/** getReferencedSymbols for special node kinds. */
function getReferencedSymbolsSpecial(node, sourceFiles, cancellationToken) {
if (ts.isTypeKeyword(node.kind)) {
@@ -75204,7 +78128,7 @@ var ts;
// 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 state = new State(sourceFiles, /*isForConstructor*/ node.kind === 123 /* ConstructorKeyword */, 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).
@@ -75234,53 +78158,94 @@ var ts;
}
return symbol;
}
- 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 === 123 /* 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) {
+ /**
+ * Holds all state needed for the finding references.
+ * Unlike `Search`, there is only one `State`.
+ */
+ var State = (function () {
+ function State(sourceFiles,
+ /** True if we're searching for constructor references. */
+ isForConstructor, checker, cancellationToken, searchMeaning, options, result) {
+ this.sourceFiles = sourceFiles;
+ this.isForConstructor = isForConstructor;
+ this.checker = checker;
+ this.cancellationToken = cancellationToken;
+ this.searchMeaning = searchMeaning;
+ this.options = options;
+ this.result = result;
+ /** Cache for `explicitlyinheritsFrom`. */
+ this.inheritsFromCache = ts.createMap();
+ /**
+ * 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.
+ */
+ this.markSeenContainingTypeReference = ts.nodeSeenTracker();
+ /**
+ * It's possible that we will encounter the right side of `export { foo as bar } from "x";` more than once.
+ * For example:
+ * // b.ts
+ * export { foo as bar } from "./a";
+ * import { bar } from "./b";
+ *
+ * Normally at `foo as bar` we directly add `foo` and do not locally search for it (since it doesn't declare a local).
+ * But another reference to it may appear in the same source file.
+ * See `tests/cases/fourslash/transitiveExportImports3.ts`.
+ */
+ this.markSeenReExportRHS = ts.nodeSeenTracker();
+ this.symbolIdToReferences = [];
+ // Source file ID → symbol ID → Whether the symbol has been searched for in the source file.
+ this.sourceFileToSeenSymbols = [];
+ }
+ /** Gets every place to look for references of an exported symbols. See `ImportsResult` in `importTracker.ts` for more documentation. */
+ State.prototype.getImportSearches = function (exportSymbol, exportInfo) {
+ if (!this.importTracker)
+ this.importTracker = FindAllReferences.createImportTracker(this.sourceFiles, this.checker, this.cancellationToken);
+ return this.importTracker(exportSymbol, exportInfo, this.options.isForRename);
+ };
+ /** @param allSearchSymbols set of additinal symbols for use by `includes`. */
+ State.prototype.createSearch = function (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 _a = searchOptions.text, text = _a === void 0 ? ts.stripQuotes(ts.getDeclaredName(this.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];
+ var parents = this.options.implementations && getParentSymbolsOfPropertyAccess(location, symbol, this.checker);
+ return {
+ location: location, symbol: symbol, comingFrom: comingFrom, text: text, escapedText: escapedText, parents: parents,
+ includes: function (referenceSymbol) { return allSearchSymbols ? ts.contains(allSearchSymbols, referenceSymbol) : referenceSymbol === symbol; },
+ };
+ };
+ /**
+ * Callback to add references for a particular searched symbol.
+ * This initializes a reference group, so only call this if you will add at least one reference.
+ */
+ State.prototype.referenceAdder = function (searchSymbol, searchLocation) {
+ var symbolId = ts.getSymbolId(searchSymbol);
+ var references = this.symbolIdToReferences[symbolId];
if (!references) {
- references = symbolIdToReferences[symbolId] = [];
- result.push({ definition: { type: "symbol", symbol: referenceSymbol, node: searchLocation }, references: references });
+ references = this.symbolIdToReferences[symbolId] = [];
+ this.result.push({ definition: { type: "symbol", symbol: searchSymbol, node: searchLocation }, references: references });
}
return function (node) { return references.push(FindAllReferences.nodeEntry(node)); };
- }
- function addStringOrCommentReference(fileName, textSpan) {
- result.push({
+ };
+ /** Add a reference with no associated definition. */
+ State.prototype.addStringOrCommentReference = function (fileName, textSpan) {
+ this.result.push({
definition: undefined,
references: [{ type: "span", fileName: fileName, textSpan: textSpan }]
});
- }
- function markSearchedSymbol(sourceFile, symbol) {
+ };
+ /** Returns `true` the first time we search for a symbol in a file and `false` afterwards. */
+ State.prototype.markSearchedSymbol = function (sourceFile, symbol) {
var sourceId = ts.getNodeId(sourceFile);
var symbolId = ts.getSymbolId(symbol);
- var seenSymbols = sourceFileToSeenSymbols[sourceId] || (sourceFileToSeenSymbols[sourceId] = []);
+ var seenSymbols = this.sourceFileToSeenSymbols[sourceId] || (this.sourceFileToSeenSymbols[sourceId] = []);
return !seenSymbols[symbolId] && (seenSymbols[symbolId] = true);
- }
- }
+ };
+ return State;
+ }());
/** 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;
@@ -75305,7 +78270,7 @@ var ts;
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" });
+ indirectSearch = state.options.isForRename ? undefined : state.createSearch(exportLocation, exportSymbol, 1 /* Export */, { text: "default" });
break;
case 2 /* ExportEquals */:
break;
@@ -75369,10 +78334,12 @@ var ts;
}
// If this is private property or method, the scope is the containing class
if (flags & (4 /* Property */ | 8192 /* Method */)) {
- var privateDeclaration = ts.find(declarations, function (d) { return !!(ts.getModifierFlags(d) & 8 /* Private */); });
+ var privateDeclaration = ts.find(declarations, function (d) { return ts.hasModifier(d, 8 /* Private */); });
if (privateDeclaration) {
return ts.getAncestor(privateDeclaration, 229 /* ClassDeclaration */);
}
+ // Else this is a public property and could be accessed from anywhere.
+ 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
@@ -75385,10 +78352,6 @@ var ts;
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;
for (var _i = 0, declarations_10 = declarations; _i < declarations_10.length; _i++) {
var declaration = declarations_10[_i];
@@ -75412,7 +78375,8 @@ var ts;
// 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) {
+ function getPossibleSymbolReferencePositions(sourceFile, symbolName, container) {
+ if (container === void 0) { container = sourceFile; }
var positions = [];
/// TODO: Cache symbol existence for files to save text search
// Also, need to make this work for unicode escapes.
@@ -75423,10 +78387,10 @@ var ts;
var text = sourceFile.text;
var sourceLength = text.length;
var symbolNameLength = symbolName.length;
- var position = text.indexOf(symbolName, start);
+ var position = text.indexOf(symbolName, container.pos);
while (position >= 0) {
// If we are past the end, stop looking
- if (position > end)
+ if (position > container.end)
break;
// We found a match. Make sure it's not part of a larger word (i.e. the char
// before and after it have to be a non-identifier char).
@@ -75444,16 +78408,12 @@ var ts;
var references = [];
var sourceFile = container.getSourceFile();
var labelName = targetLabel.text;
- var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, labelName, container.getStart(), container.getEnd());
+ var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, labelName, container);
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) {
- continue;
- }
+ var node = ts.getTouchingWord(sourceFile, position, /*includeJsDocComment*/ false);
// 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)) {
+ if (node && (node === targetLabel || (ts.isJumpStatementTarget(node) && ts.getTargetLabel(node, labelName) === targetLabel))) {
references.push(FindAllReferences.nodeEntry(node));
}
}
@@ -75463,31 +78423,30 @@ var ts;
// Compare the length so we filter out strict superstrings of the symbol we are looking for
switch (node && node.kind) {
case 71 /* Identifier */:
- return node.getWidth() === searchSymbolName.length;
+ return ts.unescapeIdentifier(node.text).length === 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;
+ node.text.length === searchSymbolName.length;
case 8 /* NumericLiteral */:
- return ts.isLiteralNameOfPropertyDeclarationOrIndexAccess(node) && node.getWidth() === searchSymbolName.length;
+ return ts.isLiteralNameOfPropertyDeclarationOrIndexAccess(node) && node.text.length === 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];
+ for (var _i = 0, sourceFiles_6 = sourceFiles; _i < sourceFiles_6.length; _i++) {
+ var sourceFile = sourceFiles_6[_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());
+ var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, searchText, sourceFile);
for (var _i = 0, possiblePositions_2 = possiblePositions; _i < possiblePositions_2.length; _i++) {
var position = possiblePositions_2[_i];
- var referenceLocation = ts.getTouchingPropertyName(sourceFile, position);
+ var referenceLocation = ts.getTouchingPropertyName(sourceFile, position, /*includeJsDocComment*/ true);
if (referenceLocation.kind === kind) {
references.push(FindAllReferences.nodeEntry(referenceLocation));
}
@@ -75506,20 +78465,18 @@ var ts;
if (!state.markSearchedSymbol(sourceFile, search.symbol)) {
return;
}
- 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];
+ for (var _i = 0, _a = getPossibleSymbolReferencePositions(sourceFile, search.text, container); _i < _a.length; _i++) {
+ var position = _a[_i];
getReferencesAtLocation(sourceFile, position, search, state);
}
}
function getReferencesAtLocation(sourceFile, position, search, state) {
- var referenceLocation = ts.getTouchingPropertyName(sourceFile, position);
+ var referenceLocation = ts.getTouchingPropertyName(sourceFile, position, /*includeJsDocComment*/ true);
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))) {
+ if (!state.options.implementations && (state.options.findInStrings && ts.isInString(sourceFile, position) || state.options.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
@@ -75574,7 +78531,7 @@ var ts;
if (!exportDeclaration.moduleSpecifier) {
addRef();
}
- if (!state.isForRename && state.markSeenReExportRHS(name)) {
+ if (!state.options.isForRename && state.markSeenReExportRHS(name)) {
addReference(name, referenceSymbol, name, state);
}
}
@@ -75584,7 +78541,7 @@ var ts;
}
}
// For `export { foo as bar }`, rename `foo`, but not `bar`.
- if (!(referenceLocation === propertyName && state.isForRename)) {
+ if (!(referenceLocation === propertyName && state.options.isForRename)) {
var exportKind = referenceLocation.originalKeywordKind === 79 /* DefaultKeyword */ ? 1 /* Default */ : 0 /* Named */;
var exportInfo = FindAllReferences.getExportInfo(referenceSymbol, exportKind, state.checker);
ts.Debug.assert(!!exportInfo);
@@ -75620,7 +78577,7 @@ var ts;
return;
var symbol = importOrExport.symbol;
if (importOrExport.kind === 0 /* Import */) {
- if (!state.isForRename || importOrExport.isNamedImport) {
+ if (!state.options.isForRename || importOrExport.isNamedImport) {
searchForImportedSymbol(symbol, state);
}
}
@@ -75640,12 +78597,12 @@ var ts;
* position of property accessing, the referenceEntry of such position will be handled in the first case.
*/
if (!(flags & 134217728 /* Transient */) && search.includes(shorthandValueSymbol)) {
- addReference(valueDeclaration.name, shorthandValueSymbol, search.location, state);
+ addReference(ts.getNameOfDeclaration(valueDeclaration), shorthandValueSymbol, search.location, state);
}
}
function addReference(referenceLocation, relatedSymbol, searchLocation, state) {
var addRef = state.referenceAdder(relatedSymbol, searchLocation);
- if (state.implementations) {
+ if (state.options.implementations) {
addImplementationReferences(referenceLocation, addRef, state);
}
else {
@@ -75906,10 +78863,10 @@ var ts;
}
var references = [];
var sourceFile = searchSpaceNode.getSourceFile();
- var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "super", searchSpaceNode.getStart(), searchSpaceNode.getEnd());
- for (var _i = 0, possiblePositions_4 = possiblePositions; _i < possiblePositions_4.length; _i++) {
- var position = possiblePositions_4[_i];
- var node = ts.getTouchingWord(sourceFile, position);
+ var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "super", searchSpaceNode);
+ for (var _i = 0, possiblePositions_3 = possiblePositions; _i < possiblePositions_3.length; _i++) {
+ var position = possiblePositions_3[_i];
+ var node = ts.getTouchingWord(sourceFile, position, /*includeJsDocComment*/ false);
if (!node || node.kind !== 97 /* SuperKeyword */) {
continue;
}
@@ -75960,13 +78917,13 @@ var ts;
if (searchSpaceNode.kind === 265 /* SourceFile */) {
ts.forEach(sourceFiles, function (sourceFile) {
cancellationToken.throwIfCancellationRequested();
- possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "this", sourceFile.getStart(), sourceFile.getEnd());
+ possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "this");
getThisReferencesInFile(sourceFile, sourceFile, possiblePositions, references);
});
}
else {
var sourceFile = searchSpaceNode.getSourceFile();
- possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "this", searchSpaceNode.getStart(), searchSpaceNode.getEnd());
+ possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "this", searchSpaceNode);
getThisReferencesInFile(sourceFile, searchSpaceNode, possiblePositions, references);
}
return [{
@@ -75975,7 +78932,7 @@ var ts;
}];
function getThisReferencesInFile(sourceFile, searchSpaceNode, possiblePositions, result) {
ts.forEach(possiblePositions, function (position) {
- var node = ts.getTouchingWord(sourceFile, position);
+ var node = ts.getTouchingWord(sourceFile, position, /*includeJsDocComment*/ false);
if (!node || !ts.isThis(node)) {
return;
}
@@ -76012,10 +78969,10 @@ var ts;
}
function getReferencesForStringLiteral(node, sourceFiles, cancellationToken) {
var references = [];
- for (var _i = 0, sourceFiles_6 = sourceFiles; _i < sourceFiles_6.length; _i++) {
- var sourceFile = sourceFiles_6[_i];
+ for (var _i = 0, sourceFiles_7 = sourceFiles; _i < sourceFiles_7.length; _i++) {
+ var sourceFile = sourceFiles_7[_i];
cancellationToken.throwIfCancellationRequested();
- var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, node.text, sourceFile.getStart(), sourceFile.getEnd());
+ var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, node.text);
getReferencesForStringLiteralInFile(sourceFile, node.text, possiblePositions, references);
}
return [{
@@ -76023,9 +78980,9 @@ var ts;
references: references
}];
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);
+ for (var _i = 0, possiblePositions_4 = possiblePositions; _i < possiblePositions_4.length; _i++) {
+ var position = possiblePositions_4[_i];
+ var node_7 = ts.getTouchingWord(sourceFile, position, /*includeJsDocComment*/ false);
if (node_7 && node_7.kind === 9 /* StringLiteral */ && node_7.text === searchText) {
references.push(FindAllReferences.nodeEntry(node_7, /*isInString*/ true));
}
@@ -76221,20 +79178,20 @@ var ts;
var contextualType = checker.getContextualType(objectLiteral);
var name = getNameFromObjectLiteralElement(node);
if (name && contextualType) {
- var result_5 = [];
+ var result_6 = [];
var symbol = contextualType.getProperty(name);
if (symbol) {
- result_5.push(symbol);
+ result_6.push(symbol);
}
if (contextualType.flags & 65536 /* Union */) {
ts.forEach(contextualType.types, function (t) {
var symbol = t.getProperty(name);
if (symbol) {
- result_5.push(symbol);
+ result_6.push(symbol);
}
});
}
- return result_5;
+ return result_6;
}
return undefined;
}
@@ -76369,7 +79326,7 @@ var ts;
if (referenceFile) {
return [getDefinitionInfoForFileReference(comment.fileName, referenceFile.fileName)];
}
- return undefined;
+ // Might still be on jsdoc, so keep looking.
}
// Type reference directives
var typeReferenceDirective = findReferenceInPosition(sourceFile.typeReferenceDirectives, position);
@@ -76378,7 +79335,7 @@ var ts;
return referenceFile && referenceFile.resolvedFileName &&
[getDefinitionInfoForFileReference(typeReferenceDirective.fileName, referenceFile.resolvedFileName)];
}
- var node = ts.getTouchingPropertyName(sourceFile, position);
+ var node = ts.getTouchingPropertyName(sourceFile, position, /*includeJsDocComment*/ true);
if (node === sourceFile) {
return undefined;
}
@@ -76403,17 +79360,10 @@ var ts;
// get the aliased symbol instead. This allows for goto def on an import e.g.
// import {A, B} from "mod";
// to jump to the implementation directly.
- if (symbol.flags & 8388608 /* Alias */) {
- var declaration = symbol.declarations[0];
- // Go to the original declaration for cases:
- //
- // (1) when the aliased symbol was declared in the location(parent).
- // (2) when the aliased symbol is originating from a named import.
- //
- if (node.kind === 71 /* Identifier */ &&
- (node.parent === declaration ||
- (declaration.kind === 242 /* ImportSpecifier */ && declaration.parent && declaration.parent.kind === 241 /* NamedImports */))) {
- symbol = typeChecker.getAliasedSymbol(symbol);
+ if (symbol.flags & 8388608 /* Alias */ && shouldSkipAlias(node, symbol.declarations[0])) {
+ var aliased = typeChecker.getAliasedSymbol(symbol);
+ if (aliased.declarations) {
+ symbol = aliased;
}
}
// Because name in short-hand property assignment has two different meanings: property name and property value,
@@ -76432,16 +79382,6 @@ 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
@@ -76452,23 +79392,17 @@ var ts;
// 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;
- }
+ if (element && typeChecker.getContextualType(element.parent)) {
+ return ts.flatMap(ts.getPropertySymbolsFromContextualType(typeChecker, element), function (propertySymbol) {
+ return getDefinitionFromSymbol(typeChecker, propertySymbol, node);
+ });
}
return getDefinitionFromSymbol(typeChecker, symbol, node);
}
GoToDefinition.getDefinitionAtPosition = getDefinitionAtPosition;
/// Goto type
function getTypeDefinitionAtPosition(typeChecker, sourceFile, position) {
- var node = ts.getTouchingPropertyName(sourceFile, position);
+ var node = ts.getTouchingPropertyName(sourceFile, position, /*includeJsDocComment*/ true);
if (node === sourceFile) {
return undefined;
}
@@ -76481,13 +79415,13 @@ var ts;
return undefined;
}
if (type.flags & 65536 /* Union */ && !(type.flags & 16 /* Enum */)) {
- var result_6 = [];
+ var result_7 = [];
ts.forEach(type.types, function (t) {
if (t.symbol) {
- ts.addRange(/*to*/ result_6, /*from*/ getDefinitionFromSymbol(typeChecker, t.symbol, node));
+ ts.addRange(/*to*/ result_7, /*from*/ getDefinitionFromSymbol(typeChecker, t.symbol, node));
}
});
- return result_6;
+ return result_7;
}
if (!type.symbol) {
return undefined;
@@ -76495,6 +79429,28 @@ var ts;
return getDefinitionFromSymbol(typeChecker, type.symbol, node);
}
GoToDefinition.getTypeDefinitionAtPosition = getTypeDefinitionAtPosition;
+ // Go to the original declaration for cases:
+ //
+ // (1) when the aliased symbol was declared in the location(parent).
+ // (2) when the aliased symbol is originating from an import.
+ //
+ function shouldSkipAlias(node, declaration) {
+ if (node.kind !== 71 /* Identifier */) {
+ return false;
+ }
+ if (node.parent === declaration) {
+ return true;
+ }
+ switch (declaration.kind) {
+ case 239 /* ImportClause */:
+ case 237 /* ImportEqualsDeclaration */:
+ return true;
+ case 242 /* ImportSpecifier */:
+ return declaration.parent.kind === 241 /* NamedImports */;
+ default:
+ return false;
+ }
+ }
function getDefinitionFromSymbol(typeChecker, symbol, node) {
var result = [];
var declarations = symbol.getDeclarations();
@@ -76565,7 +79521,7 @@ var ts;
}
/** 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);
+ return createDefinitionInfoFromName(ts.getNameOfDeclaration(node) || node, symbolKind, symbolName, containerName);
}
/** Creates a DefinitionInfo directly from the name of a declaration. */
function createDefinitionInfoFromName(name, symbolKind, symbolName, containerName) {
@@ -76593,7 +79549,7 @@ var ts;
function findReferenceInPosition(refs, pos) {
for (var _i = 0, refs_1 = refs; _i < refs_1.length; _i++) {
var ref = refs_1[_i];
- if (ref.pos <= pos && pos < ref.end) {
+ if (ref.pos <= pos && pos <= ref.end) {
return ref;
}
}
@@ -76665,6 +79621,7 @@ var ts;
"namespace",
"param",
"private",
+ "prop",
"property",
"public",
"requires",
@@ -76675,8 +79632,6 @@ var ts;
"throws",
"type",
"typedef",
- "property",
- "prop",
"version"
];
var jsDocTagNameCompletionEntries;
@@ -76771,6 +79726,24 @@ var ts;
}));
}
JsDoc.getJSDocTagCompletions = getJSDocTagCompletions;
+ function getJSDocParameterNameCompletions(tag) {
+ var nameThusFar = tag.name.text;
+ var jsdoc = tag.parent;
+ var fn = jsdoc.parent;
+ if (!ts.isFunctionLike(fn))
+ return [];
+ return ts.mapDefined(fn.parameters, function (param) {
+ if (!ts.isIdentifier(param.name))
+ return undefined;
+ var name = param.name.text;
+ if (jsdoc.tags.some(function (t) { return t !== tag && ts.isJSDocParameterTag(t) && t.name.text === name; })
+ || nameThusFar !== undefined && !ts.startsWith(name, nameThusFar)) {
+ return undefined;
+ }
+ return { name: name, kind: ts.ScriptElementKind.parameterElement, kindModifiers: "", sortText: "0" };
+ });
+ }
+ JsDoc.getJSDocParameterNameCompletions = getJSDocParameterNameCompletions;
/**
* Checks if position points to a valid position to add JSDoc comments, and if so,
* returns the appropriate template. Otherwise returns an empty string.
@@ -76796,7 +79769,7 @@ var ts;
if (ts.isInString(sourceFile, position) || ts.isInComment(sourceFile, position) || ts.hasDocComment(sourceFile, position)) {
return undefined;
}
- var tokenAtPos = ts.getTokenAtPosition(sourceFile, position);
+ var tokenAtPos = ts.getTokenAtPosition(sourceFile, position, /*includeJsDocComment*/ false);
var tokenStart = tokenAtPos.getStart();
if (!tokenAtPos || tokenStart < position) {
return undefined;
@@ -77059,7 +80032,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 safeList.has(f); }));
+ mergeTypings(ts.mapDefined(cleanedTypingNames, function (f) { return safeList.get(f); }));
}
var hasJsxFile = ts.forEach(fileNames, function (f) { return ts.ensureScriptKind(f, ts.getScriptKindFromFileName(f)) === 2 /* JSX */; });
if (hasJsxFile) {
@@ -77124,7 +80097,7 @@ var ts;
function getNavigateToItems(sourceFiles, checker, cancellationToken, searchValue, maxResultCount, excludeDtsFiles) {
var patternMatcher = ts.createPatternMatcher(searchValue);
var rawItems = [];
- var _loop_4 = function (sourceFile) {
+ var _loop_5 = function (sourceFile) {
cancellationToken.throwIfCancellationRequested();
if (excludeDtsFiles && ts.fileExtensionIs(sourceFile.fileName, ".d.ts")) {
return "continue";
@@ -77159,9 +80132,9 @@ var ts;
});
};
// 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);
+ for (var _i = 0, sourceFiles_8 = sourceFiles; _i < sourceFiles_8.length; _i++) {
+ var sourceFile = sourceFiles_8[_i];
+ _loop_5(sourceFile);
}
// Remove imports when the imported declaration is already in the list and has the same name.
rawItems = ts.filter(rawItems, function (item) {
@@ -77203,17 +80176,20 @@ var ts;
return undefined;
}
function tryAddSingleDeclarationName(declaration, containers) {
- if (declaration && declaration.name) {
- var text = getTextOfIdentifierOrLiteral(declaration.name);
- if (text !== undefined) {
- containers.unshift(text);
- }
- else if (declaration.name.kind === 144 /* ComputedPropertyName */) {
- return tryAddComputedPropertyName(declaration.name.expression, containers, /*includeLastPortion*/ true);
- }
- else {
- // Don't know how to add this.
- return false;
+ if (declaration) {
+ var name = ts.getNameOfDeclaration(declaration);
+ if (name) {
+ var text = getTextOfIdentifierOrLiteral(name);
+ if (text !== undefined) {
+ containers.unshift(text);
+ }
+ else if (name.kind === 144 /* ComputedPropertyName */) {
+ return tryAddComputedPropertyName(name.expression, containers, /*includeLastPortion*/ true);
+ }
+ else {
+ // Don't know how to add this.
+ return false;
+ }
}
}
return true;
@@ -77242,8 +80218,9 @@ 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 === 144 /* ComputedPropertyName */) {
- if (!tryAddComputedPropertyName(declaration.name.expression, containers, /*includeLastPortion*/ false)) {
+ var name = ts.getNameOfDeclaration(declaration);
+ if (name.kind === 144 /* ComputedPropertyName */) {
+ if (!tryAddComputedPropertyName(name.expression, containers, /*includeLastPortion*/ false)) {
return undefined;
}
}
@@ -77281,6 +80258,7 @@ var ts;
function createNavigateToItem(rawItem) {
var declaration = rawItem.declaration;
var container = ts.getContainerNode(declaration);
+ var containerName = container && ts.getNameOfDeclaration(container);
return {
name: rawItem.name,
kind: ts.getNodeKind(declaration),
@@ -77290,8 +80268,8 @@ var ts;
fileName: rawItem.fileName,
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) : ""
+ containerName: containerName ? containerName.text : "",
+ containerKind: containerName ? ts.getNodeKind(container) : ""
};
}
}
@@ -77531,7 +80509,7 @@ var ts;
default:
ts.forEach(node.jsDoc, function (jsDoc) {
ts.forEach(jsDoc.tags, function (tag) {
- if (tag.kind === 290 /* JSDocTypedefTag */) {
+ if (tag.kind === 291 /* JSDocTypedefTag */) {
addLeafNode(tag);
}
});
@@ -77543,8 +80521,8 @@ var ts;
function mergeChildren(children) {
var nameToItems = ts.createMap();
ts.filterMutate(children, function (child) {
- var decl = child.node;
- var name = decl.name && nodeText(decl.name);
+ var declName = ts.getNameOfDeclaration(child.node);
+ var name = declName && nodeText(declName);
if (!name) {
// Anonymous items are never merged.
return true;
@@ -77633,16 +80611,16 @@ var ts;
if (node.kind === 233 /* ModuleDeclaration */) {
return getModuleName(node);
}
- var decl = node;
- if (decl.name) {
- return ts.getPropertyNameForPropertyNameNode(decl.name);
+ var declName = ts.getNameOfDeclaration(node);
+ if (declName) {
+ return ts.getPropertyNameForPropertyNameNode(declName);
}
switch (node.kind) {
case 186 /* FunctionExpression */:
case 187 /* ArrowFunction */:
case 199 /* ClassExpression */:
return getFunctionOrClassName(node);
- case 290 /* JSDocTypedefTag */:
+ case 291 /* JSDocTypedefTag */:
return getJSDocTypedefTagName(node);
default:
return undefined;
@@ -77652,7 +80630,7 @@ var ts;
if (node.kind === 233 /* ModuleDeclaration */) {
return getModuleName(node);
}
- var name = node.name;
+ var name = ts.getNameOfDeclaration(node);
if (name) {
var text = nodeText(name);
if (text.length > 0) {
@@ -77685,7 +80663,7 @@ var ts;
return "()";
case 157 /* IndexSignature */:
return "[]";
- case 290 /* JSDocTypedefTag */:
+ case 291 /* JSDocTypedefTag */:
return getJSDocTypedefTagName(node);
default:
return "<unknown>";
@@ -77733,7 +80711,7 @@ var ts;
case 233 /* ModuleDeclaration */:
case 265 /* SourceFile */:
case 231 /* TypeAliasDeclaration */:
- case 290 /* JSDocTypedefTag */:
+ case 291 /* JSDocTypedefTag */:
return true;
case 152 /* Constructor */:
case 151 /* MethodDeclaration */:
@@ -78690,7 +81668,15 @@ var ts;
var token = ts.scanner.getToken();
if (token === 91 /* ImportKeyword */) {
token = nextToken();
- if (token === 9 /* StringLiteral */) {
+ if (token === 19 /* OpenParenToken */) {
+ token = nextToken();
+ if (token === 9 /* StringLiteral */) {
+ // import("mod");
+ recordModuleName();
+ return true;
+ }
+ }
+ else if (token === 9 /* StringLiteral */) {
// import "mod";
recordModuleName();
return true;
@@ -78874,7 +81860,7 @@ var ts;
// import * as NS from "mod"
// import d, {a, b as B} from "mod"
// import i = require("mod");
- //
+ // import("mod");
// export * from "mod"
// export {a as b} from "mod"
// export import i = require("mod")
@@ -79030,138 +82016,6 @@ var ts;
(function (ts) {
var SignatureHelp;
(function (SignatureHelp) {
- // A partially written generic type expression is not guaranteed to have the correct syntax tree. the expression could be parsed as less than/greater than expression or a comma expression
- // or some other combination depending on what the user has typed so far. For the purposes of signature help we need to consider any location after "<" as a possible generic type reference.
- // To do this, the method will back parse the expression starting at the position required. it will try to parse the current expression as a generic type expression, if it did succeed it
- // will return the generic identifier that started the expression (e.g. "foo" in "foo<any, |"). It is then up to the caller to ensure that this is a valid generic expression through
- // looking up the type. The method will also keep track of the parameter index inside the expression.
- // public static isInPartiallyWrittenTypeArgumentList(syntaxTree: TypeScript.SyntaxTree, position: number): any {
- // let token = Syntax.findTokenOnLeft(syntaxTree.sourceUnit(), position, /*includeSkippedTokens*/ true);
- // if (token && TypeScript.Syntax.hasAncestorOfKind(token, TypeScript.SyntaxKind.TypeParameterList)) {
- // // We are in the wrong generic list. bail out
- // return null;
- // }
- // let stack = 0;
- // let argumentIndex = 0;
- // whileLoop:
- // while (token) {
- // switch (token.kind()) {
- // case TypeScript.SyntaxKind.LessThanToken:
- // if (stack === 0) {
- // // Found the beginning of the generic argument expression
- // let lessThanToken = token;
- // token = previousToken(token, /*includeSkippedTokens*/ true);
- // if (!token || token.kind() !== TypeScript.SyntaxKind.IdentifierName) {
- // break whileLoop;
- // }
- // // Found the name, return the data
- // return {
- // genericIdentifer: token,
- // lessThanToken: lessThanToken,
- // argumentIndex: argumentIndex
- // };
- // }
- // else if (stack < 0) {
- // // Seen one too many less than tokens, bail out
- // break whileLoop;
- // }
- // else {
- // stack--;
- // }
- // break;
- // case TypeScript.SyntaxKind.GreaterThanGreaterThanGreaterThanToken:
- // stack++;
- // // Intentional fall through
- // case TypeScript.SyntaxKind.GreaterThanToken:
- // stack++;
- // break;
- // case TypeScript.SyntaxKind.CommaToken:
- // if (stack === 0) {
- // argumentIndex++;
- // }
- // break;
- // case TypeScript.SyntaxKind.CloseBraceToken:
- // // This can be object type, skip untill we find the matching open brace token
- // let unmatchedOpenBraceTokens = 0;
- // // Skip untill the matching open brace token
- // token = SignatureInfoHelpers.moveBackUpTillMatchingTokenKind(token, TypeScript.SyntaxKind.CloseBraceToken, TypeScript.SyntaxKind.OpenBraceToken);
- // if (!token) {
- // // No matching token was found. bail out
- // break whileLoop;
- // }
- // break;
- // case TypeScript.SyntaxKind.EqualsGreaterThanToken:
- // // This can be a function type or a constructor type. In either case, we want to skip the function definition
- // token = previousToken(token, /*includeSkippedTokens*/ true);
- // if (token && token.kind() === TypeScript.SyntaxKind.CloseParenToken) {
- // // Skip untill the matching open paren token
- // token = SignatureInfoHelpers.moveBackUpTillMatchingTokenKind(token, TypeScript.SyntaxKind.CloseParenToken, TypeScript.SyntaxKind.OpenParenToken);
- // if (token && token.kind() === TypeScript.SyntaxKind.GreaterThanToken) {
- // // Another generic type argument list, skip it\
- // token = SignatureInfoHelpers.moveBackUpTillMatchingTokenKind(token, TypeScript.SyntaxKind.GreaterThanToken, TypeScript.SyntaxKind.LessThanToken);
- // }
- // if (token && token.kind() === TypeScript.SyntaxKind.NewKeyword) {
- // // In case this was a constructor type, skip the new keyword
- // token = previousToken(token, /*includeSkippedTokens*/ true);
- // }
- // if (!token) {
- // // No matching token was found. bail out
- // break whileLoop;
- // }
- // }
- // else {
- // // This is not a function type. exit the main loop
- // break whileLoop;
- // }
- // break;
- // case TypeScript.SyntaxKind.IdentifierName:
- // case TypeScript.SyntaxKind.AnyKeyword:
- // case TypeScript.SyntaxKind.NumberKeyword:
- // case TypeScript.SyntaxKind.StringKeyword:
- // case TypeScript.SyntaxKind.VoidKeyword:
- // case TypeScript.SyntaxKind.BooleanKeyword:
- // case TypeScript.SyntaxKind.DotToken:
- // case TypeScript.SyntaxKind.OpenBracketToken:
- // case TypeScript.SyntaxKind.CloseBracketToken:
- // // Valid tokens in a type name. Skip.
- // break;
- // default:
- // break whileLoop;
- // }
- // token = previousToken(token, /*includeSkippedTokens*/ true);
- // }
- // return null;
- // }
- // private static moveBackUpTillMatchingTokenKind(token: TypeScript.ISyntaxToken, tokenKind: TypeScript.SyntaxKind, matchingTokenKind: TypeScript.SyntaxKind): TypeScript.ISyntaxToken {
- // if (!token || token.kind() !== tokenKind) {
- // throw TypeScript.Errors.invalidOperation();
- // }
- // // Skip the current token
- // token = previousToken(token, /*includeSkippedTokens*/ true);
- // let stack = 0;
- // while (token) {
- // if (token.kind() === matchingTokenKind) {
- // if (stack === 0) {
- // // Found the matching token, return
- // return token;
- // }
- // else if (stack < 0) {
- // // tokens overlapped.. bail out.
- // break;
- // }
- // else {
- // stack--;
- // }
- // }
- // else if (token.kind() === tokenKind) {
- // stack++;
- // }
- // // Move back
- // token = previousToken(token, /*includeSkippedTokens*/ true);
- // }
- // // Did not find matching token
- // return null;
- // }
var emptyArray = [];
var ArgumentListKind;
(function (ArgumentListKind) {
@@ -79241,7 +82095,7 @@ var ts;
* in the argument of an invocation; returns undefined otherwise.
*/
function getImmediatelyContainingArgumentInfo(node, position, sourceFile) {
- if (node.parent.kind === 181 /* CallExpression */ || node.parent.kind === 182 /* NewExpression */) {
+ if (ts.isCallOrNewExpression(node.parent)) {
var callExpression = node.parent;
// There are 3 cases to handle:
// 1. The token introduces a list, and should begin a signature help session
@@ -79603,9 +82457,10 @@ var ts;
// TODO(drosen): use contextual SemanticMeaning.
function getSymbolKind(typeChecker, symbol, location) {
var flags = symbol.flags;
- if (flags & 32 /* Class */)
+ if (flags & 32 /* Class */) {
return ts.getDeclarationOfKind(symbol, 199 /* ClassExpression */) ?
ts.ScriptElementKind.localClassElement : ts.ScriptElementKind.classElement;
+ }
if (flags & 384 /* Enum */)
return ts.ScriptElementKind.enumElement;
if (flags & 524288 /* TypeAlias */)
@@ -79724,7 +82579,7 @@ var ts;
}
// try get the call/construct signature from the type if it matches
var callExpressionLike = void 0;
- if (location.kind === 181 /* CallExpression */ || location.kind === 182 /* NewExpression */) {
+ if (ts.isCallOrNewExpression(location)) {
callExpressionLike = location;
}
else if (ts.isCallExpressionTarget(location) || ts.isNewExpressionTarget(location)) {
@@ -79784,7 +82639,7 @@ var ts;
if (!(type.flags & 32768 /* Object */ && type.objectFlags & 16 /* Anonymous */) && type.symbol) {
ts.addRange(displayParts, ts.symbolToDisplayParts(typeChecker, type.symbol, enclosingDeclaration, /*meaning*/ undefined, 1 /* WriteTypeParametersOrArguments */));
}
- addSignatureDisplayParts(signature, allSignatures, 8 /* WriteArrowStyleSignature */);
+ addSignatureDisplayParts(signature, allSignatures, 16 /* WriteArrowStyleSignature */);
break;
default:
// Just signature
@@ -79796,26 +82651,32 @@ var ts;
else if ((ts.isNameOfFunctionDeclaration(location) && !(symbol.flags & 98304 /* Accessor */)) ||
(location.kind === 123 /* ConstructorKeyword */ && location.parent.kind === 152 /* Constructor */)) {
// get the signature from the declaration and write it
- var functionDeclaration = location.parent;
- var allSignatures = functionDeclaration.kind === 152 /* Constructor */ ? type.getNonNullableType().getConstructSignatures() : type.getNonNullableType().getCallSignatures();
- if (!typeChecker.isImplementationOfOverload(functionDeclaration)) {
- signature = typeChecker.getSignatureFromDeclaration(functionDeclaration);
- }
- else {
- signature = allSignatures[0];
- }
- if (functionDeclaration.kind === 152 /* Constructor */) {
- // show (constructor) Type(...) signature
- symbolKind = ts.ScriptElementKind.constructorImplementationElement;
- addPrefixForAnyFunctionOrVar(type.symbol, symbolKind);
- }
- else {
- // (function/method) symbol(..signature)
- addPrefixForAnyFunctionOrVar(functionDeclaration.kind === 155 /* CallSignature */ &&
- !(type.symbol.flags & 2048 /* TypeLiteral */ || type.symbol.flags & 4096 /* ObjectLiteral */) ? type.symbol : symbol, symbolKind);
+ var functionDeclaration_1 = location.parent;
+ // Use function declaration to write the signatures only if the symbol corresponding to this declaration
+ var locationIsSymbolDeclaration = ts.findDeclaration(symbol, function (declaration) {
+ return declaration === (location.kind === 123 /* ConstructorKeyword */ ? functionDeclaration_1.parent : functionDeclaration_1);
+ });
+ if (locationIsSymbolDeclaration) {
+ var allSignatures = functionDeclaration_1.kind === 152 /* Constructor */ ? type.getNonNullableType().getConstructSignatures() : type.getNonNullableType().getCallSignatures();
+ if (!typeChecker.isImplementationOfOverload(functionDeclaration_1)) {
+ signature = typeChecker.getSignatureFromDeclaration(functionDeclaration_1);
+ }
+ else {
+ signature = allSignatures[0];
+ }
+ if (functionDeclaration_1.kind === 152 /* Constructor */) {
+ // show (constructor) Type(...) signature
+ symbolKind = ts.ScriptElementKind.constructorImplementationElement;
+ addPrefixForAnyFunctionOrVar(type.symbol, symbolKind);
+ }
+ else {
+ // (function/method) symbol(..signature)
+ addPrefixForAnyFunctionOrVar(functionDeclaration_1.kind === 155 /* CallSignature */ &&
+ !(type.symbol.flags & 2048 /* TypeLiteral */ || type.symbol.flags & 4096 /* ObjectLiteral */) ? type.symbol : symbol, symbolKind);
+ }
+ addSignatureDisplayParts(signature, allSignatures);
+ hasAddedSymbolInfo = true;
}
- addSignatureDisplayParts(signature, allSignatures);
- hasAddedSymbolInfo = true;
}
}
}
@@ -79850,7 +82711,7 @@ var ts;
displayParts.push(ts.spacePart());
displayParts.push(ts.operatorPart(58 /* EqualsToken */));
displayParts.push(ts.spacePart());
- ts.addRange(displayParts, ts.typeToDisplayParts(typeChecker, typeChecker.getDeclaredTypeOfSymbol(symbol), enclosingDeclaration, 512 /* InTypeAlias */));
+ ts.addRange(displayParts, ts.typeToDisplayParts(typeChecker, typeChecker.getDeclaredTypeOfSymbol(symbol), enclosingDeclaration, 1024 /* InTypeAlias */));
}
if (symbolFlags & 384 /* Enum */) {
addNewLineIfDisplayPartsExist();
@@ -79885,9 +82746,9 @@ var ts;
}
else {
// Method/function type parameter
- var declaration = ts.getDeclarationOfKind(symbol, 145 /* TypeParameter */);
- ts.Debug.assert(declaration !== undefined);
- declaration = declaration.parent;
+ var decl = ts.getDeclarationOfKind(symbol, 145 /* TypeParameter */);
+ ts.Debug.assert(decl !== undefined);
+ var declaration = decl.parent;
if (declaration) {
if (ts.isFunctionLikeKind(declaration.kind)) {
addInPrefix();
@@ -79899,7 +82760,7 @@ var ts;
else if (declaration.kind !== 155 /* CallSignature */ && declaration.name) {
addFullSymbolName(declaration.symbol);
}
- ts.addRange(displayParts, ts.signatureToDisplayParts(typeChecker, signature, sourceFile, 32 /* WriteTypeArgumentsOfSignature */));
+ ts.addRange(displayParts, ts.signatureToDisplayParts(typeChecker, signature, sourceFile, 64 /* WriteTypeArgumentsOfSignature */));
}
else if (declaration.kind === 231 /* TypeAliasDeclaration */) {
// Type alias type parameter
@@ -79924,7 +82785,7 @@ var ts;
displayParts.push(ts.spacePart());
displayParts.push(ts.operatorPart(58 /* EqualsToken */));
displayParts.push(ts.spacePart());
- displayParts.push(ts.displayPart(constantValue.toString(), ts.SymbolDisplayPartKind.numericLiteral));
+ displayParts.push(ts.displayPart(ts.getTextOfConstantValue(constantValue), typeof constantValue === "number" ? ts.SymbolDisplayPartKind.numericLiteral : ts.SymbolDisplayPartKind.stringLiteral));
}
}
}
@@ -80075,7 +82936,7 @@ var ts;
}
}
function addSignatureDisplayParts(signature, allSignatures, flags) {
- ts.addRange(displayParts, ts.signatureToDisplayParts(typeChecker, signature, enclosingDeclaration, flags | 32 /* WriteTypeArgumentsOfSignature */));
+ ts.addRange(displayParts, ts.signatureToDisplayParts(typeChecker, signature, enclosingDeclaration, flags | 64 /* WriteTypeArgumentsOfSignature */));
if (allSignatures.length > 1) {
displayParts.push(ts.spacePart());
displayParts.push(ts.punctuationPart(19 /* OpenParenToken */));
@@ -80199,7 +83060,7 @@ var ts;
ts.addRange(/*to*/ diagnostics, /*from*/ program.getOptionsDiagnostics());
}
// Emit
- program.emit();
+ program.emit(/*targetSourceFile*/ undefined, /*writeFile*/ undefined, /*cancellationToken*/ undefined, /*emitOnlyDtsFiles*/ undefined, transpileOptions.transformers);
ts.Debug.assert(outputText !== undefined, "Output generation failed");
return { outputText: outputText, diagnostics: diagnostics, sourceMapText: sourceMapText };
}
@@ -80223,7 +83084,7 @@ var ts;
return typeof o.type === "object" && !ts.forEachEntry(o.type, function (v) { return typeof v !== "number"; });
});
options = ts.clone(options);
- var _loop_5 = function (opt) {
+ var _loop_6 = function (opt) {
if (!ts.hasProperty(options, opt.name)) {
return "continue";
}
@@ -80242,7 +83103,7 @@ var ts;
};
for (var _i = 0, commandLineOptionsStringToEnum_1 = commandLineOptionsStringToEnum; _i < commandLineOptionsStringToEnum_1.length; _i++) {
var opt = commandLineOptionsStringToEnum_1[_i];
- _loop_5(opt);
+ _loop_6(opt);
}
return options;
}
@@ -80509,9 +83370,10 @@ var ts;
var formatting;
(function (formatting) {
var FormattingContext = (function () {
- function FormattingContext(sourceFile, formattingRequestKind) {
+ function FormattingContext(sourceFile, formattingRequestKind, options) {
this.sourceFile = sourceFile;
this.formattingRequestKind = formattingRequestKind;
+ this.options = options;
}
FormattingContext.prototype.updateContext = function (currentRange, currentTokenParent, nextRange, nextTokenParent, commonParent) {
ts.Debug.assert(currentRange !== undefined, "currentTokenSpan is null");
@@ -80737,9 +83599,9 @@ var ts;
}
return true;
};
+ RuleOperationContext.Any = new RuleOperationContext();
return RuleOperationContext;
}());
- RuleOperationContext.Any = new RuleOperationContext();
formatting.RuleOperationContext = RuleOperationContext;
})(formatting = ts.formatting || (ts.formatting = {}));
})(ts || (ts = {}));
@@ -80775,7 +83637,7 @@ var ts;
this.NoSpaceBeforeDot = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 23 /* DotToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
this.NoSpaceAfterDot = new formatting.Rule(formatting.RuleDescriptor.create3(23 /* DotToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
// No space before and after indexer
- this.NoSpaceBeforeOpenBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 21 /* OpenBracketToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
+ this.NoSpaceBeforeOpenBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.AnyExcept(120 /* AsyncKeyword */), 21 /* OpenBracketToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
this.NoSpaceAfterCloseBracket = new formatting.Rule(formatting.RuleDescriptor.create3(22 /* CloseBracketToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNotBeforeBlockInFunctionDeclarationContext), 8 /* Delete */));
// Place a space before open brace in a function declaration
this.FunctionOpenBraceLeftTokenRange = formatting.Shared.TokenRange.AnyIncludingMultilineComments;
@@ -80787,10 +83649,10 @@ var ts;
this.ControlOpenBraceLeftTokenRange = formatting.Shared.TokenRange.FromTokens([20 /* CloseParenToken */, 3 /* MultiLineCommentTrivia */, 81 /* DoKeyword */, 102 /* TryKeyword */, 87 /* FinallyKeyword */, 82 /* ElseKeyword */]);
this.SpaceBeforeOpenBraceInControl = new formatting.Rule(formatting.RuleDescriptor.create2(this.ControlOpenBraceLeftTokenRange, 17 /* 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(17 /* 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, 18 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsBraceWrappedContext), 2 /* Space */));
- this.NoSpaceAfterOpenBrace = new formatting.Rule(formatting.RuleDescriptor.create3(17 /* 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, 18 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
+ this.SpaceAfterOpenBrace = new formatting.Rule(formatting.RuleDescriptor.create3(17 /* OpenBraceToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabledOrUndefined("insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces"), Rules.IsBraceWrappedContext), 2 /* Space */));
+ this.SpaceBeforeCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabledOrUndefined("insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces"), Rules.IsBraceWrappedContext), 2 /* Space */));
+ this.NoSpaceAfterOpenBrace = new formatting.Rule(formatting.RuleDescriptor.create3(17 /* OpenBraceToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabled("insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces"), Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
+ this.NoSpaceBeforeCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabled("insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces"), Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
this.NoSpaceBetweenEmptyBraceBrackets = new formatting.Rule(formatting.RuleDescriptor.create1(17 /* OpenBraceToken */, 18 /* 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(17 /* OpenBraceToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsMultilineBlockContext), 4 /* NewLine */));
@@ -80817,11 +83679,12 @@ var ts;
this.SpaceAfterSubtractWhenFollowedByPredecrement = new formatting.Rule(formatting.RuleDescriptor.create1(38 /* MinusToken */, 44 /* MinusMinusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */));
this.NoSpaceBeforeComma = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 26 /* CommaToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
this.SpaceAfterCertainKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([104 /* VarKeyword */, 100 /* ThrowKeyword */, 94 /* NewKeyword */, 80 /* DeleteKeyword */, 96 /* ReturnKeyword */, 103 /* TypeOfKeyword */, 121 /* AwaitKeyword */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */));
+ this.NoSpaceAfterNewKeywordOnConstructorSignature = new formatting.Rule(formatting.RuleDescriptor.create1(94 /* NewKeyword */, 19 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsConstructorSignatureContext), 8 /* Delete */));
this.SpaceAfterLetConstInVariableDeclaration = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([110 /* LetKeyword */, 76 /* 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, 19 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsFunctionCallOrNewContext, Rules.IsPreviousTokenNotComma), 8 /* Delete */));
this.SpaceAfterFunctionInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create3(89 /* 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, 19 /* 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, 19 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsFunctionDeclContext), 8 /* Delete */));
+ this.SpaceBeforeOpenParenInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 19 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceBeforeFunctionParenthesis"), Rules.IsNonJsxSameLineTokenContext, Rules.IsFunctionDeclContext), 2 /* Space */));
+ this.NoSpaceBeforeOpenParenInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 19 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceBeforeFunctionParenthesis"), Rules.IsNonJsxSameLineTokenContext, Rules.IsFunctionDeclContext), 8 /* Delete */));
this.SpaceAfterVoidOperator = new formatting.Rule(formatting.RuleDescriptor.create3(105 /* 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(96 /* ReturnKeyword */, 25 /* SemicolonToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
// Add a space between statements. All keywords except (do,else,case) has open/close parens after them.
@@ -80836,9 +83699,8 @@ var ts;
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(123 /* ConstructorKeyword */, 19 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */));
- this.NoSpaceAfterConstructor = new formatting.Rule(formatting.RuleDescriptor.create1(123 /* ConstructorKeyword */, 19 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
+ this.SpaceAfterConstructor = new formatting.Rule(formatting.RuleDescriptor.create1(123 /* ConstructorKeyword */, 19 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceAfterConstructor"), Rules.IsNonJsxSameLineTokenContext), 2 /* Space */));
+ this.NoSpaceAfterConstructor = new formatting.Rule(formatting.RuleDescriptor.create1(123 /* ConstructorKeyword */, 19 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceAfterConstructor"), 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([128 /* ModuleKeyword */, 132 /* RequireKeyword */]), 19 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
// Add a space around certain TypeScript keywords
@@ -80881,6 +83743,58 @@ var ts;
this.NoSpaceAfterEqualInJsxAttribute = new formatting.Rule(formatting.RuleDescriptor.create3(58 /* 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, 51 /* ExclamationToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNonNullAssertionContext), 8 /* Delete */));
+ ///
+ /// Rules controlled by user options
+ ///
+ // Insert space after comma delimiter
+ this.SpaceAfterComma = new formatting.Rule(formatting.RuleDescriptor.create3(26 /* CommaToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceAfterCommaDelimiter"), Rules.IsNonJsxSameLineTokenContext, Rules.IsNonJsxElementContext, Rules.IsNextTokenNotCloseBracket), 2 /* Space */));
+ this.NoSpaceAfterComma = new formatting.Rule(formatting.RuleDescriptor.create3(26 /* CommaToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceAfterCommaDelimiter"), Rules.IsNonJsxSameLineTokenContext, Rules.IsNonJsxElementContext), 8 /* Delete */));
+ // Insert space before and after binary operators
+ this.SpaceBeforeBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.BinaryOperators), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceBeforeAndAfterBinaryOperators"), Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */));
+ this.SpaceAfterBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.BinaryOperators, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceBeforeAndAfterBinaryOperators"), Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */));
+ this.NoSpaceBeforeBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.BinaryOperators), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceBeforeAndAfterBinaryOperators"), Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 8 /* Delete */));
+ this.NoSpaceAfterBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.BinaryOperators, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceBeforeAndAfterBinaryOperators"), Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 8 /* Delete */));
+ // Insert space after keywords in control flow statements
+ this.SpaceAfterKeywordInControl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Keywords, 19 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceAfterKeywordsInControlFlowStatements"), Rules.IsControlDeclContext), 2 /* Space */));
+ this.NoSpaceAfterKeywordInControl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Keywords, 19 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceAfterKeywordsInControlFlowStatements"), Rules.IsControlDeclContext), 8 /* Delete */));
+ // Open Brace braces after function
+ // TypeScript: Function can have return types, which can be made of tons of different token kinds
+ this.NewLineBeforeOpenBraceInFunction = new formatting.Rule(formatting.RuleDescriptor.create2(this.FunctionOpenBraceLeftTokenRange, 17 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("placeOpenBraceOnNewLineForFunctions"), Rules.IsFunctionDeclContext, Rules.IsBeforeMultilineBlockContext), 4 /* NewLine */), 1 /* CanDeleteNewLines */);
+ // Open Brace braces after TypeScript module/class/interface
+ this.NewLineBeforeOpenBraceInTypeScriptDeclWithBlock = new formatting.Rule(formatting.RuleDescriptor.create2(this.TypeScriptOpenBraceLeftTokenRange, 17 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("placeOpenBraceOnNewLineForFunctions"), Rules.IsTypeScriptDeclWithBlockContext, Rules.IsBeforeMultilineBlockContext), 4 /* NewLine */), 1 /* CanDeleteNewLines */);
+ // Open Brace braces after control block
+ this.NewLineBeforeOpenBraceInControl = new formatting.Rule(formatting.RuleDescriptor.create2(this.ControlOpenBraceLeftTokenRange, 17 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("placeOpenBraceOnNewLineForControlBlocks"), Rules.IsControlDeclContext, Rules.IsBeforeMultilineBlockContext), 4 /* NewLine */), 1 /* CanDeleteNewLines */);
+ // Insert space after semicolon in for statement
+ this.SpaceAfterSemicolonInFor = new formatting.Rule(formatting.RuleDescriptor.create3(25 /* SemicolonToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceAfterSemicolonInForStatements"), Rules.IsNonJsxSameLineTokenContext, Rules.IsForContext), 2 /* Space */));
+ this.NoSpaceAfterSemicolonInFor = new formatting.Rule(formatting.RuleDescriptor.create3(25 /* SemicolonToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceAfterSemicolonInForStatements"), Rules.IsNonJsxSameLineTokenContext, Rules.IsForContext), 8 /* Delete */));
+ // Insert space after opening and before closing nonempty parenthesis
+ this.SpaceAfterOpenParen = new formatting.Rule(formatting.RuleDescriptor.create3(19 /* OpenParenToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"), Rules.IsNonJsxSameLineTokenContext), 2 /* Space */));
+ this.SpaceBeforeCloseParen = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 20 /* CloseParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"), Rules.IsNonJsxSameLineTokenContext), 2 /* Space */));
+ this.NoSpaceBetweenParens = new formatting.Rule(formatting.RuleDescriptor.create1(19 /* OpenParenToken */, 20 /* CloseParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
+ this.NoSpaceAfterOpenParen = new formatting.Rule(formatting.RuleDescriptor.create3(19 /* OpenParenToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"), Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
+ this.NoSpaceBeforeCloseParen = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 20 /* CloseParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"), Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
+ // Insert space after opening and before closing nonempty brackets
+ this.SpaceAfterOpenBracket = new formatting.Rule(formatting.RuleDescriptor.create3(21 /* OpenBracketToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets"), Rules.IsNonJsxSameLineTokenContext), 2 /* Space */));
+ this.SpaceBeforeCloseBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 22 /* CloseBracketToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets"), Rules.IsNonJsxSameLineTokenContext), 2 /* Space */));
+ this.NoSpaceBetweenBrackets = new formatting.Rule(formatting.RuleDescriptor.create1(21 /* OpenBracketToken */, 22 /* CloseBracketToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
+ this.NoSpaceAfterOpenBracket = new formatting.Rule(formatting.RuleDescriptor.create3(21 /* OpenBracketToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets"), Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
+ this.NoSpaceBeforeCloseBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 22 /* CloseBracketToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets"), Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
+ // Insert space after opening and before closing template string braces
+ this.NoSpaceAfterTemplateHeadAndMiddle = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([14 /* TemplateHead */, 15 /* TemplateMiddle */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces"), Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
+ this.SpaceAfterTemplateHeadAndMiddle = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([14 /* TemplateHead */, 15 /* TemplateMiddle */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces"), Rules.IsNonJsxSameLineTokenContext), 2 /* Space */));
+ this.NoSpaceBeforeTemplateMiddleAndTail = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([15 /* TemplateMiddle */, 16 /* TemplateTail */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces"), Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
+ this.SpaceBeforeTemplateMiddleAndTail = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([15 /* TemplateMiddle */, 16 /* TemplateTail */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces"), Rules.IsNonJsxSameLineTokenContext), 2 /* Space */));
+ // No space after { and before } in JSX expression
+ this.NoSpaceAfterOpenBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create3(17 /* OpenBraceToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces"), Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 8 /* Delete */));
+ this.SpaceAfterOpenBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create3(17 /* OpenBraceToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces"), Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 2 /* Space */));
+ this.NoSpaceBeforeCloseBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces"), Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 8 /* Delete */));
+ this.SpaceBeforeCloseBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces"), Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 2 /* Space */));
+ // Insert space after function keyword for anonymous functions
+ this.SpaceAfterAnonymousFunctionKeyword = new formatting.Rule(formatting.RuleDescriptor.create1(89 /* FunctionKeyword */, 19 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceAfterFunctionKeywordForAnonymousFunctions"), Rules.IsFunctionDeclContext), 2 /* Space */));
+ this.NoSpaceAfterAnonymousFunctionKeyword = new formatting.Rule(formatting.RuleDescriptor.create1(89 /* FunctionKeyword */, 19 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceAfterFunctionKeywordForAnonymousFunctions"), Rules.IsFunctionDeclContext), 8 /* Delete */));
+ // No space after type assertion
+ this.NoSpaceAfterTypeAssertion = new formatting.Rule(formatting.RuleDescriptor.create3(29 /* GreaterThanToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceAfterTypeAssertion"), Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeAssertionContext), 8 /* Delete */));
+ this.SpaceAfterTypeAssertion = new formatting.Rule(formatting.RuleDescriptor.create3(29 /* GreaterThanToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceAfterTypeAssertion"), Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeAssertionContext), 2 /* Space */));
// These rules are higher in priority than user-configurable rules.
this.HighPriorityCommonRules = [
this.IgnoreBeforeComment, this.IgnoreAfterLineComment,
@@ -80926,7 +83840,26 @@ var ts;
this.SpaceBeforeAt,
this.NoSpaceAfterAt,
this.SpaceAfterDecorator,
- this.NoSpaceBeforeNonNullAssertionOperator
+ this.NoSpaceBeforeNonNullAssertionOperator,
+ this.NoSpaceAfterNewKeywordOnConstructorSignature
+ ];
+ // These rules are applied after high priority rules.
+ this.UserConfigurableRules = [
+ this.SpaceAfterConstructor, this.NoSpaceAfterConstructor,
+ this.SpaceAfterComma, this.NoSpaceAfterComma,
+ this.SpaceAfterAnonymousFunctionKeyword, this.NoSpaceAfterAnonymousFunctionKeyword,
+ this.SpaceAfterKeywordInControl, this.NoSpaceAfterKeywordInControl,
+ this.SpaceAfterOpenParen, this.SpaceBeforeCloseParen, this.NoSpaceBetweenParens, this.NoSpaceAfterOpenParen, this.NoSpaceBeforeCloseParen,
+ this.SpaceAfterOpenBracket, this.SpaceBeforeCloseBracket, this.NoSpaceBetweenBrackets, this.NoSpaceAfterOpenBracket, this.NoSpaceBeforeCloseBracket,
+ this.SpaceAfterOpenBrace, this.SpaceBeforeCloseBrace, this.NoSpaceBetweenEmptyBraceBrackets, this.NoSpaceAfterOpenBrace, this.NoSpaceBeforeCloseBrace,
+ this.SpaceAfterTemplateHeadAndMiddle, this.SpaceBeforeTemplateMiddleAndTail, this.NoSpaceAfterTemplateHeadAndMiddle, this.NoSpaceBeforeTemplateMiddleAndTail,
+ this.SpaceAfterOpenBraceInJsxExpression, this.SpaceBeforeCloseBraceInJsxExpression, this.NoSpaceAfterOpenBraceInJsxExpression, this.NoSpaceBeforeCloseBraceInJsxExpression,
+ this.SpaceAfterSemicolonInFor, this.NoSpaceAfterSemicolonInFor,
+ this.SpaceBeforeBinaryOperator, this.SpaceAfterBinaryOperator, this.NoSpaceBeforeBinaryOperator, this.NoSpaceAfterBinaryOperator,
+ this.SpaceBeforeOpenParenInFuncDecl, this.NoSpaceBeforeOpenParenInFuncDecl,
+ this.NewLineBeforeOpenBraceInControl,
+ this.NewLineBeforeOpenBraceInFunction, this.NewLineBeforeOpenBraceInTypeScriptDeclWithBlock,
+ this.SpaceAfterTypeAssertion, this.NoSpaceAfterTypeAssertion
];
// These rules are lower in priority than user-configurable rules.
this.LowPriorityCommonRules = [
@@ -80938,58 +83871,6 @@ var ts;
this.SpaceAfterSemicolon,
this.SpaceBetweenStatements, this.SpaceAfterTryFinally
];
- ///
- /// Rules controlled by user options
- ///
- // Insert space after comma delimiter
- this.SpaceAfterComma = new formatting.Rule(formatting.RuleDescriptor.create3(26 /* CommaToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNonJsxElementContext, Rules.IsNextTokenNotCloseBracket), 2 /* Space */));
- this.NoSpaceAfterComma = new formatting.Rule(formatting.RuleDescriptor.create3(26 /* CommaToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNonJsxElementContext), 8 /* Delete */));
- // Insert space before and after binary operators
- this.SpaceBeforeBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.BinaryOperators), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */));
- this.SpaceAfterBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.BinaryOperators, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */));
- this.NoSpaceBeforeBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.BinaryOperators), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 8 /* Delete */));
- this.NoSpaceAfterBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.BinaryOperators, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 8 /* Delete */));
- // Insert space after keywords in control flow statements
- this.SpaceAfterKeywordInControl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Keywords, 19 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext), 2 /* Space */));
- this.NoSpaceAfterKeywordInControl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Keywords, 19 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext), 8 /* Delete */));
- // Open Brace braces after function
- // TypeScript: Function can have return types, which can be made of tons of different token kinds
- this.NewLineBeforeOpenBraceInFunction = new formatting.Rule(formatting.RuleDescriptor.create2(this.FunctionOpenBraceLeftTokenRange, 17 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext, Rules.IsBeforeMultilineBlockContext), 4 /* NewLine */), 1 /* CanDeleteNewLines */);
- // Open Brace braces after TypeScript module/class/interface
- this.NewLineBeforeOpenBraceInTypeScriptDeclWithBlock = new formatting.Rule(formatting.RuleDescriptor.create2(this.TypeScriptOpenBraceLeftTokenRange, 17 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsTypeScriptDeclWithBlockContext, Rules.IsBeforeMultilineBlockContext), 4 /* NewLine */), 1 /* CanDeleteNewLines */);
- // Open Brace braces after control block
- this.NewLineBeforeOpenBraceInControl = new formatting.Rule(formatting.RuleDescriptor.create2(this.ControlOpenBraceLeftTokenRange, 17 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext, Rules.IsBeforeMultilineBlockContext), 4 /* NewLine */), 1 /* CanDeleteNewLines */);
- // Insert space after semicolon in for statement
- this.SpaceAfterSemicolonInFor = new formatting.Rule(formatting.RuleDescriptor.create3(25 /* SemicolonToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsForContext), 2 /* Space */));
- this.NoSpaceAfterSemicolonInFor = new formatting.Rule(formatting.RuleDescriptor.create3(25 /* SemicolonToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsForContext), 8 /* Delete */));
- // Insert space after opening and before closing nonempty parenthesis
- this.SpaceAfterOpenParen = new formatting.Rule(formatting.RuleDescriptor.create3(19 /* OpenParenToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */));
- this.SpaceBeforeCloseParen = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 20 /* CloseParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */));
- this.NoSpaceBetweenParens = new formatting.Rule(formatting.RuleDescriptor.create1(19 /* OpenParenToken */, 20 /* CloseParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
- this.NoSpaceAfterOpenParen = new formatting.Rule(formatting.RuleDescriptor.create3(19 /* OpenParenToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
- this.NoSpaceBeforeCloseParen = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 20 /* CloseParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
- // Insert space after opening and before closing nonempty brackets
- this.SpaceAfterOpenBracket = new formatting.Rule(formatting.RuleDescriptor.create3(21 /* OpenBracketToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */));
- this.SpaceBeforeCloseBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 22 /* CloseBracketToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */));
- this.NoSpaceBetweenBrackets = new formatting.Rule(formatting.RuleDescriptor.create1(21 /* OpenBracketToken */, 22 /* CloseBracketToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
- this.NoSpaceAfterOpenBracket = new formatting.Rule(formatting.RuleDescriptor.create3(21 /* OpenBracketToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
- this.NoSpaceBeforeCloseBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 22 /* CloseBracketToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
- // Insert space after opening and before closing template string braces
- this.NoSpaceAfterTemplateHeadAndMiddle = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([14 /* TemplateHead */, 15 /* TemplateMiddle */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
- this.SpaceAfterTemplateHeadAndMiddle = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([14 /* TemplateHead */, 15 /* TemplateMiddle */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */));
- this.NoSpaceBeforeTemplateMiddleAndTail = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([15 /* TemplateMiddle */, 16 /* TemplateTail */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
- this.SpaceBeforeTemplateMiddleAndTail = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([15 /* TemplateMiddle */, 16 /* TemplateTail */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */));
- // No space after { and before } in JSX expression
- this.NoSpaceAfterOpenBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create3(17 /* OpenBraceToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 8 /* Delete */));
- this.SpaceAfterOpenBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create3(17 /* OpenBraceToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 2 /* Space */));
- this.NoSpaceBeforeCloseBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 8 /* Delete */));
- this.SpaceBeforeCloseBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 2 /* Space */));
- // Insert space after function keyword for anonymous functions
- this.SpaceAfterAnonymousFunctionKeyword = new formatting.Rule(formatting.RuleDescriptor.create1(89 /* FunctionKeyword */, 19 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 2 /* Space */));
- this.NoSpaceAfterAnonymousFunctionKeyword = new formatting.Rule(formatting.RuleDescriptor.create1(89 /* FunctionKeyword */, 19 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 8 /* Delete */));
- // No space after type assertion
- this.NoSpaceAfterTypeAssertion = new formatting.Rule(formatting.RuleDescriptor.create3(29 /* GreaterThanToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeAssertionContext), 8 /* Delete */));
- this.SpaceAfterTypeAssertion = new formatting.Rule(formatting.RuleDescriptor.create3(29 /* GreaterThanToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeAssertionContext), 2 /* Space */));
}
Rules.prototype.getRuleName = function (rule) {
var o = this;
@@ -81003,6 +83884,18 @@ var ts;
///
/// Contexts
///
+ Rules.IsOptionEnabled = function (optionName) {
+ return function (context) { return context.options && context.options.hasOwnProperty(optionName) && !!context.options[optionName]; };
+ };
+ Rules.IsOptionDisabled = function (optionName) {
+ return function (context) { return context.options && context.options.hasOwnProperty(optionName) && !context.options[optionName]; };
+ };
+ Rules.IsOptionDisabledOrUndefined = function (optionName) {
+ return function (context) { return !context.options || !context.options.hasOwnProperty(optionName) || !context.options[optionName]; };
+ };
+ Rules.IsOptionEnabledOrUndefined = function (optionName) {
+ return function (context) { return !context.options || !context.options.hasOwnProperty(optionName) || !!context.options[optionName]; };
+ };
Rules.IsForContext = function (context) {
return context.contextNode.kind === 214 /* ForStatement */;
};
@@ -81120,7 +84013,7 @@ var ts;
// case SyntaxKind.ConstructorDeclaration:
// case SyntaxKind.SimpleArrowFunctionExpression:
// case SyntaxKind.ParenthesizedArrowFunctionExpression:
- case 230 /* InterfaceDeclaration */:
+ case 230 /* InterfaceDeclaration */:// This one is not truly a function, but for formatting purposes, it acts just like one
return true;
}
return false;
@@ -81252,6 +84145,9 @@ var ts;
Rules.IsObjectTypeContext = function (context) {
return context.contextNode.kind === 163 /* TypeLiteral */; // && context.contextNode.parent.kind !== SyntaxKind.InterfaceDeclaration;
};
+ Rules.IsConstructorSignatureContext = function (context) {
+ return context.contextNode.kind === 156 /* ConstructSignature */;
+ };
Rules.IsTypeArgumentOrParameterOrAssertion = function (token, parent) {
if (token.kind !== 27 /* LessThanToken */ && token.kind !== 29 /* GreaterThanToken */) {
return false;
@@ -81336,8 +84232,7 @@ var ts;
};
RulesMap.prototype.FillRule = function (rule, rulesBucketConstructionStateList) {
var _this = this;
- var specificRule = rule.Descriptor.LeftTokenRange !== formatting.Shared.TokenRange.Any &&
- rule.Descriptor.RightTokenRange !== formatting.Shared.TokenRange.Any;
+ var specificRule = rule.Descriptor.LeftTokenRange.isSpecific() && rule.Descriptor.RightTokenRange.isSpecific();
rule.Descriptor.LeftTokenRange.GetTokens().forEach(function (left) {
rule.Descriptor.RightTokenRange.GetTokens().forEach(function (right) {
var rulesBucketIndex = _this.GetRuleBucketIndex(left, right);
@@ -81462,27 +84357,14 @@ var ts;
(function (formatting) {
var Shared;
(function (Shared) {
- var TokenRangeAccess = (function () {
- function TokenRangeAccess(from, to, except) {
- this.tokens = [];
- for (var token = from; token <= to; token++) {
- if (ts.indexOf(except, token) < 0) {
- this.tokens.push(token);
- }
- }
- }
- TokenRangeAccess.prototype.GetTokens = function () {
- return this.tokens;
- };
- TokenRangeAccess.prototype.Contains = function (token) {
- return this.tokens.indexOf(token) >= 0;
- };
- return TokenRangeAccess;
- }());
- Shared.TokenRangeAccess = TokenRangeAccess;
+ var allTokens = [];
+ for (var token = 0 /* FirstToken */; token <= 142 /* LastToken */; token++) {
+ allTokens.push(token);
+ }
var TokenValuesAccess = (function () {
- function TokenValuesAccess(tks) {
- this.tokens = tks && tks.length ? tks : [];
+ function TokenValuesAccess(tokens) {
+ if (tokens === void 0) { tokens = []; }
+ this.tokens = tokens;
}
TokenValuesAccess.prototype.GetTokens = function () {
return this.tokens;
@@ -81490,9 +84372,9 @@ var ts;
TokenValuesAccess.prototype.Contains = function (token) {
return this.tokens.indexOf(token) >= 0;
};
+ TokenValuesAccess.prototype.isSpecific = function () { return true; };
return TokenValuesAccess;
}());
- Shared.TokenValuesAccess = TokenValuesAccess;
var TokenSingleValueAccess = (function () {
function TokenSingleValueAccess(token) {
this.token = token;
@@ -81503,18 +84385,14 @@ var ts;
TokenSingleValueAccess.prototype.Contains = function (tokenValue) {
return tokenValue === this.token;
};
+ TokenSingleValueAccess.prototype.isSpecific = function () { return true; };
return TokenSingleValueAccess;
}());
- Shared.TokenSingleValueAccess = TokenSingleValueAccess;
var TokenAllAccess = (function () {
function TokenAllAccess() {
}
TokenAllAccess.prototype.GetTokens = function () {
- var result = [];
- for (var token = 0 /* FirstToken */; token <= 142 /* LastToken */; token++) {
- result.push(token);
- }
- return result;
+ return allTokens;
};
TokenAllAccess.prototype.Contains = function () {
return true;
@@ -81522,51 +84400,80 @@ var ts;
TokenAllAccess.prototype.toString = function () {
return "[allTokens]";
};
+ TokenAllAccess.prototype.isSpecific = function () { return false; };
return TokenAllAccess;
}());
- Shared.TokenAllAccess = TokenAllAccess;
- var TokenRange = (function () {
- function TokenRange(tokenAccess) {
- this.tokenAccess = tokenAccess;
+ var TokenAllExceptAccess = (function () {
+ function TokenAllExceptAccess(except) {
+ this.except = except;
}
- TokenRange.FromToken = function (token) {
- return new TokenRange(new TokenSingleValueAccess(token));
+ TokenAllExceptAccess.prototype.GetTokens = function () {
+ var _this = this;
+ return allTokens.filter(function (t) { return t !== _this.except; });
};
- TokenRange.FromTokens = function (tokens) {
- return new TokenRange(new TokenValuesAccess(tokens));
- };
- TokenRange.FromRange = function (f, to, except) {
- if (except === void 0) { except = []; }
- return new TokenRange(new TokenRangeAccess(f, to, except));
+ TokenAllExceptAccess.prototype.Contains = function (token) {
+ return token !== this.except;
};
- TokenRange.AllTokens = function () {
- return new TokenRange(new TokenAllAccess());
- };
- TokenRange.prototype.GetTokens = function () {
- return this.tokenAccess.GetTokens();
- };
- TokenRange.prototype.Contains = function (token) {
- return this.tokenAccess.Contains(token);
- };
- TokenRange.prototype.toString = function () {
- return this.tokenAccess.toString();
- };
- return TokenRange;
+ TokenAllExceptAccess.prototype.isSpecific = function () { return false; };
+ return TokenAllExceptAccess;
}());
- TokenRange.Any = TokenRange.AllTokens();
- TokenRange.AnyIncludingMultilineComments = TokenRange.FromTokens(TokenRange.Any.GetTokens().concat([3 /* MultiLineCommentTrivia */]));
- TokenRange.Keywords = TokenRange.FromRange(72 /* FirstKeyword */, 142 /* LastKeyword */);
- TokenRange.BinaryOperators = TokenRange.FromRange(27 /* FirstBinaryOperator */, 70 /* LastBinaryOperator */);
- TokenRange.BinaryKeywordOperators = TokenRange.FromTokens([92 /* InKeyword */, 93 /* InstanceOfKeyword */, 142 /* OfKeyword */, 118 /* AsKeyword */, 126 /* IsKeyword */]);
- TokenRange.UnaryPrefixOperators = TokenRange.FromTokens([43 /* PlusPlusToken */, 44 /* MinusMinusToken */, 52 /* TildeToken */, 51 /* ExclamationToken */]);
- TokenRange.UnaryPrefixExpressions = TokenRange.FromTokens([8 /* NumericLiteral */, 71 /* Identifier */, 19 /* OpenParenToken */, 21 /* OpenBracketToken */, 17 /* OpenBraceToken */, 99 /* ThisKeyword */, 94 /* NewKeyword */]);
- TokenRange.UnaryPreincrementExpressions = TokenRange.FromTokens([71 /* Identifier */, 19 /* OpenParenToken */, 99 /* ThisKeyword */, 94 /* NewKeyword */]);
- TokenRange.UnaryPostincrementExpressions = TokenRange.FromTokens([71 /* Identifier */, 20 /* CloseParenToken */, 22 /* CloseBracketToken */, 94 /* NewKeyword */]);
- TokenRange.UnaryPredecrementExpressions = TokenRange.FromTokens([71 /* Identifier */, 19 /* OpenParenToken */, 99 /* ThisKeyword */, 94 /* NewKeyword */]);
- TokenRange.UnaryPostdecrementExpressions = TokenRange.FromTokens([71 /* Identifier */, 20 /* CloseParenToken */, 22 /* CloseBracketToken */, 94 /* NewKeyword */]);
- TokenRange.Comments = TokenRange.FromTokens([2 /* SingleLineCommentTrivia */, 3 /* MultiLineCommentTrivia */]);
- TokenRange.TypeNames = TokenRange.FromTokens([71 /* Identifier */, 133 /* NumberKeyword */, 136 /* StringKeyword */, 122 /* BooleanKeyword */, 137 /* SymbolKeyword */, 105 /* VoidKeyword */, 119 /* AnyKeyword */]);
- Shared.TokenRange = TokenRange;
+ var TokenRange;
+ (function (TokenRange) {
+ function FromToken(token) {
+ return new TokenSingleValueAccess(token);
+ }
+ TokenRange.FromToken = FromToken;
+ function FromTokens(tokens) {
+ return new TokenValuesAccess(tokens);
+ }
+ TokenRange.FromTokens = FromTokens;
+ function FromRange(from, to, except) {
+ if (except === void 0) { except = []; }
+ var tokens = [];
+ for (var token = from; token <= to; token++) {
+ if (ts.indexOf(except, token) < 0) {
+ tokens.push(token);
+ }
+ }
+ return new TokenValuesAccess(tokens);
+ }
+ TokenRange.FromRange = FromRange;
+ function AnyExcept(token) {
+ return new TokenAllExceptAccess(token);
+ }
+ TokenRange.AnyExcept = AnyExcept;
+ TokenRange.Any = new TokenAllAccess();
+ TokenRange.AnyIncludingMultilineComments = TokenRange.FromTokens(allTokens.concat([3 /* MultiLineCommentTrivia */]));
+ TokenRange.Keywords = TokenRange.FromRange(72 /* FirstKeyword */, 142 /* LastKeyword */);
+ TokenRange.BinaryOperators = TokenRange.FromRange(27 /* FirstBinaryOperator */, 70 /* LastBinaryOperator */);
+ TokenRange.BinaryKeywordOperators = TokenRange.FromTokens([
+ 92 /* InKeyword */, 93 /* InstanceOfKeyword */, 142 /* OfKeyword */, 118 /* AsKeyword */, 126 /* IsKeyword */
+ ]);
+ TokenRange.UnaryPrefixOperators = TokenRange.FromTokens([
+ 43 /* PlusPlusToken */, 44 /* MinusMinusToken */, 52 /* TildeToken */, 51 /* ExclamationToken */
+ ]);
+ TokenRange.UnaryPrefixExpressions = TokenRange.FromTokens([
+ 8 /* NumericLiteral */, 71 /* Identifier */, 19 /* OpenParenToken */, 21 /* OpenBracketToken */,
+ 17 /* OpenBraceToken */, 99 /* ThisKeyword */, 94 /* NewKeyword */
+ ]);
+ TokenRange.UnaryPreincrementExpressions = TokenRange.FromTokens([
+ 71 /* Identifier */, 19 /* OpenParenToken */, 99 /* ThisKeyword */, 94 /* NewKeyword */
+ ]);
+ TokenRange.UnaryPostincrementExpressions = TokenRange.FromTokens([
+ 71 /* Identifier */, 20 /* CloseParenToken */, 22 /* CloseBracketToken */, 94 /* NewKeyword */
+ ]);
+ TokenRange.UnaryPredecrementExpressions = TokenRange.FromTokens([
+ 71 /* Identifier */, 19 /* OpenParenToken */, 99 /* ThisKeyword */, 94 /* NewKeyword */
+ ]);
+ TokenRange.UnaryPostdecrementExpressions = TokenRange.FromTokens([
+ 71 /* Identifier */, 20 /* CloseParenToken */, 22 /* CloseBracketToken */, 94 /* NewKeyword */
+ ]);
+ TokenRange.Comments = TokenRange.FromTokens([2 /* SingleLineCommentTrivia */, 3 /* MultiLineCommentTrivia */]);
+ TokenRange.TypeNames = TokenRange.FromTokens([
+ 71 /* Identifier */, 133 /* NumberKeyword */, 136 /* StringKeyword */, 122 /* BooleanKeyword */,
+ 137 /* SymbolKeyword */, 105 /* VoidKeyword */, 119 /* AnyKeyword */
+ ]);
+ })(TokenRange = Shared.TokenRange || (Shared.TokenRange = {}));
})(Shared = formatting.Shared || (formatting.Shared = {}));
})(formatting = ts.formatting || (ts.formatting = {}));
})(ts || (ts = {}));
@@ -81591,6 +84498,8 @@ var ts;
var RulesProvider = (function () {
function RulesProvider() {
this.globalRules = new formatting.Rules();
+ var activeRules = this.globalRules.HighPriorityCommonRules.slice(0).concat(this.globalRules.UserConfigurableRules).concat(this.globalRules.LowPriorityCommonRules);
+ this.rulesMap = formatting.RulesMap.create(activeRules);
}
RulesProvider.prototype.getRuleName = function (rule) {
return this.globalRules.getRuleName(rule);
@@ -81606,123 +84515,9 @@ var ts;
};
RulesProvider.prototype.ensureUpToDate = function (options) {
if (!this.options || !ts.compareDataObjects(this.options, options)) {
- var activeRules = this.createActiveRules(options);
- var rulesMap = formatting.RulesMap.create(activeRules);
- this.activeRules = activeRules;
- this.rulesMap = rulesMap;
this.options = ts.clone(options);
}
};
- 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);
- }
- else {
- rules.push(this.globalRules.NoSpaceAfterComma);
- }
- if (options.insertSpaceAfterFunctionKeywordForAnonymousFunctions) {
- rules.push(this.globalRules.SpaceAfterAnonymousFunctionKeyword);
- }
- else {
- rules.push(this.globalRules.NoSpaceAfterAnonymousFunctionKeyword);
- }
- if (options.insertSpaceAfterKeywordsInControlFlowStatements) {
- rules.push(this.globalRules.SpaceAfterKeywordInControl);
- }
- else {
- rules.push(this.globalRules.NoSpaceAfterKeywordInControl);
- }
- if (options.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis) {
- rules.push(this.globalRules.SpaceAfterOpenParen);
- rules.push(this.globalRules.SpaceBeforeCloseParen);
- rules.push(this.globalRules.NoSpaceBetweenParens);
- }
- else {
- rules.push(this.globalRules.NoSpaceAfterOpenParen);
- rules.push(this.globalRules.NoSpaceBeforeCloseParen);
- rules.push(this.globalRules.NoSpaceBetweenParens);
- }
- if (options.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets) {
- rules.push(this.globalRules.SpaceAfterOpenBracket);
- rules.push(this.globalRules.SpaceBeforeCloseBracket);
- rules.push(this.globalRules.NoSpaceBetweenBrackets);
- }
- else {
- rules.push(this.globalRules.NoSpaceAfterOpenBracket);
- rules.push(this.globalRules.NoSpaceBeforeCloseBracket);
- rules.push(this.globalRules.NoSpaceBetweenBrackets);
- }
- // The default value of InsertSpaceAfterOpeningAndBeforeClosingNonemptyBraces is true
- // so if the option is undefined, we should treat it as true as well
- if (options.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces !== false) {
- rules.push(this.globalRules.SpaceAfterOpenBrace);
- rules.push(this.globalRules.SpaceBeforeCloseBrace);
- rules.push(this.globalRules.NoSpaceBetweenEmptyBraceBrackets);
- }
- else {
- rules.push(this.globalRules.NoSpaceAfterOpenBrace);
- rules.push(this.globalRules.NoSpaceBeforeCloseBrace);
- rules.push(this.globalRules.NoSpaceBetweenEmptyBraceBrackets);
- }
- if (options.insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces) {
- rules.push(this.globalRules.SpaceAfterTemplateHeadAndMiddle);
- rules.push(this.globalRules.SpaceBeforeTemplateMiddleAndTail);
- }
- else {
- rules.push(this.globalRules.NoSpaceAfterTemplateHeadAndMiddle);
- rules.push(this.globalRules.NoSpaceBeforeTemplateMiddleAndTail);
- }
- if (options.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces) {
- rules.push(this.globalRules.SpaceAfterOpenBraceInJsxExpression);
- rules.push(this.globalRules.SpaceBeforeCloseBraceInJsxExpression);
- }
- else {
- rules.push(this.globalRules.NoSpaceAfterOpenBraceInJsxExpression);
- rules.push(this.globalRules.NoSpaceBeforeCloseBraceInJsxExpression);
- }
- if (options.insertSpaceAfterSemicolonInForStatements) {
- rules.push(this.globalRules.SpaceAfterSemicolonInFor);
- }
- else {
- rules.push(this.globalRules.NoSpaceAfterSemicolonInFor);
- }
- if (options.insertSpaceBeforeAndAfterBinaryOperators) {
- rules.push(this.globalRules.SpaceBeforeBinaryOperator);
- rules.push(this.globalRules.SpaceAfterBinaryOperator);
- }
- else {
- 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);
- }
- if (options.placeOpenBraceOnNewLineForFunctions) {
- rules.push(this.globalRules.NewLineBeforeOpenBraceInFunction);
- rules.push(this.globalRules.NewLineBeforeOpenBraceInTypeScriptDeclWithBlock);
- }
- if (options.insertSpaceAfterTypeAssertion) {
- rules.push(this.globalRules.SpaceAfterTypeAssertion);
- }
- else {
- rules.push(this.globalRules.NoSpaceAfterTypeAssertion);
- }
- rules = rules.concat(this.globalRules.LowPriorityCommonRules);
- return rules;
- };
return RulesProvider;
}());
formatting.RulesProvider = RulesProvider;
@@ -81976,7 +84771,7 @@ var ts;
}
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 formattingContext = new formatting.FormattingContext(sourceFile, requestKind, options);
var previousRangeHasError;
var previousRange;
var previousParent;
@@ -82073,7 +84868,7 @@ var ts;
// falls through
case 149 /* PropertyDeclaration */:
case 146 /* Parameter */:
- return node.name.kind;
+ return ts.getNameOfDeclaration(node).kind;
}
}
function getDynamicIndentation(node, nodeStartLine, indentation, delta) {
@@ -82971,9 +85766,7 @@ var ts;
if (node.kind === 20 /* CloseParenToken */) {
return -1 /* Unknown */;
}
- if (node.parent && (node.parent.kind === 181 /* CallExpression */ ||
- node.parent.kind === 182 /* NewExpression */) &&
- node.parent.expression !== node) {
+ if (node.parent && ts.isCallOrNewExpression(node.parent) && node.parent.expression !== node) {
var fullCallOrNewExpression = node.parent.expression;
var startingExpression = getStartingExpression(fullCallOrNewExpression);
if (fullCallOrNewExpression === startingExpression) {
@@ -83287,7 +86080,7 @@ var ts;
return this;
}
if (index !== containingList.length - 1) {
- var nextToken = ts.getTokenAtPosition(sourceFile, node.end);
+ var nextToken = ts.getTokenAtPosition(sourceFile, node.end, /*includeJsDocComment*/ false);
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);
@@ -83299,7 +86092,7 @@ var ts;
}
}
else {
- var previousToken = ts.getTokenAtPosition(sourceFile, containingList[index - 1].end);
+ var previousToken = ts.getTokenAtPosition(sourceFile, containingList[index - 1].end, /*includeJsDocComment*/ false);
if (previousToken && isSeparator(node, previousToken)) {
this.deleteNodeRange(sourceFile, previousToken, node);
}
@@ -83376,7 +86169,7 @@ var ts;
if (index !== containingList.length - 1) {
// any element except the last one
// use next sibling as an anchor
- var nextToken = ts.getTokenAtPosition(sourceFile, after.end);
+ var nextToken = ts.getTokenAtPosition(sourceFile, after.end, /*includeJsDocComment*/ false);
if (nextToken && isSeparator(after, nextToken)) {
// for list
// a, b, c
@@ -83567,7 +86360,7 @@ var ts;
}());
textChanges.ChangeTracker = ChangeTracker;
function getNonformattedText(node, sourceFile, newLine) {
- var options = { newLine: newLine, target: sourceFile.languageVersion };
+ var options = { newLine: newLine, target: sourceFile && sourceFile.languageVersion };
var writer = new Writer(ts.getNewLineCharacter(options));
var printer = ts.createPrinter(options, writer);
printer.writeNode(3 /* Unspecified */, node, sourceFile, writer);
@@ -83596,27 +86389,8 @@ var ts;
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 visited = ts.visitEachChild(node, assignPositionsToNode, ts.nullTransformationContext, assignPositionsToNodeArray, assignPositionsToNode);
// create proxy node for non synthesized nodes
var newNode = ts.nodeIsSynthesized(visited)
? visited
@@ -83661,6 +86435,16 @@ var ts;
setEnd(nodes, _this.lastNonTriviaPosition);
}
};
+ this.onBeforeEmitToken = function (node) {
+ if (node) {
+ setPos(node, _this.lastNonTriviaPosition);
+ }
+ };
+ this.onAfterEmitToken = function (node) {
+ if (node) {
+ setEnd(node, _this.lastNonTriviaPosition);
+ }
+ };
}
Writer.prototype.setLastNonTriviaPosition = function (s, force) {
if (force || !isTrivia(s)) {
@@ -83729,14 +86513,14 @@ var ts;
var codefix;
(function (codefix) {
var codeFixes = [];
- function registerCodeFix(action) {
- ts.forEach(action.errorCodes, function (error) {
+ function registerCodeFix(codeFix) {
+ ts.forEach(codeFix.errorCodes, function (error) {
var fixes = codeFixes[error];
if (!fixes) {
fixes = [];
codeFixes[error] = fixes;
}
- fixes.push(action);
+ fixes.push(codeFix);
});
}
codefix.registerCodeFix = registerCodeFix;
@@ -83761,6 +86545,45 @@ var ts;
/* @internal */
var ts;
(function (ts) {
+ var refactor;
+ (function (refactor_1) {
+ // A map with the refactor code as key, the refactor itself as value
+ // e.g. nonSuggestableRefactors[refactorCode] -> the refactor you want
+ var refactors = ts.createMap();
+ function registerRefactor(refactor) {
+ refactors.set(refactor.name, refactor);
+ }
+ refactor_1.registerRefactor = registerRefactor;
+ function getApplicableRefactors(context) {
+ var results;
+ var refactorList = [];
+ refactors.forEach(function (refactor) {
+ refactorList.push(refactor);
+ });
+ for (var _i = 0, refactorList_1 = refactorList; _i < refactorList_1.length; _i++) {
+ var refactor_2 = refactorList_1[_i];
+ if (context.cancellationToken && context.cancellationToken.isCancellationRequested()) {
+ return results;
+ }
+ var infos = refactor_2.getAvailableActions(context);
+ if (infos && infos.length) {
+ (_a = (results || (results = []))).push.apply(_a, infos);
+ }
+ }
+ return results;
+ var _a;
+ }
+ refactor_1.getApplicableRefactors = getApplicableRefactors;
+ function getEditsForRefactor(context, refactorName, actionName) {
+ var refactor = refactors.get(refactorName);
+ return refactor && refactor.getEditsForAction(context, actionName);
+ }
+ refactor_1.getEditsForRefactor = getEditsForRefactor;
+ })(refactor = ts.refactor || (ts.refactor = {}));
+})(ts || (ts = {}));
+/* @internal */
+var ts;
+(function (ts) {
var codefix;
(function (codefix) {
codefix.registerCodeFix({
@@ -83770,7 +86593,7 @@ var ts;
function getActionForClassLikeIncorrectImplementsInterface(context) {
var sourceFile = context.sourceFile;
var start = context.span.start;
- var token = ts.getTokenAtPosition(sourceFile, start);
+ var token = ts.getTokenAtPosition(sourceFile, start, /*includeJsDocComment*/ false);
var checker = context.program.getTypeChecker();
var classDeclaration = ts.getContainingClass(token);
if (!classDeclaration) {
@@ -83826,89 +86649,123 @@ var ts;
var codefix;
(function (codefix) {
codefix.registerCodeFix({
- errorCodes: [ts.Diagnostics.Property_0_does_not_exist_on_type_1.code],
+ errorCodes: [ts.Diagnostics.Property_0_does_not_exist_on_type_1.code,
+ ts.Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2.code],
getCodeActions: getActionsForAddMissingMember
});
function getActionsForAddMissingMember(context) {
- var sourceFile = context.sourceFile;
+ var tokenSourceFile = context.sourceFile;
var start = context.span.start;
- // This is the identifier of the missing property. eg:
+ // The identifier of the missing property. eg:
// this.missing = 1;
// ^^^^^^^
- var token = ts.getTokenAtPosition(sourceFile, start);
+ var token = ts.getTokenAtPosition(tokenSourceFile, start, /*includeJsDocComment*/ false);
if (token.kind !== 71 /* Identifier */) {
return undefined;
}
- if (!ts.isPropertyAccessExpression(token.parent) || token.parent.expression.kind !== 99 /* ThisKeyword */) {
+ if (!ts.isPropertyAccessExpression(token.parent)) {
return undefined;
}
- var classMemberDeclaration = ts.getThisContainer(token, /*includeArrowFunctions*/ false);
- if (!ts.isClassElement(classMemberDeclaration)) {
- return undefined;
+ var tokenName = token.getText(tokenSourceFile);
+ var makeStatic = false;
+ var classDeclaration;
+ if (token.parent.expression.kind === 99 /* ThisKeyword */) {
+ var containingClassMemberDeclaration = ts.getThisContainer(token, /*includeArrowFunctions*/ false);
+ if (!ts.isClassElement(containingClassMemberDeclaration)) {
+ return undefined;
+ }
+ classDeclaration = containingClassMemberDeclaration.parent;
+ // Property accesses on `this` in a static method are accesses of a static member.
+ makeStatic = classDeclaration && ts.hasModifier(containingClassMemberDeclaration, 32 /* Static */);
+ }
+ else {
+ var checker = context.program.getTypeChecker();
+ var leftExpression = token.parent.expression;
+ var leftExpressionType = checker.getTypeAtLocation(leftExpression);
+ if (leftExpressionType.flags & 32768 /* Object */) {
+ var symbol = leftExpressionType.symbol;
+ if (symbol.flags & 32 /* Class */) {
+ classDeclaration = symbol.declarations && symbol.declarations[0];
+ if (leftExpressionType !== checker.getDeclaredTypeOfSymbol(symbol)) {
+ // The expression is a class symbol but the type is not the instance-side.
+ makeStatic = true;
+ }
+ }
+ }
}
- 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) {
+ var classDeclarationSourceFile = ts.getSourceFileOfNode(classDeclaration);
+ var classOpenBrace = ts.getOpenBraceOfClassLike(classDeclaration, classDeclarationSourceFile);
+ return ts.isInJavaScriptFile(classDeclarationSourceFile) ?
+ getActionsForAddMissingMemberInJavaScriptFile(classDeclaration, makeStatic) :
+ getActionsForAddMissingMemberInTypeScriptFile(classDeclaration, makeStatic);
+ function getActionsForAddMissingMemberInJavaScriptFile(classDeclaration, makeStatic) {
+ var actions;
+ var methodCodeAction = getActionForMethodDeclaration(/*includeTypeScriptSyntax*/ false);
+ if (methodCodeAction) {
+ actions = [methodCodeAction];
+ }
+ if (makeStatic) {
if (classDeclaration.kind === 199 /* ClassExpression */) {
- return undefined;
+ return actions;
}
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 staticInitialization = ts.createStatement(ts.createAssignment(ts.createPropertyAccess(ts.createIdentifier(className), tokenName), ts.createIdentifier("undefined")));
+ var staticInitializationChangeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context);
+ staticInitializationChangeTracker.insertNodeAfter(classDeclarationSourceFile, classDeclaration, staticInitialization, { suffix: context.newLineCharacter });
+ var initializeStaticAction = {
+ description: ts.formatStringFromArgs(ts.getLocaleSpecificMessage(ts.Diagnostics.Initialize_static_property_0), [tokenName]),
+ changes: staticInitializationChangeTracker.getChanges()
+ };
+ (actions || (actions = [])).push(initializeStaticAction);
+ return actions;
}
else {
var classConstructor = ts.getFirstConstructorWithBody(classDeclaration);
if (!classConstructor) {
- return undefined;
+ return actions;
}
- 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
- }]
- }]
- }];
+ var propertyInitialization = ts.createStatement(ts.createAssignment(ts.createPropertyAccess(ts.createThis(), tokenName), ts.createIdentifier("undefined")));
+ var propertyInitializationChangeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context);
+ propertyInitializationChangeTracker.insertNodeAt(classDeclarationSourceFile, classConstructor.body.getEnd() - 1, propertyInitialization, { prefix: context.newLineCharacter, suffix: context.newLineCharacter });
+ var initializeAction = {
+ description: ts.formatStringFromArgs(ts.getLocaleSpecificMessage(ts.Diagnostics.Initialize_property_0_in_the_constructor), [tokenName]),
+ changes: propertyInitializationChangeTracker.getChanges()
+ };
+ (actions || (actions = [])).push(initializeAction);
+ return actions;
}
}
- function getActionsForAddMissingMemberInTypeScriptFile() {
+ function getActionsForAddMissingMemberInTypeScriptFile(classDeclaration, makeStatic) {
+ var actions;
+ var methodCodeAction = getActionForMethodDeclaration(/*includeTypeScriptSyntax*/ true);
+ if (methodCodeAction) {
+ actions = [methodCodeAction];
+ }
var typeNode;
if (token.parent.parent.kind === 194 /* BinaryExpression */) {
var binaryExpression = token.parent.parent;
+ var otherExpression = token.parent === binaryExpression.left ? binaryExpression.right : binaryExpression.left;
var checker = context.program.getTypeChecker();
- var widenedType = checker.getWidenedType(checker.getBaseTypeOfLiteralType(checker.getTypeAtLocation(binaryExpression.right)));
+ var widenedType = checker.getWidenedType(checker.getBaseTypeOfLiteralType(checker.getTypeAtLocation(otherExpression)));
typeNode = checker.typeToTypeNode(widenedType, classDeclaration);
}
typeNode = typeNode || ts.createKeywordTypeNode(119 /* AnyKeyword */);
- var openBrace = ts.getOpenBraceOfClassLike(classDeclaration, sourceFile);
var property = ts.createProperty(
/*decorators*/ undefined,
- /*modifiers*/ isStatic ? [ts.createToken(115 /* StaticKeyword */)] : undefined, token.getText(sourceFile),
+ /*modifiers*/ makeStatic ? [ts.createToken(115 /* StaticKeyword */)] : undefined, tokenName,
/*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) {
+ propertyChangeTracker.insertNodeAfter(classDeclarationSourceFile, classOpenBrace, property, { suffix: context.newLineCharacter });
+ (actions || (actions = [])).push({
+ description: ts.formatStringFromArgs(ts.getLocaleSpecificMessage(ts.Diagnostics.Declare_property_0), [tokenName]),
+ changes: propertyChangeTracker.getChanges()
+ });
+ if (!makeStatic) {
+ // Index signatures cannot have the static modifier.
var stringTypeNode = ts.createKeywordTypeNode(136 /* StringKeyword */);
var indexingParameter = ts.createParameter(
/*decorators*/ undefined,
@@ -83916,18 +86773,86 @@ var ts;
/*dotDotDotToken*/ undefined, "x",
/*questionToken*/ undefined, stringTypeNode,
/*initializer*/ undefined);
- var indexSignature = ts.createIndexSignatureDeclaration(
+ var indexSignature = ts.createIndexSignature(
/*decorators*/ undefined,
/*modifiers*/ undefined, [indexingParameter], typeNode);
var indexSignatureChangeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context);
- indexSignatureChangeTracker.insertNodeAfter(sourceFile, openBrace, indexSignature, { suffix: context.newLineCharacter });
+ indexSignatureChangeTracker.insertNodeAfter(classDeclarationSourceFile, classOpenBrace, indexSignature, { suffix: context.newLineCharacter });
actions.push({
- description: ts.formatStringFromArgs(ts.getLocaleSpecificMessage(ts.Diagnostics.Add_index_signature_for_missing_property_0), [token.getText()]),
+ description: ts.formatStringFromArgs(ts.getLocaleSpecificMessage(ts.Diagnostics.Add_index_signature_for_property_0), [tokenName]),
changes: indexSignatureChangeTracker.getChanges()
});
}
return actions;
}
+ function getActionForMethodDeclaration(includeTypeScriptSyntax) {
+ if (token.parent.parent.kind === 181 /* CallExpression */) {
+ var callExpression = token.parent.parent;
+ var methodDeclaration = codefix.createMethodFromCallExpression(callExpression, tokenName, includeTypeScriptSyntax, makeStatic);
+ var methodDeclarationChangeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context);
+ methodDeclarationChangeTracker.insertNodeAfter(classDeclarationSourceFile, classOpenBrace, methodDeclaration, { suffix: context.newLineCharacter });
+ return {
+ description: ts.formatStringFromArgs(ts.getLocaleSpecificMessage(makeStatic ?
+ ts.Diagnostics.Declare_method_0 :
+ ts.Diagnostics.Declare_static_method_0), [tokenName]),
+ changes: methodDeclarationChangeTracker.getChanges()
+ };
+ }
+ }
+ }
+ })(codefix = ts.codefix || (ts.codefix = {}));
+})(ts || (ts = {}));
+/* @internal */
+var ts;
+(function (ts) {
+ var codefix;
+ (function (codefix) {
+ codefix.registerCodeFix({
+ errorCodes: [ts.Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2.code,
+ ts.Diagnostics.Cannot_find_name_0_Did_you_mean_1.code],
+ getCodeActions: getActionsForCorrectSpelling
+ });
+ function getActionsForCorrectSpelling(context) {
+ var sourceFile = context.sourceFile;
+ // This is the identifier of the misspelled word. eg:
+ // this.speling = 1;
+ // ^^^^^^^
+ var node = ts.getTokenAtPosition(sourceFile, context.span.start, /*includeJsDocComment*/ false); // TODO: GH#15852
+ var checker = context.program.getTypeChecker();
+ var suggestion;
+ if (node.kind === 71 /* Identifier */ && ts.isPropertyAccessExpression(node.parent)) {
+ var containingType = checker.getTypeAtLocation(node.parent.expression);
+ suggestion = checker.getSuggestionForNonexistentProperty(node, containingType);
+ }
+ else {
+ var meaning = ts.getMeaningFromLocation(node);
+ suggestion = checker.getSuggestionForNonexistentSymbol(node, ts.getTextOfNode(node), convertSemanticMeaningToSymbolFlags(meaning));
+ }
+ if (suggestion) {
+ return [{
+ description: ts.formatStringFromArgs(ts.getLocaleSpecificMessage(ts.Diagnostics.Change_spelling_to_0), [suggestion]),
+ changes: [{
+ fileName: sourceFile.fileName,
+ textChanges: [{
+ span: { start: node.getStart(), length: node.getWidth() },
+ newText: suggestion
+ }],
+ }],
+ }];
+ }
+ }
+ function convertSemanticMeaningToSymbolFlags(meaning) {
+ var flags = 0;
+ if (meaning & 4 /* Namespace */) {
+ flags |= 1920 /* Namespace */;
+ }
+ if (meaning & 2 /* Type */) {
+ flags |= 793064 /* Type */;
+ }
+ if (meaning & 1 /* Value */) {
+ flags |= 107455 /* Value */;
+ }
+ return flags;
}
})(codefix = ts.codefix || (ts.codefix = {}));
})(ts || (ts = {}));
@@ -83949,7 +86874,7 @@ var ts;
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 token = ts.getTokenAtPosition(sourceFile, start, /*includeJsDocComment*/ false);
var checker = context.program.getTypeChecker();
if (ts.isClassLike(token.parent)) {
var classDeclaration = token.parent;
@@ -83987,7 +86912,7 @@ var ts;
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;
- var token = ts.getTokenAtPosition(sourceFile, context.span.start);
+ var token = ts.getTokenAtPosition(sourceFile, context.span.start, /*includeJsDocComment*/ false);
if (token.kind !== 99 /* ThisKeyword */) {
return undefined;
}
@@ -84035,7 +86960,7 @@ var ts;
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);
+ var token = ts.getTokenAtPosition(sourceFile, context.span.start, /*includeJsDocComment*/ false);
if (token.kind !== 123 /* ConstructorKeyword */) {
return undefined;
}
@@ -84060,7 +86985,7 @@ var ts;
getCodeActions: function (context) {
var sourceFile = context.sourceFile;
var start = context.span.start;
- var token = ts.getTokenAtPosition(sourceFile, start);
+ var token = ts.getTokenAtPosition(sourceFile, start, /*includeJsDocComment*/ false);
var classDeclNode = ts.getContainingClass(token);
if (!(token.kind === 71 /* Identifier */ && ts.isClassLike(classDeclNode))) {
return undefined;
@@ -84100,7 +87025,7 @@ var ts;
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);
+ var token = ts.getTokenAtPosition(sourceFile, context.span.start, /*includeJsDocComment*/ false);
if (token.kind !== 71 /* Identifier */) {
return undefined;
}
@@ -84127,138 +87052,146 @@ var ts;
getCodeActions: function (context) {
var sourceFile = context.sourceFile;
var start = context.span.start;
- var token = ts.getTokenAtPosition(sourceFile, start);
+ var token = ts.getTokenAtPosition(sourceFile, start, /*includeJsDocComment*/ false);
// this handles var ["computed"] = 12;
if (token.kind === 21 /* OpenBracketToken */) {
- token = ts.getTokenAtPosition(sourceFile, start + 1);
+ token = ts.getTokenAtPosition(sourceFile, start + 1, /*includeJsDocComment*/ false);
}
switch (token.kind) {
case 71 /* Identifier */:
- switch (token.parent.kind) {
- case 226 /* VariableDeclaration */:
- switch (token.parent.parent.parent.kind) {
- case 214 /* 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 216 /* ForOfStatement */:
- var forOfStatement = token.parent.parent.parent;
- if (forOfStatement.initializer.kind === 227 /* VariableDeclarationList */) {
- var forOfInitializer = forOfStatement.initializer;
- return replaceNode(forOfInitializer.declarations[0], ts.createObjectLiteral());
- }
- break;
- case 215 /* ForInStatement */:
- // There is no valid fix in the case of:
- // for .. in
- return undefined;
- case 260 /* 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 145 /* TypeParameter */:
- var typeParameters = token.parent.parent.typeParameters;
- if (typeParameters.length === 1) {
- var previousToken = ts.getTokenAtPosition(sourceFile, typeParameters.pos - 1);
- if (!previousToken || previousToken.kind !== 27 /* LessThanToken */) {
- return deleteRange(typeParameters);
- }
- var nextToken = ts.getTokenAtPosition(sourceFile, typeParameters.end);
- if (!nextToken || nextToken.kind !== 29 /* GreaterThanToken */) {
- return deleteRange(typeParameters);
- }
- return deleteNodeRange(previousToken, nextToken);
- }
- else {
- return deleteNodeInList(token.parent);
- }
- case 146 /* 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 237 /* ImportEqualsDeclaration */:
- var importEquals = ts.getAncestor(token, 237 /* ImportEqualsDeclaration */);
- return deleteNode(importEquals);
- case 242 /* 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, 238 /* 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 239 /* ImportClause */:
- var importClause = token.parent;
- if (!importClause.namedBindings) {
- var importDecl = ts.getAncestor(importClause, 238 /* 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 === 26 /* 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 240 /* NamespaceImport */:
- var namespaceImport = token.parent;
- if (namespaceImport.name === token && !namespaceImport.parent.name) {
- var importDecl = ts.getAncestor(namespaceImport, 238 /* ImportDeclaration */);
- return deleteNode(importDecl);
- }
- else {
- var previousToken = ts.getTokenAtPosition(sourceFile, namespaceImport.pos - 1);
- if (previousToken && previousToken.kind === 26 /* CommaToken */) {
- var startPosition = ts.textChanges.getAdjustedStartPosition(sourceFile, previousToken, {}, ts.textChanges.Position.FullStart);
- return deleteRange({ pos: startPosition, end: namespaceImport.end });
- }
- return deleteRange(namespaceImport);
- }
- }
- break;
+ return deleteIdentifierOrPrefixWithUnderscore(token);
case 149 /* PropertyDeclaration */:
case 240 /* NamespaceImport */:
+ return [deleteNode(token.parent)];
+ default:
+ return [deleteDefault()];
+ }
+ function deleteDefault() {
+ if (ts.isDeclarationName(token)) {
return deleteNode(token.parent);
+ }
+ else if (ts.isLiteralComputedPropertyDeclarationName(token)) {
+ return deleteNode(token.parent.parent);
+ }
+ else {
+ return undefined;
+ }
}
- if (ts.isDeclarationName(token)) {
- return deleteNode(token.parent);
+ function prefixIdentifierWithUnderscore(identifier) {
+ var startPosition = identifier.getStart(sourceFile, /*includeJsDocComment*/ false);
+ return {
+ description: ts.formatStringFromArgs(ts.getLocaleSpecificMessage(ts.Diagnostics.Prefix_0_with_an_underscore), { 0: token.getText() }),
+ changes: [{
+ fileName: sourceFile.path,
+ textChanges: [{
+ span: { start: startPosition, length: 0 },
+ newText: "_"
+ }]
+ }]
+ };
}
- else if (ts.isLiteralComputedPropertyDeclarationName(token)) {
- return deleteNode(token.parent.parent);
+ function deleteIdentifierOrPrefixWithUnderscore(identifier) {
+ var parent = identifier.parent;
+ switch (parent.kind) {
+ case 226 /* VariableDeclaration */:
+ return deleteVariableDeclarationOrPrefixWithUnderscore(identifier, parent);
+ case 145 /* TypeParameter */:
+ var typeParameters = parent.parent.typeParameters;
+ if (typeParameters.length === 1) {
+ var previousToken = ts.getTokenAtPosition(sourceFile, typeParameters.pos - 1, /*includeJsDocComment*/ false);
+ var nextToken = ts.getTokenAtPosition(sourceFile, typeParameters.end, /*includeJsDocComment*/ false);
+ ts.Debug.assert(previousToken.kind === 27 /* LessThanToken */);
+ ts.Debug.assert(nextToken.kind === 29 /* GreaterThanToken */);
+ return [deleteNodeRange(previousToken, nextToken)];
+ }
+ else {
+ return [deleteNodeInList(parent)];
+ }
+ case 146 /* Parameter */:
+ var functionDeclaration = parent.parent;
+ return [functionDeclaration.parameters.length === 1 ? deleteNode(parent) : deleteNodeInList(parent),
+ prefixIdentifierWithUnderscore(identifier)];
+ // handle case where 'import a = A;'
+ case 237 /* ImportEqualsDeclaration */:
+ var importEquals = ts.getAncestor(identifier, 237 /* ImportEqualsDeclaration */);
+ return [deleteNode(importEquals)];
+ case 242 /* ImportSpecifier */:
+ var namedImports = 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(identifier, 238 /* ImportDeclaration */);
+ return [deleteNode(importSpec)];
+ }
+ else {
+ // delete import specifier
+ return [deleteNodeInList(parent)];
+ }
+ // handle case where "import d, * as ns from './file'"
+ // or "'import {a, b as ns} from './file'"
+ case 239 /* ImportClause */:// this covers both 'import |d|' and 'import |d,| *'
+ var importClause = parent;
+ if (!importClause.namedBindings) {
+ var importDecl = ts.getAncestor(importClause, 238 /* 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, /*includeJsDocComment*/ false);
+ if (nextToken && nextToken.kind === 26 /* 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 240 /* NamespaceImport */:
+ var namespaceImport = parent;
+ if (namespaceImport.name === identifier && !namespaceImport.parent.name) {
+ var importDecl = ts.getAncestor(namespaceImport, 238 /* ImportDeclaration */);
+ return [deleteNode(importDecl)];
+ }
+ else {
+ var previousToken = ts.getTokenAtPosition(sourceFile, namespaceImport.pos - 1, /*includeJsDocComment*/ false);
+ if (previousToken && previousToken.kind === 26 /* CommaToken */) {
+ var startPosition = ts.textChanges.getAdjustedStartPosition(sourceFile, previousToken, {}, ts.textChanges.Position.FullStart);
+ return [deleteRange({ pos: startPosition, end: namespaceImport.end })];
+ }
+ return [deleteRange(namespaceImport)];
+ }
+ default:
+ return [deleteDefault()];
+ }
}
- else {
- return undefined;
+ // token.parent is a variableDeclaration
+ function deleteVariableDeclarationOrPrefixWithUnderscore(identifier, varDecl) {
+ switch (varDecl.parent.parent.kind) {
+ case 214 /* ForStatement */:
+ var forStatement = varDecl.parent.parent;
+ var forInitializer = forStatement.initializer;
+ return [forInitializer.declarations.length === 1 ? deleteNode(forInitializer) : deleteNodeInList(varDecl)];
+ case 216 /* ForOfStatement */:
+ var forOfStatement = varDecl.parent.parent;
+ ts.Debug.assert(forOfStatement.initializer.kind === 227 /* VariableDeclarationList */);
+ var forOfInitializer = forOfStatement.initializer;
+ return [
+ replaceNode(forOfInitializer.declarations[0], ts.createObjectLiteral()),
+ prefixIdentifierWithUnderscore(identifier)
+ ];
+ case 215 /* ForInStatement */:
+ // There is no valid fix in the case of:
+ // for .. in
+ return [prefixIdentifierWithUnderscore(identifier)];
+ default:
+ var variableStatement = varDecl.parent.parent;
+ if (variableStatement.declarationList.declarations.length === 1) {
+ return [deleteNode(variableStatement)];
+ }
+ else {
+ return [deleteNodeInList(varDecl)];
+ }
+ }
}
function deleteNode(n) {
return makeChange(ts.textChanges.ChangeTracker.fromCodeFixContext(context).deleteNode(sourceFile, n));
@@ -84276,10 +87209,10 @@ var ts;
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()
- }];
+ return {
+ description: ts.formatStringFromArgs(ts.getLocaleSpecificMessage(ts.Diagnostics.Remove_declaration_for_Colon_0), { 0: token.getText() }),
+ changes: changeTracker.getChanges()
+ };
}
}
});
@@ -84290,6 +87223,15 @@ var ts;
(function (ts) {
var codefix;
(function (codefix) {
+ codefix.registerCodeFix({
+ errorCodes: [
+ ts.Diagnostics.Cannot_find_name_0.code,
+ ts.Diagnostics.Cannot_find_name_0_Did_you_mean_1.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: getImportCodeActions
+ });
var ModuleSpecifierComparison;
(function (ModuleSpecifierComparison) {
ModuleSpecifierComparison[ModuleSpecifierComparison["Better"] = 0] = "Better";
@@ -84387,400 +87329,408 @@ var ts;
};
return ImportCodeActionMap;
}());
- codefix.registerCodeFix({
- 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();
- var allSourceFiles = context.program.getSourceFiles();
- var useCaseSensitiveFileNames = context.host.useCaseSensitiveFileNames ? context.host.useCaseSensitiveFileNames() : false;
- var token = ts.getTokenAtPosition(sourceFile, context.span.start);
- var name = token.getText();
- var symbolIdActionMap = new ImportCodeActionMap();
- // this is a module id -> module import declaration map
- 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)) {
- candidateModules.push(otherSourceFile.symbol);
- }
- }
- 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);
- if (defaultExport) {
- var localSymbol = ts.getLocalSymbolForExportDefault(defaultExport);
- if (localSymbol && localSymbol.name === name && checkSymbolHasMeaning(localSymbol, currentTokenMeaning)) {
- // check if this symbol is already used
- var symbolId = getUniqueSymbolId(localSymbol);
- symbolIdActionMap.addActions(symbolId, getCodeActionForImport(moduleSymbol, /*isDefault*/ true));
- }
- }
- // check exports with the same name
- var exportSymbolWithIdenticalName = checker.tryGetMemberInModuleExports(name, moduleSymbol);
- if (exportSymbolWithIdenticalName && checkSymbolHasMeaning(exportSymbolWithIdenticalName, currentTokenMeaning)) {
- var symbolId = getUniqueSymbolId(exportSymbolWithIdenticalName);
- symbolIdActionMap.addActions(symbolId, getCodeActionForImport(moduleSymbol));
- }
- }
- return symbolIdActionMap.getAllActions();
- function getImportDeclarations(moduleSymbol) {
- var moduleSymbolId = getUniqueSymbolId(moduleSymbol);
- var cached = cachedImportDeclarations[moduleSymbolId];
- if (cached) {
- return cached;
+ function getImportCodeActions(context) {
+ var sourceFile = context.sourceFile;
+ var checker = context.program.getTypeChecker();
+ var allSourceFiles = context.program.getSourceFiles();
+ var useCaseSensitiveFileNames = context.host.useCaseSensitiveFileNames ? context.host.useCaseSensitiveFileNames() : false;
+ var token = ts.getTokenAtPosition(sourceFile, context.span.start, /*includeJsDocComment*/ false);
+ var name = token.getText();
+ var symbolIdActionMap = new ImportCodeActionMap();
+ // this is a module id -> module import declaration map
+ 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 umdSymbol = checker.getSymbolAtLocation(token);
+ var symbol = void 0;
+ var symbolName = void 0;
+ if (umdSymbol.flags & 8388608 /* Alias */) {
+ symbol = checker.getAliasedSymbol(umdSymbol);
+ symbolName = name;
+ }
+ else if (ts.isJsxOpeningLikeElement(token.parent) && token.parent.tagName === token) {
+ // The error wasn't for the symbolAtLocation, it was for the JSX tag itself, which needs access to e.g. `React`.
+ symbol = checker.getAliasedSymbol(checker.resolveNameAtLocation(token, checker.getJsxNamespace(), 107455 /* Value */));
+ symbolName = symbol.name;
+ }
+ else {
+ ts.Debug.fail("Either the symbol or the JSX namespace should be a UMD global if we got here");
+ }
+ return getCodeActionForImport(symbol, symbolName, /*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)) {
+ candidateModules.push(otherSourceFile.symbol);
+ }
+ }
+ 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);
+ if (defaultExport) {
+ var localSymbol = ts.getLocalSymbolForExportDefault(defaultExport);
+ if (localSymbol && localSymbol.name === name && checkSymbolHasMeaning(localSymbol, currentTokenMeaning)) {
+ // check if this symbol is already used
+ var symbolId = getUniqueSymbolId(localSymbol);
+ symbolIdActionMap.addActions(symbolId, getCodeActionForImport(moduleSymbol, name, /*isDefault*/ true));
}
- var existingDeclarations = [];
- for (var _i = 0, _a = sourceFile.imports; _i < _a.length; _i++) {
- var importModuleSpecifier = _a[_i];
- var importSymbol = checker.getSymbolAtLocation(importModuleSpecifier);
- if (importSymbol === moduleSymbol) {
- existingDeclarations.push(getImportDeclaration(importModuleSpecifier));
- }
+ }
+ // check exports with the same name
+ var exportSymbolWithIdenticalName = checker.tryGetMemberInModuleExports(name, moduleSymbol);
+ if (exportSymbolWithIdenticalName && checkSymbolHasMeaning(exportSymbolWithIdenticalName, currentTokenMeaning)) {
+ var symbolId = getUniqueSymbolId(exportSymbolWithIdenticalName);
+ symbolIdActionMap.addActions(symbolId, getCodeActionForImport(moduleSymbol, name));
+ }
+ }
+ return symbolIdActionMap.getAllActions();
+ function getImportDeclarations(moduleSymbol) {
+ var moduleSymbolId = getUniqueSymbolId(moduleSymbol);
+ var cached = cachedImportDeclarations[moduleSymbolId];
+ if (cached) {
+ return cached;
+ }
+ var existingDeclarations = [];
+ for (var _i = 0, _a = sourceFile.imports; _i < _a.length; _i++) {
+ var importModuleSpecifier = _a[_i];
+ var importSymbol = checker.getSymbolAtLocation(importModuleSpecifier);
+ if (importSymbol === moduleSymbol) {
+ existingDeclarations.push(getImportDeclaration(importModuleSpecifier));
}
- cachedImportDeclarations[moduleSymbolId] = existingDeclarations;
- return existingDeclarations;
- function getImportDeclaration(moduleSpecifier) {
- var node = moduleSpecifier;
- while (node) {
- if (node.kind === 238 /* ImportDeclaration */) {
- return node;
- }
- if (node.kind === 237 /* ImportEqualsDeclaration */) {
- return node;
- }
- node = node.parent;
+ }
+ cachedImportDeclarations[moduleSymbolId] = existingDeclarations;
+ return existingDeclarations;
+ function getImportDeclaration(moduleSpecifier) {
+ var node = moduleSpecifier;
+ while (node) {
+ if (node.kind === 238 /* ImportDeclaration */) {
+ return node;
}
- return undefined;
+ if (node.kind === 237 /* ImportEqualsDeclaration */) {
+ return node;
+ }
+ node = node.parent;
}
+ return undefined;
}
- function getUniqueSymbolId(symbol) {
- if (symbol.flags & 8388608 /* Alias */) {
- return ts.getSymbolId(checker.getAliasedSymbol(symbol));
- }
- return ts.getSymbolId(symbol);
+ }
+ function getUniqueSymbolId(symbol) {
+ if (symbol.flags & 8388608 /* Alias */) {
+ return ts.getSymbolId(checker.getAliasedSymbol(symbol));
}
- function checkSymbolHasMeaning(symbol, meaning) {
- var declarations = symbol.getDeclarations();
- return declarations ? ts.some(symbol.declarations, function (decl) { return !!(ts.getMeaningFromDeclaration(decl) & meaning); }) : false;
+ return ts.getSymbolId(symbol);
+ }
+ function checkSymbolHasMeaning(symbol, meaning) {
+ var declarations = symbol.getDeclarations();
+ return declarations ? ts.some(symbol.declarations, function (decl) { return !!(ts.getMeaningFromDeclaration(decl) & meaning); }) : false;
+ }
+ function getCodeActionForImport(moduleSymbol, symbolName, 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.
+ return getCodeActionsForExistingImport(existingDeclarations);
}
- 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.
- return getCodeActionsForExistingImport(existingDeclarations);
- }
- else {
- return [getCodeActionForNewImport()];
- }
- function getCodeActionsForExistingImport(declarations) {
- var actions = [];
- // It is possible that multiple import statements with the same specifier exist in the file.
- // e.g.
- //
- // import * as ns from "foo";
- // import { member1, member2 } from "foo";
- //
- // member3/**/ <-- cusor here
- //
- // in this case we should provie 2 actions:
- // 1. change "member3" to "ns.member3"
- // 2. add "member3" to the second import statement's import list
- // and it is up to the user to decide which one fits best.
- var namespaceImportDeclaration;
- var namedImportDeclaration;
- var existingModuleSpecifier;
- for (var _i = 0, declarations_14 = declarations; _i < declarations_14.length; _i++) {
- var declaration = declarations_14[_i];
- if (declaration.kind === 238 /* ImportDeclaration */) {
- var namedBindings = declaration.importClause && declaration.importClause.namedBindings;
- if (namedBindings && namedBindings.kind === 240 /* NamespaceImport */) {
- // case:
- // import * as ns from "foo"
- namespaceImportDeclaration = declaration;
- }
- else {
- // cases:
- // import default from "foo"
- // import { bar } from "foo" or combination with the first one
- // import "foo"
- namedImportDeclaration = declaration;
- }
- existingModuleSpecifier = declaration.moduleSpecifier.getText();
- }
- else {
+ else {
+ return [getCodeActionForNewImport()];
+ }
+ function getCodeActionsForExistingImport(declarations) {
+ var actions = [];
+ // It is possible that multiple import statements with the same specifier exist in the file.
+ // e.g.
+ //
+ // import * as ns from "foo";
+ // import { member1, member2 } from "foo";
+ //
+ // member3/**/ <-- cusor here
+ //
+ // in this case we should provie 2 actions:
+ // 1. change "member3" to "ns.member3"
+ // 2. add "member3" to the second import statement's import list
+ // and it is up to the user to decide which one fits best.
+ var namespaceImportDeclaration;
+ var namedImportDeclaration;
+ var existingModuleSpecifier;
+ for (var _i = 0, declarations_14 = declarations; _i < declarations_14.length; _i++) {
+ var declaration = declarations_14[_i];
+ if (declaration.kind === 238 /* ImportDeclaration */) {
+ var namedBindings = declaration.importClause && declaration.importClause.namedBindings;
+ if (namedBindings && namedBindings.kind === 240 /* NamespaceImport */) {
// case:
- // import foo = require("foo")
+ // import * as ns from "foo"
namespaceImportDeclaration = declaration;
- existingModuleSpecifier = getModuleSpecifierFromImportEqualsDeclaration(declaration);
}
+ else {
+ // cases:
+ // import default from "foo"
+ // import { bar } from "foo" or combination with the first one
+ // import "foo"
+ namedImportDeclaration = declaration;
+ }
+ existingModuleSpecifier = declaration.moduleSpecifier.getText();
}
- if (namespaceImportDeclaration) {
- actions.push(getCodeActionForNamespaceImport(namespaceImportDeclaration));
+ else {
+ // case:
+ // import foo = require("foo")
+ namespaceImportDeclaration = declaration;
+ existingModuleSpecifier = getModuleSpecifierFromImportEqualsDeclaration(declaration);
}
- 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 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], fileTextChanges, "InsertingIntoExistingImport", moduleSpecifierWithoutQuotes));
+ }
+ if (namespaceImportDeclaration) {
+ actions.push(getCodeActionForNamespaceImport(namespaceImportDeclaration));
+ }
+ 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 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], fileTextChanges, "InsertingIntoExistingImport", moduleSpecifierWithoutQuotes));
+ }
+ else {
+ // we need to create a new import statement, but the existing module specifier can be reused.
+ actions.push(getCodeActionForNewImport(existingModuleSpecifier));
+ }
+ return actions;
+ function getModuleSpecifierFromImportEqualsDeclaration(declaration) {
+ if (declaration.moduleReference && declaration.moduleReference.kind === 248 /* ExternalModuleReference */) {
+ return declaration.moduleReference.expression.getText();
+ }
+ return declaration.moduleReference.getText();
+ }
+ function getTextChangeForImportClause(importClause) {
+ 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"
+ // case 2:
+ // original text: import {} from "module"
+ // change to: import { name } from "module"
+ if (!importList || importList.elements.length === 0) {
+ var newImportClause = ts.createImportClause(importClause.name, ts.createNamedImports([newImportSpecifier]));
+ return createChangeTracker().replaceNode(sourceFile, importClause, newImportClause).getChanges();
+ }
+ /**
+ * If the import list has one import per line, preserve that. Otherwise, insert on same line as last element
+ * import {
+ * foo
+ * } from "./module";
+ */
+ return createChangeTracker().insertNodeInListAfter(sourceFile, importList.elements[importList.elements.length - 1], newImportSpecifier).getChanges();
+ }
+ function getCodeActionForNamespaceImport(declaration) {
+ var namespacePrefix;
+ if (declaration.kind === 238 /* ImportDeclaration */) {
+ namespacePrefix = declaration.importClause.namedBindings.name.getText();
}
else {
- // we need to create a new import statement, but the existing module specifier can be reused.
- actions.push(getCodeActionForNewImport(existingModuleSpecifier));
+ namespacePrefix = declaration.name.getText();
}
- return actions;
- function getModuleSpecifierFromImportEqualsDeclaration(declaration) {
- if (declaration.moduleReference && declaration.moduleReference.kind === 248 /* ExternalModuleReference */) {
- return declaration.moduleReference.expression.getText();
- }
- return declaration.moduleReference.getText();
- }
- function getTextChangeForImportClause(importClause) {
- 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"
- // case 2:
- // original text: import {} from "module"
- // change to: import { name } from "module"
- if (!importList || importList.elements.length === 0) {
- var newImportClause = ts.createImportClause(importClause.name, ts.createNamedImports([newImportSpecifier]));
- return createChangeTracker().replaceNode(sourceFile, importClause, newImportClause).getChanges();
- }
- /**
- * If the import list has one import per line, preserve that. Otherwise, insert on same line as last element
- * import {
- * foo
- * } from "./module";
- */
- return createChangeTracker().insertNodeInListAfter(sourceFile, importList.elements[importList.elements.length - 1], newImportSpecifier).getChanges();
- }
- function getCodeActionForNamespaceImport(declaration) {
- var namespacePrefix;
- if (declaration.kind === 238 /* ImportDeclaration */) {
- namespacePrefix = declaration.importClause.namedBindings.name.getText();
- }
- else {
- namespacePrefix = declaration.name.getText();
- }
- namespacePrefix = ts.stripQuotes(namespacePrefix);
- /**
- * Cases:
- * import * as ns from "mod"
- * import default, * as ns from "mod"
- * import ns = require("mod")
- *
- * Because there is no import list, we alter the reference to include the
- * 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], createChangeTracker().replaceNode(sourceFile, token, ts.createPropertyAccess(ts.createIdentifier(namespacePrefix), name)).getChanges(), "CodeChange");
- }
- }
- function getCodeActionForNewImport(moduleSpecifier) {
- if (!lastImportDeclaration) {
- // insert after any existing imports
- for (var i = sourceFile.statements.length - 1; i >= 0; i--) {
- var statement = sourceFile.statements[i];
- if (statement.kind === 237 /* ImportEqualsDeclaration */ || statement.kind === 238 /* ImportDeclaration */) {
- lastImportDeclaration = statement;
- break;
- }
+ namespacePrefix = ts.stripQuotes(namespacePrefix);
+ /**
+ * Cases:
+ * import * as ns from "mod"
+ * import default, * as ns from "mod"
+ * import ns = require("mod")
+ *
+ * Because there is no import list, we alter the reference to include the
+ * 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], createChangeTracker().replaceNode(sourceFile, token, ts.createPropertyAccess(ts.createIdentifier(namespacePrefix), name)).getChanges(), "CodeChange");
+ }
+ }
+ function getCodeActionForNewImport(moduleSpecifier) {
+ if (!lastImportDeclaration) {
+ // insert after any existing imports
+ for (var i = sourceFile.statements.length - 1; i >= 0; i--) {
+ var statement = sourceFile.statements[i];
+ if (statement.kind === 237 /* ImportEqualsDeclaration */ || statement.kind === 238 /* ImportDeclaration */) {
+ lastImportDeclaration = statement;
+ break;
}
}
- var getCanonicalFileName = ts.createGetCanonicalFileName(useCaseSensitiveFileNames);
- var moduleSpecifierWithoutQuotes = ts.stripQuotes(moduleSpecifier || getModuleSpecifierForNewImport());
- 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 });
+ }
+ var getCanonicalFileName = ts.createGetCanonicalFileName(useCaseSensitiveFileNames);
+ var moduleSpecifierWithoutQuotes = ts.stripQuotes(moduleSpecifier || getModuleSpecifierForNewImport());
+ var changeTracker = createChangeTracker();
+ var importClause = isDefault
+ ? ts.createImportClause(ts.createIdentifier(symbolName), /*namedBindings*/ undefined)
+ : isNamespaceImport
+ ? ts.createImportClause(/*name*/ undefined, ts.createNamespaceImport(ts.createIdentifier(symbolName)))
+ : ts.createImportClause(/*name*/ undefined, ts.createNamedImports([ts.createImportSpecifier(/*propertyName*/ undefined, ts.createIdentifier(symbolName))]));
+ 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.
+ return createCodeAction(ts.Diagnostics.Import_0_from_1, [symbolName, "\"" + moduleSpecifierWithoutQuotes + "\""], changeTracker.getChanges(), "NewImport", moduleSpecifierWithoutQuotes);
+ function getModuleSpecifierForNewImport() {
+ var fileName = sourceFile.fileName;
+ var moduleFileName = moduleSymbol.valueDeclaration.getSourceFile().fileName;
+ var sourceDirectory = ts.getDirectoryPath(fileName);
+ var options = context.program.getCompilerOptions();
+ return tryGetModuleNameFromAmbientModule() ||
+ tryGetModuleNameFromTypeRoots() ||
+ tryGetModuleNameAsNodeModule() ||
+ tryGetModuleNameFromBaseUrl() ||
+ tryGetModuleNameFromRootDirs() ||
+ ts.removeFileExtension(getRelativePath(moduleFileName, sourceDirectory));
+ function tryGetModuleNameFromAmbientModule() {
+ var decl = moduleSymbol.valueDeclaration;
+ if (ts.isModuleDeclaration(decl) && ts.isStringLiteral(decl.name)) {
+ return decl.name.text;
+ }
}
- // 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.
- return createCodeAction(ts.Diagnostics.Import_0_from_1, [name, "\"" + moduleSpecifierWithoutQuotes + "\""], changeTracker.getChanges(), "NewImport", moduleSpecifierWithoutQuotes);
- function getModuleSpecifierForNewImport() {
- var fileName = sourceFile.fileName;
- var moduleFileName = moduleSymbol.valueDeclaration.getSourceFile().fileName;
- var sourceDirectory = ts.getDirectoryPath(fileName);
- var options = context.program.getCompilerOptions();
- return tryGetModuleNameFromAmbientModule() ||
- tryGetModuleNameFromTypeRoots() ||
- tryGetModuleNameAsNodeModule() ||
- tryGetModuleNameFromBaseUrl() ||
- tryGetModuleNameFromRootDirs() ||
- ts.removeFileExtension(getRelativePath(moduleFileName, sourceDirectory));
- function tryGetModuleNameFromAmbientModule() {
- if (moduleSymbol.valueDeclaration.kind !== 265 /* SourceFile */) {
- return moduleSymbol.name;
- }
+ function tryGetModuleNameFromBaseUrl() {
+ if (!options.baseUrl) {
+ return undefined;
}
- function tryGetModuleNameFromBaseUrl() {
- if (!options.baseUrl) {
- return undefined;
- }
- 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) {
- for (var _i = 0, _a = options.paths[key]; _i < _a.length; _i++) {
- var pattern = _a[_i];
- var indexOfStar = pattern.indexOf("*");
- if (indexOfStar === 0 && pattern.length === 1) {
- continue;
- }
- else if (indexOfStar !== -1) {
- var prefix = pattern.substr(0, indexOfStar);
- var suffix = pattern.substr(indexOfStar + 1);
- if (relativeName.length >= prefix.length + suffix.length &&
- ts.startsWith(relativeName, prefix) &&
- ts.endsWith(relativeName, suffix)) {
- var matchedStar = relativeName.substr(prefix.length, relativeName.length - suffix.length);
- return key.replace("\*", matchedStar);
- }
- }
- else if (pattern === relativeName || pattern === relativeNameWithIndex) {
- return key;
+ 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) {
+ for (var _i = 0, _a = options.paths[key]; _i < _a.length; _i++) {
+ var pattern = _a[_i];
+ var indexOfStar = pattern.indexOf("*");
+ if (indexOfStar === 0 && pattern.length === 1) {
+ continue;
+ }
+ else if (indexOfStar !== -1) {
+ var prefix = pattern.substr(0, indexOfStar);
+ var suffix = pattern.substr(indexOfStar + 1);
+ if (relativeName.length >= prefix.length + suffix.length &&
+ ts.startsWith(relativeName, prefix) &&
+ ts.endsWith(relativeName, suffix)) {
+ var matchedStar = relativeName.substr(prefix.length, relativeName.length - suffix.length);
+ return key.replace("\*", matchedStar);
}
}
+ else if (pattern === relativeName || pattern === relativeNameWithIndex) {
+ return key;
+ }
}
}
- return relativeName;
}
- function tryGetModuleNameFromRootDirs() {
- if (options.rootDirs) {
- 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);
- }
+ return relativeName;
+ }
+ function tryGetModuleNameFromRootDirs() {
+ if (options.rootDirs) {
+ 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);
}
- return undefined;
}
- function tryGetModuleNameFromTypeRoots() {
- var typeRoots = ts.getEffectiveTypeRoots(options, context.host);
- if (typeRoots) {
- var normalizedTypeRoots = ts.map(typeRoots, function (typeRoot) { return ts.toPath(typeRoot, /*basePath*/ undefined, getCanonicalFileName); });
- for (var _i = 0, normalizedTypeRoots_1 = normalizedTypeRoots; _i < normalizedTypeRoots_1.length; _i++) {
- var typeRoot = normalizedTypeRoots_1[_i];
- if (ts.startsWith(moduleFileName, typeRoot)) {
- var relativeFileName = moduleFileName.substring(typeRoot.length + 1);
- return removeExtensionAndIndexPostFix(relativeFileName);
- }
+ return undefined;
+ }
+ function tryGetModuleNameFromTypeRoots() {
+ var typeRoots = ts.getEffectiveTypeRoots(options, context.host);
+ if (typeRoots) {
+ var normalizedTypeRoots = ts.map(typeRoots, function (typeRoot) { return ts.toPath(typeRoot, /*basePath*/ undefined, getCanonicalFileName); });
+ for (var _i = 0, normalizedTypeRoots_1 = normalizedTypeRoots; _i < normalizedTypeRoots_1.length; _i++) {
+ var typeRoot = normalizedTypeRoots_1[_i];
+ if (ts.startsWith(moduleFileName, typeRoot)) {
+ var relativeFileName = moduleFileName.substring(typeRoot.length + 1);
+ return removeExtensionAndIndexPostFix(relativeFileName);
}
}
}
- function tryGetModuleNameAsNodeModule() {
- if (ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.NodeJs) {
- // nothing to do here
- return undefined;
- }
- var indexOfNodeModules = moduleFileName.indexOf("node_modules");
- if (indexOfNodeModules < 0) {
- return undefined;
- }
- var relativeFileName;
- if (sourceDirectory.indexOf(moduleFileName.substring(0, indexOfNodeModules - 1)) === 0) {
- // if node_modules folder is in this folder or any of its parent folder, no need to keep it.
- relativeFileName = moduleFileName.substring(indexOfNodeModules + 13 /* "node_modules\".length */);
- }
- else {
- relativeFileName = getRelativePath(moduleFileName, sourceDirectory);
- }
- relativeFileName = ts.removeFileExtension(relativeFileName);
- if (ts.endsWith(relativeFileName, "/index")) {
- relativeFileName = ts.getDirectoryPath(relativeFileName);
- }
- else {
- try {
- var moduleDirectory = ts.getDirectoryPath(moduleFileName);
- var packageJsonContent = JSON.parse(context.host.readFile(ts.combinePaths(moduleDirectory, "package.json")));
- if (packageJsonContent) {
- var mainFile = packageJsonContent.main || packageJsonContent.typings;
- if (mainFile) {
- var mainExportFile = ts.toPath(mainFile, moduleDirectory, getCanonicalFileName);
- if (ts.removeFileExtension(mainExportFile) === ts.removeFileExtension(moduleFileName)) {
- relativeFileName = ts.getDirectoryPath(relativeFileName);
- }
+ }
+ function tryGetModuleNameAsNodeModule() {
+ if (ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.NodeJs) {
+ // nothing to do here
+ return undefined;
+ }
+ var indexOfNodeModules = moduleFileName.indexOf("node_modules");
+ if (indexOfNodeModules < 0) {
+ return undefined;
+ }
+ var relativeFileName;
+ if (sourceDirectory.indexOf(moduleFileName.substring(0, indexOfNodeModules - 1)) === 0) {
+ // if node_modules folder is in this folder or any of its parent folder, no need to keep it.
+ relativeFileName = moduleFileName.substring(indexOfNodeModules + 13 /* "node_modules\".length */);
+ }
+ else {
+ relativeFileName = getRelativePath(moduleFileName, sourceDirectory);
+ }
+ relativeFileName = ts.removeFileExtension(relativeFileName);
+ if (ts.endsWith(relativeFileName, "/index")) {
+ relativeFileName = ts.getDirectoryPath(relativeFileName);
+ }
+ else {
+ try {
+ var moduleDirectory = ts.getDirectoryPath(moduleFileName);
+ var packageJsonContent = JSON.parse(context.host.readFile(ts.combinePaths(moduleDirectory, "package.json")));
+ if (packageJsonContent) {
+ var mainFile = packageJsonContent.main || packageJsonContent.typings;
+ if (mainFile) {
+ var mainExportFile = ts.toPath(mainFile, moduleDirectory, getCanonicalFileName);
+ if (ts.removeFileExtension(mainExportFile) === ts.removeFileExtension(moduleFileName)) {
+ relativeFileName = ts.getDirectoryPath(relativeFileName);
}
}
}
- catch (e) { }
}
- return relativeFileName;
+ catch (e) { }
}
+ return ts.getPackageNameFromAtTypesDirectory(relativeFileName);
}
- function getPathRelativeToRootDirs(path, rootDirs) {
- for (var _i = 0, rootDirs_2 = rootDirs; _i < rootDirs_2.length; _i++) {
- var rootDir = rootDirs_2[_i];
- var relativeName = getRelativePathIfInDirectory(path, rootDir);
- if (relativeName !== undefined) {
- return relativeName;
- }
- }
- return undefined;
- }
- function removeExtensionAndIndexPostFix(fileName) {
- fileName = ts.removeFileExtension(fileName);
- if (ts.endsWith(fileName, "/index")) {
- fileName = fileName.substr(0, fileName.length - 6 /* "/index".length */);
+ }
+ function getPathRelativeToRootDirs(path, rootDirs) {
+ for (var _i = 0, rootDirs_2 = rootDirs; _i < rootDirs_2.length; _i++) {
+ var rootDir = rootDirs_2[_i];
+ var relativeName = getRelativePathIfInDirectory(path, rootDir);
+ if (relativeName !== undefined) {
+ return relativeName;
}
- 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, /*isAbsolutePathAnUrl*/ false);
- return ts.moduleHasNonRelativeName(relativePath) ? "./" + relativePath : relativePath;
+ return undefined;
+ }
+ function removeExtensionAndIndexPostFix(fileName) {
+ fileName = ts.removeFileExtension(fileName);
+ if (ts.endsWith(fileName, "/index")) {
+ fileName = fileName.substr(0, fileName.length - 6 /* "/index".length */);
}
+ 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, /*isAbsolutePathAnUrl*/ false);
+ return ts.moduleHasNonRelativeName(relativePath) ? "./" + relativePath : relativePath;
}
- }
- 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: changes,
- kind: kind,
- moduleSpecifier: 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: changes,
+ kind: kind,
+ moduleSpecifier: moduleSpecifier
+ };
+ }
+ }
})(codefix = ts.codefix || (ts.codefix = {}));
})(ts || (ts = {}));
/* @internal */
@@ -84807,7 +87757,7 @@ var ts;
// 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 token = ts.getTouchingToken(sourceFile, startPosition, /*includeJsDocComment*/ false);
var tokenLeadingCommnets = ts.getLeadingCommentRangesOfNode(token, sourceFile);
if (!tokenLeadingCommnets || !tokenLeadingCommnets.length || tokenLeadingCommnets[0].pos >= startPosition) {
return {
@@ -84912,7 +87862,7 @@ var ts;
}
var declaration = declarations[0];
// Clone name to remove leading trivia.
- var name = ts.getSynthesizedClone(declaration.name);
+ var name = ts.getSynthesizedClone(ts.getNameOfDeclaration(declaration));
var visibilityModifier = createVisibilityModifier(ts.getModifierFlags(declaration));
var modifiers = visibilityModifier ? ts.createNodeArray([visibilityModifier]) : undefined;
var type = checker.getWidenedType(checker.getTypeOfSymbolAtLocation(symbol, enclosingDeclaration));
@@ -84970,7 +87920,7 @@ var ts;
return undefined;
}
function signatureToMethodDeclaration(signature, enclosingDeclaration, body) {
- var signatureDeclaration = checker.signatureToSignatureDeclaration(signature, 151 /* MethodDeclaration */, enclosingDeclaration);
+ var signatureDeclaration = checker.signatureToSignatureDeclaration(signature, 151 /* MethodDeclaration */, enclosingDeclaration, ts.NodeBuilderFlags.SuppressAnyReturnType);
if (signatureDeclaration) {
signatureDeclaration.decorators = undefined;
signatureDeclaration.modifiers = modifiers;
@@ -84981,6 +87931,41 @@ var ts;
return signatureDeclaration;
}
}
+ function createMethodFromCallExpression(callExpression, methodName, includeTypeScriptSyntax, makeStatic) {
+ var parameters = createDummyParameters(callExpression.arguments.length, /*names*/ undefined, /*minArgumentCount*/ undefined, includeTypeScriptSyntax);
+ var typeParameters;
+ if (includeTypeScriptSyntax) {
+ var typeArgCount = ts.length(callExpression.typeArguments);
+ for (var i = 0; i < typeArgCount; i++) {
+ var name = typeArgCount < 8 ? String.fromCharCode(84 /* T */ + i) : "T" + i;
+ var typeParameter = ts.createTypeParameterDeclaration(name, /*constraint*/ undefined, /*defaultType*/ undefined);
+ (typeParameters ? typeParameters : typeParameters = []).push(typeParameter);
+ }
+ }
+ var newMethod = ts.createMethod(
+ /*decorators*/ undefined,
+ /*modifiers*/ makeStatic ? [ts.createToken(115 /* StaticKeyword */)] : undefined,
+ /*asteriskToken*/ undefined, methodName,
+ /*questionToken*/ undefined, typeParameters, parameters,
+ /*type*/ includeTypeScriptSyntax ? ts.createKeywordTypeNode(119 /* AnyKeyword */) : undefined, createStubbedMethodBody());
+ return newMethod;
+ }
+ codefix.createMethodFromCallExpression = createMethodFromCallExpression;
+ function createDummyParameters(argCount, names, minArgumentCount, addAnyType) {
+ var parameters = [];
+ for (var i = 0; i < argCount; i++) {
+ var newParameter = ts.createParameter(
+ /*decorators*/ undefined,
+ /*modifiers*/ undefined,
+ /*dotDotDotToken*/ undefined,
+ /*name*/ names && names[i] || "arg" + i,
+ /*questionToken*/ minArgumentCount !== undefined && i >= minArgumentCount ? ts.createToken(55 /* QuestionToken */) : undefined,
+ /*type*/ addAnyType ? ts.createKeywordTypeNode(119 /* AnyKeyword */) : undefined,
+ /*initializer*/ undefined);
+ parameters.push(newParameter);
+ }
+ return parameters;
+ }
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,
@@ -85001,17 +87986,7 @@ var ts;
}
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(119 /* AnyKeyword */);
- var newParameter = ts.createParameter(
- /*decorators*/ undefined,
- /*modifiers*/ undefined,
- /*dotDotDotToken*/ undefined, maxArgsParameterSymbolNames[i],
- /*questionToken*/ i >= minArgumentCount ? ts.createToken(55 /* QuestionToken */) : undefined, anyType,
- /*initializer*/ undefined);
- parameters.push(newParameter);
- }
+ var parameters = createDummyParameters(maxNonRestArgs, maxArgsParameterSymbolNames, minArgumentCount, /*addAnyType*/ true);
if (someSigHasRestParameter) {
var anyArrayType = ts.createArrayTypeNode(ts.createKeywordTypeNode(119 /* AnyKeyword */));
var restParameter = ts.createParameter(
@@ -85026,7 +88001,7 @@ var ts;
/*returnType*/ undefined);
}
function createStubbedMethod(modifiers, name, optional, typeParameters, parameters, returnType) {
- return ts.createMethodDeclaration(
+ return ts.createMethod(
/*decorators*/ undefined, modifiers,
/*asteriskToken*/ undefined, name, optional ? ts.createToken(55 /* QuestionToken */) : undefined, typeParameters, parameters, returnType, createStubbedMethodBody());
}
@@ -85049,15 +88024,215 @@ var ts;
})(ts || (ts = {}));
/// <reference path="fixClassIncorrectlyImplementsInterface.ts" />
/// <reference path="fixAddMissingMember.ts" />
+/// <reference path="fixSpelling.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='fixUnusedIdentifier.ts' />
/// <reference path='importFixes.ts' />
/// <reference path='disableJsDiagnostics.ts' />
/// <reference path='helpers.ts' />
+/* @internal */
+var ts;
+(function (ts) {
+ var refactor;
+ (function (refactor) {
+ var actionName = "convert";
+ var convertFunctionToES6Class = {
+ name: "Convert to ES2015 class",
+ description: ts.Diagnostics.Convert_function_to_an_ES2015_class.message,
+ getEditsForAction: getEditsForAction,
+ getAvailableActions: getAvailableActions
+ };
+ refactor.registerRefactor(convertFunctionToES6Class);
+ function getAvailableActions(context) {
+ var start = context.startPosition;
+ var node = ts.getTokenAtPosition(context.file, start, /*includeJsDocComment*/ false);
+ var checker = context.program.getTypeChecker();
+ var symbol = checker.getSymbolAtLocation(node);
+ if (symbol && ts.isDeclarationOfFunctionOrClassExpression(symbol)) {
+ symbol = symbol.valueDeclaration.initializer.symbol;
+ }
+ if (symbol && (symbol.flags & 16 /* Function */) && symbol.members && (symbol.members.size > 0)) {
+ return [
+ {
+ name: convertFunctionToES6Class.name,
+ description: convertFunctionToES6Class.description,
+ actions: [
+ {
+ description: convertFunctionToES6Class.description,
+ name: actionName
+ }
+ ]
+ }
+ ];
+ }
+ }
+ function getEditsForAction(context, action) {
+ // Somehow wrong action got invoked?
+ if (actionName !== action) {
+ return undefined;
+ }
+ var start = context.startPosition;
+ var sourceFile = context.file;
+ var checker = context.program.getTypeChecker();
+ var token = ts.getTokenAtPosition(sourceFile, start, /*includeJsDocComment*/ false);
+ var ctorSymbol = checker.getSymbolAtLocation(token);
+ var newLine = context.rulesProvider.getFormatOptions().newLineCharacter;
+ var deletedNodes = [];
+ var deletes = [];
+ if (!(ctorSymbol.flags & (16 /* Function */ | 3 /* Variable */))) {
+ return undefined;
+ }
+ var ctorDeclaration = ctorSymbol.valueDeclaration;
+ var changeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context);
+ var precedingNode;
+ var newClassDeclaration;
+ switch (ctorDeclaration.kind) {
+ case 228 /* FunctionDeclaration */:
+ precedingNode = ctorDeclaration;
+ deleteNode(ctorDeclaration);
+ newClassDeclaration = createClassFromFunctionDeclaration(ctorDeclaration);
+ break;
+ case 226 /* VariableDeclaration */:
+ precedingNode = ctorDeclaration.parent.parent;
+ if (ctorDeclaration.parent.declarations.length === 1) {
+ deleteNode(precedingNode);
+ }
+ else {
+ deleteNode(ctorDeclaration, /*inList*/ true);
+ }
+ newClassDeclaration = createClassFromVariableDeclaration(ctorDeclaration);
+ break;
+ }
+ if (!newClassDeclaration) {
+ return undefined;
+ }
+ // Because the preceding node could be touched, we need to insert nodes before delete nodes.
+ changeTracker.insertNodeAfter(sourceFile, precedingNode, newClassDeclaration, { suffix: newLine });
+ for (var _i = 0, deletes_1 = deletes; _i < deletes_1.length; _i++) {
+ var deleteCallback = deletes_1[_i];
+ deleteCallback();
+ }
+ return {
+ edits: changeTracker.getChanges()
+ };
+ function deleteNode(node, inList) {
+ if (inList === void 0) { inList = false; }
+ if (deletedNodes.some(function (n) { return ts.isNodeDescendantOf(node, n); })) {
+ // Parent node has already been deleted; do nothing
+ return;
+ }
+ deletedNodes.push(node);
+ if (inList) {
+ deletes.push(function () { return changeTracker.deleteNodeInList(sourceFile, node); });
+ }
+ else {
+ deletes.push(function () { return changeTracker.deleteNode(sourceFile, node); });
+ }
+ }
+ function createClassElementsFromSymbol(symbol) {
+ var memberElements = [];
+ // all instance members are stored in the "member" array of symbol
+ if (symbol.members) {
+ symbol.members.forEach(function (member) {
+ var memberElement = createClassElement(member, /*modifiers*/ undefined);
+ if (memberElement) {
+ memberElements.push(memberElement);
+ }
+ });
+ }
+ // all static members are stored in the "exports" array of symbol
+ if (symbol.exports) {
+ symbol.exports.forEach(function (member) {
+ var memberElement = createClassElement(member, [ts.createToken(115 /* StaticKeyword */)]);
+ if (memberElement) {
+ memberElements.push(memberElement);
+ }
+ });
+ }
+ return memberElements;
+ function shouldConvertDeclaration(_target, source) {
+ // Right now the only thing we can convert are function expressions - other values shouldn't get
+ // transformed. We can update this once ES public class properties are available.
+ return ts.isFunctionLike(source);
+ }
+ function createClassElement(symbol, modifiers) {
+ // both properties and methods are bound as property symbols
+ if (!(symbol.flags & 4 /* Property */)) {
+ return;
+ }
+ var memberDeclaration = symbol.valueDeclaration;
+ var assignmentBinaryExpression = memberDeclaration.parent;
+ if (!shouldConvertDeclaration(memberDeclaration, assignmentBinaryExpression.right)) {
+ return;
+ }
+ // delete the entire statement if this expression is the sole expression to take care of the semicolon at the end
+ var nodeToDelete = assignmentBinaryExpression.parent && assignmentBinaryExpression.parent.kind === 210 /* ExpressionStatement */
+ ? assignmentBinaryExpression.parent : assignmentBinaryExpression;
+ deleteNode(nodeToDelete);
+ if (!assignmentBinaryExpression.right) {
+ return ts.createProperty([], modifiers, symbol.name, /*questionToken*/ undefined,
+ /*type*/ undefined, /*initializer*/ undefined);
+ }
+ switch (assignmentBinaryExpression.right.kind) {
+ case 186 /* FunctionExpression */:
+ var functionExpression = assignmentBinaryExpression.right;
+ return ts.createMethod(/*decorators*/ undefined, modifiers, /*asteriskToken*/ undefined, memberDeclaration.name, /*questionToken*/ undefined,
+ /*typeParameters*/ undefined, functionExpression.parameters, /*type*/ undefined, functionExpression.body);
+ case 187 /* ArrowFunction */:
+ var arrowFunction = assignmentBinaryExpression.right;
+ var arrowFunctionBody = arrowFunction.body;
+ var bodyBlock = void 0;
+ // case 1: () => { return [1,2,3] }
+ if (arrowFunctionBody.kind === 207 /* Block */) {
+ bodyBlock = arrowFunctionBody;
+ }
+ else {
+ var expression = arrowFunctionBody;
+ bodyBlock = ts.createBlock([ts.createReturn(expression)]);
+ }
+ return ts.createMethod(/*decorators*/ undefined, modifiers, /*asteriskToken*/ undefined, memberDeclaration.name, /*questionToken*/ undefined,
+ /*typeParameters*/ undefined, arrowFunction.parameters, /*type*/ undefined, bodyBlock);
+ default:
+ // Don't try to declare members in JavaScript files
+ if (ts.isSourceFileJavaScript(sourceFile)) {
+ return;
+ }
+ return ts.createProperty(/*decorators*/ undefined, modifiers, memberDeclaration.name, /*questionToken*/ undefined,
+ /*type*/ undefined, assignmentBinaryExpression.right);
+ }
+ }
+ }
+ function createClassFromVariableDeclaration(node) {
+ var initializer = node.initializer;
+ if (!initializer || initializer.kind !== 186 /* FunctionExpression */) {
+ return undefined;
+ }
+ if (node.name.kind !== 71 /* Identifier */) {
+ return undefined;
+ }
+ var memberElements = createClassElementsFromSymbol(initializer.symbol);
+ if (initializer.body) {
+ memberElements.unshift(ts.createConstructor(/*decorators*/ undefined, /*modifiers*/ undefined, initializer.parameters, initializer.body));
+ }
+ return ts.createClassDeclaration(/*decorators*/ undefined, /*modifiers*/ undefined, node.name,
+ /*typeParameters*/ undefined, /*heritageClauses*/ undefined, memberElements);
+ }
+ function createClassFromFunctionDeclaration(node) {
+ var memberElements = createClassElementsFromSymbol(ctorSymbol);
+ if (node.body) {
+ memberElements.unshift(ts.createConstructor(/*decorators*/ undefined, /*modifiers*/ undefined, node.parameters, node.body));
+ }
+ return ts.createClassDeclaration(/*decorators*/ undefined, /*modifiers*/ undefined, node.name,
+ /*typeParameters*/ undefined, /*heritageClauses*/ undefined, memberElements);
+ }
+ }
+ })(refactor = ts.refactor || (ts.refactor = {}));
+})(ts || (ts = {}));
+/// <reference path="convertFunctionToEs6Class.ts" />
/// <reference path="..\compiler\program.ts"/>
/// <reference path="..\compiler\commandLineParser.ts"/>
/// <reference path='types.ts' />
@@ -85084,13 +88259,17 @@ var ts;
/// <reference path='formatting\smartIndenter.ts' />
/// <reference path='textChanges.ts' />
/// <reference path='codeFixProvider.ts' />
+/// <reference path='refactorProvider.ts' />
/// <reference path='codefixes\fixes.ts' />
+/// <reference path='refactors\refactors.ts' />
var ts;
(function (ts) {
/** The version of the language service API */
ts.servicesVersion = "0.5";
+ /* @internal */
+ var ruleProvider;
function createNode(kind, pos, end, parent) {
- var node = kind >= 143 /* FirstNode */ ? new NodeObject(kind, pos, end) :
+ var node = ts.isNodeKind(kind) ? new NodeObject(kind, pos, end) :
kind === 71 /* Identifier */ ? new IdentifierObject(71 /* Identifier */, pos, end) :
new TokenObject(kind, pos, end);
node.parent = parent;
@@ -85135,10 +88314,11 @@ var ts;
}
return sourceFile.text.substring(this.getStart(sourceFile), this.getEnd());
};
- NodeObject.prototype.addSyntheticNodes = function (nodes, pos, end, useJSDocScanner) {
+ NodeObject.prototype.addSyntheticNodes = function (nodes, pos, end) {
ts.scanner.setTextPos(pos);
while (pos < end) {
- var token = useJSDocScanner ? ts.scanner.scanJSDocToken() : ts.scanner.scan();
+ var token = ts.scanner.scan();
+ ts.Debug.assert(token !== 1 /* EndOfFileToken */); // Else it would infinitely loop
var textPos = ts.scanner.getTextPos();
if (textPos <= end) {
nodes.push(createNode(token, pos, textPos, this));
@@ -85148,7 +88328,7 @@ var ts;
return pos;
};
NodeObject.prototype.createSyntaxList = function (nodes) {
- var list = createNode(294 /* SyntaxList */, nodes.pos, nodes.end, this);
+ var list = createNode(295 /* SyntaxList */, nodes.pos, nodes.end, this);
list._children = [];
var pos = nodes.pos;
for (var _i = 0, nodes_9 = nodes; _i < nodes_9.length; _i++) {
@@ -85166,47 +88346,49 @@ var ts;
};
NodeObject.prototype.createChildren = function (sourceFile) {
var _this = this;
- var children;
- if (this.kind >= 143 /* FirstNode */) {
- ts.scanner.setText((sourceFile || this.getSourceFile()).text);
- children = [];
- var pos_3 = this.pos;
- var useJSDocScanner_1 = this.kind >= 283 /* FirstJSDocTagNode */ && this.kind <= 293 /* LastJSDocTagNode */;
- var processNode = function (node) {
- var isJSDocTagNode = ts.isJSDocTag(node);
- if (!isJSDocTagNode && pos_3 < node.pos) {
- pos_3 = _this.addSyntheticNodes(children, pos_3, node.pos, useJSDocScanner_1);
- }
- children.push(node);
- if (!isJSDocTagNode) {
- pos_3 = node.end;
- }
- };
- var processNodes = function (nodes) {
- if (pos_3 < nodes.pos) {
- pos_3 = _this.addSyntheticNodes(children, pos_3, nodes.pos, useJSDocScanner_1);
- }
- children.push(_this.createSyntaxList(nodes));
- pos_3 = nodes.end;
- };
- // jsDocComments need to be the first children
- if (this.jsDoc) {
- for (var _i = 0, _a = this.jsDoc; _i < _a.length; _i++) {
- var jsDocComment = _a[_i];
- processNode(jsDocComment);
- }
+ if (!ts.isNodeKind(this.kind)) {
+ this._children = ts.emptyArray;
+ return;
+ }
+ if (ts.isJSDocCommentContainingNode(this)) {
+ /** Don't add trivia for "tokens" since this is in a comment. */
+ var children_3 = [];
+ this.forEachChild(function (child) { children_3.push(child); });
+ this._children = children_3;
+ return;
+ }
+ var children = [];
+ ts.scanner.setText((sourceFile || this.getSourceFile()).text);
+ var pos = this.pos;
+ var processNode = function (node) {
+ pos = _this.addSyntheticNodes(children, pos, node.pos);
+ children.push(node);
+ pos = node.end;
+ };
+ var processNodes = function (nodes) {
+ if (pos < nodes.pos) {
+ pos = _this.addSyntheticNodes(children, pos, nodes.pos);
}
- // For syntactic classifications, all trivia are classcified together, including jsdoc comments.
- // For that to work, the jsdoc comments should still be the leading trivia of the first child.
- // Restoring the scanner position ensures that.
- pos_3 = this.pos;
- ts.forEachChild(this, processNode, processNodes);
- if (pos_3 < this.end) {
- this.addSyntheticNodes(children, pos_3, this.end);
+ children.push(_this.createSyntaxList(nodes));
+ pos = nodes.end;
+ };
+ // jsDocComments need to be the first children
+ if (this.jsDoc) {
+ for (var _i = 0, _a = this.jsDoc; _i < _a.length; _i++) {
+ var jsDocComment = _a[_i];
+ processNode(jsDocComment);
}
- ts.scanner.setText(undefined);
}
- this._children = children || ts.emptyArray;
+ // For syntactic classifications, all trivia are classcified together, including jsdoc comments.
+ // For that to work, the jsdoc comments should still be the leading trivia of the first child.
+ // Restoring the scanner position ensures that.
+ pos = this.pos;
+ ts.forEachChild(this, processNode, processNodes);
+ if (pos < this.end) {
+ this.addSyntheticNodes(children, pos, this.end);
+ }
+ ts.scanner.setText(undefined);
+ this._children = children;
};
NodeObject.prototype.getChildCount = function (sourceFile) {
if (!this._children)
@@ -85228,7 +88410,7 @@ var ts;
if (!children.length) {
return undefined;
}
- var child = ts.find(children, function (kid) { return kid.kind < 267 /* FirstJSDocNode */ || kid.kind > 293 /* LastJSDocNode */; });
+ var child = ts.find(children, function (kid) { return kid.kind < 267 /* FirstJSDocNode */ || kid.kind > 294 /* LastJSDocNode */; });
return child.kind < 143 /* FirstNode */ ?
child :
child.getFirstToken(sourceFile);
@@ -85473,13 +88655,14 @@ var ts;
return declarations;
}
function getDeclarationName(declaration) {
- if (declaration.name) {
- var result_7 = getTextOfIdentifierOrLiteral(declaration.name);
- if (result_7 !== undefined) {
- return result_7;
+ var name = ts.getNameOfDeclaration(declaration);
+ if (name) {
+ var result_8 = getTextOfIdentifierOrLiteral(name);
+ if (result_8 !== undefined) {
+ return result_8;
}
- if (declaration.name.kind === 144 /* ComputedPropertyName */) {
- var expr = declaration.name.expression;
+ if (name.kind === 144 /* ComputedPropertyName */) {
+ var expr = name.expression;
if (expr.kind === 179 /* PropertyAccessExpression */) {
return expr.name.text;
}
@@ -85554,8 +88737,9 @@ var ts;
ts.forEachChild(decl.name, visit);
break;
}
- if (decl.initializer)
+ if (decl.initializer) {
visit(decl.initializer);
+ }
}
// falls through
case 264 /* EnumMember */:
@@ -85598,6 +88782,17 @@ var ts;
};
return SourceFileObject;
}(NodeObject));
+ var SourceMapSourceObject = (function () {
+ function SourceMapSourceObject(fileName, text, skipTrivia) {
+ this.fileName = fileName;
+ this.text = text;
+ this.skipTrivia = skipTrivia;
+ }
+ SourceMapSourceObject.prototype.getLineAndCharacterOfPosition = function (pos) {
+ return ts.getLineAndCharacterOfPosition(this, pos);
+ };
+ return SourceMapSourceObject;
+ }());
function getServicesObjectAllocator() {
return {
getNodeConstructor: function () { return NodeObject; },
@@ -85607,6 +88802,7 @@ var ts;
getSymbolConstructor: function () { return SymbolObject; },
getTypeConstructor: function () { return TypeObject; },
getSignatureConstructor: function () { return SignatureObject; },
+ getSourceMapSourceConstructor: function () { return SourceMapSourceObject; },
};
}
function toEditorSettings(optionsAsMap) {
@@ -85658,7 +88854,6 @@ var ts;
var HostCache = (function () {
function HostCache(host, getCanonicalFileName) {
this.host = host;
- this.getCanonicalFileName = getCanonicalFileName;
// script id => script index
this.currentDirectory = host.getCurrentDirectory();
this.fileNameToEntry = ts.createFileMap();
@@ -85688,19 +88883,15 @@ var ts;
this.fileNameToEntry.set(path, entry);
return entry;
};
- HostCache.prototype.getEntry = function (path) {
+ HostCache.prototype.getEntryByPath = function (path) {
return this.fileNameToEntry.get(path);
};
- HostCache.prototype.contains = function (path) {
+ HostCache.prototype.containsEntryByPath = function (path) {
return this.fileNameToEntry.contains(path);
};
- HostCache.prototype.getOrCreateEntry = function (fileName) {
- var path = ts.toPath(fileName, this.currentDirectory, this.getCanonicalFileName);
- return this.getOrCreateEntryByPath(fileName, path);
- };
HostCache.prototype.getOrCreateEntryByPath = function (fileName, path) {
- return this.contains(path)
- ? this.getEntry(path)
+ return this.containsEntryByPath(path)
+ ? this.getEntryByPath(path)
: this.createEntry(fileName, path);
};
HostCache.prototype.getRootFileNames = function () {
@@ -85713,11 +88904,11 @@ var ts;
return fileNames;
};
HostCache.prototype.getVersion = function (path) {
- var file = this.getEntry(path);
+ var file = this.getEntryByPath(path);
return file && file.version;
};
HostCache.prototype.getScriptSnapshot = function (path) {
- var file = this.getEntry(path);
+ var file = this.getEntryByPath(path);
return file && file.scriptSnapshot;
};
return HostCache;
@@ -85864,7 +89055,7 @@ var ts;
function createLanguageService(host, documentRegistry) {
if (documentRegistry === void 0) { documentRegistry = ts.createDocumentRegistry(host.useCaseSensitiveFileNames && host.useCaseSensitiveFileNames(), host.getCurrentDirectory()); }
var syntaxTreeCache = new SyntaxTreeCache(host);
- var ruleProvider;
+ ruleProvider = ruleProvider || new ts.formatting.RulesProvider();
var program;
var lastProjectVersion;
var lastTypesRootVersion = 0;
@@ -85889,10 +89080,6 @@ var ts;
return sourceFile;
}
function getRuleProvider(options) {
- // Ensure rules are initialized and up to date wrt to formatting options
- if (!ruleProvider) {
- ruleProvider = new ts.formatting.RulesProvider();
- }
ruleProvider.ensureUpToDate(options);
return ruleProvider;
}
@@ -85949,12 +89136,19 @@ var ts;
getCurrentDirectory: function () { return currentDirectory; },
fileExists: function (fileName) {
// stub missing host functionality
- return hostCache.getOrCreateEntry(fileName) !== undefined;
+ var path = ts.toPath(fileName, currentDirectory, getCanonicalFileName);
+ return hostCache.containsEntryByPath(path) ?
+ !!hostCache.getEntryByPath(path) :
+ (host.fileExists && host.fileExists(fileName));
},
readFile: function (fileName) {
// stub missing host functionality
- var entry = hostCache.getOrCreateEntry(fileName);
- return entry && entry.scriptSnapshot.getText(0, entry.scriptSnapshot.getLength());
+ var path = ts.toPath(fileName, currentDirectory, getCanonicalFileName);
+ if (hostCache.containsEntryByPath(path)) {
+ var entry = hostCache.getEntryByPath(path);
+ return entry && entry.scriptSnapshot.getText(0, entry.scriptSnapshot.getLength());
+ }
+ return host.readFile && host.readFile(fileName);
},
directoryExists: function (directoryName) {
return ts.directoryProbablyExists(directoryName, host);
@@ -86087,7 +89281,9 @@ var ts;
ts.forEach(program.getSourceFiles(), function (f) {
return documentRegistry.releaseDocument(f.fileName, program.getCompilerOptions());
});
+ program = undefined;
}
+ host = undefined;
}
/// Diagnostics
function getSyntacticDiagnostics(fileName) {
@@ -86130,7 +89326,7 @@ var ts;
function getQuickInfoAtPosition(fileName, position) {
synchronizeHostData();
var sourceFile = getValidSourceFile(fileName);
- var node = ts.getTouchingPropertyName(sourceFile, position);
+ var node = ts.getTouchingPropertyName(sourceFile, position, /*includeJsDocComment*/ true);
if (node === sourceFile) {
return undefined;
}
@@ -86185,7 +89381,7 @@ var ts;
/// Goto implementation
function getImplementationAtPosition(fileName, position) {
synchronizeHostData();
- return ts.FindAllReferences.getImplementationsAtPosition(program.getTypeChecker(), cancellationToken, program.getSourceFiles(), getValidSourceFile(fileName), position);
+ return ts.FindAllReferences.getImplementationsAtPosition(program, cancellationToken, program.getSourceFiles(), getValidSourceFile(fileName), position);
}
/// References and Occurrences
function getOccurrencesAtPosition(fileName, position) {
@@ -86202,7 +89398,7 @@ var ts;
synchronizeHostData();
var sourceFilesToSearch = ts.map(filesToSearch, function (f) { return program.getSourceFile(f); });
var sourceFile = getValidSourceFile(fileName);
- return ts.DocumentHighlights.getDocumentHighlights(program.getTypeChecker(), cancellationToken, sourceFile, position, sourceFilesToSearch);
+ return ts.DocumentHighlights.getDocumentHighlights(program, cancellationToken, sourceFile, position, sourceFilesToSearch);
}
function getOccurrencesAtPositionCore(fileName, position) {
return convertDocumentHighlights(getDocumentHighlights(fileName, position, [fileName]));
@@ -86235,11 +89431,11 @@ var ts;
}
function getReferences(fileName, position, options) {
synchronizeHostData();
- return ts.FindAllReferences.findReferencedEntries(program.getTypeChecker(), cancellationToken, program.getSourceFiles(), getValidSourceFile(fileName), position, options);
+ return ts.FindAllReferences.findReferencedEntries(program, cancellationToken, program.getSourceFiles(), getValidSourceFile(fileName), position, options);
}
function findReferences(fileName, position) {
synchronizeHostData();
- return ts.FindAllReferences.findReferencedSymbols(program.getTypeChecker(), cancellationToken, program.getSourceFiles(), getValidSourceFile(fileName), position);
+ return ts.FindAllReferences.findReferencedSymbols(program, cancellationToken, program.getSourceFiles(), getValidSourceFile(fileName), position);
}
/// NavigateTo
function getNavigateToItems(searchValue, maxResultCount, fileName, excludeDtsFiles) {
@@ -86284,7 +89480,7 @@ var ts;
function getNameOrDottedNameSpan(fileName, startPos, _endPos) {
var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName);
// Get node at the location
- var node = ts.getTouchingPropertyName(sourceFile, startPos);
+ var node = ts.getTouchingPropertyName(sourceFile, startPos, /*includeJsDocComment*/ false);
if (node === sourceFile) {
return;
}
@@ -86378,7 +89574,7 @@ var ts;
function getBraceMatchingAtPosition(fileName, position) {
var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName);
var result = [];
- var token = ts.getTouchingToken(sourceFile, position);
+ var token = ts.getTouchingToken(sourceFile, position, /*includeJsDocComment*/ false);
if (token.getStart(sourceFile) === position) {
var matchKind = getMatchingTokenKind(token);
// Ensure that there is a corresponding token to match ours.
@@ -86542,8 +89738,7 @@ var ts;
var matchPosition = matchArray.index + preamble.length;
// OK, we have found a match in the file. This is only an acceptable match if
// it is contained within a comment.
- var token = ts.getTokenAtPosition(sourceFile, matchPosition);
- if (!ts.isInsideComment(sourceFile, token, matchPosition)) {
+ if (!ts.isInComment(sourceFile, matchPosition)) {
continue;
}
var descriptor = undefined;
@@ -86631,6 +89826,28 @@ var ts;
var defaultLibFileName = host.getDefaultLibFileName(host.getCompilationSettings());
return ts.Rename.getRenameInfo(program.getTypeChecker(), defaultLibFileName, getCanonicalFileName, getValidSourceFile(fileName), position);
}
+ function getRefactorContext(file, positionOrRange, formatOptions) {
+ var _a = typeof positionOrRange === "number" ? [positionOrRange, undefined] : [positionOrRange.pos, positionOrRange.end], startPosition = _a[0], endPosition = _a[1];
+ return {
+ file: file,
+ startPosition: startPosition,
+ endPosition: endPosition,
+ program: getProgram(),
+ newLineCharacter: host.getNewLine(),
+ rulesProvider: getRuleProvider(formatOptions),
+ cancellationToken: cancellationToken
+ };
+ }
+ function getApplicableRefactors(fileName, positionOrRange) {
+ synchronizeHostData();
+ var file = getValidSourceFile(fileName);
+ return ts.refactor.getApplicableRefactors(getRefactorContext(file, positionOrRange));
+ }
+ function getEditsForRefactor(fileName, formatOptions, positionOrRange, refactorName, actionName) {
+ synchronizeHostData();
+ var file = getValidSourceFile(fileName);
+ return ts.refactor.getEditsForRefactor(getRefactorContext(file, positionOrRange, formatOptions), refactorName, actionName);
+ }
return {
dispose: dispose,
cleanupSemanticCache: cleanupSemanticCache,
@@ -86673,7 +89890,9 @@ var ts;
getEmitOutput: getEmitOutput,
getNonBoundSourceFile: getNonBoundSourceFile,
getSourceFile: getSourceFile,
- getProgram: getProgram
+ getProgram: getProgram,
+ getApplicableRefactors: getApplicableRefactors,
+ getEditsForRefactor: getEditsForRefactor,
};
}
ts.createLanguageService = createLanguageService;
@@ -86761,20 +89980,20 @@ var ts;
var contextualType = typeChecker.getContextualType(objectLiteral);
var name = ts.getTextOfPropertyName(node.name);
if (name && contextualType) {
- var result_8 = [];
+ var result_9 = [];
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);
+ result_9.push(symbol);
}
});
- return result_8;
+ return result_9;
}
if (symbol) {
- result_8.push(symbol);
- return result_8;
+ result_9.push(symbol);
+ return result_9;
}
}
return undefined;
@@ -86817,7 +90036,7 @@ var ts;
if (sourceFile.isDeclarationFile) {
return undefined;
}
- var tokenAtLocation = ts.getTokenAtPosition(sourceFile, position);
+ var tokenAtLocation = ts.getTokenAtPosition(sourceFile, position, /*includeJsDocComment*/ false);
var lineOfPosition = sourceFile.getLineAndCharacterOfPosition(position).line;
if (sourceFile.getLineAndCharacterOfPosition(tokenAtLocation.getStart(sourceFile)).line > lineOfPosition) {
// Get previous token if the token is returned starts on new line
@@ -88032,6 +91251,9 @@ 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 (result.resolvedModule && result.resolvedModule.extension !== ts.Extension.Ts && result.resolvedModule.extension !== ts.Extension.Tsx && result.resolvedModule.extension !== ts.Extension.Dts) {
+ resolvedFileName = undefined;
+ }
return {
resolvedFileName: resolvedFileName,
failedLookupLocations: result.failedLookupLocations
@@ -88205,4 +91427,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.3";
+var toolsVersion = "2.4";
diff --git a/node_modules/typedoc/node_modules/typescript/lib/typescriptServices.d.ts b/node_modules/typedoc/node_modules/typescript/lib/typescriptServices.d.ts
index 8bf49a21d..4df5b4569 100644
--- a/node_modules/typedoc/node_modules/typescript/lib/typescriptServices.d.ts
+++ b/node_modules/typedoc/node_modules/typescript/lib/typescriptServices.d.ts
@@ -1,18 +1,18 @@
-/*! *****************************************************************************
-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.
+***************************************************************************** */
+
declare namespace ts {
/**
* Type of objects whose values are all of the same type.
@@ -348,20 +348,22 @@ declare namespace ts {
JSDocComment = 283,
JSDocTag = 284,
JSDocAugmentsTag = 285,
- JSDocParameterTag = 286,
- JSDocReturnTag = 287,
- JSDocTypeTag = 288,
- JSDocTemplateTag = 289,
- JSDocTypedefTag = 290,
- JSDocPropertyTag = 291,
- JSDocTypeLiteral = 292,
- JSDocLiteralType = 293,
- SyntaxList = 294,
- NotEmittedStatement = 295,
- PartiallyEmittedExpression = 296,
- MergeDeclarationMarker = 297,
- EndOfDeclarationMarker = 298,
- Count = 299,
+ JSDocClassTag = 286,
+ JSDocParameterTag = 287,
+ JSDocReturnTag = 288,
+ JSDocTypeTag = 289,
+ JSDocTemplateTag = 290,
+ JSDocTypedefTag = 291,
+ JSDocPropertyTag = 292,
+ JSDocTypeLiteral = 293,
+ JSDocLiteralType = 294,
+ SyntaxList = 295,
+ NotEmittedStatement = 296,
+ PartiallyEmittedExpression = 297,
+ CommaListExpression = 298,
+ MergeDeclarationMarker = 299,
+ EndOfDeclarationMarker = 300,
+ Count = 301,
FirstAssignment = 58,
LastAssignment = 70,
FirstCompoundAssignment = 59,
@@ -388,9 +390,9 @@ declare namespace ts {
LastBinaryOperator = 70,
FirstNode = 143,
FirstJSDocNode = 267,
- LastJSDocNode = 293,
- FirstJSDocTagNode = 283,
- LastJSDocTagNode = 293,
+ LastJSDocNode = 294,
+ FirstJSDocTagNode = 284,
+ LastJSDocTagNode = 294,
}
enum NodeFlags {
None = 0,
@@ -474,6 +476,10 @@ declare namespace ts {
type ModifiersArray = NodeArray<Modifier>;
interface Identifier extends PrimaryExpression {
kind: SyntaxKind.Identifier;
+ /**
+ * Text of identifier (with escapes converted to characters).
+ * If the identifier begins with two underscores, this will begin with three.
+ */
text: string;
originalKeywordKind?: SyntaxKind;
isInJSDocNamespace?: boolean;
@@ -491,9 +497,11 @@ declare namespace ts {
type DeclarationName = Identifier | StringLiteral | NumericLiteral | ComputedPropertyName | BindingPattern;
interface Declaration extends Node {
_declarationBrand: any;
+ }
+ interface NamedDeclaration extends Declaration {
name?: DeclarationName;
}
- interface DeclarationStatement extends Declaration, Statement {
+ interface DeclarationStatement extends NamedDeclaration, Statement {
name?: Identifier | StringLiteral | NumericLiteral;
}
interface ComputedPropertyName extends Node {
@@ -504,7 +512,7 @@ declare namespace ts {
kind: SyntaxKind.Decorator;
expression: LeftHandSideExpression;
}
- interface TypeParameterDeclaration extends Declaration {
+ interface TypeParameterDeclaration extends NamedDeclaration {
kind: SyntaxKind.TypeParameter;
parent?: DeclarationWithTypeParameters;
name: Identifier;
@@ -512,7 +520,7 @@ declare namespace ts {
default?: TypeNode;
expression?: Expression;
}
- interface SignatureDeclaration extends Declaration {
+ interface SignatureDeclaration extends NamedDeclaration {
name?: PropertyName;
typeParameters?: NodeArray<TypeParameterDeclaration>;
parameters: NodeArray<ParameterDeclaration>;
@@ -525,7 +533,7 @@ declare namespace ts {
kind: SyntaxKind.ConstructSignature;
}
type BindingName = Identifier | BindingPattern;
- interface VariableDeclaration extends Declaration {
+ interface VariableDeclaration extends NamedDeclaration {
kind: SyntaxKind.VariableDeclaration;
parent?: VariableDeclarationList | CatchClause;
name: BindingName;
@@ -537,7 +545,7 @@ declare namespace ts {
parent?: VariableStatement | ForStatement | ForOfStatement | ForInStatement;
declarations: NodeArray<VariableDeclaration>;
}
- interface ParameterDeclaration extends Declaration {
+ interface ParameterDeclaration extends NamedDeclaration {
kind: SyntaxKind.Parameter;
parent?: SignatureDeclaration;
dotDotDotToken?: DotDotDotToken;
@@ -546,7 +554,7 @@ declare namespace ts {
type?: TypeNode;
initializer?: Expression;
}
- interface BindingElement extends Declaration {
+ interface BindingElement extends NamedDeclaration {
kind: SyntaxKind.BindingElement;
parent?: BindingPattern;
propertyName?: PropertyName;
@@ -568,7 +576,7 @@ declare namespace ts {
type?: TypeNode;
initializer?: Expression;
}
- interface ObjectLiteralElement extends Declaration {
+ interface ObjectLiteralElement extends NamedDeclaration {
_objectLiteralBrandBrand: any;
name?: PropertyName;
}
@@ -590,7 +598,7 @@ declare namespace ts {
kind: SyntaxKind.SpreadAssignment;
expression: Expression;
}
- interface VariableLikeDeclaration extends Declaration {
+ interface VariableLikeDeclaration extends NamedDeclaration {
propertyName?: PropertyName;
dotDotDotToken?: DotDotDotToken;
name: DeclarationName;
@@ -598,7 +606,7 @@ declare namespace ts {
type?: TypeNode;
initializer?: Expression;
}
- interface PropertyLikeDeclaration extends Declaration {
+ interface PropertyLikeDeclaration extends NamedDeclaration {
name: PropertyName;
}
interface ObjectBindingPattern extends Node {
@@ -684,6 +692,7 @@ declare namespace ts {
interface ConstructorTypeNode extends TypeNode, SignatureDeclaration {
kind: SyntaxKind.ConstructorType;
}
+ type TypeReferenceType = TypeReferenceNode | ExpressionWithTypeArguments | JSDocTypeReference;
interface TypeReferenceNode extends TypeNode {
kind: SyntaxKind.TypeReference;
typeName: EntityName;
@@ -761,22 +770,24 @@ declare namespace ts {
interface UnaryExpression extends Expression {
_unaryExpressionBrand: any;
}
- interface IncrementExpression extends UnaryExpression {
- _incrementExpressionBrand: any;
+ /** Deprecated, please use UpdateExpression */
+ type IncrementExpression = UpdateExpression;
+ interface UpdateExpression extends UnaryExpression {
+ _updateExpressionBrand: any;
}
type PrefixUnaryOperator = SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken | SyntaxKind.PlusToken | SyntaxKind.MinusToken | SyntaxKind.TildeToken | SyntaxKind.ExclamationToken;
- interface PrefixUnaryExpression extends IncrementExpression {
+ interface PrefixUnaryExpression extends UpdateExpression {
kind: SyntaxKind.PrefixUnaryExpression;
operator: PrefixUnaryOperator;
operand: UnaryExpression;
}
type PostfixUnaryOperator = SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken;
- interface PostfixUnaryExpression extends IncrementExpression {
+ interface PostfixUnaryExpression extends UpdateExpression {
kind: SyntaxKind.PostfixUnaryExpression;
operand: LeftHandSideExpression;
operator: PostfixUnaryOperator;
}
- interface LeftHandSideExpression extends IncrementExpression {
+ interface LeftHandSideExpression extends UpdateExpression {
_leftHandSideExpressionBrand: any;
}
interface MemberExpression extends LeftHandSideExpression {
@@ -797,6 +808,9 @@ declare namespace ts {
interface SuperExpression extends PrimaryExpression {
kind: SyntaxKind.SuperKeyword;
}
+ interface ImportExpression extends PrimaryExpression {
+ kind: SyntaxKind.ImportKeyword;
+ }
interface DeleteExpression extends UnaryExpression {
kind: SyntaxKind.DeleteExpression;
expression: UnaryExpression;
@@ -950,7 +964,7 @@ declare namespace ts {
}
type EntityNameExpression = Identifier | PropertyAccessEntityNameExpression | ParenthesizedExpression;
type EntityNameOrEntityNameExpression = EntityName | EntityNameExpression;
- interface PropertyAccessExpression extends MemberExpression, Declaration {
+ interface PropertyAccessExpression extends MemberExpression, NamedDeclaration {
kind: SyntaxKind.PropertyAccessExpression;
expression: LeftHandSideExpression;
name: Identifier;
@@ -981,6 +995,9 @@ declare namespace ts {
interface SuperCall extends CallExpression {
expression: SuperExpression;
}
+ interface ImportCall extends CallExpression {
+ expression: ImportExpression;
+ }
interface ExpressionWithTypeArguments extends TypeNode {
kind: SyntaxKind.ExpressionWithTypeArguments;
parent?: HeritageClause;
@@ -1016,7 +1033,7 @@ declare namespace ts {
}
interface MetaProperty extends PrimaryExpression {
kind: SyntaxKind.MetaProperty;
- keywordToken: SyntaxKind;
+ keywordToken: SyntaxKind.NewKeyword;
name: Identifier;
}
interface JsxElement extends PrimaryExpression {
@@ -1076,6 +1093,13 @@ declare namespace ts {
interface NotEmittedStatement extends Statement {
kind: SyntaxKind.NotEmittedStatement;
}
+ /**
+ * A list of comma-seperated expressions. This node is only created by transformations.
+ */
+ interface CommaListExpression extends Expression {
+ kind: SyntaxKind.CommaListExpression;
+ elements: NodeArray<Expression>;
+ }
interface EmptyStatement extends Statement {
kind: SyntaxKind.EmptyStatement;
}
@@ -1123,6 +1147,7 @@ declare namespace ts {
condition?: Expression;
incrementor?: Expression;
}
+ type ForInOrOfStatement = ForInStatement | ForOfStatement;
interface ForInStatement extends IterationStatement {
kind: SyntaxKind.ForInStatement;
initializer: ForInitializer;
@@ -1196,8 +1221,8 @@ declare namespace ts {
variableDeclaration: VariableDeclaration;
block: Block;
}
- type DeclarationWithTypeParameters = SignatureDeclaration | ClassLikeDeclaration | InterfaceDeclaration | TypeAliasDeclaration;
- interface ClassLikeDeclaration extends Declaration {
+ type DeclarationWithTypeParameters = SignatureDeclaration | ClassLikeDeclaration | InterfaceDeclaration | TypeAliasDeclaration | JSDocTemplateTag;
+ interface ClassLikeDeclaration extends NamedDeclaration {
name?: Identifier;
typeParameters?: NodeArray<TypeParameterDeclaration>;
heritageClauses?: NodeArray<HeritageClause>;
@@ -1210,11 +1235,11 @@ declare namespace ts {
interface ClassExpression extends ClassLikeDeclaration, PrimaryExpression {
kind: SyntaxKind.ClassExpression;
}
- interface ClassElement extends Declaration {
+ interface ClassElement extends NamedDeclaration {
_classElementBrand: any;
name?: PropertyName;
}
- interface TypeElement extends Declaration {
+ interface TypeElement extends NamedDeclaration {
_typeElementBrand: any;
name?: PropertyName;
questionToken?: QuestionToken;
@@ -1238,7 +1263,7 @@ declare namespace ts {
typeParameters?: NodeArray<TypeParameterDeclaration>;
type: TypeNode;
}
- interface EnumMember extends Declaration {
+ interface EnumMember extends NamedDeclaration {
kind: SyntaxKind.EnumMember;
parent?: EnumDeclaration;
name: PropertyName;
@@ -1297,13 +1322,13 @@ declare namespace ts {
moduleSpecifier: Expression;
}
type NamedImportBindings = NamespaceImport | NamedImports;
- interface ImportClause extends Declaration {
+ interface ImportClause extends NamedDeclaration {
kind: SyntaxKind.ImportClause;
parent?: ImportDeclaration;
name?: Identifier;
namedBindings?: NamedImportBindings;
}
- interface NamespaceImport extends Declaration {
+ interface NamespaceImport extends NamedDeclaration {
kind: SyntaxKind.NamespaceImport;
parent?: ImportClause;
name: Identifier;
@@ -1330,13 +1355,13 @@ declare namespace ts {
elements: NodeArray<ExportSpecifier>;
}
type NamedImportsOrExports = NamedImports | NamedExports;
- interface ImportSpecifier extends Declaration {
+ interface ImportSpecifier extends NamedDeclaration {
kind: SyntaxKind.ImportSpecifier;
parent?: NamedImports;
propertyName?: Identifier;
name: Identifier;
}
- interface ExportSpecifier extends Declaration {
+ interface ExportSpecifier extends NamedDeclaration {
kind: SyntaxKind.ExportSpecifier;
parent?: NamedExports;
propertyName?: Identifier;
@@ -1444,6 +1469,7 @@ declare namespace ts {
comment: string | undefined;
}
interface JSDocTag extends Node {
+ parent: JSDoc;
atToken: AtToken;
tagName: Identifier;
comment: string | undefined;
@@ -1455,6 +1481,9 @@ declare namespace ts {
kind: SyntaxKind.JSDocAugmentsTag;
typeExpression: JSDocTypeExpression;
}
+ interface JSDocClassTag extends JSDocTag {
+ kind: SyntaxKind.JSDocClassTag;
+ }
interface JSDocTemplateTag extends JSDocTag {
kind: SyntaxKind.JSDocTemplateTag;
typeParameters: NodeArray<TypeParameterDeclaration>;
@@ -1467,7 +1496,8 @@ declare namespace ts {
kind: SyntaxKind.JSDocTypeTag;
typeExpression: JSDocTypeExpression;
}
- interface JSDocTypedefTag extends JSDocTag, Declaration {
+ interface JSDocTypedefTag extends JSDocTag, NamedDeclaration {
+ parent: JSDoc;
kind: SyntaxKind.JSDocTypedefTag;
fullName?: JSDocNamespaceDeclaration | Identifier;
name?: Identifier;
@@ -1475,9 +1505,15 @@ declare namespace ts {
jsDocTypeLiteral?: JSDocTypeLiteral;
}
interface JSDocPropertyTag extends JSDocTag, TypeElement {
+ parent: JSDoc;
kind: SyntaxKind.JSDocPropertyTag;
name: Identifier;
+ /** the parameter name, if provided *before* the type (TypeScript-style) */
+ preParameterName?: Identifier;
+ /** the parameter name, if provided *after* the type (JSDoc-standard) */
+ postParameterName?: Identifier;
typeExpression: JSDocTypeExpression;
+ isBracketed: boolean;
}
interface JSDocTypeLiteral extends JSDocType {
kind: SyntaxKind.JSDocTypeLiteral;
@@ -1492,7 +1528,7 @@ declare namespace ts {
/** the parameter name, if provided *after* the type (JSDoc-standard) */
postParameterName?: Identifier;
/** the parameter name, regardless of the location it was provided */
- parameterName: Identifier;
+ name: Identifier;
isBracketed: boolean;
}
enum FlowFlags {
@@ -1690,10 +1726,10 @@ declare namespace ts {
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;
+ getPropertyOfType(type: Type, propertyName: string): Symbol | undefined;
+ getIndexInfoOfType(type: Type, kind: IndexKind): IndexInfo | undefined;
getSignaturesOfType(type: Type, kind: SignatureKind): Signature[];
- getIndexTypeOfType(type: Type, kind: IndexKind): Type;
+ getIndexTypeOfType(type: Type, kind: IndexKind): Type | undefined;
getBaseTypes(type: InterfaceType): BaseType[];
getBaseTypeOfLiteralType(type: Type): Type;
getWidenedType(type: Type): Type;
@@ -1706,11 +1742,11 @@ declare namespace ts {
/** 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;
+ getSymbolAtLocation(node: Node): Symbol | undefined;
getSymbolsOfParameterPropertyDeclaration(parameter: ParameterDeclaration, parameterName: string): Symbol[];
- getShorthandAssignmentValueSymbol(location: Node): Symbol;
- getExportSpecifierLocalTargetSymbol(location: ExportSpecifier): Symbol;
- getPropertySymbolOfDestructuringAssignment(location: Identifier): Symbol;
+ getShorthandAssignmentValueSymbol(location: Node): Symbol | undefined;
+ getExportSpecifierLocalTargetSymbol(location: ExportSpecifier): Symbol | undefined;
+ getPropertySymbolOfDestructuringAssignment(location: Identifier): Symbol | undefined;
getTypeAtLocation(node: Node): Type;
getTypeFromTypeNode(node: TypeNode): Type;
signatureToString(signature: Signature, enclosingDeclaration?: Node, flags?: TypeFormatFlags, kind?: SignatureKind): string;
@@ -1720,38 +1756,48 @@ declare namespace ts {
getFullyQualifiedName(symbol: Symbol): string;
getAugmentedPropertiesOfType(type: Type): Symbol[];
getRootSymbols(symbol: Symbol): Symbol[];
- getContextualType(node: Expression): Type;
- getResolvedSignature(node: CallLikeExpression, candidatesOutArray?: Signature[]): Signature;
- getSignatureFromDeclaration(declaration: SignatureDeclaration): Signature;
- isImplementationOfOverload(node: FunctionLikeDeclaration): boolean;
+ getContextualType(node: Expression): Type | undefined;
+ getResolvedSignature(node: CallLikeExpression, candidatesOutArray?: Signature[]): Signature | undefined;
+ getSignatureFromDeclaration(declaration: SignatureDeclaration): Signature | undefined;
+ isImplementationOfOverload(node: FunctionLikeDeclaration): boolean | undefined;
isUndefinedSymbol(symbol: Symbol): boolean;
isArgumentsSymbol(symbol: Symbol): boolean;
isUnknownSymbol(symbol: Symbol): boolean;
- getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): number;
+ getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): string | number | undefined;
isValidPropertyAccess(node: PropertyAccessExpression | QualifiedName, propertyName: string): boolean;
/** Follow all aliases to get the original symbol. */
getAliasedSymbol(symbol: Symbol): Symbol;
getExportsOfModule(moduleSymbol: Symbol): Symbol[];
- getAllAttributesTypeFromJsxOpeningLikeElement(elementNode: JsxOpeningLikeElement): Type;
+ getAllAttributesTypeFromJsxOpeningLikeElement(elementNode: JsxOpeningLikeElement): Type | undefined;
getJsxIntrinsicTagNames(): Symbol[];
isOptionalParameter(node: ParameterDeclaration): boolean;
getAmbientModules(): Symbol[];
tryGetMemberInModuleExports(memberName: string, moduleSymbol: Symbol): Symbol | undefined;
getApparentType(type: Type): Type;
+ getSuggestionForNonexistentProperty(node: Identifier, containingType: Type): string | undefined;
+ getSuggestionForNonexistentSymbol(location: Node, name: string, meaning: SymbolFlags): string | undefined;
}
enum NodeBuilderFlags {
None = 0,
- allowThisInObjectLiteral = 1,
- allowQualifedNameInPlaceOfIdentifier = 2,
- allowTypeParameterInQualifiedName = 4,
- allowAnonymousIdentifier = 8,
- allowEmptyUnionOrIntersection = 16,
- allowEmptyTuple = 32,
+ NoTruncation = 1,
+ WriteArrayAsGenericType = 2,
+ WriteTypeArgumentsOfSignature = 32,
+ UseFullyQualifiedType = 64,
+ SuppressAnyReturnType = 256,
+ WriteTypeParametersInQualifiedName = 512,
+ AllowThisInObjectLiteral = 1024,
+ AllowQualifedNameInPlaceOfIdentifier = 2048,
+ AllowAnonymousIdentifier = 8192,
+ AllowEmptyUnionOrIntersection = 16384,
+ AllowEmptyTuple = 32768,
+ IgnoreErrors = 60416,
+ InObjectTypeLiteral = 1048576,
+ InTypeAlias = 8388608,
}
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;
+ buildSignatureDisplay(signature: 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;
@@ -1776,23 +1822,24 @@ declare namespace ts {
clear(): void;
trackSymbol(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): void;
reportInaccessibleThisError(): void;
- reportIllegalExtends(): void;
+ reportPrivateInBaseOfClassExpression(propertyName: string): void;
}
enum TypeFormatFlags {
None = 0,
WriteArrayAsGenericType = 1,
- UseTypeOfFunction = 2,
- NoTruncation = 4,
- WriteArrowStyleSignature = 8,
- WriteOwnNameForAnyLike = 16,
- WriteTypeArgumentsOfSignature = 32,
- InElementType = 64,
- UseFullyQualifiedType = 128,
- InFirstTypeArgument = 256,
- InTypeAlias = 512,
- UseTypeAliasValue = 1024,
- SuppressAnyReturnType = 2048,
- AddUndefined = 4096,
+ UseTypeOfFunction = 4,
+ NoTruncation = 8,
+ WriteArrowStyleSignature = 16,
+ WriteOwnNameForAnyLike = 32,
+ WriteTypeArgumentsOfSignature = 64,
+ InElementType = 128,
+ UseFullyQualifiedType = 256,
+ InFirstTypeArgument = 512,
+ InTypeAlias = 1024,
+ UseTypeAliasValue = 2048,
+ SuppressAnyReturnType = 4096,
+ AddUndefined = 8192,
+ WriteClassExpressionAsTypeLiteral = 16384,
}
enum SymbolFormatFlags {
None = 0,
@@ -1912,18 +1959,18 @@ declare namespace ts {
Index = 262144,
IndexedAccess = 524288,
NonPrimitive = 16777216,
- Literal = 480,
+ Literal = 224,
StringOrNumberLiteral = 96,
PossiblyFalsy = 7406,
StringLike = 262178,
- NumberLike = 340,
+ NumberLike = 84,
BooleanLike = 136,
EnumLike = 272,
UnionOrIntersection = 196608,
StructuredType = 229376,
StructuredOrTypeVariable = 1032192,
TypeVariable = 540672,
- Narrowable = 17810431,
+ Narrowable = 17810175,
NotUnionOrUnit = 16810497,
}
type DestructuringPattern = BindingPattern | ObjectLiteralExpression | ArrayLiteralExpression;
@@ -1935,15 +1982,17 @@ declare namespace ts {
aliasTypeArguments?: Type[];
}
interface LiteralType extends Type {
- text: string;
+ value: string | number;
freshType?: LiteralType;
regularType?: LiteralType;
}
- interface EnumType extends Type {
- memberTypes: EnumLiteralType[];
+ interface StringLiteralType extends LiteralType {
+ value: string;
}
- interface EnumLiteralType extends LiteralType {
- baseType: EnumType & UnionType;
+ interface NumberLiteralType extends LiteralType {
+ value: number;
+ }
+ interface EnumType extends Type {
}
enum ObjectFlags {
Class = 1,
@@ -1988,7 +2037,7 @@ declare namespace ts {
*/
interface TypeReference extends ObjectType {
target: GenericType;
- typeArguments: Type[];
+ typeArguments?: Type[];
}
interface GenericType extends InterfaceType, TypeReference {
}
@@ -2024,7 +2073,7 @@ declare namespace ts {
}
interface Signature {
declaration: SignatureDeclaration;
- typeParameters: TypeParameter[];
+ typeParameters?: TypeParameter[];
parameters: Symbol[];
}
enum IndexKind {
@@ -2036,6 +2085,24 @@ declare namespace ts {
isReadonly: boolean;
declaration?: SignatureDeclaration;
}
+ enum InferencePriority {
+ NakedTypeVariable = 1,
+ MappedType = 2,
+ ReturnType = 4,
+ }
+ interface InferenceInfo {
+ typeParameter: TypeParameter;
+ candidates: Type[];
+ inferredType: Type;
+ priority: InferencePriority;
+ topLevel: boolean;
+ isFixed: boolean;
+ }
+ enum InferenceFlags {
+ InferUnionTypes = 1,
+ NoDefault = 2,
+ AnyDefault = 4,
+ }
interface JsFileExtensionInfo {
extension: string;
isMixedContent: boolean;
@@ -2059,9 +2126,9 @@ declare namespace ts {
next?: DiagnosticMessageChain;
}
interface Diagnostic {
- file: SourceFile;
- start: number;
- length: number;
+ file: SourceFile | undefined;
+ start: number | undefined;
+ length: number | undefined;
messageText: string | DiagnosticMessageChain;
category: DiagnosticCategory;
code: number;
@@ -2117,6 +2184,7 @@ declare namespace ts {
noImplicitAny?: boolean;
noImplicitReturns?: boolean;
noImplicitThis?: boolean;
+ noStrictGenericChecks?: boolean;
noUnusedLocals?: boolean;
noUnusedParameters?: boolean;
noImplicitUseStrict?: boolean;
@@ -2171,6 +2239,7 @@ declare namespace ts {
UMD = 3,
System = 4,
ES2015 = 5,
+ ESNext = 6,
}
enum JsxEmit {
None = 0,
@@ -2301,6 +2370,14 @@ declare namespace ts {
resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[], containingFile: string): ResolvedTypeReferenceDirective[];
getEnvironmentVariable?(name: string): string;
}
+ interface SourceMapRange extends TextRange {
+ source?: SourceMapSource;
+ }
+ interface SourceMapSource {
+ fileName: string;
+ text: string;
+ skipTrivia?: (pos: number) => number;
+ }
enum EmitFlags {
SingleLine = 1,
AdviseOnEmitNode = 2,
@@ -2320,14 +2397,16 @@ declare namespace ts {
HelperName = 4096,
ExportName = 8192,
LocalName = 16384,
- Indented = 32768,
- NoIndentation = 65536,
- AsyncFunctionBody = 131072,
- ReuseTempVariableScope = 262144,
- CustomPrologue = 524288,
- NoHoisting = 1048576,
- HasEndOfDeclarationMarker = 2097152,
- Iterator = 4194304,
+ InternalName = 32768,
+ Indented = 65536,
+ NoIndentation = 131072,
+ AsyncFunctionBody = 262144,
+ ReuseTempVariableScope = 524288,
+ CustomPrologue = 1048576,
+ NoHoisting = 2097152,
+ HasEndOfDeclarationMarker = 4194304,
+ Iterator = 8388608,
+ NoAsciiEscaping = 16777216,
}
interface EmitHelper {
readonly name: string;
@@ -2515,7 +2594,7 @@ declare namespace ts {
}
declare namespace ts {
/** The version of the TypeScript compiler release */
- const version = "2.3.2";
+ const version = "2.4.1";
}
declare function setTimeout(handler: (...args: any[]) => void, timeout: number): any;
declare function clearTimeout(handle: any): void;
@@ -2550,6 +2629,10 @@ declare namespace ts {
getDirectories(path: string): string[];
readDirectory(path: string, extensions?: string[], exclude?: string[], include?: string[]): string[];
getModifiedTime?(path: string): Date;
+ /**
+ * This should be cryptographically secure.
+ * A good implementation is node.js' `crypto.createHash`. (https://nodejs.org/api/crypto.html#crypto_crypto_createhash_algorithm)
+ */
createHash?(data: string): string;
getMemoryUsage?(): number;
exit(exitCode?: number): void;
@@ -2602,22 +2685,22 @@ declare namespace ts {
scanRange<T>(start: number, length: number, callback: () => T): T;
tryScan<T>(callback: () => T): T;
}
- function tokenToString(t: SyntaxKind): string;
+ function tokenToString(t: SyntaxKind): string | undefined;
function getPositionOfLineAndCharacter(sourceFile: SourceFile, line: number, character: number): number;
- function getLineAndCharacterOfPosition(sourceFile: SourceFile, position: number): LineAndCharacter;
+ function getLineAndCharacterOfPosition(sourceFile: SourceFileLike, position: number): LineAndCharacter;
function isWhiteSpaceLike(ch: number): boolean;
/** Does not include line breaks. For that, see isWhiteSpaceLike. */
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: 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 forEachLeadingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T) => U, state?: T): U | undefined;
+ function forEachTrailingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T) => U, state?: T): U | undefined;
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 getShebang(text: string): string | undefined;
function isIdentifierStart(ch: number, languageVersion: ScriptTarget): boolean;
function isIdentifierPart(ch: number, languageVersion: ScriptTarget): boolean;
function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, languageVariant?: LanguageVariant, text?: string, onError?: ErrorCallback, start?: number, length?: number): Scanner;
@@ -2694,6 +2777,204 @@ declare namespace ts {
* @returns The unescaped identifier text.
*/
function unescapeIdentifier(identifier: string): string;
+ function getNameOfDeclaration(declaration: Declaration): DeclarationName | undefined;
+}
+declare namespace ts {
+ function isNumericLiteral(node: Node): node is NumericLiteral;
+ function isStringLiteral(node: Node): node is StringLiteral;
+ function isJsxText(node: Node): node is JsxText;
+ function isRegularExpressionLiteral(node: Node): node is RegularExpressionLiteral;
+ function isNoSubstitutionTemplateLiteral(node: Node): node is LiteralExpression;
+ function isTemplateHead(node: Node): node is TemplateHead;
+ function isTemplateMiddle(node: Node): node is TemplateMiddle;
+ function isTemplateTail(node: Node): node is TemplateTail;
+ function isIdentifier(node: Node): node is Identifier;
+ function isQualifiedName(node: Node): node is QualifiedName;
+ function isComputedPropertyName(node: Node): node is ComputedPropertyName;
+ function isTypeParameterDeclaration(node: Node): node is TypeParameterDeclaration;
+ function isParameter(node: Node): node is ParameterDeclaration;
+ function isDecorator(node: Node): node is Decorator;
+ function isPropertySignature(node: Node): node is PropertySignature;
+ function isPropertyDeclaration(node: Node): node is PropertyDeclaration;
+ function isMethodSignature(node: Node): node is MethodSignature;
+ function isMethodDeclaration(node: Node): node is MethodDeclaration;
+ function isConstructorDeclaration(node: Node): node is ConstructorDeclaration;
+ function isGetAccessorDeclaration(node: Node): node is GetAccessorDeclaration;
+ function isSetAccessorDeclaration(node: Node): node is SetAccessorDeclaration;
+ function isCallSignatureDeclaration(node: Node): node is CallSignatureDeclaration;
+ function isConstructSignatureDeclaration(node: Node): node is ConstructSignatureDeclaration;
+ function isIndexSignatureDeclaration(node: Node): node is IndexSignatureDeclaration;
+ function isTypePredicateNode(node: Node): node is TypePredicateNode;
+ function isTypeReferenceNode(node: Node): node is TypeReferenceNode;
+ function isFunctionTypeNode(node: Node): node is FunctionTypeNode;
+ function isConstructorTypeNode(node: Node): node is ConstructorTypeNode;
+ function isTypeQueryNode(node: Node): node is TypeQueryNode;
+ function isTypeLiteralNode(node: Node): node is TypeLiteralNode;
+ function isArrayTypeNode(node: Node): node is ArrayTypeNode;
+ function isTupleTypeNode(node: Node): node is TupleTypeNode;
+ function isUnionTypeNode(node: Node): node is UnionTypeNode;
+ function isIntersectionTypeNode(node: Node): node is IntersectionTypeNode;
+ function isParenthesizedTypeNode(node: Node): node is ParenthesizedTypeNode;
+ function isThisTypeNode(node: Node): node is ThisTypeNode;
+ function isTypeOperatorNode(node: Node): node is TypeOperatorNode;
+ function isIndexedAccessTypeNode(node: Node): node is IndexedAccessTypeNode;
+ function isMappedTypeNode(node: Node): node is MappedTypeNode;
+ function isLiteralTypeNode(node: Node): node is LiteralTypeNode;
+ function isObjectBindingPattern(node: Node): node is ObjectBindingPattern;
+ function isArrayBindingPattern(node: Node): node is ArrayBindingPattern;
+ function isBindingElement(node: Node): node is BindingElement;
+ 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 isCallExpression(node: Node): node is CallExpression;
+ function isNewExpression(node: Node): node is NewExpression;
+ function isTaggedTemplateExpression(node: Node): node is TaggedTemplateExpression;
+ function isTypeAssertion(node: Node): node is TypeAssertion;
+ function isParenthesizedExpression(node: Node): node is ParenthesizedExpression;
+ function isFunctionExpression(node: Node): node is FunctionExpression;
+ function isArrowFunction(node: Node): node is ArrowFunction;
+ function isDeleteExpression(node: Node): node is DeleteExpression;
+ function isTypeOfExpression(node: Node): node is TypeOfExpression;
+ function isVoidExpression(node: Node): node is VoidExpression;
+ function isAwaitExpression(node: Node): node is AwaitExpression;
+ function isPrefixUnaryExpression(node: Node): node is PrefixUnaryExpression;
+ function isPostfixUnaryExpression(node: Node): node is PostfixUnaryExpression;
+ function isBinaryExpression(node: Node): node is BinaryExpression;
+ function isConditionalExpression(node: Node): node is ConditionalExpression;
+ function isTemplateExpression(node: Node): node is TemplateExpression;
+ function isYieldExpression(node: Node): node is YieldExpression;
+ function isSpreadElement(node: Node): node is SpreadElement;
+ function isClassExpression(node: Node): node is ClassExpression;
+ function isOmittedExpression(node: Node): node is OmittedExpression;
+ function isExpressionWithTypeArguments(node: Node): node is ExpressionWithTypeArguments;
+ function isAsExpression(node: Node): node is AsExpression;
+ function isNonNullExpression(node: Node): node is NonNullExpression;
+ function isMetaProperty(node: Node): node is MetaProperty;
+ function isTemplateSpan(node: Node): node is TemplateSpan;
+ function isSemicolonClassElement(node: Node): node is SemicolonClassElement;
+ function isBlock(node: Node): node is Block;
+ function isVariableStatement(node: Node): node is VariableStatement;
+ function isEmptyStatement(node: Node): node is EmptyStatement;
+ function isExpressionStatement(node: Node): node is ExpressionStatement;
+ function isIfStatement(node: Node): node is IfStatement;
+ function isDoStatement(node: Node): node is DoStatement;
+ function isWhileStatement(node: Node): node is WhileStatement;
+ function isForStatement(node: Node): node is ForStatement;
+ function isForInStatement(node: Node): node is ForInStatement;
+ function isForOfStatement(node: Node): node is ForOfStatement;
+ function isContinueStatement(node: Node): node is ContinueStatement;
+ function isBreakStatement(node: Node): node is BreakStatement;
+ function isReturnStatement(node: Node): node is ReturnStatement;
+ function isWithStatement(node: Node): node is WithStatement;
+ function isSwitchStatement(node: Node): node is SwitchStatement;
+ function isLabeledStatement(node: Node): node is LabeledStatement;
+ function isThrowStatement(node: Node): node is ThrowStatement;
+ function isTryStatement(node: Node): node is TryStatement;
+ function isDebuggerStatement(node: Node): node is DebuggerStatement;
+ function isVariableDeclaration(node: Node): node is VariableDeclaration;
+ function isVariableDeclarationList(node: Node): node is VariableDeclarationList;
+ function isFunctionDeclaration(node: Node): node is FunctionDeclaration;
+ function isClassDeclaration(node: Node): node is ClassDeclaration;
+ function isInterfaceDeclaration(node: Node): node is InterfaceDeclaration;
+ function isTypeAliasDeclaration(node: Node): node is TypeAliasDeclaration;
+ function isEnumDeclaration(node: Node): node is EnumDeclaration;
+ function isModuleDeclaration(node: Node): node is ModuleDeclaration;
+ function isModuleBlock(node: Node): node is ModuleBlock;
+ function isCaseBlock(node: Node): node is CaseBlock;
+ function isNamespaceExportDeclaration(node: Node): node is NamespaceExportDeclaration;
+ function isImportEqualsDeclaration(node: Node): node is ImportEqualsDeclaration;
+ function isImportDeclaration(node: Node): node is ImportDeclaration;
+ function isImportClause(node: Node): node is ImportClause;
+ function isNamespaceImport(node: Node): node is NamespaceImport;
+ function isNamedImports(node: Node): node is NamedImports;
+ function isImportSpecifier(node: Node): node is ImportSpecifier;
+ function isExportAssignment(node: Node): node is ExportAssignment;
+ function isExportDeclaration(node: Node): node is ExportDeclaration;
+ function isNamedExports(node: Node): node is NamedExports;
+ function isExportSpecifier(node: Node): node is ExportSpecifier;
+ function isMissingDeclaration(node: Node): node is MissingDeclaration;
+ function isExternalModuleReference(node: Node): node is ExternalModuleReference;
+ function isJsxElement(node: Node): node is JsxElement;
+ function isJsxSelfClosingElement(node: Node): node is JsxSelfClosingElement;
+ function isJsxOpeningElement(node: Node): node is JsxOpeningElement;
+ function isJsxClosingElement(node: Node): node is JsxClosingElement;
+ function isJsxAttribute(node: Node): node is JsxAttribute;
+ function isJsxAttributes(node: Node): node is JsxAttributes;
+ function isJsxSpreadAttribute(node: Node): node is JsxSpreadAttribute;
+ function isJsxExpression(node: Node): node is JsxExpression;
+ function isCaseClause(node: Node): node is CaseClause;
+ function isDefaultClause(node: Node): node is DefaultClause;
+ 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 isSpreadAssignment(node: Node): node is SpreadAssignment;
+ function isEnumMember(node: Node): node is EnumMember;
+ function isSourceFile(node: Node): node is SourceFile;
+ function isBundle(node: Node): node is Bundle;
+ function isJSDocTypeExpression(node: Node): node is JSDocTypeExpression;
+ function isJSDocAllType(node: JSDocAllType): node is JSDocAllType;
+ function isJSDocUnknownType(node: Node): node is JSDocUnknownType;
+ function isJSDocArrayType(node: Node): node is JSDocArrayType;
+ function isJSDocUnionType(node: Node): node is JSDocUnionType;
+ function isJSDocTupleType(node: Node): node is JSDocTupleType;
+ function isJSDocNullableType(node: Node): node is JSDocNullableType;
+ function isJSDocNonNullableType(node: Node): node is JSDocNonNullableType;
+ function isJSDocRecordType(node: Node): node is JSDocRecordType;
+ function isJSDocRecordMember(node: Node): node is JSDocRecordMember;
+ function isJSDocTypeReference(node: Node): node is JSDocTypeReference;
+ function isJSDocOptionalType(node: Node): node is JSDocOptionalType;
+ function isJSDocFunctionType(node: Node): node is JSDocFunctionType;
+ function isJSDocVariadicType(node: Node): node is JSDocVariadicType;
+ function isJSDocConstructorType(node: Node): node is JSDocConstructorType;
+ function isJSDocThisType(node: Node): node is JSDocThisType;
+ function isJSDoc(node: Node): node is JSDoc;
+ function isJSDocAugmentsTag(node: Node): node is JSDocAugmentsTag;
+ function isJSDocParameterTag(node: Node): node is JSDocParameterTag;
+ function isJSDocReturnTag(node: Node): node is JSDocReturnTag;
+ function isJSDocTypeTag(node: Node): node is JSDocTypeTag;
+ function isJSDocTemplateTag(node: Node): node is JSDocTemplateTag;
+ function isJSDocTypedefTag(node: Node): node is JSDocTypedefTag;
+ function isJSDocPropertyTag(node: Node): node is JSDocPropertyTag;
+ function isJSDocTypeLiteral(node: Node): node is JSDocTypeLiteral;
+ function isJSDocLiteralType(node: Node): node is JSDocLiteralType;
+}
+declare namespace ts {
+ /**
+ * True if node is of some token syntax kind.
+ * For example, this is true for an IfKeyword but not for an IfStatement.
+ */
+ function isToken(n: Node): boolean;
+ function isLiteralExpression(node: Node): node is LiteralExpression;
+ function isTemplateMiddleOrTemplateTail(node: Node): node is TemplateMiddle | TemplateTail;
+ function isModifier(node: Node): node is Modifier;
+ function isEntityName(node: Node): node is EntityName;
+ function isPropertyName(node: Node): node is PropertyName;
+ function isBindingName(node: Node): node is BindingName;
+ function isFunctionLike(node: Node): node is FunctionLikeDeclaration;
+ function isClassElement(node: Node): node is ClassElement;
+ function isClassLike(node: Node): node is ClassLikeDeclaration;
+ function isAccessor(node: Node): node is AccessorDeclaration;
+ function isTypeElement(node: Node): node is TypeElement;
+ function isObjectLiteralElementLike(node: Node): node is ObjectLiteralElementLike;
+ /**
+ * Node test that determines whether a node is a valid type node.
+ * This differs from the `isPartOfTypeNode` function which determines whether a node is *part*
+ * of a TypeNode.
+ */
+ function isTypeNode(node: Node): node is TypeNode;
+ function isFunctionOrConstructorTypeNode(node: Node): node is FunctionTypeNode | ConstructorTypeNode;
+ function isPropertyAccessOrQualifiedName(node: Node): node is PropertyAccessExpression | QualifiedName;
+ function isCallLikeExpression(node: Node): node is CallLikeExpression;
+ function isCallOrNewExpression(node: Node): node is CallExpression | NewExpression;
+ function isTemplateLiteral(node: Node): node is TemplateLiteral;
+ function isAssertionExpression(node: Node): node is AssertionExpression;
+ function isIterationStatement(node: Node, lookInLabeledStatements: boolean): node is IterationStatement;
+ function isJsxOpeningLikeElement(node: Node): node is JsxOpeningLikeElement;
+ function isCaseOrDefaultClause(node: Node): node is CaseOrDefaultClause;
+ /** True if node is of a kind that may contain comment text. */
+ function isJSDocCommentContainingNode(node: Node): boolean;
}
declare namespace ts {
/**
@@ -2708,6 +2989,7 @@ declare namespace ts {
function createLiteral(value: string | number | boolean): PrimaryExpression;
function createNumericLiteral(value: string): NumericLiteral;
function createIdentifier(text: string): Identifier;
+ function updateIdentifier(node: Identifier, typeArguments: NodeArray<TypeNode> | undefined): Identifier;
/** Create a unique temporary variable. */
function createTempVariable(recordTempVariable: ((node: Identifier) => void) | undefined): Identifier;
/** Create a unique temporary variable for use in a loop. */
@@ -2726,63 +3008,65 @@ declare namespace ts {
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 createTypeParameterDeclaration(name: string | Identifier, constraint?: TypeNode, defaultType?: TypeNode): TypeParameterDeclaration;
+ function updateTypeParameterDeclaration(node: TypeParameterDeclaration, name: Identifier, constraint: TypeNode | undefined, defaultType: TypeNode | undefined): TypeParameterDeclaration;
+ 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 createPropertySignature(modifiers: Modifier[] | undefined, name: PropertyName | string, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertySignature;
+ function updatePropertySignature(node: PropertySignature, modifiers: Modifier[] | undefined, name: PropertyName, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertySignature;
+ function createProperty(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertyDeclaration;
+ function updateProperty(node: PropertyDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: PropertyName, type: TypeNode | undefined, initializer: Expression | undefined): PropertyDeclaration;
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 createMethod(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 createCallSignature(typeParameters: TypeParameterDeclaration[] | undefined, parameters: ParameterDeclaration[], type: TypeNode | undefined): CallSignatureDeclaration;
+ function updateCallSignature(node: CallSignatureDeclaration, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined): CallSignatureDeclaration;
+ function createConstructSignature(typeParameters: TypeParameterDeclaration[] | undefined, parameters: ParameterDeclaration[], type: TypeNode | undefined): ConstructSignatureDeclaration;
+ function updateConstructSignature(node: ConstructSignatureDeclaration, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined): ConstructSignatureDeclaration;
+ function createIndexSignature(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, parameters: ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration;
+ function updateIndexSignature(node: IndexSignatureDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, parameters: ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration;
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 createTypeReferenceNode(typeName: string | EntityName, typeArguments: TypeNode[] | undefined): TypeReferenceNode;
+ function updateTypeReferenceNode(node: TypeReferenceNode, typeName: EntityName, typeArguments: NodeArray<TypeNode> | undefined): TypeReferenceNode;
+ 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 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 createArrayTypeNode(elementType: TypeNode): ArrayTypeNode;
+ function updateArrayTypeNode(node: ArrayTypeNode, elementType: TypeNode): ArrayTypeNode;
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 createUnionTypeNode(types: TypeNode[]): UnionTypeNode;
+ function updateUnionTypeNode(node: UnionTypeNode, types: NodeArray<TypeNode>): UnionTypeNode;
+ function createIntersectionTypeNode(types: TypeNode[]): IntersectionTypeNode;
+ function updateIntersectionTypeNode(node: IntersectionTypeNode, types: NodeArray<TypeNode>): IntersectionTypeNode;
+ function createUnionOrIntersectionTypeNode(kind: SyntaxKind.UnionType | SyntaxKind.IntersectionType, types: TypeNode[]): UnionTypeNode | IntersectionTypeNode;
+ function createParenthesizedType(type: TypeNode): ParenthesizedTypeNode;
+ function updateParenthesizedType(node: ParenthesizedTypeNode, type: TypeNode): ParenthesizedTypeNode;
+ function createThisTypeNode(): ThisTypeNode;
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 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 createLiteralTypeNode(literal: Expression): LiteralTypeNode;
+ function updateLiteralTypeNode(node: LiteralTypeNode, literal: Expression): LiteralTypeNode;
function createObjectBindingPattern(elements: BindingElement[]): ObjectBindingPattern;
function updateObjectBindingPattern(node: ObjectBindingPattern, elements: BindingElement[]): ObjectBindingPattern;
function createArrayBindingPattern(elements: ArrayBindingElement[]): ArrayBindingPattern;
@@ -2824,7 +3108,7 @@ declare namespace ts {
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 updateBinary(node: BinaryExpression, left: Expression, right: Expression, operator?: BinaryOperator | BinaryOperatorToken): 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;
@@ -2844,16 +3128,15 @@ declare namespace ts {
function updateAsExpression(node: AsExpression, expression: Expression, type: TypeNode): AsExpression;
function createNonNullExpression(expression: Expression): NonNullExpression;
function updateNonNullExpression(node: NonNullExpression, expression: Expression): NonNullExpression;
+ function createMetaProperty(keywordToken: MetaProperty["keywordToken"], name: Identifier): MetaProperty;
+ function updateMetaProperty(node: MetaProperty, name: Identifier): MetaProperty;
function createTemplateSpan(expression: Expression, literal: TemplateMiddle | TemplateTail): TemplateSpan;
function updateTemplateSpan(node: TemplateSpan, expression: Expression, literal: TemplateMiddle | TemplateTail): TemplateSpan;
+ function createSemicolonClassElement(): SemicolonClassElement;
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;
@@ -2885,10 +3168,19 @@ declare namespace ts {
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 createDebuggerStatement(): DebuggerStatement;
+ function createVariableDeclaration(name: string | BindingName, type?: TypeNode, initializer?: Expression): VariableDeclaration;
+ function updateVariableDeclaration(node: VariableDeclaration, name: BindingName, type: TypeNode | undefined, initializer: Expression | undefined): VariableDeclaration;
+ function createVariableDeclarationList(declarations: VariableDeclaration[], flags?: NodeFlags): VariableDeclarationList;
+ function updateVariableDeclarationList(node: VariableDeclarationList, declarations: VariableDeclaration[]): VariableDeclarationList;
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 createInterfaceDeclaration(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: string | Identifier, typeParameters: TypeParameterDeclaration[] | undefined, heritageClauses: HeritageClause[] | undefined, members: TypeElement[]): InterfaceDeclaration;
+ function updateInterfaceDeclaration(node: InterfaceDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: Identifier, typeParameters: TypeParameterDeclaration[] | undefined, heritageClauses: HeritageClause[] | undefined, members: TypeElement[]): InterfaceDeclaration;
+ function createTypeAliasDeclaration(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: string | Identifier, typeParameters: TypeParameterDeclaration[] | undefined, type: TypeNode): TypeAliasDeclaration;
+ function updateTypeAliasDeclaration(node: TypeAliasDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: Identifier, typeParameters: TypeParameterDeclaration[] | undefined, type: TypeNode): TypeAliasDeclaration;
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;
@@ -2897,12 +3189,14 @@ declare namespace ts {
function updateModuleBlock(node: ModuleBlock, statements: Statement[]): ModuleBlock;
function createCaseBlock(clauses: CaseOrDefaultClause[]): CaseBlock;
function updateCaseBlock(node: CaseBlock, clauses: CaseOrDefaultClause[]): CaseBlock;
+ function createNamespaceExportDeclaration(name: string | Identifier): NamespaceExportDeclaration;
+ function updateNamespaceExportDeclaration(node: NamespaceExportDeclaration, name: Identifier): NamespaceExportDeclaration;
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 createImportClause(name: Identifier | undefined, namedBindings: NamedImportBindings | undefined): ImportClause;
+ function updateImportClause(node: ImportClause, name: Identifier | undefined, namedBindings: NamedImportBindings | undefined): ImportClause;
function createNamespaceImport(name: Identifier): NamespaceImport;
function updateNamespaceImport(node: NamespaceImport, name: Identifier): NamespaceImport;
function createNamedImports(elements: ImportSpecifier[]): NamedImports;
@@ -2927,20 +3221,20 @@ declare namespace ts {
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 createJsxAttributes(properties: JsxAttributeLike[]): JsxAttributes;
+ function updateJsxAttributes(node: JsxAttributes, properties: JsxAttributeLike[]): JsxAttributes;
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 createHeritageClause(token: HeritageClause["token"], types: ExpressionWithTypeArguments[]): HeritageClause;
+ function updateHeritageClause(node: HeritageClause, types: ExpressionWithTypeArguments[]): HeritageClause;
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;
@@ -2973,8 +3267,12 @@ declare namespace ts {
*/
function createPartiallyEmittedExpression(expression: Expression, original?: Node): PartiallyEmittedExpression;
function updatePartiallyEmittedExpression(node: PartiallyEmittedExpression, expression: Expression): PartiallyEmittedExpression;
+ function createCommaList(elements: Expression[]): CommaListExpression;
+ function updateCommaList(node: CommaListExpression, elements: Expression[]): CommaListExpression;
function createBundle(sourceFiles: SourceFile[]): Bundle;
function updateBundle(node: Bundle, sourceFiles: SourceFile[]): Bundle;
+ function createImmediatelyInvokedFunctionExpression(statements: Statement[]): CallExpression;
+ function createImmediatelyInvokedFunctionExpression(statements: Statement[], param: ParameterDeclaration, paramValue: Expression): CallExpression;
function createComma(left: Expression, right: Expression): Expression;
function createLessThan(left: Expression, right: Expression): Expression;
function createAssignment(left: ObjectLiteralExpression | ArrayLiteralExpression, right: Expression): DestructuringAssignment;
@@ -3007,19 +3305,23 @@ declare namespace ts {
/**
* Gets a custom text range to use when emitting source maps.
*/
- function getSourceMapRange(node: Node): TextRange;
+ function getSourceMapRange(node: Node): SourceMapRange;
/**
* Sets a custom text range to use when emitting source maps.
*/
- function setSourceMapRange<T extends Node>(node: T, range: TextRange | undefined): T;
+ function setSourceMapRange<T extends Node>(node: T, range: SourceMapRange | undefined): T;
+ /**
+ * Create an external source map source file reference
+ */
+ function createSourceMapSource(fileName: string, text: string, skipTrivia?: (pos: number) => number): SourceMapSource;
/**
* Gets the TextRange to use for source maps for a token of a node.
*/
- function getTokenSourceMapRange(node: Node, token: SyntaxKind): TextRange | undefined;
+ function getTokenSourceMapRange(node: Node, token: SyntaxKind): SourceMapRange | 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;
+ function setTokenSourceMapRange<T extends Node>(node: T, token: SyntaxKind, range: SourceMapRange | undefined): T;
/**
* Gets a custom text range to use when emitting comments.
*/
@@ -3037,11 +3339,11 @@ declare namespace ts {
/**
* Gets the constant value to emit for an expression.
*/
- function getConstantValue(node: PropertyAccessExpression | ElementAccessExpression): number;
+ function getConstantValue(node: PropertyAccessExpression | ElementAccessExpression): string | number;
/**
* Sets the constant value to emit for an expression.
*/
- function setConstantValue(node: PropertyAccessExpression | ElementAccessExpression, value: number): PropertyAccessExpression | ElementAccessExpression;
+ function setConstantValue(node: PropertyAccessExpression | ElementAccessExpression, value: string | number): PropertyAccessExpression | ElementAccessExpression;
/**
* Adds an EmitHelper to a node.
*/
@@ -3066,17 +3368,23 @@ declare namespace ts {
}
declare namespace ts {
function createNode(kind: SyntaxKind, pos?: number, end?: number): Node;
- function forEachChild<T>(node: Node, cbNode: (node: Node) => T, cbNodeArray?: (nodes: Node[]) => T): T;
+ /**
+ * Invokes a callback for each child of the given node. The 'cbNode' callback is invoked for all child nodes
+ * stored in properties. If a 'cbNodes' callback is specified, it is invoked for embedded arrays; otherwise,
+ * embedded arrays are flattened and the 'cbNode' callback is invoked for each element. If a callback returns
+ * a truthy value, iteration stops and that value is returned. Otherwise, undefined is returned.
+ *
+ * @param node a given node to visit its children
+ * @param cbNode a callback to be invoked for all child nodes
+ * @param cbNodeArray a callback to be invoked for embedded array
+ */
+ function forEachChild<T>(node: Node, cbNode: (node: Node) => T | undefined, cbNodeArray?: (nodes: NodeArray<Node>) => T | undefined): T | undefined;
function createSourceFile(fileName: string, sourceText: string, languageVersion: ScriptTarget, setParentNodes?: boolean, scriptKind?: ScriptKind): SourceFile;
function parseIsolatedEntityName(text: string, languageVersion: ScriptTarget): EntityName;
function isExternalModule(file: SourceFile): boolean;
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;
@@ -3215,7 +3523,21 @@ declare namespace ts {
getNewLine(): string;
}
function formatDiagnostics(diagnostics: Diagnostic[], host: FormatDiagnosticsHost): string;
+ function formatDiagnosticsWithColorAndContext(diagnostics: Diagnostic[], host: FormatDiagnosticsHost): string;
function flattenDiagnosticMessageText(messageText: string | DiagnosticMessageChain, newLine: string): string;
+ /**
+ * Create a new 'Program' instance. A Program is an immutable collection of 'SourceFile's and a 'CompilerOptions'
+ * that represent a compilation unit.
+ *
+ * Creating a program proceeds from a set of root files, expanding the set of inputs by following imports and
+ * triple-slash-reference-path directives transitively. '@types' and triple-slash-reference-types are also pulled in.
+ *
+ * @param rootNames - A set of root files.
+ * @param options - The compiler options which should be used.
+ * @param host - The host interacts with the underlying file system.
+ * @param oldProgram - Reuses an old program structure.
+ * @returns A 'Program' object.
+ */
function createProgram(rootNames: string[], options: CompilerOptions, host?: CompilerHost, oldProgram?: Program): Program;
}
declare namespace ts {
@@ -3243,9 +3565,10 @@ declare namespace ts {
* @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
+ * @param resolutionStack Only present for backwards-compatibility. Should be empty.
*/
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 | undefined;
+ function convertCompileOnSaveOptionFromJson(jsonOption: any, basePath: string, errors: Diagnostic[]): boolean;
function convertCompilerOptionsFromJson(jsonOptions: any, basePath: string, configFileName?: string): {
options: CompilerOptions;
errors: Diagnostic[];
@@ -3271,31 +3594,31 @@ 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;
+ forEachChild<T>(cbNode: (node: Node) => T | undefined, cbNodeArray?: (nodes: NodeArray<Node>) => T | undefined): T | undefined;
}
interface Symbol {
getFlags(): SymbolFlags;
getName(): string;
- getDeclarations(): Declaration[];
+ getDeclarations(): Declaration[] | undefined;
getDocumentationComment(): SymbolDisplayPart[];
getJsDocTags(): JSDocTagInfo[];
}
interface Type {
getFlags(): TypeFlags;
- getSymbol(): Symbol;
+ getSymbol(): Symbol | undefined;
getProperties(): Symbol[];
- getProperty(propertyName: string): Symbol;
+ getProperty(propertyName: string): Symbol | undefined;
getApparentProperties(): Symbol[];
getCallSignatures(): Signature[];
getConstructSignatures(): Signature[];
- getStringIndexType(): Type;
- getNumberIndexType(): Type;
- getBaseTypes(): BaseType[];
+ getStringIndexType(): Type | undefined;
+ getNumberIndexType(): Type | undefined;
+ getBaseTypes(): BaseType[] | undefined;
getNonNullableType(): Type;
}
interface Signature {
getDeclaration(): SignatureDeclaration;
- getTypeParameters(): TypeParameter[];
+ getTypeParameters(): TypeParameter[] | undefined;
getParameters(): Symbol[];
getReturnType(): Type;
getDocumentationComment(): SymbolDisplayPart[];
@@ -3311,6 +3634,9 @@ declare namespace ts {
interface SourceFileLike {
getLineAndCharacterOfPosition(pos: number): LineAndCharacter;
}
+ interface SourceMapSource {
+ 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
@@ -3419,6 +3745,8 @@ declare namespace ts {
getDocCommentTemplateAtPosition(fileName: string, position: number): TextInsertion;
isValidBraceCompletionAtPosition(fileName: string, position: number, openingBrace: number): boolean;
getCodeFixesAtPosition(fileName: string, start: number, end: number, errorCodes: number[], formatOptions: FormatCodeSettings): CodeAction[];
+ getApplicableRefactors(fileName: string, positionOrRaneg: number | TextRange): ApplicableRefactorInfo[];
+ getEditsForRefactor(fileName: string, formatOptions: FormatCodeSettings, positionOrRange: number | TextRange, refactorName: string, actionName: string): RefactorEditInfo | undefined;
getEmitOutput(fileName: string, emitOnlyDtsFiles?: boolean): EmitOutput;
getProgram(): Program;
dispose(): void;
@@ -3489,6 +3817,54 @@ declare namespace ts {
/** Text changes to apply to each file as part of the code action */
changes: FileTextChanges[];
}
+ /**
+ * A set of one or more available refactoring actions, grouped under a parent refactoring.
+ */
+ interface ApplicableRefactorInfo {
+ /**
+ * The programmatic name of the refactoring
+ */
+ name: string;
+ /**
+ * A description of this refactoring category to show to the user.
+ * If the refactoring gets inlined (see below), this text will not be visible.
+ */
+ description: string;
+ /**
+ * Inlineable refactorings can have their actions hoisted out to the top level
+ * of a context menu. Non-inlineanable refactorings should always be shown inside
+ * their parent grouping.
+ *
+ * If not specified, this value is assumed to be 'true'
+ */
+ inlineable?: boolean;
+ actions: RefactorActionInfo[];
+ }
+ /**
+ * Represents a single refactoring action - for example, the "Extract Method..." refactor might
+ * offer several actions, each corresponding to a surround class or closure to extract into.
+ */
+ type RefactorActionInfo = {
+ /**
+ * The programmatic name of the refactoring action
+ */
+ name: string;
+ /**
+ * A description of this refactoring action to show to the user.
+ * If the parent refactoring is inlined away, this will be the only text shown,
+ * so this description should make sense by itself if the parent is inlineable=true
+ */
+ description: string;
+ };
+ /**
+ * A set of edits to make in response to a refactor action, plus an optional
+ * location where renaming should be invoked from
+ */
+ type RefactorEditInfo = {
+ edits: FileTextChanges[];
+ renameFilename?: string;
+ renameLocation?: number;
+ };
interface TextInsertion {
newText: string;
/** The position in newText the caret should point to after the insertion. */
@@ -4003,6 +4379,7 @@ declare namespace ts {
reportDiagnostics?: boolean;
moduleName?: string;
renamedDependencies?: MapLike<string>;
+ transformers?: CustomTransformers;
}
interface TranspileOutput {
outputText: string;
diff --git a/node_modules/typedoc/node_modules/typescript/lib/typescriptServices.js b/node_modules/typedoc/node_modules/typescript/lib/typescriptServices.js
index 40ab60cd3..165d17f48 100644
--- a/node_modules/typedoc/node_modules/typescript/lib/typescriptServices.js
+++ b/node_modules/typedoc/node_modules/typescript/lib/typescriptServices.js
@@ -1,18 +1,18 @@
-/*! *****************************************************************************
-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.
+***************************************************************************** */
+
var __assign = (this && this.__assign) || Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
@@ -352,23 +352,25 @@ var ts;
SyntaxKind[SyntaxKind["JSDocComment"] = 283] = "JSDocComment";
SyntaxKind[SyntaxKind["JSDocTag"] = 284] = "JSDocTag";
SyntaxKind[SyntaxKind["JSDocAugmentsTag"] = 285] = "JSDocAugmentsTag";
- SyntaxKind[SyntaxKind["JSDocParameterTag"] = 286] = "JSDocParameterTag";
- SyntaxKind[SyntaxKind["JSDocReturnTag"] = 287] = "JSDocReturnTag";
- SyntaxKind[SyntaxKind["JSDocTypeTag"] = 288] = "JSDocTypeTag";
- SyntaxKind[SyntaxKind["JSDocTemplateTag"] = 289] = "JSDocTemplateTag";
- SyntaxKind[SyntaxKind["JSDocTypedefTag"] = 290] = "JSDocTypedefTag";
- SyntaxKind[SyntaxKind["JSDocPropertyTag"] = 291] = "JSDocPropertyTag";
- SyntaxKind[SyntaxKind["JSDocTypeLiteral"] = 292] = "JSDocTypeLiteral";
- SyntaxKind[SyntaxKind["JSDocLiteralType"] = 293] = "JSDocLiteralType";
+ SyntaxKind[SyntaxKind["JSDocClassTag"] = 286] = "JSDocClassTag";
+ SyntaxKind[SyntaxKind["JSDocParameterTag"] = 287] = "JSDocParameterTag";
+ SyntaxKind[SyntaxKind["JSDocReturnTag"] = 288] = "JSDocReturnTag";
+ SyntaxKind[SyntaxKind["JSDocTypeTag"] = 289] = "JSDocTypeTag";
+ SyntaxKind[SyntaxKind["JSDocTemplateTag"] = 290] = "JSDocTemplateTag";
+ SyntaxKind[SyntaxKind["JSDocTypedefTag"] = 291] = "JSDocTypedefTag";
+ SyntaxKind[SyntaxKind["JSDocPropertyTag"] = 292] = "JSDocPropertyTag";
+ SyntaxKind[SyntaxKind["JSDocTypeLiteral"] = 293] = "JSDocTypeLiteral";
+ SyntaxKind[SyntaxKind["JSDocLiteralType"] = 294] = "JSDocLiteralType";
// Synthesized list
- SyntaxKind[SyntaxKind["SyntaxList"] = 294] = "SyntaxList";
+ SyntaxKind[SyntaxKind["SyntaxList"] = 295] = "SyntaxList";
// Transformation nodes
- SyntaxKind[SyntaxKind["NotEmittedStatement"] = 295] = "NotEmittedStatement";
- SyntaxKind[SyntaxKind["PartiallyEmittedExpression"] = 296] = "PartiallyEmittedExpression";
- SyntaxKind[SyntaxKind["MergeDeclarationMarker"] = 297] = "MergeDeclarationMarker";
- SyntaxKind[SyntaxKind["EndOfDeclarationMarker"] = 298] = "EndOfDeclarationMarker";
+ SyntaxKind[SyntaxKind["NotEmittedStatement"] = 296] = "NotEmittedStatement";
+ SyntaxKind[SyntaxKind["PartiallyEmittedExpression"] = 297] = "PartiallyEmittedExpression";
+ SyntaxKind[SyntaxKind["CommaListExpression"] = 298] = "CommaListExpression";
+ SyntaxKind[SyntaxKind["MergeDeclarationMarker"] = 299] = "MergeDeclarationMarker";
+ SyntaxKind[SyntaxKind["EndOfDeclarationMarker"] = 300] = "EndOfDeclarationMarker";
// Enum value count
- SyntaxKind[SyntaxKind["Count"] = 299] = "Count";
+ SyntaxKind[SyntaxKind["Count"] = 301] = "Count";
// Markers
SyntaxKind[SyntaxKind["FirstAssignment"] = 58] = "FirstAssignment";
SyntaxKind[SyntaxKind["LastAssignment"] = 70] = "LastAssignment";
@@ -396,9 +398,9 @@ var ts;
SyntaxKind[SyntaxKind["LastBinaryOperator"] = 70] = "LastBinaryOperator";
SyntaxKind[SyntaxKind["FirstNode"] = 143] = "FirstNode";
SyntaxKind[SyntaxKind["FirstJSDocNode"] = 267] = "FirstJSDocNode";
- SyntaxKind[SyntaxKind["LastJSDocNode"] = 293] = "LastJSDocNode";
- SyntaxKind[SyntaxKind["FirstJSDocTagNode"] = 283] = "FirstJSDocTagNode";
- SyntaxKind[SyntaxKind["LastJSDocTagNode"] = 293] = "LastJSDocTagNode";
+ SyntaxKind[SyntaxKind["LastJSDocNode"] = 294] = "LastJSDocNode";
+ SyntaxKind[SyntaxKind["FirstJSDocTagNode"] = 284] = "FirstJSDocTagNode";
+ SyntaxKind[SyntaxKind["LastJSDocTagNode"] = 294] = "LastJSDocTagNode";
})(SyntaxKind = ts.SyntaxKind || (ts.SyntaxKind = {}));
var NodeFlags;
(function (NodeFlags) {
@@ -422,6 +424,16 @@ var ts;
NodeFlags[NodeFlags["JavaScriptFile"] = 65536] = "JavaScriptFile";
NodeFlags[NodeFlags["ThisNodeOrAnySubNodesHasError"] = 131072] = "ThisNodeOrAnySubNodesHasError";
NodeFlags[NodeFlags["HasAggregatedChildData"] = 262144] = "HasAggregatedChildData";
+ // This flag will be set when the parser encounters a dynamic import expression so that module resolution
+ // will not have to walk the tree if the flag is not set. However, this flag is just a approximation because
+ // once it is set, the flag never gets cleared (hence why it's named "PossiblyContainsDynamicImport").
+ // During editing, if dynamic import is removed, incremental parsing will *NOT* update this flag. This means that the tree will always be traversed
+ // during module resolution. However, the removal operation should not occur often and in the case of the
+ // removal, it is likely that users will add the import anyway.
+ // The advantage of this approach is its simplicity. For the case of batch compilation,
+ // we guarantee that users won't have to pay the price of walking the tree if a dynamic import isn't used.
+ /* @internal */
+ NodeFlags[NodeFlags["PossiblyContainsDynamicImport"] = 524288] = "PossiblyContainsDynamicImport";
NodeFlags[NodeFlags["BlockScoped"] = 3] = "BlockScoped";
NodeFlags[NodeFlags["ReachabilityCheckFlags"] = 384] = "ReachabilityCheckFlags";
NodeFlags[NodeFlags["ReachabilityAndEmitFlags"] = 1408] = "ReachabilityAndEmitFlags";
@@ -512,6 +524,13 @@ var ts;
return OperationCanceledException;
}());
ts.OperationCanceledException = OperationCanceledException;
+ /* @internal */
+ var StructureIsReused;
+ (function (StructureIsReused) {
+ StructureIsReused[StructureIsReused["Not"] = 0] = "Not";
+ StructureIsReused[StructureIsReused["SafeModules"] = 1] = "SafeModules";
+ StructureIsReused[StructureIsReused["Completely"] = 2] = "Completely";
+ })(StructureIsReused = ts.StructureIsReused || (ts.StructureIsReused = {}));
/** Return code used by getEmitOutput function to indicate status of the function */
var ExitStatus;
(function (ExitStatus) {
@@ -527,29 +546,41 @@ var ts;
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";
+ // Options
+ NodeBuilderFlags[NodeBuilderFlags["NoTruncation"] = 1] = "NoTruncation";
+ NodeBuilderFlags[NodeBuilderFlags["WriteArrayAsGenericType"] = 2] = "WriteArrayAsGenericType";
+ NodeBuilderFlags[NodeBuilderFlags["WriteTypeArgumentsOfSignature"] = 32] = "WriteTypeArgumentsOfSignature";
+ NodeBuilderFlags[NodeBuilderFlags["UseFullyQualifiedType"] = 64] = "UseFullyQualifiedType";
+ NodeBuilderFlags[NodeBuilderFlags["SuppressAnyReturnType"] = 256] = "SuppressAnyReturnType";
+ NodeBuilderFlags[NodeBuilderFlags["WriteTypeParametersInQualifiedName"] = 512] = "WriteTypeParametersInQualifiedName";
+ // Error handling
+ NodeBuilderFlags[NodeBuilderFlags["AllowThisInObjectLiteral"] = 1024] = "AllowThisInObjectLiteral";
+ NodeBuilderFlags[NodeBuilderFlags["AllowQualifedNameInPlaceOfIdentifier"] = 2048] = "AllowQualifedNameInPlaceOfIdentifier";
+ NodeBuilderFlags[NodeBuilderFlags["AllowAnonymousIdentifier"] = 8192] = "AllowAnonymousIdentifier";
+ NodeBuilderFlags[NodeBuilderFlags["AllowEmptyUnionOrIntersection"] = 16384] = "AllowEmptyUnionOrIntersection";
+ NodeBuilderFlags[NodeBuilderFlags["AllowEmptyTuple"] = 32768] = "AllowEmptyTuple";
+ NodeBuilderFlags[NodeBuilderFlags["IgnoreErrors"] = 60416] = "IgnoreErrors";
+ // State
+ NodeBuilderFlags[NodeBuilderFlags["InObjectTypeLiteral"] = 1048576] = "InObjectTypeLiteral";
+ NodeBuilderFlags[NodeBuilderFlags["InTypeAlias"] = 8388608] = "InTypeAlias";
})(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[TypeFormatFlags["UseTypeOfFunction"] = 4] = "UseTypeOfFunction";
+ TypeFormatFlags[TypeFormatFlags["NoTruncation"] = 8] = "NoTruncation";
+ TypeFormatFlags[TypeFormatFlags["WriteArrowStyleSignature"] = 16] = "WriteArrowStyleSignature";
+ TypeFormatFlags[TypeFormatFlags["WriteOwnNameForAnyLike"] = 32] = "WriteOwnNameForAnyLike";
+ TypeFormatFlags[TypeFormatFlags["WriteTypeArgumentsOfSignature"] = 64] = "WriteTypeArgumentsOfSignature";
+ TypeFormatFlags[TypeFormatFlags["InElementType"] = 128] = "InElementType";
+ TypeFormatFlags[TypeFormatFlags["UseFullyQualifiedType"] = 256] = "UseFullyQualifiedType";
+ TypeFormatFlags[TypeFormatFlags["InFirstTypeArgument"] = 512] = "InFirstTypeArgument";
+ TypeFormatFlags[TypeFormatFlags["InTypeAlias"] = 1024] = "InTypeAlias";
+ TypeFormatFlags[TypeFormatFlags["UseTypeAliasValue"] = 2048] = "UseTypeAliasValue";
+ TypeFormatFlags[TypeFormatFlags["SuppressAnyReturnType"] = 4096] = "SuppressAnyReturnType";
+ TypeFormatFlags[TypeFormatFlags["AddUndefined"] = 8192] = "AddUndefined";
+ TypeFormatFlags[TypeFormatFlags["WriteClassExpressionAsTypeLiteral"] = 16384] = "WriteClassExpressionAsTypeLiteral";
})(TypeFormatFlags = ts.TypeFormatFlags || (ts.TypeFormatFlags = {}));
var SymbolFormatFlags;
(function (SymbolFormatFlags) {
@@ -677,6 +708,12 @@ var ts;
SymbolFlags[SymbolFlags["Classifiable"] = 788448] = "Classifiable";
})(SymbolFlags = ts.SymbolFlags || (ts.SymbolFlags = {}));
/* @internal */
+ var EnumKind;
+ (function (EnumKind) {
+ EnumKind[EnumKind["Numeric"] = 0] = "Numeric";
+ EnumKind[EnumKind["Literal"] = 1] = "Literal"; // Literal enum (each member has a TypeFlags.EnumLiteral type)
+ })(EnumKind = ts.EnumKind || (ts.EnumKind = {}));
+ /* @internal */
var CheckFlags;
(function (CheckFlags) {
CheckFlags[CheckFlags["Instantiated"] = 1] = "Instantiated";
@@ -751,7 +788,7 @@ var ts;
TypeFlags[TypeFlags["JsxAttributes"] = 33554432] = "JsxAttributes";
/* @internal */
TypeFlags[TypeFlags["Nullable"] = 6144] = "Nullable";
- TypeFlags[TypeFlags["Literal"] = 480] = "Literal";
+ TypeFlags[TypeFlags["Literal"] = 224] = "Literal";
TypeFlags[TypeFlags["StringOrNumberLiteral"] = 96] = "StringOrNumberLiteral";
/* @internal */
TypeFlags[TypeFlags["DefinitelyFalsy"] = 7392] = "DefinitelyFalsy";
@@ -761,7 +798,7 @@ var ts;
/* @internal */
TypeFlags[TypeFlags["Primitive"] = 8190] = "Primitive";
TypeFlags[TypeFlags["StringLike"] = 262178] = "StringLike";
- TypeFlags[TypeFlags["NumberLike"] = 340] = "NumberLike";
+ TypeFlags[TypeFlags["NumberLike"] = 84] = "NumberLike";
TypeFlags[TypeFlags["BooleanLike"] = 136] = "BooleanLike";
TypeFlags[TypeFlags["EnumLike"] = 272] = "EnumLike";
TypeFlags[TypeFlags["UnionOrIntersection"] = 196608] = "UnionOrIntersection";
@@ -770,7 +807,7 @@ var ts;
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"] = 17810431] = "Narrowable";
+ TypeFlags[TypeFlags["Narrowable"] = 17810175] = "Narrowable";
TypeFlags[TypeFlags["NotUnionOrUnit"] = 16810497] = "NotUnionOrUnit";
/* @internal */
TypeFlags[TypeFlags["RequiresWidening"] = 6291456] = "RequiresWidening";
@@ -801,6 +838,18 @@ var ts;
IndexKind[IndexKind["String"] = 0] = "String";
IndexKind[IndexKind["Number"] = 1] = "Number";
})(IndexKind = ts.IndexKind || (ts.IndexKind = {}));
+ var InferencePriority;
+ (function (InferencePriority) {
+ InferencePriority[InferencePriority["NakedTypeVariable"] = 1] = "NakedTypeVariable";
+ InferencePriority[InferencePriority["MappedType"] = 2] = "MappedType";
+ InferencePriority[InferencePriority["ReturnType"] = 4] = "ReturnType";
+ })(InferencePriority = ts.InferencePriority || (ts.InferencePriority = {}));
+ var InferenceFlags;
+ (function (InferenceFlags) {
+ InferenceFlags[InferenceFlags["InferUnionTypes"] = 1] = "InferUnionTypes";
+ InferenceFlags[InferenceFlags["NoDefault"] = 2] = "NoDefault";
+ InferenceFlags[InferenceFlags["AnyDefault"] = 4] = "AnyDefault";
+ })(InferenceFlags = ts.InferenceFlags || (ts.InferenceFlags = {}));
/* @internal */
var SpecialPropertyAssignmentKind;
(function (SpecialPropertyAssignmentKind) {
@@ -835,6 +884,7 @@ var ts;
ModuleKind[ModuleKind["UMD"] = 3] = "UMD";
ModuleKind[ModuleKind["System"] = 4] = "System";
ModuleKind[ModuleKind["ES2015"] = 5] = "ES2015";
+ ModuleKind[ModuleKind["ESNext"] = 6] = "ESNext";
})(ModuleKind = ts.ModuleKind || (ts.ModuleKind = {}));
var JsxEmit;
(function (JsxEmit) {
@@ -1057,6 +1107,10 @@ var ts;
TransformFlags[TransformFlags["ContainsBindingPattern"] = 8388608] = "ContainsBindingPattern";
TransformFlags[TransformFlags["ContainsYield"] = 16777216] = "ContainsYield";
TransformFlags[TransformFlags["ContainsHoistedDeclarationOrCompletion"] = 33554432] = "ContainsHoistedDeclarationOrCompletion";
+ TransformFlags[TransformFlags["ContainsDynamicImport"] = 67108864] = "ContainsDynamicImport";
+ // Please leave this as 1 << 29.
+ // It is the maximum bit we can set before we outgrow the size of a v8 small integer (SMI) on an x86 system.
+ // It is a good reminder of how much room we have left
TransformFlags[TransformFlags["HasComputedFlags"] = 536870912] = "HasComputedFlags";
// Assertions
// - Bitmasks that are used to assert facts about the syntax of a node and its subtree.
@@ -1110,14 +1164,16 @@ var ts;
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[EmitFlags["InternalName"] = 32768] = "InternalName";
+ EmitFlags[EmitFlags["Indented"] = 65536] = "Indented";
+ EmitFlags[EmitFlags["NoIndentation"] = 131072] = "NoIndentation";
+ EmitFlags[EmitFlags["AsyncFunctionBody"] = 262144] = "AsyncFunctionBody";
+ EmitFlags[EmitFlags["ReuseTempVariableScope"] = 524288] = "ReuseTempVariableScope";
+ EmitFlags[EmitFlags["CustomPrologue"] = 1048576] = "CustomPrologue";
+ EmitFlags[EmitFlags["NoHoisting"] = 2097152] = "NoHoisting";
+ EmitFlags[EmitFlags["HasEndOfDeclarationMarker"] = 4194304] = "HasEndOfDeclarationMarker";
+ EmitFlags[EmitFlags["Iterator"] = 8388608] = "Iterator";
+ EmitFlags[EmitFlags["NoAsciiEscaping"] = 16777216] = "NoAsciiEscaping";
})(EmitFlags = ts.EmitFlags || (ts.EmitFlags = {}));
/**
* Used by the checker, this enum keeps track of external emit helpers that should be type
@@ -1137,17 +1193,23 @@ var ts;
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["Await"] = 2048] = "Await";
+ ExternalEmitHelpers[ExternalEmitHelpers["AsyncGenerator"] = 4096] = "AsyncGenerator";
+ ExternalEmitHelpers[ExternalEmitHelpers["AsyncDelegator"] = 8192] = "AsyncDelegator";
+ ExternalEmitHelpers[ExternalEmitHelpers["AsyncValues"] = 16384] = "AsyncValues";
+ ExternalEmitHelpers[ExternalEmitHelpers["ExportStar"] = 32768] = "ExportStar";
// Helpers included by ES2015 for..of
ExternalEmitHelpers[ExternalEmitHelpers["ForOfIncludes"] = 256] = "ForOfIncludes";
// Helpers included by ES2017 for..await..of
- ExternalEmitHelpers[ExternalEmitHelpers["ForAwaitOfIncludes"] = 8192] = "ForAwaitOfIncludes";
+ ExternalEmitHelpers[ExternalEmitHelpers["ForAwaitOfIncludes"] = 16384] = "ForAwaitOfIncludes";
+ // Helpers included by ES2017 async generators
+ ExternalEmitHelpers[ExternalEmitHelpers["AsyncGeneratorIncludes"] = 6144] = "AsyncGeneratorIncludes";
+ // Helpers included by yield* in ES2017 async generators
+ ExternalEmitHelpers[ExternalEmitHelpers["AsyncDelegatorIncludes"] = 26624] = "AsyncDelegatorIncludes";
// Helpers included by ES2015 spread
ExternalEmitHelpers[ExternalEmitHelpers["SpreadIncludes"] = 1536] = "SpreadIncludes";
ExternalEmitHelpers[ExternalEmitHelpers["FirstEmitHelper"] = 1] = "FirstEmitHelper";
- ExternalEmitHelpers[ExternalEmitHelpers["LastEmitHelper"] = 8192] = "LastEmitHelper";
+ ExternalEmitHelpers[ExternalEmitHelpers["LastEmitHelper"] = 32768] = "LastEmitHelper";
})(ExternalEmitHelpers = ts.ExternalEmitHelpers || (ts.ExternalEmitHelpers = {}));
var EmitHint;
(function (EmitHint) {
@@ -1256,7 +1318,7 @@ var ts;
var ts;
(function (ts) {
/** The version of the TypeScript compiler release */
- ts.version = "2.3.2";
+ ts.version = "2.4.1";
})(ts || (ts = {}));
/* @internal */
(function (ts) {
@@ -1298,10 +1360,11 @@ var ts;
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)
+ for (var key in template) {
if (hasOwnProperty.call(template, key)) {
map.set(key, template[key]);
}
+ }
return map;
}
ts.createMapFromTemplate = createMapFromTemplate;
@@ -1449,12 +1512,6 @@ 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);
@@ -1476,6 +1533,15 @@ var ts;
}
}
ts.zipWith = zipWith;
+ function zipToMap(keys, values) {
+ Debug.assert(keys.length === values.length);
+ var map = createMap();
+ for (var i = 0; i < keys.length; ++i) {
+ map.set(keys[i], values[i]);
+ }
+ return map;
+ }
+ ts.zipToMap = zipToMap;
/**
* Iterates through `array` by index and performs the callback on each element of array until the callback
* returns a falsey value, then returns false.
@@ -1704,6 +1770,47 @@ var ts;
}
ts.flatMap = flatMap;
/**
+ * Maps an array. If the mapped value is an array, it is spread into the result.
+ * Avoids allocation if all elements map to themselves.
+ *
+ * @param array The array to map.
+ * @param mapfn The callback used to map the result into one or more values.
+ */
+ function sameFlatMap(array, mapfn) {
+ var result;
+ if (array) {
+ for (var i = 0; i < array.length; i++) {
+ var item = array[i];
+ var mapped = mapfn(item, i);
+ if (result || item !== mapped || isArray(mapped)) {
+ if (!result) {
+ result = array.slice(0, i);
+ }
+ if (isArray(mapped)) {
+ addRange(result, mapped);
+ }
+ else {
+ result.push(mapped);
+ }
+ }
+ }
+ }
+ return result || array;
+ }
+ ts.sameFlatMap = sameFlatMap;
+ function mapDefined(array, mapFn) {
+ var result = [];
+ for (var i = 0; i < array.length; i++) {
+ var item = array[i];
+ var mapped = mapFn(item, i);
+ if (mapped !== undefined) {
+ result.push(mapped);
+ }
+ }
+ return result;
+ }
+ ts.mapDefined = mapDefined;
+ /**
* Computes the first matching span of elements and returns a tuple of the first span
* and the remaining elements.
*/
@@ -1925,19 +2032,34 @@ var ts;
}
ts.append = append;
/**
+ * Gets the actual offset into an array for a relative offset. Negative offsets indicate a
+ * position offset from the end of the array.
+ */
+ function toOffset(array, offset) {
+ return offset < 0 ? array.length + offset : offset;
+ }
+ /**
* Appends a range of value to an array, returning the array.
*
* @param to The array to which `value` is to be appended. If `to` is `undefined`, a new array
* is created if `value` was appended.
* @param from The values to append to the array. If `from` is `undefined`, nothing is
* appended. If an element of `from` is `undefined`, that element is not appended.
+ * @param start The offset in `from` at which to start copying values.
+ * @param end The offset in `from` at which to stop copying values (non-inclusive).
*/
- function addRange(to, from) {
+ function addRange(to, from, start, end) {
if (from === undefined)
return to;
- for (var _i = 0, from_1 = from; _i < from_1.length; _i++) {
- var v = from_1[_i];
- to = append(to, v);
+ if (to === undefined)
+ return from.slice(start, end);
+ start = start === undefined ? 0 : toOffset(from, start);
+ end = end === undefined ? from.length : toOffset(from, end);
+ for (var i = start; i < end && i < from.length; i++) {
+ var v = from[i];
+ if (v !== undefined) {
+ to.push(from[i]);
+ }
}
return to;
}
@@ -1964,21 +2086,31 @@ var ts;
}
ts.rangeEquals = rangeEquals;
/**
+ * Returns the element at a specific offset in an array if non-empty, `undefined` otherwise.
+ * A negative offset indicates the element should be retrieved from the end of the array.
+ */
+ function elementAt(array, offset) {
+ if (array) {
+ offset = toOffset(array, offset);
+ if (offset < array.length) {
+ return array[offset];
+ }
+ }
+ return undefined;
+ }
+ ts.elementAt = elementAt;
+ /**
* Returns the first element of an array if non-empty, `undefined` otherwise.
*/
function firstOrUndefined(array) {
- return array && array.length > 0
- ? array[0]
- : undefined;
+ return elementAt(array, 0);
}
ts.firstOrUndefined = firstOrUndefined;
/**
* Returns the last element of an array if non-empty, `undefined` otherwise.
*/
function lastOrUndefined(array) {
- return array && array.length > 0
- ? array[array.length - 1]
- : undefined;
+ return elementAt(array, -1);
}
ts.lastOrUndefined = lastOrUndefined;
/**
@@ -2117,10 +2249,11 @@ var ts;
*/
function getOwnKeys(map) {
var keys = [];
- for (var key in map)
+ for (var key in map) {
if (hasOwnProperty.call(map, key)) {
keys.push(key);
}
+ }
return keys;
}
ts.getOwnKeys = getOwnKeys;
@@ -2186,10 +2319,11 @@ var ts;
}
for (var _a = 0, args_1 = args; _a < args_1.length; _a++) {
var arg = args_1[_a];
- for (var p in arg)
+ for (var p in arg) {
if (hasProperty(arg, p)) {
t[p] = arg[p];
}
+ }
}
return t;
}
@@ -2205,18 +2339,20 @@ var ts;
return true;
if (!left || !right)
return false;
- for (var key in left)
+ for (var key in left) {
if (hasOwnProperty.call(left, key)) {
if (!hasOwnProperty.call(right, key) === undefined)
return false;
if (equalityComparer ? !equalityComparer(left[key], right[key]) : left[key] !== right[key])
return false;
}
- for (var key in right)
+ }
+ for (var key in right) {
if (hasOwnProperty.call(right, key)) {
if (!hasOwnProperty.call(left, key))
return false;
}
+ }
return true;
}
ts.equalOwnProperties = equalOwnProperties;
@@ -2247,14 +2383,16 @@ var ts;
ts.clone = clone;
function extend(first, second) {
var result = {};
- for (var id in second)
+ for (var id in second) {
if (hasOwnProperty.call(second, id)) {
result[id] = second[id];
}
- for (var id in first)
+ }
+ for (var id in first) {
if (hasOwnProperty.call(first, id)) {
result[id] = first[id];
}
+ }
return result;
}
ts.extend = extend;
@@ -2291,6 +2429,16 @@ var ts;
return Array.isArray ? Array.isArray(value) : value instanceof Array;
}
ts.isArray = isArray;
+ function tryCast(value, test) {
+ return value !== undefined && test(value) ? value : undefined;
+ }
+ ts.tryCast = tryCast;
+ function cast(value, test) {
+ if (value !== undefined && test(value))
+ return value;
+ Debug.fail("Invalid cast. The supplied value did not pass the test '" + Debug.getFunctionName(test) + "'.");
+ }
+ ts.cast = cast;
/** Does nothing. */
function noop() { }
ts.noop = noop;
@@ -2880,6 +3028,11 @@ var ts;
}
ts.startsWith = startsWith;
/* @internal */
+ function removePrefix(str, prefix) {
+ return startsWith(str, prefix) ? str.substr(prefix.length) : str;
+ }
+ ts.removePrefix = removePrefix;
+ /* @internal */
function endsWith(str, suffix) {
var expectedPos = str.length - suffix.length;
return expectedPos >= 0 && str.indexOf(suffix, expectedPos) === expectedPos;
@@ -2893,7 +3046,8 @@ var ts;
return path.length > extension.length && endsWith(path, extension);
}
ts.fileExtensionIs = fileExtensionIs;
- function fileExtensionIsAny(path, extensions) {
+ /* @internal */
+ function fileExtensionIsOneOf(path, extensions) {
for (var _i = 0, extensions_1 = extensions; _i < extensions_1.length; _i++) {
var extension = extensions_1[_i];
if (fileExtensionIs(path, extension)) {
@@ -2902,7 +3056,7 @@ var ts;
}
return false;
}
- ts.fileExtensionIsAny = fileExtensionIsAny;
+ ts.fileExtensionIsOneOf = fileExtensionIsOneOf;
// Reserved characters, forces escaping of any non-word (or digit), non-whitespace character.
// It may be inefficient (we could just match (/[-[\]{}()*+?.,\\^$|#\s]/g), but this is future
// proof.
@@ -3052,7 +3206,7 @@ var ts;
var _loop_1 = function (current) {
var name = combinePaths(path, current);
var absoluteName = combinePaths(absolutePath, current);
- if (extensions && !fileExtensionIsAny(name, extensions))
+ if (extensions && !fileExtensionIsOneOf(name, extensions))
return "continue";
if (excludeRegex && excludeRegex.test(absoluteName))
return "continue";
@@ -3274,8 +3428,11 @@ var ts;
this.name = name;
this.declarations = undefined;
}
- function Type(_checker, flags) {
+ function Type(checker, flags) {
this.flags = flags;
+ if (Debug.isDebugging) {
+ this.checker = checker;
+ }
}
function Signature() {
}
@@ -3290,6 +3447,11 @@ var ts;
this.parent = undefined;
this.original = undefined;
}
+ function SourceMapSource(fileName, text, skipTrivia) {
+ this.fileName = fileName;
+ this.text = text;
+ this.skipTrivia = skipTrivia || (function (pos) { return pos; });
+ }
ts.objectAllocator = {
getNodeConstructor: function () { return Node; },
getTokenConstructor: function () { return Node; },
@@ -3297,7 +3459,8 @@ var ts;
getSourceFileConstructor: function () { return Node; },
getSymbolConstructor: function () { return Symbol; },
getTypeConstructor: function () { return Type; },
- getSignatureConstructor: function () { return Signature; }
+ getSignatureConstructor: function () { return Signature; },
+ getSourceMapSourceConstructor: function () { return SourceMapSource; },
};
var AssertionLevel;
(function (AssertionLevel) {
@@ -3309,25 +3472,43 @@ var ts;
var Debug;
(function (Debug) {
Debug.currentAssertionLevel = 0 /* None */;
+ Debug.isDebugging = false;
function shouldAssert(level) {
return Debug.currentAssertionLevel >= level;
}
Debug.shouldAssert = shouldAssert;
- function assert(expression, message, verboseDebugInfo) {
+ function assert(expression, message, verboseDebugInfo, stackCrawlMark) {
if (!expression) {
- var verboseDebugString = "";
if (verboseDebugInfo) {
- verboseDebugString = "\r\nVerbose Debug Information: " + verboseDebugInfo();
+ message += "\r\nVerbose Debug Information: " + verboseDebugInfo();
}
- debugger;
- throw new Error("Debug Failure. False expression: " + (message || "") + verboseDebugString);
+ fail(message ? "False expression: " + message : "False expression.", stackCrawlMark || assert);
}
}
Debug.assert = assert;
- function fail(message) {
- Debug.assert(/*expression*/ false, message);
+ function fail(message, stackCrawlMark) {
+ debugger;
+ var e = new Error(message ? "Debug Failure. " : "Debug Failure.");
+ if (Error.captureStackTrace) {
+ Error.captureStackTrace(e, stackCrawlMark || fail);
+ }
+ throw e;
}
Debug.fail = fail;
+ function getFunctionName(func) {
+ if (typeof func !== "function") {
+ return "";
+ }
+ else if (func.hasOwnProperty("name")) {
+ return func.name;
+ }
+ else {
+ var text = Function.prototype.toString.call(func);
+ var match = /^function\s+([\w\$]+)\s*\(/.exec(text);
+ return match ? match[1] : "";
+ }
+ }
+ Debug.getFunctionName = getFunctionName;
})(Debug = ts.Debug || (ts.Debug = {}));
/** Remove an item from an array, moving everything to its right one space left. */
function orderedRemoveItem(array, item) {
@@ -3807,6 +3988,7 @@ var ts;
realpath: function (path) {
return _fs.realpathSync(path);
},
+ debugMode: ts.some(process.execArgv, function (arg) { return /^--(inspect|debug)(-brk)?(=\d+)?$/i.test(arg); }),
tryEnableSourceMapsForHost: function () {
try {
require("source-map-support").install();
@@ -3891,6 +4073,9 @@ var ts;
? 1 /* Normal */
: 0 /* None */;
}
+ if (ts.sys && ts.sys.debugMode) {
+ ts.Debug.isDebugging = true;
+ }
})(ts || (ts = {}));
// <auto-generated />
/// <reference path="types.ts" />
@@ -4057,6 +4242,7 @@ var ts;
Line_terminator_not_permitted_before_arrow: { code: 1200, category: ts.DiagnosticCategory.Error, key: "Line_terminator_not_permitted_before_arrow_1200", message: "Line terminator not permitted before arrow." },
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: 1202, category: ts.DiagnosticCategory.Error, key: "Import_assignment_cannot_be_used_when_targeting_ECMAScript_2015_modules_Consider_using_import_Asteri_1202", message: "Import assignment cannot be used when targeting ECMAScript 2015 modules. Consider using 'import * as ns from \"mod\"', 'import {a} from \"mod\"', 'import d from \"mod\"', or another module format instead." },
Export_assignment_cannot_be_used_when_targeting_ECMAScript_2015_modules_Consider_using_export_default_or_another_module_format_instead: { code: 1203, category: ts.DiagnosticCategory.Error, key: "Export_assignment_cannot_be_used_when_targeting_ECMAScript_2015_modules_Consider_using_export_defaul_1203", message: "Export assignment cannot be used when targeting ECMAScript 2015 modules. Consider using 'export default' or another module format instead." },
+ Cannot_re_export_a_type_when_the_isolatedModules_flag_is_provided: { code: 1205, category: ts.DiagnosticCategory.Error, key: "Cannot_re_export_a_type_when_the_isolatedModules_flag_is_provided_1205", message: "Cannot re-export a type when the '--isolatedModules' flag is provided." },
Decorators_are_not_valid_here: { code: 1206, category: ts.DiagnosticCategory.Error, key: "Decorators_are_not_valid_here_1206", message: "Decorators are not valid here." },
Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name: { code: 1207, category: ts.DiagnosticCategory.Error, key: "Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name_1207", message: "Decorators cannot be applied to multiple get/set accessors of the same name." },
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." },
@@ -4118,6 +4304,10 @@ var ts;
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." },
+ Dynamic_import_cannot_be_used_when_targeting_ECMAScript_2015_modules: { code: 1323, category: ts.DiagnosticCategory.Error, key: "Dynamic_import_cannot_be_used_when_targeting_ECMAScript_2015_modules_1323", message: "Dynamic import cannot be used when targeting ECMAScript 2015 modules." },
+ Dynamic_import_must_have_one_specifier_as_an_argument: { code: 1324, category: ts.DiagnosticCategory.Error, key: "Dynamic_import_must_have_one_specifier_as_an_argument_1324", message: "Dynamic import must have one specifier as an argument." },
+ Specifier_of_dynamic_import_cannot_be_spread_element: { code: 1325, category: ts.DiagnosticCategory.Error, key: "Specifier_of_dynamic_import_cannot_be_spread_element_1325", message: "Specifier of dynamic import cannot be spread element." },
+ Dynamic_import_cannot_have_type_arguments: { code: 1326, category: ts.DiagnosticCategory.Error, key: "Dynamic_import_cannot_have_type_arguments_1326", message: "Dynamic import cannot have type arguments" },
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." },
@@ -4164,7 +4354,7 @@ var ts;
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." },
+ Call_target_does_not_contain_any_signatures: { code: 2346, category: ts.DiagnosticCategory.Error, key: "Call_target_does_not_contain_any_signatures_2346", message: "Call target does not contain any signatures." },
Untyped_function_calls_may_not_accept_type_arguments: { code: 2347, category: ts.DiagnosticCategory.Error, key: "Untyped_function_calls_may_not_accept_type_arguments_2347", message: "Untyped function calls may not accept type arguments." },
Value_of_type_0_is_not_callable_Did_you_mean_to_include_new: { code: 2348, category: ts.DiagnosticCategory.Error, key: "Value_of_type_0_is_not_callable_Did_you_mean_to_include_new_2348", message: "Value of type '{0}' is not callable. Did you mean to include 'new'?" },
Cannot_invoke_an_expression_whose_type_lacks_a_call_signature_Type_0_has_no_compatible_call_signatures: { code: 2349, category: ts.DiagnosticCategory.Error, key: "Cannot_invoke_an_expression_whose_type_lacks_a_call_signature_Type_0_has_no_compatible_call_signatur_2349", message: "Cannot invoke an expression whose type lacks a call signature. Type '{0}' has no compatible call signatures." },
@@ -4359,6 +4549,15 @@ var ts;
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." },
+ Property_0_does_not_exist_on_type_1_Did_you_mean_2: { code: 2551, category: ts.DiagnosticCategory.Error, key: "Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551", message: "Property '{0}' does not exist on type '{1}'. Did you mean '{2}'?" },
+ Cannot_find_name_0_Did_you_mean_1: { code: 2552, category: ts.DiagnosticCategory.Error, key: "Cannot_find_name_0_Did_you_mean_1_2552", message: "Cannot find name '{0}'. Did you mean '{1}'?" },
+ Computed_values_are_not_permitted_in_an_enum_with_string_valued_members: { code: 2553, category: ts.DiagnosticCategory.Error, key: "Computed_values_are_not_permitted_in_an_enum_with_string_valued_members_2553", message: "Computed values are not permitted in an enum with string valued members." },
+ Expected_0_arguments_but_got_1: { code: 2554, category: ts.DiagnosticCategory.Error, key: "Expected_0_arguments_but_got_1_2554", message: "Expected {0} arguments, but got {1}." },
+ Expected_at_least_0_arguments_but_got_1: { code: 2555, category: ts.DiagnosticCategory.Error, key: "Expected_at_least_0_arguments_but_got_1_2555", message: "Expected at least {0} arguments, but got {1}." },
+ Expected_0_arguments_but_got_a_minimum_of_1: { code: 2556, category: ts.DiagnosticCategory.Error, key: "Expected_0_arguments_but_got_a_minimum_of_1_2556", message: "Expected {0} arguments, but got a minimum of {1}." },
+ Expected_at_least_0_arguments_but_got_a_minimum_of_1: { code: 2557, category: ts.DiagnosticCategory.Error, key: "Expected_at_least_0_arguments_but_got_a_minimum_of_1_2557", message: "Expected at least {0} arguments, but got a minimum of {1}." },
+ Expected_0_type_arguments_but_got_1: { code: 2558, category: ts.DiagnosticCategory.Error, key: "Expected_0_type_arguments_but_got_1_2558", message: "Expected {0} type arguments, but got {1}." },
+ Type_0_has_no_properties_in_common_with_type_1: { code: 2559, category: ts.DiagnosticCategory.Error, key: "Type_0_has_no_properties_in_common_with_type_1_2559", message: "Type '{0}' has no properties in common with type '{1}'." },
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." },
@@ -4370,7 +4569,6 @@ var ts;
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}'." },
@@ -4429,6 +4627,8 @@ var ts;
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." },
_0_are_specified_twice_The_attribute_named_0_will_be_overwritten: { code: 2710, category: ts.DiagnosticCategory.Error, key: "_0_are_specified_twice_The_attribute_named_0_will_be_overwritten_2710", message: "'{0}' are specified twice. The attribute named '{0}' will be overwritten." },
+ A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option: { code: 2711, category: ts.DiagnosticCategory.Error, key: "A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES20_2711", message: "A dynamic import call returns a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your `--lib` option." },
+ A_dynamic_import_call_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: 2712, category: ts.DiagnosticCategory.Error, key: "A_dynamic_import_call_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declarat_2712", message: "A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option." },
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}'." },
@@ -4503,7 +4703,7 @@ var ts;
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." },
+ Property_0_of_exported_class_expression_may_not_be_private_or_protected: { code: 4094, category: ts.DiagnosticCategory.Error, key: "Property_0_of_exported_class_expression_may_not_be_private_or_protected_4094", message: "Property '{0}' of exported class expression may not be private or protected." },
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}'." },
@@ -4545,7 +4745,7 @@ var ts;
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_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'." },
+ Specify_module_code_generation_Colon_commonjs_amd_system_umd_es2015_or_ESNext: { code: 6016, category: ts.DiagnosticCategory.Message, key: "Specify_module_code_generation_Colon_commonjs_amd_system_umd_es2015_or_ESNext_6016", message: "Specify module code generation: 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'." },
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_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'." },
@@ -4654,6 +4854,7 @@ var ts;
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." },
+ Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1: { code: 6137, category: ts.DiagnosticCategory.Error, key: "Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1_6137", message: "Cannot import type declaration files. Consider importing '{0}' instead of '{1}'." },
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}'." },
@@ -4699,6 +4900,9 @@ var ts;
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}'" },
+ Reusing_resolution_of_module_0_to_file_1_from_old_program: { code: 6183, category: ts.DiagnosticCategory.Message, key: "Reusing_resolution_of_module_0_to_file_1_from_old_program_6183", message: "Reusing resolution of module '{0}' to file '{1}' from old program." },
+ Reusing_module_resolutions_originating_in_0_since_resolutions_are_unchanged_from_old_program: { code: 6184, category: ts.DiagnosticCategory.Message, key: "Reusing_module_resolutions_originating_in_0_since_resolutions_are_unchanged_from_old_program_6184", message: "Reusing module resolutions originating in '{0}' since resolutions are unchanged from old program." },
+ Disable_strict_checking_of_generic_signatures_in_function_types: { code: 6185, category: ts.DiagnosticCategory.Message, key: "Disable_strict_checking_of_generic_signatures_in_function_types_6185", message: "Disable strict checking of generic signatures in function types." },
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." },
@@ -4725,6 +4929,8 @@ var ts;
Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation: { code: 7032, category: ts.DiagnosticCategory.Error, key: "Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation_7032", message: "Property '{0}' implicitly has type 'any', because its set accessor lacks a parameter type annotation." },
Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation: { code: 7033, category: ts.DiagnosticCategory.Error, key: "Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation_7033", message: "Property '{0}' implicitly has type 'any', because its get accessor lacks a return type annotation." },
Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined: { code: 7034, category: ts.DiagnosticCategory.Error, key: "Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined_7034", message: "Variable '{0}' implicitly has type '{1}' in some locations where its type cannot be determined." },
+ Try_npm_install_types_Slash_0_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0: { code: 7035, category: ts.DiagnosticCategory.Error, key: "Try_npm_install_types_Slash_0_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_mod_7035", message: "Try `npm install @types/{0}` if it exists or add a new declaration (.d.ts) file containing `declare module '{0}';`" },
+ Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0: { code: 7036, category: ts.DiagnosticCategory.Error, key: "Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0_7036", message: "Dynamic import's specifier must be of type 'string', but here has type '{0}'." },
You_cannot_rename_this_element: { code: 8000, category: ts.DiagnosticCategory.Error, key: "You_cannot_rename_this_element_8000", message: "You cannot rename this element." },
You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library: { code: 8001, category: ts.DiagnosticCategory.Error, key: "You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library_8001", message: "You cannot rename elements that are defined in the standard TypeScript library." },
import_can_only_be_used_in_a_ts_file: { code: 8002, category: ts.DiagnosticCategory.Error, key: "import_can_only_be_used_in_a_ts_file_8002", message: "'import ... =' can only be used in a .ts file." },
@@ -4773,12 +4979,18 @@ var ts;
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}'." },
+ Declare_property_0: { code: 90016, category: ts.DiagnosticCategory.Message, key: "Declare_property_0_90016", message: "Declare property '{0}'." },
+ Add_index_signature_for_property_0: { code: 90017, category: ts.DiagnosticCategory.Message, key: "Add_index_signature_for_property_0_90017", message: "Add index signature for 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}'." },
+ Change_spelling_to_0: { code: 90022, category: ts.DiagnosticCategory.Message, key: "Change_spelling_to_0_90022", message: "Change spelling to '{0}'." },
+ Declare_method_0: { code: 90023, category: ts.DiagnosticCategory.Message, key: "Declare_method_0_90023", message: "Declare method '{0}'." },
+ Declare_static_method_0: { code: 90024, category: ts.DiagnosticCategory.Message, key: "Declare_static_method_0_90024", message: "Declare static method '{0}'." },
+ Prefix_0_with_an_underscore: { code: 90025, category: ts.DiagnosticCategory.Message, key: "Prefix_0_with_an_underscore_90025", message: "Prefix '{0}' with an underscore." },
+ Convert_function_to_an_ES2015_class: { code: 95001, category: ts.DiagnosticCategory.Message, key: "Convert_function_to_an_ES2015_class_95001", message: "Convert function to an ES2015 class" },
+ Convert_function_0_to_class: { code: 95002, category: ts.DiagnosticCategory.Message, key: "Convert_function_0_to_class_95002", message: "Convert function '{0}' to class" },
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." },
@@ -5151,6 +5363,7 @@ var ts;
case 47 /* slash */:
// starts of normal trivia
case 60 /* lessThan */:
+ case 124 /* bar */:
case 61 /* equals */:
case 62 /* greaterThan */:
// Starts of conflict marker trivia
@@ -5217,6 +5430,7 @@ var ts;
}
break;
case 60 /* lessThan */:
+ case 124 /* bar */:
case 61 /* equals */:
case 62 /* greaterThan */:
if (isConflictMarkerTrivia(text, pos)) {
@@ -5273,12 +5487,12 @@ var ts;
}
}
else {
- ts.Debug.assert(ch === 61 /* equals */);
- // Consume everything from the start of the mid-conflict marker to the start of the next
- // end-conflict marker.
+ ts.Debug.assert(ch === 124 /* bar */ || ch === 61 /* equals */);
+ // Consume everything from the start of a ||||||| or ======= marker to the start
+ // of the next ======= or >>>>>>> marker.
while (pos < len) {
- var ch_1 = text.charCodeAt(pos);
- if (ch_1 === 62 /* greaterThan */ && isConflictMarkerTrivia(text, pos)) {
+ var currentChar = text.charCodeAt(pos);
+ if ((currentChar === 61 /* equals */ || currentChar === 62 /* greaterThan */) && currentChar !== ch && isConflictMarkerTrivia(text, pos)) {
break;
}
pos++;
@@ -5441,9 +5655,10 @@ var ts;
ts.getTrailingCommentRanges = getTrailingCommentRanges;
/** Optionally, get the shebang */
function getShebang(text) {
- return shebangTriviaRegex.test(text)
- ? shebangTriviaRegex.exec(text)[0]
- : undefined;
+ var match = shebangTriviaRegex.exec(text);
+ if (match) {
+ return match[0];
+ }
}
ts.getShebang = getShebang;
function isIdentifierStart(ch, languageVersion) {
@@ -6024,13 +6239,13 @@ var ts;
pos += 2;
var commentClosed = false;
while (pos < end) {
- var ch_2 = text.charCodeAt(pos);
- if (ch_2 === 42 /* asterisk */ && text.charCodeAt(pos + 1) === 47 /* slash */) {
+ var ch_1 = text.charCodeAt(pos);
+ if (ch_1 === 42 /* asterisk */ && text.charCodeAt(pos + 1) === 47 /* slash */) {
pos += 2;
commentClosed = true;
break;
}
- if (isLineBreak(ch_2)) {
+ if (isLineBreak(ch_1)) {
precedingLineBreak = true;
}
pos++;
@@ -6190,6 +6405,15 @@ var ts;
pos++;
return token = 17 /* OpenBraceToken */;
case 124 /* bar */:
+ if (isConflictMarkerTrivia(text, pos)) {
+ pos = scanConflictMarkerTrivia(text, pos, error);
+ if (skipTrivia) {
+ continue;
+ }
+ else {
+ return token = 7 /* ConflictMarkerTrivia */;
+ }
+ }
if (text.charCodeAt(pos + 1) === 124 /* bar */) {
return pos += 2, token = 54 /* BarBarToken */;
}
@@ -6601,7 +6825,7 @@ var ts;
clear: function () { return str_1 = ""; },
trackSymbol: ts.noop,
reportInaccessibleThisError: ts.noop,
- reportIllegalExtends: ts.noop
+ reportPrivateInBaseOfClassExpression: ts.noop,
};
}
return stringWriters.pop();
@@ -6652,9 +6876,7 @@ var ts;
ts.typeDirectiveIsEqualTo = typeDirectiveIsEqualTo;
/* @internal */
function hasChangesInResolutions(names, newResolutions, oldResolutions, comparer) {
- if (names.length !== newResolutions.length) {
- return false;
- }
+ ts.Debug.assert(names.length === newResolutions.length);
for (var i = 0; i < names.length; i++) {
var newResolution = newResolutions[i];
var oldResolution = oldResolutions && oldResolutions.get(names[i]);
@@ -6779,17 +7001,13 @@ var ts;
return !nodeIsMissing(node);
}
ts.nodeIsPresent = nodeIsPresent;
- function isToken(n) {
- return n.kind >= 0 /* FirstToken */ && n.kind <= 142 /* 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.
if (nodeIsMissing(node)) {
return node.pos;
}
- if (isJSDocNode(node)) {
+ if (ts.isJSDocNode(node)) {
return ts.skipTrivia((sourceFile || getSourceFileOfNode(node)).text, node.pos, /*stopAfterLineBreak*/ false, /*stopAtComments*/ true);
}
if (includeJsDoc && node.jsDoc && node.jsDoc.length > 0) {
@@ -6799,20 +7017,12 @@ 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 === 294 /* SyntaxList */ && node._children.length > 0) {
+ if (node.kind === 295 /* 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 >= 267 /* FirstJSDocNode */ && node.kind <= 293 /* LastJSDocNode */;
- }
- ts.isJSDocNode = isJSDocNode;
- function isJSDocTag(node) {
- return node.kind >= 283 /* FirstJSDocTagNode */ && node.kind <= 293 /* LastJSDocTagNode */;
- }
- ts.isJSDocTag = isJSDocTag;
function getNonDecoratorTokenPosOfNode(node, sourceFile) {
if (nodeIsMissing(node) || !node.decorators) {
return getTokenPosOfNode(node, sourceFile);
@@ -6847,28 +7057,30 @@ var ts;
if (!nodeIsSynthesized(node) && node.parent) {
return getSourceTextOfNodeFromSourceFile(sourceFile, node);
}
+ var escapeText = ts.getEmitFlags(node) & 16777216 /* NoAsciiEscaping */ ? escapeString : escapeNonAsciiString;
// 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.
+ // or a (possibly escaped) quoted form of the original text if it's string-like.
switch (node.kind) {
case 9 /* StringLiteral */:
- return getQuotedEscapedLiteralText('"', node.text, '"');
+ return '"' + escapeText(node.text) + '"';
case 13 /* NoSubstitutionTemplateLiteral */:
- return getQuotedEscapedLiteralText("`", node.text, "`");
+ return "`" + escapeText(node.text) + "`";
case 14 /* TemplateHead */:
- return getQuotedEscapedLiteralText("`", node.text, "${");
+ return "`" + escapeText(node.text) + "${";
case 15 /* TemplateMiddle */:
- return getQuotedEscapedLiteralText("}", node.text, "${");
+ return "}" + escapeText(node.text) + "${";
case 16 /* TemplateTail */:
- return getQuotedEscapedLiteralText("}", node.text, "`");
+ return "}" + escapeText(node.text) + "`";
case 8 /* NumericLiteral */:
return node.text;
}
ts.Debug.fail("Literal kind '" + node.kind + "' not accounted for.");
}
ts.getLiteralText = getLiteralText;
- function getQuotedEscapedLiteralText(leftQuote, text, rightQuote) {
- return leftQuote + escapeNonAsciiCharacters(escapeString(text)) + rightQuote;
+ function getTextOfConstantValue(value) {
+ return typeof value === "string" ? '"' + escapeNonAsciiString(value) + '"' : "" + value;
}
+ ts.getTextOfConstantValue = getTextOfConstantValue;
// Add an extra underscore to identifiers that start with two underscores to avoid issues with magic names like '__proto__'
function escapeIdentifier(identifier) {
return identifier.length >= 2 && identifier.charCodeAt(0) === 95 /* _ */ && identifier.charCodeAt(1) === 95 /* _ */ ? "_" + identifier : identifier;
@@ -6907,7 +7119,7 @@ var ts;
function isBlockScopedContainerTopLevel(node) {
return node.kind === 265 /* SourceFile */ ||
node.kind === 233 /* ModuleDeclaration */ ||
- isFunctionLike(node);
+ ts.isFunctionLike(node);
}
ts.isBlockScopedContainerTopLevel = isBlockScopedContainerTopLevel;
function isGlobalScopeAugmentation(module) {
@@ -6954,7 +7166,7 @@ var ts;
case 207 /* Block */:
// function block is not considered block-scope container
// see comment in binder.ts: bind(...), case for SyntaxKind.Block
- return parentNode && !isFunctionLike(parentNode);
+ return parentNode && !ts.isFunctionLike(parentNode);
}
return false;
}
@@ -7097,10 +7309,6 @@ var ts;
return (file.externalModuleIndicator || file.commonJsModuleIndicator) !== undefined;
}
ts.isExternalOrCommonJsModule = isExternalOrCommonJsModule;
- function isDeclarationFile(file) {
- return file.isDeclarationFile;
- }
- ts.isDeclarationFile = isDeclarationFile;
function isConstEnumDeclaration(node) {
return node.kind === 232 /* EnumDeclaration */ && isConst(node);
}
@@ -7118,6 +7326,10 @@ var ts;
return n.kind === 181 /* CallExpression */ && n.expression.kind === 97 /* SuperKeyword */;
}
ts.isSuperCall = isSuperCall;
+ function isImportCall(n) {
+ return n.kind === 181 /* CallExpression */ && n.expression.kind === 91 /* ImportKeyword */;
+ }
+ ts.isImportCall = isImportCall;
function isPrologueDirective(node) {
return node.kind === 210 /* ExpressionStatement */
&& node.expression.kind === 9 /* StringLiteral */;
@@ -7241,10 +7453,6 @@ var ts;
return false;
}
ts.isChildOfNodeWithKind = isChildOfNodeWithKind;
- function isPrefixUnaryExpression(node) {
- return node.kind === 192 /* 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) {
@@ -7295,7 +7503,7 @@ var ts;
// skipped in this traversal.
return;
default:
- if (isFunctionLike(node)) {
+ if (ts.isFunctionLike(node)) {
var name = node.name;
if (name && name.kind === 144 /* ComputedPropertyName */) {
// Note that we will not include methods/accessors of a class because they would require
@@ -7348,38 +7556,6 @@ var ts;
return false;
}
ts.isVariableLike = isVariableLike;
- function isAccessor(node) {
- return node && (node.kind === 153 /* GetAccessor */ || node.kind === 154 /* SetAccessor */);
- }
- ts.isAccessor = isAccessor;
- function isClassLike(node) {
- return node && (node.kind === 229 /* ClassDeclaration */ || node.kind === 199 /* ClassExpression */);
- }
- ts.isClassLike = isClassLike;
- function isFunctionLike(node) {
- return node && isFunctionLikeKind(node.kind);
- }
- ts.isFunctionLike = isFunctionLike;
- function isFunctionLikeKind(kind) {
- switch (kind) {
- case 152 /* Constructor */:
- case 186 /* FunctionExpression */:
- case 228 /* FunctionDeclaration */:
- case 187 /* ArrowFunction */:
- case 151 /* MethodDeclaration */:
- case 150 /* MethodSignature */:
- case 153 /* GetAccessor */:
- case 154 /* SetAccessor */:
- case 155 /* CallSignature */:
- case 156 /* ConstructSignature */:
- case 157 /* IndexSignature */:
- case 160 /* FunctionType */:
- case 161 /* ConstructorType */:
- return true;
- }
- return false;
- }
- ts.isFunctionLikeKind = isFunctionLikeKind;
function introducesArgumentsExoticObject(node) {
switch (node.kind) {
case 151 /* MethodDeclaration */:
@@ -7394,20 +7570,6 @@ var ts;
return false;
}
ts.introducesArgumentsExoticObject = introducesArgumentsExoticObject;
- function isIterationStatement(node, lookInLabeledStatements) {
- switch (node.kind) {
- case 214 /* ForStatement */:
- case 215 /* ForInStatement */:
- case 216 /* ForOfStatement */:
- case 212 /* DoStatement */:
- case 213 /* WhileStatement */:
- return true;
- case 222 /* LabeledStatement */:
- return lookInLabeledStatements && isIterationStatement(node.statement, lookInLabeledStatements);
- }
- return false;
- }
- ts.isIterationStatement = isIterationStatement;
function unwrapInnermostStatementOfLabel(node, beforeUnwrapLabelCallback) {
while (true) {
if (beforeUnwrapLabelCallback) {
@@ -7421,7 +7583,7 @@ var ts;
}
ts.unwrapInnermostStatementOfLabel = unwrapInnermostStatementOfLabel;
function isFunctionBlock(node) {
- return node && node.kind === 207 /* Block */ && isFunctionLike(node.parent);
+ return node && node.kind === 207 /* Block */ && ts.isFunctionLike(node.parent);
}
ts.isFunctionBlock = isFunctionBlock;
function isObjectLiteralMethod(node) {
@@ -7445,7 +7607,7 @@ var ts;
function getContainingFunction(node) {
while (true) {
node = node.parent;
- if (!node || isFunctionLike(node)) {
+ if (!node || ts.isFunctionLike(node)) {
return node;
}
}
@@ -7454,7 +7616,7 @@ var ts;
function getContainingClass(node) {
while (true) {
node = node.parent;
- if (!node || isClassLike(node)) {
+ if (!node || ts.isClassLike(node)) {
return node;
}
}
@@ -7472,7 +7634,7 @@ var ts;
// then the computed property is not a 'this' container.
// A computed property name in a class needs to be a this container
// so that we can error on it.
- if (isClassLike(node.parent.parent)) {
+ if (ts.isClassLike(node.parent.parent)) {
return node;
}
// If this is a computed property, then the parent should not
@@ -7484,12 +7646,12 @@ var ts;
break;
case 147 /* Decorator */:
// Decorators are always applied outside of the body of a class or method.
- if (node.parent.kind === 146 /* Parameter */ && isClassElement(node.parent.parent)) {
+ if (node.parent.kind === 146 /* Parameter */ && ts.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;
}
- else if (isClassElement(node.parent)) {
+ else if (ts.isClassElement(node.parent)) {
// If the decorator's parent is a class element, we resolve the 'this' container
// from the parent class declaration.
node = node.parent;
@@ -7568,12 +7730,12 @@ var ts;
return node;
case 147 /* Decorator */:
// Decorators are always applied outside of the body of a class or method.
- if (node.parent.kind === 146 /* Parameter */ && isClassElement(node.parent.parent)) {
+ if (node.parent.kind === 146 /* Parameter */ && ts.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;
}
- else if (isClassElement(node.parent)) {
+ else if (ts.isClassElement(node.parent)) {
// If the decorator's parent is a class element, we resolve the 'this' container
// from the parent class declaration.
node = node.parent;
@@ -7622,25 +7784,11 @@ var ts;
return undefined;
}
ts.getEntityNameFromTypeNode = getEntityNameFromTypeNode;
- function isCallLikeExpression(node) {
- switch (node.kind) {
- case 251 /* JsxOpeningElement */:
- case 250 /* JsxSelfClosingElement */:
- case 181 /* CallExpression */:
- case 182 /* NewExpression */:
- case 183 /* TaggedTemplateExpression */:
- case 147 /* Decorator */:
- return true;
- default:
- return false;
- }
- }
- ts.isCallLikeExpression = isCallLikeExpression;
function getInvokedExpression(node) {
if (node.kind === 183 /* TaggedTemplateExpression */) {
return node.tag;
}
- else if (isJsxOpeningLikeElement(node)) {
+ else if (ts.isJsxOpeningLikeElement(node)) {
return node.tagName;
}
// Will either be a CallExpression, NewExpression, or Decorator.
@@ -7878,11 +8026,11 @@ var ts;
}
ts.getRightMostAssignedExpression = getRightMostAssignedExpression;
function isExportsIdentifier(node) {
- return isIdentifier(node) && node.text === "exports";
+ return ts.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";
+ return ts.isPropertyAccessExpression(node) && ts.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
@@ -7992,35 +8140,24 @@ var ts;
}
ts.getCommentsFromJSDoc = getCommentsFromJSDoc;
function hasJSDocParameterTags(node) {
- var parameterTags = getJSDocTags(node, 286 /* JSDocParameterTag */);
+ var parameterTags = getJSDocTags(node, 287 /* 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 === 286 /* JSDocParameterTag */) {
- if (doc.kind === kind) {
- result.push(doc);
- }
- }
- else {
- var tags = doc.tags;
- if (tags) {
- result.push.apply(result, ts.filter(tags, function (tag) { return tag.kind === kind; }));
- }
- }
- }
- return result;
- }
+ return ts.flatMap(getJSDocs(node), function (doc) {
+ return doc.kind === 283 /* JSDocComment */
+ ? ts.filter(doc.tags, function (tag) { return tag.kind === kind; })
+ : doc.kind === kind && doc;
+ });
}
function getFirstJSDocTag(node, kind) {
return node && ts.firstOrUndefined(getJSDocTags(node, kind));
}
function getJSDocs(node) {
+ if (ts.isJSDocTypedefTag(node)) {
+ return [node.parent];
+ }
var cache = node.jsDocCache;
if (!cache) {
getJSDocsWorker(node);
@@ -8072,22 +8209,19 @@ var ts;
}
ts.getJSDocs = getJSDocs;
function getJSDocParameterTags(param) {
- if (!isParameter(param)) {
- return undefined;
- }
var func = param.parent;
- var tags = getJSDocTags(func, 286 /* JSDocParameterTag */);
+ var tags = getJSDocTags(func, 287 /* 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 === 286 /* JSDocParameterTag */; });
+ var paramTags = ts.filter(tags, function (tag) { return tag.kind === 287 /* JSDocParameterTag */; });
if (paramTags && 0 <= i && i < paramTags.length) {
return [paramTags[i]];
}
}
else if (param.name.kind === 71 /* Identifier */) {
var name_1 = param.name.text;
- return ts.filter(tags, function (tag) { return tag.kind === 286 /* JSDocParameterTag */ && tag.parameterName.text === name_1; });
+ return ts.filter(tags, function (tag) { return tag.kind === 287 /* JSDocParameterTag */ && tag.name.text === name_1; });
}
else {
// TODO: it's a destructured parameter, so it should look up an "object type" series of multiple lines
@@ -8096,8 +8230,27 @@ var ts;
}
}
ts.getJSDocParameterTags = getJSDocParameterTags;
+ /** Does the opposite of `getJSDocParameterTags`: given a JSDoc parameter, finds the parameter corresponding to it. */
+ function getParameterFromJSDoc(node) {
+ var name = node.name.text;
+ var grandParent = node.parent.parent;
+ ts.Debug.assert(node.parent.kind === 283 /* JSDocComment */);
+ if (!ts.isFunctionLike(grandParent)) {
+ return undefined;
+ }
+ return ts.find(grandParent.parameters, function (p) {
+ return p.name.kind === 71 /* Identifier */ && p.name.text === name;
+ });
+ }
+ ts.getParameterFromJSDoc = getParameterFromJSDoc;
+ function getTypeParameterFromJsDoc(node) {
+ var name = node.name.text;
+ var typeParameters = node.parent.parent.parent.typeParameters;
+ return ts.find(typeParameters, function (p) { return p.name.text === name; });
+ }
+ ts.getTypeParameterFromJsDoc = getTypeParameterFromJsDoc;
function getJSDocType(node) {
- var tag = getFirstJSDocTag(node, 288 /* JSDocTypeTag */);
+ var tag = getFirstJSDocTag(node, 289 /* JSDocTypeTag */);
if (!tag && node.kind === 146 /* Parameter */) {
var paramTags = getJSDocParameterTags(node);
if (paramTags) {
@@ -8111,12 +8264,21 @@ var ts;
return getFirstJSDocTag(node, 285 /* JSDocAugmentsTag */);
}
ts.getJSDocAugmentsTag = getJSDocAugmentsTag;
+ function getJSDocClassTag(node) {
+ return getFirstJSDocTag(node, 286 /* JSDocClassTag */);
+ }
+ ts.getJSDocClassTag = getJSDocClassTag;
function getJSDocReturnTag(node) {
- return getFirstJSDocTag(node, 287 /* JSDocReturnTag */);
+ return getFirstJSDocTag(node, 288 /* JSDocReturnTag */);
}
ts.getJSDocReturnTag = getJSDocReturnTag;
+ function getJSDocReturnType(node) {
+ var returnTag = getJSDocReturnTag(node);
+ return returnTag && returnTag.typeExpression && returnTag.typeExpression.type;
+ }
+ ts.getJSDocReturnType = getJSDocReturnType;
function getJSDocTemplateTag(node) {
- return getFirstJSDocTag(node, 289 /* JSDocTemplateTag */);
+ return getFirstJSDocTag(node, 290 /* JSDocTemplateTag */);
}
ts.getJSDocTemplateTag = getJSDocTemplateTag;
function hasRestParameter(s) {
@@ -8228,25 +8390,37 @@ var ts;
ts.isInAmbientContext = isInAmbientContext;
// True if the given identifier, string literal, or number literal is the name of a declaration node
function isDeclarationName(name) {
- if (name.kind !== 71 /* Identifier */ && name.kind !== 9 /* StringLiteral */ && name.kind !== 8 /* NumericLiteral */) {
- return false;
- }
- var parent = name.parent;
- if (parent.kind === 242 /* ImportSpecifier */ || parent.kind === 246 /* ExportSpecifier */) {
- if (parent.propertyName) {
- return true;
- }
- }
- if (isDeclaration(parent)) {
- return parent.name === name;
+ switch (name.kind) {
+ case 71 /* Identifier */:
+ case 9 /* StringLiteral */:
+ case 8 /* NumericLiteral */:
+ return ts.isDeclaration(name.parent) && name.parent.name === name;
+ default:
+ return false;
}
- return false;
}
ts.isDeclarationName = isDeclarationName;
+ /* @internal */
+ // See GH#16030
+ function isAnyDeclarationName(name) {
+ switch (name.kind) {
+ case 71 /* Identifier */:
+ case 9 /* StringLiteral */:
+ case 8 /* NumericLiteral */:
+ if (ts.isDeclaration(name.parent)) {
+ return name.parent.name === name;
+ }
+ var binExp = name.parent.parent;
+ return ts.isBinaryExpression(binExp) && getSpecialPropertyAssignmentKind(binExp) !== 0 /* None */ && ts.getNameOfDeclaration(binExp) === name;
+ default:
+ return false;
+ }
+ }
+ ts.isAnyDeclarationName = isAnyDeclarationName;
function isLiteralComputedPropertyDeclarationName(node) {
return (node.kind === 9 /* StringLiteral */ || node.kind === 8 /* NumericLiteral */) &&
node.parent.kind === 144 /* ComputedPropertyName */ &&
- isDeclaration(node.parent.parent);
+ ts.isDeclaration(node.parent.parent);
}
ts.isLiteralComputedPropertyDeclarationName = isLiteralComputedPropertyDeclarationName;
// Return true if the given identifier is classified as an IdentifierName
@@ -8355,21 +8529,19 @@ var ts;
var isNoDefaultLibRegEx = /^(\/\/\/\s*<reference\s+no-default-lib\s*=\s*)('|")(.+?)\2\s*\/>/gim;
if (simpleReferenceRegEx.test(comment)) {
if (isNoDefaultLibRegEx.test(comment)) {
- return {
- isNoDefaultLib: true
- };
+ return { isNoDefaultLib: true };
}
else {
var refMatchResult = ts.fullTripleSlashReferencePathRegEx.exec(comment);
var refLibResult = !refMatchResult && ts.fullTripleSlashReferenceTypeReferenceDirectiveRegEx.exec(comment);
- if (refMatchResult || refLibResult) {
- var start = commentRange.pos;
- var end = commentRange.end;
+ var match = refMatchResult || refLibResult;
+ if (match) {
+ var pos = commentRange.pos + match[1].length + match[2].length;
return {
fileReference: {
- pos: start,
- end: end,
- fileName: (refMatchResult || refLibResult)[3]
+ pos: pos,
+ end: pos + match[3].length,
+ fileName: match[3]
},
isNoDefaultLib: false,
isTypeReferenceDirective: !!refLibResult
@@ -8397,12 +8569,13 @@ var ts;
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[FunctionFlags["AsyncGenerator"] = 3] = "AsyncGenerator";
})(FunctionFlags = ts.FunctionFlags || (ts.FunctionFlags = {}));
function getFunctionFlags(node) {
+ if (!node) {
+ return 4 /* Invalid */;
+ }
var flags = 0 /* Normal */;
switch (node.kind) {
case 228 /* FunctionDeclaration */:
@@ -8437,10 +8610,6 @@ var ts;
return false;
}
ts.isAsyncFunction = isAsyncFunction;
- function isNumericLiteral(node) {
- return node.kind === 8 /* NumericLiteral */;
- }
- ts.isNumericLiteral = isNumericLiteral;
function isStringOrNumericLiteral(node) {
var kind = node.kind;
return kind === 9 /* StringLiteral */
@@ -8455,7 +8624,8 @@ var ts;
* Symbol.
*/
function hasDynamicName(declaration) {
- return declaration.name && isDynamicName(declaration.name);
+ var name = ts.getNameOfDeclaration(declaration);
+ return name && isDynamicName(name);
}
ts.hasDynamicName = hasDynamicName;
function isDynamicName(name) {
@@ -8470,7 +8640,7 @@ var ts;
* where Symbol is literally the word "Symbol", and name is any identifierName
*/
function isWellKnownSymbolSyntactically(node) {
- return isPropertyAccessExpression(node) && isESSymbolIdentifier(node.expression);
+ return ts.isPropertyAccessExpression(node) && isESSymbolIdentifier(node.expression);
}
ts.isWellKnownSymbolSyntactically = isWellKnownSymbolSyntactically;
function getPropertyNameForPropertyNameNode(name) {
@@ -8505,24 +8675,6 @@ var ts;
return node.text === "push" || node.text === "unshift";
}
ts.isPushOrUnshiftIdentifier = isPushOrUnshiftIdentifier;
- function isModifierKind(token) {
- switch (token) {
- case 117 /* AbstractKeyword */:
- case 120 /* AsyncKeyword */:
- case 76 /* ConstKeyword */:
- case 124 /* DeclareKeyword */:
- case 79 /* DefaultKeyword */:
- case 84 /* ExportKeyword */:
- case 114 /* PublicKeyword */:
- case 112 /* PrivateKeyword */:
- case 113 /* ProtectedKeyword */:
- case 131 /* ReadonlyKeyword */:
- case 115 /* StaticKeyword */:
- return true;
- }
- return false;
- }
- ts.isModifierKind = isModifierKind;
function isParameterDeclaration(node) {
var root = getRootDeclaration(node);
return root.kind === 146 /* Parameter */;
@@ -8561,7 +8713,7 @@ var ts;
}
ts.getOriginalSourceFileOrBundle = getOriginalSourceFileOrBundle;
function getOriginalSourceFile(sourceFile) {
- return ts.getParseTreeNode(sourceFile, isSourceFile) || sourceFile;
+ return ts.getParseTreeNode(sourceFile, ts.isSourceFile) || sourceFile;
}
function getOriginalSourceFiles(sourceFiles) {
return ts.sameMap(sourceFiles, getOriginalSourceFile);
@@ -8738,6 +8890,8 @@ var ts;
return 2;
case 198 /* SpreadElement */:
return 1;
+ case 298 /* CommaListExpression */:
+ return 0;
default:
return -1;
}
@@ -8851,14 +9005,15 @@ var ts;
return "\\u" + paddedHexCode;
}
var nonAsciiCharacters = /[^\u0000-\u007F]/g;
- function escapeNonAsciiCharacters(s) {
+ function escapeNonAsciiString(s) {
+ s = escapeString(s);
// Replace non-ASCII characters with '\uNNNN' escapes if any exist.
// Otherwise just return the original string.
return nonAsciiCharacters.test(s) ?
s.replace(nonAsciiCharacters, function (c) { return get16BitUnicodeEscapeSequence(c.charCodeAt(0)); }) :
s;
}
- ts.escapeNonAsciiCharacters = escapeNonAsciiCharacters;
+ ts.escapeNonAsciiString = escapeNonAsciiString;
var indentStrings = ["", " "];
function getIndentString(level) {
if (indentStrings[level] === undefined) {
@@ -8947,7 +9102,7 @@ var ts;
ts.getResolvedExternalModuleName = getResolvedExternalModuleName;
function getExternalModuleNameFromDeclaration(host, resolver, declaration) {
var file = resolver.getExternalModuleFileFromDeclaration(declaration);
- if (!file || isDeclarationFile(file)) {
+ if (!file || file.isDeclarationFile) {
return undefined;
}
return getResolvedExternalModuleName(host, file);
@@ -9013,7 +9168,7 @@ var ts;
ts.getSourceFilesToEmit = getSourceFilesToEmit;
/** 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);
+ return !(options.noEmitForJsFiles && isSourceFileJavaScript(sourceFile)) && !sourceFile.isDeclarationFile && !isSourceFileFromExternalLibrary(sourceFile);
}
ts.sourceFileMayBeEmitted = sourceFileMayBeEmitted;
/**
@@ -9097,13 +9252,17 @@ var ts;
});
}
ts.getFirstConstructorWithBody = getFirstConstructorWithBody;
- /** Get the type annotaion for the value parameter. */
- function getSetAccessorTypeAnnotationNode(accessor) {
+ function getSetAccessorValueParameter(accessor) {
if (accessor && accessor.parameters.length > 0) {
var hasThis = accessor.parameters.length === 2 && parameterIsThisKeyword(accessor.parameters[0]);
- return accessor.parameters[hasThis ? 1 : 0].type;
+ return accessor.parameters[hasThis ? 1 : 0];
}
}
+ /** Get the type annotation for the value parameter. */
+ function getSetAccessorTypeAnnotationNode(accessor) {
+ var parameter = getSetAccessorValueParameter(accessor);
+ return parameter && parameter.type;
+ }
ts.getSetAccessorTypeAnnotationNode = getSetAccessorTypeAnnotationNode;
function getThisParameter(signature) {
if (signature.parameters.length) {
@@ -9174,6 +9333,55 @@ var ts;
};
}
ts.getAllAccessorDeclarations = getAllAccessorDeclarations;
+ /**
+ * Gets the effective type annotation of a variable, parameter, or property. If the node was
+ * parsed in a JavaScript file, gets the type annotation from JSDoc.
+ */
+ function getEffectiveTypeAnnotationNode(node) {
+ if (node.type) {
+ return node.type;
+ }
+ if (node.flags & 65536 /* JavaScriptFile */) {
+ return getJSDocType(node);
+ }
+ }
+ ts.getEffectiveTypeAnnotationNode = getEffectiveTypeAnnotationNode;
+ /**
+ * Gets the effective return type annotation of a signature. If the node was parsed in a
+ * JavaScript file, gets the return type annotation from JSDoc.
+ */
+ function getEffectiveReturnTypeNode(node) {
+ if (node.type) {
+ return node.type;
+ }
+ if (node.flags & 65536 /* JavaScriptFile */) {
+ return getJSDocReturnType(node);
+ }
+ }
+ ts.getEffectiveReturnTypeNode = getEffectiveReturnTypeNode;
+ /**
+ * Gets the effective type parameters. If the node was parsed in a
+ * JavaScript file, gets the type parameters from the `@template` tag from JSDoc.
+ */
+ function getEffectiveTypeParameterDeclarations(node) {
+ if (node.typeParameters) {
+ return node.typeParameters;
+ }
+ if (node.flags & 65536 /* JavaScriptFile */) {
+ var templateTag = getJSDocTemplateTag(node);
+ return templateTag && templateTag.typeParameters;
+ }
+ }
+ ts.getEffectiveTypeParameterDeclarations = getEffectiveTypeParameterDeclarations;
+ /**
+ * Gets the effective type annotation of the value parameter of a set accessor. If the node
+ * was parsed in a JavaScript file, gets the type annotation from JSDoc.
+ */
+ function getEffectiveSetAccessorTypeAnnotationNode(node) {
+ var parameter = getSetAccessorValueParameter(node);
+ return parameter && getEffectiveTypeAnnotationNode(parameter);
+ }
+ ts.getEffectiveSetAccessorTypeAnnotationNode = getEffectiveSetAccessorTypeAnnotationNode;
function emitNewLineBeforeLeadingComments(lineMap, writer, node, leadingComments) {
emitNewLineBeforeLeadingCommentsOfPosition(lineMap, writer, node.pos, leadingComments);
}
@@ -9379,6 +9587,13 @@ var ts;
if (node.modifierFlagsCache & 536870912 /* HasComputedFlags */) {
return node.modifierFlagsCache & ~536870912 /* HasComputedFlags */;
}
+ var flags = getModifierFlagsNoCache(node);
+ node.modifierFlagsCache = flags | 536870912 /* HasComputedFlags */;
+ return flags;
+ }
+ ts.getModifierFlags = getModifierFlags;
+ /* @internal */
+ function getModifierFlagsNoCache(node) {
var flags = 0 /* None */;
if (node.modifiers) {
for (var _i = 0, _a = node.modifiers; _i < _a.length; _i++) {
@@ -9389,10 +9604,9 @@ var ts;
if (node.flags & 4 /* NestedNamespace */ || (node.kind === 71 /* Identifier */ && node.isInJSDocNamespace)) {
flags |= 1 /* Export */;
}
- node.modifierFlagsCache = flags | 536870912 /* HasComputedFlags */;
return flags;
}
- ts.getModifierFlags = getModifierFlags;
+ ts.getModifierFlagsNoCache = getModifierFlagsNoCache;
function modifierToFlag(token) {
switch (token) {
case 115 /* StaticKeyword */: return 32 /* Static */;
@@ -9424,17 +9638,17 @@ var ts;
function tryGetClassExtendingExpressionWithTypeArguments(node) {
if (node.kind === 201 /* ExpressionWithTypeArguments */ &&
node.parent.token === 85 /* ExtendsKeyword */ &&
- isClassLike(node.parent.parent)) {
+ ts.isClassLike(node.parent.parent)) {
return node.parent.parent;
}
}
ts.tryGetClassExtendingExpressionWithTypeArguments = tryGetClassExtendingExpressionWithTypeArguments;
function isAssignmentExpression(node, excludeCompoundAssignment) {
- return isBinaryExpression(node)
+ return ts.isBinaryExpression(node)
&& (excludeCompoundAssignment
? node.operatorToken.kind === 58 /* EqualsToken */
: isAssignmentOperator(node.operatorToken.kind))
- && isLeftHandSideExpression(node.left);
+ && ts.isLeftHandSideExpression(node.left);
}
ts.isAssignmentExpression = isAssignmentExpression;
function isDestructuringAssignment(node) {
@@ -9456,7 +9670,7 @@ var ts;
if (node.kind === 71 /* Identifier */) {
return true;
}
- else if (isPropertyAccessExpression(node)) {
+ else if (ts.isPropertyAccessExpression(node)) {
return isSupportedExpressionWithTypeArgumentsRest(node.expression);
}
else {
@@ -9473,7 +9687,7 @@ var ts;
&& node.parent
&& node.parent.token === 108 /* ImplementsKeyword */
&& node.parent.parent
- && isClassLike(node.parent.parent);
+ && ts.isClassLike(node.parent.parent);
}
ts.isExpressionWithTypeArgumentsInClassImplementsClause = isExpressionWithTypeArgumentsInClassImplementsClause;
function isEntityNameExpression(node) {
@@ -9497,11 +9711,11 @@ var ts;
}
ts.isEmptyArrayLiteral = isEmptyArrayLiteral;
function getLocalSymbolForExportDefault(symbol) {
- return isExportDefaultSymbol(symbol) ? symbol.valueDeclaration.localSymbol : undefined;
+ return isExportDefaultSymbol(symbol) ? symbol.declarations[0].localSymbol : undefined;
}
ts.getLocalSymbolForExportDefault = getLocalSymbolForExportDefault;
function isExportDefaultSymbol(symbol) {
- return symbol && symbol.valueDeclaration && hasModifier(symbol.valueDeclaration, 512 /* Default */);
+ return symbol && ts.length(symbol.declarations) > 0 && hasModifier(symbol.declarations[0], 512 /* Default */);
}
/** Return ".ts", ".d.ts", or ".tsx", if that is the extension. */
function tryExtractTypeScriptExtension(fileName) {
@@ -9577,13 +9791,13 @@ var ts;
var carriageReturnLineFeed = "\r\n";
var lineFeed = "\n";
function getNewLineCharacter(options) {
- if (options.newLine === 0 /* CarriageReturnLineFeed */) {
- return carriageReturnLineFeed;
+ switch (options.newLine) {
+ case 0 /* CarriageReturnLineFeed */:
+ return carriageReturnLineFeed;
+ case 1 /* LineFeed */:
+ return lineFeed;
}
- else if (options.newLine === 1 /* LineFeed */) {
- return lineFeed;
- }
- else if (ts.sys) {
+ if (ts.sys) {
return ts.sys.newLine;
}
return carriageReturnLineFeed;
@@ -9661,27 +9875,77 @@ var ts;
}
return false;
}
- var syntaxKindCache = [];
- function formatSyntaxKind(kind) {
- var syntaxKindEnum = ts.SyntaxKind;
- if (syntaxKindEnum) {
- var cached = syntaxKindCache[kind];
- if (cached !== undefined) {
- return cached;
- }
- for (var name in syntaxKindEnum) {
- if (syntaxKindEnum[name] === kind) {
- var result = kind + " (" + name + ")";
- syntaxKindCache[kind] = result;
- return result;
+ /**
+ * Formats an enum value as a string for debugging and debug assertions.
+ */
+ function formatEnum(value, enumObject, isFlags) {
+ if (value === void 0) { value = 0; }
+ var members = getEnumMembers(enumObject);
+ if (value === 0) {
+ return members.length > 0 && members[0][0] === 0 ? members[0][1] : "0";
+ }
+ if (isFlags) {
+ var result = "";
+ var remainingFlags = value;
+ for (var i = members.length - 1; i >= 0 && remainingFlags !== 0; i--) {
+ var _a = members[i], enumValue = _a[0], enumName = _a[1];
+ if (enumValue !== 0 && (remainingFlags & enumValue) === enumValue) {
+ remainingFlags &= ~enumValue;
+ result = "" + enumName + (result ? ", " : "") + result;
}
}
+ if (remainingFlags === 0) {
+ return result;
+ }
}
else {
- return kind.toString();
+ for (var _i = 0, members_1 = members; _i < members_1.length; _i++) {
+ var _b = members_1[_i], enumValue = _b[0], enumName = _b[1];
+ if (enumValue === value) {
+ return enumName;
+ }
+ }
+ }
+ return value.toString();
+ }
+ function getEnumMembers(enumObject) {
+ var result = [];
+ for (var name in enumObject) {
+ var value = enumObject[name];
+ if (typeof value === "number") {
+ result.push([value, name]);
+ }
}
+ return ts.stableSort(result, function (x, y) { return ts.compareValues(x[0], y[0]); });
+ }
+ function formatSyntaxKind(kind) {
+ return formatEnum(kind, ts.SyntaxKind, /*isFlags*/ false);
}
ts.formatSyntaxKind = formatSyntaxKind;
+ function formatModifierFlags(flags) {
+ return formatEnum(flags, ts.ModifierFlags, /*isFlags*/ true);
+ }
+ ts.formatModifierFlags = formatModifierFlags;
+ function formatTransformFlags(flags) {
+ return formatEnum(flags, ts.TransformFlags, /*isFlags*/ true);
+ }
+ ts.formatTransformFlags = formatTransformFlags;
+ function formatEmitFlags(flags) {
+ return formatEnum(flags, ts.EmitFlags, /*isFlags*/ true);
+ }
+ ts.formatEmitFlags = formatEmitFlags;
+ function formatSymbolFlags(flags) {
+ return formatEnum(flags, ts.SymbolFlags, /*isFlags*/ true);
+ }
+ ts.formatSymbolFlags = formatSymbolFlags;
+ function formatTypeFlags(flags) {
+ return formatEnum(flags, ts.TypeFlags, /*isFlags*/ true);
+ }
+ ts.formatTypeFlags = formatTypeFlags;
+ function formatObjectFlags(flags) {
+ return formatEnum(flags, ts.ObjectFlags, /*isFlags*/ true);
+ }
+ ts.formatObjectFlags = formatObjectFlags;
function getRangePos(range) {
return range ? range.pos : -1;
}
@@ -9864,42 +10128,1152 @@ var ts;
return node.symbol && getDeclarationOfKind(node.symbol, kind) === node;
}
ts.isFirstDeclarationOfKind = isFirstDeclarationOfKind;
- // Node tests
- //
- // All node tests in the following list should *not* reference parent pointers so that
- // they may be used with transformations.
+ function isWatchSet(options) {
+ // Firefox has Object.prototype.watch
+ return options.watch && options.hasOwnProperty("watch");
+ }
+ ts.isWatchSet = isWatchSet;
+ function getCheckFlags(symbol) {
+ return symbol.flags & 134217728 /* Transient */ ? symbol.checkFlags : 0;
+ }
+ ts.getCheckFlags = getCheckFlags;
+ function getDeclarationModifierFlagsFromSymbol(s) {
+ 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;
+ }
+ ts.getDeclarationModifierFlagsFromSymbol = getDeclarationModifierFlagsFromSymbol;
+ function levenshtein(s1, s2) {
+ var previous = new Array(s2.length + 1);
+ var current = new Array(s2.length + 1);
+ for (var i = 0; i < s2.length + 1; i++) {
+ previous[i] = i;
+ current[i] = -1;
+ }
+ for (var i = 1; i < s1.length + 1; i++) {
+ current[0] = i;
+ for (var j = 1; j < s2.length + 1; j++) {
+ current[j] = Math.min(previous[j] + 1, current[j - 1] + 1, previous[j - 1] + (s1[i - 1] === s2[j - 1] ? 0 : 2));
+ }
+ // shift current back to previous, and then reuse previous' array
+ var tmp = previous;
+ previous = current;
+ current = tmp;
+ }
+ return previous[previous.length - 1];
+ }
+ ts.levenshtein = levenshtein;
+})(ts || (ts = {}));
+(function (ts) {
+ function getDefaultLibFileName(options) {
+ switch (options.target) {
+ case 5 /* ESNext */:
+ return "lib.esnext.full.d.ts";
+ case 4 /* ES2017 */:
+ return "lib.es2017.full.d.ts";
+ case 3 /* ES2016 */:
+ return "lib.es2016.full.d.ts";
+ case 2 /* ES2015 */:
+ return "lib.es6.d.ts"; // We don't use lib.es2015.full.d.ts due to breaking change.
+ default:
+ return "lib.d.ts";
+ }
+ }
+ ts.getDefaultLibFileName = getDefaultLibFileName;
+ function textSpanEnd(span) {
+ return span.start + span.length;
+ }
+ ts.textSpanEnd = textSpanEnd;
+ function textSpanIsEmpty(span) {
+ return span.length === 0;
+ }
+ ts.textSpanIsEmpty = textSpanIsEmpty;
+ function textSpanContainsPosition(span, position) {
+ return position >= span.start && position < textSpanEnd(span);
+ }
+ ts.textSpanContainsPosition = textSpanContainsPosition;
+ // Returns true if 'span' contains 'other'.
+ function textSpanContainsTextSpan(span, other) {
+ return other.start >= span.start && textSpanEnd(other) <= textSpanEnd(span);
+ }
+ ts.textSpanContainsTextSpan = textSpanContainsTextSpan;
+ function textSpanOverlapsWith(span, other) {
+ var overlapStart = Math.max(span.start, other.start);
+ var overlapEnd = Math.min(textSpanEnd(span), textSpanEnd(other));
+ return overlapStart < overlapEnd;
+ }
+ ts.textSpanOverlapsWith = textSpanOverlapsWith;
+ function textSpanOverlap(span1, span2) {
+ var overlapStart = Math.max(span1.start, span2.start);
+ var overlapEnd = Math.min(textSpanEnd(span1), textSpanEnd(span2));
+ if (overlapStart < overlapEnd) {
+ return createTextSpanFromBounds(overlapStart, overlapEnd);
+ }
+ return undefined;
+ }
+ ts.textSpanOverlap = textSpanOverlap;
+ function textSpanIntersectsWithTextSpan(span, other) {
+ return other.start <= textSpanEnd(span) && textSpanEnd(other) >= span.start;
+ }
+ ts.textSpanIntersectsWithTextSpan = textSpanIntersectsWithTextSpan;
+ function textSpanIntersectsWith(span, start, length) {
+ var end = start + length;
+ return start <= textSpanEnd(span) && end >= span.start;
+ }
+ ts.textSpanIntersectsWith = textSpanIntersectsWith;
+ function decodedTextSpanIntersectsWith(start1, length1, start2, length2) {
+ var end1 = start1 + length1;
+ var end2 = start2 + length2;
+ return start2 <= end1 && end2 >= start1;
+ }
+ ts.decodedTextSpanIntersectsWith = decodedTextSpanIntersectsWith;
+ function textSpanIntersectsWithPosition(span, position) {
+ return position <= textSpanEnd(span) && position >= span.start;
+ }
+ ts.textSpanIntersectsWithPosition = textSpanIntersectsWithPosition;
+ function textSpanIntersection(span1, span2) {
+ var intersectStart = Math.max(span1.start, span2.start);
+ var intersectEnd = Math.min(textSpanEnd(span1), textSpanEnd(span2));
+ if (intersectStart <= intersectEnd) {
+ return createTextSpanFromBounds(intersectStart, intersectEnd);
+ }
+ return undefined;
+ }
+ ts.textSpanIntersection = textSpanIntersection;
+ function createTextSpan(start, length) {
+ if (start < 0) {
+ throw new Error("start < 0");
+ }
+ if (length < 0) {
+ throw new Error("length < 0");
+ }
+ return { start: start, length: length };
+ }
+ ts.createTextSpan = createTextSpan;
+ function createTextSpanFromBounds(start, end) {
+ return createTextSpan(start, end - start);
+ }
+ ts.createTextSpanFromBounds = createTextSpanFromBounds;
+ function textChangeRangeNewSpan(range) {
+ return createTextSpan(range.span.start, range.newLength);
+ }
+ ts.textChangeRangeNewSpan = textChangeRangeNewSpan;
+ function textChangeRangeIsUnchanged(range) {
+ return textSpanIsEmpty(range.span) && range.newLength === 0;
+ }
+ ts.textChangeRangeIsUnchanged = textChangeRangeIsUnchanged;
+ function createTextChangeRange(span, newLength) {
+ if (newLength < 0) {
+ throw new Error("newLength < 0");
+ }
+ return { span: span, newLength: newLength };
+ }
+ ts.createTextChangeRange = createTextChangeRange;
+ ts.unchangedTextChangeRange = createTextChangeRange(createTextSpan(0, 0), 0);
+ /**
+ * Called to merge all the changes that occurred across several versions of a script snapshot
+ * into a single change. i.e. if a user keeps making successive edits to a script we will
+ * have a text change from V1 to V2, V2 to V3, ..., Vn.
+ *
+ * This function will then merge those changes into a single change range valid between V1 and
+ * Vn.
+ */
+ function collapseTextChangeRangesAcrossMultipleVersions(changes) {
+ if (changes.length === 0) {
+ return ts.unchangedTextChangeRange;
+ }
+ if (changes.length === 1) {
+ return changes[0];
+ }
+ // We change from talking about { { oldStart, oldLength }, newLength } to { oldStart, oldEnd, newEnd }
+ // as it makes things much easier to reason about.
+ var change0 = changes[0];
+ var oldStartN = change0.span.start;
+ var oldEndN = textSpanEnd(change0.span);
+ var newEndN = oldStartN + change0.newLength;
+ for (var i = 1; i < changes.length; i++) {
+ var nextChange = changes[i];
+ // Consider the following case:
+ // i.e. two edits. The first represents the text change range { { 10, 50 }, 30 }. i.e. The span starting
+ // at 10, with length 50 is reduced to length 30. The second represents the text change range { { 30, 30 }, 40 }.
+ // i.e. the span starting at 30 with length 30 is increased to length 40.
+ //
+ // 0 10 20 30 40 50 60 70 80 90 100
+ // -------------------------------------------------------------------------------------------------------
+ // | /
+ // | /----
+ // T1 | /----
+ // | /----
+ // | /----
+ // -------------------------------------------------------------------------------------------------------
+ // | \
+ // | \
+ // T2 | \
+ // | \
+ // | \
+ // -------------------------------------------------------------------------------------------------------
+ //
+ // Merging these turns out to not be too difficult. First, determining the new start of the change is trivial
+ // it's just the min of the old and new starts. i.e.:
+ //
+ // 0 10 20 30 40 50 60 70 80 90 100
+ // ------------------------------------------------------------*------------------------------------------
+ // | /
+ // | /----
+ // T1 | /----
+ // | /----
+ // | /----
+ // ----------------------------------------$-------------------$------------------------------------------
+ // . | \
+ // . | \
+ // T2 . | \
+ // . | \
+ // . | \
+ // ----------------------------------------------------------------------*--------------------------------
+ //
+ // (Note the dots represent the newly inferred start.
+ // Determining the new and old end is also pretty simple. Basically it boils down to paying attention to the
+ // absolute positions at the asterisks, and the relative change between the dollar signs. Basically, we see
+ // which if the two $'s precedes the other, and we move that one forward until they line up. in this case that
+ // means:
+ //
+ // 0 10 20 30 40 50 60 70 80 90 100
+ // --------------------------------------------------------------------------------*----------------------
+ // | /
+ // | /----
+ // T1 | /----
+ // | /----
+ // | /----
+ // ------------------------------------------------------------$------------------------------------------
+ // . | \
+ // . | \
+ // T2 . | \
+ // . | \
+ // . | \
+ // ----------------------------------------------------------------------*--------------------------------
+ //
+ // In other words (in this case), we're recognizing that the second edit happened after where the first edit
+ // ended with a delta of 20 characters (60 - 40). Thus, if we go back in time to where the first edit started
+ // that's the same as if we started at char 80 instead of 60.
+ //
+ // As it so happens, the same logic applies if the second edit precedes the first edit. In that case rather
+ // than pushing the first edit forward to match the second, we'll push the second edit forward to match the
+ // first.
+ //
+ // In this case that means we have { oldStart: 10, oldEnd: 80, newEnd: 70 } or, in TextChangeRange
+ // semantics: { { start: 10, length: 70 }, newLength: 60 }
+ //
+ // The math then works out as follows.
+ // If we have { oldStart1, oldEnd1, newEnd1 } and { oldStart2, oldEnd2, newEnd2 } then we can compute the
+ // final result like so:
+ //
+ // {
+ // oldStart3: Min(oldStart1, oldStart2),
+ // oldEnd3 : Max(oldEnd1, oldEnd1 + (oldEnd2 - newEnd1)),
+ // newEnd3 : Max(newEnd2, newEnd2 + (newEnd1 - oldEnd2))
+ // }
+ var oldStart1 = oldStartN;
+ var oldEnd1 = oldEndN;
+ var newEnd1 = newEndN;
+ var oldStart2 = nextChange.span.start;
+ var oldEnd2 = textSpanEnd(nextChange.span);
+ var newEnd2 = oldStart2 + nextChange.newLength;
+ oldStartN = Math.min(oldStart1, oldStart2);
+ oldEndN = Math.max(oldEnd1, oldEnd1 + (oldEnd2 - newEnd1));
+ newEndN = Math.max(newEnd2, newEnd2 + (newEnd1 - oldEnd2));
+ }
+ return createTextChangeRange(createTextSpanFromBounds(oldStartN, oldEndN), /*newLength*/ newEndN - oldStartN);
+ }
+ ts.collapseTextChangeRangesAcrossMultipleVersions = collapseTextChangeRangesAcrossMultipleVersions;
+ function getTypeParameterOwner(d) {
+ if (d && d.kind === 145 /* TypeParameter */) {
+ for (var current = d; current; current = current.parent) {
+ if (ts.isFunctionLike(current) || ts.isClassLike(current) || current.kind === 230 /* InterfaceDeclaration */) {
+ return current;
+ }
+ }
+ }
+ }
+ ts.getTypeParameterOwner = getTypeParameterOwner;
+ function isParameterPropertyDeclaration(node) {
+ return ts.hasModifier(node, 92 /* ParameterPropertyModifier */) && node.parent.kind === 152 /* Constructor */ && ts.isClassLike(node.parent.parent);
+ }
+ ts.isParameterPropertyDeclaration = isParameterPropertyDeclaration;
+ function walkUpBindingElementsAndPatterns(node) {
+ while (node && (node.kind === 176 /* BindingElement */ || ts.isBindingPattern(node))) {
+ node = node.parent;
+ }
+ return node;
+ }
+ function getCombinedModifierFlags(node) {
+ node = walkUpBindingElementsAndPatterns(node);
+ var flags = ts.getModifierFlags(node);
+ if (node.kind === 226 /* VariableDeclaration */) {
+ node = node.parent;
+ }
+ if (node && node.kind === 227 /* VariableDeclarationList */) {
+ flags |= ts.getModifierFlags(node);
+ node = node.parent;
+ }
+ if (node && node.kind === 208 /* VariableStatement */) {
+ flags |= ts.getModifierFlags(node);
+ }
+ return flags;
+ }
+ ts.getCombinedModifierFlags = getCombinedModifierFlags;
+ // Returns the node flags for this node and all relevant parent nodes. This is done so that
+ // nodes like variable declarations and binding elements can returned a view of their flags
+ // that includes the modifiers from their container. i.e. flags like export/declare aren't
+ // stored on the variable declaration directly, but on the containing variable statement
+ // (if it has one). Similarly, flags for let/const are store on the variable declaration
+ // list. By calling this function, all those flags are combined so that the client can treat
+ // the node as if it actually had those flags.
+ function getCombinedNodeFlags(node) {
+ node = walkUpBindingElementsAndPatterns(node);
+ var flags = node.flags;
+ if (node.kind === 226 /* VariableDeclaration */) {
+ node = node.parent;
+ }
+ if (node && node.kind === 227 /* VariableDeclarationList */) {
+ flags |= node.flags;
+ node = node.parent;
+ }
+ if (node && node.kind === 208 /* 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.
+ */
+ function validateLocaleAndSetLanguage(locale, sys, errors) {
+ var matchResult = /^([a-z]+)([_\-]([a-z]+))?$/.exec(locale.toLowerCase());
+ if (!matchResult) {
+ if (errors) {
+ errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1, "en", "ja-jp"));
+ }
+ return;
+ }
+ var language = matchResult[1];
+ var territory = matchResult[3];
+ // First try the entire locale, then fall back to just language if that's all we have.
+ // Either ways do not fail, and fallback to the English diagnostic strings.
+ if (!trySetLanguageAndTerritory(language, territory, errors)) {
+ trySetLanguageAndTerritory(language, /*territory*/ undefined, errors);
+ }
+ function trySetLanguageAndTerritory(language, territory, errors) {
+ var compilerFilePath = ts.normalizePath(sys.getExecutingFilePath());
+ var containingDirectoryPath = ts.getDirectoryPath(compilerFilePath);
+ var filePath = ts.combinePaths(containingDirectoryPath, language);
+ if (territory) {
+ filePath = filePath + "-" + territory;
+ }
+ filePath = sys.resolvePath(ts.combinePaths(filePath, "diagnosticMessages.generated.json"));
+ if (!sys.fileExists(filePath)) {
+ return false;
+ }
+ // TODO: Add codePage support for readFile?
+ var fileContents = "";
+ try {
+ fileContents = sys.readFile(filePath);
+ }
+ catch (e) {
+ if (errors) {
+ errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Unable_to_open_file_0, filePath));
+ }
+ return false;
+ }
+ try {
+ ts.localizedDiagnosticMessages = JSON.parse(fileContents);
+ }
+ catch (e) {
+ if (errors) {
+ errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Corrupted_locale_file_0, filePath));
+ }
+ return false;
+ }
+ return true;
+ }
+ }
+ 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;
+ function getNameOfDeclaration(declaration) {
+ if (!declaration) {
+ return undefined;
+ }
+ if (declaration.kind === 194 /* BinaryExpression */) {
+ var expr = declaration;
+ switch (ts.getSpecialPropertyAssignmentKind(expr)) {
+ case 1 /* ExportsProperty */:
+ case 4 /* ThisProperty */:
+ case 5 /* Property */:
+ case 3 /* PrototypeProperty */:
+ return expr.left.name;
+ default:
+ return undefined;
+ }
+ }
+ else {
+ return declaration.name;
+ }
+ }
+ ts.getNameOfDeclaration = getNameOfDeclaration;
+})(ts || (ts = {}));
+// Simple node tests of the form `node.kind === SyntaxKind.Foo`.
+(function (ts) {
+ // Literals
+ function isNumericLiteral(node) {
+ return node.kind === 8 /* NumericLiteral */;
+ }
+ ts.isNumericLiteral = isNumericLiteral;
+ function isStringLiteral(node) {
+ return node.kind === 9 /* StringLiteral */;
+ }
+ ts.isStringLiteral = isStringLiteral;
+ function isJsxText(node) {
+ return node.kind === 10 /* JsxText */;
+ }
+ ts.isJsxText = isJsxText;
+ function isRegularExpressionLiteral(node) {
+ return node.kind === 12 /* RegularExpressionLiteral */;
+ }
+ ts.isRegularExpressionLiteral = isRegularExpressionLiteral;
+ function isNoSubstitutionTemplateLiteral(node) {
+ return node.kind === 13 /* NoSubstitutionTemplateLiteral */;
+ }
+ ts.isNoSubstitutionTemplateLiteral = isNoSubstitutionTemplateLiteral;
+ // Pseudo-literals
+ function isTemplateHead(node) {
+ return node.kind === 14 /* TemplateHead */;
+ }
+ ts.isTemplateHead = isTemplateHead;
+ function isTemplateMiddle(node) {
+ return node.kind === 15 /* TemplateMiddle */;
+ }
+ ts.isTemplateMiddle = isTemplateMiddle;
+ function isTemplateTail(node) {
+ return node.kind === 16 /* TemplateTail */;
+ }
+ ts.isTemplateTail = isTemplateTail;
+ function isIdentifier(node) {
+ return node.kind === 71 /* Identifier */;
+ }
+ ts.isIdentifier = isIdentifier;
+ // Names
+ function isQualifiedName(node) {
+ return node.kind === 143 /* QualifiedName */;
+ }
+ ts.isQualifiedName = isQualifiedName;
+ function isComputedPropertyName(node) {
+ return node.kind === 144 /* ComputedPropertyName */;
+ }
+ ts.isComputedPropertyName = isComputedPropertyName;
+ // Signature elements
+ function isTypeParameterDeclaration(node) {
+ return node.kind === 145 /* TypeParameter */;
+ }
+ ts.isTypeParameterDeclaration = isTypeParameterDeclaration;
+ function isParameter(node) {
+ return node.kind === 146 /* Parameter */;
+ }
+ ts.isParameter = isParameter;
+ function isDecorator(node) {
+ return node.kind === 147 /* Decorator */;
+ }
+ ts.isDecorator = isDecorator;
+ // TypeMember
+ function isPropertySignature(node) {
+ return node.kind === 148 /* PropertySignature */;
+ }
+ ts.isPropertySignature = isPropertySignature;
+ function isPropertyDeclaration(node) {
+ return node.kind === 149 /* PropertyDeclaration */;
+ }
+ ts.isPropertyDeclaration = isPropertyDeclaration;
+ function isMethodSignature(node) {
+ return node.kind === 150 /* MethodSignature */;
+ }
+ ts.isMethodSignature = isMethodSignature;
+ function isMethodDeclaration(node) {
+ return node.kind === 151 /* MethodDeclaration */;
+ }
+ ts.isMethodDeclaration = isMethodDeclaration;
+ function isConstructorDeclaration(node) {
+ return node.kind === 152 /* Constructor */;
+ }
+ ts.isConstructorDeclaration = isConstructorDeclaration;
+ function isGetAccessorDeclaration(node) {
+ return node.kind === 153 /* GetAccessor */;
+ }
+ ts.isGetAccessorDeclaration = isGetAccessorDeclaration;
+ function isSetAccessorDeclaration(node) {
+ return node.kind === 154 /* SetAccessor */;
+ }
+ ts.isSetAccessorDeclaration = isSetAccessorDeclaration;
+ function isCallSignatureDeclaration(node) {
+ return node.kind === 155 /* CallSignature */;
+ }
+ ts.isCallSignatureDeclaration = isCallSignatureDeclaration;
+ function isConstructSignatureDeclaration(node) {
+ return node.kind === 156 /* ConstructSignature */;
+ }
+ ts.isConstructSignatureDeclaration = isConstructSignatureDeclaration;
+ function isIndexSignatureDeclaration(node) {
+ return node.kind === 157 /* IndexSignature */;
+ }
+ ts.isIndexSignatureDeclaration = isIndexSignatureDeclaration;
+ // Type
+ function isTypePredicateNode(node) {
+ return node.kind === 158 /* TypePredicate */;
+ }
+ ts.isTypePredicateNode = isTypePredicateNode;
+ function isTypeReferenceNode(node) {
+ return node.kind === 159 /* TypeReference */;
+ }
+ ts.isTypeReferenceNode = isTypeReferenceNode;
+ function isFunctionTypeNode(node) {
+ return node.kind === 160 /* FunctionType */;
+ }
+ ts.isFunctionTypeNode = isFunctionTypeNode;
+ function isConstructorTypeNode(node) {
+ return node.kind === 161 /* ConstructorType */;
+ }
+ ts.isConstructorTypeNode = isConstructorTypeNode;
+ function isTypeQueryNode(node) {
+ return node.kind === 162 /* TypeQuery */;
+ }
+ ts.isTypeQueryNode = isTypeQueryNode;
+ function isTypeLiteralNode(node) {
+ return node.kind === 163 /* TypeLiteral */;
+ }
+ ts.isTypeLiteralNode = isTypeLiteralNode;
+ function isArrayTypeNode(node) {
+ return node.kind === 164 /* ArrayType */;
+ }
+ ts.isArrayTypeNode = isArrayTypeNode;
+ function isTupleTypeNode(node) {
+ return node.kind === 165 /* TupleType */;
+ }
+ ts.isTupleTypeNode = isTupleTypeNode;
+ function isUnionTypeNode(node) {
+ return node.kind === 166 /* UnionType */;
+ }
+ ts.isUnionTypeNode = isUnionTypeNode;
+ function isIntersectionTypeNode(node) {
+ return node.kind === 167 /* IntersectionType */;
+ }
+ ts.isIntersectionTypeNode = isIntersectionTypeNode;
+ function isParenthesizedTypeNode(node) {
+ return node.kind === 168 /* ParenthesizedType */;
+ }
+ ts.isParenthesizedTypeNode = isParenthesizedTypeNode;
+ function isThisTypeNode(node) {
+ return node.kind === 169 /* ThisType */;
+ }
+ ts.isThisTypeNode = isThisTypeNode;
+ function isTypeOperatorNode(node) {
+ return node.kind === 170 /* TypeOperator */;
+ }
+ ts.isTypeOperatorNode = isTypeOperatorNode;
+ function isIndexedAccessTypeNode(node) {
+ return node.kind === 171 /* IndexedAccessType */;
+ }
+ ts.isIndexedAccessTypeNode = isIndexedAccessTypeNode;
+ function isMappedTypeNode(node) {
+ return node.kind === 172 /* MappedType */;
+ }
+ ts.isMappedTypeNode = isMappedTypeNode;
+ function isLiteralTypeNode(node) {
+ return node.kind === 173 /* LiteralType */;
+ }
+ ts.isLiteralTypeNode = isLiteralTypeNode;
+ // Binding patterns
+ function isObjectBindingPattern(node) {
+ return node.kind === 174 /* ObjectBindingPattern */;
+ }
+ ts.isObjectBindingPattern = isObjectBindingPattern;
+ function isArrayBindingPattern(node) {
+ return node.kind === 175 /* ArrayBindingPattern */;
+ }
+ ts.isArrayBindingPattern = isArrayBindingPattern;
+ function isBindingElement(node) {
+ return node.kind === 176 /* BindingElement */;
+ }
+ ts.isBindingElement = isBindingElement;
+ // Expression
+ function isArrayLiteralExpression(node) {
+ return node.kind === 177 /* ArrayLiteralExpression */;
+ }
+ ts.isArrayLiteralExpression = isArrayLiteralExpression;
+ function isObjectLiteralExpression(node) {
+ return node.kind === 178 /* ObjectLiteralExpression */;
+ }
+ ts.isObjectLiteralExpression = isObjectLiteralExpression;
+ function isPropertyAccessExpression(node) {
+ return node.kind === 179 /* PropertyAccessExpression */;
+ }
+ ts.isPropertyAccessExpression = isPropertyAccessExpression;
+ function isElementAccessExpression(node) {
+ return node.kind === 180 /* ElementAccessExpression */;
+ }
+ ts.isElementAccessExpression = isElementAccessExpression;
+ function isCallExpression(node) {
+ return node.kind === 181 /* CallExpression */;
+ }
+ ts.isCallExpression = isCallExpression;
+ function isNewExpression(node) {
+ return node.kind === 182 /* NewExpression */;
+ }
+ ts.isNewExpression = isNewExpression;
+ function isTaggedTemplateExpression(node) {
+ return node.kind === 183 /* TaggedTemplateExpression */;
+ }
+ ts.isTaggedTemplateExpression = isTaggedTemplateExpression;
+ function isTypeAssertion(node) {
+ return node.kind === 184 /* TypeAssertionExpression */;
+ }
+ ts.isTypeAssertion = isTypeAssertion;
+ function isParenthesizedExpression(node) {
+ return node.kind === 185 /* ParenthesizedExpression */;
+ }
+ ts.isParenthesizedExpression = isParenthesizedExpression;
+ function isFunctionExpression(node) {
+ return node.kind === 186 /* FunctionExpression */;
+ }
+ ts.isFunctionExpression = isFunctionExpression;
+ function isArrowFunction(node) {
+ return node.kind === 187 /* ArrowFunction */;
+ }
+ ts.isArrowFunction = isArrowFunction;
+ function isDeleteExpression(node) {
+ return node.kind === 188 /* DeleteExpression */;
+ }
+ ts.isDeleteExpression = isDeleteExpression;
+ function isTypeOfExpression(node) {
+ return node.kind === 191 /* AwaitExpression */;
+ }
+ ts.isTypeOfExpression = isTypeOfExpression;
+ function isVoidExpression(node) {
+ return node.kind === 190 /* VoidExpression */;
+ }
+ ts.isVoidExpression = isVoidExpression;
+ function isAwaitExpression(node) {
+ return node.kind === 191 /* AwaitExpression */;
+ }
+ ts.isAwaitExpression = isAwaitExpression;
+ function isPrefixUnaryExpression(node) {
+ return node.kind === 192 /* PrefixUnaryExpression */;
+ }
+ ts.isPrefixUnaryExpression = isPrefixUnaryExpression;
+ function isPostfixUnaryExpression(node) {
+ return node.kind === 193 /* PostfixUnaryExpression */;
+ }
+ ts.isPostfixUnaryExpression = isPostfixUnaryExpression;
+ function isBinaryExpression(node) {
+ return node.kind === 194 /* BinaryExpression */;
+ }
+ ts.isBinaryExpression = isBinaryExpression;
+ function isConditionalExpression(node) {
+ return node.kind === 195 /* ConditionalExpression */;
+ }
+ ts.isConditionalExpression = isConditionalExpression;
+ function isTemplateExpression(node) {
+ return node.kind === 196 /* TemplateExpression */;
+ }
+ ts.isTemplateExpression = isTemplateExpression;
+ function isYieldExpression(node) {
+ return node.kind === 197 /* YieldExpression */;
+ }
+ ts.isYieldExpression = isYieldExpression;
+ function isSpreadElement(node) {
+ return node.kind === 198 /* SpreadElement */;
+ }
+ ts.isSpreadElement = isSpreadElement;
+ function isClassExpression(node) {
+ return node.kind === 199 /* ClassExpression */;
+ }
+ ts.isClassExpression = isClassExpression;
+ function isOmittedExpression(node) {
+ return node.kind === 200 /* OmittedExpression */;
+ }
+ ts.isOmittedExpression = isOmittedExpression;
+ function isExpressionWithTypeArguments(node) {
+ return node.kind === 201 /* ExpressionWithTypeArguments */;
+ }
+ ts.isExpressionWithTypeArguments = isExpressionWithTypeArguments;
+ function isAsExpression(node) {
+ return node.kind === 202 /* AsExpression */;
+ }
+ ts.isAsExpression = isAsExpression;
+ function isNonNullExpression(node) {
+ return node.kind === 203 /* NonNullExpression */;
+ }
+ ts.isNonNullExpression = isNonNullExpression;
+ function isMetaProperty(node) {
+ return node.kind === 204 /* MetaProperty */;
+ }
+ ts.isMetaProperty = isMetaProperty;
+ // Misc
+ function isTemplateSpan(node) {
+ return node.kind === 205 /* TemplateSpan */;
+ }
+ ts.isTemplateSpan = isTemplateSpan;
+ function isSemicolonClassElement(node) {
+ return node.kind === 206 /* SemicolonClassElement */;
+ }
+ ts.isSemicolonClassElement = isSemicolonClassElement;
+ // Block
+ function isBlock(node) {
+ return node.kind === 207 /* Block */;
+ }
+ ts.isBlock = isBlock;
+ function isVariableStatement(node) {
+ return node.kind === 208 /* VariableStatement */;
+ }
+ ts.isVariableStatement = isVariableStatement;
+ function isEmptyStatement(node) {
+ return node.kind === 209 /* EmptyStatement */;
+ }
+ ts.isEmptyStatement = isEmptyStatement;
+ function isExpressionStatement(node) {
+ return node.kind === 210 /* ExpressionStatement */;
+ }
+ ts.isExpressionStatement = isExpressionStatement;
+ function isIfStatement(node) {
+ return node.kind === 211 /* IfStatement */;
+ }
+ ts.isIfStatement = isIfStatement;
+ function isDoStatement(node) {
+ return node.kind === 212 /* DoStatement */;
+ }
+ ts.isDoStatement = isDoStatement;
+ function isWhileStatement(node) {
+ return node.kind === 213 /* WhileStatement */;
+ }
+ ts.isWhileStatement = isWhileStatement;
+ function isForStatement(node) {
+ return node.kind === 214 /* ForStatement */;
+ }
+ ts.isForStatement = isForStatement;
+ function isForInStatement(node) {
+ return node.kind === 215 /* ForInStatement */;
+ }
+ ts.isForInStatement = isForInStatement;
+ function isForOfStatement(node) {
+ return node.kind === 216 /* ForOfStatement */;
+ }
+ ts.isForOfStatement = isForOfStatement;
+ function isContinueStatement(node) {
+ return node.kind === 217 /* ContinueStatement */;
+ }
+ ts.isContinueStatement = isContinueStatement;
+ function isBreakStatement(node) {
+ return node.kind === 218 /* BreakStatement */;
+ }
+ ts.isBreakStatement = isBreakStatement;
+ function isReturnStatement(node) {
+ return node.kind === 219 /* ReturnStatement */;
+ }
+ ts.isReturnStatement = isReturnStatement;
+ function isWithStatement(node) {
+ return node.kind === 220 /* WithStatement */;
+ }
+ ts.isWithStatement = isWithStatement;
+ function isSwitchStatement(node) {
+ return node.kind === 221 /* SwitchStatement */;
+ }
+ ts.isSwitchStatement = isSwitchStatement;
+ function isLabeledStatement(node) {
+ return node.kind === 222 /* LabeledStatement */;
+ }
+ ts.isLabeledStatement = isLabeledStatement;
+ function isThrowStatement(node) {
+ return node.kind === 223 /* ThrowStatement */;
+ }
+ ts.isThrowStatement = isThrowStatement;
+ function isTryStatement(node) {
+ return node.kind === 224 /* TryStatement */;
+ }
+ ts.isTryStatement = isTryStatement;
+ function isDebuggerStatement(node) {
+ return node.kind === 225 /* DebuggerStatement */;
+ }
+ ts.isDebuggerStatement = isDebuggerStatement;
+ function isVariableDeclaration(node) {
+ return node.kind === 226 /* VariableDeclaration */;
+ }
+ ts.isVariableDeclaration = isVariableDeclaration;
+ function isVariableDeclarationList(node) {
+ return node.kind === 227 /* VariableDeclarationList */;
+ }
+ ts.isVariableDeclarationList = isVariableDeclarationList;
+ function isFunctionDeclaration(node) {
+ return node.kind === 228 /* FunctionDeclaration */;
+ }
+ ts.isFunctionDeclaration = isFunctionDeclaration;
+ function isClassDeclaration(node) {
+ return node.kind === 229 /* ClassDeclaration */;
+ }
+ ts.isClassDeclaration = isClassDeclaration;
+ function isInterfaceDeclaration(node) {
+ return node.kind === 230 /* InterfaceDeclaration */;
+ }
+ ts.isInterfaceDeclaration = isInterfaceDeclaration;
+ function isTypeAliasDeclaration(node) {
+ return node.kind === 231 /* TypeAliasDeclaration */;
+ }
+ ts.isTypeAliasDeclaration = isTypeAliasDeclaration;
+ function isEnumDeclaration(node) {
+ return node.kind === 232 /* EnumDeclaration */;
+ }
+ ts.isEnumDeclaration = isEnumDeclaration;
+ function isModuleDeclaration(node) {
+ return node.kind === 233 /* ModuleDeclaration */;
+ }
+ ts.isModuleDeclaration = isModuleDeclaration;
+ function isModuleBlock(node) {
+ return node.kind === 234 /* ModuleBlock */;
+ }
+ ts.isModuleBlock = isModuleBlock;
+ function isCaseBlock(node) {
+ return node.kind === 235 /* CaseBlock */;
+ }
+ ts.isCaseBlock = isCaseBlock;
+ function isNamespaceExportDeclaration(node) {
+ return node.kind === 236 /* NamespaceExportDeclaration */;
+ }
+ ts.isNamespaceExportDeclaration = isNamespaceExportDeclaration;
+ function isImportEqualsDeclaration(node) {
+ return node.kind === 237 /* ImportEqualsDeclaration */;
+ }
+ ts.isImportEqualsDeclaration = isImportEqualsDeclaration;
+ function isImportDeclaration(node) {
+ return node.kind === 238 /* ImportDeclaration */;
+ }
+ ts.isImportDeclaration = isImportDeclaration;
+ function isImportClause(node) {
+ return node.kind === 239 /* ImportClause */;
+ }
+ ts.isImportClause = isImportClause;
+ function isNamespaceImport(node) {
+ return node.kind === 240 /* NamespaceImport */;
+ }
+ ts.isNamespaceImport = isNamespaceImport;
+ function isNamedImports(node) {
+ return node.kind === 241 /* NamedImports */;
+ }
+ ts.isNamedImports = isNamedImports;
+ function isImportSpecifier(node) {
+ return node.kind === 242 /* ImportSpecifier */;
+ }
+ ts.isImportSpecifier = isImportSpecifier;
+ function isExportAssignment(node) {
+ return node.kind === 243 /* ExportAssignment */;
+ }
+ ts.isExportAssignment = isExportAssignment;
+ function isExportDeclaration(node) {
+ return node.kind === 244 /* ExportDeclaration */;
+ }
+ ts.isExportDeclaration = isExportDeclaration;
+ function isNamedExports(node) {
+ return node.kind === 245 /* NamedExports */;
+ }
+ ts.isNamedExports = isNamedExports;
+ function isExportSpecifier(node) {
+ return node.kind === 246 /* ExportSpecifier */;
+ }
+ ts.isExportSpecifier = isExportSpecifier;
+ function isMissingDeclaration(node) {
+ return node.kind === 247 /* MissingDeclaration */;
+ }
+ ts.isMissingDeclaration = isMissingDeclaration;
+ // Module References
+ function isExternalModuleReference(node) {
+ return node.kind === 248 /* ExternalModuleReference */;
+ }
+ ts.isExternalModuleReference = isExternalModuleReference;
+ // JSX
+ function isJsxElement(node) {
+ return node.kind === 249 /* JsxElement */;
+ }
+ ts.isJsxElement = isJsxElement;
+ function isJsxSelfClosingElement(node) {
+ return node.kind === 250 /* JsxSelfClosingElement */;
+ }
+ ts.isJsxSelfClosingElement = isJsxSelfClosingElement;
+ function isJsxOpeningElement(node) {
+ return node.kind === 251 /* JsxOpeningElement */;
+ }
+ ts.isJsxOpeningElement = isJsxOpeningElement;
+ function isJsxClosingElement(node) {
+ return node.kind === 252 /* JsxClosingElement */;
+ }
+ ts.isJsxClosingElement = isJsxClosingElement;
+ function isJsxAttribute(node) {
+ return node.kind === 253 /* JsxAttribute */;
+ }
+ ts.isJsxAttribute = isJsxAttribute;
+ function isJsxAttributes(node) {
+ return node.kind === 254 /* JsxAttributes */;
+ }
+ ts.isJsxAttributes = isJsxAttributes;
+ function isJsxSpreadAttribute(node) {
+ return node.kind === 255 /* JsxSpreadAttribute */;
+ }
+ ts.isJsxSpreadAttribute = isJsxSpreadAttribute;
+ function isJsxExpression(node) {
+ return node.kind === 256 /* JsxExpression */;
+ }
+ ts.isJsxExpression = isJsxExpression;
+ // Clauses
+ function isCaseClause(node) {
+ return node.kind === 257 /* CaseClause */;
+ }
+ ts.isCaseClause = isCaseClause;
+ function isDefaultClause(node) {
+ return node.kind === 258 /* DefaultClause */;
+ }
+ ts.isDefaultClause = isDefaultClause;
+ function isHeritageClause(node) {
+ return node.kind === 259 /* HeritageClause */;
+ }
+ ts.isHeritageClause = isHeritageClause;
+ function isCatchClause(node) {
+ return node.kind === 260 /* CatchClause */;
+ }
+ ts.isCatchClause = isCatchClause;
+ // Property assignments
+ function isPropertyAssignment(node) {
+ return node.kind === 261 /* PropertyAssignment */;
+ }
+ ts.isPropertyAssignment = isPropertyAssignment;
+ function isShorthandPropertyAssignment(node) {
+ return node.kind === 262 /* ShorthandPropertyAssignment */;
+ }
+ ts.isShorthandPropertyAssignment = isShorthandPropertyAssignment;
+ function isSpreadAssignment(node) {
+ return node.kind === 263 /* SpreadAssignment */;
+ }
+ ts.isSpreadAssignment = isSpreadAssignment;
+ // Enum
+ function isEnumMember(node) {
+ return node.kind === 264 /* EnumMember */;
+ }
+ ts.isEnumMember = isEnumMember;
+ // Top-level nodes
+ function isSourceFile(node) {
+ return node.kind === 265 /* SourceFile */;
+ }
+ ts.isSourceFile = isSourceFile;
+ function isBundle(node) {
+ return node.kind === 266 /* Bundle */;
+ }
+ ts.isBundle = isBundle;
+ // JSDoc
+ function isJSDocTypeExpression(node) {
+ return node.kind === 267 /* JSDocTypeExpression */;
+ }
+ ts.isJSDocTypeExpression = isJSDocTypeExpression;
+ function isJSDocAllType(node) {
+ return node.kind === 268 /* JSDocAllType */;
+ }
+ ts.isJSDocAllType = isJSDocAllType;
+ function isJSDocUnknownType(node) {
+ return node.kind === 269 /* JSDocUnknownType */;
+ }
+ ts.isJSDocUnknownType = isJSDocUnknownType;
+ function isJSDocArrayType(node) {
+ return node.kind === 270 /* JSDocArrayType */;
+ }
+ ts.isJSDocArrayType = isJSDocArrayType;
+ function isJSDocUnionType(node) {
+ return node.kind === 271 /* JSDocUnionType */;
+ }
+ ts.isJSDocUnionType = isJSDocUnionType;
+ function isJSDocTupleType(node) {
+ return node.kind === 272 /* JSDocTupleType */;
+ }
+ ts.isJSDocTupleType = isJSDocTupleType;
+ function isJSDocNullableType(node) {
+ return node.kind === 273 /* JSDocNullableType */;
+ }
+ ts.isJSDocNullableType = isJSDocNullableType;
+ function isJSDocNonNullableType(node) {
+ return node.kind === 274 /* JSDocNonNullableType */;
+ }
+ ts.isJSDocNonNullableType = isJSDocNonNullableType;
+ function isJSDocRecordType(node) {
+ return node.kind === 275 /* JSDocRecordType */;
+ }
+ ts.isJSDocRecordType = isJSDocRecordType;
+ function isJSDocRecordMember(node) {
+ return node.kind === 276 /* JSDocRecordMember */;
+ }
+ ts.isJSDocRecordMember = isJSDocRecordMember;
+ function isJSDocTypeReference(node) {
+ return node.kind === 277 /* JSDocTypeReference */;
+ }
+ ts.isJSDocTypeReference = isJSDocTypeReference;
+ function isJSDocOptionalType(node) {
+ return node.kind === 278 /* JSDocOptionalType */;
+ }
+ ts.isJSDocOptionalType = isJSDocOptionalType;
+ function isJSDocFunctionType(node) {
+ return node.kind === 279 /* JSDocFunctionType */;
+ }
+ ts.isJSDocFunctionType = isJSDocFunctionType;
+ function isJSDocVariadicType(node) {
+ return node.kind === 280 /* JSDocVariadicType */;
+ }
+ ts.isJSDocVariadicType = isJSDocVariadicType;
+ function isJSDocConstructorType(node) {
+ return node.kind === 281 /* JSDocConstructorType */;
+ }
+ ts.isJSDocConstructorType = isJSDocConstructorType;
+ function isJSDocThisType(node) {
+ return node.kind === 282 /* JSDocThisType */;
+ }
+ ts.isJSDocThisType = isJSDocThisType;
+ function isJSDoc(node) {
+ return node.kind === 283 /* JSDocComment */;
+ }
+ ts.isJSDoc = isJSDoc;
+ function isJSDocAugmentsTag(node) {
+ return node.kind === 285 /* JSDocAugmentsTag */;
+ }
+ ts.isJSDocAugmentsTag = isJSDocAugmentsTag;
+ function isJSDocParameterTag(node) {
+ return node.kind === 287 /* JSDocParameterTag */;
+ }
+ ts.isJSDocParameterTag = isJSDocParameterTag;
+ function isJSDocReturnTag(node) {
+ return node.kind === 288 /* JSDocReturnTag */;
+ }
+ ts.isJSDocReturnTag = isJSDocReturnTag;
+ function isJSDocTypeTag(node) {
+ return node.kind === 289 /* JSDocTypeTag */;
+ }
+ ts.isJSDocTypeTag = isJSDocTypeTag;
+ function isJSDocTemplateTag(node) {
+ return node.kind === 290 /* JSDocTemplateTag */;
+ }
+ ts.isJSDocTemplateTag = isJSDocTemplateTag;
+ function isJSDocTypedefTag(node) {
+ return node.kind === 291 /* JSDocTypedefTag */;
+ }
+ ts.isJSDocTypedefTag = isJSDocTypedefTag;
+ function isJSDocPropertyTag(node) {
+ return node.kind === 292 /* JSDocPropertyTag */;
+ }
+ ts.isJSDocPropertyTag = isJSDocPropertyTag;
+ function isJSDocTypeLiteral(node) {
+ return node.kind === 293 /* JSDocTypeLiteral */;
+ }
+ ts.isJSDocTypeLiteral = isJSDocTypeLiteral;
+ function isJSDocLiteralType(node) {
+ return node.kind === 294 /* JSDocLiteralType */;
+ }
+ ts.isJSDocLiteralType = isJSDocLiteralType;
+})(ts || (ts = {}));
+// Node tests
+//
+// All node tests in the following list should *not* reference parent pointers so that
+// they may be used with transformations.
+(function (ts) {
+ /* @internal */
+ function isNode(node) {
+ return isNodeKind(node.kind);
+ }
+ ts.isNode = isNode;
+ /* @internal */
+ function isNodeKind(kind) {
+ return kind >= 143 /* FirstNode */;
+ }
+ ts.isNodeKind = isNodeKind;
+ /**
+ * True if node is of some token syntax kind.
+ * For example, this is true for an IfKeyword but not for an IfStatement.
+ */
+ function isToken(n) {
+ return n.kind >= 0 /* FirstToken */ && n.kind <= 142 /* LastToken */;
+ }
+ ts.isToken = isToken;
// Node Arrays
+ /* @internal */
function isNodeArray(array) {
return array.hasOwnProperty("pos")
&& array.hasOwnProperty("end");
}
ts.isNodeArray = isNodeArray;
// Literals
- function isNoSubstitutionTemplateLiteral(node) {
- return node.kind === 13 /* NoSubstitutionTemplateLiteral */;
- }
- ts.isNoSubstitutionTemplateLiteral = isNoSubstitutionTemplateLiteral;
+ /* @internal */
function isLiteralKind(kind) {
return 8 /* FirstLiteralToken */ <= kind && kind <= 13 /* LastLiteralToken */;
}
ts.isLiteralKind = isLiteralKind;
- function isTextualLiteralKind(kind) {
- return kind === 9 /* StringLiteral */ || kind === 13 /* NoSubstitutionTemplateLiteral */;
- }
- ts.isTextualLiteralKind = isTextualLiteralKind;
function isLiteralExpression(node) {
return isLiteralKind(node.kind);
}
ts.isLiteralExpression = isLiteralExpression;
// Pseudo-literals
+ /* @internal */
function isTemplateLiteralKind(kind) {
return 13 /* FirstTemplateToken */ <= kind && kind <= 16 /* LastTemplateToken */;
}
ts.isTemplateLiteralKind = isTemplateLiteralKind;
- function isTemplateHead(node) {
- return node.kind === 14 /* TemplateHead */;
- }
- ts.isTemplateHead = isTemplateHead;
function isTemplateMiddleOrTemplateTail(node) {
var kind = node.kind;
return kind === 15 /* TemplateMiddle */
@@ -9907,33 +11281,36 @@ var ts;
}
ts.isTemplateMiddleOrTemplateTail = isTemplateMiddleOrTemplateTail;
// Identifiers
- function isIdentifier(node) {
- return node.kind === 71 /* Identifier */;
- }
- ts.isIdentifier = isIdentifier;
- function isVoidExpression(node) {
- return node.kind === 190 /* VoidExpression */;
- }
- ts.isVoidExpression = isVoidExpression;
+ /* @internal */
function isGeneratedIdentifier(node) {
// Using `>` here catches both `GeneratedIdentifierKind.None` and `undefined`.
- return isIdentifier(node) && node.autoGenerateKind > 0 /* None */;
+ return ts.isIdentifier(node) && node.autoGenerateKind > 0 /* None */;
}
ts.isGeneratedIdentifier = isGeneratedIdentifier;
// Keywords
+ /* @internal */
+ function isModifierKind(token) {
+ switch (token) {
+ case 117 /* AbstractKeyword */:
+ case 120 /* AsyncKeyword */:
+ case 76 /* ConstKeyword */:
+ case 124 /* DeclareKeyword */:
+ case 79 /* DefaultKeyword */:
+ case 84 /* ExportKeyword */:
+ case 114 /* PublicKeyword */:
+ case 112 /* PrivateKeyword */:
+ case 113 /* ProtectedKeyword */:
+ case 131 /* ReadonlyKeyword */:
+ case 115 /* StaticKeyword */:
+ return true;
+ }
+ return false;
+ }
+ ts.isModifierKind = isModifierKind;
function isModifier(node) {
return isModifierKind(node.kind);
}
ts.isModifier = isModifier;
- // Names
- function isQualifiedName(node) {
- return node.kind === 143 /* QualifiedName */;
- }
- ts.isQualifiedName = isQualifiedName;
- function isComputedPropertyName(node) {
- return node.kind === 144 /* ComputedPropertyName */;
- }
- ts.isComputedPropertyName = isComputedPropertyName;
function isEntityName(node) {
var kind = node.kind;
return kind === 143 /* QualifiedName */
@@ -9948,12 +11325,6 @@ var ts;
|| kind === 144 /* ComputedPropertyName */;
}
ts.isPropertyName = isPropertyName;
- function isModuleName(node) {
- var kind = node.kind;
- return kind === 71 /* Identifier */
- || kind === 9 /* StringLiteral */;
- }
- ts.isModuleName = isModuleName;
function isBindingName(node) {
var kind = node.kind;
return kind === 71 /* Identifier */
@@ -9961,24 +11332,33 @@ var ts;
|| kind === 175 /* ArrayBindingPattern */;
}
ts.isBindingName = isBindingName;
- // Signature elements
- function isTypeParameter(node) {
- return node.kind === 145 /* TypeParameter */;
- }
- ts.isTypeParameter = isTypeParameter;
- function isParameter(node) {
- return node.kind === 146 /* Parameter */;
- }
- ts.isParameter = isParameter;
- function isDecorator(node) {
- return node.kind === 147 /* Decorator */;
+ // Functions
+ function isFunctionLike(node) {
+ return node && isFunctionLikeKind(node.kind);
}
- ts.isDecorator = isDecorator;
- // Type members
- function isMethodDeclaration(node) {
- return node.kind === 151 /* MethodDeclaration */;
+ ts.isFunctionLike = isFunctionLike;
+ /* @internal */
+ function isFunctionLikeKind(kind) {
+ switch (kind) {
+ case 152 /* Constructor */:
+ case 186 /* FunctionExpression */:
+ case 228 /* FunctionDeclaration */:
+ case 187 /* ArrowFunction */:
+ case 151 /* MethodDeclaration */:
+ case 150 /* MethodSignature */:
+ case 153 /* GetAccessor */:
+ case 154 /* SetAccessor */:
+ case 155 /* CallSignature */:
+ case 156 /* ConstructSignature */:
+ case 157 /* IndexSignature */:
+ case 160 /* FunctionType */:
+ case 161 /* ConstructorType */:
+ return true;
+ }
+ return false;
}
- ts.isMethodDeclaration = isMethodDeclaration;
+ ts.isFunctionLikeKind = isFunctionLikeKind;
+ // Classes
function isClassElement(node) {
var kind = node.kind;
return kind === 152 /* Constructor */
@@ -9987,9 +11367,29 @@ var ts;
|| kind === 153 /* GetAccessor */
|| kind === 154 /* SetAccessor */
|| kind === 157 /* IndexSignature */
- || kind === 206 /* SemicolonClassElement */;
+ || kind === 206 /* SemicolonClassElement */
+ || kind === 247 /* MissingDeclaration */;
}
ts.isClassElement = isClassElement;
+ function isClassLike(node) {
+ return node && (node.kind === 229 /* ClassDeclaration */ || node.kind === 199 /* ClassExpression */);
+ }
+ ts.isClassLike = isClassLike;
+ function isAccessor(node) {
+ return node && (node.kind === 153 /* GetAccessor */ || node.kind === 154 /* SetAccessor */);
+ }
+ ts.isAccessor = isAccessor;
+ // Type members
+ function isTypeElement(node) {
+ var kind = node.kind;
+ return kind === 156 /* ConstructSignature */
+ || kind === 155 /* CallSignature */
+ || kind === 148 /* PropertySignature */
+ || kind === 150 /* MethodSignature */
+ || kind === 157 /* IndexSignature */
+ || kind === 247 /* MissingDeclaration */;
+ }
+ ts.isTypeElement = isTypeElement;
function isObjectLiteralElementLike(node) {
var kind = node.kind;
return kind === 261 /* PropertyAssignment */
@@ -10026,15 +11426,17 @@ var ts;
return isTypeNodeKind(node.kind);
}
ts.isTypeNode = isTypeNode;
- // Binding patterns
- function isArrayBindingPattern(node) {
- return node.kind === 175 /* ArrayBindingPattern */;
- }
- ts.isArrayBindingPattern = isArrayBindingPattern;
- function isObjectBindingPattern(node) {
- return node.kind === 174 /* ObjectBindingPattern */;
+ function isFunctionOrConstructorTypeNode(node) {
+ switch (node.kind) {
+ case 160 /* FunctionType */:
+ case 161 /* ConstructorType */:
+ return true;
+ }
+ return false;
}
- ts.isObjectBindingPattern = isObjectBindingPattern;
+ ts.isFunctionOrConstructorTypeNode = isFunctionOrConstructorTypeNode;
+ // Binding patterns
+ /* @internal */
function isBindingPattern(node) {
if (node) {
var kind = node.kind;
@@ -10044,16 +11446,14 @@ var ts;
return false;
}
ts.isBindingPattern = isBindingPattern;
+ /* @internal */
function isAssignmentPattern(node) {
var kind = node.kind;
return kind === 177 /* ArrayLiteralExpression */
|| kind === 178 /* ObjectLiteralExpression */;
}
ts.isAssignmentPattern = isAssignmentPattern;
- function isBindingElement(node) {
- return node.kind === 176 /* BindingElement */;
- }
- ts.isBindingElement = isBindingElement;
+ /* @internal */
function isArrayBindingElement(node) {
var kind = node.kind;
return kind === 176 /* BindingElement */
@@ -10063,6 +11463,7 @@ var ts;
/**
* Determines whether the BindingOrAssignmentElement is a BindingElement-like declaration
*/
+ /* @internal */
function isDeclarationBindingElement(bindingElement) {
switch (bindingElement.kind) {
case 226 /* VariableDeclaration */:
@@ -10076,6 +11477,7 @@ var ts;
/**
* Determines whether a node is a BindingOrAssignmentPattern
*/
+ /* @internal */
function isBindingOrAssignmentPattern(node) {
return isObjectBindingOrAssignmentPattern(node)
|| isArrayBindingOrAssignmentPattern(node);
@@ -10084,6 +11486,7 @@ var ts;
/**
* Determines whether a node is an ObjectBindingOrAssignmentPattern
*/
+ /* @internal */
function isObjectBindingOrAssignmentPattern(node) {
switch (node.kind) {
case 174 /* ObjectBindingPattern */:
@@ -10096,6 +11499,7 @@ var ts;
/**
* Determines whether a node is an ArrayBindingOrAssignmentPattern
*/
+ /* @internal */
function isArrayBindingOrAssignmentPattern(node) {
switch (node.kind) {
case 175 /* ArrayBindingPattern */:
@@ -10106,54 +11510,36 @@ var ts;
}
ts.isArrayBindingOrAssignmentPattern = isArrayBindingOrAssignmentPattern;
// Expression
- function isArrayLiteralExpression(node) {
- return node.kind === 177 /* ArrayLiteralExpression */;
- }
- ts.isArrayLiteralExpression = isArrayLiteralExpression;
- function isObjectLiteralExpression(node) {
- return node.kind === 178 /* ObjectLiteralExpression */;
- }
- ts.isObjectLiteralExpression = isObjectLiteralExpression;
- function isPropertyAccessExpression(node) {
- return node.kind === 179 /* PropertyAccessExpression */;
- }
- ts.isPropertyAccessExpression = isPropertyAccessExpression;
function isPropertyAccessOrQualifiedName(node) {
var kind = node.kind;
return kind === 179 /* PropertyAccessExpression */
|| kind === 143 /* QualifiedName */;
}
ts.isPropertyAccessOrQualifiedName = isPropertyAccessOrQualifiedName;
- function isElementAccessExpression(node) {
- return node.kind === 180 /* ElementAccessExpression */;
- }
- ts.isElementAccessExpression = isElementAccessExpression;
- function isBinaryExpression(node) {
- return node.kind === 194 /* BinaryExpression */;
- }
- ts.isBinaryExpression = isBinaryExpression;
- function isConditionalExpression(node) {
- return node.kind === 195 /* ConditionalExpression */;
+ function isCallLikeExpression(node) {
+ switch (node.kind) {
+ case 251 /* JsxOpeningElement */:
+ case 250 /* JsxSelfClosingElement */:
+ case 181 /* CallExpression */:
+ case 182 /* NewExpression */:
+ case 183 /* TaggedTemplateExpression */:
+ case 147 /* Decorator */:
+ return true;
+ default:
+ return false;
+ }
}
- ts.isConditionalExpression = isConditionalExpression;
- function isCallExpression(node) {
- return node.kind === 181 /* CallExpression */;
+ ts.isCallLikeExpression = isCallLikeExpression;
+ function isCallOrNewExpression(node) {
+ return node.kind === 181 /* CallExpression */ || node.kind === 182 /* NewExpression */;
}
- ts.isCallExpression = isCallExpression;
+ ts.isCallOrNewExpression = isCallOrNewExpression;
function isTemplateLiteral(node) {
var kind = node.kind;
return kind === 196 /* TemplateExpression */
|| kind === 13 /* NoSubstitutionTemplateLiteral */;
}
ts.isTemplateLiteral = isTemplateLiteral;
- function isSpreadExpression(node) {
- return node.kind === 198 /* SpreadElement */;
- }
- ts.isSpreadExpression = isSpreadExpression;
- function isExpressionWithTypeArguments(node) {
- return node.kind === 201 /* ExpressionWithTypeArguments */;
- }
- ts.isExpressionWithTypeArguments = isExpressionWithTypeArguments;
function isLeftHandSideExpressionKind(kind) {
return kind === 179 /* PropertyAccessExpression */
|| kind === 180 /* ElementAccessExpression */
@@ -10181,6 +11567,7 @@ var ts;
|| kind === 203 /* NonNullExpression */
|| kind === 204 /* MetaProperty */;
}
+ /* @internal */
function isLeftHandSideExpression(node) {
return isLeftHandSideExpressionKind(ts.skipPartiallyEmittedExpressions(node).kind);
}
@@ -10195,6 +11582,7 @@ var ts;
|| kind === 184 /* TypeAssertionExpression */
|| isLeftHandSideExpressionKind(kind);
}
+ /* @internal */
function isUnaryExpression(node) {
return isUnaryExpressionKind(ts.skipPartiallyEmittedExpressions(node).kind);
}
@@ -10207,8 +11595,10 @@ var ts;
|| kind === 198 /* SpreadElement */
|| kind === 202 /* AsExpression */
|| kind === 200 /* OmittedExpression */
+ || kind === 298 /* CommaListExpression */
|| isUnaryExpressionKind(kind);
}
+ /* @internal */
function isExpression(node) {
return isExpressionKind(ts.skipPartiallyEmittedExpressions(node).kind);
}
@@ -10219,59 +11609,61 @@ var ts;
|| kind === 202 /* AsExpression */;
}
ts.isAssertionExpression = isAssertionExpression;
+ /* @internal */
function isPartiallyEmittedExpression(node) {
- return node.kind === 296 /* PartiallyEmittedExpression */;
+ return node.kind === 297 /* PartiallyEmittedExpression */;
}
ts.isPartiallyEmittedExpression = isPartiallyEmittedExpression;
+ /* @internal */
function isNotEmittedStatement(node) {
- return node.kind === 295 /* NotEmittedStatement */;
+ return node.kind === 296 /* NotEmittedStatement */;
}
ts.isNotEmittedStatement = isNotEmittedStatement;
+ /* @internal */
function isNotEmittedOrPartiallyEmittedNode(node) {
return isNotEmittedStatement(node)
|| isPartiallyEmittedExpression(node);
}
ts.isNotEmittedOrPartiallyEmittedNode = isNotEmittedOrPartiallyEmittedNode;
- function isOmittedExpression(node) {
- return node.kind === 200 /* OmittedExpression */;
+ // Statement
+ function isIterationStatement(node, lookInLabeledStatements) {
+ switch (node.kind) {
+ case 214 /* ForStatement */:
+ case 215 /* ForInStatement */:
+ case 216 /* ForOfStatement */:
+ case 212 /* DoStatement */:
+ case 213 /* WhileStatement */:
+ return true;
+ case 222 /* LabeledStatement */:
+ return lookInLabeledStatements && isIterationStatement(node.statement, lookInLabeledStatements);
+ }
+ return false;
}
- ts.isOmittedExpression = isOmittedExpression;
- // Misc
- function isTemplateSpan(node) {
- return node.kind === 205 /* TemplateSpan */;
+ ts.isIterationStatement = isIterationStatement;
+ /* @internal */
+ function isForInOrOfStatement(node) {
+ return node.kind === 215 /* ForInStatement */ || node.kind === 216 /* ForOfStatement */;
}
- ts.isTemplateSpan = isTemplateSpan;
+ ts.isForInOrOfStatement = isForInOrOfStatement;
// Element
- function isBlock(node) {
- return node.kind === 207 /* Block */;
- }
- ts.isBlock = isBlock;
+ /* @internal */
function isConciseBody(node) {
- return isBlock(node)
+ return ts.isBlock(node)
|| isExpression(node);
}
ts.isConciseBody = isConciseBody;
+ /* @internal */
function isFunctionBody(node) {
- return isBlock(node);
+ return ts.isBlock(node);
}
ts.isFunctionBody = isFunctionBody;
+ /* @internal */
function isForInitializer(node) {
- return isVariableDeclarationList(node)
+ return ts.isVariableDeclarationList(node)
|| isExpression(node);
}
ts.isForInitializer = isForInitializer;
- function isVariableDeclaration(node) {
- return node.kind === 226 /* VariableDeclaration */;
- }
- ts.isVariableDeclaration = isVariableDeclaration;
- function isVariableDeclarationList(node) {
- return node.kind === 227 /* VariableDeclarationList */;
- }
- ts.isVariableDeclarationList = isVariableDeclarationList;
- function isCaseBlock(node) {
- return node.kind === 235 /* CaseBlock */;
- }
- ts.isCaseBlock = isCaseBlock;
+ /* @internal */
function isModuleBody(node) {
var kind = node.kind;
return kind === 234 /* ModuleBlock */
@@ -10279,44 +11671,28 @@ var ts;
|| kind === 71 /* Identifier */;
}
ts.isModuleBody = isModuleBody;
+ /* @internal */
function isNamespaceBody(node) {
var kind = node.kind;
return kind === 234 /* ModuleBlock */
|| kind === 233 /* ModuleDeclaration */;
}
ts.isNamespaceBody = isNamespaceBody;
+ /* @internal */
function isJSDocNamespaceBody(node) {
var kind = node.kind;
return kind === 71 /* Identifier */
|| kind === 233 /* ModuleDeclaration */;
}
ts.isJSDocNamespaceBody = isJSDocNamespaceBody;
- function isImportEqualsDeclaration(node) {
- return node.kind === 237 /* ImportEqualsDeclaration */;
- }
- ts.isImportEqualsDeclaration = isImportEqualsDeclaration;
- function isImportClause(node) {
- return node.kind === 239 /* ImportClause */;
- }
- ts.isImportClause = isImportClause;
+ /* @internal */
function isNamedImportBindings(node) {
var kind = node.kind;
return kind === 241 /* NamedImports */
|| kind === 240 /* NamespaceImport */;
}
ts.isNamedImportBindings = isNamedImportBindings;
- function isImportSpecifier(node) {
- return node.kind === 242 /* ImportSpecifier */;
- }
- ts.isImportSpecifier = isImportSpecifier;
- function isNamedExports(node) {
- return node.kind === 245 /* NamedExports */;
- }
- ts.isNamedExports = isNamedExports;
- function isExportSpecifier(node) {
- return node.kind === 246 /* ExportSpecifier */;
- }
- ts.isExportSpecifier = isExportSpecifier;
+ /* @internal */
function isModuleOrEnumDeclaration(node) {
return node.kind === 233 /* ModuleDeclaration */ || node.kind === 232 /* EnumDeclaration */;
}
@@ -10352,7 +11728,7 @@ var ts;
|| kind === 231 /* TypeAliasDeclaration */
|| kind === 145 /* TypeParameter */
|| kind === 226 /* VariableDeclaration */
- || kind === 290 /* JSDocTypedefTag */;
+ || kind === 291 /* JSDocTypedefTag */;
}
function isDeclarationStatementKind(kind) {
return kind === 228 /* FunctionDeclaration */
@@ -10387,14 +11763,19 @@ var ts;
|| kind === 208 /* VariableStatement */
|| kind === 213 /* WhileStatement */
|| kind === 220 /* WithStatement */
- || kind === 295 /* NotEmittedStatement */
- || kind === 298 /* EndOfDeclarationMarker */
- || kind === 297 /* MergeDeclarationMarker */;
+ || kind === 296 /* NotEmittedStatement */
+ || kind === 300 /* EndOfDeclarationMarker */
+ || kind === 299 /* MergeDeclarationMarker */;
}
+ /* @internal */
function isDeclaration(node) {
+ if (node.kind === 145 /* TypeParameter */) {
+ return node.parent.kind !== 290 /* JSDocTemplateTag */ || ts.isInJavaScriptFile(node);
+ }
return isDeclarationKind(node.kind);
}
ts.isDeclaration = isDeclaration;
+ /* @internal */
function isDeclarationStatement(node) {
return isDeclarationStatementKind(node.kind);
}
@@ -10402,10 +11783,12 @@ var ts;
/**
* Determines whether the node is a statement that is not also a declaration
*/
+ /* @internal */
function isStatementButNotDeclaration(node) {
return isStatementKindButNotDeclarationKind(node.kind);
}
ts.isStatementButNotDeclaration = isStatementButNotDeclaration;
+ /* @internal */
function isStatement(node) {
var kind = node.kind;
return isStatementKindButNotDeclarationKind(kind)
@@ -10414,6 +11797,7 @@ var ts;
}
ts.isStatement = isStatement;
// Module references
+ /* @internal */
function isModuleReference(node) {
var kind = node.kind;
return kind === 248 /* ExternalModuleReference */
@@ -10422,14 +11806,7 @@ var ts;
}
ts.isModuleReference = isModuleReference;
// JSX
- function isJsxOpeningElement(node) {
- return node.kind === 251 /* JsxOpeningElement */;
- }
- ts.isJsxOpeningElement = isJsxOpeningElement;
- function isJsxClosingElement(node) {
- return node.kind === 252 /* JsxClosingElement */;
- }
- ts.isJsxClosingElement = isJsxClosingElement;
+ /* @internal */
function isJsxTagNameExpression(node) {
var kind = node.kind;
return kind === 99 /* ThisKeyword */
@@ -10437,6 +11814,7 @@ var ts;
|| kind === 179 /* PropertyAccessExpression */;
}
ts.isJsxTagNameExpression = isJsxTagNameExpression;
+ /* @internal */
function isJsxChild(node) {
var kind = node.kind;
return kind === 249 /* JsxElement */
@@ -10445,25 +11823,14 @@ var ts;
|| kind === 10 /* JsxText */;
}
ts.isJsxChild = isJsxChild;
- function isJsxAttributes(node) {
- var kind = node.kind;
- return kind === 254 /* JsxAttributes */;
- }
- ts.isJsxAttributes = isJsxAttributes;
+ /* @internal */
function isJsxAttributeLike(node) {
var kind = node.kind;
return kind === 253 /* JsxAttribute */
|| kind === 255 /* JsxSpreadAttribute */;
}
ts.isJsxAttributeLike = isJsxAttributeLike;
- function isJsxSpreadAttribute(node) {
- return node.kind === 255 /* JsxSpreadAttribute */;
- }
- ts.isJsxSpreadAttribute = isJsxSpreadAttribute;
- function isJsxAttribute(node) {
- return node.kind === 253 /* JsxAttribute */;
- }
- ts.isJsxAttribute = isJsxAttribute;
+ /* @internal */
function isStringLiteralOrJsxExpression(node) {
var kind = node.kind;
return kind === 9 /* StringLiteral */
@@ -10483,412 +11850,24 @@ var ts;
|| kind === 258 /* DefaultClause */;
}
ts.isCaseOrDefaultClause = isCaseOrDefaultClause;
- function isHeritageClause(node) {
- return node.kind === 259 /* HeritageClause */;
- }
- ts.isHeritageClause = isHeritageClause;
- function isCatchClause(node) {
- return node.kind === 260 /* CatchClause */;
- }
- ts.isCatchClause = isCatchClause;
- // Property assignments
- function isPropertyAssignment(node) {
- return node.kind === 261 /* PropertyAssignment */;
- }
- ts.isPropertyAssignment = isPropertyAssignment;
- function isShorthandPropertyAssignment(node) {
- return node.kind === 262 /* ShorthandPropertyAssignment */;
- }
- ts.isShorthandPropertyAssignment = isShorthandPropertyAssignment;
- // Enum
- function isEnumMember(node) {
- return node.kind === 264 /* EnumMember */;
- }
- ts.isEnumMember = isEnumMember;
- // Top-level nodes
- function isSourceFile(node) {
- return node.kind === 265 /* SourceFile */;
- }
- ts.isSourceFile = isSourceFile;
- function isWatchSet(options) {
- // Firefox has Object.prototype.watch
- return options.watch && options.hasOwnProperty("watch");
- }
- ts.isWatchSet = isWatchSet;
-})(ts || (ts = {}));
-(function (ts) {
- function getDefaultLibFileName(options) {
- switch (options.target) {
- case 5 /* ESNext */:
- return "lib.esnext.full.d.ts";
- case 4 /* ES2017 */:
- return "lib.es2017.full.d.ts";
- case 3 /* ES2016 */:
- return "lib.es2016.full.d.ts";
- case 2 /* ES2015 */:
- return "lib.es6.d.ts"; // We don't use lib.es2015.full.d.ts due to breaking change.
- default:
- return "lib.d.ts";
- }
- }
- ts.getDefaultLibFileName = getDefaultLibFileName;
- function textSpanEnd(span) {
- return span.start + span.length;
- }
- ts.textSpanEnd = textSpanEnd;
- function textSpanIsEmpty(span) {
- return span.length === 0;
- }
- ts.textSpanIsEmpty = textSpanIsEmpty;
- function textSpanContainsPosition(span, position) {
- return position >= span.start && position < textSpanEnd(span);
- }
- ts.textSpanContainsPosition = textSpanContainsPosition;
- // Returns true if 'span' contains 'other'.
- function textSpanContainsTextSpan(span, other) {
- return other.start >= span.start && textSpanEnd(other) <= textSpanEnd(span);
- }
- ts.textSpanContainsTextSpan = textSpanContainsTextSpan;
- function textSpanOverlapsWith(span, other) {
- var overlapStart = Math.max(span.start, other.start);
- var overlapEnd = Math.min(textSpanEnd(span), textSpanEnd(other));
- return overlapStart < overlapEnd;
- }
- ts.textSpanOverlapsWith = textSpanOverlapsWith;
- function textSpanOverlap(span1, span2) {
- var overlapStart = Math.max(span1.start, span2.start);
- var overlapEnd = Math.min(textSpanEnd(span1), textSpanEnd(span2));
- if (overlapStart < overlapEnd) {
- return createTextSpanFromBounds(overlapStart, overlapEnd);
- }
- return undefined;
- }
- ts.textSpanOverlap = textSpanOverlap;
- function textSpanIntersectsWithTextSpan(span, other) {
- return other.start <= textSpanEnd(span) && textSpanEnd(other) >= span.start;
- }
- ts.textSpanIntersectsWithTextSpan = textSpanIntersectsWithTextSpan;
- function textSpanIntersectsWith(span, start, length) {
- var end = start + length;
- return start <= textSpanEnd(span) && end >= span.start;
- }
- ts.textSpanIntersectsWith = textSpanIntersectsWith;
- function decodedTextSpanIntersectsWith(start1, length1, start2, length2) {
- var end1 = start1 + length1;
- var end2 = start2 + length2;
- return start2 <= end1 && end2 >= start1;
- }
- ts.decodedTextSpanIntersectsWith = decodedTextSpanIntersectsWith;
- function textSpanIntersectsWithPosition(span, position) {
- return position <= textSpanEnd(span) && position >= span.start;
- }
- ts.textSpanIntersectsWithPosition = textSpanIntersectsWithPosition;
- function textSpanIntersection(span1, span2) {
- var intersectStart = Math.max(span1.start, span2.start);
- var intersectEnd = Math.min(textSpanEnd(span1), textSpanEnd(span2));
- if (intersectStart <= intersectEnd) {
- return createTextSpanFromBounds(intersectStart, intersectEnd);
- }
- return undefined;
- }
- ts.textSpanIntersection = textSpanIntersection;
- function createTextSpan(start, length) {
- if (start < 0) {
- throw new Error("start < 0");
- }
- if (length < 0) {
- throw new Error("length < 0");
- }
- return { start: start, length: length };
- }
- ts.createTextSpan = createTextSpan;
- function createTextSpanFromBounds(start, end) {
- return createTextSpan(start, end - start);
- }
- ts.createTextSpanFromBounds = createTextSpanFromBounds;
- function textChangeRangeNewSpan(range) {
- return createTextSpan(range.span.start, range.newLength);
- }
- ts.textChangeRangeNewSpan = textChangeRangeNewSpan;
- function textChangeRangeIsUnchanged(range) {
- return textSpanIsEmpty(range.span) && range.newLength === 0;
- }
- ts.textChangeRangeIsUnchanged = textChangeRangeIsUnchanged;
- function createTextChangeRange(span, newLength) {
- if (newLength < 0) {
- throw new Error("newLength < 0");
- }
- return { span: span, newLength: newLength };
- }
- ts.createTextChangeRange = createTextChangeRange;
- ts.unchangedTextChangeRange = createTextChangeRange(createTextSpan(0, 0), 0);
- /**
- * Called to merge all the changes that occurred across several versions of a script snapshot
- * into a single change. i.e. if a user keeps making successive edits to a script we will
- * have a text change from V1 to V2, V2 to V3, ..., Vn.
- *
- * This function will then merge those changes into a single change range valid between V1 and
- * Vn.
- */
- function collapseTextChangeRangesAcrossMultipleVersions(changes) {
- if (changes.length === 0) {
- return ts.unchangedTextChangeRange;
- }
- if (changes.length === 1) {
- return changes[0];
- }
- // We change from talking about { { oldStart, oldLength }, newLength } to { oldStart, oldEnd, newEnd }
- // as it makes things much easier to reason about.
- var change0 = changes[0];
- var oldStartN = change0.span.start;
- var oldEndN = textSpanEnd(change0.span);
- var newEndN = oldStartN + change0.newLength;
- for (var i = 1; i < changes.length; i++) {
- var nextChange = changes[i];
- // Consider the following case:
- // i.e. two edits. The first represents the text change range { { 10, 50 }, 30 }. i.e. The span starting
- // at 10, with length 50 is reduced to length 30. The second represents the text change range { { 30, 30 }, 40 }.
- // i.e. the span starting at 30 with length 30 is increased to length 40.
- //
- // 0 10 20 30 40 50 60 70 80 90 100
- // -------------------------------------------------------------------------------------------------------
- // | /
- // | /----
- // T1 | /----
- // | /----
- // | /----
- // -------------------------------------------------------------------------------------------------------
- // | \
- // | \
- // T2 | \
- // | \
- // | \
- // -------------------------------------------------------------------------------------------------------
- //
- // Merging these turns out to not be too difficult. First, determining the new start of the change is trivial
- // it's just the min of the old and new starts. i.e.:
- //
- // 0 10 20 30 40 50 60 70 80 90 100
- // ------------------------------------------------------------*------------------------------------------
- // | /
- // | /----
- // T1 | /----
- // | /----
- // | /----
- // ----------------------------------------$-------------------$------------------------------------------
- // . | \
- // . | \
- // T2 . | \
- // . | \
- // . | \
- // ----------------------------------------------------------------------*--------------------------------
- //
- // (Note the dots represent the newly inferred start.
- // Determining the new and old end is also pretty simple. Basically it boils down to paying attention to the
- // absolute positions at the asterisks, and the relative change between the dollar signs. Basically, we see
- // which if the two $'s precedes the other, and we move that one forward until they line up. in this case that
- // means:
- //
- // 0 10 20 30 40 50 60 70 80 90 100
- // --------------------------------------------------------------------------------*----------------------
- // | /
- // | /----
- // T1 | /----
- // | /----
- // | /----
- // ------------------------------------------------------------$------------------------------------------
- // . | \
- // . | \
- // T2 . | \
- // . | \
- // . | \
- // ----------------------------------------------------------------------*--------------------------------
- //
- // In other words (in this case), we're recognizing that the second edit happened after where the first edit
- // ended with a delta of 20 characters (60 - 40). Thus, if we go back in time to where the first edit started
- // that's the same as if we started at char 80 instead of 60.
- //
- // As it so happens, the same logic applies if the second edit precedes the first edit. In that case rather
- // than pushing the first edit forward to match the second, we'll push the second edit forward to match the
- // first.
- //
- // In this case that means we have { oldStart: 10, oldEnd: 80, newEnd: 70 } or, in TextChangeRange
- // semantics: { { start: 10, length: 70 }, newLength: 60 }
- //
- // The math then works out as follows.
- // If we have { oldStart1, oldEnd1, newEnd1 } and { oldStart2, oldEnd2, newEnd2 } then we can compute the
- // final result like so:
- //
- // {
- // oldStart3: Min(oldStart1, oldStart2),
- // oldEnd3 : Max(oldEnd1, oldEnd1 + (oldEnd2 - newEnd1)),
- // newEnd3 : Max(newEnd2, newEnd2 + (newEnd1 - oldEnd2))
- // }
- var oldStart1 = oldStartN;
- var oldEnd1 = oldEndN;
- var newEnd1 = newEndN;
- var oldStart2 = nextChange.span.start;
- var oldEnd2 = textSpanEnd(nextChange.span);
- var newEnd2 = oldStart2 + nextChange.newLength;
- oldStartN = Math.min(oldStart1, oldStart2);
- oldEndN = Math.max(oldEnd1, oldEnd1 + (oldEnd2 - newEnd1));
- newEndN = Math.max(newEnd2, newEnd2 + (newEnd1 - oldEnd2));
- }
- return createTextChangeRange(createTextSpanFromBounds(oldStartN, oldEndN), /*newLength*/ newEndN - oldStartN);
- }
- ts.collapseTextChangeRangesAcrossMultipleVersions = collapseTextChangeRangesAcrossMultipleVersions;
- function getTypeParameterOwner(d) {
- if (d && d.kind === 145 /* TypeParameter */) {
- for (var current = d; current; current = current.parent) {
- if (ts.isFunctionLike(current) || ts.isClassLike(current) || current.kind === 230 /* InterfaceDeclaration */) {
- return current;
- }
- }
- }
- }
- ts.getTypeParameterOwner = getTypeParameterOwner;
- function isParameterPropertyDeclaration(node) {
- return ts.hasModifier(node, 92 /* ParameterPropertyModifier */) && node.parent.kind === 152 /* Constructor */ && ts.isClassLike(node.parent.parent);
- }
- ts.isParameterPropertyDeclaration = isParameterPropertyDeclaration;
- function walkUpBindingElementsAndPatterns(node) {
- while (node && (node.kind === 176 /* BindingElement */ || ts.isBindingPattern(node))) {
- node = node.parent;
- }
- return node;
- }
- function getCombinedModifierFlags(node) {
- node = walkUpBindingElementsAndPatterns(node);
- var flags = ts.getModifierFlags(node);
- if (node.kind === 226 /* VariableDeclaration */) {
- node = node.parent;
- }
- if (node && node.kind === 227 /* VariableDeclarationList */) {
- flags |= ts.getModifierFlags(node);
- node = node.parent;
- }
- if (node && node.kind === 208 /* VariableStatement */) {
- flags |= ts.getModifierFlags(node);
- }
- return flags;
- }
- ts.getCombinedModifierFlags = getCombinedModifierFlags;
- // Returns the node flags for this node and all relevant parent nodes. This is done so that
- // nodes like variable declarations and binding elements can returned a view of their flags
- // that includes the modifiers from their container. i.e. flags like export/declare aren't
- // stored on the variable declaration directly, but on the containing variable statement
- // (if it has one). Similarly, flags for let/const are store on the variable declaration
- // list. By calling this function, all those flags are combined so that the client can treat
- // the node as if it actually had those flags.
- function getCombinedNodeFlags(node) {
- node = walkUpBindingElementsAndPatterns(node);
- var flags = node.flags;
- if (node.kind === 226 /* VariableDeclaration */) {
- node = node.parent;
- }
- if (node && node.kind === 227 /* VariableDeclarationList */) {
- flags |= node.flags;
- node = node.parent;
- }
- if (node && node.kind === 208 /* 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.
- */
- function validateLocaleAndSetLanguage(locale, sys, errors) {
- var matchResult = /^([a-z]+)([_\-]([a-z]+))?$/.exec(locale.toLowerCase());
- if (!matchResult) {
- if (errors) {
- errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1, "en", "ja-jp"));
- }
- return;
- }
- var language = matchResult[1];
- var territory = matchResult[3];
- // First try the entire locale, then fall back to just language if that's all we have.
- // Either ways do not fail, and fallback to the English diagnostic strings.
- if (!trySetLanguageAndTerritory(language, territory, errors)) {
- trySetLanguageAndTerritory(language, /*territory*/ undefined, errors);
- }
- function trySetLanguageAndTerritory(language, territory, errors) {
- var compilerFilePath = ts.normalizePath(sys.getExecutingFilePath());
- var containingDirectoryPath = ts.getDirectoryPath(compilerFilePath);
- var filePath = ts.combinePaths(containingDirectoryPath, language);
- if (territory) {
- filePath = filePath + "-" + territory;
- }
- filePath = sys.resolvePath(ts.combinePaths(filePath, "diagnosticMessages.generated.json"));
- if (!sys.fileExists(filePath)) {
- return false;
- }
- // TODO: Add codePage support for readFile?
- var fileContents = "";
- try {
- fileContents = sys.readFile(filePath);
- }
- catch (e) {
- if (errors) {
- errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Unable_to_open_file_0, filePath));
- }
- return false;
- }
- try {
- ts.localizedDiagnosticMessages = JSON.parse(fileContents);
- }
- catch (e) {
- if (errors) {
- errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Corrupted_locale_file_0, filePath));
- }
- return false;
- }
- return true;
- }
- }
- 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;
+ // JSDoc
+ /** True if node is of some JSDoc syntax kind. */
+ /* @internal */
+ function isJSDocNode(node) {
+ return node.kind >= 267 /* FirstJSDocNode */ && node.kind <= 294 /* LastJSDocNode */;
}
- 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.isJSDocNode = isJSDocNode;
+ /** True if node is of a kind that may contain comment text. */
+ function isJSDocCommentContainingNode(node) {
+ return node.kind === 283 /* JSDocComment */ || isJSDocTag(node);
}
- 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.isJSDocCommentContainingNode = isJSDocCommentContainingNode;
+ // TODO: determine what this does before making it public.
+ /* @internal */
+ function isJSDocTag(node) {
+ return node.kind >= 284 /* FirstJSDocTagNode */ && node.kind <= 294 /* LastJSDocTagNode */;
}
- ts.unescapeIdentifier = unescapeIdentifier;
+ ts.isJSDocTag = isJSDocTag;
})(ts || (ts = {}));
/// <reference path="core.ts"/>
/// <reference path="utilities.ts"/>
@@ -10981,16 +11960,24 @@ var ts;
node.textSourceNode = sourceNode;
return node;
}
- // Identifiers
- function createIdentifier(text) {
+ function createIdentifier(text, typeArguments) {
var node = createSynthesizedNode(71 /* Identifier */);
node.text = ts.escapeIdentifier(text);
node.originalKeywordKind = text ? ts.stringToToken(text) : 0 /* Unknown */;
node.autoGenerateKind = 0 /* None */;
node.autoGenerateId = 0;
+ if (typeArguments) {
+ node.typeArguments = createNodeArray(typeArguments);
+ }
return node;
}
ts.createIdentifier = createIdentifier;
+ function updateIdentifier(node, typeArguments) {
+ return node.typeArguments !== typeArguments
+ ? updateNode(createIdentifier(node.text, typeArguments), node)
+ : node;
+ }
+ ts.updateIdentifier = updateIdentifier;
var nextAutoGenerateId = 0;
/** Create a unique temporary variable. */
function createTempVariable(recordTempVariable) {
@@ -11085,228 +12072,13 @@ var ts;
: 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(160 /* 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(161 /* 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(155 /* 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(156 /* 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(150 /* 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(169 /* ThisType */);
- }
- ts.createThisTypeNode = createThisTypeNode;
- function createLiteralTypeNode(literal) {
- var literalTypeNode = createSynthesizedNode(173 /* 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(159 /* 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(158 /* 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(162 /* 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(164 /* 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(163 /* 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(165 /* 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(172 /* 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(170 /* TypeOperator */);
- typeOperatorNode.operator = 127 /* 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(171 /* 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
+ // Signature elements
function createTypeParameterDeclaration(name, constraint, defaultType) {
- var typeParameter = createSynthesizedNode(145 /* TypeParameter */);
- typeParameter.name = asName(name);
- typeParameter.constraint = constraint;
- typeParameter.default = defaultType;
- return typeParameter;
+ var node = createSynthesizedNode(145 /* TypeParameter */);
+ node.name = asName(name);
+ node.constraint = constraint;
+ node.default = defaultType;
+ return node;
}
ts.createTypeParameterDeclaration = createTypeParameterDeclaration;
function updateTypeParameterDeclaration(node, name, constraint, defaultType) {
@@ -11317,44 +12089,6 @@ var ts;
: node;
}
ts.updateTypeParameterDeclaration = updateTypeParameterDeclaration;
- // Signature elements
- function createPropertySignature(name, questionToken, type, initializer) {
- var propertySignature = createSynthesizedNode(148 /* 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(157 /* 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) {
var node = createSynthesizedNode(146 /* Parameter */);
node.decorators = asNodeArray(decorators);
@@ -11391,7 +12125,27 @@ var ts;
: node;
}
ts.updateDecorator = updateDecorator;
- // Type members
+ // Type Elements
+ function createPropertySignature(modifiers, name, questionToken, type, initializer) {
+ var node = createSynthesizedNode(148 /* PropertySignature */);
+ node.modifiers = asNodeArray(modifiers);
+ node.name = asName(name);
+ node.questionToken = questionToken;
+ node.type = type;
+ node.initializer = initializer;
+ return node;
+ }
+ ts.createPropertySignature = createPropertySignature;
+ function updatePropertySignature(node, modifiers, name, questionToken, type, initializer) {
+ return node.modifiers !== modifiers
+ || node.name !== name
+ || node.questionToken !== questionToken
+ || node.type !== type
+ || node.initializer !== initializer
+ ? updateNode(createPropertySignature(modifiers, name, questionToken, type, initializer), node)
+ : node;
+ }
+ ts.updatePropertySignature = updatePropertySignature;
function createProperty(decorators, modifiers, name, questionToken, type, initializer) {
var node = createSynthesizedNode(149 /* PropertyDeclaration */);
node.decorators = asNodeArray(decorators);
@@ -11413,7 +12167,24 @@ var ts;
: node;
}
ts.updateProperty = updateProperty;
- function createMethodDeclaration(decorators, modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body) {
+ function createMethodSignature(typeParameters, parameters, type, name, questionToken) {
+ var node = createSignatureDeclaration(150 /* MethodSignature */, typeParameters, parameters, type);
+ node.name = asName(name);
+ node.questionToken = questionToken;
+ return node;
+ }
+ 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 createMethod(decorators, modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body) {
var node = createSynthesizedNode(151 /* MethodDeclaration */);
node.decorators = asNodeArray(decorators);
node.modifiers = asNodeArray(modifiers);
@@ -11426,7 +12197,7 @@ var ts;
node.body = body;
return node;
}
- ts.createMethodDeclaration = createMethodDeclaration;
+ ts.createMethod = createMethod;
function updateMethod(node, decorators, modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body) {
return node.decorators !== decorators
|| node.modifiers !== modifiers
@@ -11436,7 +12207,7 @@ var ts;
|| node.parameters !== parameters
|| node.type !== type
|| node.body !== body
- ? updateNode(createMethodDeclaration(decorators, modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body), node)
+ ? updateNode(createMethod(decorators, modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body), node)
: node;
}
ts.updateMethod = updateMethod;
@@ -11504,6 +12275,251 @@ var ts;
: node;
}
ts.updateSetAccessor = updateSetAccessor;
+ function createCallSignature(typeParameters, parameters, type) {
+ return createSignatureDeclaration(155 /* CallSignature */, typeParameters, parameters, type);
+ }
+ ts.createCallSignature = createCallSignature;
+ function updateCallSignature(node, typeParameters, parameters, type) {
+ return updateSignatureDeclaration(node, typeParameters, parameters, type);
+ }
+ ts.updateCallSignature = updateCallSignature;
+ function createConstructSignature(typeParameters, parameters, type) {
+ return createSignatureDeclaration(156 /* ConstructSignature */, typeParameters, parameters, type);
+ }
+ ts.createConstructSignature = createConstructSignature;
+ function updateConstructSignature(node, typeParameters, parameters, type) {
+ return updateSignatureDeclaration(node, typeParameters, parameters, type);
+ }
+ ts.updateConstructSignature = updateConstructSignature;
+ function createIndexSignature(decorators, modifiers, parameters, type) {
+ var node = createSynthesizedNode(157 /* IndexSignature */);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
+ node.parameters = createNodeArray(parameters);
+ node.type = type;
+ return node;
+ }
+ ts.createIndexSignature = createIndexSignature;
+ function updateIndexSignature(node, decorators, modifiers, parameters, type) {
+ return node.parameters !== parameters
+ || node.type !== type
+ || node.decorators !== decorators
+ || node.modifiers !== modifiers
+ ? updateNode(createIndexSignature(decorators, modifiers, parameters, type), node)
+ : node;
+ }
+ ts.updateIndexSignature = updateIndexSignature;
+ /* @internal */
+ function createSignatureDeclaration(kind, typeParameters, parameters, type) {
+ var node = createSynthesizedNode(kind);
+ node.typeParameters = asNodeArray(typeParameters);
+ node.parameters = asNodeArray(parameters);
+ node.type = type;
+ return node;
+ }
+ 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;
+ }
+ // Types
+ function createKeywordTypeNode(kind) {
+ return createSynthesizedNode(kind);
+ }
+ ts.createKeywordTypeNode = createKeywordTypeNode;
+ function createTypePredicateNode(parameterName, type) {
+ var node = createSynthesizedNode(158 /* TypePredicate */);
+ node.parameterName = asName(parameterName);
+ node.type = type;
+ return node;
+ }
+ 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 createTypeReferenceNode(typeName, typeArguments) {
+ var node = createSynthesizedNode(159 /* TypeReference */);
+ node.typeName = asName(typeName);
+ node.typeArguments = typeArguments && ts.parenthesizeTypeParameters(typeArguments);
+ return node;
+ }
+ 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 createFunctionTypeNode(typeParameters, parameters, type) {
+ return createSignatureDeclaration(160 /* 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(161 /* ConstructorType */, typeParameters, parameters, type);
+ }
+ ts.createConstructorTypeNode = createConstructorTypeNode;
+ function updateConstructorTypeNode(node, typeParameters, parameters, type) {
+ return updateSignatureDeclaration(node, typeParameters, parameters, type);
+ }
+ ts.updateConstructorTypeNode = updateConstructorTypeNode;
+ function createTypeQueryNode(exprName) {
+ var node = createSynthesizedNode(162 /* TypeQuery */);
+ node.exprName = exprName;
+ return node;
+ }
+ ts.createTypeQueryNode = createTypeQueryNode;
+ function updateTypeQueryNode(node, exprName) {
+ return node.exprName !== exprName
+ ? updateNode(createTypeQueryNode(exprName), node)
+ : node;
+ }
+ ts.updateTypeQueryNode = updateTypeQueryNode;
+ function createTypeLiteralNode(members) {
+ var node = createSynthesizedNode(163 /* TypeLiteral */);
+ node.members = createNodeArray(members);
+ return node;
+ }
+ ts.createTypeLiteralNode = createTypeLiteralNode;
+ function updateTypeLiteralNode(node, members) {
+ return node.members !== members
+ ? updateNode(createTypeLiteralNode(members), node)
+ : node;
+ }
+ ts.updateTypeLiteralNode = updateTypeLiteralNode;
+ function createArrayTypeNode(elementType) {
+ var node = createSynthesizedNode(164 /* ArrayType */);
+ node.elementType = ts.parenthesizeElementTypeMember(elementType);
+ return node;
+ }
+ ts.createArrayTypeNode = createArrayTypeNode;
+ function updateArrayTypeNode(node, elementType) {
+ return node.elementType !== elementType
+ ? updateNode(createArrayTypeNode(elementType), node)
+ : node;
+ }
+ ts.updateArrayTypeNode = updateArrayTypeNode;
+ function createTupleTypeNode(elementTypes) {
+ var node = createSynthesizedNode(165 /* TupleType */);
+ node.elementTypes = createNodeArray(elementTypes);
+ return node;
+ }
+ ts.createTupleTypeNode = createTupleTypeNode;
+ function updateTypleTypeNode(node, elementTypes) {
+ return node.elementTypes !== elementTypes
+ ? updateNode(createTupleTypeNode(elementTypes), node)
+ : node;
+ }
+ ts.updateTypleTypeNode = updateTypleTypeNode;
+ function createUnionTypeNode(types) {
+ return createUnionOrIntersectionTypeNode(166 /* UnionType */, types);
+ }
+ ts.createUnionTypeNode = createUnionTypeNode;
+ function updateUnionTypeNode(node, types) {
+ return updateUnionOrIntersectionTypeNode(node, types);
+ }
+ ts.updateUnionTypeNode = updateUnionTypeNode;
+ function createIntersectionTypeNode(types) {
+ return createUnionOrIntersectionTypeNode(167 /* IntersectionType */, types);
+ }
+ ts.createIntersectionTypeNode = createIntersectionTypeNode;
+ function updateIntersectionTypeNode(node, types) {
+ return updateUnionOrIntersectionTypeNode(node, types);
+ }
+ ts.updateIntersectionTypeNode = updateIntersectionTypeNode;
+ function createUnionOrIntersectionTypeNode(kind, types) {
+ var node = createSynthesizedNode(kind);
+ node.types = ts.parenthesizeElementTypeMembers(types);
+ return node;
+ }
+ ts.createUnionOrIntersectionTypeNode = createUnionOrIntersectionTypeNode;
+ function updateUnionOrIntersectionTypeNode(node, types) {
+ return node.types !== types
+ ? updateNode(createUnionOrIntersectionTypeNode(node.kind, types), node)
+ : node;
+ }
+ function createParenthesizedType(type) {
+ var node = createSynthesizedNode(168 /* ParenthesizedType */);
+ node.type = type;
+ return node;
+ }
+ ts.createParenthesizedType = createParenthesizedType;
+ function updateParenthesizedType(node, type) {
+ return node.type !== type
+ ? updateNode(createParenthesizedType(type), node)
+ : node;
+ }
+ ts.updateParenthesizedType = updateParenthesizedType;
+ function createThisTypeNode() {
+ return createSynthesizedNode(169 /* ThisType */);
+ }
+ ts.createThisTypeNode = createThisTypeNode;
+ function createTypeOperatorNode(type) {
+ var node = createSynthesizedNode(170 /* TypeOperator */);
+ node.operator = 127 /* KeyOfKeyword */;
+ node.type = ts.parenthesizeElementTypeMember(type);
+ return node;
+ }
+ ts.createTypeOperatorNode = createTypeOperatorNode;
+ function updateTypeOperatorNode(node, type) {
+ return node.type !== type ? updateNode(createTypeOperatorNode(type), node) : node;
+ }
+ ts.updateTypeOperatorNode = updateTypeOperatorNode;
+ function createIndexedAccessTypeNode(objectType, indexType) {
+ var node = createSynthesizedNode(171 /* IndexedAccessType */);
+ node.objectType = ts.parenthesizeElementTypeMember(objectType);
+ node.indexType = indexType;
+ return node;
+ }
+ 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 createMappedTypeNode(readonlyToken, typeParameter, questionToken, type) {
+ var node = createSynthesizedNode(172 /* MappedType */);
+ node.readonlyToken = readonlyToken;
+ node.typeParameter = typeParameter;
+ node.questionToken = questionToken;
+ node.type = type;
+ return node;
+ }
+ 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 createLiteralTypeNode(literal) {
+ var node = createSynthesizedNode(173 /* LiteralType */);
+ node.literal = literal;
+ return node;
+ }
+ ts.createLiteralTypeNode = createLiteralTypeNode;
+ function updateLiteralTypeNode(node, literal) {
+ return node.literal !== literal
+ ? updateNode(createLiteralTypeNode(literal), node)
+ : node;
+ }
+ ts.updateLiteralTypeNode = updateLiteralTypeNode;
// Binding Patterns
function createObjectBindingPattern(elements) {
var node = createSynthesizedNode(174 /* ObjectBindingPattern */);
@@ -11551,9 +12567,8 @@ var ts;
function createArrayLiteral(elements, multiLine) {
var node = createSynthesizedNode(177 /* ArrayLiteralExpression */);
node.elements = ts.parenthesizeListElements(createNodeArray(elements));
- if (multiLine) {
+ if (multiLine)
node.multiLine = true;
- }
return node;
}
ts.createArrayLiteral = createArrayLiteral;
@@ -11566,9 +12581,8 @@ var ts;
function createObjectLiteral(properties, multiLine) {
var node = createSynthesizedNode(178 /* ObjectLiteralExpression */);
node.properties = createNodeArray(properties);
- if (multiLine) {
+ if (multiLine)
node.multiLine = true;
- }
return node;
}
ts.createObjectLiteral = createObjectLiteral;
@@ -11582,7 +12596,7 @@ var ts;
var node = createSynthesizedNode(179 /* PropertyAccessExpression */);
node.expression = ts.parenthesizeForAccess(expression);
node.name = asName(name);
- setEmitFlags(node, 65536 /* NoIndentation */);
+ setEmitFlags(node, 131072 /* NoIndentation */);
return node;
}
ts.createPropertyAccess = createPropertyAccess;
@@ -11618,9 +12632,9 @@ var ts;
}
ts.createCall = createCall;
function updateCall(node, expression, typeArguments, argumentsArray) {
- return expression !== node.expression
- || typeArguments !== node.typeArguments
- || argumentsArray !== node.arguments
+ return node.expression !== expression
+ || node.typeArguments !== typeArguments
+ || node.arguments !== argumentsArray
? updateNode(createCall(expression, typeArguments, argumentsArray), node)
: node;
}
@@ -11810,10 +12824,10 @@ var ts;
return node;
}
ts.createBinary = createBinary;
- function updateBinary(node, left, right) {
+ function updateBinary(node, left, right, operator) {
return node.left !== left
|| node.right !== right
- ? updateNode(createBinary(left, node.operatorToken, right), node)
+ ? updateNode(createBinary(left, operator || node.operatorToken, right), node)
: node;
}
ts.updateBinary = updateBinary;
@@ -11940,6 +12954,19 @@ var ts;
: node;
}
ts.updateNonNullExpression = updateNonNullExpression;
+ function createMetaProperty(keywordToken, name) {
+ var node = createSynthesizedNode(204 /* MetaProperty */);
+ node.keywordToken = keywordToken;
+ node.name = name;
+ return node;
+ }
+ ts.createMetaProperty = createMetaProperty;
+ function updateMetaProperty(node, name) {
+ return node.name !== name
+ ? updateNode(createMetaProperty(node.keywordToken, name), node)
+ : node;
+ }
+ ts.updateMetaProperty = updateMetaProperty;
// Misc
function createTemplateSpan(expression, literal) {
var node = createSynthesizedNode(205 /* TemplateSpan */);
@@ -11955,6 +12982,10 @@ var ts;
: node;
}
ts.updateTemplateSpan = updateTemplateSpan;
+ function createSemicolonClassElement() {
+ return createSynthesizedNode(206 /* SemicolonClassElement */);
+ }
+ ts.createSemicolonClassElement = createSemicolonClassElement;
// Element
function createBlock(statements, multiLine) {
var block = createSynthesizedNode(207 /* Block */);
@@ -11965,7 +12996,7 @@ var ts;
}
ts.createBlock = createBlock;
function updateBlock(node, statements) {
- return statements !== node.statements
+ return node.statements !== statements
? updateNode(createBlock(statements, node.multiLine), node)
: node;
}
@@ -11985,35 +13016,6 @@ var ts;
: node;
}
ts.updateVariableStatement = updateVariableStatement;
- function createVariableDeclarationList(declarations, flags) {
- var node = createSynthesizedNode(227 /* VariableDeclarationList */);
- node.flags |= flags;
- node.declarations = createNodeArray(declarations);
- return node;
- }
- ts.createVariableDeclarationList = createVariableDeclarationList;
- function updateVariableDeclarationList(node, declarations) {
- return node.declarations !== declarations
- ? updateNode(createVariableDeclarationList(declarations, node.flags), node)
- : node;
- }
- ts.updateVariableDeclarationList = updateVariableDeclarationList;
- function createVariableDeclaration(name, type, initializer) {
- var node = createSynthesizedNode(226 /* VariableDeclaration */);
- node.name = asName(name);
- node.type = type;
- node.initializer = initializer !== undefined ? ts.parenthesizeExpressionForList(initializer) : undefined;
- return node;
- }
- ts.createVariableDeclaration = createVariableDeclaration;
- function updateVariableDeclaration(node, name, type, initializer) {
- return node.name !== name
- || node.type !== type
- || node.initializer !== initializer
- ? updateNode(createVariableDeclaration(name, type, initializer), node)
- : node;
- }
- ts.updateVariableDeclaration = updateVariableDeclaration;
function createEmptyStatement() {
return createSynthesizedNode(209 /* EmptyStatement */);
}
@@ -12232,6 +13234,39 @@ var ts;
: node;
}
ts.updateTry = updateTry;
+ function createDebuggerStatement() {
+ return createSynthesizedNode(225 /* DebuggerStatement */);
+ }
+ ts.createDebuggerStatement = createDebuggerStatement;
+ function createVariableDeclaration(name, type, initializer) {
+ var node = createSynthesizedNode(226 /* VariableDeclaration */);
+ node.name = asName(name);
+ node.type = type;
+ node.initializer = initializer !== undefined ? ts.parenthesizeExpressionForList(initializer) : undefined;
+ return node;
+ }
+ ts.createVariableDeclaration = createVariableDeclaration;
+ function updateVariableDeclaration(node, name, type, initializer) {
+ return node.name !== name
+ || node.type !== type
+ || node.initializer !== initializer
+ ? updateNode(createVariableDeclaration(name, type, initializer), node)
+ : node;
+ }
+ ts.updateVariableDeclaration = updateVariableDeclaration;
+ function createVariableDeclarationList(declarations, flags) {
+ var node = createSynthesizedNode(227 /* VariableDeclarationList */);
+ node.flags |= flags & 3 /* BlockScoped */;
+ node.declarations = createNodeArray(declarations);
+ return node;
+ }
+ ts.createVariableDeclarationList = createVariableDeclarationList;
+ function updateVariableDeclarationList(node, declarations) {
+ return node.declarations !== declarations
+ ? updateNode(createVariableDeclarationList(declarations, node.flags), node)
+ : node;
+ }
+ ts.updateVariableDeclarationList = updateVariableDeclarationList;
function createFunctionDeclaration(decorators, modifiers, asteriskToken, name, typeParameters, parameters, type, body) {
var node = createSynthesizedNode(228 /* FunctionDeclaration */);
node.decorators = asNodeArray(decorators);
@@ -12280,6 +13315,48 @@ var ts;
: node;
}
ts.updateClassDeclaration = updateClassDeclaration;
+ function createInterfaceDeclaration(decorators, modifiers, name, typeParameters, heritageClauses, members) {
+ var node = createSynthesizedNode(230 /* InterfaceDeclaration */);
+ 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.createInterfaceDeclaration = createInterfaceDeclaration;
+ function updateInterfaceDeclaration(node, decorators, modifiers, name, typeParameters, heritageClauses, members) {
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.name !== name
+ || node.typeParameters !== typeParameters
+ || node.heritageClauses !== heritageClauses
+ || node.members !== members
+ ? updateNode(createInterfaceDeclaration(decorators, modifiers, name, typeParameters, heritageClauses, members), node)
+ : node;
+ }
+ ts.updateInterfaceDeclaration = updateInterfaceDeclaration;
+ function createTypeAliasDeclaration(decorators, modifiers, name, typeParameters, type) {
+ var node = createSynthesizedNode(231 /* TypeAliasDeclaration */);
+ node.decorators = asNodeArray(decorators);
+ node.modifiers = asNodeArray(modifiers);
+ node.name = asName(name);
+ node.typeParameters = asNodeArray(typeParameters);
+ node.type = type;
+ return node;
+ }
+ ts.createTypeAliasDeclaration = createTypeAliasDeclaration;
+ function updateTypeAliasDeclaration(node, decorators, modifiers, name, typeParameters, type) {
+ return node.decorators !== decorators
+ || node.modifiers !== modifiers
+ || node.name !== name
+ || node.typeParameters !== typeParameters
+ || node.type !== type
+ ? updateNode(createTypeAliasDeclaration(decorators, modifiers, name, typeParameters, type), node)
+ : node;
+ }
+ ts.updateTypeAliasDeclaration = updateTypeAliasDeclaration;
function createEnumDeclaration(decorators, modifiers, name, members) {
var node = createSynthesizedNode(232 /* EnumDeclaration */);
node.decorators = asNodeArray(decorators);
@@ -12300,7 +13377,7 @@ var ts;
ts.updateEnumDeclaration = updateEnumDeclaration;
function createModuleDeclaration(decorators, modifiers, name, body, flags) {
var node = createSynthesizedNode(233 /* ModuleDeclaration */);
- node.flags |= flags;
+ node.flags |= flags & (16 /* Namespace */ | 4 /* NestedNamespace */ | 512 /* GlobalAugmentation */);
node.decorators = asNodeArray(decorators);
node.modifiers = asNodeArray(modifiers);
node.name = name;
@@ -12341,6 +13418,18 @@ var ts;
: node;
}
ts.updateCaseBlock = updateCaseBlock;
+ function createNamespaceExportDeclaration(name) {
+ var node = createSynthesizedNode(236 /* NamespaceExportDeclaration */);
+ node.name = asName(name);
+ return node;
+ }
+ ts.createNamespaceExportDeclaration = createNamespaceExportDeclaration;
+ function updateNamespaceExportDeclaration(node, name) {
+ return node.name !== name
+ ? updateNode(createNamespaceExportDeclaration(name), node)
+ : node;
+ }
+ ts.updateNamespaceExportDeclaration = updateNamespaceExportDeclaration;
function createImportEqualsDeclaration(decorators, modifiers, name, moduleReference) {
var node = createSynthesizedNode(237 /* ImportEqualsDeclaration */);
node.decorators = asNodeArray(decorators);
@@ -12371,7 +13460,8 @@ var ts;
function updateImportDeclaration(node, decorators, modifiers, importClause, moduleSpecifier) {
return node.decorators !== decorators
|| node.modifiers !== modifiers
- || node.importClause !== importClause || node.moduleSpecifier !== moduleSpecifier
+ || node.importClause !== importClause
+ || node.moduleSpecifier !== moduleSpecifier
? updateNode(createImportDeclaration(decorators, modifiers, importClause, moduleSpecifier), node)
: node;
}
@@ -12559,19 +13649,6 @@ var ts;
: node;
}
ts.updateJsxClosingElement = updateJsxClosingElement;
- function createJsxAttributes(properties) {
- var jsxAttributes = createSynthesizedNode(254 /* 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(253 /* JsxAttribute */);
node.name = name;
@@ -12586,6 +13663,18 @@ var ts;
: node;
}
ts.updateJsxAttribute = updateJsxAttribute;
+ function createJsxAttributes(properties) {
+ var node = createSynthesizedNode(254 /* JsxAttributes */);
+ node.properties = createNodeArray(properties);
+ return node;
+ }
+ ts.createJsxAttributes = createJsxAttributes;
+ function updateJsxAttributes(node, properties) {
+ return node.properties !== properties
+ ? updateNode(createJsxAttributes(properties), node)
+ : node;
+ }
+ ts.updateJsxAttributes = updateJsxAttributes;
function createJsxSpreadAttribute(expression) {
var node = createSynthesizedNode(255 /* JsxSpreadAttribute */);
node.expression = expression;
@@ -12612,20 +13701,6 @@ var ts;
}
ts.updateJsxExpression = updateJsxExpression;
// Clauses
- function createHeritageClause(token, types) {
- var node = createSynthesizedNode(259 /* HeritageClause */);
- node.token = token;
- node.types = createNodeArray(types);
- return node;
- }
- ts.createHeritageClause = createHeritageClause;
- function updateHeritageClause(node, types) {
- if (node.types !== types) {
- return updateNode(createHeritageClause(node.token, types), node);
- }
- return node;
- }
- ts.updateHeritageClause = updateHeritageClause;
function createCaseClause(expression, statements) {
var node = createSynthesizedNode(257 /* CaseClause */);
node.expression = ts.parenthesizeExpressionForList(expression);
@@ -12634,10 +13709,10 @@ var ts;
}
ts.createCaseClause = createCaseClause;
function updateCaseClause(node, expression, statements) {
- if (node.expression !== expression || node.statements !== statements) {
- return updateNode(createCaseClause(expression, statements), node);
- }
- return node;
+ return node.expression !== expression
+ || node.statements !== statements
+ ? updateNode(createCaseClause(expression, statements), node)
+ : node;
}
ts.updateCaseClause = updateCaseClause;
function createDefaultClause(statements) {
@@ -12647,12 +13722,24 @@ var ts;
}
ts.createDefaultClause = createDefaultClause;
function updateDefaultClause(node, statements) {
- if (node.statements !== statements) {
- return updateNode(createDefaultClause(statements), node);
- }
- return node;
+ return node.statements !== statements
+ ? updateNode(createDefaultClause(statements), node)
+ : node;
}
ts.updateDefaultClause = updateDefaultClause;
+ function createHeritageClause(token, types) {
+ var node = createSynthesizedNode(259 /* HeritageClause */);
+ node.token = token;
+ node.types = createNodeArray(types);
+ return node;
+ }
+ ts.createHeritageClause = createHeritageClause;
+ function updateHeritageClause(node, types) {
+ return node.types !== types
+ ? updateNode(createHeritageClause(node.token, types), node)
+ : node;
+ }
+ ts.updateHeritageClause = updateHeritageClause;
function createCatchClause(variableDeclaration, block) {
var node = createSynthesizedNode(260 /* CatchClause */);
node.variableDeclaration = typeof variableDeclaration === "string" ? createVariableDeclaration(variableDeclaration) : variableDeclaration;
@@ -12661,10 +13748,10 @@ var ts;
}
ts.createCatchClause = createCatchClause;
function updateCatchClause(node, variableDeclaration, block) {
- if (node.variableDeclaration !== variableDeclaration || node.block !== block) {
- return updateNode(createCatchClause(variableDeclaration, block), node);
- }
- return node;
+ return node.variableDeclaration !== variableDeclaration
+ || node.block !== block
+ ? updateNode(createCatchClause(variableDeclaration, block), node)
+ : node;
}
ts.updateCatchClause = updateCatchClause;
// Property assignments
@@ -12677,10 +13764,10 @@ var ts;
}
ts.createPropertyAssignment = createPropertyAssignment;
function updatePropertyAssignment(node, name, initializer) {
- if (node.name !== name || node.initializer !== initializer) {
- return updateNode(createPropertyAssignment(name, initializer), node);
- }
- return node;
+ return node.name !== name
+ || node.initializer !== initializer
+ ? updateNode(createPropertyAssignment(name, initializer), node)
+ : node;
}
ts.updatePropertyAssignment = updatePropertyAssignment;
function createShorthandPropertyAssignment(name, objectAssignmentInitializer) {
@@ -12691,10 +13778,10 @@ var ts;
}
ts.createShorthandPropertyAssignment = createShorthandPropertyAssignment;
function updateShorthandPropertyAssignment(node, name, objectAssignmentInitializer) {
- if (node.name !== name || node.objectAssignmentInitializer !== objectAssignmentInitializer) {
- return updateNode(createShorthandPropertyAssignment(name, objectAssignmentInitializer), node);
- }
- return node;
+ return node.name !== name
+ || node.objectAssignmentInitializer !== objectAssignmentInitializer
+ ? updateNode(createShorthandPropertyAssignment(name, objectAssignmentInitializer), node)
+ : node;
}
ts.updateShorthandPropertyAssignment = updateShorthandPropertyAssignment;
function createSpreadAssignment(expression) {
@@ -12704,10 +13791,9 @@ var ts;
}
ts.createSpreadAssignment = createSpreadAssignment;
function updateSpreadAssignment(node, expression) {
- if (node.expression !== expression) {
- return updateNode(createSpreadAssignment(expression), node);
- }
- return node;
+ return node.expression !== expression
+ ? updateNode(createSpreadAssignment(expression), node)
+ : node;
}
ts.updateSpreadAssignment = updateSpreadAssignment;
// Enum
@@ -12807,7 +13893,7 @@ var ts;
* @param original The original statement.
*/
function createNotEmittedStatement(original) {
- var node = createSynthesizedNode(295 /* NotEmittedStatement */);
+ var node = createSynthesizedNode(296 /* NotEmittedStatement */);
node.original = original;
setTextRange(node, original);
return node;
@@ -12819,7 +13905,7 @@ var ts;
*/
/* @internal */
function createEndOfDeclarationMarker(original) {
- var node = createSynthesizedNode(298 /* EndOfDeclarationMarker */);
+ var node = createSynthesizedNode(300 /* EndOfDeclarationMarker */);
node.emitNode = {};
node.original = original;
return node;
@@ -12831,7 +13917,7 @@ var ts;
*/
/* @internal */
function createMergeDeclarationMarker(original) {
- var node = createSynthesizedNode(297 /* MergeDeclarationMarker */);
+ var node = createSynthesizedNode(299 /* MergeDeclarationMarker */);
node.emitNode = {};
node.original = original;
return node;
@@ -12846,7 +13932,7 @@ var ts;
* @param location The location for the expression. Defaults to the positions from "original" if provided.
*/
function createPartiallyEmittedExpression(expression, original) {
- var node = createSynthesizedNode(296 /* PartiallyEmittedExpression */);
+ var node = createSynthesizedNode(297 /* PartiallyEmittedExpression */);
node.expression = expression;
node.original = original;
setTextRange(node, original);
@@ -12860,6 +13946,29 @@ var ts;
return node;
}
ts.updatePartiallyEmittedExpression = updatePartiallyEmittedExpression;
+ function flattenCommaElements(node) {
+ if (ts.nodeIsSynthesized(node) && !ts.isParseTreeNode(node) && !node.original && !node.emitNode && !node.id) {
+ if (node.kind === 298 /* CommaListExpression */) {
+ return node.elements;
+ }
+ if (ts.isBinaryExpression(node) && node.operatorToken.kind === 26 /* CommaToken */) {
+ return [node.left, node.right];
+ }
+ }
+ return node;
+ }
+ function createCommaList(elements) {
+ var node = createSynthesizedNode(298 /* CommaListExpression */);
+ node.elements = createNodeArray(ts.sameFlatMap(elements, flattenCommaElements));
+ return node;
+ }
+ ts.createCommaList = createCommaList;
+ function updateCommaList(node, elements) {
+ return node.elements !== elements
+ ? updateNode(createCommaList(elements), node)
+ : node;
+ }
+ ts.updateCommaList = updateCommaList;
function createBundle(sourceFiles) {
var node = ts.createNode(266 /* Bundle */);
node.sourceFiles = sourceFiles;
@@ -12873,7 +13982,18 @@ var ts;
return node;
}
ts.updateBundle = updateBundle;
- // Compound nodes
+ function createImmediatelyInvokedFunctionExpression(statements, param, paramValue) {
+ return createCall(createFunctionExpression(
+ /*modifiers*/ undefined,
+ /*asteriskToken*/ undefined,
+ /*name*/ undefined,
+ /*typeParameters*/ undefined,
+ /*parameters*/ param ? [param] : [],
+ /*type*/ undefined, createBlock(statements, /*multiLine*/ true)),
+ /*typeArguments*/ undefined,
+ /*argumentsArray*/ paramValue ? [paramValue] : []);
+ }
+ ts.createImmediatelyInvokedFunctionExpression = createImmediatelyInvokedFunctionExpression;
function createComma(left, right) {
return createBinary(left, 26 /* CommaToken */, right);
}
@@ -13026,6 +14146,14 @@ var ts;
return node;
}
ts.setSourceMapRange = setSourceMapRange;
+ var SourceMapSource;
+ /**
+ * Create an external source map source file reference
+ */
+ function createSourceMapSource(fileName, text, skipTrivia) {
+ return new (SourceMapSource || (SourceMapSource = ts.objectAllocator.getSourceMapSourceConstructor()))(fileName, text, skipTrivia);
+ }
+ ts.createSourceMapSource = createSourceMapSource;
/**
* Gets the TextRange to use for source maps for a token of a node.
*/
@@ -13207,6 +14335,7 @@ var ts;
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 = {};
+ // We are using `.slice()` here in case `destEmitNode.leadingComments` is pushed to later.
if (leadingComments)
destEmitNode.leadingComments = ts.addRange(leadingComments.slice(), destEmitNode.leadingComments);
if (trailingComments)
@@ -13236,7 +14365,25 @@ var ts;
})(ts || (ts = {}));
/* @internal */
(function (ts) {
- // Compound nodes
+ ts.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 createTypeCheck(value, tag) {
return tag === "undefined"
? ts.createStrictEquality(value, ts.createVoidZero())
@@ -13498,7 +14645,11 @@ var ts;
}
ts.createCallBinding = createCallBinding;
function inlineExpressions(expressions) {
- return ts.reduceLeft(expressions, ts.createComma);
+ // Avoid deeply nested comma expressions as traversing them during emit can result in "Maximum call
+ // stack size exceeded" errors.
+ return expressions.length > 10
+ ? ts.createCommaList(expressions)
+ : ts.reduceLeft(expressions, ts.createComma);
}
ts.inlineExpressions = inlineExpressions;
function createExpressionFromEntityName(node) {
@@ -13596,6 +14747,28 @@ var ts;
/*original*/ method));
}
/**
+ * Gets the internal name of a declaration. This is primarily used for declarations that can be
+ * referred to by name in the body of an ES5 class function body. An internal name will *never*
+ * be prefixed with an module or namespace export modifier like "exports." when emitted as an
+ * expression. An internal name will also *never* be renamed due to a collision with a block
+ * scoped variable.
+ *
+ * @param node The declaration.
+ * @param allowComments A value indicating whether comments may be emitted for the name.
+ * @param allowSourceMaps A value indicating whether source maps may be emitted for the name.
+ */
+ function getInternalName(node, allowComments, allowSourceMaps) {
+ return getName(node, allowComments, allowSourceMaps, 16384 /* LocalName */ | 32768 /* InternalName */);
+ }
+ ts.getInternalName = getInternalName;
+ /**
+ * Gets whether an identifier should only be referred to by its internal name.
+ */
+ function isInternalName(node) {
+ return (ts.getEmitFlags(node) & 32768 /* InternalName */) !== 0;
+ }
+ ts.isInternalName = isInternalName;
+ /**
* Gets the local name of a declaration. This is primarily used for declarations that can be
* referred to by name in the declaration's immediate scope (classes, enums, namespaces). A
* local name will *never* be prefixed with an module or namespace export modifier like
@@ -13650,9 +14823,10 @@ var ts;
}
ts.getDeclarationName = getDeclarationName;
function getName(node, allowComments, allowSourceMaps, emitFlags) {
- if (node.name && ts.isIdentifier(node.name) && !ts.isGeneratedIdentifier(node.name)) {
- var name = ts.getMutableClone(node.name);
- emitFlags |= ts.getEmitFlags(node.name);
+ var nodeName = ts.getNameOfDeclaration(node);
+ if (nodeName && ts.isIdentifier(nodeName) && !ts.isGeneratedIdentifier(nodeName)) {
+ var name = ts.getMutableClone(nodeName);
+ emitFlags |= ts.getEmitFlags(nodeName);
if (!allowSourceMaps)
emitFlags |= 48 /* NoSourceMap */;
if (!allowComments)
@@ -13706,6 +14880,18 @@ var ts;
return ts.isBlock(node) ? node : ts.setTextRange(ts.createBlock([ts.setTextRange(ts.createReturn(node), node)], multiLine), node);
}
ts.convertToFunctionBody = convertToFunctionBody;
+ function convertFunctionDeclarationToExpression(node) {
+ ts.Debug.assert(!!node.body);
+ var updated = ts.createFunctionExpression(node.modifiers, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body);
+ ts.setOriginalNode(updated, node);
+ ts.setTextRange(updated, node);
+ if (node.startsOnNewLine) {
+ updated.startsOnNewLine = true;
+ }
+ ts.aggregateTransformFlags(updated);
+ return updated;
+ }
+ ts.convertFunctionDeclarationToExpression = convertFunctionDeclarationToExpression;
function isUseStrictPrologue(node) {
return node.expression.text === "use strict";
}
@@ -13765,7 +14951,7 @@ var ts;
var numStatements = source.length;
while (statementOffset < numStatements) {
var statement = source[statementOffset];
- if (ts.getEmitFlags(statement) & 524288 /* CustomPrologue */) {
+ if (ts.getEmitFlags(statement) & 1048576 /* CustomPrologue */) {
target.push(visitor ? ts.visitNode(statement, visitor, ts.isStatement) : statement);
}
else {
@@ -13810,16 +14996,6 @@ var ts;
return statements;
}
ts.ensureUseStrict = ensureUseStrict;
- function parenthesizeConditionalHead(condition) {
- var conditionalPrecedence = ts.getOperatorPrecedence(195 /* ConditionalExpression */, 55 /* 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.
@@ -14083,7 +15259,7 @@ var ts;
if (kind === 186 /* FunctionExpression */ || kind === 187 /* ArrowFunction */) {
var mutableCall = ts.getMutableClone(emittedExpression);
mutableCall.expression = ts.setTextRange(ts.createParen(callee), callee);
- return recreatePartiallyEmittedExpressions(expression, mutableCall);
+ return recreateOuterExpressions(expression, mutableCall, 4 /* PartiallyEmittedExpressions */);
}
}
else {
@@ -14095,20 +15271,34 @@ var ts;
return expression;
}
ts.parenthesizeExpressionForExpressionStatement = parenthesizeExpressionForExpressionStatement;
- /**
- * Clones a series of not-emitted expressions with a new inner expression.
- *
- * @param originalOuterExpression The original outer expression.
- * @param newInnerExpression The new inner expression.
- */
- function recreatePartiallyEmittedExpressions(originalOuterExpression, newInnerExpression) {
- if (ts.isPartiallyEmittedExpression(originalOuterExpression)) {
- var clone_1 = ts.getMutableClone(originalOuterExpression);
- clone_1.expression = recreatePartiallyEmittedExpressions(clone_1.expression, newInnerExpression);
- return clone_1;
+ function parenthesizeElementTypeMember(member) {
+ switch (member.kind) {
+ case 166 /* UnionType */:
+ case 167 /* IntersectionType */:
+ case 160 /* FunctionType */:
+ case 161 /* ConstructorType */:
+ return ts.createParenthesizedType(member);
}
- return newInnerExpression;
+ return member;
}
+ ts.parenthesizeElementTypeMember = parenthesizeElementTypeMember;
+ function parenthesizeElementTypeMembers(members) {
+ return ts.createNodeArray(ts.sameMap(members, parenthesizeElementTypeMember));
+ }
+ ts.parenthesizeElementTypeMembers = parenthesizeElementTypeMembers;
+ function parenthesizeTypeParameters(typeParameters) {
+ if (ts.some(typeParameters)) {
+ var nodeArray = ts.createNodeArray();
+ for (var i = 0; i < typeParameters.length; ++i) {
+ var entry = typeParameters[i];
+ nodeArray.push(i === 0 && ts.isFunctionOrConstructorTypeNode(entry) && entry.typeParameters ?
+ ts.createParenthesizedType(entry) :
+ entry);
+ }
+ return nodeArray;
+ }
+ }
+ ts.parenthesizeTypeParameters = parenthesizeTypeParameters;
function getLeftmostExpression(node) {
while (true) {
switch (node.kind) {
@@ -14126,7 +15316,7 @@ var ts;
case 179 /* PropertyAccessExpression */:
node = node.expression;
continue;
- case 296 /* PartiallyEmittedExpression */:
+ case 297 /* PartiallyEmittedExpression */:
node = node.expression;
continue;
}
@@ -14147,6 +15337,21 @@ var ts;
OuterExpressionKinds[OuterExpressionKinds["PartiallyEmittedExpressions"] = 4] = "PartiallyEmittedExpressions";
OuterExpressionKinds[OuterExpressionKinds["All"] = 7] = "All";
})(OuterExpressionKinds = ts.OuterExpressionKinds || (ts.OuterExpressionKinds = {}));
+ function isOuterExpression(node, kinds) {
+ if (kinds === void 0) { kinds = 7 /* All */; }
+ switch (node.kind) {
+ case 185 /* ParenthesizedExpression */:
+ return (kinds & 1 /* Parentheses */) !== 0;
+ case 184 /* TypeAssertionExpression */:
+ case 202 /* AsExpression */:
+ case 203 /* NonNullExpression */:
+ return (kinds & 2 /* Assertions */) !== 0;
+ case 297 /* PartiallyEmittedExpression */:
+ return (kinds & 4 /* PartiallyEmittedExpressions */) !== 0;
+ }
+ return false;
+ }
+ ts.isOuterExpression = isOuterExpression;
function skipOuterExpressions(node, kinds) {
if (kinds === void 0) { kinds = 7 /* All */; }
var previousNode;
@@ -14173,19 +15378,36 @@ var ts;
}
ts.skipParentheses = skipParentheses;
function skipAssertions(node) {
- while (ts.isAssertionExpression(node)) {
+ while (ts.isAssertionExpression(node) || node.kind === 203 /* NonNullExpression */) {
node = node.expression;
}
return node;
}
ts.skipAssertions = skipAssertions;
function skipPartiallyEmittedExpressions(node) {
- while (node.kind === 296 /* PartiallyEmittedExpression */) {
+ while (node.kind === 297 /* PartiallyEmittedExpression */) {
node = node.expression;
}
return node;
}
ts.skipPartiallyEmittedExpressions = skipPartiallyEmittedExpressions;
+ function updateOuterExpression(outerExpression, expression) {
+ switch (outerExpression.kind) {
+ case 185 /* ParenthesizedExpression */: return ts.updateParen(outerExpression, expression);
+ case 184 /* TypeAssertionExpression */: return ts.updateTypeAssertion(outerExpression, outerExpression.type, expression);
+ case 202 /* AsExpression */: return ts.updateAsExpression(outerExpression, expression, outerExpression.type);
+ case 203 /* NonNullExpression */: return ts.updateNonNullExpression(outerExpression, expression);
+ case 297 /* PartiallyEmittedExpression */: return ts.updatePartiallyEmittedExpression(outerExpression, expression);
+ }
+ }
+ function recreateOuterExpressions(outerExpression, innerExpression, kinds) {
+ if (kinds === void 0) { kinds = 7 /* All */; }
+ if (outerExpression && isOuterExpression(outerExpression, kinds)) {
+ return updateOuterExpression(outerExpression, recreateOuterExpressions(outerExpression.expression, innerExpression));
+ }
+ return innerExpression;
+ }
+ ts.recreateOuterExpressions = recreateOuterExpressions;
function startOnNewLine(node) {
node.startsOnNewLine = true;
return node;
@@ -14197,23 +15419,33 @@ var ts;
return emitNode && emitNode.externalHelpersModuleName;
}
ts.getExternalHelpersModuleName = getExternalHelpersModuleName;
- function getOrCreateExternalHelpersModuleNameIfNeeded(node, compilerOptions) {
- if (compilerOptions.importHelpers && (ts.isExternalModule(node) || compilerOptions.isolatedModules)) {
+ function getOrCreateExternalHelpersModuleNameIfNeeded(node, compilerOptions, hasExportStarsToExportValues) {
+ if (compilerOptions.importHelpers && ts.isEffectiveExternalModule(node, compilerOptions)) {
var externalHelpersModuleName = getExternalHelpersModuleName(node);
if (externalHelpersModuleName) {
return externalHelpersModuleName;
}
- var helpers = ts.getEmitHelpers(node);
- if (helpers) {
- 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 = ts.getOrCreateEmitNode(parseNode);
- return emitNode.externalHelpersModuleName || (emitNode.externalHelpersModuleName = ts.createUniqueName(ts.externalHelpersModuleNameText));
+ var moduleKind = ts.getEmitModuleKind(compilerOptions);
+ var create = hasExportStarsToExportValues
+ && moduleKind !== ts.ModuleKind.System
+ && moduleKind !== ts.ModuleKind.ES2015;
+ if (!create) {
+ var helpers = ts.getEmitHelpers(node);
+ if (helpers) {
+ for (var _i = 0, helpers_2 = helpers; _i < helpers_2.length; _i++) {
+ var helper = helpers_2[_i];
+ if (!helper.scoped) {
+ create = true;
+ break;
+ }
}
}
}
+ if (create) {
+ var parseNode = ts.getOriginalNode(node, ts.isSourceFile);
+ var emitNode = ts.getOrCreateEmitNode(parseNode);
+ return emitNode.externalHelpersModuleName || (emitNode.externalHelpersModuleName = ts.createUniqueName(ts.externalHelpersModuleNameText));
+ }
}
}
ts.getOrCreateExternalHelpersModuleNameIfNeeded = getOrCreateExternalHelpersModuleNameIfNeeded;
@@ -14275,7 +15507,7 @@ var ts;
if (file.moduleName) {
return ts.createLiteral(file.moduleName);
}
- if (!ts.isDeclarationFile(file) && (options.out || options.outFile)) {
+ if (!file.isDeclarationFile && (options.out || options.outFile)) {
return ts.createLiteral(ts.getExternalModuleNameFromPath(host, file.fileName));
}
return undefined;
@@ -14316,7 +15548,7 @@ var ts;
// `1` in `[[a] = 1] = ...`
return bindingElement.right;
}
- if (ts.isSpreadExpression(bindingElement)) {
+ if (ts.isSpreadElement(bindingElement)) {
// Recovery consistent with existing emit.
return getInitializerOfBindingOrAssignmentElement(bindingElement.expression);
}
@@ -14378,7 +15610,7 @@ var ts;
// `a[0]` in `[a[0] = 1] = ...`
return getTargetOfBindingOrAssignmentElement(bindingElement.left);
}
- if (ts.isSpreadExpression(bindingElement)) {
+ if (ts.isSpreadElement(bindingElement)) {
// `a` in `[...a] = ...`
return getTargetOfBindingOrAssignmentElement(bindingElement.expression);
}
@@ -14542,13 +15774,6 @@ var ts;
var hasExportDefault = false;
var exportEquals = undefined;
var hasExportStarsToExportValues = false;
- var externalHelpersModuleName = getOrCreateExternalHelpersModuleNameIfNeeded(sourceFile, compilerOptions);
- var externalHelpersImportDeclaration = externalHelpersModuleName && ts.createImportDeclaration(
- /*decorators*/ undefined,
- /*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) {
@@ -14651,6 +15876,13 @@ var ts;
break;
}
}
+ var externalHelpersModuleName = getOrCreateExternalHelpersModuleNameIfNeeded(sourceFile, compilerOptions, hasExportStarsToExportValues);
+ var externalHelpersImportDeclaration = externalHelpersModuleName && ts.createImportDeclaration(
+ /*decorators*/ undefined,
+ /*modifiers*/ undefined, ts.createImportClause(/*name*/ undefined, ts.createNamespaceImport(externalHelpersModuleName)), ts.createLiteral(ts.externalHelpersModuleNameText));
+ if (externalHelpersImportDeclaration) {
+ externalImports.unshift(externalHelpersImportDeclaration);
+ }
return { externalImports: externalImports, exportSpecifiers: exportSpecifiers, exportEquals: exportEquals, hasExportStarsToExportValues: hasExportStarsToExportValues, exportedBindings: exportedBindings, exportedNames: exportedNames, externalHelpersImportDeclaration: externalHelpersImportDeclaration };
}
ts.collectExternalModuleInfo = collectExternalModuleInfo;
@@ -14699,7 +15931,7 @@ var ts;
else if (kind === 71 /* Identifier */) {
return new (IdentifierConstructor || (IdentifierConstructor = ts.objectAllocator.getIdentifierConstructor()))(kind, pos, end);
}
- else if (kind < 143 /* FirstNode */) {
+ else if (!ts.isNodeKind(kind)) {
return new (TokenConstructor || (TokenConstructor = ts.objectAllocator.getTokenConstructor()))(kind, pos, end);
}
else {
@@ -14728,10 +15960,16 @@ var ts;
}
}
}
- // Invokes a callback for each child of the given node. The 'cbNode' callback is invoked for all child nodes
- // stored in properties. If a 'cbNodes' callback is specified, it is invoked for embedded arrays; otherwise,
- // embedded arrays are flattened and the 'cbNode' callback is invoked for each element. If a callback returns
- // a truthy value, iteration stops and that value is returned. Otherwise, undefined is returned.
+ /**
+ * Invokes a callback for each child of the given node. The 'cbNode' callback is invoked for all child nodes
+ * stored in properties. If a 'cbNodes' callback is specified, it is invoked for embedded arrays; otherwise,
+ * embedded arrays are flattened and the 'cbNode' callback is invoked for each element. If a callback returns
+ * a truthy value, iteration stops and that value is returned. Otherwise, undefined is returned.
+ *
+ * @param node a given node to visit its children
+ * @param cbNode a callback to be invoked for all child nodes
+ * @param cbNodeArray a callback to be invoked for embedded array
+ */
function forEachChild(node, cbNode, cbNodeArray) {
if (!node) {
return;
@@ -15043,6 +16281,8 @@ var ts;
return visitNode(cbNode, node.expression);
case 247 /* MissingDeclaration */:
return visitNodes(cbNodes, node.decorators);
+ case 298 /* CommaListExpression */:
+ return visitNodes(cbNodes, node.elements);
case 249 /* JsxElement */:
return visitNode(cbNode, node.openingElement) ||
visitNodes(cbNodes, node.children) ||
@@ -15096,31 +16336,31 @@ var ts;
visitNode(cbNode, node.type);
case 283 /* JSDocComment */:
return visitNodes(cbNodes, node.tags);
- case 286 /* JSDocParameterTag */:
+ case 287 /* JSDocParameterTag */:
return visitNode(cbNode, node.preParameterName) ||
visitNode(cbNode, node.typeExpression) ||
visitNode(cbNode, node.postParameterName);
- case 287 /* JSDocReturnTag */:
+ case 288 /* JSDocReturnTag */:
return visitNode(cbNode, node.typeExpression);
- case 288 /* JSDocTypeTag */:
+ case 289 /* JSDocTypeTag */:
return visitNode(cbNode, node.typeExpression);
case 285 /* JSDocAugmentsTag */:
return visitNode(cbNode, node.typeExpression);
- case 289 /* JSDocTemplateTag */:
+ case 290 /* JSDocTemplateTag */:
return visitNodes(cbNodes, node.typeParameters);
- case 290 /* JSDocTypedefTag */:
+ case 291 /* JSDocTypedefTag */:
return visitNode(cbNode, node.typeExpression) ||
visitNode(cbNode, node.fullName) ||
visitNode(cbNode, node.name) ||
visitNode(cbNode, node.jsDocTypeLiteral);
- case 292 /* JSDocTypeLiteral */:
+ case 293 /* JSDocTypeLiteral */:
return visitNodes(cbNodes, node.jsDocPropertyTags);
- case 291 /* JSDocPropertyTag */:
+ case 292 /* JSDocPropertyTag */:
return visitNode(cbNode, node.typeExpression) ||
visitNode(cbNode, node.name);
- case 296 /* PartiallyEmittedExpression */:
+ case 297 /* PartiallyEmittedExpression */:
return visitNode(cbNode, node.expression);
- case 293 /* JSDocLiteralType */:
+ case 294 /* JSDocLiteralType */:
return visitNode(cbNode, node.literal);
}
}
@@ -15153,7 +16393,11 @@ var ts;
// becoming detached from any SourceFile). It is recommended that this SourceFile not
// be used once 'update' is called on it.
function updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks) {
- return IncrementalParser.updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks);
+ var newSourceFile = IncrementalParser.updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks);
+ // Because new source file node is created, it may not have the flag PossiblyContainDynamicImport. This is the case if there is no new edit to add dynamic import.
+ // We will manually port the flag to the new source file.
+ newSourceFile.flags |= (sourceFile.flags & 524288 /* PossiblyContainsDynamicImport */);
+ return newSourceFile;
}
ts.updateSourceFile = updateSourceFile;
/* @internal */
@@ -15332,7 +16576,7 @@ var ts;
processReferenceComments(sourceFile);
sourceFile.statements = parseList(0 /* SourceElements */, parseStatement);
ts.Debug.assert(token() === 1 /* EndOfFileToken */);
- sourceFile.endOfFileToken = parseTokenNode();
+ sourceFile.endOfFileToken = addJSDocComment(parseTokenNode());
setExternalModuleIndicator(sourceFile);
sourceFile.nodeCount = nodeCount;
sourceFile.identifierCount = identifierCount;
@@ -15677,7 +16921,7 @@ var ts;
if (!(pos >= 0)) {
pos = scanner.getStartPos();
}
- return kind >= 143 /* FirstNode */ ? new NodeConstructor(kind, pos, pos) :
+ return ts.isNodeKind(kind) ? new NodeConstructor(kind, pos, pos) :
kind === 71 /* Identifier */ ? new IdentifierConstructor(kind, pos, pos) :
new TokenConstructor(kind, pos, pos);
}
@@ -15800,12 +17044,12 @@ var ts;
if (token() === 84 /* ExportKeyword */) {
nextToken();
if (token() === 79 /* DefaultKeyword */) {
- return lookAhead(nextTokenIsClassOrFunctionOrAsync);
+ return lookAhead(nextTokenCanFollowDefaultKeyword);
}
return token() !== 39 /* AsteriskToken */ && token() !== 118 /* AsKeyword */ && token() !== 17 /* OpenBraceToken */ && canFollowModifier();
}
if (token() === 79 /* DefaultKeyword */) {
- return nextTokenIsClassOrFunctionOrAsync();
+ return nextTokenCanFollowDefaultKeyword();
}
if (token() === 115 /* StaticKeyword */) {
nextToken();
@@ -15823,9 +17067,10 @@ var ts;
|| token() === 24 /* DotDotDotToken */
|| isLiteralPropertyName();
}
- function nextTokenIsClassOrFunctionOrAsync() {
+ function nextTokenCanFollowDefaultKeyword() {
nextToken();
return token() === 75 /* ClassKeyword */ || token() === 89 /* FunctionKeyword */ ||
+ token() === 109 /* InterfaceKeyword */ ||
(token() === 117 /* AbstractKeyword */ && lookAhead(nextTokenIsClassKeywordOnSameLine)) ||
(token() === 120 /* AsyncKeyword */ && lookAhead(nextTokenIsFunctionKeywordOnSameLine));
}
@@ -16803,7 +18048,7 @@ var ts;
if (token() === 19 /* OpenParenToken */ || token() === 27 /* LessThanToken */) {
return parseSignatureMember(155 /* CallSignature */);
}
- if (token() === 94 /* NewKeyword */ && lookAhead(isStartOfConstructSignature)) {
+ if (token() === 94 /* NewKeyword */ && lookAhead(nextTokenIsOpenParenOrLessThan)) {
return parseSignatureMember(156 /* ConstructSignature */);
}
var fullStart = getNodePos();
@@ -16813,7 +18058,7 @@ var ts;
}
return parsePropertyOrMethodSignature(fullStart, modifiers);
}
- function isStartOfConstructSignature() {
+ function nextTokenIsOpenParenOrLessThan() {
nextToken();
return token() === 19 /* OpenParenToken */ || token() === 27 /* LessThanToken */;
}
@@ -17140,6 +18385,8 @@ var ts;
case 63 /* SlashEqualsToken */:
case 71 /* Identifier */:
return true;
+ case 91 /* ImportKeyword */:
+ return lookAhead(nextTokenIsOpenParenOrLessThan);
default:
return isIdentifier();
}
@@ -17780,10 +19027,10 @@ var ts;
* 5) --UnaryExpression[?Yield]
*/
if (isUpdateExpression()) {
- var incrementExpression = parseIncrementExpression();
+ var updateExpression = parseUpdateExpression();
return token() === 40 /* AsteriskAsteriskToken */ ?
- parseBinaryExpressionRest(getBinaryOperatorPrecedence(), incrementExpression) :
- incrementExpression;
+ parseBinaryExpressionRest(getBinaryOperatorPrecedence(), updateExpression) :
+ updateExpression;
}
/**
* ES7 UnaryExpression:
@@ -17847,7 +19094,7 @@ var ts;
}
// falls through
default:
- return parseIncrementExpression();
+ return parseUpdateExpression();
}
}
/**
@@ -17862,7 +19109,7 @@ var ts;
*/
function isUpdateExpression() {
// This function is called inside parseUnaryExpression to decide
- // whether to call parseSimpleUnaryExpression or call parseIncrementExpression directly
+ // whether to call parseSimpleUnaryExpression or call parseUpdateExpression directly
switch (token()) {
case 37 /* PlusToken */:
case 38 /* MinusToken */:
@@ -17885,9 +19132,9 @@ var ts;
}
}
/**
- * Parse ES7 IncrementExpression. IncrementExpression is used instead of ES6's PostFixExpression.
+ * Parse ES7 UpdateExpression. UpdateExpression is used instead of ES6's PostFixExpression.
*
- * ES7 IncrementExpression[yield]:
+ * ES7 UpdateExpression[yield]:
* 1) LeftHandSideExpression[?yield]
* 2) LeftHandSideExpression[?yield] [[no LineTerminator here]]++
* 3) LeftHandSideExpression[?yield] [[no LineTerminator here]]--
@@ -17895,7 +19142,7 @@ var ts;
* 5) --LeftHandSideExpression[?yield]
* In TypeScript (2), (3) are parsed as PostfixUnaryExpression. (4), (5) are parsed as PrefixUnaryExpression
*/
- function parseIncrementExpression() {
+ function parseUpdateExpression() {
if (token() === 43 /* PlusPlusToken */ || token() === 44 /* MinusMinusToken */) {
var node = createNode(192 /* PrefixUnaryExpression */);
node.operator = token();
@@ -17941,23 +19188,33 @@ var ts;
// CallExpression Arguments
// CallExpression[Expression]
// CallExpression.IdentifierName
- // super ( ArgumentListopt )
+ // import (AssignmentExpression)
+ // super Arguments
// super.IdentifierName
//
- // Because of the recursion in these calls, we need to bottom out first. There are two
- // bottom out states we can run into. Either we see 'super' which must start either of
- // the last two CallExpression productions. Or we have a MemberExpression which either
- // completes the LeftHandSideExpression, or starts the beginning of the first four
- // CallExpression productions.
- var expression = token() === 97 /* SuperKeyword */
- ? parseSuperExpression()
- : parseMemberExpressionOrHigher();
+ // Because of the recursion in these calls, we need to bottom out first. There are three
+ // bottom out states we can run into: 1) We see 'super' which must start either of
+ // the last two CallExpression productions. 2) We see 'import' which must start import call.
+ // 3)we have a MemberExpression which either completes the LeftHandSideExpression,
+ // or starts the beginning of the first four CallExpression productions.
+ var expression;
+ if (token() === 91 /* ImportKeyword */ && lookAhead(nextTokenIsOpenParenOrLessThan)) {
+ // We don't want to eagerly consume all import keyword as import call expression so we look a head to find "("
+ // For example:
+ // var foo3 = require("subfolder
+ // import * as foo1 from "module-from-node -> we want this import to be a statement rather than import call expression
+ sourceFile.flags |= 524288 /* PossiblyContainsDynamicImport */;
+ expression = parseTokenNode();
+ }
+ else {
+ expression = token() === 97 /* SuperKeyword */ ? parseSuperExpression() : parseMemberExpressionOrHigher();
+ }
// Now, we *may* be complete. However, we might have consumed the start of a
// CallExpression. As such, we need to consume the rest of it here to be complete.
return parseCallExpressionRest(expression);
}
function parseMemberExpressionOrHigher() {
- // Note: to make our lives simpler, we decompose the the NewExpression productions and
+ // Note: to make our lives simpler, we decompose the NewExpression productions and
// place ObjectCreationExpression and FunctionExpression into PrimaryExpression.
// like so:
//
@@ -18353,7 +19610,7 @@ var ts;
case 48 /* AmpersandToken */: // foo<x> &
case 49 /* BarToken */: // foo<x> |
case 18 /* CloseBraceToken */: // foo<x> }
- case 1 /* EndOfFileToken */:
+ case 1 /* EndOfFileToken */:// foo<x>
// these cases can't legally follow a type arg list. However, they're not legal
// expressions either. The user is probably in the middle of a generic type. So
// treat it as such.
@@ -18918,9 +20175,10 @@ var ts;
case 74 /* CatchKeyword */:
case 87 /* FinallyKeyword */:
return true;
+ case 91 /* ImportKeyword */:
+ return isStartOfDeclaration() || lookAhead(nextTokenIsOpenParenOrLessThan);
case 76 /* ConstKeyword */:
case 84 /* ExportKeyword */:
- case 91 /* ImportKeyword */:
return isStartOfDeclaration();
case 120 /* AsyncKeyword */:
case 124 /* DeclareKeyword */:
@@ -19328,7 +20586,7 @@ var ts;
case 27 /* LessThanToken */: // Generic Method declaration
case 56 /* ColonToken */: // Type Annotation for declaration
case 58 /* EqualsToken */: // Initializer for declaration
- case 55 /* QuestionToken */:
+ case 55 /* QuestionToken */:// Not valid, but permitted so that it gets caught later on.
return true;
default:
// Covers
@@ -20055,7 +21313,10 @@ var ts;
case 17 /* OpenBraceToken */:
return parseJSDocRecordType();
case 89 /* FunctionKeyword */:
- return parseJSDocFunctionType();
+ if (lookAhead(nextTokenIsOpenParen)) {
+ return parseJSDocFunctionType();
+ }
+ break;
case 24 /* DotDotDotToken */:
return parseJSDocVariadicType();
case 94 /* NewKeyword */:
@@ -20071,7 +21332,6 @@ var ts;
case 95 /* NullKeyword */:
case 139 /* UndefinedKeyword */:
case 130 /* NeverKeyword */:
- case 134 /* ObjectKeyword */:
return parseTokenNode();
case 9 /* StringLiteral */:
case 8 /* NumericLiteral */:
@@ -20211,7 +21471,7 @@ var ts;
return finishNode(result);
}
function parseJSDocLiteralType() {
- var result = createNode(293 /* JSDocLiteralType */);
+ var result = createNode(294 /* JSDocLiteralType */);
result.literal = parseLiteralTypeNode();
return finishNode(result);
}
@@ -20260,10 +21520,17 @@ var ts;
if (comment) {
comment.parent = parent;
}
+ if (ts.isInJavaScriptFile(parent)) {
+ if (!sourceFile.jsDocDiagnostics) {
+ sourceFile.jsDocDiagnostics = [];
+ }
+ (_a = sourceFile.jsDocDiagnostics).push.apply(_a, parseDiagnostics);
+ }
currentToken = saveToken;
parseDiagnostics.length = saveParseDiagnosticsLength;
parseErrorBeforeNextFinishedNode = saveParseErrorBeforeNextFinishedNode;
return comment;
+ var _a;
}
JSDocParser.parseJSDocComment = parseJSDocComment;
var JSDocState;
@@ -20429,8 +21696,14 @@ var ts;
case "augments":
tag = parseAugmentsTag(atToken, tagName);
break;
+ case "class":
+ case "constructor":
+ tag = parseClassTag(atToken, tagName);
+ break;
+ case "arg":
+ case "argument":
case "param":
- tag = parseParamTag(atToken, tagName);
+ tag = parseParameterOrPropertyTag(atToken, tagName, /*shouldParseParamTag*/ true);
break;
case "return":
case "returns":
@@ -20544,29 +21817,25 @@ var ts;
return parseJSDocTypeExpression();
});
}
- function parseParamTag(atToken, tagName) {
- var typeExpression = tryParseTypeExpression();
- skipWhitespace();
- var name;
- var isBracketed;
+ function parseBracketNameInPropertyAndParamTag() {
// Looking for something like '[foo]' or 'foo'
- if (parseOptionalToken(21 /* OpenBracketToken */)) {
- name = parseJSDocIdentifierName();
+ var isBracketed = parseOptional(21 /* OpenBracketToken */);
+ var name = parseJSDocIdentifierName(/*createIfMissing*/ true);
+ if (isBracketed) {
skipWhitespace();
- isBracketed = true;
// May have an optional default, e.g. '[foo = 42]'
if (parseOptionalToken(58 /* EqualsToken */)) {
parseExpression();
}
parseExpected(22 /* CloseBracketToken */);
}
- else if (ts.tokenIsIdentifierOrKeyword(token())) {
- name = parseJSDocIdentifierName();
- }
- if (!name) {
- parseErrorAtPosition(scanner.getStartPos(), 0, ts.Diagnostics.Identifier_expected);
- return undefined;
- }
+ return { name: name, isBracketed: isBracketed };
+ }
+ function parseParameterOrPropertyTag(atToken, tagName, shouldParseParamTag) {
+ var typeExpression = tryParseTypeExpression();
+ skipWhitespace();
+ var _a = parseBracketNameInPropertyAndParamTag(), name = _a.name, isBracketed = _a.isBracketed;
+ skipWhitespace();
var preName, postName;
if (typeExpression) {
postName = name;
@@ -20577,52 +21846,38 @@ var ts;
if (!typeExpression) {
typeExpression = tryParseTypeExpression();
}
- var result = createNode(286 /* JSDocParameterTag */, atToken.pos);
+ var result = shouldParseParamTag ?
+ createNode(287 /* JSDocParameterTag */, atToken.pos) :
+ createNode(292 /* JSDocPropertyTag */, atToken.pos);
result.atToken = atToken;
result.tagName = tagName;
result.preParameterName = preName;
result.typeExpression = typeExpression;
result.postParameterName = postName;
- result.parameterName = postName || preName;
+ result.name = postName || preName;
result.isBracketed = isBracketed;
return finishNode(result);
}
function parseReturnTag(atToken, tagName) {
- if (ts.forEach(tags, function (t) { return t.kind === 287 /* JSDocReturnTag */; })) {
+ if (ts.forEach(tags, function (t) { return t.kind === 288 /* JSDocReturnTag */; })) {
parseErrorAtPosition(tagName.pos, scanner.getTokenPos() - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text);
}
- var result = createNode(287 /* JSDocReturnTag */, atToken.pos);
+ var result = createNode(288 /* 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 === 288 /* JSDocTypeTag */; })) {
+ if (ts.forEach(tags, function (t) { return t.kind === 289 /* JSDocTypeTag */; })) {
parseErrorAtPosition(tagName.pos, scanner.getTokenPos() - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text);
}
- var result = createNode(288 /* JSDocTypeTag */, atToken.pos);
+ var result = createNode(289 /* JSDocTypeTag */, atToken.pos);
result.atToken = atToken;
result.tagName = tagName;
result.typeExpression = tryParseTypeExpression();
return finishNode(result);
}
- function parsePropertyTag(atToken, tagName) {
- var typeExpression = tryParseTypeExpression();
- skipWhitespace();
- var name = parseJSDocIdentifierName();
- skipWhitespace();
- if (!name) {
- parseErrorAtPosition(scanner.getStartPos(), /*length*/ 0, ts.Diagnostics.Identifier_expected);
- return undefined;
- }
- var result = createNode(291 /* JSDocPropertyTag */, atToken.pos);
- result.atToken = atToken;
- result.tagName = tagName;
- result.name = name;
- result.typeExpression = typeExpression;
- return finishNode(result);
- }
function parseAugmentsTag(atToken, tagName) {
var typeExpression = tryParseTypeExpression();
var result = createNode(285 /* JSDocAugmentsTag */, atToken.pos);
@@ -20631,10 +21886,16 @@ var ts;
result.typeExpression = typeExpression;
return finishNode(result);
}
+ function parseClassTag(atToken, tagName) {
+ var tag = createNode(286 /* JSDocClassTag */, atToken.pos);
+ tag.atToken = atToken;
+ tag.tagName = tagName;
+ return finishNode(tag);
+ }
function parseTypedefTag(atToken, tagName) {
var typeExpression = tryParseTypeExpression();
skipWhitespace();
- var typedefTag = createNode(290 /* JSDocTypedefTag */, atToken.pos);
+ var typedefTag = createNode(291 /* JSDocTypedefTag */, atToken.pos);
typedefTag.atToken = atToken;
typedefTag.tagName = tagName;
typedefTag.fullName = parseJSDocTypeNameWithNamespace(/*flags*/ 0);
@@ -20657,7 +21918,7 @@ var ts;
var jsDocTypeReference = typeExpression.type;
if (jsDocTypeReference.name.kind === 71 /* Identifier */) {
var name = jsDocTypeReference.name;
- if (name.text === "Object") {
+ if (name.text === "Object" || name.text === "object") {
typedefTag.jsDocTypeLiteral = scanChildTags();
}
}
@@ -20671,7 +21932,7 @@ var ts;
}
return finishNode(typedefTag);
function scanChildTags() {
- var jsDocTypeLiteral = createNode(292 /* JSDocTypeLiteral */, scanner.getStartPos());
+ var jsDocTypeLiteral = createNode(293 /* JSDocTypeLiteral */, scanner.getStartPos());
var resumePos = scanner.getStartPos();
var canParseTag = true;
var seenAsterisk = false;
@@ -20717,7 +21978,7 @@ var ts;
jsDocNamespaceNode.flags |= flags;
jsDocNamespaceNode.name = typeNameOrNamespaceName;
jsDocNamespaceNode.body = parseJSDocTypeNameWithNamespace(4 /* NestedNamespace */);
- return jsDocNamespaceNode;
+ return finishNode(jsDocNamespaceNode);
}
if (typeNameOrNamespaceName && flags & 4 /* NestedNamespace */) {
typeNameOrNamespaceName.isInJSDocNamespace = true;
@@ -20745,7 +22006,7 @@ var ts;
return true;
case "prop":
case "property":
- var propertyTag = parsePropertyTag(atToken, tagName);
+ var propertyTag = parseParameterOrPropertyTag(atToken, tagName, /*shouldParseParamTag*/ false);
if (propertyTag) {
if (!parentTag.jsDocPropertyTags) {
parentTag.jsDocPropertyTags = [];
@@ -20759,7 +22020,7 @@ var ts;
return false;
}
function parseTemplateTag(atToken, tagName) {
- if (ts.forEach(tags, function (t) { return t.kind === 289 /* JSDocTemplateTag */; })) {
+ if (ts.forEach(tags, function (t) { return t.kind === 290 /* 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'
@@ -20783,7 +22044,7 @@ var ts;
break;
}
}
- var result = createNode(289 /* JSDocTemplateTag */, atToken.pos);
+ var result = createNode(290 /* JSDocTemplateTag */, atToken.pos);
result.atToken = atToken;
result.tagName = tagName;
result.typeParameters = typeParameters;
@@ -20794,13 +22055,19 @@ var ts;
function nextJSDocToken() {
return currentToken = scanner.scanJSDocToken();
}
- function parseJSDocIdentifierName() {
- return createJSDocIdentifier(ts.tokenIsIdentifierOrKeyword(token()));
+ function parseJSDocIdentifierName(createIfMissing) {
+ if (createIfMissing === void 0) { createIfMissing = false; }
+ return createJSDocIdentifier(ts.tokenIsIdentifierOrKeyword(token()), createIfMissing);
}
- function createJSDocIdentifier(isIdentifier) {
+ function createJSDocIdentifier(isIdentifier, createIfMissing) {
if (!isIdentifier) {
- parseErrorAtCurrentToken(ts.Diagnostics.Identifier_expected);
- return undefined;
+ if (createIfMissing) {
+ return createMissingNode(71 /* Identifier */, /*reportAtCurrentPosition*/ true, ts.Diagnostics.Identifier_expected);
+ }
+ else {
+ parseErrorAtCurrentToken(ts.Diagnostics.Identifier_expected);
+ return undefined;
+ }
}
var pos = scanner.getTokenPos();
var end = scanner.getTextPos();
@@ -21416,7 +22683,7 @@ var ts;
inStrictMode = bindInStrictMode(file, opts);
classifiableNames = ts.createMap();
symbolCount = 0;
- skipTransformFlagAggregation = ts.isDeclarationFile(file);
+ skipTransformFlagAggregation = file.isDeclarationFile;
Symbol = ts.objectAllocator.getSymbolConstructor();
if (!file.locals) {
bind(file);
@@ -21444,7 +22711,7 @@ var ts;
}
return bindSourceFile;
function bindInStrictMode(file, opts) {
- if ((opts.alwaysStrict === undefined ? opts.strict : opts.alwaysStrict) && !ts.isDeclarationFile(file)) {
+ if ((opts.alwaysStrict === undefined ? opts.strict : opts.alwaysStrict) && !file.isDeclarationFile) {
// bind in strict mode source files with alwaysStrict option
return true;
}
@@ -21481,12 +22748,13 @@ var ts;
// Should not be called on a declaration with a computed property name,
// unless it is a well known Symbol.
function getDeclarationName(node) {
- if (node.name) {
+ var name = ts.getNameOfDeclaration(node);
+ if (name) {
if (ts.isAmbientModule(node)) {
- return ts.isGlobalScopeAugmentation(node) ? "__global" : "\"" + node.name.text + "\"";
+ return ts.isGlobalScopeAugmentation(node) ? "__global" : "\"" + name.text + "\"";
}
- if (node.name.kind === 144 /* ComputedPropertyName */) {
- var nameExpression = node.name.expression;
+ if (name.kind === 144 /* ComputedPropertyName */) {
+ var nameExpression = name.expression;
// treat computed property names where expression is string/numeric literal as just string/numeric literal
if (ts.isStringOrNumericLiteral(nameExpression)) {
return nameExpression.text;
@@ -21494,7 +22762,7 @@ var ts;
ts.Debug.assert(ts.isWellKnownSymbolSyntactically(nameExpression));
return ts.getPropertyNameForKnownSymbolName(nameExpression.name.text);
}
- return node.name.text;
+ return name.text;
}
switch (node.kind) {
case 152 /* Constructor */:
@@ -21512,18 +22780,9 @@ var ts;
case 243 /* ExportAssignment */:
return node.isExportEquals ? "export=" : "default";
case 194 /* 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 */:
- // className.prototype.methodName = ...
- return node.left.expression.name.text;
+ if (ts.getSpecialPropertyAssignmentKind(node) === 2 /* ModuleExports */) {
+ // module.exports = ...
+ return "export=";
}
ts.Debug.fail("Unknown binary declaration kind");
break;
@@ -21539,7 +22798,7 @@ var ts;
var functionType = node.parent;
var index = ts.indexOf(functionType.parameters, node);
return "arg" + index;
- case 290 /* JSDocTypedefTag */:
+ case 291 /* JSDocTypedefTag */:
var parentNode = node.parent && node.parent.parent;
var nameFromParentNode = void 0;
if (parentNode && parentNode.kind === 208 /* VariableStatement */) {
@@ -21638,9 +22897,9 @@ var ts;
}
}
ts.forEach(symbol.declarations, function (declaration) {
- file.bindDiagnostics.push(ts.createDiagnosticForNode(declaration.name || declaration, message_1, getDisplayName(declaration)));
+ file.bindDiagnostics.push(ts.createDiagnosticForNode(ts.getNameOfDeclaration(declaration) || declaration, message_1, getDisplayName(declaration)));
});
- file.bindDiagnostics.push(ts.createDiagnosticForNode(node.name || node, message_1, getDisplayName(node)));
+ file.bindDiagnostics.push(ts.createDiagnosticForNode(ts.getNameOfDeclaration(node) || node, message_1, getDisplayName(node)));
symbol = createSymbol(0 /* None */, name);
}
}
@@ -21675,7 +22934,9 @@ 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 === 290 /* JSDocTypedefTag */ &&
+ if (node.kind === 291 /* JSDocTypedefTag */)
+ ts.Debug.assert(ts.isInJavaScriptFile(node)); // We shouldn't add symbols for JSDoc nodes if not in a JS file.
+ var isJSDocTypedefInJSDocNamespace = node.kind === 291 /* JSDocTypedefTag */ &&
node.name &&
node.name.kind === 71 /* Identifier */ &&
node.name.isInJSDocNamespace;
@@ -21833,8 +23094,19 @@ var ts;
// Binding of JsDocComment should be done before the current block scope container changes.
// because the scope of JsDocComment should not be affected by whether the current node is a
// container or not.
- if (ts.isInJavaScriptFile(node) && node.jsDoc) {
- ts.forEach(node.jsDoc, bind);
+ if (node.jsDoc) {
+ if (ts.isInJavaScriptFile(node)) {
+ for (var _i = 0, _a = node.jsDoc; _i < _a.length; _i++) {
+ var j = _a[_i];
+ bind(j);
+ }
+ }
+ else {
+ for (var _b = 0, _c = node.jsDoc; _b < _c.length; _b++) {
+ var j = _c[_b];
+ setParentPointers(node, j);
+ }
+ }
}
if (checkUnreachable(node)) {
bindEachChild(node);
@@ -21904,7 +23176,7 @@ var ts;
case 283 /* JSDocComment */:
bindJSDocComment(node);
break;
- case 290 /* JSDocTypedefTag */:
+ case 291 /* JSDocTypedefTag */:
bindJSDocTypedefTag(node);
break;
default:
@@ -22520,13 +23792,13 @@ var ts;
}
function bindVariableDeclarationFlow(node) {
bindEachChild(node);
- if (node.initializer || node.parent.parent.kind === 215 /* ForInStatement */ || node.parent.parent.kind === 216 /* ForOfStatement */) {
+ if (node.initializer || ts.isForInOrOfStatement(node.parent.parent)) {
bindInitializedVariableFlow(node);
}
}
function bindJSDocComment(node) {
ts.forEachChild(node, function (n) {
- if (n.kind !== 290 /* JSDocTypedefTag */) {
+ if (n.kind !== 291 /* JSDocTypedefTag */) {
bind(n);
}
});
@@ -22572,7 +23844,7 @@ var ts;
case 232 /* EnumDeclaration */:
case 178 /* ObjectLiteralExpression */:
case 163 /* TypeLiteral */:
- case 292 /* JSDocTypeLiteral */:
+ case 293 /* JSDocTypeLiteral */:
case 275 /* JSDocRecordType */:
case 254 /* JsxAttributes */:
return 1 /* IsContainer */;
@@ -22664,7 +23936,7 @@ var ts;
case 178 /* ObjectLiteralExpression */:
case 230 /* InterfaceDeclaration */:
case 275 /* JSDocRecordType */:
- case 292 /* JSDocTypeLiteral */:
+ case 293 /* JSDocTypeLiteral */:
case 254 /* JsxAttributes */:
// Interface/Object-types always have their children added to the 'members' of
// their container. They are only accessible through an instance of their
@@ -22691,7 +23963,7 @@ var ts;
// 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
- // their container in the tree. To accomplish this, we simply add their declared
+ // their container in the tree). To accomplish this, we simply add their declared
// symbol to the 'locals' of the container. These symbols can then be found as
// the type checker walks up the containers, checking them for matching names.
return declareSymbol(container.locals, /*parent*/ undefined, node, symbolFlags, symbolExcludes);
@@ -23021,9 +24293,8 @@ var ts;
// 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)) {
+ 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:
@@ -23068,7 +24339,7 @@ var ts;
}
for (var _b = 0, _c = jsDoc.tags; _b < _c.length; _b++) {
var tag = _c[_b];
- if (tag.kind === 290 /* JSDocTypedefTag */) {
+ if (tag.kind === 291 /* JSDocTypedefTag */) {
var savedParent = parent;
parent = jsDoc;
bind(tag);
@@ -23107,7 +24378,7 @@ var ts;
// current "blockScopeContainer" needs to be set to its immediate namespace parent.
if (node.isInJSDocNamespace) {
var parentNode = node.parent;
- while (parentNode && parentNode.kind !== 290 /* JSDocTypedefTag */) {
+ while (parentNode && parentNode.kind !== 291 /* JSDocTypedefTag */) {
parentNode = parentNode.parent;
}
bindBlockScopedDeclaration(parentNode, 524288 /* TypeAlias */, 793064 /* TypeAliasExcludes */);
@@ -23175,10 +24446,7 @@ var ts;
return bindVariableDeclarationOrBindingElement(node);
case 149 /* PropertyDeclaration */:
case 148 /* PropertySignature */:
- case 276 /* JSDocRecordMember */:
- return bindPropertyOrMethodOrAccessor(node, 4 /* Property */ | (node.questionToken ? 67108864 /* Optional */ : 0 /* None */), 0 /* PropertyExcludes */);
- case 291 /* JSDocPropertyTag */:
- return bindJSDocProperty(node);
+ return bindPropertyWorker(node);
case 261 /* PropertyAssignment */:
case 262 /* ShorthandPropertyAssignment */:
return bindPropertyOrMethodOrAccessor(node, 4 /* Property */, 0 /* PropertyExcludes */);
@@ -23220,13 +24488,10 @@ var ts;
return bindPropertyOrMethodOrAccessor(node, 65536 /* SetAccessor */, 74687 /* SetAccessorExcludes */);
case 160 /* FunctionType */:
case 161 /* ConstructorType */:
- case 279 /* JSDocFunctionType */:
return bindFunctionOrConstructorType(node);
case 163 /* TypeLiteral */:
case 172 /* MappedType */:
- case 292 /* JSDocTypeLiteral */:
- case 275 /* JSDocRecordType */:
- return bindAnonymousDeclaration(node, 2048 /* TypeLiteral */, "__type");
+ return bindAnonymousTypeWorker(node);
case 178 /* ObjectLiteralExpression */:
return bindObjectLiteralExpression(node);
case 186 /* FunctionExpression */:
@@ -23245,11 +24510,6 @@ var ts;
return bindClassLikeDeclaration(node);
case 230 /* InterfaceDeclaration */:
return bindBlockScopedDeclaration(node, 64 /* Interface */, 792968 /* InterfaceExcludes */);
- case 290 /* JSDocTypedefTag */:
- if (!node.fullName || node.fullName.kind === 71 /* Identifier */) {
- return bindBlockScopedDeclaration(node, 524288 /* TypeAlias */, 793064 /* TypeAliasExcludes */);
- }
- break;
case 231 /* TypeAliasDeclaration */:
return bindBlockScopedDeclaration(node, 524288 /* TypeAlias */, 793064 /* TypeAliasExcludes */);
case 232 /* EnumDeclaration */:
@@ -23285,8 +24545,31 @@ var ts;
// falls through
case 234 /* ModuleBlock */:
return updateStrictModeStatementList(node.statements);
+ case 276 /* JSDocRecordMember */:
+ return bindPropertyWorker(node);
+ case 292 /* JSDocPropertyTag */:
+ return declareSymbolAndAddToSymbolTable(node, node.isBracketed || (node.typeExpression && node.typeExpression.type.kind === 278 /* JSDocOptionalType */) ?
+ 4 /* Property */ | 67108864 /* Optional */ : 4 /* Property */, 0 /* PropertyExcludes */);
+ case 279 /* JSDocFunctionType */:
+ return bindFunctionOrConstructorType(node);
+ case 293 /* JSDocTypeLiteral */:
+ case 275 /* JSDocRecordType */:
+ return bindAnonymousTypeWorker(node);
+ case 291 /* JSDocTypedefTag */: {
+ var fullName = node.fullName;
+ if (!fullName || fullName.kind === 71 /* Identifier */) {
+ return bindBlockScopedDeclaration(node, 524288 /* TypeAlias */, 793064 /* TypeAliasExcludes */);
+ }
+ break;
+ }
}
}
+ function bindPropertyWorker(node) {
+ return bindPropertyOrMethodOrAccessor(node, 4 /* Property */ | (node.questionToken ? 67108864 /* Optional */ : 0 /* None */), 0 /* PropertyExcludes */);
+ }
+ function bindAnonymousTypeWorker(node) {
+ return bindAnonymousDeclaration(node, 2048 /* TypeLiteral */, "__type");
+ }
function checkTypePredicate(node) {
var parameterName = node.parameterName, type = node.type;
if (parameterName && parameterName.kind === 71 /* Identifier */) {
@@ -23397,7 +24680,7 @@ var ts;
// 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='.
+ // Similarly 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
@@ -23556,7 +24839,7 @@ var ts;
}
}
function bindParameter(node) {
- if (inStrictMode) {
+ if (inStrictMode && !ts.isInAmbientContext(node)) {
// It is a SyntaxError if the identifier eval or arguments appears within a FormalParameterList of a
// strict mode FunctionLikeDeclaration or FunctionExpression(13.1)
checkStrictModeEvalOrArguments(node, node.name);
@@ -23575,7 +24858,7 @@ var ts;
}
}
function bindFunctionDeclaration(node) {
- if (!ts.isDeclarationFile(file) && !ts.isInAmbientContext(node)) {
+ if (!file.isDeclarationFile && !ts.isInAmbientContext(node)) {
if (ts.isAsyncFunction(node)) {
emitFlags |= 1024 /* HasAsyncFunctions */;
}
@@ -23590,7 +24873,7 @@ var ts;
}
}
function bindFunctionExpression(node) {
- if (!ts.isDeclarationFile(file) && !ts.isInAmbientContext(node)) {
+ if (!file.isDeclarationFile && !ts.isInAmbientContext(node)) {
if (ts.isAsyncFunction(node)) {
emitFlags |= 1024 /* HasAsyncFunctions */;
}
@@ -23603,10 +24886,8 @@ var ts;
return bindAnonymousDeclaration(node, 16 /* Function */, bindingName);
}
function bindPropertyOrMethodOrAccessor(node, symbolFlags, symbolExcludes) {
- if (!ts.isDeclarationFile(file) && !ts.isInAmbientContext(node)) {
- if (ts.isAsyncFunction(node)) {
- emitFlags |= 1024 /* HasAsyncFunctions */;
- }
+ if (!file.isDeclarationFile && !ts.isInAmbientContext(node) && ts.isAsyncFunction(node)) {
+ emitFlags |= 1024 /* HasAsyncFunctions */;
}
if (currentFlow && ts.isObjectLiteralOrClassExpressionMethod(node)) {
node.flowNode = currentFlow;
@@ -23615,9 +24896,6 @@ var ts;
? bindAnonymousDeclaration(node, symbolFlags, "__computed")
: declareSymbolAndAddToSymbolTable(node, symbolFlags, symbolExcludes);
}
- function bindJSDocProperty(node) {
- return declareSymbolAndAddToSymbolTable(node, 4 /* Property */, 0 /* PropertyExcludes */);
- }
// reachability checks
function shouldReportErrorOnModuleDeclaration(node) {
var instanceState = getModuleInstanceState(node);
@@ -23739,6 +25017,9 @@ var ts;
// node.
transformFlags |= 192 /* AssertES2015 */;
}
+ if (expression.kind === 91 /* ImportKeyword */) {
+ transformFlags |= 67108864 /* ContainsDynamicImport */;
+ }
node.transformFlags = transformFlags | 536870912 /* HasComputedFlags */;
return transformFlags & ~537396545 /* ArrayLiteralOrCallOrNewExcludes */;
}
@@ -24286,6 +25567,7 @@ var ts;
case 171 /* IndexedAccessType */:
case 172 /* MappedType */:
case 173 /* LiteralType */:
+ case 236 /* NamespaceExportDeclaration */:
// Types and signatures are TypeScript syntax, and exclude all other facts.
transformFlags = 3 /* AssertTypeScript */;
excludeFlags = -3 /* TypeExcludes */;
@@ -24458,6 +25740,14 @@ var ts;
}
}
ts.getTransformFlagsSubtreeExclusions = getTransformFlagsSubtreeExclusions;
+ /**
+ * "Binds" JSDoc nodes in TypeScript code.
+ * Since we will never create symbols for JSDoc, we just set parent pointers instead.
+ */
+ function setParentPointers(parent, child) {
+ child.parent = parent;
+ ts.forEachChild(child, function (childsChild) { return setParentPointers(child, childsChild); });
+ }
})(ts || (ts = {}));
/// <reference path="core.ts" />
/// <reference path="diagnosticInformationMap.generated.ts" />
@@ -24490,13 +25780,11 @@ var ts;
ts.Debug.assert(ts.extensionIsTypeScript(resolved.extension));
return resolved.path;
}
- /** Adds `isExernalLibraryImport` to a Resolved to get a ResolvedModule. */
- function resolvedModuleFromResolved(_a, isExternalLibraryImport) {
- var path = _a.path, extension = _a.extension;
- return { resolvedFileName: path, extension: extension, isExternalLibraryImport: isExternalLibraryImport };
- }
function createResolvedModuleWithFailedLookupLocations(resolved, isExternalLibraryImport, failedLookupLocations) {
- return { resolvedModule: resolved && resolvedModuleFromResolved(resolved, isExternalLibraryImport), failedLookupLocations: failedLookupLocations };
+ return {
+ resolvedModule: resolved && { resolvedFileName: resolved.path, extension: resolved.extension, isExternalLibraryImport: isExternalLibraryImport },
+ failedLookupLocations: failedLookupLocations
+ };
}
function moduleHasNonRelativeName(moduleName) {
return !(ts.isRootedDiskPath(moduleName) || ts.isExternalModuleNameRelative(moduleName));
@@ -24824,6 +26112,8 @@ var ts;
case ts.ModuleResolutionKind.Classic:
result = classicNameResolver(moduleName, containingFile, compilerOptions, host, cache);
break;
+ default:
+ ts.Debug.fail("Unexpected moduleResolution: " + moduleResolution);
}
if (perFolderCache) {
perFolderCache.set(moduleName, result);
@@ -25008,11 +26298,13 @@ var ts;
if (state.traceEnabled) {
trace(state.host, ts.Diagnostics.Trying_substitution_0_candidate_module_location_Colon_1, subst, path);
}
- // A path mapping may have a ".ts" extension; in contrast to an import, which should omit it.
- var tsExtension = ts.tryGetExtensionFromPath(candidate);
- if (tsExtension !== undefined) {
+ // A path mapping may have an extension, in contrast to an import, which should omit it.
+ var extension = ts.tryGetExtensionFromPath(candidate);
+ if (extension !== undefined) {
var path_1 = tryFile(candidate, failedLookupLocations, /*onlyRecordFailures*/ false, state);
- return path_1 && { path: path_1, extension: tsExtension };
+ if (path_1 !== undefined) {
+ return { path: path_1, extension: extension };
+ }
}
return loader(extensions, candidate, failedLookupLocations, !directoryProbablyExists(ts.getDirectoryPath(candidate), state.host), state);
});
@@ -25026,13 +26318,24 @@ var ts;
}
}
function nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache) {
- return nodeModuleNameResolverWorker(moduleName, containingFile, compilerOptions, host, cache, /*jsOnly*/ false);
+ return nodeModuleNameResolverWorker(moduleName, ts.getDirectoryPath(containingFile), compilerOptions, host, cache, /*jsOnly*/ false);
}
ts.nodeModuleNameResolver = nodeModuleNameResolver;
+ /**
+ * Expose resolution logic to allow us to use Node module resolution logic from arbitrary locations.
+ * No way to do this with `require()`: https://github.com/nodejs/node/issues/5963
+ * Throws an error if the module can't be resolved.
+ */
/* @internal */
- function nodeModuleNameResolverWorker(moduleName, containingFile, compilerOptions, host, cache, jsOnly) {
- if (jsOnly === void 0) { jsOnly = false; }
- var containingDirectory = ts.getDirectoryPath(containingFile);
+ function resolveJavaScriptModule(moduleName, initialDir, host) {
+ var _a = nodeModuleNameResolverWorker(moduleName, initialDir, { moduleResolution: ts.ModuleResolutionKind.NodeJs, allowJs: true }, host, /*cache*/ undefined, /*jsOnly*/ true), resolvedModule = _a.resolvedModule, failedLookupLocations = _a.failedLookupLocations;
+ if (!resolvedModule) {
+ throw new Error("Could not resolve JS module " + moduleName + " starting at " + initialDir + ". Looked in: " + failedLookupLocations.join(", "));
+ }
+ return resolvedModule.resolvedFileName;
+ }
+ ts.resolveJavaScriptModule = resolveJavaScriptModule;
+ function nodeModuleNameResolverWorker(moduleName, containingDirectory, compilerOptions, host, cache, jsOnly) {
var traceEnabled = isTraceEnabled(compilerOptions, host);
var failedLookupLocations = [];
var state = { compilerOptions: compilerOptions, host: host, traceEnabled: traceEnabled };
@@ -25063,7 +26366,6 @@ var ts;
}
}
}
- ts.nodeModuleNameResolverWorker = nodeModuleNameResolverWorker;
function realpath(path, host, traceEnabled) {
if (!host.realpath) {
return path;
@@ -25283,10 +26585,12 @@ var ts;
return loadModuleFromNodeModulesFolder(Extensions.DtsOnly, mangleScopedPackage(moduleName, state), nodeModulesAtTypes_1, nodeModulesAtTypesExists, failedLookupLocations, state);
}
}
+ /** Double underscores are used in DefinitelyTyped to delimit scoped packages. */
+ var mangledScopedPackageSeparator = "__";
/** 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, "__");
+ var replaceSlash = moduleName.replace(ts.directorySeparator, mangledScopedPackageSeparator);
if (replaceSlash !== moduleName) {
var mangled = replaceSlash.slice(1); // Take off the "@"
if (state.traceEnabled) {
@@ -25297,6 +26601,17 @@ var ts;
}
return moduleName;
}
+ /* @internal */
+ function getPackageNameFromAtTypesDirectory(mangledName) {
+ var withoutAtTypePrefix = ts.removePrefix(mangledName, "@types/");
+ if (withoutAtTypePrefix !== mangledName) {
+ return withoutAtTypePrefix.indexOf("__") !== -1 ?
+ "@" + withoutAtTypePrefix.replace(mangledScopedPackageSeparator, ts.directorySeparator) :
+ withoutAtTypePrefix;
+ }
+ return mangledName;
+ }
+ ts.getPackageNameFromAtTypesDirectory = getPackageNameFromAtTypesDirectory;
function tryFindNonRelativeModuleNameInCache(cache, moduleName, containingDirectory, traceEnabled, host) {
var result = cache && cache.get(containingDirectory);
if (result) {
@@ -25426,6 +26741,7 @@ var ts;
var Signature = ts.objectAllocator.getSignatureConstructor();
var typeCount = 0;
var symbolCount = 0;
+ var enumCount = 0;
var symbolInstantiationDepth = 0;
var emptyArray = [];
var emptySymbols = ts.createMap();
@@ -25577,13 +26893,21 @@ var ts;
// since we are only interested in declarations of the module itself
return tryFindAmbientModule(moduleName, /*withAugmentations*/ false);
},
- getApparentType: getApparentType
+ getApparentType: getApparentType,
+ getAllPossiblePropertiesOfType: getAllPossiblePropertiesOfType,
+ getSuggestionForNonexistentProperty: getSuggestionForNonexistentProperty,
+ getSuggestionForNonexistentSymbol: getSuggestionForNonexistentSymbol,
+ getBaseConstraintOfType: getBaseConstraintOfType,
+ getJsxNamespace: getJsxNamespace,
+ resolveNameAtLocation: function (location, name, meaning) {
+ location = ts.getParseTreeNode(location);
+ return resolveName(location, name, meaning, /*nameNotFoundMessage*/ undefined, name);
+ },
};
var tupleTypes = [];
var unionTypes = ts.createMap();
var intersectionTypes = ts.createMap();
- var stringLiteralTypes = ts.createMap();
- var numericLiteralTypes = ts.createMap();
+ var literalTypes = ts.createMap();
var indexedAccessTypes = ts.createMap();
var evolvingArrayTypes = [];
var unknownSymbol = createSymbol(4 /* Property */, "unknown");
@@ -25666,11 +26990,13 @@ var ts;
var flowLoopStart = 0;
var flowLoopCount = 0;
var visitedFlowCount = 0;
- var emptyStringType = getLiteralTypeForText(32 /* StringLiteral */, "");
- var zeroType = getLiteralTypeForText(64 /* NumberLiteral */, "0");
+ var emptyStringType = getLiteralType("");
+ var zeroType = getLiteralType(0);
var resolutionTargets = [];
var resolutionResults = [];
var resolutionPropertyNames = [];
+ var suggestionCount = 0;
+ var maximumSuggestionCount = 10;
var mergedSymbols = [];
var symbolLinks = [];
var nodeLinks = [];
@@ -25936,16 +27262,16 @@ var ts;
recordMergedSymbol(target, source);
}
else if (target.flags & 1024 /* NamespaceModule */) {
- error(source.declarations[0].name, ts.Diagnostics.Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity, symbolToString(target));
+ error(ts.getNameOfDeclaration(source.declarations[0]), 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;
ts.forEach(source.declarations, function (node) {
- error(node.name ? node.name : node, message_2, symbolToString(source));
+ error(ts.getNameOfDeclaration(node) || node, message_2, symbolToString(source));
});
ts.forEach(target.declarations, function (node) {
- error(node.name ? node.name : node, message_2, symbolToString(source));
+ error(ts.getNameOfDeclaration(node) || node, message_2, symbolToString(source));
});
}
}
@@ -26027,9 +27353,6 @@ 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 === 265 /* SourceFile */ && !ts.isExternalOrCommonJsModule(node);
}
@@ -26037,7 +27360,7 @@ var ts;
if (meaning) {
var symbol = symbols.get(name);
if (symbol) {
- ts.Debug.assert((getCheckFlags(symbol) & 1 /* Instantiated */) === 0, "Should never get an instantiated symbol here.");
+ ts.Debug.assert((ts.getCheckFlags(symbol) & 1 /* Instantiated */) === 0, "Should never get an instantiated symbol here.");
if (symbol.flags & meaning) {
return symbol;
}
@@ -26073,7 +27396,9 @@ var ts;
var useFile = ts.getSourceFileOfNode(usage);
if (declarationFile !== useFile) {
if ((modulekind && (declarationFile.externalModuleIndicator || useFile.externalModuleIndicator)) ||
- (!compilerOptions.outFile && !compilerOptions.out)) {
+ (!compilerOptions.outFile && !compilerOptions.out) ||
+ isInTypeQuery(usage) ||
+ ts.isInAmbientContext(declaration)) {
// nodes are in different files and order cannot be determined
return true;
}
@@ -26129,15 +27454,8 @@ var ts;
}
break;
}
- switch (declaration.parent.parent.kind) {
- case 215 /* ForInStatement */:
- case 216 /* ForOfStatement */:
- // ForIn/ForOf case - use site should not be used in expression part
- if (isSameScopeDescendentOf(usage, declaration.parent.parent.expression, container)) {
- return true;
- }
- }
- return false;
+ // ForIn/ForOf case - use site should not be used in expression part
+ return ts.isForInOrOfStatement(declaration.parent.parent) && isSameScopeDescendentOf(usage, declaration.parent.parent.expression, container);
}
function isUsedInFunctionOrInstanceProperty(usage, declaration, container) {
return !!ts.findAncestor(usage, function (current) {
@@ -26169,7 +27487,11 @@ var ts;
// Resolve a given name for a given meaning at a given location. An error is reported if the name was not found and
// the nameNotFoundMessage argument is not undefined. Returns the resolved symbol, or undefined if no symbol with
// the given name can be found.
- function resolveName(location, name, meaning, nameNotFoundMessage, nameArg) {
+ function resolveName(location, name, meaning, nameNotFoundMessage, nameArg, suggestedNameNotFoundMessage) {
+ return resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, getSymbol, suggestedNameNotFoundMessage);
+ }
+ function resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, lookup, suggestedNameNotFoundMessage) {
+ var originalLocation = location; // needed for did-you-mean error reporting, which gathers candidates starting from the original location
var result;
var lastLocation;
var propertyWithInvalidInitializer;
@@ -26179,7 +27501,7 @@ var ts;
loop: while (location) {
// Locals of a source file are not in scope (because they get merged into the global symbol table)
if (location.locals && !isGlobalSourceFile(location)) {
- if (result = getSymbol(location.locals, name, meaning)) {
+ if (result = lookup(location.locals, name, meaning)) {
var useResult = true;
if (ts.isFunctionLike(location) && lastLocation && lastLocation !== location.body) {
// symbol lookup restrictions for function-like declarations
@@ -26250,12 +27572,12 @@ var ts;
break;
}
}
- if (result = getSymbol(moduleExports, name, meaning & 8914931 /* ModuleMember */)) {
+ if (result = lookup(moduleExports, name, meaning & 8914931 /* ModuleMember */)) {
break loop;
}
break;
case 232 /* EnumDeclaration */:
- if (result = getSymbol(getSymbolOfNode(location).exports, name, meaning & 8 /* EnumMember */)) {
+ if (result = lookup(getSymbolOfNode(location).exports, name, meaning & 8 /* EnumMember */)) {
break loop;
}
break;
@@ -26270,7 +27592,7 @@ var ts;
if (ts.isClassLike(location.parent) && !(ts.getModifierFlags(location) & 32 /* Static */)) {
var ctor = findConstructorDeclaration(location.parent);
if (ctor && ctor.locals) {
- if (getSymbol(ctor.locals, name, meaning & 107455 /* Value */)) {
+ if (lookup(ctor.locals, name, meaning & 107455 /* Value */)) {
// Remember the property node, it will be used later to report appropriate error
propertyWithInvalidInitializer = location;
}
@@ -26280,7 +27602,7 @@ var ts;
case 229 /* ClassDeclaration */:
case 199 /* ClassExpression */:
case 230 /* InterfaceDeclaration */:
- if (result = getSymbol(getSymbolOfNode(location).members, name, meaning & 793064 /* Type */)) {
+ if (result = lookup(getSymbolOfNode(location).members, name, meaning & 793064 /* Type */)) {
if (!isTypeParameterSymbolDeclaredInContainer(result, location)) {
// ignore type parameters not declared in this container
result = undefined;
@@ -26315,7 +27637,7 @@ var ts;
grandparent = location.parent.parent;
if (ts.isClassLike(grandparent) || grandparent.kind === 230 /* InterfaceDeclaration */) {
// A reference to this grandparent's type parameters would be an error
- if (result = getSymbol(getSymbolOfNode(grandparent).members, name, meaning & 793064 /* Type */)) {
+ if (result = lookup(getSymbolOfNode(grandparent).members, name, meaning & 793064 /* Type */)) {
error(errorLocation, ts.Diagnostics.A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type);
return undefined;
}
@@ -26376,7 +27698,7 @@ var ts;
result.isReferenced = true;
}
if (!result) {
- result = getSymbol(globals, name, meaning);
+ result = lookup(globals, name, meaning);
}
if (!result) {
if (nameNotFoundMessage) {
@@ -26386,7 +27708,17 @@ var ts;
!checkAndReportErrorForUsingTypeAsNamespace(errorLocation, name, meaning) &&
!checkAndReportErrorForUsingTypeAsValue(errorLocation, name, meaning) &&
!checkAndReportErrorForUsingNamespaceModuleAsValue(errorLocation, name, meaning)) {
- error(errorLocation, nameNotFoundMessage, typeof nameArg === "string" ? nameArg : ts.declarationNameToString(nameArg));
+ var suggestion = void 0;
+ if (suggestedNameNotFoundMessage && suggestionCount < maximumSuggestionCount) {
+ suggestion = getSuggestionForNonexistentSymbol(originalLocation, name, meaning);
+ if (suggestion) {
+ error(errorLocation, suggestedNameNotFoundMessage, typeof nameArg === "string" ? nameArg : ts.declarationNameToString(nameArg), suggestion);
+ }
+ }
+ if (!suggestion) {
+ error(errorLocation, nameNotFoundMessage, typeof nameArg === "string" ? nameArg : ts.declarationNameToString(nameArg));
+ }
+ suggestionCount++;
}
}
return undefined;
@@ -26400,7 +27732,7 @@ 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;
}
- // Only check for block-scoped variable if we are looking for the
+ // Only check for block-scoped variable if we have an error location and are looking for the
// name with variable meaning
// For example,
// declare module foo {
@@ -26411,8 +27743,9 @@ var ts;
// 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 */ ||
- ((meaning & 32 /* Class */ || meaning & 384 /* Enum */) && (meaning & 107455 /* Value */) === 107455 /* Value */)) {
+ if (errorLocation &&
+ (meaning & 2 /* BlockScopedVariable */ ||
+ ((meaning & 32 /* Class */ || meaning & 384 /* Enum */) && (meaning & 107455 /* Value */) === 107455 /* Value */))) {
var exportOrLocalSymbol = getExportSymbolOfValueSymbolIfExported(result);
if (exportOrLocalSymbol.flags & 2 /* BlockScopedVariable */ || exportOrLocalSymbol.flags & 32 /* Class */ || exportOrLocalSymbol.flags & 384 /* Enum */) {
checkResolvedBlockScopedVariable(exportOrLocalSymbol, errorLocation);
@@ -26505,6 +27838,10 @@ var ts;
}
function checkAndReportErrorForUsingTypeAsValue(errorLocation, name, meaning) {
if (meaning & (107455 /* Value */ & ~1024 /* NamespaceModule */)) {
+ if (name === "any" || name === "string" || name === "number" || name === "boolean" || name === "never") {
+ error(errorLocation, ts.Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here, name);
+ return true;
+ }
var symbol = resolveSymbol(resolveName(errorLocation, name, 793064 /* Type */ & ~107455 /* Value */, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined));
if (symbol && !(symbol.flags & 1024 /* NamespaceModule */)) {
error(errorLocation, ts.Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here, name);
@@ -26537,13 +27874,13 @@ var ts;
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));
+ error(errorLocation, ts.Diagnostics.Block_scoped_variable_0_used_before_its_declaration, ts.declarationNameToString(ts.getNameOfDeclaration(declaration)));
}
else if (result.flags & 32 /* Class */) {
- error(errorLocation, ts.Diagnostics.Class_0_used_before_its_declaration, ts.declarationNameToString(declaration.name));
+ error(errorLocation, ts.Diagnostics.Class_0_used_before_its_declaration, ts.declarationNameToString(ts.getNameOfDeclaration(declaration)));
}
- else if (result.flags & 384 /* Enum */) {
- error(errorLocation, ts.Diagnostics.Enum_0_used_before_its_declaration, ts.declarationNameToString(declaration.name));
+ else if (result.flags & 256 /* RegularEnum */) {
+ error(errorLocation, ts.Diagnostics.Enum_0_used_before_its_declaration, ts.declarationNameToString(ts.getNameOfDeclaration(declaration)));
}
}
}
@@ -26559,7 +27896,7 @@ var ts;
if (node.kind === 237 /* ImportEqualsDeclaration */) {
return node;
}
- return ts.findAncestor(node, function (n) { return n.kind === 238 /* ImportDeclaration */; });
+ return ts.findAncestor(node, ts.isImportDeclaration);
}
}
function getDeclarationOfAliasSymbol(symbol) {
@@ -26616,6 +27953,9 @@ var ts;
// An 'import { Point } from "graphics"' needs to create a symbol that combines the value side 'Point'
// property with the type/namespace side interface 'Point'.
function combineValueAndTypeSymbols(valueSymbol, typeSymbol) {
+ if (valueSymbol === unknownSymbol && typeSymbol === unknownSymbol) {
+ return unknownSymbol;
+ }
if (valueSymbol.flags & (793064 /* Type */ | 1920 /* Namespace */)) {
return valueSymbol;
}
@@ -26683,10 +28023,10 @@ var ts;
function getTargetOfNamespaceExportDeclaration(node, dontResolveAlias) {
return resolveExternalModuleSymbol(node.parent.symbol, dontResolveAlias);
}
- function getTargetOfExportSpecifier(node, dontResolveAlias) {
+ function getTargetOfExportSpecifier(node, meaning, dontResolveAlias) {
return node.parent.parent.moduleSpecifier ?
getExternalModuleMember(node.parent.parent, node, dontResolveAlias) :
- resolveEntityName(node.propertyName || node.name, 107455 /* Value */ | 793064 /* Type */ | 1920 /* Namespace */, /*ignoreErrors*/ false, dontResolveAlias);
+ resolveEntityName(node.propertyName || node.name, meaning, /*ignoreErrors*/ false, dontResolveAlias);
}
function getTargetOfExportAssignment(node, dontResolveAlias) {
return resolveEntityName(node.expression, 107455 /* Value */ | 793064 /* Type */ | 1920 /* Namespace */, /*ignoreErrors*/ false, dontResolveAlias);
@@ -26702,15 +28042,22 @@ var ts;
case 242 /* ImportSpecifier */:
return getTargetOfImportSpecifier(node, dontRecursivelyResolve);
case 246 /* ExportSpecifier */:
- return getTargetOfExportSpecifier(node, dontRecursivelyResolve);
+ return getTargetOfExportSpecifier(node, 107455 /* Value */ | 793064 /* Type */ | 1920 /* Namespace */, dontRecursivelyResolve);
case 243 /* ExportAssignment */:
return getTargetOfExportAssignment(node, dontRecursivelyResolve);
case 236 /* NamespaceExportDeclaration */:
return getTargetOfNamespaceExportDeclaration(node, dontRecursivelyResolve);
}
}
+ /**
+ * Indicates that a symbol is an alias that does not merge with a local declaration.
+ */
+ function isNonLocalAlias(symbol, excludes) {
+ if (excludes === void 0) { excludes = 107455 /* Value */ | 793064 /* Type */ | 1920 /* Namespace */; }
+ return symbol && (symbol.flags & (8388608 /* Alias */ | excludes)) === 8388608 /* Alias */;
+ }
function resolveSymbol(symbol, dontResolveAlias) {
- var shouldResolve = !dontResolveAlias && symbol && symbol.flags & 8388608 /* Alias */ && !(symbol.flags & (107455 /* Value */ | 793064 /* Type */ | 1920 /* Namespace */));
+ var shouldResolve = !dontResolveAlias && isNonLocalAlias(symbol);
return shouldResolve ? resolveAlias(symbol) : symbol;
}
function resolveAlias(symbol) {
@@ -26851,7 +28198,7 @@ var ts;
else {
ts.Debug.fail("Unknown entity name kind.");
}
- ts.Debug.assert((getCheckFlags(symbol) & 1 /* Instantiated */) === 0, "Should never get an instantiated symbol here.");
+ ts.Debug.assert((ts.getCheckFlags(symbol) & 1 /* Instantiated */) === 0, "Should never get an instantiated symbol here.");
return (symbol.flags & meaning) || dontResolveAlias ? symbol : resolveAlias(symbol);
}
function resolveExternalModuleName(location, moduleReferenceExpression) {
@@ -26873,6 +28220,11 @@ var ts;
if (moduleName === undefined) {
return;
}
+ if (ts.startsWith(moduleReference, "@types/")) {
+ var diag = ts.Diagnostics.Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1;
+ var withoutAtTypePrefix = ts.removePrefix(moduleReference, "@types/");
+ error(errorNode, diag, withoutAtTypePrefix, moduleReference);
+ }
var ambientModule = tryFindAmbientModule(moduleName, /*withAugmentations*/ true);
if (ambientModule) {
return ambientModule;
@@ -26905,7 +28257,9 @@ var ts;
error(errorNode, diag, moduleReference, resolvedModule.resolvedFileName);
}
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);
+ var errorInfo = ts.chainDiagnosticMessages(/*details*/ undefined, ts.Diagnostics.Try_npm_install_types_Slash_0_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0, moduleReference);
+ errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type, moduleReference, resolvedModule.resolvedFileName);
+ diagnostics.add(ts.createDiagnosticForNodeFromMessageChain(errorNode, errorInfo));
}
// Failed imports and untyped modules are both treated in an untyped manner; only difference is whether we give a diagnostic first.
return undefined;
@@ -26940,7 +28294,6 @@ var ts;
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;
}
@@ -27059,8 +28412,8 @@ var ts;
}
function findConstructorDeclaration(node) {
var members = node.members;
- for (var _i = 0, members_1 = members; _i < members_1.length; _i++) {
- var member = members_1[_i];
+ for (var _i = 0, members_2 = members; _i < members_2.length; _i++) {
+ var member = members_2[_i];
if (member.kind === 152 /* Constructor */ && ts.nodeIsPresent(member.body)) {
return member;
}
@@ -27090,7 +28443,7 @@ var ts;
return type;
}
function createTypeofType() {
- return getUnionType(ts.convertToArray(typeofEQFacts.keys(), function (s) { return getLiteralTypeForText(32 /* StringLiteral */, s); }));
+ return getUnionType(ts.convertToArray(typeofEQFacts.keys(), getLiteralType));
}
// 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
@@ -27201,7 +28554,7 @@ var ts;
// Is this external alias, then use it to name
ts.forEach(symbolFromSymbolTable.declarations, ts.isExternalModuleImportEqualsDeclaration)) {
var resolvedImportedSymbol = resolveAlias(symbolFromSymbolTable);
- if (isAccessible(symbolFromSymbolTable, resolveAlias(symbolFromSymbolTable))) {
+ if (isAccessible(symbolFromSymbolTable, resolvedImportedSymbol)) {
return [symbolFromSymbolTable];
}
// Look in the exported members, if we can find accessibleSymbolChain, symbol is accessible using this chain
@@ -27420,34 +28773,59 @@ var ts;
return result;
}
function typeToString(type, enclosingDeclaration, flags) {
- var writer = ts.getSingleLineStringWriter();
- getSymbolDisplayBuilder().buildTypeDisplay(type, writer, enclosingDeclaration, flags);
- var result = writer.string();
- ts.releaseStringWriter(writer);
- var maxLength = compilerOptions.noErrorTruncation || flags & 4 /* NoTruncation */ ? undefined : 100;
+ var typeNode = nodeBuilder.typeToTypeNode(type, enclosingDeclaration, toNodeBuilderFlags(flags) | ts.NodeBuilderFlags.IgnoreErrors | ts.NodeBuilderFlags.WriteTypeParametersInQualifiedName);
+ ts.Debug.assert(typeNode !== undefined, "should always get typenode");
+ var options = { removeComments: true };
+ var writer = ts.createTextWriter("");
+ var printer = ts.createPrinter(options);
+ var sourceFile = enclosingDeclaration && ts.getSourceFileOfNode(enclosingDeclaration);
+ printer.writeNode(3 /* Unspecified */, typeNode, /*sourceFile*/ sourceFile, writer);
+ var result = writer.getText();
+ var maxLength = compilerOptions.noErrorTruncation || flags & 8 /* NoTruncation */ ? undefined : 100;
if (maxLength && result.length >= maxLength) {
- result = result.substr(0, maxLength - "...".length) + "...";
+ return result.substr(0, maxLength - "...".length) + "...";
}
return result;
+ function toNodeBuilderFlags(flags) {
+ var result = ts.NodeBuilderFlags.None;
+ if (!flags) {
+ return result;
+ }
+ if (flags & 8 /* NoTruncation */) {
+ result |= ts.NodeBuilderFlags.NoTruncation;
+ }
+ if (flags & 256 /* UseFullyQualifiedType */) {
+ result |= ts.NodeBuilderFlags.UseFullyQualifiedType;
+ }
+ if (flags & 4096 /* SuppressAnyReturnType */) {
+ result |= ts.NodeBuilderFlags.SuppressAnyReturnType;
+ }
+ if (flags & 1 /* WriteArrayAsGenericType */) {
+ result |= ts.NodeBuilderFlags.WriteArrayAsGenericType;
+ }
+ if (flags & 64 /* WriteTypeArgumentsOfSignature */) {
+ result |= ts.NodeBuilderFlags.WriteTypeArgumentsOfSignature;
+ }
+ return result;
+ }
}
function createNodeBuilder() {
- var context;
return {
typeToTypeNode: function (type, enclosingDeclaration, flags) {
- context = createNodeBuilderContext(enclosingDeclaration, flags);
- var resultingNode = typeToTypeNodeHelper(type);
+ var context = createNodeBuilderContext(enclosingDeclaration, flags);
+ var resultingNode = typeToTypeNodeHelper(type, context);
var result = context.encounteredError ? undefined : resultingNode;
return result;
},
indexInfoToIndexSignatureDeclaration: function (indexInfo, kind, enclosingDeclaration, flags) {
- context = createNodeBuilderContext(enclosingDeclaration, flags);
- var resultingNode = indexInfoToIndexSignatureDeclarationHelper(indexInfo, kind);
+ var context = createNodeBuilderContext(enclosingDeclaration, flags);
+ var resultingNode = indexInfoToIndexSignatureDeclarationHelper(indexInfo, kind, context);
var result = context.encounteredError ? undefined : resultingNode;
return result;
},
signatureToSignatureDeclaration: function (signature, kind, enclosingDeclaration, flags) {
- context = createNodeBuilderContext(enclosingDeclaration, flags);
- var resultingNode = signatureToSignatureDeclarationHelper(signature, kind);
+ var context = createNodeBuilderContext(enclosingDeclaration, flags);
+ var resultingNode = signatureToSignatureDeclarationHelper(signature, kind, context);
var result = context.encounteredError ? undefined : resultingNode;
return result;
}
@@ -27457,15 +28835,14 @@ var ts;
enclosingDeclaration: enclosingDeclaration,
flags: flags,
encounteredError: false,
- inObjectTypeLiteral: false,
- checkAlias: true,
symbolStack: undefined
};
}
- function typeToTypeNodeHelper(type) {
+ function typeToTypeNodeHelper(type, context) {
+ var inTypeAlias = context.flags & ts.NodeBuilderFlags.InTypeAlias;
+ context.flags &= ~ts.NodeBuilderFlags.InTypeAlias;
if (!type) {
context.encounteredError = true;
- // TODO(aozgaa): should we return implict any (undefined) or explicit any (keywordtypenode)?
return undefined;
}
if (type.flags & 1 /* Any */) {
@@ -27480,23 +28857,25 @@ var ts;
if (type.flags & 8 /* Boolean */) {
return ts.createKeywordTypeNode(122 /* BooleanKeyword */);
}
- if (type.flags & 16 /* Enum */) {
- var name = symbolToName(type.symbol, /*expectsIdentifier*/ false);
+ if (type.flags & 256 /* EnumLiteral */ && !(type.flags & 65536 /* Union */)) {
+ var parentSymbol = getParentOfSymbol(type.symbol);
+ var parentName = symbolToName(parentSymbol, context, 793064 /* Type */, /*expectsIdentifier*/ false);
+ var enumLiteralName = getDeclaredTypeOfSymbol(parentSymbol) === type ? parentName : ts.createQualifiedName(parentName, getNameOfSymbol(type.symbol, context));
+ return ts.createTypeReferenceNode(enumLiteralName, /*typeArguments*/ undefined);
+ }
+ if (type.flags & 272 /* EnumLike */) {
+ var name = symbolToName(type.symbol, context, 793064 /* Type */, /*expectsIdentifier*/ false);
return ts.createTypeReferenceNode(name, /*typeArguments*/ undefined);
}
if (type.flags & (32 /* StringLiteral */)) {
- return ts.createLiteralTypeNode((ts.createLiteral(type.text)));
+ return ts.createLiteralTypeNode(ts.setEmitFlags(ts.createLiteral(type.value), 16777216 /* NoAsciiEscaping */));
}
if (type.flags & (64 /* NumberLiteral */)) {
- return ts.createLiteralTypeNode((ts.createNumericLiteral(type.text)));
+ return ts.createLiteralTypeNode((ts.createLiteral(type.value)));
}
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(105 /* VoidKeyword */);
}
@@ -27516,8 +28895,8 @@ var ts;
return ts.createKeywordTypeNode(134 /* ObjectKeyword */);
}
if (type.flags & 16384 /* TypeParameter */ && type.isThisType) {
- if (context.inObjectTypeLiteral) {
- if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.allowThisInObjectLiteral)) {
+ if (context.flags & ts.NodeBuilderFlags.InObjectTypeLiteral) {
+ if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.AllowThisInObjectLiteral)) {
context.encounteredError = true;
}
}
@@ -27528,39 +28907,31 @@ var ts;
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);
+ if (type.flags & 16384 /* TypeParameter */ || objectFlags & 3 /* ClassOrInterface */) {
+ var name = symbolToName(type.symbol, context, 793064 /* Type */, /*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);
+ if (!inTypeAlias && type.aliasSymbol &&
+ isSymbolAccessible(type.aliasSymbol, context.enclosingDeclaration, 793064 /* Type */, /*shouldComputeAliasesToMakeVisible*/ false).accessibility === 0 /* Accessible */) {
+ var name = symbolToTypeReferenceName(type.aliasSymbol);
+ var typeArgumentNodes = mapToTypeNodes(type.aliasTypeArguments, context);
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(166 /* UnionType */, unionTypeNodes);
+ if (type.flags & (65536 /* Union */ | 131072 /* Intersection */)) {
+ var types = type.flags & 65536 /* Union */ ? formatUnionTypes(type.types) : type.types;
+ var typeNodes = mapToTypeNodes(types, context);
+ if (typeNodes && typeNodes.length > 0) {
+ var unionOrIntersectionTypeNode = ts.createUnionOrIntersectionTypeNode(type.flags & 65536 /* Union */ ? 166 /* UnionType */ : 167 /* IntersectionType */, typeNodes);
+ return unionOrIntersectionTypeNode;
}
else {
- if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.allowEmptyUnionOrIntersection)) {
+ if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.AllowEmptyUnionOrIntersection)) {
context.encounteredError = true;
}
return undefined;
}
}
- if (type.flags & 131072 /* Intersection */) {
- return ts.createUnionOrIntersectionTypeNode(167 /* IntersectionType */, mapToTypeNodeArray(type.types));
- }
if (objectFlags & (16 /* Anonymous */ | 32 /* Mapped */)) {
ts.Debug.assert(!!(type.flags & 32768 /* Object */));
// The type is an object literal type.
@@ -27568,35 +28939,23 @@ var ts;
}
if (type.flags & 262144 /* Index */) {
var indexedType = type.type;
- var indexTypeNode = typeToTypeNodeHelper(indexedType);
+ var indexTypeNode = typeToTypeNodeHelper(indexedType, context);
return ts.createTypeOperatorNode(indexTypeNode);
}
if (type.flags & 524288 /* IndexedAccess */) {
- var objectTypeNode = typeToTypeNodeHelper(type.objectType);
- var indexTypeNode = typeToTypeNodeHelper(type.indexType);
+ var objectTypeNode = typeToTypeNodeHelper(type.objectType, context);
+ var indexTypeNode = typeToTypeNodeHelper(type.indexType, context);
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(131 /* ReadonlyKeyword */) : undefined;
var questionToken = type.declaration && type.declaration.questionToken ? ts.createToken(55 /* QuestionToken */) : undefined;
- return ts.createMappedTypeNode(readonlyToken, typeParameterNode, questionToken, templateTypeNode);
+ var typeParameterNode = typeParameterToDeclaration(getTypeParameterFromMappedType(type), context);
+ var templateTypeNode = typeToTypeNodeHelper(getTemplateTypeFromMappedType(type), context);
+ var mappedTypeNode = ts.createMappedTypeNode(readonlyToken, typeParameterNode, questionToken, templateTypeNode);
+ return ts.setEmitFlags(mappedTypeNode, 1 /* SingleLine */);
}
function createAnonymousTypeNode(type) {
var symbol = type.symbol;
@@ -27605,14 +28964,14 @@ var ts;
if (symbol.flags & 32 /* Class */ && !getBaseTypeVariableOfClass(symbol) ||
symbol.flags & (384 /* Enum */ | 512 /* ValueModule */) ||
shouldWriteTypeOfFunctionSymbol()) {
- return createTypeQueryNodeFromSymbol(symbol);
+ return createTypeQueryNodeFromSymbol(symbol, 107455 /* Value */);
}
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);
+ var entityName = symbolToName(typeAlias, context, 793064 /* Type */, /*expectsIdentifier*/ false);
return ts.createTypeReferenceNode(entityName, /*typeArguments*/ undefined);
}
else {
@@ -27658,41 +29017,53 @@ var ts;
var resolved = resolveStructuredTypeMembers(type);
if (!resolved.properties.length && !resolved.stringIndexInfo && !resolved.numberIndexInfo) {
if (!resolved.callSignatures.length && !resolved.constructSignatures.length) {
- return ts.createTypeLiteralNode(/*members*/ undefined);
+ return ts.setEmitFlags(ts.createTypeLiteralNode(/*members*/ undefined), 1 /* SingleLine */);
}
if (resolved.callSignatures.length === 1 && !resolved.constructSignatures.length) {
var signature = resolved.callSignatures[0];
- return signatureToSignatureDeclarationHelper(signature, 160 /* FunctionType */);
+ var signatureNode = signatureToSignatureDeclarationHelper(signature, 160 /* FunctionType */, context);
+ return signatureNode;
}
if (resolved.constructSignatures.length === 1 && !resolved.callSignatures.length) {
var signature = resolved.constructSignatures[0];
- return signatureToSignatureDeclarationHelper(signature, 161 /* ConstructorType */);
+ var signatureNode = signatureToSignatureDeclarationHelper(signature, 161 /* ConstructorType */, context);
+ return signatureNode;
}
}
- var saveInObjectTypeLiteral = context.inObjectTypeLiteral;
- context.inObjectTypeLiteral = true;
+ var savedFlags = context.flags;
+ context.flags |= ts.NodeBuilderFlags.InObjectTypeLiteral;
var members = createTypeNodesFromResolvedType(resolved);
- context.inObjectTypeLiteral = saveInObjectTypeLiteral;
- return ts.createTypeLiteralNode(members);
+ context.flags = savedFlags;
+ var typeLiteralNode = ts.createTypeLiteralNode(members);
+ return ts.setEmitFlags(typeLiteralNode, 1 /* SingleLine */);
}
- function createTypeQueryNodeFromSymbol(symbol) {
- var entityName = symbolToName(symbol, /*expectsIdentifier*/ false);
+ function createTypeQueryNodeFromSymbol(symbol, symbolFlags) {
+ var entityName = symbolToName(symbol, context, symbolFlags, /*expectsIdentifier*/ false);
return ts.createTypeQueryNode(entityName);
}
+ function symbolToTypeReferenceName(symbol) {
+ // Unnamed function expressions and arrow functions have reserved names that we don't want to display
+ var entityName = symbol.flags & 32 /* Class */ || !isReservedMemberName(symbol.name) ? symbolToName(symbol, context, 793064 /* Type */, /*expectsIdentifier*/ false) : ts.createIdentifier("");
+ return entityName;
+ }
function typeReferenceToTypeNode(type) {
var typeArguments = type.typeArguments || emptyArray;
if (type.target === globalArrayType) {
- var elementType = typeToTypeNodeHelper(typeArguments[0]);
+ if (context.flags & ts.NodeBuilderFlags.WriteArrayAsGenericType) {
+ var typeArgumentNode = typeToTypeNodeHelper(typeArguments[0], context);
+ return ts.createTypeReferenceNode("Array", [typeArgumentNode]);
+ }
+ var elementType = typeToTypeNodeHelper(typeArguments[0], context);
return ts.createArrayTypeNode(elementType);
}
else if (type.target.objectFlags & 8 /* Tuple */) {
if (typeArguments.length > 0) {
- var tupleConstituentNodes = mapToTypeNodeArray(typeArguments.slice(0, getTypeReferenceArity(type)));
+ var tupleConstituentNodes = mapToTypeNodes(typeArguments.slice(0, getTypeReferenceArity(type)), context);
if (tupleConstituentNodes && tupleConstituentNodes.length > 0) {
return ts.createTupleTypeNode(tupleConstituentNodes);
}
}
- if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.allowEmptyTuple)) {
+ if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.AllowEmptyTuple)) {
context.encounteredError = true;
}
return undefined;
@@ -27700,7 +29071,7 @@ var ts;
else {
var outerTypeParameters = type.target.outerTypeParameters;
var i = 0;
- var qualifiedName = undefined;
+ var qualifiedName = void 0;
if (outerTypeParameters) {
var length_1 = outerTypeParameters.length;
while (i < length_1) {
@@ -27713,48 +29084,72 @@ var ts;
// 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 {
+ var typeArgumentSlice = mapToTypeNodes(typeArguments.slice(start, i), context);
+ var typeArgumentNodes_1 = typeArgumentSlice && ts.createNodeArray(typeArgumentSlice);
+ var namePart = symbolToTypeReferenceName(parent);
+ (namePart.kind === 71 /* Identifier */ ? namePart : namePart.right).typeArguments = typeArgumentNodes_1;
+ if (qualifiedName) {
ts.Debug.assert(!qualifiedName.right);
- qualifiedName.right = qualifiedNamePart;
+ qualifiedName = addToQualifiedNameMissingRightIdentifier(qualifiedName, namePart);
qualifiedName = ts.createQualifiedName(qualifiedName, /*right*/ undefined);
}
+ else {
+ qualifiedName = ts.createQualifiedName(namePart, /*right*/ undefined);
+ }
}
}
}
var entityName = undefined;
- var nameIdentifier = symbolToName(type.symbol, /*expectsIdentifier*/ true);
+ var nameIdentifier = symbolToTypeReferenceName(type.symbol);
if (qualifiedName) {
ts.Debug.assert(!qualifiedName.right);
- qualifiedName.right = nameIdentifier;
+ qualifiedName = addToQualifiedNameMissingRightIdentifier(qualifiedName, 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;
+ var typeArgumentNodes = void 0;
+ if (typeArguments.length > 0) {
+ var typeParameterCount = (type.target.typeParameters || emptyArray).length;
+ typeArgumentNodes = mapToTypeNodes(typeArguments.slice(i, typeParameterCount), context);
+ }
+ if (typeArgumentNodes) {
+ var lastIdentifier = entityName.kind === 71 /* Identifier */ ? entityName : entityName.right;
+ lastIdentifier.typeArguments = undefined;
+ }
return ts.createTypeReferenceNode(entityName, typeArgumentNodes);
}
}
+ function addToQualifiedNameMissingRightIdentifier(left, right) {
+ ts.Debug.assert(left.right === undefined);
+ if (right.kind === 71 /* Identifier */) {
+ left.right = right;
+ return left;
+ }
+ var rightPart = right;
+ while (rightPart.left.kind !== 71 /* Identifier */) {
+ rightPart = rightPart.left;
+ }
+ left.right = rightPart.left;
+ rightPart.left = left;
+ return right;
+ }
function createTypeNodesFromResolvedType(resolvedType) {
var typeElements = [];
for (var _i = 0, _a = resolvedType.callSignatures; _i < _a.length; _i++) {
var signature = _a[_i];
- typeElements.push(signatureToSignatureDeclarationHelper(signature, 155 /* CallSignature */));
+ typeElements.push(signatureToSignatureDeclarationHelper(signature, 155 /* CallSignature */, context));
}
for (var _b = 0, _c = resolvedType.constructSignatures; _b < _c.length; _b++) {
var signature = _c[_b];
- typeElements.push(signatureToSignatureDeclarationHelper(signature, 156 /* ConstructSignature */));
+ typeElements.push(signatureToSignatureDeclarationHelper(signature, 156 /* ConstructSignature */, context));
}
if (resolvedType.stringIndexInfo) {
- typeElements.push(indexInfoToIndexSignatureDeclarationHelper(resolvedType.stringIndexInfo, 0 /* String */));
+ typeElements.push(indexInfoToIndexSignatureDeclarationHelper(resolvedType.stringIndexInfo, 0 /* String */, context));
}
if (resolvedType.numberIndexInfo) {
- typeElements.push(indexInfoToIndexSignatureDeclarationHelper(resolvedType.numberIndexInfo, 1 /* Number */));
+ typeElements.push(indexInfoToIndexSignatureDeclarationHelper(resolvedType.numberIndexInfo, 1 /* Number */, context));
}
var properties = resolvedType.properties;
if (!properties) {
@@ -27763,86 +29158,141 @@ var ts;
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 saveEnclosingDeclaration = context.enclosingDeclaration;
+ context.enclosingDeclaration = undefined;
+ var propertyName = symbolToName(propertySymbol, context, 107455 /* Value */, /*expectsIdentifier*/ true);
+ context.enclosingDeclaration = saveEnclosingDeclaration;
var optionalToken = propertySymbol.flags & 67108864 /* Optional */ ? ts.createToken(55 /* 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, 150 /* MethodSignature */);
+ var methodDeclaration = signatureToSignatureDeclarationHelper(signature, 150 /* MethodSignature */, context);
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(119 /* AnyKeyword */);
- typeElements.push(ts.createPropertySignature(propertyName, optionalToken, propertyTypeNode,
- /*initializer*/ undefined));
+ var propertyTypeNode = propertyType ? typeToTypeNodeHelper(propertyType, context) : ts.createKeywordTypeNode(119 /* AnyKeyword */);
+ var modifiers = isReadonlySymbol(propertySymbol) ? [ts.createToken(131 /* ReadonlyKeyword */)] : undefined;
+ var propertySignature = ts.createPropertySignature(modifiers, propertyName, optionalToken, propertyTypeNode,
+ /*initializer*/ undefined);
+ typeElements.push(propertySignature);
}
}
return typeElements.length ? typeElements : undefined;
}
}
- function indexInfoToIndexSignatureDeclarationHelper(indexInfo, kind) {
+ function mapToTypeNodes(types, context) {
+ if (ts.some(types)) {
+ var result = [];
+ for (var i = 0; i < types.length; ++i) {
+ var type = types[i];
+ var typeNode = typeToTypeNodeHelper(type, context);
+ if (typeNode) {
+ result.push(typeNode);
+ }
+ }
+ return result;
+ }
+ }
+ function indexInfoToIndexSignatureDeclarationHelper(indexInfo, kind, context) {
+ var name = ts.getNameFromIndexInfo(indexInfo) || "x";
var indexerTypeNode = ts.createKeywordTypeNode(kind === 0 /* String */ ? 136 /* StringKeyword */ : 133 /* 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(
+ var typeNode = typeToTypeNodeHelper(indexInfo.type, context);
+ return ts.createIndexSignature(
/*decorators*/ undefined, indexInfo.isReadonly ? [ts.createToken(131 /* 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); });
+ function signatureToSignatureDeclarationHelper(signature, kind, context) {
+ var typeParameters = signature.typeParameters && signature.typeParameters.map(function (parameter) { return typeParameterToDeclaration(parameter, context); });
+ var parameters = signature.parameters.map(function (parameter) { return symbolToParameterDeclaration(parameter, context); });
+ if (signature.thisParameter) {
+ var thisParameter = symbolToParameterDeclaration(signature.thisParameter, context);
+ parameters.unshift(thisParameter);
+ }
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);
+ var parameterName = typePredicate.kind === 1 /* Identifier */ ?
+ ts.setEmitFlags(ts.createIdentifier(typePredicate.parameterName), 16777216 /* NoAsciiEscaping */) :
+ ts.createThisTypeNode();
+ var typeNode = typeToTypeNodeHelper(typePredicate.type, context);
returnTypeNode = ts.createTypePredicateNode(parameterName, typeNode);
}
else {
var returnType = getReturnTypeOfSignature(signature);
- returnTypeNode = returnType && typeToTypeNodeHelper(returnType);
+ returnTypeNode = returnType && typeToTypeNodeHelper(returnType, context);
}
- var returnTypeNodeExceptAny = returnTypeNode && returnTypeNode.kind !== 119 /* AnyKeyword */ ? returnTypeNode : undefined;
- return ts.createSignatureDeclaration(kind, typeParameters, parameters, returnTypeNodeExceptAny);
+ if (context.flags & ts.NodeBuilderFlags.SuppressAnyReturnType) {
+ if (returnTypeNode && returnTypeNode.kind === 119 /* AnyKeyword */) {
+ returnTypeNode = undefined;
+ }
+ }
+ else if (!returnTypeNode) {
+ returnTypeNode = ts.createKeywordTypeNode(119 /* AnyKeyword */);
+ }
+ return ts.createSignatureDeclaration(kind, typeParameters, parameters, returnTypeNode);
}
- function typeParameterToDeclaration(type) {
+ function typeParameterToDeclaration(type, context) {
+ var name = symbolToName(type.symbol, context, 793064 /* Type */, /*expectsIdentifier*/ true);
var constraint = getConstraintFromTypeParameter(type);
- var constraintNode = constraint && typeToTypeNodeHelper(constraint);
+ var constraintNode = constraint && typeToTypeNodeHelper(constraint, context);
var defaultParameter = getDefaultFromTypeParameter(type);
- var defaultParameterNode = defaultParameter && typeToTypeNodeHelper(defaultParameter);
- var name = symbolToName(type.symbol, /*expectsIdentifier*/ true);
+ var defaultParameterNode = defaultParameter && typeToTypeNodeHelper(defaultParameter, context);
return ts.createTypeParameterDeclaration(name, constraintNode, defaultParameterNode);
}
- function symbolToParameterDeclaration(parameterSymbol) {
+ function symbolToParameterDeclaration(parameterSymbol, context) {
var parameterDeclaration = ts.getDeclarationOfKind(parameterSymbol, 146 /* Parameter */);
+ if (isTransientSymbol(parameterSymbol) && parameterSymbol.isRestParameter) {
+ // special-case synthetic rest parameters in JS files
+ return ts.createParameter(
+ /*decorators*/ undefined,
+ /*modifiers*/ undefined, parameterSymbol.isRestParameter ? ts.createToken(24 /* DotDotDotToken */) : undefined, "args",
+ /*questionToken*/ undefined, typeToTypeNodeHelper(anyArrayType, context),
+ /*initializer*/ undefined);
+ }
+ var modifiers = parameterDeclaration.modifiers && parameterDeclaration.modifiers.map(ts.getSynthesizedClone);
+ var dotDotDotToken = ts.isRestParameter(parameterDeclaration) ? ts.createToken(24 /* DotDotDotToken */) : undefined;
+ var name = parameterDeclaration.name ?
+ parameterDeclaration.name.kind === 71 /* Identifier */ ?
+ ts.setEmitFlags(ts.getSynthesizedClone(parameterDeclaration.name), 16777216 /* NoAsciiEscaping */) :
+ cloneBindingName(parameterDeclaration.name) :
+ parameterSymbol.name;
+ var questionToken = isOptionalParameter(parameterDeclaration) ? ts.createToken(55 /* QuestionToken */) : undefined;
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(24 /* DotDotDotToken */),
- // Clone name to remove trivia.
- ts.getSynthesizedClone(parameterDeclaration.name), parameterDeclaration.questionToken && ts.createToken(55 /* QuestionToken */), parameterTypeNode, parameterDeclaration.initializer);
+ if (isRequiredInitializedParameter(parameterDeclaration)) {
+ parameterType = getNullableType(parameterType, 2048 /* Undefined */);
+ }
+ var parameterTypeNode = typeToTypeNodeHelper(parameterType, context);
+ var parameterNode = ts.createParameter(
+ /*decorators*/ undefined, modifiers, dotDotDotToken, name, questionToken, parameterTypeNode,
+ /*initializer*/ undefined);
return parameterNode;
+ function cloneBindingName(node) {
+ return elideInitializerAndSetEmitFlags(node);
+ function elideInitializerAndSetEmitFlags(node) {
+ var visited = ts.visitEachChild(node, elideInitializerAndSetEmitFlags, ts.nullTransformationContext, /*nodesVisitor*/ undefined, elideInitializerAndSetEmitFlags);
+ var clone = ts.nodeIsSynthesized(visited) ? visited : ts.getSynthesizedClone(visited);
+ if (clone.kind === 176 /* BindingElement */) {
+ clone.initializer = undefined;
+ }
+ return ts.setEmitFlags(clone, 1 /* SingleLine */ | 16777216 /* NoAsciiEscaping */);
+ }
+ }
}
- function symbolToName(symbol, expectsIdentifier) {
+ function symbolToName(symbol, context, meaning, 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);
+ if (!isTypeParameter && (context.enclosingDeclaration || context.flags & ts.NodeBuilderFlags.UseFullyQualifiedType)) {
+ chain = getSymbolChain(symbol, meaning, /*endOfChain*/ true);
ts.Debug.assert(chain && chain.length > 0);
}
else {
@@ -27850,19 +29300,18 @@ var ts;
}
if (expectsIdentifier && chain.length !== 1
&& !context.encounteredError
- && !(context.flags & ts.NodeBuilderFlags.allowQualifedNameInPlaceOfIdentifier)) {
+ && !(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 typeParameterNodes;
+ if (context.flags & ts.NodeBuilderFlags.WriteTypeParametersInQualifiedName && index > 0) {
var parentSymbol = chain[index - 1];
var typeParameters = void 0;
- if (getCheckFlags(symbol) & 1 /* Instantiated */) {
+ if (ts.getCheckFlags(symbol) & 1 /* Instantiated */) {
typeParameters = getTypeParametersOfClassOrInterface(parentSymbol);
}
else {
@@ -27871,20 +29320,10 @@ var ts;
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);
- }
+ typeParameterNodes = mapToTypeNodes(typeParameters, context);
}
- var symbolName = getNameOfSymbol(symbol);
- var symbolNameWithTypeParameters = typeParameterString.length > 0 ? symbolName + "<" + typeParameterString + ">" : symbolName;
- var identifier = ts.createIdentifier(symbolNameWithTypeParameters);
+ var symbolName = getNameOfSymbol(symbol, context);
+ var identifier = ts.setEmitFlags(ts.createIdentifier(symbolName, typeParameterNodes), 16777216 /* NoAsciiEscaping */);
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. */
@@ -27916,28 +29355,29 @@ var ts;
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 === 226 /* VariableDeclaration */) {
- return ts.declarationNameToString(declaration.parent.name);
- }
- if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.allowAnonymousIdentifier)) {
- context.encounteredError = true;
- }
- switch (declaration.kind) {
- case 199 /* ClassExpression */:
- return "(Anonymous class)";
- case 186 /* FunctionExpression */:
- case 187 /* ArrowFunction */:
- return "(Anonymous function)";
- }
+ }
+ function getNameOfSymbol(symbol, context) {
+ var declaration = ts.firstOrUndefined(symbol.declarations);
+ if (declaration) {
+ var name = ts.getNameOfDeclaration(declaration);
+ if (name) {
+ return ts.declarationNameToString(name);
+ }
+ if (declaration.parent && declaration.parent.kind === 226 /* VariableDeclaration */) {
+ return ts.declarationNameToString(declaration.parent.name);
+ }
+ if (!context.encounteredError && !(context.flags & ts.NodeBuilderFlags.AllowAnonymousIdentifier)) {
+ context.encounteredError = true;
+ }
+ switch (declaration.kind) {
+ case 199 /* ClassExpression */:
+ return "(Anonymous class)";
+ case 186 /* FunctionExpression */:
+ case 187 /* ArrowFunction */:
+ return "(Anonymous function)";
}
- return symbol.name;
}
+ return symbol.name;
}
}
function typePredicateToString(typePredicate, enclosingDeclaration, flags) {
@@ -27955,12 +29395,14 @@ var ts;
flags |= t.flags;
if (!(t.flags & 6144 /* Nullable */)) {
if (t.flags & (128 /* BooleanLiteral */ | 256 /* EnumLiteral */)) {
- var baseType = t.flags & 128 /* BooleanLiteral */ ? booleanType : t.baseType;
- var count = baseType.types.length;
- if (i + count <= types.length && types[i + count - 1] === baseType.types[count - 1]) {
- result.push(baseType);
- i += count - 1;
- continue;
+ var baseType = t.flags & 128 /* BooleanLiteral */ ? booleanType : getBaseTypeOfEnumLiteralType(t);
+ if (baseType.flags & 65536 /* Union */) {
+ var count = baseType.types.length;
+ if (i + count <= types.length && types[i + count - 1] === baseType.types[count - 1]) {
+ result.push(baseType);
+ i += count - 1;
+ continue;
+ }
}
}
result.push(t);
@@ -27996,13 +29438,14 @@ var ts;
ts.isExternalModuleAugmentation(node.parent.parent);
}
function literalTypeToString(type) {
- return type.flags & 32 /* StringLiteral */ ? "\"" + ts.escapeString(type.text) + "\"" : type.text;
+ return type.flags & 32 /* StringLiteral */ ? "\"" + ts.escapeString(type.value) + "\"" : "" + type.value;
}
function getNameOfSymbol(symbol) {
if (symbol.declarations && symbol.declarations.length) {
var declaration = symbol.declarations[0];
- if (declaration.name) {
- return ts.declarationNameToString(declaration.name);
+ var name = ts.getNameOfDeclaration(declaration);
+ if (name) {
+ return ts.declarationNameToString(name);
}
if (declaration.parent && declaration.parent.kind === 226 /* VariableDeclaration */) {
return ts.declarationNameToString(declaration.parent.name);
@@ -28059,8 +29502,9 @@ var ts;
if (parentSymbol) {
// Write type arguments of instantiated class/interface here
if (flags & 1 /* WriteTypeParametersOrArguments */) {
- if (getCheckFlags(symbol) & 1 /* Instantiated */) {
- buildDisplayForTypeArgumentsAndDelimiters(getTypeParametersOfClassOrInterface(parentSymbol), symbol.mapper, writer, enclosingDeclaration);
+ if (ts.getCheckFlags(symbol) & 1 /* Instantiated */) {
+ var params = getTypeParametersOfClassOrInterface(parentSymbol.flags & 8388608 /* Alias */ ? resolveAlias(parentSymbol) : parentSymbol);
+ buildDisplayForTypeArgumentsAndDelimiters(params, symbol.mapper, writer, enclosingDeclaration);
}
else {
buildTypeParameterDisplayFromSymbol(parentSymbol, writer, enclosingDeclaration);
@@ -28112,7 +29556,7 @@ var ts;
// and there is an enclosing declaration or we specifically
// asked for it
var isTypeParameter = symbol.flags & 262144 /* TypeParameter */;
- var typeFormatFlag = 128 /* UseFullyQualifiedType */ & typeFlags;
+ var typeFormatFlag = 256 /* UseFullyQualifiedType */ & typeFlags;
if (!isTypeParameter && (enclosingDeclaration || typeFormatFlag)) {
walkSymbol(symbol, meaning, /*endOfChain*/ true);
}
@@ -28121,15 +29565,15 @@ var ts;
}
}
function buildTypeDisplay(type, writer, enclosingDeclaration, globalFlags, symbolStack) {
- var globalFlagsToPass = globalFlags & 16 /* WriteOwnNameForAnyLike */;
+ var globalFlagsToPass = globalFlags & (32 /* WriteOwnNameForAnyLike */ | 16384 /* WriteClassExpressionAsTypeLiteral */);
var inObjectTypeLiteral = false;
return writeType(type, globalFlags);
function writeType(type, flags) {
- var nextFlags = flags & ~512 /* InTypeAlias */;
+ var nextFlags = flags & ~1024 /* InTypeAlias */;
// Write undefined/null type as any
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)
+ writer.writeKeyword(!(globalFlags & 32 /* WriteOwnNameForAnyLike */) && isTypeAny(type)
? "any"
: type.intrinsicName);
}
@@ -28142,16 +29586,21 @@ var ts;
else if (getObjectFlags(type) & 4 /* Reference */) {
writeTypeReference(type, nextFlags);
}
- else if (type.flags & 256 /* EnumLiteral */) {
- buildSymbolDisplay(getParentOfSymbol(type.symbol), writer, enclosingDeclaration, 793064 /* Type */, 0 /* None */, nextFlags);
- writePunctuation(writer, 23 /* DotToken */);
- appendSymbolNameOnly(type.symbol, writer);
+ else if (type.flags & 256 /* EnumLiteral */ && !(type.flags & 65536 /* Union */)) {
+ var parent = getParentOfSymbol(type.symbol);
+ buildSymbolDisplay(parent, writer, enclosingDeclaration, 793064 /* Type */, 0 /* None */, nextFlags);
+ // In a literal enum type with a single member E { A }, E and E.A denote the
+ // same type. We always display this type simply as E.
+ if (getDeclaredTypeOfSymbol(parent) !== type) {
+ writePunctuation(writer, 23 /* DotToken */);
+ appendSymbolNameOnly(type.symbol, writer);
+ }
}
- else if (getObjectFlags(type) & 3 /* ClassOrInterface */ || type.flags & (16 /* Enum */ | 16384 /* TypeParameter */)) {
+ else if (getObjectFlags(type) & 3 /* ClassOrInterface */ || type.flags & (272 /* EnumLike */ | 16384 /* TypeParameter */)) {
// The specified symbol flags need to be reinterpreted as type flags
buildSymbolDisplay(type.symbol, writer, enclosingDeclaration, 793064 /* Type */, 0 /* None */, nextFlags);
}
- else if (!(flags & 512 /* InTypeAlias */) && type.aliasSymbol &&
+ else if (!(flags & 1024 /* InTypeAlias */) && type.aliasSymbol &&
isSymbolAccessible(type.aliasSymbol, enclosingDeclaration, 793064 /* Type */, /*shouldComputeAliasesToMakeVisible*/ false).accessibility === 0 /* Accessible */) {
var typeArguments = type.aliasTypeArguments;
writeSymbolTypeReference(type.aliasSymbol, typeArguments, 0, ts.length(typeArguments), nextFlags);
@@ -28166,12 +29615,18 @@ var ts;
writer.writeStringLiteral(literalTypeToString(type));
}
else if (type.flags & 262144 /* Index */) {
+ if (flags & 128 /* InElementType */) {
+ writePunctuation(writer, 19 /* OpenParenToken */);
+ }
writer.writeKeyword("keyof");
writeSpace(writer);
- writeType(type.type, 64 /* InElementType */);
+ writeType(type.type, 128 /* InElementType */);
+ if (flags & 128 /* InElementType */) {
+ writePunctuation(writer, 20 /* CloseParenToken */);
+ }
}
else if (type.flags & 524288 /* IndexedAccess */) {
- writeType(type.objectType, 64 /* InElementType */);
+ writeType(type.objectType, 128 /* InElementType */);
writePunctuation(writer, 21 /* OpenBracketToken */);
writeType(type.indexType, 0 /* None */);
writePunctuation(writer, 22 /* CloseBracketToken */);
@@ -28195,7 +29650,7 @@ var ts;
writePunctuation(writer, delimiter);
writeSpace(writer);
}
- writeType(types[i], delimiter === 26 /* CommaToken */ ? 0 /* None */ : 64 /* InElementType */);
+ writeType(types[i], delimiter === 26 /* CommaToken */ ? 0 /* None */ : 128 /* InElementType */);
}
}
function writeSymbolTypeReference(symbol, typeArguments, pos, end, flags) {
@@ -28205,7 +29660,7 @@ var ts;
}
if (pos < end) {
writePunctuation(writer, 27 /* LessThanToken */);
- writeType(typeArguments[pos], 256 /* InFirstTypeArgument */);
+ writeType(typeArguments[pos], 512 /* InFirstTypeArgument */);
pos++;
while (pos < end) {
writePunctuation(writer, 26 /* CommaToken */);
@@ -28219,7 +29674,7 @@ var ts;
function writeTypeReference(type, flags) {
var typeArguments = type.typeArguments || emptyArray;
if (type.target === globalArrayType && !(flags & 1 /* WriteArrayAsGenericType */)) {
- writeType(typeArguments[0], 64 /* InElementType */);
+ writeType(typeArguments[0], 128 /* InElementType */);
writePunctuation(writer, 21 /* OpenBracketToken */);
writePunctuation(writer, 22 /* CloseBracketToken */);
}
@@ -28228,6 +29683,11 @@ var ts;
writeTypeList(type.typeArguments.slice(0, getTypeReferenceArity(type)), 26 /* CommaToken */);
writePunctuation(writer, 22 /* CloseBracketToken */);
}
+ else if (flags & 16384 /* WriteClassExpressionAsTypeLiteral */ &&
+ type.symbol.valueDeclaration &&
+ type.symbol.valueDeclaration.kind === 199 /* ClassExpression */) {
+ writeAnonymousType(getDeclaredTypeOfClassOrInterface(type.symbol), flags);
+ }
else {
// Write the type reference in the format f<A>.g<B>.C<X, Y> where A and B are type arguments
// for outer type parameters, and f and g are the respective declaring containers of those
@@ -28256,7 +29716,7 @@ var ts;
}
}
function writeUnionOrIntersectionType(type, flags) {
- if (flags & 64 /* InElementType */) {
+ if (flags & 128 /* InElementType */) {
writePunctuation(writer, 19 /* OpenParenToken */);
}
if (type.flags & 65536 /* Union */) {
@@ -28265,7 +29725,7 @@ var ts;
else {
writeTypeList(type.types, 48 /* AmpersandToken */);
}
- if (flags & 64 /* InElementType */) {
+ if (flags & 128 /* InElementType */) {
writePunctuation(writer, 20 /* CloseParenToken */);
}
}
@@ -28273,7 +29733,9 @@ 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 */ && !getBaseTypeVariableOfClass(symbol) ||
+ if (symbol.flags & 32 /* Class */ &&
+ !getBaseTypeVariableOfClass(symbol) &&
+ !(symbol.valueDeclaration.kind === 199 /* ClassExpression */ && flags & 16384 /* WriteClassExpressionAsTypeLiteral */) ||
symbol.flags & (384 /* Enum */ | 512 /* ValueModule */)) {
writeTypeOfSymbol(type, flags);
}
@@ -28295,12 +29757,23 @@ var ts;
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
+ // However, in case of class expressions, we want to write both the static side and the instance side.
+ // We skip adding the static side so that the instance side has a chance to be written
+ // before checking for circular references.
if (!symbolStack) {
symbolStack = [];
}
- symbolStack.push(symbol);
- writeLiteralType(type, flags);
- symbolStack.pop();
+ var isConstructorObject = type.flags & 32768 /* Object */ &&
+ getObjectFlags(type) & 16 /* Anonymous */ &&
+ type.symbol && type.symbol.flags & 32 /* Class */;
+ if (isConstructorObject) {
+ writeLiteralType(type, flags);
+ }
+ else {
+ symbolStack.push(symbol);
+ writeLiteralType(type, flags);
+ symbolStack.pop();
+ }
}
}
else {
@@ -28317,7 +29790,7 @@ var ts;
}));
if (isStaticMethodSymbol || isNonLocalFunctionSymbol) {
// typeof is allowed only for static/non local functions
- return !!(flags & 2 /* UseTypeOfFunction */) ||
+ return !!(flags & 4 /* UseTypeOfFunction */) ||
(ts.contains(symbolStack, symbol)); // it is type of the symbol uses itself recursively
}
}
@@ -28338,12 +29811,12 @@ var ts;
}
}
function shouldAddParenthesisAroundFunctionType(callSignature, flags) {
- if (flags & 64 /* InElementType */) {
+ if (flags & 128 /* InElementType */) {
return true;
}
- else if (flags & 256 /* InFirstTypeArgument */) {
+ else if (flags & 512 /* InFirstTypeArgument */) {
// Add parenthesis around function type for the first type argument to avoid ambiguity
- var typeParameters = callSignature.target && (flags & 32 /* WriteTypeArgumentsOfSignature */) ?
+ var typeParameters = callSignature.target && (flags & 64 /* WriteTypeArgumentsOfSignature */) ?
callSignature.target.typeParameters : callSignature.typeParameters;
return typeParameters && typeParameters.length !== 0;
}
@@ -28368,20 +29841,20 @@ var ts;
if (parenthesizeSignature) {
writePunctuation(writer, 19 /* OpenParenToken */);
}
- buildSignatureDisplay(resolved.callSignatures[0], writer, enclosingDeclaration, globalFlagsToPass | 8 /* WriteArrowStyleSignature */, /*kind*/ undefined, symbolStack);
+ buildSignatureDisplay(resolved.callSignatures[0], writer, enclosingDeclaration, globalFlagsToPass | 16 /* WriteArrowStyleSignature */, /*kind*/ undefined, symbolStack);
if (parenthesizeSignature) {
writePunctuation(writer, 20 /* CloseParenToken */);
}
return;
}
if (resolved.constructSignatures.length === 1 && !resolved.callSignatures.length) {
- if (flags & 64 /* InElementType */) {
+ if (flags & 128 /* InElementType */) {
writePunctuation(writer, 19 /* OpenParenToken */);
}
writeKeyword(writer, 94 /* NewKeyword */);
writeSpace(writer);
- buildSignatureDisplay(resolved.constructSignatures[0], writer, enclosingDeclaration, globalFlagsToPass | 8 /* WriteArrowStyleSignature */, /*kind*/ undefined, symbolStack);
- if (flags & 64 /* InElementType */) {
+ buildSignatureDisplay(resolved.constructSignatures[0], writer, enclosingDeclaration, globalFlagsToPass | 16 /* WriteArrowStyleSignature */, /*kind*/ undefined, symbolStack);
+ if (flags & 128 /* InElementType */) {
writePunctuation(writer, 20 /* CloseParenToken */);
}
return;
@@ -28414,6 +29887,14 @@ var ts;
buildIndexSignatureDisplay(resolved.numberIndexInfo, writer, 1 /* Number */, enclosingDeclaration, globalFlags, symbolStack);
for (var _d = 0, _e = resolved.properties; _d < _e.length; _d++) {
var p = _e[_d];
+ if (globalFlags & 16384 /* WriteClassExpressionAsTypeLiteral */) {
+ if (p.flags & 16777216 /* Prototype */) {
+ continue;
+ }
+ if (ts.getDeclarationModifierFlagsFromSymbol(p) & (8 /* Private */ | 16 /* Protected */)) {
+ writer.reportPrivateInBaseOfClassExpression(p.name);
+ }
+ }
var t = getTypeOfSymbol(p);
if (p.flags & (16 /* Function */ | 8192 /* Method */) && !getPropertiesOfObjectType(t).length) {
var signatures = getSignaturesOfType(t, 0 /* Call */);
@@ -28429,7 +29910,7 @@ var ts;
writePropertyWithModifiers(p);
writePunctuation(writer, 56 /* ColonToken */);
writeSpace(writer);
- writeType(t, 0 /* None */);
+ writeType(t, globalFlags & 16384 /* WriteClassExpressionAsTypeLiteral */);
writePunctuation(writer, 25 /* SemicolonToken */);
writer.writeLine();
}
@@ -28503,7 +29984,7 @@ var ts;
writeSpace(writer);
var type = getTypeOfSymbol(p);
if (parameterNode && isRequiredInitializedParameter(parameterNode)) {
- type = includeFalsyTypes(type, 2048 /* Undefined */);
+ type = getNullableType(type, 2048 /* Undefined */);
}
buildTypeDisplay(type, writer, enclosingDeclaration, flags, symbolStack);
}
@@ -28563,7 +30044,7 @@ var ts;
function buildDisplayForTypeArgumentsAndDelimiters(typeParameters, mapper, writer, enclosingDeclaration) {
if (typeParameters && typeParameters.length) {
writePunctuation(writer, 27 /* LessThanToken */);
- var flags = 256 /* InFirstTypeArgument */;
+ var flags = 512 /* InFirstTypeArgument */;
for (var i = 0; i < typeParameters.length; i++) {
if (i > 0) {
writePunctuation(writer, 26 /* CommaToken */);
@@ -28603,10 +30084,10 @@ var ts;
}
function buildReturnTypeDisplay(signature, writer, enclosingDeclaration, flags, symbolStack) {
var returnType = getReturnTypeOfSignature(signature);
- if (flags & 2048 /* SuppressAnyReturnType */ && isTypeAny(returnType)) {
+ if (flags & 4096 /* SuppressAnyReturnType */ && isTypeAny(returnType)) {
return;
}
- if (flags & 8 /* WriteArrowStyleSignature */) {
+ if (flags & 16 /* WriteArrowStyleSignature */) {
writeSpace(writer);
writePunctuation(writer, 36 /* EqualsGreaterThanToken */);
}
@@ -28626,7 +30107,7 @@ var ts;
writeKeyword(writer, 94 /* NewKeyword */);
writeSpace(writer);
}
- if (signature.target && (flags & 32 /* WriteTypeArgumentsOfSignature */)) {
+ if (signature.target && (flags & 64 /* WriteTypeArgumentsOfSignature */)) {
// Instantiated signature, write type arguments instead
// This is achieved by passing in the mapper separately
buildDisplayForTypeArgumentsAndDelimiters(signature.target.typeParameters, signature.mapper, writer, enclosingDeclaration);
@@ -28770,10 +30251,7 @@ var ts;
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 === 246 /* ExportSpecifier */) {
- var exportSpecifier = node.parent;
- exportSymbol = exportSpecifier.parent.parent.moduleSpecifier ?
- getExternalModuleMember(exportSpecifier.parent.parent, exportSpecifier) :
- resolveEntityName(exportSpecifier.propertyName || exportSpecifier.name, 107455 /* Value */ | 793064 /* Type */ | 1920 /* Namespace */ | 8388608 /* Alias */);
+ exportSymbol = getTargetOfExportSpecifier(node.parent, 107455 /* Value */ | 793064 /* Type */ | 1920 /* Namespace */ | 8388608 /* Alias */);
}
var result = [];
if (exportSymbol) {
@@ -28916,7 +30394,7 @@ var ts;
for (var _a = 0, _b = getPropertiesOfType(source); _a < _b.length; _a++) {
var prop = _b[_a];
var inNamesToRemove = names.has(prop.name);
- var isPrivate = getDeclarationModifierFlagsFromSymbol(prop) & (8 /* Private */ | 16 /* Protected */);
+ var isPrivate = ts.getDeclarationModifierFlagsFromSymbol(prop) & (8 /* Private */ | 16 /* Protected */);
var isSetOnlyAccessor = prop.flags & 65536 /* SetAccessor */ && !(prop.flags & 32768 /* GetAccessor */);
if (!inNamesToRemove && !isPrivate && !isClassMethod(prop) && !isSetOnlyAccessor) {
members.set(prop.name, prop);
@@ -28985,7 +30463,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, /*allowAsyncIterable*/ false);
+ var elementType = checkIteratedTypeOrElementType(parentType, pattern, /*allowStringInput*/ false, /*allowAsyncIterables*/ false);
if (declaration.dotDotDotToken) {
// Rest element has an array type with the same element type as the parent type
type = createArrayType(elementType);
@@ -29032,19 +30510,10 @@ var ts;
return expr.kind === 177 /* ArrayLiteralExpression */ && expr.elements.length === 0;
}
function addOptionality(type, optional) {
- return strictNullChecks && optional ? includeFalsyTypes(type, 2048 /* Undefined */) : type;
+ return strictNullChecks && optional ? getNullableType(type, 2048 /* Undefined */) : type;
}
// Return the inferred type for a variable, parameter, or property declaration
function getTypeForVariableLikeDeclaration(declaration, includeOptionality) {
- 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 = 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 === 215 /* ForInStatement */) {
@@ -29063,8 +30532,9 @@ var ts;
return getTypeForBindingElement(declaration);
}
// Use type from type annotation if one is present
- if (declaration.type) {
- var declaredType = getTypeFromTypeNode(declaration.type);
+ var typeNode = ts.getEffectiveTypeAnnotationNode(declaration);
+ if (typeNode) {
+ var declaredType = getTypeFromTypeNode(typeNode);
return addOptionality(declaredType, /*optional*/ declaration.questionToken && includeOptionality);
}
if ((noImplicitAny || declaration.flags & 65536 /* JavaScriptFile */) &&
@@ -29135,6 +30605,7 @@ var ts;
var types = [];
var definedInConstructor = false;
var definedInMethod = false;
+ var jsDocType;
for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
var declaration = _a[_i];
var expression = declaration.kind === 194 /* BinaryExpression */ ? declaration :
@@ -29151,17 +30622,25 @@ var ts;
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;
+ // If there is a JSDoc type, use it
+ var type_1 = getTypeForDeclarationFromJSDocComment(expression.parent);
+ if (type_1) {
+ var declarationType = getWidenedType(type_1);
+ if (!jsDocType) {
+ jsDocType = declarationType;
+ }
+ else if (jsDocType !== unknownType && declarationType !== unknownType && !isTypeIdenticalTo(jsDocType, declarationType)) {
+ var name = ts.getNameOfDeclaration(declaration);
+ error(name, ts.Diagnostics.Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2, ts.declarationNameToString(name), typeToString(jsDocType), typeToString(declarationType));
}
}
- types.push(getWidenedLiteralType(checkExpressionCached(expression.right)));
+ else if (!jsDocType) {
+ // If we don't have an explicit JSDoc type, get the type from the expression.
+ types.push(getWidenedLiteralType(checkExpressionCached(expression.right)));
+ }
}
- return getWidenedType(addOptionality(getUnionType(types, /*subtypeReduction*/ true), definedInMethod && !definedInConstructor));
+ var type = jsDocType || getUnionType(types, /*subtypeReduction*/ true);
+ return getWidenedType(addOptionality(type, 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
@@ -29292,7 +30771,7 @@ var ts;
if (declaration.kind === 243 /* ExportAssignment */) {
return links.type = checkExpression(declaration.expression);
}
- if (declaration.flags & 65536 /* JavaScriptFile */ && declaration.kind === 291 /* JSDocPropertyTag */ && declaration.typeExpression) {
+ if (declaration.flags & 65536 /* JavaScriptFile */ && declaration.kind === 292 /* JSDocPropertyTag */ && declaration.typeExpression) {
return links.type = getTypeFromTypeNode(declaration.typeExpression.type);
}
// Handle variable, parameter or property
@@ -29322,10 +30801,11 @@ var ts;
function getAnnotatedAccessorType(accessor) {
if (accessor) {
if (accessor.kind === 153 /* GetAccessor */) {
- return accessor.type && getTypeFromTypeNode(accessor.type);
+ var getterTypeAnnotation = ts.getEffectiveReturnTypeNode(accessor);
+ return getterTypeAnnotation && getTypeFromTypeNode(getterTypeAnnotation);
}
else {
- var setterTypeAnnotation = ts.getSetAccessorTypeAnnotationNode(accessor);
+ var setterTypeAnnotation = ts.getEffectiveSetAccessorTypeAnnotationNode(accessor);
return setterTypeAnnotation && getTypeFromTypeNode(setterTypeAnnotation);
}
}
@@ -29411,7 +30891,7 @@ var ts;
links.type = baseTypeVariable ? getIntersectionType([type, baseTypeVariable]) : type;
}
else {
- links.type = strictNullChecks && symbol.flags & 67108864 /* Optional */ ? includeFalsyTypes(type, 2048 /* Undefined */) : type;
+ links.type = strictNullChecks && symbol.flags & 67108864 /* Optional */ ? getNullableType(type, 2048 /* Undefined */) : type;
}
}
}
@@ -29463,7 +30943,7 @@ var ts;
}
function reportCircularityError(symbol) {
// Check if variable has type annotation that circularly references the variable itself
- if (symbol.valueDeclaration.type) {
+ if (ts.getEffectiveTypeAnnotationNode(symbol.valueDeclaration)) {
error(symbol.valueDeclaration, ts.Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol));
return unknownType;
}
@@ -29474,7 +30954,7 @@ var ts;
return anyType;
}
function getTypeOfSymbol(symbol) {
- if (getCheckFlags(symbol) & 1 /* Instantiated */) {
+ if (ts.getCheckFlags(symbol) & 1 /* Instantiated */) {
return getTypeOfInstantiatedSymbol(symbol);
}
if (symbol.flags & (3 /* Variable */ | 4 /* Property */)) {
@@ -29606,11 +31086,8 @@ var ts;
}
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;
+ var typeArguments = ts.map(typeArgumentNodes, getTypeFromTypeNode);
+ return ts.sameMap(signatures, function (sig) { return ts.some(sig.typeParameters) ? getSignatureInstantiation(sig, typeArguments) : sig; });
}
/**
* The base constructor of a class can resolve to
@@ -29673,6 +31150,7 @@ var ts;
return;
}
var baseTypeNode = getBaseTypeNodeOfClass(type);
+ var typeArgs = typeArgumentsFromTypeReferenceNode(baseTypeNode);
var baseType;
var originalBaseType = baseConstructorType && baseConstructorType.symbol ? getDeclaredTypeOfSymbol(baseConstructorType.symbol) : undefined;
if (baseConstructorType.symbol && baseConstructorType.symbol.flags & 32 /* Class */ &&
@@ -29680,7 +31158,7 @@ var ts;
// When base constructor type is a class with no captured type arguments we know that the constructors all have the same type parameters as the
// class and all return the instance type of the class. There is no need for further checks and we can apply the
// type arguments in the same manner as a type reference to get the same error reporting experience.
- baseType = getTypeFromClassOrInterfaceReference(baseTypeNode, baseConstructorType.symbol);
+ baseType = getTypeFromClassOrInterfaceReference(baseTypeNode, baseConstructorType.symbol, typeArgs);
}
else if (baseConstructorType.flags & 1 /* Any */) {
baseType = baseConstructorType;
@@ -29832,7 +31310,7 @@ var ts;
if (!pushTypeResolution(symbol, 2 /* DeclaredType */)) {
return unknownType;
}
- var declaration = ts.getDeclarationOfKind(symbol, 290 /* JSDocTypedefTag */);
+ var declaration = ts.getDeclarationOfKind(symbol, 291 /* JSDocTypedefTag */);
var type = void 0;
if (declaration) {
if (declaration.jsDocTypeLiteral) {
@@ -29864,77 +31342,80 @@ var ts;
}
return links.declaredType;
}
- function isLiteralEnumMember(symbol, member) {
+ function isLiteralEnumMember(member) {
var expr = member.initializer;
if (!expr) {
return !ts.isInAmbientContext(member);
}
- return expr.kind === 8 /* NumericLiteral */ ||
+ return expr.kind === 9 /* StringLiteral */ || expr.kind === 8 /* NumericLiteral */ ||
expr.kind === 192 /* PrefixUnaryExpression */ && expr.operator === 38 /* MinusToken */ &&
expr.operand.kind === 8 /* NumericLiteral */ ||
- expr.kind === 71 /* Identifier */ && !!symbol.exports.get(expr.text);
+ expr.kind === 71 /* Identifier */ && (ts.nodeIsMissing(expr) || !!getSymbolOfNode(member.parent).exports.get(expr.text));
}
- function enumHasLiteralMembers(symbol) {
+ function getEnumKind(symbol) {
+ var links = getSymbolLinks(symbol);
+ if (links.enumKind !== undefined) {
+ return links.enumKind;
+ }
+ var hasNonLiteralMember = false;
for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
var declaration = _a[_i];
if (declaration.kind === 232 /* EnumDeclaration */) {
for (var _b = 0, _c = declaration.members; _b < _c.length; _b++) {
var member = _c[_b];
- if (!isLiteralEnumMember(symbol, member)) {
- return false;
+ if (member.initializer && member.initializer.kind === 9 /* StringLiteral */) {
+ return links.enumKind = 1 /* Literal */;
+ }
+ if (!isLiteralEnumMember(member)) {
+ hasNonLiteralMember = true;
}
}
}
}
- return true;
+ return links.enumKind = hasNonLiteralMember ? 0 /* Numeric */ : 1 /* Literal */;
}
- function createEnumLiteralType(symbol, baseType, text) {
- var type = createType(256 /* EnumLiteral */);
- type.symbol = symbol;
- type.baseType = baseType;
- type.text = text;
- return type;
+ function getBaseTypeOfEnumLiteralType(type) {
+ return type.flags & 256 /* EnumLiteral */ && !(type.flags & 65536 /* Union */) ? getDeclaredTypeOfSymbol(getParentOfSymbol(type.symbol)) : type;
}
function getDeclaredTypeOfEnum(symbol) {
var links = getSymbolLinks(symbol);
- if (!links.declaredType) {
- var enumType = links.declaredType = createType(16 /* Enum */);
- enumType.symbol = symbol;
- if (enumHasLiteralMembers(symbol)) {
- var memberTypeList = [];
- var memberTypes = [];
- for (var _i = 0, _a = enumType.symbol.declarations; _i < _a.length; _i++) {
- var declaration = _a[_i];
- if (declaration.kind === 232 /* EnumDeclaration */) {
- computeEnumMemberValues(declaration);
- for (var _b = 0, _c = declaration.members; _b < _c.length; _b++) {
- var member = _c[_b];
- var memberSymbol = getSymbolOfNode(member);
- var value = getEnumMemberValue(member);
- if (!memberTypes[value]) {
- var memberType = memberTypes[value] = createEnumLiteralType(memberSymbol, enumType, "" + value);
- memberTypeList.push(memberType);
- }
- }
+ if (links.declaredType) {
+ return links.declaredType;
+ }
+ if (getEnumKind(symbol) === 1 /* Literal */) {
+ enumCount++;
+ var memberTypeList = [];
+ for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
+ var declaration = _a[_i];
+ if (declaration.kind === 232 /* EnumDeclaration */) {
+ for (var _b = 0, _c = declaration.members; _b < _c.length; _b++) {
+ var member = _c[_b];
+ var memberType = getLiteralType(getEnumMemberValue(member), enumCount, getSymbolOfNode(member));
+ getSymbolLinks(getSymbolOfNode(member)).declaredType = memberType;
+ memberTypeList.push(memberType);
}
}
- enumType.memberTypes = memberTypes;
- if (memberTypeList.length > 1) {
- enumType.flags |= 65536 /* Union */;
- enumType.types = memberTypeList;
- unionTypes.set(getTypeListId(memberTypeList), enumType);
+ }
+ if (memberTypeList.length) {
+ var enumType_1 = getUnionType(memberTypeList, /*subtypeReduction*/ false, symbol, /*aliasTypeArguments*/ undefined);
+ if (enumType_1.flags & 65536 /* Union */) {
+ enumType_1.flags |= 256 /* EnumLiteral */;
+ enumType_1.symbol = symbol;
}
+ return links.declaredType = enumType_1;
}
}
- return links.declaredType;
+ var enumType = createType(16 /* Enum */);
+ enumType.symbol = symbol;
+ return links.declaredType = enumType;
}
function getDeclaredTypeOfEnumMember(symbol) {
var links = getSymbolLinks(symbol);
if (!links.declaredType) {
var enumType = getDeclaredTypeOfEnum(getParentOfSymbol(symbol));
- links.declaredType = enumType.flags & 65536 /* Union */ ?
- enumType.memberTypes[getEnumMemberValue(symbol.valueDeclaration)] :
- enumType;
+ if (!links.declaredType) {
+ links.declaredType = enumType;
+ }
}
return links.declaredType;
}
@@ -30014,13 +31495,17 @@ var ts;
// A variable-like declaration is considered independent (free of this references) if it has a type annotation
// that specifies an independent type, or if it has no type annotation and no initializer (and thus of type any).
function isIndependentVariableLikeDeclaration(node) {
- return node.type && isIndependentType(node.type) || !node.type && !node.initializer;
+ var typeNode = ts.getEffectiveTypeAnnotationNode(node);
+ return typeNode ? isIndependentType(typeNode) : !node.initializer;
}
// 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 !== 152 /* Constructor */ && (!node.type || !isIndependentType(node.type))) {
- return false;
+ if (node.kind !== 152 /* Constructor */) {
+ var typeNode = ts.getEffectiveReturnTypeNode(node);
+ if (!typeNode || !isIndependentType(typeNode)) {
+ return false;
+ }
}
for (var _i = 0, _a = node.parameters; _i < _a.length; _i++) {
var parameter = _a[_i];
@@ -30181,7 +31666,7 @@ var ts;
}
var baseTypeNode = getBaseTypeNodeOfClass(classType);
var isJavaScript = ts.isInJavaScriptFile(baseTypeNode);
- var typeArguments = ts.map(baseTypeNode.typeArguments, getTypeFromTypeNode);
+ var typeArguments = typeArgumentsFromTypeReferenceNode(baseTypeNode);
var typeArgCount = ts.length(typeArguments);
var result = [];
for (var _i = 0, baseSignatures_1 = baseSignatures; _i < baseSignatures_1.length; _i++) {
@@ -30268,8 +31753,8 @@ var ts;
function getUnionIndexInfo(types, kind) {
var indexTypes = [];
var isAnyReadonly = false;
- for (var _i = 0, types_2 = types; _i < types_2.length; _i++) {
- var type = types_2[_i];
+ for (var _i = 0, types_1 = types; _i < types_1.length; _i++) {
+ var type = types_1[_i];
var indexInfo = getIndexInfoOfType(type, kind);
if (!indexInfo) {
return undefined;
@@ -30443,7 +31928,7 @@ var ts;
// 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 propName = t.value;
var modifiersProp = getPropertyOfType(modifiersType, propName);
var isOptional = templateOptional || !!(modifiersProp && modifiersProp.flags & 67108864 /* Optional */);
var prop = createSymbol(4 /* Property */ | (isOptional ? 67108864 /* Optional */ : 0), propName);
@@ -30451,6 +31936,7 @@ var ts;
prop.type = propType;
if (propertySymbol) {
prop.syntheticOrigin = propertySymbol;
+ prop.declarations = propertySymbol.declarations;
}
members.set(propName, prop);
}
@@ -30575,6 +32061,27 @@ var ts;
getPropertiesOfUnionOrIntersectionType(type) :
getPropertiesOfObjectType(type);
}
+ function getAllPossiblePropertiesOfType(type) {
+ if (type.flags & 65536 /* Union */) {
+ var props = ts.createMap();
+ for (var _i = 0, _a = type.types; _i < _a.length; _i++) {
+ var memberType = _a[_i];
+ if (memberType.flags & 8190 /* Primitive */) {
+ continue;
+ }
+ for (var _b = 0, _c = getPropertiesOfType(memberType); _b < _c.length; _b++) {
+ var name = _c[_b].name;
+ if (!props.has(name)) {
+ props.set(name, createUnionOrIntersectionProperty(type, name));
+ }
+ }
+ }
+ return ts.arrayFrom(props.values());
+ }
+ else {
+ return getPropertiesOfType(type);
+ }
+ }
function getConstraintOfType(type) {
return type.flags & 16384 /* TypeParameter */ ? getConstraintOfTypeParameter(type) :
type.flags & 524288 /* IndexedAccess */ ? getConstraintOfIndexedAccess(type) :
@@ -30636,8 +32143,8 @@ var ts;
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];
+ for (var _i = 0, types_2 = types; _i < types_2.length; _i++) {
+ var type_2 = types_2[_i];
var baseType = getBaseConstraint(type_2);
if (baseType) {
baseTypes.push(baseType);
@@ -30678,7 +32185,7 @@ var ts;
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; });
+ var defaultDeclaration = typeParameter.symbol && ts.forEach(typeParameter.symbol.declarations, function (decl) { return ts.isTypeParameterDeclaration(decl) && decl.default; });
typeParameter.default = defaultDeclaration ? getTypeFromTypeNode(defaultDeclaration) : noConstraintType;
}
}
@@ -30693,7 +32200,7 @@ var ts;
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 & 84 /* NumberLike */ ? globalNumberType :
t.flags & 136 /* BooleanLike */ ? globalBooleanType :
t.flags & 512 /* ESSymbol */ ? getGlobalESSymbolType(/*reportErrors*/ languageVersion >= 2 /* ES2015 */) :
t.flags & 16777216 /* NonPrimitive */ ? emptyObjectType :
@@ -30708,12 +32215,12 @@ var ts;
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];
+ for (var _i = 0, types_3 = types; _i < types_3.length; _i++) {
+ var current = types_3[_i];
var type = getApparentType(current);
if (type !== unknownType) {
var prop = getPropertyOfType(type, name);
- var modifiers = prop ? getDeclarationModifierFlagsFromSymbol(prop) : 0;
+ var modifiers = prop ? ts.getDeclarationModifierFlagsFromSymbol(prop) : 0;
if (prop && !(modifiers & excludeModifiers)) {
commonFlags &= prop.flags;
if (!props) {
@@ -30785,7 +32292,7 @@ var ts;
function getPropertyOfUnionOrIntersectionType(type, name) {
var property = getUnionOrIntersectionProperty(type, name);
// We need to filter out partial properties in union types
- return property && !(getCheckFlags(property) & 16 /* Partial */) ? property : undefined;
+ return property && !(ts.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
@@ -30865,22 +32372,16 @@ var ts;
}
return undefined;
}
- function getTypeParametersFromJSDocTemplate(declaration) {
- if (declaration.flags & 65536 /* JavaScriptFile */) {
- var templateTag = ts.getJSDocTemplateTag(declaration);
- if (templateTag) {
- return getTypeParametersFromDeclaration(templateTag.typeParameters);
- }
- }
- return undefined;
- }
// Return list of type parameters with duplicates removed (duplicate identifier errors are generated in the actual
// type checking functions).
- function getTypeParametersFromDeclaration(typeParameterDeclarations) {
- var result = [];
- ts.forEach(typeParameterDeclarations, function (node) {
+ function getTypeParametersFromDeclaration(declaration) {
+ var result;
+ ts.forEach(ts.getEffectiveTypeParameterDeclarations(declaration), function (node) {
var tp = getDeclaredTypeOfTypeParameter(node.symbol);
if (!ts.contains(result, tp)) {
+ if (!result) {
+ result = [];
+ }
result.push(tp);
}
});
@@ -31059,14 +32560,21 @@ var ts;
var classType = declaration.kind === 152 /* Constructor */ ?
getDeclaredTypeOfClassOrInterface(getMergedSymbol(declaration.parent.symbol))
: undefined;
- var typeParameters = classType ? classType.localTypeParameters :
- declaration.typeParameters ? getTypeParametersFromDeclaration(declaration.typeParameters) :
- getTypeParametersFromJSDocTemplate(declaration);
+ var typeParameters = classType ? classType.localTypeParameters : getTypeParametersFromDeclaration(declaration);
var returnType = getSignatureReturnTypeFromDeclaration(declaration, isJSConstructSignature, classType);
var typePredicate = declaration.type && declaration.type.kind === 158 /* TypePredicate */ ?
createTypePredicateFromTypePredicateNode(declaration.type) :
undefined;
- links.resolvedSignature = createSignature(declaration, typeParameters, thisParameter, parameters, returnType, typePredicate, minArgumentCount, ts.hasRestParameter(declaration), hasLiteralTypes);
+ // JS functions get a free rest parameter if they reference `arguments`
+ var hasRestLikeParameter = ts.hasRestParameter(declaration);
+ if (!hasRestLikeParameter && ts.isInJavaScriptFile(declaration) && !ts.hasJSDocParameterTags(declaration) && containsArgumentsReference(declaration)) {
+ hasRestLikeParameter = true;
+ var syntheticArgsSymbol = createSymbol(3 /* Variable */, "args");
+ syntheticArgsSymbol.type = anyArrayType;
+ syntheticArgsSymbol.isRestParameter = true;
+ parameters.push(syntheticArgsSymbol);
+ }
+ links.resolvedSignature = createSignature(declaration, typeParameters, thisParameter, parameters, returnType, typePredicate, minArgumentCount, hasRestLikeParameter, hasLiteralTypes);
}
return links.resolvedSignature;
}
@@ -31077,14 +32585,9 @@ var ts;
else if (classType) {
return classType;
}
- else if (declaration.type) {
- return getTypeFromTypeNode(declaration.type);
- }
- if (declaration.flags & 65536 /* JavaScriptFile */) {
- var type = getReturnTypeFromJSDocComment(declaration);
- if (type && type !== unknownType) {
- return type;
- }
+ var typeNode = ts.getEffectiveReturnTypeNode(declaration);
+ if (typeNode) {
+ return getTypeFromTypeNode(typeNode);
}
// 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.
@@ -31193,8 +32696,9 @@ var ts;
type = anyType;
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));
+ var name = ts.getNameOfDeclaration(declaration);
+ if (name) {
+ error(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(name));
}
else {
error(declaration, ts.Diagnostics.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);
@@ -31329,8 +32833,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_5 = types; _i < types_5.length; _i++) {
- var type = types_5[_i];
+ for (var _i = 0, types_4 = types; _i < types_4.length; _i++) {
+ var type = types_4[_i];
if (!(type.flags & excludeKinds)) {
result |= type.flags;
}
@@ -31360,8 +32864,10 @@ var ts;
function getTypeReferenceArity(type) {
return ts.length(type.target.typeParameters);
}
- // Get type from reference to class or interface
- function getTypeFromClassOrInterfaceReference(node, symbol) {
+ /**
+ * Get type from type-reference that reference to class or interface
+ */
+ function getTypeFromClassOrInterfaceReference(node, symbol, typeArgs) {
var type = getDeclaredTypeOfSymbol(getMergedSymbol(symbol));
var typeParameters = type.localTypeParameters;
if (typeParameters) {
@@ -31376,7 +32882,7 @@ var ts;
// 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.
- var typeArguments = ts.concatenate(type.outerTypeParameters, fillMissingTypeArguments(ts.map(node.typeArguments, getTypeFromTypeNode), typeParameters, minTypeArgumentCount, node));
+ var typeArguments = ts.concatenate(type.outerTypeParameters, fillMissingTypeArguments(typeArgs, typeParameters, minTypeArgumentCount, node));
return createTypeReference(type, typeArguments);
}
if (node.typeArguments) {
@@ -31396,10 +32902,12 @@ var ts;
}
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
- // declared type. Instantiations are cached using the type identities of the type arguments as the key.
- function getTypeFromTypeAliasReference(node, symbol) {
+ /**
+ * 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
+ * declared type. Instantiations are cached using the type identities of the type arguments as the key.
+ */
+ function getTypeFromTypeAliasReference(node, symbol, typeArguments) {
var type = getDeclaredTypeOfSymbol(symbol);
var typeParameters = getSymbolLinks(symbol).typeParameters;
if (typeParameters) {
@@ -31411,7 +32919,6 @@ var ts;
: 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);
return getTypeAliasInstantiation(symbol, typeArguments);
}
if (node.typeArguments) {
@@ -31420,7 +32927,9 @@ var ts;
}
return type;
}
- // Get type from reference to named type that cannot be generic (enum or type parameter)
+ /**
+ * Get type from reference to named type that cannot be generic (enum or type parameter)
+ */
function getTypeFromNonGenericTypeReference(node, symbol) {
if (node.typeArguments) {
error(node, ts.Diagnostics.Type_0_is_not_generic, symbolToString(symbol));
@@ -31444,29 +32953,48 @@ var ts;
}
return undefined;
}
- function resolveTypeReferenceName(typeReferenceName) {
+ function resolveTypeReferenceName(typeReferenceName, meaning) {
if (!typeReferenceName) {
return unknownSymbol;
}
- return resolveEntityName(typeReferenceName, 793064 /* Type */) || unknownSymbol;
+ return resolveEntityName(typeReferenceName, meaning) || unknownSymbol;
}
function getTypeReferenceType(node, symbol) {
+ var typeArguments = typeArgumentsFromTypeReferenceNode(node); // Do unconditionally so we mark type arguments as referenced.
if (symbol === unknownSymbol) {
return unknownType;
}
+ var type = getTypeReferenceTypeWorker(node, symbol, typeArguments);
+ if (type) {
+ return type;
+ }
+ if (symbol.flags & 107455 /* Value */ && node.kind === 277 /* JSDocTypeReference */) {
+ // A JSDocTypeReference may have resolved to a value (as opposed to a type). If
+ // the symbol is a constructor function, return the inferred class type; otherwise,
+ // the type of this reference is just the type of the value we resolved to.
+ var valueType = getTypeOfSymbol(symbol);
+ if (valueType.symbol && !isInferredClassType(valueType)) {
+ var referenceType = getTypeReferenceTypeWorker(node, valueType.symbol, typeArguments);
+ if (referenceType) {
+ return referenceType;
+ }
+ }
+ // Resolve the type reference as a Type for the purpose of reporting errors.
+ resolveTypeReferenceName(getTypeReferenceName(node), 793064 /* Type */);
+ return valueType;
+ }
+ return getTypeFromNonGenericTypeReference(node, symbol);
+ }
+ function getTypeReferenceTypeWorker(node, symbol, typeArguments) {
if (symbol.flags & (32 /* Class */ | 64 /* Interface */)) {
- return getTypeFromClassOrInterfaceReference(node, symbol);
+ return getTypeFromClassOrInterfaceReference(node, symbol, typeArguments);
}
if (symbol.flags & 524288 /* TypeAlias */) {
- return getTypeFromTypeAliasReference(node, symbol);
+ return getTypeFromTypeAliasReference(node, symbol, typeArguments);
}
- if (symbol.flags & 107455 /* Value */ && node.kind === 277 /* 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.
- return getTypeOfSymbol(symbol);
+ if (symbol.flags & 16 /* Function */ && node.kind === 277 /* JSDocTypeReference */ && (symbol.members || ts.getJSDocClassTag(symbol.valueDeclaration))) {
+ return getInferredClassType(symbol);
}
- return getTypeFromNonGenericTypeReference(node, symbol);
}
function getPrimitiveTypeFromJSDocTypeReference(node) {
if (ts.isIdentifier(node.name)) {
@@ -31486,7 +33014,8 @@ var ts;
case "Object":
return anyType;
case "Function":
- return anyFunctionType;
+ case "function":
+ return globalFunctionType;
case "Array":
case "array":
return !node.typeArguments || !node.typeArguments.length ? createArrayType(anyType) : undefined;
@@ -31505,26 +33034,14 @@ var ts;
if (!links.resolvedType) {
var symbol = void 0;
var type = void 0;
+ var meaning = 793064 /* Type */;
if (node.kind === 277 /* JSDocTypeReference */) {
type = getPrimitiveTypeFromJSDocTypeReference(node);
- if (!type) {
- var typeReferenceName = getTypeReferenceName(node);
- symbol = resolveTypeReferenceName(typeReferenceName);
- type = getTypeReferenceType(node, symbol);
- }
+ meaning |= 107455 /* Value */;
}
- else {
- // We only support expressions that are simple qualified names. For other expressions this produces undefined.
- var typeNameOrExpression = node.kind === 159 /* TypeReference */
- ? node.typeName
- : ts.isEntityNameExpression(node.expression)
- ? node.expression
- : undefined;
- symbol = typeNameOrExpression && resolveEntityName(typeNameOrExpression, 793064 /* Type */) || unknownSymbol;
- type = symbol === unknownSymbol ? unknownType :
- symbol.flags & (32 /* Class */ | 64 /* Interface */) ? getTypeFromClassOrInterfaceReference(node, symbol) :
- symbol.flags & 524288 /* TypeAlias */ ? getTypeFromTypeAliasReference(node, symbol) :
- getTypeFromNonGenericTypeReference(node, symbol);
+ if (!type) {
+ symbol = resolveTypeReferenceName(getTypeReferenceName(node), meaning);
+ type = getTypeReferenceType(node, symbol);
}
// Cache both the resolved symbol and the resolved type. The resolved symbol is needed in when we check the
// type reference in checkTypeReferenceOrExpressionWithTypeArguments.
@@ -31533,6 +33050,9 @@ var ts;
}
return links.resolvedType;
}
+ function typeArgumentsFromTypeReferenceNode(node) {
+ return ts.map(node.typeArguments, getTypeFromTypeNode);
+ }
function getTypeFromTypeQueryNode(node) {
var links = getNodeLinks(node);
if (!links.resolvedType) {
@@ -31774,14 +33294,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_6 = types; _i < types_6.length; _i++) {
- var type = types_6[_i];
+ for (var _i = 0, types_5 = types; _i < types_5.length; _i++) {
+ var type = types_5[_i];
addTypeToUnion(typeSet, type);
}
}
function containsIdenticalType(types, type) {
- for (var _i = 0, types_7 = types; _i < types_7.length; _i++) {
- var t = types_7[_i];
+ for (var _i = 0, types_6 = types; _i < types_6.length; _i++) {
+ var t = types_6[_i];
if (isTypeIdenticalTo(t, type)) {
return true;
}
@@ -31789,8 +33309,8 @@ var ts;
return false;
}
function isSubtypeOfAny(candidate, types) {
- for (var _i = 0, types_8 = types; _i < types_8.length; _i++) {
- var type = types_8[_i];
+ for (var _i = 0, types_7 = types; _i < types_7.length; _i++) {
+ var type = types_7[_i];
if (candidate !== type && isTypeSubtypeOf(candidate, type)) {
return true;
}
@@ -31902,10 +33422,13 @@ var ts;
else if (type.flags & 1 /* Any */) {
typeSet.containsAny = true;
}
+ else if (type.flags & 8192 /* Never */) {
+ typeSet.containsNever = 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)) {
+ else if ((strictNullChecks || !(type.flags & 6144 /* Nullable */)) && !ts.contains(typeSet, type)) {
if (type.flags & 32768 /* Object */) {
typeSet.containsObjectType = true;
}
@@ -31921,8 +33444,8 @@ 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 addTypesToIntersection(typeSet, types) {
- for (var _i = 0, types_9 = types; _i < types_9.length; _i++) {
- var type = types_9[_i];
+ for (var _i = 0, types_8 = types; _i < types_8.length; _i++) {
+ var type = types_8[_i];
addTypeToIntersection(typeSet, type);
}
}
@@ -31942,6 +33465,9 @@ var ts;
}
var typeSet = [];
addTypesToIntersection(typeSet, types);
+ if (typeSet.containsNever) {
+ return neverType;
+ }
if (typeSet.containsAny) {
return anyType;
}
@@ -31986,9 +33512,9 @@ var ts;
return type.resolvedIndexType;
}
function getLiteralTypeFromPropertyName(prop) {
- return getDeclarationModifierFlagsFromSymbol(prop) & 24 /* NonPublicAccessibilityModifier */ || ts.startsWith(prop.name, "__@") ?
+ return ts.getDeclarationModifierFlagsFromSymbol(prop) & 24 /* NonPublicAccessibilityModifier */ || ts.startsWith(prop.name, "__@") ?
neverType :
- getLiteralTypeForText(32 /* StringLiteral */, ts.unescapeIdentifier(prop.name));
+ getLiteralType(ts.unescapeIdentifier(prop.name));
}
function getLiteralTypeFromPropertyNames(type) {
return getUnionType(ts.map(getPropertiesOfType(type), getLiteralTypeFromPropertyName));
@@ -32018,12 +33544,12 @@ var ts;
}
function getPropertyTypeForIndexType(objectType, indexType, accessNode, cacheSymbol) {
var accessExpression = accessNode && accessNode.kind === 180 /* ElementAccessExpression */ ? accessNode : undefined;
- var propName = indexType.flags & (32 /* StringLiteral */ | 64 /* NumberLiteral */ | 256 /* EnumLiteral */) ?
- indexType.text :
+ var propName = indexType.flags & 96 /* StringOrNumberLiteral */ ?
+ "" + indexType.value :
accessExpression && checkThatExpressionIsProperSymbolReference(accessExpression.argumentExpression, indexType, /*reportError*/ false) ?
ts.getPropertyNameForKnownSymbolName(accessExpression.argumentExpression.name.text) :
undefined;
- if (propName) {
+ if (propName !== undefined) {
var prop = getPropertyOfType(objectType, propName);
if (prop) {
if (accessExpression) {
@@ -32038,11 +33564,11 @@ var ts;
return getTypeOfSymbol(prop);
}
}
- if (isTypeAnyOrAllConstituentTypesHaveKind(indexType, 262178 /* StringLike */ | 340 /* NumberLike */ | 512 /* ESSymbol */)) {
+ if (isTypeAnyOrAllConstituentTypesHaveKind(indexType, 262178 /* StringLike */ | 84 /* NumberLike */ | 512 /* ESSymbol */)) {
if (isTypeAny(objectType)) {
return anyType;
}
- var indexInfo = isTypeAnyOrAllConstituentTypesHaveKind(indexType, 340 /* NumberLike */) && getIndexInfoOfType(objectType, 1 /* Number */) ||
+ var indexInfo = isTypeAnyOrAllConstituentTypesHaveKind(indexType, 84 /* NumberLike */) && getIndexInfoOfType(objectType, 1 /* Number */) ||
getIndexInfoOfType(objectType, 0 /* String */) ||
undefined;
if (indexInfo) {
@@ -32067,7 +33593,7 @@ var ts;
if (accessNode) {
var indexNode = accessNode.kind === 180 /* 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));
+ error(indexNode, ts.Diagnostics.Property_0_does_not_exist_on_type_1, "" + indexType.value, typeToString(objectType));
}
else if (indexType.flags & (2 /* String */ | 4 /* Number */)) {
error(indexNode, ts.Diagnostics.Type_0_has_no_matching_index_signature_for_type_1, typeToString(objectType), typeToString(indexType));
@@ -32186,11 +33712,9 @@ var ts;
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;
}
@@ -32220,7 +33744,7 @@ var ts;
var rightProp = _a[_i];
// we approximate own properties as non-methods plus methods that are inside the object literal
var isSetterWithoutGetter = rightProp.flags & 65536 /* SetAccessor */ && !(rightProp.flags & 32768 /* GetAccessor */);
- if (getDeclarationModifierFlagsFromSymbol(rightProp) & (8 /* Private */ | 16 /* Protected */)) {
+ if (ts.getDeclarationModifierFlagsFromSymbol(rightProp) & (8 /* Private */ | 16 /* Protected */)) {
skippedPrivateMembers.set(rightProp.name, true);
}
else if (!isClassMethod(rightProp) && !isSetterWithoutGetter) {
@@ -32237,7 +33761,7 @@ var ts;
if (members.has(leftProp.name)) {
var rightProp = members.get(leftProp.name);
var rightType = getTypeOfSymbol(rightProp);
- if (maybeTypeOfKind(rightType, 2048 /* Undefined */) || rightProp.flags & 67108864 /* Optional */) {
+ if (rightProp.flags & 67108864 /* Optional */) {
var declarations = ts.concatenate(leftProp.declarations, rightProp.declarations);
var flags = 4 /* Property */ | (leftProp.flags & 67108864 /* Optional */);
var result = createSymbol(flags, leftProp.name);
@@ -32268,15 +33792,16 @@ var ts;
function isClassMethod(prop) {
return prop.flags & 8192 /* Method */ && ts.find(prop.declarations, function (decl) { return ts.isClassLike(decl.parent); });
}
- function createLiteralType(flags, text) {
+ function createLiteralType(flags, value, symbol) {
var type = createType(flags);
- type.text = text;
+ type.symbol = symbol;
+ type.value = value;
return type;
}
function getFreshTypeOfLiteralType(type) {
if (type.flags & 96 /* StringOrNumberLiteral */ && !(type.flags & 1048576 /* FreshLiteral */)) {
if (!type.freshType) {
- var freshType = createLiteralType(type.flags | 1048576 /* FreshLiteral */, type.text);
+ var freshType = createLiteralType(type.flags | 1048576 /* FreshLiteral */, type.value, type.symbol);
freshType.regularType = type;
type.freshType = freshType;
}
@@ -32287,11 +33812,17 @@ var ts;
function getRegularTypeOfLiteralType(type) {
return type.flags & 96 /* StringOrNumberLiteral */ && type.flags & 1048576 /* FreshLiteral */ ? type.regularType : type;
}
- function getLiteralTypeForText(flags, text) {
- var map = flags & 32 /* StringLiteral */ ? stringLiteralTypes : numericLiteralTypes;
- var type = map.get(text);
+ function getLiteralType(value, enumId, symbol) {
+ // We store all literal types in a single map with keys of the form '#NNN' and '@SSS',
+ // where NNN is the text representation of a numeric literal and SSS are the characters
+ // of a string literal. For literal enum members we use 'EEE#NNN' and 'EEE@SSS', where
+ // EEE is a unique id for the containing enum type.
+ var qualifier = typeof value === "number" ? "#" : "@";
+ var key = enumId ? enumId + qualifier + value : qualifier + value;
+ var type = literalTypes.get(key);
if (!type) {
- map.set(text, type = createLiteralType(flags, text));
+ var flags = (typeof value === "number" ? 64 /* NumberLiteral */ : 32 /* StringLiteral */) | (enumId ? 256 /* EnumLiteral */ : 0);
+ literalTypes.set(key, type = createLiteralType(flags, value, symbol));
}
return type;
}
@@ -32366,7 +33897,7 @@ var ts;
return getTypeFromThisTypeNode(node);
case 173 /* LiteralType */:
return getTypeFromLiteralTypeNode(node);
- case 293 /* JSDocLiteralType */:
+ case 294 /* JSDocLiteralType */:
return getTypeFromLiteralTypeNode(node.literal);
case 159 /* TypeReference */:
case 277 /* JSDocTypeReference */:
@@ -32400,7 +33931,7 @@ var ts;
case 160 /* FunctionType */:
case 161 /* ConstructorType */:
case 163 /* TypeLiteral */:
- case 292 /* JSDocTypeLiteral */:
+ case 293 /* JSDocTypeLiteral */:
case 279 /* JSDocFunctionType */:
return getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node);
case 170 /* TypeOperator */:
@@ -32479,23 +34010,13 @@ var ts;
mapper.mappedTypes = typeParameters;
return mapper;
}
- function getInferenceMapper(context) {
- if (!context.mapper) {
- var mapper = function (t) {
- var typeParameters = context.signature.typeParameters;
- for (var i = 0; i < typeParameters.length; i++) {
- if (t === typeParameters[i]) {
- context.inferences[i].isFixed = true;
- return getInferredType(context, i);
- }
- }
- return t;
- };
- mapper.mappedTypes = context.signature.typeParameters;
- mapper.context = context;
- context.mapper = mapper;
- }
- return context.mapper;
+ function isInferenceContext(mapper) {
+ return !!mapper.signature;
+ }
+ function cloneTypeMapper(mapper) {
+ return mapper && isInferenceContext(mapper) ?
+ createInferenceContext(mapper.signature, mapper.flags | 2 /* NoDefault */, mapper.inferences) :
+ mapper;
}
function identityMapper(type) {
return type;
@@ -32549,13 +34070,14 @@ var ts;
if (signature.typePredicate) {
freshTypePredicate = cloneTypePredicate(signature.typePredicate, mapper);
}
- var result = createSignature(signature.declaration, freshTypeParameters, signature.thisParameter && instantiateSymbol(signature.thisParameter, mapper), instantiateList(signature.parameters, mapper, instantiateSymbol), instantiateType(signature.resolvedReturnType, mapper), freshTypePredicate, signature.minArgumentCount, signature.hasRestParameter, signature.hasLiteralTypes);
+ var result = createSignature(signature.declaration, freshTypeParameters, signature.thisParameter && instantiateSymbol(signature.thisParameter, mapper), instantiateList(signature.parameters, mapper, instantiateSymbol),
+ /*resolvedReturnType*/ undefined, freshTypePredicate, signature.minArgumentCount, signature.hasRestParameter, signature.hasLiteralTypes);
result.target = signature;
result.mapper = mapper;
return result;
}
function instantiateSymbol(symbol, mapper) {
- if (getCheckFlags(symbol) & 1 /* Instantiated */) {
+ if (ts.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
@@ -32648,10 +34170,10 @@ var ts;
case 199 /* ClassExpression */:
case 230 /* InterfaceDeclaration */:
case 231 /* TypeAliasDeclaration */:
- var declaration = node;
- if (declaration.typeParameters) {
- for (var _i = 0, _a = declaration.typeParameters; _i < _a.length; _i++) {
- var d = _a[_i];
+ var typeParameters = ts.getEffectiveTypeParameterDeclarations(node);
+ if (typeParameters) {
+ for (var _i = 0, typeParameters_1 = typeParameters; _i < typeParameters_1.length; _i++) {
+ var d = typeParameters_1[_i];
if (ts.contains(mappedTypes, getDeclaredTypeOfTypeParameter(getSymbolOfNode(d)))) {
return true;
}
@@ -32671,8 +34193,8 @@ var ts;
break;
case 279 /* JSDocFunctionType */:
var func = node;
- for (var _b = 0, _c = func.parameters; _b < _c.length; _b++) {
- var p = _c[_b];
+ for (var _a = 0, _b = func.parameters; _a < _b.length; _a++) {
+ var p = _b[_a];
if (ts.contains(mappedTypes, getTypeOfNode(p))) {
return true;
}
@@ -32800,7 +34322,7 @@ var ts;
return false;
}
// Functions with any parameters that lack type annotations are context sensitive.
- if (ts.forEach(node.parameters, function (p) { return !p.type; })) {
+ if (ts.forEach(node.parameters, function (p) { return !ts.getEffectiveTypeAnnotationNode(p); })) {
return true;
}
// For arrow functions we now know we're not context sensitive.
@@ -32859,6 +34381,12 @@ var ts;
/**
* This is *not* a bi-directional relationship.
* If one needs to check both directions for comparability, use a second call to this function or 'checkTypeComparableTo'.
+ *
+ * A type S is comparable to a type T if some (but not necessarily all) of the possible values of S are also possible values of T.
+ * It is used to check following cases:
+ * - the types of the left and right sides of equality/inequality operators (`===`, `!==`, `==`, `!=`).
+ * - the types of `case` clause expressions and their respective `switch` expressions.
+ * - the type of an expression in a type assertion with the type being asserted.
*/
function isTypeComparableTo(source, target) {
return isTypeRelatedTo(source, target, comparableRelation);
@@ -32866,9 +34394,6 @@ var ts;
function areTypesComparable(type1, type2) {
return isTypeComparableTo(type1, type2) || isTypeComparableTo(type2, type1);
}
- function checkTypeSubtypeOf(source, target, errorNode, headMessage, containingMessageChain) {
- return checkTypeRelatedTo(source, target, subtypeRelation, errorNode, headMessage, containingMessageChain);
- }
function checkTypeAssignableTo(source, target, errorNode, headMessage, containingMessageChain) {
return checkTypeRelatedTo(source, target, assignableRelation, errorNode, headMessage, containingMessageChain);
}
@@ -32880,12 +34405,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 */;
@@ -32893,10 +34419,9 @@ var ts;
if (!target.hasRestParameter && source.minArgumentCount > target.parameters.length) {
return 0 /* False */;
}
- // Spec 1.0 Section 3.8.3 & 3.8.4:
- // M and N (the signatures) are instantiated using type Any as the type argument for all type parameters declared by M and N
- source = getErasedSignature(source);
- target = getErasedSignature(target);
+ if (source.typeParameters) {
+ source = instantiateSignatureInContextOf(source, target);
+ }
var result = -1 /* True */;
var sourceThisType = getThisTypeOfSignature(source);
if (sourceThisType && sourceThisType !== voidType) {
@@ -32920,9 +34445,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);
@@ -32950,7 +34489,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;
@@ -33026,33 +34569,32 @@ var ts;
}
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;
+ type.flags & 16777216 /* NonPrimitive */ ? true :
+ 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) {
+ function isEnumTypeRelatedTo(sourceSymbol, targetSymbol, errorReporter) {
+ if (sourceSymbol === targetSymbol) {
return true;
}
- var id = source.id + "," + target.id;
+ var id = getSymbolId(sourceSymbol) + "," + getSymbolId(targetSymbol);
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 */)) {
+ if (sourceSymbol.name !== targetSymbol.name || !(sourceSymbol.flags & 256 /* RegularEnum */) || !(targetSymbol.flags & 256 /* RegularEnum */)) {
enumRelation.set(id, false);
return false;
}
- var targetEnumType = getTypeOfSymbol(target.symbol);
- for (var _i = 0, _a = getPropertiesOfType(getTypeOfSymbol(source.symbol)); _i < _a.length; _i++) {
+ var targetEnumType = getTypeOfSymbol(targetSymbol);
+ for (var _i = 0, _a = getPropertiesOfType(getTypeOfSymbol(sourceSymbol)); _i < _a.length; _i++) {
var property = _a[_i];
if (property.flags & 8 /* EnumMember */) {
var targetProperty = getPropertyOfType(targetEnumType, property.name);
if (!targetProperty || !(targetProperty.flags & 8 /* EnumMember */)) {
if (errorReporter) {
- errorReporter(ts.Diagnostics.Property_0_is_missing_in_type_1, property.name, typeToString(target, /*enclosingDeclaration*/ undefined, 128 /* UseFullyQualifiedType */));
+ errorReporter(ts.Diagnostics.Property_0_is_missing_in_type_1, property.name, typeToString(getDeclaredTypeOfSymbol(targetSymbol), /*enclosingDeclaration*/ undefined, 256 /* UseFullyQualifiedType */));
}
enumRelation.set(id, false);
return false;
@@ -33063,42 +34605,50 @@ var ts;
return true;
}
function isSimpleTypeRelatedTo(source, target, relation, errorReporter) {
- if (target.flags & 8192 /* Never */)
+ var s = source.flags;
+ var t = target.flags;
+ if (t & 8192 /* Never */)
return false;
- if (target.flags & 1 /* Any */ || source.flags & 8192 /* Never */)
+ if (t & 1 /* Any */ || s & 8192 /* Never */)
return true;
- if (source.flags & 262178 /* StringLike */ && target.flags & 2 /* String */)
+ if (s & 262178 /* StringLike */ && t & 2 /* String */)
return true;
- if (source.flags & 340 /* NumberLike */ && target.flags & 4 /* Number */)
+ if (s & 32 /* StringLiteral */ && s & 256 /* EnumLiteral */ &&
+ t & 32 /* StringLiteral */ && !(t & 256 /* EnumLiteral */) &&
+ source.value === target.value)
return true;
- if (source.flags & 136 /* BooleanLike */ && target.flags & 8 /* Boolean */)
+ if (s & 84 /* NumberLike */ && t & 4 /* Number */)
return true;
- if (source.flags & 256 /* EnumLiteral */ && target.flags & 16 /* Enum */ && source.baseType === target)
+ if (s & 64 /* NumberLiteral */ && s & 256 /* EnumLiteral */ &&
+ t & 64 /* NumberLiteral */ && !(t & 256 /* EnumLiteral */) &&
+ source.value === target.value)
return true;
- if (source.flags & 16 /* Enum */ && target.flags & 16 /* Enum */ && isEnumTypeRelatedTo(source, target, errorReporter))
+ if (s & 136 /* BooleanLike */ && t & 8 /* Boolean */)
return true;
- if (source.flags & 2048 /* Undefined */ && (!strictNullChecks || target.flags & (2048 /* Undefined */ | 1024 /* Void */)))
+ if (s & 16 /* Enum */ && t & 16 /* Enum */ && isEnumTypeRelatedTo(source.symbol, target.symbol, errorReporter))
+ return true;
+ if (s & 256 /* EnumLiteral */ && t & 256 /* EnumLiteral */) {
+ if (s & 65536 /* Union */ && t & 65536 /* Union */ && isEnumTypeRelatedTo(source.symbol, target.symbol, errorReporter))
+ return true;
+ if (s & 224 /* Literal */ && t & 224 /* Literal */ &&
+ source.value === target.value &&
+ isEnumTypeRelatedTo(getParentOfSymbol(source.symbol), getParentOfSymbol(target.symbol), errorReporter))
+ return true;
+ }
+ if (s & 2048 /* Undefined */ && (!strictNullChecks || t & (2048 /* Undefined */ | 1024 /* Void */)))
return true;
- if (source.flags & 4096 /* Null */ && (!strictNullChecks || target.flags & 4096 /* Null */))
+ if (s & 4096 /* Null */ && (!strictNullChecks || t & 4096 /* Null */))
return true;
- if (source.flags & 32768 /* Object */ && target.flags & 16777216 /* NonPrimitive */)
+ if (s & 32768 /* Object */ && t & 16777216 /* NonPrimitive */)
return true;
if (relation === assignableRelation || relation === comparableRelation) {
- if (source.flags & 1 /* Any */)
- return true;
- if ((source.flags & 4 /* Number */ | source.flags & 64 /* NumberLiteral */) && target.flags & 272 /* EnumLike */)
+ if (s & 1 /* Any */)
return true;
- if (source.flags & 256 /* EnumLiteral */ &&
- target.flags & 256 /* EnumLiteral */ &&
- source.text === target.text &&
- isEnumTypeRelatedTo(source.baseType, target.baseType, errorReporter)) {
- return true;
- }
- if (source.flags & 256 /* EnumLiteral */ &&
- target.flags & 16 /* Enum */ &&
- isEnumTypeRelatedTo(target, source.baseType, errorReporter)) {
+ // Type number or any numeric literal type is assignable to any numeric enum type or any
+ // numeric enum literal type. This rule exists for backwards compatibility reasons because
+ // bit-flag enum types sometimes look like literal enum types with numeric literal values.
+ if (s & (4 /* Number */ | 64 /* NumberLiteral */) && !(s & 256 /* EnumLiteral */) && (t & 16 /* Enum */ || t & 64 /* NumberLiteral */ && t & 256 /* EnumLiteral */))
return true;
- }
}
return false;
}
@@ -33142,6 +34692,7 @@ var ts;
var expandingFlags;
var depth = 0;
var overflow = false;
+ var isIntersectionConstituent = false;
ts.Debug.assert(relation !== identityRelation || !errorNode, "no error reporting in identity checking");
var result = isRelatedTo(source, target, /*reportErrors*/ !!errorNode, headMessage);
if (overflow) {
@@ -33162,8 +34713,8 @@ var ts;
var sourceType = typeToString(source);
var targetType = typeToString(target);
if (sourceType === targetType) {
- sourceType = typeToString(source, /*enclosingDeclaration*/ undefined, 128 /* UseFullyQualifiedType */);
- targetType = typeToString(target, /*enclosingDeclaration*/ undefined, 128 /* UseFullyQualifiedType */);
+ sourceType = typeToString(source, /*enclosingDeclaration*/ undefined, 256 /* UseFullyQualifiedType */);
+ targetType = typeToString(target, /*enclosingDeclaration*/ undefined, 256 /* UseFullyQualifiedType */);
}
if (!message) {
if (relation === comparableRelation) {
@@ -33214,7 +34765,6 @@ var ts;
* * Ternary.False if they are not related.
*/
function isRelatedTo(source, target, reportErrors, headMessage) {
- var result;
if (source.flags & 96 /* StringOrNumberLiteral */ && source.flags & 1048576 /* FreshLiteral */) {
source = source.regularType;
}
@@ -33244,31 +34794,38 @@ var ts;
source = getRegularTypeOfObjectLiteral(source);
}
}
+ if (relation !== comparableRelation &&
+ !(source.flags & 196608 /* UnionOrIntersection */) &&
+ !(target.flags & 65536 /* Union */) &&
+ !isIntersectionConstituent &&
+ source !== globalObjectType &&
+ getPropertiesOfType(source).length > 0 &&
+ isWeakType(target) &&
+ !hasCommonProperties(source, target)) {
+ if (reportErrors) {
+ reportError(ts.Diagnostics.Type_0_has_no_properties_in_common_with_type_1, typeToString(source), typeToString(target));
+ }
+ return 0 /* False */;
+ }
+ var result = 0 /* False */;
var saveErrorInfo = errorInfo;
+ var saveIsIntersectionConstituent = isIntersectionConstituent;
+ isIntersectionConstituent = false;
// Note that these checks are specifically ordered to produce correct results. In particular,
// we need to deconstruct unions before intersections (because unions are always at the top),
// and we need to handle "each" relations before "some" relations for the same kind of type.
if (source.flags & 65536 /* Union */) {
- if (relation === comparableRelation) {
- result = someTypeRelatedToType(source, target, reportErrors && !(source.flags & 8190 /* Primitive */));
- }
- else {
- result = eachTypeRelatedToType(source, target, reportErrors && !(source.flags & 8190 /* Primitive */));
- }
- if (result) {
- return result;
- }
+ result = relation === comparableRelation ?
+ someTypeRelatedToType(source, target, reportErrors && !(source.flags & 8190 /* Primitive */)) :
+ eachTypeRelatedToType(source, target, reportErrors && !(source.flags & 8190 /* Primitive */));
}
else {
if (target.flags & 65536 /* Union */) {
- if (result = typeRelatedToSomeType(source, target, reportErrors && !(source.flags & 8190 /* Primitive */) && !(target.flags & 8190 /* Primitive */))) {
- return result;
- }
+ result = typeRelatedToSomeType(source, target, reportErrors && !(source.flags & 8190 /* Primitive */) && !(target.flags & 8190 /* Primitive */));
}
else if (target.flags & 131072 /* Intersection */) {
- if (result = typeRelatedToEachType(source, target, reportErrors)) {
- return result;
- }
+ isIntersectionConstituent = true;
+ result = typeRelatedToEachType(source, target, reportErrors);
}
else if (source.flags & 131072 /* Intersection */) {
// Check to see if any constituents of the intersection are immediately related to the target.
@@ -33284,18 +34841,16 @@ var ts;
//
// - 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;
- }
+ result = someTypeRelatedToType(source, target, /*reportErrors*/ false);
}
- if (source.flags & 1032192 /* StructuredOrTypeVariable */ || target.flags & 1032192 /* StructuredOrTypeVariable */) {
+ if (!result && (source.flags & 1032192 /* StructuredOrTypeVariable */ || target.flags & 1032192 /* StructuredOrTypeVariable */)) {
if (result = recursiveTypeRelatedTo(source, target, reportErrors)) {
errorInfo = saveErrorInfo;
- return result;
}
}
}
- if (reportErrors) {
+ isIntersectionConstituent = saveIsIntersectionConstituent;
+ if (!result && reportErrors) {
if (source.flags & 32768 /* Object */ && target.flags & 8190 /* Primitive */) {
tryElaborateErrorsForPrimitivesAndObjects(source, target);
}
@@ -33304,7 +34859,7 @@ var ts;
}
reportRelationError(headMessage, source, target);
}
- return 0 /* False */;
+ return result;
}
function isIdenticalTo(source, target) {
var result;
@@ -33321,29 +34876,6 @@ var ts;
}
return 0 /* False */;
}
- // Check if a property with the given name is known anywhere in the given type. In an object type, a property
- // 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, isComparingJsxAttributes) {
- if (type.flags & 32768 /* Object */) {
- var resolved = resolveStructuredTypeMembers(type);
- 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, isComparingJsxAttributes)) {
- return true;
- }
- }
- }
- return false;
- }
function hasExcessProperties(source, target, reportErrors) {
if (maybeTypeOfKind(target, 32768 /* Object */) && !(getObjectFlags(target) & 512 /* ObjectLiteralPatternWithComputedProperties */)) {
var isComparingJsxAttributes = !!(source.flags & 33554432 /* JsxAttributes */);
@@ -33351,8 +34883,7 @@ var ts;
(isTypeSubsetOf(globalObjectType, target) || (!isComparingJsxAttributes && isEmptyObjectType(target)))) {
return false;
}
- for (var _i = 0, _a = getPropertiesOfObjectType(source); _i < _a.length; _i++) {
- var prop = _a[_i];
+ var _loop_4 = function (prop) {
if (!isKnownProperty(target, prop.name, isComparingJsxAttributes)) {
if (reportErrors) {
// We know *exactly* where things went wrong when comparing the types.
@@ -33365,12 +34896,22 @@ var ts;
reportError(ts.Diagnostics.Property_0_does_not_exist_on_type_1, symbolToString(prop), typeToString(target));
}
else {
- errorNode = prop.valueDeclaration;
+ // use the property's value declaration if the property is assigned inside the literal itself
+ var objectLiteralDeclaration_1 = source.symbol && ts.firstOrUndefined(source.symbol.declarations);
+ if (prop.valueDeclaration && ts.findAncestor(prop.valueDeclaration, function (d) { return d === objectLiteralDeclaration_1; })) {
+ 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;
+ return { value: true };
}
+ };
+ for (var _i = 0, _a = getPropertiesOfObjectType(source); _i < _a.length; _i++) {
+ var prop = _a[_i];
+ var state_2 = _loop_4(prop);
+ if (typeof state_2 === "object")
+ return state_2.value;
}
}
return false;
@@ -33732,10 +35273,10 @@ var ts;
}
}
else if (!(targetProp.flags & 16777216 /* Prototype */)) {
- var sourcePropFlags = getDeclarationModifierFlagsFromSymbol(sourceProp);
- var targetPropFlags = getDeclarationModifierFlagsFromSymbol(targetProp);
+ var sourcePropFlags = ts.getDeclarationModifierFlagsFromSymbol(sourceProp);
+ var targetPropFlags = ts.getDeclarationModifierFlagsFromSymbol(targetProp);
if (sourcePropFlags & 8 /* Private */ || targetPropFlags & 8 /* Private */) {
- if (getCheckFlags(sourceProp) & 256 /* ContainsPrivate */) {
+ if (ts.getCheckFlags(sourceProp) & 256 /* ContainsPrivate */) {
if (reportErrors) {
reportError(ts.Diagnostics.Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1, symbolToString(sourceProp), typeToString(source));
}
@@ -33794,6 +35335,33 @@ var ts;
}
return result;
}
+ /**
+ * A type is 'weak' if it is an object type with at least one optional property
+ * and no required properties, call/construct signatures or index signatures
+ */
+ function isWeakType(type) {
+ if (type.flags & 32768 /* Object */) {
+ var resolved = resolveStructuredTypeMembers(type);
+ return resolved.callSignatures.length === 0 && resolved.constructSignatures.length === 0 &&
+ !resolved.stringIndexInfo && !resolved.numberIndexInfo &&
+ resolved.properties.length > 0 &&
+ ts.every(resolved.properties, function (p) { return !!(p.flags & 67108864 /* Optional */); });
+ }
+ if (type.flags & 131072 /* Intersection */) {
+ return ts.every(type.types, isWeakType);
+ }
+ return false;
+ }
+ function hasCommonProperties(source, target) {
+ var isComparingJsxAttributes = !!(source.flags & 33554432 /* JsxAttributes */);
+ for (var _i = 0, _a = getPropertiesOfType(source); _i < _a.length; _i++) {
+ var prop = _a[_i];
+ if (isKnownProperty(target, prop.name, isComparingJsxAttributes)) {
+ return true;
+ }
+ }
+ return false;
+ }
function propertiesIdenticalTo(source, target) {
if (!(source.flags & 32768 /* Object */ && target.flags & 32768 /* Object */)) {
return 0 /* False */;
@@ -33844,32 +35412,57 @@ var ts;
}
var result = -1 /* True */;
var saveErrorInfo = errorInfo;
- outer: for (var _i = 0, targetSignatures_1 = targetSignatures; _i < targetSignatures_1.length; _i++) {
- var t = targetSignatures_1[_i];
- // Only elaborate errors from the first failure
- var shouldElaborateErrors = reportErrors;
- for (var _a = 0, sourceSignatures_1 = sourceSignatures; _a < sourceSignatures_1.length; _a++) {
- var s = sourceSignatures_1[_a];
- var related = signatureRelatedTo(s, t, shouldElaborateErrors);
- if (related) {
- result &= related;
- errorInfo = saveErrorInfo;
- continue outer;
+ if (getObjectFlags(source) & 64 /* Instantiated */ && getObjectFlags(target) & 64 /* Instantiated */ && source.symbol === target.symbol) {
+ // We have instantiations of the same anonymous type (which typically will be the type of a
+ // method). Simply do a pairwise comparison of the signatures in the two signature lists instead
+ // of the much more expensive N * M comparison matrix we explore below. We erase type parameters
+ // as they are known to always be the same.
+ for (var i = 0; i < targetSignatures.length; i++) {
+ var related = signatureRelatedTo(sourceSignatures[i], targetSignatures[i], /*erase*/ true, reportErrors);
+ if (!related) {
+ return 0 /* False */;
}
- shouldElaborateErrors = false;
+ result &= related;
}
- if (shouldElaborateErrors) {
- reportError(ts.Diagnostics.Type_0_provides_no_match_for_the_signature_1, typeToString(source), signatureToString(t, /*enclosingDeclaration*/ undefined, /*flags*/ undefined, kind));
+ }
+ else if (sourceSignatures.length === 1 && targetSignatures.length === 1) {
+ // For simple functions (functions with a single signature) we only erase type parameters for
+ // the comparable relation. Otherwise, if the source signature is generic, we instantiate it
+ // in the context of the target signature before checking the relationship. Ideally we'd do
+ // this regardless of the number of signatures, but the potential costs are prohibitive due
+ // to the quadratic nature of the logic below.
+ var eraseGenerics = relation === comparableRelation || compilerOptions.noStrictGenericChecks;
+ result = signatureRelatedTo(sourceSignatures[0], targetSignatures[0], eraseGenerics, reportErrors);
+ }
+ else {
+ outer: for (var _i = 0, targetSignatures_1 = targetSignatures; _i < targetSignatures_1.length; _i++) {
+ var t = targetSignatures_1[_i];
+ // Only elaborate errors from the first failure
+ var shouldElaborateErrors = reportErrors;
+ for (var _a = 0, sourceSignatures_1 = sourceSignatures; _a < sourceSignatures_1.length; _a++) {
+ var s = sourceSignatures_1[_a];
+ var related = signatureRelatedTo(s, t, /*erase*/ true, shouldElaborateErrors);
+ if (related) {
+ result &= related;
+ errorInfo = saveErrorInfo;
+ continue outer;
+ }
+ shouldElaborateErrors = false;
+ }
+ if (shouldElaborateErrors) {
+ reportError(ts.Diagnostics.Type_0_provides_no_match_for_the_signature_1, typeToString(source), signatureToString(t, /*enclosingDeclaration*/ undefined, /*flags*/ undefined, kind));
+ }
+ return 0 /* False */;
}
- return 0 /* False */;
}
return result;
}
/**
* See signatureAssignableTo, compareSignaturesIdentical
*/
- function signatureRelatedTo(source, target, reportErrors) {
- return compareSignaturesRelated(source, target, /*ignoreReturnTypes*/ false, reportErrors, reportError, isRelatedTo);
+ function signatureRelatedTo(source, target, erase, reportErrors) {
+ return compareSignaturesRelated(erase ? getErasedSignature(source) : source, erase ? getErasedSignature(target) : target,
+ /*checkAsCallback*/ false, /*ignoreReturnTypes*/ false, reportErrors, reportError, isRelatedTo);
}
function signaturesIdenticalTo(source, target, kind) {
var sourceSignatures = getSignaturesOfType(source, kind);
@@ -33981,7 +35574,7 @@ var ts;
// 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 */) {
+ if (ts.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);
@@ -34008,13 +35601,13 @@ var ts;
}
// 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 */ ?
+ return !forEachProperty(targetProp, function (tp) { return ts.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 */ ?
+ return forEachProperty(prop, function (p) { return ts.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
@@ -34063,8 +35656,8 @@ var ts;
if (sourceProp === targetProp) {
return -1 /* True */;
}
- var sourcePropAccessibility = getDeclarationModifierFlagsFromSymbol(sourceProp) & 24 /* NonPublicAccessibilityModifier */;
- var targetPropAccessibility = getDeclarationModifierFlagsFromSymbol(targetProp) & 24 /* NonPublicAccessibilityModifier */;
+ var sourcePropAccessibility = ts.getDeclarationModifierFlagsFromSymbol(sourceProp) & 24 /* NonPublicAccessibilityModifier */;
+ var targetPropAccessibility = ts.getDeclarationModifierFlagsFromSymbol(targetProp) & 24 /* NonPublicAccessibilityModifier */;
if (sourcePropAccessibility !== targetPropAccessibility) {
return 0 /* False */;
}
@@ -34157,18 +35750,10 @@ var ts;
function isRestParameterIndex(signature, parameterIndex) {
return signature.hasRestParameter && parameterIndex >= signature.parameters.length - 1;
}
- function isSupertypeOfEach(candidate, types) {
- 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;
- }
- return true;
- }
function literalTypesWithSameBaseType(types) {
var commonBaseType;
- for (var _i = 0, types_11 = types; _i < types_11.length; _i++) {
- var t = types_11[_i];
+ for (var _i = 0, types_9 = types; _i < types_9.length; _i++) {
+ var t = types_9[_i];
var baseType = getBaseTypeOfLiteralType(t);
if (!commonBaseType) {
commonBaseType = baseType;
@@ -34179,55 +35764,22 @@ var ts;
}
return true;
}
- // When the candidate types are all literal types with the same base type, the common
- // supertype is a union of those literal types. Otherwise, the common supertype is the
- // first type that is a supertype of each of the other types.
+ // When the candidate types are all literal types with the same base type, return a union
+ // of those literal types. Otherwise, return the leftmost type for which no type to the
+ // right is a supertype.
function getSupertypeOrUnion(types) {
- return literalTypesWithSameBaseType(types) ? getUnionType(types) : ts.forEach(types, function (t) { return isSupertypeOfEach(t, types) ? t : undefined; });
+ return literalTypesWithSameBaseType(types) ?
+ getUnionType(types) :
+ ts.reduceLeft(types, function (s, t) { return isTypeSubtypeOf(s, t) ? t : s; });
}
function getCommonSupertype(types) {
if (!strictNullChecks) {
return getSupertypeOrUnion(types);
}
var primaryTypes = ts.filter(types, function (t) { return !(t.flags & 6144 /* Nullable */); });
- if (!primaryTypes.length) {
- return getUnionType(types, /*subtypeReduction*/ true);
- }
- var supertype = getSupertypeOrUnion(primaryTypes);
- return supertype && includeFalsyTypes(supertype, getFalsyFlagsOfTypes(types) & 6144 /* Nullable */);
- }
- function reportNoCommonSupertypeError(types, errorLocation, errorMessageChainHead) {
- // The downfallType/bestSupertypeDownfallType is the first type that caused a particular candidate
- // to not be the common supertype. So if it weren't for this one downfallType (and possibly others),
- // the type in question could have been the common supertype.
- var bestSupertype;
- var bestSupertypeDownfallType;
- var bestSupertypeScore = 0;
- for (var i = 0; i < types.length; i++) {
- var score = 0;
- var downfallType = undefined;
- for (var j = 0; j < types.length; j++) {
- if (isTypeSubtypeOf(types[j], types[i])) {
- score++;
- }
- else if (!downfallType) {
- downfallType = types[j];
- }
- }
- ts.Debug.assert(!!downfallType, "If there is no common supertype, each type should have a downfallType");
- if (score > bestSupertypeScore) {
- bestSupertype = types[i];
- bestSupertypeDownfallType = downfallType;
- bestSupertypeScore = score;
- }
- // types.length - 1 is the maximum score, given that getCommonSupertype returned false
- if (bestSupertypeScore === types.length - 1) {
- break;
- }
- }
- // In the following errors, the {1} slot is before the {0} slot because checkTypeSubtypeOf supplies the
- // subtype as the first argument to the error
- checkTypeSubtypeOf(bestSupertypeDownfallType, bestSupertype, errorLocation, ts.Diagnostics.Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0, errorMessageChainHead);
+ return primaryTypes.length ?
+ getNullableType(getSupertypeOrUnion(primaryTypes), getFalsyFlagsOfTypes(types) & 6144 /* Nullable */) :
+ getUnionType(types, /*subtypeReduction*/ true);
}
function isArrayType(type) {
return getObjectFlags(type) & 4 /* Reference */ && type.target === globalArrayType;
@@ -34242,27 +35794,27 @@ var ts;
return !!getPropertyOfType(type, "0");
}
function isUnitType(type) {
- return (type.flags & (480 /* Literal */ | 2048 /* Undefined */ | 4096 /* Null */)) !== 0;
+ return (type.flags & (224 /* Literal */ | 2048 /* Undefined */ | 4096 /* Null */)) !== 0;
}
function isLiteralType(type) {
return type.flags & 8 /* Boolean */ ? true :
- type.flags & 65536 /* Union */ ? type.flags & 16 /* Enum */ ? true : !ts.forEach(type.types, function (t) { return !isUnitType(t); }) :
+ type.flags & 65536 /* Union */ ? type.flags & 256 /* EnumLiteral */ ? true : !ts.forEach(type.types, function (t) { return !isUnitType(t); }) :
isUnitType(type);
}
function getBaseTypeOfLiteralType(type) {
- return type.flags & 32 /* StringLiteral */ ? stringType :
- type.flags & 64 /* NumberLiteral */ ? numberType :
- type.flags & 128 /* BooleanLiteral */ ? booleanType :
- type.flags & 256 /* EnumLiteral */ ? type.baseType :
- type.flags & 65536 /* Union */ && !(type.flags & 16 /* Enum */) ? getUnionType(ts.sameMap(type.types, getBaseTypeOfLiteralType)) :
+ return type.flags & 256 /* EnumLiteral */ ? getBaseTypeOfEnumLiteralType(type) :
+ type.flags & 32 /* StringLiteral */ ? stringType :
+ type.flags & 64 /* NumberLiteral */ ? numberType :
+ type.flags & 128 /* BooleanLiteral */ ? booleanType :
+ type.flags & 65536 /* Union */ ? getUnionType(ts.sameMap(type.types, getBaseTypeOfLiteralType)) :
type;
}
function getWidenedLiteralType(type) {
- return type.flags & 32 /* StringLiteral */ && type.flags & 1048576 /* FreshLiteral */ ? stringType :
- type.flags & 64 /* NumberLiteral */ && type.flags & 1048576 /* FreshLiteral */ ? numberType :
- type.flags & 128 /* BooleanLiteral */ ? booleanType :
- type.flags & 256 /* EnumLiteral */ ? type.baseType :
- type.flags & 65536 /* Union */ && !(type.flags & 16 /* Enum */) ? getUnionType(ts.sameMap(type.types, getWidenedLiteralType)) :
+ return type.flags & 256 /* EnumLiteral */ ? getBaseTypeOfEnumLiteralType(type) :
+ type.flags & 32 /* StringLiteral */ && type.flags & 1048576 /* FreshLiteral */ ? stringType :
+ type.flags & 64 /* NumberLiteral */ && type.flags & 1048576 /* FreshLiteral */ ? numberType :
+ type.flags & 128 /* BooleanLiteral */ ? booleanType :
+ type.flags & 65536 /* Union */ ? getUnionType(ts.sameMap(type.types, getWidenedLiteralType)) :
type;
}
/**
@@ -34274,8 +35826,8 @@ var ts;
}
function getFalsyFlagsOfTypes(types) {
var result = 0;
- for (var _i = 0, types_12 = types; _i < types_12.length; _i++) {
- var t = types_12[_i];
+ for (var _i = 0, types_10 = types; _i < types_10.length; _i++) {
+ var t = types_10[_i];
result |= getFalsyFlags(t);
}
return result;
@@ -34285,35 +35837,35 @@ var ts;
// no flags for all other types (including non-falsy literal types).
function getFalsyFlags(type) {
return type.flags & 65536 /* Union */ ? getFalsyFlagsOfTypes(type.types) :
- type.flags & 32 /* StringLiteral */ ? type.text === "" ? 32 /* StringLiteral */ : 0 :
- type.flags & 64 /* NumberLiteral */ ? type.text === "0" ? 64 /* NumberLiteral */ : 0 :
+ type.flags & 32 /* StringLiteral */ ? type.value === "" ? 32 /* StringLiteral */ : 0 :
+ type.flags & 64 /* NumberLiteral */ ? type.value === 0 ? 64 /* NumberLiteral */ : 0 :
type.flags & 128 /* BooleanLiteral */ ? type === falseType ? 128 /* BooleanLiteral */ : 0 :
type.flags & 7406 /* PossiblyFalsy */;
}
- function includeFalsyTypes(type, flags) {
- if ((getFalsyFlags(type) & flags) === flags) {
- return type;
- }
- var types = [type];
- if (flags & 262178 /* StringLike */)
- types.push(emptyStringType);
- if (flags & 340 /* NumberLike */)
- types.push(zeroType);
- if (flags & 136 /* BooleanLike */)
- types.push(falseType);
- if (flags & 1024 /* Void */)
- types.push(voidType);
- if (flags & 2048 /* Undefined */)
- types.push(undefinedType);
- if (flags & 4096 /* Null */)
- types.push(nullType);
- return getUnionType(types);
- }
function removeDefinitelyFalsyTypes(type) {
return getFalsyFlags(type) & 7392 /* DefinitelyFalsy */ ?
filterType(type, function (t) { return !(getFalsyFlags(t) & 7392 /* DefinitelyFalsy */); }) :
type;
}
+ function extractDefinitelyFalsyTypes(type) {
+ return mapType(type, getDefinitelyFalsyPartOfType);
+ }
+ function getDefinitelyFalsyPartOfType(type) {
+ return type.flags & 2 /* String */ ? emptyStringType :
+ type.flags & 4 /* Number */ ? zeroType :
+ type.flags & 8 /* Boolean */ || type === falseType ? falseType :
+ type.flags & (1024 /* Void */ | 2048 /* Undefined */ | 4096 /* Null */) ||
+ type.flags & 32 /* StringLiteral */ && type.value === "" ||
+ type.flags & 64 /* NumberLiteral */ && type.value === 0 ? type :
+ neverType;
+ }
+ function getNullableType(type, flags) {
+ var missing = (flags & ~type.flags) & (2048 /* Undefined */ | 4096 /* Null */);
+ return missing === 0 ? type :
+ missing === 2048 /* Undefined */ ? getUnionType([type, undefinedType]) :
+ missing === 4096 /* Null */ ? getUnionType([type, nullType]) :
+ getUnionType([type, undefinedType, nullType]);
+ }
function getNonNullableType(type) {
return strictNullChecks ? getTypeWithFacts(type, 524288 /* NEUndefinedOrNull */) : type;
}
@@ -34480,7 +36032,7 @@ var ts;
default:
diagnostic = ts.Diagnostics.Variable_0_implicitly_has_an_1_type;
}
- error(declaration, diagnostic, ts.declarationNameToString(declaration.name), typeAsString);
+ error(declaration, diagnostic, ts.declarationNameToString(ts.getNameOfDeclaration(declaration)), typeAsString);
}
function reportErrorsFromWidening(declaration, type) {
if (produceDiagnostics && noImplicitAny && type.flags & 2097152 /* ContainsWideningType */) {
@@ -34510,22 +36062,42 @@ var ts;
callback(getTypeAtPosition(source, i), getTypeAtPosition(target, i));
}
}
- function createInferenceContext(signature, inferUnionTypes, useAnyForNoInferences) {
- var inferences = ts.map(signature.typeParameters, createTypeInferencesObject);
+ function createInferenceContext(signature, flags, baseInferences) {
+ var inferences = baseInferences ? ts.map(baseInferences, cloneInferenceInfo) : ts.map(signature.typeParameters, createInferenceInfo);
+ var context = mapper;
+ context.mappedTypes = signature.typeParameters;
+ context.signature = signature;
+ context.inferences = inferences;
+ context.flags = flags;
+ return context;
+ function mapper(t) {
+ for (var i = 0; i < inferences.length; i++) {
+ if (t === inferences[i].typeParameter) {
+ inferences[i].isFixed = true;
+ return getInferredType(context, i);
+ }
+ }
+ return t;
+ }
+ }
+ function createInferenceInfo(typeParameter) {
return {
- signature: signature,
- inferUnionTypes: inferUnionTypes,
- inferences: inferences,
- inferredTypes: new Array(signature.typeParameters.length),
- useAnyForNoInferences: useAnyForNoInferences
+ typeParameter: typeParameter,
+ candidates: undefined,
+ inferredType: undefined,
+ priority: undefined,
+ topLevel: true,
+ isFixed: false
};
}
- function createTypeInferencesObject() {
+ function cloneInferenceInfo(inference) {
return {
- primary: undefined,
- secondary: undefined,
- topLevel: true,
- isFixed: false,
+ typeParameter: inference.typeParameter,
+ candidates: inference.candidates && inference.candidates.slice(),
+ inferredType: inference.inferredType,
+ priority: inference.priority,
+ topLevel: inference.topLevel,
+ isFixed: inference.isFixed
};
}
// Return true if the given type could possibly reference a type parameter for which
@@ -34535,7 +36107,7 @@ var ts;
var objectFlags = getObjectFlags(type);
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 & 16 /* Anonymous */ && type.symbol && type.symbol.flags & (16 /* Function */ | 8192 /* Method */ | 2048 /* TypeLiteral */ | 32 /* Class */) ||
objectFlags & 32 /* Mapped */ ||
type.flags & 196608 /* UnionOrIntersection */ && couldUnionOrIntersectionContainTypeVariables(type));
}
@@ -34558,14 +36130,13 @@ var ts;
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 typeParameter = getIndexedAccessType(getConstraintTypeFromMappedType(target).type, getTypeParameterFromMappedType(target));
+ var inference = createInferenceInfo(typeParameter);
+ var inferences = [inference];
var templateType = getTemplateTypeFromMappedType(target);
var readonlyMask = target.declaration.readonlyToken ? false : true;
var optionalMask = target.declaration.questionToken ? 0 : 67108864 /* Optional */;
- var members = createSymbolTable(properties);
+ var members = ts.createMap();
for (var _i = 0, properties_5 = properties; _i < properties_5.length; _i++) {
var prop = properties_5[_i];
var inferredPropType = inferTargetType(getTypeOfSymbol(prop));
@@ -34587,31 +36158,16 @@ var ts;
}
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);
+ inference.candidates = undefined;
+ inferTypes(inferences, sourceType, templateType);
+ return inference.candidates && getUnionType(inference.candidates, /*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;
- var inferiority = 0;
- var visited = ts.createMap();
+ function inferTypes(inferences, originalSource, originalTarget, priority) {
+ if (priority === void 0) { priority = 0; }
+ var symbolStack;
+ var visited;
inferFromTypes(originalSource, originalTarget);
- function isInProcess(source, target) {
- for (var i = 0; i < depth; i++) {
- if (source === sourceStack[i] && target === targetStack[i]) {
- return true;
- }
- }
- return false;
- }
function inferFromTypes(source, target) {
if (!couldContainTypeVariables(target)) {
return;
@@ -34626,7 +36182,7 @@ var ts;
}
return;
}
- if (source.flags & 65536 /* Union */ && target.flags & 65536 /* Union */ && !(source.flags & 16 /* Enum */ && target.flags & 16 /* Enum */) ||
+ if (source.flags & 65536 /* Union */ && target.flags & 65536 /* Union */ && !(source.flags & 256 /* EnumLiteral */ && target.flags & 256 /* EnumLiteral */) ||
source.flags & 131072 /* Intersection */ && target.flags & 131072 /* Intersection */) {
// Source and target are both unions or both intersections. If source and target
// are the same type, just relate each constituent type to itself.
@@ -34671,32 +36227,26 @@ var ts;
// Because the anyFunctionType is internal, it should not be exposed to the user by adding
// it as an inference candidate. Hopefully, a better candidate will come along that does
// not contain anyFunctionType when we come back to this argument for its second round
- // of inference.
- if (source.flags & 8388608 /* ContainsAnyFunctionType */) {
+ // of inference. Also, we exclude inferences for silentNeverType which is used as a wildcard
+ // when constructing types from type parameters that had no inference candidates.
+ if (source.flags & 8388608 /* ContainsAnyFunctionType */ || source === silentNeverType) {
return;
}
- 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
- // T | string[], we really don't know if we should be inferring to T or not (because
- // the correct constituent on the target side could be string[]). Therefore, we put
- // such inferior inferences into a secondary bucket, and only use them if the primary
- // bucket is empty.
- var candidates = inferiority ?
- inferences.secondary || (inferences.secondary = []) :
- inferences.primary || (inferences.primary = []);
- if (!ts.contains(candidates, source)) {
- candidates.push(source);
- }
- if (target.flags & 16384 /* TypeParameter */ && !isTypeParameterAtTopLevel(originalTarget, target)) {
- inferences.topLevel = false;
- }
+ var inference = getInferenceInfoForType(target);
+ if (inference) {
+ if (!inference.isFixed) {
+ if (!inference.candidates || priority < inference.priority) {
+ inference.candidates = [source];
+ inference.priority = priority;
+ }
+ else if (priority === inference.priority) {
+ inference.candidates.push(source);
+ }
+ if (!(priority & 4 /* ReturnType */) && target.flags & 16384 /* TypeParameter */ && !isTypeParameterAtTopLevel(originalTarget, target)) {
+ inference.topLevel = false;
}
- return;
}
+ return;
}
}
else if (getObjectFlags(source) & 4 /* Reference */ && getObjectFlags(target) & 4 /* Reference */ && source.target === target.target) {
@@ -34715,7 +36265,7 @@ var ts;
// 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)) {
+ if (getInferenceInfoForType(t)) {
typeVariable = t;
typeVariableCount++;
}
@@ -34727,9 +36277,10 @@ var ts;
// variable. This gives meaningful results for union types in co-variant positions and intersection
// types in contra-variant positions (such as callback parameters).
if (typeVariableCount === 1) {
- inferiority++;
+ var savePriority = priority;
+ priority |= 1 /* NakedTypeVariable */;
inferFromTypes(source, typeVariable);
- inferiority--;
+ priority = savePriority;
}
}
else if (source.flags & 196608 /* UnionOrIntersection */) {
@@ -34743,28 +36294,42 @@ var ts;
else {
source = getApparentType(source);
if (source.flags & 32768 /* Object */) {
- if (isInProcess(source, target)) {
+ var key = source.id + "," + target.id;
+ if (visited && visited.get(key)) {
return;
}
- if (isDeeplyNestedType(source, sourceStack, depth) && isDeeplyNestedType(target, targetStack, depth)) {
- return;
+ (visited || (visited = ts.createMap())).set(key, true);
+ // If we are already processing another target type with the same associated symbol (such as
+ // an instantiation of the same generic type), we do not explore this target as it would yield
+ // no further inferences. We exclude the static side of classes from this check since it shares
+ // its symbol with the instance side which would lead to false positives.
+ var isNonConstructorObject = target.flags & 32768 /* Object */ &&
+ !(getObjectFlags(target) & 16 /* Anonymous */ && target.symbol && target.symbol.flags & 32 /* Class */);
+ var symbol = isNonConstructorObject ? target.symbol : undefined;
+ if (symbol) {
+ if (ts.contains(symbolStack, symbol)) {
+ return;
+ }
+ (symbolStack || (symbolStack = [])).push(symbol);
+ inferFromObjectTypes(source, target);
+ symbolStack.pop();
}
- var key = source.id + "," + target.id;
- if (visited.get(key)) {
- return;
+ else {
+ inferFromObjectTypes(source, target);
}
- visited.set(key, true);
- if (depth === 0) {
- sourceStack = [];
- targetStack = [];
+ }
+ }
+ }
+ function getInferenceInfoForType(type) {
+ if (type.flags & 540672 /* TypeVariable */) {
+ for (var _i = 0, inferences_1 = inferences; _i < inferences_1.length; _i++) {
+ var inference = inferences_1[_i];
+ if (type === inference.typeParameter) {
+ return inference;
}
- sourceStack[depth] = source;
- targetStack[depth] = target;
- depth++;
- inferFromObjectTypes(source, target);
- depth--;
}
}
+ return undefined;
}
function inferFromObjectTypes(source, target) {
if (getObjectFlags(target) & 32 /* Mapped */) {
@@ -34774,13 +36339,14 @@ var ts;
// 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 inference = getInferenceInfoForType(constraintType.type);
+ if (inference && !inference.isFixed) {
var inferredType = inferTypeForHomomorphicMappedType(source, target);
if (inferredType) {
- inferiority++;
- inferFromTypes(inferredType, typeVariables[index]);
- inferiority--;
+ var savePriority = priority;
+ priority |= 2 /* MappedType */;
+ inferFromTypes(inferredType, inference.typeParameter);
+ priority = savePriority;
}
}
return;
@@ -34851,8 +36417,8 @@ var ts;
}
}
function typeIdenticalToSomeType(type, types) {
- for (var _i = 0, types_13 = types; _i < types_13.length; _i++) {
- var t = types_13[_i];
+ for (var _i = 0, types_11 = types; _i < types_11.length; _i++) {
+ var t = types_11[_i];
if (isTypeIdenticalTo(t, type)) {
return true;
}
@@ -34873,33 +36439,33 @@ var ts;
}
return type.flags & 65536 /* Union */ ? getUnionType(reducedTypes) : getIntersectionType(reducedTypes);
}
- function getInferenceCandidates(context, index) {
- var inferences = context.inferences[index];
- return inferences.primary || inferences.secondary || emptyArray;
- }
function hasPrimitiveConstraint(type) {
var constraint = getConstraintOfTypeParameter(type);
return constraint && maybeTypeOfKind(constraint, 8190 /* Primitive */ | 262144 /* Index */);
}
function getInferredType(context, index) {
- var inferredType = context.inferredTypes[index];
- var inferenceSucceeded;
+ var inference = context.inferences[index];
+ var inferredType = inference.inferredType;
if (!inferredType) {
- var inferences = getInferenceCandidates(context, index);
- if (inferences.length) {
+ if (inference.candidates) {
// We widen inferred literal types if
// all inferences were made to top-level ocurrences of the type parameter, and
// the type parameter has no constraint or its constraint includes no primitive or literal types, and
// the type parameter was fixed during inference or does not occur at top-level in the return type.
var signature = context.signature;
- var widenLiteralTypes = context.inferences[index].topLevel &&
- !hasPrimitiveConstraint(signature.typeParameters[index]) &&
- (context.inferences[index].isFixed || !isTypeParameterAtTopLevel(getReturnTypeOfSignature(signature), signature.typeParameters[index]));
- var baseInferences = widenLiteralTypes ? ts.sameMap(inferences, getWidenedLiteralType) : inferences;
- // Infer widened union or supertype, or the unknown type for no common supertype
- var unionOrSuperType = context.inferUnionTypes ? getUnionType(baseInferences, /*subtypeReduction*/ true) : getCommonSupertype(baseInferences);
- inferredType = unionOrSuperType ? getWidenedType(unionOrSuperType) : unknownType;
- inferenceSucceeded = !!unionOrSuperType;
+ var widenLiteralTypes = inference.topLevel &&
+ !hasPrimitiveConstraint(inference.typeParameter) &&
+ (inference.isFixed || !isTypeParameterAtTopLevel(getReturnTypeOfSignature(signature), inference.typeParameter));
+ var baseCandidates = widenLiteralTypes ? ts.sameMap(inference.candidates, getWidenedLiteralType) : inference.candidates;
+ // Infer widened union or supertype, or the unknown type for no common supertype. We infer union types
+ // for inferences coming from return types in order to avoid common supertype failures.
+ var unionOrSuperType = context.flags & 1 /* InferUnionTypes */ || inference.priority & 4 /* ReturnType */ ?
+ getUnionType(baseCandidates, /*subtypeReduction*/ true) : getCommonSupertype(baseCandidates);
+ inferredType = getWidenedType(unionOrSuperType);
+ }
+ else if (context.flags & 2 /* NoDefault */) {
+ // We use silentNeverType as the wildcard that signals no inferences.
+ inferredType = silentNeverType;
}
else {
// Infer either the default or the empty object type when no inferences were
@@ -34907,48 +36473,39 @@ var ts;
// 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.
- var defaultType = getDefaultFromTypeParameter(context.signature.typeParameters[index]);
+ var defaultType = getDefaultFromTypeParameter(inference.typeParameter);
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)));
+ inferredType = instantiateType(defaultType, combineTypeMappers(createBackreferenceMapper(context.signature.typeParameters, index), context));
}
else {
- inferredType = context.useAnyForNoInferences ? anyType : emptyObjectType;
+ inferredType = context.flags & 4 /* AnyDefault */ ? anyType : emptyObjectType;
}
- inferenceSucceeded = true;
}
- context.inferredTypes[index] = inferredType;
- // Only do the constraint check if inference succeeded (to prevent cascading errors)
- if (inferenceSucceeded) {
- var constraint = getConstraintOfTypeParameter(context.signature.typeParameters[index]);
- if (constraint) {
- var instantiatedConstraint = instantiateType(constraint, getInferenceMapper(context));
- if (!isTypeAssignableTo(inferredType, getTypeWithThisArgument(instantiatedConstraint, inferredType))) {
- context.inferredTypes[index] = inferredType = instantiatedConstraint;
- }
+ inference.inferredType = inferredType;
+ var constraint = getConstraintOfTypeParameter(context.signature.typeParameters[index]);
+ if (constraint) {
+ var instantiatedConstraint = instantiateType(constraint, context);
+ if (!isTypeAssignableTo(inferredType, getTypeWithThisArgument(instantiatedConstraint, inferredType))) {
+ inference.inferredType = inferredType = instantiatedConstraint;
}
}
- else if (context.failedTypeParameterIndex === undefined || context.failedTypeParameterIndex > index) {
- // If inference failed, it is necessary to record the index of the failed type parameter (the one we are on).
- // It might be that inference has already failed on a later type parameter on a previous call to inferTypeArguments.
- // So if this failure is on preceding type parameter, this type parameter is the new failure index.
- context.failedTypeParameterIndex = index;
- }
}
return inferredType;
}
function getInferredTypes(context) {
- for (var i = 0; i < context.inferredTypes.length; i++) {
- getInferredType(context, i);
+ var result = [];
+ for (var i = 0; i < context.inferences.length; i++) {
+ result.push(getInferredType(context, i));
}
- return context.inferredTypes;
+ return result;
}
// EXPRESSION TYPE CHECKING
function getResolvedSymbol(node) {
var links = getNodeLinks(node);
if (!links.resolvedSymbol) {
- links.resolvedSymbol = !ts.nodeIsMissing(node) && resolveName(node, node.text, 107455 /* Value */ | 1048576 /* ExportValue */, ts.Diagnostics.Cannot_find_name_0, node) || unknownSymbol;
+ links.resolvedSymbol = !ts.nodeIsMissing(node) && resolveName(node, node.text, 107455 /* Value */ | 1048576 /* ExportValue */, ts.Diagnostics.Cannot_find_name_0, node, ts.Diagnostics.Cannot_find_name_0_Did_you_mean_1) || unknownSymbol;
}
return links.resolvedSymbol;
}
@@ -34961,11 +36518,13 @@ var ts;
// 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
// leftmost identifier followed by zero or more property names separated by dots.
- // The result is undefined if the reference isn't a dotted name.
+ // The result is undefined if the reference isn't a dotted name. We prefix nodes
+ // occurring in an apparent type position with '@' because the control flow type
+ // of such nodes may be based on the apparent type instead of the declared type.
function getFlowCacheKey(node) {
if (node.kind === 71 /* Identifier */) {
var symbol = getResolvedSymbol(node);
- return symbol !== unknownSymbol ? "" + getSymbolId(symbol) : undefined;
+ return symbol !== unknownSymbol ? (isApparentTypePosition(node) ? "@" : "") + getSymbolId(symbol) : undefined;
}
if (node.kind === 99 /* ThisKeyword */) {
return "0";
@@ -35034,7 +36593,7 @@ var ts;
function isDiscriminantProperty(type, name) {
if (type && type.flags & 65536 /* Union */) {
var prop = getUnionOrIntersectionProperty(type, name);
- if (prop && getCheckFlags(prop) & 2 /* SyntheticProperty */) {
+ if (prop && ts.getCheckFlags(prop) & 2 /* SyntheticProperty */) {
if (prop.isDiscriminantProperty === undefined) {
prop.isDiscriminantProperty = prop.checkFlags & 32 /* HasNonUniformType */ && isLiteralType(getTypeOfSymbol(prop));
}
@@ -35097,8 +36656,8 @@ var ts;
}
function getTypeFactsOfTypes(types) {
var result = 0 /* None */;
- for (var _i = 0, types_14 = types; _i < types_14.length; _i++) {
- var t = types_14[_i];
+ for (var _i = 0, types_12 = types; _i < types_12.length; _i++) {
+ var t = types_12[_i];
result |= getTypeFacts(t);
}
return result;
@@ -35116,15 +36675,16 @@ var ts;
return strictNullChecks ? 4079361 /* StringStrictFacts */ : 4194049 /* StringFacts */;
}
if (flags & 32 /* StringLiteral */) {
+ var isEmpty = type.value === "";
return strictNullChecks ?
- type.text === "" ? 3030785 /* EmptyStringStrictFacts */ : 1982209 /* NonEmptyStringStrictFacts */ :
- type.text === "" ? 3145473 /* EmptyStringFacts */ : 4194049 /* NonEmptyStringFacts */;
+ isEmpty ? 3030785 /* EmptyStringStrictFacts */ : 1982209 /* NonEmptyStringStrictFacts */ :
+ isEmpty ? 3145473 /* EmptyStringFacts */ : 4194049 /* NonEmptyStringFacts */;
}
if (flags & (4 /* Number */ | 16 /* Enum */)) {
return strictNullChecks ? 4079234 /* NumberStrictFacts */ : 4193922 /* NumberFacts */;
}
- if (flags & (64 /* NumberLiteral */ | 256 /* EnumLiteral */)) {
- var isZero = type.text === "0";
+ if (flags & 64 /* NumberLiteral */) {
+ var isZero = type.value === 0;
return strictNullChecks ?
isZero ? 3030658 /* ZeroStrictFacts */ : 1982082 /* NonZeroStrictFacts */ :
isZero ? 3145346 /* ZeroFacts */ : 4193922 /* NonZeroFacts */;
@@ -35181,11 +36741,11 @@ var ts;
}
function getTypeOfDestructuredArrayElement(type, index) {
return isTupleLikeType(type) && getTypeOfPropertyOfType(type, "" + index) ||
- checkIteratedTypeOrElementType(type, /*errorNode*/ undefined, /*allowStringInput*/ false, /*allowAsyncIterable*/ false) ||
+ checkIteratedTypeOrElementType(type, /*errorNode*/ undefined, /*allowStringInput*/ false, /*allowAsyncIterables*/ false) ||
unknownType;
}
function getTypeOfDestructuredSpreadExpression(type) {
- return createArrayType(checkIteratedTypeOrElementType(type, /*errorNode*/ undefined, /*allowStringInput*/ false, /*allowAsyncIterable*/ false) || unknownType);
+ return createArrayType(checkIteratedTypeOrElementType(type, /*errorNode*/ undefined, /*allowStringInput*/ false, /*allowAsyncIterables*/ false) || unknownType);
}
function getAssignedTypeOfBinaryExpression(node) {
var isDestructuringDefaultAssignment = node.parent.kind === 177 /* ArrayLiteralExpression */ && isDestructuringAssignmentTarget(node.parent) ||
@@ -35331,7 +36891,7 @@ var ts;
}
return true;
}
- if (source.flags & 256 /* EnumLiteral */ && target.flags & 16 /* Enum */ && source.baseType === target) {
+ if (source.flags & 256 /* EnumLiteral */ && getBaseTypeOfEnumLiteralType(source) === target) {
return true;
}
return containsType(target.types, source);
@@ -35357,8 +36917,8 @@ var ts;
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];
+ 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) {
@@ -35438,8 +36998,8 @@ var ts;
}
function isEvolvingArrayTypeList(types) {
var hasEvolvingArrayType = false;
- for (var _i = 0, types_16 = types; _i < types_16.length; _i++) {
- var t = types_16[_i];
+ for (var _i = 0, types_14 = types; _i < types_14.length; _i++) {
+ var t = types_14[_i];
if (!(t.flags & 8192 /* Never */)) {
if (!(getObjectFlags(t) & 256 /* EvolvingArray */)) {
return false;
@@ -35470,7 +37030,7 @@ var ts;
parent.parent.operatorToken.kind === 58 /* EqualsToken */ &&
parent.parent.left === parent &&
!ts.isAssignmentTarget(parent.parent) &&
- isTypeAnyOrAllConstituentTypesHaveKind(getTypeOfExpression(parent.argumentExpression), 340 /* NumberLike */ | 2048 /* Undefined */);
+ isTypeAnyOrAllConstituentTypesHaveKind(getTypeOfExpression(parent.argumentExpression), 84 /* NumberLike */ | 2048 /* Undefined */);
return isLengthPushOrUnshift || isElementAssignment;
}
function maybeTypePredicateCall(node) {
@@ -35496,7 +37056,7 @@ var ts;
function getFlowTypeOfReference(reference, declaredType, initialType, flowContainer, couldBeUninitialized) {
if (initialType === void 0) { initialType = declaredType; }
var key;
- if (!reference.flowNode || !couldBeUninitialized && !(declaredType.flags & 17810431 /* Narrowable */)) {
+ if (!reference.flowNode || !couldBeUninitialized && !(declaredType.flags & 17810175 /* Narrowable */)) {
return declaredType;
}
var visitedFlowStart = visitedFlowCount;
@@ -35638,7 +37198,7 @@ var ts;
}
else {
var indexType = getTypeOfExpression(node.left.argumentExpression);
- if (isTypeAnyOrAllConstituentTypesHaveKind(indexType, 340 /* NumberLike */ | 2048 /* Undefined */)) {
+ if (isTypeAnyOrAllConstituentTypesHaveKind(indexType, 84 /* NumberLike */ | 2048 /* Undefined */)) {
evolvedType_1 = addEvolvingArrayElementType(evolvedType_1, node.right);
}
}
@@ -36145,6 +37705,26 @@ var ts;
!(getFalsyFlags(checkExpression(declaration.initializer)) & 2048 /* Undefined */);
return annotationIncludesUndefined ? getTypeWithFacts(declaredType, 131072 /* NEUndefined */) : declaredType;
}
+ function isApparentTypePosition(node) {
+ var parent = node.parent;
+ return parent.kind === 179 /* PropertyAccessExpression */ ||
+ parent.kind === 181 /* CallExpression */ && parent.expression === node ||
+ parent.kind === 180 /* ElementAccessExpression */ && parent.expression === node;
+ }
+ function typeHasNullableConstraint(type) {
+ return type.flags & 540672 /* TypeVariable */ && maybeTypeOfKind(getBaseConstraintOfType(type) || emptyObjectType, 6144 /* Nullable */);
+ }
+ function getDeclaredOrApparentType(symbol, node) {
+ // When a node is the left hand expression of a property access, element access, or call expression,
+ // and the type of the node includes type variables with constraints that are nullable, we fetch the
+ // apparent type of the node *before* performing control flow analysis such that narrowings apply to
+ // the constraint type.
+ var type = getTypeOfSymbol(symbol);
+ if (isApparentTypePosition(node) && forEachType(type, typeHasNullableConstraint)) {
+ return mapType(getWidenedType(type), getApparentType);
+ }
+ return type;
+ }
function checkIdentifier(node) {
var symbol = getResolvedSymbol(node);
if (symbol === unknownSymbol) {
@@ -36169,7 +37749,9 @@ var ts;
getNodeLinks(container).flags |= 8192 /* CaptureArguments */;
return getTypeOfSymbol(symbol);
}
- if (symbol.flags & 8388608 /* Alias */ && !isInTypeQuery(node) && !isConstEnumOrConstEnumOnlyModule(resolveAlias(symbol))) {
+ // We should only mark aliases as referenced if there isn't a local value declaration
+ // for the symbol.
+ if (isNonLocalAlias(symbol, /*excludes*/ 107455 /* Value */) && !isInTypeQuery(node) && !isConstEnumOrConstEnumOnlyModule(resolveAlias(symbol))) {
markAliasSymbolAsReferenced(symbol);
}
var localOrExportSymbol = getExportSymbolOfValueSymbolIfExported(symbol);
@@ -36211,7 +37793,7 @@ var ts;
checkCollisionWithCapturedThisVariable(node, node);
checkCollisionWithCapturedNewTargetVariable(node, node);
checkNestedBlockScopedBinding(node, symbol);
- var type = getTypeOfSymbol(localOrExportSymbol);
+ var type = getDeclaredOrApparentType(localOrExportSymbol, node);
var declaration = localOrExportSymbol.valueDeclaration;
var assignmentKind = ts.getAssignmentTargetKind(node);
if (assignmentKind) {
@@ -36249,10 +37831,11 @@ var ts;
// declaration container are the same).
var assumeInitialized = isParameter || isOuterVariable ||
type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & 1 /* Any */) !== 0 || isInTypeQuery(node) || node.parent.kind === 246 /* ExportSpecifier */) ||
+ node.parent.kind === 203 /* NonNullExpression */ ||
ts.isInAmbientContext(declaration);
var initialType = assumeInitialized ? (isParameter ? removeOptionalityFromDeclaredType(type, ts.getRootDeclaration(declaration)) : type) :
type === autoType || type === autoArrayType ? undefinedType :
- includeFalsyTypes(type, 2048 /* Undefined */);
+ getNullableType(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
@@ -36260,7 +37843,7 @@ var ts;
if (type === autoType || type === autoArrayType) {
if (flowType === autoType || flowType === autoArrayType) {
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(ts.getNameOfDeclaration(declaration), 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));
}
return convertAutoToAny(flowType);
@@ -36792,8 +38375,15 @@ var ts;
function getContextualTypeForInitializerExpression(node) {
var declaration = node.parent;
if (node === declaration.initializer) {
- if (declaration.type) {
- return getTypeFromTypeNode(declaration.type);
+ var typeNode = ts.getEffectiveTypeAnnotationNode(declaration);
+ if (typeNode) {
+ return getTypeFromTypeNode(typeNode);
+ }
+ if (ts.isInJavaScriptFile(declaration)) {
+ var jsDocType = getTypeForDeclarationFromJSDocComment(declaration);
+ if (jsDocType) {
+ return jsDocType;
+ }
}
if (declaration.kind === 146 /* Parameter */) {
var type = getContextuallyTypedParameterType(declaration);
@@ -36807,12 +38397,13 @@ var ts;
if (ts.isBindingPattern(declaration.parent)) {
var parentDeclaration = declaration.parent.parent;
var name = declaration.propertyName || declaration.name;
- if (parentDeclaration.kind !== 176 /* BindingElement */ &&
- parentDeclaration.type &&
- !ts.isBindingPattern(name)) {
- var text = ts.getTextOfPropertyName(name);
- if (text) {
- return getTypeOfPropertyOfType(getTypeFromTypeNode(parentDeclaration.type), text);
+ if (parentDeclaration.kind !== 176 /* BindingElement */) {
+ var parentTypeNode = ts.getEffectiveTypeAnnotationNode(parentDeclaration);
+ if (parentTypeNode && !ts.isBindingPattern(name)) {
+ var text = ts.getTextOfPropertyName(name);
+ if (text) {
+ return getTypeOfPropertyOfType(getTypeFromTypeNode(parentTypeNode), text);
+ }
}
}
}
@@ -36858,9 +38449,9 @@ var ts;
function getContextualReturnType(functionDecl) {
// 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 === 152 /* Constructor */ ||
- functionDecl.kind === 153 /* GetAccessor */ && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(functionDecl.symbol, 154 /* SetAccessor */))) {
+ if (functionDecl.kind === 152 /* Constructor */ ||
+ ts.getEffectiveReturnTypeNode(functionDecl) ||
+ isGetAccessorWithAnnotatedSetAccessor(functionDecl)) {
return getReturnTypeOfSignature(getSignatureFromDeclaration(functionDecl));
}
// Otherwise, if the containing function is contextually typed by a function type with exactly one call signature
@@ -36890,7 +38481,7 @@ var ts;
function getContextualTypeForBinaryOperand(node) {
var binaryExpression = node.parent;
var operator = binaryExpression.operatorToken.kind;
- if (operator >= 58 /* FirstAssignment */ && operator <= 70 /* LastAssignment */) {
+ if (ts.isAssignmentOperator(operator)) {
// Don't do this for special property assignments to avoid circularity
if (ts.getSpecialPropertyAssignmentKind(binaryExpression) !== 0 /* None */) {
return undefined;
@@ -36970,7 +38561,7 @@ var ts;
var index = ts.indexOf(arrayLiteral.elements, node);
return getTypeOfPropertyOfContextualType(type, "" + index)
|| getIndexTypeOfContextualType(type, 1 /* Number */)
- || getIteratedTypeOrElementType(type, /*errorNode*/ undefined, /*allowStringInput*/ false, /*allowAsyncIterable*/ false, /*checkAssignability*/ false);
+ || getIteratedTypeOrElementType(type, /*errorNode*/ undefined, /*allowStringInput*/ false, /*allowAsyncIterables*/ false, /*checkAssignability*/ false);
}
return undefined;
}
@@ -37075,6 +38666,8 @@ var ts;
case 261 /* PropertyAssignment */:
case 262 /* ShorthandPropertyAssignment */:
return getContextualTypeForObjectLiteralElement(parent);
+ case 263 /* SpreadAssignment */:
+ return getApparentTypeOfContextualType(parent.parent);
case 177 /* ArrayLiteralExpression */:
return getContextualTypeForElementExpression(node);
case 195 /* ConditionalExpression */:
@@ -37099,13 +38692,13 @@ var ts;
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) {
+ // If the given type is an object or union type with a single signature, and if that signature has at
+ // least as many parameters as the given function, return the signature. Otherwise return undefined.
+ function getContextualCallSignature(type, node) {
var signatures = getSignaturesOfStructuredType(type, 0 /* Call */);
if (signatures.length === 1) {
var signature = signatures[0];
- if (!signature.typeParameters && !isAritySmaller(signature, node)) {
+ if (!isAritySmaller(signature, node)) {
return signature;
}
}
@@ -37151,13 +38744,13 @@ var ts;
return undefined;
}
if (!(type.flags & 65536 /* Union */)) {
- return getNonGenericSignature(type, node);
+ return getContextualCallSignature(type, node);
}
var signatureList;
var types = type.types;
- for (var _i = 0, types_17 = types; _i < types_17.length; _i++) {
- var current = types_17[_i];
- var signature = getNonGenericSignature(current, node);
+ for (var _i = 0, types_15 = types; _i < types_15.length; _i++) {
+ var current = types_15[_i];
+ var signature = getContextualCallSignature(current, node);
if (signature) {
if (!signatureList) {
// This signature will contribute to contextual union signature
@@ -37188,7 +38781,7 @@ var ts;
checkExternalEmitHelpers(node, 1536 /* SpreadIncludes */);
}
var arrayOrIterableType = checkExpression(node.expression, checkMode);
- return checkIteratedTypeOrElementType(arrayOrIterableType, node.expression, /*allowStringInput*/ false, /*allowAsyncIterable*/ false);
+ return checkIteratedTypeOrElementType(arrayOrIterableType, node.expression, /*allowStringInput*/ false, /*allowAsyncIterables*/ false);
}
function hasDefaultValue(node) {
return (node.kind === 176 /* BindingElement */ && !!node.initializer) ||
@@ -37216,7 +38809,7 @@ var ts;
// if there is no index type / iterated type.
var restArrayType = checkExpression(e.expression, checkMode);
var restElementType = getIndexTypeOfType(restArrayType, 1 /* Number */) ||
- getIteratedTypeOrElementType(restArrayType, /*errorNode*/ undefined, /*allowStringInput*/ false, /*allowAsyncIterable*/ false, /*checkAssignability*/ false);
+ getIteratedTypeOrElementType(restArrayType, /*errorNode*/ undefined, /*allowStringInput*/ false, /*allowAsyncIterables*/ false, /*checkAssignability*/ false);
if (restElementType) {
elementTypes.push(restElementType);
}
@@ -37270,7 +38863,7 @@ var ts;
function isNumericComputedName(name) {
// It seems odd to consider an expression of type Any to result in a numeric name,
// but this behavior is consistent with checkIndexedAccess
- return isTypeAnyOrAllConstituentTypesHaveKind(checkComputedPropertyName(name), 340 /* NumberLike */);
+ return isTypeAnyOrAllConstituentTypesHaveKind(checkComputedPropertyName(name), 84 /* NumberLike */);
}
function isTypeAnyOrAllConstituentTypesHaveKind(type, kind) {
return isTypeAny(type) || isTypeOfKind(type, kind);
@@ -37308,7 +38901,7 @@ var ts;
links.resolvedType = checkExpression(node.expression);
// This will allow types number, string, symbol or any. It will also allow enums, the unknown
// type, and any union of these types (like string | number).
- if (!isTypeAnyOrAllConstituentTypesHaveKind(links.resolvedType, 340 /* NumberLike */ | 262178 /* StringLike */ | 512 /* ESSymbol */)) {
+ if (!isTypeAnyOrAllConstituentTypesHaveKind(links.resolvedType, 84 /* NumberLike */ | 262178 /* StringLike */ | 512 /* ESSymbol */)) {
error(node, ts.Diagnostics.A_computed_property_name_must_be_of_type_string_number_symbol_or_any);
}
else {
@@ -37459,6 +39052,8 @@ var ts;
if (spread.flags & 32768 /* Object */) {
// only set the symbol and flags if this is a (fresh) object type
spread.flags |= propagatedFlags;
+ spread.flags |= 1048576 /* FreshLiteral */;
+ spread.objectFlags |= 128 /* ObjectLiteral */;
spread.symbol = node.symbol;
}
return spread;
@@ -37537,6 +39132,10 @@ var ts;
var attributesTable = ts.createMap();
var spread = emptyObjectType;
var attributesArray = [];
+ var hasSpreadAnyType = false;
+ var typeToIntersect;
+ var explicitlySpecifyChildrenAttribute = false;
+ var jsxChildrenPropertyName = getJsxElementChildrenPropertyname();
for (var _i = 0, _a = attributes.properties; _i < _a.length; _i++) {
var attributeDecl = _a[_i];
var member = attributeDecl.symbol;
@@ -37554,6 +39153,9 @@ var ts;
attributeSymbol.target = member;
attributesTable.set(attributeSymbol.name, attributeSymbol);
attributesArray.push(attributeSymbol);
+ if (attributeDecl.name.text === jsxChildrenPropertyName) {
+ explicitlySpecifyChildrenAttribute = true;
+ }
}
else {
ts.Debug.assert(attributeDecl.kind === 255 /* JsxSpreadAttribute */);
@@ -37563,39 +39165,39 @@ var ts;
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;
+ hasSpreadAnyType = true;
+ }
+ if (isValidSpreadType(exprType)) {
+ spread = getSpreadType(spread, exprType);
+ }
+ else {
+ typeToIntersect = typeToIntersect ? getIntersectionType([typeToIntersect, exprType]) : exprType;
}
- spread = getSpreadType(spread, exprType);
}
}
- if (spread !== emptyObjectType) {
- if (attributesArray.length > 0) {
- spread = getSpreadType(spread, createJsxAttributesType(attributes.symbol, attributesTable));
- attributesArray = [];
- attributesTable = ts.createMap();
+ if (!hasSpreadAnyType) {
+ if (spread !== emptyObjectType) {
+ if (attributesArray.length > 0) {
+ spread = getSpreadType(spread, createJsxAttributesType(attributes.symbol, attributesTable));
+ }
+ attributesArray = getPropertiesOfType(spread);
}
- attributesArray = getPropertiesOfType(spread);
- }
- attributesTable = ts.createMap();
- if (attributesArray) {
- ts.forEach(attributesArray, function (attr) {
+ attributesTable = ts.createMap();
+ for (var _b = 0, attributesArray_1 = attributesArray; _b < attributesArray_1.length; _b++) {
+ var attr = attributesArray_1[_b];
if (!filter || filter(attr)) {
attributesTable.set(attr.name, attr);
}
- });
+ }
}
// Handle children attribute
var parent = openingLikeElement.parent.kind === 249 /* JsxElement */ ? openingLikeElement.parent : undefined;
// We have to check that openingElement of the parent is the one we are visiting as this may not be true for selfClosingElement
if (parent && parent.openingElement === openingLikeElement && parent.children.length > 0) {
var childrenTypes = [];
- for (var _b = 0, _c = parent.children; _b < _c.length; _b++) {
- var child = _c[_b];
+ for (var _c = 0, _d = parent.children; _c < _d.length; _c++) {
+ var child = _d[_c];
// In React, JSX text that contains only whitespaces will be ignored so we don't want to type-check that
// because then type of children property will have constituent of string type.
if (child.kind === 10 /* JsxText */) {
@@ -37607,11 +39209,11 @@ var ts;
childrenTypes.push(checkExpression(child, checkMode));
}
}
- // Error if there is a attribute named "children" and children element.
- // This is because children element will overwrite the value from attributes
- var jsxChildrenPropertyName = getJsxElementChildrenPropertyname();
- if (jsxChildrenPropertyName && jsxChildrenPropertyName !== "") {
- if (attributesTable.has(jsxChildrenPropertyName)) {
+ if (!hasSpreadAnyType && jsxChildrenPropertyName && jsxChildrenPropertyName !== "") {
+ // Error if there is a attribute named "children" explicitly specified and children element.
+ // This is because children element will overwrite the value from attributes.
+ // Note: we will not warn "children" attribute overwritten if "children" attribute is specified in object spread.
+ if (explicitlySpecifyChildrenAttribute) {
error(attributes, ts.Diagnostics._0_are_specified_twice_The_attribute_named_0_will_be_overwritten, jsxChildrenPropertyName);
}
// If there are children in the body of JSX element, create dummy attribute "children" with anyType so that it will pass the attribute checking process
@@ -37622,7 +39224,12 @@ var ts;
attributesTable.set(jsxChildrenPropertyName, childrenPropSymbol);
}
}
- return createJsxAttributesType(attributes.symbol, attributesTable);
+ if (hasSpreadAnyType) {
+ return anyType;
+ }
+ var attributeType = createJsxAttributesType(attributes.symbol, attributesTable);
+ return typeToIntersect && attributesTable.size ? getIntersectionType([typeToIntersect, attributeType]) :
+ typeToIntersect ? typeToIntersect : attributeType;
/**
* Create anonymous type from given attributes symbol table.
* @param symbol a symbol of JsxAttributes containing attributes corresponding to attributesTable
@@ -37630,8 +39237,7 @@ var ts;
*/
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.flags |= 33554432 /* JsxAttributes */ | 4194304 /* ContainsObjectLiteral */;
result.objectFlags |= 128 /* ObjectLiteral */;
return result;
}
@@ -37709,7 +39315,18 @@ var ts;
return unknownType;
}
}
- return getUnionType(ts.map(signatures, getReturnTypeOfSignature), /*subtypeReduction*/ true);
+ var instantiatedSignatures = [];
+ for (var _i = 0, signatures_3 = signatures; _i < signatures_3.length; _i++) {
+ var signature = signatures_3[_i];
+ if (signature.typeParameters) {
+ var typeArguments = fillMissingTypeArguments(/*typeArguments*/ undefined, signature.typeParameters, /*minTypeArgumentCount*/ 0);
+ instantiatedSignatures.push(getSignatureInstantiation(signature, typeArguments));
+ }
+ else {
+ instantiatedSignatures.push(signature);
+ }
+ }
+ return getUnionType(ts.map(instantiatedSignatures, getReturnTypeOfSignature), /*subtypeReduction*/ true);
}
/**
* Look into JSX namespace and then look for container with matching name as nameOfAttribPropContainer.
@@ -37761,6 +39378,20 @@ var ts;
}
return _jsxElementChildrenPropertyName;
}
+ function getApparentTypeOfJsxPropsType(propsType) {
+ if (!propsType) {
+ return undefined;
+ }
+ if (propsType.flags & 131072 /* Intersection */) {
+ var propsApparentType = [];
+ for (var _i = 0, _a = propsType.types; _i < _a.length; _i++) {
+ var t = _a[_i];
+ propsApparentType.push(getApparentType(t));
+ }
+ return getIntersectionType(propsApparentType);
+ }
+ return getApparentType(propsType);
+ }
/**
* Get JSX attributes type by trying to resolve openingLikeElement as a stateless function component.
* Return only attributes type of successfully resolved call signature.
@@ -37781,6 +39412,7 @@ var ts;
if (callSignature !== unknownSignature) {
var callReturnType = callSignature && getReturnTypeOfSignature(callSignature);
var paramType = callReturnType && (callSignature.parameters.length === 0 ? emptyObjectType : getTypeOfSymbol(callSignature.parameters[0]));
+ paramType = getApparentTypeOfJsxPropsType(paramType);
if (callReturnType && isTypeAssignableTo(callReturnType, jsxStatelessElementType)) {
// Intersect in JSX.IntrinsicAttributes if it exists
var intrinsicAttributes = getJsxType(JsxNames.IntrinsicAttributes);
@@ -37819,6 +39451,7 @@ var ts;
var candidate = candidatesOutArray_1[_i];
var callReturnType = getReturnTypeOfSignature(candidate);
var paramType = callReturnType && (candidate.parameters.length === 0 ? emptyObjectType : getTypeOfSymbol(candidate.parameters[0]));
+ paramType = getApparentTypeOfJsxPropsType(paramType);
if (callReturnType && isTypeAssignableTo(callReturnType, jsxStatelessElementType)) {
var shouldBeCandidate = true;
for (var _a = 0, _b = openingLikeElement.attributes.properties; _a < _b.length; _a++) {
@@ -37888,7 +39521,7 @@ var ts;
// <CustomTag> Hello World </CustomTag>
var intrinsicElementsType = getJsxType(JsxNames.IntrinsicElements);
if (intrinsicElementsType !== unknownType) {
- var stringLiteralTypeName = elementType.text;
+ var stringLiteralTypeName = elementType.value;
var intrinsicProp = getPropertyOfType(intrinsicElementsType, stringLiteralTypeName);
if (intrinsicProp) {
return getTypeOfSymbol(intrinsicProp);
@@ -38079,7 +39712,7 @@ var ts;
checkJsxPreconditions(node);
// The reactNamespace/jsxFactory's root symbol should be marked as 'used' so we don't incorrectly elide its import.
// And if there is no reactNamespace/jsxFactory's symbol in scope when targeting React emit, we should issue an error.
- var reactRefErr = compilerOptions.jsx === 2 /* React */ ? ts.Diagnostics.Cannot_find_name_0 : undefined;
+ var reactRefErr = diagnostics && compilerOptions.jsx === 2 /* React */ ? ts.Diagnostics.Cannot_find_name_0 : undefined;
var reactNamespace = getJsxNamespace();
var reactSym = resolveName(node.tagName, reactNamespace, 107455 /* Value */, reactRefErr, reactNamespace);
if (reactSym) {
@@ -38094,6 +39727,40 @@ var ts;
checkJsxAttributesAssignableToTagNameAttributes(node);
}
/**
+ * Check if a property with the given name is known anywhere in the given type. In an object type, a property
+ * is considered known if
+ * 1. the object type is empty and the check is for assignability, or
+ * 2. if the object type has index signatures, or
+ * 3. if the property is actually declared in the object type
+ * (this means that 'toString', for example, is not usually a known property).
+ * 4. In a union or intersection type,
+ * a property is considered known if it is known in any constituent type.
+ * @param targetType a type to search a given name in
+ * @param name a property name to search
+ * @param isComparingJsxAttributes a boolean flag indicating whether we are searching in JsxAttributesType
+ */
+ function isKnownProperty(targetType, name, isComparingJsxAttributes) {
+ if (targetType.flags & 32768 /* Object */) {
+ var resolved = resolveStructuredTypeMembers(targetType);
+ if (resolved.stringIndexInfo ||
+ resolved.numberIndexInfo && isNumericLiteralName(name) ||
+ getPropertyOfObjectType(targetType, name) ||
+ isComparingJsxAttributes && !isUnhyphenatedJsxName(name)) {
+ // For JSXAttributes, if the attribute has a hyphenated name, consider that the attribute to be known.
+ return true;
+ }
+ }
+ else if (targetType.flags & 196608 /* UnionOrIntersection */) {
+ for (var _i = 0, _a = targetType.types; _i < _a.length; _i++) {
+ var t = _a[_i];
+ if (isKnownProperty(t, name, isComparingJsxAttributes)) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+ /**
* 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"
@@ -38121,7 +39788,20 @@ var ts;
error(openingLikeElement, ts.Diagnostics.JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property, getJsxElementPropertiesName());
}
else {
- checkTypeAssignableTo(sourceAttributesType, targetAttributesType, openingLikeElement.attributes.properties.length > 0 ? openingLikeElement.attributes : openingLikeElement);
+ // Check if sourceAttributesType assignable to targetAttributesType though this check will allow excess properties
+ var isSourceAttributeTypeAssignableToTarget = checkTypeAssignableTo(sourceAttributesType, targetAttributesType, openingLikeElement.attributes.properties.length > 0 ? openingLikeElement.attributes : openingLikeElement);
+ // After we check for assignability, we will do another pass to check that all explicitly specified attributes have correct name corresponding in targetAttributeType.
+ // This will allow excess properties in spread type as it is very common pattern to spread outter attributes into React component in its render method.
+ if (isSourceAttributeTypeAssignableToTarget && !isTypeAny(sourceAttributesType) && !isTypeAny(targetAttributesType)) {
+ for (var _i = 0, _a = openingLikeElement.attributes.properties; _i < _a.length; _i++) {
+ var attribute = _a[_i];
+ if (ts.isJsxAttribute(attribute) && !isKnownProperty(targetAttributesType, attribute.name.text, /*isComparingJsxAttributes*/ true)) {
+ error(attribute, ts.Diagnostics.Property_0_does_not_exist_on_type_1, attribute.name.text, typeToString(targetAttributesType));
+ // We break here so that errors won't be cascading
+ break;
+ }
+ }
+ }
}
}
function checkJsxExpression(node, checkMode) {
@@ -38141,29 +39821,11 @@ var ts;
function getDeclarationKindFromSymbol(s) {
return s.valueDeclaration ? s.valueDeclaration.kind : 149 /* PropertyDeclaration */;
}
- function getDeclarationModifierFlagsFromSymbol(s) {
- 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 */);
+ return !!(symbol.flags & 8192 /* Method */ || ts.getCheckFlags(symbol) & 4 /* SyntheticMethod */);
}
/**
* Check whether the requested property access is valid.
@@ -38174,11 +39836,11 @@ var ts;
* @param prop The symbol for the right hand side of the property access.
*/
function checkPropertyAccessibility(node, left, type, prop) {
- var flags = getDeclarationModifierFlagsFromSymbol(prop);
+ var flags = ts.getDeclarationModifierFlagsFromSymbol(prop);
var errorNode = node.kind === 179 /* PropertyAccessExpression */ || node.kind === 226 /* VariableDeclaration */ ?
node.name :
node.right;
- if (getCheckFlags(prop) & 256 /* ContainsPrivate */) {
+ if (ts.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;
@@ -38276,42 +39938,6 @@ var ts;
function checkQualifiedName(node) {
return checkPropertyAccessExpressionOrQualifiedName(node, node.left, node.right);
}
- function reportNonexistentProperty(propNode, containingType) {
- var errorInfo;
- if (containingType.flags & 65536 /* Union */ && !(containingType.flags & 8190 /* Primitive */)) {
- for (var _i = 0, _a = containingType.types; _i < _a.length; _i++) {
- var subtype = _a[_i];
- if (!getPropertyOfType(subtype, propNode.text)) {
- errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.Property_0_does_not_exist_on_type_1, ts.declarationNameToString(propNode), typeToString(subtype));
- break;
- }
- }
- }
- errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.Property_0_does_not_exist_on_type_1, ts.declarationNameToString(propNode), typeToString(containingType));
- diagnostics.add(ts.createDiagnosticForNodeFromMessageChain(propNode, errorInfo));
- }
- function markPropertyAsReferenced(prop) {
- if (prop &&
- noUnusedIdentifiers &&
- (prop.flags & 106500 /* ClassMember */) &&
- prop.valueDeclaration && (ts.getModifierFlags(prop.valueDeclaration) & 8 /* Private */)) {
- if (getCheckFlags(prop) & 1 /* Instantiated */) {
- getSymbolLinks(prop).target.isReferenced = true;
- }
- else {
- prop.isReferenced = true;
- }
- }
- }
- function isInPropertyInitializer(node) {
- while (node) {
- if (node.parent && node.parent.kind === 149 /* 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) {
@@ -38348,7 +39974,7 @@ var ts;
markPropertyAsReferenced(prop);
getNodeLinks(node).resolvedSymbol = prop;
checkPropertyAccessibility(node, left, apparentType, prop);
- var propType = getTypeOfSymbol(prop);
+ var propType = getDeclaredOrApparentType(prop, node);
var assignmentKind = ts.getAssignmentTargetKind(node);
if (assignmentKind) {
if (isReferenceToReadonlyEntity(node, prop) || isReferenceThroughNamespaceImport(node)) {
@@ -38367,16 +39993,153 @@ var ts;
var flowType = getFlowTypeOfReference(node, propType);
return assignmentKind ? getBaseTypeOfLiteralType(flowType) : flowType;
}
+ function reportNonexistentProperty(propNode, containingType) {
+ var errorInfo;
+ if (containingType.flags & 65536 /* Union */ && !(containingType.flags & 8190 /* Primitive */)) {
+ for (var _i = 0, _a = containingType.types; _i < _a.length; _i++) {
+ var subtype = _a[_i];
+ if (!getPropertyOfType(subtype, propNode.text)) {
+ errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.Property_0_does_not_exist_on_type_1, ts.declarationNameToString(propNode), typeToString(subtype));
+ break;
+ }
+ }
+ }
+ var suggestion = getSuggestionForNonexistentProperty(propNode, containingType);
+ if (suggestion) {
+ errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2, ts.declarationNameToString(propNode), typeToString(containingType), suggestion);
+ }
+ else {
+ errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.Property_0_does_not_exist_on_type_1, ts.declarationNameToString(propNode), typeToString(containingType));
+ }
+ diagnostics.add(ts.createDiagnosticForNodeFromMessageChain(propNode, errorInfo));
+ }
+ function getSuggestionForNonexistentProperty(node, containingType) {
+ var suggestion = getSpellingSuggestionForName(node.text, getPropertiesOfObjectType(containingType), 107455 /* Value */);
+ return suggestion && suggestion.name;
+ }
+ function getSuggestionForNonexistentSymbol(location, name, meaning) {
+ var result = resolveNameHelper(location, name, meaning, /*nameNotFoundMessage*/ undefined, name, function (symbols, name, meaning) {
+ var symbol = getSymbol(symbols, name, meaning);
+ if (symbol) {
+ // Sometimes the symbol is found when location is a return type of a function: `typeof x` and `x` is declared in the body of the function
+ // So the table *contains* `x` but `x` isn't actually in scope.
+ // However, resolveNameHelper will continue and call this callback again, so we'll eventually get a correct suggestion.
+ return symbol;
+ }
+ return getSpellingSuggestionForName(name, ts.arrayFrom(symbols.values()), meaning);
+ });
+ if (result) {
+ return result.name;
+ }
+ }
+ /**
+ * Given a name and a list of symbols whose names are *not* equal to the name, return a spelling suggestion if there is one that is close enough.
+ * Names less than length 3 only check for case-insensitive equality, not levenshtein distance.
+ *
+ * If there is a candidate that's the same except for case, return that.
+ * If there is a candidate that's within one edit of the name, return that.
+ * Otherwise, return the candidate with the smallest Levenshtein distance,
+ * except for candidates:
+ * * With no name
+ * * Whose meaning doesn't match the `meaning` parameter.
+ * * Whose length differs from the target name by more than 0.3 of the length of the name.
+ * * Whose levenshtein distance is more than 0.4 of the length of the name
+ * (0.4 allows 1 substitution/transposition for every 5 characters,
+ * and 1 insertion/deletion at 3 characters)
+ * Names longer than 30 characters don't get suggestions because Levenshtein distance is an n**2 algorithm.
+ */
+ function getSpellingSuggestionForName(name, symbols, meaning) {
+ var worstDistance = name.length * 0.4;
+ var maximumLengthDifference = Math.min(3, name.length * 0.34);
+ var bestDistance = Number.MAX_VALUE;
+ var bestCandidate = undefined;
+ var justCheckExactMatches = false;
+ if (name.length > 30) {
+ return undefined;
+ }
+ name = name.toLowerCase();
+ for (var _i = 0, symbols_3 = symbols; _i < symbols_3.length; _i++) {
+ var candidate = symbols_3[_i];
+ if (candidate.flags & meaning &&
+ candidate.name &&
+ Math.abs(candidate.name.length - name.length) < maximumLengthDifference) {
+ var candidateName = candidate.name.toLowerCase();
+ if (candidateName === name) {
+ return candidate;
+ }
+ if (justCheckExactMatches) {
+ continue;
+ }
+ if (candidateName.length < 3 ||
+ name.length < 3 ||
+ candidateName === "eval" ||
+ candidateName === "intl" ||
+ candidateName === "undefined" ||
+ candidateName === "map" ||
+ candidateName === "nan" ||
+ candidateName === "set") {
+ continue;
+ }
+ var distance = ts.levenshtein(name, candidateName);
+ if (distance > worstDistance) {
+ continue;
+ }
+ if (distance < 3) {
+ justCheckExactMatches = true;
+ bestCandidate = candidate;
+ }
+ else if (distance < bestDistance) {
+ bestDistance = distance;
+ bestCandidate = candidate;
+ }
+ }
+ }
+ return bestCandidate;
+ }
+ function markPropertyAsReferenced(prop) {
+ if (prop &&
+ noUnusedIdentifiers &&
+ (prop.flags & 106500 /* ClassMember */) &&
+ prop.valueDeclaration && (ts.getModifierFlags(prop.valueDeclaration) & 8 /* Private */)) {
+ if (ts.getCheckFlags(prop) & 1 /* Instantiated */) {
+ getSymbolLinks(prop).target.isReferenced = true;
+ }
+ else {
+ prop.isReferenced = true;
+ }
+ }
+ }
+ function isInPropertyInitializer(node) {
+ while (node) {
+ if (node.parent && node.parent.kind === 149 /* PropertyDeclaration */ && node.parent.initializer === node) {
+ return true;
+ }
+ node = node.parent;
+ }
+ return false;
+ }
function isValidPropertyAccess(node, propertyName) {
var left = node.kind === 179 /* PropertyAccessExpression */
? node.expression
: node.left;
- var type = checkExpression(left);
+ return isValidPropertyAccessWithType(node, left, propertyName, getWidenedType(checkExpression(left)));
+ }
+ function isValidPropertyAccessWithType(node, left, propertyName, type) {
if (type !== unknownType && !isTypeAny(type)) {
- var prop = getPropertyOfType(getWidenedType(type), propertyName);
+ var prop = getPropertyOfType(type, propertyName);
if (prop) {
return checkPropertyAccessibility(node, left, type, prop);
}
+ // In js files properties of unions are allowed in completion
+ if (ts.isInJavaScriptFile(left) && (type.flags & 65536 /* Union */)) {
+ for (var _i = 0, _a = type.types; _i < _a.length; _i++) {
+ var elementType = _a[_i];
+ if (isValidPropertyAccessWithType(node, left, propertyName, elementType)) {
+ return true;
+ }
+ }
+ }
+ return false;
}
return true;
}
@@ -38489,7 +40252,16 @@ var ts;
}
return true;
}
+ function callLikeExpressionMayHaveTypeArguments(node) {
+ // TODO: Also include tagged templates (https://github.com/Microsoft/TypeScript/issues/11947)
+ return ts.isCallOrNewExpression(node);
+ }
function resolveUntypedCall(node) {
+ if (callLikeExpressionMayHaveTypeArguments(node)) {
+ // Check type arguments even though we will give an error that untyped calls may not accept type arguments.
+ // This gets us diagnostics for the type arguments and marks them as referenced.
+ ts.forEach(node.typeArguments, checkSourceElement);
+ }
if (node.kind === 183 /* TaggedTemplateExpression */) {
checkExpression(node.template);
}
@@ -38520,8 +40292,8 @@ var ts;
var specializedIndex = -1;
var spliceIndex;
ts.Debug.assert(!result.length);
- for (var _i = 0, signatures_3 = signatures; _i < signatures_3.length; _i++) {
- var signature = signatures_3[_i];
+ for (var _i = 0, signatures_4 = signatures; _i < signatures_4.length; _i++) {
+ var signature = signatures_4[_i];
var symbol = signature.declaration && getSymbolOfNode(signature.declaration);
var parent = signature.declaration && signature.declaration.parent;
if (!lastSymbol || symbol === lastSymbol) {
@@ -38629,7 +40401,7 @@ var ts;
// If spread arguments are present, check that they correspond to a rest parameter. If so, no
// further checking is necessary.
if (spreadArgIndex >= 0) {
- return isRestParameterIndex(signature, spreadArgIndex);
+ return isRestParameterIndex(signature, spreadArgIndex) || spreadArgIndex >= signature.minArgumentCount;
}
// Too many arguments implies incorrect arity.
if (!signature.hasRestParameter && argCount > signature.parameters.length) {
@@ -38652,41 +40424,60 @@ 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, /*useAnyForNoInferences*/ false);
+ var context = createInferenceContext(signature, 1 /* InferUnionTypes */);
forEachMatchingParameterType(contextualSignature, signature, function (source, target) {
// Type parameters from outer context referenced by source type are fixed by instantiation of the source type
- inferTypesWithContext(context, instantiateType(source, contextualMapper), target);
+ inferTypes(context.inferences, instantiateType(source, contextualMapper || identityMapper), target);
});
+ if (!contextualMapper) {
+ inferTypes(context.inferences, getReturnTypeOfSignature(contextualSignature), getReturnTypeOfSignature(signature), 4 /* ReturnType */);
+ }
return getSignatureInstantiation(signature, getInferredTypes(context));
}
function inferTypeArguments(node, signature, args, excludeArgument, context) {
- var typeParameters = signature.typeParameters;
- var inferenceMapper = getInferenceMapper(context);
+ var inferences = context.inferences;
// Clear out all the inference results from the last time inferTypeArguments was called on this context
- for (var i = 0; i < typeParameters.length; i++) {
+ for (var i = 0; i < inferences.length; i++) {
// As an optimization, we don't have to clear (and later recompute) inferred types
// for type parameters that have already been fixed on the previous call to inferTypeArguments.
// It would be just as correct to reset all of them. But then we'd be repeating the same work
// for the type parameters that were fixed, namely the work done by getInferredType.
- if (!context.inferences[i].isFixed) {
- context.inferredTypes[i] = undefined;
+ if (!inferences[i].isFixed) {
+ inferences[i].inferredType = undefined;
}
}
- // On this call to inferTypeArguments, we may get more inferences for certain type parameters that were not
- // fixed last time. This means that a type parameter that failed inference last time may succeed this time,
- // or vice versa. Therefore, the failedTypeParameterIndex is useless if it points to an unfixed type parameter,
- // because it may change. So here we reset it. However, getInferredType will not revisit any type parameters
- // that were previously fixed. So if a fixed type parameter failed previously, it will fail again because
- // it will contain the exact same set of inferences. So if we reset the index from a fixed type parameter,
- // we will lose information that we won't recover this time around.
- if (context.failedTypeParameterIndex !== undefined && !context.inferences[context.failedTypeParameterIndex].isFixed) {
- context.failedTypeParameterIndex = undefined;
+ // If a contextual type is available, infer from that type to the return type of the call expression. For
+ // example, given a 'function wrap<T, U>(cb: (x: T) => U): (x: T) => U' and a call expression
+ // 'let f: (x: string) => number = wrap(s => s.length)', we infer from the declared type of 'f' to the
+ // return type of 'wrap'.
+ if (ts.isExpression(node)) {
+ var contextualType = getContextualType(node);
+ if (contextualType) {
+ // We clone the contextual mapper to avoid disturbing a resolution in progress for an
+ // outer call expression. Effectively we just want a snapshot of whatever has been
+ // inferred for any outer call expression so far.
+ var instantiatedType = instantiateType(contextualType, cloneTypeMapper(getContextualMapper(node)));
+ // If the contextual type is a generic function type with a single call signature, we
+ // instantiate the type with its own type parameters and type arguments. This ensures that
+ // the type parameters are not erased to type any during type inference such that they can
+ // be inferred as actual types from the contextual type. For example:
+ // declare function arrayMap<T, U>(f: (x: T) => U): (a: T[]) => U[];
+ // const boxElements: <A>(a: A[]) => { value: A }[] = arrayMap(value => ({ value }));
+ // Above, the type of the 'value' parameter is inferred to be 'A'.
+ var contextualSignature = getSingleCallSignature(instantiatedType);
+ var inferenceSourceType = contextualSignature && contextualSignature.typeParameters ?
+ getOrCreateTypeFromSignature(getSignatureInstantiation(contextualSignature, contextualSignature.typeParameters)) :
+ instantiatedType;
+ var inferenceTargetType = getReturnTypeOfSignature(signature);
+ // Inferences made from return types have lower priority than all other inferences.
+ inferTypes(context.inferences, inferenceSourceType, inferenceTargetType, 4 /* ReturnType */);
+ }
}
var thisType = getThisTypeOfSignature(signature);
if (thisType) {
var thisArgumentNode = getThisArgumentOfCall(node);
var thisArgumentType = thisArgumentNode ? checkExpression(thisArgumentNode) : voidType;
- inferTypesWithContext(context, thisArgumentType, thisType);
+ inferTypes(context.inferences, 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.
@@ -38702,10 +40493,10 @@ var ts;
if (argType === undefined) {
// For context sensitive arguments we pass the identityMapper, which is a signal to treat all
// context sensitive function expressions as wildcards
- var mapper = excludeArgument && excludeArgument[i] !== undefined ? identityMapper : inferenceMapper;
+ var mapper = excludeArgument && excludeArgument[i] !== undefined ? identityMapper : context;
argType = checkExpressionWithContextualType(arg, paramType, mapper);
}
- inferTypesWithContext(context, argType, paramType);
+ inferTypes(context.inferences, argType, paramType);
}
}
// In the second pass we visit only context sensitive arguments, and only those that aren't excluded, this
@@ -38719,11 +40510,11 @@ var ts;
if (excludeArgument[i] === false) {
var arg = args[i];
var paramType = getTypeAtPosition(signature, i);
- inferTypesWithContext(context, checkExpressionWithContextualType(arg, paramType, inferenceMapper), paramType);
+ inferTypes(context.inferences, checkExpressionWithContextualType(arg, paramType, context), paramType);
}
}
}
- getInferredTypes(context);
+ return getInferredTypes(context);
}
function checkTypeArguments(signature, typeArgumentNodes, typeArgumentTypes, reportErrors, headMessage) {
var typeParameters = signature.typeParameters;
@@ -39000,7 +40791,7 @@ var ts;
case 71 /* Identifier */:
case 8 /* NumericLiteral */:
case 9 /* StringLiteral */:
- return getLiteralTypeForText(32 /* StringLiteral */, element.name.text);
+ return getLiteralType(element.name.text);
case 144 /* ComputedPropertyName */:
var nameType = checkComputedPropertyName(element.name);
if (isTypeOfKind(nameType, 512 /* ESSymbol */)) {
@@ -39110,7 +40901,7 @@ var ts;
return arg;
}
}
- function resolveCall(node, signatures, candidatesOutArray, headMessage) {
+ function resolveCall(node, signatures, candidatesOutArray, fallbackError) {
var isTaggedTemplate = node.kind === 183 /* TaggedTemplateExpression */;
var isDecorator = node.kind === 147 /* Decorator */;
var isJsxOpeningOrSelfClosingElement = ts.isJsxOpeningLikeElement(node);
@@ -39122,25 +40913,11 @@ var ts;
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);
if (!candidates.length) {
- reportError(ts.Diagnostics.Supplied_parameters_do_not_match_any_signature_of_call_target);
+ diagnostics.add(ts.createDiagnosticForNode(node, ts.Diagnostics.Call_target_does_not_contain_any_signatures));
return resolveErrorCall(node);
}
var args = getEffectiveCallArguments(node);
@@ -39178,9 +40955,9 @@ var ts;
// was fine. So if there is any overload that is only incorrect because of an
// argument, we will report an error on that one.
//
- // function foo(s: string) {}
- // function foo(n: number) {} // Report argument error on this overload
- // function foo() {}
+ // function foo(s: string): void;
+ // function foo(n: number): void; // Report argument error on this overload
+ // function foo(): void;
// foo(true);
//
// If none of the overloads even made it that far, there are two possibilities.
@@ -39188,13 +40965,12 @@ var ts;
// report an error on that. Or none of the overloads even had correct arity,
// in which case give an arity error.
//
- // function foo<T>(x: T, y: T) {} // Report type argument inference error
- // function foo() {}
- // foo(0, true);
+ // function foo<T extends string>(x: T): void; // Report type argument error
+ // function foo(): void;
+ // foo<number>(0);
//
var candidateForArgumentError;
var candidateForTypeArgumentError;
- var resultOfFailedInference;
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.
@@ -39213,10 +40989,6 @@ var ts;
result = chooseOverload(candidates, subtypeRelation, signatureHelpTrailingComma);
}
if (!result) {
- // Reinitialize these pointers for round two
- candidateForArgumentError = undefined;
- candidateForTypeArgumentError = undefined;
- resultOfFailedInference = undefined;
result = chooseOverload(candidates, assignableRelation, signatureHelpTrailingComma);
}
if (result) {
@@ -39239,24 +41011,42 @@ var ts;
checkApplicableSignature(node, args, candidateForArgumentError, assignableRelation, /*excludeArgument*/ undefined, /*reportErrors*/ true);
}
else if (candidateForTypeArgumentError) {
- if (!isTaggedTemplate && !isDecorator && typeArguments) {
- var typeArguments_2 = node.typeArguments;
- checkTypeArguments(candidateForTypeArgumentError, typeArguments_2, ts.map(typeArguments_2, getTypeFromTypeNode), /*reportErrors*/ true, headMessage);
- }
- else {
- ts.Debug.assert(resultOfFailedInference.failedTypeParameterIndex >= 0);
- var failedTypeParameter = candidateForTypeArgumentError.typeParameters[resultOfFailedInference.failedTypeParameterIndex];
- var inferenceCandidates = getInferenceCandidates(resultOfFailedInference, resultOfFailedInference.failedTypeParameterIndex);
- var diagnosticChainHead = ts.chainDiagnosticMessages(/*details*/ undefined, // details will be provided by call to reportNoCommonSupertypeError
- ts.Diagnostics.The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_type_arguments_explicitly, typeToString(failedTypeParameter));
- if (headMessage) {
- diagnosticChainHead = ts.chainDiagnosticMessages(diagnosticChainHead, headMessage);
- }
- reportNoCommonSupertypeError(inferenceCandidates, node.tagName || node.expression || node.tag, diagnosticChainHead);
- }
- }
- else {
- reportError(ts.Diagnostics.Supplied_parameters_do_not_match_any_signature_of_call_target);
+ var typeArguments_1 = node.typeArguments;
+ checkTypeArguments(candidateForTypeArgumentError, typeArguments_1, ts.map(typeArguments_1, getTypeFromTypeNode), /*reportErrors*/ true, fallbackError);
+ }
+ else if (typeArguments && ts.every(signatures, function (sig) { return ts.length(sig.typeParameters) !== typeArguments.length; })) {
+ var min = Number.POSITIVE_INFINITY;
+ var max = Number.NEGATIVE_INFINITY;
+ for (var _i = 0, signatures_5 = signatures; _i < signatures_5.length; _i++) {
+ var sig = signatures_5[_i];
+ min = Math.min(min, getMinTypeArgumentCount(sig.typeParameters));
+ max = Math.max(max, ts.length(sig.typeParameters));
+ }
+ var paramCount = min < max ? min + "-" + max : min;
+ diagnostics.add(ts.createDiagnosticForNode(node, ts.Diagnostics.Expected_0_type_arguments_but_got_1, paramCount, typeArguments.length));
+ }
+ else if (args) {
+ var min = Number.POSITIVE_INFINITY;
+ var max = Number.NEGATIVE_INFINITY;
+ for (var _a = 0, signatures_6 = signatures; _a < signatures_6.length; _a++) {
+ var sig = signatures_6[_a];
+ min = Math.min(min, sig.minArgumentCount);
+ max = Math.max(max, sig.parameters.length);
+ }
+ var hasRestParameter_1 = ts.some(signatures, function (sig) { return sig.hasRestParameter; });
+ var hasSpreadArgument = getSpreadArgumentIndex(args) > -1;
+ var paramCount = hasRestParameter_1 ? min :
+ min < max ? min + "-" + max :
+ min;
+ var argCount = args.length - (hasSpreadArgument ? 1 : 0);
+ var error_1 = hasRestParameter_1 && hasSpreadArgument ? ts.Diagnostics.Expected_at_least_0_arguments_but_got_a_minimum_of_1 :
+ hasRestParameter_1 ? ts.Diagnostics.Expected_at_least_0_arguments_but_got_1 :
+ hasSpreadArgument ? ts.Diagnostics.Expected_0_arguments_but_got_a_minimum_of_1 :
+ ts.Diagnostics.Expected_0_arguments_but_got_1;
+ diagnostics.add(ts.createDiagnosticForNode(node, error_1, paramCount, argCount));
+ }
+ else if (fallbackError) {
+ diagnostics.add(ts.createDiagnosticForNode(node, fallbackError));
}
// No signature was applicable. We have already reported the errors for the invalid signature.
// If this is a type resolution session, e.g. Language Service, try to get better information that anySignature.
@@ -39264,8 +41054,8 @@ var ts;
// declare function f(a: { xa: number; xb: number; });
// f({ |
if (!produceDiagnostics) {
- for (var _i = 0, candidates_1 = candidates; _i < candidates_1.length; _i++) {
- var candidate = candidates_1[_i];
+ for (var _b = 0, candidates_1 = candidates; _b < candidates_1.length; _b++) {
+ var candidate = candidates_1[_b];
if (hasCorrectArity(node, args, candidate)) {
if (candidate.typeParameters && typeArguments) {
candidate = getSignatureInstantiation(candidate, ts.map(typeArguments, getTypeFromTypeNode));
@@ -39275,45 +41065,37 @@ var ts;
}
}
return resolveErrorCall(node);
- function reportError(message, arg0, arg1, arg2) {
- var errorInfo;
- errorInfo = ts.chainDiagnosticMessages(errorInfo, message, arg0, arg1, arg2);
- if (headMessage) {
- errorInfo = ts.chainDiagnosticMessages(errorInfo, headMessage);
- }
- diagnostics.add(ts.createDiagnosticForNodeFromMessageChain(node, errorInfo));
- }
function chooseOverload(candidates, relation, signatureHelpTrailingComma) {
if (signatureHelpTrailingComma === void 0) { signatureHelpTrailingComma = false; }
+ candidateForArgumentError = undefined;
+ candidateForTypeArgumentError = undefined;
for (var _i = 0, candidates_2 = candidates; _i < candidates_2.length; _i++) {
var originalCandidate = candidates_2[_i];
if (!hasCorrectArity(node, args, originalCandidate, signatureHelpTrailingComma)) {
continue;
}
var candidate = void 0;
- var typeArgumentsAreValid = void 0;
- var inferenceContext = originalCandidate.typeParameters
- ? createInferenceContext(originalCandidate, /*inferUnionTypes*/ false, /*useAnyForNoInferences*/ ts.isInJavaScriptFile(node))
- : undefined;
+ var inferenceContext = originalCandidate.typeParameters ?
+ createInferenceContext(originalCandidate, /*flags*/ ts.isInJavaScriptFile(node) ? 4 /* AnyDefault */ : 0) :
+ undefined;
while (true) {
candidate = originalCandidate;
if (candidate.typeParameters) {
var typeArgumentTypes = void 0;
if (typeArguments) {
typeArgumentTypes = fillMissingTypeArguments(ts.map(typeArguments, getTypeFromTypeNode), candidate.typeParameters, getMinTypeArgumentCount(candidate.typeParameters));
- typeArgumentsAreValid = checkTypeArguments(candidate, typeArguments, typeArgumentTypes, /*reportErrors*/ false);
+ if (!checkTypeArguments(candidate, typeArguments, typeArgumentTypes, /*reportErrors*/ false)) {
+ candidateForTypeArgumentError = originalCandidate;
+ break;
+ }
}
else {
- inferTypeArguments(node, candidate, args, excludeArgument, inferenceContext);
- typeArgumentTypes = inferenceContext.inferredTypes;
- typeArgumentsAreValid = inferenceContext.failedTypeParameterIndex === undefined;
- }
- if (!typeArgumentsAreValid) {
- break;
+ typeArgumentTypes = inferTypeArguments(node, candidate, args, excludeArgument, inferenceContext);
}
candidate = getSignatureInstantiation(candidate, typeArgumentTypes);
}
if (!checkApplicableSignature(node, args, candidate, relation, excludeArgument, /*reportErrors*/ false)) {
+ candidateForArgumentError = candidate;
break;
}
var index = excludeArgument ? ts.indexOf(excludeArgument, /*value*/ true) : -1;
@@ -39322,27 +41104,6 @@ var ts;
}
excludeArgument[index] = false;
}
- // A post-mortem of this iteration of the loop. The signature was not applicable,
- // so we want to track it as a candidate for reporting an error. If the candidate
- // had no type parameters, or had no issues related to type arguments, we can
- // report an error based on the arguments. If there was an issue with type
- // arguments, then we can only report an error based on the type arguments.
- if (originalCandidate.typeParameters) {
- var instantiatedCandidate = candidate;
- if (typeArgumentsAreValid) {
- candidateForArgumentError = instantiatedCandidate;
- }
- else {
- candidateForTypeArgumentError = originalCandidate;
- if (!typeArguments) {
- resultOfFailedInference = inferenceContext;
- }
- }
- }
- else {
- ts.Debug.assert(originalCandidate === candidate);
- candidateForArgumentError = originalCandidate;
- }
}
return undefined;
}
@@ -39450,7 +41211,7 @@ var ts;
// only the class declaration node will have the Abstract flag set.
var valueDecl = expressionType.symbol && getClassLikeDeclarationOfSymbol(expressionType.symbol);
if (valueDecl && ts.getModifierFlags(valueDecl) & 128 /* Abstract */) {
- error(node, ts.Diagnostics.Cannot_create_an_instance_of_the_abstract_class_0, ts.declarationNameToString(valueDecl.name));
+ error(node, ts.Diagnostics.Cannot_create_an_instance_of_the_abstract_class_0, ts.declarationNameToString(ts.getNameOfDeclaration(valueDecl)));
return resolveErrorCall(node);
}
// TS 1.0 spec: 4.11
@@ -39480,7 +41241,7 @@ var ts;
var callSignatures = getSignaturesOfType(expressionType, 0 /* Call */);
if (callSignatures.length) {
var signature = resolveCall(node, callSignatures, candidatesOutArray);
- if (getReturnTypeOfSignature(signature) !== voidType) {
+ if (!isJavaScriptConstructor(signature.declaration) && getReturnTypeOfSignature(signature) !== voidType) {
error(node, ts.Diagnostics.Only_a_void_function_can_be_called_with_the_new_keyword);
}
if (getThisTypeOfSignature(signature) === voidType) {
@@ -39617,8 +41378,8 @@ var ts;
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];
+ for (var _i = 0, types_16 = types; _i < types_16.length; _i++) {
+ var type = types_16[_i];
result = result || resolveStatelessJsxOpeningLikeElement(openingLikeElement, type, candidatesOutArray);
}
return result;
@@ -39678,13 +41439,35 @@ var ts;
// that could cause infinite recursion. Instead, return anySignature.
return getNodeLinks(node).resolvedSignature === resolvingSignature ? resolvingSignature : getResolvedSignature(node);
}
+ /**
+ * Indicates whether a declaration can be treated as a constructor in a JavaScript
+ * file.
+ */
+ function isJavaScriptConstructor(node) {
+ if (ts.isInJavaScriptFile(node)) {
+ // If the node has a @class tag, treat it like a constructor.
+ if (ts.getJSDocClassTag(node))
+ return true;
+ // If the symbol of the node has members, treat it like a constructor.
+ var symbol = ts.isFunctionDeclaration(node) || ts.isFunctionExpression(node) ? getSymbolOfNode(node) :
+ ts.isVariableDeclaration(node) && ts.isFunctionExpression(node.initializer) ? getSymbolOfNode(node.initializer) :
+ undefined;
+ return symbol && symbol.members !== undefined;
+ }
+ return false;
+ }
function getInferredClassType(symbol) {
var links = getSymbolLinks(symbol);
if (!links.inferredClassType) {
- links.inferredClassType = createAnonymousType(symbol, symbol.members, emptyArray, emptyArray, /*stringIndexType*/ undefined, /*numberIndexType*/ undefined);
+ links.inferredClassType = createAnonymousType(symbol, symbol.members || emptySymbols, emptyArray, emptyArray, /*stringIndexType*/ undefined, /*numberIndexType*/ undefined);
}
return links.inferredClassType;
}
+ function isInferredClassType(type) {
+ return type.symbol
+ && getObjectFlags(type) & 16 /* Anonymous */
+ && getSymbolLinks(type.symbol).inferredClassType === type;
+ }
/**
* Syntactically and semantically checks a call or new expression.
* @param node The call/new expression to be checked.
@@ -39715,7 +41498,7 @@ var ts;
if (funcSymbol && ts.isDeclarationOfFunctionOrClassExpression(funcSymbol)) {
funcSymbol = getSymbolOfNode(funcSymbol.valueDeclaration.initializer);
}
- if (funcSymbol && funcSymbol.members && funcSymbol.flags & 16 /* Function */) {
+ if (funcSymbol && funcSymbol.flags & 16 /* Function */ && (funcSymbol.members || ts.getJSDocClassTag(funcSymbol.valueDeclaration))) {
return getInferredClassType(funcSymbol);
}
else if (noImplicitAny) {
@@ -39730,6 +41513,31 @@ var ts;
}
return getReturnTypeOfSignature(signature);
}
+ function checkImportCallExpression(node) {
+ // Check grammar of dynamic import
+ checkGrammarArguments(node, node.arguments) || checkGrammarImportCallExpression(node);
+ if (node.arguments.length === 0) {
+ return createPromiseReturnType(node, anyType);
+ }
+ var specifier = node.arguments[0];
+ var specifierType = checkExpressionCached(specifier);
+ // Even though multiple arugments is grammatically incorrect, type-check extra arguments for completion
+ for (var i = 1; i < node.arguments.length; ++i) {
+ checkExpressionCached(node.arguments[i]);
+ }
+ if (specifierType.flags & 2048 /* Undefined */ || specifierType.flags & 4096 /* Null */ || !isTypeAssignableTo(specifierType, stringType)) {
+ error(specifier, ts.Diagnostics.Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0, typeToString(specifierType));
+ }
+ // resolveExternalModuleName will return undefined if the moduleReferenceExpression is not a string literal
+ var moduleSymbol = resolveExternalModuleName(node, specifier);
+ if (moduleSymbol) {
+ var esModuleSymbol = resolveESModuleSymbol(moduleSymbol, specifier, /*dontRecursivelyResolve*/ true);
+ if (esModuleSymbol) {
+ return createPromiseReturnType(node, getTypeOfSymbol(esModuleSymbol));
+ }
+ }
+ return createPromiseReturnType(node, anyType);
+ }
function isCommonJsRequire(node) {
if (!ts.isRequireCall(node, /*checkArgumentIsStringLiteral*/ true)) {
return false;
@@ -39795,7 +41603,7 @@ var ts;
if (strictNullChecks) {
var declaration = symbol.valueDeclaration;
if (declaration && declaration.initializer) {
- return includeFalsyTypes(type, 2048 /* Undefined */);
+ return getNullableType(type, 2048 /* Undefined */);
}
}
return type;
@@ -39808,37 +41616,42 @@ var ts;
function getTypeOfFirstParameterOfSignature(signature) {
return signature.parameters.length > 0 ? getTypeAtPosition(signature, 0) : neverType;
}
- function assignContextualParameterTypes(signature, context, mapper, checkMode) {
+ function inferFromAnnotatedParameters(signature, context, mapper) {
var len = signature.parameters.length - (signature.hasRestParameter ? 1 : 0);
- if (checkMode === 2 /* Inferential */) {
- for (var i = 0; i < len; i++) {
- var declaration = signature.parameters[i].valueDeclaration;
- if (declaration.type) {
- inferTypesWithContext(mapper.context, getTypeFromTypeNode(declaration.type), getTypeAtPosition(context, i));
+ for (var i = 0; i < len; i++) {
+ var declaration = signature.parameters[i].valueDeclaration;
+ if (declaration.type) {
+ var typeNode = ts.getEffectiveTypeAnnotationNode(declaration);
+ if (typeNode) {
+ inferTypes(mapper.inferences, getTypeFromTypeNode(typeNode), getTypeAtPosition(context, i));
}
}
}
+ }
+ function assignContextualParameterTypes(signature, context) {
+ signature.typeParameters = context.typeParameters;
if (context.thisParameter) {
var parameter = signature.thisParameter;
if (!parameter || parameter.valueDeclaration && !parameter.valueDeclaration.type) {
if (!parameter) {
signature.thisParameter = createSymbolWithType(context.thisParameter, /*type*/ undefined);
}
- assignTypeToParameterAndFixTypeParameters(signature.thisParameter, getTypeOfSymbol(context.thisParameter), mapper, checkMode);
+ assignTypeToParameterAndFixTypeParameters(signature.thisParameter, getTypeOfSymbol(context.thisParameter));
}
}
+ var len = signature.parameters.length - (signature.hasRestParameter ? 1 : 0);
for (var i = 0; i < len; i++) {
var parameter = signature.parameters[i];
- if (!parameter.valueDeclaration.type) {
+ if (!ts.getEffectiveTypeAnnotationNode(parameter.valueDeclaration)) {
var contextualParameterType = getTypeAtPosition(context, i);
- assignTypeToParameterAndFixTypeParameters(parameter, contextualParameterType, mapper, checkMode);
+ assignTypeToParameterAndFixTypeParameters(parameter, contextualParameterType);
}
}
if (signature.hasRestParameter && isRestParameterIndex(context, signature.parameters.length - 1)) {
var parameter = ts.lastOrUndefined(signature.parameters);
- if (!parameter.valueDeclaration.type) {
+ if (!ts.getEffectiveTypeAnnotationNode(parameter.valueDeclaration)) {
var contextualParameterType = getTypeOfSymbol(ts.lastOrUndefined(context.parameters));
- assignTypeToParameterAndFixTypeParameters(parameter, contextualParameterType, mapper, checkMode);
+ assignTypeToParameterAndFixTypeParameters(parameter, contextualParameterType);
}
}
}
@@ -39857,57 +41670,18 @@ var ts;
}
}
}
- function assignTypeToParameterAndFixTypeParameters(parameter, contextualType, mapper, checkMode) {
+ function assignTypeToParameterAndFixTypeParameters(parameter, contextualType) {
var links = getSymbolLinks(parameter);
if (!links.type) {
- links.type = instantiateType(contextualType, mapper);
+ links.type = contextualType;
+ var name = ts.getNameOfDeclaration(parameter.valueDeclaration);
// 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 === 174 /* ObjectBindingPattern */ ||
- parameter.valueDeclaration.name.kind === 175 /* ArrayBindingPattern */)) {
- links.type = getTypeFromBindingPattern(parameter.valueDeclaration.name);
+ (name.kind === 174 /* ObjectBindingPattern */ || name.kind === 175 /* ArrayBindingPattern */)) {
+ links.type = getTypeFromBindingPattern(name);
}
assignBindingElementTypes(parameter.valueDeclaration);
}
- 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,
- // we need to ensure that type parameters at the same positions get fixed again. This is
- // done by calling instantiateType to attach the mapper to the contextualType, and then
- // calling inferTypes to force a walk of contextualType so that all the correct fixing
- // happens. The choice to pass in links.type may seem kind of arbitrary, but it serves
- // to make sure that all the correct positions in contextualType are reached by the walk.
- // Here is an example:
- //
- // interface Base {
- // baseProp;
- // }
- // interface Derived extends Base {
- // toBase(): Base;
- // }
- //
- // var derived: Derived;
- //
- // declare function foo<T>(x: T, func: (p: T) => T): T;
- // declare function foo<T>(x: T, func: (p: T) => T): T;
- //
- // var result = foo(derived, d => d.toBase());
- //
- // We are typing d while checking the second overload. But we've already given d
- // a type (Derived) from the first overload. However, we still want to fix the
- // 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).
- inferTypesWithContext(mapper.context, links.type, instantiateType(contextualType, mapper));
- }
- }
- function getReturnTypeFromJSDocComment(func) {
- var returnTag = ts.getJSDocReturnTag(func);
- if (returnTag && returnTag.typeExpression) {
- return getTypeFromTypeNode(returnTag.typeExpression.type);
- }
- return undefined;
}
function createPromiseType(promisedType) {
// creates a `Promise<T>` type where `T` is the promisedType argument
@@ -39922,11 +41696,15 @@ var ts;
function createPromiseReturnType(func, promisedType) {
var promiseType = createPromiseType(promisedType);
if (promiseType === emptyObjectType) {
- 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);
+ error(func, ts.isImportCall(func) ?
+ ts.Diagnostics.A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option :
+ 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);
+ error(func, ts.isImportCall(func) ?
+ ts.Diagnostics.A_dynamic_import_call_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option :
+ 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;
}
@@ -39996,7 +41774,7 @@ 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 (functionFlags & 3 /* AsyncOrAsyncGenerator */) === 2 /* Async */
+ return (functionFlags & 3 /* AsyncGenerator */) === 2 /* Async */
? createPromiseReturnType(func, widenedType) // Async function
: widenedType; // Generator function, AsyncGenerator function, or normal function
}
@@ -40109,16 +41887,16 @@ var ts;
}
var hasExplicitReturn = func.flags & 256 /* HasExplicitReturn */;
if (returnType && returnType.flags & 8192 /* Never */) {
- error(func.type, ts.Diagnostics.A_function_returning_never_cannot_have_a_reachable_end_point);
+ error(ts.getEffectiveReturnTypeNode(func), ts.Diagnostics.A_function_returning_never_cannot_have_a_reachable_end_point);
}
else if (returnType && !hasExplicitReturn) {
// minimal check: function has syntactic return type annotation and no explicit return statements in the body
// this function does not conform to the specification.
// NOTE: having returnType !== undefined is a precondition for entering this branch so func.type will always be present
- error(func.type, ts.Diagnostics.A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value);
+ error(ts.getEffectiveReturnTypeNode(func), ts.Diagnostics.A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value);
}
else if (returnType && strictNullChecks && !isTypeAssignableTo(undefinedType, returnType)) {
- error(func.type, ts.Diagnostics.Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined);
+ error(ts.getEffectiveReturnTypeNode(func), ts.Diagnostics.Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined);
}
else if (compilerOptions.noImplicitReturns) {
if (!returnType) {
@@ -40133,7 +41911,7 @@ var ts;
return;
}
}
- error(func.type || func, ts.Diagnostics.Not_all_code_paths_return_a_value);
+ error(ts.getEffectiveReturnTypeNode(func) || func, ts.Diagnostics.Not_all_code_paths_return_a_value);
}
}
function checkFunctionExpressionOrObjectLiteralMethod(node, checkMode) {
@@ -40150,35 +41928,34 @@ var ts;
}
var links = getNodeLinks(node);
var type = getTypeOfSymbol(node.symbol);
- var contextSensitive = isContextSensitive(node);
- 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.
- if (mightFixTypeParameters || !(links.flags & 1024 /* ContextChecked */)) {
+ if (!(links.flags & 1024 /* ContextChecked */)) {
var contextualSignature = getContextualSignature(node);
// If a type check is started at a function expression that is an argument of a function call, obtaining the
// contextual type may recursively get back to here during overload resolution of the call. If so, we will have
// already assigned contextual types.
- var contextChecked = !!(links.flags & 1024 /* ContextChecked */);
- if (mightFixTypeParameters || !contextChecked) {
+ if (!(links.flags & 1024 /* ContextChecked */)) {
links.flags |= 1024 /* ContextChecked */;
if (contextualSignature) {
var signature = getSignaturesOfType(type, 0 /* Call */)[0];
- if (contextSensitive) {
- assignContextualParameterTypes(signature, contextualSignature, getContextualMapper(node), checkMode);
+ if (isContextSensitive(node)) {
+ var contextualMapper = getContextualMapper(node);
+ if (checkMode === 2 /* Inferential */) {
+ inferFromAnnotatedParameters(signature, contextualSignature, contextualMapper);
+ }
+ var instantiatedContextualSignature = contextualMapper === identityMapper ?
+ contextualSignature : instantiateSignature(contextualSignature, contextualMapper);
+ assignContextualParameterTypes(signature, instantiatedContextualSignature);
}
- if (mightFixTypeParameters || !node.type && !signature.resolvedReturnType) {
+ if (!ts.getEffectiveReturnTypeNode(node) && !signature.resolvedReturnType) {
var returnType = getReturnTypeFromBody(node, checkMode);
if (!signature.resolvedReturnType) {
signature.resolvedReturnType = returnType;
}
}
}
- if (!contextChecked) {
- checkSignatureDeclaration(node);
- checkNodeDeferred(node);
- }
+ checkSignatureDeclaration(node);
+ checkNodeDeferred(node);
}
}
if (produceDiagnostics && node.kind !== 151 /* MethodDeclaration */) {
@@ -40191,16 +41968,17 @@ var ts;
function checkFunctionExpressionOrObjectLiteralMethodDeferred(node) {
ts.Debug.assert(node.kind !== 151 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node));
var functionFlags = ts.getFunctionFlags(node);
- var returnOrPromisedType = node.type &&
- ((functionFlags & 3 /* AsyncOrAsyncGenerator */) === 2 /* Async */ ?
+ var returnTypeNode = ts.getEffectiveReturnTypeNode(node);
+ var returnOrPromisedType = returnTypeNode &&
+ ((functionFlags & 3 /* AsyncGenerator */) === 2 /* Async */ ?
checkAsyncFunctionReturnType(node) :
- getTypeFromTypeNode(node.type)); // AsyncGenerator function, Generator function, or normal function
+ getTypeFromTypeNode(returnTypeNode)); // AsyncGenerator function, Generator function, or normal function
if ((functionFlags & 1 /* Generator */) === 0) {
// return is not necessary in the body of generators
checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnOrPromisedType);
}
if (node.body) {
- if (!node.type) {
+ if (!returnTypeNode) {
// There are some checks that are only performed in getReturnTypeFromBody, that may produce errors
// we need. An example is the noImplicitAny errors resulting from widening the return expression
// of a function. Because checking of function expression bodies is deferred, there was never an
@@ -40219,7 +41997,7 @@ var ts;
// its return type annotation.
var exprType = checkExpression(node.body);
if (returnOrPromisedType) {
- if ((functionFlags & 3 /* AsyncOrAsyncGenerator */) === 2 /* Async */) {
+ if ((functionFlags & 3 /* AsyncGenerator */) === 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);
}
@@ -40232,7 +42010,7 @@ var ts;
}
}
function checkArithmeticOperandType(operand, type, diagnostic) {
- if (!isTypeAnyOrAllConstituentTypesHaveKind(type, 340 /* NumberLike */)) {
+ if (!isTypeAnyOrAllConstituentTypesHaveKind(type, 84 /* NumberLike */)) {
error(operand, diagnostic);
return false;
}
@@ -40245,8 +42023,8 @@ 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 !!(getCheckFlags(symbol) & 8 /* Readonly */ ||
- symbol.flags & 4 /* Property */ && getDeclarationModifierFlagsFromSymbol(symbol) & 64 /* Readonly */ ||
+ return !!(ts.getCheckFlags(symbol) & 8 /* Readonly */ ||
+ symbol.flags & 4 /* Property */ && ts.getDeclarationModifierFlagsFromSymbol(symbol) & 64 /* Readonly */ ||
symbol.flags & 3 /* Variable */ && getDeclarationNodeFlagsFromSymbol(symbol) & 2 /* Const */ ||
symbol.flags & 98304 /* Accessor */ && !(symbol.flags & 65536 /* SetAccessor */) ||
symbol.flags & 8 /* EnumMember */);
@@ -40259,8 +42037,9 @@ var ts;
expr.expression.kind === 99 /* 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 === 152 /* Constructor */))
+ if (!(func && func.kind === 152 /* 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,
// then symbol is writeable here.
@@ -40285,7 +42064,7 @@ var ts;
}
function checkReferenceExpression(expr, invalidReferenceMessage) {
// References are combinations of identifiers, parentheses, and property accesses.
- var node = ts.skipParentheses(expr);
+ var node = ts.skipOuterExpressions(expr, 2 /* Assertions */ | 1 /* Parentheses */);
if (node.kind !== 71 /* Identifier */ && node.kind !== 179 /* PropertyAccessExpression */ && node.kind !== 180 /* ElementAccessExpression */) {
error(expr, invalidReferenceMessage);
return false;
@@ -40333,7 +42112,7 @@ var ts;
return silentNeverType;
}
if (node.operator === 38 /* MinusToken */ && node.operand.kind === 8 /* NumericLiteral */) {
- return getFreshTypeOfLiteralType(getLiteralTypeForText(64 /* NumberLiteral */, "" + -node.operand.text));
+ return getFreshTypeOfLiteralType(getLiteralType(-node.operand.text));
}
switch (node.operator) {
case 37 /* PlusToken */:
@@ -40380,8 +42159,8 @@ var ts;
}
if (type.flags & 196608 /* UnionOrIntersection */) {
var types = type.types;
- for (var _i = 0, types_19 = types; _i < types_19.length; _i++) {
- var t = types_19[_i];
+ for (var _i = 0, types_17 = types; _i < types_17.length; _i++) {
+ var t = types_17[_i];
if (maybeTypeOfKind(t, kind)) {
return true;
}
@@ -40398,8 +42177,8 @@ var ts;
}
if (type.flags & 65536 /* Union */) {
var types = type.types;
- for (var _i = 0, types_20 = types; _i < types_20.length; _i++) {
- var t = types_20[_i];
+ for (var _i = 0, types_18 = types; _i < types_18.length; _i++) {
+ var t = types_18[_i];
if (!isTypeOfKind(t, kind)) {
return false;
}
@@ -40408,8 +42187,8 @@ var ts;
}
if (type.flags & 131072 /* Intersection */) {
var types = type.types;
- for (var _a = 0, types_21 = types; _a < types_21.length; _a++) {
- var t = types_21[_a];
+ for (var _a = 0, types_19 = types; _a < types_19.length; _a++) {
+ var t = types_19[_a];
if (isTypeOfKind(t, kind)) {
return true;
}
@@ -40454,7 +42233,7 @@ var ts;
// 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.
// The result is always of the Boolean primitive type.
- if (!(isTypeComparableTo(leftType, stringType) || isTypeOfKind(leftType, 340 /* NumberLike */ | 512 /* ESSymbol */))) {
+ if (!(isTypeComparableTo(leftType, stringType) || isTypeOfKind(leftType, 84 /* 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 */ | 540672 /* TypeVariable */ | 16777216 /* NonPrimitive */)) {
@@ -40523,7 +42302,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(sourceType, node, /*allowStringInput*/ false, /*allowAsyncIterable*/ false) || unknownType;
+ var elementType = checkIteratedTypeOrElementType(sourceType, node, /*allowStringInput*/ false, /*allowAsyncIterables*/ false) || unknownType;
var elements = node.elements;
for (var i = 0; i < elements.length; i++) {
checkArrayLiteralDestructuringElementAssignment(node, sourceType, i, elementType, checkMode);
@@ -40749,7 +42528,7 @@ var ts;
rightType = checkNonNullType(rightType, right);
}
var resultType = void 0;
- if (isTypeOfKind(leftType, 340 /* NumberLike */) && isTypeOfKind(rightType, 340 /* NumberLike */)) {
+ if (isTypeOfKind(leftType, 84 /* NumberLike */) && isTypeOfKind(rightType, 84 /* NumberLike */)) {
// Operands of an enum type are treated as having the primitive type Number.
// If both operands are of the Number primitive type, the result is of the Number primitive type.
resultType = numberType;
@@ -40809,7 +42588,7 @@ var ts;
return checkInExpression(left, right, leftType, rightType);
case 53 /* AmpersandAmpersandToken */:
return getTypeFacts(leftType) & 1048576 /* Truthy */ ?
- includeFalsyTypes(rightType, getFalsyFlags(strictNullChecks ? leftType : getBaseTypeOfLiteralType(rightType))) :
+ getUnionType([extractDefinitelyFalsyTypes(strictNullChecks ? leftType : getBaseTypeOfLiteralType(rightType)), rightType]) :
leftType;
case 54 /* BarBarToken */:
return getTypeFacts(leftType) & 2097152 /* Falsy */ ?
@@ -40854,7 +42633,7 @@ var ts;
}
}
function checkAssignmentOperator(valueType) {
- if (produceDiagnostics && operator >= 58 /* FirstAssignment */ && operator <= 70 /* LastAssignment */) {
+ if (produceDiagnostics && ts.isAssignmentOperator(operator)) {
// TypeScript 1.0 spec (April 2014): 4.17
// An assignment of the form
// VarExpr = ValueExpr
@@ -40902,12 +42681,15 @@ var ts;
// we are in a yield context.
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) {
+ // Async generator functions prior to ESNext require the __await, __asyncDelegator,
+ // and __asyncValues helpers
+ if ((functionFlags & 3 /* AsyncGenerator */) === 3 /* AsyncGenerator */ &&
+ languageVersion < 5 /* ESNext */) {
+ checkExternalEmitHelpers(node, 26624 /* AsyncDelegatorIncludes */);
+ }
+ // Generator functions prior to ES2015 require the __values helper
+ if ((functionFlags & 3 /* AsyncGenerator */) === 1 /* Generator */ &&
+ languageVersion < 2 /* ES2015 */ && compilerOptions.downlevelIteration) {
checkExternalEmitHelpers(node, 256 /* Values */);
}
}
@@ -40921,8 +42703,9 @@ var ts;
// 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 = getIteratedTypeOfGenerator(getTypeFromTypeNode(func.type), (functionFlags & 2 /* Async */) !== 0) || anyType;
+ var returnType = ts.getEffectiveReturnTypeNode(func);
+ if (returnType) {
+ var signatureElementType = getIteratedTypeOfGenerator(getTypeFromTypeNode(returnType), (functionFlags & 2 /* Async */) !== 0) || anyType;
if (nodeIsYieldStar) {
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)
@@ -40953,9 +42736,9 @@ var ts;
}
switch (node.kind) {
case 9 /* StringLiteral */:
- return getFreshTypeOfLiteralType(getLiteralTypeForText(32 /* StringLiteral */, node.text));
+ return getFreshTypeOfLiteralType(getLiteralType(node.text));
case 8 /* NumericLiteral */:
- return getFreshTypeOfLiteralType(getLiteralTypeForText(64 /* NumberLiteral */, node.text));
+ return getFreshTypeOfLiteralType(getLiteralType(+node.text));
case 101 /* TrueKeyword */:
return trueType;
case 86 /* FalseKeyword */:
@@ -41020,7 +42803,7 @@ var ts;
}
contextualType = constraint;
}
- return maybeTypeOfKind(contextualType, (480 /* Literal */ | 262144 /* Index */));
+ return maybeTypeOfKind(contextualType, (224 /* Literal */ | 262144 /* Index */));
}
return false;
}
@@ -41055,7 +42838,7 @@ var ts;
if (signature && signature.typeParameters) {
var contextualType = getApparentTypeOfContextualType(node);
if (contextualType) {
- var contextualSignature = getSingleCallSignature(contextualType);
+ var contextualSignature = getSingleCallSignature(getNonNullableType(contextualType));
if (contextualSignature && !contextualSignature.typeParameters) {
return getOrCreateTypeFromSignature(instantiateSignatureInContextOf(signature, contextualSignature, getContextualMapper(node)));
}
@@ -41159,6 +42942,10 @@ var ts;
case 180 /* ElementAccessExpression */:
return checkIndexedAccess(node);
case 181 /* CallExpression */:
+ if (node.expression.kind === 91 /* ImportKeyword */) {
+ return checkImportCallExpression(node);
+ }
+ /* falls through */
case 182 /* NewExpression */:
return checkCallExpression(node);
case 183 /* TaggedTemplateExpression */:
@@ -41365,28 +43152,31 @@ var ts;
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 */) {
+ if (!(functionFlags & 4 /* Invalid */)) {
+ // Async generators prior to ESNext require the __await and __asyncGenerator helpers
+ if ((functionFlags & 3 /* AsyncGenerator */) === 3 /* AsyncGenerator */ && languageVersion < 5 /* ESNext */) {
+ checkExternalEmitHelpers(node, 6144 /* AsyncGeneratorIncludes */);
+ }
+ // Async functions prior to ES2017 require the __awaiter helper
+ if ((functionFlags & 3 /* AsyncGenerator */) === 2 /* Async */ && languageVersion < 4 /* ES2017 */) {
+ checkExternalEmitHelpers(node, 64 /* Awaiter */);
+ }
+ // Generator functions, Async functions, and Async Generator functions prior to
+ // ES2015 require the __generator helper
+ if ((functionFlags & 3 /* AsyncGenerator */) !== 0 /* Normal */ && languageVersion < 2 /* ES2015 */) {
checkExternalEmitHelpers(node, 128 /* Generator */);
}
}
checkTypeParameters(node.typeParameters);
ts.forEach(node.parameters, checkParameter);
+ // TODO(rbuckton): Should we start checking JSDoc types?
if (node.type) {
checkSourceElement(node.type);
}
if (produceDiagnostics) {
checkCollisionWithArgumentsInGeneratedCode(node);
- if (noImplicitAny && !node.type) {
+ var returnTypeNode = ts.getEffectiveReturnTypeNode(node);
+ if (noImplicitAny && !returnTypeNode) {
switch (node.kind) {
case 156 /* ConstructSignature */:
error(node, ts.Diagnostics.Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type);
@@ -41396,12 +43186,12 @@ var ts;
break;
}
}
- if (node.type) {
+ if (returnTypeNode) {
var functionFlags_1 = ts.getFunctionFlags(node);
- if ((functionFlags_1 & 5 /* InvalidGenerator */) === 1 /* Generator */) {
- var returnType = getTypeFromTypeNode(node.type);
+ if ((functionFlags_1 & (4 /* Invalid */ | 1 /* Generator */)) === 1 /* Generator */) {
+ var returnType = getTypeFromTypeNode(returnTypeNode);
if (returnType === voidType) {
- error(node.type, ts.Diagnostics.A_generator_cannot_have_a_void_type_annotation);
+ error(returnTypeNode, ts.Diagnostics.A_generator_cannot_have_a_void_type_annotation);
}
else {
var generatorElementType = getIteratedTypeOfGenerator(returnType, (functionFlags_1 & 2 /* Async */) !== 0) || anyType;
@@ -41414,10 +43204,10 @@ var ts;
// interface BadGenerator extends Iterable<number>, Iterator<string> { }
// function* g(): BadGenerator { } // Iterable and Iterator have different types!
//
- checkTypeAssignableTo(iterableIteratorInstantiation, returnType, node.type);
+ checkTypeAssignableTo(iterableIteratorInstantiation, returnType, returnTypeNode);
}
}
- else if ((functionFlags_1 & 3 /* AsyncOrAsyncGenerator */) === 2 /* Async */) {
+ else if ((functionFlags_1 & 3 /* AsyncGenerator */) === 2 /* Async */) {
checkAsyncFunctionReturnType(node);
}
}
@@ -41536,7 +43326,7 @@ var ts;
continue;
}
if (names.get(memberName)) {
- error(member.symbol.valueDeclaration.name, ts.Diagnostics.Duplicate_identifier_0, memberName);
+ error(ts.getNameOfDeclaration(member.symbol.valueDeclaration), ts.Diagnostics.Duplicate_identifier_0, memberName);
error(member.name, ts.Diagnostics.Duplicate_identifier_0, memberName);
}
else {
@@ -41624,7 +43414,8 @@ var ts;
return;
}
function containsSuperCallAsComputedPropertyName(n) {
- return n.name && containsSuperCall(n.name);
+ var name = ts.getNameOfDeclaration(n);
+ return name && containsSuperCall(name);
}
function containsSuperCall(n) {
if (ts.isSuperCall(n)) {
@@ -41781,7 +43572,7 @@ var ts;
checkTypeArgumentConstraints(typeParameters, node.typeArguments);
}
}
- if (type.flags & 16 /* Enum */ && !type.memberTypes && getNodeLinks(node).resolvedSymbol.flags & 8 /* EnumMember */) {
+ if (type.flags & 16 /* Enum */ && getNodeLinks(node).resolvedSymbol.flags & 8 /* EnumMember */) {
error(node, ts.Diagnostics.Enum_type_0_has_members_with_initializers_that_are_not_literals, typeToString(type));
}
}
@@ -41824,7 +43615,7 @@ var ts;
}
// 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 */)) {
+ if (maybeTypeOfKind(objectType, 540672 /* TypeVariable */) && isTypeOfKind(indexType, 84 /* NumberLike */)) {
var constraint = getBaseConstraintOfType(objectType);
if (constraint && getIndexInfoOfType(constraint, 1 /* Number */)) {
return type;
@@ -41884,16 +43675,16 @@ var ts;
ts.forEach(overloads, function (o) {
var deviation = getEffectiveDeclarationFlags(o, flagsToCheck) ^ canonicalFlags_1;
if (deviation & 1 /* Export */) {
- error(o.name, ts.Diagnostics.Overload_signatures_must_all_be_exported_or_non_exported);
+ error(ts.getNameOfDeclaration(o), ts.Diagnostics.Overload_signatures_must_all_be_exported_or_non_exported);
}
else if (deviation & 2 /* Ambient */) {
- error(o.name, ts.Diagnostics.Overload_signatures_must_all_be_ambient_or_non_ambient);
+ error(ts.getNameOfDeclaration(o), ts.Diagnostics.Overload_signatures_must_all_be_ambient_or_non_ambient);
}
else if (deviation & (8 /* Private */ | 16 /* Protected */)) {
- error(o.name || o, ts.Diagnostics.Overload_signatures_must_all_be_public_private_or_protected);
+ error(ts.getNameOfDeclaration(o) || o, ts.Diagnostics.Overload_signatures_must_all_be_public_private_or_protected);
}
else if (deviation & 128 /* Abstract */) {
- error(o.name, ts.Diagnostics.Overload_signatures_must_all_be_abstract_or_non_abstract);
+ error(ts.getNameOfDeclaration(o), ts.Diagnostics.Overload_signatures_must_all_be_abstract_or_non_abstract);
}
});
}
@@ -41904,7 +43695,7 @@ var ts;
ts.forEach(overloads, function (o) {
var deviation = ts.hasQuestionToken(o) !== canonicalHasQuestionToken_1;
if (deviation) {
- error(o.name, ts.Diagnostics.Overload_signatures_must_all_be_optional_or_required);
+ error(ts.getNameOfDeclaration(o), ts.Diagnostics.Overload_signatures_must_all_be_optional_or_required);
}
});
}
@@ -42028,7 +43819,7 @@ var ts;
}
if (duplicateFunctionDeclaration) {
ts.forEach(declarations, function (declaration) {
- error(declaration.name, ts.Diagnostics.Duplicate_function_implementation);
+ error(ts.getNameOfDeclaration(declaration), ts.Diagnostics.Duplicate_function_implementation);
});
}
// Abstract methods can't have an implementation -- in particular, they don't need one.
@@ -42042,8 +43833,8 @@ var ts;
if (bodyDeclaration) {
var signatures = getSignaturesOfSymbol(symbol);
var bodySignature = getSignatureFromDeclaration(bodyDeclaration);
- for (var _a = 0, signatures_4 = signatures; _a < signatures_4.length; _a++) {
- var signature = signatures_4[_a];
+ for (var _a = 0, signatures_7 = signatures; _a < signatures_7.length; _a++) {
+ var signature = signatures_7[_a];
if (!isImplementationCompatibleWithOverload(bodySignature, signature)) {
error(signature.declaration, ts.Diagnostics.Overload_signature_is_not_compatible_with_function_implementation);
break;
@@ -42101,12 +43892,13 @@ var ts;
for (var _b = 0, _c = symbol.declarations; _b < _c.length; _b++) {
var d = _c[_b];
var declarationSpaces = getDeclarationSpaces(d);
+ var name = ts.getNameOfDeclaration(d);
// Only error on the declarations that contributed to the intersecting spaces.
if (declarationSpaces & commonDeclarationSpacesForDefaultAndNonDefault) {
- error(d.name, ts.Diagnostics.Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead, ts.declarationNameToString(d.name));
+ error(name, ts.Diagnostics.Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead, ts.declarationNameToString(name));
}
else if (declarationSpaces & commonDeclarationSpacesForExportsAndLocals) {
- error(d.name, ts.Diagnostics.Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local, ts.declarationNameToString(d.name));
+ error(name, ts.Diagnostics.Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local, ts.declarationNameToString(name));
}
}
}
@@ -42326,7 +44118,8 @@ var ts;
// then<U>(...): Promise<U>;
// }
//
- var returnType = getTypeFromTypeNode(node.type);
+ var returnTypeNode = ts.getEffectiveReturnTypeNode(node);
+ var returnType = getTypeFromTypeNode(returnTypeNode);
if (languageVersion >= 2 /* ES2015 */) {
if (returnType === unknownType) {
return unknownType;
@@ -42335,29 +44128,29 @@ var ts;
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);
+ error(returnTypeNode, ts.Diagnostics.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type);
return unknownType;
}
}
else {
// Always mark the type node as referenced if it points to a value
- markTypeNodeAsReferenced(node.type);
+ markTypeNodeAsReferenced(returnTypeNode);
if (returnType === unknownType) {
return unknownType;
}
- var promiseConstructorName = ts.getEntityNameFromTypeNode(node.type);
+ var promiseConstructorName = ts.getEntityNameFromTypeNode(returnTypeNode);
if (promiseConstructorName === undefined) {
- 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, typeToString(returnType));
+ error(returnTypeNode, 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, typeToString(returnType));
return unknownType;
}
var promiseConstructorSymbol = resolveEntityName(promiseConstructorName, 107455 /* Value */, /*ignoreErrors*/ true);
var promiseConstructorType = promiseConstructorSymbol ? getTypeOfSymbol(promiseConstructorSymbol) : unknownType;
if (promiseConstructorType === unknownType) {
if (promiseConstructorName.kind === 71 /* 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);
+ error(returnTypeNode, 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));
+ error(returnTypeNode, 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;
}
@@ -42365,10 +44158,10 @@ var ts;
if (globalPromiseConstructorLikeType === emptyObjectType) {
// If we couldn't resolve the global PromiseConstructorLike type we cannot verify
// compatibility with __awaiter.
- 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));
+ error(returnTypeNode, 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;
}
- if (!checkTypeAssignableTo(promiseConstructorType, globalPromiseConstructorLikeType, 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)) {
+ if (!checkTypeAssignableTo(promiseConstructorType, globalPromiseConstructorLikeType, returnTypeNode, 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)) {
return unknownType;
}
// Verify there is no local declaration that could collide with the promise constructor.
@@ -42421,7 +44214,9 @@ var ts;
* marked as referenced to prevent import elision.
*/
function markTypeNodeAsReferenced(node) {
- var typeName = node && ts.getEntityNameFromTypeNode(node);
+ markEntityNameOrEntityExpressionAsReference(node && ts.getEntityNameFromTypeNode(node));
+ }
+ function markEntityNameOrEntityExpressionAsReference(typeName) {
var rootName = typeName && getFirstIdentifier(typeName);
var rootSymbol = rootName && resolveName(rootName, rootName.text, (typeName.kind === 71 /* Identifier */ ? 793064 /* Type */ : 1920 /* Namespace */) | 8388608 /* Alias */, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined);
if (rootSymbol
@@ -42431,8 +44226,60 @@ var ts;
markAliasSymbolAsReferenced(rootSymbol);
}
}
+ /**
+ * This function marks the type used for metadata decorator as referenced if it is import
+ * from external module.
+ * This is different from markTypeNodeAsReferenced because it tries to simplify type nodes in
+ * union and intersection type
+ * @param node
+ */
+ function markDecoratorMedataDataTypeNodeAsReferenced(node) {
+ var entityName = getEntityNameForDecoratorMetadata(node);
+ if (entityName && ts.isEntityName(entityName)) {
+ markEntityNameOrEntityExpressionAsReference(entityName);
+ }
+ }
+ function getEntityNameForDecoratorMetadata(node) {
+ if (node) {
+ switch (node.kind) {
+ case 167 /* IntersectionType */:
+ case 166 /* UnionType */:
+ var commonEntityName = void 0;
+ for (var _i = 0, _a = node.types; _i < _a.length; _i++) {
+ var typeNode = _a[_i];
+ var individualEntityName = getEntityNameForDecoratorMetadata(typeNode);
+ if (!individualEntityName) {
+ // Individual is something like string number
+ // So it would be serialized to either that type or object
+ // Safe to return here
+ return undefined;
+ }
+ if (commonEntityName) {
+ // Note this is in sync with the transformation that happens for type node.
+ // Keep this in sync with serializeUnionOrIntersectionType
+ // Verify if they refer to same entity and is identifier
+ // return undefined if they dont match because we would emit object
+ if (!ts.isIdentifier(commonEntityName) ||
+ !ts.isIdentifier(individualEntityName) ||
+ commonEntityName.text !== individualEntityName.text) {
+ return undefined;
+ }
+ }
+ else {
+ commonEntityName = individualEntityName;
+ }
+ }
+ return commonEntityName;
+ case 168 /* ParenthesizedType */:
+ return getEntityNameForDecoratorMetadata(node.type);
+ case 159 /* TypeReference */:
+ return node.typeName;
+ }
+ }
+ }
function getParameterTypeNodeForDecoratorCheck(node) {
- return node.dotDotDotToken ? ts.getRestParameterElementType(node.type) : node.type;
+ var typeNode = ts.getEffectiveTypeAnnotationNode(node);
+ return ts.isRestParameter(node) ? ts.getRestParameterElementType(typeNode) : typeNode;
}
/** Check the decorators of a node */
function checkDecorators(node) {
@@ -42461,7 +44308,7 @@ var ts;
if (constructor) {
for (var _i = 0, _a = constructor.parameters; _i < _a.length; _i++) {
var parameter = _a[_i];
- markTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(parameter));
+ markDecoratorMedataDataTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(parameter));
}
}
break;
@@ -42470,15 +44317,15 @@ var ts;
case 154 /* SetAccessor */:
for (var _b = 0, _c = node.parameters; _b < _c.length; _b++) {
var parameter = _c[_b];
- markTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(parameter));
+ markDecoratorMedataDataTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(parameter));
}
- markTypeNodeAsReferenced(node.type);
+ markDecoratorMedataDataTypeNodeAsReferenced(ts.getEffectiveReturnTypeNode(node));
break;
case 149 /* PropertyDeclaration */:
- markTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(node));
+ markDecoratorMedataDataTypeNodeAsReferenced(ts.getEffectiveTypeAnnotationNode(node));
break;
case 146 /* Parameter */:
- markTypeNodeAsReferenced(node.type);
+ markDecoratorMedataDataTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(node));
break;
}
}
@@ -42486,7 +44333,8 @@ var ts;
}
function checkFunctionDeclaration(node) {
if (produceDiagnostics) {
- checkFunctionOrMethodDeclaration(node) || checkGrammarForGenerator(node);
+ checkFunctionOrMethodDeclaration(node);
+ checkGrammarForGenerator(node);
checkCollisionWithCapturedSuperVariable(node, node.name);
checkCollisionWithCapturedThisVariable(node, node.name);
checkCollisionWithCapturedNewTargetVariable(node, node.name);
@@ -42532,13 +44380,14 @@ var ts;
}
}
checkSourceElement(node.body);
+ var returnTypeNode = ts.getEffectiveReturnTypeNode(node);
if ((functionFlags & 1 /* Generator */) === 0) {
- var returnOrPromisedType = node.type && (functionFlags & 2 /* Async */
+ var returnOrPromisedType = returnTypeNode && (functionFlags & 2 /* Async */
? checkAsyncFunctionReturnType(node) // Async function
- : getTypeFromTypeNode(node.type)); // normal function
+ : getTypeFromTypeNode(returnTypeNode)); // normal function
checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnOrPromisedType);
}
- if (produceDiagnostics && !node.type) {
+ if (produceDiagnostics && !returnTypeNode) {
// 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 (noImplicitAny && ts.nodeIsMissing(node.body) && !isPrivateWithinAmbient(node)) {
@@ -42612,15 +44461,16 @@ var ts;
if (!local.isReferenced) {
if (local.valueDeclaration && ts.getRootDeclaration(local.valueDeclaration).kind === 146 /* Parameter */) {
var parameter = ts.getRootDeclaration(local.valueDeclaration);
+ var name = ts.getNameOfDeclaration(local.valueDeclaration);
if (compilerOptions.noUnusedParameters &&
!ts.isParameterPropertyDeclaration(parameter) &&
!ts.parameterIsThisKeyword(parameter) &&
- !parameterNameStartsWithUnderscore(local.valueDeclaration.name)) {
- error(local.valueDeclaration.name, ts.Diagnostics._0_is_declared_but_never_used, local.name);
+ !parameterNameStartsWithUnderscore(name)) {
+ error(name, ts.Diagnostics._0_is_declared_but_never_used, local.name);
}
}
else if (compilerOptions.noUnusedLocals) {
- ts.forEach(local.declarations, function (d) { return errorUnusedLocal(d.name || d, local.name); });
+ ts.forEach(local.declarations, function (d) { return errorUnusedLocal(ts.getNameOfDeclaration(d) || d, local.name); });
}
}
});
@@ -42636,9 +44486,7 @@ var ts;
function errorUnusedLocal(node, name) {
if (isIdentifierThatStartsWithUnderScore(node)) {
var declaration = ts.getRootDeclaration(node.parent);
- if (declaration.kind === 226 /* VariableDeclaration */ &&
- (declaration.parent.parent.kind === 215 /* ForInStatement */ ||
- declaration.parent.parent.kind === 216 /* ForOfStatement */)) {
+ if (declaration.kind === 226 /* VariableDeclaration */ && ts.isForInOrOfStatement(declaration.parent.parent)) {
return;
}
}
@@ -42700,7 +44548,7 @@ var ts;
for (var _i = 0, _a = local.declarations; _i < _a.length; _i++) {
var declaration = _a[_i];
if (!ts.isAmbientModule(declaration)) {
- errorUnusedLocal(declaration.name, local.name);
+ errorUnusedLocal(ts.getNameOfDeclaration(declaration), local.name);
}
}
}
@@ -42768,7 +44616,7 @@ var ts;
if (getNodeCheckFlags(current) & 4 /* CaptureThis */) {
var isDeclaration_1 = node.kind !== 71 /* Identifier */;
if (isDeclaration_1) {
- error(node.name, ts.Diagnostics.Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference);
+ error(ts.getNameOfDeclaration(node), ts.Diagnostics.Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference);
}
else {
error(node, ts.Diagnostics.Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference);
@@ -42782,7 +44630,7 @@ var ts;
if (getNodeCheckFlags(current) & 8 /* CaptureNewTarget */) {
var isDeclaration_2 = node.kind !== 71 /* Identifier */;
if (isDeclaration_2) {
- error(node.name, ts.Diagnostics.Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference);
+ error(ts.getNameOfDeclaration(node), 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);
@@ -43048,7 +44896,7 @@ var ts;
checkTypeAssignableTo(checkExpressionCached(node.initializer), declarationType, node, /*headMessage*/ undefined);
}
if (!areDeclarationFlagsIdentical(node, symbol.valueDeclaration)) {
- error(symbol.valueDeclaration.name, ts.Diagnostics.All_declarations_of_0_must_have_identical_modifiers, ts.declarationNameToString(node.name));
+ error(ts.getNameOfDeclaration(symbol.valueDeclaration), ts.Diagnostics.All_declarations_of_0_must_have_identical_modifiers, ts.declarationNameToString(node.name));
error(node.name, ts.Diagnostics.All_declarations_of_0_must_have_identical_modifiers, ts.declarationNameToString(node.name));
}
}
@@ -43163,11 +45011,14 @@ var ts;
checkGrammarForInOrForOfStatement(node);
if (node.kind === 216 /* ForOfStatement */) {
if (node.awaitModifier) {
- if (languageVersion < 4 /* ES2017 */) {
- checkExternalEmitHelpers(node, 8192 /* ForAwaitOfIncludes */);
+ var functionFlags = ts.getFunctionFlags(ts.getContainingFunction(node));
+ if ((functionFlags & (4 /* Invalid */ | 2 /* Async */)) === 2 /* Async */ && languageVersion < 5 /* ESNext */) {
+ // for..await..of in an async function or async generator function prior to ESNext requires the __asyncValues helper
+ checkExternalEmitHelpers(node, 16384 /* ForAwaitOfIncludes */);
}
}
- else if (languageVersion < 2 /* ES2015 */ && compilerOptions.downlevelIteration) {
+ else if (compilerOptions.downlevelIteration && languageVersion < 2 /* ES2015 */) {
+ // for..of prior to ES2015 requires the __values helper when downlevelIteration is enabled
checkExternalEmitHelpers(node, 256 /* ForOfIncludes */);
}
}
@@ -43262,26 +45113,26 @@ var ts;
var expressionType = checkNonNullExpression(rhsExpression);
return checkIteratedTypeOrElementType(expressionType, rhsExpression, /*allowStringInput*/ true, awaitModifier !== undefined);
}
- function checkIteratedTypeOrElementType(inputType, errorNode, allowStringInput, allowAsyncIterable) {
+ function checkIteratedTypeOrElementType(inputType, errorNode, allowStringInput, allowAsyncIterables) {
if (isTypeAny(inputType)) {
return inputType;
}
- return getIteratedTypeOrElementType(inputType, errorNode, allowStringInput, allowAsyncIterable, /*checkAssignability*/ true) || anyType;
+ return getIteratedTypeOrElementType(inputType, errorNode, allowStringInput, allowAsyncIterables, /*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) {
+ function getIteratedTypeOrElementType(inputType, errorNode, allowStringInput, allowAsyncIterables, 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) {
+ if (uplevelIteration || downlevelIteration || allowAsyncIterables) {
// We only report errors for an invalid iterable type in ES2015 or higher.
- var iteratedType = getIteratedTypeOfIterable(inputType, uplevelIteration ? errorNode : undefined, allowAsyncIterable, allowAsyncIterable, checkAssignability);
+ var iteratedType = getIteratedTypeOfIterable(inputType, uplevelIteration ? errorNode : undefined, allowAsyncIterables, /*allowSyncIterables*/ true, checkAssignability);
if (iteratedType || uplevelIteration) {
return iteratedType;
}
@@ -43386,70 +45237,65 @@ var ts;
* 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 getIteratedTypeOfIterable(type, errorNode, isAsyncIterable, allowNonAsyncIterables, checkAssignability) {
+ function getIteratedTypeOfIterable(type, errorNode, allowAsyncIterables, allowSyncIterables, checkAssignability) {
if (isTypeAny(type)) {
return undefined;
}
- var typeAsIterable = type;
- 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 isNonAsyncIterable = false;
- if (isAsyncIterable) {
- var iteratorMethod = getTypeOfPropertyOfType(type, ts.getPropertyNameForKnownSymbolName("asyncIterator"));
- if (isTypeAny(iteratorMethod)) {
+ return mapType(type, getIteratedType);
+ function getIteratedType(type) {
+ var typeAsIterable = type;
+ if (allowAsyncIterables) {
+ if (typeAsIterable.iteratedTypeOfAsyncIterable) {
+ return typeAsIterable.iteratedTypeOfAsyncIterable;
+ }
+ // 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 (allowSyncIterables) {
+ if (typeAsIterable.iteratedTypeOfIterable) {
+ return typeAsIterable.iteratedTypeOfIterable;
+ }
+ // 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 typeAsIterable.iteratedTypeOfIterable = type.typeArguments[0];
+ }
+ }
+ var asyncMethodType = allowAsyncIterables && getTypeOfPropertyOfType(type, ts.getPropertyNameForKnownSymbolName("asyncIterator"));
+ var methodType = asyncMethodType || (allowSyncIterables && getTypeOfPropertyOfType(type, ts.getPropertyNameForKnownSymbolName("iterator")));
+ if (isTypeAny(methodType)) {
return undefined;
}
- iteratorMethodSignatures = iteratorMethod && getSignaturesOfType(iteratorMethod, 0 /* Call */);
- }
- if (!isAsyncIterable || (allowNonAsyncIterables && !ts.some(iteratorMethodSignatures))) {
- var iteratorMethod = getTypeOfPropertyOfType(type, ts.getPropertyNameForKnownSymbolName("iterator"));
- if (isTypeAny(iteratorMethod)) {
+ var signatures = methodType && getSignaturesOfType(methodType, 0 /* Call */);
+ if (!ts.some(signatures)) {
+ if (errorNode) {
+ error(errorNode, allowAsyncIterables
+ ? 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);
+ // only report on the first error
+ errorNode = undefined;
+ }
return undefined;
}
- iteratorMethodSignatures = iteratorMethod && getSignaturesOfType(iteratorMethod, 0 /* Call */);
- isNonAsyncIterable = true;
- }
- if (ts.some(iteratorMethodSignatures)) {
- var iteratorMethodReturnType = getUnionType(ts.map(iteratorMethodSignatures, getReturnTypeOfSignature), /*subtypeReduction*/ true);
- var iteratedType = getIteratedTypeOfIterator(iteratorMethodReturnType, errorNode, /*isAsyncIterator*/ !isNonAsyncIterable);
+ var returnType = getUnionType(ts.map(signatures, getReturnTypeOfSignature), /*subtypeReduction*/ true);
+ var iteratedType = getIteratedTypeOfIterator(returnType, errorNode, /*isAsyncIterator*/ !!asyncMethodType);
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, isNonAsyncIterable
- ? createIterableType(iteratedType)
- : createAsyncIterableType(iteratedType), errorNode);
+ checkTypeAssignableTo(type, asyncMethodType
+ ? createAsyncIterableType(iteratedType)
+ : createIterableType(iteratedType), errorNode);
}
- return isAsyncIterable
+ return asyncMethodType
? 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 undefined;
}
/**
* This function has very similar logic as getIteratedTypeOfIterable, except that it operates on
@@ -43538,7 +45384,7 @@ var ts;
if (isTypeAny(returnType)) {
return undefined;
}
- return getIteratedTypeOfIterable(returnType, /*errorNode*/ undefined, isAsyncGenerator, /*allowNonAsyncIterables*/ false, /*checkAssignability*/ false)
+ return getIteratedTypeOfIterable(returnType, /*errorNode*/ undefined, /*allowAsyncIterables*/ isAsyncGenerator, /*allowSyncIterables*/ !isAsyncGenerator, /*checkAssignability*/ false)
|| getIteratedTypeOfIterator(returnType, /*errorNode*/ undefined, isAsyncGenerator);
}
function checkBreakOrContinueStatement(node) {
@@ -43547,10 +45393,11 @@ var ts;
// TODO: Check that target label is valid
}
function isGetAccessorWithAnnotatedSetAccessor(node) {
- return !!(node.kind === 153 /* GetAccessor */ && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(node.symbol, 154 /* SetAccessor */)));
+ return node.kind === 153 /* GetAccessor */
+ && ts.getEffectiveSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(node.symbol, 154 /* SetAccessor */)) !== undefined;
}
function isUnwrappedReturnTypeVoidOrAny(func, returnType) {
- var unwrappedReturnType = (ts.getFunctionFlags(func) & 3 /* AsyncOrAsyncGenerator */) === 2 /* Async */
+ var unwrappedReturnType = (ts.getFunctionFlags(func) & 3 /* AsyncGenerator */) === 2 /* Async */
? getPromisedTypeOfPromise(returnType) // Async function
: returnType; // AsyncGenerator function, Generator function, or normal function
return unwrappedReturnType && maybeTypeOfKind(unwrappedReturnType, 1024 /* Void */ | 1 /* Any */);
@@ -43587,7 +45434,7 @@ var ts;
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)) {
+ else if (ts.getEffectiveReturnTypeNode(func) || isGetAccessorWithAnnotatedSetAccessor(func)) {
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);
@@ -43772,13 +45619,16 @@ var ts;
}
var propDeclaration = prop.valueDeclaration;
// index is numeric and property name is not valid numeric literal
- if (indexKind === 1 /* Number */ && !(propDeclaration ? isNumericName(propDeclaration.name) : isNumericLiteralName(prop.name))) {
+ if (indexKind === 1 /* Number */ && !(propDeclaration ? isNumericName(ts.getNameOfDeclaration(propDeclaration)) : 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
+ // this allows us to rule out cases when both property and indexer are inherited from the base class
var errorNode;
- if (propDeclaration && (propDeclaration.name.kind === 144 /* ComputedPropertyName */ || prop.parent === containingType.symbol)) {
+ if (propDeclaration &&
+ (propDeclaration.kind === 194 /* BinaryExpression */ ||
+ ts.getNameOfDeclaration(propDeclaration).kind === 144 /* ComputedPropertyName */ ||
+ prop.parent === containingType.symbol)) {
errorNode = propDeclaration;
}
else if (indexDeclaration) {
@@ -43949,7 +45799,7 @@ var ts;
var staticBaseType = getApparentType(baseConstructorType);
checkBaseTypeAccessibility(staticBaseType, baseTypeNode);
checkSourceElement(baseTypeNode.expression);
- if (baseTypeNode.typeArguments) {
+ if (ts.some(baseTypeNode.typeArguments)) {
ts.forEach(baseTypeNode.typeArguments, checkSourceElement);
for (var _i = 0, _a = getConstructorsForTypeArguments(staticBaseType, baseTypeNode.typeArguments, baseTypeNode); _i < _a.length; _i++) {
var constructor = _a[_i];
@@ -44017,7 +45867,7 @@ 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 getCheckFlags(s) & 1 /* Instantiated */ ? s.target : s;
+ return ts.getCheckFlags(s) & 1 /* Instantiated */ ? s.target : s;
}
function getClassLikeDeclarationOfSymbol(symbol) {
return ts.forEach(symbol.declarations, function (d) { return ts.isClassLike(d) ? d : undefined; });
@@ -44050,7 +45900,7 @@ var ts;
continue;
}
var derived = getTargetSymbol(getPropertyOfObjectType(type, base.name));
- var baseDeclarationFlags = getDeclarationModifierFlagsFromSymbol(base);
+ var baseDeclarationFlags = ts.getDeclarationModifierFlagsFromSymbol(base);
ts.Debug.assert(!!derived, "derived should point to something, even if it is the base class' declaration.");
if (derived) {
// In order to resolve whether the inherited method was overridden in the base class or not,
@@ -44073,15 +45923,11 @@ var ts;
}
else {
// derived overrides base.
- var derivedDeclarationFlags = getDeclarationModifierFlagsFromSymbol(derived);
+ var derivedDeclarationFlags = ts.getDeclarationModifierFlagsFromSymbol(derived);
if (baseDeclarationFlags & 8 /* Private */ || derivedDeclarationFlags & 8 /* Private */) {
// either base or derived property is private - not override, skip it
continue;
}
- if ((baseDeclarationFlags & 32 /* Static */) !== (derivedDeclarationFlags & 32 /* Static */)) {
- // value of 'static' is not the same for properties - not override, skip it
- continue;
- }
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;
@@ -44101,14 +45947,11 @@ var ts;
else {
errorMessage = ts.Diagnostics.Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function;
}
- error(derived.valueDeclaration.name || derived.valueDeclaration, errorMessage, typeToString(baseType), symbolToString(base), typeToString(type));
+ error(ts.getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage, typeToString(baseType), symbolToString(base), typeToString(type));
}
}
}
}
- function isAccessor(kind) {
- return kind === 153 /* GetAccessor */ || kind === 154 /* SetAccessor */;
- }
function checkInheritedPropertiesAreIdentical(type, typeNode) {
var baseTypes = getBaseTypes(type);
if (baseTypes.length < 2) {
@@ -44188,97 +46031,88 @@ var ts;
function computeEnumMemberValues(node) {
var nodeLinks = getNodeLinks(node);
if (!(nodeLinks.flags & 16384 /* EnumValuesComputed */)) {
- var enumSymbol = getSymbolOfNode(node);
- var enumType = getDeclaredTypeOfSymbol(enumSymbol);
- var autoValue = 0; // set to undefined when enum member is non-constant
- var ambient = ts.isInAmbientContext(node);
- var enumIsConst = ts.isConst(node);
+ nodeLinks.flags |= 16384 /* EnumValuesComputed */;
+ var autoValue = 0;
for (var _i = 0, _a = node.members; _i < _a.length; _i++) {
var member = _a[_i];
- if (isComputedNonLiteralName(member.name)) {
- error(member.name, ts.Diagnostics.Computed_property_names_are_not_allowed_in_enums);
- }
- else {
- var text = ts.getTextOfPropertyName(member.name);
- if (isNumericLiteralName(text) && !isInfinityOrNaNString(text)) {
- error(member.name, ts.Diagnostics.An_enum_member_cannot_have_a_numeric_name);
- }
- }
- var previousEnumMemberIsNonConstant = autoValue === undefined;
- var initializer = member.initializer;
- if (initializer) {
- autoValue = computeConstantValueForEnumMemberInitializer(initializer, enumType, enumIsConst, ambient);
- }
- else if (ambient && !enumIsConst) {
- // In ambient enum declarations that specify no const modifier, enum member declarations
- // that omit a value are considered computed members (as opposed to having auto-incremented values assigned).
- autoValue = undefined;
- }
- else if (previousEnumMemberIsNonConstant) {
- // If the member declaration specifies no value, the member is considered a constant enum member.
- // If the member is the first member in the enum declaration, it is assigned the value zero.
- // Otherwise, it is assigned the value of the immediately preceding member plus one,
- // and an error occurs if the immediately preceding member is not a constant enum member
- error(member.name, ts.Diagnostics.Enum_member_must_have_initializer);
- }
- if (autoValue !== undefined) {
- getNodeLinks(member).enumMemberValue = autoValue;
- autoValue++;
- }
+ var value = computeMemberValue(member, autoValue);
+ getNodeLinks(member).enumMemberValue = value;
+ autoValue = typeof value === "number" ? value + 1 : undefined;
}
- nodeLinks.flags |= 16384 /* EnumValuesComputed */;
}
- function computeConstantValueForEnumMemberInitializer(initializer, enumType, enumIsConst, ambient) {
- // Controls if error should be reported after evaluation of constant value is completed
- // Can be false if another more precise error was already reported during evaluation.
- var reportError = true;
- var value = evalConstant(initializer);
- if (reportError) {
- if (value === undefined) {
- if (enumIsConst) {
- error(initializer, ts.Diagnostics.In_const_enum_declarations_member_initializer_must_be_constant_expression);
- }
- else if (ambient) {
- error(initializer, ts.Diagnostics.In_ambient_enum_declarations_member_initializer_must_be_constant_expression);
- }
- else {
- // Only here do we need to check that the initializer is assignable to the enum type.
- checkTypeAssignableTo(checkExpression(initializer), enumType, initializer, /*headMessage*/ undefined);
- }
- }
- else if (enumIsConst) {
- if (isNaN(value)) {
- error(initializer, ts.Diagnostics.const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN);
- }
- else if (!isFinite(value)) {
- error(initializer, ts.Diagnostics.const_enum_member_initializer_was_evaluated_to_a_non_finite_value);
- }
- }
+ }
+ function computeMemberValue(member, autoValue) {
+ if (isComputedNonLiteralName(member.name)) {
+ error(member.name, ts.Diagnostics.Computed_property_names_are_not_allowed_in_enums);
+ }
+ else {
+ var text = ts.getTextOfPropertyName(member.name);
+ if (isNumericLiteralName(text) && !isInfinityOrNaNString(text)) {
+ error(member.name, ts.Diagnostics.An_enum_member_cannot_have_a_numeric_name);
}
- return value;
- function evalConstant(e) {
- switch (e.kind) {
- case 192 /* PrefixUnaryExpression */:
- var value_1 = evalConstant(e.operand);
- if (value_1 === undefined) {
- return undefined;
- }
- switch (e.operator) {
+ }
+ if (member.initializer) {
+ return computeConstantValue(member);
+ }
+ // In ambient enum declarations that specify no const modifier, enum member declarations that omit
+ // a value are considered computed members (as opposed to having auto-incremented values).
+ if (ts.isInAmbientContext(member.parent) && !ts.isConst(member.parent)) {
+ return undefined;
+ }
+ // If the member declaration specifies no value, the member is considered a constant enum member.
+ // If the member is the first member in the enum declaration, it is assigned the value zero.
+ // Otherwise, it is assigned the value of the immediately preceding member plus one, and an error
+ // occurs if the immediately preceding member is not a constant enum member.
+ if (autoValue !== undefined) {
+ return autoValue;
+ }
+ error(member.name, ts.Diagnostics.Enum_member_must_have_initializer);
+ return undefined;
+ }
+ function computeConstantValue(member) {
+ var enumKind = getEnumKind(getSymbolOfNode(member.parent));
+ var isConstEnum = ts.isConst(member.parent);
+ var initializer = member.initializer;
+ var value = enumKind === 1 /* Literal */ && !isLiteralEnumMember(member) ? undefined : evaluate(initializer);
+ if (value !== undefined) {
+ if (isConstEnum && typeof value === "number" && !isFinite(value)) {
+ error(initializer, isNaN(value) ?
+ ts.Diagnostics.const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN :
+ ts.Diagnostics.const_enum_member_initializer_was_evaluated_to_a_non_finite_value);
+ }
+ }
+ else if (enumKind === 1 /* Literal */) {
+ error(initializer, ts.Diagnostics.Computed_values_are_not_permitted_in_an_enum_with_string_valued_members);
+ return 0;
+ }
+ else if (isConstEnum) {
+ error(initializer, ts.Diagnostics.In_const_enum_declarations_member_initializer_must_be_constant_expression);
+ }
+ else if (ts.isInAmbientContext(member.parent)) {
+ error(initializer, ts.Diagnostics.In_ambient_enum_declarations_member_initializer_must_be_constant_expression);
+ }
+ else {
+ // Only here do we need to check that the initializer is assignable to the enum type.
+ checkTypeAssignableTo(checkExpression(initializer), getDeclaredTypeOfSymbol(getSymbolOfNode(member.parent)), initializer, /*headMessage*/ undefined);
+ }
+ return value;
+ function evaluate(expr) {
+ switch (expr.kind) {
+ case 192 /* PrefixUnaryExpression */:
+ var value_1 = evaluate(expr.operand);
+ if (typeof value_1 === "number") {
+ switch (expr.operator) {
case 37 /* PlusToken */: return value_1;
case 38 /* MinusToken */: return -value_1;
case 52 /* TildeToken */: return ~value_1;
}
- return undefined;
- case 194 /* BinaryExpression */:
- var left = evalConstant(e.left);
- if (left === undefined) {
- return undefined;
- }
- var right = evalConstant(e.right);
- if (right === undefined) {
- return undefined;
- }
- switch (e.operatorToken.kind) {
+ }
+ break;
+ case 194 /* BinaryExpression */:
+ var left = evaluate(expr.left);
+ var right = evaluate(expr.right);
+ if (typeof left === "number" && typeof right === "number") {
+ switch (expr.operatorToken.kind) {
case 49 /* BarToken */: return left | right;
case 48 /* AmpersandToken */: return left & right;
case 46 /* GreaterThanGreaterThanToken */: return left >> right;
@@ -44291,81 +46125,53 @@ var ts;
case 38 /* MinusToken */: return left - right;
case 42 /* PercentToken */: return left % right;
}
- return undefined;
- case 8 /* NumericLiteral */:
- checkGrammarNumericLiteral(e);
- return +e.text;
- case 185 /* ParenthesizedExpression */:
- return evalConstant(e.expression);
- case 71 /* Identifier */:
- case 180 /* ElementAccessExpression */:
- case 179 /* PropertyAccessExpression */:
- var member = initializer.parent;
- var currentType = getTypeOfSymbol(getSymbolOfNode(member.parent));
- var enumType_1;
- var propertyName = void 0;
- if (e.kind === 71 /* Identifier */) {
- // unqualified names can refer to member that reside in different declaration of the enum so just doing name resolution won't work.
- // instead pick current enum type and later try to fetch member from the type
- enumType_1 = currentType;
- propertyName = e.text;
- }
- else {
- var expression = void 0;
- if (e.kind === 180 /* ElementAccessExpression */) {
- if (e.argumentExpression === undefined ||
- e.argumentExpression.kind !== 9 /* StringLiteral */) {
- return undefined;
- }
- expression = e.expression;
- propertyName = e.argumentExpression.text;
- }
- else {
- expression = e.expression;
- propertyName = e.name.text;
- }
- // expression part in ElementAccess\PropertyAccess should be either identifier or dottedName
- var current = expression;
- while (current) {
- if (current.kind === 71 /* Identifier */) {
- break;
- }
- else if (current.kind === 179 /* PropertyAccessExpression */) {
- current = current.expression;
- }
- else {
- return undefined;
- }
- }
- enumType_1 = getTypeOfExpression(expression);
- // allow references to constant members of other enums
- if (!(enumType_1.symbol && (enumType_1.symbol.flags & 384 /* Enum */))) {
- return undefined;
- }
- }
- if (propertyName === undefined) {
- return undefined;
- }
- var property = getPropertyOfObjectType(enumType_1, propertyName);
- if (!property || !(property.flags & 8 /* EnumMember */)) {
- return undefined;
- }
- var propertyDecl = property.valueDeclaration;
- // self references are illegal
- if (member === propertyDecl) {
- return undefined;
- }
- // illegal case: forward reference
- if (!isBlockScopedNameDeclaredBeforeUse(propertyDecl, member)) {
- reportError = false;
- error(e, ts.Diagnostics.A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums);
- return undefined;
+ }
+ break;
+ case 9 /* StringLiteral */:
+ return expr.text;
+ case 8 /* NumericLiteral */:
+ checkGrammarNumericLiteral(expr);
+ return +expr.text;
+ case 185 /* ParenthesizedExpression */:
+ return evaluate(expr.expression);
+ case 71 /* Identifier */:
+ return ts.nodeIsMissing(expr) ? 0 : evaluateEnumMember(expr, getSymbolOfNode(member.parent), expr.text);
+ case 180 /* ElementAccessExpression */:
+ case 179 /* PropertyAccessExpression */:
+ if (isConstantMemberAccess(expr)) {
+ var type = getTypeOfExpression(expr.expression);
+ if (type.symbol && type.symbol.flags & 384 /* Enum */) {
+ var name = expr.kind === 179 /* PropertyAccessExpression */ ?
+ expr.name.text :
+ expr.argumentExpression.text;
+ return evaluateEnumMember(expr, type.symbol, name);
}
- return getNodeLinks(propertyDecl).enumMemberValue;
+ }
+ break;
+ }
+ return undefined;
+ }
+ function evaluateEnumMember(expr, enumSymbol, name) {
+ var memberSymbol = enumSymbol.exports.get(name);
+ if (memberSymbol) {
+ var declaration = memberSymbol.valueDeclaration;
+ if (declaration !== member) {
+ if (isBlockScopedNameDeclaredBeforeUse(declaration, member)) {
+ return getNodeLinks(declaration).enumMemberValue;
+ }
+ error(expr, ts.Diagnostics.A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums);
+ return 0;
}
}
+ return undefined;
}
}
+ function isConstantMemberAccess(node) {
+ return node.kind === 71 /* Identifier */ ||
+ node.kind === 179 /* PropertyAccessExpression */ && isConstantMemberAccess(node.expression) ||
+ node.kind === 180 /* ElementAccessExpression */ && isConstantMemberAccess(node.expression) &&
+ node.argumentExpression.kind === 9 /* StringLiteral */;
+ }
function checkEnumDeclaration(node) {
if (!produceDiagnostics) {
return;
@@ -44396,7 +46202,7 @@ var ts;
// check that const is placed\omitted on all enum declarations
ts.forEach(enumSymbol.declarations, function (decl) {
if (ts.isConstEnumDeclaration(decl) !== enumIsConst) {
- error(decl.name, ts.Diagnostics.Enum_declarations_must_all_be_const_or_non_const);
+ error(ts.getNameOfDeclaration(decl), ts.Diagnostics.Enum_declarations_must_all_be_const_or_non_const);
}
});
}
@@ -44655,6 +46461,13 @@ var ts;
ts.Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0;
error(node, message, symbolToString(symbol));
}
+ // Don't allow to re-export something with no value side when `--isolatedModules` is set.
+ if (compilerOptions.isolatedModules
+ && node.kind === 246 /* ExportSpecifier */
+ && !(target.flags & 107455 /* Value */)
+ && !ts.isInAmbientContext(node)) {
+ error(node, ts.Diagnostics.Cannot_re_export_a_type_when_the_isolatedModules_flag_is_provided);
+ }
}
}
function checkImportBinding(node) {
@@ -44748,6 +46561,9 @@ var ts;
if (moduleSymbol && hasExportAssignmentSymbol(moduleSymbol)) {
error(node.moduleSpecifier, ts.Diagnostics.Module_0_uses_export_and_cannot_be_used_with_export_Asterisk, symbolToString(moduleSymbol));
}
+ if (modulekind !== ts.ModuleKind.System && modulekind !== ts.ModuleKind.ES2015) {
+ checkExternalEmitHelpers(node, 32768 /* ExportStar */);
+ }
}
}
}
@@ -45330,6 +47146,15 @@ var ts;
return entityNameSymbol;
}
}
+ if (entityName.parent.kind === 287 /* JSDocParameterTag */) {
+ var parameter = ts.getParameterFromJSDoc(entityName.parent);
+ return parameter && parameter.symbol;
+ }
+ if (entityName.parent.kind === 145 /* TypeParameter */ && entityName.parent.parent.kind === 290 /* JSDocTemplateTag */) {
+ ts.Debug.assert(!ts.isInJavaScriptFile(entityName)); // Otherwise `isDeclarationName` would have been true.
+ var typeParameter = ts.getTypeParameterFromJsDoc(entityName.parent);
+ return typeParameter && typeParameter.symbol;
+ }
if (ts.isPartOfExpression(entityName)) {
if (ts.nodeIsMissing(entityName)) {
// Missing entity name.
@@ -45377,7 +47202,7 @@ var ts;
// We cannot answer semantic questions within a with block, do not proceed any further
return undefined;
}
- if (ts.isDeclarationName(node)) {
+ if (isDeclarationNameOrImportPropertyName(node)) {
// This is a declaration, call getSymbolOfNode
return getSymbolOfNode(node.parent);
}
@@ -45425,14 +47250,12 @@ var ts;
}
return undefined;
case 9 /* StringLiteral */:
- // External module name in an import declaration
- if ((ts.isExternalModuleImportEqualsDeclaration(node.parent.parent) &&
- ts.getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node) ||
- ((node.parent.kind === 238 /* ImportDeclaration */ || node.parent.kind === 244 /* ExportDeclaration */) &&
- node.parent.moduleSpecifier === node)) {
- return resolveExternalModuleName(node, node);
- }
- if (ts.isInJavaScriptFile(node) && ts.isRequireCall(node.parent, /*checkArgumentIsStringLiteral*/ false)) {
+ // 1). import x = require("./mo/*gotToDefinitionHere*/d")
+ // 2). External module name in an import declaration
+ // 3). Dynamic import call or require in javascript
+ if ((ts.isExternalModuleImportEqualsDeclaration(node.parent.parent) && ts.getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node) ||
+ ((node.parent.kind === 238 /* ImportDeclaration */ || node.parent.kind === 244 /* ExportDeclaration */) && node.parent.moduleSpecifier === node) ||
+ ((ts.isInJavaScriptFile(node) && ts.isRequireCall(node.parent, /*checkArgumentIsStringLiteral*/ false)) || ts.isImportCall(node.parent))) {
return resolveExternalModuleName(node, node);
}
// falls through
@@ -45505,7 +47328,7 @@ var ts;
var symbol = getSymbolOfNode(node);
return getTypeOfSymbol(symbol);
}
- if (ts.isDeclarationName(node)) {
+ if (isDeclarationNameOrImportPropertyName(node)) {
var symbol = getSymbolAtLocation(node);
return symbol && getTypeOfSymbol(symbol);
}
@@ -45550,7 +47373,7 @@ var ts;
ts.Debug.assert(expr.parent.kind === 177 /* ArrayLiteralExpression */);
// [{ property1: p1, property2 }] = elems;
var typeOfArrayLiteral = getTypeOfArrayLiteralOrObjectLiteralDestructuringAssignment(expr.parent);
- var elementType = checkIteratedTypeOrElementType(typeOfArrayLiteral || unknownType, expr.parent, /*allowStringInput*/ false, /*allowAsyncIterable*/ false) || unknownType;
+ var elementType = checkIteratedTypeOrElementType(typeOfArrayLiteral || unknownType, expr.parent, /*allowStringInput*/ false, /*allowAsyncIterables*/ 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
@@ -45595,24 +47418,24 @@ var ts;
return getNamedMembers(propsByName);
}
function getRootSymbols(symbol) {
- if (getCheckFlags(symbol) & 6 /* Synthetic */) {
- var symbols_3 = [];
+ if (ts.getCheckFlags(symbol) & 6 /* Synthetic */) {
+ var symbols_4 = [];
var name_2 = symbol.name;
ts.forEach(getSymbolLinks(symbol).containingType.types, function (t) {
var symbol = getPropertyOfType(t, name_2);
if (symbol) {
- symbols_3.push(symbol);
+ symbols_4.push(symbol);
}
});
- return symbols_3;
+ return symbols_4;
}
else if (symbol.flags & 134217728 /* Transient */) {
- if (symbol.leftSpread) {
- var links = symbol;
- return getRootSymbols(links.leftSpread).concat(getRootSymbols(links.rightSpread));
+ var transient = symbol;
+ if (transient.leftSpread) {
+ return getRootSymbols(transient.leftSpread).concat(getRootSymbols(transient.rightSpread));
}
- if (symbol.syntheticOrigin) {
- return getRootSymbols(symbol.syntheticOrigin);
+ if (transient.syntheticOrigin) {
+ return getRootSymbols(transient.syntheticOrigin);
}
var target = void 0;
var next = symbol;
@@ -45705,7 +47528,9 @@ var ts;
node = ts.getParseTreeNode(node, ts.isIdentifier);
if (node) {
var symbol = getReferencedValueSymbol(node);
- if (symbol && symbol.flags & 8388608 /* Alias */) {
+ // We should only get the declaration of an alias if there isn't a local value
+ // declaration for the symbol
+ if (isNonLocalAlias(symbol, /*excludes*/ 107455 /* Value */)) {
return getDeclarationOfAliasSymbol(symbol);
}
}
@@ -45858,6 +47683,12 @@ var ts;
parameter.initializer &&
!(ts.getModifierFlags(parameter) & 92 /* ParameterPropertyModifier */);
}
+ function isOptionalUninitializedParameterProperty(parameter) {
+ return strictNullChecks &&
+ isOptionalParameter(parameter) &&
+ !parameter.initializer &&
+ !!(ts.getModifierFlags(parameter) & 92 /* ParameterPropertyModifier */);
+ }
function getNodeCheckFlags(node) {
return getNodeLinks(node).flags;
}
@@ -45922,7 +47753,7 @@ var ts;
else if (isTypeOfKind(type, 136 /* BooleanLike */)) {
return ts.TypeReferenceSerializationKind.BooleanType;
}
- else if (isTypeOfKind(type, 340 /* NumberLike */)) {
+ else if (isTypeOfKind(type, 84 /* NumberLike */)) {
return ts.TypeReferenceSerializationKind.NumberLikeType;
}
else if (isTypeOfKind(type, 262178 /* StringLike */)) {
@@ -45950,8 +47781,8 @@ var ts;
var type = symbol && !(symbol.flags & (2048 /* TypeLiteral */ | 131072 /* Signature */))
? getWidenedLiteralType(getTypeOfSymbol(symbol))
: unknownType;
- if (flags & 4096 /* AddUndefined */) {
- type = includeFalsyTypes(type, 2048 /* Undefined */);
+ if (flags & 8192 /* AddUndefined */) {
+ type = getNullableType(type, 2048 /* Undefined */);
}
getSymbolDisplayBuilder().buildTypeDisplay(type, writer, enclosingDeclaration, flags);
}
@@ -45963,15 +47794,6 @@ var ts;
var type = getWidenedType(getRegularTypeOfExpression(expr));
getSymbolDisplayBuilder().buildTypeDisplay(type, writer, enclosingDeclaration, flags);
}
- function writeBaseConstructorTypeOfClass(node, enclosingDeclaration, flags, writer) {
- 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.has(name);
}
@@ -46054,10 +47876,10 @@ var ts;
isDeclarationVisible: isDeclarationVisible,
isImplementationOfOverload: isImplementationOfOverload,
isRequiredInitializedParameter: isRequiredInitializedParameter,
+ isOptionalUninitializedParameterProperty: isOptionalUninitializedParameterProperty,
writeTypeOfDeclaration: writeTypeOfDeclaration,
writeReturnTypeOfSignatureDeclaration: writeReturnTypeOfSignatureDeclaration,
writeTypeOfExpression: writeTypeOfExpression,
- writeBaseConstructorTypeOfClass: writeBaseConstructorTypeOfClass,
isSymbolAccessible: isSymbolAccessible,
isEntityNameVisible: isEntityNameVisible,
getConstantValue: function (node) {
@@ -46225,7 +48047,7 @@ var ts;
var helpersModule = resolveHelpersModule(sourceFile, location);
if (helpersModule !== unknownSymbol) {
var uncheckedHelpers = helpers & ~requestedExternalEmitHelpers;
- for (var helper = 1 /* FirstEmitHelper */; helper <= 8192 /* LastEmitHelper */; helper <<= 1) {
+ for (var helper = 1 /* FirstEmitHelper */; helper <= 32768 /* LastEmitHelper */; helper <<= 1) {
if (uncheckedHelpers & helper) {
var name = getHelperName(helper);
var symbol = getSymbol(helpersModule.exports, ts.escapeIdentifier(name), 107455 /* Value */);
@@ -46252,10 +48074,12 @@ var ts;
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.");
+ case 2048 /* Await */: return "__await";
+ case 4096 /* AsyncGenerator */: return "__asyncGenerator";
+ case 8192 /* AsyncDelegator */: return "__asyncDelegator";
+ case 16384 /* AsyncValues */: return "__asyncValues";
+ case 32768 /* ExportStar */: return "__exportStar";
+ default: ts.Debug.fail("Unrecognized helper");
}
}
function resolveHelpersModule(node, errorNode) {
@@ -46687,6 +48511,10 @@ var ts;
var sourceFile = ts.getSourceFileOfNode(node);
return grammarErrorAtPos(sourceFile, types.pos, 0, ts.Diagnostics._0_list_cannot_be_empty, listType);
}
+ return ts.forEach(types, checkGrammarExpressionWithTypeArguments);
+ }
+ function checkGrammarExpressionWithTypeArguments(node) {
+ return checkGrammarTypeArguments(node, node.typeArguments);
}
function checkGrammarClassDeclarationHeritageClauses(node) {
var seenExtendsClause = false;
@@ -47294,7 +49122,7 @@ var ts;
function checkGrammarStatementInAmbientContext(node) {
if (ts.isInAmbientContext(node)) {
// An accessors is already reported about the ambient context
- if (isAccessor(node.parent.kind)) {
+ if (ts.isAccessor(node.parent)) {
return getNodeLinks(node).hasReportedStatementInAmbientContext = true;
}
// Find containing block which is either Block, ModuleBlock, SourceFile
@@ -47358,8 +49186,35 @@ var ts;
});
return result;
}
+ function checkGrammarImportCallExpression(node) {
+ if (modulekind === ts.ModuleKind.ES2015) {
+ return grammarErrorOnNode(node, ts.Diagnostics.Dynamic_import_cannot_be_used_when_targeting_ECMAScript_2015_modules);
+ }
+ if (node.typeArguments) {
+ return grammarErrorOnNode(node, ts.Diagnostics.Dynamic_import_cannot_have_type_arguments);
+ }
+ var nodeArguments = node.arguments;
+ if (nodeArguments.length !== 1) {
+ return grammarErrorOnNode(node, ts.Diagnostics.Dynamic_import_must_have_one_specifier_as_an_argument);
+ }
+ // see: parseArgumentOrArrayLiteralElement...we use this function which parse arguments of callExpression to parse specifier for dynamic import.
+ // parseArgumentOrArrayLiteralElement allows spread element to be in an argument list which is not allowed as specifier in dynamic import.
+ if (ts.isSpreadElement(nodeArguments[0])) {
+ return grammarErrorOnNode(nodeArguments[0], ts.Diagnostics.Specifier_of_dynamic_import_cannot_be_spread_element);
+ }
+ }
}
ts.createTypeChecker = createTypeChecker;
+ /** Like 'isDeclarationName', but returns true for LHS of `import { x as y }` or `export { x as y }`. */
+ function isDeclarationNameOrImportPropertyName(name) {
+ switch (name.parent.kind) {
+ case 242 /* ImportSpecifier */:
+ case 246 /* ExportSpecifier */:
+ return true;
+ default:
+ return ts.isDeclarationName(name);
+ }
+ }
})(ts || (ts = {}));
/// <reference path="checker.ts" />
/// <reference path="factory.ts" />
@@ -47497,79 +49352,73 @@ var ts;
if ((kind > 0 /* FirstToken */ && kind <= 142 /* LastToken */) || kind === 169 /* ThisType */) {
return node;
}
- switch (node.kind) {
- case 206 /* SemicolonClassElement */:
- case 209 /* EmptyStatement */:
- case 200 /* OmittedExpression */:
- case 225 /* DebuggerStatement */:
- case 298 /* EndOfDeclarationMarker */:
- case 247 /* MissingDeclaration */:
- // No need to visit nodes with no children.
- return node;
+ switch (kind) {
// Names
+ case 71 /* Identifier */:
+ return ts.updateIdentifier(node, nodesVisitor(node.typeArguments, visitor, ts.isTypeNode));
case 143 /* QualifiedName */:
return ts.updateQualifiedName(node, visitNode(node.left, visitor, ts.isEntityName), visitNode(node.right, visitor, ts.isIdentifier));
case 144 /* ComputedPropertyName */:
return ts.updateComputedPropertyName(node, visitNode(node.expression, visitor, ts.isExpression));
- // Signatures and Signature Elements
- case 160 /* FunctionType */:
- return ts.updateFunctionTypeNode(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode));
- case 161 /* ConstructorType */:
- return ts.updateConstructorTypeNode(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode));
- case 155 /* CallSignature */:
- return ts.updateCallSignatureDeclaration(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode));
- case 156 /* ConstructSignature */:
- return ts.updateConstructSignatureDeclaration(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameter), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode));
- case 150 /* 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 157 /* 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));
+ // Signature elements
+ case 145 /* TypeParameter */:
+ return ts.updateTypeParameterDeclaration(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.constraint, visitor, ts.isTypeNode), visitNode(node.default, visitor, ts.isTypeNode));
case 146 /* 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 147 /* Decorator */:
return ts.updateDecorator(node, visitNode(node.expression, visitor, ts.isExpression));
+ // Type elements
+ case 148 /* PropertySignature */:
+ return ts.updatePropertySignature(node, nodesVisitor(node.modifiers, visitor, ts.isToken), 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 149 /* 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 /* MethodSignature */:
+ return ts.updateMethodSignature(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), visitNode(node.type, visitor, ts.isTypeNode), visitNode(node.name, visitor, ts.isPropertyName), visitNode(node.questionToken, tokenVisitor, ts.isToken));
+ case 151 /* 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.isTypeParameterDeclaration), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context));
+ case 152 /* 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 153 /* 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 154 /* 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));
+ case 155 /* CallSignature */:
+ return ts.updateCallSignature(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), visitNode(node.type, visitor, ts.isTypeNode));
+ case 156 /* ConstructSignature */:
+ return ts.updateConstructSignature(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), visitNode(node.type, visitor, ts.isTypeNode));
+ case 157 /* IndexSignature */:
+ return ts.updateIndexSignature(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), visitNode(node.type, visitor, ts.isTypeNode));
// Types
- case 159 /* TypeReference */:
- return ts.updateTypeReferenceNode(node, visitNode(node.typeName, visitor, ts.isEntityName), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode));
case 158 /* TypePredicate */:
return ts.updateTypePredicateNode(node, visitNode(node.parameterName, visitor), visitNode(node.type, visitor, ts.isTypeNode));
+ case 159 /* TypeReference */:
+ return ts.updateTypeReferenceNode(node, visitNode(node.typeName, visitor, ts.isEntityName), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode));
+ case 160 /* FunctionType */:
+ return ts.updateFunctionTypeNode(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), visitNode(node.type, visitor, ts.isTypeNode));
+ case 161 /* ConstructorType */:
+ return ts.updateConstructorTypeNode(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), visitNode(node.type, visitor, ts.isTypeNode));
case 162 /* TypeQuery */:
return ts.updateTypeQueryNode(node, visitNode(node.exprName, visitor, ts.isEntityName));
case 163 /* TypeLiteral */:
- return ts.updateTypeLiteralNode(node, nodesVisitor(node.members, visitor));
+ return ts.updateTypeLiteralNode(node, nodesVisitor(node.members, visitor, ts.isTypeElement));
case 164 /* ArrayType */:
return ts.updateArrayTypeNode(node, visitNode(node.elementType, visitor, ts.isTypeNode));
case 165 /* TupleType */:
return ts.updateTypleTypeNode(node, nodesVisitor(node.elementTypes, visitor, ts.isTypeNode));
case 166 /* UnionType */:
+ return ts.updateUnionTypeNode(node, nodesVisitor(node.types, visitor, ts.isTypeNode));
case 167 /* IntersectionType */:
- return ts.updateUnionOrIntersectionTypeNode(node, nodesVisitor(node.types, visitor, ts.isTypeNode));
+ return ts.updateIntersectionTypeNode(node, nodesVisitor(node.types, visitor, ts.isTypeNode));
case 168 /* ParenthesizedType */:
- throw ts.Debug.fail("not implemented.");
+ return ts.updateParenthesizedType(node, visitNode(node.type, visitor, ts.isTypeNode));
case 170 /* TypeOperator */:
return ts.updateTypeOperatorNode(node, visitNode(node.type, visitor, ts.isTypeNode));
case 171 /* IndexedAccessType */:
return ts.updateIndexedAccessTypeNode(node, visitNode(node.objectType, visitor, ts.isTypeNode), visitNode(node.indexType, visitor, ts.isTypeNode));
case 172 /* 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));
+ return ts.updateMappedTypeNode(node, visitNode(node.readonlyToken, tokenVisitor, ts.isToken), visitNode(node.typeParameter, visitor, ts.isTypeParameterDeclaration), visitNode(node.questionToken, tokenVisitor, ts.isToken), visitNode(node.type, visitor, ts.isTypeNode));
case 173 /* LiteralType */:
return ts.updateLiteralTypeNode(node, visitNode(node.literal, visitor, ts.isExpression));
- // Type Declarations
- case 145 /* 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 148 /* 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 149 /* 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 151 /* 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 152 /* 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 153 /* 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 154 /* 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 174 /* ObjectBindingPattern */:
return ts.updateObjectBindingPattern(node, nodesVisitor(node.elements, visitor, ts.isBindingElement));
@@ -47597,9 +49446,9 @@ var ts;
case 185 /* ParenthesizedExpression */:
return ts.updateParen(node, visitNode(node.expression, visitor, ts.isExpression));
case 186 /* 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));
+ 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.isTypeParameterDeclaration), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context));
case 187 /* 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));
+ return ts.updateArrowFunction(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context));
case 188 /* DeleteExpression */:
return ts.updateDelete(node, visitNode(node.expression, visitor, ts.isExpression));
case 189 /* TypeOfExpression */:
@@ -47608,12 +49457,12 @@ var ts;
return ts.updateVoid(node, visitNode(node.expression, visitor, ts.isExpression));
case 191 /* AwaitExpression */:
return ts.updateAwait(node, visitNode(node.expression, visitor, ts.isExpression));
- case 194 /* BinaryExpression */:
- return ts.updateBinary(node, visitNode(node.left, visitor, ts.isExpression), visitNode(node.right, visitor, ts.isExpression));
case 192 /* PrefixUnaryExpression */:
return ts.updatePrefix(node, visitNode(node.operand, visitor, ts.isExpression));
case 193 /* PostfixUnaryExpression */:
return ts.updatePostfix(node, visitNode(node.operand, visitor, ts.isExpression));
+ case 194 /* BinaryExpression */:
+ return ts.updateBinary(node, visitNode(node.left, visitor, ts.isExpression), visitNode(node.right, visitor, ts.isExpression), visitNode(node.operatorToken, visitor, ts.isToken));
case 195 /* ConditionalExpression */:
return ts.updateConditional(node, visitNode(node.condition, visitor, ts.isExpression), visitNode(node.whenTrue, visitor, ts.isExpression), visitNode(node.whenFalse, visitor, ts.isExpression));
case 196 /* TemplateExpression */:
@@ -47623,13 +49472,15 @@ var ts;
case 198 /* SpreadElement */:
return ts.updateSpread(node, visitNode(node.expression, visitor, ts.isExpression));
case 199 /* 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));
+ return ts.updateClassExpression(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.heritageClauses, visitor, ts.isHeritageClause), nodesVisitor(node.members, visitor, ts.isClassElement));
case 201 /* ExpressionWithTypeArguments */:
return ts.updateExpressionWithTypeArguments(node, nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), visitNode(node.expression, visitor, ts.isExpression));
case 202 /* AsExpression */:
return ts.updateAsExpression(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.type, visitor, ts.isTypeNode));
case 203 /* NonNullExpression */:
return ts.updateNonNullExpression(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 204 /* MetaProperty */:
+ return ts.updateMetaProperty(node, visitNode(node.name, visitor, ts.isIdentifier));
// Misc
case 205 /* TemplateSpan */:
return ts.updateTemplateSpan(node, visitNode(node.expression, visitor, ts.isExpression), visitNode(node.literal, visitor, ts.isTemplateMiddleOrTemplateTail));
@@ -47673,9 +49524,13 @@ var ts;
case 227 /* VariableDeclarationList */:
return ts.updateVariableDeclarationList(node, nodesVisitor(node.declarations, visitor, ts.isVariableDeclaration));
case 228 /* 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));
+ 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.isTypeParameterDeclaration), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitNode(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context));
case 229 /* 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));
+ 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.isTypeParameterDeclaration), nodesVisitor(node.heritageClauses, visitor, ts.isHeritageClause), nodesVisitor(node.members, visitor, ts.isClassElement));
+ case 230 /* InterfaceDeclaration */:
+ return ts.updateInterfaceDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.heritageClauses, visitor, ts.isHeritageClause), nodesVisitor(node.members, visitor, ts.isTypeElement));
+ case 231 /* TypeAliasDeclaration */:
+ return ts.updateTypeAliasDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitNode(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), visitNode(node.type, visitor, ts.isTypeNode));
case 232 /* 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 233 /* ModuleDeclaration */:
@@ -47684,6 +49539,8 @@ var ts;
return ts.updateModuleBlock(node, nodesVisitor(node.statements, visitor, ts.isStatement));
case 235 /* CaseBlock */:
return ts.updateCaseBlock(node, nodesVisitor(node.clauses, visitor, ts.isCaseOrDefaultClause));
+ case 236 /* NamespaceExportDeclaration */:
+ return ts.updateNamespaceExportDeclaration(node, visitNode(node.name, visitor, ts.isIdentifier));
case 237 /* 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 238 /* ImportDeclaration */:
@@ -47710,8 +49567,6 @@ var ts;
// JSX
case 249 /* JsxElement */:
return ts.updateJsxElement(node, visitNode(node.openingElement, visitor, ts.isJsxOpeningElement), nodesVisitor(node.children, visitor, ts.isJsxChild), visitNode(node.closingElement, visitor, ts.isJsxClosingElement));
- case 254 /* JsxAttributes */:
- return ts.updateJsxAttributes(node, nodesVisitor(node.properties, visitor, ts.isJsxAttributeLike));
case 250 /* JsxSelfClosingElement */:
return ts.updateJsxSelfClosingElement(node, visitNode(node.tagName, visitor, ts.isJsxTagNameExpression), visitNode(node.attributes, visitor, ts.isJsxAttributes));
case 251 /* JsxOpeningElement */:
@@ -47720,6 +49575,8 @@ var ts;
return ts.updateJsxClosingElement(node, visitNode(node.tagName, visitor, ts.isJsxTagNameExpression));
case 253 /* JsxAttribute */:
return ts.updateJsxAttribute(node, visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.initializer, visitor, ts.isStringLiteralOrJsxExpression));
+ case 254 /* JsxAttributes */:
+ return ts.updateJsxAttributes(node, nodesVisitor(node.properties, visitor, ts.isJsxAttributeLike));
case 255 /* JsxSpreadAttribute */:
return ts.updateJsxSpreadAttribute(node, visitNode(node.expression, visitor, ts.isExpression));
case 256 /* JsxExpression */:
@@ -47747,9 +49604,12 @@ var ts;
case 265 /* SourceFile */:
return ts.updateSourceFileNode(node, visitLexicalEnvironment(node.statements, visitor, context));
// Transformation nodes
- case 296 /* PartiallyEmittedExpression */:
+ case 297 /* PartiallyEmittedExpression */:
return ts.updatePartiallyEmittedExpression(node, visitNode(node.expression, visitor, ts.isExpression));
+ case 298 /* CommaListExpression */:
+ return ts.updateCommaList(node, nodesVisitor(node.elements, visitor, ts.isExpression));
default:
+ // No need to visit nodes with no children.
return node;
}
}
@@ -47802,7 +49662,7 @@ var ts;
case 209 /* EmptyStatement */:
case 200 /* OmittedExpression */:
case 225 /* DebuggerStatement */:
- case 295 /* NotEmittedStatement */:
+ case 296 /* NotEmittedStatement */:
// No need to visit nodes with no children.
break;
// Names
@@ -47825,6 +49685,13 @@ var ts;
result = reduceNode(node.expression, cbNode, result);
break;
// Type member
+ case 148 /* PropertySignature */:
+ result = reduceNodes(node.modifiers, cbNodes, result);
+ result = reduceNode(node.name, cbNode, result);
+ result = reduceNode(node.questionToken, cbNode, result);
+ result = reduceNode(node.type, cbNode, result);
+ result = reduceNode(node.initializer, cbNode, result);
+ break;
case 149 /* PropertyDeclaration */:
result = reduceNodes(node.decorators, cbNodes, result);
result = reduceNodes(node.modifiers, cbNodes, result);
@@ -48172,9 +50039,12 @@ var ts;
result = reduceNodes(node.statements, cbNodes, result);
break;
// Transformation nodes
- case 296 /* PartiallyEmittedExpression */:
+ case 297 /* PartiallyEmittedExpression */:
result = reduceNode(node.expression, cbNode, result);
break;
+ case 298 /* CommaListExpression */:
+ result = reduceNodes(node.elements, cbNodes, result);
+ break;
default:
break;
}
@@ -48263,37 +50133,69 @@ var ts;
}
var Debug;
(function (Debug) {
+ var isDebugInfoEnabled = false;
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."; }); }
+ ? function (node, message) { return Debug.fail((message || "Unexpected node.") + "\r\nNode " + ts.formatSyntaxKind(node.kind) + " was unexpected.", Debug.failBadSyntaxKind); }
: ts.noop;
Debug.assertEachNode = Debug.shouldAssert(1 /* Normal */)
- ? function (nodes, test, message) { return Debug.assert(test === undefined || ts.every(nodes, test), message || "Unexpected node.", function () { return "Node array did not pass test '" + getFunctionName(test) + "'."; }); }
+ ? function (nodes, test, message) { return Debug.assert(test === undefined || ts.every(nodes, test), message || "Unexpected node.", function () { return "Node array did not pass test '" + Debug.getFunctionName(test) + "'."; }, Debug.assertEachNode); }
: ts.noop;
Debug.assertNode = Debug.shouldAssert(1 /* Normal */)
- ? function (node, test, message) { return Debug.assert(test === undefined || test(node), message || "Unexpected node.", function () { return "Node " + ts.formatSyntaxKind(node.kind) + " did not pass test '" + getFunctionName(test) + "'."; }); }
+ ? function (node, test, message) { return Debug.assert(test === undefined || test(node), message || "Unexpected node.", function () { return "Node " + ts.formatSyntaxKind(node.kind) + " did not pass test '" + Debug.getFunctionName(test) + "'."; }, Debug.assertNode); }
: ts.noop;
Debug.assertOptionalNode = Debug.shouldAssert(1 /* Normal */)
- ? function (node, test, message) { return Debug.assert(test === undefined || node === undefined || test(node), message || "Unexpected node.", function () { return "Node " + ts.formatSyntaxKind(node.kind) + " did not pass test '" + getFunctionName(test) + "'."; }); }
+ ? function (node, test, message) { return Debug.assert(test === undefined || node === undefined || test(node), message || "Unexpected node.", function () { return "Node " + ts.formatSyntaxKind(node.kind) + " did not pass test '" + Debug.getFunctionName(test) + "'."; }, Debug.assertOptionalNode); }
: ts.noop;
Debug.assertOptionalToken = Debug.shouldAssert(1 /* Normal */)
- ? function (node, kind, message) { return Debug.assert(kind === undefined || node === undefined || node.kind === kind, message || "Unexpected node.", function () { return "Node " + ts.formatSyntaxKind(node.kind) + " was not a '" + ts.formatSyntaxKind(kind) + "' token."; }); }
+ ? function (node, kind, message) { return Debug.assert(kind === undefined || node === undefined || node.kind === kind, message || "Unexpected node.", function () { return "Node " + ts.formatSyntaxKind(node.kind) + " was not a '" + ts.formatSyntaxKind(kind) + "' token."; }, Debug.assertOptionalToken); }
: ts.noop;
Debug.assertMissingNode = Debug.shouldAssert(1 /* Normal */)
- ? function (node, message) { return Debug.assert(node === undefined, message || "Unexpected node.", function () { return "Node " + ts.formatSyntaxKind(node.kind) + " was unexpected'."; }); }
+ ? function (node, message) { return Debug.assert(node === undefined, message || "Unexpected node.", function () { return "Node " + ts.formatSyntaxKind(node.kind) + " was unexpected'."; }, Debug.assertMissingNode); }
: ts.noop;
- function getFunctionName(func) {
- if (typeof func !== "function") {
- return "";
- }
- else if (func.hasOwnProperty("name")) {
- return func.name;
- }
- else {
- var text = Function.prototype.toString.call(func);
- var match = /^function\s+([\w\$]+)\s*\(/.exec(text);
- return match ? match[1] : "";
+ /**
+ * Injects debug information into frequently used types.
+ */
+ function enableDebugInfo() {
+ if (isDebugInfoEnabled)
+ return;
+ // Add additional properties in debug mode to assist with debugging.
+ Object.defineProperties(ts.objectAllocator.getSymbolConstructor().prototype, {
+ "__debugFlags": { get: function () { return ts.formatSymbolFlags(this.flags); } }
+ });
+ Object.defineProperties(ts.objectAllocator.getTypeConstructor().prototype, {
+ "__debugFlags": { get: function () { return ts.formatTypeFlags(this.flags); } },
+ "__debugObjectFlags": { get: function () { return this.flags & 32768 /* Object */ ? ts.formatObjectFlags(this.objectFlags) : ""; } },
+ "__debugTypeToString": { value: function () { return this.checker.typeToString(this); } },
+ });
+ var nodeConstructors = [
+ ts.objectAllocator.getNodeConstructor(),
+ ts.objectAllocator.getIdentifierConstructor(),
+ ts.objectAllocator.getTokenConstructor(),
+ ts.objectAllocator.getSourceFileConstructor()
+ ];
+ for (var _i = 0, nodeConstructors_1 = nodeConstructors; _i < nodeConstructors_1.length; _i++) {
+ var ctor = nodeConstructors_1[_i];
+ if (!ctor.prototype.hasOwnProperty("__debugKind")) {
+ Object.defineProperties(ctor.prototype, {
+ "__debugKind": { get: function () { return ts.formatSyntaxKind(this.kind); } },
+ "__debugModifierFlags": { get: function () { return ts.formatModifierFlags(ts.getModifierFlagsNoCache(this)); } },
+ "__debugTransformFlags": { get: function () { return ts.formatTransformFlags(this.transformFlags); } },
+ "__debugEmitFlags": { get: function () { return ts.formatEmitFlags(ts.getEmitFlags(this)); } },
+ "__debugGetText": {
+ value: function (includeTrivia) {
+ if (ts.nodeIsSynthesized(this))
+ return "";
+ var parseNode = ts.getParseTreeNode(this);
+ var sourceFile = parseNode && ts.getSourceFileOfNode(parseNode);
+ return sourceFile ? ts.getSourceTextOfNodeFromSourceFile(sourceFile, parseNode, includeTrivia) : "";
+ }
+ }
+ });
+ }
}
+ isDebugInfoEnabled = true;
}
+ Debug.enableDebugInfo = enableDebugInfo;
})(Debug = ts.Debug || (ts.Debug = {}));
})(ts || (ts = {}));
/// <reference path="../factory.ts" />
@@ -48754,6 +50656,22 @@ var ts;
/* Enables substitutions for unqualified enum members */
TypeScriptSubstitutionFlags[TypeScriptSubstitutionFlags["NonQualifiedEnumMembers"] = 8] = "NonQualifiedEnumMembers";
})(TypeScriptSubstitutionFlags || (TypeScriptSubstitutionFlags = {}));
+ var ClassFacts;
+ (function (ClassFacts) {
+ ClassFacts[ClassFacts["None"] = 0] = "None";
+ ClassFacts[ClassFacts["HasStaticInitializedProperties"] = 1] = "HasStaticInitializedProperties";
+ ClassFacts[ClassFacts["HasConstructorDecorators"] = 2] = "HasConstructorDecorators";
+ ClassFacts[ClassFacts["HasMemberDecorators"] = 4] = "HasMemberDecorators";
+ ClassFacts[ClassFacts["IsExportOfNamespace"] = 8] = "IsExportOfNamespace";
+ ClassFacts[ClassFacts["IsNamedExternalExport"] = 16] = "IsNamedExternalExport";
+ ClassFacts[ClassFacts["IsDefaultExternalExport"] = 32] = "IsDefaultExternalExport";
+ ClassFacts[ClassFacts["HasExtendsClause"] = 64] = "HasExtendsClause";
+ ClassFacts[ClassFacts["UseImmediatelyInvokedFunctionExpression"] = 128] = "UseImmediatelyInvokedFunctionExpression";
+ ClassFacts[ClassFacts["HasAnyDecorators"] = 6] = "HasAnyDecorators";
+ ClassFacts[ClassFacts["NeedsName"] = 5] = "NeedsName";
+ ClassFacts[ClassFacts["MayNeedImmediatelyInvokedFunctionExpression"] = 7] = "MayNeedImmediatelyInvokedFunctionExpression";
+ ClassFacts[ClassFacts["IsExported"] = 56] = "IsExported";
+ })(ClassFacts || (ClassFacts = {}));
function transformTypeScript(context) {
var startLexicalEnvironment = context.startLexicalEnvironment, resumeLexicalEnvironment = context.resumeLexicalEnvironment, endLexicalEnvironment = context.endLexicalEnvironment, hoistVariableDeclaration = context.hoistVariableDeclaration;
var resolver = context.getEmitResolver();
@@ -48797,7 +50715,7 @@ var ts;
* @param node A SourceFile node.
*/
function transformSourceFile(node) {
- if (ts.isDeclarationFile(node)) {
+ if (node.isDeclarationFile) {
return node;
}
currentSourceFile = node;
@@ -49031,7 +50949,9 @@ var ts;
case 231 /* TypeAliasDeclaration */:
// TypeScript type-only declarations are elided.
case 149 /* PropertyDeclaration */:
- // TypeScript property declarations are elided.
+ // TypeScript property declarations are elided.
+ case 236 /* NamespaceExportDeclaration */:
+ // TypeScript namespace export declarations are elided.
return undefined;
case 152 /* Constructor */:
return visitConstructor(node);
@@ -49157,6 +51077,26 @@ var ts;
function shouldEmitDecorateCallForParameter(parameter) {
return parameter.decorators !== undefined && parameter.decorators.length > 0;
}
+ function getClassFacts(node, staticProperties) {
+ var facts = 0 /* None */;
+ if (ts.some(staticProperties))
+ facts |= 1 /* HasStaticInitializedProperties */;
+ if (ts.getClassExtendsHeritageClauseElement(node))
+ facts |= 64 /* HasExtendsClause */;
+ if (shouldEmitDecorateCallForClass(node))
+ facts |= 2 /* HasConstructorDecorators */;
+ if (ts.childIsDecorated(node))
+ facts |= 4 /* HasMemberDecorators */;
+ if (isExportOfNamespace(node))
+ facts |= 8 /* IsExportOfNamespace */;
+ else if (isDefaultExternalModuleExport(node))
+ facts |= 32 /* IsDefaultExternalExport */;
+ else if (isNamedExternalModuleExport(node))
+ facts |= 16 /* IsNamedExternalExport */;
+ if (languageVersion <= 1 /* ES5 */ && (facts & 7 /* MayNeedImmediatelyInvokedFunctionExpression */))
+ facts |= 128 /* UseImmediatelyInvokedFunctionExpression */;
+ return facts;
+ }
/**
* Transforms a class declaration with TypeScript syntax into compatible ES6.
*
@@ -49170,51 +51110,80 @@ var ts;
*/
function visitClassDeclaration(node) {
var staticProperties = getInitializedProperties(node, /*isStatic*/ true);
- var hasExtendsClause = ts.getClassExtendsHeritageClauseElement(node) !== undefined;
- var isDecoratedClass = shouldEmitDecorateCallForClass(node);
- // emit name if
- // - node has a name
- // - node has static initializers
- // - node has a member that is decorated
- //
- var name = node.name;
- if (!name && (staticProperties.length > 0 || ts.childIsDecorated(node))) {
- name = ts.getGeneratedNameForNode(node);
- }
- var classStatement = isDecoratedClass
- ? createClassDeclarationHeadWithDecorators(node, name, hasExtendsClause)
- : createClassDeclarationHeadWithoutDecorators(node, name, hasExtendsClause, staticProperties.length > 0);
+ var facts = getClassFacts(node, staticProperties);
+ if (facts & 128 /* UseImmediatelyInvokedFunctionExpression */) {
+ context.startLexicalEnvironment();
+ }
+ var name = node.name || (facts & 5 /* NeedsName */ ? ts.getGeneratedNameForNode(node) : undefined);
+ var classStatement = facts & 2 /* HasConstructorDecorators */
+ ? createClassDeclarationHeadWithDecorators(node, name, facts)
+ : createClassDeclarationHeadWithoutDecorators(node, name, facts);
var statements = [classStatement];
// Emit static property assignment. Because classDeclaration is lexically evaluated,
// it is safe to emit static property assignment after classDeclaration
// From ES6 specification:
// HasLexicalDeclaration (N) : Determines if the argument identifier has a binding in this environment record that was created using
// a lexical declaration such as a LexicalDeclaration or a ClassDeclaration.
- if (staticProperties.length) {
- addInitializedPropertyStatements(statements, staticProperties, ts.getLocalName(node));
+ if (facts & 1 /* HasStaticInitializedProperties */) {
+ addInitializedPropertyStatements(statements, staticProperties, facts & 128 /* UseImmediatelyInvokedFunctionExpression */ ? ts.getInternalName(node) : ts.getLocalName(node));
}
// Write any decorators of the node.
addClassElementDecorationStatements(statements, node, /*isStatic*/ false);
addClassElementDecorationStatements(statements, node, /*isStatic*/ true);
addConstructorDecorationStatement(statements, node);
+ if (facts & 128 /* UseImmediatelyInvokedFunctionExpression */) {
+ // When we emit a TypeScript class down to ES5, we must wrap it in an IIFE so that the
+ // 'es2015' transformer can properly nest static initializers and decorators. The result
+ // looks something like:
+ //
+ // var C = function () {
+ // class C {
+ // }
+ // C.static_prop = 1;
+ // return C;
+ // }();
+ //
+ var closingBraceLocation = ts.createTokenRange(ts.skipTrivia(currentSourceFile.text, node.members.end), 18 /* CloseBraceToken */);
+ var localName = ts.getInternalName(node);
+ // The following partially-emitted expression exists purely to align our sourcemap
+ // emit with the original emitter.
+ var outer = ts.createPartiallyEmittedExpression(localName);
+ outer.end = closingBraceLocation.end;
+ ts.setEmitFlags(outer, 1536 /* NoComments */);
+ var statement = ts.createReturn(outer);
+ statement.pos = closingBraceLocation.pos;
+ ts.setEmitFlags(statement, 1536 /* NoComments */ | 384 /* NoTokenSourceMaps */);
+ statements.push(statement);
+ ts.addRange(statements, context.endLexicalEnvironment());
+ var varStatement = ts.createVariableStatement(
+ /*modifiers*/ undefined, ts.createVariableDeclarationList([
+ ts.createVariableDeclaration(ts.getLocalName(node, /*allowComments*/ false, /*allowSourceMaps*/ false),
+ /*type*/ undefined, ts.createImmediatelyInvokedFunctionExpression(statements))
+ ]));
+ ts.setOriginalNode(varStatement, node);
+ ts.setCommentRange(varStatement, node);
+ ts.setSourceMapRange(varStatement, ts.moveRangePastDecorators(node));
+ ts.startOnNewLine(varStatement);
+ statements = [varStatement];
+ }
// If the class is exported as part of a TypeScript namespace, emit the namespace export.
// Otherwise, if the class was exported at the top level and was decorated, emit an export
// declaration or export default for the class.
- if (isNamespaceExport(node)) {
+ if (facts & 8 /* IsExportOfNamespace */) {
addExportMemberAssignment(statements, node);
}
- else if (isDecoratedClass) {
- if (isDefaultExternalModuleExport(node)) {
+ else if (facts & 128 /* UseImmediatelyInvokedFunctionExpression */ || facts & 2 /* HasConstructorDecorators */) {
+ if (facts & 32 /* IsDefaultExternalExport */) {
statements.push(ts.createExportDefault(ts.getLocalName(node, /*allowComments*/ false, /*allowSourceMaps*/ true)));
}
- else if (isNamedExternalModuleExport(node)) {
+ else if (facts & 16 /* IsNamedExternalExport */) {
statements.push(ts.createExternalModuleExport(ts.getLocalName(node, /*allowComments*/ false, /*allowSourceMaps*/ true)));
}
}
if (statements.length > 1) {
// Add a DeclarationMarker as a marker for the end of the declaration
statements.push(ts.createEndOfDeclarationMarker(node));
- ts.setEmitFlags(classStatement, ts.getEmitFlags(classStatement) | 2097152 /* HasEndOfDeclarationMarker */);
+ ts.setEmitFlags(classStatement, ts.getEmitFlags(classStatement) | 4194304 /* HasEndOfDeclarationMarker */);
}
return ts.singleOrMany(statements);
}
@@ -49223,20 +51192,23 @@ var ts;
*
* @param node A ClassDeclaration node.
* @param name The name of the class.
- * @param hasExtendsClause A value indicating whether the class has an extends clause.
- * @param hasStaticProperties A value indicating whether the class has static properties.
+ * @param facts Precomputed facts about the class.
*/
- function createClassDeclarationHeadWithoutDecorators(node, name, hasExtendsClause, hasStaticProperties) {
+ function createClassDeclarationHeadWithoutDecorators(node, name, facts) {
// ${modifiers} class ${name} ${heritageClauses} {
// ${members}
// }
+ // we do not emit modifiers on the declaration if we are emitting an IIFE
+ var modifiers = !(facts & 128 /* UseImmediatelyInvokedFunctionExpression */)
+ ? ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier)
+ : undefined;
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));
+ /*decorators*/ undefined, modifiers, name,
+ /*typeParameters*/ undefined, ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause), transformClassMembers(node, (facts & 64 /* HasExtendsClause */) !== 0));
// 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) {
+ if (facts & 1 /* HasStaticInitializedProperties */) {
emitFlags |= 32 /* NoTrailingSourceMap */;
}
ts.setTextRange(classDeclaration, node);
@@ -49247,13 +51219,8 @@ var ts;
/**
* Transforms a decorated class declaration and appends the resulting statements. If
* the class requires an alias to avoid issues with double-binding, the alias is returned.
- *
- * @param statements A statement list to which to add the declaration.
- * @param node A ClassDeclaration node.
- * @param name The name of the class.
- * @param hasExtendsClause A value indicating whether the class has an extends clause.
*/
- function createClassDeclarationHeadWithDecorators(node, name, hasExtendsClause) {
+ function createClassDeclarationHeadWithDecorators(node, name, facts) {
// When we emit an ES6 class that has a class decorator, we must tailor the
// emit to certain specific cases.
//
@@ -49346,7 +51313,7 @@ var ts;
// ${members}
// }
var heritageClauses = ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause);
- var members = transformClassMembers(node, hasExtendsClause);
+ var members = transformClassMembers(node, (facts & 64 /* HasExtendsClause */) !== 0);
var classExpression = ts.createClassExpression(/*modifiers*/ undefined, name, /*typeParameters*/ undefined, heritageClauses, members);
ts.setOriginalNode(classExpression, node);
ts.setTextRange(classExpression, location);
@@ -49390,7 +51357,7 @@ var ts;
}
// To preserve the behavior of the old emitter, we explicitly indent
// the body of a class with static initializers.
- ts.setEmitFlags(classExpression, 32768 /* Indented */ | ts.getEmitFlags(classExpression));
+ ts.setEmitFlags(classExpression, 65536 /* Indented */ | ts.getEmitFlags(classExpression));
expressions.push(ts.startOnNewLine(ts.createAssignment(temp, classExpression)));
ts.addRange(expressions, generateInitializedPropertyExpressions(staticProperties, temp));
expressions.push(ts.startOnNewLine(temp));
@@ -49847,8 +51814,8 @@ var ts;
function generateClassElementDecorationExpressions(node, isStatic) {
var members = getDecoratedClassElements(node, isStatic);
var expressions;
- for (var _i = 0, members_2 = members; _i < members_2.length; _i++) {
- var member = members_2[_i];
+ for (var _i = 0, members_3 = members; _i < members_3.length; _i++) {
+ var member = members_3[_i];
var expression = generateClassElementDecorationExpression(node, member);
if (expression) {
if (!expressions) {
@@ -50216,21 +52183,17 @@ var ts;
return ts.createIdentifier("Object");
}
function serializeUnionOrIntersectionType(node) {
+ // Note when updating logic here also update getEntityNameForDecoratorMetadata
+ // so that aliases can be marked as referenced
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") {
+ if (ts.isIdentifier(serializedIndividual) && serializedIndividual.text === "Object") {
// One of the individual is global object, return immediately
return serializedIndividual;
}
- else if (serializedUnion && !ts.isVoidExpression(serializedUnion)) {
+ else if (serializedUnion) {
// Different types
if (!ts.isIdentifier(serializedUnion) ||
!ts.isIdentifier(serializedIndividual) ||
@@ -50521,7 +52484,7 @@ var ts;
/*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)) {
+ if (isExportOfNamespace(node)) {
var statements = [updated];
addExportMemberAssignment(statements, node);
return statements;
@@ -50591,7 +52554,7 @@ var ts;
* - The node is exported from a TypeScript namespace.
*/
function visitVariableStatement(node) {
- if (isNamespaceExport(node)) {
+ if (isExportOfNamespace(node)) {
var variables = ts.getInitializedVariables(node.declarationList);
if (variables.length === 0) {
// elide statement if there are no initialized variables.
@@ -50760,7 +52723,12 @@ 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.setTextRange(ts.createStatement(ts.setTextRange(ts.createAssignment(ts.createElementAccess(currentNamespaceContainerName, ts.createAssignment(ts.createElementAccess(currentNamespaceContainerName, name), transformEnumMemberDeclarationValue(member))), name), member)), member);
+ var valueExpression = transformEnumMemberDeclarationValue(member);
+ var innerAssignment = ts.createAssignment(ts.createElementAccess(currentNamespaceContainerName, name), valueExpression);
+ var outerAssignment = valueExpression.kind === 9 /* StringLiteral */ ?
+ innerAssignment :
+ ts.createAssignment(ts.createElementAccess(currentNamespaceContainerName, innerAssignment), name);
+ return ts.setTextRange(ts.createStatement(ts.setTextRange(outerAssignment, member)), member);
}
/**
* Transforms the value of an enum member.
@@ -50795,7 +52763,7 @@ var ts;
* or `exports.x`).
*/
function hasNamespaceQualifiedExportName(node) {
- return isNamespaceExport(node)
+ return isExportOfNamespace(node)
|| (isExternalModuleExport(node)
&& moduleKind !== ts.ModuleKind.ES2015
&& moduleKind !== ts.ModuleKind.System);
@@ -50835,10 +52803,12 @@ var ts;
* Adds a leading VariableStatement for a enum or module declaration.
*/
function addVarForEnumOrModuleDeclaration(statements, node) {
- // Emit a variable statement for the module.
- var statement = ts.createVariableStatement(ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), [
+ // Emit a variable statement for the module. We emit top-level enums as a `var`
+ // declaration to avoid static errors in global scripts scripts due to redeclaration.
+ // enums in any other scope are emitted as a `let` declaration.
+ var statement = ts.createVariableStatement(ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), ts.createVariableDeclarationList([
ts.createVariableDeclaration(ts.getLocalName(node, /*allowComments*/ false, /*allowSourceMaps*/ true))
- ]);
+ ], currentScope.kind === 265 /* SourceFile */ ? 0 /* None */ : 1 /* Let */));
ts.setOriginalNode(statement, node);
recordEmittedDeclarationInScope(node);
if (isFirstEmittedDeclarationInScope(node)) {
@@ -50868,7 +52838,7 @@ var ts;
// })(m1 || (m1 = {})); // trailing comment module
//
ts.setCommentRange(statement, node);
- ts.setEmitFlags(statement, 1024 /* NoTrailingComments */ | 2097152 /* HasEndOfDeclarationMarker */);
+ ts.setEmitFlags(statement, 1024 /* NoTrailingComments */ | 4194304 /* HasEndOfDeclarationMarker */);
statements.push(statement);
return true;
}
@@ -50878,7 +52848,7 @@ var ts;
// begin/end semantics of the declararation and to properly handle exports
// we wrap the leading variable declaration in a `MergeDeclarationMarker`.
var mergeMarker = ts.createMergeDeclarationMarker(statement);
- ts.setEmitFlags(mergeMarker, 1536 /* NoComments */ | 2097152 /* HasEndOfDeclarationMarker */);
+ ts.setEmitFlags(mergeMarker, 1536 /* NoComments */ | 4194304 /* HasEndOfDeclarationMarker */);
statements.push(mergeMarker);
return false;
}
@@ -51095,7 +53065,7 @@ var ts;
function visitExportDeclaration(node) {
if (!node.exportClause) {
// Elide a star export if the module it references does not export a value.
- return resolver.moduleExportsSomeValue(node.moduleSpecifier) ? node : undefined;
+ return compilerOptions.isolatedModules || resolver.moduleExportsSomeValue(node.moduleSpecifier) ? node : undefined;
}
if (!resolver.isValueAliasDeclaration(node)) {
// Elide the export declaration if it does not export a value.
@@ -51159,7 +53129,7 @@ var ts;
}
var moduleReference = ts.createExpressionFromEntityName(node.moduleReference);
ts.setEmitFlags(moduleReference, 1536 /* NoComments */ | 2048 /* NoNestedComments */);
- if (isNamedExternalModuleExport(node) || !isNamespaceExport(node)) {
+ if (isNamedExternalModuleExport(node) || !isExportOfNamespace(node)) {
// export var ${name} = ${moduleReference};
// var ${name} = ${moduleReference};
return ts.setOriginalNode(ts.setTextRange(ts.createVariableStatement(ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), ts.createVariableDeclarationList([
@@ -51177,7 +53147,7 @@ var ts;
*
* @param node The node to test.
*/
- function isNamespaceExport(node) {
+ function isExportOfNamespace(node) {
return currentNamespace !== undefined && ts.hasModifier(node, 1 /* Export */);
}
/**
@@ -51381,10 +53351,10 @@ var ts;
if (declaration) {
var classAlias = classAliases[declaration.id];
if (classAlias) {
- var clone_2 = ts.getSynthesizedClone(classAlias);
- ts.setSourceMapRange(clone_2, node);
- ts.setCommentRange(clone_2, node);
- return clone_2;
+ var clone_1 = ts.getSynthesizedClone(classAlias);
+ ts.setSourceMapRange(clone_1, node);
+ ts.setCommentRange(clone_1, node);
+ return clone_1;
}
}
}
@@ -51524,7 +53494,7 @@ var ts;
context.onSubstituteNode = onSubstituteNode;
return transformSourceFile;
function transformSourceFile(node) {
- if (ts.isDeclarationFile(node)) {
+ if (node.isDeclarationFile) {
return node;
}
currentSourceFile = node;
@@ -51816,7 +53786,7 @@ var ts;
/*parameters*/ [],
/*type*/ undefined, body);
// Mark this node as originally an async function
- (generatorFunc.emitNode || (generatorFunc.emitNode = {})).flags |= 131072 /* AsyncFunctionBody */;
+ (generatorFunc.emitNode || (generatorFunc.emitNode = {})).flags |= 262144 /* AsyncFunctionBody */;
return ts.createCall(ts.getHelperName("__awaiter"),
/*typeArguments*/ undefined, [
ts.createThis(),
@@ -51861,7 +53831,7 @@ var ts;
var enclosingSuperContainerFlags = 0;
return transformSourceFile;
function transformSourceFile(node) {
- if (ts.isDeclarationFile(node)) {
+ if (node.isDeclarationFile) {
return node;
}
var visited = ts.visitEachChild(node, visitor, context);
@@ -51929,21 +53899,15 @@ var ts;
}
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])),
+ return ts.setOriginalNode(ts.setTextRange(ts.createYield(createAwaitHelper(context, ts.visitNode(node.expression, visitor, ts.isExpression))),
/*location*/ node), node);
}
return ts.visitEachChild(node, visitor, context);
}
function visitYieldExpression(node) {
- if (enclosingFunctionFlags & 2 /* Async */ && enclosingFunctionFlags & 1 /* Generator */) {
+ if (enclosingFunctionFlags & 2 /* Async */ && enclosingFunctionFlags & 1 /* Generator */ && node.asteriskToken) {
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.setOriginalNode(ts.setTextRange(ts.createYield(createAwaitHelper(context, ts.updateYield(node, node.asteriskToken, createAsyncDelegatorHelper(context, createAsyncValuesHelper(context, expression, expression), expression)))), node), node);
}
return ts.visitEachChild(node, visitor, context);
}
@@ -52093,6 +54057,11 @@ var ts;
return ts.setEmitFlags(ts.setTextRange(ts.createBlock(ts.setTextRange(ts.createNodeArray(statements), statementsLocation),
/*multiLine*/ true), bodyLocation), 48 /* NoSourceMap */ | 384 /* NoTokenSourceMaps */);
}
+ function createDownlevelAwait(expression) {
+ return enclosingFunctionFlags & 1 /* Generator */
+ ? ts.createYield(/*asteriskToken*/ undefined, createAwaitHelper(context, expression))
+ : ts.createAwait(expression);
+ }
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);
@@ -52100,24 +54069,21 @@ var ts;
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, []));
+ var callValues = createAsyncValuesHelper(context, expression, /*location*/ node.expression);
+ var callNext = ts.createCall(ts.createPropertyAccess(iterator, "next"), /*typeArguments*/ undefined, []);
+ var getDone = ts.createPropertyAccess(result, "done");
+ var getValue = ts.createPropertyAccess(result, "value");
+ var callReturn = ts.createFunctionCall(returnMethod, iterator, []);
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"))),
+ ts.setTextRange(ts.createVariableDeclaration(iterator, /*type*/ undefined, callValues), node.expression),
+ ts.createVariableDeclaration(result)
+ ]), node.expression), 2097152 /* NoHoisting */),
+ /*condition*/ ts.createComma(ts.createAssignment(result, createDownlevelAwait(callNext)), ts.createLogicalNot(getDone)),
+ /*incrementor*/ undefined,
+ /*statement*/ convertForOfStatementHead(node, createDownlevelAwait(getValue))),
/*location*/ node), 256 /* NoTokenTrailingSourceMaps */);
return ts.createTry(ts.createBlock([
ts.restoreEnclosingLabel(forStatement, outermostLabeledStatement)
@@ -52128,13 +54094,7 @@ var ts;
]), 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 */)
+ ts.setEmitFlags(ts.createIf(ts.createLogicalAnd(ts.createLogicalAnd(result, ts.createLogicalNot(getDone)), ts.createAssignment(returnMethod, ts.createPropertyAccess(iterator, "return"))), ts.createStatement(createDownlevelAwait(callReturn))), 1 /* SingleLine */)
]),
/*catchClause*/ undefined,
/*finallyBlock*/ ts.setEmitFlags(ts.createBlock([
@@ -52290,7 +54250,7 @@ var ts;
if (ts.some(declarations)) {
var statement = ts.createVariableStatement(
/*modifiers*/ undefined, ts.createVariableDeclarationList(declarations));
- ts.setEmitFlags(statement, 524288 /* CustomPrologue */);
+ ts.setEmitFlags(statement, 1048576 /* CustomPrologue */);
statements = ts.append(statements, statement);
}
}
@@ -52420,15 +54380,25 @@ var ts;
/*typeArguments*/ undefined, attributesSegments);
}
ts.createAssignHelper = createAssignHelper;
+ var awaitHelper = {
+ name: "typescript:await",
+ scoped: false,
+ text: "\n var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); }\n "
+ };
+ function createAwaitHelper(context, expression) {
+ context.requestEmitHelper(awaitHelper);
+ return ts.createCall(ts.getHelperName("__await"), /*typeArguments*/ undefined, [expression]);
+ }
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\" ? send : fulfill, reject); }\n function send(value) { settle(c[2], { value: 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 "
+ 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 || []), i, q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n };\n "
};
function createAsyncGeneratorHelper(context, generatorFunc) {
+ context.requestEmitHelper(awaitHelper);
context.requestEmitHelper(asyncGeneratorHelper);
// Mark this node as originally an async function
- (generatorFunc.emitNode || (generatorFunc.emitNode = {})).flags |= 131072 /* AsyncFunctionBody */;
+ (generatorFunc.emitNode || (generatorFunc.emitNode = {})).flags |= 262144 /* AsyncFunctionBody */;
return ts.createCall(ts.getHelperName("__asyncGenerator"),
/*typeArguments*/ undefined, [
ts.createThis(),
@@ -52439,11 +54409,11 @@ var ts;
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 }; }) }, p;\n return o = __asyncValues(o), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { return function (v) { return v = p && n === \"throw\" ? f(v) : p && v.done ? v : { value: p ? [\"yield\", v.value] : [\"await\", (o[n] || f).call(o, v)], done: false }, p = !p, v; }; }\n };\n "
+ text: "\n var __asyncDelegator = (this && this.__asyncDelegator) || function (o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { if (o[n]) i[n] = function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; }; }\n };\n "
};
function createAsyncDelegatorHelper(context, expression, location) {
+ context.requestEmitHelper(awaitHelper);
context.requestEmitHelper(asyncDelegator);
- context.requestEmitHelper(asyncValues);
return ts.setTextRange(ts.createCall(ts.getHelperName("__asyncDelegator"),
/*typeArguments*/ undefined, [expression]), location);
}
@@ -52473,7 +54443,7 @@ var ts;
* @param node A SourceFile node.
*/
function transformSourceFile(node) {
- if (ts.isDeclarationFile(node)) {
+ if (node.isDeclarationFile) {
return node;
}
var visited = ts.visitEachChild(node, visitor, context);
@@ -52958,7 +54928,7 @@ var ts;
var hoistVariableDeclaration = context.hoistVariableDeclaration;
return transformSourceFile;
function transformSourceFile(node) {
- if (ts.isDeclarationFile(node)) {
+ if (node.isDeclarationFile) {
return node;
}
return ts.visitEachChild(node, visitor, context);
@@ -53165,7 +55135,7 @@ var ts;
var enabledSubstitutions;
return transformSourceFile;
function transformSourceFile(node) {
- if (ts.isDeclarationFile(node)) {
+ if (node.isDeclarationFile) {
return node;
}
currentSourceFile = node;
@@ -53202,11 +55172,58 @@ var ts;
&& node.kind === 219 /* ReturnStatement */
&& !node.expression;
}
+ function isClassLikeVariableStatement(node) {
+ if (!ts.isVariableStatement(node))
+ return false;
+ var variable = ts.singleOrUndefined(node.declarationList.declarations);
+ return variable
+ && variable.initializer
+ && ts.isIdentifier(variable.name)
+ && (ts.isClassLike(variable.initializer)
+ || (ts.isAssignmentExpression(variable.initializer)
+ && ts.isIdentifier(variable.initializer.left)
+ && ts.isClassLike(variable.initializer.right)));
+ }
+ function isTypeScriptClassWrapper(node) {
+ var call = ts.tryCast(node, ts.isCallExpression);
+ if (!call || ts.isParseTreeNode(call) ||
+ ts.some(call.typeArguments) ||
+ ts.some(call.arguments)) {
+ return false;
+ }
+ var func = ts.tryCast(ts.skipOuterExpressions(call.expression), ts.isFunctionExpression);
+ if (!func || ts.isParseTreeNode(func) ||
+ ts.some(func.typeParameters) ||
+ ts.some(func.parameters) ||
+ func.type ||
+ !func.body) {
+ return false;
+ }
+ var statements = func.body.statements;
+ if (statements.length < 2) {
+ return false;
+ }
+ var firstStatement = statements[0];
+ if (ts.isParseTreeNode(firstStatement) ||
+ !ts.isClassLike(firstStatement) &&
+ !isClassLikeVariableStatement(firstStatement)) {
+ return false;
+ }
+ var lastStatement = ts.elementAt(statements, -1);
+ var returnStatement = ts.tryCast(ts.isVariableStatement(lastStatement) ? ts.elementAt(statements, -2) : lastStatement, ts.isReturnStatement);
+ if (!returnStatement ||
+ !returnStatement.expression ||
+ !ts.isIdentifier(ts.skipOuterExpressions(returnStatement.expression))) {
+ return false;
+ }
+ return true;
+ }
function shouldVisitNode(node) {
return (node.transformFlags & 128 /* ContainsES2015 */) !== 0
|| convertedLoopState !== undefined
|| (hierarchyFacts & 4096 /* ConstructorWithCapturedSuper */ && ts.isStatement(node))
- || (ts.isIterationStatement(node, /*lookInLabeledStatements*/ false) && shouldConvertIterationStatementBody(node));
+ || (ts.isIterationStatement(node, /*lookInLabeledStatements*/ false) && shouldConvertIterationStatementBody(node))
+ || isTypeScriptClassWrapper(node);
}
function visitor(node) {
if (shouldVisitNode(node)) {
@@ -53483,10 +55500,10 @@ var ts;
statements.push(exportStatement);
}
var emitFlags = ts.getEmitFlags(node);
- if ((emitFlags & 2097152 /* HasEndOfDeclarationMarker */) === 0) {
+ if ((emitFlags & 4194304 /* HasEndOfDeclarationMarker */) === 0) {
// Add a DeclarationMarker as a marker for the end of the declaration
statements.push(ts.createEndOfDeclarationMarker(node));
- ts.setEmitFlags(statement, emitFlags | 2097152 /* HasEndOfDeclarationMarker */);
+ ts.setEmitFlags(statement, emitFlags | 4194304 /* HasEndOfDeclarationMarker */);
}
return ts.singleOrMany(statements);
}
@@ -53548,8 +55565,8 @@ var ts;
// To preserve the behavior of the old emitter, we explicitly indent
// the body of the function here if it was requested in an earlier
// transformation.
- if (ts.getEmitFlags(node) & 32768 /* Indented */) {
- ts.setEmitFlags(classFunction, 32768 /* Indented */);
+ if (ts.getEmitFlags(node) & 65536 /* Indented */) {
+ ts.setEmitFlags(classFunction, 65536 /* Indented */);
}
// "inner" and "outer" below are added purely to preserve source map locations from
// the old emitter
@@ -53578,7 +55595,7 @@ var ts;
addClassMembers(statements, node);
// Create a synthetic text range for the return statement.
var closingBraceLocation = ts.createTokenRange(ts.skipTrivia(currentText, node.members.end), 18 /* CloseBraceToken */);
- var localName = ts.getLocalName(node);
+ var localName = ts.getInternalName(node);
// The following partially-emitted expression exists purely to align our sourcemap
// emit with the original emitter.
var outer = ts.createPartiallyEmittedExpression(localName);
@@ -53622,7 +55639,7 @@ var ts;
var constructorFunction = ts.createFunctionDeclaration(
/*decorators*/ undefined,
/*modifiers*/ undefined,
- /*asteriskToken*/ undefined, ts.getDeclarationName(node),
+ /*asteriskToken*/ undefined, ts.getInternalName(node),
/*typeParameters*/ undefined, transformConstructorParameters(constructor, hasSynthesizedSuper),
/*type*/ undefined, transformConstructorBody(constructor, node, extendsClauseElement, hasSynthesizedSuper));
ts.setTextRange(constructorFunction, constructor || node);
@@ -53912,10 +55929,10 @@ var ts;
// of an initializer, we must emit that expression to preserve side effects.
if (name.elements.length > 0) {
statements.push(ts.setEmitFlags(ts.createVariableStatement(
- /*modifiers*/ undefined, ts.createVariableDeclarationList(ts.flattenDestructuringBinding(parameter, visitor, context, 0 /* All */, temp))), 524288 /* CustomPrologue */));
+ /*modifiers*/ undefined, ts.createVariableDeclarationList(ts.flattenDestructuringBinding(parameter, visitor, context, 0 /* All */, temp))), 1048576 /* CustomPrologue */));
}
else if (initializer) {
- statements.push(ts.setEmitFlags(ts.createStatement(ts.createAssignment(temp, ts.visitNode(initializer, visitor, ts.isExpression))), 524288 /* CustomPrologue */));
+ statements.push(ts.setEmitFlags(ts.createStatement(ts.createAssignment(temp, ts.visitNode(initializer, visitor, ts.isExpression))), 1048576 /* CustomPrologue */));
}
}
/**
@@ -53933,7 +55950,7 @@ var ts;
]), parameter), 1 /* SingleLine */ | 32 /* NoTrailingSourceMap */ | 384 /* NoTokenSourceMaps */));
statement.startsOnNewLine = true;
ts.setTextRange(statement, parameter);
- ts.setEmitFlags(statement, 384 /* NoTokenSourceMaps */ | 32 /* NoTrailingSourceMap */ | 524288 /* CustomPrologue */);
+ ts.setEmitFlags(statement, 384 /* NoTokenSourceMaps */ | 32 /* NoTrailingSourceMap */ | 1048576 /* CustomPrologue */);
statements.push(statement);
}
/**
@@ -53974,7 +55991,7 @@ var ts;
ts.createVariableDeclaration(declarationName,
/*type*/ undefined, ts.createArrayLiteral([]))
])),
- /*location*/ parameter), 524288 /* CustomPrologue */));
+ /*location*/ parameter), 1048576 /* CustomPrologue */));
// for (var _i = restIndex; _i < arguments.length; _i++) {
// param[_i - restIndex] = arguments[_i];
// }
@@ -53986,7 +56003,7 @@ var ts;
: ts.createSubtract(temp, ts.createLiteral(restIndex))), ts.createElementAccess(ts.createIdentifier("arguments"), temp))),
/*location*/ parameter))
]));
- ts.setEmitFlags(forStatement, 524288 /* CustomPrologue */);
+ ts.setEmitFlags(forStatement, 1048576 /* CustomPrologue */);
ts.startOnNewLine(forStatement);
statements.push(forStatement);
}
@@ -54008,7 +56025,7 @@ var ts;
ts.createVariableDeclaration("_this",
/*type*/ undefined, initializer)
]));
- ts.setEmitFlags(captureThisStatement, 1536 /* NoComments */ | 524288 /* CustomPrologue */);
+ ts.setEmitFlags(captureThisStatement, 1536 /* NoComments */ | 1048576 /* CustomPrologue */);
ts.setTextRange(captureThisStatement, originalStatement);
ts.setSourceMapRange(captureThisStatement, node);
statements.push(captureThisStatement);
@@ -54212,7 +56229,7 @@ var ts;
* @param node a FunctionExpression node.
*/
function visitFunctionExpression(node) {
- var ancestorFacts = ts.getEmitFlags(node) & 131072 /* AsyncFunctionBody */
+ var ancestorFacts = ts.getEmitFlags(node) & 262144 /* AsyncFunctionBody */
? enterSubtree(16278 /* AsyncFunctionBodyExcludes */, 69 /* AsyncFunctionBodyIncludes */)
: enterSubtree(16286 /* FunctionExcludes */, 65 /* FunctionIncludes */);
var savedConvertedLoopState = convertedLoopState;
@@ -54443,12 +56460,13 @@ var ts;
}
else {
assignment = ts.createBinary(decl.name, 58 /* EqualsToken */, ts.visitNode(decl.initializer, visitor, ts.isExpression));
+ ts.setTextRange(assignment, decl);
}
assignments = ts.append(assignments, assignment);
}
}
if (assignments) {
- updated = ts.setTextRange(ts.createStatement(ts.reduceLeft(assignments, function (acc, v) { return ts.createBinary(v, 26 /* CommaToken */, acc); })), node);
+ updated = ts.setTextRange(ts.createStatement(ts.inlineExpressions(assignments)), node);
}
else {
// none of declarations has initializer - the entire variable statement can be deleted
@@ -54471,9 +56489,9 @@ var ts;
if (node.flags & 3 /* BlockScoped */) {
enableSubstitutionsForBlockScopedBindings();
}
- var declarations = ts.flatten(ts.map(node.declarations, node.flags & 1 /* Let */
+ var declarations = ts.flatMap(node.declarations, node.flags & 1 /* Let */
? visitVariableDeclarationInLetDeclarationList
- : visitVariableDeclaration));
+ : visitVariableDeclaration);
var declarationList = ts.createVariableDeclarationList(declarations);
ts.setOriginalNode(declarationList, node);
ts.setTextRange(declarationList, node);
@@ -54566,9 +56584,9 @@ var ts;
return visitVariableDeclaration(node);
}
if (!node.initializer && shouldEmitExplicitInitializerForLetDeclaration(node)) {
- var clone_3 = ts.getMutableClone(node);
- clone_3.initializer = ts.createVoidZero();
- return clone_3;
+ var clone_2 = ts.getMutableClone(node);
+ clone_2.initializer = ts.createVoidZero();
+ return clone_2;
}
return ts.visitEachChild(node, visitor, context);
}
@@ -54736,7 +56754,7 @@ var ts;
/*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 */),
+ ]), node.expression), 2097152 /* 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)),
@@ -54761,7 +56779,7 @@ var ts;
/*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 */),
+ ]), node.expression), 2097152 /* NoHoisting */),
/*condition*/ ts.createLogicalNot(ts.createPropertyAccess(result, "done")),
/*incrementor*/ ts.createAssignment(result, next),
/*statement*/ convertForOfStatementHead(node, ts.createPropertyAccess(result, "value"), convertedLoopBodyStatements)),
@@ -54816,7 +56834,7 @@ var ts;
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 */));
+ var assignment = ts.createAssignment(temp, ts.setEmitFlags(ts.createObjectLiteral(ts.visitNodes(properties, visitor, ts.isObjectLiteralElementLike, 0, numInitialProperties), node.multiLine), 65536 /* Indented */));
if (node.multiLine) {
assignment.startsOnNewLine = true;
}
@@ -54940,7 +56958,7 @@ var ts;
loopBodyFlags |= 8 /* CapturesThis */;
}
if (isAsyncBlockContainingAwait) {
- loopBodyFlags |= 131072 /* AsyncFunctionBody */;
+ loopBodyFlags |= 262144 /* AsyncFunctionBody */;
}
var convertedLoopVariable = ts.createVariableStatement(
/*modifiers*/ undefined, ts.setEmitFlags(ts.createVariableDeclarationList([
@@ -54950,7 +56968,7 @@ var ts;
/*name*/ undefined,
/*typeParameters*/ undefined, loopParameters,
/*type*/ undefined, loopBody), loopBodyFlags))
- ]), 1048576 /* NoHoisting */));
+ ]), 2097152 /* NoHoisting */));
var statements = [convertedLoopVariable];
var extraVariableDeclarations;
// propagate state from the inner loop to the outer loop if necessary
@@ -55019,17 +57037,17 @@ var ts;
loop = convert(node, outermostLabeledStatement, convertedLoopBodyStatements);
}
else {
- var clone_4 = ts.getMutableClone(node);
+ var clone_3 = ts.getMutableClone(node);
// clean statement part
- clone_4.statement = undefined;
+ clone_3.statement = undefined;
// visit childnodes to transform initializer/condition/incrementor parts
- clone_4 = ts.visitEachChild(clone_4, visitor, context);
+ clone_3 = ts.visitEachChild(clone_3, visitor, context);
// set loop statement
- clone_4.statement = ts.createBlock(convertedLoopBodyStatements, /*multiline*/ true);
+ clone_3.statement = ts.createBlock(convertedLoopBodyStatements, /*multiline*/ true);
// reset and re-aggregate the transform flags
- clone_4.transformFlags = 0;
- ts.aggregateTransformFlags(clone_4);
- loop = ts.restoreEnclosingLabel(clone_4, outermostLabeledStatement, convertedLoopState && resetLabel);
+ clone_3.transformFlags = 0;
+ ts.aggregateTransformFlags(clone_3);
+ loop = ts.restoreEnclosingLabel(clone_3, outermostLabeledStatement, convertedLoopState && resetLabel);
}
statements.push(loop);
return statements;
@@ -55056,7 +57074,7 @@ var ts;
!state.labeledNonLocalContinues;
var call = ts.createCall(loopFunctionExpressionName, /*typeArguments*/ undefined, ts.map(parameters, function (p) { return p.name; }));
var callResult = isAsyncBlockContainingAwait
- ? ts.createYield(ts.createToken(39 /* AsteriskToken */), ts.setEmitFlags(call, 4194304 /* Iterator */))
+ ? ts.createYield(ts.createToken(39 /* AsteriskToken */), ts.setEmitFlags(call, 8388608 /* Iterator */))
: call;
if (isSimpleLoop) {
statements.push(ts.createStatement(callResult));
@@ -55276,7 +57294,20 @@ var ts;
var savedConvertedLoopState = convertedLoopState;
convertedLoopState = undefined;
var ancestorFacts = enterSubtree(16286 /* FunctionExcludes */, 65 /* FunctionIncludes */);
- var updated = ts.visitEachChild(node, visitor, context);
+ var updated;
+ if (node.transformFlags & 32768 /* ContainsCapturedLexicalThis */) {
+ var parameters = ts.visitParameterList(node.parameters, visitor, context);
+ var body = transformFunctionBody(node);
+ if (node.kind === 153 /* GetAccessor */) {
+ updated = ts.updateGetAccessor(node, node.decorators, node.modifiers, node.name, parameters, node.type, body);
+ }
+ else {
+ updated = ts.updateSetAccessor(node, node.decorators, node.modifiers, node.name, parameters, body);
+ }
+ }
+ else {
+ updated = ts.visitEachChild(node, visitor, context);
+ }
exitSubtree(ancestorFacts, 49152 /* PropagateNewTargetMask */, 0 /* None */);
convertedLoopState = savedConvertedLoopState;
return updated;
@@ -55323,12 +57354,122 @@ var ts;
* @param node a CallExpression.
*/
function visitCallExpression(node) {
+ if (isTypeScriptClassWrapper(node)) {
+ return visitTypeScriptClassWrapper(node);
+ }
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 visitTypeScriptClassWrapper(node) {
+ // This is a call to a class wrapper function (an IIFE) created by the 'ts' transformer.
+ // The wrapper has a form similar to:
+ //
+ // (function() {
+ // class C { // 1
+ // }
+ // C.x = 1; // 2
+ // return C;
+ // }())
+ //
+ // When we transform the class, we end up with something like this:
+ //
+ // (function () {
+ // var C = (function () { // 3
+ // function C() {
+ // }
+ // return C; // 4
+ // }());
+ // C.x = 1;
+ // return C;
+ // }())
+ //
+ // We want to simplify the two nested IIFEs to end up with something like this:
+ //
+ // (function () {
+ // function C() {
+ // }
+ // C.x = 1;
+ // return C;
+ // }())
+ // We skip any outer expressions in a number of places to get to the innermost
+ // expression, but we will restore them later to preserve comments and source maps.
+ var body = ts.cast(ts.skipOuterExpressions(node.expression), ts.isFunctionExpression).body;
+ // The class statements are the statements generated by visiting the first statement of the
+ // body (1), while all other statements are added to remainingStatements (2)
+ var classStatements = ts.visitNodes(body.statements, visitor, ts.isStatement, 0, 1);
+ var remainingStatements = ts.visitNodes(body.statements, visitor, ts.isStatement, 1, body.statements.length - 1);
+ var varStatement = ts.cast(ts.firstOrUndefined(classStatements), ts.isVariableStatement);
+ // We know there is only one variable declaration here as we verified this in an
+ // earlier call to isTypeScriptClassWrapper
+ var variable = varStatement.declarationList.declarations[0];
+ var initializer = ts.skipOuterExpressions(variable.initializer);
+ // Under certain conditions, the 'ts' transformer may introduce a class alias, which
+ // we see as an assignment, for example:
+ //
+ // (function () {
+ // var C = C_1 = (function () {
+ // function C() {
+ // }
+ // C.x = function () { return C_1; }
+ // return C;
+ // }());
+ // C = C_1 = __decorate([dec], C);
+ // return C;
+ // var C_1;
+ // }())
+ //
+ var aliasAssignment = ts.tryCast(initializer, ts.isAssignmentExpression);
+ // The underlying call (3) is another IIFE that may contain a '_super' argument.
+ var call = ts.cast(aliasAssignment ? ts.skipOuterExpressions(aliasAssignment.right) : initializer, ts.isCallExpression);
+ var func = ts.cast(ts.skipOuterExpressions(call.expression), ts.isFunctionExpression);
+ var funcStatements = func.body.statements;
+ var classBodyStart = 0;
+ var classBodyEnd = -1;
+ var statements = [];
+ if (aliasAssignment) {
+ // If we have a class alias assignment, we need to move it to the down-level constructor
+ // function we generated for the class.
+ var extendsCall = ts.tryCast(funcStatements[classBodyStart], ts.isExpressionStatement);
+ if (extendsCall) {
+ statements.push(extendsCall);
+ classBodyStart++;
+ }
+ // The next statement is the function declaration.
+ statements.push(funcStatements[classBodyStart]);
+ classBodyStart++;
+ // Add the class alias following the declaration.
+ statements.push(ts.createStatement(ts.createAssignment(aliasAssignment.left, ts.cast(variable.name, ts.isIdentifier))));
+ }
+ // Find the trailing 'return' statement (4)
+ while (!ts.isReturnStatement(ts.elementAt(funcStatements, classBodyEnd))) {
+ classBodyEnd--;
+ }
+ // When we extract the statements of the inner IIFE, we exclude the 'return' statement (4)
+ // as we already have one that has been introduced by the 'ts' transformer.
+ ts.addRange(statements, funcStatements, classBodyStart, classBodyEnd);
+ if (classBodyEnd < -1) {
+ // If there were any hoisted declarations following the return statement, we should
+ // append them.
+ ts.addRange(statements, funcStatements, classBodyEnd + 1);
+ }
+ // Add the remaining statements of the outer wrapper.
+ ts.addRange(statements, remainingStatements);
+ // The 'es2015' class transform may add an end-of-declaration marker. If so we will add it
+ // after the remaining statements from the 'ts' transformer.
+ ts.addRange(statements, classStatements, /*start*/ 1);
+ // Recreate any outer parentheses or partially-emitted expressions to preserve source map
+ // and comment locations.
+ return ts.recreateOuterExpressions(node.expression, ts.recreateOuterExpressions(variable.initializer, ts.recreateOuterExpressions(aliasAssignment && aliasAssignment.right, ts.updateCall(call, ts.recreateOuterExpressions(call.expression, ts.updateFunctionExpression(func,
+ /*modifiers*/ undefined,
+ /*asteriskToken*/ undefined,
+ /*name*/ undefined,
+ /*typeParameters*/ undefined, func.parameters,
+ /*type*/ undefined, ts.updateBlock(func.body, statements))),
+ /*typeArguments*/ undefined, call.arguments))));
+ }
function visitImmediateSuperCallInBody(node) {
return visitCallExpressionWithPotentialCapturedThisAssignment(node, /*assignToCapturedThis*/ false);
}
@@ -55432,7 +57573,7 @@ var ts;
else {
if (segments.length === 1) {
var firstElement = elements[0];
- return needsUniqueCopy && ts.isSpreadExpression(firstElement) && firstElement.expression.kind !== 177 /* ArrayLiteralExpression */
+ return needsUniqueCopy && ts.isSpreadElement(firstElement) && firstElement.expression.kind !== 177 /* ArrayLiteralExpression */
? ts.createArraySlice(segments[0])
: segments[0];
}
@@ -55441,7 +57582,7 @@ var ts;
}
}
function partitionSpread(node) {
- return ts.isSpreadExpression(node)
+ return ts.isSpreadElement(node)
? visitSpanOfSpreads
: visitSpanOfNonSpreads;
}
@@ -55721,7 +57862,7 @@ var ts;
function substituteIdentifier(node) {
// Only substitute the identifier if we have enabled substitutions for block-scoped
// bindings.
- if (enabledSubstitutions & 2 /* BlockScopedBindings */) {
+ if (enabledSubstitutions & 2 /* BlockScopedBindings */ && !ts.isInternalName(node)) {
var original = ts.getParseTreeNode(node, ts.isIdentifier);
if (original && isNameOfDeclarationWithCollidingName(original)) {
return ts.setTextRange(ts.getGeneratedNameForNode(original), node);
@@ -55767,14 +57908,37 @@ var ts;
* @param node An Identifier node.
*/
function substituteExpressionIdentifier(node) {
- if (enabledSubstitutions & 2 /* BlockScopedBindings */) {
+ if (enabledSubstitutions & 2 /* BlockScopedBindings */ && !ts.isInternalName(node)) {
var declaration = resolver.getReferencedDeclarationWithCollidingName(node);
- if (declaration) {
- return ts.setTextRange(ts.getGeneratedNameForNode(declaration.name), node);
+ if (declaration && !(ts.isClassLike(declaration) && isPartOfClassBody(declaration, node))) {
+ return ts.setTextRange(ts.getGeneratedNameForNode(ts.getNameOfDeclaration(declaration)), node);
}
}
return node;
}
+ function isPartOfClassBody(declaration, node) {
+ var currentNode = ts.getParseTreeNode(node);
+ if (!currentNode || currentNode === declaration || currentNode.end <= declaration.pos || currentNode.pos >= declaration.end) {
+ // if the node has no correlation to a parse tree node, its definitely not
+ // part of the body.
+ // if the node is outside of the document range of the declaration, its
+ // definitely not part of the body.
+ return false;
+ }
+ var blockScope = ts.getEnclosingBlockScopeContainer(declaration);
+ while (currentNode) {
+ if (currentNode === blockScope || currentNode === declaration) {
+ // if we are in the enclosing block scope of the declaration, we are definitely
+ // not inside the class body.
+ return false;
+ }
+ if (ts.isClassElement(currentNode) && currentNode.parent === declaration) {
+ return true;
+ }
+ currentNode = currentNode.parent;
+ }
+ return false;
+ }
/**
* Substitutes `this` when contained within an arrow function.
*
@@ -55788,8 +57952,9 @@ var ts;
return node;
}
function getClassMemberPrefix(node, member) {
- var expression = ts.getLocalName(node);
- return ts.hasModifier(member, 32 /* Static */) ? expression : ts.createPropertyAccess(expression, "prototype");
+ return ts.hasModifier(member, 32 /* Static */)
+ ? ts.getInternalName(node)
+ : ts.createPropertyAccess(ts.getInternalName(node), "prototype");
}
function hasSynthesizedDefaultSuperCall(constructor, hasExtendsClause) {
if (!constructor || !hasExtendsClause) {
@@ -56178,8 +58343,7 @@ var ts;
var withBlockStack; // A stack containing `with` blocks.
return transformSourceFile;
function transformSourceFile(node) {
- if (ts.isDeclarationFile(node)
- || (node.transformFlags & 512 /* ContainsGenerator */) === 0) {
+ if (node.isDeclarationFile || (node.transformFlags & 512 /* ContainsGenerator */) === 0) {
return node;
}
currentSourceFile = node;
@@ -56470,7 +58634,7 @@ var ts;
}
else {
// Do not hoist custom prologues.
- if (ts.getEmitFlags(node) & 524288 /* CustomPrologue */) {
+ if (ts.getEmitFlags(node) & 1048576 /* CustomPrologue */) {
return node;
}
for (var _i = 0, _a = node.declarationList.declarations; _i < _a.length; _i++) {
@@ -56481,7 +58645,7 @@ var ts;
if (variables.length === 0) {
return undefined;
}
- return ts.createStatement(ts.inlineExpressions(ts.map(variables, transformInitializedVariable)));
+ return ts.setSourceMapRange(ts.createStatement(ts.inlineExpressions(ts.map(variables, transformInitializedVariable))), node);
}
}
/**
@@ -56587,10 +58751,10 @@ var ts;
// _a = a();
// .yield resumeLabel
// _a + %sent% + c()
- 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;
+ 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;
}
return ts.visitEachChild(node, visitor, context);
}
@@ -56728,7 +58892,7 @@ var ts;
var resumeLabel = defineLabel();
var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
if (node.asteriskToken) {
- var iterator = (ts.getEmitFlags(node.expression) & 4194304 /* Iterator */) === 0
+ var iterator = (ts.getEmitFlags(node.expression) & 8388608 /* Iterator */) === 0
? ts.createValuesHelper(context, expression, /*location*/ node)
: expression;
emitYieldStar(iterator, /*location*/ node);
@@ -56851,10 +59015,10 @@ var ts;
// .yield resumeLabel
// .mark resumeLabel
// a = _a[%sent%]
- 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;
+ 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;
}
return ts.visitEachChild(node, visitor, context);
}
@@ -56993,7 +59157,7 @@ var ts;
return undefined;
}
function transformInitializedVariable(node) {
- return ts.createAssignment(ts.getSynthesizedClone(node.name), ts.visitNode(node.initializer, visitor, ts.isExpression));
+ return ts.setSourceMapRange(ts.createAssignment(ts.setSourceMapRange(ts.getSynthesizedClone(node.name), node.name), ts.visitNode(node.initializer, visitor, ts.isExpression)), node);
}
function transformAndEmitIfStatement(node) {
if (containsYield(node)) {
@@ -57544,10 +59708,10 @@ var ts;
if (declaration) {
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;
+ var clone_6 = ts.getMutableClone(name);
+ ts.setSourceMapRange(clone_6, node);
+ ts.setCommentRange(clone_6, node);
+ return clone_6;
}
}
}
@@ -58148,7 +60312,7 @@ var ts;
/*name*/ undefined,
/*typeParameters*/ undefined, [ts.createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, state)],
/*type*/ undefined, ts.createBlock(buildResult,
- /*multiLine*/ buildResult.length > 0)), 262144 /* ReuseTempVariableScope */));
+ /*multiLine*/ buildResult.length > 0)), 524288 /* ReuseTempVariableScope */));
}
/**
* Builds the statements for the generator function body.
@@ -58625,6 +60789,7 @@ var ts;
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.
+ var needUMDDynamicImportHelper;
return transformSourceFile;
/**
* Transforms the module aspects of a SourceFile.
@@ -58632,7 +60797,7 @@ var ts;
* @param node The SourceFile node.
*/
function transformSourceFile(node) {
- if (ts.isDeclarationFile(node) || !(ts.isExternalModule(node) || compilerOptions.isolatedModules)) {
+ if (node.isDeclarationFile || !(ts.isExternalModule(node) || compilerOptions.isolatedModules || node.transformFlags & 67108864 /* ContainsDynamicImport */)) {
return node;
}
currentSourceFile = node;
@@ -58643,6 +60808,7 @@ var ts;
var updated = transformModule(node);
currentSourceFile = undefined;
currentModuleInfo = undefined;
+ needUMDDynamicImportHelper = false;
return ts.aggregateTransformFlags(updated);
}
function shouldEmitUnderscoreUnderscoreESModule() {
@@ -58669,11 +60835,12 @@ var ts;
addExportEqualsIfNeeded(statements, /*emitAsReturn*/ false);
ts.addRange(statements, endLexicalEnvironment());
var updated = ts.updateSourceFileNode(node, ts.setTextRange(ts.createNodeArray(statements), node.statements));
- if (currentModuleInfo.hasExportStarsToExportValues) {
+ if (currentModuleInfo.hasExportStarsToExportValues && !compilerOptions.importHelpers) {
// If we have any `export * from ...` declarations
// we need to inform the emitter to add the __export helper.
ts.addEmitHelper(updated, exportStarHelper);
}
+ ts.addEmitHelpers(updated, context.readEmitHelpers());
return updated;
}
/**
@@ -58872,11 +61039,14 @@ var ts;
// and merge any new lexical declarations.
ts.addRange(statements, endLexicalEnvironment());
var body = ts.createBlock(statements, /*multiLine*/ true);
- if (currentModuleInfo.hasExportStarsToExportValues) {
+ if (currentModuleInfo.hasExportStarsToExportValues && !compilerOptions.importHelpers) {
// If we have any `export * from ...` declarations
// we need to inform the emitter to add the __export helper.
ts.addEmitHelper(body, exportStarHelper);
}
+ if (needUMDDynamicImportHelper) {
+ ts.addEmitHelper(body, dynamicImportUMDHelper);
+ }
return body;
}
/**
@@ -58927,16 +61097,92 @@ var ts;
return visitFunctionDeclaration(node);
case 229 /* ClassDeclaration */:
return visitClassDeclaration(node);
- case 297 /* MergeDeclarationMarker */:
+ case 299 /* MergeDeclarationMarker */:
return visitMergeDeclarationMarker(node);
- case 298 /* EndOfDeclarationMarker */:
+ case 300 /* 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;
+ return ts.visitEachChild(node, importCallExpressionVisitor, context);
+ }
+ }
+ function importCallExpressionVisitor(node) {
+ // This visitor does not need to descend into the tree if there is no dynamic import,
+ // as export/import statements are only transformed at the top level of a file.
+ if (!(node.transformFlags & 67108864 /* ContainsDynamicImport */)) {
+ return node;
+ }
+ if (ts.isImportCall(node)) {
+ return visitImportCallExpression(node);
+ }
+ else {
+ return ts.visitEachChild(node, importCallExpressionVisitor, context);
+ }
+ }
+ function visitImportCallExpression(node) {
+ switch (compilerOptions.module) {
+ case ts.ModuleKind.AMD:
+ return transformImportCallExpressionAMD(node);
+ case ts.ModuleKind.UMD:
+ return transformImportCallExpressionUMD(node);
+ case ts.ModuleKind.CommonJS:
+ default:
+ return transformImportCallExpressionCommonJS(node);
}
}
+ function transformImportCallExpressionUMD(node) {
+ // (function (factory) {
+ // ... (regular UMD)
+ // }
+ // })(function (require, exports, useSyncRequire) {
+ // "use strict";
+ // Object.defineProperty(exports, "__esModule", { value: true });
+ // var __syncRequire = typeof module === "object" && typeof module.exports === "object";
+ // var __resolved = new Promise(function (resolve) { resolve(); });
+ // .....
+ // __syncRequire
+ // ? __resolved.then(function () { return require(x); }) /*CommonJs Require*/
+ // : new Promise(function (_a, _b) { require([x], _a, _b); }); /*Amd Require*/
+ // });
+ needUMDDynamicImportHelper = true;
+ return ts.createConditional(
+ /*condition*/ ts.createIdentifier("__syncRequire"),
+ /*whenTrue*/ transformImportCallExpressionCommonJS(node),
+ /*whenFalse*/ transformImportCallExpressionAMD(node));
+ }
+ function transformImportCallExpressionAMD(node) {
+ // improt("./blah")
+ // emit as
+ // define(["require", "exports", "blah"], function (require, exports) {
+ // ...
+ // new Promise(function (_a, _b) { require([x], _a, _b); }); /*Amd Require*/
+ // });
+ var resolve = ts.createUniqueName("resolve");
+ var reject = ts.createUniqueName("reject");
+ return ts.createNew(ts.createIdentifier("Promise"),
+ /*typeArguments*/ undefined, [ts.createFunctionExpression(
+ /*modifiers*/ undefined,
+ /*asteriskToken*/ undefined,
+ /*name*/ undefined,
+ /*typeParameters*/ undefined, [ts.createParameter(/*decorator*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, /*name*/ resolve),
+ ts.createParameter(/*decorator*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, /*name*/ reject)],
+ /*type*/ undefined, ts.createBlock([ts.createStatement(ts.createCall(ts.createIdentifier("require"),
+ /*typeArguments*/ undefined, [ts.createArrayLiteral([ts.firstOrUndefined(node.arguments) || ts.createOmittedExpression()]), resolve, reject]))]))]);
+ }
+ function transformImportCallExpressionCommonJS(node) {
+ // import("./blah")
+ // emit as
+ // Promise.resolve().then(function () { return require(x); }) /*CommonJs Require*/
+ // We have to wrap require in then callback so that require is done in asynchronously
+ // if we simply do require in resolve callback in Promise constructor. We will execute the loading immediately
+ return ts.createCall(ts.createPropertyAccess(ts.createCall(ts.createPropertyAccess(ts.createIdentifier("Promise"), "resolve"), /*typeArguments*/ undefined, /*argumentsArray*/ []), "then"),
+ /*typeArguments*/ undefined, [ts.createFunctionExpression(
+ /*modifiers*/ undefined,
+ /*asteriskToken*/ undefined,
+ /*name*/ undefined,
+ /*typeParameters*/ undefined,
+ /*parameters*/ undefined,
+ /*type*/ undefined, ts.createBlock([ts.createReturn(ts.createCall(ts.createIdentifier("require"), /*typeArguments*/ undefined, node.arguments))]))]);
+ }
/**
* Visits an ImportDeclaration node.
*
@@ -59074,12 +61320,7 @@ var ts;
}
else {
// export * from "mod";
- return ts.setTextRange(ts.createStatement(ts.createCall(ts.createIdentifier("__export"),
- /*typeArguments*/ undefined, [
- moduleKind !== ts.ModuleKind.AMD
- ? createRequireCall(node)
- : generatedName
- ])), node);
+ return ts.setTextRange(ts.createStatement(createExportStarHelper(context, moduleKind !== ts.ModuleKind.AMD ? createRequireCall(node) : generatedName)), node);
}
}
/**
@@ -59113,13 +61354,13 @@ var ts;
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),
+ /*typeParameters*/ undefined, ts.visitNodes(node.parameters, importCallExpressionVisitor),
+ /*type*/ undefined, ts.visitEachChild(node.body, importCallExpressionVisitor, context)),
/*location*/ node),
/*original*/ node));
}
else {
- statements = ts.append(statements, node);
+ statements = ts.append(statements, ts.visitEachChild(node, importCallExpressionVisitor, context));
}
if (hasAssociatedEndOfDeclarationMarker(node)) {
// Defer exports until we encounter an EndOfDeclarationMarker node
@@ -59141,10 +61382,10 @@ var ts;
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));
+ /*typeParameters*/ undefined, ts.visitNodes(node.heritageClauses, importCallExpressionVisitor), node.members), node), node));
}
else {
- statements = ts.append(statements, node);
+ statements = ts.append(statements, ts.visitEachChild(node, importCallExpressionVisitor, context));
}
if (hasAssociatedEndOfDeclarationMarker(node)) {
// Defer exports until we encounter an EndOfDeclarationMarker node
@@ -59189,7 +61430,7 @@ var ts;
}
}
else {
- statements = ts.append(statements, node);
+ statements = ts.append(statements, ts.visitEachChild(node, importCallExpressionVisitor, context));
}
if (hasAssociatedEndOfDeclarationMarker(node)) {
// Defer exports until we encounter an EndOfDeclarationMarker node
@@ -59208,13 +61449,13 @@ var ts;
*/
function transformInitializedVariable(node) {
if (ts.isBindingPattern(node.name)) {
- return ts.flattenDestructuringAssignment(node,
+ return ts.flattenDestructuringAssignment(ts.visitNode(node, importCallExpressionVisitor),
/*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);
+ /*location*/ node.name), ts.visitNode(node.initializer, importCallExpressionVisitor));
}
}
/**
@@ -59243,7 +61484,7 @@ var ts;
* @param node The node to test.
*/
function hasAssociatedEndOfDeclarationMarker(node) {
- return (ts.getEmitFlags(node) & 2097152 /* HasEndOfDeclarationMarker */) !== 0;
+ return (ts.getEmitFlags(node) & 4194304 /* HasEndOfDeclarationMarker */) !== 0;
}
/**
* Visits a DeclarationMarker used as a placeholder for the end of a transformed
@@ -59431,7 +61672,7 @@ var ts;
])
]));
}
- ts.setEmitFlags(statement, 524288 /* CustomPrologue */);
+ ts.setEmitFlags(statement, 1048576 /* CustomPrologue */);
return statement;
}
/**
@@ -59687,7 +61928,19 @@ var ts;
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 }"
+ text: "\n function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n }\n "
+ };
+ function createExportStarHelper(context, module) {
+ var compilerOptions = context.getCompilerOptions();
+ return compilerOptions.importHelpers
+ ? ts.createCall(ts.getHelperName("__exportStar"), /*typeArguments*/ undefined, [module, ts.createIdentifier("exports")])
+ : ts.createCall(ts.createIdentifier("__export"), /*typeArguments*/ undefined, [module]);
+ }
+ // emit helper for dynamic import
+ var dynamicImportUMDHelper = {
+ name: "typescript:dynamicimport-sync-require",
+ scoped: true,
+ text: "\n var __syncRequire = typeof module === \"object\" && typeof module.exports === \"object\";"
};
})(ts || (ts = {}));
/// <reference path="../../factory.ts" />
@@ -59728,9 +61981,7 @@ var ts;
* @param node The SourceFile node.
*/
function transformSourceFile(node) {
- if (ts.isDeclarationFile(node)
- || !(ts.isExternalModule(node)
- || compilerOptions.isolatedModules)) {
+ if (node.isDeclarationFile || !(ts.isEffectiveExternalModule(node, compilerOptions) || node.transformFlags & 67108864 /* ContainsDynamicImport */)) {
return node;
}
var id = ts.getOriginalNodeId(node);
@@ -60161,7 +62412,7 @@ var ts;
// Elide `export=` as it is illegal in a SystemJS module.
return undefined;
}
- var expression = ts.visitNode(node.expression, destructuringVisitor, ts.isExpression);
+ var expression = ts.visitNode(node.expression, destructuringAndImportCallVisitor, ts.isExpression);
var original = node.original;
if (original && hasAssociatedEndOfDeclarationMarker(original)) {
// Defer exports until we encounter an EndOfDeclarationMarker node
@@ -60180,11 +62431,11 @@ 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), 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)));
+ /*typeParameters*/ undefined, ts.visitNodes(node.parameters, destructuringAndImportCallVisitor, ts.isParameterDeclaration),
+ /*type*/ undefined, ts.visitNode(node.body, destructuringAndImportCallVisitor, ts.isBlock)));
}
else {
- hoistedStatements = ts.append(hoistedStatements, node);
+ hoistedStatements = ts.append(hoistedStatements, ts.visitEachChild(node, destructuringAndImportCallVisitor, context));
}
if (hasAssociatedEndOfDeclarationMarker(node)) {
// Defer exports until we encounter an EndOfDeclarationMarker node
@@ -60209,7 +62460,7 @@ var ts;
// Rewrite the class declaration into an assignment of a class expression.
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)), node))), node));
+ /*typeParameters*/ undefined, ts.visitNodes(node.heritageClauses, destructuringAndImportCallVisitor, ts.isHeritageClause), ts.visitNodes(node.members, destructuringAndImportCallVisitor, ts.isClassElement)), node))), node));
if (hasAssociatedEndOfDeclarationMarker(node)) {
// Defer exports until we encounter an EndOfDeclarationMarker node
var id = ts.getOriginalNodeId(node);
@@ -60228,7 +62479,7 @@ var ts;
*/
function visitVariableStatement(node) {
if (!shouldHoistVariableDeclarationList(node.declarationList)) {
- return ts.visitNode(node, destructuringVisitor, ts.isStatement);
+ return ts.visitNode(node, destructuringAndImportCallVisitor, ts.isStatement);
}
var expressions;
var isExportedDeclaration = ts.hasModifier(node, 1 /* Export */);
@@ -60281,7 +62532,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
+ return (ts.getEmitFlags(node) & 2097152 /* NoHoisting */) === 0
&& (enclosingBlockScopedContainer.kind === 265 /* SourceFile */
|| (ts.getOriginalNode(node).flags & 3 /* BlockScoped */) === 0);
}
@@ -60294,9 +62545,9 @@ var ts;
function transformInitializedVariable(node, isExportedDeclaration) {
var createAssignment = isExportedDeclaration ? createExportedVariableAssignment : createNonExportedVariableAssignment;
return ts.isBindingPattern(node.name)
- ? ts.flattenDestructuringAssignment(node, destructuringVisitor, context, 0 /* All */,
+ ? ts.flattenDestructuringAssignment(node, destructuringAndImportCallVisitor, context, 0 /* All */,
/*needsValue*/ false, createAssignment)
- : createAssignment(node.name, ts.visitNode(node.initializer, destructuringVisitor, ts.isExpression));
+ : createAssignment(node.name, ts.visitNode(node.initializer, destructuringAndImportCallVisitor, ts.isExpression));
}
/**
* Creates an assignment expression for an exported variable declaration.
@@ -60359,7 +62610,7 @@ var ts;
* @param node The node to test.
*/
function hasAssociatedEndOfDeclarationMarker(node) {
- return (ts.getEmitFlags(node) & 2097152 /* HasEndOfDeclarationMarker */) !== 0;
+ return (ts.getEmitFlags(node) & 4194304 /* HasEndOfDeclarationMarker */) !== 0;
}
/**
* Visits a DeclarationMarker used as a placeholder for the end of a transformed
@@ -60618,12 +62869,12 @@ var ts;
return visitCatchClause(node);
case 207 /* Block */:
return visitBlock(node);
- case 297 /* MergeDeclarationMarker */:
+ case 299 /* MergeDeclarationMarker */:
return visitMergeDeclarationMarker(node);
- case 298 /* EndOfDeclarationMarker */:
+ case 300 /* EndOfDeclarationMarker */:
return visitEndOfDeclarationMarker(node);
default:
- return destructuringVisitor(node);
+ return destructuringAndImportCallVisitor(node);
}
}
/**
@@ -60634,7 +62885,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), ts.visitNode(node.incrementor, destructuringVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement));
+ node = ts.updateFor(node, visitForInitializer(node.initializer), ts.visitNode(node.condition, destructuringAndImportCallVisitor, ts.isExpression), ts.visitNode(node.incrementor, destructuringAndImportCallVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement));
enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer;
return node;
}
@@ -60646,7 +62897,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, ts.liftToBlock));
+ node = ts.updateForIn(node, visitForInitializer(node.initializer), ts.visitNode(node.expression, destructuringAndImportCallVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, ts.liftToBlock));
enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer;
return node;
}
@@ -60658,7 +62909,7 @@ var ts;
function visitForOfStatement(node) {
var savedEnclosingBlockScopedContainer = enclosingBlockScopedContainer;
enclosingBlockScopedContainer = node;
- 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));
+ node = ts.updateForOf(node, node.awaitModifier, visitForInitializer(node.initializer), ts.visitNode(node.expression, destructuringAndImportCallVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, ts.liftToBlock));
enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer;
return node;
}
@@ -60699,7 +62950,7 @@ var ts;
* @param node The node to visit.
*/
function visitDoStatement(node) {
- return ts.updateDo(node, ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, 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, destructuringAndImportCallVisitor, ts.isExpression));
}
/**
* Visits the body of a WhileStatement to hoist declarations.
@@ -60707,7 +62958,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, ts.liftToBlock));
+ return ts.updateWhile(node, ts.visitNode(node.expression, destructuringAndImportCallVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, ts.liftToBlock));
}
/**
* Visits the body of a LabeledStatement to hoist declarations.
@@ -60723,7 +62974,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, ts.liftToBlock));
+ return ts.updateWith(node, ts.visitNode(node.expression, destructuringAndImportCallVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, ts.liftToBlock));
}
/**
* Visits the body of a SwitchStatement to hoist declarations.
@@ -60731,7 +62982,7 @@ var ts;
* @param node The node to visit.
*/
function visitSwitchStatement(node) {
- return ts.updateSwitch(node, ts.visitNode(node.expression, destructuringVisitor, ts.isExpression), ts.visitNode(node.caseBlock, nestedElementVisitor, ts.isCaseBlock));
+ return ts.updateSwitch(node, ts.visitNode(node.expression, destructuringAndImportCallVisitor, ts.isExpression), ts.visitNode(node.caseBlock, nestedElementVisitor, ts.isCaseBlock));
}
/**
* Visits the body of a CaseBlock to hoist declarations.
@@ -60751,7 +63002,7 @@ var ts;
* @param node The node to visit.
*/
function visitCaseClause(node) {
- return ts.updateCaseClause(node, ts.visitNode(node.expression, destructuringVisitor, ts.isExpression), ts.visitNodes(node.statements, nestedElementVisitor, ts.isStatement));
+ return ts.updateCaseClause(node, ts.visitNode(node.expression, destructuringAndImportCallVisitor, ts.isExpression), ts.visitNodes(node.statements, nestedElementVisitor, ts.isStatement));
}
/**
* Visits the body of a DefaultClause to hoist declarations.
@@ -60801,18 +63052,35 @@ var ts;
*
* @param node The node to visit.
*/
- function destructuringVisitor(node) {
+ function destructuringAndImportCallVisitor(node) {
if (node.transformFlags & 1024 /* DestructuringAssignment */
&& node.kind === 194 /* BinaryExpression */) {
return visitDestructuringAssignment(node);
}
- else if (node.transformFlags & 2048 /* ContainsDestructuringAssignment */) {
- return ts.visitEachChild(node, destructuringVisitor, context);
+ else if (ts.isImportCall(node)) {
+ return visitImportCallExpression(node);
+ }
+ else if ((node.transformFlags & 2048 /* ContainsDestructuringAssignment */) || (node.transformFlags & 67108864 /* ContainsDynamicImport */)) {
+ return ts.visitEachChild(node, destructuringAndImportCallVisitor, context);
}
else {
return node;
}
}
+ function visitImportCallExpression(node) {
+ // import("./blah")
+ // emit as
+ // System.register([], function (_export, _context) {
+ // return {
+ // setters: [],
+ // execute: () => {
+ // _context.import('./blah');
+ // }
+ // };
+ // });
+ return ts.createCall(ts.createPropertyAccess(contextObject, ts.createIdentifier("import")),
+ /*typeArguments*/ undefined, node.arguments);
+ }
/**
* Visits a DestructuringAssignment to flatten destructuring to exported symbols.
*
@@ -60820,10 +63088,10 @@ var ts;
*/
function visitDestructuringAssignment(node) {
if (hasExportedReferenceInDestructuringTarget(node.left)) {
- return ts.flattenDestructuringAssignment(node, destructuringVisitor, context, 0 /* All */,
+ return ts.flattenDestructuringAssignment(node, destructuringAndImportCallVisitor, context, 0 /* All */,
/*needsValue*/ true);
}
- return ts.visitEachChild(node, destructuringVisitor, context);
+ return ts.visitEachChild(node, destructuringAndImportCallVisitor, context);
}
/**
* Determines whether the target of a destructuring assigment refers to an exported symbol.
@@ -60834,7 +63102,7 @@ var ts;
if (ts.isAssignmentExpression(node, /*excludeCompoundAssignment*/ true)) {
return hasExportedReferenceInDestructuringTarget(node.left);
}
- else if (ts.isSpreadExpression(node)) {
+ else if (ts.isSpreadElement(node)) {
return hasExportedReferenceInDestructuringTarget(node.expression);
}
else if (ts.isObjectLiteralExpression(node)) {
@@ -61102,7 +63370,7 @@ var ts;
var currentSourceFile;
return transformSourceFile;
function transformSourceFile(node) {
- if (ts.isDeclarationFile(node)) {
+ if (node.isDeclarationFile) {
return node;
}
if (ts.isExternalModule(node) || compilerOptions.isolatedModules) {
@@ -61201,6 +63469,7 @@ var ts;
(function (ts) {
function getModuleTransformer(moduleKind) {
switch (moduleKind) {
+ case ts.ModuleKind.ESNext:
case ts.ModuleKind.ES2015:
return ts.transformES2015Module;
case ts.ModuleKind.System:
@@ -61265,7 +63534,7 @@ var ts;
* @param allowDtsFiles A value indicating whether to allow the transformation of .d.ts files.
*/
function transformNodes(resolver, host, options, nodes, transformers, allowDtsFiles) {
- var enabledSyntaxKindFeatures = new Array(299 /* Count */);
+ var enabledSyntaxKindFeatures = new Array(301 /* Count */);
var lexicalEnvironmentVariableDeclarations;
var lexicalEnvironmentFunctionDeclarations;
var lexicalEnvironmentVariableDeclarationsStack = [];
@@ -61330,7 +63599,7 @@ var ts;
dispose: dispose
};
function transformRoot(node) {
- return node && (!ts.isSourceFile(node) || !ts.isDeclarationFile(node)) ? transformation(node) : node;
+ return node && (!ts.isSourceFile(node) || !node.isDeclarationFile) ? transformation(node) : node;
}
/**
* Enables expression substitutions in the pretty printer for the provided SyntaxKind.
@@ -61396,7 +63665,7 @@ var ts;
function hoistVariableDeclaration(name) {
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);
+ var decl = ts.setEmitFlags(ts.createVariableDeclaration(name), 64 /* NoNestedSourceMaps */);
if (!lexicalEnvironmentVariableDeclarations) {
lexicalEnvironmentVariableDeclarations = [decl];
}
@@ -61533,7 +63802,7 @@ var ts;
function createSourceMapWriter(host, writer) {
var compilerOptions = host.getCompilerOptions();
var extendedDiagnostics = compilerOptions.extendedDiagnostics;
- var currentSourceFile;
+ var currentSource;
var currentSourceText;
var sourceMapDir; // The directory in which sourcemap will be
// Current source map file and its index in the sources list
@@ -61557,6 +63826,12 @@ var ts;
getSourceMappingURL: getSourceMappingURL,
};
/**
+ * Skips trivia such as comments and white-space that can optionally overriden by the source map source
+ */
+ function skipSourceTrivia(pos) {
+ return currentSource.skipTrivia ? currentSource.skipTrivia(pos) : ts.skipTrivia(currentSourceText, pos);
+ }
+ /**
* Initialize the SourceMapWriter for a new output file.
*
* @param filePath The path to the generated output file.
@@ -61570,7 +63845,7 @@ var ts;
if (sourceMapData) {
reset();
}
- currentSourceFile = undefined;
+ currentSource = undefined;
currentSourceText = undefined;
// Current source map file and its index in the sources list
sourceMapSourceIndex = -1;
@@ -61627,7 +63902,7 @@ var ts;
if (disabled) {
return;
}
- currentSourceFile = undefined;
+ currentSource = undefined;
sourceMapDir = undefined;
sourceMapSourceIndex = undefined;
lastRecordedSourceMapSpan = undefined;
@@ -61687,7 +63962,7 @@ var ts;
if (extendedDiagnostics) {
ts.performance.mark("beforeSourcemap");
}
- var sourceLinePos = ts.getLineAndCharacterOfPosition(currentSourceFile, pos);
+ var sourceLinePos = ts.getLineAndCharacterOfPosition(currentSource, pos);
// Convert the location to be one-based.
sourceLinePos.line++;
sourceLinePos.character++;
@@ -61736,12 +64011,21 @@ var ts;
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 !== 295 /* NotEmittedStatement */
+ var range = emitNode && emitNode.sourceMapRange;
+ var _a = range || node, pos = _a.pos, end = _a.end;
+ var source = range && range.source;
+ var oldSource = currentSource;
+ if (source === oldSource)
+ source = undefined;
+ if (source)
+ setSourceFile(source);
+ if (node.kind !== 296 /* NotEmittedStatement */
&& (emitFlags & 16 /* NoLeadingSourceMap */) === 0
&& pos >= 0) {
- emitPos(ts.skipTrivia(currentSourceText, pos));
+ emitPos(skipSourceTrivia(pos));
}
+ if (source)
+ setSourceFile(oldSource);
if (emitFlags & 64 /* NoNestedSourceMaps */) {
disabled = true;
emitCallback(hint, node);
@@ -61750,11 +64034,15 @@ var ts;
else {
emitCallback(hint, node);
}
- if (node.kind !== 295 /* NotEmittedStatement */
+ if (source)
+ setSourceFile(source);
+ if (node.kind !== 296 /* NotEmittedStatement */
&& (emitFlags & 32 /* NoTrailingSourceMap */) === 0
&& end >= 0) {
emitPos(end);
}
+ if (source)
+ setSourceFile(oldSource);
}
}
/**
@@ -61772,7 +64060,7 @@ var ts;
var emitNode = node && node.emitNode;
var emitFlags = emitNode && emitNode.flags;
var range = emitNode && emitNode.tokenSourceMapRanges && emitNode.tokenSourceMapRanges[token];
- tokenPos = ts.skipTrivia(currentSourceText, range ? range.pos : tokenPos);
+ tokenPos = skipSourceTrivia(range ? range.pos : tokenPos);
if ((emitFlags & 128 /* NoTokenLeadingSourceMaps */) === 0 && tokenPos >= 0) {
emitPos(tokenPos);
}
@@ -61793,22 +64081,22 @@ var ts;
if (disabled) {
return;
}
- currentSourceFile = sourceFile;
- currentSourceText = currentSourceFile.text;
+ currentSource = sourceFile;
+ currentSourceText = currentSource.text;
// Add the file to tsFilePaths
// If sourceroot option: Use the relative path corresponding to the common directory path
// otherwise source locations relative to map file location
var sourcesDirectoryPath = compilerOptions.sourceRoot ? host.getCommonSourceDirectory() : sourceMapDir;
- var source = ts.getRelativePathToDirectoryOrUrl(sourcesDirectoryPath, currentSourceFile.fileName, host.getCurrentDirectory(), host.getCanonicalFileName,
+ var source = ts.getRelativePathToDirectoryOrUrl(sourcesDirectoryPath, currentSource.fileName, host.getCurrentDirectory(), host.getCanonicalFileName,
/*isAbsolutePathAnUrl*/ true);
sourceMapSourceIndex = ts.indexOf(sourceMapData.sourceMapSources, source);
if (sourceMapSourceIndex === -1) {
sourceMapSourceIndex = sourceMapData.sourceMapSources.length;
sourceMapData.sourceMapSources.push(source);
// The one that can be used from program to get the actual source file
- sourceMapData.inputSourceFileNames.push(currentSourceFile.fileName);
+ sourceMapData.inputSourceFileNames.push(currentSource.fileName);
if (compilerOptions.inlineSources) {
- sourceMapData.sourceMapSourcesContent.push(currentSourceFile.text);
+ sourceMapData.sourceMapSourcesContent.push(currentSource.text);
}
}
}
@@ -61925,9 +64213,11 @@ var ts;
if (extendedDiagnostics) {
ts.performance.mark("preEmitNodeWithComment");
}
- var isEmittedNode = node.kind !== 295 /* NotEmittedStatement */;
- var skipLeadingComments = pos < 0 || (emitFlags & 512 /* NoLeadingComments */) !== 0;
- var skipTrailingComments = end < 0 || (emitFlags & 1024 /* NoTrailingComments */) !== 0;
+ var isEmittedNode = node.kind !== 296 /* NotEmittedStatement */;
+ // We have to explicitly check that the node is JsxText because if the compilerOptions.jsx is "preserve" we will not do any transformation.
+ // It is expensive to walk entire tree just to set one kind of node to have no comments.
+ var skipLeadingComments = pos < 0 || (emitFlags & 512 /* NoLeadingComments */) !== 0 || node.kind === 10 /* JsxText */;
+ var skipTrailingComments = end < 0 || (emitFlags & 1024 /* NoTrailingComments */) !== 0 || node.kind === 10 /* JsxText */;
// Emit leading comments if the position is not synthesized and the node
// has not opted out from emitting leading comments.
if (!skipLeadingComments) {
@@ -62279,7 +64569,7 @@ var ts;
var errorNameNode;
var emitJsDocComments = compilerOptions.removeComments ? ts.noop : writeJsDocComments;
var emit = compilerOptions.stripInternal ? stripInternal : emitNode;
- var noDeclare;
+ var needsDeclare = true;
var moduleElementDeclarationEmitInfo = [];
var asynchronousSubModuleDeclarationEmitInfo;
// Contains the reference paths that needs to go in the declaration file.
@@ -62315,11 +64605,11 @@ var ts;
}
resultHasExternalModuleIndicator = false;
if (!isBundledEmit || !ts.isExternalModule(sourceFile)) {
- noDeclare = false;
+ needsDeclare = true;
emitSourceFile(sourceFile);
}
else if (ts.isExternalModule(sourceFile)) {
- noDeclare = true;
+ needsDeclare = false;
write("declare module \"" + ts.getResolvedExternalModuleName(host, sourceFile) + "\" {");
writeLine();
increaseIndent();
@@ -62386,7 +64676,7 @@ var ts;
var writer = ts.createTextWriter(newLine);
writer.trackSymbol = trackSymbol;
writer.reportInaccessibleThisError = reportInaccessibleThisError;
- writer.reportIllegalExtends = reportIllegalExtends;
+ writer.reportPrivateInBaseOfClassExpression = reportPrivateInBaseOfClassExpression;
writer.writeKeyword = writer.write;
writer.writeOperator = writer.write;
writer.writePunctuation = writer.write;
@@ -62494,10 +64784,10 @@ var ts;
handleSymbolAccessibilityError(resolver.isSymbolAccessible(symbol, enclosingDeclaration, meaning, /*shouldComputeAliasesToMakeVisible*/ true));
recordTypeReferenceDirectivesIfNecessary(resolver.getTypeReferenceDirectivesForSymbol(symbol, meaning));
}
- function reportIllegalExtends() {
+ function reportPrivateInBaseOfClassExpression(propertyName) {
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)));
+ emitterDiagnostics.add(ts.createDiagnosticForNode(errorNameNode, ts.Diagnostics.Property_0_of_exported_class_expression_may_not_be_private_or_protected, propertyName));
}
}
function reportInaccessibleThisError() {
@@ -62510,17 +64800,22 @@ var ts;
writer.getSymbolAccessibilityDiagnostic = getSymbolAccessibilityDiagnostic;
write(": ");
// use the checker's type, not the declared type,
- // for non-optional initialized parameters that aren't a parameter property
+ // for optional parameter properties
+ // and also for non-optional initialized parameters that aren't a parameter property
+ // these types may need to add `undefined`.
var shouldUseResolverType = declaration.kind === 146 /* Parameter */ &&
- resolver.isRequiredInitializedParameter(declaration);
+ (resolver.isRequiredInitializedParameter(declaration) ||
+ resolver.isOptionalUninitializedParameterProperty(declaration));
if (type && !shouldUseResolverType) {
// Write the type
emitType(type);
}
else {
errorNameNode = declaration.name;
- var format = 2 /* UseTypeOfFunction */ | 1024 /* UseTypeAliasValue */ |
- (shouldUseResolverType ? 4096 /* AddUndefined */ : 0);
+ var format = 4 /* UseTypeOfFunction */ |
+ 16384 /* WriteClassExpressionAsTypeLiteral */ |
+ 2048 /* UseTypeAliasValue */ |
+ (shouldUseResolverType ? 8192 /* AddUndefined */ : 0);
resolver.writeTypeOfDeclaration(declaration, enclosingDeclaration, format, writer);
errorNameNode = undefined;
}
@@ -62534,7 +64829,7 @@ var ts;
}
else {
errorNameNode = signature.name;
- resolver.writeReturnTypeOfSignatureDeclaration(signature, enclosingDeclaration, 2 /* UseTypeOfFunction */ | 1024 /* UseTypeAliasValue */, writer);
+ resolver.writeReturnTypeOfSignatureDeclaration(signature, enclosingDeclaration, 4 /* UseTypeOfFunction */ | 2048 /* UseTypeAliasValue */ | 16384 /* WriteClassExpressionAsTypeLiteral */, writer);
errorNameNode = undefined;
}
}
@@ -62743,15 +65038,14 @@ var ts;
currentIdentifiers = node.identifiers;
isCurrentFileExternalModule = ts.isExternalModule(node);
enclosingDeclaration = node;
- ts.emitDetachedComments(currentText, currentLineMap, writer, ts.writeCommentRange, node, newLine, /*removeComents*/ true);
+ ts.emitDetachedComments(currentText, currentLineMap, writer, ts.writeCommentRange, node, newLine, /*removeComments*/ true);
emitLines(node.statements);
}
- // Return a temp variable name to be used in `export default` statements.
+ // Return a temp variable name to be used in `export default`/`export class ... extends` statements.
// The temp name will be of the form _default_counter.
// Note that export default is only allowed at most once in a module, so we
// do not need to keep track of created temp names.
- function getExportDefaultTempVariableName() {
- var baseName = "_default";
+ function getExportTempVariableName(baseName) {
if (!currentIdentifiers.has(baseName)) {
return baseName;
}
@@ -62764,24 +65058,30 @@ var ts;
}
}
}
+ function emitTempVariableDeclaration(expr, baseName, diagnostic, needsDeclare) {
+ var tempVarName = getExportTempVariableName(baseName);
+ if (needsDeclare) {
+ write("declare ");
+ }
+ write("const ");
+ write(tempVarName);
+ write(": ");
+ writer.getSymbolAccessibilityDiagnostic = function () { return diagnostic; };
+ resolver.writeTypeOfExpression(expr, enclosingDeclaration, 4 /* UseTypeOfFunction */ | 2048 /* UseTypeAliasValue */ | 16384 /* WriteClassExpressionAsTypeLiteral */, writer);
+ write(";");
+ writeLine();
+ return tempVarName;
+ }
function emitExportAssignment(node) {
if (node.expression.kind === 71 /* Identifier */) {
write(node.isExportEquals ? "export = " : "export default ");
writeTextOfNode(currentText, node.expression);
}
else {
- // Expression
- var tempVarName = getExportDefaultTempVariableName();
- if (!noDeclare) {
- write("declare ");
- }
- write("var ");
- write(tempVarName);
- write(": ");
- writer.getSymbolAccessibilityDiagnostic = getDefaultExportAccessibilityDiagnostic;
- resolver.writeTypeOfExpression(node.expression, enclosingDeclaration, 2 /* UseTypeOfFunction */ | 1024 /* UseTypeAliasValue */, writer);
- write(";");
- writeLine();
+ var tempVarName = emitTempVariableDeclaration(node.expression, "_default", {
+ diagnosticMessage: ts.Diagnostics.Default_export_of_the_module_has_or_is_using_private_name_0,
+ errorNode: node
+ }, needsDeclare);
write(node.isExportEquals ? "export = " : "export default ");
write(tempVarName);
}
@@ -62793,12 +65093,6 @@ var ts;
// write each of these declarations asynchronously
writeAsynchronousModuleElements(nodes);
}
- function getDefaultExportAccessibilityDiagnostic() {
- return {
- diagnosticMessage: ts.Diagnostics.Default_export_of_the_module_has_or_is_using_private_name_0,
- errorNode: node
- };
- }
}
function isModuleElementVisible(node) {
return resolver.isDeclarationVisible(node);
@@ -62871,7 +65165,7 @@ var ts;
if (modifiers & 512 /* Default */) {
write("default ");
}
- else if (node.kind !== 230 /* InterfaceDeclaration */ && !noDeclare) {
+ else if (node.kind !== 230 /* InterfaceDeclaration */ && needsDeclare) {
write("declare ");
}
}
@@ -63108,7 +65402,7 @@ var ts;
var enumMemberValue = resolver.getConstantValue(node);
if (enumMemberValue !== undefined) {
write(" = ");
- write(enumMemberValue.toString());
+ write(ts.getTextOfConstantValue(enumMemberValue));
}
write(",");
writeLine();
@@ -63207,7 +65501,7 @@ var ts;
write(">");
}
}
- function emitHeritageClause(className, typeReferences, isImplementsList) {
+ function emitHeritageClause(typeReferences, isImplementsList) {
if (typeReferences) {
write(isImplementsList ? " implements " : " extends ");
emitCommaList(typeReferences, emitTypeOfTypeReference);
@@ -63219,12 +65513,6 @@ var ts;
else if (!isImplementsList && node.expression.kind === 95 /* NullKeyword */) {
write("null");
}
- 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
@@ -63241,7 +65529,7 @@ var ts;
return {
diagnosticMessage: diagnosticMessage,
errorNode: node,
- typeName: node.parent.parent.name
+ typeName: ts.getNameOfDeclaration(node.parent.parent)
};
}
}
@@ -63256,6 +65544,19 @@ var ts;
});
}
}
+ var prevEnclosingDeclaration = enclosingDeclaration;
+ enclosingDeclaration = node;
+ var baseTypeNode = ts.getClassExtendsHeritageClauseElement(node);
+ var tempVarName;
+ if (baseTypeNode && !ts.isEntityNameExpression(baseTypeNode.expression)) {
+ tempVarName = baseTypeNode.expression.kind === 95 /* NullKeyword */ ?
+ "null" :
+ emitTempVariableDeclaration(baseTypeNode.expression, node.name.text + "_base", {
+ diagnosticMessage: ts.Diagnostics.extends_clause_of_exported_class_0_has_or_is_using_private_name_1,
+ errorNode: baseTypeNode,
+ typeName: node.name
+ }, !ts.findAncestor(node, function (n) { return n.kind === 233 /* ModuleDeclaration */; }));
+ }
emitJsDocComments(node);
emitModuleElementDeclarationFlags(node);
if (ts.hasModifier(node, 128 /* Abstract */)) {
@@ -63263,15 +65564,22 @@ var ts;
}
write("class ");
writeTextOfNode(currentText, node.name);
- var prevEnclosingDeclaration = enclosingDeclaration;
- enclosingDeclaration = node;
emitTypeParameters(node.typeParameters);
- var baseTypeNode = ts.getClassExtendsHeritageClauseElement(node);
if (baseTypeNode) {
- node.name;
- emitHeritageClause(node.name, [baseTypeNode], /*isImplementsList*/ false);
+ if (!ts.isEntityNameExpression(baseTypeNode.expression)) {
+ write(" extends ");
+ write(tempVarName);
+ if (baseTypeNode.typeArguments) {
+ write("<");
+ emitCommaList(baseTypeNode.typeArguments, emitType);
+ write(">");
+ }
+ }
+ else {
+ emitHeritageClause([baseTypeNode], /*isImplementsList*/ false);
+ }
}
- emitHeritageClause(node.name, ts.getClassImplementsHeritageClauseElements(node), /*isImplementsList*/ true);
+ emitHeritageClause(ts.getClassImplementsHeritageClauseElements(node), /*isImplementsList*/ true);
write(" {");
writeLine();
increaseIndent();
@@ -63292,7 +65600,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(node.name, interfaceExtendsTypes, /*isImplementsList*/ false);
+ emitHeritageClause(interfaceExtendsTypes, /*isImplementsList*/ false);
}
write(" {");
writeLine();
@@ -63351,7 +65659,8 @@ var ts;
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 === 149 /* PropertyDeclaration */ || node.kind === 148 /* PropertySignature */) {
+ else if (node.kind === 149 /* PropertyDeclaration */ || node.kind === 148 /* PropertySignature */ ||
+ (node.kind === 146 /* Parameter */ && ts.hasModifier(node.parent, 8 /* Private */))) {
// TODO(jfreeman): Deal with computed properties in error reporting.
if (ts.hasModifier(node, 32 /* Static */)) {
return symbolAccessibilityResult.errorModuleName ?
@@ -63360,7 +65669,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 === 229 /* ClassDeclaration */) {
+ else if (node.parent.kind === 229 /* ClassDeclaration */ || node.kind === 146 /* Parameter */) {
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 :
@@ -63570,6 +65879,11 @@ var ts;
write("[");
}
else {
+ if (node.kind === 152 /* Constructor */ && ts.hasModifier(node, 8 /* Private */)) {
+ write("();");
+ writeLine();
+ return;
+ }
// Construct signature or constructor type write new Signature
if (node.kind === 156 /* ConstructSignature */ || node.kind === 161 /* ConstructorType */) {
write("new ");
@@ -63876,7 +66190,7 @@ var ts;
function writeReferencePath(referencedFile, addBundledFileReference, emitOnlyDtsFiles) {
var declFileName;
var addedBundledEmitReference = false;
- if (ts.isDeclarationFile(referencedFile)) {
+ if (referencedFile.isDeclarationFile) {
// Declaration file, use declaration file name
declFileName = referencedFile.fileName;
}
@@ -64060,7 +66374,7 @@ var ts;
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 shouldSkip = compilerOptions.noEmitHelpers || ts.getExternalHelpersModuleName(sourceFile) !== undefined;
var shouldBundle = ts.isSourceFile(currentNode) && !isOwnFileEmit;
var helpers = ts.getEmitHelpers(currentNode);
if (helpers) {
@@ -64097,7 +66411,7 @@ var ts;
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 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, onBeforeEmitToken = handlers.onBeforeEmitToken, onAfterEmitToken = handlers.onAfterEmitToken;
var newLine = ts.getNewLineCharacter(printerOptions);
var comments = ts.createCommentWriter(printerOptions, onEmitSourceMapOfPosition);
var emitNodeWithComments = comments.emitNodeWithComments, emitBodyWithDetachedComments = comments.emitBodyWithDetachedComments, emitTrailingCommentsOfPosition = comments.emitTrailingCommentsOfPosition, emitLeadingCommentsOfPosition = comments.emitLeadingCommentsOfPosition;
@@ -64185,7 +66499,9 @@ var ts;
return text;
}
function print(hint, node, sourceFile) {
- setSourceFile(sourceFile);
+ if (sourceFile) {
+ setSourceFile(sourceFile);
+ }
pipelineEmitWithNotification(hint, node);
}
function setSourceFile(sourceFile) {
@@ -64264,7 +66580,7 @@ var ts;
// Strict mode reserved words
// Contextual keywords
if (ts.isKeyword(kind)) {
- writeTokenText(kind);
+ writeTokenNode(node);
return;
}
switch (kind) {
@@ -64416,6 +66732,8 @@ var ts;
return emitModuleBlock(node);
case 235 /* CaseBlock */:
return emitCaseBlock(node);
+ case 236 /* NamespaceExportDeclaration */:
+ return emitNamespaceExportDeclaration(node);
case 237 /* ImportEqualsDeclaration */:
return emitImportEqualsDeclaration(node);
case 238 /* ImportDeclaration */:
@@ -64482,7 +66800,7 @@ var ts;
return pipelineEmitExpression(trySubstituteNode(1 /* Expression */, node));
}
if (ts.isToken(node)) {
- writeTokenText(kind);
+ writeTokenNode(node);
return;
}
}
@@ -64505,7 +66823,8 @@ var ts;
case 97 /* SuperKeyword */:
case 101 /* TrueKeyword */:
case 99 /* ThisKeyword */:
- writeTokenText(kind);
+ case 91 /* ImportKeyword */:
+ writeTokenNode(node);
return;
// Expressions
case 177 /* ArrayLiteralExpression */:
@@ -64568,8 +66887,10 @@ var ts;
case 250 /* JsxSelfClosingElement */:
return emitJsxSelfClosingElement(node);
// Transformation nodes
- case 296 /* PartiallyEmittedExpression */:
+ case 297 /* PartiallyEmittedExpression */:
return emitPartiallyEmittedExpression(node);
+ case 298 /* CommaListExpression */:
+ return emitCommaList(node);
}
}
function trySubstituteNode(hint, node) {
@@ -64608,6 +66929,7 @@ var ts;
//
function emitIdentifier(node) {
write(getTextOfNode(node, /*includeTrivia*/ false));
+ emitTypeArguments(node, node.typeArguments);
}
//
// Names
@@ -64636,6 +66958,7 @@ var ts;
function emitTypeParameter(node) {
emit(node.name);
emitWithPrefix(" extends ", node.constraint);
+ emitWithPrefix(" = ", node.default);
}
function emitParameter(node) {
emitDecorators(node, node.decorators);
@@ -64665,6 +66988,7 @@ var ts;
emitDecorators(node, node.decorators);
emitModifiers(node, node.modifiers);
emit(node.name);
+ writeIfPresent(node.questionToken, "?");
emitWithPrefix(": ", node.type);
emitExpressionWithPrefix(" = ", node.initializer);
write(";");
@@ -64684,6 +67008,7 @@ var ts;
emitModifiers(node, node.modifiers);
writeIfPresent(node.asteriskToken, "*");
emit(node.name);
+ writeIfPresent(node.questionToken, "?");
emitSignatureAndBody(node, emitSignatureHead);
}
function emitConstructor(node) {
@@ -64746,7 +67071,7 @@ var ts;
function emitConstructorType(node) {
write("new ");
emitTypeParameters(node, node.typeParameters);
- emitParametersForArrow(node, node.parameters);
+ emitParameters(node, node.parameters);
write(" => ");
emit(node.type);
}
@@ -64756,7 +67081,10 @@ var ts;
}
function emitTypeLiteral(node) {
write("{");
- emitList(node, node.members, 65 /* TypeLiteralMembers */);
+ // If the literal is empty, do not add spaces between braces.
+ if (node.members.length > 0) {
+ emitList(node, node.members, ts.getEmitFlags(node) & 1 /* SingleLine */ ? 448 /* SingleLineTypeLiteralMembers */ : 65 /* MultiLineTypeLiteralMembers */);
+ }
write("}");
}
function emitArrayType(node) {
@@ -64794,9 +67122,15 @@ var ts;
write("]");
}
function emitMappedType(node) {
+ var emitFlags = ts.getEmitFlags(node);
write("{");
- writeLine();
- increaseIndent();
+ if (emitFlags & 1 /* SingleLine */) {
+ write(" ");
+ }
+ else {
+ writeLine();
+ increaseIndent();
+ }
writeIfPresent(node.readonlyToken, "readonly ");
write("[");
emit(node.typeParameter.name);
@@ -64807,8 +67141,13 @@ var ts;
write(": ");
emit(node.type);
write(";");
- writeLine();
- decreaseIndent();
+ if (emitFlags & 1 /* SingleLine */) {
+ write(" ");
+ }
+ else {
+ writeLine();
+ decreaseIndent();
+ }
write("}");
}
function emitLiteralType(node) {
@@ -64864,7 +67203,7 @@ var ts;
write("{}");
}
else {
- var indentedFlag = ts.getEmitFlags(node) & 32768 /* Indented */;
+ var indentedFlag = ts.getEmitFlags(node) & 65536 /* Indented */;
if (indentedFlag) {
increaseIndent();
}
@@ -64879,7 +67218,7 @@ var ts;
function emitPropertyAccessExpression(node) {
var indentBeforeDot = false;
var indentAfterDot = false;
- if (!(ts.getEmitFlags(node) & 65536 /* NoIndentation */)) {
+ if (!(ts.getEmitFlags(node) & 131072 /* NoIndentation */)) {
var dotRangeStart = node.expression.end;
var dotRangeEnd = ts.skipTrivia(currentSourceFile.text, node.expression.end) + 1;
var dotToken = { kind: 23 /* DotToken */, pos: dotRangeStart, end: dotRangeEnd };
@@ -64908,7 +67247,7 @@ var ts;
// check if constant enum value is integer
var constantValue = ts.getConstantValue(expression);
// isFinite handles cases when constantValue is undefined
- return isFinite(constantValue)
+ return typeof constantValue === "number" && isFinite(constantValue)
&& Math.floor(constantValue) === constantValue
&& printerOptions.removeComments;
}
@@ -65011,7 +67350,7 @@ var ts;
var indentAfterOperator = needsIndentation(node, node.operatorToken, node.right);
emitExpression(node.left);
increaseIndentIf(indentBeforeOperator, isCommaOperator ? " " : undefined);
- writeTokenText(node.operatorToken.kind);
+ writeTokenNode(node.operatorToken);
increaseIndentIf(indentAfterOperator, " ");
emitExpression(node.right);
decreaseIndentIf(indentBeforeOperator, indentAfterOperator);
@@ -65281,11 +67620,11 @@ var ts;
var body = node.body;
if (body) {
if (ts.isBlock(body)) {
- var indentedFlag = ts.getEmitFlags(node) & 32768 /* Indented */;
+ var indentedFlag = ts.getEmitFlags(node) & 65536 /* Indented */;
if (indentedFlag) {
increaseIndent();
}
- if (ts.getEmitFlags(node) & 262144 /* ReuseTempVariableScope */) {
+ if (ts.getEmitFlags(node) & 524288 /* ReuseTempVariableScope */) {
emitSignatureHead(node);
if (onEmitNode) {
onEmitNode(3 /* Unspecified */, body, emitBlockCallback);
@@ -65395,7 +67734,7 @@ var ts;
emitModifiers(node, node.modifiers);
write("class");
emitNodeWithPrefix(" ", node.name, emitIdentifierName);
- var indentedFlag = ts.getEmitFlags(node) & 32768 /* Indented */;
+ var indentedFlag = ts.getEmitFlags(node) & 65536 /* Indented */;
if (indentedFlag) {
increaseIndent();
}
@@ -65533,6 +67872,11 @@ var ts;
}
write(";");
}
+ function emitNamespaceExportDeclaration(node) {
+ write("export as namespace ");
+ emit(node.name);
+ write(";");
+ }
function emitNamedExports(node) {
emitNamedImportsOrExports(node);
}
@@ -65645,6 +67989,21 @@ var ts;
ts.nodeIsSynthesized(parentNode) ||
ts.nodeIsSynthesized(statements[0]) ||
ts.rangeStartPositionsAreOnSameLine(parentNode, statements[0], currentSourceFile));
+ // e.g:
+ // case 0: // Zero
+ // case 1: // One
+ // case 2: // two
+ // return "hi";
+ // If there is no statements, emitNodeWithComments of the parentNode which is caseClause will take care of trailing comment.
+ // So in example above, comment "// Zero" and "// One" will be emit in emitTrailingComments in emitNodeWithComments.
+ // However, for "case 2", because parentNode which is caseClause has an "end" property to be end of the statements (in this case return statement)
+ // comment "// two" will not be emitted in emitNodeWithComments.
+ // Therefore, we have to do the check here to emit such comment.
+ if (statements.length > 0) {
+ // We use emitTrailingCommentsOfPosition instead of emitLeadingCommentsOfPosition because leading comments is defined as comments before the node after newline character separating it from previous line
+ // Note: we can't use parentNode.end as such position includes statements.
+ emitTrailingCommentsOfPosition(statements.pos);
+ }
if (emitAsSingleStatement) {
write(" ");
emit(statements[0]);
@@ -65739,6 +68098,9 @@ var ts;
function emitPartiallyEmittedExpression(node) {
emitExpression(node.expression);
}
+ function emitCommaList(node) {
+ emitExpressionList(node, node.elements, 272 /* CommaListElements */);
+ }
/**
* Emits any prologue directives at the start of a Statement list, returning the
* number of prologue directives written to the output.
@@ -65803,7 +68165,7 @@ var ts;
//
function emitModifiers(node, modifiers) {
if (modifiers && modifiers.length) {
- emitList(node, modifiers, 256 /* Modifiers */);
+ emitList(node, modifiers, 131328 /* Modifiers */);
write(" ");
}
}
@@ -65849,11 +68211,24 @@ var ts;
function emitParameters(parentNode, parameters) {
emitList(parentNode, parameters, 1360 /* Parameters */);
}
+ function canEmitSimpleArrowHead(parentNode, parameters) {
+ var parameter = ts.singleOrUndefined(parameters);
+ return parameter
+ && parameter.pos === parentNode.pos // may not have parsed tokens between parent and parameter
+ && !(ts.isArrowFunction(parentNode) && parentNode.type) // arrow function may not have return type annotation
+ && !ts.some(parentNode.decorators) // parent may not have decorators
+ && !ts.some(parentNode.modifiers) // parent may not have modifiers
+ && !ts.some(parentNode.typeParameters) // parent may not have type parameters
+ && !ts.some(parameter.decorators) // parameter may not have decorators
+ && !ts.some(parameter.modifiers) // parameter may not have modifiers
+ && !parameter.dotDotDotToken // parameter may not be rest
+ && !parameter.questionToken // parameter may not be optional
+ && !parameter.type // parameter may not have a type annotation
+ && !parameter.initializer // parameter may not have an initializer
+ && ts.isIdentifier(parameter.name); // parameter name must be identifier
+ }
function emitParametersForArrow(parentNode, parameters) {
- if (parameters &&
- parameters.length === 1 &&
- parameters[0].type === undefined &&
- parameters[0].pos === parentNode.pos) {
+ if (canEmitSimpleArrowHead(parentNode, parameters)) {
emit(parameters[0]);
}
else {
@@ -66020,6 +68395,15 @@ var ts;
? onEmitSourceMapOfToken(contextNode, token, pos, writeTokenText)
: writeTokenText(token, pos);
}
+ function writeTokenNode(node) {
+ if (onBeforeEmitToken) {
+ onBeforeEmitToken(node);
+ }
+ writeTokenText(node.kind);
+ if (onAfterEmitToken) {
+ onAfterEmitToken(node);
+ }
+ }
function writeTokenText(token, pos) {
var tokenString = ts.tokenToString(token);
write(tokenString);
@@ -66202,7 +68586,9 @@ var ts;
if (node.kind === 9 /* StringLiteral */ && node.textSourceNode) {
var textSourceNode = node.textSourceNode;
if (ts.isIdentifier(textSourceNode)) {
- return "\"" + ts.escapeNonAsciiCharacters(ts.escapeString(getTextOfNode(textSourceNode))) + "\"";
+ return ts.getEmitFlags(node) & 16777216 /* NoAsciiEscaping */ ?
+ "\"" + ts.escapeString(getTextOfNode(textSourceNode)) + "\"" :
+ "\"" + ts.escapeNonAsciiString(getTextOfNode(textSourceNode)) + "\"";
}
else {
return getLiteralTextOfNode(textSourceNode);
@@ -66480,9 +68866,10 @@ var ts;
ListFormat[ListFormat["NoTrailingNewLine"] = 65536] = "NoTrailingNewLine";
ListFormat[ListFormat["NoInterveningComments"] = 131072] = "NoInterveningComments";
// Precomputed Formats
- ListFormat[ListFormat["Modifiers"] = 256] = "Modifiers";
+ ListFormat[ListFormat["Modifiers"] = 131328] = "Modifiers";
ListFormat[ListFormat["HeritageClauses"] = 256] = "HeritageClauses";
- ListFormat[ListFormat["TypeLiteralMembers"] = 65] = "TypeLiteralMembers";
+ ListFormat[ListFormat["SingleLineTypeLiteralMembers"] = 448] = "SingleLineTypeLiteralMembers";
+ ListFormat[ListFormat["MultiLineTypeLiteralMembers"] = 65] = "MultiLineTypeLiteralMembers";
ListFormat[ListFormat["TupleTypeElements"] = 336] = "TupleTypeElements";
ListFormat[ListFormat["UnionTypeConstituents"] = 260] = "UnionTypeConstituents";
ListFormat[ListFormat["IntersectionTypeConstituents"] = 264] = "IntersectionTypeConstituents";
@@ -66490,6 +68877,7 @@ var ts;
ListFormat[ListFormat["ArrayBindingPatternElements"] = 304] = "ArrayBindingPatternElements";
ListFormat[ListFormat["ObjectLiteralExpressionProperties"] = 978] = "ObjectLiteralExpressionProperties";
ListFormat[ListFormat["ArrayLiteralExpressionElements"] = 4466] = "ArrayLiteralExpressionElements";
+ ListFormat[ListFormat["CommaListElements"] = 272] = "CommaListElements";
ListFormat[ListFormat["CallExpressionArguments"] = 1296] = "CallExpressionArguments";
ListFormat[ListFormat["NewExpressionArguments"] = 9488] = "NewExpressionArguments";
ListFormat[ListFormat["TemplateExpressionSpans"] = 131072] = "TemplateExpressionSpans";
@@ -66716,6 +69104,90 @@ var ts;
return output;
}
ts.formatDiagnostics = formatDiagnostics;
+ var redForegroundEscapeSequence = "\u001b[91m";
+ var yellowForegroundEscapeSequence = "\u001b[93m";
+ var blueForegroundEscapeSequence = "\u001b[93m";
+ var gutterStyleSequence = "\u001b[100;30m";
+ var gutterSeparator = " ";
+ var resetEscapeSequence = "\u001b[0m";
+ var ellipsis = "...";
+ 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 padLeft(s, length) {
+ while (s.length < length) {
+ s = " " + s;
+ }
+ return s;
+ }
+ function formatDiagnosticsWithColorAndContext(diagnostics, host) {
+ var output = "";
+ for (var _i = 0, diagnostics_2 = diagnostics; _i < diagnostics_2.length; _i++) {
+ var diagnostic = diagnostics_2[_i];
+ if (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_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;
+ var gutterWidth = (lastLine + 1 + "").length;
+ if (hasMoreThanFiveLines) {
+ gutterWidth = Math.max(ellipsis.length, gutterWidth);
+ }
+ output += ts.sys.newLine;
+ for (var i = firstLine; i <= lastLine; i++) {
+ // If the error spans over 5 lines, we'll only show the first 2 and last 2 lines,
+ // so we'll skip ahead to the second-to-last line.
+ if (hasMoreThanFiveLines && firstLine + 1 < i && i < lastLine - 1) {
+ output += formatAndReset(padLeft(ellipsis, gutterWidth), gutterStyleSequence) + gutterSeparator + ts.sys.newLine;
+ i = lastLine - 1;
+ }
+ var lineStart = ts.getPositionOfLineAndCharacter(file, i, 0);
+ var lineEnd = i < lastLineInFile ? ts.getPositionOfLineAndCharacter(file, i + 1, 0) : file.text.length;
+ var lineContent = file.text.slice(lineStart, lineEnd);
+ lineContent = lineContent.replace(/\s+$/g, ""); // trim from end
+ lineContent = lineContent.replace("\t", " "); // convert tabs to single spaces
+ // Output the gutter and the actual contents of the line.
+ output += formatAndReset(padLeft(i + 1 + "", gutterWidth), gutterStyleSequence) + gutterSeparator;
+ output += lineContent + ts.sys.newLine;
+ // Output the gutter and the error span for the line using tildes.
+ output += formatAndReset(padLeft("", gutterWidth), gutterStyleSequence) + gutterSeparator;
+ output += redForegroundEscapeSequence;
+ if (i === firstLine) {
+ // If we're on the last line, then limit it to the last character of the last line.
+ // Otherwise, we'll just squiggle the rest of the line, giving 'slice' no end position.
+ var lastCharForLine = i === lastLine ? lastLineChar : undefined;
+ output += lineContent.slice(0, firstLineChar).replace(/\S/g, " ");
+ output += lineContent.slice(firstLineChar, lastCharForLine).replace(/./g, "~");
+ }
+ else if (i === lastLine) {
+ output += lineContent.slice(0, lastLineChar).replace(/./g, "~");
+ }
+ else {
+ // Squiggle the entire line.
+ output += lineContent.replace(/./g, "~");
+ }
+ output += resetEscapeSequence;
+ output += ts.sys.newLine;
+ }
+ output += ts.sys.newLine;
+ output += relativeFileName + "(" + (firstLine + 1) + "," + (firstLineChar + 1) + "): ";
+ }
+ var categoryColor = getCategoryFormat(diagnostic.category);
+ var category = ts.DiagnosticCategory[diagnostic.category].toLowerCase();
+ output += formatAndReset(category, categoryColor) + " TS" + diagnostic.code + ": " + flattenDiagnosticMessageText(diagnostic.messageText, ts.sys.newLine);
+ }
+ return output;
+ }
+ ts.formatDiagnosticsWithColorAndContext = formatDiagnosticsWithColorAndContext;
function flattenDiagnosticMessageText(messageText, newLine) {
if (typeof messageText === "string") {
return messageText;
@@ -66758,6 +69230,19 @@ var ts;
}
return resolutions;
}
+ /**
+ * Create a new 'Program' instance. A Program is an immutable collection of 'SourceFile's and a 'CompilerOptions'
+ * that represent a compilation unit.
+ *
+ * Creating a program proceeds from a set of root files, expanding the set of inputs by following imports and
+ * triple-slash-reference-path directives transitively. '@types' and triple-slash-reference-types are also pulled in.
+ *
+ * @param rootNames - A set of root files.
+ * @param options - The compiler options which should be used.
+ * @param host - The host interacts with the underlying file system.
+ * @param oldProgram - Reuses an old program structure.
+ * @returns A 'Program' object.
+ */
function createProgram(rootNames, options, host, oldProgram) {
var program;
var files = [];
@@ -66765,6 +69250,7 @@ var ts;
var diagnosticsProducingTypeChecker;
var noDiagnosticsTypeChecker;
var classifiableNames;
+ var modifiedFilePaths;
var cachedSemanticDiagnosticsForFile = {};
var cachedDeclarationDiagnosticsForFile = {};
var resolvedTypeReferenceDirectives = ts.createMap();
@@ -66821,7 +69307,8 @@ var ts;
// stores 'filename -> file association' ignoring case
// used to track cases when two file names differ only in casing
var filesByNameIgnoreCase = host.useCaseSensitiveFileNames() ? ts.createFileMap(function (fileName) { return fileName.toLowerCase(); }) : undefined;
- if (!tryReuseStructureFromOldProgram()) {
+ var structuralIsReused = tryReuseStructureFromOldProgram();
+ if (structuralIsReused !== 2 /* Completely */) {
ts.forEach(rootNames, function (name) { return processRootFile(name, /*isDefaultLib*/ false); });
// load type declarations specified via 'types' argument or implicitly from types/ and node_modules/@types folders
var typeReferences = ts.getAutomaticTypeDirectiveNames(options, host);
@@ -66880,7 +69367,8 @@ var ts;
getFileProcessingDiagnostics: function () { return fileProcessingDiagnostics; },
getResolvedTypeReferenceDirectives: function () { return resolvedTypeReferenceDirectives; },
isSourceFileFromExternalLibrary: isSourceFileFromExternalLibrary,
- dropDiagnosticsProducingTypeChecker: dropDiagnosticsProducingTypeChecker
+ dropDiagnosticsProducingTypeChecker: dropDiagnosticsProducingTypeChecker,
+ getSourceFileFromReference: getSourceFileFromReference,
};
verifyCompilerOptions();
ts.performance.mark("afterProgram");
@@ -66918,76 +69406,100 @@ var ts;
return classifiableNames;
}
function resolveModuleNamesReusingOldState(moduleNames, containingFile, file, oldProgramState) {
- if (!oldProgramState && !file.ambientModuleNames.length) {
- // if old program state is not supplied and file does not contain locally defined ambient modules
- // then the best we can do is fallback to the default logic
+ if (structuralIsReused === 0 /* Not */ && !file.ambientModuleNames.length) {
+ // If the old program state does not permit reusing resolutions and `file` does not contain locally defined ambient modules,
+ // the best we can do is fallback to the default logic.
return resolveModuleNamesWorker(moduleNames, containingFile);
}
- // at this point we know that either
+ var oldSourceFile = oldProgramState.program && oldProgramState.program.getSourceFile(containingFile);
+ if (oldSourceFile !== file && file.resolvedModules) {
+ // `file` was created for the new program.
+ //
+ // We only set `file.resolvedModules` via work from the current function,
+ // so it is defined iff we already called the current function on `file`.
+ // That call happened no later than the creation of the `file` object,
+ // which per above occured during the current program creation.
+ // Since we assume the filesystem does not change during program creation,
+ // it is safe to reuse resolutions from the earlier call.
+ var result_4 = [];
+ for (var _i = 0, moduleNames_1 = moduleNames; _i < moduleNames_1.length; _i++) {
+ var moduleName = moduleNames_1[_i];
+ var resolvedModule = file.resolvedModules.get(moduleName);
+ result_4.push(resolvedModule);
+ }
+ return result_4;
+ }
+ // At this point, we know at least one of the following hold:
// - file has local declarations for ambient modules
- // OR
// - old program state is available
- // OR
- // - both of items above
- // With this it is possible that we can tell how some module names from the initial list will be resolved
- // without doing actual resolution (in particular if some name was resolved to ambient module).
- // Such names should be excluded from the list of module names that will be provided to `resolveModuleNamesWorker`
- // since we don't want to resolve them again.
- // this is a list of modules for which we cannot predict resolution so they should be actually resolved
+ // With this information, we can infer some module resolutions without performing resolution.
+ /** An ordered list of module names for which we cannot recover the resolution. */
var unknownModuleNames;
- // this is a list of combined results assembles from predicted and resolved results.
- // Order in this list matches the order in the original list of module names `moduleNames` which is important
- // so later we can split results to resolutions of modules and resolutions of module augmentations.
+ /**
+ * The indexing of elements in this list matches that of `moduleNames`.
+ *
+ * Before combining results, result[i] is in one of the following states:
+ * * undefined: needs to be recomputed,
+ * * predictedToResolveToAmbientModuleMarker: known to be an ambient module.
+ * Needs to be reset to undefined before returning,
+ * * ResolvedModuleFull instance: can be reused.
+ */
var result;
- // a transient placeholder that is used to mark predicted resolution in the result list
+ /** A transient placeholder used to mark predicted resolution in the result list. */
var predictedToResolveToAmbientModuleMarker = {};
for (var i = 0; i < moduleNames.length; i++) {
var moduleName = moduleNames[i];
- // module name is known to be resolved to ambient module if
- // - module name is contained in the list of ambient modules that are locally declared in the file
- // - in the old program module name was resolved to ambient module whose declaration is in non-modified file
+ // If we want to reuse resolutions more aggressively, we can refine this to check for whether the
+ // text of the corresponding modulenames has changed.
+ if (file === oldSourceFile) {
+ var oldResolvedModule = oldSourceFile && oldSourceFile.resolvedModules.get(moduleName);
+ if (oldResolvedModule) {
+ if (ts.isTraceEnabled(options, host)) {
+ ts.trace(host, ts.Diagnostics.Reusing_resolution_of_module_0_to_file_1_from_old_program, moduleName, containingFile);
+ }
+ (result || (result = new Array(moduleNames.length)))[i] = oldResolvedModule;
+ continue;
+ }
+ }
+ // We know moduleName resolves to an ambient module provided that moduleName:
+ // - is in the list of ambient modules locally declared in the current source file.
+ // - resolved to an ambient module in the old program whose declaration is in an unmodified file
// (so the same module declaration will land in the new program)
- var isKnownToResolveToAmbientModule = false;
+ var resolvesToAmbientModuleInNonModifiedFile = false;
if (ts.contains(file.ambientModuleNames, moduleName)) {
- isKnownToResolveToAmbientModule = true;
+ resolvesToAmbientModuleInNonModifiedFile = true;
if (ts.isTraceEnabled(options, host)) {
ts.trace(host, ts.Diagnostics.Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1, moduleName, containingFile);
}
}
else {
- isKnownToResolveToAmbientModule = checkModuleNameResolvedToAmbientModuleInNonModifiedFile(moduleName, oldProgramState);
+ resolvesToAmbientModuleInNonModifiedFile = moduleNameResolvesToAmbientModuleInNonModifiedFile(moduleName, oldProgramState);
}
- if (isKnownToResolveToAmbientModule) {
- if (!unknownModuleNames) {
- // found a first module name for which result can be prediced
- // this means that this module name should not be passed to `resolveModuleNamesWorker`.
- // We'll use a separate list for module names that are definitely unknown.
- result = new Array(moduleNames.length);
- // copy all module names that appear before the current one in the list
- // since they are known to be unknown
- unknownModuleNames = moduleNames.slice(0, i);
- }
- // mark prediced resolution in the result list
- result[i] = predictedToResolveToAmbientModuleMarker;
+ if (resolvesToAmbientModuleInNonModifiedFile) {
+ (result || (result = new Array(moduleNames.length)))[i] = predictedToResolveToAmbientModuleMarker;
}
- else if (unknownModuleNames) {
- // found unknown module name and we are already using separate list for those - add it to the list
- unknownModuleNames.push(moduleName);
+ else {
+ // Resolution failed in the old program, or resolved to an ambient module for which we can't reuse the result.
+ (unknownModuleNames || (unknownModuleNames = [])).push(moduleName);
}
}
- if (!unknownModuleNames) {
- // we've looked throught the list but have not seen any predicted resolution
- // use default logic
- return resolveModuleNamesWorker(moduleNames, containingFile);
- }
- var resolutions = unknownModuleNames.length
+ var resolutions = unknownModuleNames && unknownModuleNames.length
? resolveModuleNamesWorker(unknownModuleNames, containingFile)
: emptyArray;
- // combine results of resolutions and predicted results
+ // Combine results of resolutions and predicted results
+ if (!result) {
+ // There were no unresolved/ambient resolutions.
+ ts.Debug.assert(resolutions.length === moduleNames.length);
+ return resolutions;
+ }
var j = 0;
for (var i = 0; i < result.length; i++) {
- if (result[i] === predictedToResolveToAmbientModuleMarker) {
- result[i] = undefined;
+ if (result[i]) {
+ // `result[i]` is either a `ResolvedModuleFull` or a marker.
+ // If it is the former, we can leave it as is.
+ if (result[i] === predictedToResolveToAmbientModuleMarker) {
+ result[i] = undefined;
+ }
}
else {
result[i] = resolutions[j];
@@ -66996,16 +69508,15 @@ var ts;
}
ts.Debug.assert(j === resolutions.length);
return result;
- function checkModuleNameResolvedToAmbientModuleInNonModifiedFile(moduleName, oldProgramState) {
- if (!oldProgramState) {
- return false;
- }
+ // If we change our policy of rechecking failed lookups on each program create,
+ // we should adjust the value returned here.
+ function moduleNameResolvesToAmbientModuleInNonModifiedFile(moduleName, oldProgramState) {
var resolutionToFile = ts.getResolvedModule(oldProgramState.file, moduleName);
if (resolutionToFile) {
// module used to be resolved to file - ignore it
return false;
}
- var ambientModule = oldProgram.getTypeChecker().tryFindAmbientModuleWithoutAugmentations(moduleName);
+ var ambientModule = oldProgramState.program && oldProgramState.program.getTypeChecker().tryFindAmbientModuleWithoutAugmentations(moduleName);
if (!(ambientModule && ambientModule.declarations)) {
return false;
}
@@ -67025,84 +69536,94 @@ var ts;
}
function tryReuseStructureFromOldProgram() {
if (!oldProgram) {
- return false;
+ return 0 /* Not */;
}
// check properties that can affect structure of the program or module resolution strategy
// if any of these properties has changed - structure cannot be reused
var oldOptions = oldProgram.getCompilerOptions();
if (ts.changesAffectModuleResolution(oldOptions, options)) {
- return false;
+ return oldProgram.structureIsReused = 0 /* Not */;
}
- ts.Debug.assert(!oldProgram.structureIsReused);
+ ts.Debug.assert(!(oldProgram.structureIsReused & (2 /* Completely */ | 1 /* SafeModules */)));
// there is an old program, check if we can reuse its structure
var oldRootNames = oldProgram.getRootFileNames();
if (!ts.arrayIsEqualTo(oldRootNames, rootNames)) {
- return false;
+ return oldProgram.structureIsReused = 0 /* Not */;
}
if (!ts.arrayIsEqualTo(options.types, oldOptions.types)) {
- return false;
+ return oldProgram.structureIsReused = 0 /* Not */;
}
// check if program source files has changed in the way that can affect structure of the program
var newSourceFiles = [];
var filePaths = [];
var modifiedSourceFiles = [];
+ oldProgram.structureIsReused = 2 /* Completely */;
for (var _i = 0, _a = oldProgram.getSourceFiles(); _i < _a.length; _i++) {
var oldSourceFile = _a[_i];
var newSourceFile = host.getSourceFileByPath
? host.getSourceFileByPath(oldSourceFile.fileName, oldSourceFile.path, options.target)
: host.getSourceFile(oldSourceFile.fileName, options.target);
if (!newSourceFile) {
- return false;
+ return oldProgram.structureIsReused = 0 /* Not */;
}
newSourceFile.path = oldSourceFile.path;
filePaths.push(newSourceFile.path);
if (oldSourceFile !== newSourceFile) {
+ // The `newSourceFile` object was created for the new program.
if (oldSourceFile.hasNoDefaultLib !== newSourceFile.hasNoDefaultLib) {
// value of no-default-lib has changed
// this will affect if default library is injected into the list of files
- return false;
+ oldProgram.structureIsReused = 1 /* SafeModules */;
}
// check tripleslash references
if (!ts.arrayIsEqualTo(oldSourceFile.referencedFiles, newSourceFile.referencedFiles, fileReferenceIsEqualTo)) {
// tripleslash references has changed
- return false;
+ oldProgram.structureIsReused = 1 /* SafeModules */;
}
// check imports and module augmentations
collectExternalModuleReferences(newSourceFile);
if (!ts.arrayIsEqualTo(oldSourceFile.imports, newSourceFile.imports, moduleNameIsEqualTo)) {
// imports has changed
- return false;
+ oldProgram.structureIsReused = 1 /* SafeModules */;
}
if (!ts.arrayIsEqualTo(oldSourceFile.moduleAugmentations, newSourceFile.moduleAugmentations, moduleNameIsEqualTo)) {
// moduleAugmentations has changed
- return false;
+ oldProgram.structureIsReused = 1 /* SafeModules */;
+ }
+ if ((oldSourceFile.flags & 524288 /* PossiblyContainsDynamicImport */) !== (newSourceFile.flags & 524288 /* PossiblyContainsDynamicImport */)) {
+ // dynamicImport has changed
+ oldProgram.structureIsReused = 1 /* SafeModules */;
}
if (!ts.arrayIsEqualTo(oldSourceFile.typeReferenceDirectives, newSourceFile.typeReferenceDirectives, fileReferenceIsEqualTo)) {
// 'types' references has changed
- return false;
+ oldProgram.structureIsReused = 1 /* SafeModules */;
}
// tentatively approve the file
modifiedSourceFiles.push({ oldFile: oldSourceFile, newFile: newSourceFile });
}
- else {
- // file has no changes - use it as is
- newSourceFile = oldSourceFile;
- }
// if file has passed all checks it should be safe to reuse it
newSourceFiles.push(newSourceFile);
}
- var modifiedFilePaths = modifiedSourceFiles.map(function (f) { return f.newFile.path; });
+ if (oldProgram.structureIsReused !== 2 /* Completely */) {
+ return oldProgram.structureIsReused;
+ }
+ modifiedFilePaths = modifiedSourceFiles.map(function (f) { return f.newFile.path; });
// try to verify results of module resolution
for (var _b = 0, modifiedSourceFiles_1 = modifiedSourceFiles; _b < modifiedSourceFiles_1.length; _b++) {
var _c = modifiedSourceFiles_1[_b], oldSourceFile = _c.oldFile, newSourceFile = _c.newFile;
var newSourceFilePath = ts.getNormalizedAbsolutePath(newSourceFile.fileName, currentDirectory);
if (resolveModuleNamesWorker) {
var moduleNames = ts.map(ts.concatenate(newSourceFile.imports, newSourceFile.moduleAugmentations), getTextOfLiteral);
- var resolutions = resolveModuleNamesReusingOldState(moduleNames, newSourceFilePath, newSourceFile, { file: oldSourceFile, program: oldProgram, modifiedFilePaths: modifiedFilePaths });
+ var oldProgramState = { program: oldProgram, file: oldSourceFile, modifiedFilePaths: modifiedFilePaths };
+ var resolutions = resolveModuleNamesReusingOldState(moduleNames, newSourceFilePath, newSourceFile, oldProgramState);
// ensure that module resolution results are still correct
var resolutionsChanged = ts.hasChangesInResolutions(moduleNames, resolutions, oldSourceFile.resolvedModules, ts.moduleResolutionIsEqualTo);
if (resolutionsChanged) {
- return false;
+ oldProgram.structureIsReused = 1 /* SafeModules */;
+ newSourceFile.resolvedModules = ts.zipToMap(moduleNames, resolutions);
+ }
+ else {
+ newSourceFile.resolvedModules = oldSourceFile.resolvedModules;
}
}
if (resolveTypeReferenceDirectiveNamesWorker) {
@@ -67111,12 +69632,16 @@ var ts;
// ensure that types resolutions are still correct
var resolutionsChanged = ts.hasChangesInResolutions(typesReferenceDirectives, resolutions, oldSourceFile.resolvedTypeReferenceDirectiveNames, ts.typeDirectiveIsEqualTo);
if (resolutionsChanged) {
- return false;
+ oldProgram.structureIsReused = 1 /* SafeModules */;
+ newSourceFile.resolvedTypeReferenceDirectiveNames = ts.zipToMap(typesReferenceDirectives, resolutions);
+ }
+ else {
+ newSourceFile.resolvedTypeReferenceDirectiveNames = oldSourceFile.resolvedTypeReferenceDirectiveNames;
}
}
- // pass the cache of module/types resolutions from the old source file
- newSourceFile.resolvedModules = oldSourceFile.resolvedModules;
- newSourceFile.resolvedTypeReferenceDirectiveNames = oldSourceFile.resolvedTypeReferenceDirectiveNames;
+ }
+ if (oldProgram.structureIsReused !== 2 /* Completely */) {
+ return oldProgram.structureIsReused;
}
// update fileName -> file mapping
for (var i = 0; i < newSourceFiles.length; i++) {
@@ -67129,8 +69654,7 @@ var ts;
fileProcessingDiagnostics.reattachFileDiagnostics(modifiedFile.newFile);
}
resolvedTypeReferenceDirectives = oldProgram.getResolvedTypeReferenceDirectives();
- oldProgram.structureIsReused = true;
- return true;
+ return oldProgram.structureIsReused = 2 /* Completely */;
}
function getEmitHost(writeFileCallback) {
return {
@@ -67213,14 +69737,12 @@ var ts;
if (sourceFile) {
return getDiagnostics(sourceFile, cancellationToken);
}
- var allDiagnostics = [];
- ts.forEach(program.getSourceFiles(), function (sourceFile) {
+ return ts.sortAndDeduplicateDiagnostics(ts.flatMap(program.getSourceFiles(), function (sourceFile) {
if (cancellationToken) {
cancellationToken.throwIfCancellationRequested();
}
- ts.addRange(allDiagnostics, getDiagnostics(sourceFile, cancellationToken));
- });
- return ts.sortAndDeduplicateDiagnostics(allDiagnostics);
+ return getDiagnostics(sourceFile, cancellationToken);
+ }));
}
function getSyntacticDiagnostics(sourceFile, cancellationToken) {
return getDiagnosticsHelper(sourceFile, getSyntacticDiagnosticsForFile, cancellationToken);
@@ -67244,6 +69766,9 @@ var ts;
if (ts.isSourceFileJavaScript(sourceFile)) {
if (!sourceFile.additionalSyntacticDiagnostics) {
sourceFile.additionalSyntacticDiagnostics = getJavaScriptSyntacticDiagnosticsForFile(sourceFile);
+ if (ts.isCheckJsEnabledForFile(sourceFile, options)) {
+ sourceFile.additionalSyntacticDiagnostics = ts.concatenate(sourceFile.additionalSyntacticDiagnostics, sourceFile.jsDocDiagnostics);
+ }
}
return ts.concatenate(sourceFile.additionalSyntacticDiagnostics, sourceFile.parseDiagnostics);
}
@@ -67283,10 +69808,10 @@ var ts;
}
var typeChecker = getDiagnosticsProducingTypeChecker();
ts.Debug.assert(!!sourceFile.bindDiagnostics);
- var bindDiagnostics = sourceFile.bindDiagnostics;
// 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 includeBindAndCheckDiagnostics = !ts.isSourceFileJavaScript(sourceFile) || ts.isCheckJsEnabledForFile(sourceFile, options);
+ var bindDiagnostics = includeBindAndCheckDiagnostics ? sourceFile.bindDiagnostics : emptyArray;
+ var checkDiagnostics = includeBindAndCheckDiagnostics ? typeChecker.getDiagnostics(sourceFile, cancellationToken) : emptyArray;
var fileProcessingDiagnosticsInFile = fileProcessingDiagnostics.getDiagnostics(sourceFile.fileName);
var programDiagnosticsInFile = programDiagnostics.getDiagnostics(sourceFile.fileName);
var diagnostics = bindDiagnostics.concat(checkDiagnostics, fileProcessingDiagnosticsInFile, programDiagnosticsInFile);
@@ -67518,18 +70043,13 @@ var ts;
return result;
}
function getDeclarationDiagnosticsForFile(sourceFile, cancellationToken) {
- return ts.isDeclarationFile(sourceFile) ? [] : getDeclarationDiagnosticsWorker(sourceFile, cancellationToken);
+ return sourceFile.isDeclarationFile ? [] : getDeclarationDiagnosticsWorker(sourceFile, cancellationToken);
}
function getOptionsDiagnostics() {
- var allDiagnostics = [];
- ts.addRange(allDiagnostics, fileProcessingDiagnostics.getGlobalDiagnostics());
- ts.addRange(allDiagnostics, programDiagnostics.getGlobalDiagnostics());
- return ts.sortAndDeduplicateDiagnostics(allDiagnostics);
+ return ts.sortAndDeduplicateDiagnostics(ts.concatenate(fileProcessingDiagnostics.getGlobalDiagnostics(), programDiagnostics.getGlobalDiagnostics()));
}
function getGlobalDiagnostics() {
- var allDiagnostics = [];
- ts.addRange(allDiagnostics, getDiagnosticsProducingTypeChecker().getGlobalDiagnostics());
- return ts.sortAndDeduplicateDiagnostics(allDiagnostics);
+ return ts.sortAndDeduplicateDiagnostics(getDiagnosticsProducingTypeChecker().getGlobalDiagnostics().slice());
}
function processRootFile(fileName, isDefaultLib) {
processSourceFile(ts.normalizePath(fileName), isDefaultLib);
@@ -67549,7 +70069,7 @@ var ts;
}
var isJavaScriptFile = ts.isSourceFileJavaScript(file);
var isExternalModuleFile = ts.isExternalModule(file);
- var isDtsFile = ts.isDeclarationFile(file);
+ // file.imports may not be undefined if there exists dynamic import
var imports;
var moduleAugmentations;
var ambientModules;
@@ -67568,8 +70088,8 @@ var ts;
for (var _i = 0, _a = file.statements; _i < _a.length; _i++) {
var node = _a[_i];
collectModuleReferences(node, /*inAmbientModule*/ false);
- if (isJavaScriptFile) {
- collectRequireCalls(node);
+ if ((file.flags & 524288 /* PossiblyContainsDynamicImport */) || isJavaScriptFile) {
+ collectDynamicImportOrRequireCalls(node);
}
}
file.imports = imports || emptyArray;
@@ -67596,7 +70116,7 @@ var ts;
}
break;
case 233 /* ModuleDeclaration */:
- if (ts.isAmbientModule(node) && (inAmbientModule || ts.hasModifier(node, 2 /* Ambient */) || ts.isDeclarationFile(file))) {
+ if (ts.isAmbientModule(node) && (inAmbientModule || ts.hasModifier(node, 2 /* Ambient */) || file.isDeclarationFile)) {
var moduleName = node.name;
// Ambient module declarations can be interpreted as augmentations for some existing external modules.
// This will happen in two cases:
@@ -67607,7 +70127,7 @@ var ts;
(moduleAugmentations || (moduleAugmentations = [])).push(moduleName);
}
else if (!inAmbientModule) {
- if (isDtsFile) {
+ if (file.isDeclarationFile) {
// for global .d.ts files record name of ambient module
(ambientModules || (ambientModules = [])).push(moduleName.text);
}
@@ -67627,55 +70147,65 @@ var ts;
}
}
}
- function collectRequireCalls(node) {
+ function collectDynamicImportOrRequireCalls(node) {
if (ts.isRequireCall(node, /*checkArgumentIsStringLiteral*/ true)) {
(imports || (imports = [])).push(node.arguments[0]);
}
+ else if (ts.isImportCall(node) && node.arguments.length === 1 && node.arguments[0].kind === 9 /* StringLiteral */) {
+ (imports || (imports = [])).push(node.arguments[0]);
+ }
else {
- ts.forEachChild(node, collectRequireCalls);
+ ts.forEachChild(node, collectDynamicImportOrRequireCalls);
}
}
}
- function processSourceFile(fileName, isDefaultLib, refFile, refPos, refEnd) {
- var diagnosticArgument;
- var diagnostic;
+ /** This should have similar behavior to 'processSourceFile' without diagnostics or mutation. */
+ function getSourceFileFromReference(referencingFile, ref) {
+ return getSourceFileFromReferenceWorker(resolveTripleslashReference(ref.fileName, referencingFile.fileName), function (fileName) { return filesByName.get(ts.toPath(fileName, currentDirectory, getCanonicalFileName)); });
+ }
+ function getSourceFileFromReferenceWorker(fileName, getSourceFile, fail, refFile) {
if (ts.hasExtension(fileName)) {
if (!options.allowNonTsExtensions && !ts.forEach(supportedExtensions, function (extension) { return ts.fileExtensionIs(host.getCanonicalFileName(fileName), extension); })) {
- diagnostic = ts.Diagnostics.File_0_has_unsupported_extension_The_only_supported_extensions_are_1;
- diagnosticArgument = [fileName, "'" + supportedExtensions.join("', '") + "'"];
- }
- else if (!findSourceFile(fileName, ts.toPath(fileName, currentDirectory, getCanonicalFileName), isDefaultLib, refFile, refPos, refEnd)) {
- diagnostic = ts.Diagnostics.File_0_not_found;
- diagnosticArgument = [fileName];
- }
- else if (refFile && host.getCanonicalFileName(fileName) === host.getCanonicalFileName(refFile.fileName)) {
- diagnostic = ts.Diagnostics.A_file_cannot_have_a_reference_to_itself;
- diagnosticArgument = [fileName];
+ if (fail)
+ fail(ts.Diagnostics.File_0_has_unsupported_extension_The_only_supported_extensions_are_1, fileName, "'" + supportedExtensions.join("', '") + "'");
+ return undefined;
}
- }
- else {
- var nonTsFile = options.allowNonTsExtensions && findSourceFile(fileName, ts.toPath(fileName, currentDirectory, getCanonicalFileName), isDefaultLib, refFile, refPos, refEnd);
- if (!nonTsFile) {
- if (options.allowNonTsExtensions) {
- diagnostic = ts.Diagnostics.File_0_not_found;
- diagnosticArgument = [fileName];
+ var sourceFile = getSourceFile(fileName);
+ if (fail) {
+ if (!sourceFile) {
+ fail(ts.Diagnostics.File_0_not_found, fileName);
}
- else if (!ts.forEach(supportedExtensions, function (extension) { return findSourceFile(fileName + extension, ts.toPath(fileName + extension, currentDirectory, getCanonicalFileName), isDefaultLib, refFile, refPos, refEnd); })) {
- diagnostic = ts.Diagnostics.File_0_not_found;
- fileName += ".ts";
- diagnosticArgument = [fileName];
+ else if (refFile && host.getCanonicalFileName(fileName) === host.getCanonicalFileName(refFile.fileName)) {
+ fail(ts.Diagnostics.A_file_cannot_have_a_reference_to_itself, fileName);
}
}
+ return sourceFile;
}
- if (diagnostic) {
- if (refFile !== undefined && refEnd !== undefined && refPos !== undefined) {
- fileProcessingDiagnostics.add(ts.createFileDiagnostic.apply(void 0, [refFile, refPos, refEnd - refPos, diagnostic].concat(diagnosticArgument)));
- }
- else {
- fileProcessingDiagnostics.add(ts.createCompilerDiagnostic.apply(void 0, [diagnostic].concat(diagnosticArgument)));
+ else {
+ var sourceFileNoExtension = options.allowNonTsExtensions && getSourceFile(fileName);
+ if (sourceFileNoExtension)
+ return sourceFileNoExtension;
+ if (fail && options.allowNonTsExtensions) {
+ fail(ts.Diagnostics.File_0_not_found, fileName);
+ return undefined;
}
+ var sourceFileWithAddedExtension = ts.forEach(supportedExtensions, function (extension) { return getSourceFile(fileName + extension); });
+ if (fail && !sourceFileWithAddedExtension)
+ fail(ts.Diagnostics.File_0_not_found, fileName + ".ts");
+ return sourceFileWithAddedExtension;
}
}
+ /** This has side effects through `findSourceFile`. */
+ function processSourceFile(fileName, isDefaultLib, refFile, refPos, refEnd) {
+ getSourceFileFromReferenceWorker(fileName, function (fileName) { return findSourceFile(fileName, ts.toPath(fileName, currentDirectory, getCanonicalFileName), isDefaultLib, refFile, refPos, refEnd); }, function (diagnostic) {
+ var args = [];
+ for (var _i = 1; _i < arguments.length; _i++) {
+ args[_i - 1] = arguments[_i];
+ }
+ fileProcessingDiagnostics.add(refFile !== undefined && refEnd !== undefined && refPos !== undefined
+ ? ts.createFileDiagnostic.apply(void 0, [refFile, refPos, refEnd - refPos, diagnostic].concat(args)) : ts.createCompilerDiagnostic.apply(void 0, [diagnostic].concat(args)));
+ }, refFile);
+ }
function reportFileNamesDifferOnlyInCasingError(fileName, existingFileName, refFile, refPos, refEnd) {
if (refFile !== undefined && refPos !== undefined && refEnd !== undefined) {
fileProcessingDiagnostics.add(ts.createFileDiagnostic(refFile, refPos, refEnd - refPos, ts.Diagnostics.File_name_0_differs_from_already_included_file_name_1_only_in_casing, fileName, existingFileName));
@@ -67827,11 +70357,11 @@ var ts;
function processImportedModules(file) {
collectExternalModuleReferences(file);
if (file.imports.length || file.moduleAugmentations.length) {
- file.resolvedModules = ts.createMap();
// Because global augmentation doesn't have string literal name, we can check for global augmentation as such.
var nonGlobalAugmentation = ts.filter(file.moduleAugmentations, function (moduleAugmentation) { return moduleAugmentation.kind === 9 /* StringLiteral */; });
var moduleNames = ts.map(ts.concatenate(file.imports, nonGlobalAugmentation), getTextOfLiteral);
- var resolutions = resolveModuleNamesReusingOldState(moduleNames, ts.getNormalizedAbsolutePath(file.fileName, currentDirectory), file);
+ var oldProgramState = { program: oldProgram, file: file, modifiedFilePaths: modifiedFilePaths };
+ var resolutions = resolveModuleNamesReusingOldState(moduleNames, ts.getNormalizedAbsolutePath(file.fileName, currentDirectory), file, oldProgramState);
ts.Debug.assert(resolutions.length === moduleNames.length);
for (var i = 0; i < moduleNames.length; i++) {
var resolution = resolutions[i];
@@ -67888,7 +70418,7 @@ var ts;
var absoluteRootDirectoryPath = host.getCanonicalFileName(ts.getNormalizedAbsolutePath(rootDirectory, currentDirectory));
for (var _i = 0, sourceFiles_3 = sourceFiles; _i < sourceFiles_3.length; _i++) {
var sourceFile = sourceFiles_3[_i];
- if (!ts.isDeclarationFile(sourceFile)) {
+ if (!sourceFile.isDeclarationFile) {
var absoluteSourceFilePath = host.getCanonicalFileName(ts.getNormalizedAbsolutePath(sourceFile.fileName, currentDirectory));
if (absoluteSourceFilePath.indexOf(absoluteRootDirectoryPath) !== 0) {
programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files, sourceFile.fileName, options.rootDir));
@@ -67986,12 +70516,12 @@ var ts;
}
var languageVersion = options.target || 0 /* ES3 */;
var outFile = options.outFile || options.out;
- var firstNonAmbientExternalModuleSourceFile = ts.forEach(files, function (f) { return ts.isExternalModule(f) && !ts.isDeclarationFile(f) ? f : undefined; });
+ var firstNonAmbientExternalModuleSourceFile = ts.forEach(files, function (f) { return ts.isExternalModule(f) && !f.isDeclarationFile ? f : undefined; });
if (options.isolatedModules) {
if (options.module === ts.ModuleKind.None && languageVersion < 2 /* ES2015 */) {
programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES2015_or_higher));
}
- var firstNonExternalModuleSourceFile = ts.forEach(files, function (f) { return !ts.isExternalModule(f) && !ts.isDeclarationFile(f) ? f : undefined; });
+ var firstNonExternalModuleSourceFile = ts.forEach(files, function (f) { return !ts.isExternalModule(f) && !f.isDeclarationFile ? f : undefined; });
if (firstNonExternalModuleSourceFile) {
var span_7 = ts.getErrorSpanForNode(firstNonExternalModuleSourceFile, firstNonExternalModuleSourceFile);
programDiagnostics.add(ts.createFileDiagnostic(firstNonExternalModuleSourceFile, span_7.start, span_7.length, ts.Diagnostics.Cannot_compile_namespaces_when_the_isolatedModules_flag_is_provided));
@@ -68215,11 +70745,12 @@ var ts;
"umd": ts.ModuleKind.UMD,
"es6": ts.ModuleKind.ES2015,
"es2015": ts.ModuleKind.ES2015,
+ "esnext": ts.ModuleKind.ESNext
}),
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,
+ description: ts.Diagnostics.Specify_module_code_generation_Colon_commonjs_amd_system_umd_es2015_or_ESNext,
},
{
name: "lib",
@@ -68254,6 +70785,7 @@ var ts;
"es2017.object": "lib.es2017.object.d.ts",
"es2017.sharedmemory": "lib.es2017.sharedmemory.d.ts",
"es2017.string": "lib.es2017.string.d.ts",
+ "es2017.intl": "lib.es2017.intl.d.ts",
"esnext.asynciterable": "lib.esnext.asynciterable.d.ts",
}),
},
@@ -68726,6 +71258,12 @@ var ts;
description: ts.Diagnostics.The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files
},
{
+ name: "noStrictGenericChecks",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Disable_strict_checking_of_generic_signatures_in_function_types,
+ },
+ {
// A list of plugins to load in the language service
name: "plugins",
type: "list",
@@ -68788,7 +71326,6 @@ var ts;
return typeAcquisition;
}
ts.convertEnableAutoDiscoveryToEnable = convertEnableAutoDiscoveryToEnable;
- /* @internal */
function getOptionNameMap() {
if (optionNameMapCache) {
return optionNameMapCache;
@@ -68804,7 +71341,6 @@ var ts;
optionNameMapCache = { optionNameMap: optionNameMap, shortOptionNames: shortOptionNames };
return optionNameMapCache;
}
- ts.getOptionNameMap = getOptionNameMap;
/* @internal */
function createCompilerDiagnosticForInvalidCustomType(opt) {
var namesOfType = ts.arrayFrom(opt.type.keys()).map(function (key) { return "'" + key + "'"; }).join(", ");
@@ -68841,7 +71377,6 @@ var ts;
var options = {};
var fileNames = [];
var errors = [];
- var _a = getOptionNameMap(), optionNameMap = _a.optionNameMap, shortOptionNames = _a.shortOptionNames;
parseStrings(commandLine);
return {
options: options,
@@ -68857,13 +71392,7 @@ var ts;
parseResponseFile(s.slice(1));
}
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.
- var short = shortOptionNames.get(s);
- if (short !== undefined) {
- s = short;
- }
- var opt = optionNameMap.get(s);
+ var opt = getOptionFromName(s.slice(s.charCodeAt(1) === 45 /* minus */ ? 2 : 1), /*allowShort*/ true);
if (opt) {
if (opt.isTSConfigOnly) {
errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_can_only_be_specified_in_tsconfig_json_file, opt.name));
@@ -68951,6 +71480,19 @@ var ts;
}
}
ts.parseCommandLine = parseCommandLine;
+ function getOptionFromName(optionName, allowShort) {
+ if (allowShort === void 0) { allowShort = false; }
+ optionName = optionName.toLowerCase();
+ var _a = getOptionNameMap(), optionNameMap = _a.optionNameMap, shortOptionNames = _a.shortOptionNames;
+ // Try to translate short option names to their full equivalents.
+ if (allowShort) {
+ var short = shortOptionNames.get(optionName);
+ if (short !== undefined) {
+ optionName = short;
+ }
+ }
+ return optionNameMap.get(optionName);
+ }
/**
* Read tsconfig.json file
* @param fileName The path to the config file
@@ -69120,7 +71662,7 @@ var ts;
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);
+ result.push(optionName && "" + tab + tab + optionName + (description && (makePadding(marginLength - optionName.length + 2) + description)));
}
if (configurations.files && configurations.files.length) {
result.push(tab + "},");
@@ -69168,57 +71710,37 @@ var ts;
* @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
+ * @param resolutionStack Only present for backwards-compatibility. Should be empty.
*/
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);
- // typingOptions has been deprecated and is only supported for backward compatibility purposes.
- // It should be removed in future releases - use typeAcquisition instead.
- var jsonOptions = json["typeAcquisition"] || json["typingOptions"];
- var typeAcquisition = convertTypeAcquisitionFromJsonWorker(jsonOptions, basePath, errors, configFileName);
- var baseCompileOnSave;
- 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, baseCompileOnSave, baseOptions]), include = _b[0], exclude = _b[1], files = _b[2], baseCompileOnSave = _b[3], baseOptions = _b[4];
- }
- else {
- errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Compiler_option_0_requires_a_value_of_type_1, "extends", "string"));
+ var options = (function () {
+ var _a = parseConfig(json, host, basePath, configFileName, resolutionStack, errors), include = _a.include, exclude = _a.exclude, files = _a.files, options = _a.options, compileOnSave = _a.compileOnSave;
+ if (include) {
+ json.include = include;
}
- if (include && !json["include"]) {
- json["include"] = include;
+ if (exclude) {
+ json.exclude = exclude;
}
- if (exclude && !json["exclude"]) {
- json["exclude"] = exclude;
+ if (files) {
+ json.files = files;
}
- if (files && !json["files"]) {
- json["files"] = files;
+ if (compileOnSave !== undefined) {
+ json.compileOnSave = compileOnSave;
}
- options = ts.assign({}, baseOptions, options);
- }
+ return options;
+ })();
options = ts.extend(existingOptions, options);
options.configFilePath = configFileName;
- var _c = getFileNames(errors), fileNames = _c.fileNames, wildcardDirectories = _c.wildcardDirectories;
+ // typingOptions has been deprecated and is only supported for backward compatibility purposes.
+ // It should be removed in future releases - use typeAcquisition instead.
+ var jsonOptions = json["typeAcquisition"] || json["typingOptions"];
+ var typeAcquisition = convertTypeAcquisitionFromJsonWorker(jsonOptions, basePath, errors, configFileName);
+ var _a = getFileNames(), fileNames = _a.fileNames, wildcardDirectories = _a.wildcardDirectories;
var compileOnSave = convertCompileOnSaveOptionFromJson(json, basePath, errors);
- if (baseCompileOnSave && json[ts.compileOnSaveCommandLineOption.name] === undefined) {
- compileOnSave = baseCompileOnSave;
- }
return {
options: options,
fileNames: fileNames,
@@ -69228,39 +71750,7 @@ var ts;
wildcardDirectories: wildcardDirectories,
compileOnSave: compileOnSave
};
- function tryExtendsName(extendedConfig) {
- // If the path isn't a rooted or relative path, don't try to resolve it (we reserve the right to special case module-id like paths in the future)
- 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); };
- // Merge configs (copy the resolution stack so it is never reused between branches in potential diamond-problem scenarios)
- var result = parseJsonConfigFileContent(extendedResult.config, host, extendedDirname, /*existingOptions*/ 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.compileOnSave, result.options];
- }
- function getFileNames(errors) {
+ function getFileNames() {
var fileNames;
if (ts.hasProperty(json, "files")) {
if (ts.isArray(json["files"])) {
@@ -69291,9 +71781,6 @@ var ts;
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 {
// If no includes were specified, exclude common package folders and the outDir
excludeSpecs = includeSpecs ? [] : ["node_modules", "bower_components", "jspm_packages"];
@@ -69311,9 +71798,73 @@ var ts;
}
return result;
}
- var _b;
}
ts.parseJsonConfigFileContent = parseJsonConfigFileContent;
+ /**
+ * This *just* extracts options/include/exclude/files out of a config file.
+ * It does *not* resolve the included files.
+ */
+ function parseConfig(json, host, basePath, configFileName, resolutionStack, errors) {
+ basePath = ts.normalizeSlashes(basePath);
+ var getCanonicalFileName = ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames);
+ var resolvedPath = ts.toPath(configFileName || "", basePath, getCanonicalFileName);
+ if (resolutionStack.indexOf(resolvedPath) >= 0) {
+ errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Circularity_detected_while_resolving_configuration_Colon_0, resolutionStack.concat([resolvedPath]).join(" -> ")));
+ return { include: undefined, exclude: undefined, files: undefined, options: {}, compileOnSave: undefined };
+ }
+ if (ts.hasProperty(json, "excludes")) {
+ errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Unknown_option_excludes_Did_you_mean_exclude));
+ }
+ var options = convertCompilerOptionsFromJsonWorker(json.compilerOptions, basePath, errors, configFileName);
+ var include = json.include, exclude = json.exclude, files = json.files;
+ var compileOnSave = json.compileOnSave;
+ if (json.extends) {
+ // copy the resolution stack so it is never reused between branches in potential diamond-problem scenarios.
+ resolutionStack = resolutionStack.concat([resolvedPath]);
+ var base = getExtendedConfig(json.extends, host, basePath, getCanonicalFileName, resolutionStack, errors);
+ if (base) {
+ include = include || base.include;
+ exclude = exclude || base.exclude;
+ files = files || base.files;
+ if (compileOnSave === undefined) {
+ compileOnSave = base.compileOnSave;
+ }
+ options = ts.assign({}, base.options, options);
+ }
+ }
+ return { include: include, exclude: exclude, files: files, options: options, compileOnSave: compileOnSave };
+ }
+ function getExtendedConfig(extended, // Usually a string.
+ host, basePath, getCanonicalFileName, resolutionStack, errors) {
+ if (typeof extended !== "string") {
+ errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Compiler_option_0_requires_a_value_of_type_1, "extends", "string"));
+ return undefined;
+ }
+ extended = ts.normalizeSlashes(extended);
+ // If the path isn't a rooted or relative path, don't try to resolve it (we reserve the right to special case module-id like paths in the future)
+ if (!(ts.isRootedDiskPath(extended) || ts.startsWith(extended, "./") || ts.startsWith(extended, "../"))) {
+ errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.A_path_in_an_extends_option_must_be_relative_or_rooted_but_0_is_not, extended));
+ return undefined;
+ }
+ var extendedConfigPath = ts.toPath(extended, 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, extended));
+ return undefined;
+ }
+ }
+ var extendedResult = readConfigFile(extendedConfigPath, function (path) { return host.readFile(path); });
+ if (extendedResult.error) {
+ errors.push(extendedResult.error);
+ return undefined;
+ }
+ 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 _a = parseConfig(extendedResult.config, host, extendedDirname, ts.getBaseFileName(extendedConfigPath), resolutionStack, errors), include = _a.include, exclude = _a.exclude, files = _a.files, options = _a.options, compileOnSave = _a.compileOnSave;
+ return { include: ts.map(include, updatePath), exclude: ts.map(exclude, updatePath), files: ts.map(files, updatePath), compileOnSave: compileOnSave, options: options };
+ }
function convertCompileOnSaveOptionFromJson(jsonOption, basePath, errors) {
if (!ts.hasProperty(jsonOption, ts.compileOnSaveCommandLineOption.name)) {
return false;
@@ -69609,7 +72160,7 @@ var ts;
}
}
// Remove any subpaths under an existing recursively watched directory.
- for (var key in wildcardDirectories)
+ 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];
@@ -69618,6 +72169,7 @@ var ts;
}
}
}
+ }
}
return wildcardDirectories;
}
@@ -69687,6 +72239,45 @@ var ts;
function caseInsensitiveKeyMapper(key) {
return key.toLowerCase();
}
+ /**
+ * Produces a cleaned version of compiler options with personally identifiying info (aka, paths) removed.
+ * Also converts enum values back to strings.
+ */
+ /* @internal */
+ function convertCompilerOptionsForTelemetry(opts) {
+ var out = {};
+ for (var key in opts) {
+ if (opts.hasOwnProperty(key)) {
+ var type = getOptionFromName(key);
+ if (type !== undefined) {
+ out[key] = getOptionValueWithEmptyStrings(opts[key], type);
+ }
+ }
+ }
+ return out;
+ }
+ ts.convertCompilerOptionsForTelemetry = convertCompilerOptionsForTelemetry;
+ function getOptionValueWithEmptyStrings(value, option) {
+ switch (option.type) {
+ case "object":// "paths". Can't get any useful information from the value since we blank out strings, so just return "".
+ return "";
+ case "string":// Could be any arbitrary string -- use empty string instead.
+ return "";
+ case "number":// Allow numbers, but be sure to check it's actually a number.
+ return typeof value === "number" ? value : "";
+ case "boolean":
+ return typeof value === "boolean" ? value : "";
+ case "list":
+ var elementType_1 = option.element;
+ return ts.isArray(value) ? value.map(function (v) { return getOptionValueWithEmptyStrings(v, elementType_1); }) : "";
+ default:
+ return ts.forEachEntry(option.type, function (optionEnumValue, optionStringValue) {
+ if (optionEnumValue === value) {
+ return optionStringValue;
+ }
+ });
+ }
+ }
})(ts || (ts = {}));
var ts;
(function (ts) {
@@ -69871,31 +72462,31 @@ var ts;
var ClassificationTypeNames = (function () {
function ClassificationTypeNames() {
}
+ ClassificationTypeNames.comment = "comment";
+ ClassificationTypeNames.identifier = "identifier";
+ ClassificationTypeNames.keyword = "keyword";
+ ClassificationTypeNames.numericLiteral = "number";
+ ClassificationTypeNames.operator = "operator";
+ ClassificationTypeNames.stringLiteral = "string";
+ ClassificationTypeNames.whiteSpace = "whitespace";
+ ClassificationTypeNames.text = "text";
+ ClassificationTypeNames.punctuation = "punctuation";
+ ClassificationTypeNames.className = "class name";
+ ClassificationTypeNames.enumName = "enum name";
+ ClassificationTypeNames.interfaceName = "interface name";
+ ClassificationTypeNames.moduleName = "module name";
+ ClassificationTypeNames.typeParameterName = "type parameter name";
+ ClassificationTypeNames.typeAliasName = "type alias name";
+ ClassificationTypeNames.parameterName = "parameter name";
+ ClassificationTypeNames.docCommentTagName = "doc comment tag name";
+ ClassificationTypeNames.jsxOpenTagName = "jsx open tag name";
+ ClassificationTypeNames.jsxCloseTagName = "jsx close tag name";
+ ClassificationTypeNames.jsxSelfClosingTagName = "jsx self closing tag name";
+ ClassificationTypeNames.jsxAttribute = "jsx attribute";
+ ClassificationTypeNames.jsxText = "jsx text";
+ ClassificationTypeNames.jsxAttributeStringLiteralValue = "jsx attribute string literal value";
return ClassificationTypeNames;
}());
- ClassificationTypeNames.comment = "comment";
- ClassificationTypeNames.identifier = "identifier";
- ClassificationTypeNames.keyword = "keyword";
- ClassificationTypeNames.numericLiteral = "number";
- ClassificationTypeNames.operator = "operator";
- ClassificationTypeNames.stringLiteral = "string";
- ClassificationTypeNames.whiteSpace = "whitespace";
- ClassificationTypeNames.text = "text";
- ClassificationTypeNames.punctuation = "punctuation";
- ClassificationTypeNames.className = "class name";
- ClassificationTypeNames.enumName = "enum name";
- ClassificationTypeNames.interfaceName = "interface name";
- ClassificationTypeNames.moduleName = "module name";
- ClassificationTypeNames.typeParameterName = "type parameter name";
- ClassificationTypeNames.typeAliasName = "type alias name";
- ClassificationTypeNames.parameterName = "parameter name";
- ClassificationTypeNames.docCommentTagName = "doc comment tag name";
- ClassificationTypeNames.jsxOpenTagName = "jsx open tag name";
- ClassificationTypeNames.jsxCloseTagName = "jsx close tag name";
- ClassificationTypeNames.jsxSelfClosingTagName = "jsx self closing tag name";
- ClassificationTypeNames.jsxAttribute = "jsx attribute";
- ClassificationTypeNames.jsxText = "jsx text";
- ClassificationTypeNames.jsxAttributeStringLiteralValue = "jsx attribute string literal value";
ts.ClassificationTypeNames = ClassificationTypeNames;
var ClassificationType;
(function (ClassificationType) {
@@ -69948,7 +72539,6 @@ var ts;
case 148 /* PropertySignature */:
case 261 /* PropertyAssignment */:
case 262 /* ShorthandPropertyAssignment */:
- case 264 /* EnumMember */:
case 151 /* MethodDeclaration */:
case 150 /* MethodSignature */:
case 152 /* Constructor */:
@@ -69965,8 +72555,11 @@ var ts;
case 231 /* TypeAliasDeclaration */:
case 163 /* TypeLiteral */:
return 2 /* Type */;
+ case 291 /* JSDocTypedefTag */:
+ // If it has no name node, it shares the name with the value declaration below it.
+ return node.name === undefined ? 1 /* Value */ | 2 /* Type */ : 2 /* Type */;
+ case 264 /* EnumMember */:
case 229 /* ClassDeclaration */:
- case 232 /* EnumDeclaration */:
return 1 /* Value */ | 2 /* Type */;
case 233 /* ModuleDeclaration */:
if (ts.isAmbientModule(node)) {
@@ -69978,18 +72571,19 @@ var ts;
else {
return 4 /* Namespace */;
}
+ case 232 /* EnumDeclaration */:
case 241 /* NamedImports */:
case 242 /* ImportSpecifier */:
case 237 /* ImportEqualsDeclaration */:
case 238 /* ImportDeclaration */:
case 243 /* ExportAssignment */:
case 244 /* ExportDeclaration */:
- return 1 /* Value */ | 2 /* Type */ | 4 /* Namespace */;
+ return 7 /* All */;
// An external module can be a Value
case 265 /* SourceFile */:
return 4 /* Namespace */ | 1 /* Value */;
}
- return 1 /* Value */ | 2 /* Type */ | 4 /* Namespace */;
+ return 7 /* All */;
}
ts.getMeaningFromDeclaration = getMeaningFromDeclaration;
function getMeaningFromLocation(node) {
@@ -69997,9 +72591,9 @@ var ts;
return 1 /* Value */;
}
else if (node.parent.kind === 243 /* ExportAssignment */) {
- return 1 /* Value */ | 2 /* Type */ | 4 /* Namespace */;
+ return 7 /* All */;
}
- else if (isInRightSideOfImport(node)) {
+ else if (isInRightSideOfInternalImportEqualsDeclaration(node)) {
return getMeaningFromRightHandSideOfImportEquals(node);
}
else if (ts.isDeclarationName(node)) {
@@ -70011,6 +72605,10 @@ var ts;
else if (isNamespaceReference(node)) {
return 4 /* Namespace */;
}
+ else if (ts.isTypeParameterDeclaration(node.parent)) {
+ ts.Debug.assert(ts.isJSDocTemplateTag(node.parent.parent)); // Else would be handled by isDeclarationName
+ return 2 /* Type */;
+ }
else {
return 1 /* Value */;
}
@@ -70028,12 +72626,13 @@ var ts;
}
return 4 /* Namespace */;
}
- function isInRightSideOfImport(node) {
+ function isInRightSideOfInternalImportEqualsDeclaration(node) {
while (node.parent.kind === 143 /* QualifiedName */) {
node = node.parent;
}
return ts.isInternalModuleImportEqualsDeclaration(node.parent) && node.parent.moduleReference === node;
}
+ ts.isInRightSideOfInternalImportEqualsDeclaration = isInRightSideOfInternalImportEqualsDeclaration;
function isNamespaceReference(node) {
return isQualifiedNameNamespaceReference(node) || isPropertyAccessNamespaceReference(node);
}
@@ -70068,10 +72667,20 @@ var ts;
if (ts.isRightSideOfQualifiedNameOrPropertyAccess(node)) {
node = node.parent;
}
- return node.parent.kind === 159 /* TypeReference */ ||
- (node.parent.kind === 201 /* ExpressionWithTypeArguments */ && !ts.isExpressionWithTypeArgumentsInClassExtendsClause(node.parent)) ||
- (node.kind === 99 /* ThisKeyword */ && !ts.isPartOfExpression(node)) ||
- node.kind === 169 /* ThisType */;
+ switch (node.kind) {
+ case 99 /* ThisKeyword */:
+ return !ts.isPartOfExpression(node);
+ case 169 /* ThisType */:
+ return true;
+ }
+ switch (node.parent.kind) {
+ case 159 /* TypeReference */:
+ case 277 /* JSDocTypeReference */:
+ return true;
+ case 201 /* ExpressionWithTypeArguments */:
+ return !ts.isExpressionWithTypeArgumentsInClassExtendsClause(node.parent);
+ }
+ return false;
}
function isCallExpressionTarget(node) {
return isCallOrNewExpressionTarget(node, 181 /* CallExpression */);
@@ -70143,7 +72752,7 @@ var ts;
case 153 /* GetAccessor */:
case 154 /* SetAccessor */:
case 233 /* ModuleDeclaration */:
- return node.parent.name === node;
+ return ts.getNameOfDeclaration(node.parent) === node;
case 180 /* ElementAccessExpression */:
return node.parent.argumentExpression === node;
case 144 /* ComputedPropertyName */:
@@ -70158,36 +72767,6 @@ var ts;
ts.getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node;
}
ts.isExpressionOfExternalModuleImportEqualsDeclaration = isExpressionOfExternalModuleImportEqualsDeclaration;
- /** Returns true if the position is within a comment */
- function isInsideComment(sourceFile, token, position) {
- // The position has to be: 1. in the leading trivia (before token.getStart()), and 2. within a comment
- return position <= token.getStart(sourceFile) &&
- (isInsideCommentRange(ts.getTrailingCommentRanges(sourceFile.text, token.getFullStart())) ||
- isInsideCommentRange(ts.getLeadingCommentRanges(sourceFile.text, token.getFullStart())));
- function isInsideCommentRange(comments) {
- return ts.forEach(comments, function (comment) {
- // either we are 1. completely inside the comment, or 2. at the end of the comment
- if (comment.pos < position && position < comment.end) {
- return true;
- }
- else if (position === comment.end) {
- var text = sourceFile.text;
- var width = comment.end - comment.pos;
- // is single line comment or just /*
- if (width <= 2 || text.charCodeAt(comment.pos + 1) === 47 /* slash */) {
- return true;
- }
- else {
- // is unterminated multi-line comment
- return !(text.charCodeAt(comment.end - 1) === 47 /* slash */ &&
- text.charCodeAt(comment.end - 2) === 42 /* asterisk */);
- }
- }
- return false;
- });
- }
- }
- ts.isInsideComment = isInsideComment;
function getContainerNode(node) {
while (true) {
node = node.parent;
@@ -70252,7 +72831,7 @@ var ts;
case 246 /* ExportSpecifier */:
case 240 /* NamespaceImport */:
return ts.ScriptElementKind.alias;
- case 290 /* JSDocTypedefTag */:
+ case 291 /* JSDocTypedefTag */:
return ts.ScriptElementKind.typeElement;
default:
return ts.ScriptElementKind.unknown;
@@ -70479,7 +73058,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 === 294 /* SyntaxList */ && c.pos <= node.pos && c.end >= node.end) {
+ if (c.kind === 295 /* SyntaxList */ && c.pos <= node.pos && c.end >= node.end) {
return c;
}
});
@@ -70492,78 +73071,56 @@ var ts;
* position >= start and (position < end or (position === end && token is keyword or identifier))
*/
function getTouchingWord(sourceFile, position, includeJsDocComment) {
- if (includeJsDocComment === void 0) { includeJsDocComment = false; }
- return getTouchingToken(sourceFile, position, function (n) { return isWord(n.kind); }, includeJsDocComment);
+ return getTouchingToken(sourceFile, position, includeJsDocComment, function (n) { return isWord(n.kind); });
}
ts.getTouchingWord = getTouchingWord;
/* Gets the token whose text has range [start, end) and position >= start
* and (position < end or (position === end && token is keyword or identifier or numeric/string literal))
*/
function getTouchingPropertyName(sourceFile, position, includeJsDocComment) {
- if (includeJsDocComment === void 0) { includeJsDocComment = false; }
- return getTouchingToken(sourceFile, position, function (n) { return isPropertyName(n.kind); }, includeJsDocComment);
+ return getTouchingToken(sourceFile, position, includeJsDocComment, function (n) { return isPropertyName(n.kind); });
}
ts.getTouchingPropertyName = getTouchingPropertyName;
- /** Returns the token if position is in [start, end) or if position === end and includeItemAtEndPosition(token) === true */
- function getTouchingToken(sourceFile, position, includeItemAtEndPosition, includeJsDocComment) {
- if (includeJsDocComment === void 0) { includeJsDocComment = false; }
- return getTokenAtPositionWorker(sourceFile, position, /*allowPositionInLeadingTrivia*/ false, includeItemAtEndPosition, includeJsDocComment);
+ /**
+ * Returns the token if position is in [start, end).
+ * If position === end, returns the preceding token if includeItemAtEndPosition(previousToken) === true
+ */
+ function getTouchingToken(sourceFile, position, includeJsDocComment, includePrecedingTokenAtEndPosition) {
+ return getTokenAtPositionWorker(sourceFile, position, /*allowPositionInLeadingTrivia*/ false, includePrecedingTokenAtEndPosition, /*includeEndPosition*/ false, includeJsDocComment);
}
ts.getTouchingToken = getTouchingToken;
/** Returns a token if position is in [start-of-leading-trivia, end) */
- function getTokenAtPosition(sourceFile, position, includeJsDocComment) {
- if (includeJsDocComment === void 0) { includeJsDocComment = false; }
- return getTokenAtPositionWorker(sourceFile, position, /*allowPositionInLeadingTrivia*/ true, /*includeItemAtEndPosition*/ undefined, includeJsDocComment);
+ function getTokenAtPosition(sourceFile, position, includeJsDocComment, includeEndPosition) {
+ return getTokenAtPositionWorker(sourceFile, position, /*allowPositionInLeadingTrivia*/ true, /*includePrecedingTokenAtEndPosition*/ undefined, includeEndPosition, includeJsDocComment);
}
ts.getTokenAtPosition = getTokenAtPosition;
/** Get the token whose text contains the position */
- function getTokenAtPositionWorker(sourceFile, position, allowPositionInLeadingTrivia, includeItemAtEndPosition, includeJsDocComment) {
- if (includeJsDocComment === void 0) { includeJsDocComment = false; }
+ function getTokenAtPositionWorker(sourceFile, position, allowPositionInLeadingTrivia, includePrecedingTokenAtEndPosition, includeEndPosition, includeJsDocComment) {
var current = sourceFile;
outer: while (true) {
if (ts.isToken(current)) {
// exit early
return current;
}
- if (includeJsDocComment) {
- var jsDocChildren = ts.filter(current.getChildren(), ts.isJSDocNode);
- for (var _i = 0, jsDocChildren_1 = jsDocChildren; _i < jsDocChildren_1.length; _i++) {
- var jsDocChild = jsDocChildren_1[_i];
- var start = allowPositionInLeadingTrivia ? jsDocChild.getFullStart() : jsDocChild.getStart(sourceFile, includeJsDocComment);
- if (start <= position) {
- var end = jsDocChild.getEnd();
- if (position < end || (position === end && jsDocChild.kind === 1 /* EndOfFileToken */)) {
- current = jsDocChild;
- continue outer;
- }
- else if (includeItemAtEndPosition && end === position) {
- var previousToken = findPrecedingToken(position, sourceFile, jsDocChild);
- if (previousToken && includeItemAtEndPosition(previousToken)) {
- return previousToken;
- }
- }
- }
- }
- }
// find the child that contains 'position'
- 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)) {
+ for (var _i = 0, _a = current.getChildren(); _i < _a.length; _i++) {
+ var child = _a[_i];
+ if (!includeJsDocComment && ts.isJSDocNode(child)) {
continue;
}
var start = allowPositionInLeadingTrivia ? child.getFullStart() : child.getStart(sourceFile, includeJsDocComment);
- if (start <= position) {
- var end = child.getEnd();
- if (position < end || (position === end && child.kind === 1 /* EndOfFileToken */)) {
- current = child;
- continue outer;
- }
- else if (includeItemAtEndPosition && end === position) {
- var previousToken = findPrecedingToken(position, sourceFile, child);
- if (previousToken && includeItemAtEndPosition(previousToken)) {
- return previousToken;
- }
+ if (start > position) {
+ continue;
+ }
+ var end = child.getEnd();
+ if (position < end || (position === end && (child.kind === 1 /* EndOfFileToken */ || includeEndPosition))) {
+ current = child;
+ continue outer;
+ }
+ else if (includePrecedingTokenAtEndPosition && end === position) {
+ var previousToken = findPrecedingToken(position, sourceFile, child);
+ if (previousToken && includePrecedingTokenAtEndPosition(previousToken)) {
+ return previousToken;
}
}
}
@@ -70581,7 +73138,7 @@ var ts;
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);
+ var tokenAtPosition = getTokenAtPosition(file, position, /*includeJsDocComment*/ false);
if (ts.isToken(tokenAtPosition) && position > tokenAtPosition.getStart(file) && position < tokenAtPosition.getEnd()) {
return tokenAtPosition;
}
@@ -70611,7 +73168,7 @@ var ts;
}
}
ts.findNextToken = findNextToken;
- function findPrecedingToken(position, sourceFile, startNode) {
+ function findPrecedingToken(position, sourceFile, startNode, includeJsDoc) {
return find(startNode || sourceFile);
function findRightmostToken(n) {
if (ts.isToken(n)) {
@@ -70637,7 +73194,7 @@ var ts;
// NOTE: JsxText is a weird kind of node that can contain only whitespaces (since they are not counted as trivia).
// if this is the case - then we should assume that token in question is located in previous child.
if (position < child.end && (nodeHasTokens(child) || child.kind === 10 /* JsxText */)) {
- var start = child.getStart(sourceFile);
+ var start = child.getStart(sourceFile, includeJsDoc);
var lookInPreviousChild = (start >= position) ||
(child.kind === 10 /* JsxText */ && start === child.end); // whitespace only JsxText
if (lookInPreviousChild) {
@@ -70651,7 +73208,7 @@ var ts;
}
}
}
- ts.Debug.assert(startNode !== undefined || n.kind === 265 /* SourceFile */);
+ ts.Debug.assert(startNode !== undefined || n.kind === 265 /* SourceFile */ || ts.isJSDocCommentContainingNode(n));
// 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.
@@ -70690,15 +73247,11 @@ var ts;
return false;
}
ts.isInString = isInString;
- function isInComment(sourceFile, position) {
- return isInCommentHelper(sourceFile, position, /*predicate*/ undefined);
- }
- ts.isInComment = isInComment;
/**
* returns true if the position is in between the open and close elements of an JSX expression.
*/
function isInsideJsxElementOrAttribute(sourceFile, position) {
- var token = getTokenAtPosition(sourceFile, position);
+ var token = getTokenAtPosition(sourceFile, position, /*includeJsDocComment*/ false);
if (!token) {
return false;
}
@@ -70727,18 +73280,32 @@ var ts;
}
ts.isInsideJsxElementOrAttribute = isInsideJsxElementOrAttribute;
function isInTemplateString(sourceFile, position) {
- var token = getTokenAtPosition(sourceFile, position);
+ var token = getTokenAtPosition(sourceFile, position, /*includeJsDocComment*/ false);
return ts.isTemplateLiteralKind(token.kind) && position > token.getStart(sourceFile);
}
ts.isInTemplateString = isInTemplateString;
/**
- * Returns true if the cursor at position in sourceFile is within a comment that additionally
- * satisfies predicate, and false otherwise.
+ * Returns true if the cursor at position in sourceFile is within a comment.
+ *
+ * @param tokenAtPosition Must equal `getTokenAtPosition(sourceFile, position)
+ * @param predicate Additional predicate to test on the comment range.
*/
- function isInCommentHelper(sourceFile, position, predicate) {
- var token = getTokenAtPosition(sourceFile, position);
- if (token && position <= token.getStart(sourceFile)) {
- var commentRanges = ts.getLeadingCommentRanges(sourceFile.text, token.pos);
+ function isInComment(sourceFile, position, tokenAtPosition, predicate) {
+ if (tokenAtPosition === void 0) { tokenAtPosition = getTokenAtPosition(sourceFile, position, /*includeJsDocComment*/ false); }
+ return position <= tokenAtPosition.getStart(sourceFile) &&
+ (isInCommentRange(ts.getLeadingCommentRanges(sourceFile.text, tokenAtPosition.pos)) ||
+ isInCommentRange(ts.getTrailingCommentRanges(sourceFile.text, tokenAtPosition.pos)));
+ function isInCommentRange(commentRanges) {
+ return ts.forEach(commentRanges, function (c) { return isPositionInCommentRange(c, position, sourceFile.text) && (!predicate || predicate(c)); });
+ }
+ }
+ ts.isInComment = isInComment;
+ function isPositionInCommentRange(_a, position, text) {
+ var pos = _a.pos, end = _a.end, kind = _a.kind;
+ if (pos < position && position < end) {
+ return true;
+ }
+ else if (position === end) {
// The end marker of a single-line comment does not include the newline character.
// In the following case, we are inside a comment (^ denotes the cursor position):
//
@@ -70749,18 +73316,16 @@ var ts;
// /* asdf */^
//
// 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) &&
- predicate(c); }) :
- ts.forEach(commentRanges, function (c) { return c.pos < position &&
- (c.kind === 2 /* SingleLineCommentTrivia */ ? position <= c.end : position < c.end); });
+ return kind === 2 /* SingleLineCommentTrivia */ ||
+ // true for unterminated multi-line comment
+ !(text.charCodeAt(end - 1) === 47 /* slash */ && text.charCodeAt(end - 2) === 42 /* asterisk */);
+ }
+ else {
+ return false;
}
- return false;
}
- ts.isInCommentHelper = isInCommentHelper;
function hasDocComment(sourceFile, position) {
- var token = getTokenAtPosition(sourceFile, position);
+ var token = getTokenAtPosition(sourceFile, position, /*includeJsDocComment*/ false);
// First, we have to see if this position actually landed in a comment.
var commentRanges = ts.getLeadingCommentRanges(sourceFile.text, token.pos);
return ts.forEach(commentRanges, jsDocPrefix);
@@ -70770,42 +73335,6 @@ var ts;
}
}
ts.hasDocComment = hasDocComment;
- /**
- * Get the corresponding JSDocTag node if the position is in a jsDoc comment
- */
- function getJsDocTagAtPosition(sourceFile, position) {
- var node = ts.getTokenAtPosition(sourceFile, position);
- if (ts.isToken(node)) {
- switch (node.kind) {
- case 104 /* VarKeyword */:
- case 110 /* LetKeyword */:
- case 76 /* ConstKeyword */:
- // if the current token is var, let or const, skip the VariableDeclarationList
- node = node.parent === undefined ? undefined : node.parent.parent;
- break;
- default:
- node = node.parent;
- break;
- }
- }
- if (node) {
- if (node.jsDoc) {
- for (var _i = 0, _a = node.jsDoc; _i < _a.length; _i++) {
- var jsDoc = _a[_i];
- if (jsDoc.tags) {
- for (var _b = 0, _c = jsDoc.tags; _b < _c.length; _b++) {
- var tag = _c[_b];
- if (tag.pos <= position && position <= tag.end) {
- return tag;
- }
- }
- }
- }
- }
- }
- return undefined;
- }
- ts.getJsDocTagAtPosition = getJsDocTagAtPosition;
function nodeHasTokens(n) {
// If we have a token or node that has a non-zero width, it must have tokens.
// Note, that getWidth() does not take trivia into account.
@@ -70881,6 +73410,9 @@ var ts;
}
ts.isAccessibilityModifier = isAccessibilityModifier;
function compareDataObjects(dst, src) {
+ if (!dst || !src || Object.keys(dst).length !== Object.keys(src).length) {
+ return false;
+ }
for (var e in dst) {
if (typeof dst[e] === "object") {
if (!compareDataObjects(dst[e], src[e])) {
@@ -70929,25 +73461,27 @@ var ts;
}
ts.hasTrailingDirectorySeparator = hasTrailingDirectorySeparator;
function isInReferenceComment(sourceFile, position) {
- return isInCommentHelper(sourceFile, position, isReferenceComment);
- function isReferenceComment(c) {
+ return isInComment(sourceFile, position, /*tokenAtPosition*/ undefined, function (c) {
var commentText = sourceFile.text.substring(c.pos, c.end);
return tripleSlashDirectivePrefixRegex.test(commentText);
- }
+ });
}
ts.isInReferenceComment = isInReferenceComment;
function isInNonReferenceComment(sourceFile, position) {
- return isInCommentHelper(sourceFile, position, isNonReferenceComment);
- function isNonReferenceComment(c) {
+ return isInComment(sourceFile, position, /*tokenAtPosition*/ undefined, function (c) {
var commentText = sourceFile.text.substring(c.pos, c.end);
return !tripleSlashDirectivePrefixRegex.test(commentText);
- }
+ });
}
ts.isInNonReferenceComment = isInNonReferenceComment;
function createTextSpanFromNode(node, sourceFile) {
return ts.createTextSpanFromBounds(node.getStart(sourceFile), node.getEnd());
}
ts.createTextSpanFromNode = createTextSpanFromNode;
+ function createTextSpanFromRange(range) {
+ return ts.createTextSpanFromBounds(range.pos, range.end);
+ }
+ ts.createTextSpanFromRange = createTextSpanFromRange;
function isTypeKeyword(kind) {
switch (kind) {
case 119 /* AnyKeyword */:
@@ -71009,7 +73543,7 @@ var ts;
clear: resetWriter,
trackSymbol: ts.noop,
reportInaccessibleThisError: ts.noop,
- reportIllegalExtends: ts.noop
+ reportPrivateInBaseOfClassExpression: ts.noop,
};
function writeIndent() {
if (lineStart) {
@@ -71228,8 +73762,8 @@ var ts;
// also, the emitted result will have "(" in the beginning and ");" in the end. We need to strip these
// as well
var trimmedOutput = outputText.trim();
- for (var _i = 0, diagnostics_2 = diagnostics; _i < diagnostics_2.length; _i++) {
- var diagnostic = diagnostics_2[_i];
+ for (var _i = 0, diagnostics_3 = diagnostics; _i < diagnostics_3.length; _i++) {
+ var diagnostic = diagnostics_3[_i];
diagnostic.start = diagnostic.start - 1;
}
var _b = ts.parseConfigFileTextToJson(configFileName, trimmedOutput.substring(1, trimmedOutput.length - 2), /*stripComments*/ false), config = _b.config, error = _b.error;
@@ -71252,7 +73786,7 @@ var ts;
}
ts.getOpenBrace = getOpenBrace;
function getOpenBraceOfClassLike(declaration, sourceFile) {
- return ts.getTokenAtPosition(sourceFile, declaration.members.pos - 1);
+ return ts.getTokenAtPosition(sourceFile, declaration.members.pos - 1, /*includeJsDocComment*/ false);
}
ts.getOpenBraceOfClassLike = getOpenBraceOfClassLike;
})(ts || (ts = {}));
@@ -71324,7 +73858,7 @@ var ts;
var lastEnd = 0;
for (var i = 0; i < dense.length; i += 3) {
var start = dense[i];
- var length_5 = dense[i + 1];
+ var length_6 = dense[i + 1];
var type = dense[i + 2];
// Make a whitespace entry between the last item and this one.
if (lastEnd >= 0) {
@@ -71333,8 +73867,8 @@ var ts;
entries.push({ length: whitespaceLength_1, classification: ts.TokenClass.Whitespace });
}
}
- entries.push({ length: length_5, classification: convertClassification(type) });
- lastEnd = start + length_5;
+ entries.push({ length: length_6, classification: convertClassification(type) });
+ lastEnd = start + length_6;
}
var whitespaceLength = text.length - lastEnd;
if (whitespaceLength > 0) {
@@ -71874,9 +74408,9 @@ var ts;
pushClassification(start, width, 1 /* comment */);
continue;
}
- // for the ======== add a comment for the first line, and then lex all
- // subsequent lines up until the end of the conflict marker.
- ts.Debug.assert(ch === 61 /* equals */);
+ // for the ||||||| and ======== markers, add a comment for the first line,
+ // and then lex all subsequent lines up until the end of the conflict marker.
+ ts.Debug.assert(ch === 124 /* bar */ || ch === 61 /* equals */);
classifyDisabledMergeCode(text, start, end);
}
}
@@ -71908,20 +74442,20 @@ var ts;
if (tag.pos !== pos) {
pushCommentRange(pos, tag.pos - pos);
}
- pushClassification(tag.atToken.pos, tag.atToken.end - tag.atToken.pos, 10 /* punctuation */);
- pushClassification(tag.tagName.pos, tag.tagName.end - tag.tagName.pos, 18 /* docCommentTagName */);
+ pushClassification(tag.atToken.pos, tag.atToken.end - tag.atToken.pos, 10 /* punctuation */); // "@"
+ pushClassification(tag.tagName.pos, tag.tagName.end - tag.tagName.pos, 18 /* docCommentTagName */); // e.g. "param"
pos = tag.tagName.end;
switch (tag.kind) {
- case 286 /* JSDocParameterTag */:
+ case 287 /* JSDocParameterTag */:
processJSDocParameterTag(tag);
break;
- case 289 /* JSDocTemplateTag */:
+ case 290 /* JSDocTemplateTag */:
processJSDocTemplateTag(tag);
break;
- case 288 /* JSDocTypeTag */:
+ case 289 /* JSDocTypeTag */:
processElement(tag.typeExpression);
break;
- case 287 /* JSDocReturnTag */:
+ case 288 /* JSDocReturnTag */:
processElement(tag.typeExpression);
break;
}
@@ -71957,8 +74491,8 @@ var ts;
}
}
function classifyDisabledMergeCode(text, start, end) {
- // Classify the line that the ======= marker is on as a comment. Then just lex
- // all further tokens and add them to the result.
+ // Classify the line that the ||||||| or ======= marker is on as a comment.
+ // Then just lex all further tokens and add them to the result.
var i;
for (i = start; i < end; i++) {
if (ts.isLineBreak(text.charCodeAt(i))) {
@@ -71985,7 +74519,7 @@ var ts;
* False will mean that node is not classified and traverse routine should recurse into node contents.
*/
function tryClassifyNode(node) {
- if (ts.isJSDocTag(node)) {
+ if (ts.isJSDoc(node)) {
return true;
}
if (ts.nodeIsMissing(node)) {
@@ -72343,8 +74877,8 @@ var ts;
continue;
}
var start = completePrefix.length;
- var length_6 = normalizedMatch.length - start - normalizedSuffix.length;
- result.push(ts.removeFileExtension(normalizedMatch.substr(start, length_6)));
+ var length_7 = normalizedMatch.length - start - normalizedSuffix.length;
+ result.push(ts.removeFileExtension(normalizedMatch.substr(start, length_7)));
}
return result;
}
@@ -72358,24 +74892,21 @@ var ts;
var moduleNameFragment = isNestedModule ? fragment.substr(0, fragment.lastIndexOf(ts.directorySeparator)) : undefined;
// Get modules that the type checker picked up
var ambientModules = ts.map(typeChecker.getAmbientModules(), function (sym) { return ts.stripQuotes(sym.name); });
- var nonRelativeModules = ts.filter(ambientModules, function (moduleName) { return ts.startsWith(moduleName, fragment); });
+ var nonRelativeModuleNames = ts.filter(ambientModules, function (moduleName) { return ts.startsWith(moduleName, fragment); });
// Nested modules of the form "module-name/sub" need to be adjusted to only return the string
// after the last '/' that appears in the fragment because that's where the replacement span
// starts
if (isNestedModule) {
var moduleNameWithSeperator_1 = ts.ensureTrailingDirectorySeparator(moduleNameFragment);
- nonRelativeModules = ts.map(nonRelativeModules, function (moduleName) {
- if (ts.startsWith(fragment, moduleNameWithSeperator_1)) {
- return moduleName.substr(moduleNameWithSeperator_1.length);
- }
- return moduleName;
+ nonRelativeModuleNames = ts.map(nonRelativeModuleNames, function (nonRelativeModuleName) {
+ return ts.removePrefix(nonRelativeModuleName, moduleNameWithSeperator_1);
});
}
if (!options.moduleResolution || options.moduleResolution === ts.ModuleResolutionKind.NodeJs) {
for (var _i = 0, _a = enumerateNodeModulesVisibleToScript(host, scriptPath); _i < _a.length; _i++) {
var visibleModule = _a[_i];
if (!isNestedModule) {
- nonRelativeModules.push(visibleModule.moduleName);
+ nonRelativeModuleNames.push(visibleModule.moduleName);
}
else if (ts.startsWith(visibleModule.moduleName, moduleNameFragment)) {
var nestedFiles = tryReadDirectory(host, visibleModule.moduleDir, ts.supportedTypeScriptExtensions, /*exclude*/ undefined, /*include*/ ["./*"]);
@@ -72384,16 +74915,16 @@ var ts;
var f = nestedFiles_1[_b];
f = ts.normalizePath(f);
var nestedModule = ts.removeFileExtension(ts.getBaseFileName(f));
- nonRelativeModules.push(nestedModule);
+ nonRelativeModuleNames.push(nestedModule);
}
}
}
}
}
- return ts.deduplicate(nonRelativeModules);
+ return ts.deduplicate(nonRelativeModuleNames);
}
function getTripleSlashReferenceCompletion(sourceFile, position, compilerOptions, host) {
- var token = ts.getTokenAtPosition(sourceFile, position);
+ var token = ts.getTokenAtPosition(sourceFile, position, /*includeJsDocComment*/ false);
if (!token) {
return undefined;
}
@@ -72635,14 +75166,29 @@ var ts;
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() };
+ var symbols = completionData.symbols, isGlobalCompletion = completionData.isGlobalCompletion, isMemberCompletion = completionData.isMemberCompletion, isNewIdentifierLocation = completionData.isNewIdentifierLocation, location = completionData.location, request = completionData.request, hasFilteredClassMemberKeywords = completionData.hasFilteredClassMemberKeywords;
+ if (sourceFile.languageVariant === 1 /* JSX */ &&
+ location && location.parent && location.parent.kind === 252 /* 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;
+ return { isGlobalCompletion: false, isMemberCompletion: true, isNewIdentifierLocation: false,
+ entries: [{
+ name: tagName.getFullText(),
+ kind: ts.ScriptElementKind.classElement,
+ kindModifiers: undefined,
+ sortText: "0",
+ }] };
}
- 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() };
+ if (request) {
+ var entries_2 = request.kind === "JsDocTagName"
+ ? ts.JsDoc.getJSDocTagNameCompletions()
+ : request.kind === "JsDocTag"
+ ? ts.JsDoc.getJSDocTagCompletions()
+ : ts.JsDoc.getJSDocParameterNameCompletions(request.tag);
+ return { isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: false, entries: entries_2 };
}
var entries = [];
if (ts.isSourceFileJavaScript(sourceFile)) {
@@ -72651,28 +75197,16 @@ var ts;
}
else {
if (!symbols || symbols.length === 0) {
- if (sourceFile.languageVariant === 1 /* JSX */ &&
- location.parent && location.parent.kind === 252 /* 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 {
+ if (!hasFilteredClassMemberKeywords) {
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) {
+ if (hasFilteredClassMemberKeywords) {
+ ts.addRange(entries, classMemberKeywordCompletions);
+ }
+ else if (!isMemberCompletion) {
ts.addRange(entries, keywordCompletions);
}
return { isGlobalCompletion: isGlobalCompletion, isMemberCompletion: isMemberCompletion, isNewIdentifierLocation: isNewIdentifierLocation, entries: entries };
@@ -72728,8 +75262,8 @@ var ts;
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];
+ for (var _i = 0, symbols_5 = symbols; _i < symbols_5.length; _i++) {
+ var symbol = symbols_5[_i];
var entry = createCompletionEntry(symbol, location, performCharacterChecks, typeChecker, target);
if (entry) {
var id = ts.escapeIdentifier(entry.name);
@@ -72819,10 +75353,11 @@ var ts;
function getStringLiteralCompletionEntriesFromCallExpression(argumentInfo, typeChecker) {
var candidates = [];
var entries = [];
+ var uniques = ts.createMap();
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);
+ addStringLiteralCompletionsFromType(typeChecker.getParameterType(candidate, argumentInfo.argumentIndex), entries, typeChecker, uniques);
}
if (entries.length) {
return { isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: true, entries: entries };
@@ -72850,9 +75385,10 @@ var ts;
}
return undefined;
}
- function addStringLiteralCompletionsFromType(type, result, typeChecker) {
+ function addStringLiteralCompletionsFromType(type, result, typeChecker, uniques) {
+ if (uniques === void 0) { uniques = ts.createMap(); }
if (type && type.flags & 16384 /* TypeParameter */) {
- type = typeChecker.getApparentType(type);
+ type = typeChecker.getBaseConstraintOfType(type);
}
if (!type) {
return;
@@ -72860,16 +75396,20 @@ var ts;
if (type.flags & 65536 /* Union */) {
for (var _i = 0, _a = type.types; _i < _a.length; _i++) {
var t = _a[_i];
- addStringLiteralCompletionsFromType(t, result, typeChecker);
+ addStringLiteralCompletionsFromType(t, result, typeChecker, uniques);
}
}
else if (type.flags & 32 /* StringLiteral */) {
- result.push({
- name: type.text,
- kindModifiers: ts.ScriptElementKindModifier.none,
- kind: ts.ScriptElementKind.variableElement,
- sortText: "0"
- });
+ var name = type.value;
+ if (!uniques.has(name)) {
+ uniques.set(name, true);
+ result.push({
+ name: name,
+ kindModifiers: ts.ScriptElementKindModifier.none,
+ kind: ts.ScriptElementKind.variableElement,
+ sortText: "0"
+ });
+ }
}
}
function getCompletionEntryDetails(typeChecker, log, compilerOptions, sourceFile, position, entryName) {
@@ -72925,23 +75465,22 @@ var ts;
Completions.getCompletionEntrySymbol = getCompletionEntrySymbol;
function getCompletionData(typeChecker, log, sourceFile, position) {
var isJavaScriptFile = ts.isSourceFileJavaScript(sourceFile);
- // 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 request;
var start = ts.timestamp();
- var currentToken = ts.getTokenAtPosition(sourceFile, position);
+ var currentToken = ts.getTokenAtPosition(sourceFile, position, /*includeJsDocComment*/ false);
+ // We will check for jsdoc comments with insideComment and getJsDocTagAtPosition. (TODO: that seems rather inefficient to check the same thing so many times.)
log("getCompletionData: Get current token: " + (ts.timestamp() - start));
start = ts.timestamp();
// Completion not allowed inside comments, bail out if this is the case
- var insideComment = ts.isInsideComment(sourceFile, currentToken, position);
+ var insideComment = ts.isInComment(sourceFile, position, currentToken);
log("getCompletionData: Is inside comment: " + (ts.timestamp() - start));
+ var insideJsDocTagTypeExpression = false;
if (insideComment) {
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;
+ // The current position is next to the '@' sign, when no tag name being provided yet.
+ // Provide a full list of tag names
+ request = { kind: "JsDocTagName" };
}
else {
// When completion is requested without "@", we will have check to make sure that
@@ -72961,33 +75500,37 @@ var ts;
// * |c|
// */
var lineStart = ts.getLineStartPositionForPosition(position, sourceFile);
- requestJsDocTag = !(sourceFile.text.substring(lineStart, position).match(/[^\*|\s|(/\*\*)]/));
+ if (!(sourceFile.text.substring(lineStart, position).match(/[^\*|\s|(/\*\*)]/))) {
+ request = { kind: "JsDocTag" };
+ }
}
}
// Completion should work inside certain JsDoc tags. For example:
// /** @type {number | string} */
// Completion should work in the brackets
- var insideJsDocTagExpression = false;
- var tag = ts.getJsDocTagAtPosition(sourceFile, position);
+ var tag = getJsDocTagAtPosition(currentToken, position);
if (tag) {
if (tag.tagName.pos <= position && position <= tag.tagName.end) {
- requestJsDocTagName = true;
+ request = { kind: "JsDocTagName" };
}
- switch (tag.kind) {
- case 288 /* JSDocTypeTag */:
- case 286 /* JSDocParameterTag */:
- case 287 /* JSDocReturnTag */:
- var tagWithExpression = tag;
- if (tagWithExpression.typeExpression) {
- insideJsDocTagExpression = tagWithExpression.typeExpression.pos < position && position < tagWithExpression.typeExpression.end;
- }
- break;
+ if (isTagWithTypeExpression(tag) && tag.typeExpression) {
+ currentToken = ts.getTokenAtPosition(sourceFile, position, /*includeJsDocComment*/ true);
+ if (!currentToken ||
+ (!ts.isDeclarationName(currentToken) &&
+ (currentToken.parent.kind !== 292 /* JSDocPropertyTag */ ||
+ currentToken.parent.name !== currentToken))) {
+ // Use as type location if inside tag's type expression
+ insideJsDocTagTypeExpression = isCurrentlyEditingNode(tag.typeExpression);
+ }
+ }
+ if (ts.isJSDocParameterTag(tag) && (ts.nodeIsMissing(tag.name) || tag.name.pos <= position && position <= tag.name.end)) {
+ request = { kind: "JsDocParameterName", tag: tag };
}
}
- if (requestJsDocTagName || requestJsDocTag) {
- return { symbols: undefined, isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: false, location: undefined, isRightOfDot: false, requestJsDocTagName: requestJsDocTagName, requestJsDocTag: requestJsDocTag };
+ if (request) {
+ return { symbols: undefined, isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: false, location: undefined, isRightOfDot: false, request: request, hasFilteredClassMemberKeywords: false };
}
- if (!insideJsDocTagExpression) {
+ if (!insideJsDocTagTypeExpression) {
// Proceed if the current position is in jsDoc tag expression; otherwise it is a normal
// comment or the plain text part of a jsDoc comment, so no completion should be available
log("Returning an empty list because completion was inside a regular comment or plain text part of a JsDoc comment.");
@@ -72995,7 +75538,7 @@ var ts;
}
}
start = ts.timestamp();
- var previousToken = ts.findPrecedingToken(position, sourceFile);
+ var previousToken = ts.findPrecedingToken(position, sourceFile, /*startNode*/ undefined, insideJsDocTagTypeExpression);
log("getCompletionData: Get previous token 1: " + (ts.timestamp() - start));
// The decision to provide completion depends on the contextToken, which is determined through the previousToken.
// Note: 'previousToken' (and thus 'contextToken') can be undefined if we are the beginning of the file
@@ -73004,7 +75547,7 @@ var ts;
// Skip this partial identifier and adjust the contextToken to the token that precedes it.
if (contextToken && position <= contextToken.end && ts.isWord(contextToken.kind)) {
var start_2 = ts.timestamp();
- contextToken = ts.findPrecedingToken(contextToken.getFullStart(), sourceFile);
+ contextToken = ts.findPrecedingToken(contextToken.getFullStart(), sourceFile, /*startNode*/ undefined, insideJsDocTagTypeExpression);
log("getCompletionData: Get previous token 2: " + (ts.timestamp() - start_2));
}
// Find the node where completion is requested on.
@@ -73014,7 +75557,7 @@ var ts;
var isRightOfDot = false;
var isRightOfOpenTag = false;
var isStartingCloseTag = false;
- var location = ts.getTouchingPropertyName(sourceFile, position);
+ var location = ts.getTouchingPropertyName(sourceFile, position, insideJsDocTagTypeExpression); // TODO: GH#15853
if (contextToken) {
// Bail out if this is a known invalid completion location
if (isCompletionListBlocker(contextToken)) {
@@ -73073,6 +75616,7 @@ var ts;
var isGlobalCompletion = false;
var isMemberCompletion;
var isNewIdentifierLocation;
+ var hasFilteredClassMemberKeywords = false;
var symbols = [];
if (isRightOfDot) {
getTypeScriptMemberSymbols();
@@ -73106,12 +75650,26 @@ var ts;
}
}
log("getCompletionData: Semantic work: " + (ts.timestamp() - semanticStart));
- return { symbols: symbols, isGlobalCompletion: isGlobalCompletion, isMemberCompletion: isMemberCompletion, isNewIdentifierLocation: isNewIdentifierLocation, location: location, isRightOfDot: (isRightOfDot || isRightOfOpenTag), requestJsDocTagName: requestJsDocTagName, requestJsDocTag: requestJsDocTag };
+ return { symbols: symbols, isGlobalCompletion: isGlobalCompletion, isMemberCompletion: isMemberCompletion, isNewIdentifierLocation: isNewIdentifierLocation, location: location, isRightOfDot: (isRightOfDot || isRightOfOpenTag), request: request, hasFilteredClassMemberKeywords: hasFilteredClassMemberKeywords };
+ function isTagWithTypeExpression(tag) {
+ switch (tag.kind) {
+ case 285 /* JSDocAugmentsTag */:
+ case 287 /* JSDocParameterTag */:
+ case 292 /* JSDocPropertyTag */:
+ case 288 /* JSDocReturnTag */:
+ case 289 /* JSDocTypeTag */:
+ case 291 /* JSDocTypedefTag */:
+ return true;
+ }
+ }
function getTypeScriptMemberSymbols() {
// Right of dot member completion list
isGlobalCompletion = false;
isMemberCompletion = true;
isNewIdentifierLocation = false;
+ // Since this is qualified name check its a type node location
+ var isTypeLocation = ts.isPartOfTypeNode(node.parent) || insideJsDocTagTypeExpression;
+ var isRhsOfImportDeclaration = ts.isInRightSideOfInternalImportEqualsDeclaration(node);
if (node.kind === 71 /* Identifier */ || node.kind === 143 /* QualifiedName */ || node.kind === 179 /* PropertyAccessExpression */) {
var symbol = typeChecker.getSymbolAtLocation(node);
// This is an alias, follow what it aliases
@@ -73121,15 +75679,23 @@ var ts;
if (symbol && symbol.flags & 1952 /* HasExports */) {
// Extract module or enum members
var exportedSymbols = typeChecker.getExportsOfModule(symbol);
+ var isValidValueAccess_1 = function (symbol) { return typeChecker.isValidPropertyAccess((node.parent), symbol.name); };
+ var isValidTypeAccess_1 = function (symbol) { return symbolCanbeReferencedAtTypeLocation(symbol); };
+ var isValidAccess_1 = isRhsOfImportDeclaration ?
+ // Any kind is allowed when dotting off namespace in internal import equals declaration
+ function (symbol) { return isValidTypeAccess_1(symbol) || isValidValueAccess_1(symbol); } :
+ isTypeLocation ? isValidTypeAccess_1 : isValidValueAccess_1;
ts.forEach(exportedSymbols, function (symbol) {
- if (typeChecker.isValidPropertyAccess((node.parent), symbol.name)) {
+ if (isValidAccess_1(symbol)) {
symbols.push(symbol);
}
});
}
}
- var type = typeChecker.getTypeAtLocation(node);
- addTypeProperties(type);
+ if (!isTypeLocation) {
+ var type = typeChecker.getTypeAtLocation(node);
+ addTypeProperties(type);
+ }
}
function addTypeProperties(type) {
if (type) {
@@ -73157,6 +75723,7 @@ var ts;
function tryGetGlobalSymbols() {
var objectLikeContainer;
var namedImportsOrExports;
+ var classLikeContainer;
var jsxContainer;
if (objectLikeContainer = tryGetObjectLikeCompletionContainer(contextToken)) {
return tryGetObjectLikeCompletionSymbols(objectLikeContainer);
@@ -73166,6 +75733,11 @@ var ts;
// try to show exported member for imported module
return tryGetImportOrExportClauseCompletionSymbols(namedImportsOrExports);
}
+ if (classLikeContainer = tryGetClassLikeCompletionContainer(contextToken)) {
+ // cursor inside class declaration
+ getGetClassLikeCompletionSymbols(classLikeContainer);
+ return true;
+ }
if (jsxContainer = tryGetContainingJsxElement(contextToken)) {
var attrsType = void 0;
if ((jsxContainer.kind === 250 /* JsxSelfClosingElement */) || (jsxContainer.kind === 251 /* JsxOpeningElement */)) {
@@ -73221,11 +75793,73 @@ var ts;
scopeNode.kind === 256 /* JsxExpression */ ||
ts.isStatement(scopeNode);
}
- /// TODO filter meaning based on the current context
var symbolMeanings = 793064 /* Type */ | 107455 /* Value */ | 1920 /* Namespace */ | 8388608 /* Alias */;
- symbols = typeChecker.getSymbolsInScope(scopeNode, symbolMeanings);
+ symbols = filterGlobalCompletion(typeChecker.getSymbolsInScope(scopeNode, symbolMeanings));
return true;
}
+ function filterGlobalCompletion(symbols) {
+ return ts.filter(symbols, function (symbol) {
+ if (!ts.isSourceFile(location)) {
+ // export = /**/ here we want to get all meanings, so any symbol is ok
+ if (ts.isExportAssignment(location.parent)) {
+ return true;
+ }
+ // This is an alias, follow what it aliases
+ if (symbol && symbol.flags & 8388608 /* Alias */) {
+ symbol = typeChecker.getAliasedSymbol(symbol);
+ }
+ // import m = /**/ <-- It can only access namespace (if typing import = x. this would get member symbols and not namespace)
+ if (ts.isInRightSideOfInternalImportEqualsDeclaration(location)) {
+ return !!(symbol.flags & 1920 /* Namespace */);
+ }
+ if (insideJsDocTagTypeExpression ||
+ (!isContextTokenValueLocation(contextToken) &&
+ (ts.isPartOfTypeNode(location) || isContextTokenTypeLocation(contextToken)))) {
+ // Its a type, but you can reach it by namespace.type as well
+ return symbolCanbeReferencedAtTypeLocation(symbol);
+ }
+ }
+ // expressions are value space (which includes the value namespaces)
+ return !!(symbol.flags & 107455 /* Value */);
+ });
+ }
+ function isContextTokenValueLocation(contextToken) {
+ return contextToken &&
+ contextToken.kind === 103 /* TypeOfKeyword */ &&
+ contextToken.parent.kind === 162 /* TypeQuery */;
+ }
+ function isContextTokenTypeLocation(contextToken) {
+ if (contextToken) {
+ var parentKind = contextToken.parent.kind;
+ switch (contextToken.kind) {
+ case 56 /* ColonToken */:
+ return parentKind === 149 /* PropertyDeclaration */ ||
+ parentKind === 148 /* PropertySignature */ ||
+ parentKind === 146 /* Parameter */ ||
+ parentKind === 226 /* VariableDeclaration */ ||
+ ts.isFunctionLikeKind(parentKind);
+ case 58 /* EqualsToken */:
+ return parentKind === 231 /* TypeAliasDeclaration */;
+ case 118 /* AsKeyword */:
+ return parentKind === 202 /* AsExpression */;
+ }
+ }
+ }
+ function symbolCanbeReferencedAtTypeLocation(symbol) {
+ // This is an alias, follow what it aliases
+ if (symbol && symbol.flags & 8388608 /* Alias */) {
+ symbol = typeChecker.getAliasedSymbol(symbol);
+ }
+ if (symbol.flags & 793064 /* Type */) {
+ return true;
+ }
+ if (symbol.flags & (512 /* ValueModule */ | 1024 /* NamespaceModule */)) {
+ var exportedSymbols = typeChecker.getExportsOfModule(symbol);
+ // If the exported symbols contains type,
+ // symbol can be referenced at locations where type is allowed
+ return ts.forEach(exportedSymbols, symbolCanbeReferencedAtTypeLocation);
+ }
+ }
/**
* Finds the first node that "embraces" the position, so that one may
* accurately aggregate locals from the closest containing scope.
@@ -73282,7 +75916,7 @@ var ts;
|| containingNodeKind === 157 /* IndexSignature */ // [ | : string ]
|| containingNodeKind === 144 /* ComputedPropertyName */; // [ | /* this can become an index signature */
case 128 /* ModuleKeyword */: // module |
- case 129 /* NamespaceKeyword */:
+ case 129 /* NamespaceKeyword */:// namespace |
return true;
case 23 /* DotToken */:
return containingNodeKind === 233 /* ModuleDeclaration */; // module A.|
@@ -73339,53 +75973,48 @@ var ts;
function tryGetObjectLikeCompletionSymbols(objectLikeContainer) {
// We're looking up possible property names from contextual/inferred/declared type.
isMemberCompletion = true;
- var typeForObject;
+ var typeMembers;
var existingMembers;
if (objectLikeContainer.kind === 178 /* ObjectLiteralExpression */) {
// We are completing on contextual types, but may also include properties
// other than those within the declared type.
isNewIdentifierLocation = true;
- // If the object literal is being assigned to something of type 'null | { hello: string }',
- // it clearly isn't trying to satisfy the 'null' type. So we grab the non-nullable type if possible.
- typeForObject = typeChecker.getContextualType(objectLikeContainer);
- typeForObject = typeForObject && typeForObject.getNonNullableType();
+ var typeForObject = typeChecker.getContextualType(objectLikeContainer);
+ if (!typeForObject)
+ return false;
+ typeMembers = typeChecker.getAllPossiblePropertiesOfType(typeForObject);
existingMembers = objectLikeContainer.properties;
}
- else if (objectLikeContainer.kind === 174 /* ObjectBindingPattern */) {
+ else {
+ ts.Debug.assert(objectLikeContainer.kind === 174 /* ObjectBindingPattern */);
// We are *only* completing on properties from the type being destructured.
isNewIdentifierLocation = false;
var rootDeclaration = ts.getRootDeclaration(objectLikeContainer.parent);
- if (ts.isVariableLike(rootDeclaration)) {
- // We don't want to complete using the type acquired by the shape
- // of the binding pattern; we are only interested in types acquired
- // through type declaration or inference.
- // 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 === 146 /* Parameter */) {
- if (ts.isExpression(rootDeclaration.parent)) {
- canGetType = !!typeChecker.getContextualType(rootDeclaration.parent);
- }
- else if (rootDeclaration.parent.kind === 151 /* MethodDeclaration */ || rootDeclaration.parent.kind === 154 /* SetAccessor */) {
- canGetType = ts.isExpression(rootDeclaration.parent.parent) && !!typeChecker.getContextualType(rootDeclaration.parent.parent);
- }
- }
- if (canGetType) {
- typeForObject = typeChecker.getTypeAtLocation(objectLikeContainer);
- existingMembers = objectLikeContainer.elements;
- }
- }
- else {
- ts.Debug.fail("Root declaration is not variable-like.");
+ if (!ts.isVariableLike(rootDeclaration))
+ throw ts.Debug.fail("Root declaration is not variable-like.");
+ // We don't want to complete using the type acquired by the shape
+ // of the binding pattern; we are only interested in types acquired
+ // through type declaration or inference.
+ // 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 || rootDeclaration.parent.parent.kind === 216 /* ForOfStatement */;
+ if (!canGetType && rootDeclaration.kind === 146 /* Parameter */) {
+ if (ts.isExpression(rootDeclaration.parent)) {
+ canGetType = !!typeChecker.getContextualType(rootDeclaration.parent);
+ }
+ else if (rootDeclaration.parent.kind === 151 /* MethodDeclaration */ || rootDeclaration.parent.kind === 154 /* SetAccessor */) {
+ canGetType = ts.isExpression(rootDeclaration.parent.parent) && !!typeChecker.getContextualType(rootDeclaration.parent.parent);
+ }
+ }
+ if (canGetType) {
+ var typeForObject = typeChecker.getTypeAtLocation(objectLikeContainer);
+ if (!typeForObject)
+ return false;
+ // In a binding pattern, get only known properties. Everywhere else we will get all possible properties.
+ typeMembers = typeChecker.getPropertiesOfType(typeForObject);
+ existingMembers = objectLikeContainer.elements;
}
}
- else {
- ts.Debug.fail("Expected object literal or binding pattern, got " + objectLikeContainer.kind);
- }
- if (!typeForObject) {
- return false;
- }
- var typeMembers = typeChecker.getPropertiesOfType(typeForObject);
if (typeMembers && typeMembers.length > 0) {
// Add filtered items to the completion list
symbols = filterObjectMembersList(typeMembers, existingMembers);
@@ -73428,6 +76057,53 @@ var ts;
return true;
}
/**
+ * Aggregates relevant symbols for completion in class declaration
+ * Relevant symbols are stored in the captured 'symbols' variable.
+ */
+ function getGetClassLikeCompletionSymbols(classLikeDeclaration) {
+ // We're looking up possible property names from parent type.
+ isMemberCompletion = true;
+ // Declaring new property/method/accessor
+ isNewIdentifierLocation = true;
+ // Has keywords for class elements
+ hasFilteredClassMemberKeywords = true;
+ var baseTypeNode = ts.getClassExtendsHeritageClauseElement(classLikeDeclaration);
+ var implementsTypeNodes = ts.getClassImplementsHeritageClauseElements(classLikeDeclaration);
+ if (baseTypeNode || implementsTypeNodes) {
+ var classElement = contextToken.parent;
+ var classElementModifierFlags = ts.isClassElement(classElement) && ts.getModifierFlags(classElement);
+ // If this is context token is not something we are editing now, consider if this would lead to be modifier
+ if (contextToken.kind === 71 /* Identifier */ && !isCurrentlyEditingNode(contextToken)) {
+ switch (contextToken.getText()) {
+ case "private":
+ classElementModifierFlags = classElementModifierFlags | 8 /* Private */;
+ break;
+ case "static":
+ classElementModifierFlags = classElementModifierFlags | 32 /* Static */;
+ break;
+ }
+ }
+ // No member list for private methods
+ if (!(classElementModifierFlags & 8 /* Private */)) {
+ var baseClassTypeToGetPropertiesFrom = void 0;
+ if (baseTypeNode) {
+ baseClassTypeToGetPropertiesFrom = typeChecker.getTypeAtLocation(baseTypeNode);
+ if (classElementModifierFlags & 32 /* Static */) {
+ // Use static class to get property symbols from
+ baseClassTypeToGetPropertiesFrom = typeChecker.getTypeOfSymbolAtLocation(baseClassTypeToGetPropertiesFrom.symbol, classLikeDeclaration);
+ }
+ }
+ var implementedInterfaceTypePropertySymbols = (classElementModifierFlags & 32 /* Static */) ?
+ undefined :
+ ts.flatMap(implementsTypeNodes, function (typeNode) { return typeChecker.getPropertiesOfType(typeChecker.getTypeAtLocation(typeNode)); });
+ // List of property symbols of base type that are not private and already implemented
+ symbols = filterClassMembersList(baseClassTypeToGetPropertiesFrom ?
+ typeChecker.getPropertiesOfType(baseClassTypeToGetPropertiesFrom) :
+ undefined, implementedInterfaceTypePropertySymbols, classLikeDeclaration.members, classElementModifierFlags);
+ }
+ }
+ }
+ /**
* Returns the immediate owning object literal or binding pattern of a context token,
* on the condition that one exists and that the context implies completion should be given.
*/
@@ -73435,9 +76111,9 @@ var ts;
if (contextToken) {
switch (contextToken.kind) {
case 17 /* OpenBraceToken */: // const x = { |
- case 26 /* CommaToken */:
+ case 26 /* CommaToken */:// const x = { a: 0, |
var parent = contextToken.parent;
- if (parent && (parent.kind === 178 /* ObjectLiteralExpression */ || parent.kind === 174 /* ObjectBindingPattern */)) {
+ if (ts.isObjectLiteralExpression(parent) || ts.isObjectBindingPattern(parent)) {
return parent;
}
break;
@@ -73453,7 +76129,7 @@ var ts;
if (contextToken) {
switch (contextToken.kind) {
case 17 /* OpenBraceToken */: // import { |
- case 26 /* CommaToken */:
+ case 26 /* CommaToken */:// import { a as 0, |
switch (contextToken.parent.kind) {
case 241 /* NamedImports */:
case 245 /* NamedExports */:
@@ -73463,6 +76139,44 @@ var ts;
}
return undefined;
}
+ function isFromClassElementDeclaration(node) {
+ return ts.isClassElement(node.parent) && ts.isClassLike(node.parent.parent);
+ }
+ /**
+ * Returns the immediate owning class declaration of a context token,
+ * on the condition that one exists and that the context implies completion should be given.
+ */
+ function tryGetClassLikeCompletionContainer(contextToken) {
+ if (contextToken) {
+ switch (contextToken.kind) {
+ case 17 /* OpenBraceToken */:// class c { |
+ if (ts.isClassLike(contextToken.parent)) {
+ return contextToken.parent;
+ }
+ break;
+ // class c {getValue(): number; | }
+ case 26 /* CommaToken */:
+ case 25 /* SemicolonToken */:
+ // class c { method() { } | }
+ case 18 /* CloseBraceToken */:
+ if (ts.isClassLike(location)) {
+ return location;
+ }
+ break;
+ default:
+ if (isFromClassElementDeclaration(contextToken) &&
+ (isClassMemberCompletionKeyword(contextToken.kind) ||
+ isClassMemberCompletionKeywordText(contextToken.getText()))) {
+ return contextToken.parent.parent;
+ }
+ }
+ }
+ // class c { method() { } | method2() { } }
+ if (location && location.kind === 295 /* SyntaxList */ && ts.isClassLike(location.parent)) {
+ return location.parent;
+ }
+ return undefined;
+ }
function tryGetContainingJsxElement(contextToken) {
if (contextToken) {
var parent = contextToken.parent;
@@ -73520,19 +76234,6 @@ var ts;
}
return undefined;
}
- function isFunction(kind) {
- if (!ts.isFunctionLikeKind(kind)) {
- return false;
- }
- switch (kind) {
- case 152 /* Constructor */:
- case 161 /* ConstructorType */:
- case 160 /* FunctionType */:
- return false;
- default:
- return true;
- }
- }
/**
* @returns true if we are certain that the currently edited location must define a new location; false otherwise.
*/
@@ -73544,7 +76245,7 @@ var ts;
containingNodeKind === 227 /* VariableDeclarationList */ ||
containingNodeKind === 208 /* VariableStatement */ ||
containingNodeKind === 232 /* EnumDeclaration */ ||
- isFunction(containingNodeKind) ||
+ isFunctionLikeButNotConstructor(containingNodeKind) ||
containingNodeKind === 229 /* ClassDeclaration */ ||
containingNodeKind === 199 /* ClassExpression */ ||
containingNodeKind === 230 /* InterfaceDeclaration */ ||
@@ -73558,7 +76259,7 @@ var ts;
return containingNodeKind === 175 /* ArrayBindingPattern */; // var [x|
case 19 /* OpenParenToken */:
return containingNodeKind === 260 /* CatchClause */ ||
- isFunction(containingNodeKind);
+ isFunctionLikeButNotConstructor(containingNodeKind);
case 17 /* OpenBraceToken */:
return containingNodeKind === 232 /* EnumDeclaration */ ||
containingNodeKind === 230 /* InterfaceDeclaration */ ||
@@ -73573,9 +76274,9 @@ var ts;
containingNodeKind === 199 /* ClassExpression */ ||
containingNodeKind === 230 /* InterfaceDeclaration */ ||
containingNodeKind === 231 /* TypeAliasDeclaration */ ||
- isFunction(containingNodeKind);
+ ts.isFunctionLikeKind(containingNodeKind);
case 115 /* StaticKeyword */:
- return containingNodeKind === 149 /* PropertyDeclaration */;
+ return containingNodeKind === 149 /* PropertyDeclaration */ && !ts.isClassLike(contextToken.parent.parent);
case 24 /* DotDotDotToken */:
return containingNodeKind === 146 /* Parameter */ ||
(contextToken.parent && contextToken.parent.parent &&
@@ -73588,20 +76289,30 @@ var ts;
return containingNodeKind === 242 /* ImportSpecifier */ ||
containingNodeKind === 246 /* ExportSpecifier */ ||
containingNodeKind === 240 /* NamespaceImport */;
+ case 125 /* GetKeyword */:
+ case 135 /* SetKeyword */:
+ if (isFromClassElementDeclaration(contextToken)) {
+ return false;
+ }
+ // falls through
case 75 /* ClassKeyword */:
case 83 /* EnumKeyword */:
case 109 /* InterfaceKeyword */:
case 89 /* FunctionKeyword */:
case 104 /* VarKeyword */:
- case 125 /* GetKeyword */:
- case 135 /* SetKeyword */:
case 91 /* ImportKeyword */:
case 110 /* LetKeyword */:
case 76 /* ConstKeyword */:
case 116 /* YieldKeyword */:
- case 138 /* TypeKeyword */:
+ case 138 /* TypeKeyword */:// type htm|
return true;
}
+ // If the previous token is keyword correspoding to class member completion keyword
+ // there will be completion available here
+ if (isClassMemberCompletionKeywordText(contextToken.getText()) &&
+ isFromClassElementDeclaration(contextToken)) {
+ return false;
+ }
// Previous token may have been a keyword that was converted to an identifier.
switch (contextToken.getText()) {
case "abstract":
@@ -73623,6 +76334,9 @@ var ts;
}
return false;
}
+ function isFunctionLikeButNotConstructor(kind) {
+ return ts.isFunctionLikeKind(kind) && kind !== 152 /* Constructor */;
+ }
function isDotOfNumericLiteral(contextToken) {
if (contextToken.kind === 8 /* NumericLiteral */) {
var text = contextToken.getFullText();
@@ -73644,7 +76358,7 @@ var ts;
for (var _i = 0, namedImportsOrExports_1 = namedImportsOrExports; _i < namedImportsOrExports_1.length; _i++) {
var element = namedImportsOrExports_1[_i];
// If this is the current item we are editing right now, do not filter it out
- if (element.getStart() <= position && position <= element.getEnd()) {
+ if (isCurrentlyEditingNode(element)) {
continue;
}
var name = element.propertyName || element.name;
@@ -73678,7 +76392,7 @@ var ts;
continue;
}
// If this is the current item we are editing right now, do not filter it out
- if (m.getStart() <= position && position <= m.getEnd()) {
+ if (isCurrentlyEditingNode(m)) {
continue;
}
var existingName = void 0;
@@ -73692,13 +76406,56 @@ var ts;
// TODO(jfreeman): Account for computed property name
// NOTE: if one only performs this step when m.name is an identifier,
// things like '__proto__' are not filtered out.
- existingName = m.name.text;
+ existingName = ts.getNameOfDeclaration(m).text;
}
existingMemberNames.set(existingName, true);
}
return ts.filter(contextualMemberSymbols, function (m) { return !existingMemberNames.get(m.name); });
}
/**
+ * Filters out completion suggestions for class elements.
+ *
+ * @returns Symbols to be suggested in an class element depending on existing memebers and symbol flags
+ */
+ function filterClassMembersList(baseSymbols, implementingTypeSymbols, existingMembers, currentClassElementModifierFlags) {
+ var existingMemberNames = ts.createMap();
+ for (var _i = 0, existingMembers_2 = existingMembers; _i < existingMembers_2.length; _i++) {
+ var m = existingMembers_2[_i];
+ // Ignore omitted expressions for missing members
+ if (m.kind !== 149 /* PropertyDeclaration */ &&
+ m.kind !== 151 /* MethodDeclaration */ &&
+ m.kind !== 153 /* GetAccessor */ &&
+ m.kind !== 154 /* SetAccessor */) {
+ continue;
+ }
+ // If this is the current item we are editing right now, do not filter it out
+ if (isCurrentlyEditingNode(m)) {
+ continue;
+ }
+ // Dont filter member even if the name matches if it is declared private in the list
+ if (ts.hasModifier(m, 8 /* Private */)) {
+ continue;
+ }
+ // do not filter it out if the static presence doesnt match
+ var mIsStatic = ts.hasModifier(m, 32 /* Static */);
+ var currentElementIsStatic = !!(currentClassElementModifierFlags & 32 /* Static */);
+ if ((mIsStatic && !currentElementIsStatic) ||
+ (!mIsStatic && currentElementIsStatic)) {
+ continue;
+ }
+ var existingName = ts.getPropertyNameForPropertyNameNode(m.name);
+ if (existingName) {
+ existingMemberNames.set(existingName, true);
+ }
+ }
+ return ts.concatenate(ts.filter(baseSymbols, function (baseProperty) { return isValidProperty(baseProperty, 8 /* Private */); }), ts.filter(implementingTypeSymbols, function (implementingProperty) { return isValidProperty(implementingProperty, 24 /* NonPublicAccessibilityModifier */); }));
+ function isValidProperty(propertySymbol, inValidModifierFlags) {
+ return !existingMemberNames.get(propertySymbol.name) &&
+ propertySymbol.getDeclarations() &&
+ !(ts.getDeclarationModifierFlagsFromSymbol(propertySymbol) & inValidModifierFlags);
+ }
+ }
+ /**
* Filters out completion suggestions from 'symbols' according to existing JSX attributes.
*
* @returns Symbols to be suggested in a JSX element, barring those whose attributes
@@ -73709,7 +76466,7 @@ var ts;
for (var _i = 0, attributes_1 = attributes; _i < attributes_1.length; _i++) {
var attr = attributes_1[_i];
// If this is the current item we are editing right now, do not filter it out
- if (attr.getStart() <= position && position <= attr.getEnd()) {
+ if (isCurrentlyEditingNode(attr)) {
continue;
}
if (attr.kind === 253 /* JsxAttribute */) {
@@ -73718,6 +76475,9 @@ var ts;
}
return ts.filter(symbols, function (a) { return !seenNames.get(a.name); });
}
+ function isCurrentlyEditingNode(node) {
+ return node.getStart() <= position && position <= node.getEnd();
+ }
}
/**
* Get the name to be display in completion from a given symbol.
@@ -73770,6 +76530,27 @@ var ts;
sortText: "0"
});
}
+ function isClassMemberCompletionKeyword(kind) {
+ switch (kind) {
+ case 114 /* PublicKeyword */:
+ case 113 /* ProtectedKeyword */:
+ case 112 /* PrivateKeyword */:
+ case 117 /* AbstractKeyword */:
+ case 115 /* StaticKeyword */:
+ case 123 /* ConstructorKeyword */:
+ case 131 /* ReadonlyKeyword */:
+ case 125 /* GetKeyword */:
+ case 135 /* SetKeyword */:
+ case 120 /* AsyncKeyword */:
+ return true;
+ }
+ }
+ function isClassMemberCompletionKeywordText(text) {
+ return isClassMemberCompletionKeyword(ts.stringToToken(text));
+ }
+ var classMemberKeywordCompletions = ts.filter(keywordCompletions, function (entry) {
+ return isClassMemberCompletionKeywordText(entry.name);
+ });
function isEqualityExpression(node) {
return ts.isBinaryExpression(node) && isEqualityOperatorKind(node.operatorToken.kind);
}
@@ -73779,6 +76560,36 @@ var ts;
kind === 34 /* EqualsEqualsEqualsToken */ ||
kind === 35 /* ExclamationEqualsEqualsToken */;
}
+ /** Get the corresponding JSDocTag node if the position is in a jsDoc comment */
+ function getJsDocTagAtPosition(node, position) {
+ var jsDoc = getJsDocHavingNode(node).jsDoc;
+ if (!jsDoc)
+ return undefined;
+ for (var _i = 0, jsDoc_1 = jsDoc; _i < jsDoc_1.length; _i++) {
+ var _a = jsDoc_1[_i], pos = _a.pos, end = _a.end, tags = _a.tags;
+ if (!tags || position < pos || position > end)
+ continue;
+ for (var i = tags.length - 1; i >= 0; i--) {
+ var tag = tags[i];
+ if (position >= tag.pos) {
+ return tag;
+ }
+ }
+ }
+ }
+ function getJsDocHavingNode(node) {
+ if (!ts.isToken(node))
+ return node;
+ switch (node.kind) {
+ case 104 /* VarKeyword */:
+ case 110 /* LetKeyword */:
+ case 76 /* ConstKeyword */:
+ // if the current token is var, let or const, skip the VariableDeclarationList
+ return node.parent.parent;
+ default:
+ return node.parent;
+ }
+ }
})(Completions = ts.Completions || (ts.Completions = {}));
})(ts || (ts = {}));
/* @internal */
@@ -73786,22 +76597,31 @@ var ts;
(function (ts) {
var DocumentHighlights;
(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));
+ function getDocumentHighlights(program, cancellationToken, sourceFile, position, sourceFilesToSearch) {
+ var node = ts.getTouchingWord(sourceFile, position, /*includeJsDocComment*/ true);
+ if (!node)
+ return undefined;
+ if (ts.isJsxOpeningElement(node.parent) && node.parent.tagName === node || ts.isJsxClosingElement(node.parent)) {
+ // For a JSX element, just highlight the matching tag, not all references.
+ var _a = node.parent.parent, openingElement = _a.openingElement, closingElement = _a.closingElement;
+ var highlightSpans = [openingElement, closingElement].map(function (_a) {
+ var tagName = _a.tagName;
+ return getHighlightSpanForNode(tagName, sourceFile);
+ });
+ return [{ fileName: sourceFile.fileName, highlightSpans: highlightSpans }];
+ }
+ return getSemanticDocumentHighlights(node, program, 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),
+ textSpan: ts.createTextSpanFromNode(node, sourceFile),
kind: ts.HighlightSpanKind.none
};
}
- function getSemanticDocumentHighlights(node, typeChecker, cancellationToken, sourceFilesToSearch) {
- var referenceEntries = ts.FindAllReferences.getReferenceEntriesForNode(node, sourceFilesToSearch, typeChecker, cancellationToken);
+ function getSemanticDocumentHighlights(node, program, cancellationToken, sourceFilesToSearch) {
+ var referenceEntries = ts.FindAllReferences.getReferenceEntriesForNode(node, program, sourceFilesToSearch, cancellationToken);
return referenceEntries && convertReferencedSymbols(referenceEntries);
}
function convertReferencedSymbols(referenceEntries) {
@@ -74469,7 +77289,7 @@ var ts;
}
function handleDirectImports(exportingModuleSymbol) {
var theseDirectImports = getDirectImports(exportingModuleSymbol);
- if (theseDirectImports)
+ if (theseDirectImports) {
for (var _i = 0, theseDirectImports_1 = theseDirectImports; _i < theseDirectImports_1.length; _i++) {
var direct = theseDirectImports_1[_i];
if (!markSeenDirectImport(direct)) {
@@ -74515,6 +77335,7 @@ var ts;
break;
}
}
+ }
}
function handleNamespaceImport(importDeclaration, name, isReExport) {
if (exportKind === 2 /* ExportEquals */) {
@@ -74548,11 +77369,12 @@ var ts;
var moduleSymbol = checker.getMergedSymbol(sourceFileLike.symbol);
ts.Debug.assert(!!(moduleSymbol.flags & 1536 /* Module */));
var directImports = getDirectImports(moduleSymbol);
- if (directImports)
+ 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());
@@ -74570,11 +77392,12 @@ var ts;
function addSearch(location, symbol) {
importSearches.push([location, symbol]);
}
- if (directImports)
+ 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 === 237 /* ImportEqualsDeclaration */) {
@@ -74595,6 +77418,9 @@ var ts;
searchForNamedImport(decl.exportClause);
return;
}
+ if (!decl.importClause) {
+ return;
+ }
var importClause = decl.importClause;
var namedBindings = importClause.namedBindings;
if (namedBindings && namedBindings.kind === 240 /* NamespaceImport */) {
@@ -74632,7 +77458,7 @@ var ts;
}
}
function searchForNamedImport(namedBindings) {
- if (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;
@@ -74654,6 +77480,7 @@ var ts;
addSearch(name, localSymbol);
}
}
+ }
}
}
/** Returns 'true' is the namespace 'name' is re-exported from this module, and 'false' if it is only used locally. */
@@ -74673,11 +77500,42 @@ var ts;
}
});
}
+ function findModuleReferences(program, sourceFiles, searchModuleSymbol) {
+ var refs = [];
+ var checker = program.getTypeChecker();
+ for (var _i = 0, sourceFiles_4 = sourceFiles; _i < sourceFiles_4.length; _i++) {
+ var referencingFile = sourceFiles_4[_i];
+ var searchSourceFile = searchModuleSymbol.valueDeclaration;
+ if (searchSourceFile.kind === 265 /* SourceFile */) {
+ for (var _a = 0, _b = referencingFile.referencedFiles; _a < _b.length; _a++) {
+ var ref = _b[_a];
+ if (program.getSourceFileFromReference(referencingFile, ref) === searchSourceFile) {
+ refs.push({ kind: "reference", referencingFile: referencingFile, ref: ref });
+ }
+ }
+ for (var _c = 0, _d = referencingFile.typeReferenceDirectives; _c < _d.length; _c++) {
+ var ref = _d[_c];
+ var referenced = program.getResolvedTypeReferenceDirectives().get(ref.fileName);
+ if (referenced !== undefined && referenced.resolvedFileName === searchSourceFile.fileName) {
+ refs.push({ kind: "reference", referencingFile: referencingFile, ref: ref });
+ }
+ }
+ }
+ forEachImport(referencingFile, function (_importDecl, moduleSpecifier) {
+ var moduleSymbol = checker.getSymbolAtLocation(moduleSpecifier);
+ if (moduleSymbol === searchModuleSymbol) {
+ refs.push({ kind: "import", literal: moduleSpecifier });
+ }
+ });
+ }
+ return refs;
+ }
+ FindAllReferences.findModuleReferences = findModuleReferences;
/** 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];
+ for (var _i = 0, sourceFiles_5 = sourceFiles; _i < sourceFiles_5.length; _i++) {
+ var sourceFile = sourceFiles_5[_i];
cancellationToken.throwIfCancellationRequested();
forEachImport(sourceFile, function (importDecl, moduleSpecifier) {
var moduleSymbol = checker.getSymbolAtLocation(moduleSpecifier);
@@ -74701,7 +77559,7 @@ var ts;
}
/** Calls `action` for each import, re-export, or require() in a file. */
function forEachImport(sourceFile, action) {
- if (sourceFile.externalModuleIndicator) {
+ if (sourceFile.externalModuleIndicator || sourceFile.imports !== undefined) {
for (var _i = 0, _a = sourceFile.imports; _i < _a.length; _i++) {
var moduleSpecifier = _a[_i];
action(importerFromModuleSpecifier(moduleSpecifier), moduleSpecifier);
@@ -74729,26 +77587,20 @@ var ts;
}
}
});
- 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 === 238 /* ImportDeclaration */ || decl.kind === 244 /* ExportDeclaration */) {
- return decl;
+ switch (decl.kind) {
+ case 181 /* CallExpression */:
+ case 238 /* ImportDeclaration */:
+ case 244 /* ExportDeclaration */:
+ return decl;
+ case 248 /* ExternalModuleReference */:
+ return decl.parent;
+ default:
+ ts.Debug.fail("Unexpected module specifier parent: " + decl.kind);
}
- ts.Debug.assert(decl.kind === 248 /* ExternalModuleReference */);
- return decl.parent;
}
/**
* Given a local reference, we might notice that it's an import/export and recursively search for references of that.
@@ -74765,7 +77617,7 @@ var ts;
if (parent.kind === 179 /* 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 === 194 /* BinaryExpression */
+ return symbol.declarations.some(function (d) { return d === parent; }) && ts.isBinaryExpression(parent.parent)
? getSpecialPropertyExport(parent.parent, /*useLhsSymbol*/ false)
: undefined;
}
@@ -74778,7 +77630,7 @@ var ts;
else {
var exportNode = getExportNode(parent);
if (exportNode && ts.hasModifier(exportNode, 1 /* Export */)) {
- if (exportNode.kind === 237 /* ImportEqualsDeclaration */ && exportNode.moduleReference === node) {
+ if (ts.isImportEqualsDeclaration(exportNode) && 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;
@@ -74790,19 +77642,25 @@ var ts;
return exportInfo(symbol, getExportKindForDeclaration(exportNode));
}
}
- else if (parent.kind === 243 /* 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 (ts.isExportAssignment(parent)) {
+ return getExportAssignmentExport(parent);
}
- else if (parent.kind === 194 /* BinaryExpression */) {
+ else if (ts.isExportAssignment(parent.parent)) {
+ return getExportAssignmentExport(parent.parent);
+ }
+ else if (ts.isBinaryExpression(parent)) {
return getSpecialPropertyExport(parent, /*useLhsSymbol*/ true);
}
- else if (parent.parent.kind === 194 /* BinaryExpression */) {
+ else if (ts.isBinaryExpression(parent.parent)) {
return getSpecialPropertyExport(parent.parent, /*useLhsSymbol*/ true);
}
}
+ function getExportAssignmentExport(ex) {
+ // Get the symbol for the `export =` node; its parent is the module it's the export of.
+ var exportingModuleSymbol = ex.symbol.parent;
+ ts.Debug.assert(!!exportingModuleSymbol);
+ return { kind: 1 /* Export */, symbol: symbol, exportInfo: { exportingModuleSymbol: exportingModuleSymbol, exportKind: 2 /* ExportEquals */ } };
+ }
function getSpecialPropertyExport(node, useLhsSymbol) {
var kind;
switch (ts.getSpecialPropertyAssignmentKind(node)) {
@@ -74822,19 +77680,19 @@ var ts;
function getImport() {
var isImport = isNodeImport(node);
if (!isImport)
- return;
+ return undefined;
// 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);
- }
+ if (!importedSymbol)
+ return undefined;
+ // 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 = getExportEqualsLocalSymbol(importedSymbol, checker);
+ }
+ if (symbolName(importedSymbol) === symbol.name) {
+ return __assign({ kind: 0 /* Import */, symbol: importedSymbol }, isImport);
}
}
function exportInfo(symbol, kind) {
@@ -74847,6 +77705,20 @@ var ts;
}
}
FindAllReferences.getImportOrExportSymbol = getImportOrExportSymbol;
+ function getExportEqualsLocalSymbol(importedSymbol, checker) {
+ if (importedSymbol.flags & 8388608 /* Alias */) {
+ return checker.getImmediateAliasedSymbol(importedSymbol);
+ }
+ var decl = importedSymbol.valueDeclaration;
+ if (ts.isExportAssignment(decl)) {
+ return decl.expression.symbol;
+ }
+ else if (ts.isBinaryExpression(decl)) {
+ return decl.right.symbol;
+ }
+ ts.Debug.fail();
+ }
+ // If a reference is a class expression, the exported node would be its parent.
// If a reference is a variable declaration, the exported node would be the variable statement.
function getExportNode(parent) {
if (parent.kind === 226 /* VariableDeclaration */) {
@@ -74885,23 +77757,25 @@ var ts;
if (symbol.name !== "default") {
return symbol.name;
}
- var name = ts.forEach(symbol.declarations, function (_a) {
- var name = _a.name;
+ return ts.forEach(symbol.declarations, function (decl) {
+ if (ts.isExportAssignment(decl)) {
+ return ts.isIdentifier(decl.expression) ? decl.expression.text : undefined;
+ }
+ var name = ts.getNameOfDeclaration(decl);
return name && name.kind === 71 /* 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)
+ 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) {
@@ -74937,12 +77811,13 @@ var ts;
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);
+ function findReferencedSymbols(program, cancellationToken, sourceFiles, sourceFile, position) {
+ var referencedSymbols = findAllReferencedSymbols(program, cancellationToken, sourceFiles, sourceFile, position);
if (!referencedSymbols || !referencedSymbols.length) {
return undefined;
}
var out = [];
+ var checker = program.getTypeChecker();
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.
@@ -74953,44 +77828,50 @@ var ts;
return out;
}
FindAllReferences.findReferencedSymbols = findReferencedSymbols;
- function getImplementationsAtPosition(checker, cancellationToken, sourceFiles, sourceFile, position) {
- var node = ts.getTouchingPropertyName(sourceFile, position);
- var referenceEntries = getImplementationReferenceEntries(checker, cancellationToken, sourceFiles, node);
+ function getImplementationsAtPosition(program, cancellationToken, sourceFiles, sourceFile, position) {
+ // A node in a JSDoc comment can't have an implementation anyway.
+ var node = ts.getTouchingPropertyName(sourceFile, position, /*includeJsDocComment*/ false);
+ var referenceEntries = getImplementationReferenceEntries(program, cancellationToken, sourceFiles, node);
+ var checker = program.getTypeChecker();
return ts.map(referenceEntries, function (entry) { return toImplementationLocation(entry, checker); });
}
FindAllReferences.getImplementationsAtPosition = getImplementationsAtPosition;
- function getImplementationReferenceEntries(typeChecker, cancellationToken, sourceFiles, node) {
+ function getImplementationReferenceEntries(program, cancellationToken, sourceFiles, node) {
+ if (node.kind === 265 /* SourceFile */) {
+ return undefined;
+ }
+ var checker = program.getTypeChecker();
// 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 === 262 /* ShorthandPropertyAssignment */) {
- var result_4 = [];
- FindAllReferences.Core.getReferenceEntriesForShorthandPropertyAssignment(node, typeChecker, function (node) { return result_4.push(nodeEntry(node)); });
- return result_4;
+ var result_5 = [];
+ FindAllReferences.Core.getReferenceEntriesForShorthandPropertyAssignment(node, checker, function (node) { return result_5.push(nodeEntry(node)); });
+ return result_5;
}
else if (node.kind === 97 /* 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);
+ var symbol = checker.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 });
+ return getReferenceEntriesForNode(node, program, sourceFiles, cancellationToken, { implementations: true });
}
}
- function findReferencedEntries(checker, cancellationToken, sourceFiles, sourceFile, position, options) {
- var x = flattenEntries(findAllReferencedSymbols(checker, cancellationToken, sourceFiles, sourceFile, position, options));
+ function findReferencedEntries(program, cancellationToken, sourceFiles, sourceFile, position, options) {
+ var x = flattenEntries(findAllReferencedSymbols(program, cancellationToken, sourceFiles, sourceFile, position, options));
return ts.map(x, toReferenceEntry);
}
FindAllReferences.findReferencedEntries = findReferencedEntries;
- function getReferenceEntriesForNode(node, sourceFiles, checker, cancellationToken, options) {
+ function getReferenceEntriesForNode(node, program, sourceFiles, cancellationToken, options) {
if (options === void 0) { options = {}; }
- return flattenEntries(FindAllReferences.Core.getReferencedSymbolsForNode(node, sourceFiles, checker, cancellationToken, options));
+ return flattenEntries(FindAllReferences.Core.getReferencedSymbolsForNode(node, program, sourceFiles, cancellationToken, options));
}
FindAllReferences.getReferenceEntriesForNode = getReferenceEntriesForNode;
- function findAllReferencedSymbols(checker, cancellationToken, sourceFiles, sourceFile, position, options) {
+ function findAllReferencedSymbols(program, cancellationToken, sourceFiles, sourceFile, position, options) {
var node = ts.getTouchingPropertyName(sourceFile, position, /*includeJsDocComment*/ true);
- return FindAllReferences.Core.getReferencedSymbolsForNode(node, sourceFiles, checker, cancellationToken, options);
+ return FindAllReferences.Core.getReferencedSymbolsForNode(node, program, sourceFiles, cancellationToken, options);
}
function flattenEntries(referenceSymbols) {
return referenceSymbols && ts.flatMap(referenceSymbols, function (r) { return r.references; });
@@ -75000,10 +77881,6 @@ var ts;
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 };
@@ -75057,7 +77934,7 @@ var ts;
fileName: node.getSourceFile().fileName,
textSpan: getTextSpan(node),
isWriteAccess: isWriteAccess(node),
- isDefinition: ts.isDeclarationName(node) || ts.isLiteralComputedPropertyDeclarationName(node),
+ isDefinition: ts.isAnyDeclarationName(node) || ts.isLiteralComputedPropertyDeclarationName(node),
isInString: isInString
};
}
@@ -75119,20 +77996,19 @@ var ts;
}
/** 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 === 71 /* Identifier */ && ts.isDeclarationName(node)) {
+ if (ts.isAnyDeclarationName(node)) {
return true;
}
var parent = node.parent;
- if (parent) {
- if (parent.kind === 193 /* PostfixUnaryExpression */ || parent.kind === 192 /* PrefixUnaryExpression */) {
+ switch (parent && parent.kind) {
+ case 193 /* PostfixUnaryExpression */:
+ case 192 /* PrefixUnaryExpression */:
return true;
- }
- else if (parent.kind === 194 /* BinaryExpression */ && parent.left === node) {
- var operator = parent.operatorToken.kind;
- return 58 /* FirstAssignment */ <= operator && operator <= 70 /* LastAssignment */;
- }
+ case 194 /* BinaryExpression */:
+ return parent.left === node && ts.isAssignmentOperator(parent.operatorToken.kind);
+ default:
+ return false;
}
- return false;
}
})(FindAllReferences = ts.FindAllReferences || (ts.FindAllReferences = {}));
})(ts || (ts = {}));
@@ -75144,7 +78020,7 @@ var ts;
var Core;
(function (Core) {
/** Core find-all-references algorithm. Handles special cases before delegating to `getReferencedSymbolsForSymbol`. */
- function getReferencedSymbolsForNode(node, sourceFiles, checker, cancellationToken, options) {
+ function getReferencedSymbolsForNode(node, program, sourceFiles, cancellationToken, options) {
if (options === void 0) { options = {}; }
if (node.kind === 265 /* SourceFile */) {
return undefined;
@@ -75155,6 +78031,7 @@ var ts;
return special;
}
}
+ var checker = program.getTypeChecker();
var symbol = checker.getSymbolAtLocation(node);
// Could not find a symbol e.g. unknown identifier
if (!symbol) {
@@ -75165,13 +78042,60 @@ var ts;
// 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;
+ if (symbol.flags & 1536 /* Module */ && isModuleReferenceLocation(node)) {
+ return getReferencedSymbolsForModule(program, symbol, sourceFiles);
}
return getReferencedSymbolsForSymbol(symbol, node, sourceFiles, checker, cancellationToken, options);
}
Core.getReferencedSymbolsForNode = getReferencedSymbolsForNode;
+ function isModuleReferenceLocation(node) {
+ if (node.kind !== 9 /* StringLiteral */) {
+ return false;
+ }
+ switch (node.parent.kind) {
+ case 233 /* ModuleDeclaration */:
+ case 248 /* ExternalModuleReference */:
+ case 238 /* ImportDeclaration */:
+ case 244 /* ExportDeclaration */:
+ return true;
+ case 181 /* CallExpression */:
+ return ts.isRequireCall(node.parent, /*checkArgumentIsStringLiteral*/ false) || ts.isImportCall(node.parent);
+ default:
+ return false;
+ }
+ }
+ function getReferencedSymbolsForModule(program, symbol, sourceFiles) {
+ ts.Debug.assert(!!symbol.valueDeclaration);
+ var references = FindAllReferences.findModuleReferences(program, sourceFiles, symbol).map(function (reference) {
+ if (reference.kind === "import") {
+ return { type: "node", node: reference.literal };
+ }
+ else {
+ return {
+ type: "span",
+ fileName: reference.referencingFile.fileName,
+ textSpan: ts.createTextSpanFromRange(reference.ref),
+ };
+ }
+ });
+ for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
+ var decl = _a[_i];
+ switch (decl.kind) {
+ case 265 /* SourceFile */:
+ // Don't include the source file itself. (This may not be ideal behavior, but awkward to include an entire file as a reference.)
+ break;
+ case 233 /* ModuleDeclaration */:
+ references.push({ type: "node", node: decl.name });
+ break;
+ default:
+ ts.Debug.fail("Expected a module symbol to be declared by a SourceFile or ModuleDeclaration.");
+ }
+ }
+ return [{
+ definition: { type: "symbol", symbol: symbol, node: symbol.valueDeclaration },
+ references: references
+ }];
+ }
/** getReferencedSymbols for special node kinds. */
function getReferencedSymbolsSpecial(node, sourceFiles, cancellationToken) {
if (ts.isTypeKeyword(node.kind)) {
@@ -75204,7 +78128,7 @@ var ts;
// 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 state = new State(sourceFiles, /*isForConstructor*/ node.kind === 123 /* ConstructorKeyword */, 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).
@@ -75234,53 +78158,94 @@ var ts;
}
return symbol;
}
- 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 === 123 /* 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) {
+ /**
+ * Holds all state needed for the finding references.
+ * Unlike `Search`, there is only one `State`.
+ */
+ var State = (function () {
+ function State(sourceFiles,
+ /** True if we're searching for constructor references. */
+ isForConstructor, checker, cancellationToken, searchMeaning, options, result) {
+ this.sourceFiles = sourceFiles;
+ this.isForConstructor = isForConstructor;
+ this.checker = checker;
+ this.cancellationToken = cancellationToken;
+ this.searchMeaning = searchMeaning;
+ this.options = options;
+ this.result = result;
+ /** Cache for `explicitlyinheritsFrom`. */
+ this.inheritsFromCache = ts.createMap();
+ /**
+ * 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.
+ */
+ this.markSeenContainingTypeReference = ts.nodeSeenTracker();
+ /**
+ * It's possible that we will encounter the right side of `export { foo as bar } from "x";` more than once.
+ * For example:
+ * // b.ts
+ * export { foo as bar } from "./a";
+ * import { bar } from "./b";
+ *
+ * Normally at `foo as bar` we directly add `foo` and do not locally search for it (since it doesn't declare a local).
+ * But another reference to it may appear in the same source file.
+ * See `tests/cases/fourslash/transitiveExportImports3.ts`.
+ */
+ this.markSeenReExportRHS = ts.nodeSeenTracker();
+ this.symbolIdToReferences = [];
+ // Source file ID → symbol ID → Whether the symbol has been searched for in the source file.
+ this.sourceFileToSeenSymbols = [];
+ }
+ /** Gets every place to look for references of an exported symbols. See `ImportsResult` in `importTracker.ts` for more documentation. */
+ State.prototype.getImportSearches = function (exportSymbol, exportInfo) {
+ if (!this.importTracker)
+ this.importTracker = FindAllReferences.createImportTracker(this.sourceFiles, this.checker, this.cancellationToken);
+ return this.importTracker(exportSymbol, exportInfo, this.options.isForRename);
+ };
+ /** @param allSearchSymbols set of additinal symbols for use by `includes`. */
+ State.prototype.createSearch = function (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 _a = searchOptions.text, text = _a === void 0 ? ts.stripQuotes(ts.getDeclaredName(this.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];
+ var parents = this.options.implementations && getParentSymbolsOfPropertyAccess(location, symbol, this.checker);
+ return {
+ location: location, symbol: symbol, comingFrom: comingFrom, text: text, escapedText: escapedText, parents: parents,
+ includes: function (referenceSymbol) { return allSearchSymbols ? ts.contains(allSearchSymbols, referenceSymbol) : referenceSymbol === symbol; },
+ };
+ };
+ /**
+ * Callback to add references for a particular searched symbol.
+ * This initializes a reference group, so only call this if you will add at least one reference.
+ */
+ State.prototype.referenceAdder = function (searchSymbol, searchLocation) {
+ var symbolId = ts.getSymbolId(searchSymbol);
+ var references = this.symbolIdToReferences[symbolId];
if (!references) {
- references = symbolIdToReferences[symbolId] = [];
- result.push({ definition: { type: "symbol", symbol: referenceSymbol, node: searchLocation }, references: references });
+ references = this.symbolIdToReferences[symbolId] = [];
+ this.result.push({ definition: { type: "symbol", symbol: searchSymbol, node: searchLocation }, references: references });
}
return function (node) { return references.push(FindAllReferences.nodeEntry(node)); };
- }
- function addStringOrCommentReference(fileName, textSpan) {
- result.push({
+ };
+ /** Add a reference with no associated definition. */
+ State.prototype.addStringOrCommentReference = function (fileName, textSpan) {
+ this.result.push({
definition: undefined,
references: [{ type: "span", fileName: fileName, textSpan: textSpan }]
});
- }
- function markSearchedSymbol(sourceFile, symbol) {
+ };
+ /** Returns `true` the first time we search for a symbol in a file and `false` afterwards. */
+ State.prototype.markSearchedSymbol = function (sourceFile, symbol) {
var sourceId = ts.getNodeId(sourceFile);
var symbolId = ts.getSymbolId(symbol);
- var seenSymbols = sourceFileToSeenSymbols[sourceId] || (sourceFileToSeenSymbols[sourceId] = []);
+ var seenSymbols = this.sourceFileToSeenSymbols[sourceId] || (this.sourceFileToSeenSymbols[sourceId] = []);
return !seenSymbols[symbolId] && (seenSymbols[symbolId] = true);
- }
- }
+ };
+ return State;
+ }());
/** 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;
@@ -75305,7 +78270,7 @@ var ts;
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" });
+ indirectSearch = state.options.isForRename ? undefined : state.createSearch(exportLocation, exportSymbol, 1 /* Export */, { text: "default" });
break;
case 2 /* ExportEquals */:
break;
@@ -75369,10 +78334,12 @@ var ts;
}
// If this is private property or method, the scope is the containing class
if (flags & (4 /* Property */ | 8192 /* Method */)) {
- var privateDeclaration = ts.find(declarations, function (d) { return !!(ts.getModifierFlags(d) & 8 /* Private */); });
+ var privateDeclaration = ts.find(declarations, function (d) { return ts.hasModifier(d, 8 /* Private */); });
if (privateDeclaration) {
return ts.getAncestor(privateDeclaration, 229 /* ClassDeclaration */);
}
+ // Else this is a public property and could be accessed from anywhere.
+ 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
@@ -75385,10 +78352,6 @@ var ts;
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;
for (var _i = 0, declarations_10 = declarations; _i < declarations_10.length; _i++) {
var declaration = declarations_10[_i];
@@ -75412,7 +78375,8 @@ var ts;
// 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) {
+ function getPossibleSymbolReferencePositions(sourceFile, symbolName, container) {
+ if (container === void 0) { container = sourceFile; }
var positions = [];
/// TODO: Cache symbol existence for files to save text search
// Also, need to make this work for unicode escapes.
@@ -75423,10 +78387,10 @@ var ts;
var text = sourceFile.text;
var sourceLength = text.length;
var symbolNameLength = symbolName.length;
- var position = text.indexOf(symbolName, start);
+ var position = text.indexOf(symbolName, container.pos);
while (position >= 0) {
// If we are past the end, stop looking
- if (position > end)
+ if (position > container.end)
break;
// We found a match. Make sure it's not part of a larger word (i.e. the char
// before and after it have to be a non-identifier char).
@@ -75444,16 +78408,12 @@ var ts;
var references = [];
var sourceFile = container.getSourceFile();
var labelName = targetLabel.text;
- var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, labelName, container.getStart(), container.getEnd());
+ var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, labelName, container);
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) {
- continue;
- }
+ var node = ts.getTouchingWord(sourceFile, position, /*includeJsDocComment*/ false);
// 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)) {
+ if (node && (node === targetLabel || (ts.isJumpStatementTarget(node) && ts.getTargetLabel(node, labelName) === targetLabel))) {
references.push(FindAllReferences.nodeEntry(node));
}
}
@@ -75463,31 +78423,30 @@ var ts;
// Compare the length so we filter out strict superstrings of the symbol we are looking for
switch (node && node.kind) {
case 71 /* Identifier */:
- return node.getWidth() === searchSymbolName.length;
+ return ts.unescapeIdentifier(node.text).length === 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;
+ node.text.length === searchSymbolName.length;
case 8 /* NumericLiteral */:
- return ts.isLiteralNameOfPropertyDeclarationOrIndexAccess(node) && node.getWidth() === searchSymbolName.length;
+ return ts.isLiteralNameOfPropertyDeclarationOrIndexAccess(node) && node.text.length === 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];
+ for (var _i = 0, sourceFiles_6 = sourceFiles; _i < sourceFiles_6.length; _i++) {
+ var sourceFile = sourceFiles_6[_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());
+ var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, searchText, sourceFile);
for (var _i = 0, possiblePositions_2 = possiblePositions; _i < possiblePositions_2.length; _i++) {
var position = possiblePositions_2[_i];
- var referenceLocation = ts.getTouchingPropertyName(sourceFile, position);
+ var referenceLocation = ts.getTouchingPropertyName(sourceFile, position, /*includeJsDocComment*/ true);
if (referenceLocation.kind === kind) {
references.push(FindAllReferences.nodeEntry(referenceLocation));
}
@@ -75506,20 +78465,18 @@ var ts;
if (!state.markSearchedSymbol(sourceFile, search.symbol)) {
return;
}
- 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];
+ for (var _i = 0, _a = getPossibleSymbolReferencePositions(sourceFile, search.text, container); _i < _a.length; _i++) {
+ var position = _a[_i];
getReferencesAtLocation(sourceFile, position, search, state);
}
}
function getReferencesAtLocation(sourceFile, position, search, state) {
- var referenceLocation = ts.getTouchingPropertyName(sourceFile, position);
+ var referenceLocation = ts.getTouchingPropertyName(sourceFile, position, /*includeJsDocComment*/ true);
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))) {
+ if (!state.options.implementations && (state.options.findInStrings && ts.isInString(sourceFile, position) || state.options.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
@@ -75574,7 +78531,7 @@ var ts;
if (!exportDeclaration.moduleSpecifier) {
addRef();
}
- if (!state.isForRename && state.markSeenReExportRHS(name)) {
+ if (!state.options.isForRename && state.markSeenReExportRHS(name)) {
addReference(name, referenceSymbol, name, state);
}
}
@@ -75584,7 +78541,7 @@ var ts;
}
}
// For `export { foo as bar }`, rename `foo`, but not `bar`.
- if (!(referenceLocation === propertyName && state.isForRename)) {
+ if (!(referenceLocation === propertyName && state.options.isForRename)) {
var exportKind = referenceLocation.originalKeywordKind === 79 /* DefaultKeyword */ ? 1 /* Default */ : 0 /* Named */;
var exportInfo = FindAllReferences.getExportInfo(referenceSymbol, exportKind, state.checker);
ts.Debug.assert(!!exportInfo);
@@ -75620,7 +78577,7 @@ var ts;
return;
var symbol = importOrExport.symbol;
if (importOrExport.kind === 0 /* Import */) {
- if (!state.isForRename || importOrExport.isNamedImport) {
+ if (!state.options.isForRename || importOrExport.isNamedImport) {
searchForImportedSymbol(symbol, state);
}
}
@@ -75640,12 +78597,12 @@ var ts;
* position of property accessing, the referenceEntry of such position will be handled in the first case.
*/
if (!(flags & 134217728 /* Transient */) && search.includes(shorthandValueSymbol)) {
- addReference(valueDeclaration.name, shorthandValueSymbol, search.location, state);
+ addReference(ts.getNameOfDeclaration(valueDeclaration), shorthandValueSymbol, search.location, state);
}
}
function addReference(referenceLocation, relatedSymbol, searchLocation, state) {
var addRef = state.referenceAdder(relatedSymbol, searchLocation);
- if (state.implementations) {
+ if (state.options.implementations) {
addImplementationReferences(referenceLocation, addRef, state);
}
else {
@@ -75906,10 +78863,10 @@ var ts;
}
var references = [];
var sourceFile = searchSpaceNode.getSourceFile();
- var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "super", searchSpaceNode.getStart(), searchSpaceNode.getEnd());
- for (var _i = 0, possiblePositions_4 = possiblePositions; _i < possiblePositions_4.length; _i++) {
- var position = possiblePositions_4[_i];
- var node = ts.getTouchingWord(sourceFile, position);
+ var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "super", searchSpaceNode);
+ for (var _i = 0, possiblePositions_3 = possiblePositions; _i < possiblePositions_3.length; _i++) {
+ var position = possiblePositions_3[_i];
+ var node = ts.getTouchingWord(sourceFile, position, /*includeJsDocComment*/ false);
if (!node || node.kind !== 97 /* SuperKeyword */) {
continue;
}
@@ -75960,13 +78917,13 @@ var ts;
if (searchSpaceNode.kind === 265 /* SourceFile */) {
ts.forEach(sourceFiles, function (sourceFile) {
cancellationToken.throwIfCancellationRequested();
- possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "this", sourceFile.getStart(), sourceFile.getEnd());
+ possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "this");
getThisReferencesInFile(sourceFile, sourceFile, possiblePositions, references);
});
}
else {
var sourceFile = searchSpaceNode.getSourceFile();
- possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "this", searchSpaceNode.getStart(), searchSpaceNode.getEnd());
+ possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "this", searchSpaceNode);
getThisReferencesInFile(sourceFile, searchSpaceNode, possiblePositions, references);
}
return [{
@@ -75975,7 +78932,7 @@ var ts;
}];
function getThisReferencesInFile(sourceFile, searchSpaceNode, possiblePositions, result) {
ts.forEach(possiblePositions, function (position) {
- var node = ts.getTouchingWord(sourceFile, position);
+ var node = ts.getTouchingWord(sourceFile, position, /*includeJsDocComment*/ false);
if (!node || !ts.isThis(node)) {
return;
}
@@ -76012,10 +78969,10 @@ var ts;
}
function getReferencesForStringLiteral(node, sourceFiles, cancellationToken) {
var references = [];
- for (var _i = 0, sourceFiles_6 = sourceFiles; _i < sourceFiles_6.length; _i++) {
- var sourceFile = sourceFiles_6[_i];
+ for (var _i = 0, sourceFiles_7 = sourceFiles; _i < sourceFiles_7.length; _i++) {
+ var sourceFile = sourceFiles_7[_i];
cancellationToken.throwIfCancellationRequested();
- var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, node.text, sourceFile.getStart(), sourceFile.getEnd());
+ var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, node.text);
getReferencesForStringLiteralInFile(sourceFile, node.text, possiblePositions, references);
}
return [{
@@ -76023,9 +78980,9 @@ var ts;
references: references
}];
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);
+ for (var _i = 0, possiblePositions_4 = possiblePositions; _i < possiblePositions_4.length; _i++) {
+ var position = possiblePositions_4[_i];
+ var node_7 = ts.getTouchingWord(sourceFile, position, /*includeJsDocComment*/ false);
if (node_7 && node_7.kind === 9 /* StringLiteral */ && node_7.text === searchText) {
references.push(FindAllReferences.nodeEntry(node_7, /*isInString*/ true));
}
@@ -76221,20 +79178,20 @@ var ts;
var contextualType = checker.getContextualType(objectLiteral);
var name = getNameFromObjectLiteralElement(node);
if (name && contextualType) {
- var result_5 = [];
+ var result_6 = [];
var symbol = contextualType.getProperty(name);
if (symbol) {
- result_5.push(symbol);
+ result_6.push(symbol);
}
if (contextualType.flags & 65536 /* Union */) {
ts.forEach(contextualType.types, function (t) {
var symbol = t.getProperty(name);
if (symbol) {
- result_5.push(symbol);
+ result_6.push(symbol);
}
});
}
- return result_5;
+ return result_6;
}
return undefined;
}
@@ -76369,7 +79326,7 @@ var ts;
if (referenceFile) {
return [getDefinitionInfoForFileReference(comment.fileName, referenceFile.fileName)];
}
- return undefined;
+ // Might still be on jsdoc, so keep looking.
}
// Type reference directives
var typeReferenceDirective = findReferenceInPosition(sourceFile.typeReferenceDirectives, position);
@@ -76378,7 +79335,7 @@ var ts;
return referenceFile && referenceFile.resolvedFileName &&
[getDefinitionInfoForFileReference(typeReferenceDirective.fileName, referenceFile.resolvedFileName)];
}
- var node = ts.getTouchingPropertyName(sourceFile, position);
+ var node = ts.getTouchingPropertyName(sourceFile, position, /*includeJsDocComment*/ true);
if (node === sourceFile) {
return undefined;
}
@@ -76403,17 +79360,10 @@ var ts;
// get the aliased symbol instead. This allows for goto def on an import e.g.
// import {A, B} from "mod";
// to jump to the implementation directly.
- if (symbol.flags & 8388608 /* Alias */) {
- var declaration = symbol.declarations[0];
- // Go to the original declaration for cases:
- //
- // (1) when the aliased symbol was declared in the location(parent).
- // (2) when the aliased symbol is originating from a named import.
- //
- if (node.kind === 71 /* Identifier */ &&
- (node.parent === declaration ||
- (declaration.kind === 242 /* ImportSpecifier */ && declaration.parent && declaration.parent.kind === 241 /* NamedImports */))) {
- symbol = typeChecker.getAliasedSymbol(symbol);
+ if (symbol.flags & 8388608 /* Alias */ && shouldSkipAlias(node, symbol.declarations[0])) {
+ var aliased = typeChecker.getAliasedSymbol(symbol);
+ if (aliased.declarations) {
+ symbol = aliased;
}
}
// Because name in short-hand property assignment has two different meanings: property name and property value,
@@ -76432,16 +79382,6 @@ 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
@@ -76452,23 +79392,17 @@ var ts;
// 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;
- }
+ if (element && typeChecker.getContextualType(element.parent)) {
+ return ts.flatMap(ts.getPropertySymbolsFromContextualType(typeChecker, element), function (propertySymbol) {
+ return getDefinitionFromSymbol(typeChecker, propertySymbol, node);
+ });
}
return getDefinitionFromSymbol(typeChecker, symbol, node);
}
GoToDefinition.getDefinitionAtPosition = getDefinitionAtPosition;
/// Goto type
function getTypeDefinitionAtPosition(typeChecker, sourceFile, position) {
- var node = ts.getTouchingPropertyName(sourceFile, position);
+ var node = ts.getTouchingPropertyName(sourceFile, position, /*includeJsDocComment*/ true);
if (node === sourceFile) {
return undefined;
}
@@ -76481,13 +79415,13 @@ var ts;
return undefined;
}
if (type.flags & 65536 /* Union */ && !(type.flags & 16 /* Enum */)) {
- var result_6 = [];
+ var result_7 = [];
ts.forEach(type.types, function (t) {
if (t.symbol) {
- ts.addRange(/*to*/ result_6, /*from*/ getDefinitionFromSymbol(typeChecker, t.symbol, node));
+ ts.addRange(/*to*/ result_7, /*from*/ getDefinitionFromSymbol(typeChecker, t.symbol, node));
}
});
- return result_6;
+ return result_7;
}
if (!type.symbol) {
return undefined;
@@ -76495,6 +79429,28 @@ var ts;
return getDefinitionFromSymbol(typeChecker, type.symbol, node);
}
GoToDefinition.getTypeDefinitionAtPosition = getTypeDefinitionAtPosition;
+ // Go to the original declaration for cases:
+ //
+ // (1) when the aliased symbol was declared in the location(parent).
+ // (2) when the aliased symbol is originating from an import.
+ //
+ function shouldSkipAlias(node, declaration) {
+ if (node.kind !== 71 /* Identifier */) {
+ return false;
+ }
+ if (node.parent === declaration) {
+ return true;
+ }
+ switch (declaration.kind) {
+ case 239 /* ImportClause */:
+ case 237 /* ImportEqualsDeclaration */:
+ return true;
+ case 242 /* ImportSpecifier */:
+ return declaration.parent.kind === 241 /* NamedImports */;
+ default:
+ return false;
+ }
+ }
function getDefinitionFromSymbol(typeChecker, symbol, node) {
var result = [];
var declarations = symbol.getDeclarations();
@@ -76565,7 +79521,7 @@ var ts;
}
/** 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);
+ return createDefinitionInfoFromName(ts.getNameOfDeclaration(node) || node, symbolKind, symbolName, containerName);
}
/** Creates a DefinitionInfo directly from the name of a declaration. */
function createDefinitionInfoFromName(name, symbolKind, symbolName, containerName) {
@@ -76593,7 +79549,7 @@ var ts;
function findReferenceInPosition(refs, pos) {
for (var _i = 0, refs_1 = refs; _i < refs_1.length; _i++) {
var ref = refs_1[_i];
- if (ref.pos <= pos && pos < ref.end) {
+ if (ref.pos <= pos && pos <= ref.end) {
return ref;
}
}
@@ -76665,6 +79621,7 @@ var ts;
"namespace",
"param",
"private",
+ "prop",
"property",
"public",
"requires",
@@ -76675,8 +79632,6 @@ var ts;
"throws",
"type",
"typedef",
- "property",
- "prop",
"version"
];
var jsDocTagNameCompletionEntries;
@@ -76771,6 +79726,24 @@ var ts;
}));
}
JsDoc.getJSDocTagCompletions = getJSDocTagCompletions;
+ function getJSDocParameterNameCompletions(tag) {
+ var nameThusFar = tag.name.text;
+ var jsdoc = tag.parent;
+ var fn = jsdoc.parent;
+ if (!ts.isFunctionLike(fn))
+ return [];
+ return ts.mapDefined(fn.parameters, function (param) {
+ if (!ts.isIdentifier(param.name))
+ return undefined;
+ var name = param.name.text;
+ if (jsdoc.tags.some(function (t) { return t !== tag && ts.isJSDocParameterTag(t) && t.name.text === name; })
+ || nameThusFar !== undefined && !ts.startsWith(name, nameThusFar)) {
+ return undefined;
+ }
+ return { name: name, kind: ts.ScriptElementKind.parameterElement, kindModifiers: "", sortText: "0" };
+ });
+ }
+ JsDoc.getJSDocParameterNameCompletions = getJSDocParameterNameCompletions;
/**
* Checks if position points to a valid position to add JSDoc comments, and if so,
* returns the appropriate template. Otherwise returns an empty string.
@@ -76796,7 +79769,7 @@ var ts;
if (ts.isInString(sourceFile, position) || ts.isInComment(sourceFile, position) || ts.hasDocComment(sourceFile, position)) {
return undefined;
}
- var tokenAtPos = ts.getTokenAtPosition(sourceFile, position);
+ var tokenAtPos = ts.getTokenAtPosition(sourceFile, position, /*includeJsDocComment*/ false);
var tokenStart = tokenAtPos.getStart();
if (!tokenAtPos || tokenStart < position) {
return undefined;
@@ -77059,7 +80032,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 safeList.has(f); }));
+ mergeTypings(ts.mapDefined(cleanedTypingNames, function (f) { return safeList.get(f); }));
}
var hasJsxFile = ts.forEach(fileNames, function (f) { return ts.ensureScriptKind(f, ts.getScriptKindFromFileName(f)) === 2 /* JSX */; });
if (hasJsxFile) {
@@ -77124,7 +80097,7 @@ var ts;
function getNavigateToItems(sourceFiles, checker, cancellationToken, searchValue, maxResultCount, excludeDtsFiles) {
var patternMatcher = ts.createPatternMatcher(searchValue);
var rawItems = [];
- var _loop_4 = function (sourceFile) {
+ var _loop_5 = function (sourceFile) {
cancellationToken.throwIfCancellationRequested();
if (excludeDtsFiles && ts.fileExtensionIs(sourceFile.fileName, ".d.ts")) {
return "continue";
@@ -77159,9 +80132,9 @@ var ts;
});
};
// 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);
+ for (var _i = 0, sourceFiles_8 = sourceFiles; _i < sourceFiles_8.length; _i++) {
+ var sourceFile = sourceFiles_8[_i];
+ _loop_5(sourceFile);
}
// Remove imports when the imported declaration is already in the list and has the same name.
rawItems = ts.filter(rawItems, function (item) {
@@ -77203,17 +80176,20 @@ var ts;
return undefined;
}
function tryAddSingleDeclarationName(declaration, containers) {
- if (declaration && declaration.name) {
- var text = getTextOfIdentifierOrLiteral(declaration.name);
- if (text !== undefined) {
- containers.unshift(text);
- }
- else if (declaration.name.kind === 144 /* ComputedPropertyName */) {
- return tryAddComputedPropertyName(declaration.name.expression, containers, /*includeLastPortion*/ true);
- }
- else {
- // Don't know how to add this.
- return false;
+ if (declaration) {
+ var name = ts.getNameOfDeclaration(declaration);
+ if (name) {
+ var text = getTextOfIdentifierOrLiteral(name);
+ if (text !== undefined) {
+ containers.unshift(text);
+ }
+ else if (name.kind === 144 /* ComputedPropertyName */) {
+ return tryAddComputedPropertyName(name.expression, containers, /*includeLastPortion*/ true);
+ }
+ else {
+ // Don't know how to add this.
+ return false;
+ }
}
}
return true;
@@ -77242,8 +80218,9 @@ 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 === 144 /* ComputedPropertyName */) {
- if (!tryAddComputedPropertyName(declaration.name.expression, containers, /*includeLastPortion*/ false)) {
+ var name = ts.getNameOfDeclaration(declaration);
+ if (name.kind === 144 /* ComputedPropertyName */) {
+ if (!tryAddComputedPropertyName(name.expression, containers, /*includeLastPortion*/ false)) {
return undefined;
}
}
@@ -77281,6 +80258,7 @@ var ts;
function createNavigateToItem(rawItem) {
var declaration = rawItem.declaration;
var container = ts.getContainerNode(declaration);
+ var containerName = container && ts.getNameOfDeclaration(container);
return {
name: rawItem.name,
kind: ts.getNodeKind(declaration),
@@ -77290,8 +80268,8 @@ var ts;
fileName: rawItem.fileName,
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) : ""
+ containerName: containerName ? containerName.text : "",
+ containerKind: containerName ? ts.getNodeKind(container) : ""
};
}
}
@@ -77531,7 +80509,7 @@ var ts;
default:
ts.forEach(node.jsDoc, function (jsDoc) {
ts.forEach(jsDoc.tags, function (tag) {
- if (tag.kind === 290 /* JSDocTypedefTag */) {
+ if (tag.kind === 291 /* JSDocTypedefTag */) {
addLeafNode(tag);
}
});
@@ -77543,8 +80521,8 @@ var ts;
function mergeChildren(children) {
var nameToItems = ts.createMap();
ts.filterMutate(children, function (child) {
- var decl = child.node;
- var name = decl.name && nodeText(decl.name);
+ var declName = ts.getNameOfDeclaration(child.node);
+ var name = declName && nodeText(declName);
if (!name) {
// Anonymous items are never merged.
return true;
@@ -77633,16 +80611,16 @@ var ts;
if (node.kind === 233 /* ModuleDeclaration */) {
return getModuleName(node);
}
- var decl = node;
- if (decl.name) {
- return ts.getPropertyNameForPropertyNameNode(decl.name);
+ var declName = ts.getNameOfDeclaration(node);
+ if (declName) {
+ return ts.getPropertyNameForPropertyNameNode(declName);
}
switch (node.kind) {
case 186 /* FunctionExpression */:
case 187 /* ArrowFunction */:
case 199 /* ClassExpression */:
return getFunctionOrClassName(node);
- case 290 /* JSDocTypedefTag */:
+ case 291 /* JSDocTypedefTag */:
return getJSDocTypedefTagName(node);
default:
return undefined;
@@ -77652,7 +80630,7 @@ var ts;
if (node.kind === 233 /* ModuleDeclaration */) {
return getModuleName(node);
}
- var name = node.name;
+ var name = ts.getNameOfDeclaration(node);
if (name) {
var text = nodeText(name);
if (text.length > 0) {
@@ -77685,7 +80663,7 @@ var ts;
return "()";
case 157 /* IndexSignature */:
return "[]";
- case 290 /* JSDocTypedefTag */:
+ case 291 /* JSDocTypedefTag */:
return getJSDocTypedefTagName(node);
default:
return "<unknown>";
@@ -77733,7 +80711,7 @@ var ts;
case 233 /* ModuleDeclaration */:
case 265 /* SourceFile */:
case 231 /* TypeAliasDeclaration */:
- case 290 /* JSDocTypedefTag */:
+ case 291 /* JSDocTypedefTag */:
return true;
case 152 /* Constructor */:
case 151 /* MethodDeclaration */:
@@ -78690,7 +81668,15 @@ var ts;
var token = ts.scanner.getToken();
if (token === 91 /* ImportKeyword */) {
token = nextToken();
- if (token === 9 /* StringLiteral */) {
+ if (token === 19 /* OpenParenToken */) {
+ token = nextToken();
+ if (token === 9 /* StringLiteral */) {
+ // import("mod");
+ recordModuleName();
+ return true;
+ }
+ }
+ else if (token === 9 /* StringLiteral */) {
// import "mod";
recordModuleName();
return true;
@@ -78874,7 +81860,7 @@ var ts;
// import * as NS from "mod"
// import d, {a, b as B} from "mod"
// import i = require("mod");
- //
+ // import("mod");
// export * from "mod"
// export {a as b} from "mod"
// export import i = require("mod")
@@ -79030,138 +82016,6 @@ var ts;
(function (ts) {
var SignatureHelp;
(function (SignatureHelp) {
- // A partially written generic type expression is not guaranteed to have the correct syntax tree. the expression could be parsed as less than/greater than expression or a comma expression
- // or some other combination depending on what the user has typed so far. For the purposes of signature help we need to consider any location after "<" as a possible generic type reference.
- // To do this, the method will back parse the expression starting at the position required. it will try to parse the current expression as a generic type expression, if it did succeed it
- // will return the generic identifier that started the expression (e.g. "foo" in "foo<any, |"). It is then up to the caller to ensure that this is a valid generic expression through
- // looking up the type. The method will also keep track of the parameter index inside the expression.
- // public static isInPartiallyWrittenTypeArgumentList(syntaxTree: TypeScript.SyntaxTree, position: number): any {
- // let token = Syntax.findTokenOnLeft(syntaxTree.sourceUnit(), position, /*includeSkippedTokens*/ true);
- // if (token && TypeScript.Syntax.hasAncestorOfKind(token, TypeScript.SyntaxKind.TypeParameterList)) {
- // // We are in the wrong generic list. bail out
- // return null;
- // }
- // let stack = 0;
- // let argumentIndex = 0;
- // whileLoop:
- // while (token) {
- // switch (token.kind()) {
- // case TypeScript.SyntaxKind.LessThanToken:
- // if (stack === 0) {
- // // Found the beginning of the generic argument expression
- // let lessThanToken = token;
- // token = previousToken(token, /*includeSkippedTokens*/ true);
- // if (!token || token.kind() !== TypeScript.SyntaxKind.IdentifierName) {
- // break whileLoop;
- // }
- // // Found the name, return the data
- // return {
- // genericIdentifer: token,
- // lessThanToken: lessThanToken,
- // argumentIndex: argumentIndex
- // };
- // }
- // else if (stack < 0) {
- // // Seen one too many less than tokens, bail out
- // break whileLoop;
- // }
- // else {
- // stack--;
- // }
- // break;
- // case TypeScript.SyntaxKind.GreaterThanGreaterThanGreaterThanToken:
- // stack++;
- // // Intentional fall through
- // case TypeScript.SyntaxKind.GreaterThanToken:
- // stack++;
- // break;
- // case TypeScript.SyntaxKind.CommaToken:
- // if (stack === 0) {
- // argumentIndex++;
- // }
- // break;
- // case TypeScript.SyntaxKind.CloseBraceToken:
- // // This can be object type, skip untill we find the matching open brace token
- // let unmatchedOpenBraceTokens = 0;
- // // Skip untill the matching open brace token
- // token = SignatureInfoHelpers.moveBackUpTillMatchingTokenKind(token, TypeScript.SyntaxKind.CloseBraceToken, TypeScript.SyntaxKind.OpenBraceToken);
- // if (!token) {
- // // No matching token was found. bail out
- // break whileLoop;
- // }
- // break;
- // case TypeScript.SyntaxKind.EqualsGreaterThanToken:
- // // This can be a function type or a constructor type. In either case, we want to skip the function definition
- // token = previousToken(token, /*includeSkippedTokens*/ true);
- // if (token && token.kind() === TypeScript.SyntaxKind.CloseParenToken) {
- // // Skip untill the matching open paren token
- // token = SignatureInfoHelpers.moveBackUpTillMatchingTokenKind(token, TypeScript.SyntaxKind.CloseParenToken, TypeScript.SyntaxKind.OpenParenToken);
- // if (token && token.kind() === TypeScript.SyntaxKind.GreaterThanToken) {
- // // Another generic type argument list, skip it\
- // token = SignatureInfoHelpers.moveBackUpTillMatchingTokenKind(token, TypeScript.SyntaxKind.GreaterThanToken, TypeScript.SyntaxKind.LessThanToken);
- // }
- // if (token && token.kind() === TypeScript.SyntaxKind.NewKeyword) {
- // // In case this was a constructor type, skip the new keyword
- // token = previousToken(token, /*includeSkippedTokens*/ true);
- // }
- // if (!token) {
- // // No matching token was found. bail out
- // break whileLoop;
- // }
- // }
- // else {
- // // This is not a function type. exit the main loop
- // break whileLoop;
- // }
- // break;
- // case TypeScript.SyntaxKind.IdentifierName:
- // case TypeScript.SyntaxKind.AnyKeyword:
- // case TypeScript.SyntaxKind.NumberKeyword:
- // case TypeScript.SyntaxKind.StringKeyword:
- // case TypeScript.SyntaxKind.VoidKeyword:
- // case TypeScript.SyntaxKind.BooleanKeyword:
- // case TypeScript.SyntaxKind.DotToken:
- // case TypeScript.SyntaxKind.OpenBracketToken:
- // case TypeScript.SyntaxKind.CloseBracketToken:
- // // Valid tokens in a type name. Skip.
- // break;
- // default:
- // break whileLoop;
- // }
- // token = previousToken(token, /*includeSkippedTokens*/ true);
- // }
- // return null;
- // }
- // private static moveBackUpTillMatchingTokenKind(token: TypeScript.ISyntaxToken, tokenKind: TypeScript.SyntaxKind, matchingTokenKind: TypeScript.SyntaxKind): TypeScript.ISyntaxToken {
- // if (!token || token.kind() !== tokenKind) {
- // throw TypeScript.Errors.invalidOperation();
- // }
- // // Skip the current token
- // token = previousToken(token, /*includeSkippedTokens*/ true);
- // let stack = 0;
- // while (token) {
- // if (token.kind() === matchingTokenKind) {
- // if (stack === 0) {
- // // Found the matching token, return
- // return token;
- // }
- // else if (stack < 0) {
- // // tokens overlapped.. bail out.
- // break;
- // }
- // else {
- // stack--;
- // }
- // }
- // else if (token.kind() === tokenKind) {
- // stack++;
- // }
- // // Move back
- // token = previousToken(token, /*includeSkippedTokens*/ true);
- // }
- // // Did not find matching token
- // return null;
- // }
var emptyArray = [];
var ArgumentListKind;
(function (ArgumentListKind) {
@@ -79241,7 +82095,7 @@ var ts;
* in the argument of an invocation; returns undefined otherwise.
*/
function getImmediatelyContainingArgumentInfo(node, position, sourceFile) {
- if (node.parent.kind === 181 /* CallExpression */ || node.parent.kind === 182 /* NewExpression */) {
+ if (ts.isCallOrNewExpression(node.parent)) {
var callExpression = node.parent;
// There are 3 cases to handle:
// 1. The token introduces a list, and should begin a signature help session
@@ -79603,9 +82457,10 @@ var ts;
// TODO(drosen): use contextual SemanticMeaning.
function getSymbolKind(typeChecker, symbol, location) {
var flags = symbol.flags;
- if (flags & 32 /* Class */)
+ if (flags & 32 /* Class */) {
return ts.getDeclarationOfKind(symbol, 199 /* ClassExpression */) ?
ts.ScriptElementKind.localClassElement : ts.ScriptElementKind.classElement;
+ }
if (flags & 384 /* Enum */)
return ts.ScriptElementKind.enumElement;
if (flags & 524288 /* TypeAlias */)
@@ -79724,7 +82579,7 @@ var ts;
}
// try get the call/construct signature from the type if it matches
var callExpressionLike = void 0;
- if (location.kind === 181 /* CallExpression */ || location.kind === 182 /* NewExpression */) {
+ if (ts.isCallOrNewExpression(location)) {
callExpressionLike = location;
}
else if (ts.isCallExpressionTarget(location) || ts.isNewExpressionTarget(location)) {
@@ -79784,7 +82639,7 @@ var ts;
if (!(type.flags & 32768 /* Object */ && type.objectFlags & 16 /* Anonymous */) && type.symbol) {
ts.addRange(displayParts, ts.symbolToDisplayParts(typeChecker, type.symbol, enclosingDeclaration, /*meaning*/ undefined, 1 /* WriteTypeParametersOrArguments */));
}
- addSignatureDisplayParts(signature, allSignatures, 8 /* WriteArrowStyleSignature */);
+ addSignatureDisplayParts(signature, allSignatures, 16 /* WriteArrowStyleSignature */);
break;
default:
// Just signature
@@ -79796,26 +82651,32 @@ var ts;
else if ((ts.isNameOfFunctionDeclaration(location) && !(symbol.flags & 98304 /* Accessor */)) ||
(location.kind === 123 /* ConstructorKeyword */ && location.parent.kind === 152 /* Constructor */)) {
// get the signature from the declaration and write it
- var functionDeclaration = location.parent;
- var allSignatures = functionDeclaration.kind === 152 /* Constructor */ ? type.getNonNullableType().getConstructSignatures() : type.getNonNullableType().getCallSignatures();
- if (!typeChecker.isImplementationOfOverload(functionDeclaration)) {
- signature = typeChecker.getSignatureFromDeclaration(functionDeclaration);
- }
- else {
- signature = allSignatures[0];
- }
- if (functionDeclaration.kind === 152 /* Constructor */) {
- // show (constructor) Type(...) signature
- symbolKind = ts.ScriptElementKind.constructorImplementationElement;
- addPrefixForAnyFunctionOrVar(type.symbol, symbolKind);
- }
- else {
- // (function/method) symbol(..signature)
- addPrefixForAnyFunctionOrVar(functionDeclaration.kind === 155 /* CallSignature */ &&
- !(type.symbol.flags & 2048 /* TypeLiteral */ || type.symbol.flags & 4096 /* ObjectLiteral */) ? type.symbol : symbol, symbolKind);
+ var functionDeclaration_1 = location.parent;
+ // Use function declaration to write the signatures only if the symbol corresponding to this declaration
+ var locationIsSymbolDeclaration = ts.findDeclaration(symbol, function (declaration) {
+ return declaration === (location.kind === 123 /* ConstructorKeyword */ ? functionDeclaration_1.parent : functionDeclaration_1);
+ });
+ if (locationIsSymbolDeclaration) {
+ var allSignatures = functionDeclaration_1.kind === 152 /* Constructor */ ? type.getNonNullableType().getConstructSignatures() : type.getNonNullableType().getCallSignatures();
+ if (!typeChecker.isImplementationOfOverload(functionDeclaration_1)) {
+ signature = typeChecker.getSignatureFromDeclaration(functionDeclaration_1);
+ }
+ else {
+ signature = allSignatures[0];
+ }
+ if (functionDeclaration_1.kind === 152 /* Constructor */) {
+ // show (constructor) Type(...) signature
+ symbolKind = ts.ScriptElementKind.constructorImplementationElement;
+ addPrefixForAnyFunctionOrVar(type.symbol, symbolKind);
+ }
+ else {
+ // (function/method) symbol(..signature)
+ addPrefixForAnyFunctionOrVar(functionDeclaration_1.kind === 155 /* CallSignature */ &&
+ !(type.symbol.flags & 2048 /* TypeLiteral */ || type.symbol.flags & 4096 /* ObjectLiteral */) ? type.symbol : symbol, symbolKind);
+ }
+ addSignatureDisplayParts(signature, allSignatures);
+ hasAddedSymbolInfo = true;
}
- addSignatureDisplayParts(signature, allSignatures);
- hasAddedSymbolInfo = true;
}
}
}
@@ -79850,7 +82711,7 @@ var ts;
displayParts.push(ts.spacePart());
displayParts.push(ts.operatorPart(58 /* EqualsToken */));
displayParts.push(ts.spacePart());
- ts.addRange(displayParts, ts.typeToDisplayParts(typeChecker, typeChecker.getDeclaredTypeOfSymbol(symbol), enclosingDeclaration, 512 /* InTypeAlias */));
+ ts.addRange(displayParts, ts.typeToDisplayParts(typeChecker, typeChecker.getDeclaredTypeOfSymbol(symbol), enclosingDeclaration, 1024 /* InTypeAlias */));
}
if (symbolFlags & 384 /* Enum */) {
addNewLineIfDisplayPartsExist();
@@ -79885,9 +82746,9 @@ var ts;
}
else {
// Method/function type parameter
- var declaration = ts.getDeclarationOfKind(symbol, 145 /* TypeParameter */);
- ts.Debug.assert(declaration !== undefined);
- declaration = declaration.parent;
+ var decl = ts.getDeclarationOfKind(symbol, 145 /* TypeParameter */);
+ ts.Debug.assert(decl !== undefined);
+ var declaration = decl.parent;
if (declaration) {
if (ts.isFunctionLikeKind(declaration.kind)) {
addInPrefix();
@@ -79899,7 +82760,7 @@ var ts;
else if (declaration.kind !== 155 /* CallSignature */ && declaration.name) {
addFullSymbolName(declaration.symbol);
}
- ts.addRange(displayParts, ts.signatureToDisplayParts(typeChecker, signature, sourceFile, 32 /* WriteTypeArgumentsOfSignature */));
+ ts.addRange(displayParts, ts.signatureToDisplayParts(typeChecker, signature, sourceFile, 64 /* WriteTypeArgumentsOfSignature */));
}
else if (declaration.kind === 231 /* TypeAliasDeclaration */) {
// Type alias type parameter
@@ -79924,7 +82785,7 @@ var ts;
displayParts.push(ts.spacePart());
displayParts.push(ts.operatorPart(58 /* EqualsToken */));
displayParts.push(ts.spacePart());
- displayParts.push(ts.displayPart(constantValue.toString(), ts.SymbolDisplayPartKind.numericLiteral));
+ displayParts.push(ts.displayPart(ts.getTextOfConstantValue(constantValue), typeof constantValue === "number" ? ts.SymbolDisplayPartKind.numericLiteral : ts.SymbolDisplayPartKind.stringLiteral));
}
}
}
@@ -80075,7 +82936,7 @@ var ts;
}
}
function addSignatureDisplayParts(signature, allSignatures, flags) {
- ts.addRange(displayParts, ts.signatureToDisplayParts(typeChecker, signature, enclosingDeclaration, flags | 32 /* WriteTypeArgumentsOfSignature */));
+ ts.addRange(displayParts, ts.signatureToDisplayParts(typeChecker, signature, enclosingDeclaration, flags | 64 /* WriteTypeArgumentsOfSignature */));
if (allSignatures.length > 1) {
displayParts.push(ts.spacePart());
displayParts.push(ts.punctuationPart(19 /* OpenParenToken */));
@@ -80199,7 +83060,7 @@ var ts;
ts.addRange(/*to*/ diagnostics, /*from*/ program.getOptionsDiagnostics());
}
// Emit
- program.emit();
+ program.emit(/*targetSourceFile*/ undefined, /*writeFile*/ undefined, /*cancellationToken*/ undefined, /*emitOnlyDtsFiles*/ undefined, transpileOptions.transformers);
ts.Debug.assert(outputText !== undefined, "Output generation failed");
return { outputText: outputText, diagnostics: diagnostics, sourceMapText: sourceMapText };
}
@@ -80223,7 +83084,7 @@ var ts;
return typeof o.type === "object" && !ts.forEachEntry(o.type, function (v) { return typeof v !== "number"; });
});
options = ts.clone(options);
- var _loop_5 = function (opt) {
+ var _loop_6 = function (opt) {
if (!ts.hasProperty(options, opt.name)) {
return "continue";
}
@@ -80242,7 +83103,7 @@ var ts;
};
for (var _i = 0, commandLineOptionsStringToEnum_1 = commandLineOptionsStringToEnum; _i < commandLineOptionsStringToEnum_1.length; _i++) {
var opt = commandLineOptionsStringToEnum_1[_i];
- _loop_5(opt);
+ _loop_6(opt);
}
return options;
}
@@ -80509,9 +83370,10 @@ var ts;
var formatting;
(function (formatting) {
var FormattingContext = (function () {
- function FormattingContext(sourceFile, formattingRequestKind) {
+ function FormattingContext(sourceFile, formattingRequestKind, options) {
this.sourceFile = sourceFile;
this.formattingRequestKind = formattingRequestKind;
+ this.options = options;
}
FormattingContext.prototype.updateContext = function (currentRange, currentTokenParent, nextRange, nextTokenParent, commonParent) {
ts.Debug.assert(currentRange !== undefined, "currentTokenSpan is null");
@@ -80737,9 +83599,9 @@ var ts;
}
return true;
};
+ RuleOperationContext.Any = new RuleOperationContext();
return RuleOperationContext;
}());
- RuleOperationContext.Any = new RuleOperationContext();
formatting.RuleOperationContext = RuleOperationContext;
})(formatting = ts.formatting || (ts.formatting = {}));
})(ts || (ts = {}));
@@ -80775,7 +83637,7 @@ var ts;
this.NoSpaceBeforeDot = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 23 /* DotToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
this.NoSpaceAfterDot = new formatting.Rule(formatting.RuleDescriptor.create3(23 /* DotToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
// No space before and after indexer
- this.NoSpaceBeforeOpenBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 21 /* OpenBracketToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
+ this.NoSpaceBeforeOpenBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.AnyExcept(120 /* AsyncKeyword */), 21 /* OpenBracketToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
this.NoSpaceAfterCloseBracket = new formatting.Rule(formatting.RuleDescriptor.create3(22 /* CloseBracketToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNotBeforeBlockInFunctionDeclarationContext), 8 /* Delete */));
// Place a space before open brace in a function declaration
this.FunctionOpenBraceLeftTokenRange = formatting.Shared.TokenRange.AnyIncludingMultilineComments;
@@ -80787,10 +83649,10 @@ var ts;
this.ControlOpenBraceLeftTokenRange = formatting.Shared.TokenRange.FromTokens([20 /* CloseParenToken */, 3 /* MultiLineCommentTrivia */, 81 /* DoKeyword */, 102 /* TryKeyword */, 87 /* FinallyKeyword */, 82 /* ElseKeyword */]);
this.SpaceBeforeOpenBraceInControl = new formatting.Rule(formatting.RuleDescriptor.create2(this.ControlOpenBraceLeftTokenRange, 17 /* 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(17 /* 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, 18 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsBraceWrappedContext), 2 /* Space */));
- this.NoSpaceAfterOpenBrace = new formatting.Rule(formatting.RuleDescriptor.create3(17 /* 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, 18 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
+ this.SpaceAfterOpenBrace = new formatting.Rule(formatting.RuleDescriptor.create3(17 /* OpenBraceToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabledOrUndefined("insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces"), Rules.IsBraceWrappedContext), 2 /* Space */));
+ this.SpaceBeforeCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabledOrUndefined("insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces"), Rules.IsBraceWrappedContext), 2 /* Space */));
+ this.NoSpaceAfterOpenBrace = new formatting.Rule(formatting.RuleDescriptor.create3(17 /* OpenBraceToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabled("insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces"), Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
+ this.NoSpaceBeforeCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabled("insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces"), Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
this.NoSpaceBetweenEmptyBraceBrackets = new formatting.Rule(formatting.RuleDescriptor.create1(17 /* OpenBraceToken */, 18 /* 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(17 /* OpenBraceToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsMultilineBlockContext), 4 /* NewLine */));
@@ -80817,11 +83679,12 @@ var ts;
this.SpaceAfterSubtractWhenFollowedByPredecrement = new formatting.Rule(formatting.RuleDescriptor.create1(38 /* MinusToken */, 44 /* MinusMinusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */));
this.NoSpaceBeforeComma = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 26 /* CommaToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
this.SpaceAfterCertainKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([104 /* VarKeyword */, 100 /* ThrowKeyword */, 94 /* NewKeyword */, 80 /* DeleteKeyword */, 96 /* ReturnKeyword */, 103 /* TypeOfKeyword */, 121 /* AwaitKeyword */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */));
+ this.NoSpaceAfterNewKeywordOnConstructorSignature = new formatting.Rule(formatting.RuleDescriptor.create1(94 /* NewKeyword */, 19 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsConstructorSignatureContext), 8 /* Delete */));
this.SpaceAfterLetConstInVariableDeclaration = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([110 /* LetKeyword */, 76 /* 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, 19 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsFunctionCallOrNewContext, Rules.IsPreviousTokenNotComma), 8 /* Delete */));
this.SpaceAfterFunctionInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create3(89 /* 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, 19 /* 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, 19 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsFunctionDeclContext), 8 /* Delete */));
+ this.SpaceBeforeOpenParenInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 19 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceBeforeFunctionParenthesis"), Rules.IsNonJsxSameLineTokenContext, Rules.IsFunctionDeclContext), 2 /* Space */));
+ this.NoSpaceBeforeOpenParenInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 19 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceBeforeFunctionParenthesis"), Rules.IsNonJsxSameLineTokenContext, Rules.IsFunctionDeclContext), 8 /* Delete */));
this.SpaceAfterVoidOperator = new formatting.Rule(formatting.RuleDescriptor.create3(105 /* 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(96 /* ReturnKeyword */, 25 /* SemicolonToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
// Add a space between statements. All keywords except (do,else,case) has open/close parens after them.
@@ -80836,9 +83699,8 @@ var ts;
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(123 /* ConstructorKeyword */, 19 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */));
- this.NoSpaceAfterConstructor = new formatting.Rule(formatting.RuleDescriptor.create1(123 /* ConstructorKeyword */, 19 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
+ this.SpaceAfterConstructor = new formatting.Rule(formatting.RuleDescriptor.create1(123 /* ConstructorKeyword */, 19 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceAfterConstructor"), Rules.IsNonJsxSameLineTokenContext), 2 /* Space */));
+ this.NoSpaceAfterConstructor = new formatting.Rule(formatting.RuleDescriptor.create1(123 /* ConstructorKeyword */, 19 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceAfterConstructor"), 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([128 /* ModuleKeyword */, 132 /* RequireKeyword */]), 19 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
// Add a space around certain TypeScript keywords
@@ -80881,6 +83743,58 @@ var ts;
this.NoSpaceAfterEqualInJsxAttribute = new formatting.Rule(formatting.RuleDescriptor.create3(58 /* 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, 51 /* ExclamationToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNonNullAssertionContext), 8 /* Delete */));
+ ///
+ /// Rules controlled by user options
+ ///
+ // Insert space after comma delimiter
+ this.SpaceAfterComma = new formatting.Rule(formatting.RuleDescriptor.create3(26 /* CommaToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceAfterCommaDelimiter"), Rules.IsNonJsxSameLineTokenContext, Rules.IsNonJsxElementContext, Rules.IsNextTokenNotCloseBracket), 2 /* Space */));
+ this.NoSpaceAfterComma = new formatting.Rule(formatting.RuleDescriptor.create3(26 /* CommaToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceAfterCommaDelimiter"), Rules.IsNonJsxSameLineTokenContext, Rules.IsNonJsxElementContext), 8 /* Delete */));
+ // Insert space before and after binary operators
+ this.SpaceBeforeBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.BinaryOperators), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceBeforeAndAfterBinaryOperators"), Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */));
+ this.SpaceAfterBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.BinaryOperators, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceBeforeAndAfterBinaryOperators"), Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */));
+ this.NoSpaceBeforeBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.BinaryOperators), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceBeforeAndAfterBinaryOperators"), Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 8 /* Delete */));
+ this.NoSpaceAfterBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.BinaryOperators, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceBeforeAndAfterBinaryOperators"), Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 8 /* Delete */));
+ // Insert space after keywords in control flow statements
+ this.SpaceAfterKeywordInControl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Keywords, 19 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceAfterKeywordsInControlFlowStatements"), Rules.IsControlDeclContext), 2 /* Space */));
+ this.NoSpaceAfterKeywordInControl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Keywords, 19 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceAfterKeywordsInControlFlowStatements"), Rules.IsControlDeclContext), 8 /* Delete */));
+ // Open Brace braces after function
+ // TypeScript: Function can have return types, which can be made of tons of different token kinds
+ this.NewLineBeforeOpenBraceInFunction = new formatting.Rule(formatting.RuleDescriptor.create2(this.FunctionOpenBraceLeftTokenRange, 17 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("placeOpenBraceOnNewLineForFunctions"), Rules.IsFunctionDeclContext, Rules.IsBeforeMultilineBlockContext), 4 /* NewLine */), 1 /* CanDeleteNewLines */);
+ // Open Brace braces after TypeScript module/class/interface
+ this.NewLineBeforeOpenBraceInTypeScriptDeclWithBlock = new formatting.Rule(formatting.RuleDescriptor.create2(this.TypeScriptOpenBraceLeftTokenRange, 17 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("placeOpenBraceOnNewLineForFunctions"), Rules.IsTypeScriptDeclWithBlockContext, Rules.IsBeforeMultilineBlockContext), 4 /* NewLine */), 1 /* CanDeleteNewLines */);
+ // Open Brace braces after control block
+ this.NewLineBeforeOpenBraceInControl = new formatting.Rule(formatting.RuleDescriptor.create2(this.ControlOpenBraceLeftTokenRange, 17 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("placeOpenBraceOnNewLineForControlBlocks"), Rules.IsControlDeclContext, Rules.IsBeforeMultilineBlockContext), 4 /* NewLine */), 1 /* CanDeleteNewLines */);
+ // Insert space after semicolon in for statement
+ this.SpaceAfterSemicolonInFor = new formatting.Rule(formatting.RuleDescriptor.create3(25 /* SemicolonToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceAfterSemicolonInForStatements"), Rules.IsNonJsxSameLineTokenContext, Rules.IsForContext), 2 /* Space */));
+ this.NoSpaceAfterSemicolonInFor = new formatting.Rule(formatting.RuleDescriptor.create3(25 /* SemicolonToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceAfterSemicolonInForStatements"), Rules.IsNonJsxSameLineTokenContext, Rules.IsForContext), 8 /* Delete */));
+ // Insert space after opening and before closing nonempty parenthesis
+ this.SpaceAfterOpenParen = new formatting.Rule(formatting.RuleDescriptor.create3(19 /* OpenParenToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"), Rules.IsNonJsxSameLineTokenContext), 2 /* Space */));
+ this.SpaceBeforeCloseParen = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 20 /* CloseParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"), Rules.IsNonJsxSameLineTokenContext), 2 /* Space */));
+ this.NoSpaceBetweenParens = new formatting.Rule(formatting.RuleDescriptor.create1(19 /* OpenParenToken */, 20 /* CloseParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
+ this.NoSpaceAfterOpenParen = new formatting.Rule(formatting.RuleDescriptor.create3(19 /* OpenParenToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"), Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
+ this.NoSpaceBeforeCloseParen = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 20 /* CloseParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"), Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
+ // Insert space after opening and before closing nonempty brackets
+ this.SpaceAfterOpenBracket = new formatting.Rule(formatting.RuleDescriptor.create3(21 /* OpenBracketToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets"), Rules.IsNonJsxSameLineTokenContext), 2 /* Space */));
+ this.SpaceBeforeCloseBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 22 /* CloseBracketToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets"), Rules.IsNonJsxSameLineTokenContext), 2 /* Space */));
+ this.NoSpaceBetweenBrackets = new formatting.Rule(formatting.RuleDescriptor.create1(21 /* OpenBracketToken */, 22 /* CloseBracketToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
+ this.NoSpaceAfterOpenBracket = new formatting.Rule(formatting.RuleDescriptor.create3(21 /* OpenBracketToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets"), Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
+ this.NoSpaceBeforeCloseBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 22 /* CloseBracketToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets"), Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
+ // Insert space after opening and before closing template string braces
+ this.NoSpaceAfterTemplateHeadAndMiddle = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([14 /* TemplateHead */, 15 /* TemplateMiddle */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces"), Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
+ this.SpaceAfterTemplateHeadAndMiddle = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([14 /* TemplateHead */, 15 /* TemplateMiddle */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces"), Rules.IsNonJsxSameLineTokenContext), 2 /* Space */));
+ this.NoSpaceBeforeTemplateMiddleAndTail = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([15 /* TemplateMiddle */, 16 /* TemplateTail */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces"), Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
+ this.SpaceBeforeTemplateMiddleAndTail = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([15 /* TemplateMiddle */, 16 /* TemplateTail */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces"), Rules.IsNonJsxSameLineTokenContext), 2 /* Space */));
+ // No space after { and before } in JSX expression
+ this.NoSpaceAfterOpenBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create3(17 /* OpenBraceToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces"), Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 8 /* Delete */));
+ this.SpaceAfterOpenBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create3(17 /* OpenBraceToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces"), Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 2 /* Space */));
+ this.NoSpaceBeforeCloseBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces"), Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 8 /* Delete */));
+ this.SpaceBeforeCloseBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces"), Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 2 /* Space */));
+ // Insert space after function keyword for anonymous functions
+ this.SpaceAfterAnonymousFunctionKeyword = new formatting.Rule(formatting.RuleDescriptor.create1(89 /* FunctionKeyword */, 19 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceAfterFunctionKeywordForAnonymousFunctions"), Rules.IsFunctionDeclContext), 2 /* Space */));
+ this.NoSpaceAfterAnonymousFunctionKeyword = new formatting.Rule(formatting.RuleDescriptor.create1(89 /* FunctionKeyword */, 19 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceAfterFunctionKeywordForAnonymousFunctions"), Rules.IsFunctionDeclContext), 8 /* Delete */));
+ // No space after type assertion
+ this.NoSpaceAfterTypeAssertion = new formatting.Rule(formatting.RuleDescriptor.create3(29 /* GreaterThanToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionDisabledOrUndefined("insertSpaceAfterTypeAssertion"), Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeAssertionContext), 8 /* Delete */));
+ this.SpaceAfterTypeAssertion = new formatting.Rule(formatting.RuleDescriptor.create3(29 /* GreaterThanToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsOptionEnabled("insertSpaceAfterTypeAssertion"), Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeAssertionContext), 2 /* Space */));
// These rules are higher in priority than user-configurable rules.
this.HighPriorityCommonRules = [
this.IgnoreBeforeComment, this.IgnoreAfterLineComment,
@@ -80926,7 +83840,26 @@ var ts;
this.SpaceBeforeAt,
this.NoSpaceAfterAt,
this.SpaceAfterDecorator,
- this.NoSpaceBeforeNonNullAssertionOperator
+ this.NoSpaceBeforeNonNullAssertionOperator,
+ this.NoSpaceAfterNewKeywordOnConstructorSignature
+ ];
+ // These rules are applied after high priority rules.
+ this.UserConfigurableRules = [
+ this.SpaceAfterConstructor, this.NoSpaceAfterConstructor,
+ this.SpaceAfterComma, this.NoSpaceAfterComma,
+ this.SpaceAfterAnonymousFunctionKeyword, this.NoSpaceAfterAnonymousFunctionKeyword,
+ this.SpaceAfterKeywordInControl, this.NoSpaceAfterKeywordInControl,
+ this.SpaceAfterOpenParen, this.SpaceBeforeCloseParen, this.NoSpaceBetweenParens, this.NoSpaceAfterOpenParen, this.NoSpaceBeforeCloseParen,
+ this.SpaceAfterOpenBracket, this.SpaceBeforeCloseBracket, this.NoSpaceBetweenBrackets, this.NoSpaceAfterOpenBracket, this.NoSpaceBeforeCloseBracket,
+ this.SpaceAfterOpenBrace, this.SpaceBeforeCloseBrace, this.NoSpaceBetweenEmptyBraceBrackets, this.NoSpaceAfterOpenBrace, this.NoSpaceBeforeCloseBrace,
+ this.SpaceAfterTemplateHeadAndMiddle, this.SpaceBeforeTemplateMiddleAndTail, this.NoSpaceAfterTemplateHeadAndMiddle, this.NoSpaceBeforeTemplateMiddleAndTail,
+ this.SpaceAfterOpenBraceInJsxExpression, this.SpaceBeforeCloseBraceInJsxExpression, this.NoSpaceAfterOpenBraceInJsxExpression, this.NoSpaceBeforeCloseBraceInJsxExpression,
+ this.SpaceAfterSemicolonInFor, this.NoSpaceAfterSemicolonInFor,
+ this.SpaceBeforeBinaryOperator, this.SpaceAfterBinaryOperator, this.NoSpaceBeforeBinaryOperator, this.NoSpaceAfterBinaryOperator,
+ this.SpaceBeforeOpenParenInFuncDecl, this.NoSpaceBeforeOpenParenInFuncDecl,
+ this.NewLineBeforeOpenBraceInControl,
+ this.NewLineBeforeOpenBraceInFunction, this.NewLineBeforeOpenBraceInTypeScriptDeclWithBlock,
+ this.SpaceAfterTypeAssertion, this.NoSpaceAfterTypeAssertion
];
// These rules are lower in priority than user-configurable rules.
this.LowPriorityCommonRules = [
@@ -80938,58 +83871,6 @@ var ts;
this.SpaceAfterSemicolon,
this.SpaceBetweenStatements, this.SpaceAfterTryFinally
];
- ///
- /// Rules controlled by user options
- ///
- // Insert space after comma delimiter
- this.SpaceAfterComma = new formatting.Rule(formatting.RuleDescriptor.create3(26 /* CommaToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNonJsxElementContext, Rules.IsNextTokenNotCloseBracket), 2 /* Space */));
- this.NoSpaceAfterComma = new formatting.Rule(formatting.RuleDescriptor.create3(26 /* CommaToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNonJsxElementContext), 8 /* Delete */));
- // Insert space before and after binary operators
- this.SpaceBeforeBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.BinaryOperators), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */));
- this.SpaceAfterBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.BinaryOperators, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */));
- this.NoSpaceBeforeBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.BinaryOperators), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 8 /* Delete */));
- this.NoSpaceAfterBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.BinaryOperators, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 8 /* Delete */));
- // Insert space after keywords in control flow statements
- this.SpaceAfterKeywordInControl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Keywords, 19 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext), 2 /* Space */));
- this.NoSpaceAfterKeywordInControl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Keywords, 19 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext), 8 /* Delete */));
- // Open Brace braces after function
- // TypeScript: Function can have return types, which can be made of tons of different token kinds
- this.NewLineBeforeOpenBraceInFunction = new formatting.Rule(formatting.RuleDescriptor.create2(this.FunctionOpenBraceLeftTokenRange, 17 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext, Rules.IsBeforeMultilineBlockContext), 4 /* NewLine */), 1 /* CanDeleteNewLines */);
- // Open Brace braces after TypeScript module/class/interface
- this.NewLineBeforeOpenBraceInTypeScriptDeclWithBlock = new formatting.Rule(formatting.RuleDescriptor.create2(this.TypeScriptOpenBraceLeftTokenRange, 17 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsTypeScriptDeclWithBlockContext, Rules.IsBeforeMultilineBlockContext), 4 /* NewLine */), 1 /* CanDeleteNewLines */);
- // Open Brace braces after control block
- this.NewLineBeforeOpenBraceInControl = new formatting.Rule(formatting.RuleDescriptor.create2(this.ControlOpenBraceLeftTokenRange, 17 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext, Rules.IsBeforeMultilineBlockContext), 4 /* NewLine */), 1 /* CanDeleteNewLines */);
- // Insert space after semicolon in for statement
- this.SpaceAfterSemicolonInFor = new formatting.Rule(formatting.RuleDescriptor.create3(25 /* SemicolonToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsForContext), 2 /* Space */));
- this.NoSpaceAfterSemicolonInFor = new formatting.Rule(formatting.RuleDescriptor.create3(25 /* SemicolonToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsForContext), 8 /* Delete */));
- // Insert space after opening and before closing nonempty parenthesis
- this.SpaceAfterOpenParen = new formatting.Rule(formatting.RuleDescriptor.create3(19 /* OpenParenToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */));
- this.SpaceBeforeCloseParen = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 20 /* CloseParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */));
- this.NoSpaceBetweenParens = new formatting.Rule(formatting.RuleDescriptor.create1(19 /* OpenParenToken */, 20 /* CloseParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
- this.NoSpaceAfterOpenParen = new formatting.Rule(formatting.RuleDescriptor.create3(19 /* OpenParenToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
- this.NoSpaceBeforeCloseParen = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 20 /* CloseParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
- // Insert space after opening and before closing nonempty brackets
- this.SpaceAfterOpenBracket = new formatting.Rule(formatting.RuleDescriptor.create3(21 /* OpenBracketToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */));
- this.SpaceBeforeCloseBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 22 /* CloseBracketToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */));
- this.NoSpaceBetweenBrackets = new formatting.Rule(formatting.RuleDescriptor.create1(21 /* OpenBracketToken */, 22 /* CloseBracketToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
- this.NoSpaceAfterOpenBracket = new formatting.Rule(formatting.RuleDescriptor.create3(21 /* OpenBracketToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
- this.NoSpaceBeforeCloseBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 22 /* CloseBracketToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
- // Insert space after opening and before closing template string braces
- this.NoSpaceAfterTemplateHeadAndMiddle = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([14 /* TemplateHead */, 15 /* TemplateMiddle */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
- this.SpaceAfterTemplateHeadAndMiddle = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([14 /* TemplateHead */, 15 /* TemplateMiddle */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */));
- this.NoSpaceBeforeTemplateMiddleAndTail = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([15 /* TemplateMiddle */, 16 /* TemplateTail */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */));
- this.SpaceBeforeTemplateMiddleAndTail = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([15 /* TemplateMiddle */, 16 /* TemplateTail */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */));
- // No space after { and before } in JSX expression
- this.NoSpaceAfterOpenBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create3(17 /* OpenBraceToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 8 /* Delete */));
- this.SpaceAfterOpenBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create3(17 /* OpenBraceToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 2 /* Space */));
- this.NoSpaceBeforeCloseBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 8 /* Delete */));
- this.SpaceBeforeCloseBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 2 /* Space */));
- // Insert space after function keyword for anonymous functions
- this.SpaceAfterAnonymousFunctionKeyword = new formatting.Rule(formatting.RuleDescriptor.create1(89 /* FunctionKeyword */, 19 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 2 /* Space */));
- this.NoSpaceAfterAnonymousFunctionKeyword = new formatting.Rule(formatting.RuleDescriptor.create1(89 /* FunctionKeyword */, 19 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 8 /* Delete */));
- // No space after type assertion
- this.NoSpaceAfterTypeAssertion = new formatting.Rule(formatting.RuleDescriptor.create3(29 /* GreaterThanToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeAssertionContext), 8 /* Delete */));
- this.SpaceAfterTypeAssertion = new formatting.Rule(formatting.RuleDescriptor.create3(29 /* GreaterThanToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeAssertionContext), 2 /* Space */));
}
Rules.prototype.getRuleName = function (rule) {
var o = this;
@@ -81003,6 +83884,18 @@ var ts;
///
/// Contexts
///
+ Rules.IsOptionEnabled = function (optionName) {
+ return function (context) { return context.options && context.options.hasOwnProperty(optionName) && !!context.options[optionName]; };
+ };
+ Rules.IsOptionDisabled = function (optionName) {
+ return function (context) { return context.options && context.options.hasOwnProperty(optionName) && !context.options[optionName]; };
+ };
+ Rules.IsOptionDisabledOrUndefined = function (optionName) {
+ return function (context) { return !context.options || !context.options.hasOwnProperty(optionName) || !context.options[optionName]; };
+ };
+ Rules.IsOptionEnabledOrUndefined = function (optionName) {
+ return function (context) { return !context.options || !context.options.hasOwnProperty(optionName) || !!context.options[optionName]; };
+ };
Rules.IsForContext = function (context) {
return context.contextNode.kind === 214 /* ForStatement */;
};
@@ -81120,7 +84013,7 @@ var ts;
// case SyntaxKind.ConstructorDeclaration:
// case SyntaxKind.SimpleArrowFunctionExpression:
// case SyntaxKind.ParenthesizedArrowFunctionExpression:
- case 230 /* InterfaceDeclaration */:
+ case 230 /* InterfaceDeclaration */:// This one is not truly a function, but for formatting purposes, it acts just like one
return true;
}
return false;
@@ -81252,6 +84145,9 @@ var ts;
Rules.IsObjectTypeContext = function (context) {
return context.contextNode.kind === 163 /* TypeLiteral */; // && context.contextNode.parent.kind !== SyntaxKind.InterfaceDeclaration;
};
+ Rules.IsConstructorSignatureContext = function (context) {
+ return context.contextNode.kind === 156 /* ConstructSignature */;
+ };
Rules.IsTypeArgumentOrParameterOrAssertion = function (token, parent) {
if (token.kind !== 27 /* LessThanToken */ && token.kind !== 29 /* GreaterThanToken */) {
return false;
@@ -81336,8 +84232,7 @@ var ts;
};
RulesMap.prototype.FillRule = function (rule, rulesBucketConstructionStateList) {
var _this = this;
- var specificRule = rule.Descriptor.LeftTokenRange !== formatting.Shared.TokenRange.Any &&
- rule.Descriptor.RightTokenRange !== formatting.Shared.TokenRange.Any;
+ var specificRule = rule.Descriptor.LeftTokenRange.isSpecific() && rule.Descriptor.RightTokenRange.isSpecific();
rule.Descriptor.LeftTokenRange.GetTokens().forEach(function (left) {
rule.Descriptor.RightTokenRange.GetTokens().forEach(function (right) {
var rulesBucketIndex = _this.GetRuleBucketIndex(left, right);
@@ -81462,27 +84357,14 @@ var ts;
(function (formatting) {
var Shared;
(function (Shared) {
- var TokenRangeAccess = (function () {
- function TokenRangeAccess(from, to, except) {
- this.tokens = [];
- for (var token = from; token <= to; token++) {
- if (ts.indexOf(except, token) < 0) {
- this.tokens.push(token);
- }
- }
- }
- TokenRangeAccess.prototype.GetTokens = function () {
- return this.tokens;
- };
- TokenRangeAccess.prototype.Contains = function (token) {
- return this.tokens.indexOf(token) >= 0;
- };
- return TokenRangeAccess;
- }());
- Shared.TokenRangeAccess = TokenRangeAccess;
+ var allTokens = [];
+ for (var token = 0 /* FirstToken */; token <= 142 /* LastToken */; token++) {
+ allTokens.push(token);
+ }
var TokenValuesAccess = (function () {
- function TokenValuesAccess(tks) {
- this.tokens = tks && tks.length ? tks : [];
+ function TokenValuesAccess(tokens) {
+ if (tokens === void 0) { tokens = []; }
+ this.tokens = tokens;
}
TokenValuesAccess.prototype.GetTokens = function () {
return this.tokens;
@@ -81490,9 +84372,9 @@ var ts;
TokenValuesAccess.prototype.Contains = function (token) {
return this.tokens.indexOf(token) >= 0;
};
+ TokenValuesAccess.prototype.isSpecific = function () { return true; };
return TokenValuesAccess;
}());
- Shared.TokenValuesAccess = TokenValuesAccess;
var TokenSingleValueAccess = (function () {
function TokenSingleValueAccess(token) {
this.token = token;
@@ -81503,18 +84385,14 @@ var ts;
TokenSingleValueAccess.prototype.Contains = function (tokenValue) {
return tokenValue === this.token;
};
+ TokenSingleValueAccess.prototype.isSpecific = function () { return true; };
return TokenSingleValueAccess;
}());
- Shared.TokenSingleValueAccess = TokenSingleValueAccess;
var TokenAllAccess = (function () {
function TokenAllAccess() {
}
TokenAllAccess.prototype.GetTokens = function () {
- var result = [];
- for (var token = 0 /* FirstToken */; token <= 142 /* LastToken */; token++) {
- result.push(token);
- }
- return result;
+ return allTokens;
};
TokenAllAccess.prototype.Contains = function () {
return true;
@@ -81522,51 +84400,80 @@ var ts;
TokenAllAccess.prototype.toString = function () {
return "[allTokens]";
};
+ TokenAllAccess.prototype.isSpecific = function () { return false; };
return TokenAllAccess;
}());
- Shared.TokenAllAccess = TokenAllAccess;
- var TokenRange = (function () {
- function TokenRange(tokenAccess) {
- this.tokenAccess = tokenAccess;
+ var TokenAllExceptAccess = (function () {
+ function TokenAllExceptAccess(except) {
+ this.except = except;
}
- TokenRange.FromToken = function (token) {
- return new TokenRange(new TokenSingleValueAccess(token));
+ TokenAllExceptAccess.prototype.GetTokens = function () {
+ var _this = this;
+ return allTokens.filter(function (t) { return t !== _this.except; });
};
- TokenRange.FromTokens = function (tokens) {
- return new TokenRange(new TokenValuesAccess(tokens));
- };
- TokenRange.FromRange = function (f, to, except) {
- if (except === void 0) { except = []; }
- return new TokenRange(new TokenRangeAccess(f, to, except));
+ TokenAllExceptAccess.prototype.Contains = function (token) {
+ return token !== this.except;
};
- TokenRange.AllTokens = function () {
- return new TokenRange(new TokenAllAccess());
- };
- TokenRange.prototype.GetTokens = function () {
- return this.tokenAccess.GetTokens();
- };
- TokenRange.prototype.Contains = function (token) {
- return this.tokenAccess.Contains(token);
- };
- TokenRange.prototype.toString = function () {
- return this.tokenAccess.toString();
- };
- return TokenRange;
+ TokenAllExceptAccess.prototype.isSpecific = function () { return false; };
+ return TokenAllExceptAccess;
}());
- TokenRange.Any = TokenRange.AllTokens();
- TokenRange.AnyIncludingMultilineComments = TokenRange.FromTokens(TokenRange.Any.GetTokens().concat([3 /* MultiLineCommentTrivia */]));
- TokenRange.Keywords = TokenRange.FromRange(72 /* FirstKeyword */, 142 /* LastKeyword */);
- TokenRange.BinaryOperators = TokenRange.FromRange(27 /* FirstBinaryOperator */, 70 /* LastBinaryOperator */);
- TokenRange.BinaryKeywordOperators = TokenRange.FromTokens([92 /* InKeyword */, 93 /* InstanceOfKeyword */, 142 /* OfKeyword */, 118 /* AsKeyword */, 126 /* IsKeyword */]);
- TokenRange.UnaryPrefixOperators = TokenRange.FromTokens([43 /* PlusPlusToken */, 44 /* MinusMinusToken */, 52 /* TildeToken */, 51 /* ExclamationToken */]);
- TokenRange.UnaryPrefixExpressions = TokenRange.FromTokens([8 /* NumericLiteral */, 71 /* Identifier */, 19 /* OpenParenToken */, 21 /* OpenBracketToken */, 17 /* OpenBraceToken */, 99 /* ThisKeyword */, 94 /* NewKeyword */]);
- TokenRange.UnaryPreincrementExpressions = TokenRange.FromTokens([71 /* Identifier */, 19 /* OpenParenToken */, 99 /* ThisKeyword */, 94 /* NewKeyword */]);
- TokenRange.UnaryPostincrementExpressions = TokenRange.FromTokens([71 /* Identifier */, 20 /* CloseParenToken */, 22 /* CloseBracketToken */, 94 /* NewKeyword */]);
- TokenRange.UnaryPredecrementExpressions = TokenRange.FromTokens([71 /* Identifier */, 19 /* OpenParenToken */, 99 /* ThisKeyword */, 94 /* NewKeyword */]);
- TokenRange.UnaryPostdecrementExpressions = TokenRange.FromTokens([71 /* Identifier */, 20 /* CloseParenToken */, 22 /* CloseBracketToken */, 94 /* NewKeyword */]);
- TokenRange.Comments = TokenRange.FromTokens([2 /* SingleLineCommentTrivia */, 3 /* MultiLineCommentTrivia */]);
- TokenRange.TypeNames = TokenRange.FromTokens([71 /* Identifier */, 133 /* NumberKeyword */, 136 /* StringKeyword */, 122 /* BooleanKeyword */, 137 /* SymbolKeyword */, 105 /* VoidKeyword */, 119 /* AnyKeyword */]);
- Shared.TokenRange = TokenRange;
+ var TokenRange;
+ (function (TokenRange) {
+ function FromToken(token) {
+ return new TokenSingleValueAccess(token);
+ }
+ TokenRange.FromToken = FromToken;
+ function FromTokens(tokens) {
+ return new TokenValuesAccess(tokens);
+ }
+ TokenRange.FromTokens = FromTokens;
+ function FromRange(from, to, except) {
+ if (except === void 0) { except = []; }
+ var tokens = [];
+ for (var token = from; token <= to; token++) {
+ if (ts.indexOf(except, token) < 0) {
+ tokens.push(token);
+ }
+ }
+ return new TokenValuesAccess(tokens);
+ }
+ TokenRange.FromRange = FromRange;
+ function AnyExcept(token) {
+ return new TokenAllExceptAccess(token);
+ }
+ TokenRange.AnyExcept = AnyExcept;
+ TokenRange.Any = new TokenAllAccess();
+ TokenRange.AnyIncludingMultilineComments = TokenRange.FromTokens(allTokens.concat([3 /* MultiLineCommentTrivia */]));
+ TokenRange.Keywords = TokenRange.FromRange(72 /* FirstKeyword */, 142 /* LastKeyword */);
+ TokenRange.BinaryOperators = TokenRange.FromRange(27 /* FirstBinaryOperator */, 70 /* LastBinaryOperator */);
+ TokenRange.BinaryKeywordOperators = TokenRange.FromTokens([
+ 92 /* InKeyword */, 93 /* InstanceOfKeyword */, 142 /* OfKeyword */, 118 /* AsKeyword */, 126 /* IsKeyword */
+ ]);
+ TokenRange.UnaryPrefixOperators = TokenRange.FromTokens([
+ 43 /* PlusPlusToken */, 44 /* MinusMinusToken */, 52 /* TildeToken */, 51 /* ExclamationToken */
+ ]);
+ TokenRange.UnaryPrefixExpressions = TokenRange.FromTokens([
+ 8 /* NumericLiteral */, 71 /* Identifier */, 19 /* OpenParenToken */, 21 /* OpenBracketToken */,
+ 17 /* OpenBraceToken */, 99 /* ThisKeyword */, 94 /* NewKeyword */
+ ]);
+ TokenRange.UnaryPreincrementExpressions = TokenRange.FromTokens([
+ 71 /* Identifier */, 19 /* OpenParenToken */, 99 /* ThisKeyword */, 94 /* NewKeyword */
+ ]);
+ TokenRange.UnaryPostincrementExpressions = TokenRange.FromTokens([
+ 71 /* Identifier */, 20 /* CloseParenToken */, 22 /* CloseBracketToken */, 94 /* NewKeyword */
+ ]);
+ TokenRange.UnaryPredecrementExpressions = TokenRange.FromTokens([
+ 71 /* Identifier */, 19 /* OpenParenToken */, 99 /* ThisKeyword */, 94 /* NewKeyword */
+ ]);
+ TokenRange.UnaryPostdecrementExpressions = TokenRange.FromTokens([
+ 71 /* Identifier */, 20 /* CloseParenToken */, 22 /* CloseBracketToken */, 94 /* NewKeyword */
+ ]);
+ TokenRange.Comments = TokenRange.FromTokens([2 /* SingleLineCommentTrivia */, 3 /* MultiLineCommentTrivia */]);
+ TokenRange.TypeNames = TokenRange.FromTokens([
+ 71 /* Identifier */, 133 /* NumberKeyword */, 136 /* StringKeyword */, 122 /* BooleanKeyword */,
+ 137 /* SymbolKeyword */, 105 /* VoidKeyword */, 119 /* AnyKeyword */
+ ]);
+ })(TokenRange = Shared.TokenRange || (Shared.TokenRange = {}));
})(Shared = formatting.Shared || (formatting.Shared = {}));
})(formatting = ts.formatting || (ts.formatting = {}));
})(ts || (ts = {}));
@@ -81591,6 +84498,8 @@ var ts;
var RulesProvider = (function () {
function RulesProvider() {
this.globalRules = new formatting.Rules();
+ var activeRules = this.globalRules.HighPriorityCommonRules.slice(0).concat(this.globalRules.UserConfigurableRules).concat(this.globalRules.LowPriorityCommonRules);
+ this.rulesMap = formatting.RulesMap.create(activeRules);
}
RulesProvider.prototype.getRuleName = function (rule) {
return this.globalRules.getRuleName(rule);
@@ -81606,123 +84515,9 @@ var ts;
};
RulesProvider.prototype.ensureUpToDate = function (options) {
if (!this.options || !ts.compareDataObjects(this.options, options)) {
- var activeRules = this.createActiveRules(options);
- var rulesMap = formatting.RulesMap.create(activeRules);
- this.activeRules = activeRules;
- this.rulesMap = rulesMap;
this.options = ts.clone(options);
}
};
- 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);
- }
- else {
- rules.push(this.globalRules.NoSpaceAfterComma);
- }
- if (options.insertSpaceAfterFunctionKeywordForAnonymousFunctions) {
- rules.push(this.globalRules.SpaceAfterAnonymousFunctionKeyword);
- }
- else {
- rules.push(this.globalRules.NoSpaceAfterAnonymousFunctionKeyword);
- }
- if (options.insertSpaceAfterKeywordsInControlFlowStatements) {
- rules.push(this.globalRules.SpaceAfterKeywordInControl);
- }
- else {
- rules.push(this.globalRules.NoSpaceAfterKeywordInControl);
- }
- if (options.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis) {
- rules.push(this.globalRules.SpaceAfterOpenParen);
- rules.push(this.globalRules.SpaceBeforeCloseParen);
- rules.push(this.globalRules.NoSpaceBetweenParens);
- }
- else {
- rules.push(this.globalRules.NoSpaceAfterOpenParen);
- rules.push(this.globalRules.NoSpaceBeforeCloseParen);
- rules.push(this.globalRules.NoSpaceBetweenParens);
- }
- if (options.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets) {
- rules.push(this.globalRules.SpaceAfterOpenBracket);
- rules.push(this.globalRules.SpaceBeforeCloseBracket);
- rules.push(this.globalRules.NoSpaceBetweenBrackets);
- }
- else {
- rules.push(this.globalRules.NoSpaceAfterOpenBracket);
- rules.push(this.globalRules.NoSpaceBeforeCloseBracket);
- rules.push(this.globalRules.NoSpaceBetweenBrackets);
- }
- // The default value of InsertSpaceAfterOpeningAndBeforeClosingNonemptyBraces is true
- // so if the option is undefined, we should treat it as true as well
- if (options.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces !== false) {
- rules.push(this.globalRules.SpaceAfterOpenBrace);
- rules.push(this.globalRules.SpaceBeforeCloseBrace);
- rules.push(this.globalRules.NoSpaceBetweenEmptyBraceBrackets);
- }
- else {
- rules.push(this.globalRules.NoSpaceAfterOpenBrace);
- rules.push(this.globalRules.NoSpaceBeforeCloseBrace);
- rules.push(this.globalRules.NoSpaceBetweenEmptyBraceBrackets);
- }
- if (options.insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces) {
- rules.push(this.globalRules.SpaceAfterTemplateHeadAndMiddle);
- rules.push(this.globalRules.SpaceBeforeTemplateMiddleAndTail);
- }
- else {
- rules.push(this.globalRules.NoSpaceAfterTemplateHeadAndMiddle);
- rules.push(this.globalRules.NoSpaceBeforeTemplateMiddleAndTail);
- }
- if (options.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces) {
- rules.push(this.globalRules.SpaceAfterOpenBraceInJsxExpression);
- rules.push(this.globalRules.SpaceBeforeCloseBraceInJsxExpression);
- }
- else {
- rules.push(this.globalRules.NoSpaceAfterOpenBraceInJsxExpression);
- rules.push(this.globalRules.NoSpaceBeforeCloseBraceInJsxExpression);
- }
- if (options.insertSpaceAfterSemicolonInForStatements) {
- rules.push(this.globalRules.SpaceAfterSemicolonInFor);
- }
- else {
- rules.push(this.globalRules.NoSpaceAfterSemicolonInFor);
- }
- if (options.insertSpaceBeforeAndAfterBinaryOperators) {
- rules.push(this.globalRules.SpaceBeforeBinaryOperator);
- rules.push(this.globalRules.SpaceAfterBinaryOperator);
- }
- else {
- 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);
- }
- if (options.placeOpenBraceOnNewLineForFunctions) {
- rules.push(this.globalRules.NewLineBeforeOpenBraceInFunction);
- rules.push(this.globalRules.NewLineBeforeOpenBraceInTypeScriptDeclWithBlock);
- }
- if (options.insertSpaceAfterTypeAssertion) {
- rules.push(this.globalRules.SpaceAfterTypeAssertion);
- }
- else {
- rules.push(this.globalRules.NoSpaceAfterTypeAssertion);
- }
- rules = rules.concat(this.globalRules.LowPriorityCommonRules);
- return rules;
- };
return RulesProvider;
}());
formatting.RulesProvider = RulesProvider;
@@ -81976,7 +84771,7 @@ var ts;
}
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 formattingContext = new formatting.FormattingContext(sourceFile, requestKind, options);
var previousRangeHasError;
var previousRange;
var previousParent;
@@ -82073,7 +84868,7 @@ var ts;
// falls through
case 149 /* PropertyDeclaration */:
case 146 /* Parameter */:
- return node.name.kind;
+ return ts.getNameOfDeclaration(node).kind;
}
}
function getDynamicIndentation(node, nodeStartLine, indentation, delta) {
@@ -82971,9 +85766,7 @@ var ts;
if (node.kind === 20 /* CloseParenToken */) {
return -1 /* Unknown */;
}
- if (node.parent && (node.parent.kind === 181 /* CallExpression */ ||
- node.parent.kind === 182 /* NewExpression */) &&
- node.parent.expression !== node) {
+ if (node.parent && ts.isCallOrNewExpression(node.parent) && node.parent.expression !== node) {
var fullCallOrNewExpression = node.parent.expression;
var startingExpression = getStartingExpression(fullCallOrNewExpression);
if (fullCallOrNewExpression === startingExpression) {
@@ -83287,7 +86080,7 @@ var ts;
return this;
}
if (index !== containingList.length - 1) {
- var nextToken = ts.getTokenAtPosition(sourceFile, node.end);
+ var nextToken = ts.getTokenAtPosition(sourceFile, node.end, /*includeJsDocComment*/ false);
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);
@@ -83299,7 +86092,7 @@ var ts;
}
}
else {
- var previousToken = ts.getTokenAtPosition(sourceFile, containingList[index - 1].end);
+ var previousToken = ts.getTokenAtPosition(sourceFile, containingList[index - 1].end, /*includeJsDocComment*/ false);
if (previousToken && isSeparator(node, previousToken)) {
this.deleteNodeRange(sourceFile, previousToken, node);
}
@@ -83376,7 +86169,7 @@ var ts;
if (index !== containingList.length - 1) {
// any element except the last one
// use next sibling as an anchor
- var nextToken = ts.getTokenAtPosition(sourceFile, after.end);
+ var nextToken = ts.getTokenAtPosition(sourceFile, after.end, /*includeJsDocComment*/ false);
if (nextToken && isSeparator(after, nextToken)) {
// for list
// a, b, c
@@ -83567,7 +86360,7 @@ var ts;
}());
textChanges.ChangeTracker = ChangeTracker;
function getNonformattedText(node, sourceFile, newLine) {
- var options = { newLine: newLine, target: sourceFile.languageVersion };
+ var options = { newLine: newLine, target: sourceFile && sourceFile.languageVersion };
var writer = new Writer(ts.getNewLineCharacter(options));
var printer = ts.createPrinter(options, writer);
printer.writeNode(3 /* Unspecified */, node, sourceFile, writer);
@@ -83596,27 +86389,8 @@ var ts;
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 visited = ts.visitEachChild(node, assignPositionsToNode, ts.nullTransformationContext, assignPositionsToNodeArray, assignPositionsToNode);
// create proxy node for non synthesized nodes
var newNode = ts.nodeIsSynthesized(visited)
? visited
@@ -83661,6 +86435,16 @@ var ts;
setEnd(nodes, _this.lastNonTriviaPosition);
}
};
+ this.onBeforeEmitToken = function (node) {
+ if (node) {
+ setPos(node, _this.lastNonTriviaPosition);
+ }
+ };
+ this.onAfterEmitToken = function (node) {
+ if (node) {
+ setEnd(node, _this.lastNonTriviaPosition);
+ }
+ };
}
Writer.prototype.setLastNonTriviaPosition = function (s, force) {
if (force || !isTrivia(s)) {
@@ -83729,14 +86513,14 @@ var ts;
var codefix;
(function (codefix) {
var codeFixes = [];
- function registerCodeFix(action) {
- ts.forEach(action.errorCodes, function (error) {
+ function registerCodeFix(codeFix) {
+ ts.forEach(codeFix.errorCodes, function (error) {
var fixes = codeFixes[error];
if (!fixes) {
fixes = [];
codeFixes[error] = fixes;
}
- fixes.push(action);
+ fixes.push(codeFix);
});
}
codefix.registerCodeFix = registerCodeFix;
@@ -83761,6 +86545,45 @@ var ts;
/* @internal */
var ts;
(function (ts) {
+ var refactor;
+ (function (refactor_1) {
+ // A map with the refactor code as key, the refactor itself as value
+ // e.g. nonSuggestableRefactors[refactorCode] -> the refactor you want
+ var refactors = ts.createMap();
+ function registerRefactor(refactor) {
+ refactors.set(refactor.name, refactor);
+ }
+ refactor_1.registerRefactor = registerRefactor;
+ function getApplicableRefactors(context) {
+ var results;
+ var refactorList = [];
+ refactors.forEach(function (refactor) {
+ refactorList.push(refactor);
+ });
+ for (var _i = 0, refactorList_1 = refactorList; _i < refactorList_1.length; _i++) {
+ var refactor_2 = refactorList_1[_i];
+ if (context.cancellationToken && context.cancellationToken.isCancellationRequested()) {
+ return results;
+ }
+ var infos = refactor_2.getAvailableActions(context);
+ if (infos && infos.length) {
+ (_a = (results || (results = []))).push.apply(_a, infos);
+ }
+ }
+ return results;
+ var _a;
+ }
+ refactor_1.getApplicableRefactors = getApplicableRefactors;
+ function getEditsForRefactor(context, refactorName, actionName) {
+ var refactor = refactors.get(refactorName);
+ return refactor && refactor.getEditsForAction(context, actionName);
+ }
+ refactor_1.getEditsForRefactor = getEditsForRefactor;
+ })(refactor = ts.refactor || (ts.refactor = {}));
+})(ts || (ts = {}));
+/* @internal */
+var ts;
+(function (ts) {
var codefix;
(function (codefix) {
codefix.registerCodeFix({
@@ -83770,7 +86593,7 @@ var ts;
function getActionForClassLikeIncorrectImplementsInterface(context) {
var sourceFile = context.sourceFile;
var start = context.span.start;
- var token = ts.getTokenAtPosition(sourceFile, start);
+ var token = ts.getTokenAtPosition(sourceFile, start, /*includeJsDocComment*/ false);
var checker = context.program.getTypeChecker();
var classDeclaration = ts.getContainingClass(token);
if (!classDeclaration) {
@@ -83826,89 +86649,123 @@ var ts;
var codefix;
(function (codefix) {
codefix.registerCodeFix({
- errorCodes: [ts.Diagnostics.Property_0_does_not_exist_on_type_1.code],
+ errorCodes: [ts.Diagnostics.Property_0_does_not_exist_on_type_1.code,
+ ts.Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2.code],
getCodeActions: getActionsForAddMissingMember
});
function getActionsForAddMissingMember(context) {
- var sourceFile = context.sourceFile;
+ var tokenSourceFile = context.sourceFile;
var start = context.span.start;
- // This is the identifier of the missing property. eg:
+ // The identifier of the missing property. eg:
// this.missing = 1;
// ^^^^^^^
- var token = ts.getTokenAtPosition(sourceFile, start);
+ var token = ts.getTokenAtPosition(tokenSourceFile, start, /*includeJsDocComment*/ false);
if (token.kind !== 71 /* Identifier */) {
return undefined;
}
- if (!ts.isPropertyAccessExpression(token.parent) || token.parent.expression.kind !== 99 /* ThisKeyword */) {
+ if (!ts.isPropertyAccessExpression(token.parent)) {
return undefined;
}
- var classMemberDeclaration = ts.getThisContainer(token, /*includeArrowFunctions*/ false);
- if (!ts.isClassElement(classMemberDeclaration)) {
- return undefined;
+ var tokenName = token.getText(tokenSourceFile);
+ var makeStatic = false;
+ var classDeclaration;
+ if (token.parent.expression.kind === 99 /* ThisKeyword */) {
+ var containingClassMemberDeclaration = ts.getThisContainer(token, /*includeArrowFunctions*/ false);
+ if (!ts.isClassElement(containingClassMemberDeclaration)) {
+ return undefined;
+ }
+ classDeclaration = containingClassMemberDeclaration.parent;
+ // Property accesses on `this` in a static method are accesses of a static member.
+ makeStatic = classDeclaration && ts.hasModifier(containingClassMemberDeclaration, 32 /* Static */);
+ }
+ else {
+ var checker = context.program.getTypeChecker();
+ var leftExpression = token.parent.expression;
+ var leftExpressionType = checker.getTypeAtLocation(leftExpression);
+ if (leftExpressionType.flags & 32768 /* Object */) {
+ var symbol = leftExpressionType.symbol;
+ if (symbol.flags & 32 /* Class */) {
+ classDeclaration = symbol.declarations && symbol.declarations[0];
+ if (leftExpressionType !== checker.getDeclaredTypeOfSymbol(symbol)) {
+ // The expression is a class symbol but the type is not the instance-side.
+ makeStatic = true;
+ }
+ }
+ }
}
- 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) {
+ var classDeclarationSourceFile = ts.getSourceFileOfNode(classDeclaration);
+ var classOpenBrace = ts.getOpenBraceOfClassLike(classDeclaration, classDeclarationSourceFile);
+ return ts.isInJavaScriptFile(classDeclarationSourceFile) ?
+ getActionsForAddMissingMemberInJavaScriptFile(classDeclaration, makeStatic) :
+ getActionsForAddMissingMemberInTypeScriptFile(classDeclaration, makeStatic);
+ function getActionsForAddMissingMemberInJavaScriptFile(classDeclaration, makeStatic) {
+ var actions;
+ var methodCodeAction = getActionForMethodDeclaration(/*includeTypeScriptSyntax*/ false);
+ if (methodCodeAction) {
+ actions = [methodCodeAction];
+ }
+ if (makeStatic) {
if (classDeclaration.kind === 199 /* ClassExpression */) {
- return undefined;
+ return actions;
}
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 staticInitialization = ts.createStatement(ts.createAssignment(ts.createPropertyAccess(ts.createIdentifier(className), tokenName), ts.createIdentifier("undefined")));
+ var staticInitializationChangeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context);
+ staticInitializationChangeTracker.insertNodeAfter(classDeclarationSourceFile, classDeclaration, staticInitialization, { suffix: context.newLineCharacter });
+ var initializeStaticAction = {
+ description: ts.formatStringFromArgs(ts.getLocaleSpecificMessage(ts.Diagnostics.Initialize_static_property_0), [tokenName]),
+ changes: staticInitializationChangeTracker.getChanges()
+ };
+ (actions || (actions = [])).push(initializeStaticAction);
+ return actions;
}
else {
var classConstructor = ts.getFirstConstructorWithBody(classDeclaration);
if (!classConstructor) {
- return undefined;
+ return actions;
}
- 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
- }]
- }]
- }];
+ var propertyInitialization = ts.createStatement(ts.createAssignment(ts.createPropertyAccess(ts.createThis(), tokenName), ts.createIdentifier("undefined")));
+ var propertyInitializationChangeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context);
+ propertyInitializationChangeTracker.insertNodeAt(classDeclarationSourceFile, classConstructor.body.getEnd() - 1, propertyInitialization, { prefix: context.newLineCharacter, suffix: context.newLineCharacter });
+ var initializeAction = {
+ description: ts.formatStringFromArgs(ts.getLocaleSpecificMessage(ts.Diagnostics.Initialize_property_0_in_the_constructor), [tokenName]),
+ changes: propertyInitializationChangeTracker.getChanges()
+ };
+ (actions || (actions = [])).push(initializeAction);
+ return actions;
}
}
- function getActionsForAddMissingMemberInTypeScriptFile() {
+ function getActionsForAddMissingMemberInTypeScriptFile(classDeclaration, makeStatic) {
+ var actions;
+ var methodCodeAction = getActionForMethodDeclaration(/*includeTypeScriptSyntax*/ true);
+ if (methodCodeAction) {
+ actions = [methodCodeAction];
+ }
var typeNode;
if (token.parent.parent.kind === 194 /* BinaryExpression */) {
var binaryExpression = token.parent.parent;
+ var otherExpression = token.parent === binaryExpression.left ? binaryExpression.right : binaryExpression.left;
var checker = context.program.getTypeChecker();
- var widenedType = checker.getWidenedType(checker.getBaseTypeOfLiteralType(checker.getTypeAtLocation(binaryExpression.right)));
+ var widenedType = checker.getWidenedType(checker.getBaseTypeOfLiteralType(checker.getTypeAtLocation(otherExpression)));
typeNode = checker.typeToTypeNode(widenedType, classDeclaration);
}
typeNode = typeNode || ts.createKeywordTypeNode(119 /* AnyKeyword */);
- var openBrace = ts.getOpenBraceOfClassLike(classDeclaration, sourceFile);
var property = ts.createProperty(
/*decorators*/ undefined,
- /*modifiers*/ isStatic ? [ts.createToken(115 /* StaticKeyword */)] : undefined, token.getText(sourceFile),
+ /*modifiers*/ makeStatic ? [ts.createToken(115 /* StaticKeyword */)] : undefined, tokenName,
/*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) {
+ propertyChangeTracker.insertNodeAfter(classDeclarationSourceFile, classOpenBrace, property, { suffix: context.newLineCharacter });
+ (actions || (actions = [])).push({
+ description: ts.formatStringFromArgs(ts.getLocaleSpecificMessage(ts.Diagnostics.Declare_property_0), [tokenName]),
+ changes: propertyChangeTracker.getChanges()
+ });
+ if (!makeStatic) {
+ // Index signatures cannot have the static modifier.
var stringTypeNode = ts.createKeywordTypeNode(136 /* StringKeyword */);
var indexingParameter = ts.createParameter(
/*decorators*/ undefined,
@@ -83916,18 +86773,86 @@ var ts;
/*dotDotDotToken*/ undefined, "x",
/*questionToken*/ undefined, stringTypeNode,
/*initializer*/ undefined);
- var indexSignature = ts.createIndexSignatureDeclaration(
+ var indexSignature = ts.createIndexSignature(
/*decorators*/ undefined,
/*modifiers*/ undefined, [indexingParameter], typeNode);
var indexSignatureChangeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context);
- indexSignatureChangeTracker.insertNodeAfter(sourceFile, openBrace, indexSignature, { suffix: context.newLineCharacter });
+ indexSignatureChangeTracker.insertNodeAfter(classDeclarationSourceFile, classOpenBrace, indexSignature, { suffix: context.newLineCharacter });
actions.push({
- description: ts.formatStringFromArgs(ts.getLocaleSpecificMessage(ts.Diagnostics.Add_index_signature_for_missing_property_0), [token.getText()]),
+ description: ts.formatStringFromArgs(ts.getLocaleSpecificMessage(ts.Diagnostics.Add_index_signature_for_property_0), [tokenName]),
changes: indexSignatureChangeTracker.getChanges()
});
}
return actions;
}
+ function getActionForMethodDeclaration(includeTypeScriptSyntax) {
+ if (token.parent.parent.kind === 181 /* CallExpression */) {
+ var callExpression = token.parent.parent;
+ var methodDeclaration = codefix.createMethodFromCallExpression(callExpression, tokenName, includeTypeScriptSyntax, makeStatic);
+ var methodDeclarationChangeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context);
+ methodDeclarationChangeTracker.insertNodeAfter(classDeclarationSourceFile, classOpenBrace, methodDeclaration, { suffix: context.newLineCharacter });
+ return {
+ description: ts.formatStringFromArgs(ts.getLocaleSpecificMessage(makeStatic ?
+ ts.Diagnostics.Declare_method_0 :
+ ts.Diagnostics.Declare_static_method_0), [tokenName]),
+ changes: methodDeclarationChangeTracker.getChanges()
+ };
+ }
+ }
+ }
+ })(codefix = ts.codefix || (ts.codefix = {}));
+})(ts || (ts = {}));
+/* @internal */
+var ts;
+(function (ts) {
+ var codefix;
+ (function (codefix) {
+ codefix.registerCodeFix({
+ errorCodes: [ts.Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2.code,
+ ts.Diagnostics.Cannot_find_name_0_Did_you_mean_1.code],
+ getCodeActions: getActionsForCorrectSpelling
+ });
+ function getActionsForCorrectSpelling(context) {
+ var sourceFile = context.sourceFile;
+ // This is the identifier of the misspelled word. eg:
+ // this.speling = 1;
+ // ^^^^^^^
+ var node = ts.getTokenAtPosition(sourceFile, context.span.start, /*includeJsDocComment*/ false); // TODO: GH#15852
+ var checker = context.program.getTypeChecker();
+ var suggestion;
+ if (node.kind === 71 /* Identifier */ && ts.isPropertyAccessExpression(node.parent)) {
+ var containingType = checker.getTypeAtLocation(node.parent.expression);
+ suggestion = checker.getSuggestionForNonexistentProperty(node, containingType);
+ }
+ else {
+ var meaning = ts.getMeaningFromLocation(node);
+ suggestion = checker.getSuggestionForNonexistentSymbol(node, ts.getTextOfNode(node), convertSemanticMeaningToSymbolFlags(meaning));
+ }
+ if (suggestion) {
+ return [{
+ description: ts.formatStringFromArgs(ts.getLocaleSpecificMessage(ts.Diagnostics.Change_spelling_to_0), [suggestion]),
+ changes: [{
+ fileName: sourceFile.fileName,
+ textChanges: [{
+ span: { start: node.getStart(), length: node.getWidth() },
+ newText: suggestion
+ }],
+ }],
+ }];
+ }
+ }
+ function convertSemanticMeaningToSymbolFlags(meaning) {
+ var flags = 0;
+ if (meaning & 4 /* Namespace */) {
+ flags |= 1920 /* Namespace */;
+ }
+ if (meaning & 2 /* Type */) {
+ flags |= 793064 /* Type */;
+ }
+ if (meaning & 1 /* Value */) {
+ flags |= 107455 /* Value */;
+ }
+ return flags;
}
})(codefix = ts.codefix || (ts.codefix = {}));
})(ts || (ts = {}));
@@ -83949,7 +86874,7 @@ var ts;
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 token = ts.getTokenAtPosition(sourceFile, start, /*includeJsDocComment*/ false);
var checker = context.program.getTypeChecker();
if (ts.isClassLike(token.parent)) {
var classDeclaration = token.parent;
@@ -83987,7 +86912,7 @@ var ts;
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;
- var token = ts.getTokenAtPosition(sourceFile, context.span.start);
+ var token = ts.getTokenAtPosition(sourceFile, context.span.start, /*includeJsDocComment*/ false);
if (token.kind !== 99 /* ThisKeyword */) {
return undefined;
}
@@ -84035,7 +86960,7 @@ var ts;
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);
+ var token = ts.getTokenAtPosition(sourceFile, context.span.start, /*includeJsDocComment*/ false);
if (token.kind !== 123 /* ConstructorKeyword */) {
return undefined;
}
@@ -84060,7 +86985,7 @@ var ts;
getCodeActions: function (context) {
var sourceFile = context.sourceFile;
var start = context.span.start;
- var token = ts.getTokenAtPosition(sourceFile, start);
+ var token = ts.getTokenAtPosition(sourceFile, start, /*includeJsDocComment*/ false);
var classDeclNode = ts.getContainingClass(token);
if (!(token.kind === 71 /* Identifier */ && ts.isClassLike(classDeclNode))) {
return undefined;
@@ -84100,7 +87025,7 @@ var ts;
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);
+ var token = ts.getTokenAtPosition(sourceFile, context.span.start, /*includeJsDocComment*/ false);
if (token.kind !== 71 /* Identifier */) {
return undefined;
}
@@ -84127,138 +87052,146 @@ var ts;
getCodeActions: function (context) {
var sourceFile = context.sourceFile;
var start = context.span.start;
- var token = ts.getTokenAtPosition(sourceFile, start);
+ var token = ts.getTokenAtPosition(sourceFile, start, /*includeJsDocComment*/ false);
// this handles var ["computed"] = 12;
if (token.kind === 21 /* OpenBracketToken */) {
- token = ts.getTokenAtPosition(sourceFile, start + 1);
+ token = ts.getTokenAtPosition(sourceFile, start + 1, /*includeJsDocComment*/ false);
}
switch (token.kind) {
case 71 /* Identifier */:
- switch (token.parent.kind) {
- case 226 /* VariableDeclaration */:
- switch (token.parent.parent.parent.kind) {
- case 214 /* 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 216 /* ForOfStatement */:
- var forOfStatement = token.parent.parent.parent;
- if (forOfStatement.initializer.kind === 227 /* VariableDeclarationList */) {
- var forOfInitializer = forOfStatement.initializer;
- return replaceNode(forOfInitializer.declarations[0], ts.createObjectLiteral());
- }
- break;
- case 215 /* ForInStatement */:
- // There is no valid fix in the case of:
- // for .. in
- return undefined;
- case 260 /* 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 145 /* TypeParameter */:
- var typeParameters = token.parent.parent.typeParameters;
- if (typeParameters.length === 1) {
- var previousToken = ts.getTokenAtPosition(sourceFile, typeParameters.pos - 1);
- if (!previousToken || previousToken.kind !== 27 /* LessThanToken */) {
- return deleteRange(typeParameters);
- }
- var nextToken = ts.getTokenAtPosition(sourceFile, typeParameters.end);
- if (!nextToken || nextToken.kind !== 29 /* GreaterThanToken */) {
- return deleteRange(typeParameters);
- }
- return deleteNodeRange(previousToken, nextToken);
- }
- else {
- return deleteNodeInList(token.parent);
- }
- case 146 /* 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 237 /* ImportEqualsDeclaration */:
- var importEquals = ts.getAncestor(token, 237 /* ImportEqualsDeclaration */);
- return deleteNode(importEquals);
- case 242 /* 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, 238 /* 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 239 /* ImportClause */:
- var importClause = token.parent;
- if (!importClause.namedBindings) {
- var importDecl = ts.getAncestor(importClause, 238 /* 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 === 26 /* 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 240 /* NamespaceImport */:
- var namespaceImport = token.parent;
- if (namespaceImport.name === token && !namespaceImport.parent.name) {
- var importDecl = ts.getAncestor(namespaceImport, 238 /* ImportDeclaration */);
- return deleteNode(importDecl);
- }
- else {
- var previousToken = ts.getTokenAtPosition(sourceFile, namespaceImport.pos - 1);
- if (previousToken && previousToken.kind === 26 /* CommaToken */) {
- var startPosition = ts.textChanges.getAdjustedStartPosition(sourceFile, previousToken, {}, ts.textChanges.Position.FullStart);
- return deleteRange({ pos: startPosition, end: namespaceImport.end });
- }
- return deleteRange(namespaceImport);
- }
- }
- break;
+ return deleteIdentifierOrPrefixWithUnderscore(token);
case 149 /* PropertyDeclaration */:
case 240 /* NamespaceImport */:
+ return [deleteNode(token.parent)];
+ default:
+ return [deleteDefault()];
+ }
+ function deleteDefault() {
+ if (ts.isDeclarationName(token)) {
return deleteNode(token.parent);
+ }
+ else if (ts.isLiteralComputedPropertyDeclarationName(token)) {
+ return deleteNode(token.parent.parent);
+ }
+ else {
+ return undefined;
+ }
}
- if (ts.isDeclarationName(token)) {
- return deleteNode(token.parent);
+ function prefixIdentifierWithUnderscore(identifier) {
+ var startPosition = identifier.getStart(sourceFile, /*includeJsDocComment*/ false);
+ return {
+ description: ts.formatStringFromArgs(ts.getLocaleSpecificMessage(ts.Diagnostics.Prefix_0_with_an_underscore), { 0: token.getText() }),
+ changes: [{
+ fileName: sourceFile.path,
+ textChanges: [{
+ span: { start: startPosition, length: 0 },
+ newText: "_"
+ }]
+ }]
+ };
}
- else if (ts.isLiteralComputedPropertyDeclarationName(token)) {
- return deleteNode(token.parent.parent);
+ function deleteIdentifierOrPrefixWithUnderscore(identifier) {
+ var parent = identifier.parent;
+ switch (parent.kind) {
+ case 226 /* VariableDeclaration */:
+ return deleteVariableDeclarationOrPrefixWithUnderscore(identifier, parent);
+ case 145 /* TypeParameter */:
+ var typeParameters = parent.parent.typeParameters;
+ if (typeParameters.length === 1) {
+ var previousToken = ts.getTokenAtPosition(sourceFile, typeParameters.pos - 1, /*includeJsDocComment*/ false);
+ var nextToken = ts.getTokenAtPosition(sourceFile, typeParameters.end, /*includeJsDocComment*/ false);
+ ts.Debug.assert(previousToken.kind === 27 /* LessThanToken */);
+ ts.Debug.assert(nextToken.kind === 29 /* GreaterThanToken */);
+ return [deleteNodeRange(previousToken, nextToken)];
+ }
+ else {
+ return [deleteNodeInList(parent)];
+ }
+ case 146 /* Parameter */:
+ var functionDeclaration = parent.parent;
+ return [functionDeclaration.parameters.length === 1 ? deleteNode(parent) : deleteNodeInList(parent),
+ prefixIdentifierWithUnderscore(identifier)];
+ // handle case where 'import a = A;'
+ case 237 /* ImportEqualsDeclaration */:
+ var importEquals = ts.getAncestor(identifier, 237 /* ImportEqualsDeclaration */);
+ return [deleteNode(importEquals)];
+ case 242 /* ImportSpecifier */:
+ var namedImports = 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(identifier, 238 /* ImportDeclaration */);
+ return [deleteNode(importSpec)];
+ }
+ else {
+ // delete import specifier
+ return [deleteNodeInList(parent)];
+ }
+ // handle case where "import d, * as ns from './file'"
+ // or "'import {a, b as ns} from './file'"
+ case 239 /* ImportClause */:// this covers both 'import |d|' and 'import |d,| *'
+ var importClause = parent;
+ if (!importClause.namedBindings) {
+ var importDecl = ts.getAncestor(importClause, 238 /* 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, /*includeJsDocComment*/ false);
+ if (nextToken && nextToken.kind === 26 /* 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 240 /* NamespaceImport */:
+ var namespaceImport = parent;
+ if (namespaceImport.name === identifier && !namespaceImport.parent.name) {
+ var importDecl = ts.getAncestor(namespaceImport, 238 /* ImportDeclaration */);
+ return [deleteNode(importDecl)];
+ }
+ else {
+ var previousToken = ts.getTokenAtPosition(sourceFile, namespaceImport.pos - 1, /*includeJsDocComment*/ false);
+ if (previousToken && previousToken.kind === 26 /* CommaToken */) {
+ var startPosition = ts.textChanges.getAdjustedStartPosition(sourceFile, previousToken, {}, ts.textChanges.Position.FullStart);
+ return [deleteRange({ pos: startPosition, end: namespaceImport.end })];
+ }
+ return [deleteRange(namespaceImport)];
+ }
+ default:
+ return [deleteDefault()];
+ }
}
- else {
- return undefined;
+ // token.parent is a variableDeclaration
+ function deleteVariableDeclarationOrPrefixWithUnderscore(identifier, varDecl) {
+ switch (varDecl.parent.parent.kind) {
+ case 214 /* ForStatement */:
+ var forStatement = varDecl.parent.parent;
+ var forInitializer = forStatement.initializer;
+ return [forInitializer.declarations.length === 1 ? deleteNode(forInitializer) : deleteNodeInList(varDecl)];
+ case 216 /* ForOfStatement */:
+ var forOfStatement = varDecl.parent.parent;
+ ts.Debug.assert(forOfStatement.initializer.kind === 227 /* VariableDeclarationList */);
+ var forOfInitializer = forOfStatement.initializer;
+ return [
+ replaceNode(forOfInitializer.declarations[0], ts.createObjectLiteral()),
+ prefixIdentifierWithUnderscore(identifier)
+ ];
+ case 215 /* ForInStatement */:
+ // There is no valid fix in the case of:
+ // for .. in
+ return [prefixIdentifierWithUnderscore(identifier)];
+ default:
+ var variableStatement = varDecl.parent.parent;
+ if (variableStatement.declarationList.declarations.length === 1) {
+ return [deleteNode(variableStatement)];
+ }
+ else {
+ return [deleteNodeInList(varDecl)];
+ }
+ }
}
function deleteNode(n) {
return makeChange(ts.textChanges.ChangeTracker.fromCodeFixContext(context).deleteNode(sourceFile, n));
@@ -84276,10 +87209,10 @@ var ts;
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()
- }];
+ return {
+ description: ts.formatStringFromArgs(ts.getLocaleSpecificMessage(ts.Diagnostics.Remove_declaration_for_Colon_0), { 0: token.getText() }),
+ changes: changeTracker.getChanges()
+ };
}
}
});
@@ -84290,6 +87223,15 @@ var ts;
(function (ts) {
var codefix;
(function (codefix) {
+ codefix.registerCodeFix({
+ errorCodes: [
+ ts.Diagnostics.Cannot_find_name_0.code,
+ ts.Diagnostics.Cannot_find_name_0_Did_you_mean_1.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: getImportCodeActions
+ });
var ModuleSpecifierComparison;
(function (ModuleSpecifierComparison) {
ModuleSpecifierComparison[ModuleSpecifierComparison["Better"] = 0] = "Better";
@@ -84387,400 +87329,408 @@ var ts;
};
return ImportCodeActionMap;
}());
- codefix.registerCodeFix({
- 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();
- var allSourceFiles = context.program.getSourceFiles();
- var useCaseSensitiveFileNames = context.host.useCaseSensitiveFileNames ? context.host.useCaseSensitiveFileNames() : false;
- var token = ts.getTokenAtPosition(sourceFile, context.span.start);
- var name = token.getText();
- var symbolIdActionMap = new ImportCodeActionMap();
- // this is a module id -> module import declaration map
- 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)) {
- candidateModules.push(otherSourceFile.symbol);
- }
- }
- 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);
- if (defaultExport) {
- var localSymbol = ts.getLocalSymbolForExportDefault(defaultExport);
- if (localSymbol && localSymbol.name === name && checkSymbolHasMeaning(localSymbol, currentTokenMeaning)) {
- // check if this symbol is already used
- var symbolId = getUniqueSymbolId(localSymbol);
- symbolIdActionMap.addActions(symbolId, getCodeActionForImport(moduleSymbol, /*isDefault*/ true));
- }
- }
- // check exports with the same name
- var exportSymbolWithIdenticalName = checker.tryGetMemberInModuleExports(name, moduleSymbol);
- if (exportSymbolWithIdenticalName && checkSymbolHasMeaning(exportSymbolWithIdenticalName, currentTokenMeaning)) {
- var symbolId = getUniqueSymbolId(exportSymbolWithIdenticalName);
- symbolIdActionMap.addActions(symbolId, getCodeActionForImport(moduleSymbol));
- }
- }
- return symbolIdActionMap.getAllActions();
- function getImportDeclarations(moduleSymbol) {
- var moduleSymbolId = getUniqueSymbolId(moduleSymbol);
- var cached = cachedImportDeclarations[moduleSymbolId];
- if (cached) {
- return cached;
+ function getImportCodeActions(context) {
+ var sourceFile = context.sourceFile;
+ var checker = context.program.getTypeChecker();
+ var allSourceFiles = context.program.getSourceFiles();
+ var useCaseSensitiveFileNames = context.host.useCaseSensitiveFileNames ? context.host.useCaseSensitiveFileNames() : false;
+ var token = ts.getTokenAtPosition(sourceFile, context.span.start, /*includeJsDocComment*/ false);
+ var name = token.getText();
+ var symbolIdActionMap = new ImportCodeActionMap();
+ // this is a module id -> module import declaration map
+ 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 umdSymbol = checker.getSymbolAtLocation(token);
+ var symbol = void 0;
+ var symbolName = void 0;
+ if (umdSymbol.flags & 8388608 /* Alias */) {
+ symbol = checker.getAliasedSymbol(umdSymbol);
+ symbolName = name;
+ }
+ else if (ts.isJsxOpeningLikeElement(token.parent) && token.parent.tagName === token) {
+ // The error wasn't for the symbolAtLocation, it was for the JSX tag itself, which needs access to e.g. `React`.
+ symbol = checker.getAliasedSymbol(checker.resolveNameAtLocation(token, checker.getJsxNamespace(), 107455 /* Value */));
+ symbolName = symbol.name;
+ }
+ else {
+ ts.Debug.fail("Either the symbol or the JSX namespace should be a UMD global if we got here");
+ }
+ return getCodeActionForImport(symbol, symbolName, /*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)) {
+ candidateModules.push(otherSourceFile.symbol);
+ }
+ }
+ 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);
+ if (defaultExport) {
+ var localSymbol = ts.getLocalSymbolForExportDefault(defaultExport);
+ if (localSymbol && localSymbol.name === name && checkSymbolHasMeaning(localSymbol, currentTokenMeaning)) {
+ // check if this symbol is already used
+ var symbolId = getUniqueSymbolId(localSymbol);
+ symbolIdActionMap.addActions(symbolId, getCodeActionForImport(moduleSymbol, name, /*isDefault*/ true));
}
- var existingDeclarations = [];
- for (var _i = 0, _a = sourceFile.imports; _i < _a.length; _i++) {
- var importModuleSpecifier = _a[_i];
- var importSymbol = checker.getSymbolAtLocation(importModuleSpecifier);
- if (importSymbol === moduleSymbol) {
- existingDeclarations.push(getImportDeclaration(importModuleSpecifier));
- }
+ }
+ // check exports with the same name
+ var exportSymbolWithIdenticalName = checker.tryGetMemberInModuleExports(name, moduleSymbol);
+ if (exportSymbolWithIdenticalName && checkSymbolHasMeaning(exportSymbolWithIdenticalName, currentTokenMeaning)) {
+ var symbolId = getUniqueSymbolId(exportSymbolWithIdenticalName);
+ symbolIdActionMap.addActions(symbolId, getCodeActionForImport(moduleSymbol, name));
+ }
+ }
+ return symbolIdActionMap.getAllActions();
+ function getImportDeclarations(moduleSymbol) {
+ var moduleSymbolId = getUniqueSymbolId(moduleSymbol);
+ var cached = cachedImportDeclarations[moduleSymbolId];
+ if (cached) {
+ return cached;
+ }
+ var existingDeclarations = [];
+ for (var _i = 0, _a = sourceFile.imports; _i < _a.length; _i++) {
+ var importModuleSpecifier = _a[_i];
+ var importSymbol = checker.getSymbolAtLocation(importModuleSpecifier);
+ if (importSymbol === moduleSymbol) {
+ existingDeclarations.push(getImportDeclaration(importModuleSpecifier));
}
- cachedImportDeclarations[moduleSymbolId] = existingDeclarations;
- return existingDeclarations;
- function getImportDeclaration(moduleSpecifier) {
- var node = moduleSpecifier;
- while (node) {
- if (node.kind === 238 /* ImportDeclaration */) {
- return node;
- }
- if (node.kind === 237 /* ImportEqualsDeclaration */) {
- return node;
- }
- node = node.parent;
+ }
+ cachedImportDeclarations[moduleSymbolId] = existingDeclarations;
+ return existingDeclarations;
+ function getImportDeclaration(moduleSpecifier) {
+ var node = moduleSpecifier;
+ while (node) {
+ if (node.kind === 238 /* ImportDeclaration */) {
+ return node;
}
- return undefined;
+ if (node.kind === 237 /* ImportEqualsDeclaration */) {
+ return node;
+ }
+ node = node.parent;
}
+ return undefined;
}
- function getUniqueSymbolId(symbol) {
- if (symbol.flags & 8388608 /* Alias */) {
- return ts.getSymbolId(checker.getAliasedSymbol(symbol));
- }
- return ts.getSymbolId(symbol);
+ }
+ function getUniqueSymbolId(symbol) {
+ if (symbol.flags & 8388608 /* Alias */) {
+ return ts.getSymbolId(checker.getAliasedSymbol(symbol));
}
- function checkSymbolHasMeaning(symbol, meaning) {
- var declarations = symbol.getDeclarations();
- return declarations ? ts.some(symbol.declarations, function (decl) { return !!(ts.getMeaningFromDeclaration(decl) & meaning); }) : false;
+ return ts.getSymbolId(symbol);
+ }
+ function checkSymbolHasMeaning(symbol, meaning) {
+ var declarations = symbol.getDeclarations();
+ return declarations ? ts.some(symbol.declarations, function (decl) { return !!(ts.getMeaningFromDeclaration(decl) & meaning); }) : false;
+ }
+ function getCodeActionForImport(moduleSymbol, symbolName, 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.
+ return getCodeActionsForExistingImport(existingDeclarations);
}
- 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.
- return getCodeActionsForExistingImport(existingDeclarations);
- }
- else {
- return [getCodeActionForNewImport()];
- }
- function getCodeActionsForExistingImport(declarations) {
- var actions = [];
- // It is possible that multiple import statements with the same specifier exist in the file.
- // e.g.
- //
- // import * as ns from "foo";
- // import { member1, member2 } from "foo";
- //
- // member3/**/ <-- cusor here
- //
- // in this case we should provie 2 actions:
- // 1. change "member3" to "ns.member3"
- // 2. add "member3" to the second import statement's import list
- // and it is up to the user to decide which one fits best.
- var namespaceImportDeclaration;
- var namedImportDeclaration;
- var existingModuleSpecifier;
- for (var _i = 0, declarations_14 = declarations; _i < declarations_14.length; _i++) {
- var declaration = declarations_14[_i];
- if (declaration.kind === 238 /* ImportDeclaration */) {
- var namedBindings = declaration.importClause && declaration.importClause.namedBindings;
- if (namedBindings && namedBindings.kind === 240 /* NamespaceImport */) {
- // case:
- // import * as ns from "foo"
- namespaceImportDeclaration = declaration;
- }
- else {
- // cases:
- // import default from "foo"
- // import { bar } from "foo" or combination with the first one
- // import "foo"
- namedImportDeclaration = declaration;
- }
- existingModuleSpecifier = declaration.moduleSpecifier.getText();
- }
- else {
+ else {
+ return [getCodeActionForNewImport()];
+ }
+ function getCodeActionsForExistingImport(declarations) {
+ var actions = [];
+ // It is possible that multiple import statements with the same specifier exist in the file.
+ // e.g.
+ //
+ // import * as ns from "foo";
+ // import { member1, member2 } from "foo";
+ //
+ // member3/**/ <-- cusor here
+ //
+ // in this case we should provie 2 actions:
+ // 1. change "member3" to "ns.member3"
+ // 2. add "member3" to the second import statement's import list
+ // and it is up to the user to decide which one fits best.
+ var namespaceImportDeclaration;
+ var namedImportDeclaration;
+ var existingModuleSpecifier;
+ for (var _i = 0, declarations_14 = declarations; _i < declarations_14.length; _i++) {
+ var declaration = declarations_14[_i];
+ if (declaration.kind === 238 /* ImportDeclaration */) {
+ var namedBindings = declaration.importClause && declaration.importClause.namedBindings;
+ if (namedBindings && namedBindings.kind === 240 /* NamespaceImport */) {
// case:
- // import foo = require("foo")
+ // import * as ns from "foo"
namespaceImportDeclaration = declaration;
- existingModuleSpecifier = getModuleSpecifierFromImportEqualsDeclaration(declaration);
}
+ else {
+ // cases:
+ // import default from "foo"
+ // import { bar } from "foo" or combination with the first one
+ // import "foo"
+ namedImportDeclaration = declaration;
+ }
+ existingModuleSpecifier = declaration.moduleSpecifier.getText();
}
- if (namespaceImportDeclaration) {
- actions.push(getCodeActionForNamespaceImport(namespaceImportDeclaration));
+ else {
+ // case:
+ // import foo = require("foo")
+ namespaceImportDeclaration = declaration;
+ existingModuleSpecifier = getModuleSpecifierFromImportEqualsDeclaration(declaration);
}
- 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 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], fileTextChanges, "InsertingIntoExistingImport", moduleSpecifierWithoutQuotes));
+ }
+ if (namespaceImportDeclaration) {
+ actions.push(getCodeActionForNamespaceImport(namespaceImportDeclaration));
+ }
+ 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 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], fileTextChanges, "InsertingIntoExistingImport", moduleSpecifierWithoutQuotes));
+ }
+ else {
+ // we need to create a new import statement, but the existing module specifier can be reused.
+ actions.push(getCodeActionForNewImport(existingModuleSpecifier));
+ }
+ return actions;
+ function getModuleSpecifierFromImportEqualsDeclaration(declaration) {
+ if (declaration.moduleReference && declaration.moduleReference.kind === 248 /* ExternalModuleReference */) {
+ return declaration.moduleReference.expression.getText();
+ }
+ return declaration.moduleReference.getText();
+ }
+ function getTextChangeForImportClause(importClause) {
+ 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"
+ // case 2:
+ // original text: import {} from "module"
+ // change to: import { name } from "module"
+ if (!importList || importList.elements.length === 0) {
+ var newImportClause = ts.createImportClause(importClause.name, ts.createNamedImports([newImportSpecifier]));
+ return createChangeTracker().replaceNode(sourceFile, importClause, newImportClause).getChanges();
+ }
+ /**
+ * If the import list has one import per line, preserve that. Otherwise, insert on same line as last element
+ * import {
+ * foo
+ * } from "./module";
+ */
+ return createChangeTracker().insertNodeInListAfter(sourceFile, importList.elements[importList.elements.length - 1], newImportSpecifier).getChanges();
+ }
+ function getCodeActionForNamespaceImport(declaration) {
+ var namespacePrefix;
+ if (declaration.kind === 238 /* ImportDeclaration */) {
+ namespacePrefix = declaration.importClause.namedBindings.name.getText();
}
else {
- // we need to create a new import statement, but the existing module specifier can be reused.
- actions.push(getCodeActionForNewImport(existingModuleSpecifier));
+ namespacePrefix = declaration.name.getText();
}
- return actions;
- function getModuleSpecifierFromImportEqualsDeclaration(declaration) {
- if (declaration.moduleReference && declaration.moduleReference.kind === 248 /* ExternalModuleReference */) {
- return declaration.moduleReference.expression.getText();
- }
- return declaration.moduleReference.getText();
- }
- function getTextChangeForImportClause(importClause) {
- 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"
- // case 2:
- // original text: import {} from "module"
- // change to: import { name } from "module"
- if (!importList || importList.elements.length === 0) {
- var newImportClause = ts.createImportClause(importClause.name, ts.createNamedImports([newImportSpecifier]));
- return createChangeTracker().replaceNode(sourceFile, importClause, newImportClause).getChanges();
- }
- /**
- * If the import list has one import per line, preserve that. Otherwise, insert on same line as last element
- * import {
- * foo
- * } from "./module";
- */
- return createChangeTracker().insertNodeInListAfter(sourceFile, importList.elements[importList.elements.length - 1], newImportSpecifier).getChanges();
- }
- function getCodeActionForNamespaceImport(declaration) {
- var namespacePrefix;
- if (declaration.kind === 238 /* ImportDeclaration */) {
- namespacePrefix = declaration.importClause.namedBindings.name.getText();
- }
- else {
- namespacePrefix = declaration.name.getText();
- }
- namespacePrefix = ts.stripQuotes(namespacePrefix);
- /**
- * Cases:
- * import * as ns from "mod"
- * import default, * as ns from "mod"
- * import ns = require("mod")
- *
- * Because there is no import list, we alter the reference to include the
- * 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], createChangeTracker().replaceNode(sourceFile, token, ts.createPropertyAccess(ts.createIdentifier(namespacePrefix), name)).getChanges(), "CodeChange");
- }
- }
- function getCodeActionForNewImport(moduleSpecifier) {
- if (!lastImportDeclaration) {
- // insert after any existing imports
- for (var i = sourceFile.statements.length - 1; i >= 0; i--) {
- var statement = sourceFile.statements[i];
- if (statement.kind === 237 /* ImportEqualsDeclaration */ || statement.kind === 238 /* ImportDeclaration */) {
- lastImportDeclaration = statement;
- break;
- }
+ namespacePrefix = ts.stripQuotes(namespacePrefix);
+ /**
+ * Cases:
+ * import * as ns from "mod"
+ * import default, * as ns from "mod"
+ * import ns = require("mod")
+ *
+ * Because there is no import list, we alter the reference to include the
+ * 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], createChangeTracker().replaceNode(sourceFile, token, ts.createPropertyAccess(ts.createIdentifier(namespacePrefix), name)).getChanges(), "CodeChange");
+ }
+ }
+ function getCodeActionForNewImport(moduleSpecifier) {
+ if (!lastImportDeclaration) {
+ // insert after any existing imports
+ for (var i = sourceFile.statements.length - 1; i >= 0; i--) {
+ var statement = sourceFile.statements[i];
+ if (statement.kind === 237 /* ImportEqualsDeclaration */ || statement.kind === 238 /* ImportDeclaration */) {
+ lastImportDeclaration = statement;
+ break;
}
}
- var getCanonicalFileName = ts.createGetCanonicalFileName(useCaseSensitiveFileNames);
- var moduleSpecifierWithoutQuotes = ts.stripQuotes(moduleSpecifier || getModuleSpecifierForNewImport());
- 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 });
+ }
+ var getCanonicalFileName = ts.createGetCanonicalFileName(useCaseSensitiveFileNames);
+ var moduleSpecifierWithoutQuotes = ts.stripQuotes(moduleSpecifier || getModuleSpecifierForNewImport());
+ var changeTracker = createChangeTracker();
+ var importClause = isDefault
+ ? ts.createImportClause(ts.createIdentifier(symbolName), /*namedBindings*/ undefined)
+ : isNamespaceImport
+ ? ts.createImportClause(/*name*/ undefined, ts.createNamespaceImport(ts.createIdentifier(symbolName)))
+ : ts.createImportClause(/*name*/ undefined, ts.createNamedImports([ts.createImportSpecifier(/*propertyName*/ undefined, ts.createIdentifier(symbolName))]));
+ 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.
+ return createCodeAction(ts.Diagnostics.Import_0_from_1, [symbolName, "\"" + moduleSpecifierWithoutQuotes + "\""], changeTracker.getChanges(), "NewImport", moduleSpecifierWithoutQuotes);
+ function getModuleSpecifierForNewImport() {
+ var fileName = sourceFile.fileName;
+ var moduleFileName = moduleSymbol.valueDeclaration.getSourceFile().fileName;
+ var sourceDirectory = ts.getDirectoryPath(fileName);
+ var options = context.program.getCompilerOptions();
+ return tryGetModuleNameFromAmbientModule() ||
+ tryGetModuleNameFromTypeRoots() ||
+ tryGetModuleNameAsNodeModule() ||
+ tryGetModuleNameFromBaseUrl() ||
+ tryGetModuleNameFromRootDirs() ||
+ ts.removeFileExtension(getRelativePath(moduleFileName, sourceDirectory));
+ function tryGetModuleNameFromAmbientModule() {
+ var decl = moduleSymbol.valueDeclaration;
+ if (ts.isModuleDeclaration(decl) && ts.isStringLiteral(decl.name)) {
+ return decl.name.text;
+ }
}
- // 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.
- return createCodeAction(ts.Diagnostics.Import_0_from_1, [name, "\"" + moduleSpecifierWithoutQuotes + "\""], changeTracker.getChanges(), "NewImport", moduleSpecifierWithoutQuotes);
- function getModuleSpecifierForNewImport() {
- var fileName = sourceFile.fileName;
- var moduleFileName = moduleSymbol.valueDeclaration.getSourceFile().fileName;
- var sourceDirectory = ts.getDirectoryPath(fileName);
- var options = context.program.getCompilerOptions();
- return tryGetModuleNameFromAmbientModule() ||
- tryGetModuleNameFromTypeRoots() ||
- tryGetModuleNameAsNodeModule() ||
- tryGetModuleNameFromBaseUrl() ||
- tryGetModuleNameFromRootDirs() ||
- ts.removeFileExtension(getRelativePath(moduleFileName, sourceDirectory));
- function tryGetModuleNameFromAmbientModule() {
- if (moduleSymbol.valueDeclaration.kind !== 265 /* SourceFile */) {
- return moduleSymbol.name;
- }
+ function tryGetModuleNameFromBaseUrl() {
+ if (!options.baseUrl) {
+ return undefined;
}
- function tryGetModuleNameFromBaseUrl() {
- if (!options.baseUrl) {
- return undefined;
- }
- 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) {
- for (var _i = 0, _a = options.paths[key]; _i < _a.length; _i++) {
- var pattern = _a[_i];
- var indexOfStar = pattern.indexOf("*");
- if (indexOfStar === 0 && pattern.length === 1) {
- continue;
- }
- else if (indexOfStar !== -1) {
- var prefix = pattern.substr(0, indexOfStar);
- var suffix = pattern.substr(indexOfStar + 1);
- if (relativeName.length >= prefix.length + suffix.length &&
- ts.startsWith(relativeName, prefix) &&
- ts.endsWith(relativeName, suffix)) {
- var matchedStar = relativeName.substr(prefix.length, relativeName.length - suffix.length);
- return key.replace("\*", matchedStar);
- }
- }
- else if (pattern === relativeName || pattern === relativeNameWithIndex) {
- return key;
+ 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) {
+ for (var _i = 0, _a = options.paths[key]; _i < _a.length; _i++) {
+ var pattern = _a[_i];
+ var indexOfStar = pattern.indexOf("*");
+ if (indexOfStar === 0 && pattern.length === 1) {
+ continue;
+ }
+ else if (indexOfStar !== -1) {
+ var prefix = pattern.substr(0, indexOfStar);
+ var suffix = pattern.substr(indexOfStar + 1);
+ if (relativeName.length >= prefix.length + suffix.length &&
+ ts.startsWith(relativeName, prefix) &&
+ ts.endsWith(relativeName, suffix)) {
+ var matchedStar = relativeName.substr(prefix.length, relativeName.length - suffix.length);
+ return key.replace("\*", matchedStar);
}
}
+ else if (pattern === relativeName || pattern === relativeNameWithIndex) {
+ return key;
+ }
}
}
- return relativeName;
}
- function tryGetModuleNameFromRootDirs() {
- if (options.rootDirs) {
- 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);
- }
+ return relativeName;
+ }
+ function tryGetModuleNameFromRootDirs() {
+ if (options.rootDirs) {
+ 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);
}
- return undefined;
}
- function tryGetModuleNameFromTypeRoots() {
- var typeRoots = ts.getEffectiveTypeRoots(options, context.host);
- if (typeRoots) {
- var normalizedTypeRoots = ts.map(typeRoots, function (typeRoot) { return ts.toPath(typeRoot, /*basePath*/ undefined, getCanonicalFileName); });
- for (var _i = 0, normalizedTypeRoots_1 = normalizedTypeRoots; _i < normalizedTypeRoots_1.length; _i++) {
- var typeRoot = normalizedTypeRoots_1[_i];
- if (ts.startsWith(moduleFileName, typeRoot)) {
- var relativeFileName = moduleFileName.substring(typeRoot.length + 1);
- return removeExtensionAndIndexPostFix(relativeFileName);
- }
+ return undefined;
+ }
+ function tryGetModuleNameFromTypeRoots() {
+ var typeRoots = ts.getEffectiveTypeRoots(options, context.host);
+ if (typeRoots) {
+ var normalizedTypeRoots = ts.map(typeRoots, function (typeRoot) { return ts.toPath(typeRoot, /*basePath*/ undefined, getCanonicalFileName); });
+ for (var _i = 0, normalizedTypeRoots_1 = normalizedTypeRoots; _i < normalizedTypeRoots_1.length; _i++) {
+ var typeRoot = normalizedTypeRoots_1[_i];
+ if (ts.startsWith(moduleFileName, typeRoot)) {
+ var relativeFileName = moduleFileName.substring(typeRoot.length + 1);
+ return removeExtensionAndIndexPostFix(relativeFileName);
}
}
}
- function tryGetModuleNameAsNodeModule() {
- if (ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.NodeJs) {
- // nothing to do here
- return undefined;
- }
- var indexOfNodeModules = moduleFileName.indexOf("node_modules");
- if (indexOfNodeModules < 0) {
- return undefined;
- }
- var relativeFileName;
- if (sourceDirectory.indexOf(moduleFileName.substring(0, indexOfNodeModules - 1)) === 0) {
- // if node_modules folder is in this folder or any of its parent folder, no need to keep it.
- relativeFileName = moduleFileName.substring(indexOfNodeModules + 13 /* "node_modules\".length */);
- }
- else {
- relativeFileName = getRelativePath(moduleFileName, sourceDirectory);
- }
- relativeFileName = ts.removeFileExtension(relativeFileName);
- if (ts.endsWith(relativeFileName, "/index")) {
- relativeFileName = ts.getDirectoryPath(relativeFileName);
- }
- else {
- try {
- var moduleDirectory = ts.getDirectoryPath(moduleFileName);
- var packageJsonContent = JSON.parse(context.host.readFile(ts.combinePaths(moduleDirectory, "package.json")));
- if (packageJsonContent) {
- var mainFile = packageJsonContent.main || packageJsonContent.typings;
- if (mainFile) {
- var mainExportFile = ts.toPath(mainFile, moduleDirectory, getCanonicalFileName);
- if (ts.removeFileExtension(mainExportFile) === ts.removeFileExtension(moduleFileName)) {
- relativeFileName = ts.getDirectoryPath(relativeFileName);
- }
+ }
+ function tryGetModuleNameAsNodeModule() {
+ if (ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.NodeJs) {
+ // nothing to do here
+ return undefined;
+ }
+ var indexOfNodeModules = moduleFileName.indexOf("node_modules");
+ if (indexOfNodeModules < 0) {
+ return undefined;
+ }
+ var relativeFileName;
+ if (sourceDirectory.indexOf(moduleFileName.substring(0, indexOfNodeModules - 1)) === 0) {
+ // if node_modules folder is in this folder or any of its parent folder, no need to keep it.
+ relativeFileName = moduleFileName.substring(indexOfNodeModules + 13 /* "node_modules\".length */);
+ }
+ else {
+ relativeFileName = getRelativePath(moduleFileName, sourceDirectory);
+ }
+ relativeFileName = ts.removeFileExtension(relativeFileName);
+ if (ts.endsWith(relativeFileName, "/index")) {
+ relativeFileName = ts.getDirectoryPath(relativeFileName);
+ }
+ else {
+ try {
+ var moduleDirectory = ts.getDirectoryPath(moduleFileName);
+ var packageJsonContent = JSON.parse(context.host.readFile(ts.combinePaths(moduleDirectory, "package.json")));
+ if (packageJsonContent) {
+ var mainFile = packageJsonContent.main || packageJsonContent.typings;
+ if (mainFile) {
+ var mainExportFile = ts.toPath(mainFile, moduleDirectory, getCanonicalFileName);
+ if (ts.removeFileExtension(mainExportFile) === ts.removeFileExtension(moduleFileName)) {
+ relativeFileName = ts.getDirectoryPath(relativeFileName);
}
}
}
- catch (e) { }
}
- return relativeFileName;
+ catch (e) { }
}
+ return ts.getPackageNameFromAtTypesDirectory(relativeFileName);
}
- function getPathRelativeToRootDirs(path, rootDirs) {
- for (var _i = 0, rootDirs_2 = rootDirs; _i < rootDirs_2.length; _i++) {
- var rootDir = rootDirs_2[_i];
- var relativeName = getRelativePathIfInDirectory(path, rootDir);
- if (relativeName !== undefined) {
- return relativeName;
- }
- }
- return undefined;
- }
- function removeExtensionAndIndexPostFix(fileName) {
- fileName = ts.removeFileExtension(fileName);
- if (ts.endsWith(fileName, "/index")) {
- fileName = fileName.substr(0, fileName.length - 6 /* "/index".length */);
+ }
+ function getPathRelativeToRootDirs(path, rootDirs) {
+ for (var _i = 0, rootDirs_2 = rootDirs; _i < rootDirs_2.length; _i++) {
+ var rootDir = rootDirs_2[_i];
+ var relativeName = getRelativePathIfInDirectory(path, rootDir);
+ if (relativeName !== undefined) {
+ return relativeName;
}
- 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, /*isAbsolutePathAnUrl*/ false);
- return ts.moduleHasNonRelativeName(relativePath) ? "./" + relativePath : relativePath;
+ return undefined;
+ }
+ function removeExtensionAndIndexPostFix(fileName) {
+ fileName = ts.removeFileExtension(fileName);
+ if (ts.endsWith(fileName, "/index")) {
+ fileName = fileName.substr(0, fileName.length - 6 /* "/index".length */);
}
+ 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, /*isAbsolutePathAnUrl*/ false);
+ return ts.moduleHasNonRelativeName(relativePath) ? "./" + relativePath : relativePath;
}
- }
- 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: changes,
- kind: kind,
- moduleSpecifier: 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: changes,
+ kind: kind,
+ moduleSpecifier: moduleSpecifier
+ };
+ }
+ }
})(codefix = ts.codefix || (ts.codefix = {}));
})(ts || (ts = {}));
/* @internal */
@@ -84807,7 +87757,7 @@ var ts;
// 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 token = ts.getTouchingToken(sourceFile, startPosition, /*includeJsDocComment*/ false);
var tokenLeadingCommnets = ts.getLeadingCommentRangesOfNode(token, sourceFile);
if (!tokenLeadingCommnets || !tokenLeadingCommnets.length || tokenLeadingCommnets[0].pos >= startPosition) {
return {
@@ -84912,7 +87862,7 @@ var ts;
}
var declaration = declarations[0];
// Clone name to remove leading trivia.
- var name = ts.getSynthesizedClone(declaration.name);
+ var name = ts.getSynthesizedClone(ts.getNameOfDeclaration(declaration));
var visibilityModifier = createVisibilityModifier(ts.getModifierFlags(declaration));
var modifiers = visibilityModifier ? ts.createNodeArray([visibilityModifier]) : undefined;
var type = checker.getWidenedType(checker.getTypeOfSymbolAtLocation(symbol, enclosingDeclaration));
@@ -84970,7 +87920,7 @@ var ts;
return undefined;
}
function signatureToMethodDeclaration(signature, enclosingDeclaration, body) {
- var signatureDeclaration = checker.signatureToSignatureDeclaration(signature, 151 /* MethodDeclaration */, enclosingDeclaration);
+ var signatureDeclaration = checker.signatureToSignatureDeclaration(signature, 151 /* MethodDeclaration */, enclosingDeclaration, ts.NodeBuilderFlags.SuppressAnyReturnType);
if (signatureDeclaration) {
signatureDeclaration.decorators = undefined;
signatureDeclaration.modifiers = modifiers;
@@ -84981,6 +87931,41 @@ var ts;
return signatureDeclaration;
}
}
+ function createMethodFromCallExpression(callExpression, methodName, includeTypeScriptSyntax, makeStatic) {
+ var parameters = createDummyParameters(callExpression.arguments.length, /*names*/ undefined, /*minArgumentCount*/ undefined, includeTypeScriptSyntax);
+ var typeParameters;
+ if (includeTypeScriptSyntax) {
+ var typeArgCount = ts.length(callExpression.typeArguments);
+ for (var i = 0; i < typeArgCount; i++) {
+ var name = typeArgCount < 8 ? String.fromCharCode(84 /* T */ + i) : "T" + i;
+ var typeParameter = ts.createTypeParameterDeclaration(name, /*constraint*/ undefined, /*defaultType*/ undefined);
+ (typeParameters ? typeParameters : typeParameters = []).push(typeParameter);
+ }
+ }
+ var newMethod = ts.createMethod(
+ /*decorators*/ undefined,
+ /*modifiers*/ makeStatic ? [ts.createToken(115 /* StaticKeyword */)] : undefined,
+ /*asteriskToken*/ undefined, methodName,
+ /*questionToken*/ undefined, typeParameters, parameters,
+ /*type*/ includeTypeScriptSyntax ? ts.createKeywordTypeNode(119 /* AnyKeyword */) : undefined, createStubbedMethodBody());
+ return newMethod;
+ }
+ codefix.createMethodFromCallExpression = createMethodFromCallExpression;
+ function createDummyParameters(argCount, names, minArgumentCount, addAnyType) {
+ var parameters = [];
+ for (var i = 0; i < argCount; i++) {
+ var newParameter = ts.createParameter(
+ /*decorators*/ undefined,
+ /*modifiers*/ undefined,
+ /*dotDotDotToken*/ undefined,
+ /*name*/ names && names[i] || "arg" + i,
+ /*questionToken*/ minArgumentCount !== undefined && i >= minArgumentCount ? ts.createToken(55 /* QuestionToken */) : undefined,
+ /*type*/ addAnyType ? ts.createKeywordTypeNode(119 /* AnyKeyword */) : undefined,
+ /*initializer*/ undefined);
+ parameters.push(newParameter);
+ }
+ return parameters;
+ }
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,
@@ -85001,17 +87986,7 @@ var ts;
}
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(119 /* AnyKeyword */);
- var newParameter = ts.createParameter(
- /*decorators*/ undefined,
- /*modifiers*/ undefined,
- /*dotDotDotToken*/ undefined, maxArgsParameterSymbolNames[i],
- /*questionToken*/ i >= minArgumentCount ? ts.createToken(55 /* QuestionToken */) : undefined, anyType,
- /*initializer*/ undefined);
- parameters.push(newParameter);
- }
+ var parameters = createDummyParameters(maxNonRestArgs, maxArgsParameterSymbolNames, minArgumentCount, /*addAnyType*/ true);
if (someSigHasRestParameter) {
var anyArrayType = ts.createArrayTypeNode(ts.createKeywordTypeNode(119 /* AnyKeyword */));
var restParameter = ts.createParameter(
@@ -85026,7 +88001,7 @@ var ts;
/*returnType*/ undefined);
}
function createStubbedMethod(modifiers, name, optional, typeParameters, parameters, returnType) {
- return ts.createMethodDeclaration(
+ return ts.createMethod(
/*decorators*/ undefined, modifiers,
/*asteriskToken*/ undefined, name, optional ? ts.createToken(55 /* QuestionToken */) : undefined, typeParameters, parameters, returnType, createStubbedMethodBody());
}
@@ -85049,15 +88024,215 @@ var ts;
})(ts || (ts = {}));
/// <reference path="fixClassIncorrectlyImplementsInterface.ts" />
/// <reference path="fixAddMissingMember.ts" />
+/// <reference path="fixSpelling.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='fixUnusedIdentifier.ts' />
/// <reference path='importFixes.ts' />
/// <reference path='disableJsDiagnostics.ts' />
/// <reference path='helpers.ts' />
+/* @internal */
+var ts;
+(function (ts) {
+ var refactor;
+ (function (refactor) {
+ var actionName = "convert";
+ var convertFunctionToES6Class = {
+ name: "Convert to ES2015 class",
+ description: ts.Diagnostics.Convert_function_to_an_ES2015_class.message,
+ getEditsForAction: getEditsForAction,
+ getAvailableActions: getAvailableActions
+ };
+ refactor.registerRefactor(convertFunctionToES6Class);
+ function getAvailableActions(context) {
+ var start = context.startPosition;
+ var node = ts.getTokenAtPosition(context.file, start, /*includeJsDocComment*/ false);
+ var checker = context.program.getTypeChecker();
+ var symbol = checker.getSymbolAtLocation(node);
+ if (symbol && ts.isDeclarationOfFunctionOrClassExpression(symbol)) {
+ symbol = symbol.valueDeclaration.initializer.symbol;
+ }
+ if (symbol && (symbol.flags & 16 /* Function */) && symbol.members && (symbol.members.size > 0)) {
+ return [
+ {
+ name: convertFunctionToES6Class.name,
+ description: convertFunctionToES6Class.description,
+ actions: [
+ {
+ description: convertFunctionToES6Class.description,
+ name: actionName
+ }
+ ]
+ }
+ ];
+ }
+ }
+ function getEditsForAction(context, action) {
+ // Somehow wrong action got invoked?
+ if (actionName !== action) {
+ return undefined;
+ }
+ var start = context.startPosition;
+ var sourceFile = context.file;
+ var checker = context.program.getTypeChecker();
+ var token = ts.getTokenAtPosition(sourceFile, start, /*includeJsDocComment*/ false);
+ var ctorSymbol = checker.getSymbolAtLocation(token);
+ var newLine = context.rulesProvider.getFormatOptions().newLineCharacter;
+ var deletedNodes = [];
+ var deletes = [];
+ if (!(ctorSymbol.flags & (16 /* Function */ | 3 /* Variable */))) {
+ return undefined;
+ }
+ var ctorDeclaration = ctorSymbol.valueDeclaration;
+ var changeTracker = ts.textChanges.ChangeTracker.fromCodeFixContext(context);
+ var precedingNode;
+ var newClassDeclaration;
+ switch (ctorDeclaration.kind) {
+ case 228 /* FunctionDeclaration */:
+ precedingNode = ctorDeclaration;
+ deleteNode(ctorDeclaration);
+ newClassDeclaration = createClassFromFunctionDeclaration(ctorDeclaration);
+ break;
+ case 226 /* VariableDeclaration */:
+ precedingNode = ctorDeclaration.parent.parent;
+ if (ctorDeclaration.parent.declarations.length === 1) {
+ deleteNode(precedingNode);
+ }
+ else {
+ deleteNode(ctorDeclaration, /*inList*/ true);
+ }
+ newClassDeclaration = createClassFromVariableDeclaration(ctorDeclaration);
+ break;
+ }
+ if (!newClassDeclaration) {
+ return undefined;
+ }
+ // Because the preceding node could be touched, we need to insert nodes before delete nodes.
+ changeTracker.insertNodeAfter(sourceFile, precedingNode, newClassDeclaration, { suffix: newLine });
+ for (var _i = 0, deletes_1 = deletes; _i < deletes_1.length; _i++) {
+ var deleteCallback = deletes_1[_i];
+ deleteCallback();
+ }
+ return {
+ edits: changeTracker.getChanges()
+ };
+ function deleteNode(node, inList) {
+ if (inList === void 0) { inList = false; }
+ if (deletedNodes.some(function (n) { return ts.isNodeDescendantOf(node, n); })) {
+ // Parent node has already been deleted; do nothing
+ return;
+ }
+ deletedNodes.push(node);
+ if (inList) {
+ deletes.push(function () { return changeTracker.deleteNodeInList(sourceFile, node); });
+ }
+ else {
+ deletes.push(function () { return changeTracker.deleteNode(sourceFile, node); });
+ }
+ }
+ function createClassElementsFromSymbol(symbol) {
+ var memberElements = [];
+ // all instance members are stored in the "member" array of symbol
+ if (symbol.members) {
+ symbol.members.forEach(function (member) {
+ var memberElement = createClassElement(member, /*modifiers*/ undefined);
+ if (memberElement) {
+ memberElements.push(memberElement);
+ }
+ });
+ }
+ // all static members are stored in the "exports" array of symbol
+ if (symbol.exports) {
+ symbol.exports.forEach(function (member) {
+ var memberElement = createClassElement(member, [ts.createToken(115 /* StaticKeyword */)]);
+ if (memberElement) {
+ memberElements.push(memberElement);
+ }
+ });
+ }
+ return memberElements;
+ function shouldConvertDeclaration(_target, source) {
+ // Right now the only thing we can convert are function expressions - other values shouldn't get
+ // transformed. We can update this once ES public class properties are available.
+ return ts.isFunctionLike(source);
+ }
+ function createClassElement(symbol, modifiers) {
+ // both properties and methods are bound as property symbols
+ if (!(symbol.flags & 4 /* Property */)) {
+ return;
+ }
+ var memberDeclaration = symbol.valueDeclaration;
+ var assignmentBinaryExpression = memberDeclaration.parent;
+ if (!shouldConvertDeclaration(memberDeclaration, assignmentBinaryExpression.right)) {
+ return;
+ }
+ // delete the entire statement if this expression is the sole expression to take care of the semicolon at the end
+ var nodeToDelete = assignmentBinaryExpression.parent && assignmentBinaryExpression.parent.kind === 210 /* ExpressionStatement */
+ ? assignmentBinaryExpression.parent : assignmentBinaryExpression;
+ deleteNode(nodeToDelete);
+ if (!assignmentBinaryExpression.right) {
+ return ts.createProperty([], modifiers, symbol.name, /*questionToken*/ undefined,
+ /*type*/ undefined, /*initializer*/ undefined);
+ }
+ switch (assignmentBinaryExpression.right.kind) {
+ case 186 /* FunctionExpression */:
+ var functionExpression = assignmentBinaryExpression.right;
+ return ts.createMethod(/*decorators*/ undefined, modifiers, /*asteriskToken*/ undefined, memberDeclaration.name, /*questionToken*/ undefined,
+ /*typeParameters*/ undefined, functionExpression.parameters, /*type*/ undefined, functionExpression.body);
+ case 187 /* ArrowFunction */:
+ var arrowFunction = assignmentBinaryExpression.right;
+ var arrowFunctionBody = arrowFunction.body;
+ var bodyBlock = void 0;
+ // case 1: () => { return [1,2,3] }
+ if (arrowFunctionBody.kind === 207 /* Block */) {
+ bodyBlock = arrowFunctionBody;
+ }
+ else {
+ var expression = arrowFunctionBody;
+ bodyBlock = ts.createBlock([ts.createReturn(expression)]);
+ }
+ return ts.createMethod(/*decorators*/ undefined, modifiers, /*asteriskToken*/ undefined, memberDeclaration.name, /*questionToken*/ undefined,
+ /*typeParameters*/ undefined, arrowFunction.parameters, /*type*/ undefined, bodyBlock);
+ default:
+ // Don't try to declare members in JavaScript files
+ if (ts.isSourceFileJavaScript(sourceFile)) {
+ return;
+ }
+ return ts.createProperty(/*decorators*/ undefined, modifiers, memberDeclaration.name, /*questionToken*/ undefined,
+ /*type*/ undefined, assignmentBinaryExpression.right);
+ }
+ }
+ }
+ function createClassFromVariableDeclaration(node) {
+ var initializer = node.initializer;
+ if (!initializer || initializer.kind !== 186 /* FunctionExpression */) {
+ return undefined;
+ }
+ if (node.name.kind !== 71 /* Identifier */) {
+ return undefined;
+ }
+ var memberElements = createClassElementsFromSymbol(initializer.symbol);
+ if (initializer.body) {
+ memberElements.unshift(ts.createConstructor(/*decorators*/ undefined, /*modifiers*/ undefined, initializer.parameters, initializer.body));
+ }
+ return ts.createClassDeclaration(/*decorators*/ undefined, /*modifiers*/ undefined, node.name,
+ /*typeParameters*/ undefined, /*heritageClauses*/ undefined, memberElements);
+ }
+ function createClassFromFunctionDeclaration(node) {
+ var memberElements = createClassElementsFromSymbol(ctorSymbol);
+ if (node.body) {
+ memberElements.unshift(ts.createConstructor(/*decorators*/ undefined, /*modifiers*/ undefined, node.parameters, node.body));
+ }
+ return ts.createClassDeclaration(/*decorators*/ undefined, /*modifiers*/ undefined, node.name,
+ /*typeParameters*/ undefined, /*heritageClauses*/ undefined, memberElements);
+ }
+ }
+ })(refactor = ts.refactor || (ts.refactor = {}));
+})(ts || (ts = {}));
+/// <reference path="convertFunctionToEs6Class.ts" />
/// <reference path="..\compiler\program.ts"/>
/// <reference path="..\compiler\commandLineParser.ts"/>
/// <reference path='types.ts' />
@@ -85084,13 +88259,17 @@ var ts;
/// <reference path='formatting\smartIndenter.ts' />
/// <reference path='textChanges.ts' />
/// <reference path='codeFixProvider.ts' />
+/// <reference path='refactorProvider.ts' />
/// <reference path='codefixes\fixes.ts' />
+/// <reference path='refactors\refactors.ts' />
var ts;
(function (ts) {
/** The version of the language service API */
ts.servicesVersion = "0.5";
+ /* @internal */
+ var ruleProvider;
function createNode(kind, pos, end, parent) {
- var node = kind >= 143 /* FirstNode */ ? new NodeObject(kind, pos, end) :
+ var node = ts.isNodeKind(kind) ? new NodeObject(kind, pos, end) :
kind === 71 /* Identifier */ ? new IdentifierObject(71 /* Identifier */, pos, end) :
new TokenObject(kind, pos, end);
node.parent = parent;
@@ -85135,10 +88314,11 @@ var ts;
}
return sourceFile.text.substring(this.getStart(sourceFile), this.getEnd());
};
- NodeObject.prototype.addSyntheticNodes = function (nodes, pos, end, useJSDocScanner) {
+ NodeObject.prototype.addSyntheticNodes = function (nodes, pos, end) {
ts.scanner.setTextPos(pos);
while (pos < end) {
- var token = useJSDocScanner ? ts.scanner.scanJSDocToken() : ts.scanner.scan();
+ var token = ts.scanner.scan();
+ ts.Debug.assert(token !== 1 /* EndOfFileToken */); // Else it would infinitely loop
var textPos = ts.scanner.getTextPos();
if (textPos <= end) {
nodes.push(createNode(token, pos, textPos, this));
@@ -85148,7 +88328,7 @@ var ts;
return pos;
};
NodeObject.prototype.createSyntaxList = function (nodes) {
- var list = createNode(294 /* SyntaxList */, nodes.pos, nodes.end, this);
+ var list = createNode(295 /* SyntaxList */, nodes.pos, nodes.end, this);
list._children = [];
var pos = nodes.pos;
for (var _i = 0, nodes_9 = nodes; _i < nodes_9.length; _i++) {
@@ -85166,47 +88346,49 @@ var ts;
};
NodeObject.prototype.createChildren = function (sourceFile) {
var _this = this;
- var children;
- if (this.kind >= 143 /* FirstNode */) {
- ts.scanner.setText((sourceFile || this.getSourceFile()).text);
- children = [];
- var pos_3 = this.pos;
- var useJSDocScanner_1 = this.kind >= 283 /* FirstJSDocTagNode */ && this.kind <= 293 /* LastJSDocTagNode */;
- var processNode = function (node) {
- var isJSDocTagNode = ts.isJSDocTag(node);
- if (!isJSDocTagNode && pos_3 < node.pos) {
- pos_3 = _this.addSyntheticNodes(children, pos_3, node.pos, useJSDocScanner_1);
- }
- children.push(node);
- if (!isJSDocTagNode) {
- pos_3 = node.end;
- }
- };
- var processNodes = function (nodes) {
- if (pos_3 < nodes.pos) {
- pos_3 = _this.addSyntheticNodes(children, pos_3, nodes.pos, useJSDocScanner_1);
- }
- children.push(_this.createSyntaxList(nodes));
- pos_3 = nodes.end;
- };
- // jsDocComments need to be the first children
- if (this.jsDoc) {
- for (var _i = 0, _a = this.jsDoc; _i < _a.length; _i++) {
- var jsDocComment = _a[_i];
- processNode(jsDocComment);
- }
+ if (!ts.isNodeKind(this.kind)) {
+ this._children = ts.emptyArray;
+ return;
+ }
+ if (ts.isJSDocCommentContainingNode(this)) {
+ /** Don't add trivia for "tokens" since this is in a comment. */
+ var children_3 = [];
+ this.forEachChild(function (child) { children_3.push(child); });
+ this._children = children_3;
+ return;
+ }
+ var children = [];
+ ts.scanner.setText((sourceFile || this.getSourceFile()).text);
+ var pos = this.pos;
+ var processNode = function (node) {
+ pos = _this.addSyntheticNodes(children, pos, node.pos);
+ children.push(node);
+ pos = node.end;
+ };
+ var processNodes = function (nodes) {
+ if (pos < nodes.pos) {
+ pos = _this.addSyntheticNodes(children, pos, nodes.pos);
}
- // For syntactic classifications, all trivia are classcified together, including jsdoc comments.
- // For that to work, the jsdoc comments should still be the leading trivia of the first child.
- // Restoring the scanner position ensures that.
- pos_3 = this.pos;
- ts.forEachChild(this, processNode, processNodes);
- if (pos_3 < this.end) {
- this.addSyntheticNodes(children, pos_3, this.end);
+ children.push(_this.createSyntaxList(nodes));
+ pos = nodes.end;
+ };
+ // jsDocComments need to be the first children
+ if (this.jsDoc) {
+ for (var _i = 0, _a = this.jsDoc; _i < _a.length; _i++) {
+ var jsDocComment = _a[_i];
+ processNode(jsDocComment);
}
- ts.scanner.setText(undefined);
}
- this._children = children || ts.emptyArray;
+ // For syntactic classifications, all trivia are classcified together, including jsdoc comments.
+ // For that to work, the jsdoc comments should still be the leading trivia of the first child.
+ // Restoring the scanner position ensures that.
+ pos = this.pos;
+ ts.forEachChild(this, processNode, processNodes);
+ if (pos < this.end) {
+ this.addSyntheticNodes(children, pos, this.end);
+ }
+ ts.scanner.setText(undefined);
+ this._children = children;
};
NodeObject.prototype.getChildCount = function (sourceFile) {
if (!this._children)
@@ -85228,7 +88410,7 @@ var ts;
if (!children.length) {
return undefined;
}
- var child = ts.find(children, function (kid) { return kid.kind < 267 /* FirstJSDocNode */ || kid.kind > 293 /* LastJSDocNode */; });
+ var child = ts.find(children, function (kid) { return kid.kind < 267 /* FirstJSDocNode */ || kid.kind > 294 /* LastJSDocNode */; });
return child.kind < 143 /* FirstNode */ ?
child :
child.getFirstToken(sourceFile);
@@ -85473,13 +88655,14 @@ var ts;
return declarations;
}
function getDeclarationName(declaration) {
- if (declaration.name) {
- var result_7 = getTextOfIdentifierOrLiteral(declaration.name);
- if (result_7 !== undefined) {
- return result_7;
+ var name = ts.getNameOfDeclaration(declaration);
+ if (name) {
+ var result_8 = getTextOfIdentifierOrLiteral(name);
+ if (result_8 !== undefined) {
+ return result_8;
}
- if (declaration.name.kind === 144 /* ComputedPropertyName */) {
- var expr = declaration.name.expression;
+ if (name.kind === 144 /* ComputedPropertyName */) {
+ var expr = name.expression;
if (expr.kind === 179 /* PropertyAccessExpression */) {
return expr.name.text;
}
@@ -85554,8 +88737,9 @@ var ts;
ts.forEachChild(decl.name, visit);
break;
}
- if (decl.initializer)
+ if (decl.initializer) {
visit(decl.initializer);
+ }
}
// falls through
case 264 /* EnumMember */:
@@ -85598,6 +88782,17 @@ var ts;
};
return SourceFileObject;
}(NodeObject));
+ var SourceMapSourceObject = (function () {
+ function SourceMapSourceObject(fileName, text, skipTrivia) {
+ this.fileName = fileName;
+ this.text = text;
+ this.skipTrivia = skipTrivia;
+ }
+ SourceMapSourceObject.prototype.getLineAndCharacterOfPosition = function (pos) {
+ return ts.getLineAndCharacterOfPosition(this, pos);
+ };
+ return SourceMapSourceObject;
+ }());
function getServicesObjectAllocator() {
return {
getNodeConstructor: function () { return NodeObject; },
@@ -85607,6 +88802,7 @@ var ts;
getSymbolConstructor: function () { return SymbolObject; },
getTypeConstructor: function () { return TypeObject; },
getSignatureConstructor: function () { return SignatureObject; },
+ getSourceMapSourceConstructor: function () { return SourceMapSourceObject; },
};
}
function toEditorSettings(optionsAsMap) {
@@ -85658,7 +88854,6 @@ var ts;
var HostCache = (function () {
function HostCache(host, getCanonicalFileName) {
this.host = host;
- this.getCanonicalFileName = getCanonicalFileName;
// script id => script index
this.currentDirectory = host.getCurrentDirectory();
this.fileNameToEntry = ts.createFileMap();
@@ -85688,19 +88883,15 @@ var ts;
this.fileNameToEntry.set(path, entry);
return entry;
};
- HostCache.prototype.getEntry = function (path) {
+ HostCache.prototype.getEntryByPath = function (path) {
return this.fileNameToEntry.get(path);
};
- HostCache.prototype.contains = function (path) {
+ HostCache.prototype.containsEntryByPath = function (path) {
return this.fileNameToEntry.contains(path);
};
- HostCache.prototype.getOrCreateEntry = function (fileName) {
- var path = ts.toPath(fileName, this.currentDirectory, this.getCanonicalFileName);
- return this.getOrCreateEntryByPath(fileName, path);
- };
HostCache.prototype.getOrCreateEntryByPath = function (fileName, path) {
- return this.contains(path)
- ? this.getEntry(path)
+ return this.containsEntryByPath(path)
+ ? this.getEntryByPath(path)
: this.createEntry(fileName, path);
};
HostCache.prototype.getRootFileNames = function () {
@@ -85713,11 +88904,11 @@ var ts;
return fileNames;
};
HostCache.prototype.getVersion = function (path) {
- var file = this.getEntry(path);
+ var file = this.getEntryByPath(path);
return file && file.version;
};
HostCache.prototype.getScriptSnapshot = function (path) {
- var file = this.getEntry(path);
+ var file = this.getEntryByPath(path);
return file && file.scriptSnapshot;
};
return HostCache;
@@ -85864,7 +89055,7 @@ var ts;
function createLanguageService(host, documentRegistry) {
if (documentRegistry === void 0) { documentRegistry = ts.createDocumentRegistry(host.useCaseSensitiveFileNames && host.useCaseSensitiveFileNames(), host.getCurrentDirectory()); }
var syntaxTreeCache = new SyntaxTreeCache(host);
- var ruleProvider;
+ ruleProvider = ruleProvider || new ts.formatting.RulesProvider();
var program;
var lastProjectVersion;
var lastTypesRootVersion = 0;
@@ -85889,10 +89080,6 @@ var ts;
return sourceFile;
}
function getRuleProvider(options) {
- // Ensure rules are initialized and up to date wrt to formatting options
- if (!ruleProvider) {
- ruleProvider = new ts.formatting.RulesProvider();
- }
ruleProvider.ensureUpToDate(options);
return ruleProvider;
}
@@ -85949,12 +89136,19 @@ var ts;
getCurrentDirectory: function () { return currentDirectory; },
fileExists: function (fileName) {
// stub missing host functionality
- return hostCache.getOrCreateEntry(fileName) !== undefined;
+ var path = ts.toPath(fileName, currentDirectory, getCanonicalFileName);
+ return hostCache.containsEntryByPath(path) ?
+ !!hostCache.getEntryByPath(path) :
+ (host.fileExists && host.fileExists(fileName));
},
readFile: function (fileName) {
// stub missing host functionality
- var entry = hostCache.getOrCreateEntry(fileName);
- return entry && entry.scriptSnapshot.getText(0, entry.scriptSnapshot.getLength());
+ var path = ts.toPath(fileName, currentDirectory, getCanonicalFileName);
+ if (hostCache.containsEntryByPath(path)) {
+ var entry = hostCache.getEntryByPath(path);
+ return entry && entry.scriptSnapshot.getText(0, entry.scriptSnapshot.getLength());
+ }
+ return host.readFile && host.readFile(fileName);
},
directoryExists: function (directoryName) {
return ts.directoryProbablyExists(directoryName, host);
@@ -86087,7 +89281,9 @@ var ts;
ts.forEach(program.getSourceFiles(), function (f) {
return documentRegistry.releaseDocument(f.fileName, program.getCompilerOptions());
});
+ program = undefined;
}
+ host = undefined;
}
/// Diagnostics
function getSyntacticDiagnostics(fileName) {
@@ -86130,7 +89326,7 @@ var ts;
function getQuickInfoAtPosition(fileName, position) {
synchronizeHostData();
var sourceFile = getValidSourceFile(fileName);
- var node = ts.getTouchingPropertyName(sourceFile, position);
+ var node = ts.getTouchingPropertyName(sourceFile, position, /*includeJsDocComment*/ true);
if (node === sourceFile) {
return undefined;
}
@@ -86185,7 +89381,7 @@ var ts;
/// Goto implementation
function getImplementationAtPosition(fileName, position) {
synchronizeHostData();
- return ts.FindAllReferences.getImplementationsAtPosition(program.getTypeChecker(), cancellationToken, program.getSourceFiles(), getValidSourceFile(fileName), position);
+ return ts.FindAllReferences.getImplementationsAtPosition(program, cancellationToken, program.getSourceFiles(), getValidSourceFile(fileName), position);
}
/// References and Occurrences
function getOccurrencesAtPosition(fileName, position) {
@@ -86202,7 +89398,7 @@ var ts;
synchronizeHostData();
var sourceFilesToSearch = ts.map(filesToSearch, function (f) { return program.getSourceFile(f); });
var sourceFile = getValidSourceFile(fileName);
- return ts.DocumentHighlights.getDocumentHighlights(program.getTypeChecker(), cancellationToken, sourceFile, position, sourceFilesToSearch);
+ return ts.DocumentHighlights.getDocumentHighlights(program, cancellationToken, sourceFile, position, sourceFilesToSearch);
}
function getOccurrencesAtPositionCore(fileName, position) {
return convertDocumentHighlights(getDocumentHighlights(fileName, position, [fileName]));
@@ -86235,11 +89431,11 @@ var ts;
}
function getReferences(fileName, position, options) {
synchronizeHostData();
- return ts.FindAllReferences.findReferencedEntries(program.getTypeChecker(), cancellationToken, program.getSourceFiles(), getValidSourceFile(fileName), position, options);
+ return ts.FindAllReferences.findReferencedEntries(program, cancellationToken, program.getSourceFiles(), getValidSourceFile(fileName), position, options);
}
function findReferences(fileName, position) {
synchronizeHostData();
- return ts.FindAllReferences.findReferencedSymbols(program.getTypeChecker(), cancellationToken, program.getSourceFiles(), getValidSourceFile(fileName), position);
+ return ts.FindAllReferences.findReferencedSymbols(program, cancellationToken, program.getSourceFiles(), getValidSourceFile(fileName), position);
}
/// NavigateTo
function getNavigateToItems(searchValue, maxResultCount, fileName, excludeDtsFiles) {
@@ -86284,7 +89480,7 @@ var ts;
function getNameOrDottedNameSpan(fileName, startPos, _endPos) {
var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName);
// Get node at the location
- var node = ts.getTouchingPropertyName(sourceFile, startPos);
+ var node = ts.getTouchingPropertyName(sourceFile, startPos, /*includeJsDocComment*/ false);
if (node === sourceFile) {
return;
}
@@ -86378,7 +89574,7 @@ var ts;
function getBraceMatchingAtPosition(fileName, position) {
var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName);
var result = [];
- var token = ts.getTouchingToken(sourceFile, position);
+ var token = ts.getTouchingToken(sourceFile, position, /*includeJsDocComment*/ false);
if (token.getStart(sourceFile) === position) {
var matchKind = getMatchingTokenKind(token);
// Ensure that there is a corresponding token to match ours.
@@ -86542,8 +89738,7 @@ var ts;
var matchPosition = matchArray.index + preamble.length;
// OK, we have found a match in the file. This is only an acceptable match if
// it is contained within a comment.
- var token = ts.getTokenAtPosition(sourceFile, matchPosition);
- if (!ts.isInsideComment(sourceFile, token, matchPosition)) {
+ if (!ts.isInComment(sourceFile, matchPosition)) {
continue;
}
var descriptor = undefined;
@@ -86631,6 +89826,28 @@ var ts;
var defaultLibFileName = host.getDefaultLibFileName(host.getCompilationSettings());
return ts.Rename.getRenameInfo(program.getTypeChecker(), defaultLibFileName, getCanonicalFileName, getValidSourceFile(fileName), position);
}
+ function getRefactorContext(file, positionOrRange, formatOptions) {
+ var _a = typeof positionOrRange === "number" ? [positionOrRange, undefined] : [positionOrRange.pos, positionOrRange.end], startPosition = _a[0], endPosition = _a[1];
+ return {
+ file: file,
+ startPosition: startPosition,
+ endPosition: endPosition,
+ program: getProgram(),
+ newLineCharacter: host.getNewLine(),
+ rulesProvider: getRuleProvider(formatOptions),
+ cancellationToken: cancellationToken
+ };
+ }
+ function getApplicableRefactors(fileName, positionOrRange) {
+ synchronizeHostData();
+ var file = getValidSourceFile(fileName);
+ return ts.refactor.getApplicableRefactors(getRefactorContext(file, positionOrRange));
+ }
+ function getEditsForRefactor(fileName, formatOptions, positionOrRange, refactorName, actionName) {
+ synchronizeHostData();
+ var file = getValidSourceFile(fileName);
+ return ts.refactor.getEditsForRefactor(getRefactorContext(file, positionOrRange, formatOptions), refactorName, actionName);
+ }
return {
dispose: dispose,
cleanupSemanticCache: cleanupSemanticCache,
@@ -86673,7 +89890,9 @@ var ts;
getEmitOutput: getEmitOutput,
getNonBoundSourceFile: getNonBoundSourceFile,
getSourceFile: getSourceFile,
- getProgram: getProgram
+ getProgram: getProgram,
+ getApplicableRefactors: getApplicableRefactors,
+ getEditsForRefactor: getEditsForRefactor,
};
}
ts.createLanguageService = createLanguageService;
@@ -86761,20 +89980,20 @@ var ts;
var contextualType = typeChecker.getContextualType(objectLiteral);
var name = ts.getTextOfPropertyName(node.name);
if (name && contextualType) {
- var result_8 = [];
+ var result_9 = [];
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);
+ result_9.push(symbol);
}
});
- return result_8;
+ return result_9;
}
if (symbol) {
- result_8.push(symbol);
- return result_8;
+ result_9.push(symbol);
+ return result_9;
}
}
return undefined;
@@ -86817,7 +90036,7 @@ var ts;
if (sourceFile.isDeclarationFile) {
return undefined;
}
- var tokenAtLocation = ts.getTokenAtPosition(sourceFile, position);
+ var tokenAtLocation = ts.getTokenAtPosition(sourceFile, position, /*includeJsDocComment*/ false);
var lineOfPosition = sourceFile.getLineAndCharacterOfPosition(position).line;
if (sourceFile.getLineAndCharacterOfPosition(tokenAtLocation.getStart(sourceFile)).line > lineOfPosition) {
// Get previous token if the token is returned starts on new line
@@ -88032,6 +91251,9 @@ 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 (result.resolvedModule && result.resolvedModule.extension !== ts.Extension.Ts && result.resolvedModule.extension !== ts.Extension.Tsx && result.resolvedModule.extension !== ts.Extension.Dts) {
+ resolvedFileName = undefined;
+ }
return {
resolvedFileName: resolvedFileName,
failedLookupLocations: result.failedLookupLocations
@@ -88205,4 +91427,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.3";
+var toolsVersion = "2.4";
diff --git a/node_modules/typedoc/node_modules/typescript/lib/typingsInstaller.js b/node_modules/typedoc/node_modules/typescript/lib/typingsInstaller.js
index 80d869a26..803270f7e 100644
--- a/node_modules/typedoc/node_modules/typescript/lib/typingsInstaller.js
+++ b/node_modules/typedoc/node_modules/typescript/lib/typingsInstaller.js
@@ -1,18 +1,18 @@
-/*! *****************************************************************************
-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.
+***************************************************************************** */
+
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -40,12 +40,20 @@ var ts;
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[NodeBuilderFlags["NoTruncation"] = 1] = "NoTruncation";
+ NodeBuilderFlags[NodeBuilderFlags["WriteArrayAsGenericType"] = 2] = "WriteArrayAsGenericType";
+ NodeBuilderFlags[NodeBuilderFlags["WriteTypeArgumentsOfSignature"] = 32] = "WriteTypeArgumentsOfSignature";
+ NodeBuilderFlags[NodeBuilderFlags["UseFullyQualifiedType"] = 64] = "UseFullyQualifiedType";
+ NodeBuilderFlags[NodeBuilderFlags["SuppressAnyReturnType"] = 256] = "SuppressAnyReturnType";
+ NodeBuilderFlags[NodeBuilderFlags["WriteTypeParametersInQualifiedName"] = 512] = "WriteTypeParametersInQualifiedName";
+ NodeBuilderFlags[NodeBuilderFlags["AllowThisInObjectLiteral"] = 1024] = "AllowThisInObjectLiteral";
+ NodeBuilderFlags[NodeBuilderFlags["AllowQualifedNameInPlaceOfIdentifier"] = 2048] = "AllowQualifedNameInPlaceOfIdentifier";
+ NodeBuilderFlags[NodeBuilderFlags["AllowAnonymousIdentifier"] = 8192] = "AllowAnonymousIdentifier";
+ NodeBuilderFlags[NodeBuilderFlags["AllowEmptyUnionOrIntersection"] = 16384] = "AllowEmptyUnionOrIntersection";
+ NodeBuilderFlags[NodeBuilderFlags["AllowEmptyTuple"] = 32768] = "AllowEmptyTuple";
+ NodeBuilderFlags[NodeBuilderFlags["IgnoreErrors"] = 60416] = "IgnoreErrors";
+ NodeBuilderFlags[NodeBuilderFlags["InObjectTypeLiteral"] = 1048576] = "InObjectTypeLiteral";
+ NodeBuilderFlags[NodeBuilderFlags["InTypeAlias"] = 8388608] = "InTypeAlias";
})(NodeBuilderFlags = ts.NodeBuilderFlags || (ts.NodeBuilderFlags = {}));
var TypeReferenceSerializationKind;
(function (TypeReferenceSerializationKind) {
@@ -80,6 +88,7 @@ var ts;
ModuleKind[ModuleKind["UMD"] = 3] = "UMD";
ModuleKind[ModuleKind["System"] = 4] = "System";
ModuleKind[ModuleKind["ES2015"] = 5] = "ES2015";
+ ModuleKind[ModuleKind["ESNext"] = 6] = "ESNext";
})(ModuleKind = ts.ModuleKind || (ts.ModuleKind = {}));
var Extension;
(function (Extension) {
@@ -152,7 +161,7 @@ var ts;
})(ts || (ts = {}));
var ts;
(function (ts) {
- ts.version = "2.3.2";
+ ts.version = "2.4.1";
})(ts || (ts = {}));
(function (ts) {
ts.collator = typeof Intl === "object" && typeof Intl.Collator === "function" ? new Intl.Collator(undefined, { usage: "sort", sensitivity: "accent" }) : undefined;
@@ -169,10 +178,11 @@ var ts;
ts.createMap = createMap;
function createMapFromTemplate(template) {
var map = new MapCtr();
- for (var key in template)
+ for (var key in template) {
if (hasOwnProperty.call(template, key)) {
map.set(key, template[key]);
}
+ }
return map;
}
ts.createMapFromTemplate = createMapFromTemplate;
@@ -325,6 +335,15 @@ var ts;
}
}
ts.zipWith = zipWith;
+ function zipToMap(keys, values) {
+ Debug.assert(keys.length === values.length);
+ var map = createMap();
+ for (var i = 0; i < keys.length; ++i) {
+ map.set(keys[i], values[i]);
+ }
+ return map;
+ }
+ ts.zipToMap = zipToMap;
function every(array, callback) {
if (array) {
for (var i = 0; i < array.length; i++) {
@@ -529,6 +548,40 @@ var ts;
return result;
}
ts.flatMap = flatMap;
+ function sameFlatMap(array, mapfn) {
+ var result;
+ if (array) {
+ for (var i = 0; i < array.length; i++) {
+ var item = array[i];
+ var mapped = mapfn(item, i);
+ if (result || item !== mapped || isArray(mapped)) {
+ if (!result) {
+ result = array.slice(0, i);
+ }
+ if (isArray(mapped)) {
+ addRange(result, mapped);
+ }
+ else {
+ result.push(mapped);
+ }
+ }
+ }
+ }
+ return result || array;
+ }
+ ts.sameFlatMap = sameFlatMap;
+ function mapDefined(array, mapFn) {
+ var result = [];
+ for (var i = 0; i < array.length; i++) {
+ var item = array[i];
+ var mapped = mapFn(item, i);
+ if (mapped !== undefined) {
+ result.push(mapped);
+ }
+ }
+ return result;
+ }
+ ts.mapDefined = mapDefined;
function span(array, f) {
if (array) {
for (var i = 0; i < array.length; i++) {
@@ -722,12 +775,21 @@ var ts;
return to;
}
ts.append = append;
- function addRange(to, from) {
+ function toOffset(array, offset) {
+ return offset < 0 ? array.length + offset : offset;
+ }
+ function addRange(to, from, start, end) {
if (from === undefined)
return to;
- for (var _i = 0, from_1 = from; _i < from_1.length; _i++) {
- var v = from_1[_i];
- to = append(to, v);
+ if (to === undefined)
+ return from.slice(start, end);
+ start = start === undefined ? 0 : toOffset(from, start);
+ end = end === undefined ? from.length : toOffset(from, end);
+ for (var i = start; i < end && i < from.length; i++) {
+ var v = from[i];
+ if (v !== undefined) {
+ to.push(from[i]);
+ }
}
return to;
}
@@ -750,16 +812,22 @@ var ts;
return true;
}
ts.rangeEquals = rangeEquals;
+ function elementAt(array, offset) {
+ if (array) {
+ offset = toOffset(array, offset);
+ if (offset < array.length) {
+ return array[offset];
+ }
+ }
+ return undefined;
+ }
+ ts.elementAt = elementAt;
function firstOrUndefined(array) {
- return array && array.length > 0
- ? array[0]
- : undefined;
+ return elementAt(array, 0);
}
ts.firstOrUndefined = firstOrUndefined;
function lastOrUndefined(array) {
- return array && array.length > 0
- ? array[array.length - 1]
- : undefined;
+ return elementAt(array, -1);
}
ts.lastOrUndefined = lastOrUndefined;
function singleOrUndefined(array) {
@@ -864,10 +932,11 @@ var ts;
ts.getProperty = getProperty;
function getOwnKeys(map) {
var keys = [];
- for (var key in map)
+ for (var key in map) {
if (hasOwnProperty.call(map, key)) {
keys.push(key);
}
+ }
return keys;
}
ts.getOwnKeys = getOwnKeys;
@@ -927,10 +996,11 @@ var ts;
}
for (var _a = 0, args_1 = args; _a < args_1.length; _a++) {
var arg = args_1[_a];
- for (var p in arg)
+ for (var p in arg) {
if (hasProperty(arg, p)) {
t[p] = arg[p];
}
+ }
}
return t;
}
@@ -940,18 +1010,20 @@ var ts;
return true;
if (!left || !right)
return false;
- for (var key in left)
+ for (var key in left) {
if (hasOwnProperty.call(left, key)) {
if (!hasOwnProperty.call(right, key) === undefined)
return false;
if (equalityComparer ? !equalityComparer(left[key], right[key]) : left[key] !== right[key])
return false;
}
- for (var key in right)
+ }
+ for (var key in right) {
if (hasOwnProperty.call(right, key)) {
if (!hasOwnProperty.call(left, key))
return false;
}
+ }
return true;
}
ts.equalOwnProperties = equalOwnProperties;
@@ -982,14 +1054,16 @@ var ts;
ts.clone = clone;
function extend(first, second) {
var result = {};
- for (var id in second)
+ for (var id in second) {
if (hasOwnProperty.call(second, id)) {
result[id] = second[id];
}
- for (var id in first)
+ }
+ for (var id in first) {
if (hasOwnProperty.call(first, id)) {
result[id] = first[id];
}
+ }
return result;
}
ts.extend = extend;
@@ -1023,6 +1097,16 @@ var ts;
return Array.isArray ? Array.isArray(value) : value instanceof Array;
}
ts.isArray = isArray;
+ function tryCast(value, test) {
+ return value !== undefined && test(value) ? value : undefined;
+ }
+ ts.tryCast = tryCast;
+ function cast(value, test) {
+ if (value !== undefined && test(value))
+ return value;
+ Debug.fail("Invalid cast. The supplied value did not pass the test '" + Debug.getFunctionName(test) + "'.");
+ }
+ ts.cast = cast;
function noop() { }
ts.noop = noop;
function notImplemented() {
@@ -1553,6 +1637,10 @@ var ts;
return str.lastIndexOf(prefix, 0) === 0;
}
ts.startsWith = startsWith;
+ function removePrefix(str, prefix) {
+ return startsWith(str, prefix) ? str.substr(prefix.length) : str;
+ }
+ ts.removePrefix = removePrefix;
function endsWith(str, suffix) {
var expectedPos = str.length - suffix.length;
return expectedPos >= 0 && str.indexOf(suffix, expectedPos) === expectedPos;
@@ -1566,7 +1654,7 @@ var ts;
return path.length > extension.length && endsWith(path, extension);
}
ts.fileExtensionIs = fileExtensionIs;
- function fileExtensionIsAny(path, extensions) {
+ function fileExtensionIsOneOf(path, extensions) {
for (var _i = 0, extensions_1 = extensions; _i < extensions_1.length; _i++) {
var extension = extensions_1[_i];
if (fileExtensionIs(path, extension)) {
@@ -1575,7 +1663,7 @@ var ts;
}
return false;
}
- ts.fileExtensionIsAny = fileExtensionIsAny;
+ ts.fileExtensionIsOneOf = fileExtensionIsOneOf;
var reservedCharacterPattern = /[^\w\s\/]/g;
var wildcardCharCodes = [42, 63];
var singleAsteriskRegexFragmentFiles = "([^./]|(\\.(?!min\\.js$))?)*";
@@ -1700,7 +1788,7 @@ var ts;
var _loop_1 = function (current) {
var name = combinePaths(path, current);
var absoluteName = combinePaths(absolutePath, current);
- if (extensions && !fileExtensionIsAny(name, extensions))
+ if (extensions && !fileExtensionIsOneOf(name, extensions))
return "continue";
if (excludeRegex && excludeRegex.test(absoluteName))
return "continue";
@@ -1880,8 +1968,11 @@ var ts;
this.name = name;
this.declarations = undefined;
}
- function Type(_checker, flags) {
+ function Type(checker, flags) {
this.flags = flags;
+ if (Debug.isDebugging) {
+ this.checker = checker;
+ }
}
function Signature() {
}
@@ -1896,6 +1987,11 @@ var ts;
this.parent = undefined;
this.original = undefined;
}
+ function SourceMapSource(fileName, text, skipTrivia) {
+ this.fileName = fileName;
+ this.text = text;
+ this.skipTrivia = skipTrivia || (function (pos) { return pos; });
+ }
ts.objectAllocator = {
getNodeConstructor: function () { return Node; },
getTokenConstructor: function () { return Node; },
@@ -1903,30 +1999,49 @@ var ts;
getSourceFileConstructor: function () { return Node; },
getSymbolConstructor: function () { return Symbol; },
getTypeConstructor: function () { return Type; },
- getSignatureConstructor: function () { return Signature; }
+ getSignatureConstructor: function () { return Signature; },
+ getSourceMapSourceConstructor: function () { return SourceMapSource; },
};
var Debug;
(function (Debug) {
Debug.currentAssertionLevel = 0;
+ Debug.isDebugging = false;
function shouldAssert(level) {
return Debug.currentAssertionLevel >= level;
}
Debug.shouldAssert = shouldAssert;
- function assert(expression, message, verboseDebugInfo) {
+ function assert(expression, message, verboseDebugInfo, stackCrawlMark) {
if (!expression) {
- var verboseDebugString = "";
if (verboseDebugInfo) {
- verboseDebugString = "\r\nVerbose Debug Information: " + verboseDebugInfo();
+ message += "\r\nVerbose Debug Information: " + verboseDebugInfo();
}
- debugger;
- throw new Error("Debug Failure. False expression: " + (message || "") + verboseDebugString);
+ fail(message ? "False expression: " + message : "False expression.", stackCrawlMark || assert);
}
}
Debug.assert = assert;
- function fail(message) {
- Debug.assert(false, message);
+ function fail(message, stackCrawlMark) {
+ debugger;
+ var e = new Error(message ? "Debug Failure. " : "Debug Failure.");
+ if (Error.captureStackTrace) {
+ Error.captureStackTrace(e, stackCrawlMark || fail);
+ }
+ throw e;
}
Debug.fail = fail;
+ function getFunctionName(func) {
+ if (typeof func !== "function") {
+ return "";
+ }
+ else if (func.hasOwnProperty("name")) {
+ return func.name;
+ }
+ else {
+ var text = Function.prototype.toString.call(func);
+ var match = /^function\s+([\w\$]+)\s*\(/.exec(text);
+ return match ? match[1] : "";
+ }
+ }
+ Debug.getFunctionName = getFunctionName;
})(Debug = ts.Debug || (ts.Debug = {}));
function orderedRemoveItem(array, item) {
for (var i = 0; i < array.length; i++) {
@@ -2348,6 +2463,7 @@ var ts;
realpath: function (path) {
return _fs.realpathSync(path);
},
+ debugMode: ts.some(process.execArgv, function (arg) { return /^--(inspect|debug)(-brk)?(=\d+)?$/i.test(arg); }),
tryEnableSourceMapsForHost: function () {
try {
require("source-map-support").install();
@@ -2426,6 +2542,9 @@ var ts;
? 1
: 0;
}
+ if (ts.sys && ts.sys.debugMode) {
+ ts.Debug.isDebugging = true;
+ }
})(ts || (ts = {}));
var ts;
(function (ts) {
@@ -2589,6 +2708,7 @@ var ts;
Line_terminator_not_permitted_before_arrow: { code: 1200, category: ts.DiagnosticCategory.Error, key: "Line_terminator_not_permitted_before_arrow_1200", message: "Line terminator not permitted before arrow." },
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: 1202, category: ts.DiagnosticCategory.Error, key: "Import_assignment_cannot_be_used_when_targeting_ECMAScript_2015_modules_Consider_using_import_Asteri_1202", message: "Import assignment cannot be used when targeting ECMAScript 2015 modules. Consider using 'import * as ns from \"mod\"', 'import {a} from \"mod\"', 'import d from \"mod\"', or another module format instead." },
Export_assignment_cannot_be_used_when_targeting_ECMAScript_2015_modules_Consider_using_export_default_or_another_module_format_instead: { code: 1203, category: ts.DiagnosticCategory.Error, key: "Export_assignment_cannot_be_used_when_targeting_ECMAScript_2015_modules_Consider_using_export_defaul_1203", message: "Export assignment cannot be used when targeting ECMAScript 2015 modules. Consider using 'export default' or another module format instead." },
+ Cannot_re_export_a_type_when_the_isolatedModules_flag_is_provided: { code: 1205, category: ts.DiagnosticCategory.Error, key: "Cannot_re_export_a_type_when_the_isolatedModules_flag_is_provided_1205", message: "Cannot re-export a type when the '--isolatedModules' flag is provided." },
Decorators_are_not_valid_here: { code: 1206, category: ts.DiagnosticCategory.Error, key: "Decorators_are_not_valid_here_1206", message: "Decorators are not valid here." },
Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name: { code: 1207, category: ts.DiagnosticCategory.Error, key: "Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name_1207", message: "Decorators cannot be applied to multiple get/set accessors of the same name." },
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." },
@@ -2650,6 +2770,10 @@ var ts;
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." },
+ Dynamic_import_cannot_be_used_when_targeting_ECMAScript_2015_modules: { code: 1323, category: ts.DiagnosticCategory.Error, key: "Dynamic_import_cannot_be_used_when_targeting_ECMAScript_2015_modules_1323", message: "Dynamic import cannot be used when targeting ECMAScript 2015 modules." },
+ Dynamic_import_must_have_one_specifier_as_an_argument: { code: 1324, category: ts.DiagnosticCategory.Error, key: "Dynamic_import_must_have_one_specifier_as_an_argument_1324", message: "Dynamic import must have one specifier as an argument." },
+ Specifier_of_dynamic_import_cannot_be_spread_element: { code: 1325, category: ts.DiagnosticCategory.Error, key: "Specifier_of_dynamic_import_cannot_be_spread_element_1325", message: "Specifier of dynamic import cannot be spread element." },
+ Dynamic_import_cannot_have_type_arguments: { code: 1326, category: ts.DiagnosticCategory.Error, key: "Dynamic_import_cannot_have_type_arguments_1326", message: "Dynamic import cannot have type arguments" },
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." },
@@ -2696,7 +2820,7 @@ var ts;
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." },
+ Call_target_does_not_contain_any_signatures: { code: 2346, category: ts.DiagnosticCategory.Error, key: "Call_target_does_not_contain_any_signatures_2346", message: "Call target does not contain any signatures." },
Untyped_function_calls_may_not_accept_type_arguments: { code: 2347, category: ts.DiagnosticCategory.Error, key: "Untyped_function_calls_may_not_accept_type_arguments_2347", message: "Untyped function calls may not accept type arguments." },
Value_of_type_0_is_not_callable_Did_you_mean_to_include_new: { code: 2348, category: ts.DiagnosticCategory.Error, key: "Value_of_type_0_is_not_callable_Did_you_mean_to_include_new_2348", message: "Value of type '{0}' is not callable. Did you mean to include 'new'?" },
Cannot_invoke_an_expression_whose_type_lacks_a_call_signature_Type_0_has_no_compatible_call_signatures: { code: 2349, category: ts.DiagnosticCategory.Error, key: "Cannot_invoke_an_expression_whose_type_lacks_a_call_signature_Type_0_has_no_compatible_call_signatur_2349", message: "Cannot invoke an expression whose type lacks a call signature. Type '{0}' has no compatible call signatures." },
@@ -2891,6 +3015,15 @@ var ts;
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." },
+ Property_0_does_not_exist_on_type_1_Did_you_mean_2: { code: 2551, category: ts.DiagnosticCategory.Error, key: "Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551", message: "Property '{0}' does not exist on type '{1}'. Did you mean '{2}'?" },
+ Cannot_find_name_0_Did_you_mean_1: { code: 2552, category: ts.DiagnosticCategory.Error, key: "Cannot_find_name_0_Did_you_mean_1_2552", message: "Cannot find name '{0}'. Did you mean '{1}'?" },
+ Computed_values_are_not_permitted_in_an_enum_with_string_valued_members: { code: 2553, category: ts.DiagnosticCategory.Error, key: "Computed_values_are_not_permitted_in_an_enum_with_string_valued_members_2553", message: "Computed values are not permitted in an enum with string valued members." },
+ Expected_0_arguments_but_got_1: { code: 2554, category: ts.DiagnosticCategory.Error, key: "Expected_0_arguments_but_got_1_2554", message: "Expected {0} arguments, but got {1}." },
+ Expected_at_least_0_arguments_but_got_1: { code: 2555, category: ts.DiagnosticCategory.Error, key: "Expected_at_least_0_arguments_but_got_1_2555", message: "Expected at least {0} arguments, but got {1}." },
+ Expected_0_arguments_but_got_a_minimum_of_1: { code: 2556, category: ts.DiagnosticCategory.Error, key: "Expected_0_arguments_but_got_a_minimum_of_1_2556", message: "Expected {0} arguments, but got a minimum of {1}." },
+ Expected_at_least_0_arguments_but_got_a_minimum_of_1: { code: 2557, category: ts.DiagnosticCategory.Error, key: "Expected_at_least_0_arguments_but_got_a_minimum_of_1_2557", message: "Expected at least {0} arguments, but got a minimum of {1}." },
+ Expected_0_type_arguments_but_got_1: { code: 2558, category: ts.DiagnosticCategory.Error, key: "Expected_0_type_arguments_but_got_1_2558", message: "Expected {0} type arguments, but got {1}." },
+ Type_0_has_no_properties_in_common_with_type_1: { code: 2559, category: ts.DiagnosticCategory.Error, key: "Type_0_has_no_properties_in_common_with_type_1_2559", message: "Type '{0}' has no properties in common with type '{1}'." },
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." },
@@ -2902,7 +3035,6 @@ var ts;
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}'." },
@@ -2961,6 +3093,8 @@ var ts;
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." },
_0_are_specified_twice_The_attribute_named_0_will_be_overwritten: { code: 2710, category: ts.DiagnosticCategory.Error, key: "_0_are_specified_twice_The_attribute_named_0_will_be_overwritten_2710", message: "'{0}' are specified twice. The attribute named '{0}' will be overwritten." },
+ A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option: { code: 2711, category: ts.DiagnosticCategory.Error, key: "A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES20_2711", message: "A dynamic import call returns a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your `--lib` option." },
+ A_dynamic_import_call_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: 2712, category: ts.DiagnosticCategory.Error, key: "A_dynamic_import_call_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declarat_2712", message: "A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option." },
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}'." },
@@ -3035,7 +3169,7 @@ var ts;
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." },
+ Property_0_of_exported_class_expression_may_not_be_private_or_protected: { code: 4094, category: ts.DiagnosticCategory.Error, key: "Property_0_of_exported_class_expression_may_not_be_private_or_protected_4094", message: "Property '{0}' of exported class expression may not be private or protected." },
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}'." },
@@ -3077,7 +3211,7 @@ var ts;
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_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'." },
+ Specify_module_code_generation_Colon_commonjs_amd_system_umd_es2015_or_ESNext: { code: 6016, category: ts.DiagnosticCategory.Message, key: "Specify_module_code_generation_Colon_commonjs_amd_system_umd_es2015_or_ESNext_6016", message: "Specify module code generation: 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'." },
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_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'." },
@@ -3186,6 +3320,7 @@ var ts;
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." },
+ Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1: { code: 6137, category: ts.DiagnosticCategory.Error, key: "Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1_6137", message: "Cannot import type declaration files. Consider importing '{0}' instead of '{1}'." },
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}'." },
@@ -3231,6 +3366,9 @@ var ts;
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}'" },
+ Reusing_resolution_of_module_0_to_file_1_from_old_program: { code: 6183, category: ts.DiagnosticCategory.Message, key: "Reusing_resolution_of_module_0_to_file_1_from_old_program_6183", message: "Reusing resolution of module '{0}' to file '{1}' from old program." },
+ Reusing_module_resolutions_originating_in_0_since_resolutions_are_unchanged_from_old_program: { code: 6184, category: ts.DiagnosticCategory.Message, key: "Reusing_module_resolutions_originating_in_0_since_resolutions_are_unchanged_from_old_program_6184", message: "Reusing module resolutions originating in '{0}' since resolutions are unchanged from old program." },
+ Disable_strict_checking_of_generic_signatures_in_function_types: { code: 6185, category: ts.DiagnosticCategory.Message, key: "Disable_strict_checking_of_generic_signatures_in_function_types_6185", message: "Disable strict checking of generic signatures in function types." },
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." },
@@ -3257,6 +3395,8 @@ var ts;
Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation: { code: 7032, category: ts.DiagnosticCategory.Error, key: "Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation_7032", message: "Property '{0}' implicitly has type 'any', because its set accessor lacks a parameter type annotation." },
Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation: { code: 7033, category: ts.DiagnosticCategory.Error, key: "Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation_7033", message: "Property '{0}' implicitly has type 'any', because its get accessor lacks a return type annotation." },
Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined: { code: 7034, category: ts.DiagnosticCategory.Error, key: "Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined_7034", message: "Variable '{0}' implicitly has type '{1}' in some locations where its type cannot be determined." },
+ Try_npm_install_types_Slash_0_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0: { code: 7035, category: ts.DiagnosticCategory.Error, key: "Try_npm_install_types_Slash_0_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_mod_7035", message: "Try `npm install @types/{0}` if it exists or add a new declaration (.d.ts) file containing `declare module '{0}';`" },
+ Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0: { code: 7036, category: ts.DiagnosticCategory.Error, key: "Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0_7036", message: "Dynamic import's specifier must be of type 'string', but here has type '{0}'." },
You_cannot_rename_this_element: { code: 8000, category: ts.DiagnosticCategory.Error, key: "You_cannot_rename_this_element_8000", message: "You cannot rename this element." },
You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library: { code: 8001, category: ts.DiagnosticCategory.Error, key: "You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library_8001", message: "You cannot rename elements that are defined in the standard TypeScript library." },
import_can_only_be_used_in_a_ts_file: { code: 8002, category: ts.DiagnosticCategory.Error, key: "import_can_only_be_used_in_a_ts_file_8002", message: "'import ... =' can only be used in a .ts file." },
@@ -3305,12 +3445,18 @@ var ts;
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}'." },
+ Declare_property_0: { code: 90016, category: ts.DiagnosticCategory.Message, key: "Declare_property_0_90016", message: "Declare property '{0}'." },
+ Add_index_signature_for_property_0: { code: 90017, category: ts.DiagnosticCategory.Message, key: "Add_index_signature_for_property_0_90017", message: "Add index signature for 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}'." },
+ Change_spelling_to_0: { code: 90022, category: ts.DiagnosticCategory.Message, key: "Change_spelling_to_0_90022", message: "Change spelling to '{0}'." },
+ Declare_method_0: { code: 90023, category: ts.DiagnosticCategory.Message, key: "Declare_method_0_90023", message: "Declare method '{0}'." },
+ Declare_static_method_0: { code: 90024, category: ts.DiagnosticCategory.Message, key: "Declare_static_method_0_90024", message: "Declare static method '{0}'." },
+ Prefix_0_with_an_underscore: { code: 90025, category: ts.DiagnosticCategory.Message, key: "Prefix_0_with_an_underscore_90025", message: "Prefix '{0}' with an underscore." },
+ Convert_function_to_an_ES2015_class: { code: 95001, category: ts.DiagnosticCategory.Message, key: "Convert_function_to_an_ES2015_class_95001", message: "Convert function to an ES2015 class" },
+ Convert_function_0_to_class: { code: 95002, category: ts.DiagnosticCategory.Message, key: "Convert_function_0_to_class_95002", message: "Convert function '{0}' to class" },
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." },
@@ -3603,6 +3749,7 @@ var ts;
case 32:
case 47:
case 60:
+ case 124:
case 61:
case 62:
return true;
@@ -3664,6 +3811,7 @@ var ts;
}
break;
case 60:
+ case 124:
case 61:
case 62:
if (isConflictMarkerTrivia(text, pos)) {
@@ -3717,10 +3865,10 @@ var ts;
}
}
else {
- ts.Debug.assert(ch === 61);
+ ts.Debug.assert(ch === 124 || ch === 61);
while (pos < len) {
- var ch_1 = text.charCodeAt(pos);
- if (ch_1 === 62 && isConflictMarkerTrivia(text, pos)) {
+ var currentChar = text.charCodeAt(pos);
+ if ((currentChar === 61 || currentChar === 62) && currentChar !== ch && isConflictMarkerTrivia(text, pos)) {
break;
}
pos++;
@@ -3859,9 +4007,10 @@ var ts;
}
ts.getTrailingCommentRanges = getTrailingCommentRanges;
function getShebang(text) {
- return shebangTriviaRegex.test(text)
- ? shebangTriviaRegex.exec(text)[0]
- : undefined;
+ var match = shebangTriviaRegex.exec(text);
+ if (match) {
+ return match[0];
+ }
}
ts.getShebang = getShebang;
function isIdentifierStart(ch, languageVersion) {
@@ -4399,13 +4548,13 @@ var ts;
pos += 2;
var commentClosed = false;
while (pos < end) {
- var ch_2 = text.charCodeAt(pos);
- if (ch_2 === 42 && text.charCodeAt(pos + 1) === 47) {
+ var ch_1 = text.charCodeAt(pos);
+ if (ch_1 === 42 && text.charCodeAt(pos + 1) === 47) {
pos += 2;
commentClosed = true;
break;
}
- if (isLineBreak(ch_2)) {
+ if (isLineBreak(ch_1)) {
precedingLineBreak = true;
}
pos++;
@@ -4560,6 +4709,15 @@ var ts;
pos++;
return token = 17;
case 124:
+ if (isConflictMarkerTrivia(text, pos)) {
+ pos = scanConflictMarkerTrivia(text, pos, error);
+ if (skipTrivia) {
+ continue;
+ }
+ else {
+ return token = 7;
+ }
+ }
if (text.charCodeAt(pos + 1) === 124) {
return pos += 2, token = 54;
}
@@ -4985,11 +5143,12 @@ var ts;
"umd": ts.ModuleKind.UMD,
"es6": ts.ModuleKind.ES2015,
"es2015": ts.ModuleKind.ES2015,
+ "esnext": ts.ModuleKind.ESNext
}),
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,
+ description: ts.Diagnostics.Specify_module_code_generation_Colon_commonjs_amd_system_umd_es2015_or_ESNext,
},
{
name: "lib",
@@ -5021,6 +5180,7 @@ var ts;
"es2017.object": "lib.es2017.object.d.ts",
"es2017.sharedmemory": "lib.es2017.sharedmemory.d.ts",
"es2017.string": "lib.es2017.string.d.ts",
+ "es2017.intl": "lib.es2017.intl.d.ts",
"esnext.asynciterable": "lib.esnext.asynciterable.d.ts",
}),
},
@@ -5482,6 +5642,12 @@ var ts;
description: ts.Diagnostics.The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files
},
{
+ name: "noStrictGenericChecks",
+ type: "boolean",
+ category: ts.Diagnostics.Advanced_Options,
+ description: ts.Diagnostics.Disable_strict_checking_of_generic_signatures_in_function_types,
+ },
+ {
name: "plugins",
type: "list",
isTSConfigOnly: true,
@@ -5551,7 +5717,6 @@ var ts;
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);
@@ -5585,7 +5750,6 @@ var ts;
var options = {};
var fileNames = [];
var errors = [];
- var _a = getOptionNameMap(), optionNameMap = _a.optionNameMap, shortOptionNames = _a.shortOptionNames;
parseStrings(commandLine);
return {
options: options,
@@ -5601,12 +5765,7 @@ var ts;
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);
+ var opt = getOptionFromName(s.slice(s.charCodeAt(1) === 45 ? 2 : 1), true);
if (opt) {
if (opt.isTSConfigOnly) {
errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_can_only_be_specified_in_tsconfig_json_file, opt.name));
@@ -5690,6 +5849,18 @@ var ts;
}
}
ts.parseCommandLine = parseCommandLine;
+ function getOptionFromName(optionName, allowShort) {
+ if (allowShort === void 0) { allowShort = false; }
+ optionName = optionName.toLowerCase();
+ var _a = getOptionNameMap(), optionNameMap = _a.optionNameMap, shortOptionNames = _a.shortOptionNames;
+ if (allowShort) {
+ var short = shortOptionNames.get(optionName);
+ if (short !== undefined) {
+ optionName = short;
+ }
+ }
+ return optionNameMap.get(optionName);
+ }
function readConfigFile(fileName, readFile) {
var text = "";
try {
@@ -5832,7 +6003,7 @@ var ts;
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);
+ result.push(optionName && "" + tab + tab + optionName + (description && (makePadding(marginLength - optionName.length + 2) + description)));
}
if (configurations.files && configurations.files.length) {
result.push(tab + "},");
@@ -5872,49 +6043,28 @@ var ts;
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);
- var baseCompileOnSave;
- 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, baseCompileOnSave, baseOptions]), include = _b[0], exclude = _b[1], files = _b[2], baseCompileOnSave = _b[3], baseOptions = _b[4];
+ var options = (function () {
+ var _a = parseConfig(json, host, basePath, configFileName, resolutionStack, errors), include = _a.include, exclude = _a.exclude, files = _a.files, options = _a.options, compileOnSave = _a.compileOnSave;
+ if (include) {
+ json.include = include;
}
- else {
- errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Compiler_option_0_requires_a_value_of_type_1, "extends", "string"));
+ if (exclude) {
+ json.exclude = exclude;
}
- if (include && !json["include"]) {
- json["include"] = include;
+ if (files) {
+ json.files = files;
}
- if (exclude && !json["exclude"]) {
- json["exclude"] = exclude;
+ if (compileOnSave !== undefined) {
+ json.compileOnSave = compileOnSave;
}
- if (files && !json["files"]) {
- json["files"] = files;
- }
- options = ts.assign({}, baseOptions, options);
- }
+ return options;
+ })();
options = ts.extend(existingOptions, options);
options.configFilePath = configFileName;
- var _c = getFileNames(errors), fileNames = _c.fileNames, wildcardDirectories = _c.wildcardDirectories;
+ var jsonOptions = json["typeAcquisition"] || json["typingOptions"];
+ var typeAcquisition = convertTypeAcquisitionFromJsonWorker(jsonOptions, basePath, errors, configFileName);
+ var _a = getFileNames(), fileNames = _a.fileNames, wildcardDirectories = _a.wildcardDirectories;
var compileOnSave = convertCompileOnSaveOptionFromJson(json, basePath, errors);
- if (baseCompileOnSave && json[ts.compileOnSaveCommandLineOption.name] === undefined) {
- compileOnSave = baseCompileOnSave;
- }
return {
options: options,
fileNames: fileNames,
@@ -5924,37 +6074,7 @@ var ts;
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.compileOnSave, result.options];
- }
- function getFileNames(errors) {
+ function getFileNames() {
var fileNames;
if (ts.hasProperty(json, "files")) {
if (ts.isArray(json["files"])) {
@@ -5985,9 +6105,6 @@ var ts;
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"];
@@ -6004,9 +6121,66 @@ var ts;
}
return result;
}
- var _b;
}
ts.parseJsonConfigFileContent = parseJsonConfigFileContent;
+ function parseConfig(json, host, basePath, configFileName, resolutionStack, errors) {
+ basePath = ts.normalizeSlashes(basePath);
+ var getCanonicalFileName = ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames);
+ var resolvedPath = ts.toPath(configFileName || "", basePath, getCanonicalFileName);
+ if (resolutionStack.indexOf(resolvedPath) >= 0) {
+ errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Circularity_detected_while_resolving_configuration_Colon_0, resolutionStack.concat([resolvedPath]).join(" -> ")));
+ return { include: undefined, exclude: undefined, files: undefined, options: {}, compileOnSave: undefined };
+ }
+ if (ts.hasProperty(json, "excludes")) {
+ errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Unknown_option_excludes_Did_you_mean_exclude));
+ }
+ var options = convertCompilerOptionsFromJsonWorker(json.compilerOptions, basePath, errors, configFileName);
+ var include = json.include, exclude = json.exclude, files = json.files;
+ var compileOnSave = json.compileOnSave;
+ if (json.extends) {
+ resolutionStack = resolutionStack.concat([resolvedPath]);
+ var base = getExtendedConfig(json.extends, host, basePath, getCanonicalFileName, resolutionStack, errors);
+ if (base) {
+ include = include || base.include;
+ exclude = exclude || base.exclude;
+ files = files || base.files;
+ if (compileOnSave === undefined) {
+ compileOnSave = base.compileOnSave;
+ }
+ options = ts.assign({}, base.options, options);
+ }
+ }
+ return { include: include, exclude: exclude, files: files, options: options, compileOnSave: compileOnSave };
+ }
+ function getExtendedConfig(extended, host, basePath, getCanonicalFileName, resolutionStack, errors) {
+ if (typeof extended !== "string") {
+ errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Compiler_option_0_requires_a_value_of_type_1, "extends", "string"));
+ return undefined;
+ }
+ extended = ts.normalizeSlashes(extended);
+ if (!(ts.isRootedDiskPath(extended) || ts.startsWith(extended, "./") || ts.startsWith(extended, "../"))) {
+ errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.A_path_in_an_extends_option_must_be_relative_or_rooted_but_0_is_not, extended));
+ return undefined;
+ }
+ var extendedConfigPath = ts.toPath(extended, 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, extended));
+ return undefined;
+ }
+ }
+ var extendedResult = readConfigFile(extendedConfigPath, function (path) { return host.readFile(path); });
+ if (extendedResult.error) {
+ errors.push(extendedResult.error);
+ return undefined;
+ }
+ 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 _a = parseConfig(extendedResult.config, host, extendedDirname, ts.getBaseFileName(extendedConfigPath), resolutionStack, errors), include = _a.include, exclude = _a.exclude, files = _a.files, options = _a.options, compileOnSave = _a.compileOnSave;
+ return { include: ts.map(include, updatePath), exclude: ts.map(exclude, updatePath), files: ts.map(files, updatePath), compileOnSave: compileOnSave, options: options };
+ }
function convertCompileOnSaveOptionFromJson(jsonOption, basePath, errors) {
if (!ts.hasProperty(jsonOption, ts.compileOnSaveCommandLineOption.name)) {
return false;
@@ -6186,7 +6360,7 @@ var ts;
}
}
}
- for (var key in wildcardDirectories)
+ 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];
@@ -6195,6 +6369,7 @@ var ts;
}
}
}
+ }
}
return wildcardDirectories;
}
@@ -6238,6 +6413,40 @@ var ts;
function caseInsensitiveKeyMapper(key) {
return key.toLowerCase();
}
+ function convertCompilerOptionsForTelemetry(opts) {
+ var out = {};
+ for (var key in opts) {
+ if (opts.hasOwnProperty(key)) {
+ var type = getOptionFromName(key);
+ if (type !== undefined) {
+ out[key] = getOptionValueWithEmptyStrings(opts[key], type);
+ }
+ }
+ }
+ return out;
+ }
+ ts.convertCompilerOptionsForTelemetry = convertCompilerOptionsForTelemetry;
+ function getOptionValueWithEmptyStrings(value, option) {
+ switch (option.type) {
+ case "object":
+ return "";
+ case "string":
+ return "";
+ case "number":
+ return typeof value === "number" ? value : "";
+ case "boolean":
+ return typeof value === "boolean" ? value : "";
+ case "list":
+ var elementType_1 = option.element;
+ return ts.isArray(value) ? value.map(function (v) { return getOptionValueWithEmptyStrings(v, elementType_1); }) : "";
+ default:
+ return ts.forEachEntry(option.type, function (optionEnumValue, optionStringValue) {
+ if (optionEnumValue === value) {
+ return optionStringValue;
+ }
+ });
+ }
+ }
})(ts || (ts = {}));
var ts;
(function (ts) {
@@ -6355,7 +6564,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 safeList.has(f); }));
+ mergeTypings(ts.mapDefined(cleanedTypingNames, function (f) { return safeList.get(f); }));
}
var hasJsxFile = ts.forEach(fileNames, function (f) { return ts.ensureScriptKind(f, ts.getScriptKindFromFileName(f)) === 2; });
if (hasJsxFile) {
@@ -6417,6 +6626,7 @@ var ts;
Arguments.LogFile = "--logFile";
Arguments.EnableTelemetry = "--enableTelemetry";
Arguments.TypingSafeListLocation = "--typingSafeListLocation";
+ Arguments.NpmLocation = "--npmLocation";
})(Arguments = server.Arguments || (server.Arguments = {}));
function hasArgument(argumentName) {
return ts.sys.args.indexOf(argumentName) >= 0;
@@ -6454,12 +6664,11 @@ var ts;
ts.Debug.assert(ts.extensionIsTypeScript(resolved.extension));
return resolved.path;
}
- function resolvedModuleFromResolved(_a, isExternalLibraryImport) {
- var path = _a.path, extension = _a.extension;
- return { resolvedFileName: path, extension: extension, isExternalLibraryImport: isExternalLibraryImport };
- }
function createResolvedModuleWithFailedLookupLocations(resolved, isExternalLibraryImport, failedLookupLocations) {
- return { resolvedModule: resolved && resolvedModuleFromResolved(resolved, isExternalLibraryImport), failedLookupLocations: failedLookupLocations };
+ return {
+ resolvedModule: resolved && { resolvedFileName: resolved.path, extension: resolved.extension, isExternalLibraryImport: isExternalLibraryImport },
+ failedLookupLocations: failedLookupLocations
+ };
}
function moduleHasNonRelativeName(moduleName) {
return !(ts.isRootedDiskPath(moduleName) || ts.isExternalModuleNameRelative(moduleName));
@@ -6743,6 +6952,8 @@ var ts;
case ts.ModuleResolutionKind.Classic:
result = classicNameResolver(moduleName, containingFile, compilerOptions, host, cache);
break;
+ default:
+ ts.Debug.fail("Unexpected moduleResolution: " + moduleResolution);
}
if (perFolderCache) {
perFolderCache.set(moduleName, result);
@@ -6859,10 +7070,12 @@ var ts;
if (state.traceEnabled) {
trace(state.host, ts.Diagnostics.Trying_substitution_0_candidate_module_location_Colon_1, subst, path);
}
- var tsExtension = ts.tryGetExtensionFromPath(candidate);
- if (tsExtension !== undefined) {
+ var extension = ts.tryGetExtensionFromPath(candidate);
+ if (extension !== undefined) {
var path_1 = tryFile(candidate, failedLookupLocations, false, state);
- return path_1 && { path: path_1, extension: tsExtension };
+ if (path_1 !== undefined) {
+ return { path: path_1, extension: extension };
+ }
}
return loader(extensions, candidate, failedLookupLocations, !directoryProbablyExists(ts.getDirectoryPath(candidate), state.host), state);
});
@@ -6876,12 +7089,18 @@ var ts;
}
}
function nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache) {
- return nodeModuleNameResolverWorker(moduleName, containingFile, compilerOptions, host, cache, false);
+ return nodeModuleNameResolverWorker(moduleName, ts.getDirectoryPath(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);
+ function resolveJavaScriptModule(moduleName, initialDir, host) {
+ var _a = nodeModuleNameResolverWorker(moduleName, initialDir, { moduleResolution: ts.ModuleResolutionKind.NodeJs, allowJs: true }, host, undefined, true), resolvedModule = _a.resolvedModule, failedLookupLocations = _a.failedLookupLocations;
+ if (!resolvedModule) {
+ throw new Error("Could not resolve JS module " + moduleName + " starting at " + initialDir + ". Looked in: " + failedLookupLocations.join(", "));
+ }
+ return resolvedModule.resolvedFileName;
+ }
+ ts.resolveJavaScriptModule = resolveJavaScriptModule;
+ function nodeModuleNameResolverWorker(moduleName, containingDirectory, compilerOptions, host, cache, jsOnly) {
var traceEnabled = isTraceEnabled(compilerOptions, host);
var failedLookupLocations = [];
var state = { compilerOptions: compilerOptions, host: host, traceEnabled: traceEnabled };
@@ -6911,7 +7130,6 @@ var ts;
}
}
}
- ts.nodeModuleNameResolverWorker = nodeModuleNameResolverWorker;
function realpath(path, host, traceEnabled) {
if (!host.realpath) {
return path;
@@ -7112,9 +7330,10 @@ var ts;
return loadModuleFromNodeModulesFolder(Extensions.DtsOnly, mangleScopedPackage(moduleName, state), nodeModulesAtTypes_1, nodeModulesAtTypesExists, failedLookupLocations, state);
}
}
+ var mangledScopedPackageSeparator = "__";
function mangleScopedPackage(moduleName, state) {
if (ts.startsWith(moduleName, "@")) {
- var replaceSlash = moduleName.replace(ts.directorySeparator, "__");
+ var replaceSlash = moduleName.replace(ts.directorySeparator, mangledScopedPackageSeparator);
if (replaceSlash !== moduleName) {
var mangled = replaceSlash.slice(1);
if (state.traceEnabled) {
@@ -7125,6 +7344,16 @@ var ts;
}
return moduleName;
}
+ function getPackageNameFromAtTypesDirectory(mangledName) {
+ var withoutAtTypePrefix = ts.removePrefix(mangledName, "@types/");
+ if (withoutAtTypePrefix !== mangledName) {
+ return withoutAtTypePrefix.indexOf("__") !== -1 ?
+ "@" + withoutAtTypePrefix.replace(mangledScopedPackageSeparator, ts.directorySeparator) :
+ withoutAtTypePrefix;
+ }
+ return mangledName;
+ }
+ ts.getPackageNameFromAtTypesDirectory = getPackageNameFromAtTypesDirectory;
function tryFindNonRelativeModuleNameInCache(cache, moduleName, containingDirectory, traceEnabled, host) {
var result = cache && cache.get(containingDirectory);
if (result) {
@@ -7600,7 +7829,7 @@ var ts;
};
return FileLog;
}());
- function getNPMLocation(processName) {
+ function getDefaultNPMLocation(processName) {
if (path.basename(processName).indexOf("node") === 0) {
return "\"" + path.join(path.dirname(process.argv[0]), "npm") + "\"";
}
@@ -7632,12 +7861,16 @@ var ts;
}
var NodeTypingsInstaller = (function (_super) {
__extends(NodeTypingsInstaller, _super);
- function NodeTypingsInstaller(globalTypingsCacheLocation, typingSafeListLocation, throttleLimit, log) {
+ function NodeTypingsInstaller(globalTypingsCacheLocation, typingSafeListLocation, npmLocation, 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;
+ _this.npmPath = npmLocation !== undefined ? npmLocation : getDefaultNPMLocation(process.argv[0]);
+ if (_this.npmPath.indexOf(" ") !== -1 && _this.npmPath[0] !== "\"") {
+ _this.npmPath = "\"" + _this.npmPath + "\"";
+ }
if (_this.log.isEnabled()) {
_this.log.writeLine("Process id: " + process.pid);
+ _this.log.writeLine("NPM location: " + _this.npmPath + " (explicit '" + server.Arguments.NpmLocation + "' " + (npmLocation === undefined ? "not " : "") + " provided)");
}
- _this.npmPath = getNPMLocation(process.argv[0]);
(_this.execSync = require("child_process").execSync);
_this.ensurePackageDirectoryExists(globalTypingsCacheLocation);
try {
@@ -7645,6 +7878,9 @@ var ts;
_this.log.writeLine("Updating " + TypesRegistryPackageName + " npm package...");
}
_this.execSync(_this.npmPath + " install " + TypesRegistryPackageName, { cwd: globalTypingsCacheLocation, stdio: "ignore" });
+ if (_this.log.isEnabled()) {
+ _this.log.writeLine("Updated " + TypesRegistryPackageName + " npm package");
+ }
}
catch (e) {
if (_this.log.isEnabled()) {
@@ -7711,6 +7947,7 @@ var ts;
var logFilePath = server.findArgument(server.Arguments.LogFile);
var globalTypingsCacheLocation = server.findArgument(server.Arguments.GlobalCacheLocation);
var typingSafeListLocation = server.findArgument(server.Arguments.TypingSafeListLocation);
+ var npmLocation = server.findArgument(server.Arguments.NpmLocation);
var log = new FileLog(logFilePath);
if (log.isEnabled()) {
process.on("uncaughtException", function (e) {
@@ -7723,7 +7960,7 @@ var ts;
}
process.exit(0);
});
- var installer = new NodeTypingsInstaller(globalTypingsCacheLocation, typingSafeListLocation, 5, log);
+ var installer = new NodeTypingsInstaller(globalTypingsCacheLocation, typingSafeListLocation, npmLocation, 5, log);
installer.listen();
})(typingsInstaller = server.typingsInstaller || (server.typingsInstaller = {}));
})(server = ts.server || (ts.server = {}));
diff --git a/node_modules/typedoc/node_modules/typescript/lib/watchGuard.js b/node_modules/typedoc/node_modules/typescript/lib/watchGuard.js
index c9b3e6988..00fcc3501 100644
--- a/node_modules/typedoc/node_modules/typescript/lib/watchGuard.js
+++ b/node_modules/typedoc/node_modules/typescript/lib/watchGuard.js
@@ -1,18 +1,18 @@
-/*! *****************************************************************************
-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.
+***************************************************************************** */
+
if (process.argv.length < 3) {
process.exit(1);
}
diff --git a/node_modules/typedoc/node_modules/typescript/package.json b/node_modules/typedoc/node_modules/typescript/package.json
index 170317743..f672e7f0d 100644
--- a/node_modules/typedoc/node_modules/typescript/package.json
+++ b/node_modules/typedoc/node_modules/typescript/package.json
@@ -2,7 +2,7 @@
"name": "typescript",
"author": "Microsoft Corp.",
"homepage": "http://typescriptlang.org/",
- "version": "2.3.2",
+ "version": "2.4.1",
"license": "Apache-2.0",
"description": "TypeScript is a language for application scale JavaScript development",
"keywords": [
@@ -39,7 +39,6 @@
"@types/gulp-help": "latest",
"@types/gulp-newer": "latest",
"@types/gulp-sourcemaps": "latest",
- "@types/gulp-typescript": "latest",
"@types/merge2": "latest",
"@types/minimatch": "latest",
"@types/minimist": "latest",
@@ -60,7 +59,7 @@
"gulp-insert": "latest",
"gulp-newer": "latest",
"gulp-sourcemaps": "latest",
- "gulp-typescript": "3.1.5",
+ "gulp-typescript": "latest",
"into-stream": "latest",
"istanbul": "latest",
"jake": "latest",
@@ -75,8 +74,8 @@
"through2": "latest",
"travis-fold": "latest",
"ts-node": "latest",
- "tslint": "next",
- "typescript": "next"
+ "tslint": "latest",
+ "typescript": "^2.4"
},
"scripts": {
"pretest": "jake tests",
@@ -97,4 +96,4 @@
"os": false,
"path": false
}
-}
+} \ No newline at end of file
diff --git a/node_modules/typedoc/node_modules/typescript/test.config b/node_modules/typedoc/node_modules/typescript/test.config
index 9c8862d93..e136b3f6f 100644
--- a/node_modules/typedoc/node_modules/typescript/test.config
+++ b/node_modules/typedoc/node_modules/typescript/test.config
@@ -1 +1 @@
-{"light":false,"workerCount":4,"taskConfigsFolder":"C:\\Users\\drosen\\AppData\\Local\\Temp/ts-tests1"} \ No newline at end of file
+{"light":false,"workerCount":4,"taskConfigsFolder":"C:\\Users\\drosen\\AppData\\Local\\Temp/ts-tests5"} \ No newline at end of file
diff --git a/node_modules/typedoc/node_modules/typescript/yarn.lock b/node_modules/typedoc/node_modules/typescript/yarn.lock
new file mode 100644
index 000000000..71d7af886
--- /dev/null
+++ b/node_modules/typedoc/node_modules/typescript/yarn.lock
@@ -0,0 +1,3362 @@
+# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
+# yarn lockfile v1
+
+
+"@gulp-sourcemaps/identity-map@1.X":
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/@gulp-sourcemaps/identity-map/-/identity-map-1.0.1.tgz#cfa23bc5840f9104ce32a65e74db7e7a974bbee1"
+ dependencies:
+ acorn "^5.0.3"
+ css "^2.2.1"
+ normalize-path "^2.1.1"
+ source-map "^0.5.6"
+ through2 "^2.0.3"
+
+"@gulp-sourcemaps/map-sources@1.X":
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/@gulp-sourcemaps/map-sources/-/map-sources-1.0.0.tgz#890ae7c5d8c877f6d384860215ace9d7ec945bda"
+ dependencies:
+ normalize-path "^2.0.1"
+ through2 "^2.0.3"
+
+"@types/browserify@latest":
+ version "12.0.32"
+ resolved "https://registry.yarnpkg.com/@types/browserify/-/browserify-12.0.32.tgz#e5375fe5de7fea9e4da59e7c2eba3941f47f5359"
+ dependencies:
+ "@types/insert-module-globals" "*"
+ "@types/node" "*"
+
+"@types/chai@latest":
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.0.0.tgz#4c9adabd2d04265769e6d9e847e86cc404dc7dcd"
+
+"@types/chokidar@*":
+ version "1.7.0"
+ resolved "https://registry.yarnpkg.com/@types/chokidar/-/chokidar-1.7.0.tgz#93c6a5c92aa866756c00aa996e4ac1c9e7057437"
+ dependencies:
+ "@types/node" "*"
+
+"@types/convert-source-map@latest":
+ version "1.3.33"
+ resolved "https://registry.yarnpkg.com/@types/convert-source-map/-/convert-source-map-1.3.33.tgz#241b0170b2a6bdf82e3450e31962abf6ec1c8fb3"
+
+"@types/del@latest":
+ version "2.2.32"
+ resolved "https://registry.yarnpkg.com/@types/del/-/del-2.2.32.tgz#4d54df0ed3017435e6b1995df0292957787fc6b2"
+ dependencies:
+ "@types/glob" "*"
+
+"@types/glob-stream@*":
+ version "3.1.30"
+ resolved "https://registry.yarnpkg.com/@types/glob-stream/-/glob-stream-3.1.30.tgz#b853990b40a4cfe6a80ec0d2fadf68d8060f78b1"
+ dependencies:
+ "@types/glob" "*"
+ "@types/node" "*"
+
+"@types/glob@*", "@types/glob@latest":
+ version "5.0.30"
+ resolved "https://registry.yarnpkg.com/@types/glob/-/glob-5.0.30.tgz#1026409c5625a8689074602808d082b2867b8a51"
+ dependencies:
+ "@types/minimatch" "*"
+ "@types/node" "*"
+
+"@types/gulp-concat@latest":
+ version "0.0.30"
+ resolved "https://registry.yarnpkg.com/@types/gulp-concat/-/gulp-concat-0.0.30.tgz#e133db1dc70923f5b57ece0de126a2ff1398698d"
+ dependencies:
+ "@types/node" "*"
+
+"@types/gulp-help@latest":
+ version "0.0.33"
+ resolved "https://registry.yarnpkg.com/@types/gulp-help/-/gulp-help-0.0.33.tgz#65e8c65124109225537fa39003c4ba51f4fd1ac5"
+ dependencies:
+ "@types/gulp" "*"
+ "@types/node" "*"
+ "@types/orchestrator" "*"
+
+"@types/gulp-newer@latest":
+ version "0.0.30"
+ resolved "https://registry.yarnpkg.com/@types/gulp-newer/-/gulp-newer-0.0.30.tgz#6ea9fba15b0576be424e9977d4894200464a151e"
+ dependencies:
+ "@types/node" "*"
+
+"@types/gulp-sourcemaps@latest":
+ version "0.0.31"
+ resolved "https://registry.yarnpkg.com/@types/gulp-sourcemaps/-/gulp-sourcemaps-0.0.31.tgz#08347f899f4862f63f7586c997aacd41af21c72a"
+ dependencies:
+ "@types/node" "*"
+
+"@types/gulp@*", "@types/gulp@latest":
+ version "4.0.4"
+ resolved "https://registry.yarnpkg.com/@types/gulp/-/gulp-4.0.4.tgz#753ffe5b0ddaf0c9a60101b346141bb80e602f25"
+ dependencies:
+ "@types/chokidar" "*"
+ "@types/undertaker" "*"
+ "@types/vinyl-fs" "*"
+
+"@types/insert-module-globals@*":
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/@types/insert-module-globals/-/insert-module-globals-7.0.0.tgz#8d158de4a6384e8daa13b3d63eebab6d5f67777d"
+ dependencies:
+ "@types/node" "*"
+
+"@types/merge2@latest":
+ version "0.3.30"
+ resolved "https://registry.yarnpkg.com/@types/merge2/-/merge2-0.3.30.tgz#9e39d04f6fe4f36fa7477566cad1faf80b2a671f"
+ dependencies:
+ "@types/node" "*"
+
+"@types/minimatch@*", "@types/minimatch@latest":
+ version "2.0.29"
+ resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-2.0.29.tgz#5002e14f75e2d71e564281df0431c8c1b4a2a36a"
+
+"@types/minimist@latest":
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.0.tgz#69a23a3ad29caf0097f06eda59b361ee2f0639f6"
+
+"@types/mkdirp@latest":
+ version "0.3.29"
+ resolved "https://registry.yarnpkg.com/@types/mkdirp/-/mkdirp-0.3.29.tgz#7f2ad7ec55f914482fc9b1ec4bb1ae6028d46066"
+
+"@types/mocha@latest":
+ version "2.2.41"
+ resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-2.2.41.tgz#e27cf0817153eb9f2713b2d3f6c68f1e1c3ca608"
+
+"@types/node@*", "@types/node@latest":
+ version "8.0.1"
+ resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.1.tgz#89c271e0c3b9ebb6a3756dd601336970b6228b77"
+
+"@types/orchestrator@*":
+ version "0.3.0"
+ resolved "https://registry.yarnpkg.com/@types/orchestrator/-/orchestrator-0.3.0.tgz#bf84a1699c9330d4fe89cd81263e8fc09fb32978"
+ dependencies:
+ "@types/node" "*"
+ "@types/q" "^0"
+
+"@types/q@^0":
+ version "0.0.35"
+ resolved "https://registry.yarnpkg.com/@types/q/-/q-0.0.35.tgz#1893674fb15f138013ec108d233f68fc7df0f155"
+
+"@types/q@latest":
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/@types/q/-/q-1.0.1.tgz#dbccb01bd8f0f801a12a4604c7d7af59bb02ae2f"
+
+"@types/run-sequence@latest":
+ version "0.0.29"
+ resolved "https://registry.yarnpkg.com/@types/run-sequence/-/run-sequence-0.0.29.tgz#6ad0f7383136e13925322e69fc41db77b30b2075"
+ dependencies:
+ "@types/gulp" "*"
+ "@types/node" "*"
+
+"@types/through2@latest":
+ version "2.0.33"
+ resolved "https://registry.yarnpkg.com/@types/through2/-/through2-2.0.33.tgz#1ff2e88a100dfb5b140e7bb98791f1194400d131"
+ dependencies:
+ "@types/node" "*"
+
+"@types/undertaker-registry@*":
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/@types/undertaker-registry/-/undertaker-registry-1.0.0.tgz#6f61a0be75a22e9ef62df68b480c68bce344fe5f"
+
+"@types/undertaker@*":
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/@types/undertaker/-/undertaker-1.1.2.tgz#cf0f62cdcbdf62ad9f70a4d78f81869a5c349a09"
+ dependencies:
+ "@types/undertaker-registry" "*"
+
+"@types/vinyl-fs@*":
+ version "2.4.5"
+ resolved "https://registry.yarnpkg.com/@types/vinyl-fs/-/vinyl-fs-2.4.5.tgz#73b212bb1838f5fff14341e3e37e956f0560001b"
+ dependencies:
+ "@types/glob-stream" "*"
+ "@types/node" "*"
+ "@types/vinyl" "*"
+
+"@types/vinyl@*":
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/@types/vinyl/-/vinyl-2.0.0.tgz#fd213bf7f4136dde21fe1895500b12c186f8c268"
+ dependencies:
+ "@types/node" "*"
+
+JSONStream@^1.0.3:
+ version "1.3.1"
+ resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.1.tgz#707f761e01dae9e16f1bcf93703b78c70966579a"
+ dependencies:
+ jsonparse "^1.2.0"
+ through ">=2.2.7 <3"
+
+abbrev@1, abbrev@1.0.x:
+ version "1.0.9"
+ resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135"
+
+acorn@4.X, acorn@^4.0.3:
+ version "4.0.13"
+ resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787"
+
+acorn@^5.0.3:
+ version "5.0.3"
+ resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.0.3.tgz#c460df08491463f028ccb82eab3730bf01087b3d"
+
+align-text@^0.1.1, align-text@^0.1.3:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117"
+ dependencies:
+ kind-of "^3.0.2"
+ longest "^1.0.1"
+ repeat-string "^1.5.2"
+
+amdefine@>=0.0.4:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5"
+
+ansi-regex@^0.2.0, ansi-regex@^0.2.1:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-0.2.1.tgz#0d8e946967a3d8143f93e24e298525fc1b2235f9"
+
+ansi-regex@^2.0.0:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df"
+
+ansi-styles@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-1.1.0.tgz#eaecbf66cd706882760b2f4691582b8f55d7a7de"
+
+ansi-styles@^2.2.1:
+ version "2.2.1"
+ resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe"
+
+ansi-styles@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-1.0.0.tgz#cb102df1c56f5123eab8b67cd7b98027a0279178"
+
+archy@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/archy/-/archy-1.0.0.tgz#f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40"
+
+argparse@^1.0.7:
+ version "1.0.9"
+ resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86"
+ dependencies:
+ sprintf-js "~1.0.2"
+
+arr-diff@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf"
+ dependencies:
+ arr-flatten "^1.0.1"
+
+arr-flatten@^1.0.1:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.0.3.tgz#a274ed85ac08849b6bd7847c4580745dc51adfb1"
+
+array-differ@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-1.0.0.tgz#eff52e3758249d33be402b8bb8e564bb2b5d4031"
+
+array-each@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/array-each/-/array-each-1.0.1.tgz#a794af0c05ab1752846ee753a1f211a05ba0c44f"
+
+array-filter@~0.0.0:
+ version "0.0.1"
+ resolved "https://registry.yarnpkg.com/array-filter/-/array-filter-0.0.1.tgz#7da8cf2e26628ed732803581fd21f67cacd2eeec"
+
+array-find-index@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1"
+
+array-map@~0.0.0:
+ version "0.0.0"
+ resolved "https://registry.yarnpkg.com/array-map/-/array-map-0.0.0.tgz#88a2bab73d1cf7bcd5c1b118a003f66f665fa662"
+
+array-reduce@~0.0.0:
+ version "0.0.0"
+ resolved "https://registry.yarnpkg.com/array-reduce/-/array-reduce-0.0.0.tgz#173899d3ffd1c7d9383e4479525dbe278cab5f2b"
+
+array-slice@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/array-slice/-/array-slice-1.0.0.tgz#e73034f00dcc1f40876008fd20feae77bd4b7c2f"
+
+array-union@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39"
+ dependencies:
+ array-uniq "^1.0.1"
+
+array-uniq@^1.0.1, array-uniq@^1.0.2:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6"
+
+array-unique@^0.2.1:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53"
+
+arrify@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d"
+
+asn1.js@^4.0.0:
+ version "4.9.1"
+ resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-4.9.1.tgz#48ba240b45a9280e94748990ba597d216617fd40"
+ dependencies:
+ bn.js "^4.0.0"
+ inherits "^2.0.1"
+ minimalistic-assert "^1.0.0"
+
+assert@^1.4.0:
+ version "1.4.1"
+ resolved "https://registry.yarnpkg.com/assert/-/assert-1.4.1.tgz#99912d591836b5a6f5b345c0f07eefc08fc65d91"
+ dependencies:
+ util "0.10.3"
+
+assertion-error@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.0.2.tgz#13ca515d86206da0bac66e834dd397d87581094c"
+
+astw@^2.0.0:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/astw/-/astw-2.2.0.tgz#7bd41784d32493987aeb239b6b4e1c57a873b917"
+ dependencies:
+ acorn "^4.0.3"
+
+async@0.9.x:
+ version "0.9.2"
+ resolved "https://registry.yarnpkg.com/async/-/async-0.9.2.tgz#aea74d5e61c1f899613bf64bda66d4c78f2fd17d"
+
+async@1.x, async@^1.4.0:
+ version "1.5.2"
+ resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a"
+
+atob@~1.1.0:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/atob/-/atob-1.1.3.tgz#95f13629b12c3a51a5d215abdce2aa9f32f80773"
+
+babel-code-frame@^6.22.0:
+ version "6.22.0"
+ resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.22.0.tgz#027620bee567a88c32561574e7fd0801d33118e4"
+ dependencies:
+ chalk "^1.1.0"
+ esutils "^2.0.2"
+ js-tokens "^3.0.0"
+
+balanced-match@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
+
+base64-js@^1.0.2:
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.2.1.tgz#a91947da1f4a516ea38e5b4ec0ec3773675e0886"
+
+beeper@^1.0.0:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/beeper/-/beeper-1.1.1.tgz#e6d5ea8c5dad001304a70b22638447f69cb2f809"
+
+bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0:
+ version "4.11.7"
+ resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.7.tgz#ddb048e50d9482790094c13eb3fcfc833ce7ab46"
+
+brace-expansion@^1.0.0, brace-expansion@^1.1.7:
+ version "1.1.8"
+ resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292"
+ dependencies:
+ balanced-match "^1.0.0"
+ concat-map "0.0.1"
+
+braces@^1.8.2:
+ version "1.8.5"
+ resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7"
+ dependencies:
+ expand-range "^1.8.1"
+ preserve "^0.2.0"
+ repeat-element "^1.1.2"
+
+brorand@^1.0.1:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f"
+
+browser-pack@^6.0.1:
+ version "6.0.2"
+ resolved "https://registry.yarnpkg.com/browser-pack/-/browser-pack-6.0.2.tgz#f86cd6cef4f5300c8e63e07a4d512f65fbff4531"
+ dependencies:
+ JSONStream "^1.0.3"
+ combine-source-map "~0.7.1"
+ defined "^1.0.0"
+ through2 "^2.0.0"
+ umd "^3.0.0"
+
+browser-resolve@^1.11.0, browser-resolve@^1.7.0:
+ version "1.11.2"
+ resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.2.tgz#8ff09b0a2c421718a1051c260b32e48f442938ce"
+ dependencies:
+ resolve "1.1.7"
+
+browser-stdout@1.3.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.0.tgz#f351d32969d32fa5d7a5567154263d928ae3bd1f"
+
+browserify-aes@^1.0.0, browserify-aes@^1.0.4:
+ version "1.0.6"
+ resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.0.6.tgz#5e7725dbdef1fd5930d4ebab48567ce451c48a0a"
+ dependencies:
+ buffer-xor "^1.0.2"
+ cipher-base "^1.0.0"
+ create-hash "^1.1.0"
+ evp_bytestokey "^1.0.0"
+ inherits "^2.0.1"
+
+browserify-cipher@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.0.tgz#9988244874bf5ed4e28da95666dcd66ac8fc363a"
+ dependencies:
+ browserify-aes "^1.0.4"
+ browserify-des "^1.0.0"
+ evp_bytestokey "^1.0.0"
+
+browserify-des@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.0.tgz#daa277717470922ed2fe18594118a175439721dd"
+ dependencies:
+ cipher-base "^1.0.1"
+ des.js "^1.0.0"
+ inherits "^2.0.1"
+
+browserify-rsa@^4.0.0:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.0.1.tgz#21e0abfaf6f2029cf2fafb133567a701d4135524"
+ dependencies:
+ bn.js "^4.1.0"
+ randombytes "^2.0.1"
+
+browserify-sign@^4.0.0:
+ version "4.0.4"
+ resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.0.4.tgz#aa4eb68e5d7b658baa6bf6a57e630cbd7a93d298"
+ dependencies:
+ bn.js "^4.1.1"
+ browserify-rsa "^4.0.0"
+ create-hash "^1.1.0"
+ create-hmac "^1.1.2"
+ elliptic "^6.0.0"
+ inherits "^2.0.1"
+ parse-asn1 "^5.0.0"
+
+browserify-zlib@~0.1.2:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.1.4.tgz#bb35f8a519f600e0fa6b8485241c979d0141fb2d"
+ dependencies:
+ pako "~0.2.0"
+
+browserify@latest:
+ version "14.4.0"
+ resolved "https://registry.yarnpkg.com/browserify/-/browserify-14.4.0.tgz#089a3463af58d0e48d8cd4070b3f74654d5abca9"
+ dependencies:
+ JSONStream "^1.0.3"
+ assert "^1.4.0"
+ browser-pack "^6.0.1"
+ browser-resolve "^1.11.0"
+ browserify-zlib "~0.1.2"
+ buffer "^5.0.2"
+ cached-path-relative "^1.0.0"
+ concat-stream "~1.5.1"
+ console-browserify "^1.1.0"
+ constants-browserify "~1.0.0"
+ crypto-browserify "^3.0.0"
+ defined "^1.0.0"
+ deps-sort "^2.0.0"
+ domain-browser "~1.1.0"
+ duplexer2 "~0.1.2"
+ events "~1.1.0"
+ glob "^7.1.0"
+ has "^1.0.0"
+ htmlescape "^1.1.0"
+ https-browserify "^1.0.0"
+ inherits "~2.0.1"
+ insert-module-globals "^7.0.0"
+ labeled-stream-splicer "^2.0.0"
+ module-deps "^4.0.8"
+ os-browserify "~0.1.1"
+ parents "^1.0.1"
+ path-browserify "~0.0.0"
+ process "~0.11.0"
+ punycode "^1.3.2"
+ querystring-es3 "~0.2.0"
+ read-only-stream "^2.0.0"
+ readable-stream "^2.0.2"
+ resolve "^1.1.4"
+ shasum "^1.0.0"
+ shell-quote "^1.6.1"
+ stream-browserify "^2.0.0"
+ stream-http "^2.0.0"
+ string_decoder "~1.0.0"
+ subarg "^1.0.0"
+ syntax-error "^1.1.1"
+ through2 "^2.0.0"
+ timers-browserify "^1.0.1"
+ tty-browserify "~0.0.0"
+ url "~0.11.0"
+ util "~0.10.1"
+ vm-browserify "~0.0.1"
+ xtend "^4.0.0"
+
+buffer-crc32@^0.2.5:
+ version "0.2.13"
+ resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242"
+
+buffer-xor@^1.0.2:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9"
+
+buffer@^5.0.2:
+ version "5.0.6"
+ resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.0.6.tgz#2ea669f7eec0b6eda05b08f8b5ff661b28573588"
+ dependencies:
+ base64-js "^1.0.2"
+ ieee754 "^1.1.4"
+
+builtin-modules@^1.0.0:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f"
+
+builtin-status-codes@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8"
+
+cached-path-relative@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/cached-path-relative/-/cached-path-relative-1.0.1.tgz#d09c4b52800aa4c078e2dd81a869aac90d2e54e7"
+
+camelcase-keys@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-2.1.0.tgz#308beeaffdf28119051efa1d932213c91b8f92e7"
+ dependencies:
+ camelcase "^2.0.0"
+ map-obj "^1.0.0"
+
+camelcase@^1.0.2:
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39"
+
+camelcase@^2.0.0:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f"
+
+center-align@^0.1.1:
+ version "0.1.3"
+ resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad"
+ dependencies:
+ align-text "^0.1.3"
+ lazy-cache "^1.0.3"
+
+chai@latest:
+ version "4.0.2"
+ resolved "https://registry.yarnpkg.com/chai/-/chai-4.0.2.tgz#2f7327c4de6f385dd7787999e2ab02697a32b83b"
+ dependencies:
+ assertion-error "^1.0.1"
+ check-error "^1.0.1"
+ deep-eql "^2.0.1"
+ get-func-name "^2.0.0"
+ pathval "^1.0.0"
+ type-detect "^4.0.0"
+
+chalk@*, chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98"
+ dependencies:
+ ansi-styles "^2.2.1"
+ escape-string-regexp "^1.0.2"
+ has-ansi "^2.0.0"
+ strip-ansi "^3.0.0"
+ supports-color "^2.0.0"
+
+chalk@0.4.x:
+ version "0.4.0"
+ resolved "https://registry.yarnpkg.com/chalk/-/chalk-0.4.0.tgz#5199a3ddcd0c1efe23bc08c1b027b06176e0c64f"
+ dependencies:
+ ansi-styles "~1.0.0"
+ has-color "~0.1.0"
+ strip-ansi "~0.1.0"
+
+chalk@^0.5.0:
+ version "0.5.1"
+ resolved "https://registry.yarnpkg.com/chalk/-/chalk-0.5.1.tgz#663b3a648b68b55d04690d49167aa837858f2174"
+ 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"
+
+check-error@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82"
+
+cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.3.tgz#eeabf194419ce900da3018c207d212f2a6df0a07"
+ dependencies:
+ inherits "^2.0.1"
+
+cliui@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1"
+ dependencies:
+ center-align "^0.1.1"
+ right-align "^0.1.1"
+ wordwrap "0.0.2"
+
+clone-buffer@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/clone-buffer/-/clone-buffer-1.0.0.tgz#e3e25b207ac4e701af721e2cb5a16792cac3dc58"
+
+clone-stats@^0.0.1, clone-stats@~0.0.1:
+ version "0.0.1"
+ resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-0.0.1.tgz#b88f94a82cf38b8791d58046ea4029ad88ca99d1"
+
+clone-stats@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-1.0.0.tgz#b3782dff8bb5474e18b9b6bf0fdfe782f8777680"
+
+clone@^0.2.0:
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/clone/-/clone-0.2.0.tgz#c6126a90ad4f72dbf5acdb243cc37724fe93fc1f"
+
+clone@^1.0.0, clone@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.2.tgz#260b7a99ebb1edfe247538175f783243cb19d149"
+
+cloneable-readable@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/cloneable-readable/-/cloneable-readable-1.0.0.tgz#a6290d413f217a61232f95e458ff38418cfb0117"
+ dependencies:
+ inherits "^2.0.1"
+ process-nextick-args "^1.0.6"
+ through2 "^2.0.1"
+
+colors@^1.1.2:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63"
+
+combine-source-map@~0.7.1:
+ version "0.7.2"
+ resolved "https://registry.yarnpkg.com/combine-source-map/-/combine-source-map-0.7.2.tgz#0870312856b307a87cc4ac486f3a9a62aeccc09e"
+ dependencies:
+ convert-source-map "~1.1.0"
+ inline-source-map "~0.6.0"
+ lodash.memoize "~3.0.3"
+ source-map "~0.5.3"
+
+commander@2.9.0, commander@^2.9.0:
+ version "2.9.0"
+ resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4"
+ dependencies:
+ graceful-readlink ">= 1.0.0"
+
+concat-map@0.0.1:
+ version "0.0.1"
+ resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
+
+concat-stream@~1.5.0, concat-stream@~1.5.1:
+ version "1.5.2"
+ resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.5.2.tgz#708978624d856af41a5a741defdd261da752c266"
+ dependencies:
+ inherits "~2.0.1"
+ readable-stream "~2.0.0"
+ typedarray "~0.0.5"
+
+concat-with-sourcemaps@^1.0.0:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/concat-with-sourcemaps/-/concat-with-sourcemaps-1.0.4.tgz#f55b3be2aeb47601b10a2d5259ccfb70fd2f1dd6"
+ dependencies:
+ source-map "^0.5.1"
+
+console-browserify@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.1.0.tgz#f0241c45730a9fc6323b206dbf38edc741d0bb10"
+ dependencies:
+ date-now "^0.1.4"
+
+constants-browserify@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75"
+
+convert-source-map@1.X, convert-source-map@^1.1.1, convert-source-map@latest:
+ version "1.5.0"
+ resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.0.tgz#9acd70851c6d5dfdd93d9282e5edf94a03ff46b5"
+
+convert-source-map@~1.1.0:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.1.3.tgz#4829c877e9fe49b3161f3bf3673888e204699860"
+
+core-util-is@~1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
+
+create-ecdh@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.0.tgz#888c723596cdf7612f6498233eebd7a35301737d"
+ dependencies:
+ bn.js "^4.1.0"
+ elliptic "^6.0.0"
+
+create-hash@^1.1.0, create-hash@^1.1.1, create-hash@^1.1.2:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.1.3.tgz#606042ac8b9262750f483caddab0f5819172d8fd"
+ dependencies:
+ cipher-base "^1.0.1"
+ inherits "^2.0.1"
+ ripemd160 "^2.0.0"
+ sha.js "^2.4.0"
+
+create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4:
+ version "1.1.6"
+ resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.6.tgz#acb9e221a4e17bdb076e90657c42b93e3726cf06"
+ dependencies:
+ cipher-base "^1.0.3"
+ create-hash "^1.1.0"
+ inherits "^2.0.1"
+ ripemd160 "^2.0.0"
+ safe-buffer "^5.0.1"
+ sha.js "^2.4.8"
+
+crypto-browserify@^3.0.0:
+ version "3.11.0"
+ resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.11.0.tgz#3652a0906ab9b2a7e0c3ce66a408e957a2485522"
+ dependencies:
+ browserify-cipher "^1.0.0"
+ browserify-sign "^4.0.0"
+ create-ecdh "^4.0.0"
+ create-hash "^1.1.0"
+ create-hmac "^1.1.0"
+ diffie-hellman "^5.0.0"
+ inherits "^2.0.1"
+ pbkdf2 "^3.0.3"
+ public-encrypt "^4.0.0"
+ randombytes "^2.0.0"
+
+css@2.X, css@^2.2.1:
+ version "2.2.1"
+ resolved "https://registry.yarnpkg.com/css/-/css-2.2.1.tgz#73a4c81de85db664d4ee674f7d47085e3b2d55dc"
+ dependencies:
+ inherits "^2.0.1"
+ source-map "^0.1.38"
+ source-map-resolve "^0.3.0"
+ urix "^0.1.0"
+
+currently-unhandled@^0.4.1:
+ version "0.4.1"
+ resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea"
+ dependencies:
+ array-find-index "^1.0.1"
+
+date-now@^0.1.4:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b"
+
+dateformat@^1.0.7-1.2.3:
+ version "1.0.12"
+ resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-1.0.12.tgz#9f124b67594c937ff706932e4a642cca8dbbfee9"
+ dependencies:
+ get-stdin "^4.0.1"
+ meow "^3.3.0"
+
+dateformat@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-2.0.0.tgz#2743e3abb5c3fc2462e527dca445e04e9f4dee17"
+
+debug-fabulous@0.1.X:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/debug-fabulous/-/debug-fabulous-0.1.0.tgz#ad0ea07a5d519324fb55842a8f34ee59c7f8ff6c"
+ dependencies:
+ debug "2.X"
+ object-assign "4.1.0"
+
+debug@2.6.0, debug@2.X:
+ version "2.6.0"
+ resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.0.tgz#bc596bcabe7617f11d9fa15361eded5608b8499b"
+ dependencies:
+ ms "0.7.2"
+
+decamelize@^1.0.0, decamelize@^1.1.2:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290"
+
+deep-eql@^2.0.1:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-2.0.2.tgz#b1bac06e56f0a76777686d50c9feb75c2ed7679a"
+ dependencies:
+ type-detect "^3.0.0"
+
+deep-is@~0.1.3:
+ version "0.1.3"
+ resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34"
+
+defaults@^1.0.0:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d"
+ dependencies:
+ clone "^1.0.2"
+
+defined@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693"
+
+del@latest:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/del/-/del-3.0.0.tgz#53ecf699ffcbcb39637691ab13baf160819766e5"
+ dependencies:
+ globby "^6.1.0"
+ is-path-cwd "^1.0.0"
+ is-path-in-cwd "^1.0.0"
+ p-map "^1.1.1"
+ pify "^3.0.0"
+ rimraf "^2.2.8"
+
+deprecated@^0.0.1:
+ version "0.0.1"
+ resolved "https://registry.yarnpkg.com/deprecated/-/deprecated-0.0.1.tgz#f9c9af5464afa1e7a971458a8bdef2aa94d5bb19"
+
+deps-sort@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/deps-sort/-/deps-sort-2.0.0.tgz#091724902e84658260eb910748cccd1af6e21fb5"
+ dependencies:
+ JSONStream "^1.0.3"
+ shasum "^1.0.0"
+ subarg "^1.0.0"
+ through2 "^2.0.0"
+
+des.js@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.0.tgz#c074d2e2aa6a8a9a07dbd61f9a15c2cd83ec8ecc"
+ dependencies:
+ inherits "^2.0.1"
+ minimalistic-assert "^1.0.0"
+
+detect-file@^0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/detect-file/-/detect-file-0.1.0.tgz#4935dedfd9488648e006b0129566e9386711ea63"
+ dependencies:
+ fs-exists-sync "^0.1.0"
+
+detect-newline@2.X:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-2.1.0.tgz#f41f1c10be4b00e87b5f13da680759f2c5bfd3e2"
+
+detective@^4.0.0:
+ version "4.5.0"
+ resolved "https://registry.yarnpkg.com/detective/-/detective-4.5.0.tgz#6e5a8c6b26e6c7a254b1c6b6d7490d98ec91edd1"
+ dependencies:
+ acorn "^4.0.3"
+ defined "^1.0.0"
+
+diff@3.2.0, diff@^3.1.0, diff@^3.2.0:
+ version "3.2.0"
+ resolved "https://registry.yarnpkg.com/diff/-/diff-3.2.0.tgz#c9ce393a4b7cbd0b058a725c93df299027868ff9"
+
+diffie-hellman@^5.0.0:
+ version "5.0.2"
+ resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.2.tgz#b5835739270cfe26acf632099fded2a07f209e5e"
+ dependencies:
+ bn.js "^4.1.0"
+ miller-rabin "^4.0.0"
+ randombytes "^2.0.0"
+
+domain-browser@~1.1.0:
+ version "1.1.7"
+ resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.1.7.tgz#867aa4b093faa05f1de08c06f4d7b21fdf8698bc"
+
+duplexer2@0.0.2:
+ version "0.0.2"
+ resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.0.2.tgz#c614dcf67e2fb14995a91711e5a617e8a60a31db"
+ dependencies:
+ readable-stream "~1.1.9"
+
+duplexer2@^0.1.2, duplexer2@~0.1.0, duplexer2@~0.1.2:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.1.4.tgz#8b12dab878c0d69e3e7891051662a32fc6bddcc1"
+ dependencies:
+ readable-stream "^2.0.2"
+
+duplexify@^3.2.0:
+ version "3.5.0"
+ resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.5.0.tgz#1aa773002e1578457e9d9d4a50b0ccaaebcbd604"
+ dependencies:
+ end-of-stream "1.0.0"
+ inherits "^2.0.1"
+ readable-stream "^2.0.0"
+ stream-shift "^1.0.0"
+
+elliptic@^6.0.0:
+ version "6.4.0"
+ resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.4.0.tgz#cac9af8762c85836187003c8dfe193e5e2eae5df"
+ dependencies:
+ bn.js "^4.4.0"
+ brorand "^1.0.1"
+ hash.js "^1.0.0"
+ hmac-drbg "^1.0.0"
+ inherits "^2.0.1"
+ minimalistic-assert "^1.0.0"
+ minimalistic-crypto-utils "^1.0.0"
+
+end-of-stream@1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.0.0.tgz#d4596e702734a93e40e9af864319eabd99ff2f0e"
+ dependencies:
+ once "~1.3.0"
+
+end-of-stream@~0.1.5:
+ version "0.1.5"
+ resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-0.1.5.tgz#8e177206c3c80837d85632e8b9359dfe8b2f6eaf"
+ dependencies:
+ once "~1.3.0"
+
+error-ex@^1.2.0:
+ version "1.3.1"
+ resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.1.tgz#f855a86ce61adc4e8621c3cda21e7a7612c3a8dc"
+ dependencies:
+ is-arrayish "^0.2.1"
+
+es6-promise@^3.1.2:
+ version "3.3.1"
+ resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-3.3.1.tgz#a08cdde84ccdbf34d027a1451bc91d4bcd28a613"
+
+escape-string-regexp@1.0.5, escape-string-regexp@^1.0.0, escape-string-regexp@^1.0.2:
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
+
+escodegen@1.8.x:
+ version "1.8.1"
+ resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.8.1.tgz#5a5b53af4693110bebb0867aa3430dd3b70a1018"
+ dependencies:
+ esprima "^2.7.1"
+ estraverse "^1.9.1"
+ esutils "^2.0.2"
+ optionator "^0.8.1"
+ optionalDependencies:
+ source-map "~0.2.0"
+
+esprima@2.7.x, esprima@^2.7.1:
+ version "2.7.3"
+ resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581"
+
+esprima@^3.1.1:
+ version "3.1.3"
+ resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633"
+
+estraverse@^1.9.1:
+ version "1.9.3"
+ resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.9.3.tgz#af67f2dc922582415950926091a4005d29c9bb44"
+
+esutils@^2.0.2:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b"
+
+events@~1.1.0:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924"
+
+evp_bytestokey@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.0.tgz#497b66ad9fef65cd7c08a6180824ba1476b66e53"
+ dependencies:
+ create-hash "^1.1.1"
+
+expand-brackets@^0.1.4:
+ version "0.1.5"
+ resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b"
+ dependencies:
+ is-posix-bracket "^0.1.0"
+
+expand-range@^1.8.1:
+ version "1.8.2"
+ resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337"
+ dependencies:
+ fill-range "^2.1.0"
+
+expand-tilde@^1.2.2:
+ version "1.2.2"
+ resolved "https://registry.yarnpkg.com/expand-tilde/-/expand-tilde-1.2.2.tgz#0b81eba897e5a3d31d1c3d102f8f01441e559449"
+ dependencies:
+ os-homedir "^1.0.1"
+
+expand-tilde@^2.0.2:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/expand-tilde/-/expand-tilde-2.0.2.tgz#97e801aa052df02454de46b02bf621642cdc8502"
+ dependencies:
+ homedir-polyfill "^1.0.1"
+
+extend-shallow@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f"
+ dependencies:
+ is-extendable "^0.1.0"
+
+extend@^3.0.0:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444"
+
+extglob@^0.3.1:
+ version "0.3.2"
+ resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1"
+ dependencies:
+ is-extglob "^1.0.0"
+
+fancy-log@^1.1.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/fancy-log/-/fancy-log-1.3.0.tgz#45be17d02bb9917d60ccffd4995c999e6c8c9948"
+ dependencies:
+ chalk "^1.1.1"
+ time-stamp "^1.0.0"
+
+fast-levenshtein@~2.0.4:
+ version "2.0.6"
+ resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917"
+
+filelist@0.0.x:
+ version "0.0.6"
+ resolved "https://registry.yarnpkg.com/filelist/-/filelist-0.0.6.tgz#58a641ad1f57574a27fe87a440ef318834b55719"
+ dependencies:
+ minimatch "^3.0.3"
+ utilities "^0.0.37"
+
+filename-regex@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26"
+
+fill-range@^2.1.0:
+ version "2.2.3"
+ resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723"
+ dependencies:
+ is-number "^2.1.0"
+ isobject "^2.0.0"
+ randomatic "^1.1.3"
+ repeat-element "^1.1.2"
+ repeat-string "^1.5.2"
+
+find-index@^0.1.1:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/find-index/-/find-index-0.1.1.tgz#675d358b2ca3892d795a1ab47232f8b6e2e0dde4"
+
+find-up@^1.0.0:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f"
+ dependencies:
+ path-exists "^2.0.0"
+ pinkie-promise "^2.0.0"
+
+findup-sync@^0.4.2:
+ version "0.4.3"
+ resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-0.4.3.tgz#40043929e7bc60adf0b7f4827c4c6e75a0deca12"
+ dependencies:
+ detect-file "^0.1.0"
+ is-glob "^2.0.1"
+ micromatch "^2.3.7"
+ resolve-dir "^0.1.0"
+
+fined@^1.0.1:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/fined/-/fined-1.1.0.tgz#b37dc844b76a2f5e7081e884f7c0ae344f153476"
+ dependencies:
+ expand-tilde "^2.0.2"
+ is-plain-object "^2.0.3"
+ object.defaults "^1.1.0"
+ object.pick "^1.2.0"
+ parse-filepath "^1.0.1"
+
+first-chunk-stream@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz#59bfb50cd905f60d7c394cd3d9acaab4e6ad934e"
+
+flagged-respawn@^0.3.2:
+ version "0.3.2"
+ resolved "https://registry.yarnpkg.com/flagged-respawn/-/flagged-respawn-0.3.2.tgz#ff191eddcd7088a675b2610fffc976be9b8074b5"
+
+for-in@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80"
+
+for-own@^0.1.4:
+ version "0.1.5"
+ resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce"
+ dependencies:
+ for-in "^1.0.1"
+
+for-own@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/for-own/-/for-own-1.0.0.tgz#c63332f415cedc4b04dbfe70cf836494c53cb44b"
+ dependencies:
+ for-in "^1.0.1"
+
+from2@^2.1.1:
+ version "2.3.0"
+ resolved "https://registry.yarnpkg.com/from2/-/from2-2.3.0.tgz#8bfb5502bde4a4d36cfdeea007fcca21d7e382af"
+ dependencies:
+ inherits "^2.0.1"
+ readable-stream "^2.0.0"
+
+fs-exists-sync@^0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz#982d6893af918e72d08dec9e8673ff2b5a8d6add"
+
+fs.realpath@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
+
+function-bind@^1.0.2:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.0.tgz#16176714c801798e4e8f2cf7f7529467bb4a5771"
+
+gaze@^0.5.1:
+ version "0.5.2"
+ resolved "https://registry.yarnpkg.com/gaze/-/gaze-0.5.2.tgz#40b709537d24d1d45767db5a908689dfe69ac44f"
+ dependencies:
+ globule "~0.1.0"
+
+get-func-name@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41"
+
+get-stdin@^4.0.1:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe"
+
+glob-base@^0.3.0:
+ version "0.3.0"
+ resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4"
+ dependencies:
+ glob-parent "^2.0.0"
+ is-glob "^2.0.0"
+
+glob-parent@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28"
+ dependencies:
+ is-glob "^2.0.0"
+
+glob-parent@^3.0.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae"
+ dependencies:
+ is-glob "^3.1.0"
+ path-dirname "^1.0.0"
+
+glob-stream@^3.1.5:
+ version "3.1.18"
+ resolved "https://registry.yarnpkg.com/glob-stream/-/glob-stream-3.1.18.tgz#9170a5f12b790306fdfe598f313f8f7954fd143b"
+ dependencies:
+ glob "^4.3.1"
+ glob2base "^0.0.12"
+ minimatch "^2.0.1"
+ ordered-read-streams "^0.1.0"
+ through2 "^0.6.1"
+ unique-stream "^1.0.0"
+
+glob-stream@^5.3.2:
+ version "5.3.5"
+ resolved "https://registry.yarnpkg.com/glob-stream/-/glob-stream-5.3.5.tgz#a55665a9a8ccdc41915a87c701e32d4e016fad22"
+ dependencies:
+ extend "^3.0.0"
+ glob "^5.0.3"
+ glob-parent "^3.0.0"
+ micromatch "^2.3.7"
+ ordered-read-streams "^0.3.0"
+ through2 "^0.6.0"
+ to-absolute-glob "^0.1.1"
+ unique-stream "^2.0.2"
+
+glob-watcher@^0.0.6:
+ version "0.0.6"
+ resolved "https://registry.yarnpkg.com/glob-watcher/-/glob-watcher-0.0.6.tgz#b95b4a8df74b39c83298b0c05c978b4d9a3b710b"
+ dependencies:
+ gaze "^0.5.1"
+
+glob2base@^0.0.12:
+ version "0.0.12"
+ resolved "https://registry.yarnpkg.com/glob2base/-/glob2base-0.0.12.tgz#9d419b3e28f12e83a362164a277055922c9c0d56"
+ dependencies:
+ find-index "^0.1.1"
+
+glob@7.1.1:
+ version "7.1.1"
+ resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8"
+ dependencies:
+ fs.realpath "^1.0.0"
+ inflight "^1.0.4"
+ inherits "2"
+ minimatch "^3.0.2"
+ once "^1.3.0"
+ path-is-absolute "^1.0.0"
+
+glob@^4.3.1:
+ version "4.5.3"
+ resolved "https://registry.yarnpkg.com/glob/-/glob-4.5.3.tgz#c6cb73d3226c1efef04de3c56d012f03377ee15f"
+ dependencies:
+ inflight "^1.0.4"
+ inherits "2"
+ minimatch "^2.0.1"
+ once "^1.3.0"
+
+glob@^5.0.15, glob@^5.0.3:
+ version "5.0.15"
+ resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1"
+ dependencies:
+ inflight "^1.0.4"
+ inherits "2"
+ minimatch "2 || 3"
+ once "^1.3.0"
+ path-is-absolute "^1.0.0"
+
+glob@^7.0.3, glob@^7.0.5, glob@^7.1.0, glob@^7.1.1:
+ version "7.1.2"
+ resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15"
+ dependencies:
+ fs.realpath "^1.0.0"
+ inflight "^1.0.4"
+ inherits "2"
+ minimatch "^3.0.4"
+ once "^1.3.0"
+ path-is-absolute "^1.0.0"
+
+glob@~3.1.21:
+ version "3.1.21"
+ resolved "https://registry.yarnpkg.com/glob/-/glob-3.1.21.tgz#d29e0a055dea5138f4d07ed40e8982e83c2066cd"
+ dependencies:
+ graceful-fs "~1.2.0"
+ inherits "1"
+ minimatch "~0.2.11"
+
+global-modules@^0.2.3:
+ version "0.2.3"
+ resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-0.2.3.tgz#ea5a3bed42c6d6ce995a4f8a1269b5dae223828d"
+ dependencies:
+ global-prefix "^0.1.4"
+ is-windows "^0.2.0"
+
+global-prefix@^0.1.4:
+ version "0.1.5"
+ resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-0.1.5.tgz#8d3bc6b8da3ca8112a160d8d496ff0462bfef78f"
+ dependencies:
+ homedir-polyfill "^1.0.0"
+ ini "^1.3.4"
+ is-windows "^0.2.0"
+ which "^1.2.12"
+
+globby@^6.1.0:
+ version "6.1.0"
+ resolved "https://registry.yarnpkg.com/globby/-/globby-6.1.0.tgz#f5a6d70e8395e21c858fb0489d64df02424d506c"
+ dependencies:
+ array-union "^1.0.1"
+ glob "^7.0.3"
+ object-assign "^4.0.1"
+ pify "^2.0.0"
+ pinkie-promise "^2.0.0"
+
+globule@~0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/globule/-/globule-0.1.0.tgz#d9c8edde1da79d125a151b79533b978676346ae5"
+ dependencies:
+ glob "~3.1.21"
+ lodash "~1.0.1"
+ minimatch "~0.2.11"
+
+glogg@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/glogg/-/glogg-1.0.0.tgz#7fe0f199f57ac906cf512feead8f90ee4a284fc5"
+ dependencies:
+ sparkles "^1.0.0"
+
+graceful-fs@4.X, graceful-fs@^4.0.0, graceful-fs@^4.1.2, graceful-fs@^4.1.3:
+ version "4.1.11"
+ resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658"
+
+graceful-fs@^3.0.0:
+ version "3.0.11"
+ resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-3.0.11.tgz#7613c778a1afea62f25c630a086d7f3acbbdd818"
+ dependencies:
+ natives "^1.1.0"
+
+graceful-fs@~1.2.0:
+ version "1.2.3"
+ resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-1.2.3.tgz#15a4806a57547cb2d2dbf27f42e89a8c3451b364"
+
+"graceful-readlink@>= 1.0.0":
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725"
+
+growl@1.9.2:
+ version "1.9.2"
+ resolved "https://registry.yarnpkg.com/growl/-/growl-1.9.2.tgz#0ea7743715db8d8de2c5ede1775e1b45ac85c02f"
+
+gulp-clone@latest:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/gulp-clone/-/gulp-clone-1.0.0.tgz#9ae6c656bd9c4f369ee805eef565786bc81005b0"
+ dependencies:
+ gulp-util "~2.2.14"
+ through2 "~0.4.1"
+
+gulp-concat@latest:
+ version "2.6.1"
+ resolved "https://registry.yarnpkg.com/gulp-concat/-/gulp-concat-2.6.1.tgz#633d16c95d88504628ad02665663cee5a4793353"
+ dependencies:
+ concat-with-sourcemaps "^1.0.0"
+ through2 "^2.0.0"
+ vinyl "^2.0.0"
+
+gulp-help@latest:
+ version "1.6.1"
+ resolved "https://registry.yarnpkg.com/gulp-help/-/gulp-help-1.6.1.tgz#261db186e18397fef3f6a2c22e9c315bfa88ae0c"
+ dependencies:
+ chalk "^1.0.0"
+ object-assign "^3.0.0"
+
+gulp-insert@latest:
+ version "0.5.0"
+ resolved "https://registry.yarnpkg.com/gulp-insert/-/gulp-insert-0.5.0.tgz#32313f13e4a23cf5acca5ce5f0c080923c778602"
+ dependencies:
+ readable-stream "^1.0.26-4"
+ streamqueue "0.0.6"
+
+gulp-newer@latest:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/gulp-newer/-/gulp-newer-1.3.0.tgz#d50ecacbb822eda492b57324a6c85a07fd9a55c1"
+ dependencies:
+ glob "^7.0.3"
+ gulp-util "^3.0.7"
+ kew "^0.7.0"
+
+gulp-sourcemaps@1.6.0:
+ version "1.6.0"
+ resolved "https://registry.yarnpkg.com/gulp-sourcemaps/-/gulp-sourcemaps-1.6.0.tgz#b86ff349d801ceb56e1d9e7dc7bbcb4b7dee600c"
+ dependencies:
+ convert-source-map "^1.1.1"
+ graceful-fs "^4.1.2"
+ strip-bom "^2.0.0"
+ through2 "^2.0.0"
+ vinyl "^1.0.0"
+
+gulp-sourcemaps@latest:
+ version "2.6.0"
+ resolved "https://registry.yarnpkg.com/gulp-sourcemaps/-/gulp-sourcemaps-2.6.0.tgz#7ccce899a8a3bfca1593a3348d0fbf41dd3f51e5"
+ dependencies:
+ "@gulp-sourcemaps/identity-map" "1.X"
+ "@gulp-sourcemaps/map-sources" "1.X"
+ acorn "4.X"
+ convert-source-map "1.X"
+ css "2.X"
+ debug-fabulous "0.1.X"
+ detect-newline "2.X"
+ graceful-fs "4.X"
+ source-map "0.X"
+ strip-bom-string "1.X"
+ through2 "2.X"
+ vinyl "1.X"
+
+gulp-typescript@latest:
+ version "3.1.7"
+ resolved "https://registry.yarnpkg.com/gulp-typescript/-/gulp-typescript-3.1.7.tgz#d88600a914153f11c09c9a5ca8c2561ec75a4978"
+ dependencies:
+ gulp-util "~3.0.7"
+ source-map "~0.5.3"
+ through2 "~2.0.1"
+ vinyl-fs "~2.4.3"
+
+gulp-util@*, gulp-util@^3.0.0, gulp-util@^3.0.7, gulp-util@~3.0.7:
+ version "3.0.8"
+ resolved "https://registry.yarnpkg.com/gulp-util/-/gulp-util-3.0.8.tgz#0054e1e744502e27c04c187c3ecc505dd54bbb4f"
+ dependencies:
+ 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"
+
+gulp-util@~2.2.14:
+ version "2.2.20"
+ resolved "https://registry.yarnpkg.com/gulp-util/-/gulp-util-2.2.20.tgz#d7146e5728910bd8f047a6b0b1e549bc22dbd64c"
+ 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"
+
+gulp@latest:
+ version "3.9.1"
+ resolved "https://registry.yarnpkg.com/gulp/-/gulp-3.9.1.tgz#571ce45928dd40af6514fc4011866016c13845b4"
+ dependencies:
+ archy "^1.0.0"
+ chalk "^1.0.0"
+ deprecated "^0.0.1"
+ gulp-util "^3.0.0"
+ interpret "^1.0.0"
+ liftoff "^2.1.0"
+ minimist "^1.1.0"
+ orchestrator "^0.3.0"
+ pretty-hrtime "^1.0.0"
+ semver "^4.1.0"
+ tildify "^1.0.0"
+ v8flags "^2.0.2"
+ vinyl-fs "^0.3.0"
+
+gulplog@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/gulplog/-/gulplog-1.0.0.tgz#e28c4d45d05ecbbed818363ce8f9c5926229ffe5"
+ dependencies:
+ glogg "^1.0.0"
+
+handlebars@^4.0.1:
+ version "4.0.10"
+ resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.10.tgz#3d30c718b09a3d96f23ea4cc1f403c4d3ba9ff4f"
+ dependencies:
+ async "^1.4.0"
+ optimist "^0.6.1"
+ source-map "^0.4.4"
+ optionalDependencies:
+ uglify-js "^2.6"
+
+has-ansi@^0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-0.1.0.tgz#84f265aae8c0e6a88a12d7022894b7568894c62e"
+ dependencies:
+ ansi-regex "^0.2.0"
+
+has-ansi@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91"
+ dependencies:
+ ansi-regex "^2.0.0"
+
+has-color@~0.1.0:
+ version "0.1.7"
+ resolved "https://registry.yarnpkg.com/has-color/-/has-color-0.1.7.tgz#67144a5260c34fc3cca677d041daf52fe7b78b2f"
+
+has-flag@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa"
+
+has-gulplog@^0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/has-gulplog/-/has-gulplog-0.1.0.tgz#6414c82913697da51590397dafb12f22967811ce"
+ dependencies:
+ sparkles "^1.0.0"
+
+has@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/has/-/has-1.0.1.tgz#8461733f538b0837c9361e39a9ab9e9704dc2f28"
+ dependencies:
+ function-bind "^1.0.2"
+
+hash-base@^2.0.0:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-2.0.2.tgz#66ea1d856db4e8a5470cadf6fce23ae5244ef2e1"
+ dependencies:
+ inherits "^2.0.1"
+
+hash.js@^1.0.0, hash.js@^1.0.3:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.1.tgz#5cb2e796499224e69fd0b00ed01d2d4a16e7a323"
+ dependencies:
+ inherits "^2.0.3"
+ minimalistic-assert "^1.0.0"
+
+hmac-drbg@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1"
+ dependencies:
+ hash.js "^1.0.3"
+ minimalistic-assert "^1.0.0"
+ minimalistic-crypto-utils "^1.0.1"
+
+homedir-polyfill@^1.0.0, homedir-polyfill@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz#4c2bbc8a758998feebf5ed68580f76d46768b4bc"
+ dependencies:
+ parse-passwd "^1.0.0"
+
+hosted-git-info@^2.1.4:
+ version "2.4.2"
+ resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.4.2.tgz#0076b9f46a270506ddbaaea56496897460612a67"
+
+htmlescape@^1.1.0:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/htmlescape/-/htmlescape-1.1.1.tgz#3a03edc2214bca3b66424a3e7959349509cb0351"
+
+https-browserify@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73"
+
+ieee754@^1.1.4:
+ version "1.1.8"
+ resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.8.tgz#be33d40ac10ef1926701f6f08a2d86fbfd1ad3e4"
+
+indent-string@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-2.1.0.tgz#8e2d48348742121b4a8218b7a137e9a52049dc80"
+ dependencies:
+ repeating "^2.0.0"
+
+indexof@0.0.1:
+ version "0.0.1"
+ resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d"
+
+inflight@^1.0.4:
+ version "1.0.6"
+ resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
+ dependencies:
+ once "^1.3.0"
+ wrappy "1"
+
+inherits@1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/inherits/-/inherits-1.0.2.tgz#ca4309dadee6b54cc0b8d247e8d7c7a0975bdc9b"
+
+inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.1, inherits@~2.0.3:
+ version "2.0.3"
+ resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
+
+inherits@2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1"
+
+ini@^1.3.4:
+ version "1.3.4"
+ resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e"
+
+inline-source-map@~0.6.0:
+ version "0.6.2"
+ resolved "https://registry.yarnpkg.com/inline-source-map/-/inline-source-map-0.6.2.tgz#f9393471c18a79d1724f863fa38b586370ade2a5"
+ dependencies:
+ source-map "~0.5.3"
+
+insert-module-globals@^7.0.0:
+ version "7.0.1"
+ resolved "https://registry.yarnpkg.com/insert-module-globals/-/insert-module-globals-7.0.1.tgz#c03bf4e01cb086d5b5e5ace8ad0afe7889d638c3"
+ dependencies:
+ JSONStream "^1.0.3"
+ combine-source-map "~0.7.1"
+ concat-stream "~1.5.1"
+ is-buffer "^1.1.0"
+ lexical-scope "^1.2.0"
+ process "~0.11.0"
+ through2 "^2.0.0"
+ xtend "^4.0.0"
+
+interpret@^1.0.0:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.3.tgz#cbc35c62eeee73f19ab7b10a801511401afc0f90"
+
+into-stream@latest:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/into-stream/-/into-stream-3.1.0.tgz#96fb0a936c12babd6ff1752a17d05616abd094c6"
+ dependencies:
+ from2 "^2.1.1"
+ p-is-promise "^1.1.0"
+
+is-absolute@^0.2.3:
+ version "0.2.6"
+ resolved "https://registry.yarnpkg.com/is-absolute/-/is-absolute-0.2.6.tgz#20de69f3db942ef2d87b9c2da36f172235b1b5eb"
+ dependencies:
+ is-relative "^0.2.1"
+ is-windows "^0.2.0"
+
+is-arrayish@^0.2.1:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d"
+
+is-buffer@^1.1.0, is-buffer@^1.1.5:
+ version "1.1.5"
+ resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.5.tgz#1f3b26ef613b214b88cbca23cc6c01d87961eecc"
+
+is-builtin-module@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe"
+ dependencies:
+ builtin-modules "^1.0.0"
+
+is-dotfile@^1.0.0:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1"
+
+is-equal-shallow@^0.1.3:
+ version "0.1.3"
+ resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534"
+ dependencies:
+ is-primitive "^2.0.0"
+
+is-extendable@^0.1.0, is-extendable@^0.1.1:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89"
+
+is-extglob@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0"
+
+is-extglob@^2.1.0:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2"
+
+is-finite@^1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa"
+ dependencies:
+ number-is-nan "^1.0.0"
+
+is-glob@^2.0.0, is-glob@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863"
+ dependencies:
+ is-extglob "^1.0.0"
+
+is-glob@^3.1.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a"
+ dependencies:
+ is-extglob "^2.1.0"
+
+is-number@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f"
+ dependencies:
+ kind-of "^3.0.2"
+
+is-number@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195"
+ dependencies:
+ kind-of "^3.0.2"
+
+is-path-cwd@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d"
+
+is-path-in-cwd@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz#6477582b8214d602346094567003be8a9eac04dc"
+ dependencies:
+ is-path-inside "^1.0.0"
+
+is-path-inside@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.0.tgz#fc06e5a1683fbda13de667aff717bbc10a48f37f"
+ dependencies:
+ path-is-inside "^1.0.1"
+
+is-plain-object@^2.0.3:
+ version "2.0.3"
+ resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.3.tgz#c15bf3e4b66b62d72efaf2925848663ecbc619b6"
+ dependencies:
+ isobject "^3.0.0"
+
+is-posix-bracket@^0.1.0:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4"
+
+is-primitive@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575"
+
+is-relative@^0.2.1:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/is-relative/-/is-relative-0.2.1.tgz#d27f4c7d516d175fb610db84bbeef23c3bc97aa5"
+ dependencies:
+ is-unc-path "^0.1.1"
+
+is-stream@^1.0.1, is-stream@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44"
+
+is-unc-path@^0.1.1:
+ version "0.1.2"
+ resolved "https://registry.yarnpkg.com/is-unc-path/-/is-unc-path-0.1.2.tgz#6ab053a72573c10250ff416a3814c35178af39b9"
+ dependencies:
+ unc-path-regex "^0.1.0"
+
+is-utf8@^0.2.0:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72"
+
+is-valid-glob@^0.3.0:
+ version "0.3.0"
+ resolved "https://registry.yarnpkg.com/is-valid-glob/-/is-valid-glob-0.3.0.tgz#d4b55c69f51886f9b65c70d6c2622d37e29f48fe"
+
+is-windows@^0.2.0:
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-0.2.0.tgz#de1aa6d63ea29dd248737b69f1ff8b8002d2108c"
+
+isarray@0.0.1, isarray@~0.0.1:
+ version "0.0.1"
+ resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf"
+
+isarray@1.0.0, isarray@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
+
+isexe@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
+
+isobject@^2.0.0, isobject@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89"
+ dependencies:
+ isarray "1.0.0"
+
+isobject@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.0.tgz#39565217f3661789e8a0a0c080d5f7e6bc46e1a0"
+
+istanbul@latest:
+ version "0.4.5"
+ resolved "https://registry.yarnpkg.com/istanbul/-/istanbul-0.4.5.tgz#65c7d73d4c4da84d4f3ac310b918fb0b8033733b"
+ dependencies:
+ abbrev "1.0.x"
+ async "1.x"
+ escodegen "1.8.x"
+ esprima "2.7.x"
+ glob "^5.0.15"
+ handlebars "^4.0.1"
+ js-yaml "3.x"
+ mkdirp "0.5.x"
+ nopt "3.x"
+ once "1.x"
+ resolve "1.1.x"
+ supports-color "^3.1.0"
+ which "^1.1.1"
+ wordwrap "^1.0.0"
+
+jake@latest:
+ version "8.0.15"
+ resolved "https://registry.yarnpkg.com/jake/-/jake-8.0.15.tgz#f0da7d58e790ac1a8f86e6ee0f193e5d9230eabb"
+ dependencies:
+ async "0.9.x"
+ chalk "0.4.x"
+ filelist "0.0.x"
+ minimatch "3.x"
+ utilities "1.0.x"
+
+js-tokens@^3.0.0:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.1.tgz#08e9f132484a2c45a30907e9dc4d5567b7f114d7"
+
+js-yaml@3.x:
+ version "3.8.4"
+ resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.8.4.tgz#520b4564f86573ba96662af85a8cafa7b4b5a6f6"
+ dependencies:
+ argparse "^1.0.7"
+ esprima "^3.1.1"
+
+json-stable-stringify@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af"
+ dependencies:
+ jsonify "~0.0.0"
+
+json-stable-stringify@~0.0.0:
+ version "0.0.1"
+ resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-0.0.1.tgz#611c23e814db375527df851193db59dd2af27f45"
+ dependencies:
+ jsonify "~0.0.0"
+
+json3@3.3.2:
+ version "3.3.2"
+ resolved "https://registry.yarnpkg.com/json3/-/json3-3.3.2.tgz#3c0434743df93e2f5c42aee7b19bcb483575f4e1"
+
+jsonify@~0.0.0:
+ version "0.0.0"
+ resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73"
+
+jsonparse@^1.2.0:
+ version "1.3.1"
+ resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280"
+
+kew@^0.7.0:
+ version "0.7.0"
+ resolved "https://registry.yarnpkg.com/kew/-/kew-0.7.0.tgz#79d93d2d33363d6fdd2970b335d9141ad591d79b"
+
+kind-of@^3.0.2:
+ version "3.2.2"
+ resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64"
+ dependencies:
+ is-buffer "^1.1.5"
+
+kind-of@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57"
+ dependencies:
+ is-buffer "^1.1.5"
+
+labeled-stream-splicer@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/labeled-stream-splicer/-/labeled-stream-splicer-2.0.0.tgz#a52e1d138024c00b86b1c0c91f677918b8ae0a59"
+ dependencies:
+ inherits "^2.0.1"
+ isarray "~0.0.1"
+ stream-splicer "^2.0.0"
+
+lazy-cache@^1.0.3:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e"
+
+lazystream@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/lazystream/-/lazystream-1.0.0.tgz#f6995fe0f820392f61396be89462407bb77168e4"
+ dependencies:
+ readable-stream "^2.0.5"
+
+levn@~0.3.0:
+ version "0.3.0"
+ resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee"
+ dependencies:
+ prelude-ls "~1.1.2"
+ type-check "~0.3.2"
+
+lexical-scope@^1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/lexical-scope/-/lexical-scope-1.2.0.tgz#fcea5edc704a4b3a8796cdca419c3a0afaf22df4"
+ dependencies:
+ astw "^2.0.0"
+
+liftoff@^2.1.0:
+ version "2.3.0"
+ resolved "https://registry.yarnpkg.com/liftoff/-/liftoff-2.3.0.tgz#a98f2ff67183d8ba7cfaca10548bd7ff0550b385"
+ dependencies:
+ extend "^3.0.0"
+ findup-sync "^0.4.2"
+ fined "^1.0.1"
+ flagged-respawn "^0.3.2"
+ lodash.isplainobject "^4.0.4"
+ lodash.isstring "^4.0.1"
+ lodash.mapvalues "^4.4.0"
+ rechoir "^0.6.2"
+ resolve "^1.1.7"
+
+load-json-file@^1.0.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0"
+ dependencies:
+ graceful-fs "^4.1.2"
+ parse-json "^2.2.0"
+ pify "^2.0.0"
+ pinkie-promise "^2.0.0"
+ strip-bom "^2.0.0"
+
+lodash._baseassign@^3.0.0:
+ version "3.2.0"
+ resolved "https://registry.yarnpkg.com/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz#8c38a099500f215ad09e59f1722fd0c52bfe0a4e"
+ dependencies:
+ lodash._basecopy "^3.0.0"
+ lodash.keys "^3.0.0"
+
+lodash._basecopy@^3.0.0:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz#8da0e6a876cf344c0ad8a54882111dd3c5c7ca36"
+
+lodash._basecreate@^3.0.0:
+ version "3.0.3"
+ resolved "https://registry.yarnpkg.com/lodash._basecreate/-/lodash._basecreate-3.0.3.tgz#1bc661614daa7fc311b7d03bf16806a0213cf821"
+
+lodash._basetostring@^3.0.0:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz#d1861d877f824a52f669832dcaf3ee15566a07d5"
+
+lodash._basevalues@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz#5b775762802bde3d3297503e26300820fdf661b7"
+
+lodash._escapehtmlchar@~2.4.1:
+ version "2.4.1"
+ resolved "https://registry.yarnpkg.com/lodash._escapehtmlchar/-/lodash._escapehtmlchar-2.4.1.tgz#df67c3bb6b7e8e1e831ab48bfa0795b92afe899d"
+ dependencies:
+ lodash._htmlescapes "~2.4.1"
+
+lodash._escapestringchar@~2.4.1:
+ version "2.4.1"
+ resolved "https://registry.yarnpkg.com/lodash._escapestringchar/-/lodash._escapestringchar-2.4.1.tgz#ecfe22618a2ade50bfeea43937e51df66f0edb72"
+
+lodash._getnative@^3.0.0:
+ version "3.9.1"
+ resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5"
+
+lodash._htmlescapes@~2.4.1:
+ version "2.4.1"
+ resolved "https://registry.yarnpkg.com/lodash._htmlescapes/-/lodash._htmlescapes-2.4.1.tgz#32d14bf0844b6de6f8b62a051b4f67c228b624cb"
+
+lodash._isiterateecall@^3.0.0:
+ version "3.0.9"
+ resolved "https://registry.yarnpkg.com/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz#5203ad7ba425fae842460e696db9cf3e6aac057c"
+
+lodash._isnative@~2.4.1:
+ version "2.4.1"
+ resolved "https://registry.yarnpkg.com/lodash._isnative/-/lodash._isnative-2.4.1.tgz#3ea6404b784a7be836c7b57580e1cdf79b14832c"
+
+lodash._objecttypes@~2.4.1:
+ version "2.4.1"
+ resolved "https://registry.yarnpkg.com/lodash._objecttypes/-/lodash._objecttypes-2.4.1.tgz#7c0b7f69d98a1f76529f890b0cdb1b4dfec11c11"
+
+lodash._reescape@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/lodash._reescape/-/lodash._reescape-3.0.0.tgz#2b1d6f5dfe07c8a355753e5f27fac7f1cde1616a"
+
+lodash._reevaluate@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz#58bc74c40664953ae0b124d806996daca431e2ed"
+
+lodash._reinterpolate@^2.4.1, lodash._reinterpolate@~2.4.1:
+ version "2.4.1"
+ resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-2.4.1.tgz#4f1227aa5a8711fc632f5b07a1f4607aab8b3222"
+
+lodash._reinterpolate@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d"
+
+lodash._reunescapedhtml@~2.4.1:
+ version "2.4.1"
+ resolved "https://registry.yarnpkg.com/lodash._reunescapedhtml/-/lodash._reunescapedhtml-2.4.1.tgz#747c4fc40103eb3bb8a0976e571f7a2659e93ba7"
+ dependencies:
+ lodash._htmlescapes "~2.4.1"
+ lodash.keys "~2.4.1"
+
+lodash._root@^3.0.0:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/lodash._root/-/lodash._root-3.0.1.tgz#fba1c4524c19ee9a5f8136b4609f017cf4ded692"
+
+lodash._shimkeys@~2.4.1:
+ version "2.4.1"
+ resolved "https://registry.yarnpkg.com/lodash._shimkeys/-/lodash._shimkeys-2.4.1.tgz#6e9cc9666ff081f0b5a6c978b83e242e6949d203"
+ dependencies:
+ lodash._objecttypes "~2.4.1"
+
+lodash.create@3.1.1:
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/lodash.create/-/lodash.create-3.1.1.tgz#d7f2849f0dbda7e04682bb8cd72ab022461debe7"
+ dependencies:
+ lodash._baseassign "^3.0.0"
+ lodash._basecreate "^3.0.0"
+ lodash._isiterateecall "^3.0.0"
+
+lodash.defaults@~2.4.1:
+ version "2.4.1"
+ resolved "https://registry.yarnpkg.com/lodash.defaults/-/lodash.defaults-2.4.1.tgz#a7e8885f05e68851144b6e12a8f3678026bc4c54"
+ dependencies:
+ lodash._objecttypes "~2.4.1"
+ lodash.keys "~2.4.1"
+
+lodash.escape@^3.0.0:
+ version "3.2.0"
+ resolved "https://registry.yarnpkg.com/lodash.escape/-/lodash.escape-3.2.0.tgz#995ee0dc18c1b48cc92effae71a10aab5b487698"
+ dependencies:
+ lodash._root "^3.0.0"
+
+lodash.escape@~2.4.1:
+ version "2.4.1"
+ resolved "https://registry.yarnpkg.com/lodash.escape/-/lodash.escape-2.4.1.tgz#2ce12c5e084db0a57dda5e5d1eeeb9f5d175a3b4"
+ dependencies:
+ lodash._escapehtmlchar "~2.4.1"
+ lodash._reunescapedhtml "~2.4.1"
+ lodash.keys "~2.4.1"
+
+lodash.isarguments@^3.0.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a"
+
+lodash.isarray@^3.0.0:
+ version "3.0.4"
+ resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55"
+
+lodash.isequal@^4.0.0:
+ version "4.5.0"
+ resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0"
+
+lodash.isobject@~2.4.1:
+ version "2.4.1"
+ resolved "https://registry.yarnpkg.com/lodash.isobject/-/lodash.isobject-2.4.1.tgz#5a2e47fe69953f1ee631a7eba1fe64d2d06558f5"
+ dependencies:
+ lodash._objecttypes "~2.4.1"
+
+lodash.isplainobject@^4.0.4:
+ version "4.0.6"
+ resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb"
+
+lodash.isstring@^4.0.1:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/lodash.isstring/-/lodash.isstring-4.0.1.tgz#d527dfb5456eca7cc9bb95d5daeaf88ba54a5451"
+
+lodash.keys@^3.0.0:
+ version "3.1.2"
+ resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-3.1.2.tgz#4dbc0472b156be50a0b286855d1bd0b0c656098a"
+ dependencies:
+ lodash._getnative "^3.0.0"
+ lodash.isarguments "^3.0.0"
+ lodash.isarray "^3.0.0"
+
+lodash.keys@~2.4.1:
+ version "2.4.1"
+ resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-2.4.1.tgz#48dea46df8ff7632b10d706b8acb26591e2b3727"
+ dependencies:
+ lodash._isnative "~2.4.1"
+ lodash._shimkeys "~2.4.1"
+ lodash.isobject "~2.4.1"
+
+lodash.mapvalues@^4.4.0:
+ version "4.6.0"
+ resolved "https://registry.yarnpkg.com/lodash.mapvalues/-/lodash.mapvalues-4.6.0.tgz#1bafa5005de9dd6f4f26668c30ca37230cc9689c"
+
+lodash.memoize@~3.0.3:
+ version "3.0.4"
+ resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-3.0.4.tgz#2dcbd2c287cbc0a55cc42328bd0c736150d53e3f"
+
+lodash.restparam@^3.0.0:
+ version "3.6.1"
+ resolved "https://registry.yarnpkg.com/lodash.restparam/-/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805"
+
+lodash.template@^2.4.1:
+ version "2.4.1"
+ resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-2.4.1.tgz#9e611007edf629129a974ab3c48b817b3e1cf20d"
+ dependencies:
+ lodash._escapestringchar "~2.4.1"
+ lodash._reinterpolate "~2.4.1"
+ lodash.defaults "~2.4.1"
+ lodash.escape "~2.4.1"
+ lodash.keys "~2.4.1"
+ lodash.templatesettings "~2.4.1"
+ lodash.values "~2.4.1"
+
+lodash.template@^3.0.0:
+ version "3.6.2"
+ resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-3.6.2.tgz#f8cdecc6169a255be9098ae8b0c53d378931d14f"
+ 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"
+
+lodash.templatesettings@^3.0.0:
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz#fb307844753b66b9f1afa54e262c745307dba8e5"
+ dependencies:
+ lodash._reinterpolate "^3.0.0"
+ lodash.escape "^3.0.0"
+
+lodash.templatesettings@~2.4.1:
+ version "2.4.1"
+ resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-2.4.1.tgz#ea76c75d11eb86d4dbe89a83893bb861929ac699"
+ dependencies:
+ lodash._reinterpolate "~2.4.1"
+ lodash.escape "~2.4.1"
+
+lodash.values@~2.4.1:
+ version "2.4.1"
+ resolved "https://registry.yarnpkg.com/lodash.values/-/lodash.values-2.4.1.tgz#abf514436b3cb705001627978cbcf30b1280eea4"
+ dependencies:
+ lodash.keys "~2.4.1"
+
+lodash@~1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/lodash/-/lodash-1.0.2.tgz#8f57560c83b59fc270bd3d561b690043430e2551"
+
+longest@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097"
+
+loud-rejection@^1.0.0:
+ version "1.6.0"
+ resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f"
+ dependencies:
+ currently-unhandled "^0.4.1"
+ signal-exit "^3.0.0"
+
+lru-cache@2:
+ version "2.7.3"
+ resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-2.7.3.tgz#6d4524e8b955f95d4f5b58851ce21dd72fb4e952"
+
+make-error@^1.1.1:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.0.tgz#52ad3a339ccf10ce62b4040b708fe707244b8b96"
+
+map-cache@^0.2.0:
+ version "0.2.2"
+ resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf"
+
+map-obj@^1.0.0, map-obj@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d"
+
+meow@^3.3.0:
+ version "3.7.0"
+ resolved "https://registry.yarnpkg.com/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb"
+ dependencies:
+ camelcase-keys "^2.0.0"
+ decamelize "^1.1.2"
+ loud-rejection "^1.0.0"
+ map-obj "^1.0.1"
+ minimist "^1.1.3"
+ normalize-package-data "^2.3.4"
+ object-assign "^4.0.1"
+ read-pkg-up "^1.0.1"
+ redent "^1.0.0"
+ trim-newlines "^1.0.0"
+
+merge-stream@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-1.0.1.tgz#4041202d508a342ba00174008df0c251b8c135e1"
+ dependencies:
+ readable-stream "^2.0.1"
+
+merge2@latest:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.0.3.tgz#fa44f8b2262615ab72f0808a401d478a70e394db"
+
+micromatch@^2.3.7:
+ version "2.3.11"
+ resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565"
+ dependencies:
+ arr-diff "^2.0.0"
+ array-unique "^0.2.1"
+ braces "^1.8.2"
+ expand-brackets "^0.1.4"
+ extglob "^0.3.1"
+ filename-regex "^2.0.0"
+ is-extglob "^1.0.0"
+ is-glob "^2.0.1"
+ kind-of "^3.0.2"
+ normalize-path "^2.0.1"
+ object.omit "^2.0.0"
+ parse-glob "^3.0.4"
+ regex-cache "^0.4.2"
+
+miller-rabin@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.0.tgz#4a62fb1d42933c05583982f4c716f6fb9e6c6d3d"
+ dependencies:
+ bn.js "^4.0.0"
+ brorand "^1.0.1"
+
+minimalistic-assert@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz#702be2dda6b37f4836bcb3f5db56641b64a1d3d3"
+
+minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a"
+
+"minimatch@2 || 3", minimatch@3.x, minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4:
+ version "3.0.4"
+ resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
+ dependencies:
+ brace-expansion "^1.1.7"
+
+minimatch@^2.0.1:
+ version "2.0.10"
+ resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-2.0.10.tgz#8d087c39c6b38c001b97fca7ce6d0e1e80afbac7"
+ dependencies:
+ brace-expansion "^1.0.0"
+
+minimatch@~0.2.11:
+ version "0.2.14"
+ resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-0.2.14.tgz#c74e780574f63c6f9a090e90efbe6ef53a6a756a"
+ dependencies:
+ lru-cache "2"
+ sigmund "~1.0.0"
+
+minimist@0.0.8, minimist@~0.0.1:
+ version "0.0.8"
+ resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d"
+
+minimist@^0.2.0:
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.2.0.tgz#4dffe525dae2b864c66c2e23c6271d7afdecefce"
+
+minimist@^1.1.0, minimist@^1.1.3, minimist@^1.2.0, minimist@latest:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"
+
+mkdirp@0.5.1, mkdirp@0.5.x, mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@latest:
+ version "0.5.1"
+ resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903"
+ dependencies:
+ minimist "0.0.8"
+
+mocha-fivemat-progress-reporter@latest:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/mocha-fivemat-progress-reporter/-/mocha-fivemat-progress-reporter-0.1.0.tgz#ccaff0e1c91cf557fe77e079df9954b91b747756"
+
+mocha@latest:
+ version "3.4.2"
+ resolved "https://registry.yarnpkg.com/mocha/-/mocha-3.4.2.tgz#d0ef4d332126dbf18d0d640c9b382dd48be97594"
+ dependencies:
+ browser-stdout "1.3.0"
+ commander "2.9.0"
+ debug "2.6.0"
+ diff "3.2.0"
+ escape-string-regexp "1.0.5"
+ glob "7.1.1"
+ growl "1.9.2"
+ json3 "3.3.2"
+ lodash.create "3.1.1"
+ mkdirp "0.5.1"
+ supports-color "3.1.2"
+
+module-deps@^4.0.8:
+ version "4.1.1"
+ resolved "https://registry.yarnpkg.com/module-deps/-/module-deps-4.1.1.tgz#23215833f1da13fd606ccb8087b44852dcb821fd"
+ dependencies:
+ JSONStream "^1.0.3"
+ browser-resolve "^1.7.0"
+ cached-path-relative "^1.0.0"
+ concat-stream "~1.5.0"
+ defined "^1.0.0"
+ detective "^4.0.0"
+ duplexer2 "^0.1.2"
+ inherits "^2.0.1"
+ parents "^1.0.0"
+ readable-stream "^2.0.2"
+ resolve "^1.1.3"
+ stream-combiner2 "^1.1.1"
+ subarg "^1.0.0"
+ through2 "^2.0.0"
+ xtend "^4.0.0"
+
+ms@0.7.2:
+ version "0.7.2"
+ resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.2.tgz#ae25cf2512b3885a1d95d7f037868d8431124765"
+
+multipipe@^0.1.0, multipipe@^0.1.2:
+ version "0.1.2"
+ resolved "https://registry.yarnpkg.com/multipipe/-/multipipe-0.1.2.tgz#2a8f2ddf70eed564dff2d57f1e1a137d9f05078b"
+ dependencies:
+ duplexer2 "0.0.2"
+
+natives@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/natives/-/natives-1.1.0.tgz#e9ff841418a6b2ec7a495e939984f78f163e6e31"
+
+nopt@3.x:
+ version "3.0.6"
+ resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9"
+ dependencies:
+ abbrev "1"
+
+normalize-package-data@^2.3.2, normalize-package-data@^2.3.4:
+ version "2.3.8"
+ resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.3.8.tgz#d819eda2a9dedbd1ffa563ea4071d936782295bb"
+ dependencies:
+ hosted-git-info "^2.1.4"
+ is-builtin-module "^1.0.0"
+ semver "2 || 3 || 4 || 5"
+ validate-npm-package-license "^3.0.1"
+
+normalize-path@^2.0.1, normalize-path@^2.1.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9"
+ dependencies:
+ remove-trailing-separator "^1.0.1"
+
+number-is-nan@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d"
+
+object-assign@4.1.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.0.tgz#7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0"
+
+object-assign@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-3.0.0.tgz#9bedd5ca0897949bca47e7ff408062d549f587f2"
+
+object-assign@^4.0.0, object-assign@^4.0.1:
+ version "4.1.1"
+ resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
+
+object-keys@~0.4.0:
+ version "0.4.0"
+ resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-0.4.0.tgz#28a6aae7428dd2c3a92f3d95f21335dd204e0336"
+
+object.defaults@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/object.defaults/-/object.defaults-1.1.0.tgz#3a7f868334b407dea06da16d88d5cd29e435fecf"
+ dependencies:
+ array-each "^1.0.1"
+ array-slice "^1.0.0"
+ for-own "^1.0.0"
+ isobject "^3.0.0"
+
+object.omit@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa"
+ dependencies:
+ for-own "^0.1.4"
+ is-extendable "^0.1.1"
+
+object.pick@^1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.2.0.tgz#b5392bee9782da6d9fb7d6afaf539779f1234c2b"
+ dependencies:
+ isobject "^2.1.0"
+
+once@1.x, once@^1.3.0:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
+ dependencies:
+ wrappy "1"
+
+once@~1.3.0:
+ version "1.3.3"
+ resolved "https://registry.yarnpkg.com/once/-/once-1.3.3.tgz#b2e261557ce4c314ec8304f3fa82663e4297ca20"
+ dependencies:
+ wrappy "1"
+
+optimist@^0.6.1:
+ version "0.6.1"
+ resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686"
+ dependencies:
+ minimist "~0.0.1"
+ wordwrap "~0.0.2"
+
+optionator@^0.8.1:
+ version "0.8.2"
+ resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64"
+ dependencies:
+ deep-is "~0.1.3"
+ fast-levenshtein "~2.0.4"
+ levn "~0.3.0"
+ prelude-ls "~1.1.2"
+ type-check "~0.3.2"
+ wordwrap "~1.0.0"
+
+orchestrator@^0.3.0:
+ version "0.3.8"
+ resolved "https://registry.yarnpkg.com/orchestrator/-/orchestrator-0.3.8.tgz#14e7e9e2764f7315fbac184e506c7aa6df94ad7e"
+ dependencies:
+ end-of-stream "~0.1.5"
+ sequencify "~0.0.7"
+ stream-consume "~0.1.0"
+
+ordered-read-streams@^0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/ordered-read-streams/-/ordered-read-streams-0.1.0.tgz#fd565a9af8eb4473ba69b6ed8a34352cb552f126"
+
+ordered-read-streams@^0.3.0:
+ version "0.3.0"
+ resolved "https://registry.yarnpkg.com/ordered-read-streams/-/ordered-read-streams-0.3.0.tgz#7137e69b3298bb342247a1bbee3881c80e2fd78b"
+ dependencies:
+ is-stream "^1.0.1"
+ readable-stream "^2.0.1"
+
+os-browserify@~0.1.1:
+ version "0.1.2"
+ resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.1.2.tgz#49ca0293e0b19590a5f5de10c7f265a617d8fe54"
+
+os-homedir@^1.0.0, os-homedir@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3"
+
+p-is-promise@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-1.1.0.tgz#9c9456989e9f6588017b0434d56097675c3da05e"
+
+p-map@^1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/p-map/-/p-map-1.1.1.tgz#05f5e4ae97a068371bc2a5cc86bfbdbc19c4ae7a"
+
+pako@~0.2.0:
+ version "0.2.9"
+ resolved "https://registry.yarnpkg.com/pako/-/pako-0.2.9.tgz#f3f7522f4ef782348da8161bad9ecfd51bf83a75"
+
+parents@^1.0.0, parents@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/parents/-/parents-1.0.1.tgz#fedd4d2bf193a77745fe71e371d73c3307d9c751"
+ dependencies:
+ path-platform "~0.11.15"
+
+parse-asn1@^5.0.0:
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.0.tgz#37c4f9b7ed3ab65c74817b5f2480937fbf97c712"
+ dependencies:
+ asn1.js "^4.0.0"
+ browserify-aes "^1.0.0"
+ create-hash "^1.1.0"
+ evp_bytestokey "^1.0.0"
+ pbkdf2 "^3.0.3"
+
+parse-filepath@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/parse-filepath/-/parse-filepath-1.0.1.tgz#159d6155d43904d16c10ef698911da1e91969b73"
+ dependencies:
+ is-absolute "^0.2.3"
+ map-cache "^0.2.0"
+ path-root "^0.1.1"
+
+parse-glob@^3.0.4:
+ version "3.0.4"
+ resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c"
+ dependencies:
+ glob-base "^0.3.0"
+ is-dotfile "^1.0.0"
+ is-extglob "^1.0.0"
+ is-glob "^2.0.0"
+
+parse-json@^2.2.0:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9"
+ dependencies:
+ error-ex "^1.2.0"
+
+parse-passwd@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6"
+
+path-browserify@~0.0.0:
+ version "0.0.0"
+ resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.0.tgz#a0b870729aae214005b7d5032ec2cbbb0fb4451a"
+
+path-dirname@^1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0"
+
+path-exists@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b"
+ dependencies:
+ pinkie-promise "^2.0.0"
+
+path-is-absolute@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
+
+path-is-inside@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53"
+
+path-parse@^1.0.5:
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1"
+
+path-platform@~0.11.15:
+ version "0.11.15"
+ resolved "https://registry.yarnpkg.com/path-platform/-/path-platform-0.11.15.tgz#e864217f74c36850f0852b78dc7bf7d4a5721bf2"
+
+path-root-regex@^0.1.0:
+ version "0.1.2"
+ resolved "https://registry.yarnpkg.com/path-root-regex/-/path-root-regex-0.1.2.tgz#bfccdc8df5b12dc52c8b43ec38d18d72c04ba96d"
+
+path-root@^0.1.1:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/path-root/-/path-root-0.1.1.tgz#9a4a6814cac1c0cd73360a95f32083c8ea4745b7"
+ dependencies:
+ path-root-regex "^0.1.0"
+
+path-type@^1.0.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441"
+ dependencies:
+ graceful-fs "^4.1.2"
+ pify "^2.0.0"
+ pinkie-promise "^2.0.0"
+
+pathval@^1.0.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.0.tgz#b942e6d4bde653005ef6b71361def8727d0645e0"
+
+pbkdf2@^3.0.3:
+ version "3.0.12"
+ resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.12.tgz#be36785c5067ea48d806ff923288c5f750b6b8a2"
+ dependencies:
+ create-hash "^1.1.2"
+ create-hmac "^1.1.4"
+ ripemd160 "^2.0.1"
+ safe-buffer "^5.0.1"
+ sha.js "^2.4.8"
+
+pify@^2.0.0:
+ version "2.3.0"
+ resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c"
+
+pify@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176"
+
+pinkie-promise@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa"
+ dependencies:
+ pinkie "^2.0.0"
+
+pinkie@^2.0.0:
+ version "2.0.4"
+ resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870"
+
+prelude-ls@~1.1.2:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54"
+
+preserve@^0.2.0:
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
+
+pretty-hrtime@^1.0.0:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz#b7e3ea42435a4c9b2759d99e0f201eb195802ee1"
+
+process-nextick-args@^1.0.6, process-nextick-args@~1.0.6:
+ version "1.0.7"
+ resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3"
+
+process@~0.11.0:
+ version "0.11.10"
+ resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182"
+
+public-encrypt@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.0.tgz#39f699f3a46560dd5ebacbca693caf7c65c18cc6"
+ dependencies:
+ bn.js "^4.1.0"
+ browserify-rsa "^4.0.0"
+ create-hash "^1.1.0"
+ parse-asn1 "^5.0.0"
+ randombytes "^2.0.1"
+
+punycode@1.3.2:
+ version "1.3.2"
+ resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d"
+
+punycode@^1.3.2:
+ version "1.4.1"
+ resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e"
+
+q@latest:
+ version "1.5.0"
+ resolved "https://registry.yarnpkg.com/q/-/q-1.5.0.tgz#dd01bac9d06d30e6f219aecb8253ee9ebdc308f1"
+
+querystring-es3@~0.2.0:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73"
+
+querystring@0.2.0:
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620"
+
+randomatic@^1.1.3:
+ version "1.1.7"
+ resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.7.tgz#c7abe9cc8b87c0baa876b19fde83fd464797e38c"
+ dependencies:
+ is-number "^3.0.0"
+ kind-of "^4.0.0"
+
+randombytes@^2.0.0, randombytes@^2.0.1:
+ version "2.0.5"
+ resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.0.5.tgz#dc009a246b8d09a177b4b7a0ae77bc570f4b1b79"
+ dependencies:
+ safe-buffer "^5.1.0"
+
+read-only-stream@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/read-only-stream/-/read-only-stream-2.0.0.tgz#2724fd6a8113d73764ac288d4386270c1dbf17f0"
+ dependencies:
+ readable-stream "^2.0.2"
+
+read-pkg-up@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02"
+ dependencies:
+ find-up "^1.0.0"
+ read-pkg "^1.0.0"
+
+read-pkg@^1.0.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28"
+ dependencies:
+ load-json-file "^1.0.0"
+ normalize-package-data "^2.3.2"
+ path-type "^1.0.0"
+
+"readable-stream@>=1.0.33-1 <1.1.0-0", readable-stream@~1.0.17:
+ version "1.0.34"
+ resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c"
+ dependencies:
+ core-util-is "~1.0.0"
+ inherits "~2.0.1"
+ isarray "0.0.1"
+ string_decoder "~0.10.x"
+
+readable-stream@^1.0.26-2, readable-stream@^1.0.26-4, readable-stream@~1.1.9:
+ version "1.1.14"
+ resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9"
+ dependencies:
+ core-util-is "~1.0.0"
+ inherits "~2.0.1"
+ isarray "0.0.1"
+ string_decoder "~0.10.x"
+
+readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.5, readable-stream@^2.1.5, readable-stream@^2.2.6:
+ version "2.3.2"
+ resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.2.tgz#5a04df05e4f57fe3f0dc68fdd11dc5c97c7e6f4d"
+ dependencies:
+ core-util-is "~1.0.0"
+ inherits "~2.0.3"
+ isarray "~1.0.0"
+ process-nextick-args "~1.0.6"
+ safe-buffer "~5.1.0"
+ string_decoder "~1.0.0"
+ util-deprecate "~1.0.1"
+
+readable-stream@~2.0.0:
+ version "2.0.6"
+ resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.0.6.tgz#8f90341e68a53ccc928788dacfcd11b36eb9b78e"
+ 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"
+
+rechoir@^0.6.2:
+ version "0.6.2"
+ resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384"
+ dependencies:
+ resolve "^1.1.6"
+
+redent@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/redent/-/redent-1.0.0.tgz#cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde"
+ dependencies:
+ indent-string "^2.1.0"
+ strip-indent "^1.0.1"
+
+regex-cache@^0.4.2:
+ version "0.4.3"
+ resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.3.tgz#9b1a6c35d4d0dfcef5711ae651e8e9d3d7114145"
+ dependencies:
+ is-equal-shallow "^0.1.3"
+ is-primitive "^2.0.0"
+
+remove-trailing-separator@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.0.2.tgz#69b062d978727ad14dc6b56ba4ab772fd8d70511"
+
+repeat-element@^1.1.2:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a"
+
+repeat-string@^1.5.2:
+ version "1.6.1"
+ resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637"
+
+repeating@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda"
+ dependencies:
+ is-finite "^1.0.0"
+
+replace-ext@0.0.1:
+ version "0.0.1"
+ resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-0.0.1.tgz#29bbd92078a739f0bcce2b4ee41e837953522924"
+
+replace-ext@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-1.0.0.tgz#de63128373fcbf7c3ccfa4de5a480c45a67958eb"
+
+resolve-dir@^0.1.0:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/resolve-dir/-/resolve-dir-0.1.1.tgz#b219259a5602fac5c5c496ad894a6e8cc430261e"
+ dependencies:
+ expand-tilde "^1.2.2"
+ global-modules "^0.2.3"
+
+resolve-url@~0.2.1:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a"
+
+resolve@1.1.7, resolve@1.1.x, resolve@^1.1.4:
+ version "1.1.7"
+ resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b"
+
+resolve@^1.1.3, resolve@^1.1.6, resolve@^1.1.7, resolve@^1.3.2:
+ version "1.3.3"
+ resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.3.3.tgz#655907c3469a8680dc2de3a275a8fdd69691f0e5"
+ dependencies:
+ path-parse "^1.0.5"
+
+right-align@^0.1.1:
+ version "0.1.3"
+ resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef"
+ dependencies:
+ align-text "^0.1.1"
+
+rimraf@^2.2.8, rimraf@^2.5.2:
+ version "2.6.1"
+ resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.1.tgz#c2338ec643df7a1b7fe5c54fa86f57428a55f33d"
+ dependencies:
+ glob "^7.0.5"
+
+ripemd160@^2.0.0, ripemd160@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.1.tgz#0f4584295c53a3628af7e6d79aca21ce57d1c6e7"
+ dependencies:
+ hash-base "^2.0.0"
+ inherits "^2.0.1"
+
+run-sequence@latest:
+ version "1.2.2"
+ resolved "https://registry.yarnpkg.com/run-sequence/-/run-sequence-1.2.2.tgz#5095a0bebe98733b0140bd08dd80ec030ddacdeb"
+ dependencies:
+ chalk "*"
+ gulp-util "*"
+
+safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@~5.1.0:
+ version "5.1.1"
+ resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853"
+
+sander@^0.5.0:
+ version "0.5.1"
+ resolved "https://registry.yarnpkg.com/sander/-/sander-0.5.1.tgz#741e245e231f07cafb6fdf0f133adfa216a502ad"
+ dependencies:
+ es6-promise "^3.1.2"
+ graceful-fs "^4.1.3"
+ mkdirp "^0.5.1"
+ rimraf "^2.5.2"
+
+"semver@2 || 3 || 4 || 5", semver@^5.3.0:
+ version "5.3.0"
+ resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f"
+
+semver@^4.1.0:
+ version "4.3.6"
+ resolved "https://registry.yarnpkg.com/semver/-/semver-4.3.6.tgz#300bc6e0e86374f7ba61068b5b1ecd57fc6532da"
+
+sequencify@~0.0.7:
+ version "0.0.7"
+ resolved "https://registry.yarnpkg.com/sequencify/-/sequencify-0.0.7.tgz#90cff19d02e07027fd767f5ead3e7b95d1e7380c"
+
+sha.js@^2.4.0, sha.js@^2.4.8, sha.js@~2.4.4:
+ version "2.4.8"
+ resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.8.tgz#37068c2c476b6baf402d14a49c67f597921f634f"
+ dependencies:
+ inherits "^2.0.1"
+
+shasum@^1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/shasum/-/shasum-1.0.2.tgz#e7012310d8f417f4deb5712150e5678b87ae565f"
+ dependencies:
+ json-stable-stringify "~0.0.0"
+ sha.js "~2.4.4"
+
+shell-quote@^1.6.1:
+ version "1.6.1"
+ resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.6.1.tgz#f4781949cce402697127430ea3b3c5476f481767"
+ dependencies:
+ array-filter "~0.0.0"
+ array-map "~0.0.0"
+ array-reduce "~0.0.0"
+ jsonify "~0.0.0"
+
+sigmund@~1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/sigmund/-/sigmund-1.0.1.tgz#3ff21f198cad2175f9f3b781853fd94d0d19b590"
+
+signal-exit@^3.0.0:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d"
+
+sorcery@latest:
+ version "0.10.0"
+ resolved "https://registry.yarnpkg.com/sorcery/-/sorcery-0.10.0.tgz#8ae90ad7d7cb05fc59f1ab0c637845d5c15a52b7"
+ dependencies:
+ buffer-crc32 "^0.2.5"
+ minimist "^1.2.0"
+ sander "^0.5.0"
+ sourcemap-codec "^1.3.0"
+
+source-map-resolve@^0.3.0:
+ version "0.3.1"
+ resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.3.1.tgz#610f6122a445b8dd51535a2a71b783dfc1248761"
+ dependencies:
+ atob "~1.1.0"
+ resolve-url "~0.2.1"
+ source-map-url "~0.3.0"
+ urix "~0.1.0"
+
+source-map-support@^0.4.0:
+ version "0.4.15"
+ resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.15.tgz#03202df65c06d2bd8c7ec2362a193056fef8d3b1"
+ dependencies:
+ source-map "^0.5.6"
+
+source-map-url@~0.3.0:
+ version "0.3.0"
+ resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.3.0.tgz#7ecaf13b57bcd09da8a40c5d269db33799d4aaf9"
+
+source-map@0.X, source-map@^0.5.1, source-map@^0.5.6, source-map@~0.5.1, source-map@~0.5.3:
+ version "0.5.6"
+ resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412"
+
+source-map@^0.1.38:
+ version "0.1.43"
+ resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.1.43.tgz#c24bc146ca517c1471f5dacbe2571b2b7f9e3346"
+ dependencies:
+ amdefine ">=0.0.4"
+
+source-map@^0.4.4:
+ version "0.4.4"
+ resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b"
+ dependencies:
+ amdefine ">=0.0.4"
+
+source-map@~0.2.0:
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.2.0.tgz#dab73fbcfc2ba819b4de03bd6f6eaa48164b3f9d"
+ dependencies:
+ amdefine ">=0.0.4"
+
+sourcemap-codec@^1.3.0:
+ version "1.3.1"
+ resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.3.1.tgz#9ad6f9bdbd691931016e30939dbc868673323146"
+ dependencies:
+ vlq "^0.2.1"
+
+sparkles@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/sparkles/-/sparkles-1.0.0.tgz#1acbbfb592436d10bbe8f785b7cc6f82815012c3"
+
+spdx-correct@~1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-1.0.2.tgz#4b3073d933ff51f3912f03ac5519498a4150db40"
+ dependencies:
+ spdx-license-ids "^1.0.2"
+
+spdx-expression-parse@~1.0.0:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz#9bdf2f20e1f40ed447fbe273266191fced51626c"
+
+spdx-license-ids@^1.0.2:
+ version "1.2.2"
+ resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz#c9df7a3424594ade6bd11900d596696dc06bac57"
+
+sprintf-js@~1.0.2:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"
+
+stream-browserify@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.1.tgz#66266ee5f9bdb9940a4e4514cafb43bb71e5c9db"
+ dependencies:
+ inherits "~2.0.1"
+ readable-stream "^2.0.2"
+
+stream-combiner2@^1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/stream-combiner2/-/stream-combiner2-1.1.1.tgz#fb4d8a1420ea362764e21ad4780397bebcb41cbe"
+ dependencies:
+ duplexer2 "~0.1.0"
+ readable-stream "^2.0.2"
+
+stream-consume@~0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/stream-consume/-/stream-consume-0.1.0.tgz#a41ead1a6d6081ceb79f65b061901b6d8f3d1d0f"
+
+stream-http@^2.0.0:
+ version "2.7.2"
+ resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.7.2.tgz#40a050ec8dc3b53b33d9909415c02c0bf1abfbad"
+ dependencies:
+ builtin-status-codes "^3.0.0"
+ inherits "^2.0.1"
+ readable-stream "^2.2.6"
+ to-arraybuffer "^1.0.0"
+ xtend "^4.0.0"
+
+stream-shift@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.0.tgz#d5c752825e5367e786f78e18e445ea223a155952"
+
+stream-splicer@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/stream-splicer/-/stream-splicer-2.0.0.tgz#1b63be438a133e4b671cc1935197600175910d83"
+ dependencies:
+ inherits "^2.0.1"
+ readable-stream "^2.0.2"
+
+streamqueue@0.0.6:
+ version "0.0.6"
+ resolved "https://registry.yarnpkg.com/streamqueue/-/streamqueue-0.0.6.tgz#66f5f5ec94e9b8af249e4aec2dd1f741bfe94de3"
+ dependencies:
+ readable-stream "^1.0.26-2"
+
+string_decoder@~0.10.x:
+ version "0.10.31"
+ resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94"
+
+string_decoder@~1.0.0:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.3.tgz#0fc67d7c141825de94282dd536bec6b9bce860ab"
+ dependencies:
+ safe-buffer "~5.1.0"
+
+strip-ansi@^0.3.0:
+ version "0.3.0"
+ resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-0.3.0.tgz#25f48ea22ca79187f3174a4db8759347bb126220"
+ dependencies:
+ ansi-regex "^0.2.1"
+
+strip-ansi@^3.0.0:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf"
+ dependencies:
+ ansi-regex "^2.0.0"
+
+strip-ansi@~0.1.0:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-0.1.1.tgz#39e8a98d044d150660abe4a6808acf70bb7bc991"
+
+strip-bom-stream@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/strip-bom-stream/-/strip-bom-stream-1.0.0.tgz#e7144398577d51a6bed0fa1994fa05f43fd988ee"
+ dependencies:
+ first-chunk-stream "^1.0.0"
+ strip-bom "^2.0.0"
+
+strip-bom-string@1.X:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/strip-bom-string/-/strip-bom-string-1.0.0.tgz#e5211e9224369fbb81d633a2f00044dc8cedad92"
+
+strip-bom@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-1.0.0.tgz#85b8862f3844b5a6d5ec8467a93598173a36f794"
+ dependencies:
+ first-chunk-stream "^1.0.0"
+ is-utf8 "^0.2.0"
+
+strip-bom@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e"
+ dependencies:
+ is-utf8 "^0.2.0"
+
+strip-bom@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3"
+
+strip-indent@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-1.0.1.tgz#0c7962a6adefa7bbd4ac366460a638552ae1a0a2"
+ dependencies:
+ get-stdin "^4.0.1"
+
+strip-json-comments@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"
+
+subarg@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/subarg/-/subarg-1.0.0.tgz#f62cf17581e996b48fc965699f54c06ae268b8d2"
+ dependencies:
+ minimist "^1.1.0"
+
+supports-color@3.1.2:
+ version "3.1.2"
+ resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.1.2.tgz#72a262894d9d408b956ca05ff37b2ed8a6e2a2d5"
+ dependencies:
+ has-flag "^1.0.0"
+
+supports-color@^0.2.0:
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-0.2.0.tgz#d92de2694eb3f67323973d7ae3d8b55b4c22190a"
+
+supports-color@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7"
+
+supports-color@^3.1.0:
+ version "3.2.3"
+ resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6"
+ dependencies:
+ has-flag "^1.0.0"
+
+syntax-error@^1.1.1:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/syntax-error/-/syntax-error-1.3.0.tgz#1ed9266c4d40be75dc55bf9bb1cb77062bb96ca1"
+ dependencies:
+ acorn "^4.0.3"
+
+through2-filter@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/through2-filter/-/through2-filter-2.0.0.tgz#60bc55a0dacb76085db1f9dae99ab43f83d622ec"
+ dependencies:
+ through2 "~2.0.0"
+ xtend "~4.0.0"
+
+through2@2.X, through2@^2.0.0, through2@^2.0.1, through2@^2.0.3, through2@latest, through2@~2.0.0, through2@~2.0.1:
+ version "2.0.3"
+ resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be"
+ dependencies:
+ readable-stream "^2.1.5"
+ xtend "~4.0.1"
+
+through2@^0.5.0:
+ version "0.5.1"
+ resolved "https://registry.yarnpkg.com/through2/-/through2-0.5.1.tgz#dfdd012eb9c700e2323fd334f38ac622ab372da7"
+ dependencies:
+ readable-stream "~1.0.17"
+ xtend "~3.0.0"
+
+through2@^0.6.0, through2@^0.6.1:
+ version "0.6.5"
+ resolved "https://registry.yarnpkg.com/through2/-/through2-0.6.5.tgz#41ab9c67b29d57209071410e1d7a7a968cd3ad48"
+ dependencies:
+ readable-stream ">=1.0.33-1 <1.1.0-0"
+ xtend ">=4.0.0 <4.1.0-0"
+
+through2@~0.4.1:
+ version "0.4.2"
+ resolved "https://registry.yarnpkg.com/through2/-/through2-0.4.2.tgz#dbf5866031151ec8352bb6c4db64a2292a840b9b"
+ dependencies:
+ readable-stream "~1.0.17"
+ xtend "~2.1.1"
+
+"through@>=2.2.7 <3":
+ version "2.3.8"
+ resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5"
+
+tildify@^1.0.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/tildify/-/tildify-1.2.0.tgz#dcec03f55dca9b7aa3e5b04f21817eb56e63588a"
+ dependencies:
+ os-homedir "^1.0.0"
+
+time-stamp@^1.0.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/time-stamp/-/time-stamp-1.1.0.tgz#764a5a11af50561921b133f3b44e618687e0f5c3"
+
+timers-browserify@^1.0.1:
+ version "1.4.2"
+ resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-1.4.2.tgz#c9c58b575be8407375cb5e2462dacee74359f41d"
+ dependencies:
+ process "~0.11.0"
+
+to-absolute-glob@^0.1.1:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/to-absolute-glob/-/to-absolute-glob-0.1.1.tgz#1cdfa472a9ef50c239ee66999b662ca0eb39937f"
+ dependencies:
+ extend-shallow "^2.0.1"
+
+to-arraybuffer@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43"
+
+travis-fold@latest:
+ version "0.1.2"
+ resolved "https://registry.yarnpkg.com/travis-fold/-/travis-fold-0.1.2.tgz#fec005f9dcaa259a3f9459ce5a6906aba4c545da"
+
+trim-newlines@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613"
+
+ts-node@latest:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-3.1.0.tgz#a75ec5aeb48f3058b1b945dba765f1150ba88f8c"
+ dependencies:
+ arrify "^1.0.0"
+ chalk "^1.1.1"
+ diff "^3.1.0"
+ make-error "^1.1.1"
+ minimist "^1.2.0"
+ mkdirp "^0.5.1"
+ source-map-support "^0.4.0"
+ tsconfig "^6.0.0"
+ v8flags "^2.0.11"
+ yn "^2.0.0"
+
+tsconfig@^6.0.0:
+ version "6.0.0"
+ resolved "https://registry.yarnpkg.com/tsconfig/-/tsconfig-6.0.0.tgz#6b0e8376003d7af1864f8df8f89dd0059ffcd032"
+ dependencies:
+ strip-bom "^3.0.0"
+ strip-json-comments "^2.0.0"
+
+tslib@^1.7.1:
+ version "1.7.1"
+ resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.7.1.tgz#bc8004164691923a79fe8378bbeb3da2017538ec"
+
+tslint@latest:
+ version "5.4.3"
+ resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.4.3.tgz#761c8402b80e347b7733a04390a757b253580467"
+ dependencies:
+ babel-code-frame "^6.22.0"
+ colors "^1.1.2"
+ commander "^2.9.0"
+ diff "^3.2.0"
+ glob "^7.1.1"
+ minimatch "^3.0.4"
+ resolve "^1.3.2"
+ semver "^5.3.0"
+ tslib "^1.7.1"
+ tsutils "^2.3.0"
+
+tsutils@^2.3.0:
+ version "2.4.0"
+ resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.4.0.tgz#ad4ce6dba0e5a3edbddf8626b7ca040782189fea"
+
+tty-browserify@~0.0.0:
+ version "0.0.0"
+ resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6"
+
+type-check@~0.3.2:
+ version "0.3.2"
+ resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72"
+ dependencies:
+ prelude-ls "~1.1.2"
+
+type-detect@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-3.0.0.tgz#46d0cc8553abb7b13a352b0d6dea2fd58f2d9b55"
+
+type-detect@^4.0.0:
+ version "4.0.3"
+ resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.3.tgz#0e3f2670b44099b0b46c284d136a7ef49c74c2ea"
+
+typedarray@~0.0.5:
+ version "0.0.6"
+ resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
+
+typescript@^2.4:
+ version "2.4.0"
+ resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.4.0.tgz#aef5a8d404beba36ad339abf079ddddfffba86dd"
+
+uglify-js@^2.6:
+ version "2.8.29"
+ resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd"
+ dependencies:
+ source-map "~0.5.1"
+ yargs "~3.10.0"
+ optionalDependencies:
+ uglify-to-browserify "~1.0.0"
+
+uglify-to-browserify@~1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7"
+
+umd@^3.0.0:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/umd/-/umd-3.0.1.tgz#8ae556e11011f63c2596708a8837259f01b3d60e"
+
+unc-path-regex@^0.1.0:
+ version "0.1.2"
+ resolved "https://registry.yarnpkg.com/unc-path-regex/-/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa"
+
+unique-stream@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/unique-stream/-/unique-stream-1.0.0.tgz#d59a4a75427447d9aa6c91e70263f8d26a4b104b"
+
+unique-stream@^2.0.2:
+ version "2.2.1"
+ resolved "https://registry.yarnpkg.com/unique-stream/-/unique-stream-2.2.1.tgz#5aa003cfbe94c5ff866c4e7d668bb1c4dbadb369"
+ dependencies:
+ json-stable-stringify "^1.0.0"
+ through2-filter "^2.0.0"
+
+urix@^0.1.0, urix@~0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72"
+
+url@~0.11.0:
+ version "0.11.0"
+ resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1"
+ dependencies:
+ punycode "1.3.2"
+ querystring "0.2.0"
+
+user-home@^1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/user-home/-/user-home-1.1.1.tgz#2b5be23a32b63a7c9deb8d0f28d485724a3df190"
+
+util-deprecate@~1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
+
+util@0.10.3, util@~0.10.1:
+ version "0.10.3"
+ resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9"
+ dependencies:
+ inherits "2.0.1"
+
+utilities@1.0.x:
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/utilities/-/utilities-1.0.5.tgz#f2b77a88f3510733fc7215b5c486a504a75ab245"
+
+utilities@^0.0.37:
+ version "0.0.37"
+ resolved "https://registry.yarnpkg.com/utilities/-/utilities-0.0.37.tgz#a3470d0a7f688142d9e8a57cee1128f12e19e196"
+
+v8flags@^2.0.11, v8flags@^2.0.2:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-2.1.1.tgz#aab1a1fa30d45f88dd321148875ac02c0b55e5b4"
+ dependencies:
+ user-home "^1.1.1"
+
+vali-date@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/vali-date/-/vali-date-1.0.0.tgz#1b904a59609fb328ef078138420934f6b86709a6"
+
+validate-npm-package-license@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz#2804babe712ad3379459acfbe24746ab2c303fbc"
+ dependencies:
+ spdx-correct "~1.0.0"
+ spdx-expression-parse "~1.0.0"
+
+vinyl-fs@^0.3.0:
+ version "0.3.14"
+ resolved "https://registry.yarnpkg.com/vinyl-fs/-/vinyl-fs-0.3.14.tgz#9a6851ce1cac1c1cea5fe86c0931d620c2cfa9e6"
+ dependencies:
+ defaults "^1.0.0"
+ glob-stream "^3.1.5"
+ glob-watcher "^0.0.6"
+ graceful-fs "^3.0.0"
+ mkdirp "^0.5.0"
+ strip-bom "^1.0.0"
+ through2 "^0.6.1"
+ vinyl "^0.4.0"
+
+vinyl-fs@~2.4.3:
+ version "2.4.4"
+ resolved "https://registry.yarnpkg.com/vinyl-fs/-/vinyl-fs-2.4.4.tgz#be6ff3270cb55dfd7d3063640de81f25d7532239"
+ dependencies:
+ duplexify "^3.2.0"
+ glob-stream "^5.3.2"
+ graceful-fs "^4.0.0"
+ gulp-sourcemaps "1.6.0"
+ is-valid-glob "^0.3.0"
+ lazystream "^1.0.0"
+ lodash.isequal "^4.0.0"
+ merge-stream "^1.0.0"
+ mkdirp "^0.5.0"
+ object-assign "^4.0.0"
+ readable-stream "^2.0.4"
+ strip-bom "^2.0.0"
+ strip-bom-stream "^1.0.0"
+ through2 "^2.0.0"
+ through2-filter "^2.0.0"
+ vali-date "^1.0.0"
+ vinyl "^1.0.0"
+
+vinyl@1.X, vinyl@^1.0.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-1.2.0.tgz#5c88036cf565e5df05558bfc911f8656df218884"
+ dependencies:
+ clone "^1.0.0"
+ clone-stats "^0.0.1"
+ replace-ext "0.0.1"
+
+vinyl@^0.2.1:
+ version "0.2.3"
+ resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-0.2.3.tgz#bca938209582ec5a49ad538a00fa1f125e513252"
+ dependencies:
+ clone-stats "~0.0.1"
+
+vinyl@^0.4.0:
+ version "0.4.6"
+ resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-0.4.6.tgz#2f356c87a550a255461f36bbeb2a5ba8bf784847"
+ dependencies:
+ clone "^0.2.0"
+ clone-stats "^0.0.1"
+
+vinyl@^0.5.0:
+ version "0.5.3"
+ resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-0.5.3.tgz#b0455b38fc5e0cf30d4325132e461970c2091cde"
+ dependencies:
+ clone "^1.0.0"
+ clone-stats "^0.0.1"
+ replace-ext "0.0.1"
+
+vinyl@^2.0.0:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-2.0.2.tgz#0a3713d8d4e9221c58f10ca16c0116c9e25eda7c"
+ dependencies:
+ clone "^1.0.0"
+ clone-buffer "^1.0.0"
+ clone-stats "^1.0.0"
+ cloneable-readable "^1.0.0"
+ is-stream "^1.1.0"
+ remove-trailing-separator "^1.0.1"
+ replace-ext "^1.0.0"
+
+vlq@^0.2.1:
+ version "0.2.2"
+ resolved "https://registry.yarnpkg.com/vlq/-/vlq-0.2.2.tgz#e316d5257b40b86bb43cb8d5fea5d7f54d6b0ca1"
+
+vm-browserify@~0.0.1:
+ version "0.0.4"
+ resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-0.0.4.tgz#5d7ea45bbef9e4a6ff65f95438e0a87c357d5a73"
+ dependencies:
+ indexof "0.0.1"
+
+which@^1.1.1, which@^1.2.12:
+ version "1.2.14"
+ resolved "https://registry.yarnpkg.com/which/-/which-1.2.14.tgz#9a87c4378f03e827cecaf1acdf56c736c01c14e5"
+ dependencies:
+ isexe "^2.0.0"
+
+window-size@0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d"
+
+wordwrap@0.0.2:
+ version "0.0.2"
+ resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f"
+
+wordwrap@^1.0.0, wordwrap@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb"
+
+wordwrap@~0.0.2:
+ version "0.0.3"
+ resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107"
+
+wrappy@1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
+
+"xtend@>=4.0.0 <4.1.0-0", xtend@^4.0.0, xtend@~4.0.0, xtend@~4.0.1:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af"
+
+xtend@~2.1.1:
+ version "2.1.2"
+ resolved "https://registry.yarnpkg.com/xtend/-/xtend-2.1.2.tgz#6efecc2a4dad8e6962c4901b337ce7ba87b5d28b"
+ dependencies:
+ object-keys "~0.4.0"
+
+xtend@~3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/xtend/-/xtend-3.0.0.tgz#5cce7407baf642cba7becda568111c493f59665a"
+
+yargs@~3.10.0:
+ version "3.10.0"
+ resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1"
+ dependencies:
+ camelcase "^1.0.2"
+ cliui "^2.1.0"
+ decamelize "^1.0.0"
+ window-size "0.1.0"
+
+yn@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/yn/-/yn-2.0.0.tgz#e5adabc8acf408f6385fc76495684c88e6af689a"
diff --git a/node_modules/typedoc/package.json b/node_modules/typedoc/package.json
index 9b873e2f5..2beabe19a 100644
--- a/node_modules/typedoc/package.json
+++ b/node_modules/typedoc/package.json
@@ -1,7 +1,7 @@
{
"name": "typedoc",
"description": "Create api documentations for typescript projects.",
- "version": "0.7.1",
+ "version": "0.8.0",
"homepage": "http://typedoc.org",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
@@ -30,14 +30,14 @@
"node": ">= 4.2.0"
},
"dependencies": {
- "@types/fs-extra": "^3.0.0",
+ "@types/fs-extra": "^4.0.0",
"@types/handlebars": "^4.0.31",
"@types/highlight.js": "^9.1.8",
"@types/lodash": "^4.14.37",
"@types/marked": "0.0.28",
"@types/minimatch": "^2.0.29",
"@types/shelljs": "^0.7.0",
- "fs-extra": "^3.0.0",
+ "fs-extra": "^4.0.0",
"handlebars": "^4.0.6",
"highlight.js": "^9.0.0",
"lodash": "^4.13.1",
@@ -46,7 +46,7 @@
"progress": "^2.0.0",
"shelljs": "^0.7.0",
"typedoc-default-themes": "^0.5.0",
- "typescript": "2.3.2"
+ "typescript": "2.4.1"
},
"devDependencies": {
"@types/mocha": "^2.2.39",
@@ -71,7 +71,7 @@
"LICENSE"
],
"scripts": {
- "test": "mocha -t 4000 dist/test",
+ "test": "mocha -t 10000 dist/test",
"build": "grunt build_and_test",
"prepublish": "npm run build"
},