diff --git a/.dockerignore b/.dockerignore index 85c3bb869a73f..cc908c0036a3c 100644 --- a/.dockerignore +++ b/.dockerignore @@ -22,7 +22,6 @@ scripts/buildProtocol.js scripts/ior.js scripts/authors.js scripts/configurePrerelease.js -scripts/configureTSCBuild.js scripts/open-user-pr.js scripts/open-cherry-pick-pr.js scripts/processDiagnosticMessages.d.ts @@ -30,6 +29,7 @@ scripts/processDiagnosticMessages.js scripts/produceLKG.js scripts/importDefinitelyTypedTests/importDefinitelyTypedTests.js scripts/generateLocalizedDiagnosticMessages.js +scripts/configureLanguageServiceBuild.js scripts/*.js.map scripts/typings/ coverage/ diff --git a/.eslintrc.json b/.eslintrc.json index 1f39c29101f83..6eb16b973f22e 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -54,6 +54,7 @@ "simple-indent": "error", "debug-assert": "error", "no-keywords": "error", + "one-namespace-per-file": "error", // eslint-plugin-import "import/no-extraneous-dependencies": ["error", { "optionalDependencies": false }], diff --git a/.github/ISSUE_TEMPLATE/Bug_report.md b/.github/ISSUE_TEMPLATE/Bug_report.md index 62647a8b163af..7b9b2c4a630db 100644 --- a/.github/ISSUE_TEMPLATE/Bug_report.md +++ b/.github/ISSUE_TEMPLATE/Bug_report.md @@ -1,41 +1,44 @@ ---- -name: Bug report -about: Create a report to help us improve - ---- - - - - -**TypeScript Version:** 3.7.x-dev.201xxxxx - - -**Search Terms:** - -**Code** - -```ts -// A *self-contained* demonstration of the problem follows... -// Test this by running `tsc` on the command-line, rather than through another build tool such as Gulp, Webpack, etc. -``` - -**Expected behavior:** - -**Actual behavior:** - -**Playground Link:** - -**Related Issues:** +--- +name: Bug +about: Create a report to help us improve TypeScript +title: '' +labels: '' +assignees: '' + +--- + + + + +**TypeScript Version:** 3.7.x-dev.201xxxxx + + +**Search Terms:** + +**Code** + +```ts +// A *self-contained* demonstration of the problem follows... +// Test this by running `tsc` on the command-line, rather than through another build tool such as Gulp, Webpack, etc. +``` + +**Expected behavior:** + +**Actual behavior:** + +**Playground Link:** + +**Related Issues:** diff --git a/.github/ISSUE_TEMPLATE/Feature_request.md b/.github/ISSUE_TEMPLATE/Feature_request.md index 74525bf2f8034..e5f21faeafebb 100644 --- a/.github/ISSUE_TEMPLATE/Feature_request.md +++ b/.github/ISSUE_TEMPLATE/Feature_request.md @@ -1,45 +1,47 @@ ---- -name: Feature request -about: Suggest an idea for this project - ---- - - - -## Search Terms - - - -## Suggestion - - - -## Use Cases - - - -## Examples - - - -## Checklist - -My suggestion meets these guidelines: - -* [ ] This wouldn't be a breaking change in existing TypeScript/JavaScript code -* [ ] This wouldn't change the runtime behavior of existing JavaScript code -* [ ] This could be implemented without emitting different JS based on the types of the expressions -* [ ] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.) -* [ ] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals). - +--- +name: Feature Request +about: Suggest an idea +title: '' +labels: '' +assignees: '' + +--- + + + +## Search Terms + + + +## Suggestion + + + +## Use Cases + + + +## Examples + + + +## Checklist + +My suggestion meets these guidelines: + +* [ ] This wouldn't be a breaking change in existing TypeScript/JavaScript code +* [ ] This wouldn't change the runtime behavior of existing JavaScript code +* [ ] This could be implemented without emitting different JS based on the types of the expressions +* [ ] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.) +* [ ] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals). diff --git a/.github/ISSUE_TEMPLATE/Question.md b/.github/ISSUE_TEMPLATE/Question.md deleted file mode 100644 index fbb9d150a7ce1..0000000000000 --- a/.github/ISSUE_TEMPLATE/Question.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -name: Question -about: The issue tracker is not for questions. Please use Stack Overflow or other resources for help writing TypeScript code. - ---- - -THE ISSUE TRACKER IS NOT FOR QUESTIONS. - -DO NOT CREATE A NEW ISSUE TO ASK A QUESTION. - -IF YOU ARE HAVING PROBLEMS WITH YOUR TYPESCRIPT CODE, DO NOT ASK A QUESTION HERE. - -Tens of thousands of TypeScript questions have been asked and answered on StackOverflow; see https://stackoverflow.com/questions/tagged/typescript . You can ask questions there or on other websites. - -The only exception is if you have a question about *the TypeScript compiler API itself*. Please post a complete example of what you're trying to do and precisely describe what your question is. diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000000000..b5bf7ad4a2673 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,19 @@ +--- +blank_issues_enabled: false +contact_links: + - + about: "Please ask and answer usage questions on Stack Overflow." + name: Question + url: "https://stackoverflow.com/questions/tagged/typescript" + - + about: "Alternatively, you can use the TypeScript Community Discord." + name: Chat + url: "https://discord.gg/typescript" + - + about: "Please check the FAQ before filing new issues" + name: "TypeScript FAQ" + url: "https://github.com/microsoft/TypeScript/wiki/FAQ" + - + about: "Please raise issues about the site on it's own repo." + name: Website + url: "https://github.com/microsoft/TypeScript-Website/issues/new" diff --git a/.github/pr_owners.txt b/.github/pr_owners.txt new file mode 100644 index 0000000000000..0d0dab4f3e008 --- /dev/null +++ b/.github/pr_owners.txt @@ -0,0 +1,8 @@ +sandersn +elibarzilay +weswigham +andrewbranch +RyanCavanaugh +sheetalkamat +orta +rbuckton diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000000000..69f2bf06f8b28 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,37 @@ +name: CI + +on: + push: + branches: + - master + - release-* + pull_request: + branches: + - master + - release-* + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [8.x, 10.x, 12.x] + + steps: + - uses: actions/checkout@v1 + with: + fetch-depth: 5 + - name: Use node version ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - name: Remove existing TypeScript + run: | + npm uninstall typescript --no-save + npm uninstall tslint --no-save + - name: npm install and test + run: | + npm install + npm update + npm test diff --git a/.gitignore b/.gitignore index b5a7c0e59e3ec..4bc5d39344162 100644 --- a/.gitignore +++ b/.gitignore @@ -46,7 +46,6 @@ scripts/ior.js scripts/authors.js scripts/configurePrerelease.js scripts/configureLanguageServiceBuild.js -scripts/createLanguageServiceBuild.js scripts/open-user-pr.js scripts/open-cherry-pick-pr.js scripts/processDiagnosticMessages.d.ts @@ -91,6 +90,7 @@ tests/cases/user/TypeScript-React-Native-Starter/TypeScript-React-Native-Starter tests/cases/user/TypeScript-Vue-Starter/TypeScript-Vue-Starter tests/cases/user/TypeScript-WeChat-Starter/TypeScript-WeChat-Starter tests/cases/user/create-react-app/create-react-app +tests/cases/user/fp-ts/fp-ts tests/cases/user/webpack/webpack tests/cases/user/puppeteer/puppeteer tests/cases/user/axios-src/axios-src diff --git a/.vscode/extensions.json b/.vscode/extensions.json index bae8c12d07c8a..c3ea200176d3c 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,6 +1,7 @@ { "recommendations": [ - "dbaeumer.vscode-eslint" + "dbaeumer.vscode-eslint", + "rbuckton.tsserver-live-reload" ], "unwantedRecommendations": [ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index dda3ab28a7bde..785f4474e3330 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -59,11 +59,11 @@ Run `gulp` to build a version of the compiler/language service that reflects cha ## Contributing bug fixes -TypeScript is currently accepting contributions in the form of bug fixes. A bug must have an issue tracking it in the issue tracker that has been approved (labelled ["help wanted"](https://github.com/Microsoft/TypeScript/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22)) by the TypeScript team. Your pull request should include a link to the bug that you are fixing. If you've submitted a PR for a bug, please post a comment in the bug to avoid duplication of effort. +TypeScript is currently accepting contributions in the form of bug fixes. A bug must have an issue tracking it in the issue tracker that has been approved (labelled ["help wanted"](https://github.com/Microsoft/TypeScript/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) or in the "Backlog milestone") by the TypeScript team. Your pull request should include a link to the bug that you are fixing. If you've submitted a PR for a bug, please post a comment in the bug to avoid duplication of effort. ## Contributing features -Features (things that add new or improved functionality to TypeScript) may be accepted, but will need to first be approved ([labelled "help wanted"](https://github.com/Microsoft/TypeScript/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) by a TypeScript project maintainer) in the suggestion issue. Features with language design impact, or that are adequately satisfied with external tools, will not be accepted. +Features (things that add new or improved functionality to TypeScript) may be accepted, but will need to first be approved (labelled ["help wanted"](https://github.com/Microsoft/TypeScript/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) or in the "Backlog" milestone) by a TypeScript project maintainer) in the suggestion issue. Features with language design impact, or that are adequately satisfied with external tools, will not be accepted. Design changes will not be accepted at this time. If you have a design change proposal, please log a suggestion issue. @@ -71,19 +71,19 @@ Design changes will not be accepted at this time. If you have a design change pr You will need to complete a Contributor License Agreement (CLA). Briefly, this agreement testifies that you are granting us permission to use the submitted change according to the terms of the project's license, and that the work being submitted is under appropriate copyright. -Please submit a Contributor License Agreement (CLA) before submitting a pull request. You may visit https://cla.microsoft.com to sign digitally. Alternatively, download the agreement ([Microsoft Contribution License Agreement.pdf](https://opensource.microsoft.com/pdf/microsoft-contribution-license-agreement.pdf)), sign, scan, and email it back to . Be sure to include your GitHub user name along with the agreement. Once we have received the signed CLA, we'll review the request. +Please submit a Contributor License Agreement (CLA) before submitting a pull request. You may visit https://cla.microsoft.com to sign digitally. Alternatively, download the agreement ([Microsoft Contribution License Agreement.pdf](https://opensource.microsoft.com/pdf/microsoft-contribution-license-agreement.pdf)), sign, scan, and email it back to . Be sure to include your GitHub user name along with the agreement. Once we have received the signed CLA, we'll review the request. ## Housekeeping -Your pull request should: +Your pull request should: * Include a description of what your change intends to do -* Be a child commit of a reasonably recent commit in the **master** branch +* Be a child commit of a reasonably recent commit in the **master** branch * Requests need not be a single commit, but should be a linear sequence of commits (i.e. no merge commits in your PR) * It is desirable, but not necessary, for the tests to pass at each commit -* Have clear commit messages +* Have clear commit messages * e.g. "Minor refactor in goToTypeDefinition", "Fix iterated type in for-await-of", "Add test for preserveWatchOutput on command line" -* Include adequate tests +* Include adequate tests * At least one test should fail in the absence of your non-test code changes. If your PR does not match this criteria, please specify why * Tests should include reasonable permutations of the target fix/change * Include baseline changes with your change @@ -133,7 +133,7 @@ e.g. to run all compiler baseline tests: gulp runtests --tests=compiler ``` -or to run a specific test: `tests\cases\compiler\2dArrays.ts` +or to run a specific test: `tests\cases\compiler\2dArrays.ts` ```Shell gulp runtests --tests=2dArrays diff --git a/Gulpfile.js b/Gulpfile.js index 4c40a73cdba6e..5d314da7ccbfd 100644 --- a/Gulpfile.js +++ b/Gulpfile.js @@ -346,8 +346,6 @@ const lintFoldEnd = async () => { if (fold.isTravis()) console.log(fold.end("lin /** @type { (folder: string) => { (): Promise; displayName?: string } } */ const eslint = (folder) => async () => { - const ESLINTRC_CI = ".eslintrc.ci.json"; - const isCIEnv = cmdLineOptions.ci || process.env.CI === "true"; const args = [ "node_modules/eslint/bin/eslint", @@ -358,13 +356,6 @@ const eslint = (folder) => async () => { "--ext", ".ts", ]; - if ( - isCIEnv && - fs.existsSync(path.resolve(folder, ESLINTRC_CI)) - ) { - args.push("--config", path.resolve(folder, ESLINTRC_CI)); - } - if (cmdLineOptions.fix) { args.push("--fix"); } @@ -477,7 +468,6 @@ task("runtests-parallel").flags = { " --workers=": "The number of parallel workers to use.", " --timeout=": "Overrides the default test timeout.", " --built": "Compile using the built version of the compiler.", - " --skipPercent=": "Skip expensive tests with chance to miss an edit. Default 5%.", " --shards": "Total number of shards running tests (default: 1)", " --shardId": "1-based ID of this shard (default: 1)", }; @@ -588,15 +578,15 @@ task("generate-spec").description = "Generates a Markdown version of the Languag task("clean", series(parallel(cleanTasks), cleanBuilt)); task("clean").description = "Cleans build outputs"; -const configureNightly = () => exec(process.execPath, ["scripts/configurePrerelease.js", "dev", "package.json", "src/compiler/core.ts"]); +const configureNightly = () => exec(process.execPath, ["scripts/configurePrerelease.js", "dev", "package.json", "src/compiler/corePublic.ts"]); task("configure-nightly", series(buildScripts, configureNightly)); task("configure-nightly").description = "Runs scripts/configurePrerelease.ts to prepare a build for nightly publishing"; -const configureInsiders = () => exec(process.execPath, ["scripts/configurePrerelease.js", "insiders", "package.json", "src/compiler/core.ts"]); +const configureInsiders = () => exec(process.execPath, ["scripts/configurePrerelease.js", "insiders", "package.json", "src/compiler/corePublic.ts"]); task("configure-insiders", series(buildScripts, configureInsiders)); task("configure-insiders").description = "Runs scripts/configurePrerelease.ts to prepare a build for insiders publishing"; -const configureExperimental = () => exec(process.execPath, ["scripts/configurePrerelease.js", "experimental", "package.json", "src/compiler/core.ts"]); +const configureExperimental = () => exec(process.execPath, ["scripts/configurePrerelease.js", "experimental", "package.json", "src/compiler/corePublic.ts"]); task("configure-experimental", series(buildScripts, configureExperimental)); task("configure-experimental").description = "Runs scripts/configurePrerelease.ts to prepare a build for experimental publishing"; diff --git a/README.md b/README.md index 459cebe95b955..a422999ce19c2 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,15 @@ # TypeScript -[![Join the chat at https://gitter.im/microsoft/TypeScript](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/microsoft/TypeScript?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Build Status](https://travis-ci.org/microsoft/TypeScript.svg?branch=master)](https://travis-ci.org/microsoft/TypeScript) [![VSTS Build Status](https://dev.azure.com/typescript/TypeScript/_apis/build/status/Typescript/node10)](https://dev.azure.com/typescript/TypeScript/_build/latest?definitionId=4&view=logs) [![npm version](https://badge.fury.io/js/typescript.svg)](https://www.npmjs.com/package/typescript) [![Downloads](https://img.shields.io/npm/dm/typescript.svg)](https://www.npmjs.com/package/typescript) - - [TypeScript](https://www.typescriptlang.org/) is a language for application-scale JavaScript. TypeScript adds optional types to JavaScript that support tools for large-scale JavaScript applications for any browser, for any host, on any OS. TypeScript compiles to readable, standards-based JavaScript. Try it out at the [playground](https://www.typescriptlang.org/play/), and stay up to date via [our blog](https://blogs.msdn.microsoft.com/typescript) and [Twitter account](https://twitter.com/typescript). +Find others who are using TypeScript at [our community page](https://www.typescriptlang.org/community/). + ## Installing For the latest stable version: @@ -31,6 +30,7 @@ There are many ways to [contribute](https://github.com/microsoft/TypeScript/blob * [Submit bugs](https://github.com/microsoft/TypeScript/issues) and help us verify fixes as they are checked in. * Review the [source code changes](https://github.com/microsoft/TypeScript/pulls). * Engage with other TypeScript users and developers on [StackOverflow](https://stackoverflow.com/questions/tagged/typescript). +* Help each other in the [TypeScript Community Discord](https://discord.gg/typescript). * Join the [#typescript](https://twitter.com/search?q=%23TypeScript) discussion on Twitter. * [Contribute bug fixes](https://github.com/microsoft/TypeScript/blob/master/CONTRIBUTING.md). * Read the language specification ([docx](https://github.com/microsoft/TypeScript/blob/master/doc/TypeScript%20Language%20Specification.docx?raw=true), diff --git a/lib/cancellationToken.js b/lib/cancellationToken.js index d63145f3fc5a0..12a1e5b265b99 100644 --- a/lib/cancellationToken.js +++ b/lib/cancellationToken.js @@ -17,13 +17,7 @@ and limitations under the License. "use strict"; var fs = require("fs"); function pipeExists(name) { - try { - fs.statSync(name); - return true; - } - catch (e) { - return false; - } + return fs.existsSync(name); } function createCancellationToken(args) { var cancellationPipeName; diff --git a/lib/cs/diagnosticMessages.generated.json b/lib/cs/diagnosticMessages.generated.json index 32a067f4fe864..fabd59da8cd18 100644 --- a/lib/cs/diagnosticMessages.generated.json +++ b/lib/cs/diagnosticMessages.generated.json @@ -441,7 +441,7 @@ "Function_implementation_is_missing_or_not_immediately_following_the_declaration_2391": "Implementace funkce chybí nebo nenásleduje hned po deklaraci.", "Function_implementation_name_must_be_0_2389": "Název implementace funkce musí být {0}.", "Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_ref_7024": "Funkce implicitně obsahuje návratový typ any, protože neobsahuje anotaci návratového typu a odkazuje se na ni přímo nebo nepřímo v jednom z jejích návratových výrazů.", - "Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined_2366": "Ve funkci chybí koncový návratový příkaz a návratový typ neobsahuje undefined.", + "Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined_2366": "Ve funkci chybí koncový příkaz return a návratový typ neobsahuje undefined.", "Function_overload_must_be_static_2387": "Přetížení funkce musí být statické.", "Function_overload_must_not_be_static_2388": "Přetížení funkce nesmí být statické.", "Generate_get_and_set_accessors_95046": "Generovat přístupové objekty get a set", diff --git a/lib/de/diagnosticMessages.generated.json b/lib/de/diagnosticMessages.generated.json index f7bf53b67552a..d010e95033962 100644 --- a/lib/de/diagnosticMessages.generated.json +++ b/lib/de/diagnosticMessages.generated.json @@ -1032,7 +1032,7 @@ "await_expression_is_only_allowed_within_an_async_function_1308": "Der Ausdruck \"await\" ist nur in einer asynchronen Funktion zulässig.", "await_expressions_cannot_be_used_in_a_parameter_initializer_2524": "await-Ausdrücke dürfen nicht in einem Parameterinitialisierer verwendet werden.", "baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1_6106": "Die Option \"baseUrl\" ist auf \"{0}\" festgelegt. Dieser Wert wird verwendet, um den nicht relativen Modulnamen \"{1}\" aufzulösen.", - "can_only_be_used_in_an_object_literal_property_inside_a_destructuring_assignment_1312": "\"=\" kann nur in einer Objektliteraleigenschaft innerhalb eines Destrukturierungsauftrags verwendet werden.", + "can_only_be_used_in_an_object_literal_property_inside_a_destructuring_assignment_1312": "\"=\" kann nur in einer Objektliteraleigenschaft innerhalb eines Destrukturierungszuweisung verwendet werden.", "case_or_default_expected_1130": "\"case\" oder \"default\" wurde erwartet.", "class_expressions_are_not_currently_supported_9003": "class-Ausdrücke werden zurzeit nicht unterstützt.", "const_declarations_can_only_be_declared_inside_a_block_1156": "const-Deklarationen können nur innerhalb eines Blocks deklariert werden.", diff --git a/lib/es/diagnosticMessages.generated.json b/lib/es/diagnosticMessages.generated.json index 52840b1208e1c..c0ce6ef5b8d6a 100644 --- a/lib/es/diagnosticMessages.generated.json +++ b/lib/es/diagnosticMessages.generated.json @@ -441,7 +441,7 @@ "Function_implementation_is_missing_or_not_immediately_following_the_declaration_2391": "Falta la implementación de función o no sigue inmediatamente a la declaración.", "Function_implementation_name_must_be_0_2389": "El nombre de la implementación de función debe ser '{0}'.", "Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_ref_7024": "La función tiene el tipo de valor devuelto \"any\" implícitamente porque no tiene una anotación de tipo de valor devuelto y se hace referencia a ella directa o indirectamente en una de sus expresiones return.", - "Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined_2366": "Falta la instrucción return final en la función y el tipo de valor devuelto no incluye 'undefined'.", + "Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined_2366": "Falta la instrucción \"return\" final en la función y el tipo de valor devuelto no incluye 'undefined'.", "Function_overload_must_be_static_2387": "La sobrecarga de función debe ser estática.", "Function_overload_must_not_be_static_2388": "La sobrecarga de función no debe ser estática.", "Generate_get_and_set_accessors_95046": "Generar los descriptores de acceso \"get\" y \"set\"", @@ -453,7 +453,7 @@ "Generators_are_only_available_when_targeting_ECMAScript_2015_or_higher_1220": "Los generadores solo están disponibles cuando el destino es ECMAScript 2015 o una versión posterior.", "Generic_type_0_requires_1_type_argument_s_2314": "El tipo genérico '{0}' requiere los siguientes argumentos de tipo: {1}.", "Generic_type_0_requires_between_1_and_2_type_arguments_2707": "El tipo genérico \"{0}\" requiere entre {1} y {2} argumentos de tipo.", - "Generic_type_instantiation_is_excessively_deep_and_possibly_infinite_2550": "La creación de instancias de tipo genérico es excesivamente profunda y posiblemente infinita.", + "Generic_type_instantiation_is_excessively_deep_and_possibly_infinite_2550": "La creación de una instancia de tipo genérico es excesivamente profunda y posiblemente infinita.", "Getter_and_setter_accessors_do_not_agree_in_visibility_2379": "Los descriptores de acceso de captador y establecedor no se corresponden respecto a la visibilidad.", "Global_module_exports_may_only_appear_at_top_level_1316": "Las exportaciones de módulos globales solo pueden aparecer en el nivel superior.", "Global_module_exports_may_only_appear_in_declaration_files_1315": "Las exportaciones de módulos globales solo pueden aparecer en archivos de declaración.", diff --git a/lib/fr/diagnosticMessages.generated.json b/lib/fr/diagnosticMessages.generated.json index 1699b44df8bee..7a84aae49821b 100644 --- a/lib/fr/diagnosticMessages.generated.json +++ b/lib/fr/diagnosticMessages.generated.json @@ -142,7 +142,7 @@ "An_async_iterator_must_have_a_next_method_2519": "Un itérateur asynchrone doit comporter une méthode 'next()'.", "An_element_access_expression_should_take_an_argument_1011": "Une expression d'accès à un élément doit accepter un argument.", "An_enum_member_cannot_have_a_numeric_name_2452": "Un membre enum ne peut pas avoir un nom numérique.", - "An_export_assignment_can_only_be_used_in_a_module_1231": "Une attribution d'exportation peut uniquement être utilisée dans un module.", + "An_export_assignment_can_only_be_used_in_a_module_1231": "Une affectation d'exportation peut uniquement être utilisée dans un module.", "An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements_2309": "Impossible d'utiliser une assignation d'exportation dans un module comportant d'autres éléments exportés.", "An_export_assignment_cannot_be_used_in_a_namespace_1063": "Une affectation d'exportation ne peut pas être utilisée dans un espace de noms.", "An_export_assignment_cannot_have_modifiers_1120": "Une assignation d'exportation ne peut pas avoir de modificateurs.", @@ -594,7 +594,7 @@ "No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2_18003": "Aucune entrée dans le fichier config '{0}'. Les chemins 'include' spécifiés étaient '{1}' et les chemins 'exclude' étaient '{2}'.", "Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2_2515": "La classe non abstraite '{0}' n'implémente pas le membre abstrait '{1}' hérité de la classe '{2}'.", "Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1_2653": "L'expression de classe non abstraite '{0}' n'implémente pas le membre abstrait hérité '{0}' de la classe '{1}'.", - "Not_all_code_paths_return_a_value_7030": "Les chemins de code ne retournent pas tous une valeur.", + "Not_all_code_paths_return_a_value_7030": "Les chemins du code ne retournent pas tous une valeur.", "Numeric_index_type_0_is_not_assignable_to_string_index_type_1_2413": "Impossible d'assigner le type d'index numérique '{0}' au type d'index de chaîne '{1}'.", "Numeric_separators_are_not_allowed_here_6188": "Les séparateurs numériques ne sont pas autorisés ici.", "Object_is_of_type_unknown_2571": "L'objet est de type 'unknown'.", @@ -745,7 +745,7 @@ "Remove_unused_label_95053": "Supprimer l'étiquette inutilisée", "Remove_variable_statement_90010": "Supprimer l'instruction de variable", "Replace_import_with_0_95015": "Remplacez l'importation par '{0}'.", - "Report_error_when_not_all_code_paths_in_function_return_a_value_6075": "Signalez une erreur quand les chemins de code de la fonction ne retournent pas tous une valeur.", + "Report_error_when_not_all_code_paths_in_function_return_a_value_6075": "Signalez une erreur quand les chemins du code de la fonction ne retournent pas tous une valeur.", "Report_errors_for_fallthrough_cases_in_switch_statement_6076": "Signalez les erreurs pour les case avec fallthrough dans une instruction switch.", "Report_errors_in_js_files_8019": "Signalez les erreurs dans les fichiers .js.", "Report_errors_on_unused_locals_6134": "Signaler les erreurs sur les variables locales inutilisées.", diff --git a/lib/ja/diagnosticMessages.generated.json b/lib/ja/diagnosticMessages.generated.json index d3029982ca672..a05d953fe1484 100644 --- a/lib/ja/diagnosticMessages.generated.json +++ b/lib/ja/diagnosticMessages.generated.json @@ -130,7 +130,7 @@ "Ambient_const_enums_are_not_allowed_when_the_isolatedModules_flag_is_provided_1209": "'--isolatedModules' フラグが指定されている場合、アンビエント const 列挙型は使用できません。", "Ambient_module_declaration_cannot_specify_relative_module_name_2436": "アンビエント モジュール宣言では、相対モジュール名を指定できません。", "Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces_2435": "アンビエント モジュールを、他のモジュールまたは名前空間内の入れ子にすることはできません。", - "An_AMD_module_cannot_have_multiple_name_assignments_2458": "AMD モジュールに複数の名前を割り当てることはできません。", + "An_AMD_module_cannot_have_multiple_name_assignments_2458": "AMD モジュールに複数の名前を代入することはできません。", "An_abstract_accessor_cannot_have_an_implementation_1318": "抽象アクセサーに実装を含めることはできません。", "An_accessor_cannot_be_declared_in_an_ambient_context_1086": "環境コンテキストではアクセサーは宣言できません。", "An_accessor_cannot_have_type_parameters_1094": "アクセサーに型パラメーターを指定することはできません。", @@ -142,10 +142,10 @@ "An_async_iterator_must_have_a_next_method_2519": "非同期反復子には 'next()' メソッドが必要です。", "An_element_access_expression_should_take_an_argument_1011": "要素アクセス式では、引数を取る必要があります。", "An_enum_member_cannot_have_a_numeric_name_2452": "列挙型メンバーに数値名を含めることはできません。", - "An_export_assignment_can_only_be_used_in_a_module_1231": "エクスポートの割り当てはモジュールでのみ使用可能です。", - "An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements_2309": "エクスポートの割り当ては、エクスポートされた他の要素を含むモジュールでは使用できません。", - "An_export_assignment_cannot_be_used_in_a_namespace_1063": "エクスポートの割り当ては、名前空間では使用できません。", - "An_export_assignment_cannot_have_modifiers_1120": "エクスポートの割り当てに修飾子を指定することはできません。", + "An_export_assignment_can_only_be_used_in_a_module_1231": "エクスポートの代入はモジュールでのみ使用可能です。", + "An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements_2309": "エクスポートの代入は、エクスポートされた他の要素を含むモジュールでは使用できません。", + "An_export_assignment_cannot_be_used_in_a_namespace_1063": "エクスポートの代入は、名前空間では使用できません。", + "An_export_assignment_cannot_have_modifiers_1120": "エクスポートの代入に修飾子を指定することはできません。", "An_export_declaration_can_only_be_used_in_a_module_1233": "エクスポート宣言はモジュールでのみ使用可能です。", "An_export_declaration_cannot_have_modifiers_1193": "エクスポート宣言に修飾子を指定することはできません。", "An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive_1198": "拡張された Unicode エスケープ値は 0x0 と 0x10FFFF の間 (両端を含む) でなければなりません。", @@ -389,8 +389,8 @@ "Experimental_Options_6177": "試験的なオプション", "Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_t_1219": "デコレーターの実験的なサポートは将来のリリースで変更になる可能性がある機能です。'experimentalDecorators' オプションを設定してこの警告を削除します。", "Explicitly_specified_module_resolution_kind_Colon_0_6087": "明示的に指定されたモジュール解決の種類 '{0}'。", - "Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or__1203": "ECMAScript モジュールを対象にする場合は、エクスポート割り当てを使用できません。代わりに 'export default' または別のモジュール書式の使用をご検討ください。", - "Export_assignment_is_not_supported_when_module_flag_is_system_1218": "割り当てのエクスポートは、'--module' フラグが 'system' の場合にはサポートされません。", + "Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or__1203": "ECMAScript モジュールを対象にする場合は、エクスポート代入を使用できません。代わりに 'export default' または別のモジュール書式の使用をご検討ください。", + "Export_assignment_is_not_supported_when_module_flag_is_system_1218": "代入のエクスポートは、'--module' フラグが 'system' の場合にはサポートされません。", "Export_declaration_conflicts_with_exported_declaration_of_0_2484": "エクスポート宣言が、'{0}' のエクスポートされた宣言と競合しています。", "Export_declarations_are_not_permitted_in_a_namespace_1194": "エクスポート宣言は名前空間でサポートされません。", "Exported_external_package_typings_file_0_is_not_a_module_Please_contact_the_package_author_to_update_2656": "エクスポートされた外部パッケージの型指定のファイル '{0}' はモジュールではありません。パッケージ定義を更新する場合は、パッケージの作成者にお問い合わせください。", @@ -399,7 +399,7 @@ "Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4023": "エクスポートされた変数 '{0}' が外部モジュール {2} の名前 '{1}' を持っているか使用していますが、名前を指定することはできません。", "Exported_variable_0_has_or_is_using_name_1_from_private_module_2_4024": "エクスポートされた変数 '{0}' がプライベート モジュール '{2}' の名前 '{1}' を持っているか、使用しています。", "Exported_variable_0_has_or_is_using_private_name_1_4025": "エクスポートされた変数 '{0}' がプライベート名 '{1}' を持っているか、使用しています。", - "Exports_and_export_assignments_are_not_permitted_in_module_augmentations_2666": "エクスポートとエクスポートの割り当てはモジュールの拡張では許可されていません。", + "Exports_and_export_assignments_are_not_permitted_in_module_augmentations_2666": "エクスポートとエクスポートの代入はモジュールの拡張では許可されていません。", "Expression_expected_1109": "式が必要です。", "Expression_or_comma_expected_1137": "式またはコンマが必要です。", "Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference_2402": "式は、コンパイラが基底クラスの参照をキャプチャするために使用する '_super' に解決されます。", @@ -454,7 +454,7 @@ "Generic_type_0_requires_1_type_argument_s_2314": "ジェネリック型 '{0}' には {1} 個の型引数が必要です。", "Generic_type_0_requires_between_1_and_2_type_arguments_2707": "ジェネリック型 '{0}' には、{1} 個から {2} 個までの型引数が必要です。", "Generic_type_instantiation_is_excessively_deep_and_possibly_infinite_2550": "ジェネリック型のインスタンス化は非常に深く、無限である可能性があります。", - "Getter_and_setter_accessors_do_not_agree_in_visibility_2379": "ゲッターおよびセッターで表示が許可されていません。", + "Getter_and_setter_accessors_do_not_agree_in_visibility_2379": "ゲッターおよびセッターでの表示が許可されていません。", "Global_module_exports_may_only_appear_at_top_level_1316": "グローバル モジュールのエクスポートは最上位レベルにのみ出現可能です。", "Global_module_exports_may_only_appear_in_declaration_files_1315": "グローバル モジュールのエクスポートは宣言ファイルにのみ出現可能です。", "Global_module_exports_may_only_appear_in_module_files_1314": "グローバル モジュールのエクスポートはモジュール ファイルにのみ出現可能です。", @@ -473,7 +473,7 @@ "Implement_interface_0_90006": "インターフェイス '{0}' を実装する", "Implements_clause_of_exported_class_0_has_or_is_using_private_name_1_4019": "エクスポートされたクラス '{0}' の Implements 句がプライベート名 '{1}' を持っているか、使用しています。", "Import_0_from_module_1_90013": "モジュール \"{1}\" から '{0}' をインポートする", - "Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_1202": "ECMAScript モジュールを対象にする場合は、インポート割り当てを使用できません。代わりに 'import * as ns from \"mod\"'、'import {a} from \"mod\"'、'import d from \"mod\"' などのモジュール書式の使用をご検討ください。", + "Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_1202": "ECMAScript モジュールを対象にする場合は、インポート代入を使用できません。代わりに 'import * as ns from \"mod\"'、'import {a} from \"mod\"'、'import d from \"mod\"' などのモジュール書式の使用をご検討ください。", "Import_declaration_0_is_using_private_name_1_4000": "インポート宣言 '{0}' がプライベート名 '{1}' を使用しています。", "Import_declaration_conflicts_with_local_declaration_of_0_2440": "インポート宣言が、'{0}' のローカル宣言と競合しています。", "Import_declarations_in_a_namespace_cannot_reference_a_module_1147": "名前空間内のインポート宣言は、モジュールを参照できません。", @@ -536,7 +536,7 @@ "JSX_elements_cannot_have_multiple_attributes_with_the_same_name_17001": "JSX 要素に同じ名前の複数の属性を指定することはできません。", "JSX_expressions_must_have_one_parent_element_2657": "JSX 式には 1 つの親要素が必要です。", "JSX_fragment_has_no_corresponding_closing_tag_17014": "JSX フラグメントには対応する終了タグがありません。", - "JSX_fragment_is_not_supported_when_using_an_inline_JSX_factory_pragma_17017": "JSX フラグメントはインライン JSX ファクトリ プラグマの使用時にサポートされていません", + "JSX_fragment_is_not_supported_when_using_an_inline_JSX_factory_pragma_17017": "JSX フラグメントはインライン JSX ファクトリ pragma の使用時にサポートされていません", "JSX_fragment_is_not_supported_when_using_jsxFactory_17016": "--jsxFactory を使う場合、JSX フラグメントはサポートされません", "JSX_spread_child_must_be_an_array_type_2609": "JSX スプレッドの子は、配列型でなければなりません。", "Jump_target_cannot_cross_function_boundary_1107": "ジャンプ先は関数の境界を越えることはできません。", @@ -714,7 +714,7 @@ "Property_0_of_exported_interface_has_or_is_using_private_name_1_4033": "エクスポートされたインターフェイスのプロパティ '{0}' が、プライベート名 '{1}' を持っているか、使用しています。", "Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2_2412": "型 '{1}' のプロパティ '{0}' を数値インデックス型 '{2}' に割り当てることはできません。", "Property_0_of_type_1_is_not_assignable_to_string_index_type_2_2411": "型 '{1}' のプロパティ '{0}' を文字列インデックス型 '{2}' に割り当てることはできません。", - "Property_assignment_expected_1136": "プロパティの割り当てが必要です。", + "Property_assignment_expected_1136": "プロパティの代入が必要です。", "Property_destructuring_pattern_expected_1180": "プロパティの非構造化パターンが必要です。", "Property_or_signature_expected_1131": "プロパティまたはシグネチャが必要です。", "Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_li_1328": "プロパティ値には、文字列リテラル、数値リテラル、'true'、'false'、'null'、オブジェクト リテラルまたは配列リテラルのみ使用できます。", @@ -850,7 +850,7 @@ "The_character_set_of_the_input_files_6163": "入力ファイルの文字セット。", "The_containing_function_or_module_body_is_too_large_for_control_flow_analysis_2563": "含まれている関数またはモジュールの本体は、制御フロー解析には大きすぎます。", "The_current_host_does_not_support_the_0_option_5001": "現在のホストは '{0}' オプションをサポートしていません。", - "The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context_2714": "エクスポートの割り当ての式は、環境コンテキストの識別子または修飾名にする必要があります。", + "The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context_2714": "エクスポートの代入の式は、環境コンテキストの識別子または修飾名にする必要があります。", "The_files_list_in_config_file_0_is_empty_18002": "構成ファイル '{0}' の 'files' リストが空です。", "The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback_1060": "Promise では、'then' メソッドの最初のパラメーターはコールバックでなければなりません。", "The_global_type_JSX_0_may_not_have_more_than_one_property_2608": "グローバル型 'JSX.{0}' には複数のプロパティが含まれていない可能性があります。", @@ -882,7 +882,7 @@ "The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_F_2359": "instanceof' 式の右辺には、'any' 型、または 'Function' インターフェイス型に割り当てることができる型を指定してください。", "The_specified_path_does_not_exist_Colon_0_5058": "指定されたパスがありません: '{0}'。", "The_target_of_an_assignment_must_be_a_variable_or_a_property_access_2541": "代入式のターゲットは、変数またはプロパティ アクセスである必要があります。", - "The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access_2701": "オブジェクトの残り部分の割り当ての対象は、変数またはプロパティ アクセスである必要があります。", + "The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access_2701": "オブジェクトの残り部分の代入の対象は、変数またはプロパティ アクセスである必要があります。", "The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1_2684": "型 '{0}' の 'this' コンテキストを型 '{1}' のメソッドの 'this' に割り当てることはできません。", "The_this_types_of_each_signature_are_incompatible_2685": "各シグネチャの 'this' 型に互換性がありません。", "The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_typ_2453": "型パラメーター '{0}' の型引数を使用法から推論することはできません。型引数を明示的に指定してください。", @@ -1032,14 +1032,14 @@ "await_expression_is_only_allowed_within_an_async_function_1308": "'await' 式は、非同期関数内でのみ使用できます。", "await_expressions_cannot_be_used_in_a_parameter_initializer_2524": "'await' 式は、パラメーター初期化子では使用できません。", "baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1_6106": "'baseUrl' オプションは '{0}' に設定され、この値を使用して非相対モジュール名 '{1}' を解決します。", - "can_only_be_used_in_an_object_literal_property_inside_a_destructuring_assignment_1312": "'=' は、非構造化割り当て内のオブジェクト リテラル プロパティでのみ使用できます。", + "can_only_be_used_in_an_object_literal_property_inside_a_destructuring_assignment_1312": "'=' は、非構造化代入内のオブジェクト リテラル プロパティでのみ使用できます。", "case_or_default_expected_1130": "'case' または 'default' が必要です。", "class_expressions_are_not_currently_supported_9003": "'class' 式は現在サポートされていません。", "const_declarations_can_only_be_declared_inside_a_block_1156": "'const' 宣言は、ブロック内でのみ宣言できます。", "const_declarations_must_be_initialized_1155": "'const' 宣言は初期化する必要があります。", "const_enum_member_initializer_was_evaluated_to_a_non_finite_value_2477": "'const' 列挙型メンバーの初期化子が、無限値に評価されました。", "const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN_2478": "'const' 列挙型メンバーの初期化子が、許可されない値 'NaN' に評価されました。", - "const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_im_2475": "'const' 列挙型は、プロパティまたはインデックスのアクセス式、インポート宣言またはエクスポートの割り当ての右辺、型のクエリにのみ使用できます。", + "const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_im_2475": "'const' 列挙型は、プロパティまたはインデックスのアクセス式、インポート宣言またはエクスポートの代入の右辺、型のクエリにのみ使用できます。", "delete_cannot_be_called_on_an_identifier_in_strict_mode_1102": "厳格モードでは 'delete' を識別子で呼び出すことはできません。", "delete_this_Project_0_is_up_to_date_because_it_was_previously_built_6360": "これを削除します - プロジェクト '{0}' は、以前にビルドされているため、最新の状態です", "enum_declarations_can_only_be_used_in_a_ts_file_8015": "'列挙型宣言' を使用できるのは .ts ファイル内のみです。", diff --git a/lib/lib.dom.d.ts b/lib/lib.dom.d.ts index da1ba2985dc15..1665e95c9c987 100644 --- a/lib/lib.dom.d.ts +++ b/lib/lib.dom.d.ts @@ -932,6 +932,10 @@ interface OscillatorOptions extends AudioNodeOptions { type?: OscillatorType; } +interface PageTransitionEventInit extends EventInit { + persisted?: boolean; +} + interface PannerOptions extends AudioNodeOptions { coneInnerAngle?: number; coneOuterAngle?: number; @@ -1197,7 +1201,16 @@ interface RTCDtlsParameters { } interface RTCErrorEventInit extends EventInit { - error?: RTCError | null; + error: RTCError; +} + +interface RTCErrorInit { + errorDetail: RTCErrorDetailType; + httpRequestStatusCode?: number; + receivedAlert?: number; + sctpCauseCode?: number; + sdpLineNumber?: number; + sentAlert?: number; } interface RTCIceCandidateAttributes extends RTCStats { @@ -1229,7 +1242,7 @@ interface RTCIceCandidateInit { candidate?: string; sdpMLineIndex?: number | null; sdpMid?: string | null; - usernameFragment?: string; + usernameFragment?: string | null; } interface RTCIceCandidatePair { @@ -1385,6 +1398,7 @@ interface RTCRtpCodingParameters { interface RTCRtpContributingSource { audioLevel?: number; + rtpTimestamp: number; source: number; timestamp: number; } @@ -1398,7 +1412,6 @@ interface RTCRtpEncodingParameters extends RTCRtpCodingParameters { dtx?: RTCDtxStatus; maxBitrate?: number; maxFramerate?: number; - priority?: RTCPriorityType; ptime?: number; scaleResolutionDownBy?: number; } @@ -1442,6 +1455,7 @@ interface RTCRtpRtxParameters { interface RTCRtpSendParameters extends RTCRtpParameters { degradationPreference?: RTCDegradationPreference; encodings: RTCRtpEncodingParameters[]; + priority?: RTCPriorityType; transactionId: string; } @@ -1463,7 +1477,7 @@ interface RTCRtpUnhandled { interface RTCSessionDescriptionInit { sdp?: string; - type: RTCSdpType; + type?: RTCSdpType; } interface RTCSrtpKeyParam { @@ -1516,6 +1530,16 @@ interface RTCTransportStats extends RTCStats { selectedCandidatePairId?: string; } +interface ReadableStreamReadDoneResult { + done: true; + value?: T; +} + +interface ReadableStreamReadValueResult { + done: false; + value: T; +} + interface RegistrationOptions { scope?: string; type?: WorkerType; @@ -1684,6 +1708,25 @@ interface ShadowRootInit { mode: ShadowRootMode; } +interface SpeechSynthesisErrorEventInit extends SpeechSynthesisEventInit { + error: SpeechSynthesisErrorCode; +} + +interface SpeechSynthesisEventInit extends EventInit { + charIndex?: number; + charLength?: number; + elapsedTime?: number; + name?: string; + utterance: SpeechSynthesisUtterance; +} + +interface StaticRangeInit { + endContainer: Node; + endOffset: number; + startContainer: Node; + startOffset: number; +} + interface StereoPannerOptions extends AudioNodeOptions { pan?: number; } @@ -2150,8 +2193,8 @@ interface AudioBuffer { readonly length: number; readonly numberOfChannels: number; readonly sampleRate: number; - copyFromChannel(destination: Float32Array, channelNumber: number, startInChannel?: number): void; - copyToChannel(source: Float32Array, channelNumber: number, startInChannel?: number): void; + copyFromChannel(destination: Float32Array, channelNumber: number, bufferOffset?: number): void; + copyToChannel(source: Float32Array, channelNumber: number, bufferOffset?: number): void; getChannelData(channel: number): Float32Array; } @@ -2519,7 +2562,10 @@ declare var BiquadFilterNode: { interface Blob { readonly size: number; readonly type: string; + arrayBuffer(): Promise; slice(start?: number, end?: number, contentType?: string): Blob; + stream(): ReadableStream; + text(): Promise; } declare var Blob: { @@ -2835,7 +2881,7 @@ interface CSSStyleDeclaration { clip: string; clipPath: string; clipRule: string; - color: string | null; + color: string; colorInterpolation: string; colorInterpolationFilters: string; columnCount: string; @@ -3012,7 +3058,7 @@ interface CSSStyleDeclaration { msWrapThrough: string; objectFit: string; objectPosition: string; - opacity: string | null; + opacity: string; order: string; orphans: string; outline: string; @@ -3052,14 +3098,14 @@ interface CSSStyleDeclaration { right: string; rotate: string; rowGap: string; - rubyAlign: string | null; + rubyAlign: string; rubyOverhang: string | null; - rubyPosition: string | null; + rubyPosition: string; scale: string; scrollBehavior: string; shapeRendering: string; - stopColor: string | null; - stopOpacity: string | null; + stopColor: string; + stopOpacity: string; stroke: string; strokeDasharray: string; strokeDashoffset: string; @@ -3072,7 +3118,7 @@ interface CSSStyleDeclaration { tableLayout: string; textAlign: string; textAlignLast: string; - textAnchor: string | null; + textAnchor: string; textCombineUpright: string; textDecoration: string; textDecorationColor: string; @@ -3160,7 +3206,8 @@ interface CSSStyleDeclaration { webkitBoxFlex: string; /** @deprecated */ webkitBoxOrdinalGroup: string; - webkitBoxOrient: string | null; + /** @deprecated */ + webkitBoxOrient: string; /** @deprecated */ webkitBoxPack: string; /** @deprecated */ @@ -3364,7 +3411,7 @@ interface CacheStorage { delete(cacheName: string): Promise; has(cacheName: string): Promise; keys(): Promise; - match(request: RequestInfo, options?: CacheQueryOptions): Promise; + match(request: RequestInfo, options?: MultiCacheQueryOptions): Promise; open(cacheName: string): Promise; } @@ -3649,11 +3696,18 @@ declare var ClipboardEvent: { /** A CloseEvent is sent to clients using WebSockets when the connection is closed. This is delivered to the listener indicated by the WebSocket object's onclose attribute. */ interface CloseEvent extends Event { + /** + * Returns the WebSocket connection close code provided by the server. + */ readonly code: number; + /** + * Returns the WebSocket connection close reason provided by the server. + */ readonly reason: string; + /** + * Returns true if the connection closed cleanly; false otherwise. + */ readonly wasClean: boolean; - /** @deprecated */ - initCloseEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, wasCleanArg: boolean, codeArg: number, reasonArg: string): void; } declare var CloseEvent: { @@ -3827,7 +3881,7 @@ declare var CryptoKeyPair: { }; interface CustomElementRegistry { - define(name: string, constructor: Function, options?: ElementDefinitionOptions): void; + define(name: string, constructor: CustomElementConstructor, options?: ElementDefinitionOptions): void; get(name: string): any; upgrade(root: Node): void; whenDefined(name: string): Promise; @@ -4036,6 +4090,7 @@ interface DOMMatrixReadOnly { toJSON(): any; transformPoint(point?: DOMPointInit): DOMPoint; translate(tx?: number, ty?: number, tz?: number): DOMMatrix; + toString(): string; } declare var DOMMatrixReadOnly: { @@ -4044,6 +4099,7 @@ declare var DOMMatrixReadOnly: { fromFloat32Array(array32: Float32Array): DOMMatrixReadOnly; fromFloat64Array(array64: Float64Array): DOMMatrixReadOnly; fromMatrix(other?: DOMMatrixInit): DOMMatrixReadOnly; + toString(): string; }; /** Provides the ability to parse XML or HTML source code from a string into a DOM Document. */ @@ -4201,6 +4257,7 @@ interface DOMTokenList { * Can be set, to change the associated attribute. */ value: string; + toString(): string; /** * Adds all arguments passed, except those already present. * @@ -4341,7 +4398,7 @@ interface DataTransferItem { */ getAsFile(): File | null; /** - * Invokes the callback with the string data as the argument, if the drag data item kind is Plain Unicode string. + * Invokes the callback with the string data as the argument, if the drag data item kind is text. */ getAsString(callback: FunctionStringCallback | null): void; webkitGetAsEntry(): any; @@ -4436,6 +4493,7 @@ interface DeviceMotionEvent extends Event { declare var DeviceMotionEvent: { prototype: DeviceMotionEvent; new(type: string, eventInitDict?: DeviceMotionEventInit): DeviceMotionEvent; + requestPermission(): Promise; }; interface DeviceMotionEventAcceleration { @@ -4461,6 +4519,7 @@ interface DeviceOrientationEvent extends Event { declare var DeviceOrientationEvent: { prototype: DeviceOrientationEvent; new(type: string, eventInitDict?: DeviceOrientationEventInit): DeviceOrientationEvent; + requestPermission(): Promise; }; /** Provides information about the rate at which the device is rotating around all three axes. */ @@ -4499,7 +4558,7 @@ interface DocumentEventMap extends GlobalEventHandlersEventMap, DocumentAndEleme "fullscreenerror": Event; "pointerlockchange": Event; "pointerlockerror": Event; - "readystatechange": ProgressEvent; + "readystatechange": Event; "visibilitychange": Event; } @@ -4509,10 +4568,6 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad * Sets or gets the URL for the current document. */ readonly URL: string; - /** - * Gets the object that has the focus when the parent document has focus. - */ - readonly activeElement: Element | null; /** * Sets or gets the color of all active links in the document. */ @@ -4658,7 +4713,7 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad * Fires when the state of the object has changed. * @param ev The event */ - onreadystatechange: ((this: Document, ev: ProgressEvent) => any) | null; + onreadystatechange: ((this: Document, ev: Event) => any) | null; onvisibilitychange: ((this: Document, ev: Event) => any) | null; /** * Returns document's origin. @@ -4819,7 +4874,6 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad createEvent(eventInterface: "SVGZoomEvents"): SVGZoomEvent; createEvent(eventInterface: "SecurityPolicyViolationEvent"): SecurityPolicyViolationEvent; createEvent(eventInterface: "ServiceWorkerMessageEvent"): ServiceWorkerMessageEvent; - createEvent(eventInterface: "SpeechRecognitionError"): SpeechRecognitionError; createEvent(eventInterface: "SpeechRecognitionEvent"): SpeechRecognitionEvent; createEvent(eventInterface: "SpeechSynthesisErrorEvent"): SpeechSynthesisErrorEvent; createEvent(eventInterface: "SpeechSynthesisEvent"): SpeechSynthesisEvent; @@ -5069,7 +5123,6 @@ interface DocumentEvent { createEvent(eventInterface: "SVGZoomEvents"): SVGZoomEvent; createEvent(eventInterface: "SecurityPolicyViolationEvent"): SecurityPolicyViolationEvent; createEvent(eventInterface: "ServiceWorkerMessageEvent"): ServiceWorkerMessageEvent; - createEvent(eventInterface: "SpeechRecognitionError"): SpeechRecognitionError; createEvent(eventInterface: "SpeechRecognitionEvent"): SpeechRecognitionEvent; createEvent(eventInterface: "SpeechSynthesisErrorEvent"): SpeechSynthesisErrorEvent; createEvent(eventInterface: "SpeechSynthesisEvent"): SpeechSynthesisEvent; @@ -5513,7 +5566,7 @@ interface EventTarget { * * When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. * - * When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in §2.8 Observing event listeners. + * When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. * * When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. * @@ -5754,7 +5807,7 @@ interface GenericTransformStream { */ readonly readable: ReadableStream; /** - * Returns a writable stream which accepts BufferSource chunks and runs them through encoding's decoder before making them available to readable. + * Returns a writable stream which accepts [AllowShared] BufferSource chunks and runs them through encoding's decoder before making them available to readable. * * Typically this will be used via the pipeThrough() method on a ReadableStream source. * @@ -5818,7 +5871,6 @@ interface GlobalEventHandlersEventMap { "load": Event; "loadeddata": Event; "loadedmetadata": Event; - "loadend": ProgressEvent; "loadstart": Event; "lostpointercapture": PointerEvent; "mousedown": MouseEvent; @@ -6003,7 +6055,6 @@ interface GlobalEventHandlers { * @param ev The event. */ onloadedmetadata: ((this: GlobalEventHandlers, ev: Event) => any) | null; - onloadend: ((this: GlobalEventHandlers, ev: ProgressEvent) => any) | null; /** * Occurs when Internet Explorer begins looking for media data. * @param ev The event. @@ -6116,10 +6167,10 @@ interface GlobalEventHandlers { */ ontimeupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null; ontoggle: ((this: GlobalEventHandlers, ev: Event) => any) | null; - ontouchcancel: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null; - ontouchend: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null; - ontouchmove: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null; - ontouchstart: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null; + ontouchcancel?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null; + ontouchend?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null; + ontouchmove?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null; + ontouchstart?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null; ontransitioncancel: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null; ontransitionend: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null; ontransitionrun: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null; @@ -6401,12 +6452,9 @@ interface HTMLBodyElement extends HTMLElement, WindowEventHandlers { background: string; /** @deprecated */ bgColor: string; - bgProperties: string; /** @deprecated */ link: string; /** @deprecated */ - noWrap: boolean; - /** @deprecated */ onorientationchange: ((this: HTMLBodyElement, ev: Event) => any) | null; /** @deprecated */ text: string; @@ -6425,10 +6473,6 @@ declare var HTMLBodyElement: { /** Provides properties and methods (beyond the regular HTMLElement interface it also has available to it by inheritance) for manipulating