@icebreakers/monorepo-templates 1.3.0 → 1.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/README.zh-CN.md +6 -0
- package/assets/.github/workflows/ci.yml +11 -0
- package/assets/.github/workflows/release-intent-check.yml +57 -0
- package/assets/CONTRIBUTING.md +3 -1
- package/assets/package.json +57 -14
- package/assets/pnpm-workspace.yaml +13 -0
- package/assets/repoctl.config.ts +6 -1
- package/assets/turbo.json +16 -0
- package/package.json +4 -4
- package/templates/client/eslint.config.js +1 -1
- package/templates/client/package.json +13 -13
- package/templates/client/worker-configuration.d.ts +763 -217
- package/templates/server/package.json +3 -3
- package/templates/server/worker-configuration.d.ts +763 -217
- package/templates/vitepress/.vitepress/config.ts +17 -7
- package/templates/vitepress/.vitepress/home/content.ts +64 -156
- package/templates/vitepress/.vitepress/home/types.ts +18 -34
- package/templates/vitepress/.vitepress/navigation/routes.ts +89 -81
- package/templates/vitepress/.vitepress/seo.ts +16 -2
- package/templates/vitepress/.vitepress/theme/Layout.vue +27 -0
- package/templates/vitepress/.vitepress/theme/components/HomePage.vue +66 -88
- package/templates/vitepress/.vitepress/theme/home/foundation.css +161 -104
- package/templates/vitepress/.vitepress/theme/home/responsive.css +113 -20
- package/templates/vitepress/.vitepress/theme/home/sections.css +179 -100
- package/templates/vitepress/.vitepress/theme/index.ts +2 -0
- package/templates/vitepress/learn/index.md +18 -0
- package/templates/vitepress/{monorepo → learn/monorepo}/commands.md +1 -1
- package/templates/vitepress/{monorepo → learn/monorepo}/index.md +3 -3
- package/templates/vitepress/{monorepo → learn/monorepo}/templates.md +1 -1
- package/templates/vitepress/{why/what-is-npm-package.md → learn/packages/index.md} +1 -1
- package/templates/vitepress/{why → learn/packages}/modern/index.md +2 -2
- package/templates/vitepress/{why → learn/packages}/modern/typescript.md +1 -1
- package/templates/vitepress/{why/index.md → learn/packages/modern-overview.md} +1 -1
- package/templates/vitepress/{why/publish-basic-npm-package.md → learn/packages/publish.md} +1 -1
- package/templates/vitepress/{why/how-to-reuse-js-code.md → learn/packages/reuse-javascript.md} +2 -2
- package/templates/vitepress/{why/js-keywords.md → learn/packages/runtime-globals.md} +2 -2
- package/templates/vitepress/{repoctl/index.md → learn/repoctl-model.md} +8 -8
- package/templates/vitepress/{tools → learn/tools}/changeset.md +3 -3
- package/templates/vitepress/{tools → learn/tools}/husky.md +2 -2
- package/templates/vitepress/{tools → learn/tools}/lint-staged.md +2 -2
- package/templates/vitepress/{tools → learn/tools}/llms-txt.md +1 -1
- package/templates/vitepress/{tools → learn/tools}/pnpm.md +2 -2
- package/templates/vitepress/{tools → learn/tools}/renovate.md +2 -2
- package/templates/vitepress/{tools → learn/tools}/turborepo.md +2 -2
- package/templates/vitepress/package.json +7 -7
- package/templates/vitepress/public/brand/apple-touch-icon.png +0 -0
- package/templates/vitepress/public/brand/favicon.ico +0 -0
- package/templates/vitepress/public/brand/repoctl-lockup-dark.svg +6 -0
- package/templates/vitepress/public/brand/repoctl-lockup.svg +20 -0
- package/templates/vitepress/public/brand/repoctl-mark-192.png +0 -0
- package/templates/vitepress/public/brand/repoctl-mark-dark.svg +13 -0
- package/templates/vitepress/public/brand/repoctl-mark.svg +13 -0
- package/templates/vitepress/public/brand/repoctl-social-en.png +0 -0
- package/templates/vitepress/public/brand/repoctl-social-en.webp +0 -0
- package/templates/vitepress/public/brand/repoctl-social-zh.png +0 -0
- package/templates/vitepress/public/brand/repoctl-social-zh.webp +0 -0
- package/templates/vitepress/public/favicon.ico +0 -0
- package/templates/vitepress/public/logo.jpg +0 -0
- package/templates/vitepress/{repoctl → reference}/commands.md +2 -2
- package/templates/vitepress/reference/index.md +15 -0
- package/templates/vitepress/reference/output.md +37 -0
- package/templates/vitepress/{repoctl → reference}/templates.md +2 -2
- package/templates/vitepress/scripts/check-locales.ts +35 -1
- package/templates/vitepress/start/choose-next.md +14 -0
- package/templates/vitepress/start/first-run.md +39 -0
- package/templates/vitepress/start/index.md +26 -0
- package/templates/vitepress/{repoctl/getting-started.md → start/install.md} +5 -5
- package/templates/vitepress/{repoctl → tasks}/adopt-existing.md +30 -4
- package/templates/vitepress/{repoctl → tasks}/checks.md +27 -1
- package/templates/vitepress/{repoctl/workflows.md → tasks/ci.md} +30 -4
- package/templates/vitepress/tasks/create-project.md +37 -0
- package/templates/vitepress/{repoctl/scenarios.md → tasks/index.md} +8 -8
- package/templates/vitepress/tasks/release.md +31 -0
- package/templates/vitepress/{repoctl → tasks}/reports.md +25 -0
- package/templates/vitepress/{repoctl → tasks}/troubleshooting.md +30 -4
- package/templates/vitepress/zh/ai/llms-txt.md +6 -6
- package/templates/vitepress/zh/learn/index.md +18 -0
- package/templates/vitepress/zh/{monorepo → learn/monorepo}/commands.md +3 -3
- package/templates/vitepress/zh/{monorepo → learn/monorepo}/manage.md +4 -4
- package/templates/vitepress/zh/{monorepo → learn/monorepo}/templates.md +2 -2
- package/templates/vitepress/zh/{monorepo → learn/monorepo}/troubleshooting.md +2 -2
- package/templates/vitepress/zh/{why → learn/packages}/modern/index.md +1 -1
- package/templates/vitepress/zh/{why/index.md → learn/packages/modern-overview.md} +2 -2
- package/templates/vitepress/zh/{repoctl/index.md → learn/repoctl-model.md} +19 -19
- package/templates/vitepress/zh/{tools → learn/tools}/husky.md +1 -1
- package/templates/vitepress/zh/{tools → learn/tools}/lint-staged.md +1 -1
- package/templates/vitepress/zh/{tools → learn/tools}/llms-txt.md +1 -1
- package/templates/vitepress/zh/{tools → learn/tools}/pnpm.md +1 -1
- package/templates/vitepress/zh/{tools → learn/tools}/turborepo.md +11 -11
- package/templates/vitepress/zh/{repoctl → reference}/commands.md +4 -4
- package/templates/vitepress/zh/{repoctl → reference}/config.md +1 -1
- package/templates/vitepress/zh/reference/index.md +15 -0
- package/templates/vitepress/zh/reference/output.md +37 -0
- package/templates/vitepress/zh/{repoctl → reference}/templates.md +4 -4
- package/templates/vitepress/zh/start/choose-next.md +14 -0
- package/templates/vitepress/zh/{repoctl/doctor.md → start/diagnose.md} +1 -1
- package/templates/vitepress/zh/start/first-run.md +39 -0
- package/templates/vitepress/zh/start/index.md +26 -0
- package/templates/vitepress/zh/{repoctl/getting-started.md → start/install.md} +5 -5
- package/templates/vitepress/zh/{repoctl → tasks}/adopt-existing.md +30 -4
- package/templates/vitepress/zh/{repoctl → tasks}/checks.md +27 -1
- package/templates/vitepress/zh/{repoctl/workflows.md → tasks/ci.md} +38 -12
- package/templates/vitepress/zh/tasks/create-project.md +37 -0
- package/templates/vitepress/zh/{repoctl/scenarios.md → tasks/index.md} +8 -8
- package/templates/vitepress/zh/tasks/release.md +31 -0
- package/templates/vitepress/zh/{repoctl → tasks}/reports.md +25 -0
- package/templates/vitepress/zh/{repoctl → tasks}/troubleshooting.md +39 -13
- package/templates/vue-lib/package.json +5 -5
- package/templates/vitepress/getting-started.md +0 -11
- package/templates/vitepress/knowledge/index.md +0 -26
- package/templates/vitepress/thinking.md +0 -22
- package/templates/vitepress/zh/getting-started.md +0 -40
- package/templates/vitepress/zh/knowledge/index.md +0 -50
- package/templates/vitepress/zh/thinking.md +0 -91
- /package/templates/vitepress/{monorepo → learn/monorepo}/manage.md +0 -0
- /package/templates/vitepress/{monorepo → learn/monorepo}/publish.md +0 -0
- /package/templates/vitepress/{monorepo → learn/monorepo}/troubleshooting.md +0 -0
- /package/templates/vitepress/{why → learn/packages}/assets/npm-dt.svg +0 -0
- /package/templates/vitepress/{why → learn/packages}/assets/npm-ts.svg +0 -0
- /package/templates/vitepress/{why → learn/packages}/examples/0.npm-basic-package/index.js +0 -0
- /package/templates/vitepress/{why → learn/packages}/examples/0.npm-basic-package/package.json +0 -0
- /package/templates/vitepress/{why → learn/packages}/examples/1.npm-basic-package/index.cjs +0 -0
- /package/templates/vitepress/{why → learn/packages}/examples/1.npm-basic-package/index.d.ts +0 -0
- /package/templates/vitepress/{why → learn/packages}/examples/1.npm-basic-package/index.js +0 -0
- /package/templates/vitepress/{why → learn/packages}/examples/1.npm-basic-package/package.json +0 -0
- /package/templates/vitepress/{why → learn/packages}/examples/2.npm-basic-package/README.md +0 -0
- /package/templates/vitepress/{why → learn/packages}/examples/2.npm-basic-package/package-lock.json +0 -0
- /package/templates/vitepress/{why → learn/packages}/examples/2.npm-basic-package/package.json +0 -0
- /package/templates/vitepress/{why → learn/packages}/examples/2.npm-basic-package/rename-ext.js +0 -0
- /package/templates/vitepress/{why → learn/packages}/examples/2.npm-basic-package/src/index.ts +0 -0
- /package/templates/vitepress/{why → learn/packages}/examples/2.npm-basic-package/tsconfig.cjs.json +0 -0
- /package/templates/vitepress/{why → learn/packages}/examples/2.npm-basic-package/tsconfig.esm.json +0 -0
- /package/templates/vitepress/{why → learn/packages}/examples/2.npm-basic-package/tsconfig.json +0 -0
- /package/templates/vitepress/{why → learn/packages}/examples/3.npm-basic-package/README.md +0 -0
- /package/templates/vitepress/{why → learn/packages}/examples/3.npm-basic-package/package-lock.json +0 -0
- /package/templates/vitepress/{why → learn/packages}/examples/3.npm-basic-package/package.json +0 -0
- /package/templates/vitepress/{why → learn/packages}/examples/3.npm-basic-package/src/index.ts +0 -0
- /package/templates/vitepress/{why → learn/packages}/examples/3.npm-basic-package/tsconfig.json +0 -0
- /package/templates/vitepress/{why → learn/packages}/examples/3.npm-basic-package/tsdown.config.ts +0 -0
- /package/templates/vitepress/{why → learn/packages}/examples/usage-cjs/cjs.cjs +0 -0
- /package/templates/vitepress/{why → learn/packages}/examples/usage-cjs/esm.mjs +0 -0
- /package/templates/vitepress/{why → learn/packages}/examples/usage-cjs/index.js +0 -0
- /package/templates/vitepress/{why → learn/packages}/examples/usage-cjs/package-lock.json +0 -0
- /package/templates/vitepress/{why → learn/packages}/examples/usage-cjs/package.json +0 -0
- /package/templates/vitepress/{why → learn/packages}/examples/usage-esm/cjs.cjs +0 -0
- /package/templates/vitepress/{why → learn/packages}/examples/usage-esm/createRequire.js +0 -0
- /package/templates/vitepress/{why → learn/packages}/examples/usage-esm/esm.mjs +0 -0
- /package/templates/vitepress/{why → learn/packages}/examples/usage-esm/index.js +0 -0
- /package/templates/vitepress/{why → learn/packages}/examples/usage-esm/package-lock.json +0 -0
- /package/templates/vitepress/{why → learn/packages}/examples/usage-esm/package.json +0 -0
- /package/templates/vitepress/{why → learn/packages}/modern/bundlers.md +0 -0
- /package/templates/vitepress/{why → learn/packages}/modern/dts.md +0 -0
- /package/templates/vitepress/{why → learn/packages}/modern/esm-vs-cjs.md +0 -0
- /package/templates/vitepress/{why → learn/packages}/modern/package-entry-points.md +0 -0
- /package/templates/vitepress/{why/js-cjs-mjs.md → learn/packages/module-extensions.md} +0 -0
- /package/templates/vitepress/{tools → learn/tools}/index.md +0 -0
- /package/templates/vitepress/{repoctl → reference}/aliases.md +0 -0
- /package/templates/vitepress/{repoctl → reference}/config.md +0 -0
- /package/templates/vitepress/{repoctl → reference}/execution-model.md +0 -0
- /package/templates/vitepress/{repoctl → reference}/template-assets.md +0 -0
- /package/templates/vitepress/{repoctl/doctor.md → start/diagnose.md} +0 -0
- /package/templates/vitepress/zh/{monorepo → learn/monorepo}/index.md +0 -0
- /package/templates/vitepress/zh/{monorepo → learn/monorepo}/publish.md +0 -0
- /package/templates/vitepress/zh/{why → learn/packages}/assets/npm-dt.svg +0 -0
- /package/templates/vitepress/zh/{why → learn/packages}/assets/npm-ts.svg +0 -0
- /package/templates/vitepress/zh/{why → learn/packages}/examples/0.npm-basic-package/index.js +0 -0
- /package/templates/vitepress/zh/{why → learn/packages}/examples/0.npm-basic-package/package.json +0 -0
- /package/templates/vitepress/zh/{why → learn/packages}/examples/1.npm-basic-package/index.cjs +0 -0
- /package/templates/vitepress/zh/{why → learn/packages}/examples/1.npm-basic-package/index.d.ts +0 -0
- /package/templates/vitepress/zh/{why → learn/packages}/examples/1.npm-basic-package/index.js +0 -0
- /package/templates/vitepress/zh/{why → learn/packages}/examples/1.npm-basic-package/package.json +0 -0
- /package/templates/vitepress/zh/{why → learn/packages}/examples/2.npm-basic-package/README.md +0 -0
- /package/templates/vitepress/zh/{why → learn/packages}/examples/2.npm-basic-package/package-lock.json +0 -0
- /package/templates/vitepress/zh/{why → learn/packages}/examples/2.npm-basic-package/package.json +0 -0
- /package/templates/vitepress/zh/{why → learn/packages}/examples/2.npm-basic-package/rename-ext.js +0 -0
- /package/templates/vitepress/zh/{why → learn/packages}/examples/2.npm-basic-package/src/index.ts +0 -0
- /package/templates/vitepress/zh/{why → learn/packages}/examples/2.npm-basic-package/tsconfig.cjs.json +0 -0
- /package/templates/vitepress/zh/{why → learn/packages}/examples/2.npm-basic-package/tsconfig.esm.json +0 -0
- /package/templates/vitepress/zh/{why → learn/packages}/examples/2.npm-basic-package/tsconfig.json +0 -0
- /package/templates/vitepress/zh/{why → learn/packages}/examples/3.npm-basic-package/README.md +0 -0
- /package/templates/vitepress/zh/{why → learn/packages}/examples/3.npm-basic-package/package-lock.json +0 -0
- /package/templates/vitepress/zh/{why → learn/packages}/examples/3.npm-basic-package/package.json +0 -0
- /package/templates/vitepress/zh/{why → learn/packages}/examples/3.npm-basic-package/src/index.ts +0 -0
- /package/templates/vitepress/zh/{why → learn/packages}/examples/3.npm-basic-package/tsconfig.json +0 -0
- /package/templates/vitepress/zh/{why → learn/packages}/examples/3.npm-basic-package/tsdown.config.ts +0 -0
- /package/templates/vitepress/zh/{why → learn/packages}/examples/usage-cjs/cjs.cjs +0 -0
- /package/templates/vitepress/zh/{why → learn/packages}/examples/usage-cjs/esm.mjs +0 -0
- /package/templates/vitepress/zh/{why → learn/packages}/examples/usage-cjs/index.js +0 -0
- /package/templates/vitepress/zh/{why → learn/packages}/examples/usage-cjs/package-lock.json +0 -0
- /package/templates/vitepress/zh/{why → learn/packages}/examples/usage-cjs/package.json +0 -0
- /package/templates/vitepress/zh/{why → learn/packages}/examples/usage-esm/cjs.cjs +0 -0
- /package/templates/vitepress/zh/{why → learn/packages}/examples/usage-esm/createRequire.js +0 -0
- /package/templates/vitepress/zh/{why → learn/packages}/examples/usage-esm/esm.mjs +0 -0
- /package/templates/vitepress/zh/{why → learn/packages}/examples/usage-esm/index.js +0 -0
- /package/templates/vitepress/zh/{why → learn/packages}/examples/usage-esm/package-lock.json +0 -0
- /package/templates/vitepress/zh/{why → learn/packages}/examples/usage-esm/package.json +0 -0
- /package/templates/vitepress/zh/{why/what-is-npm-package.md → learn/packages/index.md} +0 -0
- /package/templates/vitepress/zh/{why → learn/packages}/modern/bundlers.md +0 -0
- /package/templates/vitepress/zh/{why → learn/packages}/modern/dts.md +0 -0
- /package/templates/vitepress/zh/{why → learn/packages}/modern/esm-vs-cjs.md +0 -0
- /package/templates/vitepress/zh/{why → learn/packages}/modern/package-entry-points.md +0 -0
- /package/templates/vitepress/zh/{why → learn/packages}/modern/typescript.md +0 -0
- /package/templates/vitepress/zh/{why/js-cjs-mjs.md → learn/packages/module-extensions.md} +0 -0
- /package/templates/vitepress/zh/{why/publish-basic-npm-package.md → learn/packages/publish.md} +0 -0
- /package/templates/vitepress/zh/{why/how-to-reuse-js-code.md → learn/packages/reuse-javascript.md} +0 -0
- /package/templates/vitepress/zh/{why/js-keywords.md → learn/packages/runtime-globals.md} +0 -0
- /package/templates/vitepress/zh/{tools → learn/tools}/changeset.md +0 -0
- /package/templates/vitepress/zh/{tools → learn/tools}/index.md +0 -0
- /package/templates/vitepress/zh/{tools → learn/tools}/renovate.md +0 -0
- /package/templates/vitepress/zh/{repoctl → reference}/aliases.md +0 -0
- /package/templates/vitepress/zh/{repoctl → reference}/execution-model.md +0 -0
- /package/templates/vitepress/zh/{repoctl → reference}/template-assets.md +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
2
|
// Generated by Wrangler by running `wrangler types` (hash: bf05258867cf7490d4c96f4ea30bd0ef)
|
|
3
|
-
// Runtime types generated with workerd@1.
|
|
3
|
+
// Runtime types generated with workerd@1.20260831.1 2025-10-16 nodejs_compat
|
|
4
4
|
interface __BaseEnv_Env {
|
|
5
5
|
}
|
|
6
6
|
declare namespace Cloudflare {
|
|
@@ -30,26 +30,26 @@ and limitations under the License.
|
|
|
30
30
|
// noinspection JSUnusedGlobalSymbols
|
|
31
31
|
declare var onmessage: never;
|
|
32
32
|
/**
|
|
33
|
-
* The **`DOMException`** interface represents an abnormal event (called an
|
|
33
|
+
* The **`DOMException`** interface represents an abnormal event (called an exception) that occurs as a result of calling a method or accessing a property of a web API. This is how error conditions are described in web APIs.
|
|
34
34
|
*
|
|
35
35
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException)
|
|
36
36
|
*/
|
|
37
37
|
declare class DOMException extends Error {
|
|
38
38
|
constructor(message?: string, name?: string);
|
|
39
39
|
/**
|
|
40
|
-
* The **`message`** read-only property of the a message or description associated with the given error name.
|
|
40
|
+
* The **`message`** read-only property of the DOMException interface returns a string representing a message or description associated with the given error name.
|
|
41
41
|
*
|
|
42
42
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException/message)
|
|
43
43
|
*/
|
|
44
44
|
readonly message: string;
|
|
45
45
|
/**
|
|
46
|
-
* The **`name`** read-only property of the one of the strings associated with an error name.
|
|
46
|
+
* The **`name`** read-only property of the DOMException interface returns a string that contains one of the strings associated with an error name.
|
|
47
47
|
*
|
|
48
48
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException/name)
|
|
49
49
|
*/
|
|
50
50
|
readonly name: string;
|
|
51
51
|
/**
|
|
52
|
-
* The **`code`** read-only property of the DOMException interface returns one of the legacy error code constants, or
|
|
52
|
+
* The **`code`** read-only property of the DOMException interface returns one of the legacy error code constants, or 0 if none match.
|
|
53
53
|
* @deprecated
|
|
54
54
|
*
|
|
55
55
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException/code)
|
|
@@ -107,61 +107,61 @@ interface Console {
|
|
|
107
107
|
*/
|
|
108
108
|
clear(): void;
|
|
109
109
|
/**
|
|
110
|
-
* The **`console.count()`** static method logs the number of times that this particular call to
|
|
110
|
+
* The **`console.count()`** static method logs the number of times that this particular call to count() has been called.
|
|
111
111
|
*
|
|
112
112
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/count_static)
|
|
113
113
|
*/
|
|
114
114
|
count(label?: string): void;
|
|
115
115
|
/**
|
|
116
|
-
* The **`console.countReset()`** static method resets counter used with console
|
|
116
|
+
* The **`console.countReset()`** static method resets counter used with console.count().
|
|
117
117
|
*
|
|
118
118
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/countReset_static)
|
|
119
119
|
*/
|
|
120
120
|
countReset(label?: string): void;
|
|
121
121
|
/**
|
|
122
|
-
* The **`console.debug()`** static method outputs a message to the console at the
|
|
122
|
+
* The **`console.debug()`** static method outputs a message to the console at the "debug" log level. The message is only displayed to the user if the console is configured to display debug output. In most cases, the log level is configured within the console UI. This log level might correspond to the Debug or Verbose log level.
|
|
123
123
|
*
|
|
124
124
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/debug_static)
|
|
125
125
|
*/
|
|
126
126
|
debug(...data: any[]): void;
|
|
127
127
|
/**
|
|
128
|
-
* The **`console.dir()`** static method displays a list of the properties of the specified JavaScript object.
|
|
128
|
+
* The **`console.dir()`** static method displays a list of the properties of the specified JavaScript object. In browser consoles, the output is presented as a hierarchical listing with disclosure triangles that let you see the contents of child objects.
|
|
129
129
|
*
|
|
130
130
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/dir_static)
|
|
131
131
|
*/
|
|
132
132
|
dir(item?: any, options?: any): void;
|
|
133
133
|
/**
|
|
134
|
-
* The **`console.dirxml()`** static method displays an interactive tree of the descendant elements of the specified XML/HTML element.
|
|
134
|
+
* The **`console.dirxml()`** static method displays an interactive tree of the descendant elements of the specified XML/HTML element. If it is not possible to display as an element the JavaScript Object view is shown instead. The output is presented as a hierarchical listing of expandable nodes that let you see the contents of child nodes.
|
|
135
135
|
*
|
|
136
136
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/dirxml_static)
|
|
137
137
|
*/
|
|
138
138
|
dirxml(...data: any[]): void;
|
|
139
139
|
/**
|
|
140
|
-
* The **`console.error()`** static method outputs a message to the console at the
|
|
140
|
+
* The **`console.error()`** static method outputs a message to the console at the "error" log level. The message is only displayed to the user if the console is configured to display error output. In most cases, the log level is configured within the console UI. The message may be formatted as an error, with red colors and call stack information.
|
|
141
141
|
*
|
|
142
142
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/error_static)
|
|
143
143
|
*/
|
|
144
144
|
error(...data: any[]): void;
|
|
145
145
|
/**
|
|
146
|
-
* The **`console.group()`** static method creates a new inline group in the Web console log, causing any subsequent console messages to be indented by an additional level, until console
|
|
146
|
+
* The **`console.group()`** static method creates a new inline group in the Web console log, causing any subsequent console messages to be indented by an additional level, until console.groupEnd() is called.
|
|
147
147
|
*
|
|
148
148
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/group_static)
|
|
149
149
|
*/
|
|
150
150
|
group(...data: any[]): void;
|
|
151
151
|
/**
|
|
152
|
-
* The **`console.groupCollapsed()`** static method creates a new inline group in the console.
|
|
152
|
+
* The **`console.groupCollapsed()`** static method creates a new inline group in the console. Unlike console.group(), however, the new group is created collapsed. The user will need to use the disclosure button next to it to expand it, revealing the entries created in the group.
|
|
153
153
|
*
|
|
154
154
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupCollapsed_static)
|
|
155
155
|
*/
|
|
156
156
|
groupCollapsed(...data: any[]): void;
|
|
157
157
|
/**
|
|
158
|
-
* The **`console.groupEnd()`** static method exits the current inline group in the console.
|
|
158
|
+
* The **`console.groupEnd()`** static method exits the current inline group in the console. See Using groups in the console in the console documentation for details and examples.
|
|
159
159
|
*
|
|
160
160
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupEnd_static)
|
|
161
161
|
*/
|
|
162
162
|
groupEnd(): void;
|
|
163
163
|
/**
|
|
164
|
-
* The **`console.info()`** static method outputs a message to the console at the
|
|
164
|
+
* The **`console.info()`** static method outputs a message to the console at the "info" log level. The message is only displayed to the user if the console is configured to display info output. In most cases, the log level is configured within the console UI. The message may receive special formatting, such as a small "i" icon next to it.
|
|
165
165
|
*
|
|
166
166
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/info_static)
|
|
167
167
|
*/
|
|
@@ -179,23 +179,24 @@ interface Console {
|
|
|
179
179
|
*/
|
|
180
180
|
table(tabularData?: any, properties?: string[]): void;
|
|
181
181
|
/**
|
|
182
|
-
* The **`console.time()`** static method starts a timer you can use to track how long an operation takes.
|
|
182
|
+
* The **`console.time()`** static method starts a timer you can use to track how long an operation takes. You give each timer a unique name, and may have up to 10,000 timers running on a given page. When you call console.timeEnd() with the same name, the browser will output the time, in milliseconds, that elapsed since the timer was started.
|
|
183
183
|
*
|
|
184
184
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/time_static)
|
|
185
185
|
*/
|
|
186
186
|
time(label?: string): void;
|
|
187
187
|
/**
|
|
188
|
-
* The **`console.timeEnd()`** static method stops a timer that was previously started by calling console
|
|
188
|
+
* The **`console.timeEnd()`** static method stops a timer that was previously started by calling console.time().
|
|
189
189
|
*
|
|
190
190
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timeEnd_static)
|
|
191
191
|
*/
|
|
192
192
|
timeEnd(label?: string): void;
|
|
193
193
|
/**
|
|
194
|
-
* The **`console.timeLog()`** static method logs the current value of a timer that was previously started by calling console
|
|
194
|
+
* The **`console.timeLog()`** static method logs the current value of a timer that was previously started by calling console.time().
|
|
195
195
|
*
|
|
196
196
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timeLog_static)
|
|
197
197
|
*/
|
|
198
198
|
timeLog(label?: string, ...data: any[]): void;
|
|
199
|
+
/* The **`console.timeStamp()`** static method adds a single marker to the browser's Performance tool (Firefox bug 1387528, Chrome). This lets you correlate a point in your code with the other events recorded in the timeline, such as layout and paint events. */
|
|
199
200
|
timeStamp(label?: string): void;
|
|
200
201
|
/**
|
|
201
202
|
* The **`console.trace()`** static method outputs a stack trace to the console.
|
|
@@ -204,7 +205,7 @@ interface Console {
|
|
|
204
205
|
*/
|
|
205
206
|
trace(...data: any[]): void;
|
|
206
207
|
/**
|
|
207
|
-
* The **`console.warn()`** static method outputs a warning message to the console at the
|
|
208
|
+
* The **`console.warn()`** static method outputs a warning message to the console at the "warning" log level. The message is only displayed to the user if the console is configured to display warning output. In most cases, the log level is configured within the console UI. The message may receive special formatting, such as yellow colors and a warning icon.
|
|
208
209
|
*
|
|
209
210
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/warn_static)
|
|
210
211
|
*/
|
|
@@ -370,7 +371,7 @@ interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
|
|
|
370
371
|
declare function addEventListener<Type extends keyof WorkerGlobalScopeEventMap>(type: Type, handler: EventListenerOrEventListenerObject<WorkerGlobalScopeEventMap[Type]>, options?: EventTargetAddEventListenerOptions | boolean): void;
|
|
371
372
|
declare function removeEventListener<Type extends keyof WorkerGlobalScopeEventMap>(type: Type, handler: EventListenerOrEventListenerObject<WorkerGlobalScopeEventMap[Type]>, options?: EventTargetEventListenerOptions | boolean): void;
|
|
372
373
|
/**
|
|
373
|
-
* The **`dispatchEvent()`** method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order.
|
|
374
|
+
* The **`dispatchEvent()`** method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order. The normal event processing rules (including the capturing and optional bubbling phase) also apply to events dispatched manually with dispatchEvent().
|
|
374
375
|
*
|
|
375
376
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/dispatchEvent)
|
|
376
377
|
*/
|
|
@@ -415,6 +416,7 @@ declare const crypto: Crypto;
|
|
|
415
416
|
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/)
|
|
416
417
|
*/
|
|
417
418
|
declare const caches: CacheStorage;
|
|
419
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/scheduler) */
|
|
418
420
|
declare const scheduler: Scheduler;
|
|
419
421
|
/**
|
|
420
422
|
* The Workers runtime supports a subset of the Performance API, used to measure timing and performance,
|
|
@@ -552,7 +554,7 @@ interface DurableObjectState<Props = unknown> {
|
|
|
552
554
|
setHibernatableWebSocketEventTimeout(timeoutMs?: number): void;
|
|
553
555
|
getHibernatableWebSocketEventTimeout(): number | null;
|
|
554
556
|
getTags(ws: WebSocket): string[];
|
|
555
|
-
abort(reason?: string): void;
|
|
557
|
+
abort(reason?: string, options?: DurableObjectAbortOptions): void;
|
|
556
558
|
}
|
|
557
559
|
interface DurableObjectTransaction {
|
|
558
560
|
get<T = unknown>(key: string, options?: DurableObjectGetOptions): Promise<T | undefined>;
|
|
@@ -588,6 +590,9 @@ interface DurableObjectStorage {
|
|
|
588
590
|
getBookmarkForTime(timestamp: number | Date): Promise<string>;
|
|
589
591
|
onNextSessionRestoreBookmark(bookmark: string): Promise<string>;
|
|
590
592
|
}
|
|
593
|
+
interface DurableObjectAbortOptions {
|
|
594
|
+
retryAlarm?: boolean;
|
|
595
|
+
}
|
|
591
596
|
interface DurableObjectListOptions {
|
|
592
597
|
start?: string;
|
|
593
598
|
startAfter?: string;
|
|
@@ -638,26 +643,26 @@ interface AnalyticsEngineDataPoint {
|
|
|
638
643
|
blobs?: ((ArrayBuffer | string) | null)[];
|
|
639
644
|
}
|
|
640
645
|
/**
|
|
641
|
-
* The **`Event`** interface represents an event which takes place on an
|
|
646
|
+
* The **`Event`** interface represents an event which takes place on an EventTarget.
|
|
642
647
|
*
|
|
643
648
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event)
|
|
644
649
|
*/
|
|
645
650
|
declare class Event {
|
|
646
651
|
constructor(type: string, init?: EventInit);
|
|
647
652
|
/**
|
|
648
|
-
* The **`type`** read-only property of the Event interface returns a string containing the event's type.
|
|
653
|
+
* The **`type`** read-only property of the Event interface returns a string containing the event's type. It is set when the event is constructed and is the name commonly used to refer to the specific event, such as click, load, or error.
|
|
649
654
|
*
|
|
650
655
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/type)
|
|
651
656
|
*/
|
|
652
657
|
get type(): string;
|
|
653
658
|
/**
|
|
654
|
-
* The **`eventPhase`** read-only property of the being evaluated.
|
|
659
|
+
* The **`eventPhase`** read-only property of the Event interface indicates which phase of the event flow is currently being evaluated.
|
|
655
660
|
*
|
|
656
661
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/eventPhase)
|
|
657
662
|
*/
|
|
658
663
|
get eventPhase(): number;
|
|
659
664
|
/**
|
|
660
|
-
* The read-only **`composed`** property of the or not the event will propagate across the shadow DOM boundary into the standard DOM.
|
|
665
|
+
* The read-only **`composed`** property of the Event interface returns a boolean value which indicates whether or not the event will propagate across the shadow DOM boundary into the standard DOM.
|
|
661
666
|
*
|
|
662
667
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composed)
|
|
663
668
|
*/
|
|
@@ -694,13 +699,13 @@ declare class Event {
|
|
|
694
699
|
*/
|
|
695
700
|
get currentTarget(): EventTarget | undefined;
|
|
696
701
|
/**
|
|
697
|
-
* The read-only **`target`** property of the dispatched.
|
|
702
|
+
* The read-only **`target`** property of the Event interface is a reference to the object onto which the event was dispatched. It is different from Event.currentTarget when the event handler is called during the bubbling or capturing phase of the event.
|
|
698
703
|
*
|
|
699
704
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/target)
|
|
700
705
|
*/
|
|
701
706
|
get target(): EventTarget | undefined;
|
|
702
707
|
/**
|
|
703
|
-
* The deprecated **`Event.srcElement`** is an alias for the Event.target property.
|
|
708
|
+
* The deprecated **`Event.srcElement`** is an alias for the Event.target property. Use Event.target instead.
|
|
704
709
|
* @deprecated
|
|
705
710
|
*
|
|
706
711
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/srcElement)
|
|
@@ -713,45 +718,45 @@ declare class Event {
|
|
|
713
718
|
*/
|
|
714
719
|
get timeStamp(): number;
|
|
715
720
|
/**
|
|
716
|
-
* The **`isTrusted`** read-only property of the when the event was generated by the user agent (including via user actions and programmatic methods such as HTMLElement.focus()), and
|
|
721
|
+
* The **`isTrusted`** read-only property of the Event interface is a boolean value that is true when the event was generated by the user agent (including via user actions and programmatic methods such as HTMLElement.focus()), and false when the event was dispatched via EventTarget.dispatchEvent(). The only exception is the click event, which initializes the isTrusted property to false in user agents.
|
|
717
722
|
*
|
|
718
723
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/isTrusted)
|
|
719
724
|
*/
|
|
720
725
|
get isTrusted(): boolean;
|
|
721
726
|
/**
|
|
722
|
-
* The **`cancelBubble`** property of the Event interface is deprecated.
|
|
727
|
+
* The **`cancelBubble`** property of the Event interface is deprecated. Use Event.stopPropagation() instead. Setting its value to true before returning from an event handler prevents propagation of the event. In later implementations, setting this to false does nothing. See Browser compatibility for details.
|
|
723
728
|
* @deprecated
|
|
724
729
|
*
|
|
725
730
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelBubble)
|
|
726
731
|
*/
|
|
727
732
|
get cancelBubble(): boolean;
|
|
728
733
|
/**
|
|
729
|
-
* The **`cancelBubble`** property of the Event interface is deprecated.
|
|
734
|
+
* The **`cancelBubble`** property of the Event interface is deprecated. Use Event.stopPropagation() instead. Setting its value to true before returning from an event handler prevents propagation of the event. In later implementations, setting this to false does nothing. See Browser compatibility for details.
|
|
730
735
|
* @deprecated
|
|
731
736
|
*
|
|
732
737
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelBubble)
|
|
733
738
|
*/
|
|
734
739
|
set cancelBubble(value: boolean);
|
|
735
740
|
/**
|
|
736
|
-
* The **`stopImmediatePropagation()`** method of the
|
|
741
|
+
* The **`stopImmediatePropagation()`** method of the Event interface prevents other listeners of the same event from being called.
|
|
737
742
|
*
|
|
738
743
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopImmediatePropagation)
|
|
739
744
|
*/
|
|
740
745
|
stopImmediatePropagation(): void;
|
|
741
746
|
/**
|
|
742
|
-
* The **`preventDefault()`** method of the Event interface tells the user agent that
|
|
747
|
+
* The **`preventDefault()`** method of the Event interface tells the user agent that the event is being explicitly handled, so its default action, such as page scrolling, link navigation, or pasting text, should not be taken.
|
|
743
748
|
*
|
|
744
749
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/preventDefault)
|
|
745
750
|
*/
|
|
746
751
|
preventDefault(): void;
|
|
747
752
|
/**
|
|
748
|
-
* The **`stopPropagation()`** method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.
|
|
753
|
+
* The **`stopPropagation()`** method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases. It does not, however, prevent any default behaviors from occurring; for instance, clicks on links are still processed. If you want to stop those behaviors, see the preventDefault() method. It also does not prevent propagation to other event-handlers of the current element. If you want to stop those, see stopImmediatePropagation().
|
|
749
754
|
*
|
|
750
755
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopPropagation)
|
|
751
756
|
*/
|
|
752
757
|
stopPropagation(): void;
|
|
753
758
|
/**
|
|
754
|
-
* The **`composedPath()`** method of the Event interface returns the event's path which is an array of the objects on which listeners will be invoked.
|
|
759
|
+
* The **`composedPath()`** method of the Event interface returns the event's path which is an array of the objects on which listeners will be invoked. This does not include nodes in shadow trees if the shadow root was created with its ShadowRoot.mode closed.
|
|
755
760
|
*
|
|
756
761
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composedPath)
|
|
757
762
|
*/
|
|
@@ -772,7 +777,7 @@ interface EventListenerObject<EventType extends Event = Event> {
|
|
|
772
777
|
}
|
|
773
778
|
type EventListenerOrEventListenerObject<EventType extends Event = Event> = EventListener<EventType> | EventListenerObject<EventType>;
|
|
774
779
|
/**
|
|
775
|
-
* The **`EventTarget`** interface is implemented by objects that can receive events and may have listeners for them.
|
|
780
|
+
* The **`EventTarget`** interface is implemented by objects that can receive events and may have listeners for them. In other words, any target of events implements the three methods associated with this interface.
|
|
776
781
|
*
|
|
777
782
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget)
|
|
778
783
|
*/
|
|
@@ -785,13 +790,13 @@ declare class EventTarget<EventMap extends Record<string, Event> = Record<string
|
|
|
785
790
|
*/
|
|
786
791
|
addEventListener<Type extends keyof EventMap>(type: Type, handler: EventListenerOrEventListenerObject<EventMap[Type]>, options?: EventTargetAddEventListenerOptions | boolean): void;
|
|
787
792
|
/**
|
|
788
|
-
* The **`removeEventListener()`** method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target.
|
|
793
|
+
* The **`removeEventListener()`** method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target. The event listener to be removed is identified using a combination of the event type, the event listener function itself, and various optional options that may affect the matching process; see Matching event listeners for removal.
|
|
789
794
|
*
|
|
790
795
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/removeEventListener)
|
|
791
796
|
*/
|
|
792
797
|
removeEventListener<Type extends keyof EventMap>(type: Type, handler: EventListenerOrEventListenerObject<EventMap[Type]>, options?: EventTargetEventListenerOptions | boolean): void;
|
|
793
798
|
/**
|
|
794
|
-
* The **`dispatchEvent()`** method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order.
|
|
799
|
+
* The **`dispatchEvent()`** method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order. The normal event processing rules (including the capturing and optional bubbling phase) also apply to events dispatched manually with dispatchEvent().
|
|
795
800
|
*
|
|
796
801
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/dispatchEvent)
|
|
797
802
|
*/
|
|
@@ -823,7 +828,7 @@ declare class AbortController {
|
|
|
823
828
|
*/
|
|
824
829
|
get signal(): AbortSignal;
|
|
825
830
|
/**
|
|
826
|
-
* The **`abort()`** method of the AbortController interface aborts an asynchronous operation before it has completed.
|
|
831
|
+
* The **`abort()`** method of the AbortController interface aborts an asynchronous operation before it has completed. This is able to abort fetch requests, the consumption of any response bodies, or streams.
|
|
827
832
|
*
|
|
828
833
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortController/abort)
|
|
829
834
|
*/
|
|
@@ -836,7 +841,7 @@ declare class AbortController {
|
|
|
836
841
|
*/
|
|
837
842
|
declare abstract class AbortSignal extends EventTarget {
|
|
838
843
|
/**
|
|
839
|
-
* The **`AbortSignal.abort()`** static method returns an AbortSignal that is already set as aborted (and which does not trigger an
|
|
844
|
+
* The **`AbortSignal.abort()`** static method returns an AbortSignal that is already set as aborted (and which does not trigger an abort event).
|
|
840
845
|
*
|
|
841
846
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_static)
|
|
842
847
|
*/
|
|
@@ -848,13 +853,13 @@ declare abstract class AbortSignal extends EventTarget {
|
|
|
848
853
|
*/
|
|
849
854
|
static timeout(delay: number): AbortSignal;
|
|
850
855
|
/**
|
|
851
|
-
* The **`AbortSignal.any()`** static method takes an iterable of abort signals and returns an AbortSignal.
|
|
856
|
+
* The **`AbortSignal.any()`** static method takes an iterable of abort signals and returns an AbortSignal. The returned abort signal is aborted when any of the input iterable abort signals are aborted. The abort reason will be set to the reason of the first signal that is aborted. If any of the given abort signals are already aborted then so will be the returned AbortSignal.
|
|
852
857
|
*
|
|
853
858
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/any_static)
|
|
854
859
|
*/
|
|
855
860
|
static any(signals: AbortSignal[]): AbortSignal;
|
|
856
861
|
/**
|
|
857
|
-
* The **`aborted`** read-only property returns a value that indicates whether the asynchronous operations the signal is communicating with are aborted (
|
|
862
|
+
* The **`aborted`** read-only property returns a value that indicates whether the asynchronous operations the signal is communicating with are aborted (true) or not (false).
|
|
858
863
|
*
|
|
859
864
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/aborted)
|
|
860
865
|
*/
|
|
@@ -870,12 +875,17 @@ declare abstract class AbortSignal extends EventTarget {
|
|
|
870
875
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_event) */
|
|
871
876
|
set onabort(value: any | null);
|
|
872
877
|
/**
|
|
873
|
-
* The **`throwIfAborted()`** method throws the signal's abort
|
|
878
|
+
* The **`throwIfAborted()`** method throws the signal's abort reason if the signal has been aborted; otherwise it does nothing.
|
|
874
879
|
*
|
|
875
880
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/throwIfAborted)
|
|
876
881
|
*/
|
|
877
882
|
throwIfAborted(): void;
|
|
878
883
|
}
|
|
884
|
+
/**
|
|
885
|
+
* The **`Scheduler`** interface of the Prioritized Task Scheduling API provides methods for scheduling prioritized tasks.
|
|
886
|
+
*
|
|
887
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Scheduler)
|
|
888
|
+
*/
|
|
879
889
|
interface Scheduler {
|
|
880
890
|
wait(delay: number, maybeOptions?: SchedulerWaitOptions): Promise<void>;
|
|
881
891
|
}
|
|
@@ -883,20 +893,20 @@ interface SchedulerWaitOptions {
|
|
|
883
893
|
signal?: AbortSignal;
|
|
884
894
|
}
|
|
885
895
|
/**
|
|
886
|
-
* The **`ExtendableEvent`** interface extends the lifetime of the
|
|
896
|
+
* The **`ExtendableEvent`** interface extends the lifetime of the install and activate events dispatched on the global scope as part of the service worker lifecycle. This ensures that any functional events (like FetchEvent) are not dispatched until it upgrades database schemas and deletes the outdated cache entries.
|
|
887
897
|
*
|
|
888
898
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ExtendableEvent)
|
|
889
899
|
*/
|
|
890
900
|
declare abstract class ExtendableEvent extends Event {
|
|
891
901
|
/**
|
|
892
|
-
* The **`ExtendableEvent.waitUntil()`** method tells the event dispatcher that work is ongoing.
|
|
902
|
+
* The **`ExtendableEvent.waitUntil()`** method tells the event dispatcher that work is ongoing. It can also be used to detect whether that work was successful. In service workers, waitUntil() tells the browser that work is ongoing until the promise settles, and it shouldn't terminate the service worker if it wants that work to complete.
|
|
893
903
|
*
|
|
894
904
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ExtendableEvent/waitUntil)
|
|
895
905
|
*/
|
|
896
906
|
waitUntil(promise: Promise<any>): void;
|
|
897
907
|
}
|
|
898
908
|
/**
|
|
899
|
-
* The **`CustomEvent`** interface
|
|
909
|
+
* The **`CustomEvent`** interface can be used to attach custom data to an event generated by an application.
|
|
900
910
|
*
|
|
901
911
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomEvent)
|
|
902
912
|
*/
|
|
@@ -935,7 +945,7 @@ declare class Blob {
|
|
|
935
945
|
*/
|
|
936
946
|
get type(): string;
|
|
937
947
|
/**
|
|
938
|
-
* The **`slice()`** method of the Blob interface creates and returns a new
|
|
948
|
+
* The **`slice()`** method of the Blob interface creates and returns a new Blob object which contains data from a subset of the blob on which it's called.
|
|
939
949
|
*
|
|
940
950
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice)
|
|
941
951
|
*/
|
|
@@ -953,13 +963,13 @@ declare class Blob {
|
|
|
953
963
|
*/
|
|
954
964
|
bytes(): Promise<Uint8Array>;
|
|
955
965
|
/**
|
|
956
|
-
* The **`text()`** method of the string containing the contents of the blob, interpreted as UTF-8.
|
|
966
|
+
* The **`text()`** method of the Blob interface returns a Promise that resolves with a string containing the contents of the blob, interpreted as UTF-8.
|
|
957
967
|
*
|
|
958
968
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text)
|
|
959
969
|
*/
|
|
960
970
|
text(): Promise<string>;
|
|
961
971
|
/**
|
|
962
|
-
* The **`stream()`** method of the Blob interface returns a ReadableStream which upon reading returns the data contained within the
|
|
972
|
+
* The **`stream()`** method of the Blob interface returns a ReadableStream which upon reading returns the data contained within the Blob.
|
|
963
973
|
*
|
|
964
974
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/stream)
|
|
965
975
|
*/
|
|
@@ -976,13 +986,13 @@ interface BlobOptions {
|
|
|
976
986
|
declare class File extends Blob {
|
|
977
987
|
constructor(bits: ((ArrayBuffer | ArrayBufferView) | string | Blob)[] | undefined, name: string, options?: FileOptions);
|
|
978
988
|
/**
|
|
979
|
-
* The **`name`** read-only property of the File interface returns the name of the file represented by a File object.
|
|
989
|
+
* The **`name`** read-only property of the File interface returns the name of the file represented by a File object. For security reasons, the path is excluded from this property.
|
|
980
990
|
*
|
|
981
991
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/name)
|
|
982
992
|
*/
|
|
983
993
|
get name(): string;
|
|
984
994
|
/**
|
|
985
|
-
* The **`lastModified`** read-only property of the File interface provides the last modified date of the file as the number of milliseconds since the Unix epoch (January 1, 1970 at midnight).
|
|
995
|
+
* The **`lastModified`** read-only property of the File interface provides the last modified date of the file as the number of milliseconds since the Unix epoch (January 1, 1970 at midnight). Files without a known last modified date return the current date.
|
|
986
996
|
*
|
|
987
997
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/lastModified)
|
|
988
998
|
*/
|
|
@@ -999,7 +1009,7 @@ interface FileOptions {
|
|
|
999
1009
|
*/
|
|
1000
1010
|
declare abstract class CacheStorage {
|
|
1001
1011
|
/**
|
|
1002
|
-
* The **`open()`** method of the the Cache object matching the
|
|
1012
|
+
* The **`open()`** method of the CacheStorage interface returns a Promise that resolves to the Cache object matching the cacheName.
|
|
1003
1013
|
*
|
|
1004
1014
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CacheStorage/open)
|
|
1005
1015
|
*/
|
|
@@ -1032,14 +1042,14 @@ interface CacheQueryOptions {
|
|
|
1032
1042
|
*/
|
|
1033
1043
|
declare abstract class Crypto {
|
|
1034
1044
|
/**
|
|
1035
|
-
* The **`Crypto.subtle`** read-only property returns a cryptographic operations.
|
|
1045
|
+
* The **`Crypto.subtle`** read-only property returns a SubtleCrypto which can then be used to perform low-level cryptographic operations.
|
|
1036
1046
|
* Available only in secure contexts.
|
|
1037
1047
|
*
|
|
1038
1048
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/subtle)
|
|
1039
1049
|
*/
|
|
1040
1050
|
get subtle(): SubtleCrypto;
|
|
1041
1051
|
/**
|
|
1042
|
-
* The **`Crypto.getRandomValues()`** method lets you get cryptographically strong random values.
|
|
1052
|
+
* The **`Crypto.getRandomValues()`** method lets you get cryptographically strong random values. The array given as the parameter is filled with random numbers (random in its cryptographic meaning).
|
|
1043
1053
|
*
|
|
1044
1054
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/getRandomValues)
|
|
1045
1055
|
*/
|
|
@@ -1067,7 +1077,7 @@ declare abstract class SubtleCrypto {
|
|
|
1067
1077
|
*/
|
|
1068
1078
|
encrypt(algorithm: string | SubtleCryptoEncryptAlgorithm, key: CryptoKey, plainText: ArrayBuffer | ArrayBufferView): Promise<ArrayBuffer>;
|
|
1069
1079
|
/**
|
|
1070
|
-
* The **`decrypt()`** method of the SubtleCrypto interface decrypts some encrypted data.
|
|
1080
|
+
* The **`decrypt()`** method of the SubtleCrypto interface decrypts some encrypted data. It takes as arguments a key to decrypt with, some optional extra parameters, and the data to decrypt (also known as "ciphertext"). It returns a Promise which will be fulfilled with the decrypted data (also known as "plaintext").
|
|
1071
1081
|
*
|
|
1072
1082
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/decrypt)
|
|
1073
1083
|
*/
|
|
@@ -1085,7 +1095,7 @@ declare abstract class SubtleCrypto {
|
|
|
1085
1095
|
*/
|
|
1086
1096
|
verify(algorithm: string | SubtleCryptoSignAlgorithm, key: CryptoKey, signature: ArrayBuffer | ArrayBufferView, data: ArrayBuffer | ArrayBufferView): Promise<boolean>;
|
|
1087
1097
|
/**
|
|
1088
|
-
* The **`digest()`** method of the SubtleCrypto interface generates a
|
|
1098
|
+
* The **`digest()`** method of the SubtleCrypto interface generates a digest of the given data, using the specified hash function. A digest is a short fixed-length value derived from some variable-length input. Cryptographic digests should exhibit collision-resistance, meaning that it's hard to come up with two different inputs that have the same digest value.
|
|
1089
1099
|
*
|
|
1090
1100
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/digest)
|
|
1091
1101
|
*/
|
|
@@ -1103,7 +1113,7 @@ declare abstract class SubtleCrypto {
|
|
|
1103
1113
|
*/
|
|
1104
1114
|
deriveKey(algorithm: string | SubtleCryptoDeriveKeyAlgorithm, baseKey: CryptoKey, derivedKeyAlgorithm: string | SubtleCryptoImportKeyAlgorithm, extractable: boolean, keyUsages: string[]): Promise<CryptoKey>;
|
|
1105
1115
|
/**
|
|
1106
|
-
* The **`deriveBits()`** method of the key.
|
|
1116
|
+
* The **`deriveBits()`** method of the SubtleCrypto interface can be used to derive an array of bits from a base key.
|
|
1107
1117
|
*
|
|
1108
1118
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveBits)
|
|
1109
1119
|
*/
|
|
@@ -1121,13 +1131,13 @@ declare abstract class SubtleCrypto {
|
|
|
1121
1131
|
*/
|
|
1122
1132
|
exportKey(format: string, key: CryptoKey): Promise<ArrayBuffer | JsonWebKey>;
|
|
1123
1133
|
/**
|
|
1124
|
-
* The **`wrapKey()`** method of the SubtleCrypto interface
|
|
1134
|
+
* The **`wrapKey()`** method of the SubtleCrypto interface "wraps" a key. This means that it exports the key in an external, portable format, then encrypts the exported key. Wrapping a key helps protect it in untrusted environments, such as inside an otherwise unprotected data store or in transmission over an unprotected network.
|
|
1125
1135
|
*
|
|
1126
1136
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/wrapKey)
|
|
1127
1137
|
*/
|
|
1128
1138
|
wrapKey(format: string, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: string | SubtleCryptoEncryptAlgorithm): Promise<ArrayBuffer>;
|
|
1129
1139
|
/**
|
|
1130
|
-
* The **`unwrapKey()`** method of the SubtleCrypto interface
|
|
1140
|
+
* The **`unwrapKey()`** method of the SubtleCrypto interface "unwraps" a key. This means that it takes as its input a key that has been exported and then encrypted (also called "wrapped"). It decrypts the key and then imports it, returning a CryptoKey object that can be used in the Web Crypto API.
|
|
1131
1141
|
*
|
|
1132
1142
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/unwrapKey)
|
|
1133
1143
|
*/
|
|
@@ -1135,20 +1145,20 @@ declare abstract class SubtleCrypto {
|
|
|
1135
1145
|
timingSafeEqual(a: ArrayBuffer | ArrayBufferView, b: ArrayBuffer | ArrayBufferView): boolean;
|
|
1136
1146
|
}
|
|
1137
1147
|
/**
|
|
1138
|
-
* The **`CryptoKey`** interface of the Web Crypto API represents a cryptographic key obtained from one of the SubtleCrypto methods
|
|
1148
|
+
* The **`CryptoKey`** interface of the Web Crypto API represents a cryptographic key obtained from one of the SubtleCrypto methods generateKey(), deriveKey(), importKey(), or unwrapKey().
|
|
1139
1149
|
* Available only in secure contexts.
|
|
1140
1150
|
*
|
|
1141
1151
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey)
|
|
1142
1152
|
*/
|
|
1143
1153
|
declare abstract class CryptoKey {
|
|
1144
1154
|
/**
|
|
1145
|
-
* The read-only **`type`** property of the CryptoKey interface indicates which kind of key is represented by the object.
|
|
1155
|
+
* The read-only **`type`** property of the CryptoKey interface indicates which kind of key is represented by the object. It can have the following values:
|
|
1146
1156
|
*
|
|
1147
1157
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/type)
|
|
1148
1158
|
*/
|
|
1149
1159
|
readonly type: string;
|
|
1150
1160
|
/**
|
|
1151
|
-
* The read-only **`extractable`** property of the CryptoKey interface indicates whether or not the key may be extracted using
|
|
1161
|
+
* The read-only **`extractable`** property of the CryptoKey interface indicates whether or not the key may be extracted using SubtleCrypto.exportKey() or SubtleCrypto.wrapKey().
|
|
1152
1162
|
*
|
|
1153
1163
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/extractable)
|
|
1154
1164
|
*/
|
|
@@ -1265,12 +1275,15 @@ interface CryptoKeyArbitraryKeyAlgorithm {
|
|
|
1265
1275
|
length?: number;
|
|
1266
1276
|
}
|
|
1267
1277
|
declare class DigestStream extends WritableStream<ArrayBuffer | ArrayBufferView> {
|
|
1268
|
-
constructor(algorithm: string | SubtleCryptoHashAlgorithm);
|
|
1278
|
+
constructor(algorithm: string | SubtleCryptoHashAlgorithm, options?: DigestStreamOptions);
|
|
1269
1279
|
readonly digest: Promise<ArrayBuffer>;
|
|
1270
1280
|
get bytesWritten(): number | bigint;
|
|
1271
1281
|
}
|
|
1282
|
+
interface DigestStreamOptions {
|
|
1283
|
+
toWellFormed?: boolean;
|
|
1284
|
+
}
|
|
1272
1285
|
/**
|
|
1273
|
-
* The **`TextDecoder`** interface represents a decoder for a specific text encoding, such as
|
|
1286
|
+
* The **`TextDecoder`** interface represents a decoder for a specific text encoding, such as UTF-8, ISO-8859-2, or GBK. A decoder takes an array of bytes as input and returns a JavaScript string.
|
|
1274
1287
|
*
|
|
1275
1288
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoder)
|
|
1276
1289
|
*/
|
|
@@ -1287,20 +1300,20 @@ declare class TextDecoder {
|
|
|
1287
1300
|
get ignoreBOM(): boolean;
|
|
1288
1301
|
}
|
|
1289
1302
|
/**
|
|
1290
|
-
* The **`TextEncoder`** interface
|
|
1303
|
+
* The **`TextEncoder`** interface enables you to encode a JavaScript string using UTF-8.
|
|
1291
1304
|
*
|
|
1292
1305
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder)
|
|
1293
1306
|
*/
|
|
1294
1307
|
declare class TextEncoder {
|
|
1295
1308
|
constructor();
|
|
1296
1309
|
/**
|
|
1297
|
-
* The **`TextEncoder.encode()`** method takes a string as input, and returns a
|
|
1310
|
+
* The **`TextEncoder.encode()`** method takes a string as input, and returns a Uint8Array containing the string encoded using UTF-8.
|
|
1298
1311
|
*
|
|
1299
1312
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder/encode)
|
|
1300
1313
|
*/
|
|
1301
1314
|
encode(input?: string): Uint8Array;
|
|
1302
1315
|
/**
|
|
1303
|
-
* The **`TextEncoder.encodeInto()`** method takes a string to encode and a destination Uint8Array to put resulting UTF-8 encoded text into, and returns
|
|
1316
|
+
* The **`TextEncoder.encodeInto()`** method takes a string to encode and a destination Uint8Array to put resulting UTF-8 encoded text into, and returns an object indicating the progress of the encoding. This is potentially more performant than the encode() method — especially when the target buffer is a view into a Wasm heap.
|
|
1304
1317
|
*
|
|
1305
1318
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder/encodeInto)
|
|
1306
1319
|
*/
|
|
@@ -1357,6 +1370,9 @@ declare class ErrorEvent extends Event {
|
|
|
1357
1370
|
get error(): any;
|
|
1358
1371
|
}
|
|
1359
1372
|
interface ErrorEventErrorEventInit {
|
|
1373
|
+
bubbles?: boolean;
|
|
1374
|
+
cancelable?: boolean;
|
|
1375
|
+
composed?: boolean;
|
|
1360
1376
|
message?: string;
|
|
1361
1377
|
filename?: string;
|
|
1362
1378
|
lineno?: number;
|
|
@@ -1369,135 +1385,139 @@ interface ErrorEventErrorEventInit {
|
|
|
1369
1385
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent)
|
|
1370
1386
|
*/
|
|
1371
1387
|
declare class MessageEvent extends Event {
|
|
1372
|
-
constructor(type: string, initializer
|
|
1388
|
+
constructor(type: string, initializer?: MessageEventInit);
|
|
1373
1389
|
/**
|
|
1374
|
-
* The **`data`** read-only property of the
|
|
1390
|
+
* The **`data`** read-only property of the MessageEvent interface represents the data sent by the message emitter.
|
|
1375
1391
|
*
|
|
1376
1392
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/data)
|
|
1377
1393
|
*/
|
|
1378
1394
|
readonly data: any;
|
|
1379
1395
|
/**
|
|
1380
|
-
* The **`origin`** read-only property of the origin of the message emitter.
|
|
1396
|
+
* The **`origin`** read-only property of the MessageEvent interface is a string representing the origin of the message emitter.
|
|
1381
1397
|
*
|
|
1382
1398
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/origin)
|
|
1383
1399
|
*/
|
|
1384
1400
|
readonly origin: string | null;
|
|
1385
1401
|
/**
|
|
1386
|
-
* The **`lastEventId`** read-only property of the unique ID for the event.
|
|
1402
|
+
* The **`lastEventId`** read-only property of the MessageEvent interface is a string representing a unique ID for the event.
|
|
1387
1403
|
*
|
|
1388
1404
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/lastEventId)
|
|
1389
1405
|
*/
|
|
1390
1406
|
readonly lastEventId: string;
|
|
1391
1407
|
/**
|
|
1392
|
-
* The **`source`** read-only property of the
|
|
1408
|
+
* The **`source`** read-only property of the MessageEvent interface is a MessageEventSource (which can be a WindowProxy, MessagePort, or ServiceWorker object) representing the message emitter.
|
|
1393
1409
|
*
|
|
1394
1410
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/source)
|
|
1395
1411
|
*/
|
|
1396
1412
|
readonly source: MessagePort | null;
|
|
1397
1413
|
/**
|
|
1398
|
-
* The **`ports`** read-only property of the containing all MessagePort objects sent with the message, in order.
|
|
1414
|
+
* The **`ports`** read-only property of the MessageEvent interface is an array of MessagePort objects containing all MessagePort objects sent with the message, in order.
|
|
1399
1415
|
*
|
|
1400
1416
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/ports)
|
|
1401
1417
|
*/
|
|
1402
1418
|
readonly ports: MessagePort[];
|
|
1403
1419
|
}
|
|
1404
1420
|
interface MessageEventInit {
|
|
1405
|
-
|
|
1421
|
+
bubbles?: boolean;
|
|
1422
|
+
cancelable?: boolean;
|
|
1423
|
+
composed?: boolean;
|
|
1424
|
+
data?: any;
|
|
1425
|
+
origin?: string;
|
|
1426
|
+
lastEventId?: string;
|
|
1427
|
+
source?: MessagePort;
|
|
1428
|
+
ports?: MessagePort[];
|
|
1406
1429
|
}
|
|
1407
1430
|
/**
|
|
1408
|
-
* The **`PromiseRejectionEvent`** interface represents events which are sent to the global script context when JavaScript Promises are rejected.
|
|
1431
|
+
* The **`PromiseRejectionEvent`** interface represents events which are sent to the global script context when JavaScript Promises are rejected. These events are particularly useful for telemetry and debugging purposes.
|
|
1409
1432
|
*
|
|
1410
1433
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent)
|
|
1411
1434
|
*/
|
|
1412
1435
|
declare abstract class PromiseRejectionEvent extends Event {
|
|
1413
1436
|
/**
|
|
1414
|
-
* The PromiseRejectionEvent interface's **`promise`** read-only property indicates the JavaScript rejected.
|
|
1437
|
+
* The PromiseRejectionEvent interface's **`promise`** read-only property indicates the JavaScript Promise which was rejected. You can examine the event's PromiseRejectionEvent.reason property to learn why the promise was rejected.
|
|
1415
1438
|
*
|
|
1416
1439
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/promise)
|
|
1417
1440
|
*/
|
|
1418
1441
|
readonly promise: Promise<any>;
|
|
1419
1442
|
/**
|
|
1420
|
-
* The PromiseRejectionEvent **`reason`** read-only property is any JavaScript value or Object which provides the reason passed into Promise.reject().
|
|
1443
|
+
* The PromiseRejectionEvent **`reason`** read-only property is any JavaScript value or Object which provides the reason passed into Promise.reject(). This in theory provides information about why the promise was rejected.
|
|
1421
1444
|
*
|
|
1422
1445
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/reason)
|
|
1423
1446
|
*/
|
|
1424
1447
|
readonly reason: any;
|
|
1425
1448
|
}
|
|
1426
1449
|
/**
|
|
1427
|
-
* The **`FormData`** interface provides a way to construct a set of key/value pairs representing form fields and their values, which can be sent using the
|
|
1450
|
+
* The **`FormData`** interface provides a way to construct a set of key/value pairs representing form fields and their values, which can be sent using the fetch(), XMLHttpRequest.send() or navigator.sendBeacon() methods. It uses the same format a form would use if the encoding type were set to "multipart/form-data".
|
|
1428
1451
|
*
|
|
1429
1452
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData)
|
|
1430
1453
|
*/
|
|
1431
1454
|
declare class FormData {
|
|
1432
1455
|
constructor();
|
|
1433
1456
|
/**
|
|
1434
|
-
* The **`append()`** method of the FormData interface appends a new value onto an existing key inside a
|
|
1457
|
+
* The **`append()`** method of the FormData interface appends a new value onto an existing key inside a FormData object, or adds the key if it does not already exist.
|
|
1435
1458
|
*
|
|
1436
1459
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/append)
|
|
1437
1460
|
*/
|
|
1438
1461
|
append(name: string, value: string | Blob): void;
|
|
1439
1462
|
/**
|
|
1440
|
-
* The **`append()`** method of the FormData interface appends a new value onto an existing key inside a
|
|
1463
|
+
* The **`append()`** method of the FormData interface appends a new value onto an existing key inside a FormData object, or adds the key if it does not already exist.
|
|
1441
1464
|
*
|
|
1442
1465
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/append)
|
|
1443
1466
|
*/
|
|
1444
1467
|
append(name: string, value: string): void;
|
|
1445
1468
|
/**
|
|
1446
|
-
* The **`append()`** method of the FormData interface appends a new value onto an existing key inside a
|
|
1469
|
+
* The **`append()`** method of the FormData interface appends a new value onto an existing key inside a FormData object, or adds the key if it does not already exist.
|
|
1447
1470
|
*
|
|
1448
1471
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/append)
|
|
1449
1472
|
*/
|
|
1450
1473
|
append(name: string, value: Blob, filename?: string): void;
|
|
1451
1474
|
/**
|
|
1452
|
-
* The **`delete()`** method of the FormData interface deletes a key and its value(s) from a
|
|
1475
|
+
* The **`delete()`** method of the FormData interface deletes a key and its value(s) from a FormData object.
|
|
1453
1476
|
*
|
|
1454
1477
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/delete)
|
|
1455
1478
|
*/
|
|
1456
1479
|
delete(name: string): void;
|
|
1457
1480
|
/**
|
|
1458
|
-
* The **`get()`** method of the FormData interface returns the first value associated with a given key from within a
|
|
1481
|
+
* The **`get()`** method of the FormData interface returns the first value associated with a given key from within a FormData object. If you expect multiple values and want all of them, use the getAll() method instead.
|
|
1459
1482
|
*
|
|
1460
1483
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/get)
|
|
1461
1484
|
*/
|
|
1462
1485
|
get(name: string): (File | string) | null;
|
|
1463
1486
|
/**
|
|
1464
|
-
* The **`getAll()`** method of the FormData interface returns all the values associated with a given key from within a
|
|
1487
|
+
* The **`getAll()`** method of the FormData interface returns all the values associated with a given key from within a FormData object.
|
|
1465
1488
|
*
|
|
1466
1489
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/getAll)
|
|
1467
1490
|
*/
|
|
1468
1491
|
getAll(name: string): (File | string)[];
|
|
1469
1492
|
/**
|
|
1470
|
-
* The **`has()`** method of the FormData interface returns whether a
|
|
1493
|
+
* The **`has()`** method of the FormData interface returns whether a FormData object contains a certain key.
|
|
1471
1494
|
*
|
|
1472
1495
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/has)
|
|
1473
1496
|
*/
|
|
1474
1497
|
has(name: string): boolean;
|
|
1475
1498
|
/**
|
|
1476
|
-
* The **`set()`** method of the FormData interface sets a new value for an existing key inside a
|
|
1499
|
+
* The **`set()`** method of the FormData interface sets a new value for an existing key inside a FormData object, or adds the key/value if it does not already exist.
|
|
1477
1500
|
*
|
|
1478
1501
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/set)
|
|
1479
1502
|
*/
|
|
1480
1503
|
set(name: string, value: string | Blob): void;
|
|
1481
1504
|
/**
|
|
1482
|
-
* The **`set()`** method of the FormData interface sets a new value for an existing key inside a
|
|
1505
|
+
* The **`set()`** method of the FormData interface sets a new value for an existing key inside a FormData object, or adds the key/value if it does not already exist.
|
|
1483
1506
|
*
|
|
1484
1507
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/set)
|
|
1485
1508
|
*/
|
|
1486
1509
|
set(name: string, value: string): void;
|
|
1487
1510
|
/**
|
|
1488
|
-
* The **`set()`** method of the FormData interface sets a new value for an existing key inside a
|
|
1511
|
+
* The **`set()`** method of the FormData interface sets a new value for an existing key inside a FormData object, or adds the key/value if it does not already exist.
|
|
1489
1512
|
*
|
|
1490
1513
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/set)
|
|
1491
1514
|
*/
|
|
1492
1515
|
set(name: string, value: Blob, filename?: string): void;
|
|
1493
|
-
/* Returns an array of key, value pairs for every entry in the list. */
|
|
1494
1516
|
entries(): IterableIterator<[
|
|
1495
1517
|
key: string,
|
|
1496
1518
|
value: File | string
|
|
1497
1519
|
]>;
|
|
1498
|
-
/* Returns a list of keys in the list. */
|
|
1499
1520
|
keys(): IterableIterator<string>;
|
|
1500
|
-
/* Returns a list of values in the list. */
|
|
1501
1521
|
values(): IterableIterator<(File | string)>;
|
|
1502
1522
|
forEach<This = unknown>(callback: (this: This, value: File | string, key: string, parent: FormData) => void, thisArg?: This): void;
|
|
1503
1523
|
[Symbol.iterator](): IterableIterator<[
|
|
@@ -1576,19 +1596,19 @@ interface DocumentEnd {
|
|
|
1576
1596
|
append(content: string, options?: ContentOptions): DocumentEnd;
|
|
1577
1597
|
}
|
|
1578
1598
|
/**
|
|
1579
|
-
* This is the event type for
|
|
1599
|
+
* This is the event type for fetch events dispatched on the service worker global scope. It contains information about the fetch, including the request and how the receiver will treat the response. It provides the event.respondWith() method, which allows us to provide a response to this fetch.
|
|
1580
1600
|
*
|
|
1581
1601
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent)
|
|
1582
1602
|
*/
|
|
1583
1603
|
declare abstract class FetchEvent extends ExtendableEvent {
|
|
1584
1604
|
/**
|
|
1585
|
-
* The **`request`** read-only property of the the event handler.
|
|
1605
|
+
* The **`request`** read-only property of the FetchEvent interface returns the Request that triggered the event handler.
|
|
1586
1606
|
*
|
|
1587
1607
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/request)
|
|
1588
1608
|
*/
|
|
1589
1609
|
readonly request: Request;
|
|
1590
1610
|
/**
|
|
1591
|
-
* The **`respondWith()`** method of allows you to provide a promise for a Response yourself.
|
|
1611
|
+
* The **`respondWith()`** method of FetchEvent prevents the browser's default fetch handling, and allows you to provide a promise for a Response yourself.
|
|
1592
1612
|
*
|
|
1593
1613
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/respondWith)
|
|
1594
1614
|
*/
|
|
@@ -1597,58 +1617,55 @@ declare abstract class FetchEvent extends ExtendableEvent {
|
|
|
1597
1617
|
}
|
|
1598
1618
|
type HeadersInit = Headers | Iterable<Iterable<string>> | Record<string, string>;
|
|
1599
1619
|
/**
|
|
1600
|
-
* The **`Headers`** interface of the Fetch API allows you to perform various actions on HTTP request and response headers.
|
|
1620
|
+
* The **`Headers`** interface of the Fetch API allows you to perform various actions on HTTP request and response headers. These actions include retrieving, setting, adding to, and removing headers from the list of the request's headers.
|
|
1601
1621
|
*
|
|
1602
1622
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers)
|
|
1603
1623
|
*/
|
|
1604
1624
|
declare class Headers {
|
|
1605
1625
|
constructor(init?: HeadersInit);
|
|
1606
1626
|
/**
|
|
1607
|
-
* The **`get()`** method of the Headers interface returns a byte string of all the values of a header within a
|
|
1627
|
+
* The **`get()`** method of the Headers interface returns a byte string of all the values of a header within a Headers object with a given name. If the requested header doesn't exist in the Headers object, it returns null.
|
|
1608
1628
|
*
|
|
1609
1629
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/get)
|
|
1610
1630
|
*/
|
|
1611
1631
|
get(name: string): string | null;
|
|
1612
1632
|
getAll(name: string): string[];
|
|
1613
1633
|
/**
|
|
1614
|
-
* The **`getSetCookie()`** method of the Headers interface returns an array containing the values of all Set-Cookie headers associated with a response.
|
|
1634
|
+
* The **`getSetCookie()`** method of the Headers interface returns an array containing the values of all Set-Cookie headers associated with a response. This allows Headers objects to handle having multiple Set-Cookie headers, which wasn't possible prior to its implementation.
|
|
1615
1635
|
*
|
|
1616
1636
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/getSetCookie)
|
|
1617
1637
|
*/
|
|
1618
1638
|
getSetCookie(): string[];
|
|
1619
1639
|
/**
|
|
1620
|
-
* The **`has()`** method of the Headers interface returns a boolean stating whether a
|
|
1640
|
+
* The **`has()`** method of the Headers interface returns a boolean stating whether a Headers object contains a certain header.
|
|
1621
1641
|
*
|
|
1622
1642
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/has)
|
|
1623
1643
|
*/
|
|
1624
1644
|
has(name: string): boolean;
|
|
1625
1645
|
/**
|
|
1626
|
-
* The **`set()`** method of the Headers interface sets a new value for an existing header inside a
|
|
1646
|
+
* The **`set()`** method of the Headers interface sets a new value for an existing header inside a Headers object, or adds the header if it does not already exist.
|
|
1627
1647
|
*
|
|
1628
1648
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/set)
|
|
1629
1649
|
*/
|
|
1630
1650
|
set(name: string, value: string): void;
|
|
1631
1651
|
/**
|
|
1632
|
-
* The **`append()`** method of the Headers interface appends a new value onto an existing header inside a
|
|
1652
|
+
* The **`append()`** method of the Headers interface appends a new value onto an existing header inside a Headers object, or adds the header if it does not already exist.
|
|
1633
1653
|
*
|
|
1634
1654
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/append)
|
|
1635
1655
|
*/
|
|
1636
1656
|
append(name: string, value: string): void;
|
|
1637
1657
|
/**
|
|
1638
|
-
* The **`delete()`** method of the Headers interface deletes a header from the current
|
|
1658
|
+
* The **`delete()`** method of the Headers interface deletes a header from the current Headers object.
|
|
1639
1659
|
*
|
|
1640
1660
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/delete)
|
|
1641
1661
|
*/
|
|
1642
1662
|
delete(name: string): void;
|
|
1643
1663
|
forEach<This = unknown>(callback: (this: This, value: string, key: string, parent: Headers) => void, thisArg?: This): void;
|
|
1644
|
-
/* Returns an iterator allowing to go through all key/value pairs contained in this object. */
|
|
1645
1664
|
entries(): IterableIterator<[
|
|
1646
1665
|
key: string,
|
|
1647
1666
|
value: string
|
|
1648
1667
|
]>;
|
|
1649
|
-
/* Returns an iterator allowing to go through all keys of the key/value pairs contained in this object. */
|
|
1650
1668
|
keys(): IterableIterator<string>;
|
|
1651
|
-
/* Returns an iterator allowing to go through all values of the key/value pairs contained in this object. */
|
|
1652
1669
|
values(): IterableIterator<string>;
|
|
1653
1670
|
[Symbol.iterator](): IterableIterator<[
|
|
1654
1671
|
key: string,
|
|
@@ -1711,7 +1728,7 @@ interface Response extends Body {
|
|
|
1711
1728
|
*/
|
|
1712
1729
|
statusText: string;
|
|
1713
1730
|
/**
|
|
1714
|
-
* The **`headers`** read-only property of the with the response.
|
|
1731
|
+
* The **`headers`** read-only property of the Response interface contains the Headers object associated with the response.
|
|
1715
1732
|
*
|
|
1716
1733
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/headers)
|
|
1717
1734
|
*/
|
|
@@ -1729,7 +1746,7 @@ interface Response extends Body {
|
|
|
1729
1746
|
*/
|
|
1730
1747
|
redirected: boolean;
|
|
1731
1748
|
/**
|
|
1732
|
-
* The **`url`** read-only property of the Response interface contains the URL of the response.
|
|
1749
|
+
* The **`url`** read-only property of the Response interface contains the URL of the response. The value of the url property will be the final URL obtained after any redirects.
|
|
1733
1750
|
*
|
|
1734
1751
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/url)
|
|
1735
1752
|
*/
|
|
@@ -1737,7 +1754,7 @@ interface Response extends Body {
|
|
|
1737
1754
|
webSocket: WebSocket | null;
|
|
1738
1755
|
cf: any | undefined;
|
|
1739
1756
|
/**
|
|
1740
|
-
* The **`type`** read-only property of the Response interface contains the type of the response.
|
|
1757
|
+
* The **`type`** read-only property of the Response interface contains the type of the response. The type determines whether scripts are able to access the response body and headers.
|
|
1741
1758
|
*
|
|
1742
1759
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/type)
|
|
1743
1760
|
*/
|
|
@@ -1768,13 +1785,13 @@ declare var Request: {
|
|
|
1768
1785
|
*/
|
|
1769
1786
|
interface Request<CfHostMetadata = unknown, Cf = CfProperties<CfHostMetadata>> extends Body {
|
|
1770
1787
|
/**
|
|
1771
|
-
* The **`clone()`** method of the Request interface creates a copy of the current
|
|
1788
|
+
* The **`clone()`** method of the Request interface creates a copy of the current Request object.
|
|
1772
1789
|
*
|
|
1773
1790
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/clone)
|
|
1774
1791
|
*/
|
|
1775
1792
|
clone(): Request<CfHostMetadata, Cf>;
|
|
1776
1793
|
/**
|
|
1777
|
-
* The **`method`** read-only property of the
|
|
1794
|
+
* The **`method`** read-only property of the Request interface contains the request's method (GET, POST, etc.)
|
|
1778
1795
|
*
|
|
1779
1796
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/method)
|
|
1780
1797
|
*/
|
|
@@ -1786,7 +1803,7 @@ interface Request<CfHostMetadata = unknown, Cf = CfProperties<CfHostMetadata>> e
|
|
|
1786
1803
|
*/
|
|
1787
1804
|
url: string;
|
|
1788
1805
|
/**
|
|
1789
|
-
* The **`headers`** read-only property of the with the request.
|
|
1806
|
+
* The **`headers`** read-only property of the Request interface contains the Headers object associated with the request.
|
|
1790
1807
|
*
|
|
1791
1808
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/headers)
|
|
1792
1809
|
*/
|
|
@@ -1812,13 +1829,13 @@ interface Request<CfHostMetadata = unknown, Cf = CfProperties<CfHostMetadata>> e
|
|
|
1812
1829
|
*/
|
|
1813
1830
|
integrity: string;
|
|
1814
1831
|
/**
|
|
1815
|
-
* The **`keepalive`** read-only property of the Request interface contains the request's
|
|
1832
|
+
* The **`keepalive`** read-only property of the Request interface contains the request's keepalive setting (true or false), which indicates whether the browser will keep the associated request alive if the page that initiated it is unloaded before the request is complete.
|
|
1816
1833
|
*
|
|
1817
1834
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/keepalive)
|
|
1818
1835
|
*/
|
|
1819
1836
|
keepalive: boolean;
|
|
1820
1837
|
/**
|
|
1821
|
-
* The **`cache`** read-only property of the Request interface contains the cache mode of the request.
|
|
1838
|
+
* The **`cache`** read-only property of the Request interface contains the cache mode of the request. It controls how the request will interact with the browser's HTTP cache.
|
|
1822
1839
|
*
|
|
1823
1840
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/cache)
|
|
1824
1841
|
*/
|
|
@@ -2207,7 +2224,7 @@ type ReadableStreamReadResult<R = any> = {
|
|
|
2207
2224
|
value?: undefined;
|
|
2208
2225
|
};
|
|
2209
2226
|
/**
|
|
2210
|
-
* The
|
|
2227
|
+
* The **`ReadableStream`** interface of the Streams API represents a readable stream of byte data. The Fetch API offers a concrete instance of a ReadableStream through the body property of a Response object.
|
|
2211
2228
|
*
|
|
2212
2229
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream)
|
|
2213
2230
|
*/
|
|
@@ -2225,13 +2242,13 @@ interface ReadableStream<R = any> {
|
|
|
2225
2242
|
*/
|
|
2226
2243
|
cancel(reason?: any): Promise<void>;
|
|
2227
2244
|
/**
|
|
2228
|
-
* The **`getReader()`** method of the ReadableStream interface creates a reader and locks the stream to it.
|
|
2245
|
+
* The **`getReader()`** method of the ReadableStream interface creates a reader and locks the stream to it. While the stream is locked, no other reader can be acquired until this one is released.
|
|
2229
2246
|
*
|
|
2230
2247
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/getReader)
|
|
2231
2248
|
*/
|
|
2232
2249
|
getReader(): ReadableStreamDefaultReader<R>;
|
|
2233
2250
|
/**
|
|
2234
|
-
* The **`getReader()`** method of the ReadableStream interface creates a reader and locks the stream to it.
|
|
2251
|
+
* The **`getReader()`** method of the ReadableStream interface creates a reader and locks the stream to it. While the stream is locked, no other reader can be acquired until this one is released.
|
|
2235
2252
|
*
|
|
2236
2253
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/getReader)
|
|
2237
2254
|
*/
|
|
@@ -2243,13 +2260,13 @@ interface ReadableStream<R = any> {
|
|
|
2243
2260
|
*/
|
|
2244
2261
|
pipeThrough<T>(transform: ReadableWritablePair<T, R>, options?: StreamPipeOptions): ReadableStream<T>;
|
|
2245
2262
|
/**
|
|
2246
|
-
* The **`pipeTo()`** method of the ReadableStream interface pipes the current
|
|
2263
|
+
* The **`pipeTo()`** method of the ReadableStream interface pipes the current ReadableStream to a given WritableStream and returns a Promise that fulfills when the piping process completes successfully, or rejects if any errors were encountered.
|
|
2247
2264
|
*
|
|
2248
2265
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeTo)
|
|
2249
2266
|
*/
|
|
2250
2267
|
pipeTo(destination: WritableStream<R>, options?: StreamPipeOptions): Promise<void>;
|
|
2251
2268
|
/**
|
|
2252
|
-
* The **`tee()`** method of the two-element array containing the two resulting branches as new ReadableStream instances.
|
|
2269
|
+
* The **`tee()`** method of the ReadableStream interface tees the current readable stream, returning a two-element array containing the two resulting branches as new ReadableStream instances.
|
|
2253
2270
|
*
|
|
2254
2271
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/tee)
|
|
2255
2272
|
*/
|
|
@@ -2261,7 +2278,7 @@ interface ReadableStream<R = any> {
|
|
|
2261
2278
|
[Symbol.asyncIterator](options?: ReadableStreamValuesOptions): AsyncIterableIterator<R>;
|
|
2262
2279
|
}
|
|
2263
2280
|
/**
|
|
2264
|
-
* The
|
|
2281
|
+
* The **`ReadableStream`** interface of the Streams API represents a readable stream of byte data. The Fetch API offers a concrete instance of a ReadableStream through the body property of a Response object.
|
|
2265
2282
|
*
|
|
2266
2283
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream)
|
|
2267
2284
|
*/
|
|
@@ -2293,7 +2310,7 @@ declare class ReadableStreamDefaultReader<R = any> {
|
|
|
2293
2310
|
releaseLock(): void;
|
|
2294
2311
|
}
|
|
2295
2312
|
/**
|
|
2296
|
-
* The
|
|
2313
|
+
* The **`ReadableStreamBYOBReader`** interface of the Streams API defines a reader for a ReadableStream that supports zero-copy reading from an underlying byte source. It is used for efficient copying from underlying sources where the data is delivered as an "anonymous" sequence of bytes, such as files.
|
|
2297
2314
|
*
|
|
2298
2315
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader)
|
|
2299
2316
|
*/
|
|
@@ -2302,13 +2319,13 @@ declare class ReadableStreamBYOBReader {
|
|
|
2302
2319
|
get closed(): Promise<void>;
|
|
2303
2320
|
cancel(reason?: any): Promise<void>;
|
|
2304
2321
|
/**
|
|
2305
|
-
* The **`read()`** method of the ReadableStreamBYOBReader interface is used to read data into a view on a user-supplied buffer from an associated readable byte stream.
|
|
2322
|
+
* The **`read()`** method of the ReadableStreamBYOBReader interface is used to read data into a view on a user-supplied buffer from an associated readable byte stream. A request for data will be satisfied from the stream's internal queues if there is any data present. If the stream queues are empty, the request may be supplied as a zero-copy transfer from the underlying byte source.
|
|
2306
2323
|
*
|
|
2307
2324
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/read)
|
|
2308
2325
|
*/
|
|
2309
2326
|
read<T extends ArrayBufferView>(view: T): Promise<ReadableStreamReadResult<T>>;
|
|
2310
2327
|
/**
|
|
2311
|
-
* The **`releaseLock()`** method of the ReadableStreamBYOBReader interface releases the reader's lock on the stream.
|
|
2328
|
+
* The **`releaseLock()`** method of the ReadableStreamBYOBReader interface releases the reader's lock on the stream. After the lock is released, the reader is no longer active.
|
|
2312
2329
|
*
|
|
2313
2330
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/releaseLock)
|
|
2314
2331
|
*/
|
|
@@ -2327,7 +2344,7 @@ interface ReadableStreamGetReaderOptions {
|
|
|
2327
2344
|
mode: "byob";
|
|
2328
2345
|
}
|
|
2329
2346
|
/**
|
|
2330
|
-
* The **`ReadableStreamBYOBRequest`** interface of the Streams API represents a
|
|
2347
|
+
* The **`ReadableStreamBYOBRequest`** interface of the Streams API represents a "pull request" for data from an underlying source that will made as a zero-copy transfer to a consumer (bypassing the stream's internal queues).
|
|
2331
2348
|
*
|
|
2332
2349
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest)
|
|
2333
2350
|
*/
|
|
@@ -2353,13 +2370,13 @@ declare abstract class ReadableStreamBYOBRequest {
|
|
|
2353
2370
|
get atLeast(): number | null;
|
|
2354
2371
|
}
|
|
2355
2372
|
/**
|
|
2356
|
-
* The **`ReadableStreamDefaultController`** interface of the Streams API represents a controller allowing control of a ReadableStream's state and internal queue.
|
|
2373
|
+
* The **`ReadableStreamDefaultController`** interface of the Streams API represents a controller allowing control of a ReadableStream's state and internal queue. Default controllers are for streams that are not byte streams.
|
|
2357
2374
|
*
|
|
2358
2375
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController)
|
|
2359
2376
|
*/
|
|
2360
2377
|
declare abstract class ReadableStreamDefaultController<R = any> {
|
|
2361
2378
|
/**
|
|
2362
|
-
* The **`desiredSize`** read-only property of the required to fill the stream's internal queue.
|
|
2379
|
+
* The **`desiredSize`** read-only property of the ReadableStreamDefaultController interface returns the desired size required to fill the stream's internal queue.
|
|
2363
2380
|
*
|
|
2364
2381
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/desiredSize)
|
|
2365
2382
|
*/
|
|
@@ -2371,32 +2388,32 @@ declare abstract class ReadableStreamDefaultController<R = any> {
|
|
|
2371
2388
|
*/
|
|
2372
2389
|
close(): void;
|
|
2373
2390
|
/**
|
|
2374
|
-
* The **`enqueue()`** method of the
|
|
2391
|
+
* The **`enqueue()`** method of the ReadableStreamDefaultController interface enqueues a given chunk in the associated stream.
|
|
2375
2392
|
*
|
|
2376
2393
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/enqueue)
|
|
2377
2394
|
*/
|
|
2378
2395
|
enqueue(chunk?: R): void;
|
|
2379
2396
|
/**
|
|
2380
|
-
* The **`error()`** method of the with the associated stream to error.
|
|
2397
|
+
* The **`error()`** method of the ReadableStreamDefaultController interface causes any future interactions with the associated stream to error.
|
|
2381
2398
|
*
|
|
2382
2399
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/error)
|
|
2383
2400
|
*/
|
|
2384
2401
|
error(reason: any): void;
|
|
2385
2402
|
}
|
|
2386
2403
|
/**
|
|
2387
|
-
* The **`ReadableByteStreamController`** interface of the Streams API represents a controller for a readable byte stream.
|
|
2404
|
+
* The **`ReadableByteStreamController`** interface of the Streams API represents a controller for a readable byte stream. It allows control of the state and internal queue of a ReadableStream with an underlying byte source, and enables efficient zero-copy transfer of data from the underlying source to a consumer when the stream's internal queue is empty.
|
|
2388
2405
|
*
|
|
2389
2406
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController)
|
|
2390
2407
|
*/
|
|
2391
2408
|
declare abstract class ReadableByteStreamController {
|
|
2392
2409
|
/**
|
|
2393
|
-
* The **`byobRequest`** read-only property of the ReadableByteStreamController interface returns the current BYOB request, or
|
|
2410
|
+
* The **`byobRequest`** read-only property of the ReadableByteStreamController interface returns the current BYOB request, or null if there are no pending requests.
|
|
2394
2411
|
*
|
|
2395
2412
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/byobRequest)
|
|
2396
2413
|
*/
|
|
2397
2414
|
get byobRequest(): ReadableStreamBYOBRequest | null;
|
|
2398
2415
|
/**
|
|
2399
|
-
* The **`desiredSize`** read-only property of the ReadableByteStreamController interface returns the number of bytes required to fill the stream's internal queue to its
|
|
2416
|
+
* The **`desiredSize`** read-only property of the ReadableByteStreamController interface returns the number of bytes required to fill the stream's internal queue to its "desired size".
|
|
2400
2417
|
*
|
|
2401
2418
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/desiredSize)
|
|
2402
2419
|
*/
|
|
@@ -2408,7 +2425,7 @@ declare abstract class ReadableByteStreamController {
|
|
|
2408
2425
|
*/
|
|
2409
2426
|
close(): void;
|
|
2410
2427
|
/**
|
|
2411
|
-
* The **`enqueue()`** method of the ReadableByteStreamController interface enqueues a given chunk on the associated readable byte stream (the chunk is
|
|
2428
|
+
* The **`enqueue()`** method of the ReadableByteStreamController interface enqueues a given chunk on the associated readable byte stream (the chunk is transferred into the stream's internal queues).
|
|
2412
2429
|
*
|
|
2413
2430
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/enqueue)
|
|
2414
2431
|
*/
|
|
@@ -2421,7 +2438,7 @@ declare abstract class ReadableByteStreamController {
|
|
|
2421
2438
|
error(reason: any): void;
|
|
2422
2439
|
}
|
|
2423
2440
|
/**
|
|
2424
|
-
* The **`WritableStreamDefaultController`** interface of the Streams API represents a controller allowing control of a WritableStream's state.
|
|
2441
|
+
* The **`WritableStreamDefaultController`** interface of the Streams API represents a controller allowing control of a WritableStream's state. When constructing a WritableStream, the underlying sink is given a corresponding WritableStreamDefaultController instance to manipulate.
|
|
2425
2442
|
*
|
|
2426
2443
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController)
|
|
2427
2444
|
*/
|
|
@@ -2433,7 +2450,7 @@ declare abstract class WritableStreamDefaultController {
|
|
|
2433
2450
|
*/
|
|
2434
2451
|
get signal(): AbortSignal;
|
|
2435
2452
|
/**
|
|
2436
|
-
* The **`error()`** method of the with the associated stream to error.
|
|
2453
|
+
* The **`error()`** method of the WritableStreamDefaultController interface causes any future interactions with the associated stream to error.
|
|
2437
2454
|
*
|
|
2438
2455
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/error)
|
|
2439
2456
|
*/
|
|
@@ -2458,7 +2475,7 @@ declare abstract class TransformStreamDefaultController<O = any> {
|
|
|
2458
2475
|
*/
|
|
2459
2476
|
enqueue(chunk?: O): void;
|
|
2460
2477
|
/**
|
|
2461
|
-
* The **`error()`** method of the TransformStreamDefaultController interface errors both sides of the stream.
|
|
2478
|
+
* The **`error()`** method of the TransformStreamDefaultController interface errors both sides of the stream. Any further interactions with it will fail with the given error message, and any chunks in the queue will be discarded.
|
|
2462
2479
|
*
|
|
2463
2480
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/error)
|
|
2464
2481
|
*/
|
|
@@ -2480,14 +2497,14 @@ interface ReadableWritablePair<R = any, W = any> {
|
|
|
2480
2497
|
writable: WritableStream<W>;
|
|
2481
2498
|
}
|
|
2482
2499
|
/**
|
|
2483
|
-
* The **`WritableStream`** interface of the Streams API provides a standard abstraction for writing streaming data to a destination, known as a sink.
|
|
2500
|
+
* The **`WritableStream`** interface of the Streams API provides a standard abstraction for writing streaming data to a destination, known as a sink. This object comes with built-in backpressure and queuing.
|
|
2484
2501
|
*
|
|
2485
2502
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream)
|
|
2486
2503
|
*/
|
|
2487
2504
|
declare class WritableStream<W = any> {
|
|
2488
2505
|
constructor(underlyingSink?: UnderlyingSink, queuingStrategy?: QueuingStrategy);
|
|
2489
2506
|
/**
|
|
2490
|
-
* The **`locked`** read-only property of the WritableStream interface returns a boolean indicating whether the
|
|
2507
|
+
* The **`locked`** read-only property of the WritableStream interface returns a boolean indicating whether the WritableStream is locked to a writer.
|
|
2491
2508
|
*
|
|
2492
2509
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/locked)
|
|
2493
2510
|
*/
|
|
@@ -2499,83 +2516,83 @@ declare class WritableStream<W = any> {
|
|
|
2499
2516
|
*/
|
|
2500
2517
|
abort(reason?: any): Promise<void>;
|
|
2501
2518
|
/**
|
|
2502
|
-
* The **`close()`** method of the WritableStream interface closes the associated stream.
|
|
2519
|
+
* The **`close()`** method of the WritableStream interface closes the associated stream. All chunks written before this method is called are sent before the returned promise is fulfilled.
|
|
2503
2520
|
*
|
|
2504
2521
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/close)
|
|
2505
2522
|
*/
|
|
2506
2523
|
close(): Promise<void>;
|
|
2507
2524
|
/**
|
|
2508
|
-
* The **`getWriter()`** method of the WritableStream interface returns a new instance of WritableStreamDefaultWriter and locks the stream to that instance.
|
|
2525
|
+
* The **`getWriter()`** method of the WritableStream interface returns a new instance of WritableStreamDefaultWriter and locks the stream to that instance. While the stream is locked, no other writer can be acquired until this one is released.
|
|
2509
2526
|
*
|
|
2510
2527
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/getWriter)
|
|
2511
2528
|
*/
|
|
2512
2529
|
getWriter(): WritableStreamDefaultWriter<W>;
|
|
2513
2530
|
}
|
|
2514
2531
|
/**
|
|
2515
|
-
* The **`WritableStreamDefaultWriter`** interface of the Streams API is the object returned by WritableStream.getWriter() and once created locks the writer to the
|
|
2532
|
+
* The **`WritableStreamDefaultWriter`** interface of the Streams API is the object returned by WritableStream.getWriter() and once created locks the writer to the WritableStream ensuring that no other streams can write to the underlying sink.
|
|
2516
2533
|
*
|
|
2517
2534
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter)
|
|
2518
2535
|
*/
|
|
2519
2536
|
declare class WritableStreamDefaultWriter<W = any> {
|
|
2520
2537
|
constructor(stream: WritableStream);
|
|
2521
2538
|
/**
|
|
2522
|
-
* The **`closed`** read-only property of the the stream errors or the writer's lock is released.
|
|
2539
|
+
* The **`closed`** read-only property of the WritableStreamDefaultWriter interface returns a Promise that fulfills if the stream becomes closed, or rejects if the stream errors or the writer's lock is released.
|
|
2523
2540
|
*
|
|
2524
2541
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/closed)
|
|
2525
2542
|
*/
|
|
2526
2543
|
get closed(): Promise<void>;
|
|
2527
2544
|
/**
|
|
2528
|
-
* The **`ready`** read-only property of the that resolves when the desired size of the stream's internal queue transitions from non-positive to positive, signaling that it is no longer applying backpressure.
|
|
2545
|
+
* The **`ready`** read-only property of the WritableStreamDefaultWriter interface returns a Promise that resolves when the desired size of the stream's internal queue transitions from non-positive to positive, signaling that it is no longer applying backpressure.
|
|
2529
2546
|
*
|
|
2530
2547
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/ready)
|
|
2531
2548
|
*/
|
|
2532
2549
|
get ready(): Promise<void>;
|
|
2533
2550
|
/**
|
|
2534
|
-
* The **`desiredSize`** read-only property of the to fill the stream's internal queue.
|
|
2551
|
+
* The **`desiredSize`** read-only property of the WritableStreamDefaultWriter interface returns the desired size required to fill the stream's internal queue.
|
|
2535
2552
|
*
|
|
2536
2553
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/desiredSize)
|
|
2537
2554
|
*/
|
|
2538
2555
|
get desiredSize(): number | null;
|
|
2539
2556
|
/**
|
|
2540
|
-
* The **`abort()`** method of the the producer can no longer successfully write to the stream and it is to be immediately moved to an error state, with any queued writes discarded.
|
|
2557
|
+
* The **`abort()`** method of the WritableStreamDefaultWriter interface aborts the stream, signaling that the producer can no longer successfully write to the stream and it is to be immediately moved to an error state, with any queued writes discarded.
|
|
2541
2558
|
*
|
|
2542
2559
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/abort)
|
|
2543
2560
|
*/
|
|
2544
2561
|
abort(reason?: any): Promise<void>;
|
|
2545
2562
|
/**
|
|
2546
|
-
* The **`close()`** method of the stream.
|
|
2563
|
+
* The **`close()`** method of the WritableStreamDefaultWriter interface closes the associated writable stream.
|
|
2547
2564
|
*
|
|
2548
2565
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/close)
|
|
2549
2566
|
*/
|
|
2550
2567
|
close(): Promise<void>;
|
|
2551
2568
|
/**
|
|
2552
|
-
* The **`write()`** method of the operation.
|
|
2569
|
+
* The **`write()`** method of the WritableStreamDefaultWriter interface writes a passed chunk of data to a WritableStream and its underlying sink, then returns a Promise that resolves to indicate the success or failure of the write operation.
|
|
2553
2570
|
*
|
|
2554
2571
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/write)
|
|
2555
2572
|
*/
|
|
2556
2573
|
write(chunk?: W): Promise<void>;
|
|
2557
2574
|
/**
|
|
2558
|
-
* The **`releaseLock()`** method of the corresponding stream.
|
|
2575
|
+
* The **`releaseLock()`** method of the WritableStreamDefaultWriter interface releases the writer's lock on the corresponding stream. After the lock is released, the writer is no longer active. If the associated stream is errored when the lock is released, the writer will appear errored in the same way from now on; otherwise, the writer will appear closed.
|
|
2559
2576
|
*
|
|
2560
2577
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/releaseLock)
|
|
2561
2578
|
*/
|
|
2562
2579
|
releaseLock(): void;
|
|
2563
2580
|
}
|
|
2564
2581
|
/**
|
|
2565
|
-
* The **`TransformStream`** interface of the Streams API represents a concrete implementation of the pipe chain
|
|
2582
|
+
* The **`TransformStream`** interface of the Streams API represents a concrete implementation of the pipe chain transform stream concept.
|
|
2566
2583
|
*
|
|
2567
2584
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream)
|
|
2568
2585
|
*/
|
|
2569
2586
|
declare class TransformStream<I = any, O = any> {
|
|
2570
2587
|
constructor(transformer?: Transformer<I, O>, writableStrategy?: QueuingStrategy<I>, readableStrategy?: QueuingStrategy<O>);
|
|
2571
2588
|
/**
|
|
2572
|
-
* The **`readable`** read-only property of the TransformStream interface returns the ReadableStream instance controlled by this
|
|
2589
|
+
* The **`readable`** read-only property of the TransformStream interface returns the ReadableStream instance controlled by this TransformStream. This stream emits the transformed output data.
|
|
2573
2590
|
*
|
|
2574
2591
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream/readable)
|
|
2575
2592
|
*/
|
|
2576
2593
|
get readable(): ReadableStream<O>;
|
|
2577
2594
|
/**
|
|
2578
|
-
* The **`writable`** read-only property of the TransformStream interface returns the WritableStream instance controlled by this
|
|
2595
|
+
* The **`writable`** read-only property of the TransformStream interface returns the WritableStream instance controlled by this TransformStream. This stream accepts input data that will be transformed and emitted to the readable stream.
|
|
2579
2596
|
*
|
|
2580
2597
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream/writable)
|
|
2581
2598
|
*/
|
|
@@ -2594,7 +2611,7 @@ interface ReadableStreamValuesOptions {
|
|
|
2594
2611
|
preventCancel?: boolean;
|
|
2595
2612
|
}
|
|
2596
2613
|
/**
|
|
2597
|
-
* The **`CompressionStream`** interface of the Compression Streams API
|
|
2614
|
+
* The **`CompressionStream`** interface of the Compression Streams API compresses a stream of data. It implements the same shape as a TransformStream, allowing it to be used in ReadableStream.pipeThrough() and similar methods.
|
|
2598
2615
|
*
|
|
2599
2616
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CompressionStream)
|
|
2600
2617
|
*/
|
|
@@ -2602,7 +2619,7 @@ declare class CompressionStream extends TransformStream<ArrayBuffer | ArrayBuffe
|
|
|
2602
2619
|
constructor(format: "gzip" | "deflate" | "deflate-raw");
|
|
2603
2620
|
}
|
|
2604
2621
|
/**
|
|
2605
|
-
* The **`DecompressionStream`** interface of the Compression Streams API
|
|
2622
|
+
* The **`DecompressionStream`** interface of the Compression Streams API decompresses a stream of data. It implements the same shape as a TransformStream, allowing it to be used in ReadableStream.pipeThrough() and similar methods.
|
|
2606
2623
|
*
|
|
2607
2624
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DecompressionStream)
|
|
2608
2625
|
*/
|
|
@@ -2610,7 +2627,7 @@ declare class DecompressionStream extends TransformStream<ArrayBuffer | ArrayBuf
|
|
|
2610
2627
|
constructor(format: "gzip" | "deflate" | "deflate-raw");
|
|
2611
2628
|
}
|
|
2612
2629
|
/**
|
|
2613
|
-
* The **`TextEncoderStream`** interface of the Encoding API converts a stream of strings into bytes in the UTF-8 encoding.
|
|
2630
|
+
* The **`TextEncoderStream`** interface of the Encoding API converts a stream of strings into bytes in the UTF-8 encoding. It is the streaming equivalent of TextEncoder. It implements the same shape as a TransformStream, allowing it to be used in ReadableStream.pipeThrough() and similar methods.
|
|
2614
2631
|
*
|
|
2615
2632
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoderStream)
|
|
2616
2633
|
*/
|
|
@@ -2619,7 +2636,7 @@ declare class TextEncoderStream extends TransformStream<string, Uint8Array> {
|
|
|
2619
2636
|
get encoding(): string;
|
|
2620
2637
|
}
|
|
2621
2638
|
/**
|
|
2622
|
-
* The **`TextDecoderStream`** interface of the Encoding API converts a stream of text in a binary encoding, such as UTF-8 etc., to a stream of strings.
|
|
2639
|
+
* The **`TextDecoderStream`** interface of the Encoding API converts a stream of text in a binary encoding, such as UTF-8 etc., to a stream of strings. It is the streaming equivalent of TextDecoder. It implements the same shape as a TransformStream, allowing it to be used in ReadableStream.pipeThrough() and similar methods.
|
|
2623
2640
|
*
|
|
2624
2641
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoderStream)
|
|
2625
2642
|
*/
|
|
@@ -2794,7 +2811,7 @@ interface UnsafeTraceMetrics {
|
|
|
2794
2811
|
fromTrace(item: TraceItem): TraceMetrics;
|
|
2795
2812
|
}
|
|
2796
2813
|
/**
|
|
2797
|
-
* The **`URL`** interface is used to parse, construct, normalize, and encode URL.
|
|
2814
|
+
* The **`URL`** interface is used to parse, construct, normalize, and encode URLs. It works by providing properties which allow you to easily read and modify the components of a URL.
|
|
2798
2815
|
*
|
|
2799
2816
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL)
|
|
2800
2817
|
*/
|
|
@@ -2819,121 +2836,121 @@ declare class URL {
|
|
|
2819
2836
|
*/
|
|
2820
2837
|
set href(value: string);
|
|
2821
2838
|
/**
|
|
2822
|
-
* The **`protocol`** property of the URL interface is a string containing the protocol or scheme of the URL, including the final
|
|
2839
|
+
* The **`protocol`** property of the URL interface is a string containing the protocol or scheme of the URL, including the final ":".
|
|
2823
2840
|
*
|
|
2824
2841
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/protocol)
|
|
2825
2842
|
*/
|
|
2826
2843
|
get protocol(): string;
|
|
2827
2844
|
/**
|
|
2828
|
-
* The **`protocol`** property of the URL interface is a string containing the protocol or scheme of the URL, including the final
|
|
2845
|
+
* The **`protocol`** property of the URL interface is a string containing the protocol or scheme of the URL, including the final ":".
|
|
2829
2846
|
*
|
|
2830
2847
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/protocol)
|
|
2831
2848
|
*/
|
|
2832
2849
|
set protocol(value: string);
|
|
2833
2850
|
/**
|
|
2834
|
-
* The **`username`** property of the URL interface is a string containing the username component of the URL.
|
|
2851
|
+
* The **`username`** property of the URL interface is a string containing the username component of the URL. If the URL does not have a username, this property contains an empty string, "".
|
|
2835
2852
|
*
|
|
2836
2853
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/username)
|
|
2837
2854
|
*/
|
|
2838
2855
|
get username(): string;
|
|
2839
2856
|
/**
|
|
2840
|
-
* The **`username`** property of the URL interface is a string containing the username component of the URL.
|
|
2857
|
+
* The **`username`** property of the URL interface is a string containing the username component of the URL. If the URL does not have a username, this property contains an empty string, "".
|
|
2841
2858
|
*
|
|
2842
2859
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/username)
|
|
2843
2860
|
*/
|
|
2844
2861
|
set username(value: string);
|
|
2845
2862
|
/**
|
|
2846
|
-
* The **`password`** property of the URL interface is a string containing the password component of the URL.
|
|
2863
|
+
* The **`password`** property of the URL interface is a string containing the password component of the URL. If the URL does not have a password, this property contains an empty string, "".
|
|
2847
2864
|
*
|
|
2848
2865
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/password)
|
|
2849
2866
|
*/
|
|
2850
2867
|
get password(): string;
|
|
2851
2868
|
/**
|
|
2852
|
-
* The **`password`** property of the URL interface is a string containing the password component of the URL.
|
|
2869
|
+
* The **`password`** property of the URL interface is a string containing the password component of the URL. If the URL does not have a password, this property contains an empty string, "".
|
|
2853
2870
|
*
|
|
2854
2871
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/password)
|
|
2855
2872
|
*/
|
|
2856
2873
|
set password(value: string);
|
|
2857
2874
|
/**
|
|
2858
|
-
* The **`host`** property of the URL interface is a string containing the host, which is the
|
|
2875
|
+
* The **`host`** property of the URL interface is a string containing the host, which is the hostname, and then, if the port of the URL is nonempty, a ":", followed by the port of the URL. If the URL does not have a hostname, this property contains an empty string, "".
|
|
2859
2876
|
*
|
|
2860
2877
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/host)
|
|
2861
2878
|
*/
|
|
2862
2879
|
get host(): string;
|
|
2863
2880
|
/**
|
|
2864
|
-
* The **`host`** property of the URL interface is a string containing the host, which is the
|
|
2881
|
+
* The **`host`** property of the URL interface is a string containing the host, which is the hostname, and then, if the port of the URL is nonempty, a ":", followed by the port of the URL. If the URL does not have a hostname, this property contains an empty string, "".
|
|
2865
2882
|
*
|
|
2866
2883
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/host)
|
|
2867
2884
|
*/
|
|
2868
2885
|
set host(value: string);
|
|
2869
2886
|
/**
|
|
2870
|
-
* The **`hostname`** property of the URL interface is a string containing either the domain name or IP address of the URL.
|
|
2887
|
+
* The **`hostname`** property of the URL interface is a string containing either the domain name or IP address of the URL. If the URL does not have a hostname, this property contains an empty string, "". IPv4 and IPv6 addresses are normalized, such as stripping leading zeros, and domain names are converted to IDN.
|
|
2871
2888
|
*
|
|
2872
2889
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hostname)
|
|
2873
2890
|
*/
|
|
2874
2891
|
get hostname(): string;
|
|
2875
2892
|
/**
|
|
2876
|
-
* The **`hostname`** property of the URL interface is a string containing either the domain name or IP address of the URL.
|
|
2893
|
+
* The **`hostname`** property of the URL interface is a string containing either the domain name or IP address of the URL. If the URL does not have a hostname, this property contains an empty string, "". IPv4 and IPv6 addresses are normalized, such as stripping leading zeros, and domain names are converted to IDN.
|
|
2877
2894
|
*
|
|
2878
2895
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hostname)
|
|
2879
2896
|
*/
|
|
2880
2897
|
set hostname(value: string);
|
|
2881
2898
|
/**
|
|
2882
|
-
* The **`port`** property of the URL interface is a string containing the port number of the URL.
|
|
2899
|
+
* The **`port`** property of the URL interface is a string containing the port number of the URL. If the port is the default for the protocol (80 for ws: and http:, 443 for wss: and https:, and 21 for ftp:), this property contains an empty string, "".
|
|
2883
2900
|
*
|
|
2884
2901
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/port)
|
|
2885
2902
|
*/
|
|
2886
2903
|
get port(): string;
|
|
2887
2904
|
/**
|
|
2888
|
-
* The **`port`** property of the URL interface is a string containing the port number of the URL.
|
|
2905
|
+
* The **`port`** property of the URL interface is a string containing the port number of the URL. If the port is the default for the protocol (80 for ws: and http:, 443 for wss: and https:, and 21 for ftp:), this property contains an empty string, "".
|
|
2889
2906
|
*
|
|
2890
2907
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/port)
|
|
2891
2908
|
*/
|
|
2892
2909
|
set port(value: string);
|
|
2893
2910
|
/**
|
|
2894
|
-
* The **`pathname`** property of the URL interface represents a location in a hierarchical structure.
|
|
2911
|
+
* The **`pathname`** property of the URL interface represents a location in a hierarchical structure. It is a string constructed from a list of path segments, each of which is prefixed by a / character.
|
|
2895
2912
|
*
|
|
2896
2913
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/pathname)
|
|
2897
2914
|
*/
|
|
2898
2915
|
get pathname(): string;
|
|
2899
2916
|
/**
|
|
2900
|
-
* The **`pathname`** property of the URL interface represents a location in a hierarchical structure.
|
|
2917
|
+
* The **`pathname`** property of the URL interface represents a location in a hierarchical structure. It is a string constructed from a list of path segments, each of which is prefixed by a / character.
|
|
2901
2918
|
*
|
|
2902
2919
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/pathname)
|
|
2903
2920
|
*/
|
|
2904
2921
|
set pathname(value: string);
|
|
2905
2922
|
/**
|
|
2906
|
-
* The **`search`** property of the URL interface is a search string, also called a
|
|
2923
|
+
* The **`search`** property of the URL interface is a search string, also called a query string, that is a string containing a "?" followed by the parameters of the URL. If the URL does not have a search query, this property contains an empty string, "".
|
|
2907
2924
|
*
|
|
2908
2925
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/search)
|
|
2909
2926
|
*/
|
|
2910
2927
|
get search(): string;
|
|
2911
2928
|
/**
|
|
2912
|
-
* The **`search`** property of the URL interface is a search string, also called a
|
|
2929
|
+
* The **`search`** property of the URL interface is a search string, also called a query string, that is a string containing a "?" followed by the parameters of the URL. If the URL does not have a search query, this property contains an empty string, "".
|
|
2913
2930
|
*
|
|
2914
2931
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/search)
|
|
2915
2932
|
*/
|
|
2916
2933
|
set search(value: string);
|
|
2917
2934
|
/**
|
|
2918
|
-
* The **`hash`** property of the URL interface is a string containing a
|
|
2935
|
+
* The **`hash`** property of the URL interface is a string containing a "#" followed by the fragment identifier of the URL. If the URL does not have a fragment identifier, this property contains an empty string, "".
|
|
2919
2936
|
*
|
|
2920
2937
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hash)
|
|
2921
2938
|
*/
|
|
2922
2939
|
get hash(): string;
|
|
2923
2940
|
/**
|
|
2924
|
-
* The **`hash`** property of the URL interface is a string containing a
|
|
2941
|
+
* The **`hash`** property of the URL interface is a string containing a "#" followed by the fragment identifier of the URL. If the URL does not have a fragment identifier, this property contains an empty string, "".
|
|
2925
2942
|
*
|
|
2926
2943
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hash)
|
|
2927
2944
|
*/
|
|
2928
2945
|
set hash(value: string);
|
|
2929
2946
|
/**
|
|
2930
|
-
* The **`searchParams`** read-only property of the access to the
|
|
2947
|
+
* The **`searchParams`** read-only property of the URL interface returns a URLSearchParams object allowing access to the GET decoded query arguments contained in the URL.
|
|
2931
2948
|
*
|
|
2932
2949
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/searchParams)
|
|
2933
2950
|
*/
|
|
2934
2951
|
get searchParams(): URLSearchParams;
|
|
2935
2952
|
/**
|
|
2936
|
-
* The **`toJSON()`** method of the URL interface returns a string containing a serialized version of the URL, although in practice it seems to have the same effect as
|
|
2953
|
+
* The **`toJSON()`** method of the URL interface returns a string containing a serialized version of the URL, although in practice it seems to have the same effect as URL.toString().
|
|
2937
2954
|
*
|
|
2938
2955
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/toJSON)
|
|
2939
2956
|
*/
|
|
@@ -2953,13 +2970,13 @@ declare class URL {
|
|
|
2953
2970
|
*/
|
|
2954
2971
|
static parse(url: string, base?: string): URL | null;
|
|
2955
2972
|
/**
|
|
2956
|
-
* The **`createObjectURL()`** static method of the URL interface creates a string containing a URL
|
|
2973
|
+
* The **`createObjectURL()`** static method of the URL interface creates a string containing a blob URL pointing to the object given in the parameter.
|
|
2957
2974
|
*
|
|
2958
2975
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/createObjectURL_static)
|
|
2959
2976
|
*/
|
|
2960
2977
|
static createObjectURL(object: File | Blob): string;
|
|
2961
2978
|
/**
|
|
2962
|
-
* The **`revokeObjectURL()`** static method of the URL interface releases an existing object URL which was previously created by calling
|
|
2979
|
+
* The **`revokeObjectURL()`** static method of the URL interface releases an existing object URL which was previously created by calling URL.createObjectURL().
|
|
2963
2980
|
*
|
|
2964
2981
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/revokeObjectURL_static)
|
|
2965
2982
|
*/
|
|
@@ -3009,25 +3026,22 @@ declare class URLSearchParams {
|
|
|
3009
3026
|
*/
|
|
3010
3027
|
has(name: string, value?: string): boolean;
|
|
3011
3028
|
/**
|
|
3012
|
-
* The **`set()`** method of the URLSearchParams interface sets the value associated with a given search parameter to the given value.
|
|
3029
|
+
* The **`set()`** method of the URLSearchParams interface sets the value associated with a given search parameter to the given value. If there were several matching values, this method deletes the others. If the search parameter doesn't exist, this method creates it.
|
|
3013
3030
|
*
|
|
3014
3031
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/set)
|
|
3015
3032
|
*/
|
|
3016
3033
|
set(name: string, value: string): void;
|
|
3017
3034
|
/**
|
|
3018
|
-
* The **`URLSearchParams.sort()`** method sorts all key/value pairs contained in this object in place and returns
|
|
3035
|
+
* The **`URLSearchParams.sort()`** method sorts all key/value pairs contained in this object in place and returns undefined. Key/value pairs are sorted by the values of the UTF-16 code units of the keys. This method uses a stable sorting algorithm (i.e., the relative order between key/value pairs with equal keys will be preserved).
|
|
3019
3036
|
*
|
|
3020
3037
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/sort)
|
|
3021
3038
|
*/
|
|
3022
3039
|
sort(): void;
|
|
3023
|
-
/* Returns an array of key, value pairs for every entry in the search params. */
|
|
3024
3040
|
entries(): IterableIterator<[
|
|
3025
3041
|
key: string,
|
|
3026
3042
|
value: string
|
|
3027
3043
|
]>;
|
|
3028
|
-
/* Returns a list of keys in the search params. */
|
|
3029
3044
|
keys(): IterableIterator<string>;
|
|
3030
|
-
/* Returns a list of values in the search params. */
|
|
3031
3045
|
values(): IterableIterator<string>;
|
|
3032
3046
|
forEach<This = unknown>(callback: (this: This, value: string, key: string, parent: URLSearchParams) => void, thisArg?: This): void;
|
|
3033
3047
|
/*function toString() { [native code] }*/
|
|
@@ -3037,18 +3051,78 @@ declare class URLSearchParams {
|
|
|
3037
3051
|
value: string
|
|
3038
3052
|
]>;
|
|
3039
3053
|
}
|
|
3054
|
+
/**
|
|
3055
|
+
* The **`URLPattern`** interface of the URL Pattern API matches URLs or parts of URLs against a pattern. The pattern can contain capturing groups that extract parts of the matched URL.
|
|
3056
|
+
*
|
|
3057
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern)
|
|
3058
|
+
*/
|
|
3040
3059
|
declare class URLPattern {
|
|
3041
3060
|
constructor(input?: (string | URLPatternInit), baseURL?: (string | URLPatternOptions), patternOptions?: URLPatternOptions);
|
|
3061
|
+
/**
|
|
3062
|
+
* The **`protocol`** read-only property of the URLPattern interface is a string containing the pattern used to match the protocol part of a URL.
|
|
3063
|
+
*
|
|
3064
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/protocol)
|
|
3065
|
+
*/
|
|
3042
3066
|
get protocol(): string;
|
|
3067
|
+
/**
|
|
3068
|
+
* The **`username`** read-only property of the URLPattern interface is a string containing the pattern used to match the username part of a URL.
|
|
3069
|
+
*
|
|
3070
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/username)
|
|
3071
|
+
*/
|
|
3043
3072
|
get username(): string;
|
|
3073
|
+
/**
|
|
3074
|
+
* The **`password`** read-only property of the URLPattern interface is a string containing the pattern used to match the password part of a URL.
|
|
3075
|
+
*
|
|
3076
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/password)
|
|
3077
|
+
*/
|
|
3044
3078
|
get password(): string;
|
|
3079
|
+
/**
|
|
3080
|
+
* The **`hostname`** read-only property of the URLPattern interface is a string containing the pattern used to match the hostname part of a URL.
|
|
3081
|
+
*
|
|
3082
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hostname)
|
|
3083
|
+
*/
|
|
3045
3084
|
get hostname(): string;
|
|
3085
|
+
/**
|
|
3086
|
+
* The **`port`** read-only property of the URLPattern interface is a string containing the pattern used to match the port part of a URL.
|
|
3087
|
+
*
|
|
3088
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/port)
|
|
3089
|
+
*/
|
|
3046
3090
|
get port(): string;
|
|
3091
|
+
/**
|
|
3092
|
+
* The **`pathname`** read-only property of the URLPattern interface is a string containing the pattern used to match the pathname part of a URL.
|
|
3093
|
+
*
|
|
3094
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/pathname)
|
|
3095
|
+
*/
|
|
3047
3096
|
get pathname(): string;
|
|
3097
|
+
/**
|
|
3098
|
+
* The **`search`** read-only property of the URLPattern interface is a string containing the pattern used to match the search part of a URL.
|
|
3099
|
+
*
|
|
3100
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/search)
|
|
3101
|
+
*/
|
|
3048
3102
|
get search(): string;
|
|
3103
|
+
/**
|
|
3104
|
+
* The **`hash`** read-only property of the URLPattern interface is a string containing the pattern used to match the fragment part of a URL.
|
|
3105
|
+
*
|
|
3106
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hash)
|
|
3107
|
+
*/
|
|
3049
3108
|
get hash(): string;
|
|
3109
|
+
/**
|
|
3110
|
+
* The **`hasRegExpGroups`** read-only property of the URLPattern interface is a boolean indicating whether or not any of the URLPattern components contain regular expression capturing groups.
|
|
3111
|
+
*
|
|
3112
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hasRegExpGroups)
|
|
3113
|
+
*/
|
|
3050
3114
|
get hasRegExpGroups(): boolean;
|
|
3115
|
+
/**
|
|
3116
|
+
* The **`test()`** method of the URLPattern interface takes a URL string or object of URL parts, and returns a boolean indicating if the given input matches the current pattern.
|
|
3117
|
+
*
|
|
3118
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/test)
|
|
3119
|
+
*/
|
|
3051
3120
|
test(input?: (string | URLPatternInit), baseURL?: string): boolean;
|
|
3121
|
+
/**
|
|
3122
|
+
* The **`exec()`** method of the URLPattern interface takes a URL or object of URL parts, and returns either an object containing the results of matching the URL to the pattern, or null if the URL does not match the pattern.
|
|
3123
|
+
*
|
|
3124
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/exec)
|
|
3125
|
+
*/
|
|
3052
3126
|
exec(input?: (string | URLPatternInit), baseURL?: string): URLPatternResult | null;
|
|
3053
3127
|
}
|
|
3054
3128
|
interface URLPatternInit {
|
|
@@ -3081,7 +3155,7 @@ interface URLPatternOptions {
|
|
|
3081
3155
|
ignoreCase?: boolean;
|
|
3082
3156
|
}
|
|
3083
3157
|
/**
|
|
3084
|
-
* A
|
|
3158
|
+
* 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.
|
|
3085
3159
|
*
|
|
3086
3160
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseEvent)
|
|
3087
3161
|
*/
|
|
@@ -3100,13 +3174,16 @@ declare class CloseEvent extends Event {
|
|
|
3100
3174
|
*/
|
|
3101
3175
|
readonly reason: string;
|
|
3102
3176
|
/**
|
|
3103
|
-
* The **`wasClean`** read-only property of the CloseEvent interface returns
|
|
3177
|
+
* The **`wasClean`** read-only property of the CloseEvent interface returns true if the connection closed cleanly.
|
|
3104
3178
|
*
|
|
3105
3179
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseEvent/wasClean)
|
|
3106
3180
|
*/
|
|
3107
3181
|
readonly wasClean: boolean;
|
|
3108
3182
|
}
|
|
3109
3183
|
interface CloseEventInit {
|
|
3184
|
+
bubbles?: boolean;
|
|
3185
|
+
cancelable?: boolean;
|
|
3186
|
+
composed?: boolean;
|
|
3110
3187
|
code?: number;
|
|
3111
3188
|
reason?: string;
|
|
3112
3189
|
wasClean?: boolean;
|
|
@@ -3118,7 +3195,7 @@ type WebSocketEventMap = {
|
|
|
3118
3195
|
error: ErrorEvent;
|
|
3119
3196
|
};
|
|
3120
3197
|
/**
|
|
3121
|
-
* The
|
|
3198
|
+
* The **`WebSocket`** object provides the API for creating and managing a WebSocket connection to a server, as well as for sending and receiving data on the connection.
|
|
3122
3199
|
*
|
|
3123
3200
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket)
|
|
3124
3201
|
*/
|
|
@@ -3135,20 +3212,20 @@ declare var WebSocket: {
|
|
|
3135
3212
|
readonly CLOSED: number;
|
|
3136
3213
|
};
|
|
3137
3214
|
/**
|
|
3138
|
-
* The
|
|
3215
|
+
* The **`WebSocket`** object provides the API for creating and managing a WebSocket connection to a server, as well as for sending and receiving data on the connection.
|
|
3139
3216
|
*
|
|
3140
3217
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket)
|
|
3141
3218
|
*/
|
|
3142
3219
|
interface WebSocket extends EventTarget<WebSocketEventMap> {
|
|
3143
3220
|
accept(options?: WebSocketAcceptOptions): void;
|
|
3144
3221
|
/**
|
|
3145
|
-
* The **`WebSocket.send()`** method enqueues the specified data to be transmitted to the server over the WebSocket connection, increasing the value of
|
|
3222
|
+
* The **`WebSocket.send()`** method enqueues the specified data to be transmitted to the server over the WebSocket connection, increasing the value of bufferedAmount by the number of bytes needed to contain the data. If the data can't be sent (for example, because it needs to be buffered but the buffer is full), the socket is closed automatically. The browser will throw an exception if you call send() when the connection is in the CONNECTING state. If you call send() when the connection is in the CLOSING or CLOSED states, the browser will silently discard the data.
|
|
3146
3223
|
*
|
|
3147
3224
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/send)
|
|
3148
3225
|
*/
|
|
3149
3226
|
send(message: (ArrayBuffer | ArrayBufferView) | string): void;
|
|
3150
3227
|
/**
|
|
3151
|
-
* The **`WebSocket.close()`** method closes the already
|
|
3228
|
+
* The **`WebSocket.close()`** method closes the WebSocket connection or connection attempt, if any. If the connection is already CLOSED, this method does nothing.
|
|
3152
3229
|
*
|
|
3153
3230
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/close)
|
|
3154
3231
|
*/
|
|
@@ -3168,13 +3245,13 @@ interface WebSocket extends EventTarget<WebSocketEventMap> {
|
|
|
3168
3245
|
*/
|
|
3169
3246
|
url: string | null;
|
|
3170
3247
|
/**
|
|
3171
|
-
* The **`WebSocket.protocol`** read-only property returns the name of the sub-protocol the server selected; this will be one of the strings specified in the
|
|
3248
|
+
* The **`WebSocket.protocol`** read-only property returns the name of the sub-protocol the server selected; this will be one of the strings specified in the protocols parameter when creating the WebSocket object, or the empty string if no connection is established.
|
|
3172
3249
|
*
|
|
3173
3250
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/protocol)
|
|
3174
3251
|
*/
|
|
3175
3252
|
protocol: string | null;
|
|
3176
3253
|
/**
|
|
3177
|
-
* The **`WebSocket.extensions`** read-only property returns the extensions selected by the server.
|
|
3254
|
+
* The **`WebSocket.extensions`** read-only property returns the extensions selected by the server. This is currently only the empty string or a list of extensions as negotiated by the connection.
|
|
3178
3255
|
*
|
|
3179
3256
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/extensions)
|
|
3180
3257
|
*/
|
|
@@ -3261,25 +3338,25 @@ interface SocketInfo {
|
|
|
3261
3338
|
declare class EventSource extends EventTarget {
|
|
3262
3339
|
constructor(url: string, init?: EventSourceEventSourceInit);
|
|
3263
3340
|
/**
|
|
3264
|
-
* The **`close()`** method of the EventSource interface closes the connection, if one is made, and sets the
|
|
3341
|
+
* The **`close()`** method of the EventSource interface closes the connection, if one is made, and sets the EventSource.readyState attribute to 2 (closed).
|
|
3265
3342
|
*
|
|
3266
3343
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/close)
|
|
3267
3344
|
*/
|
|
3268
3345
|
close(): void;
|
|
3269
3346
|
/**
|
|
3270
|
-
* The **`url`** read-only property of the URL of the source.
|
|
3347
|
+
* The **`url`** read-only property of the EventSource interface returns a string representing the URL of the source.
|
|
3271
3348
|
*
|
|
3272
3349
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/url)
|
|
3273
3350
|
*/
|
|
3274
3351
|
get url(): string;
|
|
3275
3352
|
/**
|
|
3276
|
-
* The **`withCredentials`** read-only property of the the
|
|
3353
|
+
* The **`withCredentials`** read-only property of the EventSource interface returns a boolean value indicating whether the EventSource object was instantiated with CORS credentials set.
|
|
3277
3354
|
*
|
|
3278
3355
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/withCredentials)
|
|
3279
3356
|
*/
|
|
3280
3357
|
get withCredentials(): boolean;
|
|
3281
3358
|
/**
|
|
3282
|
-
* The **`readyState`** read-only property of the connection.
|
|
3359
|
+
* The **`readyState`** read-only property of the EventSource interface returns a number representing the state of the connection.
|
|
3283
3360
|
*
|
|
3284
3361
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/readyState)
|
|
3285
3362
|
*/
|
|
@@ -3360,26 +3437,38 @@ interface ContainerDirectorySnapshotOptions {
|
|
|
3360
3437
|
dir: string;
|
|
3361
3438
|
name?: string;
|
|
3362
3439
|
}
|
|
3363
|
-
|
|
3440
|
+
type ContainerDirectorySnapshotRestoreParams = {
|
|
3364
3441
|
snapshot: ContainerDirectorySnapshot;
|
|
3365
3442
|
mountPoint?: string;
|
|
3366
|
-
}
|
|
3443
|
+
} | {
|
|
3444
|
+
snapshot?: undefined;
|
|
3445
|
+
mountPoint: string;
|
|
3446
|
+
};
|
|
3367
3447
|
interface ContainerSnapshot {
|
|
3368
3448
|
id: string;
|
|
3369
3449
|
size: number;
|
|
3370
3450
|
name?: string;
|
|
3371
3451
|
}
|
|
3452
|
+
interface ContainerSnapshotRestoreParams {
|
|
3453
|
+
id: string;
|
|
3454
|
+
}
|
|
3372
3455
|
interface ContainerSnapshotOptions {
|
|
3373
3456
|
name?: string;
|
|
3374
3457
|
}
|
|
3375
|
-
|
|
3458
|
+
type ContainerStartupOptions = {
|
|
3376
3459
|
entrypoint?: string[];
|
|
3377
3460
|
enableInternet: boolean;
|
|
3378
3461
|
env?: Record<string, string>;
|
|
3462
|
+
instance?: "lite" | "standard-1" | "standard-2" | "standard-3" | "standard-4" | ContainerStartResources;
|
|
3379
3463
|
labels?: Record<string, string>;
|
|
3380
3464
|
directorySnapshots?: ContainerDirectorySnapshotRestoreParams[];
|
|
3381
|
-
|
|
3382
|
-
|
|
3465
|
+
} & ({
|
|
3466
|
+
image: string;
|
|
3467
|
+
containerSnapshot?: never;
|
|
3468
|
+
} | {
|
|
3469
|
+
image?: never;
|
|
3470
|
+
containerSnapshot?: ContainerSnapshotRestoreParams;
|
|
3471
|
+
});
|
|
3383
3472
|
interface ContainerStartResources {
|
|
3384
3473
|
vcpu: number;
|
|
3385
3474
|
memoryMib: number;
|
|
@@ -3392,19 +3481,19 @@ interface ContainerStartResources {
|
|
|
3392
3481
|
*/
|
|
3393
3482
|
declare abstract class MessagePort extends EventTarget {
|
|
3394
3483
|
/**
|
|
3395
|
-
* The **`postMessage()`** method of the transfers ownership of objects to other browsing contexts.
|
|
3484
|
+
* The **`postMessage()`** method of the MessagePort interface sends a message from the port, and optionally, transfers ownership of objects to other browsing contexts.
|
|
3396
3485
|
*
|
|
3397
3486
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessagePort/postMessage)
|
|
3398
3487
|
*/
|
|
3399
3488
|
postMessage(data?: any, options?: (any[] | MessagePortPostMessageOptions)): void;
|
|
3400
3489
|
/**
|
|
3401
|
-
* The **`close()`** method of the MessagePort interface disconnects the port, so it is no longer active.
|
|
3490
|
+
* The **`close()`** method of the MessagePort interface disconnects the port, so it is no longer active. This stops the flow of messages to that port.
|
|
3402
3491
|
*
|
|
3403
3492
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessagePort/close)
|
|
3404
3493
|
*/
|
|
3405
3494
|
close(): void;
|
|
3406
3495
|
/**
|
|
3407
|
-
* The **`start()`** method of the MessagePort interface starts the sending of messages queued on the port.
|
|
3496
|
+
* The **`start()`** method of the MessagePort interface starts the sending of messages queued on the port. This method is only needed when using EventTarget.addEventListener; it is implied when using onmessage.
|
|
3408
3497
|
*
|
|
3409
3498
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessagePort/start)
|
|
3410
3499
|
*/
|
|
@@ -3420,13 +3509,13 @@ declare abstract class MessagePort extends EventTarget {
|
|
|
3420
3509
|
declare class MessageChannel {
|
|
3421
3510
|
constructor();
|
|
3422
3511
|
/**
|
|
3423
|
-
* The **`port1`** read-only property of the the port attached to the context that originated the channel.
|
|
3512
|
+
* The **`port1`** read-only property of the MessageChannel interface returns the first port of the message channel — the port attached to the context that originated the channel.
|
|
3424
3513
|
*
|
|
3425
3514
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageChannel/port1)
|
|
3426
3515
|
*/
|
|
3427
3516
|
readonly port1: MessagePort;
|
|
3428
3517
|
/**
|
|
3429
|
-
* The **`port2`** read-only property of the the port attached to the context at the other end of the channel, which the message is initially sent to.
|
|
3518
|
+
* The **`port2`** read-only property of the MessageChannel interface returns the second port of the message channel — the port attached to the context at the other end of the channel, which the message is initially sent to.
|
|
3430
3519
|
*
|
|
3431
3520
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageChannel/port2)
|
|
3432
3521
|
*/
|
|
@@ -3486,7 +3575,7 @@ interface WorkerLoaderModule {
|
|
|
3486
3575
|
data?: ArrayBuffer;
|
|
3487
3576
|
json?: any;
|
|
3488
3577
|
py?: string;
|
|
3489
|
-
wasm?: ArrayBuffer;
|
|
3578
|
+
wasm?: ArrayBuffer | ArrayBufferView | WebAssembly.Module;
|
|
3490
3579
|
}
|
|
3491
3580
|
interface WorkerLoaderWorkerCode {
|
|
3492
3581
|
compatibilityDate: string;
|
|
@@ -3494,7 +3583,7 @@ interface WorkerLoaderWorkerCode {
|
|
|
3494
3583
|
allowExperimental?: boolean;
|
|
3495
3584
|
limits?: workerdResourceLimits;
|
|
3496
3585
|
mainModule: string;
|
|
3497
|
-
modules: Record<string,
|
|
3586
|
+
modules: Record<string, string | WebAssembly.Module | WorkerLoaderModule>;
|
|
3498
3587
|
env?: any;
|
|
3499
3588
|
globalOutbound?: (Fetcher | null);
|
|
3500
3589
|
tails?: Fetcher[];
|
|
@@ -3516,7 +3605,7 @@ declare abstract class Performance {
|
|
|
3516
3605
|
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
|
|
3517
3606
|
now(): number;
|
|
3518
3607
|
/**
|
|
3519
|
-
* The **`toJSON()`** method of the Performance interface is a
|
|
3608
|
+
* The **`toJSON()`** method of the Performance interface is a serializer; it returns a JSON representation of the Performance object.
|
|
3520
3609
|
*
|
|
3521
3610
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/toJSON)
|
|
3522
3611
|
*/
|
|
@@ -10075,6 +10164,163 @@ declare abstract class Base_Ai_Cf_Google_Gemma_4_26B_A4B_IT {
|
|
|
10075
10164
|
inputs: ChatCompletionsInput;
|
|
10076
10165
|
postProcessedOutputs: ChatCompletionsOutput;
|
|
10077
10166
|
}
|
|
10167
|
+
declare abstract class Base_Ai_Cf_Moonshotai_Kimi_K2_7_Code {
|
|
10168
|
+
inputs: ChatCompletionsInput;
|
|
10169
|
+
postProcessedOutputs: ChatCompletionsOutput;
|
|
10170
|
+
}
|
|
10171
|
+
declare abstract class Base_Ai_Cf_Zai_Org_Glm_5_2 {
|
|
10172
|
+
inputs: ChatCompletionsInput;
|
|
10173
|
+
postProcessedOutputs: ChatCompletionsOutput;
|
|
10174
|
+
}
|
|
10175
|
+
interface Ai_Cf_Moondream_Moondream3_1_9B_A2B_Input {
|
|
10176
|
+
/**
|
|
10177
|
+
* Which Moondream skill to run.
|
|
10178
|
+
*/
|
|
10179
|
+
task?: "query" | "caption" | "point" | "detect";
|
|
10180
|
+
/**
|
|
10181
|
+
* Input image as a public HTTPS URL or base64 data URI. Optional for `query`; required for `caption`, `point`, and `detect`.
|
|
10182
|
+
*/
|
|
10183
|
+
image?: string;
|
|
10184
|
+
/**
|
|
10185
|
+
* Question for the `query` task.
|
|
10186
|
+
*/
|
|
10187
|
+
question?: string;
|
|
10188
|
+
/**
|
|
10189
|
+
* Caption length for the `caption` task.
|
|
10190
|
+
*/
|
|
10191
|
+
caption_length?: "short" | "normal" | "long";
|
|
10192
|
+
/**
|
|
10193
|
+
* Object phrase to locate for `point` and `detect` tasks (e.g. 'person wearing a red shirt').
|
|
10194
|
+
*/
|
|
10195
|
+
target?: string;
|
|
10196
|
+
/**
|
|
10197
|
+
* Enable reasoning trace for the `query` task.
|
|
10198
|
+
*/
|
|
10199
|
+
reasoning?: boolean;
|
|
10200
|
+
/**
|
|
10201
|
+
* Sampling temperature.
|
|
10202
|
+
*/
|
|
10203
|
+
temperature?: number;
|
|
10204
|
+
/**
|
|
10205
|
+
* Top-p (nucleus) sampling.
|
|
10206
|
+
*/
|
|
10207
|
+
top_p?: number;
|
|
10208
|
+
/**
|
|
10209
|
+
* Max tokens to generate for `query` and `caption`.
|
|
10210
|
+
*/
|
|
10211
|
+
max_tokens?: number;
|
|
10212
|
+
/**
|
|
10213
|
+
* Max objects to return for `point` and `detect`.
|
|
10214
|
+
*/
|
|
10215
|
+
max_objects?: number;
|
|
10216
|
+
/**
|
|
10217
|
+
* Return incremental tokens for `query` and `caption`. `point` and `detect` do not support streaming.
|
|
10218
|
+
*/
|
|
10219
|
+
stream?: boolean;
|
|
10220
|
+
}
|
|
10221
|
+
interface Ai_Cf_Moondream_Moondream3_1_9B_A2B_Output {
|
|
10222
|
+
/**
|
|
10223
|
+
* Reason the generation finished.
|
|
10224
|
+
*/
|
|
10225
|
+
finish_reason: string;
|
|
10226
|
+
metrics: {
|
|
10227
|
+
/**
|
|
10228
|
+
* Number of input tokens consumed.
|
|
10229
|
+
*/
|
|
10230
|
+
input_tokens: number;
|
|
10231
|
+
/**
|
|
10232
|
+
* Number of output tokens generated.
|
|
10233
|
+
*/
|
|
10234
|
+
output_tokens: number;
|
|
10235
|
+
/**
|
|
10236
|
+
* Prefill time in milliseconds.
|
|
10237
|
+
*/
|
|
10238
|
+
prefill_time_ms: number;
|
|
10239
|
+
/**
|
|
10240
|
+
* Decode time in milliseconds.
|
|
10241
|
+
*/
|
|
10242
|
+
decode_time_ms: number;
|
|
10243
|
+
/**
|
|
10244
|
+
* Time to first token in milliseconds.
|
|
10245
|
+
*/
|
|
10246
|
+
ttft_ms: number;
|
|
10247
|
+
};
|
|
10248
|
+
/**
|
|
10249
|
+
* Answer text for the `query` task. Null for other tasks.
|
|
10250
|
+
*/
|
|
10251
|
+
answer?: string;
|
|
10252
|
+
/**
|
|
10253
|
+
* Caption text for the `caption` task. Null for other tasks.
|
|
10254
|
+
*/
|
|
10255
|
+
caption?: string;
|
|
10256
|
+
/**
|
|
10257
|
+
* Located points for the `point` task. Null for other tasks.
|
|
10258
|
+
*/
|
|
10259
|
+
points?: {
|
|
10260
|
+
/**
|
|
10261
|
+
* X coordinate.
|
|
10262
|
+
*/
|
|
10263
|
+
x: number;
|
|
10264
|
+
/**
|
|
10265
|
+
* Y coordinate.
|
|
10266
|
+
*/
|
|
10267
|
+
y: number;
|
|
10268
|
+
}[];
|
|
10269
|
+
/**
|
|
10270
|
+
* Detected bounding boxes for the `detect` task. Null for other tasks.
|
|
10271
|
+
*/
|
|
10272
|
+
objects?: {
|
|
10273
|
+
/**
|
|
10274
|
+
* Minimum X coordinate.
|
|
10275
|
+
*/
|
|
10276
|
+
x_min: number;
|
|
10277
|
+
/**
|
|
10278
|
+
* Minimum Y coordinate.
|
|
10279
|
+
*/
|
|
10280
|
+
y_min: number;
|
|
10281
|
+
/**
|
|
10282
|
+
* Maximum X coordinate.
|
|
10283
|
+
*/
|
|
10284
|
+
x_max: number;
|
|
10285
|
+
/**
|
|
10286
|
+
* Maximum Y coordinate.
|
|
10287
|
+
*/
|
|
10288
|
+
y_max: number;
|
|
10289
|
+
}[];
|
|
10290
|
+
/**
|
|
10291
|
+
* Reasoning trace for the `query` task when reasoning=true. Null otherwise.
|
|
10292
|
+
*/
|
|
10293
|
+
reasoning?: {
|
|
10294
|
+
/**
|
|
10295
|
+
* Reasoning text.
|
|
10296
|
+
*/
|
|
10297
|
+
text: string;
|
|
10298
|
+
/**
|
|
10299
|
+
* Grounding information.
|
|
10300
|
+
*/
|
|
10301
|
+
grounding?: {}[];
|
|
10302
|
+
};
|
|
10303
|
+
}
|
|
10304
|
+
declare abstract class Base_Ai_Cf_Moondream_Moondream3_1_9B_A2B {
|
|
10305
|
+
inputs: Ai_Cf_Moondream_Moondream3_1_9B_A2B_Input;
|
|
10306
|
+
postProcessedOutputs: Ai_Cf_Moondream_Moondream3_1_9B_A2B_Output;
|
|
10307
|
+
}
|
|
10308
|
+
declare abstract class Base_Ai_Cf_Deepseek_Ai_Deepseek_V4_Flash_0731 {
|
|
10309
|
+
inputs: ChatCompletionsInput;
|
|
10310
|
+
postProcessedOutputs: ChatCompletionsOutput;
|
|
10311
|
+
}
|
|
10312
|
+
declare abstract class Base_Ai_Cf_Deepseek_Ai_Deepseek_V4_Pro_0813 {
|
|
10313
|
+
inputs: ChatCompletionsInput;
|
|
10314
|
+
postProcessedOutputs: ChatCompletionsOutput;
|
|
10315
|
+
}
|
|
10316
|
+
declare abstract class Base_Ai_Cf_Qwen_Qwen3_8_27B {
|
|
10317
|
+
inputs: ChatCompletionsInput;
|
|
10318
|
+
postProcessedOutputs: ChatCompletionsOutput;
|
|
10319
|
+
}
|
|
10320
|
+
declare abstract class Base_Ai_Cf_Zai_Org_Glm_5_3_Flash {
|
|
10321
|
+
inputs: ChatCompletionsInput;
|
|
10322
|
+
postProcessedOutputs: ChatCompletionsOutput;
|
|
10323
|
+
}
|
|
10078
10324
|
interface AiModels {
|
|
10079
10325
|
"@cf/huggingface/distilbert-sst-2-int8": BaseAiTextClassification;
|
|
10080
10326
|
"@cf/stabilityai/stable-diffusion-xl-base-1.0": BaseAiTextToImage;
|
|
@@ -10167,6 +10413,13 @@ interface AiModels {
|
|
|
10167
10413
|
"@cf/moonshotai/kimi-k2.6": Base_Ai_Cf_Moonshotai_Kimi_K2_6;
|
|
10168
10414
|
"@cf/nvidia/nemotron-3-120b-a12b": Base_Ai_Cf_Nvidia_Nemotron_3_120B_A12B;
|
|
10169
10415
|
"@cf/google/gemma-4-26b-a4b-it": Base_Ai_Cf_Google_Gemma_4_26B_A4B_IT;
|
|
10416
|
+
"@cf/moonshotai/kimi-k2.7-code": Base_Ai_Cf_Moonshotai_Kimi_K2_7_Code;
|
|
10417
|
+
"@cf/zai-org/glm-5.2": Base_Ai_Cf_Zai_Org_Glm_5_2;
|
|
10418
|
+
"@cf/moondream/moondream3.1-9B-A2B": Base_Ai_Cf_Moondream_Moondream3_1_9B_A2B;
|
|
10419
|
+
"@cf/deepseek-ai/deepseek-v4-flash-0731": Base_Ai_Cf_Deepseek_Ai_Deepseek_V4_Flash_0731;
|
|
10420
|
+
"@cf/deepseek-ai/deepseek-v4-pro-0813": Base_Ai_Cf_Deepseek_Ai_Deepseek_V4_Pro_0813;
|
|
10421
|
+
"@cf/qwen/qwen3.8-27b": Base_Ai_Cf_Qwen_Qwen3_8_27B;
|
|
10422
|
+
"@cf/zai-org/glm-5.3-flash": Base_Ai_Cf_Zai_Org_Glm_5_3_Flash;
|
|
10170
10423
|
}
|
|
10171
10424
|
type AiOptions = {
|
|
10172
10425
|
/**
|
|
@@ -10833,6 +11086,15 @@ interface BrowserRunBaseOptions {
|
|
|
10833
11086
|
*/
|
|
10834
11087
|
cacheTTL?: number;
|
|
10835
11088
|
}
|
|
11089
|
+
/**
|
|
11090
|
+
* Backend selection, mixed into the options of the quick actions that support it.
|
|
11091
|
+
* Deliberately not part of `BrowserRunBaseOptions`: `scrape`, `links` and `snapshot`
|
|
11092
|
+
* reject an alternate backend, so they must not accept the field.
|
|
11093
|
+
*/
|
|
11094
|
+
interface BrowserRunAlternateBackendOptions {
|
|
11095
|
+
/** Render with an alternate browser backend instead of the default one. */
|
|
11096
|
+
browser?: 'kitesurf';
|
|
11097
|
+
}
|
|
10836
11098
|
/** Common options shared by all quick actions. Exactly one of `url` or `html` must be provided.*/
|
|
10837
11099
|
type BrowserRunCommonOptions = (BrowserRunBaseOptions & {
|
|
10838
11100
|
/** URL to navigate to, e.g. `"https://example.com"`. */
|
|
@@ -10867,7 +11129,7 @@ type BrowserRunScreenshotOptions = BrowserRunCommonOptions & {
|
|
|
10867
11129
|
scrollPage?: boolean;
|
|
10868
11130
|
/** @see https://pptr.dev/api/puppeteer.screenshotoptions */
|
|
10869
11131
|
screenshotOptions?: BrowserRunPuppeteerScreenshotOptions;
|
|
10870
|
-
};
|
|
11132
|
+
} & BrowserRunAlternateBackendOptions;
|
|
10871
11133
|
type BrowserRunPDFOptions = BrowserRunCommonOptions & {
|
|
10872
11134
|
/** @see https://pptr.dev/api/puppeteer.pdfoptions */
|
|
10873
11135
|
pdfOptions?: {
|
|
@@ -10903,7 +11165,7 @@ type BrowserRunPDFOptions = BrowserRunCommonOptions & {
|
|
|
10903
11165
|
/** @default 30000 */
|
|
10904
11166
|
timeout?: number;
|
|
10905
11167
|
};
|
|
10906
|
-
};
|
|
11168
|
+
} & BrowserRunAlternateBackendOptions;
|
|
10907
11169
|
type BrowserRunScrapeOptions = BrowserRunCommonOptions & {
|
|
10908
11170
|
/** CSS selectors to scrape. At least one element is required. */
|
|
10909
11171
|
elements: Array<{
|
|
@@ -10916,10 +11178,29 @@ type BrowserRunLinksOptions = BrowserRunCommonOptions & {
|
|
|
10916
11178
|
/** When true, exclude links pointing to external domains. @default false */
|
|
10917
11179
|
excludeExternalLinks?: boolean;
|
|
10918
11180
|
};
|
|
11181
|
+
type BrowserRunSnapshotFormat = 'content' | 'screenshot' | 'markdown' | 'accessibilityTree';
|
|
10919
11182
|
type BrowserRunSnapshotOptions = BrowserRunCommonOptions & {
|
|
11183
|
+
/** Which representations of the page to return. At least two distinct formats
|
|
11184
|
+
* are required; request a single format from its dedicated action instead.
|
|
11185
|
+
* @default ["content","screenshot"]
|
|
11186
|
+
*/
|
|
11187
|
+
formats?: BrowserRunSnapshotFormat[];
|
|
10920
11188
|
/** @see https://pptr.dev/api/puppeteer.screenshotoptions */
|
|
10921
11189
|
screenshotOptions?: Omit<BrowserRunPuppeteerScreenshotOptions, 'encoding'>;
|
|
10922
11190
|
};
|
|
11191
|
+
/** Options for the `accessibilityTree` quick action. */
|
|
11192
|
+
type BrowserRunAccessibilityTreeOptions = BrowserRunCommonOptions & {
|
|
11193
|
+
/** When true, prune nodes that carry no semantic meaning, such as generic
|
|
11194
|
+
* containers. Defaults to true, or to false when `root` is set so that the
|
|
11195
|
+
* requested subtree is returned as-is.
|
|
11196
|
+
*/
|
|
11197
|
+
interestingOnly?: boolean;
|
|
11198
|
+
/** CSS selector limiting the tree to the matching element's subtree.
|
|
11199
|
+
* A selector that matches nothing yields `accessibilityTree: null` with
|
|
11200
|
+
* HTTP 200; a malformed selector is an error.
|
|
11201
|
+
*/
|
|
11202
|
+
root?: string;
|
|
11203
|
+
} & BrowserRunAlternateBackendOptions;
|
|
10923
11204
|
interface BrowserRunJsonBaseOptions {
|
|
10924
11205
|
/** Custom AI models to try in order. Max 3. Falls back to next on error. */
|
|
10925
11206
|
custom_ai?: Array<{
|
|
@@ -10933,7 +11214,7 @@ interface BrowserRunJsonBaseOptions {
|
|
|
10933
11214
|
* Options for the `json` quick action.
|
|
10934
11215
|
* At least one of `prompt` or `response_format` must be provided.
|
|
10935
11216
|
*/
|
|
10936
|
-
type BrowserRunJsonOptions = BrowserRunCommonOptions & BrowserRunJsonBaseOptions & ({
|
|
11217
|
+
type BrowserRunJsonOptions = BrowserRunCommonOptions & BrowserRunAlternateBackendOptions & BrowserRunJsonBaseOptions & ({
|
|
10937
11218
|
/** Natural-language prompt describing what data to extract. */
|
|
10938
11219
|
prompt: string;
|
|
10939
11220
|
/** Structured output schema for the AI model. @see https://developers.cloudflare.com/workers-ai/json-mode/ */
|
|
@@ -10944,14 +11225,80 @@ type BrowserRunJsonOptions = BrowserRunCommonOptions & BrowserRunJsonBaseOptions
|
|
|
10944
11225
|
/** Structured output schema for the AI model. @see https://developers.cloudflare.com/workers-ai/json-mode/ */
|
|
10945
11226
|
response_format: AiTextGenerationResponseFormat;
|
|
10946
11227
|
});
|
|
10947
|
-
type BrowserRunContentOptions = BrowserRunCommonOptions;
|
|
10948
|
-
type BrowserRunMarkdownOptions = BrowserRunCommonOptions;
|
|
11228
|
+
type BrowserRunContentOptions = BrowserRunCommonOptions & BrowserRunAlternateBackendOptions;
|
|
11229
|
+
type BrowserRunMarkdownOptions = BrowserRunCommonOptions & BrowserRunAlternateBackendOptions;
|
|
11230
|
+
type BrowserRunRedirectHop = {
|
|
11231
|
+
/** URL that returned the redirect. */
|
|
11232
|
+
url: string;
|
|
11233
|
+
/** HTTP status of the redirect. */
|
|
11234
|
+
status: number;
|
|
11235
|
+
/** Redirect response headers, including `location`. */
|
|
11236
|
+
headers: Record<string, string>;
|
|
11237
|
+
};
|
|
10949
11238
|
type BrowserRunResponseMeta = {
|
|
10950
11239
|
/** HTTP status code of the rendered page */
|
|
10951
11240
|
status: number;
|
|
10952
11241
|
/** Page title */
|
|
10953
11242
|
title: string;
|
|
10954
|
-
|
|
11243
|
+
/** Origin response headers, lowercased. Repeated headers are joined with a newline. Credential and transport-only headers that do not survive rendering are omitted. */
|
|
11244
|
+
headers?: Record<string, string>;
|
|
11245
|
+
/** URL that served the response, after any redirects the browser followed. */
|
|
11246
|
+
finalUrl?: string;
|
|
11247
|
+
/** HTTP redirects followed to reach `finalUrl`, oldest first. Omitted for direct navigation and for client-side redirects such as meta refresh. An empty array means redirects occurred but their intermediate responses could not be read. */
|
|
11248
|
+
redirectChain?: BrowserRunRedirectHop[];
|
|
11249
|
+
};
|
|
11250
|
+
/**
|
|
11251
|
+
* A node in the page's accessibility tree, as exposed to assistive technology.
|
|
11252
|
+
* `role` is the only field always present; the rest are populated when the
|
|
11253
|
+
* underlying element defines them.
|
|
11254
|
+
* @see https://pptr.dev/api/puppeteer.serializedaxnode
|
|
11255
|
+
*/
|
|
11256
|
+
interface BrowserRunSerializedAXNode {
|
|
11257
|
+
/** The ARIA role, e.g. `"button"`, `"heading"`, `"RootWebArea"`. */
|
|
11258
|
+
role: string;
|
|
11259
|
+
/** The `aria-autocomplete` value. */
|
|
11260
|
+
autocomplete?: string;
|
|
11261
|
+
/** Checked state of a checkbox, radio, or menu item. */
|
|
11262
|
+
checked?: boolean | 'mixed';
|
|
11263
|
+
/** Accessible description, typically from `aria-describedby` or `title`. */
|
|
11264
|
+
description?: string;
|
|
11265
|
+
disabled?: boolean;
|
|
11266
|
+
expanded?: boolean;
|
|
11267
|
+
/** Whether the element currently holds keyboard focus. */
|
|
11268
|
+
focused?: boolean;
|
|
11269
|
+
/** The kind of popup the element triggers, e.g. `"menu"`, `"dialog"`. */
|
|
11270
|
+
haspopup?: string;
|
|
11271
|
+
/** The `aria-invalid` value. */
|
|
11272
|
+
invalid?: string;
|
|
11273
|
+
/** Keyboard shortcuts bound to the element, from `aria-keyshortcuts`. */
|
|
11274
|
+
keyshortcuts?: string;
|
|
11275
|
+
/** Hierarchical level, e.g. the heading level of an `<h2>`. */
|
|
11276
|
+
level?: number;
|
|
11277
|
+
/** Whether the element is a modal dialog. */
|
|
11278
|
+
modal?: boolean;
|
|
11279
|
+
/** Whether a text input accepts multiple lines. */
|
|
11280
|
+
multiline?: boolean;
|
|
11281
|
+
/** Whether more than one option can be selected. */
|
|
11282
|
+
multiselectable?: boolean;
|
|
11283
|
+
/** Accessible name, e.g. a button's label or an image's alt text. */
|
|
11284
|
+
name?: string;
|
|
11285
|
+
orientation?: string;
|
|
11286
|
+
/** Pressed state of a toggle button. */
|
|
11287
|
+
pressed?: boolean | 'mixed';
|
|
11288
|
+
readonly?: boolean;
|
|
11289
|
+
required?: boolean;
|
|
11290
|
+
/** Author-supplied role description, from `aria-roledescription`. */
|
|
11291
|
+
roledescription?: string;
|
|
11292
|
+
selected?: boolean;
|
|
11293
|
+
/** Current value of an input or range element. */
|
|
11294
|
+
value?: string | number;
|
|
11295
|
+
valuemax?: number;
|
|
11296
|
+
valuemin?: number;
|
|
11297
|
+
/** Human-readable form of `value`, from `aria-valuetext`. */
|
|
11298
|
+
valuetext?: string;
|
|
11299
|
+
/** Child nodes. Absent for leaf nodes. */
|
|
11300
|
+
children?: BrowserRunSerializedAXNode[];
|
|
11301
|
+
}
|
|
10955
11302
|
/** Success response for `content` action. */
|
|
10956
11303
|
type BrowserRunContentSuccessResponse = {
|
|
10957
11304
|
success: true;
|
|
@@ -10964,6 +11311,7 @@ type BrowserRunLinksSuccessResponse = {
|
|
|
10964
11311
|
success: true;
|
|
10965
11312
|
/** Extracted links */
|
|
10966
11313
|
result: string[];
|
|
11314
|
+
meta: BrowserRunResponseMeta;
|
|
10967
11315
|
};
|
|
10968
11316
|
/** Success response for `scrape` action. */
|
|
10969
11317
|
type BrowserRunScrapeSuccessResponse = {
|
|
@@ -10994,15 +11342,33 @@ type BrowserRunScrapeSuccessResponse = {
|
|
|
10994
11342
|
}>;
|
|
10995
11343
|
}>;
|
|
10996
11344
|
}>;
|
|
11345
|
+
meta: BrowserRunResponseMeta;
|
|
10997
11346
|
};
|
|
10998
|
-
/** Success response for `snapshot` action.
|
|
11347
|
+
/** Success response for `snapshot` action. Each field is present only when the
|
|
11348
|
+
* corresponding entry was requested in `formats`.
|
|
11349
|
+
*/
|
|
10999
11350
|
type BrowserRunSnapshotSuccessResponse = {
|
|
11000
11351
|
success: true;
|
|
11001
11352
|
result: {
|
|
11002
11353
|
/** HTML content of the page. */
|
|
11003
|
-
content
|
|
11354
|
+
content?: string;
|
|
11004
11355
|
/** Base64-encoded screenshot image. */
|
|
11005
|
-
screenshot
|
|
11356
|
+
screenshot?: string;
|
|
11357
|
+
/** Markdown content. Prefixed with YAML frontmatter (e.g. `title`) when the
|
|
11358
|
+
* page provides that metadata.
|
|
11359
|
+
*/
|
|
11360
|
+
markdown?: string;
|
|
11361
|
+
/** Root of the page's accessibility tree. */
|
|
11362
|
+
accessibilityTree?: BrowserRunSerializedAXNode;
|
|
11363
|
+
};
|
|
11364
|
+
meta: BrowserRunResponseMeta;
|
|
11365
|
+
};
|
|
11366
|
+
/** Success response for `accessibilityTree` action. */
|
|
11367
|
+
type BrowserRunAccessibilityTreeSuccessResponse = {
|
|
11368
|
+
success: true;
|
|
11369
|
+
result: {
|
|
11370
|
+
/** Root of the accessibility tree, or `null` when `root` matched no element. */
|
|
11371
|
+
accessibilityTree: BrowserRunSerializedAXNode | null;
|
|
11006
11372
|
};
|
|
11007
11373
|
meta: BrowserRunResponseMeta;
|
|
11008
11374
|
};
|
|
@@ -11011,12 +11377,14 @@ type BrowserRunJsonSuccessResponse = {
|
|
|
11011
11377
|
success: true;
|
|
11012
11378
|
/** JSON data extracted from the page using an AI model */
|
|
11013
11379
|
result: Record<string, unknown>;
|
|
11380
|
+
meta: BrowserRunResponseMeta;
|
|
11014
11381
|
};
|
|
11015
11382
|
/** Success response for `markdown` action. */
|
|
11016
11383
|
type BrowserRunMarkdownSuccessResponse = {
|
|
11017
11384
|
success: true;
|
|
11018
11385
|
/** Extracted markdown content */
|
|
11019
11386
|
result: string;
|
|
11387
|
+
meta: BrowserRunResponseMeta;
|
|
11020
11388
|
};
|
|
11021
11389
|
/** Error response for BrowserRun actions. */
|
|
11022
11390
|
type BrowserRunErrorResponse = {
|
|
@@ -11126,9 +11494,10 @@ declare abstract class BrowserRun {
|
|
|
11126
11494
|
*/
|
|
11127
11495
|
quickAction(action: 'links', options: BrowserRunLinksOptions): Promise<Response>;
|
|
11128
11496
|
/**
|
|
11129
|
-
* Get
|
|
11497
|
+
* Get several representations of a web page in one request.
|
|
11130
11498
|
* @param action - Must be `'snapshot'`.
|
|
11131
|
-
* @param options - Snapshot options including
|
|
11499
|
+
* @param options - Snapshot options including the `formats` to return and
|
|
11500
|
+
* screenshot settings (encoding is always base64).
|
|
11132
11501
|
* @returns A `Response` containing one of:
|
|
11133
11502
|
*
|
|
11134
11503
|
* **Success (HTTP 200):**
|
|
@@ -11176,6 +11545,26 @@ declare abstract class BrowserRun {
|
|
|
11176
11545
|
* - `X-Browser-Ms-Used`: Browser time consumed in milliseconds (set when status < 500)
|
|
11177
11546
|
*/
|
|
11178
11547
|
quickAction(action: 'markdown', options: BrowserRunMarkdownOptions): Promise<Response>;
|
|
11548
|
+
/**
|
|
11549
|
+
* Get the accessibility tree of a web page.
|
|
11550
|
+
* @param action - Must be `'accessibilityTree'`.
|
|
11551
|
+
* @param options - Options to scope the tree to a subtree and to control
|
|
11552
|
+
* whether semantically uninteresting nodes are pruned.
|
|
11553
|
+
* @returns A `Response` containing one of:
|
|
11554
|
+
*
|
|
11555
|
+
* **Success (HTTP 200):**
|
|
11556
|
+
* - `BrowserRunAccessibilityTreeSuccessResponse` JSON with `Content-Type: application/json`
|
|
11557
|
+
* - `result.accessibilityTree` is `null` when `root` matched no element
|
|
11558
|
+
*
|
|
11559
|
+
* **Error:**
|
|
11560
|
+
* - `BrowserRunErrorResponse` JSON with appropriate HTTP status code (400, 422, 429, 500, 503)
|
|
11561
|
+
* - HTTP 422 for a malformed `root` selector
|
|
11562
|
+
* - HTTP 500 with code `2017` or `2018` when the tree could not be built
|
|
11563
|
+
*
|
|
11564
|
+
* **Headers:**
|
|
11565
|
+
* - `X-Browser-Ms-Used`: Browser time consumed in milliseconds (set when status < 500)
|
|
11566
|
+
*/
|
|
11567
|
+
quickAction(action: 'accessibilityTree', options: BrowserRunAccessibilityTreeOptions): Promise<Response>;
|
|
11179
11568
|
}
|
|
11180
11569
|
/**
|
|
11181
11570
|
* In addition to the properties you can set in the RequestInit dict
|
|
@@ -12496,6 +12885,78 @@ interface Hyperdrive {
|
|
|
12496
12885
|
*/
|
|
12497
12886
|
readonly database: string;
|
|
12498
12887
|
}
|
|
12888
|
+
/**
|
|
12889
|
+
* A handle to a dynamically-provisioned Hyperdrive connection, returned by
|
|
12890
|
+
* `HyperdriveApi.get()`.
|
|
12891
|
+
*/
|
|
12892
|
+
interface HyperdriveDynamic extends Disposable {
|
|
12893
|
+
/**
|
|
12894
|
+
* The database name to use when connecting through this Hyperdrive.
|
|
12895
|
+
*/
|
|
12896
|
+
readonly database: Promise<string>;
|
|
12897
|
+
/*
|
|
12898
|
+
* The randomly generated user to use when authenticating to your
|
|
12899
|
+
* database via Hyperdrive.
|
|
12900
|
+
*/
|
|
12901
|
+
readonly user: Promise<string>;
|
|
12902
|
+
/*
|
|
12903
|
+
* The randomly generated password to use when authenticating to your
|
|
12904
|
+
* database via Hyperdrive.
|
|
12905
|
+
*/
|
|
12906
|
+
readonly password: Promise<string>;
|
|
12907
|
+
/**
|
|
12908
|
+
* Open a TCP socket to the target database through this Hyperdrive.
|
|
12909
|
+
*
|
|
12910
|
+
*/
|
|
12911
|
+
connect(): Promise<Socket>;
|
|
12912
|
+
}
|
|
12913
|
+
/**
|
|
12914
|
+
* Binding that provisions Hyperdrive connections at request time, rather than
|
|
12915
|
+
* from static configuration.
|
|
12916
|
+
*/
|
|
12917
|
+
interface HyperdriveDynamicApi {
|
|
12918
|
+
/**
|
|
12919
|
+
* Provision a connection for the database described by `args`.
|
|
12920
|
+
*
|
|
12921
|
+
*/
|
|
12922
|
+
get(args: HyperdriveDynamicConfig): Promise<HyperdriveDynamic>;
|
|
12923
|
+
/**
|
|
12924
|
+
* Get a pre-generated connection string used for connecting to dynamic Hyperdrive.
|
|
12925
|
+
*/
|
|
12926
|
+
getHyperdriveConnectionString(connectionString: string): Promise<string>;
|
|
12927
|
+
}
|
|
12928
|
+
/**
|
|
12929
|
+
* Parameters identifying the database that a dynamically-provisioned
|
|
12930
|
+
* Hyperdrive connection should target.
|
|
12931
|
+
*/
|
|
12932
|
+
interface HyperdriveDynamicConfig {
|
|
12933
|
+
/**
|
|
12934
|
+
* Generated connection string to pass into the dynamic worker.
|
|
12935
|
+
*
|
|
12936
|
+
*/
|
|
12937
|
+
dynamicHyperdriveConnectionString: string;
|
|
12938
|
+
/**
|
|
12939
|
+
* Connection string for the origin database Hyperdrive should connect to.
|
|
12940
|
+
* Contains credentials, so treat it as a secret.
|
|
12941
|
+
*
|
|
12942
|
+
* The scheme selects the database engine. PostgreSQL origins are supported.
|
|
12943
|
+
*/
|
|
12944
|
+
connectionString: string;
|
|
12945
|
+
/**
|
|
12946
|
+
* Region in which to place the connection pool. See the Hyperdrive
|
|
12947
|
+
* documentation for the set of supported regions.
|
|
12948
|
+
*/
|
|
12949
|
+
targetRegion: string;
|
|
12950
|
+
/**
|
|
12951
|
+
* Whether Hyperdrive should cache query results for this connection.
|
|
12952
|
+
*/
|
|
12953
|
+
cachingEnabled?: boolean;
|
|
12954
|
+
/**
|
|
12955
|
+
* Maximum number of connections the pool may open to the origin database.
|
|
12956
|
+
* Defaults to 60.
|
|
12957
|
+
*/
|
|
12958
|
+
maxConnections?: number;
|
|
12959
|
+
}
|
|
12499
12960
|
// Copyright (c) 2024 Cloudflare, Inc.
|
|
12500
12961
|
// Licensed under the Apache 2.0 license found in the LICENSE file or at:
|
|
12501
12962
|
// https://opensource.org/licenses/Apache-2.0
|
|
@@ -12507,6 +12968,27 @@ type ImageInfoResponse = {
|
|
|
12507
12968
|
width: number;
|
|
12508
12969
|
height: number;
|
|
12509
12970
|
};
|
|
12971
|
+
/**
|
|
12972
|
+
* Parameters for rasterizing text into an image.
|
|
12973
|
+
*/
|
|
12974
|
+
type TextRasterize = {
|
|
12975
|
+
/** The text content to render */
|
|
12976
|
+
content: string;
|
|
12977
|
+
/** rasterization options for the text **/
|
|
12978
|
+
options: TextOptions;
|
|
12979
|
+
};
|
|
12980
|
+
type TextOptions = {
|
|
12981
|
+
/** Font configuration */
|
|
12982
|
+
font: {
|
|
12983
|
+
/** URL to a font file in TrueType (.ttf), OpenType (.otf), WOFF (.woff), or WOFF2 (.woff2) format */
|
|
12984
|
+
url: string;
|
|
12985
|
+
};
|
|
12986
|
+
/** Font size in points (pt) */
|
|
12987
|
+
size?: number;
|
|
12988
|
+
/** Text color in CSS format: hex (#RRGGBB or #RRGGBBAA), rgb(r,g,b), rgba(r,g,b,a), or named colors */
|
|
12989
|
+
color?: string;
|
|
12990
|
+
};
|
|
12991
|
+
type ImageSource = ReadableStream<Uint8Array> | TextRasterize;
|
|
12510
12992
|
type ImageTransform = {
|
|
12511
12993
|
width?: number;
|
|
12512
12994
|
height?: number;
|
|
@@ -12596,6 +13078,9 @@ interface ImageUploadOptions {
|
|
|
12596
13078
|
requireSignedURLs?: boolean;
|
|
12597
13079
|
metadata?: Record<string, unknown>;
|
|
12598
13080
|
creator?: string;
|
|
13081
|
+
/**
|
|
13082
|
+
* If 'base64', the input data will be decoded from base64 before processing
|
|
13083
|
+
*/
|
|
12599
13084
|
encoding?: 'base64';
|
|
12600
13085
|
}
|
|
12601
13086
|
interface ImageUpdateOptions {
|
|
@@ -12603,11 +13088,40 @@ interface ImageUpdateOptions {
|
|
|
12603
13088
|
metadata?: Record<string, unknown>;
|
|
12604
13089
|
creator?: string;
|
|
12605
13090
|
}
|
|
13091
|
+
type ImageMetadataFilterOperators = {
|
|
13092
|
+
eq?: string | number | boolean;
|
|
13093
|
+
in?: string[] | number[];
|
|
13094
|
+
gt?: number;
|
|
13095
|
+
gte?: number;
|
|
13096
|
+
lt?: number;
|
|
13097
|
+
lte?: number;
|
|
13098
|
+
};
|
|
13099
|
+
type ImageMetadataFilterValue = string | number | boolean | ImageMetadataFilterOperators;
|
|
13100
|
+
interface ImageListFilter {
|
|
13101
|
+
metadata?: Record<string, ImageMetadataFilterValue>;
|
|
13102
|
+
}
|
|
12606
13103
|
interface ImageListOptions {
|
|
12607
13104
|
limit?: number;
|
|
12608
13105
|
cursor?: string;
|
|
12609
13106
|
sortOrder?: 'asc' | 'desc';
|
|
12610
13107
|
creator?: string;
|
|
13108
|
+
filter?: ImageListFilter;
|
|
13109
|
+
}
|
|
13110
|
+
interface ImageSignedUrlOptions {
|
|
13111
|
+
variant: string;
|
|
13112
|
+
expiresIn?: number;
|
|
13113
|
+
keyName?: string;
|
|
13114
|
+
}
|
|
13115
|
+
interface ImageDirectUploadOptions {
|
|
13116
|
+
id?: string;
|
|
13117
|
+
requireSignedURLs?: boolean;
|
|
13118
|
+
metadata?: Record<string, unknown>;
|
|
13119
|
+
creator?: string;
|
|
13120
|
+
expiresIn?: number;
|
|
13121
|
+
}
|
|
13122
|
+
interface ImageDirectUploadResult {
|
|
13123
|
+
id: string;
|
|
13124
|
+
uploadURL: string;
|
|
12611
13125
|
}
|
|
12612
13126
|
interface ImageList {
|
|
12613
13127
|
images: ImageMetadata[];
|
|
@@ -12625,6 +13139,13 @@ interface ImageHandle {
|
|
|
12625
13139
|
* @returns ReadableStream of image bytes, or null if not found
|
|
12626
13140
|
*/
|
|
12627
13141
|
bytes(): Promise<ReadableStream<Uint8Array> | null>;
|
|
13142
|
+
/**
|
|
13143
|
+
* Generate a signed delivery URL for this hosted image.
|
|
13144
|
+
* @param options Signing configuration
|
|
13145
|
+
* @returns A signed image delivery URL
|
|
13146
|
+
* @throws {@link ImagesError} if signing fails
|
|
13147
|
+
*/
|
|
13148
|
+
signedUrl(options: ImageSignedUrlOptions): Promise<string>;
|
|
12628
13149
|
/**
|
|
12629
13150
|
* Update hosted image metadata
|
|
12630
13151
|
* @param options Properties to update
|
|
@@ -12660,6 +13181,14 @@ interface HostedImagesBinding {
|
|
|
12660
13181
|
* @throws {@link ImagesError} if list fails
|
|
12661
13182
|
*/
|
|
12662
13183
|
list(options?: ImageListOptions): Promise<ImageList>;
|
|
13184
|
+
/**
|
|
13185
|
+
* Create a Direct Creator Upload link, letting an end user upload an
|
|
13186
|
+
* image straight to Cloudflare without exposing an API token
|
|
13187
|
+
* @param options Upload link configuration
|
|
13188
|
+
* @returns The new image ID and the upload URL to hand to the end user
|
|
13189
|
+
* @throws {@link ImagesError} if creation fails
|
|
13190
|
+
*/
|
|
13191
|
+
createDirectUpload(options?: ImageDirectUploadOptions): Promise<ImageDirectUploadResult>;
|
|
12663
13192
|
}
|
|
12664
13193
|
interface ImagesBinding {
|
|
12665
13194
|
/**
|
|
@@ -12674,6 +13203,13 @@ interface ImagesBinding {
|
|
|
12674
13203
|
* @returns A transform handle
|
|
12675
13204
|
*/
|
|
12676
13205
|
input(stream: ReadableStream<Uint8Array>, options?: ImageInputOptions): ImageTransformer;
|
|
13206
|
+
/**
|
|
13207
|
+
* Begin applying a series of transformations to text
|
|
13208
|
+
* @param content string to be rendered
|
|
13209
|
+
* @param options font, optional color and size to use in rendering text
|
|
13210
|
+
* @returns A transform handle
|
|
13211
|
+
*/
|
|
13212
|
+
text(content: string, options: TextOptions): ImageTransformer;
|
|
12677
13213
|
/**
|
|
12678
13214
|
* Access hosted images CRUD operations
|
|
12679
13215
|
*/
|
|
@@ -12703,11 +13239,15 @@ interface ImageTransformer {
|
|
|
12703
13239
|
type ImageTransformationOutputOptions = {
|
|
12704
13240
|
encoding?: 'base64';
|
|
12705
13241
|
};
|
|
13242
|
+
type ImageTransformationResponseOptions = {
|
|
13243
|
+
headers?: HeadersInit;
|
|
13244
|
+
};
|
|
12706
13245
|
interface ImageTransformationResult {
|
|
12707
13246
|
/**
|
|
12708
13247
|
* The image as a response, ready to store in cache or return to users
|
|
13248
|
+
* @param options Options that apply to the returned response, e.g. additional headers
|
|
12709
13249
|
*/
|
|
12710
|
-
response(): Response;
|
|
13250
|
+
response(options?: ImageTransformationResponseOptions): Response;
|
|
12711
13251
|
/**
|
|
12712
13252
|
* The content type of the returned image
|
|
12713
13253
|
*/
|
|
@@ -14142,7 +14682,7 @@ declare namespace TailStream {
|
|
|
14142
14682
|
interface ConnectEventInfo {
|
|
14143
14683
|
readonly type: "connect";
|
|
14144
14684
|
}
|
|
14145
|
-
type EventOutcome = "ok" | "canceled" | "exception" | "unknown" | "killSwitch" | "daemonDown" | "exceededCpu" | "exceededMemory" | "loadShed" | "responseStreamDisconnected" | "scriptNotFound" | "internalError" | "exceededWallTime";
|
|
14685
|
+
type EventOutcome = "ok" | "canceled" | "exception" | "unknown" | "killSwitch" | "daemonDown" | "exceededCpu" | "exceededMemory" | "loadShed" | "responseStreamDisconnected" | "scriptNotFound" | "internalError" | "exceededWallTime" | "aborted";
|
|
14146
14686
|
interface ScriptVersion {
|
|
14147
14687
|
readonly id: string;
|
|
14148
14688
|
readonly tag?: string;
|
|
@@ -14711,6 +15251,9 @@ type WorkflowBatchDeleteResult = {
|
|
|
14711
15251
|
type WorkflowDurationLabel = 'second' | 'minute' | 'hour' | 'day' | 'week' | 'month' | 'year';
|
|
14712
15252
|
type WorkflowSleepDuration = `${number} ${WorkflowDurationLabel}${'s' | ''}` | number;
|
|
14713
15253
|
type WorkflowRetentionDuration = WorkflowSleepDuration;
|
|
15254
|
+
/** Geographic regions supported when creating a Workflow instance.
|
|
15255
|
+
* Location hints are best-effort placement preferences. */
|
|
15256
|
+
type WorkflowInstanceLocationHint = 'wnam' | 'enam' | 'sam' | 'weur' | 'eeur' | 'apac' | 'apac-ne' | 'apac-se' | 'oc' | 'afr' | 'me';
|
|
14714
15257
|
interface WorkflowInstanceCreateOptions<PARAMS = unknown> {
|
|
14715
15258
|
/**
|
|
14716
15259
|
* An id for your Workflow instance. Must be unique within the Workflow.
|
|
@@ -14728,6 +15271,9 @@ interface WorkflowInstanceCreateOptions<PARAMS = unknown> {
|
|
|
14728
15271
|
successRetention?: WorkflowRetentionDuration;
|
|
14729
15272
|
errorRetention?: WorkflowRetentionDuration;
|
|
14730
15273
|
};
|
|
15274
|
+
/** A best-effort geographic placement preference for the Workflow instance.
|
|
15275
|
+
* See `WorkflowInstanceLocationHint` for supported regions. */
|
|
15276
|
+
locationHint?: WorkflowInstanceLocationHint;
|
|
14731
15277
|
}
|
|
14732
15278
|
type InstanceStatus = {
|
|
14733
15279
|
status: 'queued' // means that instance is waiting to be started (see concurrency limits)
|