@icebreakers/monorepo-templates 1.3.0 → 1.3.1
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/assets/package.json +7 -7
- package/assets/turbo.json +3 -0
- package/package.json +4 -4
- package/templates/client/package.json +9 -9
- package/templates/client/worker-configuration.d.ts +463 -202
- package/templates/server/package.json +2 -2
- package/templates/server/worker-configuration.d.ts +463 -202
- 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 +5 -5
- 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 +1 -1
- 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 +2 -2
- 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: 047568eb9ed6843cb5540fa33180da01)
|
|
3
|
-
// Runtime types generated with workerd@1.
|
|
3
|
+
// Runtime types generated with workerd@1.20260820.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,
|
|
@@ -638,26 +640,26 @@ interface AnalyticsEngineDataPoint {
|
|
|
638
640
|
blobs?: ((ArrayBuffer | string) | null)[];
|
|
639
641
|
}
|
|
640
642
|
/**
|
|
641
|
-
* The **`Event`** interface represents an event which takes place on an
|
|
643
|
+
* The **`Event`** interface represents an event which takes place on an EventTarget.
|
|
642
644
|
*
|
|
643
645
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event)
|
|
644
646
|
*/
|
|
645
647
|
declare class Event {
|
|
646
648
|
constructor(type: string, init?: EventInit);
|
|
647
649
|
/**
|
|
648
|
-
* The **`type`** read-only property of the Event interface returns a string containing the event's type.
|
|
650
|
+
* 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
651
|
*
|
|
650
652
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/type)
|
|
651
653
|
*/
|
|
652
654
|
get type(): string;
|
|
653
655
|
/**
|
|
654
|
-
* The **`eventPhase`** read-only property of the being evaluated.
|
|
656
|
+
* The **`eventPhase`** read-only property of the Event interface indicates which phase of the event flow is currently being evaluated.
|
|
655
657
|
*
|
|
656
658
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/eventPhase)
|
|
657
659
|
*/
|
|
658
660
|
get eventPhase(): number;
|
|
659
661
|
/**
|
|
660
|
-
* The read-only **`composed`** property of the or not the event will propagate across the shadow DOM boundary into the standard DOM.
|
|
662
|
+
* 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
663
|
*
|
|
662
664
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composed)
|
|
663
665
|
*/
|
|
@@ -694,13 +696,13 @@ declare class Event {
|
|
|
694
696
|
*/
|
|
695
697
|
get currentTarget(): EventTarget | undefined;
|
|
696
698
|
/**
|
|
697
|
-
* The read-only **`target`** property of the dispatched.
|
|
699
|
+
* 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
700
|
*
|
|
699
701
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/target)
|
|
700
702
|
*/
|
|
701
703
|
get target(): EventTarget | undefined;
|
|
702
704
|
/**
|
|
703
|
-
* The deprecated **`Event.srcElement`** is an alias for the Event.target property.
|
|
705
|
+
* The deprecated **`Event.srcElement`** is an alias for the Event.target property. Use Event.target instead.
|
|
704
706
|
* @deprecated
|
|
705
707
|
*
|
|
706
708
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/srcElement)
|
|
@@ -713,45 +715,45 @@ declare class Event {
|
|
|
713
715
|
*/
|
|
714
716
|
get timeStamp(): number;
|
|
715
717
|
/**
|
|
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
|
|
718
|
+
* 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
719
|
*
|
|
718
720
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/isTrusted)
|
|
719
721
|
*/
|
|
720
722
|
get isTrusted(): boolean;
|
|
721
723
|
/**
|
|
722
|
-
* The **`cancelBubble`** property of the Event interface is deprecated.
|
|
724
|
+
* 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
725
|
* @deprecated
|
|
724
726
|
*
|
|
725
727
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelBubble)
|
|
726
728
|
*/
|
|
727
729
|
get cancelBubble(): boolean;
|
|
728
730
|
/**
|
|
729
|
-
* The **`cancelBubble`** property of the Event interface is deprecated.
|
|
731
|
+
* 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
732
|
* @deprecated
|
|
731
733
|
*
|
|
732
734
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelBubble)
|
|
733
735
|
*/
|
|
734
736
|
set cancelBubble(value: boolean);
|
|
735
737
|
/**
|
|
736
|
-
* The **`stopImmediatePropagation()`** method of the
|
|
738
|
+
* The **`stopImmediatePropagation()`** method of the Event interface prevents other listeners of the same event from being called.
|
|
737
739
|
*
|
|
738
740
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopImmediatePropagation)
|
|
739
741
|
*/
|
|
740
742
|
stopImmediatePropagation(): void;
|
|
741
743
|
/**
|
|
742
|
-
* The **`preventDefault()`** method of the Event interface tells the user agent that
|
|
744
|
+
* 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
745
|
*
|
|
744
746
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/preventDefault)
|
|
745
747
|
*/
|
|
746
748
|
preventDefault(): void;
|
|
747
749
|
/**
|
|
748
|
-
* The **`stopPropagation()`** method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.
|
|
750
|
+
* 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
751
|
*
|
|
750
752
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopPropagation)
|
|
751
753
|
*/
|
|
752
754
|
stopPropagation(): void;
|
|
753
755
|
/**
|
|
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.
|
|
756
|
+
* 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
757
|
*
|
|
756
758
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composedPath)
|
|
757
759
|
*/
|
|
@@ -772,7 +774,7 @@ interface EventListenerObject<EventType extends Event = Event> {
|
|
|
772
774
|
}
|
|
773
775
|
type EventListenerOrEventListenerObject<EventType extends Event = Event> = EventListener<EventType> | EventListenerObject<EventType>;
|
|
774
776
|
/**
|
|
775
|
-
* The **`EventTarget`** interface is implemented by objects that can receive events and may have listeners for them.
|
|
777
|
+
* 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
778
|
*
|
|
777
779
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget)
|
|
778
780
|
*/
|
|
@@ -785,13 +787,13 @@ declare class EventTarget<EventMap extends Record<string, Event> = Record<string
|
|
|
785
787
|
*/
|
|
786
788
|
addEventListener<Type extends keyof EventMap>(type: Type, handler: EventListenerOrEventListenerObject<EventMap[Type]>, options?: EventTargetAddEventListenerOptions | boolean): void;
|
|
787
789
|
/**
|
|
788
|
-
* The **`removeEventListener()`** method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target.
|
|
790
|
+
* 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
791
|
*
|
|
790
792
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/removeEventListener)
|
|
791
793
|
*/
|
|
792
794
|
removeEventListener<Type extends keyof EventMap>(type: Type, handler: EventListenerOrEventListenerObject<EventMap[Type]>, options?: EventTargetEventListenerOptions | boolean): void;
|
|
793
795
|
/**
|
|
794
|
-
* The **`dispatchEvent()`** method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order.
|
|
796
|
+
* 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
797
|
*
|
|
796
798
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/dispatchEvent)
|
|
797
799
|
*/
|
|
@@ -823,7 +825,7 @@ declare class AbortController {
|
|
|
823
825
|
*/
|
|
824
826
|
get signal(): AbortSignal;
|
|
825
827
|
/**
|
|
826
|
-
* The **`abort()`** method of the AbortController interface aborts an asynchronous operation before it has completed.
|
|
828
|
+
* 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
829
|
*
|
|
828
830
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortController/abort)
|
|
829
831
|
*/
|
|
@@ -836,7 +838,7 @@ declare class AbortController {
|
|
|
836
838
|
*/
|
|
837
839
|
declare abstract class AbortSignal extends EventTarget {
|
|
838
840
|
/**
|
|
839
|
-
* The **`AbortSignal.abort()`** static method returns an AbortSignal that is already set as aborted (and which does not trigger an
|
|
841
|
+
* The **`AbortSignal.abort()`** static method returns an AbortSignal that is already set as aborted (and which does not trigger an abort event).
|
|
840
842
|
*
|
|
841
843
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_static)
|
|
842
844
|
*/
|
|
@@ -848,13 +850,13 @@ declare abstract class AbortSignal extends EventTarget {
|
|
|
848
850
|
*/
|
|
849
851
|
static timeout(delay: number): AbortSignal;
|
|
850
852
|
/**
|
|
851
|
-
* The **`AbortSignal.any()`** static method takes an iterable of abort signals and returns an AbortSignal.
|
|
853
|
+
* 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
854
|
*
|
|
853
855
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/any_static)
|
|
854
856
|
*/
|
|
855
857
|
static any(signals: AbortSignal[]): AbortSignal;
|
|
856
858
|
/**
|
|
857
|
-
* The **`aborted`** read-only property returns a value that indicates whether the asynchronous operations the signal is communicating with are aborted (
|
|
859
|
+
* 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
860
|
*
|
|
859
861
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/aborted)
|
|
860
862
|
*/
|
|
@@ -870,12 +872,17 @@ declare abstract class AbortSignal extends EventTarget {
|
|
|
870
872
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_event) */
|
|
871
873
|
set onabort(value: any | null);
|
|
872
874
|
/**
|
|
873
|
-
* The **`throwIfAborted()`** method throws the signal's abort
|
|
875
|
+
* The **`throwIfAborted()`** method throws the signal's abort reason if the signal has been aborted; otherwise it does nothing.
|
|
874
876
|
*
|
|
875
877
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/throwIfAborted)
|
|
876
878
|
*/
|
|
877
879
|
throwIfAborted(): void;
|
|
878
880
|
}
|
|
881
|
+
/**
|
|
882
|
+
* The **`Scheduler`** interface of the Prioritized Task Scheduling API provides methods for scheduling prioritized tasks.
|
|
883
|
+
*
|
|
884
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Scheduler)
|
|
885
|
+
*/
|
|
879
886
|
interface Scheduler {
|
|
880
887
|
wait(delay: number, maybeOptions?: SchedulerWaitOptions): Promise<void>;
|
|
881
888
|
}
|
|
@@ -883,20 +890,20 @@ interface SchedulerWaitOptions {
|
|
|
883
890
|
signal?: AbortSignal;
|
|
884
891
|
}
|
|
885
892
|
/**
|
|
886
|
-
* The **`ExtendableEvent`** interface extends the lifetime of the
|
|
893
|
+
* 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
894
|
*
|
|
888
895
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ExtendableEvent)
|
|
889
896
|
*/
|
|
890
897
|
declare abstract class ExtendableEvent extends Event {
|
|
891
898
|
/**
|
|
892
|
-
* The **`ExtendableEvent.waitUntil()`** method tells the event dispatcher that work is ongoing.
|
|
899
|
+
* 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
900
|
*
|
|
894
901
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ExtendableEvent/waitUntil)
|
|
895
902
|
*/
|
|
896
903
|
waitUntil(promise: Promise<any>): void;
|
|
897
904
|
}
|
|
898
905
|
/**
|
|
899
|
-
* The **`CustomEvent`** interface
|
|
906
|
+
* The **`CustomEvent`** interface can be used to attach custom data to an event generated by an application.
|
|
900
907
|
*
|
|
901
908
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomEvent)
|
|
902
909
|
*/
|
|
@@ -935,7 +942,7 @@ declare class Blob {
|
|
|
935
942
|
*/
|
|
936
943
|
get type(): string;
|
|
937
944
|
/**
|
|
938
|
-
* The **`slice()`** method of the Blob interface creates and returns a new
|
|
945
|
+
* 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
946
|
*
|
|
940
947
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice)
|
|
941
948
|
*/
|
|
@@ -953,13 +960,13 @@ declare class Blob {
|
|
|
953
960
|
*/
|
|
954
961
|
bytes(): Promise<Uint8Array>;
|
|
955
962
|
/**
|
|
956
|
-
* The **`text()`** method of the string containing the contents of the blob, interpreted as UTF-8.
|
|
963
|
+
* 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
964
|
*
|
|
958
965
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text)
|
|
959
966
|
*/
|
|
960
967
|
text(): Promise<string>;
|
|
961
968
|
/**
|
|
962
|
-
* The **`stream()`** method of the Blob interface returns a ReadableStream which upon reading returns the data contained within the
|
|
969
|
+
* The **`stream()`** method of the Blob interface returns a ReadableStream which upon reading returns the data contained within the Blob.
|
|
963
970
|
*
|
|
964
971
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/stream)
|
|
965
972
|
*/
|
|
@@ -976,13 +983,13 @@ interface BlobOptions {
|
|
|
976
983
|
declare class File extends Blob {
|
|
977
984
|
constructor(bits: ((ArrayBuffer | ArrayBufferView) | string | Blob)[] | undefined, name: string, options?: FileOptions);
|
|
978
985
|
/**
|
|
979
|
-
* The **`name`** read-only property of the File interface returns the name of the file represented by a File object.
|
|
986
|
+
* 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
987
|
*
|
|
981
988
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/name)
|
|
982
989
|
*/
|
|
983
990
|
get name(): string;
|
|
984
991
|
/**
|
|
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).
|
|
992
|
+
* 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
993
|
*
|
|
987
994
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/lastModified)
|
|
988
995
|
*/
|
|
@@ -999,7 +1006,7 @@ interface FileOptions {
|
|
|
999
1006
|
*/
|
|
1000
1007
|
declare abstract class CacheStorage {
|
|
1001
1008
|
/**
|
|
1002
|
-
* The **`open()`** method of the the Cache object matching the
|
|
1009
|
+
* The **`open()`** method of the CacheStorage interface returns a Promise that resolves to the Cache object matching the cacheName.
|
|
1003
1010
|
*
|
|
1004
1011
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CacheStorage/open)
|
|
1005
1012
|
*/
|
|
@@ -1032,14 +1039,14 @@ interface CacheQueryOptions {
|
|
|
1032
1039
|
*/
|
|
1033
1040
|
declare abstract class Crypto {
|
|
1034
1041
|
/**
|
|
1035
|
-
* The **`Crypto.subtle`** read-only property returns a cryptographic operations.
|
|
1042
|
+
* The **`Crypto.subtle`** read-only property returns a SubtleCrypto which can then be used to perform low-level cryptographic operations.
|
|
1036
1043
|
* Available only in secure contexts.
|
|
1037
1044
|
*
|
|
1038
1045
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/subtle)
|
|
1039
1046
|
*/
|
|
1040
1047
|
get subtle(): SubtleCrypto;
|
|
1041
1048
|
/**
|
|
1042
|
-
* The **`Crypto.getRandomValues()`** method lets you get cryptographically strong random values.
|
|
1049
|
+
* 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
1050
|
*
|
|
1044
1051
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/getRandomValues)
|
|
1045
1052
|
*/
|
|
@@ -1067,7 +1074,7 @@ declare abstract class SubtleCrypto {
|
|
|
1067
1074
|
*/
|
|
1068
1075
|
encrypt(algorithm: string | SubtleCryptoEncryptAlgorithm, key: CryptoKey, plainText: ArrayBuffer | ArrayBufferView): Promise<ArrayBuffer>;
|
|
1069
1076
|
/**
|
|
1070
|
-
* The **`decrypt()`** method of the SubtleCrypto interface decrypts some encrypted data.
|
|
1077
|
+
* 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
1078
|
*
|
|
1072
1079
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/decrypt)
|
|
1073
1080
|
*/
|
|
@@ -1085,7 +1092,7 @@ declare abstract class SubtleCrypto {
|
|
|
1085
1092
|
*/
|
|
1086
1093
|
verify(algorithm: string | SubtleCryptoSignAlgorithm, key: CryptoKey, signature: ArrayBuffer | ArrayBufferView, data: ArrayBuffer | ArrayBufferView): Promise<boolean>;
|
|
1087
1094
|
/**
|
|
1088
|
-
* The **`digest()`** method of the SubtleCrypto interface generates a
|
|
1095
|
+
* 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
1096
|
*
|
|
1090
1097
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/digest)
|
|
1091
1098
|
*/
|
|
@@ -1103,7 +1110,7 @@ declare abstract class SubtleCrypto {
|
|
|
1103
1110
|
*/
|
|
1104
1111
|
deriveKey(algorithm: string | SubtleCryptoDeriveKeyAlgorithm, baseKey: CryptoKey, derivedKeyAlgorithm: string | SubtleCryptoImportKeyAlgorithm, extractable: boolean, keyUsages: string[]): Promise<CryptoKey>;
|
|
1105
1112
|
/**
|
|
1106
|
-
* The **`deriveBits()`** method of the key.
|
|
1113
|
+
* The **`deriveBits()`** method of the SubtleCrypto interface can be used to derive an array of bits from a base key.
|
|
1107
1114
|
*
|
|
1108
1115
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveBits)
|
|
1109
1116
|
*/
|
|
@@ -1121,13 +1128,13 @@ declare abstract class SubtleCrypto {
|
|
|
1121
1128
|
*/
|
|
1122
1129
|
exportKey(format: string, key: CryptoKey): Promise<ArrayBuffer | JsonWebKey>;
|
|
1123
1130
|
/**
|
|
1124
|
-
* The **`wrapKey()`** method of the SubtleCrypto interface
|
|
1131
|
+
* 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
1132
|
*
|
|
1126
1133
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/wrapKey)
|
|
1127
1134
|
*/
|
|
1128
1135
|
wrapKey(format: string, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: string | SubtleCryptoEncryptAlgorithm): Promise<ArrayBuffer>;
|
|
1129
1136
|
/**
|
|
1130
|
-
* The **`unwrapKey()`** method of the SubtleCrypto interface
|
|
1137
|
+
* 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
1138
|
*
|
|
1132
1139
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/unwrapKey)
|
|
1133
1140
|
*/
|
|
@@ -1135,20 +1142,20 @@ declare abstract class SubtleCrypto {
|
|
|
1135
1142
|
timingSafeEqual(a: ArrayBuffer | ArrayBufferView, b: ArrayBuffer | ArrayBufferView): boolean;
|
|
1136
1143
|
}
|
|
1137
1144
|
/**
|
|
1138
|
-
* The **`CryptoKey`** interface of the Web Crypto API represents a cryptographic key obtained from one of the SubtleCrypto methods
|
|
1145
|
+
* 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
1146
|
* Available only in secure contexts.
|
|
1140
1147
|
*
|
|
1141
1148
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey)
|
|
1142
1149
|
*/
|
|
1143
1150
|
declare abstract class CryptoKey {
|
|
1144
1151
|
/**
|
|
1145
|
-
* The read-only **`type`** property of the CryptoKey interface indicates which kind of key is represented by the object.
|
|
1152
|
+
* 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
1153
|
*
|
|
1147
1154
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/type)
|
|
1148
1155
|
*/
|
|
1149
1156
|
readonly type: string;
|
|
1150
1157
|
/**
|
|
1151
|
-
* The read-only **`extractable`** property of the CryptoKey interface indicates whether or not the key may be extracted using
|
|
1158
|
+
* 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
1159
|
*
|
|
1153
1160
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/extractable)
|
|
1154
1161
|
*/
|
|
@@ -1270,7 +1277,7 @@ declare class DigestStream extends WritableStream<ArrayBuffer | ArrayBufferView>
|
|
|
1270
1277
|
get bytesWritten(): number | bigint;
|
|
1271
1278
|
}
|
|
1272
1279
|
/**
|
|
1273
|
-
* The **`TextDecoder`** interface represents a decoder for a specific text encoding, such as
|
|
1280
|
+
* 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
1281
|
*
|
|
1275
1282
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoder)
|
|
1276
1283
|
*/
|
|
@@ -1287,20 +1294,20 @@ declare class TextDecoder {
|
|
|
1287
1294
|
get ignoreBOM(): boolean;
|
|
1288
1295
|
}
|
|
1289
1296
|
/**
|
|
1290
|
-
* The **`TextEncoder`** interface
|
|
1297
|
+
* The **`TextEncoder`** interface enables you to encode a JavaScript string using UTF-8.
|
|
1291
1298
|
*
|
|
1292
1299
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder)
|
|
1293
1300
|
*/
|
|
1294
1301
|
declare class TextEncoder {
|
|
1295
1302
|
constructor();
|
|
1296
1303
|
/**
|
|
1297
|
-
* The **`TextEncoder.encode()`** method takes a string as input, and returns a
|
|
1304
|
+
* The **`TextEncoder.encode()`** method takes a string as input, and returns a Uint8Array containing the string encoded using UTF-8.
|
|
1298
1305
|
*
|
|
1299
1306
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder/encode)
|
|
1300
1307
|
*/
|
|
1301
1308
|
encode(input?: string): Uint8Array;
|
|
1302
1309
|
/**
|
|
1303
|
-
* The **`TextEncoder.encodeInto()`** method takes a string to encode and a destination Uint8Array to put resulting UTF-8 encoded text into, and returns
|
|
1310
|
+
* 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
1311
|
*
|
|
1305
1312
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder/encodeInto)
|
|
1306
1313
|
*/
|
|
@@ -1371,31 +1378,31 @@ interface ErrorEventErrorEventInit {
|
|
|
1371
1378
|
declare class MessageEvent extends Event {
|
|
1372
1379
|
constructor(type: string, initializer: MessageEventInit);
|
|
1373
1380
|
/**
|
|
1374
|
-
* The **`data`** read-only property of the
|
|
1381
|
+
* The **`data`** read-only property of the MessageEvent interface represents the data sent by the message emitter.
|
|
1375
1382
|
*
|
|
1376
1383
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/data)
|
|
1377
1384
|
*/
|
|
1378
1385
|
readonly data: any;
|
|
1379
1386
|
/**
|
|
1380
|
-
* The **`origin`** read-only property of the origin of the message emitter.
|
|
1387
|
+
* The **`origin`** read-only property of the MessageEvent interface is a string representing the origin of the message emitter.
|
|
1381
1388
|
*
|
|
1382
1389
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/origin)
|
|
1383
1390
|
*/
|
|
1384
1391
|
readonly origin: string | null;
|
|
1385
1392
|
/**
|
|
1386
|
-
* The **`lastEventId`** read-only property of the unique ID for the event.
|
|
1393
|
+
* The **`lastEventId`** read-only property of the MessageEvent interface is a string representing a unique ID for the event.
|
|
1387
1394
|
*
|
|
1388
1395
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/lastEventId)
|
|
1389
1396
|
*/
|
|
1390
1397
|
readonly lastEventId: string;
|
|
1391
1398
|
/**
|
|
1392
|
-
* The **`source`** read-only property of the
|
|
1399
|
+
* 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
1400
|
*
|
|
1394
1401
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/source)
|
|
1395
1402
|
*/
|
|
1396
1403
|
readonly source: MessagePort | null;
|
|
1397
1404
|
/**
|
|
1398
|
-
* The **`ports`** read-only property of the containing all MessagePort objects sent with the message, in order.
|
|
1405
|
+
* 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
1406
|
*
|
|
1400
1407
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/ports)
|
|
1401
1408
|
*/
|
|
@@ -1405,99 +1412,96 @@ interface MessageEventInit {
|
|
|
1405
1412
|
data: ArrayBuffer | string;
|
|
1406
1413
|
}
|
|
1407
1414
|
/**
|
|
1408
|
-
* The **`PromiseRejectionEvent`** interface represents events which are sent to the global script context when JavaScript Promises are rejected.
|
|
1415
|
+
* 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
1416
|
*
|
|
1410
1417
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent)
|
|
1411
1418
|
*/
|
|
1412
1419
|
declare abstract class PromiseRejectionEvent extends Event {
|
|
1413
1420
|
/**
|
|
1414
|
-
* The PromiseRejectionEvent interface's **`promise`** read-only property indicates the JavaScript rejected.
|
|
1421
|
+
* 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
1422
|
*
|
|
1416
1423
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/promise)
|
|
1417
1424
|
*/
|
|
1418
1425
|
readonly promise: Promise<any>;
|
|
1419
1426
|
/**
|
|
1420
|
-
* The PromiseRejectionEvent **`reason`** read-only property is any JavaScript value or Object which provides the reason passed into Promise.reject().
|
|
1427
|
+
* 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
1428
|
*
|
|
1422
1429
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/reason)
|
|
1423
1430
|
*/
|
|
1424
1431
|
readonly reason: any;
|
|
1425
1432
|
}
|
|
1426
1433
|
/**
|
|
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
|
|
1434
|
+
* 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
1435
|
*
|
|
1429
1436
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData)
|
|
1430
1437
|
*/
|
|
1431
1438
|
declare class FormData {
|
|
1432
1439
|
constructor();
|
|
1433
1440
|
/**
|
|
1434
|
-
* The **`append()`** method of the FormData interface appends a new value onto an existing key inside a
|
|
1441
|
+
* 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
1442
|
*
|
|
1436
1443
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/append)
|
|
1437
1444
|
*/
|
|
1438
1445
|
append(name: string, value: string | Blob): void;
|
|
1439
1446
|
/**
|
|
1440
|
-
* The **`append()`** method of the FormData interface appends a new value onto an existing key inside a
|
|
1447
|
+
* 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
1448
|
*
|
|
1442
1449
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/append)
|
|
1443
1450
|
*/
|
|
1444
1451
|
append(name: string, value: string): void;
|
|
1445
1452
|
/**
|
|
1446
|
-
* The **`append()`** method of the FormData interface appends a new value onto an existing key inside a
|
|
1453
|
+
* 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
1454
|
*
|
|
1448
1455
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/append)
|
|
1449
1456
|
*/
|
|
1450
1457
|
append(name: string, value: Blob, filename?: string): void;
|
|
1451
1458
|
/**
|
|
1452
|
-
* The **`delete()`** method of the FormData interface deletes a key and its value(s) from a
|
|
1459
|
+
* The **`delete()`** method of the FormData interface deletes a key and its value(s) from a FormData object.
|
|
1453
1460
|
*
|
|
1454
1461
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/delete)
|
|
1455
1462
|
*/
|
|
1456
1463
|
delete(name: string): void;
|
|
1457
1464
|
/**
|
|
1458
|
-
* The **`get()`** method of the FormData interface returns the first value associated with a given key from within a
|
|
1465
|
+
* 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
1466
|
*
|
|
1460
1467
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/get)
|
|
1461
1468
|
*/
|
|
1462
1469
|
get(name: string): (File | string) | null;
|
|
1463
1470
|
/**
|
|
1464
|
-
* The **`getAll()`** method of the FormData interface returns all the values associated with a given key from within a
|
|
1471
|
+
* The **`getAll()`** method of the FormData interface returns all the values associated with a given key from within a FormData object.
|
|
1465
1472
|
*
|
|
1466
1473
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/getAll)
|
|
1467
1474
|
*/
|
|
1468
1475
|
getAll(name: string): (File | string)[];
|
|
1469
1476
|
/**
|
|
1470
|
-
* The **`has()`** method of the FormData interface returns whether a
|
|
1477
|
+
* The **`has()`** method of the FormData interface returns whether a FormData object contains a certain key.
|
|
1471
1478
|
*
|
|
1472
1479
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/has)
|
|
1473
1480
|
*/
|
|
1474
1481
|
has(name: string): boolean;
|
|
1475
1482
|
/**
|
|
1476
|
-
* The **`set()`** method of the FormData interface sets a new value for an existing key inside a
|
|
1483
|
+
* 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
1484
|
*
|
|
1478
1485
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/set)
|
|
1479
1486
|
*/
|
|
1480
1487
|
set(name: string, value: string | Blob): void;
|
|
1481
1488
|
/**
|
|
1482
|
-
* The **`set()`** method of the FormData interface sets a new value for an existing key inside a
|
|
1489
|
+
* 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
1490
|
*
|
|
1484
1491
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/set)
|
|
1485
1492
|
*/
|
|
1486
1493
|
set(name: string, value: string): void;
|
|
1487
1494
|
/**
|
|
1488
|
-
* The **`set()`** method of the FormData interface sets a new value for an existing key inside a
|
|
1495
|
+
* 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
1496
|
*
|
|
1490
1497
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/set)
|
|
1491
1498
|
*/
|
|
1492
1499
|
set(name: string, value: Blob, filename?: string): void;
|
|
1493
|
-
/* Returns an array of key, value pairs for every entry in the list. */
|
|
1494
1500
|
entries(): IterableIterator<[
|
|
1495
1501
|
key: string,
|
|
1496
1502
|
value: File | string
|
|
1497
1503
|
]>;
|
|
1498
|
-
/* Returns a list of keys in the list. */
|
|
1499
1504
|
keys(): IterableIterator<string>;
|
|
1500
|
-
/* Returns a list of values in the list. */
|
|
1501
1505
|
values(): IterableIterator<(File | string)>;
|
|
1502
1506
|
forEach<This = unknown>(callback: (this: This, value: File | string, key: string, parent: FormData) => void, thisArg?: This): void;
|
|
1503
1507
|
[Symbol.iterator](): IterableIterator<[
|
|
@@ -1576,19 +1580,19 @@ interface DocumentEnd {
|
|
|
1576
1580
|
append(content: string, options?: ContentOptions): DocumentEnd;
|
|
1577
1581
|
}
|
|
1578
1582
|
/**
|
|
1579
|
-
* This is the event type for
|
|
1583
|
+
* 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
1584
|
*
|
|
1581
1585
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent)
|
|
1582
1586
|
*/
|
|
1583
1587
|
declare abstract class FetchEvent extends ExtendableEvent {
|
|
1584
1588
|
/**
|
|
1585
|
-
* The **`request`** read-only property of the the event handler.
|
|
1589
|
+
* The **`request`** read-only property of the FetchEvent interface returns the Request that triggered the event handler.
|
|
1586
1590
|
*
|
|
1587
1591
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/request)
|
|
1588
1592
|
*/
|
|
1589
1593
|
readonly request: Request;
|
|
1590
1594
|
/**
|
|
1591
|
-
* The **`respondWith()`** method of allows you to provide a promise for a Response yourself.
|
|
1595
|
+
* The **`respondWith()`** method of FetchEvent prevents the browser's default fetch handling, and allows you to provide a promise for a Response yourself.
|
|
1592
1596
|
*
|
|
1593
1597
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/respondWith)
|
|
1594
1598
|
*/
|
|
@@ -1597,58 +1601,55 @@ declare abstract class FetchEvent extends ExtendableEvent {
|
|
|
1597
1601
|
}
|
|
1598
1602
|
type HeadersInit = Headers | Iterable<Iterable<string>> | Record<string, string>;
|
|
1599
1603
|
/**
|
|
1600
|
-
* The **`Headers`** interface of the Fetch API allows you to perform various actions on HTTP request and response headers.
|
|
1604
|
+
* 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
1605
|
*
|
|
1602
1606
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers)
|
|
1603
1607
|
*/
|
|
1604
1608
|
declare class Headers {
|
|
1605
1609
|
constructor(init?: HeadersInit);
|
|
1606
1610
|
/**
|
|
1607
|
-
* The **`get()`** method of the Headers interface returns a byte string of all the values of a header within a
|
|
1611
|
+
* 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
1612
|
*
|
|
1609
1613
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/get)
|
|
1610
1614
|
*/
|
|
1611
1615
|
get(name: string): string | null;
|
|
1612
1616
|
getAll(name: string): string[];
|
|
1613
1617
|
/**
|
|
1614
|
-
* The **`getSetCookie()`** method of the Headers interface returns an array containing the values of all Set-Cookie headers associated with a response.
|
|
1618
|
+
* 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
1619
|
*
|
|
1616
1620
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/getSetCookie)
|
|
1617
1621
|
*/
|
|
1618
1622
|
getSetCookie(): string[];
|
|
1619
1623
|
/**
|
|
1620
|
-
* The **`has()`** method of the Headers interface returns a boolean stating whether a
|
|
1624
|
+
* The **`has()`** method of the Headers interface returns a boolean stating whether a Headers object contains a certain header.
|
|
1621
1625
|
*
|
|
1622
1626
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/has)
|
|
1623
1627
|
*/
|
|
1624
1628
|
has(name: string): boolean;
|
|
1625
1629
|
/**
|
|
1626
|
-
* The **`set()`** method of the Headers interface sets a new value for an existing header inside a
|
|
1630
|
+
* 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
1631
|
*
|
|
1628
1632
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/set)
|
|
1629
1633
|
*/
|
|
1630
1634
|
set(name: string, value: string): void;
|
|
1631
1635
|
/**
|
|
1632
|
-
* The **`append()`** method of the Headers interface appends a new value onto an existing header inside a
|
|
1636
|
+
* 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
1637
|
*
|
|
1634
1638
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/append)
|
|
1635
1639
|
*/
|
|
1636
1640
|
append(name: string, value: string): void;
|
|
1637
1641
|
/**
|
|
1638
|
-
* The **`delete()`** method of the Headers interface deletes a header from the current
|
|
1642
|
+
* The **`delete()`** method of the Headers interface deletes a header from the current Headers object.
|
|
1639
1643
|
*
|
|
1640
1644
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/delete)
|
|
1641
1645
|
*/
|
|
1642
1646
|
delete(name: string): void;
|
|
1643
1647
|
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
1648
|
entries(): IterableIterator<[
|
|
1646
1649
|
key: string,
|
|
1647
1650
|
value: string
|
|
1648
1651
|
]>;
|
|
1649
|
-
/* Returns an iterator allowing to go through all keys of the key/value pairs contained in this object. */
|
|
1650
1652
|
keys(): IterableIterator<string>;
|
|
1651
|
-
/* Returns an iterator allowing to go through all values of the key/value pairs contained in this object. */
|
|
1652
1653
|
values(): IterableIterator<string>;
|
|
1653
1654
|
[Symbol.iterator](): IterableIterator<[
|
|
1654
1655
|
key: string,
|
|
@@ -1711,7 +1712,7 @@ interface Response extends Body {
|
|
|
1711
1712
|
*/
|
|
1712
1713
|
statusText: string;
|
|
1713
1714
|
/**
|
|
1714
|
-
* The **`headers`** read-only property of the with the response.
|
|
1715
|
+
* The **`headers`** read-only property of the Response interface contains the Headers object associated with the response.
|
|
1715
1716
|
*
|
|
1716
1717
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/headers)
|
|
1717
1718
|
*/
|
|
@@ -1729,7 +1730,7 @@ interface Response extends Body {
|
|
|
1729
1730
|
*/
|
|
1730
1731
|
redirected: boolean;
|
|
1731
1732
|
/**
|
|
1732
|
-
* The **`url`** read-only property of the Response interface contains the URL of the response.
|
|
1733
|
+
* 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
1734
|
*
|
|
1734
1735
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/url)
|
|
1735
1736
|
*/
|
|
@@ -1737,7 +1738,7 @@ interface Response extends Body {
|
|
|
1737
1738
|
webSocket: WebSocket | null;
|
|
1738
1739
|
cf: any | undefined;
|
|
1739
1740
|
/**
|
|
1740
|
-
* The **`type`** read-only property of the Response interface contains the type of the response.
|
|
1741
|
+
* 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
1742
|
*
|
|
1742
1743
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/type)
|
|
1743
1744
|
*/
|
|
@@ -1768,13 +1769,13 @@ declare var Request: {
|
|
|
1768
1769
|
*/
|
|
1769
1770
|
interface Request<CfHostMetadata = unknown, Cf = CfProperties<CfHostMetadata>> extends Body {
|
|
1770
1771
|
/**
|
|
1771
|
-
* The **`clone()`** method of the Request interface creates a copy of the current
|
|
1772
|
+
* The **`clone()`** method of the Request interface creates a copy of the current Request object.
|
|
1772
1773
|
*
|
|
1773
1774
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/clone)
|
|
1774
1775
|
*/
|
|
1775
1776
|
clone(): Request<CfHostMetadata, Cf>;
|
|
1776
1777
|
/**
|
|
1777
|
-
* The **`method`** read-only property of the
|
|
1778
|
+
* The **`method`** read-only property of the Request interface contains the request's method (GET, POST, etc.)
|
|
1778
1779
|
*
|
|
1779
1780
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/method)
|
|
1780
1781
|
*/
|
|
@@ -1786,7 +1787,7 @@ interface Request<CfHostMetadata = unknown, Cf = CfProperties<CfHostMetadata>> e
|
|
|
1786
1787
|
*/
|
|
1787
1788
|
url: string;
|
|
1788
1789
|
/**
|
|
1789
|
-
* The **`headers`** read-only property of the with the request.
|
|
1790
|
+
* The **`headers`** read-only property of the Request interface contains the Headers object associated with the request.
|
|
1790
1791
|
*
|
|
1791
1792
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/headers)
|
|
1792
1793
|
*/
|
|
@@ -1812,13 +1813,13 @@ interface Request<CfHostMetadata = unknown, Cf = CfProperties<CfHostMetadata>> e
|
|
|
1812
1813
|
*/
|
|
1813
1814
|
integrity: string;
|
|
1814
1815
|
/**
|
|
1815
|
-
* The **`keepalive`** read-only property of the Request interface contains the request's
|
|
1816
|
+
* 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
1817
|
*
|
|
1817
1818
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/keepalive)
|
|
1818
1819
|
*/
|
|
1819
1820
|
keepalive: boolean;
|
|
1820
1821
|
/**
|
|
1821
|
-
* The **`cache`** read-only property of the Request interface contains the cache mode of the request.
|
|
1822
|
+
* 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
1823
|
*
|
|
1823
1824
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/cache)
|
|
1824
1825
|
*/
|
|
@@ -2207,7 +2208,7 @@ type ReadableStreamReadResult<R = any> = {
|
|
|
2207
2208
|
value?: undefined;
|
|
2208
2209
|
};
|
|
2209
2210
|
/**
|
|
2210
|
-
* The
|
|
2211
|
+
* 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
2212
|
*
|
|
2212
2213
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream)
|
|
2213
2214
|
*/
|
|
@@ -2225,13 +2226,13 @@ interface ReadableStream<R = any> {
|
|
|
2225
2226
|
*/
|
|
2226
2227
|
cancel(reason?: any): Promise<void>;
|
|
2227
2228
|
/**
|
|
2228
|
-
* The **`getReader()`** method of the ReadableStream interface creates a reader and locks the stream to it.
|
|
2229
|
+
* 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
2230
|
*
|
|
2230
2231
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/getReader)
|
|
2231
2232
|
*/
|
|
2232
2233
|
getReader(): ReadableStreamDefaultReader<R>;
|
|
2233
2234
|
/**
|
|
2234
|
-
* The **`getReader()`** method of the ReadableStream interface creates a reader and locks the stream to it.
|
|
2235
|
+
* 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
2236
|
*
|
|
2236
2237
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/getReader)
|
|
2237
2238
|
*/
|
|
@@ -2243,13 +2244,13 @@ interface ReadableStream<R = any> {
|
|
|
2243
2244
|
*/
|
|
2244
2245
|
pipeThrough<T>(transform: ReadableWritablePair<T, R>, options?: StreamPipeOptions): ReadableStream<T>;
|
|
2245
2246
|
/**
|
|
2246
|
-
* The **`pipeTo()`** method of the ReadableStream interface pipes the current
|
|
2247
|
+
* 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
2248
|
*
|
|
2248
2249
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeTo)
|
|
2249
2250
|
*/
|
|
2250
2251
|
pipeTo(destination: WritableStream<R>, options?: StreamPipeOptions): Promise<void>;
|
|
2251
2252
|
/**
|
|
2252
|
-
* The **`tee()`** method of the two-element array containing the two resulting branches as new ReadableStream instances.
|
|
2253
|
+
* 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
2254
|
*
|
|
2254
2255
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/tee)
|
|
2255
2256
|
*/
|
|
@@ -2261,7 +2262,7 @@ interface ReadableStream<R = any> {
|
|
|
2261
2262
|
[Symbol.asyncIterator](options?: ReadableStreamValuesOptions): AsyncIterableIterator<R>;
|
|
2262
2263
|
}
|
|
2263
2264
|
/**
|
|
2264
|
-
* The
|
|
2265
|
+
* 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
2266
|
*
|
|
2266
2267
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream)
|
|
2267
2268
|
*/
|
|
@@ -2293,7 +2294,7 @@ declare class ReadableStreamDefaultReader<R = any> {
|
|
|
2293
2294
|
releaseLock(): void;
|
|
2294
2295
|
}
|
|
2295
2296
|
/**
|
|
2296
|
-
* The
|
|
2297
|
+
* 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
2298
|
*
|
|
2298
2299
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader)
|
|
2299
2300
|
*/
|
|
@@ -2302,13 +2303,13 @@ declare class ReadableStreamBYOBReader {
|
|
|
2302
2303
|
get closed(): Promise<void>;
|
|
2303
2304
|
cancel(reason?: any): Promise<void>;
|
|
2304
2305
|
/**
|
|
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.
|
|
2306
|
+
* 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
2307
|
*
|
|
2307
2308
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/read)
|
|
2308
2309
|
*/
|
|
2309
2310
|
read<T extends ArrayBufferView>(view: T): Promise<ReadableStreamReadResult<T>>;
|
|
2310
2311
|
/**
|
|
2311
|
-
* The **`releaseLock()`** method of the ReadableStreamBYOBReader interface releases the reader's lock on the stream.
|
|
2312
|
+
* 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
2313
|
*
|
|
2313
2314
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/releaseLock)
|
|
2314
2315
|
*/
|
|
@@ -2327,7 +2328,7 @@ interface ReadableStreamGetReaderOptions {
|
|
|
2327
2328
|
mode: "byob";
|
|
2328
2329
|
}
|
|
2329
2330
|
/**
|
|
2330
|
-
* The **`ReadableStreamBYOBRequest`** interface of the Streams API represents a
|
|
2331
|
+
* 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
2332
|
*
|
|
2332
2333
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest)
|
|
2333
2334
|
*/
|
|
@@ -2353,13 +2354,13 @@ declare abstract class ReadableStreamBYOBRequest {
|
|
|
2353
2354
|
get atLeast(): number | null;
|
|
2354
2355
|
}
|
|
2355
2356
|
/**
|
|
2356
|
-
* The **`ReadableStreamDefaultController`** interface of the Streams API represents a controller allowing control of a ReadableStream's state and internal queue.
|
|
2357
|
+
* 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
2358
|
*
|
|
2358
2359
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController)
|
|
2359
2360
|
*/
|
|
2360
2361
|
declare abstract class ReadableStreamDefaultController<R = any> {
|
|
2361
2362
|
/**
|
|
2362
|
-
* The **`desiredSize`** read-only property of the required to fill the stream's internal queue.
|
|
2363
|
+
* The **`desiredSize`** read-only property of the ReadableStreamDefaultController interface returns the desired size required to fill the stream's internal queue.
|
|
2363
2364
|
*
|
|
2364
2365
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/desiredSize)
|
|
2365
2366
|
*/
|
|
@@ -2371,32 +2372,32 @@ declare abstract class ReadableStreamDefaultController<R = any> {
|
|
|
2371
2372
|
*/
|
|
2372
2373
|
close(): void;
|
|
2373
2374
|
/**
|
|
2374
|
-
* The **`enqueue()`** method of the
|
|
2375
|
+
* The **`enqueue()`** method of the ReadableStreamDefaultController interface enqueues a given chunk in the associated stream.
|
|
2375
2376
|
*
|
|
2376
2377
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/enqueue)
|
|
2377
2378
|
*/
|
|
2378
2379
|
enqueue(chunk?: R): void;
|
|
2379
2380
|
/**
|
|
2380
|
-
* The **`error()`** method of the with the associated stream to error.
|
|
2381
|
+
* The **`error()`** method of the ReadableStreamDefaultController interface causes any future interactions with the associated stream to error.
|
|
2381
2382
|
*
|
|
2382
2383
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/error)
|
|
2383
2384
|
*/
|
|
2384
2385
|
error(reason: any): void;
|
|
2385
2386
|
}
|
|
2386
2387
|
/**
|
|
2387
|
-
* The **`ReadableByteStreamController`** interface of the Streams API represents a controller for a readable byte stream.
|
|
2388
|
+
* 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
2389
|
*
|
|
2389
2390
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController)
|
|
2390
2391
|
*/
|
|
2391
2392
|
declare abstract class ReadableByteStreamController {
|
|
2392
2393
|
/**
|
|
2393
|
-
* The **`byobRequest`** read-only property of the ReadableByteStreamController interface returns the current BYOB request, or
|
|
2394
|
+
* The **`byobRequest`** read-only property of the ReadableByteStreamController interface returns the current BYOB request, or null if there are no pending requests.
|
|
2394
2395
|
*
|
|
2395
2396
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/byobRequest)
|
|
2396
2397
|
*/
|
|
2397
2398
|
get byobRequest(): ReadableStreamBYOBRequest | null;
|
|
2398
2399
|
/**
|
|
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
|
|
2400
|
+
* 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
2401
|
*
|
|
2401
2402
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/desiredSize)
|
|
2402
2403
|
*/
|
|
@@ -2408,7 +2409,7 @@ declare abstract class ReadableByteStreamController {
|
|
|
2408
2409
|
*/
|
|
2409
2410
|
close(): void;
|
|
2410
2411
|
/**
|
|
2411
|
-
* The **`enqueue()`** method of the ReadableByteStreamController interface enqueues a given chunk on the associated readable byte stream (the chunk is
|
|
2412
|
+
* 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
2413
|
*
|
|
2413
2414
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/enqueue)
|
|
2414
2415
|
*/
|
|
@@ -2421,7 +2422,7 @@ declare abstract class ReadableByteStreamController {
|
|
|
2421
2422
|
error(reason: any): void;
|
|
2422
2423
|
}
|
|
2423
2424
|
/**
|
|
2424
|
-
* The **`WritableStreamDefaultController`** interface of the Streams API represents a controller allowing control of a WritableStream's state.
|
|
2425
|
+
* 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
2426
|
*
|
|
2426
2427
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController)
|
|
2427
2428
|
*/
|
|
@@ -2433,7 +2434,7 @@ declare abstract class WritableStreamDefaultController {
|
|
|
2433
2434
|
*/
|
|
2434
2435
|
get signal(): AbortSignal;
|
|
2435
2436
|
/**
|
|
2436
|
-
* The **`error()`** method of the with the associated stream to error.
|
|
2437
|
+
* The **`error()`** method of the WritableStreamDefaultController interface causes any future interactions with the associated stream to error.
|
|
2437
2438
|
*
|
|
2438
2439
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/error)
|
|
2439
2440
|
*/
|
|
@@ -2458,7 +2459,7 @@ declare abstract class TransformStreamDefaultController<O = any> {
|
|
|
2458
2459
|
*/
|
|
2459
2460
|
enqueue(chunk?: O): void;
|
|
2460
2461
|
/**
|
|
2461
|
-
* The **`error()`** method of the TransformStreamDefaultController interface errors both sides of the stream.
|
|
2462
|
+
* 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
2463
|
*
|
|
2463
2464
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/error)
|
|
2464
2465
|
*/
|
|
@@ -2480,14 +2481,14 @@ interface ReadableWritablePair<R = any, W = any> {
|
|
|
2480
2481
|
writable: WritableStream<W>;
|
|
2481
2482
|
}
|
|
2482
2483
|
/**
|
|
2483
|
-
* The **`WritableStream`** interface of the Streams API provides a standard abstraction for writing streaming data to a destination, known as a sink.
|
|
2484
|
+
* 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
2485
|
*
|
|
2485
2486
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream)
|
|
2486
2487
|
*/
|
|
2487
2488
|
declare class WritableStream<W = any> {
|
|
2488
2489
|
constructor(underlyingSink?: UnderlyingSink, queuingStrategy?: QueuingStrategy);
|
|
2489
2490
|
/**
|
|
2490
|
-
* The **`locked`** read-only property of the WritableStream interface returns a boolean indicating whether the
|
|
2491
|
+
* The **`locked`** read-only property of the WritableStream interface returns a boolean indicating whether the WritableStream is locked to a writer.
|
|
2491
2492
|
*
|
|
2492
2493
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/locked)
|
|
2493
2494
|
*/
|
|
@@ -2499,83 +2500,83 @@ declare class WritableStream<W = any> {
|
|
|
2499
2500
|
*/
|
|
2500
2501
|
abort(reason?: any): Promise<void>;
|
|
2501
2502
|
/**
|
|
2502
|
-
* The **`close()`** method of the WritableStream interface closes the associated stream.
|
|
2503
|
+
* 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
2504
|
*
|
|
2504
2505
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/close)
|
|
2505
2506
|
*/
|
|
2506
2507
|
close(): Promise<void>;
|
|
2507
2508
|
/**
|
|
2508
|
-
* The **`getWriter()`** method of the WritableStream interface returns a new instance of WritableStreamDefaultWriter and locks the stream to that instance.
|
|
2509
|
+
* 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
2510
|
*
|
|
2510
2511
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/getWriter)
|
|
2511
2512
|
*/
|
|
2512
2513
|
getWriter(): WritableStreamDefaultWriter<W>;
|
|
2513
2514
|
}
|
|
2514
2515
|
/**
|
|
2515
|
-
* The **`WritableStreamDefaultWriter`** interface of the Streams API is the object returned by WritableStream.getWriter() and once created locks the writer to the
|
|
2516
|
+
* 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
2517
|
*
|
|
2517
2518
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter)
|
|
2518
2519
|
*/
|
|
2519
2520
|
declare class WritableStreamDefaultWriter<W = any> {
|
|
2520
2521
|
constructor(stream: WritableStream);
|
|
2521
2522
|
/**
|
|
2522
|
-
* The **`closed`** read-only property of the the stream errors or the writer's lock is released.
|
|
2523
|
+
* 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
2524
|
*
|
|
2524
2525
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/closed)
|
|
2525
2526
|
*/
|
|
2526
2527
|
get closed(): Promise<void>;
|
|
2527
2528
|
/**
|
|
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.
|
|
2529
|
+
* 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
2530
|
*
|
|
2530
2531
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/ready)
|
|
2531
2532
|
*/
|
|
2532
2533
|
get ready(): Promise<void>;
|
|
2533
2534
|
/**
|
|
2534
|
-
* The **`desiredSize`** read-only property of the to fill the stream's internal queue.
|
|
2535
|
+
* The **`desiredSize`** read-only property of the WritableStreamDefaultWriter interface returns the desired size required to fill the stream's internal queue.
|
|
2535
2536
|
*
|
|
2536
2537
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/desiredSize)
|
|
2537
2538
|
*/
|
|
2538
2539
|
get desiredSize(): number | null;
|
|
2539
2540
|
/**
|
|
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.
|
|
2541
|
+
* 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
2542
|
*
|
|
2542
2543
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/abort)
|
|
2543
2544
|
*/
|
|
2544
2545
|
abort(reason?: any): Promise<void>;
|
|
2545
2546
|
/**
|
|
2546
|
-
* The **`close()`** method of the stream.
|
|
2547
|
+
* The **`close()`** method of the WritableStreamDefaultWriter interface closes the associated writable stream.
|
|
2547
2548
|
*
|
|
2548
2549
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/close)
|
|
2549
2550
|
*/
|
|
2550
2551
|
close(): Promise<void>;
|
|
2551
2552
|
/**
|
|
2552
|
-
* The **`write()`** method of the operation.
|
|
2553
|
+
* 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
2554
|
*
|
|
2554
2555
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/write)
|
|
2555
2556
|
*/
|
|
2556
2557
|
write(chunk?: W): Promise<void>;
|
|
2557
2558
|
/**
|
|
2558
|
-
* The **`releaseLock()`** method of the corresponding stream.
|
|
2559
|
+
* 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
2560
|
*
|
|
2560
2561
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/releaseLock)
|
|
2561
2562
|
*/
|
|
2562
2563
|
releaseLock(): void;
|
|
2563
2564
|
}
|
|
2564
2565
|
/**
|
|
2565
|
-
* The **`TransformStream`** interface of the Streams API represents a concrete implementation of the pipe chain
|
|
2566
|
+
* The **`TransformStream`** interface of the Streams API represents a concrete implementation of the pipe chain transform stream concept.
|
|
2566
2567
|
*
|
|
2567
2568
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream)
|
|
2568
2569
|
*/
|
|
2569
2570
|
declare class TransformStream<I = any, O = any> {
|
|
2570
2571
|
constructor(transformer?: Transformer<I, O>, writableStrategy?: QueuingStrategy<I>, readableStrategy?: QueuingStrategy<O>);
|
|
2571
2572
|
/**
|
|
2572
|
-
* The **`readable`** read-only property of the TransformStream interface returns the ReadableStream instance controlled by this
|
|
2573
|
+
* 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
2574
|
*
|
|
2574
2575
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream/readable)
|
|
2575
2576
|
*/
|
|
2576
2577
|
get readable(): ReadableStream<O>;
|
|
2577
2578
|
/**
|
|
2578
|
-
* The **`writable`** read-only property of the TransformStream interface returns the WritableStream instance controlled by this
|
|
2579
|
+
* 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
2580
|
*
|
|
2580
2581
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream/writable)
|
|
2581
2582
|
*/
|
|
@@ -2594,7 +2595,7 @@ interface ReadableStreamValuesOptions {
|
|
|
2594
2595
|
preventCancel?: boolean;
|
|
2595
2596
|
}
|
|
2596
2597
|
/**
|
|
2597
|
-
* The **`CompressionStream`** interface of the Compression Streams API
|
|
2598
|
+
* 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
2599
|
*
|
|
2599
2600
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CompressionStream)
|
|
2600
2601
|
*/
|
|
@@ -2602,7 +2603,7 @@ declare class CompressionStream extends TransformStream<ArrayBuffer | ArrayBuffe
|
|
|
2602
2603
|
constructor(format: "gzip" | "deflate" | "deflate-raw");
|
|
2603
2604
|
}
|
|
2604
2605
|
/**
|
|
2605
|
-
* The **`DecompressionStream`** interface of the Compression Streams API
|
|
2606
|
+
* 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
2607
|
*
|
|
2607
2608
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DecompressionStream)
|
|
2608
2609
|
*/
|
|
@@ -2610,7 +2611,7 @@ declare class DecompressionStream extends TransformStream<ArrayBuffer | ArrayBuf
|
|
|
2610
2611
|
constructor(format: "gzip" | "deflate" | "deflate-raw");
|
|
2611
2612
|
}
|
|
2612
2613
|
/**
|
|
2613
|
-
* The **`TextEncoderStream`** interface of the Encoding API converts a stream of strings into bytes in the UTF-8 encoding.
|
|
2614
|
+
* 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
2615
|
*
|
|
2615
2616
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoderStream)
|
|
2616
2617
|
*/
|
|
@@ -2619,7 +2620,7 @@ declare class TextEncoderStream extends TransformStream<string, Uint8Array> {
|
|
|
2619
2620
|
get encoding(): string;
|
|
2620
2621
|
}
|
|
2621
2622
|
/**
|
|
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.
|
|
2623
|
+
* 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
2624
|
*
|
|
2624
2625
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoderStream)
|
|
2625
2626
|
*/
|
|
@@ -2794,7 +2795,7 @@ interface UnsafeTraceMetrics {
|
|
|
2794
2795
|
fromTrace(item: TraceItem): TraceMetrics;
|
|
2795
2796
|
}
|
|
2796
2797
|
/**
|
|
2797
|
-
* The **`URL`** interface is used to parse, construct, normalize, and encode URL.
|
|
2798
|
+
* 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
2799
|
*
|
|
2799
2800
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL)
|
|
2800
2801
|
*/
|
|
@@ -2819,121 +2820,121 @@ declare class URL {
|
|
|
2819
2820
|
*/
|
|
2820
2821
|
set href(value: string);
|
|
2821
2822
|
/**
|
|
2822
|
-
* The **`protocol`** property of the URL interface is a string containing the protocol or scheme of the URL, including the final
|
|
2823
|
+
* The **`protocol`** property of the URL interface is a string containing the protocol or scheme of the URL, including the final ":".
|
|
2823
2824
|
*
|
|
2824
2825
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/protocol)
|
|
2825
2826
|
*/
|
|
2826
2827
|
get protocol(): string;
|
|
2827
2828
|
/**
|
|
2828
|
-
* The **`protocol`** property of the URL interface is a string containing the protocol or scheme of the URL, including the final
|
|
2829
|
+
* The **`protocol`** property of the URL interface is a string containing the protocol or scheme of the URL, including the final ":".
|
|
2829
2830
|
*
|
|
2830
2831
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/protocol)
|
|
2831
2832
|
*/
|
|
2832
2833
|
set protocol(value: string);
|
|
2833
2834
|
/**
|
|
2834
|
-
* The **`username`** property of the URL interface is a string containing the username component of the URL.
|
|
2835
|
+
* 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
2836
|
*
|
|
2836
2837
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/username)
|
|
2837
2838
|
*/
|
|
2838
2839
|
get username(): string;
|
|
2839
2840
|
/**
|
|
2840
|
-
* The **`username`** property of the URL interface is a string containing the username component of the URL.
|
|
2841
|
+
* 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
2842
|
*
|
|
2842
2843
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/username)
|
|
2843
2844
|
*/
|
|
2844
2845
|
set username(value: string);
|
|
2845
2846
|
/**
|
|
2846
|
-
* The **`password`** property of the URL interface is a string containing the password component of the URL.
|
|
2847
|
+
* 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
2848
|
*
|
|
2848
2849
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/password)
|
|
2849
2850
|
*/
|
|
2850
2851
|
get password(): string;
|
|
2851
2852
|
/**
|
|
2852
|
-
* The **`password`** property of the URL interface is a string containing the password component of the URL.
|
|
2853
|
+
* 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
2854
|
*
|
|
2854
2855
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/password)
|
|
2855
2856
|
*/
|
|
2856
2857
|
set password(value: string);
|
|
2857
2858
|
/**
|
|
2858
|
-
* The **`host`** property of the URL interface is a string containing the host, which is the
|
|
2859
|
+
* 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
2860
|
*
|
|
2860
2861
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/host)
|
|
2861
2862
|
*/
|
|
2862
2863
|
get host(): string;
|
|
2863
2864
|
/**
|
|
2864
|
-
* The **`host`** property of the URL interface is a string containing the host, which is the
|
|
2865
|
+
* 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
2866
|
*
|
|
2866
2867
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/host)
|
|
2867
2868
|
*/
|
|
2868
2869
|
set host(value: string);
|
|
2869
2870
|
/**
|
|
2870
|
-
* The **`hostname`** property of the URL interface is a string containing either the domain name or IP address of the URL.
|
|
2871
|
+
* 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
2872
|
*
|
|
2872
2873
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hostname)
|
|
2873
2874
|
*/
|
|
2874
2875
|
get hostname(): string;
|
|
2875
2876
|
/**
|
|
2876
|
-
* The **`hostname`** property of the URL interface is a string containing either the domain name or IP address of the URL.
|
|
2877
|
+
* 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
2878
|
*
|
|
2878
2879
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hostname)
|
|
2879
2880
|
*/
|
|
2880
2881
|
set hostname(value: string);
|
|
2881
2882
|
/**
|
|
2882
|
-
* The **`port`** property of the URL interface is a string containing the port number of the URL.
|
|
2883
|
+
* 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
2884
|
*
|
|
2884
2885
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/port)
|
|
2885
2886
|
*/
|
|
2886
2887
|
get port(): string;
|
|
2887
2888
|
/**
|
|
2888
|
-
* The **`port`** property of the URL interface is a string containing the port number of the URL.
|
|
2889
|
+
* 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
2890
|
*
|
|
2890
2891
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/port)
|
|
2891
2892
|
*/
|
|
2892
2893
|
set port(value: string);
|
|
2893
2894
|
/**
|
|
2894
|
-
* The **`pathname`** property of the URL interface represents a location in a hierarchical structure.
|
|
2895
|
+
* 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
2896
|
*
|
|
2896
2897
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/pathname)
|
|
2897
2898
|
*/
|
|
2898
2899
|
get pathname(): string;
|
|
2899
2900
|
/**
|
|
2900
|
-
* The **`pathname`** property of the URL interface represents a location in a hierarchical structure.
|
|
2901
|
+
* 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
2902
|
*
|
|
2902
2903
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/pathname)
|
|
2903
2904
|
*/
|
|
2904
2905
|
set pathname(value: string);
|
|
2905
2906
|
/**
|
|
2906
|
-
* The **`search`** property of the URL interface is a search string, also called a
|
|
2907
|
+
* 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
2908
|
*
|
|
2908
2909
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/search)
|
|
2909
2910
|
*/
|
|
2910
2911
|
get search(): string;
|
|
2911
2912
|
/**
|
|
2912
|
-
* The **`search`** property of the URL interface is a search string, also called a
|
|
2913
|
+
* 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
2914
|
*
|
|
2914
2915
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/search)
|
|
2915
2916
|
*/
|
|
2916
2917
|
set search(value: string);
|
|
2917
2918
|
/**
|
|
2918
|
-
* The **`hash`** property of the URL interface is a string containing a
|
|
2919
|
+
* 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
2920
|
*
|
|
2920
2921
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hash)
|
|
2921
2922
|
*/
|
|
2922
2923
|
get hash(): string;
|
|
2923
2924
|
/**
|
|
2924
|
-
* The **`hash`** property of the URL interface is a string containing a
|
|
2925
|
+
* 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
2926
|
*
|
|
2926
2927
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hash)
|
|
2927
2928
|
*/
|
|
2928
2929
|
set hash(value: string);
|
|
2929
2930
|
/**
|
|
2930
|
-
* The **`searchParams`** read-only property of the access to the
|
|
2931
|
+
* 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
2932
|
*
|
|
2932
2933
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/searchParams)
|
|
2933
2934
|
*/
|
|
2934
2935
|
get searchParams(): URLSearchParams;
|
|
2935
2936
|
/**
|
|
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
|
|
2937
|
+
* 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
2938
|
*
|
|
2938
2939
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/toJSON)
|
|
2939
2940
|
*/
|
|
@@ -2953,13 +2954,13 @@ declare class URL {
|
|
|
2953
2954
|
*/
|
|
2954
2955
|
static parse(url: string, base?: string): URL | null;
|
|
2955
2956
|
/**
|
|
2956
|
-
* The **`createObjectURL()`** static method of the URL interface creates a string containing a URL
|
|
2957
|
+
* The **`createObjectURL()`** static method of the URL interface creates a string containing a blob URL pointing to the object given in the parameter.
|
|
2957
2958
|
*
|
|
2958
2959
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/createObjectURL_static)
|
|
2959
2960
|
*/
|
|
2960
2961
|
static createObjectURL(object: File | Blob): string;
|
|
2961
2962
|
/**
|
|
2962
|
-
* The **`revokeObjectURL()`** static method of the URL interface releases an existing object URL which was previously created by calling
|
|
2963
|
+
* The **`revokeObjectURL()`** static method of the URL interface releases an existing object URL which was previously created by calling URL.createObjectURL().
|
|
2963
2964
|
*
|
|
2964
2965
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/revokeObjectURL_static)
|
|
2965
2966
|
*/
|
|
@@ -3009,25 +3010,22 @@ declare class URLSearchParams {
|
|
|
3009
3010
|
*/
|
|
3010
3011
|
has(name: string, value?: string): boolean;
|
|
3011
3012
|
/**
|
|
3012
|
-
* The **`set()`** method of the URLSearchParams interface sets the value associated with a given search parameter to the given value.
|
|
3013
|
+
* 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
3014
|
*
|
|
3014
3015
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/set)
|
|
3015
3016
|
*/
|
|
3016
3017
|
set(name: string, value: string): void;
|
|
3017
3018
|
/**
|
|
3018
|
-
* The **`URLSearchParams.sort()`** method sorts all key/value pairs contained in this object in place and returns
|
|
3019
|
+
* 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
3020
|
*
|
|
3020
3021
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/sort)
|
|
3021
3022
|
*/
|
|
3022
3023
|
sort(): void;
|
|
3023
|
-
/* Returns an array of key, value pairs for every entry in the search params. */
|
|
3024
3024
|
entries(): IterableIterator<[
|
|
3025
3025
|
key: string,
|
|
3026
3026
|
value: string
|
|
3027
3027
|
]>;
|
|
3028
|
-
/* Returns a list of keys in the search params. */
|
|
3029
3028
|
keys(): IterableIterator<string>;
|
|
3030
|
-
/* Returns a list of values in the search params. */
|
|
3031
3029
|
values(): IterableIterator<string>;
|
|
3032
3030
|
forEach<This = unknown>(callback: (this: This, value: string, key: string, parent: URLSearchParams) => void, thisArg?: This): void;
|
|
3033
3031
|
/*function toString() { [native code] }*/
|
|
@@ -3037,18 +3035,78 @@ declare class URLSearchParams {
|
|
|
3037
3035
|
value: string
|
|
3038
3036
|
]>;
|
|
3039
3037
|
}
|
|
3038
|
+
/**
|
|
3039
|
+
* 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.
|
|
3040
|
+
*
|
|
3041
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern)
|
|
3042
|
+
*/
|
|
3040
3043
|
declare class URLPattern {
|
|
3041
3044
|
constructor(input?: (string | URLPatternInit), baseURL?: (string | URLPatternOptions), patternOptions?: URLPatternOptions);
|
|
3045
|
+
/**
|
|
3046
|
+
* The **`protocol`** read-only property of the URLPattern interface is a string containing the pattern used to match the protocol part of a URL.
|
|
3047
|
+
*
|
|
3048
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/protocol)
|
|
3049
|
+
*/
|
|
3042
3050
|
get protocol(): string;
|
|
3051
|
+
/**
|
|
3052
|
+
* The **`username`** read-only property of the URLPattern interface is a string containing the pattern used to match the username part of a URL.
|
|
3053
|
+
*
|
|
3054
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/username)
|
|
3055
|
+
*/
|
|
3043
3056
|
get username(): string;
|
|
3057
|
+
/**
|
|
3058
|
+
* The **`password`** read-only property of the URLPattern interface is a string containing the pattern used to match the password part of a URL.
|
|
3059
|
+
*
|
|
3060
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/password)
|
|
3061
|
+
*/
|
|
3044
3062
|
get password(): string;
|
|
3063
|
+
/**
|
|
3064
|
+
* The **`hostname`** read-only property of the URLPattern interface is a string containing the pattern used to match the hostname part of a URL.
|
|
3065
|
+
*
|
|
3066
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hostname)
|
|
3067
|
+
*/
|
|
3045
3068
|
get hostname(): string;
|
|
3069
|
+
/**
|
|
3070
|
+
* The **`port`** read-only property of the URLPattern interface is a string containing the pattern used to match the port part of a URL.
|
|
3071
|
+
*
|
|
3072
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/port)
|
|
3073
|
+
*/
|
|
3046
3074
|
get port(): string;
|
|
3075
|
+
/**
|
|
3076
|
+
* The **`pathname`** read-only property of the URLPattern interface is a string containing the pattern used to match the pathname part of a URL.
|
|
3077
|
+
*
|
|
3078
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/pathname)
|
|
3079
|
+
*/
|
|
3047
3080
|
get pathname(): string;
|
|
3081
|
+
/**
|
|
3082
|
+
* The **`search`** read-only property of the URLPattern interface is a string containing the pattern used to match the search part of a URL.
|
|
3083
|
+
*
|
|
3084
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/search)
|
|
3085
|
+
*/
|
|
3048
3086
|
get search(): string;
|
|
3087
|
+
/**
|
|
3088
|
+
* The **`hash`** read-only property of the URLPattern interface is a string containing the pattern used to match the fragment part of a URL.
|
|
3089
|
+
*
|
|
3090
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hash)
|
|
3091
|
+
*/
|
|
3049
3092
|
get hash(): string;
|
|
3093
|
+
/**
|
|
3094
|
+
* 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.
|
|
3095
|
+
*
|
|
3096
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hasRegExpGroups)
|
|
3097
|
+
*/
|
|
3050
3098
|
get hasRegExpGroups(): boolean;
|
|
3099
|
+
/**
|
|
3100
|
+
* 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.
|
|
3101
|
+
*
|
|
3102
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/test)
|
|
3103
|
+
*/
|
|
3051
3104
|
test(input?: (string | URLPatternInit), baseURL?: string): boolean;
|
|
3105
|
+
/**
|
|
3106
|
+
* 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.
|
|
3107
|
+
*
|
|
3108
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/exec)
|
|
3109
|
+
*/
|
|
3052
3110
|
exec(input?: (string | URLPatternInit), baseURL?: string): URLPatternResult | null;
|
|
3053
3111
|
}
|
|
3054
3112
|
interface URLPatternInit {
|
|
@@ -3081,7 +3139,7 @@ interface URLPatternOptions {
|
|
|
3081
3139
|
ignoreCase?: boolean;
|
|
3082
3140
|
}
|
|
3083
3141
|
/**
|
|
3084
|
-
* A
|
|
3142
|
+
* 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
3143
|
*
|
|
3086
3144
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseEvent)
|
|
3087
3145
|
*/
|
|
@@ -3100,7 +3158,7 @@ declare class CloseEvent extends Event {
|
|
|
3100
3158
|
*/
|
|
3101
3159
|
readonly reason: string;
|
|
3102
3160
|
/**
|
|
3103
|
-
* The **`wasClean`** read-only property of the CloseEvent interface returns
|
|
3161
|
+
* The **`wasClean`** read-only property of the CloseEvent interface returns true if the connection closed cleanly.
|
|
3104
3162
|
*
|
|
3105
3163
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseEvent/wasClean)
|
|
3106
3164
|
*/
|
|
@@ -3118,7 +3176,7 @@ type WebSocketEventMap = {
|
|
|
3118
3176
|
error: ErrorEvent;
|
|
3119
3177
|
};
|
|
3120
3178
|
/**
|
|
3121
|
-
* The
|
|
3179
|
+
* 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
3180
|
*
|
|
3123
3181
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket)
|
|
3124
3182
|
*/
|
|
@@ -3135,20 +3193,20 @@ declare var WebSocket: {
|
|
|
3135
3193
|
readonly CLOSED: number;
|
|
3136
3194
|
};
|
|
3137
3195
|
/**
|
|
3138
|
-
* The
|
|
3196
|
+
* 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
3197
|
*
|
|
3140
3198
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket)
|
|
3141
3199
|
*/
|
|
3142
3200
|
interface WebSocket extends EventTarget<WebSocketEventMap> {
|
|
3143
3201
|
accept(options?: WebSocketAcceptOptions): void;
|
|
3144
3202
|
/**
|
|
3145
|
-
* The **`WebSocket.send()`** method enqueues the specified data to be transmitted to the server over the WebSocket connection, increasing the value of
|
|
3203
|
+
* 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
3204
|
*
|
|
3147
3205
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/send)
|
|
3148
3206
|
*/
|
|
3149
3207
|
send(message: (ArrayBuffer | ArrayBufferView) | string): void;
|
|
3150
3208
|
/**
|
|
3151
|
-
* The **`WebSocket.close()`** method closes the already
|
|
3209
|
+
* The **`WebSocket.close()`** method closes the WebSocket connection or connection attempt, if any. If the connection is already CLOSED, this method does nothing.
|
|
3152
3210
|
*
|
|
3153
3211
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/close)
|
|
3154
3212
|
*/
|
|
@@ -3168,13 +3226,13 @@ interface WebSocket extends EventTarget<WebSocketEventMap> {
|
|
|
3168
3226
|
*/
|
|
3169
3227
|
url: string | null;
|
|
3170
3228
|
/**
|
|
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
|
|
3229
|
+
* 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
3230
|
*
|
|
3173
3231
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/protocol)
|
|
3174
3232
|
*/
|
|
3175
3233
|
protocol: string | null;
|
|
3176
3234
|
/**
|
|
3177
|
-
* The **`WebSocket.extensions`** read-only property returns the extensions selected by the server.
|
|
3235
|
+
* 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
3236
|
*
|
|
3179
3237
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/extensions)
|
|
3180
3238
|
*/
|
|
@@ -3261,25 +3319,25 @@ interface SocketInfo {
|
|
|
3261
3319
|
declare class EventSource extends EventTarget {
|
|
3262
3320
|
constructor(url: string, init?: EventSourceEventSourceInit);
|
|
3263
3321
|
/**
|
|
3264
|
-
* The **`close()`** method of the EventSource interface closes the connection, if one is made, and sets the
|
|
3322
|
+
* The **`close()`** method of the EventSource interface closes the connection, if one is made, and sets the EventSource.readyState attribute to 2 (closed).
|
|
3265
3323
|
*
|
|
3266
3324
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/close)
|
|
3267
3325
|
*/
|
|
3268
3326
|
close(): void;
|
|
3269
3327
|
/**
|
|
3270
|
-
* The **`url`** read-only property of the URL of the source.
|
|
3328
|
+
* The **`url`** read-only property of the EventSource interface returns a string representing the URL of the source.
|
|
3271
3329
|
*
|
|
3272
3330
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/url)
|
|
3273
3331
|
*/
|
|
3274
3332
|
get url(): string;
|
|
3275
3333
|
/**
|
|
3276
|
-
* The **`withCredentials`** read-only property of the the
|
|
3334
|
+
* 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
3335
|
*
|
|
3278
3336
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/withCredentials)
|
|
3279
3337
|
*/
|
|
3280
3338
|
get withCredentials(): boolean;
|
|
3281
3339
|
/**
|
|
3282
|
-
* The **`readyState`** read-only property of the connection.
|
|
3340
|
+
* The **`readyState`** read-only property of the EventSource interface returns a number representing the state of the connection.
|
|
3283
3341
|
*
|
|
3284
3342
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/readyState)
|
|
3285
3343
|
*/
|
|
@@ -3369,17 +3427,26 @@ interface ContainerSnapshot {
|
|
|
3369
3427
|
size: number;
|
|
3370
3428
|
name?: string;
|
|
3371
3429
|
}
|
|
3430
|
+
interface ContainerSnapshotRestoreParams {
|
|
3431
|
+
id: string;
|
|
3432
|
+
}
|
|
3372
3433
|
interface ContainerSnapshotOptions {
|
|
3373
3434
|
name?: string;
|
|
3374
3435
|
}
|
|
3375
|
-
|
|
3436
|
+
type ContainerStartupOptions = {
|
|
3376
3437
|
entrypoint?: string[];
|
|
3377
3438
|
enableInternet: boolean;
|
|
3378
3439
|
env?: Record<string, string>;
|
|
3440
|
+
instance?: "lite" | "standard-1" | "standard-2" | "standard-3" | "standard-4" | ContainerStartResources;
|
|
3379
3441
|
labels?: Record<string, string>;
|
|
3380
3442
|
directorySnapshots?: ContainerDirectorySnapshotRestoreParams[];
|
|
3381
|
-
|
|
3382
|
-
|
|
3443
|
+
} & ({
|
|
3444
|
+
image: string;
|
|
3445
|
+
containerSnapshot?: never;
|
|
3446
|
+
} | {
|
|
3447
|
+
image?: never;
|
|
3448
|
+
containerSnapshot?: ContainerSnapshotRestoreParams;
|
|
3449
|
+
});
|
|
3383
3450
|
interface ContainerStartResources {
|
|
3384
3451
|
vcpu: number;
|
|
3385
3452
|
memoryMib: number;
|
|
@@ -3392,19 +3459,19 @@ interface ContainerStartResources {
|
|
|
3392
3459
|
*/
|
|
3393
3460
|
declare abstract class MessagePort extends EventTarget {
|
|
3394
3461
|
/**
|
|
3395
|
-
* The **`postMessage()`** method of the transfers ownership of objects to other browsing contexts.
|
|
3462
|
+
* The **`postMessage()`** method of the MessagePort interface sends a message from the port, and optionally, transfers ownership of objects to other browsing contexts.
|
|
3396
3463
|
*
|
|
3397
3464
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessagePort/postMessage)
|
|
3398
3465
|
*/
|
|
3399
3466
|
postMessage(data?: any, options?: (any[] | MessagePortPostMessageOptions)): void;
|
|
3400
3467
|
/**
|
|
3401
|
-
* The **`close()`** method of the MessagePort interface disconnects the port, so it is no longer active.
|
|
3468
|
+
* 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
3469
|
*
|
|
3403
3470
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessagePort/close)
|
|
3404
3471
|
*/
|
|
3405
3472
|
close(): void;
|
|
3406
3473
|
/**
|
|
3407
|
-
* The **`start()`** method of the MessagePort interface starts the sending of messages queued on the port.
|
|
3474
|
+
* 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
3475
|
*
|
|
3409
3476
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessagePort/start)
|
|
3410
3477
|
*/
|
|
@@ -3420,13 +3487,13 @@ declare abstract class MessagePort extends EventTarget {
|
|
|
3420
3487
|
declare class MessageChannel {
|
|
3421
3488
|
constructor();
|
|
3422
3489
|
/**
|
|
3423
|
-
* The **`port1`** read-only property of the the port attached to the context that originated the channel.
|
|
3490
|
+
* 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
3491
|
*
|
|
3425
3492
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageChannel/port1)
|
|
3426
3493
|
*/
|
|
3427
3494
|
readonly port1: MessagePort;
|
|
3428
3495
|
/**
|
|
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.
|
|
3496
|
+
* 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
3497
|
*
|
|
3431
3498
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageChannel/port2)
|
|
3432
3499
|
*/
|
|
@@ -3516,7 +3583,7 @@ declare abstract class Performance {
|
|
|
3516
3583
|
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
|
|
3517
3584
|
now(): number;
|
|
3518
3585
|
/**
|
|
3519
|
-
* The **`toJSON()`** method of the Performance interface is a
|
|
3586
|
+
* The **`toJSON()`** method of the Performance interface is a serializer; it returns a JSON representation of the Performance object.
|
|
3520
3587
|
*
|
|
3521
3588
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/toJSON)
|
|
3522
3589
|
*/
|
|
@@ -10916,10 +10983,29 @@ type BrowserRunLinksOptions = BrowserRunCommonOptions & {
|
|
|
10916
10983
|
/** When true, exclude links pointing to external domains. @default false */
|
|
10917
10984
|
excludeExternalLinks?: boolean;
|
|
10918
10985
|
};
|
|
10986
|
+
type BrowserRunSnapshotFormat = 'content' | 'screenshot' | 'markdown' | 'accessibilityTree';
|
|
10919
10987
|
type BrowserRunSnapshotOptions = BrowserRunCommonOptions & {
|
|
10988
|
+
/** Which representations of the page to return. At least two distinct formats
|
|
10989
|
+
* are required; request a single format from its dedicated action instead.
|
|
10990
|
+
* @default ["content","screenshot"]
|
|
10991
|
+
*/
|
|
10992
|
+
formats?: BrowserRunSnapshotFormat[];
|
|
10920
10993
|
/** @see https://pptr.dev/api/puppeteer.screenshotoptions */
|
|
10921
10994
|
screenshotOptions?: Omit<BrowserRunPuppeteerScreenshotOptions, 'encoding'>;
|
|
10922
10995
|
};
|
|
10996
|
+
/** Options for the `accessibilityTree` quick action. */
|
|
10997
|
+
type BrowserRunAccessibilityTreeOptions = BrowserRunCommonOptions & {
|
|
10998
|
+
/** When true, prune nodes that carry no semantic meaning, such as generic
|
|
10999
|
+
* containers. Defaults to true, or to false when `root` is set so that the
|
|
11000
|
+
* requested subtree is returned as-is.
|
|
11001
|
+
*/
|
|
11002
|
+
interestingOnly?: boolean;
|
|
11003
|
+
/** CSS selector limiting the tree to the matching element's subtree.
|
|
11004
|
+
* A selector that matches nothing yields `accessibilityTree: null` with
|
|
11005
|
+
* HTTP 200; a malformed selector is an error.
|
|
11006
|
+
*/
|
|
11007
|
+
root?: string;
|
|
11008
|
+
};
|
|
10923
11009
|
interface BrowserRunJsonBaseOptions {
|
|
10924
11010
|
/** Custom AI models to try in order. Max 3. Falls back to next on error. */
|
|
10925
11011
|
custom_ai?: Array<{
|
|
@@ -10952,6 +11038,58 @@ type BrowserRunResponseMeta = {
|
|
|
10952
11038
|
/** Page title */
|
|
10953
11039
|
title: string;
|
|
10954
11040
|
};
|
|
11041
|
+
/**
|
|
11042
|
+
* A node in the page's accessibility tree, as exposed to assistive technology.
|
|
11043
|
+
* `role` is the only field always present; the rest are populated when the
|
|
11044
|
+
* underlying element defines them.
|
|
11045
|
+
* @see https://pptr.dev/api/puppeteer.serializedaxnode
|
|
11046
|
+
*/
|
|
11047
|
+
interface BrowserRunSerializedAXNode {
|
|
11048
|
+
/** The ARIA role, e.g. `"button"`, `"heading"`, `"RootWebArea"`. */
|
|
11049
|
+
role: string;
|
|
11050
|
+
/** The `aria-autocomplete` value. */
|
|
11051
|
+
autocomplete?: string;
|
|
11052
|
+
/** Checked state of a checkbox, radio, or menu item. */
|
|
11053
|
+
checked?: boolean | 'mixed';
|
|
11054
|
+
/** Accessible description, typically from `aria-describedby` or `title`. */
|
|
11055
|
+
description?: string;
|
|
11056
|
+
disabled?: boolean;
|
|
11057
|
+
expanded?: boolean;
|
|
11058
|
+
/** Whether the element currently holds keyboard focus. */
|
|
11059
|
+
focused?: boolean;
|
|
11060
|
+
/** The kind of popup the element triggers, e.g. `"menu"`, `"dialog"`. */
|
|
11061
|
+
haspopup?: string;
|
|
11062
|
+
/** The `aria-invalid` value. */
|
|
11063
|
+
invalid?: string;
|
|
11064
|
+
/** Keyboard shortcuts bound to the element, from `aria-keyshortcuts`. */
|
|
11065
|
+
keyshortcuts?: string;
|
|
11066
|
+
/** Hierarchical level, e.g. the heading level of an `<h2>`. */
|
|
11067
|
+
level?: number;
|
|
11068
|
+
/** Whether the element is a modal dialog. */
|
|
11069
|
+
modal?: boolean;
|
|
11070
|
+
/** Whether a text input accepts multiple lines. */
|
|
11071
|
+
multiline?: boolean;
|
|
11072
|
+
/** Whether more than one option can be selected. */
|
|
11073
|
+
multiselectable?: boolean;
|
|
11074
|
+
/** Accessible name, e.g. a button's label or an image's alt text. */
|
|
11075
|
+
name?: string;
|
|
11076
|
+
orientation?: string;
|
|
11077
|
+
/** Pressed state of a toggle button. */
|
|
11078
|
+
pressed?: boolean | 'mixed';
|
|
11079
|
+
readonly?: boolean;
|
|
11080
|
+
required?: boolean;
|
|
11081
|
+
/** Author-supplied role description, from `aria-roledescription`. */
|
|
11082
|
+
roledescription?: string;
|
|
11083
|
+
selected?: boolean;
|
|
11084
|
+
/** Current value of an input or range element. */
|
|
11085
|
+
value?: string | number;
|
|
11086
|
+
valuemax?: number;
|
|
11087
|
+
valuemin?: number;
|
|
11088
|
+
/** Human-readable form of `value`, from `aria-valuetext`. */
|
|
11089
|
+
valuetext?: string;
|
|
11090
|
+
/** Child nodes. Absent for leaf nodes. */
|
|
11091
|
+
children?: BrowserRunSerializedAXNode[];
|
|
11092
|
+
}
|
|
10955
11093
|
/** Success response for `content` action. */
|
|
10956
11094
|
type BrowserRunContentSuccessResponse = {
|
|
10957
11095
|
success: true;
|
|
@@ -10995,14 +11133,31 @@ type BrowserRunScrapeSuccessResponse = {
|
|
|
10995
11133
|
}>;
|
|
10996
11134
|
}>;
|
|
10997
11135
|
};
|
|
10998
|
-
/** Success response for `snapshot` action.
|
|
11136
|
+
/** Success response for `snapshot` action. Each field is present only when the
|
|
11137
|
+
* corresponding entry was requested in `formats`.
|
|
11138
|
+
*/
|
|
10999
11139
|
type BrowserRunSnapshotSuccessResponse = {
|
|
11000
11140
|
success: true;
|
|
11001
11141
|
result: {
|
|
11002
11142
|
/** HTML content of the page. */
|
|
11003
|
-
content
|
|
11143
|
+
content?: string;
|
|
11004
11144
|
/** Base64-encoded screenshot image. */
|
|
11005
|
-
screenshot
|
|
11145
|
+
screenshot?: string;
|
|
11146
|
+
/** Markdown content. Prefixed with YAML frontmatter (e.g. `title`) when the
|
|
11147
|
+
* page provides that metadata.
|
|
11148
|
+
*/
|
|
11149
|
+
markdown?: string;
|
|
11150
|
+
/** Root of the page's accessibility tree. */
|
|
11151
|
+
accessibilityTree?: BrowserRunSerializedAXNode;
|
|
11152
|
+
};
|
|
11153
|
+
meta: BrowserRunResponseMeta;
|
|
11154
|
+
};
|
|
11155
|
+
/** Success response for `accessibilityTree` action. */
|
|
11156
|
+
type BrowserRunAccessibilityTreeSuccessResponse = {
|
|
11157
|
+
success: true;
|
|
11158
|
+
result: {
|
|
11159
|
+
/** Root of the accessibility tree, or `null` when `root` matched no element. */
|
|
11160
|
+
accessibilityTree: BrowserRunSerializedAXNode | null;
|
|
11006
11161
|
};
|
|
11007
11162
|
meta: BrowserRunResponseMeta;
|
|
11008
11163
|
};
|
|
@@ -11126,9 +11281,10 @@ declare abstract class BrowserRun {
|
|
|
11126
11281
|
*/
|
|
11127
11282
|
quickAction(action: 'links', options: BrowserRunLinksOptions): Promise<Response>;
|
|
11128
11283
|
/**
|
|
11129
|
-
* Get
|
|
11284
|
+
* Get several representations of a web page in one request.
|
|
11130
11285
|
* @param action - Must be `'snapshot'`.
|
|
11131
|
-
* @param options - Snapshot options including
|
|
11286
|
+
* @param options - Snapshot options including the `formats` to return and
|
|
11287
|
+
* screenshot settings (encoding is always base64).
|
|
11132
11288
|
* @returns A `Response` containing one of:
|
|
11133
11289
|
*
|
|
11134
11290
|
* **Success (HTTP 200):**
|
|
@@ -11176,6 +11332,26 @@ declare abstract class BrowserRun {
|
|
|
11176
11332
|
* - `X-Browser-Ms-Used`: Browser time consumed in milliseconds (set when status < 500)
|
|
11177
11333
|
*/
|
|
11178
11334
|
quickAction(action: 'markdown', options: BrowserRunMarkdownOptions): Promise<Response>;
|
|
11335
|
+
/**
|
|
11336
|
+
* Get the accessibility tree of a web page.
|
|
11337
|
+
* @param action - Must be `'accessibilityTree'`.
|
|
11338
|
+
* @param options - Options to scope the tree to a subtree and to control
|
|
11339
|
+
* whether semantically uninteresting nodes are pruned.
|
|
11340
|
+
* @returns A `Response` containing one of:
|
|
11341
|
+
*
|
|
11342
|
+
* **Success (HTTP 200):**
|
|
11343
|
+
* - `BrowserRunAccessibilityTreeSuccessResponse` JSON with `Content-Type: application/json`
|
|
11344
|
+
* - `result.accessibilityTree` is `null` when `root` matched no element
|
|
11345
|
+
*
|
|
11346
|
+
* **Error:**
|
|
11347
|
+
* - `BrowserRunErrorResponse` JSON with appropriate HTTP status code (400, 422, 429, 500, 503)
|
|
11348
|
+
* - HTTP 422 for a malformed `root` selector
|
|
11349
|
+
* - HTTP 500 with code `2017` or `2018` when the tree could not be built
|
|
11350
|
+
*
|
|
11351
|
+
* **Headers:**
|
|
11352
|
+
* - `X-Browser-Ms-Used`: Browser time consumed in milliseconds (set when status < 500)
|
|
11353
|
+
*/
|
|
11354
|
+
quickAction(action: 'accessibilityTree', options: BrowserRunAccessibilityTreeOptions): Promise<Response>;
|
|
11179
11355
|
}
|
|
11180
11356
|
/**
|
|
11181
11357
|
* In addition to the properties you can set in the RequestInit dict
|
|
@@ -12507,6 +12683,27 @@ type ImageInfoResponse = {
|
|
|
12507
12683
|
width: number;
|
|
12508
12684
|
height: number;
|
|
12509
12685
|
};
|
|
12686
|
+
/**
|
|
12687
|
+
* Parameters for rasterizing text into an image.
|
|
12688
|
+
*/
|
|
12689
|
+
type TextRasterize = {
|
|
12690
|
+
/** The text content to render */
|
|
12691
|
+
content: string;
|
|
12692
|
+
/** rasterization options for the text **/
|
|
12693
|
+
options: TextOptions;
|
|
12694
|
+
};
|
|
12695
|
+
type TextOptions = {
|
|
12696
|
+
/** Font configuration */
|
|
12697
|
+
font: {
|
|
12698
|
+
/** URL to a font file in TrueType (.ttf), OpenType (.otf), WOFF (.woff), or WOFF2 (.woff2) format */
|
|
12699
|
+
url: string;
|
|
12700
|
+
};
|
|
12701
|
+
/** Font size in points (pt) */
|
|
12702
|
+
size?: number;
|
|
12703
|
+
/** Text color in CSS format: hex (#RRGGBB or #RRGGBBAA), rgb(r,g,b), rgba(r,g,b,a), or named colors */
|
|
12704
|
+
color?: string;
|
|
12705
|
+
};
|
|
12706
|
+
type ImageSource = ReadableStream<Uint8Array> | TextRasterize;
|
|
12510
12707
|
type ImageTransform = {
|
|
12511
12708
|
width?: number;
|
|
12512
12709
|
height?: number;
|
|
@@ -12596,6 +12793,9 @@ interface ImageUploadOptions {
|
|
|
12596
12793
|
requireSignedURLs?: boolean;
|
|
12597
12794
|
metadata?: Record<string, unknown>;
|
|
12598
12795
|
creator?: string;
|
|
12796
|
+
/**
|
|
12797
|
+
* If 'base64', the input data will be decoded from base64 before processing
|
|
12798
|
+
*/
|
|
12599
12799
|
encoding?: 'base64';
|
|
12600
12800
|
}
|
|
12601
12801
|
interface ImageUpdateOptions {
|
|
@@ -12603,11 +12803,40 @@ interface ImageUpdateOptions {
|
|
|
12603
12803
|
metadata?: Record<string, unknown>;
|
|
12604
12804
|
creator?: string;
|
|
12605
12805
|
}
|
|
12806
|
+
type ImageMetadataFilterOperators = {
|
|
12807
|
+
eq?: string | number | boolean;
|
|
12808
|
+
in?: string[] | number[];
|
|
12809
|
+
gt?: number;
|
|
12810
|
+
gte?: number;
|
|
12811
|
+
lt?: number;
|
|
12812
|
+
lte?: number;
|
|
12813
|
+
};
|
|
12814
|
+
type ImageMetadataFilterValue = string | number | boolean | ImageMetadataFilterOperators;
|
|
12815
|
+
interface ImageListFilter {
|
|
12816
|
+
metadata?: Record<string, ImageMetadataFilterValue>;
|
|
12817
|
+
}
|
|
12606
12818
|
interface ImageListOptions {
|
|
12607
12819
|
limit?: number;
|
|
12608
12820
|
cursor?: string;
|
|
12609
12821
|
sortOrder?: 'asc' | 'desc';
|
|
12610
12822
|
creator?: string;
|
|
12823
|
+
filter?: ImageListFilter;
|
|
12824
|
+
}
|
|
12825
|
+
interface ImageSignedUrlOptions {
|
|
12826
|
+
variant: string;
|
|
12827
|
+
expiresIn?: number;
|
|
12828
|
+
keyName?: string;
|
|
12829
|
+
}
|
|
12830
|
+
interface ImageDirectUploadOptions {
|
|
12831
|
+
id?: string;
|
|
12832
|
+
requireSignedURLs?: boolean;
|
|
12833
|
+
metadata?: Record<string, unknown>;
|
|
12834
|
+
creator?: string;
|
|
12835
|
+
expiresIn?: number;
|
|
12836
|
+
}
|
|
12837
|
+
interface ImageDirectUploadResult {
|
|
12838
|
+
id: string;
|
|
12839
|
+
uploadURL: string;
|
|
12611
12840
|
}
|
|
12612
12841
|
interface ImageList {
|
|
12613
12842
|
images: ImageMetadata[];
|
|
@@ -12625,6 +12854,13 @@ interface ImageHandle {
|
|
|
12625
12854
|
* @returns ReadableStream of image bytes, or null if not found
|
|
12626
12855
|
*/
|
|
12627
12856
|
bytes(): Promise<ReadableStream<Uint8Array> | null>;
|
|
12857
|
+
/**
|
|
12858
|
+
* Generate a signed delivery URL for this hosted image.
|
|
12859
|
+
* @param options Signing configuration
|
|
12860
|
+
* @returns A signed image delivery URL
|
|
12861
|
+
* @throws {@link ImagesError} if signing fails
|
|
12862
|
+
*/
|
|
12863
|
+
signedUrl(options: ImageSignedUrlOptions): Promise<string>;
|
|
12628
12864
|
/**
|
|
12629
12865
|
* Update hosted image metadata
|
|
12630
12866
|
* @param options Properties to update
|
|
@@ -12660,6 +12896,14 @@ interface HostedImagesBinding {
|
|
|
12660
12896
|
* @throws {@link ImagesError} if list fails
|
|
12661
12897
|
*/
|
|
12662
12898
|
list(options?: ImageListOptions): Promise<ImageList>;
|
|
12899
|
+
/**
|
|
12900
|
+
* Create a Direct Creator Upload link, letting an end user upload an
|
|
12901
|
+
* image straight to Cloudflare without exposing an API token
|
|
12902
|
+
* @param options Upload link configuration
|
|
12903
|
+
* @returns The new image ID and the upload URL to hand to the end user
|
|
12904
|
+
* @throws {@link ImagesError} if creation fails
|
|
12905
|
+
*/
|
|
12906
|
+
createDirectUpload(options?: ImageDirectUploadOptions): Promise<ImageDirectUploadResult>;
|
|
12663
12907
|
}
|
|
12664
12908
|
interface ImagesBinding {
|
|
12665
12909
|
/**
|
|
@@ -12674,6 +12918,13 @@ interface ImagesBinding {
|
|
|
12674
12918
|
* @returns A transform handle
|
|
12675
12919
|
*/
|
|
12676
12920
|
input(stream: ReadableStream<Uint8Array>, options?: ImageInputOptions): ImageTransformer;
|
|
12921
|
+
/**
|
|
12922
|
+
* Begin applying a series of transformations to text
|
|
12923
|
+
* @param content string to be rendered
|
|
12924
|
+
* @param options font, optional color and size to use in rendering text
|
|
12925
|
+
* @returns A transform handle
|
|
12926
|
+
*/
|
|
12927
|
+
text(content: string, options: TextOptions): ImageTransformer;
|
|
12677
12928
|
/**
|
|
12678
12929
|
* Access hosted images CRUD operations
|
|
12679
12930
|
*/
|
|
@@ -12703,11 +12954,15 @@ interface ImageTransformer {
|
|
|
12703
12954
|
type ImageTransformationOutputOptions = {
|
|
12704
12955
|
encoding?: 'base64';
|
|
12705
12956
|
};
|
|
12957
|
+
type ImageTransformationResponseOptions = {
|
|
12958
|
+
headers?: HeadersInit;
|
|
12959
|
+
};
|
|
12706
12960
|
interface ImageTransformationResult {
|
|
12707
12961
|
/**
|
|
12708
12962
|
* The image as a response, ready to store in cache or return to users
|
|
12963
|
+
* @param options Options that apply to the returned response, e.g. additional headers
|
|
12709
12964
|
*/
|
|
12710
|
-
response(): Response;
|
|
12965
|
+
response(options?: ImageTransformationResponseOptions): Response;
|
|
12711
12966
|
/**
|
|
12712
12967
|
* The content type of the returned image
|
|
12713
12968
|
*/
|
|
@@ -14711,6 +14966,9 @@ type WorkflowBatchDeleteResult = {
|
|
|
14711
14966
|
type WorkflowDurationLabel = 'second' | 'minute' | 'hour' | 'day' | 'week' | 'month' | 'year';
|
|
14712
14967
|
type WorkflowSleepDuration = `${number} ${WorkflowDurationLabel}${'s' | ''}` | number;
|
|
14713
14968
|
type WorkflowRetentionDuration = WorkflowSleepDuration;
|
|
14969
|
+
/** Geographic regions supported when creating a Workflow instance.
|
|
14970
|
+
* Location hints are best-effort placement preferences. */
|
|
14971
|
+
type WorkflowInstanceLocationHint = 'wnam' | 'enam' | 'sam' | 'weur' | 'eeur' | 'apac' | 'apac-ne' | 'apac-se' | 'oc' | 'afr' | 'me';
|
|
14714
14972
|
interface WorkflowInstanceCreateOptions<PARAMS = unknown> {
|
|
14715
14973
|
/**
|
|
14716
14974
|
* An id for your Workflow instance. Must be unique within the Workflow.
|
|
@@ -14728,6 +14986,9 @@ interface WorkflowInstanceCreateOptions<PARAMS = unknown> {
|
|
|
14728
14986
|
successRetention?: WorkflowRetentionDuration;
|
|
14729
14987
|
errorRetention?: WorkflowRetentionDuration;
|
|
14730
14988
|
};
|
|
14989
|
+
/** A best-effort geographic placement preference for the Workflow instance.
|
|
14990
|
+
* See `WorkflowInstanceLocationHint` for supported regions. */
|
|
14991
|
+
locationHint?: WorkflowInstanceLocationHint;
|
|
14731
14992
|
}
|
|
14732
14993
|
type InstanceStatus = {
|
|
14733
14994
|
status: 'queued' // means that instance is waiting to be started (see concurrency limits)
|